@applica-software-guru/react-admin 1.3.153 → 1.3.155
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/hooks/usePopoverState.d.ts +2 -2
- package/dist/hooks/usePopoverState.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +2 -2
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +4 -4
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +2 -2
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Layout/Provider.tsx +3 -3
- package/src/hooks/usePopoverState.tsx +2 -2
package/dist/react-admin.umd.js
CHANGED
|
@@ -94,7 +94,7 @@ __p += '`),qe&&(ae+=`' +
|
|
|
94
94
|
function print() { __p += __j.call(arguments, '') }
|
|
95
95
|
`:`;
|
|
96
96
|
`)+ae+`return __p
|
|
97
|
-
}`;var Je=Rx(function(){return rt(T,Qe+"return "+ae).apply(n,D)});if(Je.source=ae,Np(Je))throw Je;return Je}function xK(i){return At(i).toLowerCase()}function wK(i){return At(i).toUpperCase()}function TK(i,a,d){if(i=At(i),i&&(d||a===n))return Wb(i);if(!i||!(a=Fn(a)))return i;var I=dr(i),y=dr(a),T=Ub(I,y),D=Yb(I,y)+1;return Po(I,T,D).join("")}function PK(i,a,d){if(i=At(i),i&&(d||a===n))return i.slice(0,Kb(i)+1);if(!i||!(a=Fn(a)))return i;var I=dr(i),y=Yb(I,dr(a))+1;return Po(I,0,y).join("")}function SK(i,a,d){if(i=At(i),i&&(d||a===n))return i.replace(Wr,"");if(!i||!(a=Fn(a)))return i;var I=dr(i),y=Ub(I,dr(a));return Po(I,y).join("")}function OK(i,a){var d=Y,I=$;if(jt(a)){var y="separator"in a?a.separator:y;d="length"in a?We(a.length):d,I="omission"in a?Fn(a.omission):I}i=At(i);var T=i.length;if(us(i)){var D=dr(i);T=D.length}if(d>=T)return i;var V=d-As(I);if(V<1)return I;var G=D?Po(D,0,V).join(""):i.slice(0,V);if(y===n)return G+I;if(D&&(V+=G.length-V),Vp(y)){if(i.slice(V).search(y)){var oe,ie=G;for(y.global||(y=np(y.source,At(wa.exec(y))+"g")),y.lastIndex=0;oe=y.exec(ie);)var ae=oe.index;G=G.slice(0,ae===n?V:ae)}}else if(i.indexOf(Fn(y),V)!=V){var me=G.lastIndexOf(y);me>-1&&(G=G.slice(0,me))}return G+I}function jK(i){return i=At(i),i&&Kc.test(i)?i.replace(Gc,az):i}var MK=Es(function(i,a,d){return i+(d?" ":"")+a.toUpperCase()}),Wp=DQ("toUpperCase");function Mx(i,a,d){return i=At(i),a=d?n:a,a===n?nz(i)?uz(i):KH(i):i.match(a)||[]}var Rx=Xe(function(i,a){try{return Dn(i,n,a)}catch(d){return Np(d)?d:new Le(d)}}),RK=Jr(function(i,a){return qn(a,function(d){d=Sr(d),Gr(i,d,Fp(i[d],i))}),i});function DK(i){var a=i==null?0:i.length,d=je();return i=a?Tt(i,function(I){if(typeof I[1]!="function")throw new $n(l);return[d(I[0]),I[1]]}):[],Xe(function(I){for(var y=-1;++y<a;){var T=i[y];if(Dn(T[0],this,I))return Dn(T[1],this,I)}})}function kK(i){return aW(tr(i,C))}function Up(i){return function(){return i}}function FK(i,a){return i==null||i!==i?a:i}var LK=FQ(),NK=FQ(!0);function bn(i){return i}function Yp(i){return gQ(typeof i=="function"?i:tr(i,C))}function VK(i){return pQ(tr(i,C))}function HK(i,a){return hQ(i,tr(a,C))}var zK=Xe(function(i,a){return function(d){return ka(d,i,a)}}),WK=Xe(function(i,a){return function(d){return ka(i,d,a)}});function Gp(i,a,d){var I=$t(a),y=Bu(a,I);d==null&&!(jt(a)&&(y.length||!I.length))&&(d=a,a=i,i=this,y=Bu(a,$t(a)));var T=!(jt(d)&&"chain"in d)||!!d.chain,D=Zr(i);return qn(y,function(V){var G=a[V];i[V]=G,D&&(i.prototype[V]=function(){var oe=this.__chain__;if(T||oe){var ie=i(this.__wrapped__),ae=ie.__actions__=Bn(this.__actions__);return ae.push({func:G,args:arguments,thisArg:i}),ie.__chain__=oe,ie}return G.apply(i,yo([this.value()],arguments))})}),i}function UK(){return en._===this&&(en._=hz),this}function Kp(){}function YK(i){return i=We(i),Xe(function(a){return CQ(a,i)})}var GK=bp(Tt),KK=bp(Lb),JK=bp(Xf);function Dx(i){return Op(i)?Zf(Sr(i)):bW(i)}function XK(i){return function(a){return i==null?n:ci(i,a)}}var ZK=NQ(),_K=NQ(!0);function Jp(){return[]}function Xp(){return!1}function qK(){return{}}function $K(){return""}function eJ(){return!0}function tJ(i,a){if(i=We(i),i<1||i>L)return[];var d=_,I=ln(i,_);a=je(a),i-=_;for(var y=$f(I,a);++d<i;)a(d);return y}function nJ(i){return Ne(i)?Tt(i,Sr):Ln(i)?[i]:Bn(tx(At(i)))}function rJ(i){var a=++fz;return At(i)+a}var oJ=wu(function(i,a){return i+a},0),iJ=Qp("ceil"),sJ=wu(function(i,a){return i/a},1),aJ=Qp("floor");function lJ(i){return i&&i.length?mu(i,bn,up):n}function cJ(i,a){return i&&i.length?mu(i,je(a,2),up):n}function uJ(i){return Hb(i,bn)}function AJ(i,a){return Hb(i,je(a,2))}function dJ(i){return i&&i.length?mu(i,bn,fp):n}function gJ(i,a){return i&&i.length?mu(i,je(a,2),fp):n}var fJ=wu(function(i,a){return i*a},1),pJ=Qp("round"),hJ=wu(function(i,a){return i-a},0);function CJ(i){return i&&i.length?qf(i,bn):0}function EJ(i,a){return i&&i.length?qf(i,je(a,2)):0}return Q.after=VY,Q.ary=dx,Q.assign=wG,Q.assignIn=xx,Q.assignInWith=Vu,Q.assignWith=TG,Q.at=PG,Q.before=gx,Q.bind=Fp,Q.bindAll=RK,Q.bindKey=fx,Q.castArray=qY,Q.chain=cx,Q.chunk=aU,Q.compact=lU,Q.concat=cU,Q.cond=DK,Q.conforms=kK,Q.constant=Up,Q.countBy=CY,Q.create=SG,Q.curry=px,Q.curryRight=hx,Q.debounce=Cx,Q.defaults=OG,Q.defaultsDeep=jG,Q.defer=HY,Q.delay=zY,Q.difference=uU,Q.differenceBy=AU,Q.differenceWith=dU,Q.drop=gU,Q.dropRight=fU,Q.dropRightWhile=pU,Q.dropWhile=hU,Q.fill=CU,Q.filter=IY,Q.flatMap=vY,Q.flatMapDeep=yY,Q.flatMapDepth=bY,Q.flatten=ix,Q.flattenDeep=EU,Q.flattenDepth=IU,Q.flip=WY,Q.flow=LK,Q.flowRight=NK,Q.fromPairs=mU,Q.functions=NG,Q.functionsIn=VG,Q.groupBy=QY,Q.initial=vU,Q.intersection=yU,Q.intersectionBy=bU,Q.intersectionWith=QU,Q.invert=zG,Q.invertBy=WG,Q.invokeMap=wY,Q.iteratee=Yp,Q.keyBy=TY,Q.keys=$t,Q.keysIn=yn,Q.map=Ru,Q.mapKeys=YG,Q.mapValues=GG,Q.matches=VK,Q.matchesProperty=HK,Q.memoize=ku,Q.merge=KG,Q.mergeWith=wx,Q.method=zK,Q.methodOf=WK,Q.mixin=Gp,Q.negate=Fu,Q.nthArg=YK,Q.omit=JG,Q.omitBy=XG,Q.once=UY,Q.orderBy=PY,Q.over=GK,Q.overArgs=YY,Q.overEvery=KK,Q.overSome=JK,Q.partial=Lp,Q.partialRight=Ex,Q.partition=SY,Q.pick=ZG,Q.pickBy=Tx,Q.property=Dx,Q.propertyOf=XK,Q.pull=PU,Q.pullAll=ax,Q.pullAllBy=SU,Q.pullAllWith=OU,Q.pullAt=jU,Q.range=ZK,Q.rangeRight=_K,Q.rearg=GY,Q.reject=MY,Q.remove=MU,Q.rest=KY,Q.reverse=Dp,Q.sampleSize=DY,Q.set=qG,Q.setWith=$G,Q.shuffle=kY,Q.slice=RU,Q.sortBy=NY,Q.sortedUniq=HU,Q.sortedUniqBy=zU,Q.split=vK,Q.spread=JY,Q.tail=WU,Q.take=UU,Q.takeRight=YU,Q.takeRightWhile=GU,Q.takeWhile=KU,Q.tap=lY,Q.throttle=XY,Q.thru=Mu,Q.toArray=yx,Q.toPairs=Px,Q.toPairsIn=Sx,Q.toPath=nJ,Q.toPlainObject=Qx,Q.transform=eK,Q.unary=ZY,Q.union=JU,Q.unionBy=XU,Q.unionWith=ZU,Q.uniq=_U,Q.uniqBy=qU,Q.uniqWith=$U,Q.unset=tK,Q.unzip=kp,Q.unzipWith=lx,Q.update=nK,Q.updateWith=rK,Q.values=Bs,Q.valuesIn=oK,Q.without=eY,Q.words=Mx,Q.wrap=_Y,Q.xor=tY,Q.xorBy=nY,Q.xorWith=rY,Q.zip=oY,Q.zipObject=iY,Q.zipObjectDeep=sY,Q.zipWith=aY,Q.entries=Px,Q.entriesIn=Sx,Q.extend=xx,Q.extendWith=Vu,Gp(Q,Q),Q.add=oJ,Q.attempt=Rx,Q.camelCase=lK,Q.capitalize=Ox,Q.ceil=iJ,Q.clamp=iK,Q.clone=$Y,Q.cloneDeep=tG,Q.cloneDeepWith=nG,Q.cloneWith=eG,Q.conformsTo=rG,Q.deburr=jx,Q.defaultTo=FK,Q.divide=sJ,Q.endsWith=cK,Q.eq=fr,Q.escape=uK,Q.escapeRegExp=AK,Q.every=EY,Q.find=mY,Q.findIndex=rx,Q.findKey=MG,Q.findLast=BY,Q.findLastIndex=ox,Q.findLastKey=RG,Q.floor=aJ,Q.forEach=ux,Q.forEachRight=Ax,Q.forIn=DG,Q.forInRight=kG,Q.forOwn=FG,Q.forOwnRight=LG,Q.get=Hp,Q.gt=oG,Q.gte=iG,Q.has=HG,Q.hasIn=zp,Q.head=sx,Q.identity=bn,Q.includes=xY,Q.indexOf=BU,Q.inRange=sK,Q.invoke=UG,Q.isArguments=di,Q.isArray=Ne,Q.isArrayBuffer=sG,Q.isArrayLike=vn,Q.isArrayLikeObject=Nt,Q.isBoolean=aG,Q.isBuffer=So,Q.isDate=lG,Q.isElement=cG,Q.isEmpty=uG,Q.isEqual=AG,Q.isEqualWith=dG,Q.isError=Np,Q.isFinite=gG,Q.isFunction=Zr,Q.isInteger=Ix,Q.isLength=Lu,Q.isMap=mx,Q.isMatch=fG,Q.isMatchWith=pG,Q.isNaN=hG,Q.isNative=CG,Q.isNil=IG,Q.isNull=EG,Q.isNumber=Bx,Q.isObject=jt,Q.isObjectLike=Ft,Q.isPlainObject=za,Q.isRegExp=Vp,Q.isSafeInteger=mG,Q.isSet=vx,Q.isString=Nu,Q.isSymbol=Ln,Q.isTypedArray=ms,Q.isUndefined=BG,Q.isWeakMap=vG,Q.isWeakSet=yG,Q.join=xU,Q.kebabCase=dK,Q.last=rr,Q.lastIndexOf=wU,Q.lowerCase=gK,Q.lowerFirst=fK,Q.lt=bG,Q.lte=QG,Q.max=lJ,Q.maxBy=cJ,Q.mean=uJ,Q.meanBy=AJ,Q.min=dJ,Q.minBy=gJ,Q.stubArray=Jp,Q.stubFalse=Xp,Q.stubObject=qK,Q.stubString=$K,Q.stubTrue=eJ,Q.multiply=fJ,Q.nth=TU,Q.noConflict=UK,Q.noop=Kp,Q.now=Du,Q.pad=pK,Q.padEnd=hK,Q.padStart=CK,Q.parseInt=EK,Q.random=aK,Q.reduce=OY,Q.reduceRight=jY,Q.repeat=IK,Q.replace=mK,Q.result=_G,Q.round=pJ,Q.runInContext=U,Q.sample=RY,Q.size=FY,Q.snakeCase=BK,Q.some=LY,Q.sortedIndex=DU,Q.sortedIndexBy=kU,Q.sortedIndexOf=FU,Q.sortedLastIndex=LU,Q.sortedLastIndexBy=NU,Q.sortedLastIndexOf=VU,Q.startCase=yK,Q.startsWith=bK,Q.subtract=hJ,Q.sum=CJ,Q.sumBy=EJ,Q.template=QK,Q.times=tJ,Q.toFinite=_r,Q.toInteger=We,Q.toLength=bx,Q.toLower=xK,Q.toNumber=or,Q.toSafeInteger=xG,Q.toString=At,Q.toUpper=wK,Q.trim=TK,Q.trimEnd=PK,Q.trimStart=SK,Q.truncate=OK,Q.unescape=jK,Q.uniqueId=rJ,Q.upperCase=MK,Q.upperFirst=Wp,Q.each=ux,Q.eachRight=Ax,Q.first=sx,Gp(Q,function(){var i={};return Tr(Q,function(a,d){gt.call(Q.prototype,d)||(i[d]=a)}),i}(),{chain:!1}),Q.VERSION=r,qn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){Q[i].placeholder=Q}),qn(["drop","take"],function(i,a){_e.prototype[i]=function(d){d=d===n?1:Jt(We(d),0);var I=this.__filtered__&&!a?new _e(this):this.clone();return I.__filtered__?I.__takeCount__=ln(d,I.__takeCount__):I.__views__.push({size:ln(d,_),type:i+(I.__dir__<0?"Right":"")}),I},_e.prototype[i+"Right"]=function(d){return this.reverse()[i](d).reverse()}}),qn(["filter","map","takeWhile"],function(i,a){var d=a+1,I=d==q||d==H;_e.prototype[i]=function(y){var T=this.clone();return T.__iteratees__.push({iteratee:je(y,3),type:d}),T.__filtered__=T.__filtered__||I,T}}),qn(["head","last"],function(i,a){var d="take"+(a?"Right":"");_e.prototype[i]=function(){return this[d](1).value()[0]}}),qn(["initial","tail"],function(i,a){var d="drop"+(a?"":"Right");_e.prototype[i]=function(){return this.__filtered__?new _e(this):this[d](1)}}),_e.prototype.compact=function(){return this.filter(bn)},_e.prototype.find=function(i){return this.filter(i).head()},_e.prototype.findLast=function(i){return this.reverse().find(i)},_e.prototype.invokeMap=Xe(function(i,a){return typeof i=="function"?new _e(this):this.map(function(d){return ka(d,i,a)})}),_e.prototype.reject=function(i){return this.filter(Fu(je(i)))},_e.prototype.slice=function(i,a){i=We(i);var d=this;return d.__filtered__&&(i>0||a<0)?new _e(d):(i<0?d=d.takeRight(-i):i&&(d=d.drop(i)),a!==n&&(a=We(a),d=a<0?d.dropRight(-a):d.take(a-i)),d)},_e.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},_e.prototype.toArray=function(){return this.take(_)},Tr(_e.prototype,function(i,a){var d=/^(?:filter|find|map|reject)|While$/.test(a),I=/^(?:head|last)$/.test(a),y=Q[I?"take"+(a=="last"?"Right":""):a],T=I||/^find/.test(a);y&&(Q.prototype[a]=function(){var D=this.__wrapped__,V=I?[1]:arguments,G=D instanceof _e,oe=V[0],ie=G||Ne(D),ae=function(Ze){var qe=y.apply(Q,yo([Ze],V));return I&&me?qe[0]:qe};ie&&d&&typeof oe=="function"&&oe.length!=1&&(G=ie=!1);var me=this.__chain__,Qe=!!this.__actions__.length,Me=T&&!me,Je=G&&!Qe;if(!T&&ie){D=Je?D:new _e(this);var Re=i.apply(D,V);return Re.__actions__.push({func:Mu,args:[ae],thisArg:n}),new er(Re,me)}return Me&&Je?i.apply(this,V):(Re=this.thru(ae),Me?I?Re.value()[0]:Re.value():Re)})}),qn(["pop","push","shift","sort","splice","unshift"],function(i){var a=iu[i],d=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",I=/^(?:pop|shift)$/.test(i);Q.prototype[i]=function(){var y=arguments;if(I&&!this.__chain__){var T=this.value();return a.apply(Ne(T)?T:[],y)}return this[d](function(D){return a.apply(Ne(D)?D:[],y)})}}),Tr(_e.prototype,function(i,a){var d=Q[a];if(d){var I=d.name+"";gt.call(ps,I)||(ps[I]=[]),ps[I].push({name:a,func:d})}}),ps[xu(n,j).name]=[{name:"wrapper",func:n}],_e.prototype.clone=jz,_e.prototype.reverse=Mz,_e.prototype.value=Rz,Q.prototype.at=cY,Q.prototype.chain=uY,Q.prototype.commit=AY,Q.prototype.next=dY,Q.prototype.plant=fY,Q.prototype.reverse=pY,Q.prototype.toJSON=Q.prototype.valueOf=Q.prototype.value=hY,Q.prototype.first=Q.prototype.head,Pa&&(Q.prototype[Pa]=gY),Q},ds=Az();oi?((oi.exports=ds)._=ds,Yf._=ds):en._=ds}).call(Hn)}(gl,gl.exports);var dt=gl.exports;const ge=$r(dt),eC=e=>function(){return e.apply(this,arguments)},wi=c.shape({id:c.string,title:c.string,type:c.oneOf(["group","item","collapse"]),icon:c.elementType,url:c.string,parent:c.shape(eC(()=>wi)),children:c.arrayOf(eC(()=>wi)),resource:c.bool}),tC={fontFamily:"'Inter', sans-serif",menuOrientation:"vertical",miniDrawer:!1,container:!1,mode:"light",presetColor:"theme4",themeDirection:"ltr",appDefaultPath:"/",drawerWidth:260,horizontalMaxItems:6,spacing:2},mA=w.createContext(tC),BT=e=>e==="vertical",vT=e=>e==="horizontal",fl=({initialConfig:e,children:t})=>{const[n,r]=PA("theme-config",{...tC,...e}),o=m=>r(B=>({...B,fontFamily:m})),s=m=>r(B=>({...B,menuOrientation:m})),l=m=>r(B=>({...B,miniDrawer:m})),u=m=>r(B=>({...B,container:m})),A=m=>r(B=>({...B,mode:m})),f=m=>r(B=>({...B,presetColor:m})),p=m=>r(B=>({...B,themeDirection:m})),C=m=>r(B=>({...B,appDefaultPath:m})),h=m=>r(B=>({...B,drawerWidth:m})),E=m=>r(B=>({...B,horizontalMaxItems:m}));return g.jsx(mA.Provider,{value:{...n,setFontFamily:o,setMenuOrientation:s,setMiniDrawer:l,setContainer:u,setMode:A,setPresetColor:f,setThemeDirection:p,setAppDefaultPath:C,setDrawerWidth:h,setHorizontalMaxItems:E,isVerticalLayout:BT,isHorizontalLayout:vT},children:t})};fl.propTypes={children:c.node};const nC={openItem:["dashboard"],openComponent:"buttons",selectedID:null,drawerOpen:!1,componentDrawerOpen:!0,menuDashboard:{},error:null},BA=w.createContext(nC),vA=({menu:e,children:t})=>{const[n,r]=PA("menu-config",{...nC}),o=C=>{r(h=>({...h,openItem:C}))},s=C=>{r(h=>({...h,selectedID:C}))},l=C=>{r(h=>({...h,openComponent:C}))},u=C=>{r(h=>({...h,drawerOpen:C}))},A=C=>{r(h=>({...h,componentDrawerOpen:C}))},f=C=>{r(h=>({...h,menuDashboard:C}))},p=C=>{r(h=>({...h,error:C}))};return g.jsx(BA.Provider,{value:{...n,groups:e,activeItem:o,activeComponent:l,openDrawer:u,openComponentDrawer:A,activeID:s,getMenuSuccess:f,hasError:p},children:t})};vA.propTypes={children:c.node,menu:c.arrayOf(wi)};const yA=w.createContext(void 0),bA=w.createContext(void 0),no=()=>w.useContext(BA),yT=["e-","entities/"],bT=e=>{let t=e;return yT.forEach(n=>{t=t!=null&&t.startsWith(n)?t==null?void 0:t.substring(n.length):t}),t},QT=(e,t)=>{var n,r;return((n=t.options)==null?void 0:n.group)===e.id||!((r=t.options)!=null&&r.group)&&e.id==="admin"},xT=(e,t)=>{const n=bT(e.name);return t==null?void 0:t.includes(`${n}:list`)},QA=(e,t)=>{let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const o=e[r];if(o.children&&(n=QA(o.children,t),n))return n}return n},rC=(e,t,n)=>{let r=e.find(o=>["group","collapse"].indexOf(o.type)!==-1&&QT(o,t));if(!r)for(let o=0;o<e.length;o++){const s=e[o];if(s.children&&(r=rC(s.children,t),r))return r}return r},oC=(e,t)=>{let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const o=e[r];if(o.children&&(n=oC(o.children,t),n))return n}return n},iC=e=>e?e.type==="item"?!0:(e.children&&(e.children=e.children.filter(iC)),e.children&&e.children.length>0):!1,sC=e=>(e.children&&e.children.forEach(t=>{t.parent=e,sC(t)}),e),wT=({userGroups:e,resources:t,permissions:n,translate:r,roles:o})=>{const s=C=>(C.title=r(C.title,{_:C.title}),C.children&&C.children.forEach(h=>s(h)),C),l=Object.keys(t),u=(C,h)=>(C.children&&(C.children=C.children.filter(E=>{if(E.resource===!1){const m=E.roles||[];return!!(m.length===0||m.some(B=>o.includes(B)))}return E.type==="item"?h.includes(E.id):(u(E,h),E.children&&E.children.length>0)})),C),A=dt.cloneDeep(e).map(C=>({type:"group",icon:et.AntDesignOutlined,children:[],...C})).map(s).map(C=>u(C,l)),f=Object.values(t).map(C=>{var h;return((h=C.options)==null?void 0:h.group)||"admin"}).filter((C,h,E)=>E.indexOf(C)===h).filter(C=>C!==void 0&&oC(e,C)===null).map(C=>({id:C,title:r(`ra.menu.group.${C}`),type:"group",icon:et.AntDesignOutlined,children:[]})),p=[...A,...f];return Object.values(t).forEach(C=>{var R,x,O,P;const h=rC(p,C),E=(R=h==null?void 0:h.children)==null?void 0:R.find(N=>N.id===C.name),m=(x=h==null?void 0:h.children)==null?void 0:x.some(N=>N.id===C.name),B=(E==null?void 0:E.roles)||((O=C.options)==null?void 0:O.roles)||[],v=!B||B.length===0||B.some(N=>o.includes(N));if(!xT(C,n)||!C.hasList||!v){m&&((P=h==null?void 0:h.children)==null?void 0:P.length)>0&&(h.children=h.children.filter(N=>N.id!==C.name));return}h&&(h.children||(h.children=[]))}),p.filter(iC).map(sC)},xA=()=>{const e=S.useResourceDefinitions(),{isLoading:t,data:n}=S.useGetIdentity(),r=n&&n.id>0,{isLoading:o,permissions:s}=S.usePermissions(r),{groups:l}=no(),u=S.useTranslate(),A=w.useMemo(()=>{if(t||!n||n===null||(n==null?void 0:n.id)<=0)return null;const p=((n==null?void 0:n.roles)||[]).map(h=>h.id);return wT({resources:e,permissions:s,translate:u,userGroups:l,roles:p})},[t,o,n,e,s,u,l]),f=w.useMemo(()=>t,[t]);return{menu:A,isLoading:f,getItem:p=>f?!1:QA(A,p),findInMenu:f?()=>{}:QA}},aC=()=>{const e=S.useTranslate(),{isLoading:t,menu:n,findInMenu:r}=xA(),{pathname:o}=mt.useLocation();return w.useMemo(()=>{var C;const s=o.split("/").filter(h=>h);let l=dt.cloneDeep(n),u=o,A=r(l,o);if(A||(A=r(l,s[s.length-1]),u=A?A.id:u),!A)for(let h=s.length;h>=0;h--){let E=s.slice(0,h).join("/");if(A=r(l,E),A){u=A.id;break}}const f=(C=A==null?void 0:A.url)==null?void 0:C.split("/");if(s.length>=(f==null?void 0:f.length)){const h=s[s.length-1];if(A){const E=h==="create"||o===A.url?"create":"edit",m=`resources.${u}.breadcrumbs.${E}`,B={id:`${u}-${E}`,type:"item",title:e(m,{_:e(m,{_:m})}),url:o,breadcrumbs:!0,parent:A};A.type="collapse",A.breadcrumbs=!0,A.children=A.children||[],A.children.push(B),A=B}}let p=[];if(A){let h={...A,last:!0};for(;h;)p.push(h),h=h.parent;p=p.reverse()}return{isLoading:t,navigation:{items:l},breadcrumbs:p}},[t,o,n,r,e])};var lC={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Hn,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",l="second",u="minute",A="hour",f="day",p="week",C="month",h="quarter",E="year",m="date",B="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,j=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,R={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var J=["th","st","nd","rd"],H=q%100;return"["+q+(J[(H-20)%10]||J[H]||J[0])+"]"}},x=function(q,J,H){var K=String(q);return!K||K.length>=J?q:""+Array(J+1-K.length).join(H)+q},O={s:x,z:function(q){var J=-q.utcOffset(),H=Math.abs(J),K=Math.floor(H/60),L=H%60;return(J<=0?"+":"-")+x(K,2,"0")+":"+x(L,2,"0")},m:function q(J,H){if(J.date()<H.date())return-q(H,J);var K=12*(H.year()-J.year())+(H.month()-J.month()),L=J.clone().add(K,C),ee=H-L<0,z=J.clone().add(K+(ee?-1:1),C);return+(-(K+(H-L)/(ee?L-z:z-L))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:C,y:E,w:p,d:f,D:m,h:A,m:u,s:l,ms:s,Q:h}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},P="en",N={};N[P]=R;var F="$isDayjsObject",X=function(q){return q instanceof ce||!(!q||!q[F])},Z=function q(J,H,K){var L;if(!J)return P;if(typeof J=="string"){var ee=J.toLowerCase();N[ee]&&(L=ee),H&&(N[ee]=H,L=ee);var z=J.split("-");if(!L&&z.length>1)return q(z[0])}else{var _=J.name;N[_]=J,L=_}return!K&&L&&(P=L),L||!K&&P},Y=function(q,J){if(X(q))return q.clone();var H=typeof J=="object"?J:{};return H.date=q,H.args=arguments,new ce(H)},$=O;$.l=Z,$.i=X,$.w=function(q,J){return Y(q,{locale:J.$L,utc:J.$u,x:J.$x,$offset:J.$offset})};var ce=function(){function q(H){this.$L=Z(H.locale,null,!0),this.parse(H),this.$x=this.$x||H.x||{},this[F]=!0}var J=q.prototype;return J.parse=function(H){this.$d=function(K){var L=K.date,ee=K.utc;if(L===null)return new Date(NaN);if($.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var z=L.match(v);if(z){var _=z[2]-1||0,fe=(z[7]||"0").substring(0,3);return ee?new Date(Date.UTC(z[1],_,z[3]||1,z[4]||0,z[5]||0,z[6]||0,fe)):new Date(z[1],_,z[3]||1,z[4]||0,z[5]||0,z[6]||0,fe)}}return new Date(L)}(H),this.init()},J.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds()},J.$utils=function(){return $},J.isValid=function(){return this.$d.toString()!==B},J.isSame=function(H,K){var L=Y(H);return this.startOf(K)<=L&&L<=this.endOf(K)},J.isAfter=function(H,K){return Y(H)<this.startOf(K)},J.isBefore=function(H,K){return this.endOf(K)<Y(H)},J.$g=function(H,K,L){return $.u(H)?this[K]:this.set(L,H)},J.unix=function(){return Math.floor(this.valueOf()/1e3)},J.valueOf=function(){return this.$d.getTime()},J.startOf=function(H,K){var L=this,ee=!!$.u(K)||K,z=$.p(H),_=function(Ee,Be){var xe=$.w(L.$u?Date.UTC(L.$y,Be,Ee):new Date(L.$y,Be,Ee),L);return ee?xe:xe.endOf(f)},fe=function(Ee,Be){return $.w(L.toDate()[Ee].apply(L.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(Be)),L)},he=this.$W,ue=this.$M,pe=this.$D,Ce="set"+(this.$u?"UTC":"");switch(z){case E:return ee?_(1,0):_(31,11);case C:return ee?_(1,ue):_(0,ue+1);case p:var ve=this.$locale().weekStart||0,Ie=(he<ve?he+7:he)-ve;return _(ee?pe-Ie:pe+(6-Ie),ue);case f:case m:return fe(Ce+"Hours",0);case A:return fe(Ce+"Minutes",1);case u:return fe(Ce+"Seconds",2);case l:return fe(Ce+"Milliseconds",3);default:return this.clone()}},J.endOf=function(H){return this.startOf(H,!1)},J.$set=function(H,K){var L,ee=$.p(H),z="set"+(this.$u?"UTC":""),_=(L={},L[f]=z+"Date",L[m]=z+"Date",L[C]=z+"Month",L[E]=z+"FullYear",L[A]=z+"Hours",L[u]=z+"Minutes",L[l]=z+"Seconds",L[s]=z+"Milliseconds",L)[ee],fe=ee===f?this.$D+(K-this.$W):K;if(ee===C||ee===E){var he=this.clone().set(m,1);he.$d[_](fe),he.init(),this.$d=he.set(m,Math.min(this.$D,he.daysInMonth())).$d}else _&&this.$d[_](fe);return this.init(),this},J.set=function(H,K){return this.clone().$set(H,K)},J.get=function(H){return this[$.p(H)]()},J.add=function(H,K){var L,ee=this;H=Number(H);var z=$.p(K),_=function(ue){var pe=Y(ee);return $.w(pe.date(pe.date()+Math.round(ue*H)),ee)};if(z===C)return this.set(C,this.$M+H);if(z===E)return this.set(E,this.$y+H);if(z===f)return _(1);if(z===p)return _(7);var fe=(L={},L[u]=r,L[A]=o,L[l]=n,L)[z]||1,he=this.$d.getTime()+H*fe;return $.w(he,this)},J.subtract=function(H,K){return this.add(-1*H,K)},J.format=function(H){var K=this,L=this.$locale();if(!this.isValid())return L.invalidDate||B;var ee=H||"YYYY-MM-DDTHH:mm:ssZ",z=$.z(this),_=this.$H,fe=this.$m,he=this.$M,ue=L.weekdays,pe=L.months,Ce=L.meridiem,ve=function(Be,xe,le,Ve){return Be&&(Be[xe]||Be(K,ee))||le[xe].slice(0,Ve)},Ie=function(Be){return $.s(_%12||12,Be,"0")},Ee=Ce||function(Be,xe,le){var Ve=Be<12?"AM":"PM";return le?Ve.toLowerCase():Ve};return ee.replace(j,function(Be,xe){return xe||function(le){switch(le){case"YY":return String(K.$y).slice(-2);case"YYYY":return $.s(K.$y,4,"0");case"M":return he+1;case"MM":return $.s(he+1,2,"0");case"MMM":return ve(L.monthsShort,he,pe,3);case"MMMM":return ve(pe,he);case"D":return K.$D;case"DD":return $.s(K.$D,2,"0");case"d":return String(K.$W);case"dd":return ve(L.weekdaysMin,K.$W,ue,2);case"ddd":return ve(L.weekdaysShort,K.$W,ue,3);case"dddd":return ue[K.$W];case"H":return String(_);case"HH":return $.s(_,2,"0");case"h":return Ie(1);case"hh":return Ie(2);case"a":return Ee(_,fe,!0);case"A":return Ee(_,fe,!1);case"m":return String(fe);case"mm":return $.s(fe,2,"0");case"s":return String(K.$s);case"ss":return $.s(K.$s,2,"0");case"SSS":return $.s(K.$ms,3,"0");case"Z":return z}return null}(Be)||z.replace(":","")})},J.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},J.diff=function(H,K,L){var ee,z=this,_=$.p(K),fe=Y(H),he=(fe.utcOffset()-this.utcOffset())*r,ue=this-fe,pe=function(){return $.m(z,fe)};switch(_){case E:ee=pe()/12;break;case C:ee=pe();break;case h:ee=pe()/3;break;case p:ee=(ue-he)/6048e5;break;case f:ee=(ue-he)/864e5;break;case A:ee=ue/o;break;case u:ee=ue/r;break;case l:ee=ue/n;break;default:ee=ue}return L?ee:$.a(ee)},J.daysInMonth=function(){return this.endOf(C).$D},J.$locale=function(){return N[this.$L]},J.locale=function(H,K){if(!H)return this.$L;var L=this.clone(),ee=Z(H,K,!0);return ee&&(L.$L=ee),L},J.clone=function(){return $.w(this.$d,this)},J.toDate=function(){return new Date(this.valueOf())},J.toJSON=function(){return this.isValid()?this.toISOString():null},J.toISOString=function(){return this.$d.toISOString()},J.toString=function(){return this.$d.toUTCString()},q}(),se=ce.prototype;return Y.prototype=se,[["$ms",s],["$s",l],["$m",u],["$H",A],["$W",f],["$M",C],["$y",E],["$D",m]].forEach(function(q){se[q[1]]=function(J){return this.$g(J,q[0],q[1])}}),Y.extend=function(q,J){return q.$i||(q(J,ce,Y),q.$i=!0),Y},Y.locale=Z,Y.isDayjs=X,Y.unix=function(q){return Y(1e3*q)},Y.en=N[P],Y.Ls=N,Y.p={},Y})})(lC);var TT=lC.exports;const Mr=$r(TT),cC=e=>{const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return Mr().hour(n).minute(r)};function PT(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}function wA(e={},t=[],n={}){const{isEmpty:r=ge.isEmpty}=n;return!ge.some(t,o=>r((e??{})[o.locale]))}function TA(e,t,n){if(!ge.isPlainObject(e)||t===void 0)return;const r=ge.isPlainObject(n)?n:{},o=!!((r==null?void 0:r.fallback)??!0);let s=e[String(t)];if(s===void 0&&o){const l=ge.isArray(r.fallbackLocales)&&!ge.isEmpty(r.fallbackLocales)?r.fallbackLocales:["en"];s=ge.chain(l).map(u=>e[String(u)]).reject(ge.isUndefined).first().value(),s===void 0&&(s=ge.chain(e).values().first().value())}return s}function uC(e){const[t]=de.useLocaleState();return e!==void 0?String(e):t}function ST(e,t){const n=uC(t==null?void 0:t.locale);return TA(e,n,t)}function OT(e){const t=uC(e==null?void 0:e.locale);return w.useCallback(r=>TA(r,t,e),[t,e])}function PA(e,t){const[n,r]=w.useState(()=>{const s=typeof window<"u"?localStorage.getItem(e):null;return s===null?t:JSON.parse(s)});return w.useEffect(()=>{const s=l=>{typeof window<"u"&&l.storageArea===localStorage&&l.key===e&&r(l.newValue?JSON.parse(l.newValue):l.newValue)};return window.addEventListener("storage",s),()=>{window.removeEventListener("storage",s)}},[e,t]),[n,s=>{r(l=>{const u=typeof s=="function"?s(l):s;return typeof window<"u"&&localStorage.setItem(e,JSON.stringify(u)),u})}]}function AC(e){if(!ge.isPlainObject(e))throw new Error("[useMemoizedObject]: param must be a plain JS object");const[t,n]=w.useState(e);return w.useEffect(()=>{ge.isEqual(e,t)||n(e)},[e,t]),t}function pl(){const[e,t]=w.useState(null),n=!!e,r=w.useCallback(l=>t(l==null?void 0:l.currentTarget),[t]),o=w.useCallback(()=>t(null),[t]),s=w.useCallback(l=>{n?o():r(l)},[n,r,o]);return{anchorEl:e,open:n,handleClick:r,handleClose:o,handleToggle:s}}function jT(e,t){const[n,r]=w.useState({width:1,height:1}),o=e.current;return w.useEffect(()=>{function s(){var f;let u=0,A=0;switch(t){case"client":u=(o==null?void 0:o.clientWidth)??0,A=(o==null?void 0:o.clientHeight)??0;break;case"offset":u=(o==null?void 0:o.offsetWidth)??0,A=(o==null?void 0:o.offsetHeight)??0;break;case"scroll":u=(o==null?void 0:o.scrollWidth)??0,A=(o==null?void 0:o.scrollHeight)??0;break;case"bounding":default:{const p=((f=e.current)==null?void 0:f.getBoundingClientRect())??{width:0,height:0};u=p.width,A=p.height;break}}r({width:u,height:A})}const l=new ResizeObserver(s);return ge.isEmpty(e==null?void 0:e.current)||(l.observe(e==null?void 0:e.current),s()),()=>{l.disconnect()}},[o,t]),n}const SA=e=>{const t=S.useRecordContext(),n=S.useTranslate(),r=S.useResourceContext(),o=t!=null&&t.id?"edit":"create";return w.useMemo(()=>{if(e===!1)return;const l=`resources.${r}.title`;return e||n(`resources.${r}.title.${o}`,{_:n(l,{_:l}),...t})},[o,t,r,n,e])};function Ir(e,t,n){const r=ge.chain((e==null?void 0:e.sx)??{}).cloneDeepWith(l=>ge.isFunction(l)?l:void 0).value();n!=null&&n.defaults?ge.defaultsDeep(r,t):ge.merge(r,t);const[o,s]=w.useState(r);return w.useEffect(()=>{ge.isEqual(o,r)||s(r)},[o,r]),o}const dC=()=>w.useContext(yA),MT=()=>w.useContext(bA),wn=()=>w.useContext(mA),gC=Ae(mT,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=wn();return{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),...!t&&{width:`calc(100% - ${e.spacing(7.5)})`},...t&&{marginLeft:n,width:`calc(100% - ${n}px)`,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})}}});gC.propTypes={open:c.bool};const RT=w.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary"},{defaults:!0});return g.jsx(b.Button,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),fC=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),hl=w.createContext({}),OA=w.createContext(null),Cl=typeof document<"u",DT=Cl?w.useLayoutEffect:w.useEffect,pC=w.createContext({strict:!1});function kT(e,t,n,r){const{visualElement:o}=w.useContext(hl),s=w.useContext(pC),l=w.useContext(OA),u=w.useContext(fC).reducedMotion,A=w.useRef();r=r||s.renderer,!A.current&&r&&(A.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const f=A.current;w.useInsertionEffect(()=>{f&&f.update(n,l)});const p=w.useRef(!!window.HandoffAppearAnimations);return DT(()=>{f&&(f.render(),p.current&&f.animationState&&f.animationState.animateChanges())}),w.useEffect(()=>{f&&(f.updateFeatures(),!p.current&&f.animationState&&f.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,p.current=!1)}),f}function Ti(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function FT(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Ti(n)&&(n.current=r))},[t])}function Os(e){return typeof e=="string"||Array.isArray(e)}function El(e){return typeof e=="object"&&typeof e.start=="function"}const jA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],MA=["initial",...jA];function Il(e){return El(e.animate)||MA.some(t=>Os(e[t]))}function hC(e){return!!(Il(e)||e.variants)}function LT(e,t){if(Il(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Os(n)?n:void 0,animate:Os(r)?r:void 0}}return e.inherit!==!1?t:{}}function NT(e){const{initial:t,animate:n}=LT(e,w.useContext(hl));return w.useMemo(()=>({initial:t,animate:n}),[CC(t),CC(n)])}function CC(e){return Array.isArray(e)?e.join(" "):e}const EC={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"]},js={};for(const e in EC)js[e]={isEnabled:t=>EC[e].some(n=>!!t[n])};function VT(e){for(const t in e)js[t]={...js[t],...e[t]}}const IC=w.createContext({}),mC=w.createContext({}),HT=Symbol.for("motionComponentSymbol");function zT({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&VT(e);function s(u,A){let f;const p={...w.useContext(fC),...u,layoutId:WT(u)},{isStatic:C}=p,h=NT(u),E=r(u,C);if(!C&&Cl){h.visualElement=kT(o,E,p,t);const m=w.useContext(mC),B=w.useContext(pC).strict;h.visualElement&&(f=h.visualElement.loadFeatures(p,B,e,m))}return k.createElement(hl.Provider,{value:h},f&&h.visualElement?k.createElement(f,{visualElement:h.visualElement,...p}):null,n(o,u,FT(E,h.visualElement,A),E,C,h.visualElement))}const l=w.forwardRef(s);return l[HT]=o,l}function WT({layoutId:e}){const t=w.useContext(IC).id;return t&&e!==void 0?t+"-"+e:e}function UT(e){function t(r,o={}){return zT(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const YT=["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 RA(e){return typeof e!="string"||e.includes("-")?!1:!!(YT.indexOf(e)>-1||/[A-Z]/.test(e))}const ml={};function GT(e){Object.assign(ml,e)}const Ms=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ko=new Set(Ms);function BC(e,{layout:t,layoutId:n}){return ko.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ml[e]||e==="opacity")}const pn=e=>!!(e&&e.getVelocity),KT={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},JT=Ms.length;function XT(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let s="";for(let l=0;l<JT;l++){const u=Ms[l];if(e[u]!==void 0){const A=KT[u]||u;s+=`${A}(${e[u]}) `}}return t&&!e.z&&(s+="translateZ(0)"),s=s.trim(),o?s=o(e,r?"":s):n&&r&&(s="none"),s}const vC=e=>t=>typeof t=="string"&&t.startsWith(e),yC=vC("--"),DA=vC("var(--"),ZT=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,_T=(e,t)=>t&&typeof e=="number"?t.transform(e):e,ro=(e,t,n)=>Math.min(Math.max(n,e),t),Fo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Rs={...Fo,transform:e=>ro(0,1,e)},Bl={...Fo,default:1},Ds=e=>Math.round(e*1e5)/1e5,vl=/(-)?([\d]*\.?[\d])+/g,bC=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,qT=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ks(e){return typeof e=="string"}const Fs=e=>({test:t=>ks(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),oo=Fs("deg"),mr=Fs("%"),De=Fs("px"),$T=Fs("vh"),eP=Fs("vw"),QC={...mr,parse:e=>mr.parse(e)/100,transform:e=>mr.transform(e*100)},xC={...Fo,transform:Math.round},wC={borderWidth:De,borderTopWidth:De,borderRightWidth:De,borderBottomWidth:De,borderLeftWidth:De,borderRadius:De,radius:De,borderTopLeftRadius:De,borderTopRightRadius:De,borderBottomRightRadius:De,borderBottomLeftRadius:De,width:De,maxWidth:De,height:De,maxHeight:De,size:De,top:De,right:De,bottom:De,left:De,padding:De,paddingTop:De,paddingRight:De,paddingBottom:De,paddingLeft:De,margin:De,marginTop:De,marginRight:De,marginBottom:De,marginLeft:De,rotate:oo,rotateX:oo,rotateY:oo,rotateZ:oo,scale:Bl,scaleX:Bl,scaleY:Bl,scaleZ:Bl,skew:oo,skewX:oo,skewY:oo,distance:De,translateX:De,translateY:De,translateZ:De,x:De,y:De,z:De,perspective:De,transformPerspective:De,opacity:Rs,originX:QC,originY:QC,originZ:De,zIndex:xC,fillOpacity:Rs,strokeOpacity:Rs,numOctaves:xC};function kA(e,t,n,r){const{style:o,vars:s,transform:l,transformOrigin:u}=e;let A=!1,f=!1,p=!0;for(const C in t){const h=t[C];if(yC(C)){s[C]=h;continue}const E=wC[C],m=_T(h,E);if(ko.has(C)){if(A=!0,l[C]=m,!p)continue;h!==(E.default||0)&&(p=!1)}else C.startsWith("origin")?(f=!0,u[C]=m):o[C]=m}if(t.transform||(A||r?o.transform=XT(e.transform,n,p,r):o.transform&&(o.transform="none")),f){const{originX:C="50%",originY:h="50%",originZ:E=0}=u;o.transformOrigin=`${C} ${h} ${E}`}}const FA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function TC(e,t,n){for(const r in t)!pn(t[r])&&!BC(r,n)&&(e[r]=t[r])}function tP({transformTemplate:e},t,n){return w.useMemo(()=>{const r=FA();return kA(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function nP(e,t,n){const r=e.style||{},o={};return TC(o,r,e),Object.assign(o,tP(e,t,n)),e.transformValues?e.transformValues(o):o}function rP(e,t,n){const r={},o=nP(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const oP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function yl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||oP.has(e)}let PC=e=>!yl(e);function iP(e){e&&(PC=t=>t.startsWith("on")?!yl(t):e(t))}try{iP(require("@emotion/is-prop-valid").default)}catch{}function sP(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(PC(o)||n===!0&&yl(o)||!t&&!yl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function SC(e,t,n){return typeof e=="string"?e:De.transform(t+n*e)}function aP(e,t,n){const r=SC(t,e.x,e.width),o=SC(n,e.y,e.height);return`${r} ${o}`}const lP={offset:"stroke-dashoffset",array:"stroke-dasharray"},cP={offset:"strokeDashoffset",array:"strokeDasharray"};function uP(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?lP:cP;e[s.offset]=De.transform(-r);const l=De.transform(t),u=De.transform(n);e[s.array]=`${l} ${u}`}function LA(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:l,pathSpacing:u=1,pathOffset:A=0,...f},p,C,h){if(kA(e,f,p,h),C){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:E,style:m,dimensions:B}=e;E.transform&&(B&&(m.transform=E.transform),delete E.transform),B&&(o!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=aP(B,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(E.x=t),n!==void 0&&(E.y=n),r!==void 0&&(E.scale=r),l!==void 0&&uP(E,l,u,A,!1)}const OC=()=>({...FA(),attrs:{}}),NA=e=>typeof e=="string"&&e.toLowerCase()==="svg";function AP(e,t,n,r){const o=w.useMemo(()=>{const s=OC();return LA(s,t,{enableHardwareAcceleration:!1},NA(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};TC(s,e.style,e),o.style={...s,...o.style}}return o}function dP(e=!1){return(n,r,o,{latestValues:s},l)=>{const A=(RA(n)?AP:rP)(r,s,l,n),p={...sP(r,typeof n=="string",e),...A,ref:o},{children:C}=r,h=w.useMemo(()=>pn(C)?C.get():C,[C]);return w.createElement(n,{...p,children:h})}}const VA=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function jC(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const MC=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function RC(e,t,n,r){jC(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(MC.has(o)?o:VA(o),t.attrs[o])}function HA(e,t){const{style:n}=e,r={};for(const o in n)(pn(n[o])||t.style&&pn(t.style[o])||BC(o,e))&&(r[o]=n[o]);return r}function DC(e,t){const n=HA(e,t);for(const r in e)if(pn(e[r])||pn(t[r])){const o=Ms.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}function zA(e,t,n,r={},o={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),t}function gP(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const bl=e=>Array.isArray(e),fP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),pP=e=>bl(e)?e[e.length-1]||0:e;function Ql(e){const t=pn(e)?e.get():e;return fP(t)?t.toValue():t}function hP({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,s){const l={latestValues:CP(r,o,s,e),renderState:t()};return n&&(l.mount=u=>n(r,u,l)),l}const kC=e=>(t,n)=>{const r=w.useContext(hl),o=w.useContext(OA),s=()=>hP(e,t,r,o);return n?s():gP(s)};function CP(e,t,n,r){const o={},s=r(e,{});for(const h in s)o[h]=Ql(s[h]);let{initial:l,animate:u}=e;const A=Il(e),f=hC(e);t&&f&&!A&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let p=n?n.initial===!1:!1;p=p||l===!1;const C=p?u:l;return C&&typeof C!="boolean"&&!El(C)&&(Array.isArray(C)?C:[C]).forEach(E=>{const m=zA(e,E);if(!m)return;const{transitionEnd:B,transition:v,...j}=m;for(const R in j){let x=j[R];if(Array.isArray(x)){const O=p?x.length-1:0;x=x[O]}x!==null&&(o[R]=x)}for(const R in B)o[R]=B[R]}),o}const Dt=e=>e;class FC{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function EP(e){let t=new FC,n=new FC,r=0,o=!1,s=!1;const l=new WeakSet,u={schedule:(A,f=!1,p=!1)=>{const C=p&&o,h=C?t:n;return f&&l.add(A),h.add(A)&&C&&o&&(r=t.order.length),A},cancel:A=>{n.remove(A),l.delete(A)},process:A=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let f=0;f<r;f++){const p=t.order[f];p(A),l.has(p)&&(u.schedule(p),e())}o=!1,s&&(s=!1,u.process(A))}};return u}const xl=["prepare","read","update","preRender","render","postRender"],IP=40;function mP(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=xl.reduce((C,h)=>(C[h]=EP(()=>n=!0),C),{}),l=C=>s[C].process(o),u=()=>{const C=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(C-o.timestamp,IP),1),o.timestamp=C,o.isProcessing=!0,xl.forEach(l),o.isProcessing=!1,n&&t&&(r=!1,e(u))},A=()=>{n=!0,r=!0,o.isProcessing||e(u)};return{schedule:xl.reduce((C,h)=>{const E=s[h];return C[h]=(m,B=!1,v=!1)=>(n||A(),E.schedule(m,B,v)),C},{}),cancel:C=>xl.forEach(h=>s[h].cancel(C)),state:o,steps:s}}const{schedule:Bt,cancel:Rr,state:Zt,steps:WA}=mP(typeof requestAnimationFrame<"u"?requestAnimationFrame:Dt,!0),BP={useVisualState:kC({scrapeMotionValuesFromProps:DC,createRenderState:OC,onMount:(e,t,{renderState:n,latestValues:r})=>{Bt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Bt.render(()=>{LA(n,r,{enableHardwareAcceleration:!1},NA(t.tagName),e.transformTemplate),RC(t,n)})}})},vP={useVisualState:kC({scrapeMotionValuesFromProps:HA,createRenderState:FA})};function yP(e,{forwardMotionProps:t=!1},n,r){return{...RA(e)?BP:vP,preloadedFeatures:n,useRender:dP(t),createVisualElement:r,Component:e}}function Dr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const LC=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function wl(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const bP=e=>t=>LC(t)&&e(t,wl(t));function kr(e,t,n,r){return Dr(e,t,bP(n),r)}const QP=(e,t)=>n=>t(e(n)),io=(...e)=>e.reduce(QP);function NC(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const VC=NC("dragHorizontal"),HC=NC("dragVertical");function zC(e){let t=!1;if(e==="y")t=HC();else if(e==="x")t=VC();else{const n=VC(),r=HC();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function WC(){const e=zC(!0);return e?(e(),!1):!0}class so{constructor(t){this.isMounted=!1,this.node=t}update(){}}function UC(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),o=(s,l)=>{if(s.type==="touch"||WC())return;const u=e.getProps();e.animationState&&u.whileHover&&e.animationState.setActive("whileHover",t),u[r]&&Bt.update(()=>u[r](s,l))};return kr(e.current,n,o,{passive:!e.getProps()[r]})}class xP extends so{mount(){this.unmount=io(UC(this.node,!0),UC(this.node,!1))}unmount(){}}class wP extends so{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=io(Dr(this.node.current,"focus",()=>this.onFocus()),Dr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const YC=(e,t)=>t?e===t?!0:YC(e,t.parentElement):!1;function UA(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,wl(n))}class TP extends so{constructor(){super(...arguments),this.removeStartListeners=Dt,this.removeEndListeners=Dt,this.removeAccessibleListeners=Dt,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),s=kr(window,"pointerup",(u,A)=>{if(!this.checkPressEnd())return;const{onTap:f,onTapCancel:p}=this.node.getProps();Bt.update(()=>{YC(this.node.current,u.target)?f&&f(u,A):p&&p(u,A)})},{passive:!(r.onTap||r.onPointerUp)}),l=kr(window,"pointercancel",(u,A)=>this.cancelPress(u,A),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=io(s,l),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const l=u=>{u.key!=="Enter"||!this.checkPressEnd()||UA("up",(A,f)=>{const{onTap:p}=this.node.getProps();p&&Bt.update(()=>p(A,f))})};this.removeEndListeners(),this.removeEndListeners=Dr(this.node.current,"keyup",l),UA("down",(u,A)=>{this.startPress(u,A)})},n=Dr(this.node.current,"keydown",t),r=()=>{this.isPressing&&UA("cancel",(s,l)=>this.cancelPress(s,l))},o=Dr(this.node.current,"blur",r);this.removeAccessibleListeners=io(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Bt.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!WC()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Bt.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=kr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Dr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=io(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const YA=new WeakMap,GA=new WeakMap,PP=e=>{const t=YA.get(e.target);t&&t(e)},SP=e=>{e.forEach(PP)};function OP({root:e,...t}){const n=e||document;GA.has(n)||GA.set(n,{});const r=GA.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(SP,{root:e,...t})),r[o]}function jP(e,t,n){const r=OP(t);return YA.set(e,n),r.observe(e),()=>{YA.delete(e),r.unobserve(e)}}const MP={some:0,all:1};class RP extends so{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,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:MP[o]},u=A=>{const{isIntersecting:f}=A;if(this.isInView===f||(this.isInView=f,s&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:p,onViewportLeave:C}=this.node.getProps(),h=f?p:C;h&&h(A)};return jP(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(DP(t,n))&&this.startObserver()}unmount(){}}function DP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const kP={inView:{Feature:RP},tap:{Feature:TP},focus:{Feature:wP},hover:{Feature:xP}};function GC(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}function FP(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function LP(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Tl(e,t,n){const r=e.getProps();return zA(r,t,n!==void 0?n:r.custom,FP(e),LP(e))}const NP="data-"+VA("framerAppearId");let Ls=Dt,Br=Dt;process.env.NODE_ENV!=="production"&&(Ls=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Br=(e,t)=>{if(!e)throw new Error(t)});const ao=e=>e*1e3,Fr=e=>e/1e3,VP={current:!1},KC=e=>Array.isArray(e)&&typeof e[0]=="number";function JC(e){return!!(!e||typeof e=="string"&&XC[e]||KC(e)||Array.isArray(e)&&e.every(JC))}const Ns=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,XC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ns([0,.65,.55,1]),circOut:Ns([.55,0,1,.45]),backIn:Ns([.31,.01,.66,-.59]),backOut:Ns([.33,1.53,.69,.99])};function ZC(e){if(e)return KC(e)?Ns(e):Array.isArray(e)?e.map(ZC):XC[e]}function HP(e,t,n,{delay:r=0,duration:o,repeat:s=0,repeatType:l="loop",ease:u,times:A}={}){const f={[t]:n};A&&(f.offset=A);const p=ZC(u);return Array.isArray(p)&&(f.easing=p),e.animate(f,{delay:r,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:s+1,direction:l==="reverse"?"alternate":"normal"})}function zP(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const _C=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,WP=1e-7,UP=12;function YP(e,t,n,r,o){let s,l,u=0;do l=t+(n-t)/2,s=_C(l,r,o)-e,s>0?n=l:t=l;while(Math.abs(s)>WP&&++u<UP);return l}function Vs(e,t,n,r){if(e===t&&n===r)return Dt;const o=s=>YP(s,0,1,e,n);return s=>s===0||s===1?s:_C(o(s),t,r)}const GP=Vs(.42,0,1,1),KP=Vs(0,0,.58,1),qC=Vs(.42,0,.58,1),JP=e=>Array.isArray(e)&&typeof e[0]!="number",$C=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,eE=e=>t=>1-e(1-t),tE=e=>1-Math.sin(Math.acos(e)),KA=eE(tE),XP=$C(KA),nE=Vs(.33,1.53,.69,.99),JA=eE(nE),ZP=$C(JA),rE={linear:Dt,easeIn:GP,easeInOut:qC,easeOut:KP,circIn:tE,circInOut:XP,circOut:KA,backIn:JA,backInOut:ZP,backOut:nE,anticipate:e=>(e*=2)<1?.5*JA(e):.5*(2-Math.pow(2,-10*(e-1)))},oE=e=>{if(Array.isArray(e)){Br(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Vs(t,n,r,o)}else if(typeof e=="string")return Br(rE[e]!==void 0,`Invalid easing type '${e}'`),rE[e];return e},XA=(e,t)=>n=>!!(ks(n)&&qT.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),iE=(e,t,n)=>r=>{if(!ks(r))return r;const[o,s,l,u]=r.match(vl);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},_P=e=>ro(0,255,e),ZA={...Fo,transform:e=>Math.round(_P(e))},Lo={test:XA("rgb","red"),parse:iE("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ZA.transform(e)+", "+ZA.transform(t)+", "+ZA.transform(n)+", "+Ds(Rs.transform(r))+")"};function qP(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 _A={test:XA("#"),parse:qP,transform:Lo.transform},Pi={test:XA("hsl","hue"),parse:iE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+mr.transform(Ds(t))+", "+mr.transform(Ds(n))+", "+Ds(Rs.transform(r))+")"},un={test:e=>Lo.test(e)||_A.test(e)||Pi.test(e),parse:e=>Lo.test(e)?Lo.parse(e):Pi.test(e)?Pi.parse(e):_A.parse(e),transform:e=>ks(e)?e:e.hasOwnProperty("red")?Lo.transform(e):Pi.transform(e)},St=(e,t,n)=>-n*e+n*t+e;function qA(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 $P({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,l=0;if(!t)o=s=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,A=2*n-u;o=qA(A,u,e+1/3),s=qA(A,u,e),l=qA(A,u,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(l*255),alpha:r}}const $A=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},eS=[_A,Lo,Pi],tS=e=>eS.find(t=>t.test(e));function sE(e){const t=tS(e);Br(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Pi&&(n=$P(n)),n}const aE=(e,t)=>{const n=sE(e),r=sE(t),o={...n};return s=>(o.red=$A(n.red,r.red,s),o.green=$A(n.green,r.green,s),o.blue=$A(n.blue,r.blue,s),o.alpha=St(n.alpha,r.alpha,s),Lo.transform(o))};function nS(e){var t,n;return isNaN(e)&&ks(e)&&(((t=e.match(vl))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(bC))===null||n===void 0?void 0:n.length)||0)>0}const lE={regex:ZT,countKey:"Vars",token:"${v}",parse:Dt},cE={regex:bC,countKey:"Colors",token:"${c}",parse:un.parse},uE={regex:vl,countKey:"Numbers",token:"${n}",parse:Fo.parse};function ed(e,{regex:t,countKey:n,token:r,parse:o}){const s=e.tokenised.match(t);s&&(e["num"+n]=s.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...s.map(o)))}function Pl(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&ed(n,lE),ed(n,cE),ed(n,uE),n}function AE(e){return Pl(e).values}function dE(e){const{values:t,numColors:n,numVars:r,tokenised:o}=Pl(e),s=t.length;return l=>{let u=o;for(let A=0;A<s;A++)A<r?u=u.replace(lE.token,l[A]):A<r+n?u=u.replace(cE.token,un.transform(l[A])):u=u.replace(uE.token,Ds(l[A]));return u}}const rS=e=>typeof e=="number"?0:e;function oS(e){const t=AE(e);return dE(e)(t.map(rS))}const lo={test:nS,parse:AE,createTransformer:dE,getAnimatableNone:oS},gE=(e,t)=>n=>`${n>0?t:e}`;function fE(e,t){return typeof e=="number"?n=>St(e,t,n):un.test(e)?aE(e,t):e.startsWith("var(")?gE(e,t):hE(e,t)}const pE=(e,t)=>{const n=[...e],r=n.length,o=e.map((s,l)=>fE(s,t[l]));return s=>{for(let l=0;l<r;l++)n[l]=o[l](s);return n}},iS=(e,t)=>{const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=fE(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}},hE=(e,t)=>{const n=lo.createTransformer(t),r=Pl(e),o=Pl(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?io(pE(r.values,o.values),n):(Ls(!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.`),gE(e,t))},Hs=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},CE=(e,t)=>n=>St(e,t,n);function sS(e){return typeof e=="number"?CE:typeof e=="string"?un.test(e)?aE:hE:Array.isArray(e)?pE:typeof e=="object"?iS:CE}function aS(e,t,n){const r=[],o=n||sS(e[0]),s=e.length-1;for(let l=0;l<s;l++){let u=o(e[l],e[l+1]);if(t){const A=Array.isArray(t)?t[l]||Dt:t;u=io(A,u)}r.push(u)}return r}function EE(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Br(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=aS(t,r,o),u=l.length,A=f=>{let p=0;if(u>1)for(;p<e.length-2&&!(f<e[p+1]);p++);const C=Hs(e[p],e[p+1],f);return l[p](C)};return n?f=>A(ro(e[0],e[s-1],f)):A}function lS(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Hs(0,t,r);e.push(St(n,1,o))}}function cS(e){const t=[0];return lS(t,e.length-1),t}function uS(e,t){return e.map(n=>n*t)}function AS(e,t){return e.map(()=>t||qC).splice(0,e.length-1)}function Sl({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=JP(r)?r.map(oE):oE(r),s={done:!1,value:t[0]},l=uS(n&&n.length===t.length?n:cS(t),e),u=EE(l,t,{ease:Array.isArray(o)?o:AS(t,o)});return{calculatedDuration:e,next:A=>(s.value=u(A),s.done=A>=e,s)}}function IE(e,t){return t?e*(1e3/t):0}const dS=5;function mE(e,t,n){const r=Math.max(t-dS,0);return IE(n-e(r),t-r)}const td=.001,gS=.01,BE=10,fS=.05,pS=1;function hS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;Ls(e<=ao(BE),"Spring duration must be 10 seconds or less");let l=1-t;l=ro(fS,pS,l),e=ro(gS,BE,Fr(e)),l<1?(o=f=>{const p=f*l,C=p*e,h=p-n,E=nd(f,l),m=Math.exp(-C);return td-h/E*m},s=f=>{const C=f*l*e,h=C*n+n,E=Math.pow(l,2)*Math.pow(f,2)*e,m=Math.exp(-C),B=nd(Math.pow(f,2),l);return(-o(f)+td>0?-1:1)*((h-E)*m)/B}):(o=f=>{const p=Math.exp(-f*e),C=(f-n)*e+1;return-td+p*C},s=f=>{const p=Math.exp(-f*e),C=(n-f)*(e*e);return p*C});const u=5/e,A=ES(o,s,u);if(e=ao(e),isNaN(A))return{stiffness:100,damping:10,duration:e};{const f=Math.pow(A,2)*r;return{stiffness:f,damping:l*2*Math.sqrt(r*f),duration:e}}}const CS=12;function ES(e,t,n){let r=n;for(let o=1;o<CS;o++)r=r-e(r)/t(r);return r}function nd(e,t){return e*Math.sqrt(1-t*t)}const IS=["duration","bounce"],mS=["stiffness","damping","mass"];function vE(e,t){return t.some(n=>e[n]!==void 0)}function BS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!vE(e,mS)&&vE(e,IS)){const n=hS(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function yE({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],l={done:!1,value:o},{stiffness:u,damping:A,mass:f,velocity:p,duration:C,isResolvedFromDuration:h}=BS(r),E=p?-Fr(p):0,m=A/(2*Math.sqrt(u*f)),B=s-o,v=Fr(Math.sqrt(u/f)),j=Math.abs(B)<5;n||(n=j?.01:2),t||(t=j?.005:.5);let R;if(m<1){const x=nd(v,m);R=O=>{const P=Math.exp(-m*v*O);return s-P*((E+m*v*B)/x*Math.sin(x*O)+B*Math.cos(x*O))}}else if(m===1)R=x=>s-Math.exp(-v*x)*(B+(E+v*B)*x);else{const x=v*Math.sqrt(m*m-1);R=O=>{const P=Math.exp(-m*v*O),N=Math.min(x*O,300);return s-P*((E+m*v*B)*Math.sinh(N)+x*B*Math.cosh(N))/x}}return{calculatedDuration:h&&C||null,next:x=>{const O=R(x);if(h)l.done=x>=C;else{let P=E;x!==0&&(m<1?P=mE(R,x,O):P=0);const N=Math.abs(P)<=n,F=Math.abs(s-O)<=t;l.done=N&&F}return l.value=l.done?s:O,l}}}function bE({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:l,min:u,max:A,restDelta:f=.5,restSpeed:p}){const C=e[0],h={done:!1,value:C},E=X=>u!==void 0&&X<u||A!==void 0&&X>A,m=X=>u===void 0?A:A===void 0||Math.abs(u-X)<Math.abs(A-X)?u:A;let B=n*t;const v=C+B,j=l===void 0?v:l(v);j!==v&&(B=j-C);const R=X=>-B*Math.exp(-X/r),x=X=>j+R(X),O=X=>{const Z=R(X),Y=x(X);h.done=Math.abs(Z)<=f,h.value=h.done?j:Y};let P,N;const F=X=>{E(h.value)&&(P=X,N=yE({keyframes:[h.value,m(h.value)],velocity:mE(x,X,h.value),damping:o,stiffness:s,restDelta:f,restSpeed:p}))};return F(0),{calculatedDuration:null,next:X=>{let Z=!1;return!N&&P===void 0&&(Z=!0,O(X),F(X)),P!==void 0&&X>P?N.next(X-P):(!Z&&O(X),h)}}}const vS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Bt.update(t,!0),stop:()=>Rr(t),now:()=>Zt.isProcessing?Zt.timestamp:performance.now()}},QE=2e4;function xE(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<QE;)t+=n,r=e.next(t);return t>=QE?1/0:t}const yS={decay:bE,inertia:bE,tween:Sl,keyframes:Sl,spring:yE};function Ol({autoplay:e=!0,delay:t=0,driver:n=vS,keyframes:r,type:o="keyframes",repeat:s=0,repeatDelay:l=0,repeatType:u="loop",onPlay:A,onStop:f,onComplete:p,onUpdate:C,...h}){let E=1,m=!1,B,v;const j=()=>{v=new Promise(_=>{B=_})};j();let R;const x=yS[o]||Sl;let O;x!==Sl&&typeof r[0]!="number"&&(O=EE([0,100],r,{clamp:!1}),r=[0,100]);const P=x({...h,keyframes:r});let N;u==="mirror"&&(N=x({...h,keyframes:[...r].reverse(),velocity:-(h.velocity||0)}));let F="idle",X=null,Z=null,Y=null;P.calculatedDuration===null&&s&&(P.calculatedDuration=xE(P));const{calculatedDuration:$}=P;let ce=1/0,se=1/0;$!==null&&(ce=$+l,se=ce*(s+1)-l);let q=0;const J=_=>{if(Z===null)return;E>0&&(Z=Math.min(Z,_)),E<0&&(Z=Math.min(_-se/E,Z)),X!==null?q=X:q=Math.round(_-Z)*E;const fe=q-t*(E>=0?1:-1),he=E>=0?fe<0:fe>se;q=Math.max(fe,0),F==="finished"&&X===null&&(q=se);let ue=q,pe=P;if(s){const Ee=q/ce;let Be=Math.floor(Ee),xe=Ee%1;!xe&&Ee>=1&&(xe=1),xe===1&&Be--,Be=Math.min(Be,s+1);const le=!!(Be%2);le&&(u==="reverse"?(xe=1-xe,l&&(xe-=l/ce)):u==="mirror"&&(pe=N));let Ve=ro(0,1,xe);q>se&&(Ve=u==="reverse"&&le?1:0),ue=Ve*ce}const Ce=he?{done:!1,value:r[0]}:pe.next(ue);O&&(Ce.value=O(Ce.value));let{done:ve}=Ce;!he&&$!==null&&(ve=E>=0?q>=se:q<=0);const Ie=X===null&&(F==="finished"||F==="running"&&ve);return C&&C(Ce.value),Ie&&L(),Ce},H=()=>{R&&R.stop(),R=void 0},K=()=>{F="idle",H(),B(),j(),Z=Y=null},L=()=>{F="finished",p&&p(),H(),B()},ee=()=>{if(m)return;R||(R=n(J));const _=R.now();A&&A(),X!==null?Z=_-X:(!Z||F==="finished")&&(Z=_),F==="finished"&&j(),Y=Z,X=null,F="running",R.start()};e&&ee();const z={then(_,fe){return v.then(_,fe)},get time(){return Fr(q)},set time(_){_=ao(_),q=_,X!==null||!R||E===0?X=_:Z=R.now()-_/E},get duration(){const _=P.calculatedDuration===null?xE(P):P.calculatedDuration;return Fr(_)},get speed(){return E},set speed(_){_===E||!R||(E=_,z.time=Fr(q))},get state(){return F},play:ee,pause:()=>{F="paused",X=q},stop:()=>{m=!0,F!=="idle"&&(F="idle",f&&f(),K())},cancel:()=>{Y!==null&&J(Y),K()},complete:()=>{F="finished"},sample:_=>(Z=0,J(_))};return z}function bS(e){let t;return()=>(t===void 0&&(t=e()),t)}const QS=bS(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),xS=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),jl=10,wS=2e4,TS=(e,t)=>t.type==="spring"||e==="backgroundColor"||!JC(t.ease);function PS(e,t,{onUpdate:n,onComplete:r,...o}){if(!(QS()&&xS.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let l=!1,u,A;const f=()=>{A=new Promise(R=>{u=R})};f();let{keyframes:p,duration:C=300,ease:h,times:E}=o;if(TS(t,o)){const R=Ol({...o,repeat:0,delay:0});let x={done:!1,value:p[0]};const O=[];let P=0;for(;!x.done&&P<wS;)x=R.sample(P),O.push(x.value),P+=jl;E=void 0,p=O,C=P-jl,h="linear"}const m=HP(e.owner.current,t,p,{...o,duration:C,ease:h,times:E});o.syncStart&&(m.startTime=Zt.isProcessing?Zt.timestamp:document.timeline?document.timeline.currentTime:performance.now());const B=()=>m.cancel(),v=()=>{Bt.update(B),u(),f()};return m.onfinish=()=>{e.set(zP(p,o)),r&&r(),v()},{then(R,x){return A.then(R,x)},attachTimeline(R){return m.timeline=R,m.onfinish=null,Dt},get time(){return Fr(m.currentTime||0)},set time(R){m.currentTime=ao(R)},get speed(){return m.playbackRate},set speed(R){m.playbackRate=R},get duration(){return Fr(C)},play:()=>{l||(m.play(),Rr(B))},pause:()=>m.pause(),stop:()=>{if(l=!0,m.playState==="idle")return;const{currentTime:R}=m;if(R){const x=Ol({...o,autoplay:!1});e.setWithVelocity(x.sample(R-jl).value,x.sample(R).value,jl)}v()},complete:()=>m.finish(),cancel:v}}function SS({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Dt,pause:Dt,stop:Dt,then:s=>(s(),Promise.resolve()),cancel:Dt,complete:Dt});return t?Ol({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const OS={type:"spring",stiffness:500,damping:25,restSpeed:10},jS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),MS={type:"keyframes",duration:.8},RS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},DS=(e,{keyframes:t})=>t.length>2?MS:ko.has(e)?e.startsWith("scale")?jS(t[1]):OS:RS,rd=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(lo.test(t)||t==="0")&&!t.startsWith("url(")),kS=new Set(["brightness","contrast","saturate","opacity"]);function FS(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(vl)||[];if(!r)return e;const o=n.replace(r,"");let s=kS.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const LS=/([a-z-]*)\(.*?\)/g,od={...lo,getAnimatableNone:e=>{const t=e.match(LS);return t?t.map(FS).join(" "):e}},NS={...wC,color:un,backgroundColor:un,outlineColor:un,fill:un,stroke:un,borderColor:un,borderTopColor:un,borderRightColor:un,borderBottomColor:un,borderLeftColor:un,filter:od,WebkitFilter:od},id=e=>NS[e];function wE(e,t){let n=id(e);return n!==od&&(n=lo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const TE=e=>/^0[^.\s]+$/.test(e);function VS(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||TE(e)}function HS(e,t,n,r){const o=rd(t,n);let s;Array.isArray(n)?s=[...n]:s=[null,n];const l=r.from!==void 0?r.from:e.get();let u;const A=[];for(let f=0;f<s.length;f++)s[f]===null&&(s[f]=f===0?l:s[f-1]),VS(s[f])&&A.push(f),typeof s[f]=="string"&&s[f]!=="none"&&s[f]!=="0"&&(u=s[f]);if(o&&A.length&&u)for(let f=0;f<A.length;f++){const p=A[f];s[p]=wE(t,u)}return s}function zS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:l,repeatDelay:u,from:A,elapsed:f,...p}){return!!Object.keys(p).length}function PE(e,t){return e[t]||e.default||e}const sd=(e,t,n,r={})=>o=>{const s=PE(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u=u-ao(l);const A=HS(t,e,n,s),f=A[0],p=A[A.length-1],C=rd(e,f),h=rd(e,p);Ls(C===h,`You are trying to animate ${e} from "${f}" to "${p}". ${f} is not an animatable value - to enable this animation set ${f} to a value animatable to ${p} via the \`style\` property.`);let E={keyframes:A,velocity:t.getVelocity(),ease:"easeOut",...s,delay:-u,onUpdate:m=>{t.set(m),s.onUpdate&&s.onUpdate(m)},onComplete:()=>{o(),s.onComplete&&s.onComplete()}};if(zS(s)||(E={...E,...DS(e,E)}),E.duration&&(E.duration=ao(E.duration)),E.repeatDelay&&(E.repeatDelay=ao(E.repeatDelay)),!C||!h||VP.current||s.type===!1)return SS(E);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const m=PS(t,e,E);if(m)return m}return Ol(E)};function Ml(e){return!!(pn(e)&&e.add)}const SE=e=>/^\-?\d*\.?\d+$/.test(e);function ad(e,t){e.indexOf(t)===-1&&e.push(t)}function ld(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class cd{constructor(){this.subscriptions=[]}add(t){return ad(this.subscriptions,t),()=>ld(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 l=this.subscriptions[s];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const OE=new Set;function ud(e,t,n){e||OE.has(t)||(console.warn(t),n&&console.warn(n),OE.add(t))}const WS=e=>!isNaN(parseFloat(e));class US{constructor(t,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,o=!0)=>{this.prev=this.current,this.current=r;const{delta:s,timestamp:l}=Zt;this.lastUpdated!==l&&(this.timeDelta=s,this.lastUpdated=l,Bt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Bt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=WS(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&ud(!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 cd);const r=this.events[t].add(n);return t==="change"?()=>{r(),Bt.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,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?IE(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}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(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Si(e,t){return new US(e,t)}const jE=e=>t=>t.test(e),ME=[Fo,De,mr,oo,eP,$T,{test:e=>e==="auto",parse:e=>e}],zs=e=>ME.find(jE(e)),YS=[...ME,un,lo],GS=e=>YS.find(jE(e));function KS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Si(n))}function JS(e,t){const n=Tl(e,t);let{transitionEnd:r={},transition:o={},...s}=n?e.makeTargetAnimatable(n,!1):{};s={...s,...r};for(const l in s){const u=pP(s[l]);KS(e,l,u)}}function XS(e,t,n){var r,o;const s=Object.keys(t).filter(u=>!e.hasValue(u)),l=s.length;if(l)for(let u=0;u<l;u++){const A=s[u],f=t[A];let p=null;Array.isArray(f)&&(p=f[0]),p===null&&(p=(o=(r=n[A])!==null&&r!==void 0?r:e.readValue(A))!==null&&o!==void 0?o:t[A]),p!=null&&(typeof p=="string"&&(SE(p)||TE(p))?p=parseFloat(p):!GS(p)&&lo.test(f)&&(p=wE(A,f)),e.addValue(A,Si(p,{owner:e})),n[A]===void 0&&(n[A]=p),p!==null&&e.setBaseTarget(A,p))}}function ZS(e,t){return t?(t[e]||t.default||t).from:void 0}function _S(e,t,n){const r={};for(const o in e){const s=ZS(o,t);if(s!==void 0)r[o]=s;else{const l=n.getValue(o);l&&(r[o]=l.get())}}return r}function qS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function RE(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:l,...u}=e.makeTargetAnimatable(t);const A=e.getValue("willChange");r&&(s=r);const f=[],p=o&&e.animationState&&e.animationState.getState()[o];for(const C in u){const h=e.getValue(C),E=u[C];if(!h||E===void 0||p&&qS(p,C))continue;const m={delay:n,elapsed:0,...s};if(window.HandoffAppearAnimations&&!h.hasAnimated){const v=e.getProps()[NP];v&&(m.elapsed=window.HandoffAppearAnimations(v,C,h,Bt),m.syncStart=!0)}h.start(sd(C,h,E,e.shouldReduceMotion&&ko.has(C)?{type:!1}:m));const B=h.animation;Ml(A)&&(A.add(C),B.then(()=>A.remove(C))),f.push(B)}return l&&Promise.all(f).then(()=>{l&&JS(e,l)}),f}function Ad(e,t,n={}){const r=Tl(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(RE(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(A=0)=>{const{delayChildren:f=0,staggerChildren:p,staggerDirection:C}=o;return $S(e,t,f+A,p,C,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[A,f]=u==="beforeChildren"?[s,l]:[l,s];return A().then(()=>f())}else return Promise.all([s(),l(n.delay)])}function $S(e,t,n=0,r=0,o=1,s){const l=[],u=(e.variantChildren.size-1)*r,A=o===1?(f=0)=>f*r:(f=0)=>u-f*r;return Array.from(e.variantChildren).sort(e4).forEach((f,p)=>{f.notify("AnimationStart",t),l.push(Ad(f,t,{...s,delay:n+A(p)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(l)}function e4(e,t){return e.sortNodePosition(t)}function t4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Ad(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Ad(e,t,n);else{const o=typeof t=="function"?Tl(e,t,n.custom):t;r=Promise.all(RE(e,o,n))}return r.then(()=>e.notify("AnimationComplete",t))}const n4=[...jA].reverse(),r4=jA.length;function o4(e){return t=>Promise.all(t.map(({animation:n,options:r})=>t4(e,n,r)))}function i4(e){let t=o4(e);const n=a4();let r=!0;const o=(A,f)=>{const p=Tl(e,f);if(p){const{transition:C,transitionEnd:h,...E}=p;A={...A,...E,...h}}return A};function s(A){t=A(e)}function l(A,f){const p=e.getProps(),C=e.getVariantContext(!0)||{},h=[],E=new Set;let m={},B=1/0;for(let j=0;j<r4;j++){const R=n4[j],x=n[R],O=p[R]!==void 0?p[R]:C[R],P=Os(O),N=R===f?x.isActive:null;N===!1&&(B=j);let F=O===C[R]&&O!==p[R]&&P;if(F&&r&&e.manuallyAnimateOnMount&&(F=!1),x.protectedKeys={...m},!x.isActive&&N===null||!O&&!x.prevProp||El(O)||typeof O=="boolean")continue;const X=s4(x.prevProp,O);let Z=X||R===f&&x.isActive&&!F&&P||j>B&&P;const Y=Array.isArray(O)?O:[O];let $=Y.reduce(o,{});N===!1&&($={});const{prevResolvedValues:ce={}}=x,se={...ce,...$},q=J=>{Z=!0,E.delete(J),x.needsAnimating[J]=!0};for(const J in se){const H=$[J],K=ce[J];m.hasOwnProperty(J)||(H!==K?bl(H)&&bl(K)?!GC(H,K)||X?q(J):x.protectedKeys[J]=!0:H!==void 0?q(J):E.add(J):H!==void 0&&E.has(J)?q(J):x.protectedKeys[J]=!0)}x.prevProp=O,x.prevResolvedValues=$,x.isActive&&(m={...m,...$}),r&&e.blockInitialAnimation&&(Z=!1),Z&&!F&&h.push(...Y.map(J=>({animation:J,options:{type:R,...A}})))}if(E.size){const j={};E.forEach(R=>{const x=e.getBaseTarget(R);x!==void 0&&(j[R]=x)}),h.push({animation:j})}let v=!!h.length;return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(h):Promise.resolve()}function u(A,f,p){var C;if(n[A].isActive===f)return Promise.resolve();(C=e.variantChildren)===null||C===void 0||C.forEach(E=>{var m;return(m=E.animationState)===null||m===void 0?void 0:m.setActive(A,f)}),n[A].isActive=f;const h=l(p,A);for(const E in n)n[E].protectedKeys={};return h}return{animateChanges:l,setActive:u,setAnimateFunction:s,getState:()=>n}}function s4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!GC(t,e):!1}function No(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function a4(){return{animate:No(!0),whileInView:No(),whileHover:No(),whileTap:No(),whileDrag:No(),whileFocus:No(),exit:No()}}class l4 extends so{constructor(t){super(t),t.animationState||(t.animationState=i4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),El(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let c4=0;class u4 extends so{constructor(){super(...arguments),this.id=c4++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const s=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const A4={animation:{Feature:l4},exit:{Feature:u4}},DE=(e,t)=>Math.abs(e-t);function d4(e,t){const n=DE(e.x,t.x),r=DE(e.y,t.y);return Math.sqrt(n**2+r**2)}class kE{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=gd(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,C=d4(f.offset,{x:0,y:0})>=3;if(!p&&!C)return;const{point:h}=f,{timestamp:E}=Zt;this.history.push({...h,timestamp:E});const{onStart:m,onMove:B}=this.handlers;p||(m&&m(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),B&&B(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=dd(p,this.transformPagePoint),Bt.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:C,onSessionEnd:h}=this.handlers,E=gd(f.type==="pointercancel"?this.lastMoveEventInfo:dd(p,this.transformPagePoint),this.history);this.startEvent&&C&&C(f,E),h&&h(f,E)},!LC(t))return;this.handlers=n,this.transformPagePoint=r;const o=wl(t),s=dd(o,this.transformPagePoint),{point:l}=s,{timestamp:u}=Zt;this.history=[{...l,timestamp:u}];const{onSessionStart:A}=n;A&&A(t,gd(s,this.history)),this.removeListeners=io(kr(window,"pointermove",this.handlePointerMove),kr(window,"pointerup",this.handlePointerUp),kr(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Rr(this.updatePoint)}}function dd(e,t){return t?{point:t(e.point)}:e}function FE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gd({point:e},t){return{point:e,delta:FE(e,LE(t)),offset:FE(e,g4(t)),velocity:f4(t,.1)}}function g4(e){return e[0]}function LE(e){return e[e.length-1]}function f4(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=LE(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ao(t)));)n--;if(!r)return{x:0,y:0};const s=Fr(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const l={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function Tn(e){return e.max-e.min}function fd(e,t=0,n=.01){return Math.abs(e-t)<=n}function NE(e,t,n,r=.5){e.origin=r,e.originPoint=St(t.min,t.max,e.origin),e.scale=Tn(n)/Tn(t),(fd(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=St(n.min,n.max,e.origin)-e.originPoint,(fd(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Ws(e,t,n,r){NE(e.x,t.x,n.x,r?r.originX:void 0),NE(e.y,t.y,n.y,r?r.originY:void 0)}function VE(e,t,n){e.min=n.min+t.min,e.max=e.min+Tn(t)}function p4(e,t,n){VE(e.x,t.x,n.x),VE(e.y,t.y,n.y)}function HE(e,t,n){e.min=t.min-n.min,e.max=e.min+Tn(t)}function Us(e,t,n){HE(e.x,t.x,n.x),HE(e.y,t.y,n.y)}function h4(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?St(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?St(n,e,r.max):Math.min(e,n)),e}function zE(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 C4(e,{top:t,left:n,bottom:r,right:o}){return{x:zE(e.x,n,o),y:zE(e.y,t,r)}}function WE(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 E4(e,t){return{x:WE(e.x,t.x),y:WE(e.y,t.y)}}function I4(e,t){let n=.5;const r=Tn(e),o=Tn(t);return o>r?n=Hs(t.min,t.max-r,e.min):r>o&&(n=Hs(e.min,e.max-o,t.min)),ro(0,1,n)}function m4(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 pd=.35;function B4(e=pd){return e===!1?e=0:e===!0&&(e=pd),{x:UE(e,"left","right"),y:UE(e,"top","bottom")}}function UE(e,t,n){return{min:YE(e,t),max:YE(e,n)}}function YE(e,t){return typeof e=="number"?e:e[t]||0}const GE=()=>({translate:0,scale:1,origin:0,originPoint:0}),Oi=()=>({x:GE(),y:GE()}),KE=()=>({min:0,max:0}),Wt=()=>({x:KE(),y:KE()});function vr(e){return[e("x"),e("y")]}function JE({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function v4({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function y4(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 hd(e){return e===void 0||e===1}function Cd({scale:e,scaleX:t,scaleY:n}){return!hd(e)||!hd(t)||!hd(n)}function Vo(e){return Cd(e)||XE(e)||e.z||e.rotate||e.rotateX||e.rotateY}function XE(e){return ZE(e.x)||ZE(e.y)}function ZE(e){return e&&e!=="0%"}function Rl(e,t,n){const r=e-n,o=t*r;return n+o}function _E(e,t,n,r,o){return o!==void 0&&(e=Rl(e,o,r)),Rl(e,n,r)+t}function Ed(e,t=0,n=1,r,o){e.min=_E(e.min,t,n,r,o),e.max=_E(e.max,t,n,r,o)}function qE(e,{x:t,y:n}){Ed(e.x,t.translate,t.scale,t.originPoint),Ed(e.y,n.translate,n.scale,n.originPoint)}function b4(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,l;for(let u=0;u<o;u++){s=n[u],l=s.projectionDelta;const A=s.instance;A&&A.style&&A.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ji(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,qE(e,l)),r&&Vo(s.latestValues)&&ji(e,s.latestValues))}t.x=$E(t.x),t.y=$E(t.y)}function $E(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function co(e,t){e.min=e.min+t,e.max=e.max+t}function eI(e,t,[n,r,o]){const s=t[o]!==void 0?t[o]:.5,l=St(e.min,e.max,s);Ed(e,t[n],t[r],l,t.scale)}const Q4=["x","scaleX","originX"],x4=["y","scaleY","originY"];function ji(e,t){eI(e.x,t,Q4),eI(e.y,t,x4)}function tI(e,t){return JE(y4(e.getBoundingClientRect(),t))}function w4(e,t,n){const r=tI(e,n),{scroll:o}=t;return o&&(co(r.x,o.offset.x),co(r.y,o.offset.y)),r}const T4=new WeakMap;class P4{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Wt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=A=>{this.stopAnimation(),n&&this.snapToCursor(wl(A,"page").point)},s=(A,f)=>{const{drag:p,dragPropagation:C,onDragStart:h}=this.getProps();if(p&&!C&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=zC(p),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),vr(m=>{let B=this.getAxisMotionValue(m).get()||0;if(mr.test(B)){const{projection:v}=this.visualElement;if(v&&v.layout){const j=v.layout.layoutBox[m];j&&(B=Tn(j)*(parseFloat(B)/100))}}this.originPoint[m]=B}),h&&Bt.update(()=>h(A,f),!1,!0);const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},l=(A,f)=>{const{dragPropagation:p,dragDirectionLock:C,onDirectionLock:h,onDrag:E}=this.getProps();if(!p&&!this.openGlobalLock)return;const{offset:m}=f;if(C&&this.currentDirection===null){this.currentDirection=S4(m),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",f.point,m),this.updateAxis("y",f.point,m),this.visualElement.render(),E&&E(A,f)},u=(A,f)=>this.stop(A,f);this.panSession=new kE(t,{onSessionStart:o,onStart:s,onMove:l,onSessionEnd:u},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&Bt.update(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Dl(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=h4(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},o=this.constraints;t&&Ti(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=C4(r.layoutBox,t):this.constraints=!1,this.elastic=B4(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&vr(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=m4(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ti(t))return!1;const r=t.current;Br(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=w4(r,o.root,this.visualElement.getTransformPagePoint());let l=E4(o.layout.layoutBox,s);if(n){const u=n(v4(l));this.hasMutatedConstraints=!!u,u&&(l=JE(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),A=this.constraints||{},f=vr(p=>{if(!Dl(p,n,this.currentDirection))return;let C=A&&A[p]||{};l&&(C={min:0,max:0});const h=o?200:1e6,E=o?40:1e7,m={type:"inertia",velocity:r?t[p]:0,bounceStiffness:h,bounceDamping:E,timeConstant:750,restDelta:1,restSpeed:10,...s,...C};return this.startAxisValueAnimation(p,m)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(sd(t,r,0,n))}stopAnimation(){vr(t=>this.getAxisMotionValue(t).stop())}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){vr(n=>{const{drag:r}=this.getProps();if(!Dl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:u}=o.layout.layoutBox[n];s.set(t[n]-St(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ti(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};vr(l=>{const u=this.getAxisMotionValue(l);if(u){const A=u.get();o[l]=I4({min:A,max:A},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),vr(l=>{if(!Dl(l,t,null))return;const u=this.getAxisMotionValue(l),{min:A,max:f}=this.constraints[l];u.set(St(A,f,o[l]))})}addListeners(){if(!this.visualElement.current)return;T4.set(this.visualElement,this);const t=this.visualElement.current,n=kr(t,"pointerdown",A=>{const{drag:f,dragListener:p=!0}=this.getProps();f&&p&&this.start(A)}),r=()=>{const{dragConstraints:A}=this.getProps();Ti(A)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),r();const l=Dr(window,"resize",()=>this.scalePositionWithinConstraints()),u=o.addEventListener("didUpdate",({delta:A,hasLayoutChanged:f})=>{this.isDragging&&f&&(vr(p=>{const C=this.getAxisMotionValue(p);C&&(this.originPoint[p]+=A[p].translate,C.set(C.get()+A[p].translate))}),this.visualElement.render())});return()=>{l(),n(),s(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:l=pd,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:l,dragMomentum:u}}}function Dl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function S4(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class O4 extends so{constructor(t){super(t),this.removeGroupControls=Dt,this.removeListeners=Dt,this.controls=new P4(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Dt}unmount(){this.removeGroupControls(),this.removeListeners()}}const nI=e=>(t,n)=>{e&&Bt.update(()=>e(t,n))};class j4 extends so{constructor(){super(...arguments),this.removePointerDownListener=Dt}onPointerDown(t){this.session=new kE(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:nI(t),onStart:nI(n),onMove:r,onEnd:(s,l)=>{delete this.session,o&&Bt.update(()=>o(s,l))}}}mount(){this.removePointerDownListener=kr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function M4(){const e=w.useContext(OA);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=w.useId();return w.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const kl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rI(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ys={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(De.test(e))e=parseFloat(e);else return e;const n=rI(e,t.target.x),r=rI(e,t.target.y);return`${n}% ${r}%`}},R4={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=lo.parse(e);if(o.length>5)return r;const s=lo.createTransformer(e),l=typeof o[0]!="number"?1:0,u=n.x.scale*t.x,A=n.y.scale*t.y;o[0+l]/=u,o[1+l]/=A;const f=St(u,A,.5);return typeof o[2+l]=="number"&&(o[2+l]/=f),typeof o[3+l]=="number"&&(o[3+l]/=f),s(o)}};class D4 extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;GT(k4),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),kl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,l=r.projection;return l&&(l.isPresent=s,o||t.layoutDependency!==n||n===void 0?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||Bt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;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 oI(e){const[t,n]=M4(),r=w.useContext(IC);return w.createElement(D4,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(mC),isPresent:t,safeToRemove:n})}const k4={borderRadius:{...Ys,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ys,borderTopRightRadius:Ys,borderBottomLeftRadius:Ys,borderBottomRightRadius:Ys,boxShadow:R4},iI=["TopLeft","TopRight","BottomLeft","BottomRight"],F4=iI.length,sI=e=>typeof e=="string"?parseFloat(e):e,aI=e=>typeof e=="number"||De.test(e);function L4(e,t,n,r,o,s){o?(e.opacity=St(0,n.opacity!==void 0?n.opacity:1,N4(r)),e.opacityExit=St(t.opacity!==void 0?t.opacity:1,0,V4(r))):s&&(e.opacity=St(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let l=0;l<F4;l++){const u=`border${iI[l]}Radius`;let A=lI(t,u),f=lI(n,u);if(A===void 0&&f===void 0)continue;A||(A=0),f||(f=0),A===0||f===0||aI(A)===aI(f)?(e[u]=Math.max(St(sI(A),sI(f),r),0),(mr.test(f)||mr.test(A))&&(e[u]+="%")):e[u]=f}(t.rotate||n.rotate)&&(e.rotate=St(t.rotate||0,n.rotate||0,r))}function lI(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const N4=cI(0,.5,KA),V4=cI(.5,.95,Dt);function cI(e,t,n){return r=>r<e?0:r>t?1:n(Hs(e,t,r))}function uI(e,t){e.min=t.min,e.max=t.max}function zn(e,t){uI(e.x,t.x),uI(e.y,t.y)}function AI(e,t,n,r,o){return e-=t,e=Rl(e,1/n,r),o!==void 0&&(e=Rl(e,1/o,r)),e}function H4(e,t=0,n=1,r=.5,o,s=e,l=e){if(mr.test(t)&&(t=parseFloat(t),t=St(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=St(s.min,s.max,r);e===s&&(u-=t),e.min=AI(e.min,t,n,u,o),e.max=AI(e.max,t,n,u,o)}function dI(e,t,[n,r,o],s,l){H4(e,t[n],t[r],t[o],t.scale,s,l)}const z4=["x","scaleX","originX"],W4=["y","scaleY","originY"];function gI(e,t,n,r){dI(e.x,t,z4,n?n.x:void 0,r?r.x:void 0),dI(e.y,t,W4,n?n.y:void 0,r?r.y:void 0)}function fI(e){return e.translate===0&&e.scale===1}function pI(e){return fI(e.x)&&fI(e.y)}function U4(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function hI(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function CI(e){return Tn(e.x)/Tn(e.y)}class Y4{constructor(){this.members=[]}add(t){ad(this.members,t),t.scheduleRender()}remove(t){if(ld(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(),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:o}=t.options;o===!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)}}function EI(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y;if((o||s)&&(r=`translate3d(${o}px, ${s}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:A,rotateX:f,rotateY:p}=n;A&&(r+=`rotate(${A}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const G4=(e,t)=>e.depth-t.depth;class K4{constructor(){this.children=[],this.isDirty=!1}add(t){ad(this.children,t),this.isDirty=!0}remove(t){ld(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(G4),this.isDirty=!1,this.children.forEach(t)}}function J4(e,t){const n=performance.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Rr(r),e(s-t))};return Bt.read(r,!0),()=>Rr(r)}function X4(e){window.MotionDebug&&window.MotionDebug.record(e)}function Z4(e){return e instanceof SVGElement&&e.tagName!=="svg"}function _4(e,t,n){const r=pn(e)?e:Si(e);return r.start(sd("",r,t,n)),r.animation}const II=["","X","Y","Z"],mI=1e3;let q4=0;const Ho={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function BI({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(l={},u=t==null?void 0:t()){this.id=q4++,this.animationId=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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{Ho.totalNodes=Ho.resolvedTargetDeltas=Ho.recalculatedProjection=0,this.nodes.forEach(tO),this.nodes.forEach(sO),this.nodes.forEach(aO),this.nodes.forEach(nO),X4(Ho)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let A=0;A<this.path.length;A++)this.path[A].shouldResetTransform=!0;this.root===this&&(this.nodes=new K4)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new cd),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const A=this.eventHandlers.get(l);A&&A.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l,u=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Z4(l),this.instance=l;const{layoutId:A,layout:f,visualElement:p}=this.options;if(p&&!p.current&&p.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),u&&(f||A)&&(this.isLayoutDirty=!0),e){let C;const h=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,C&&C(),C=J4(h,250),kl.hasAnimatedSinceResize&&(kl.hasAnimatedSinceResize=!1,this.nodes.forEach(yI))})}A&&this.root.registerSharedNode(A,this),this.options.animate!==!1&&p&&(A||f)&&this.addEventListener("didUpdate",({delta:C,hasLayoutChanged:h,hasRelativeTargetChanged:E,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const B=this.options.transition||p.getDefaultTransition()||dO,{onLayoutAnimationStart:v,onLayoutAnimationComplete:j}=p.getProps(),R=!this.targetLayout||!hI(this.targetLayout,m)||E,x=!h&&E;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||h&&(R||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(C,x);const O={...PE(B,"layout"),onPlay:v,onComplete:j};(p.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O)}else h||yI(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Rr(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(lO),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const C=this.path[p];C.shouldResetTransform=!0,C.updateScroll("snapshot"),C.options.layoutRoot&&C.willUpdate(!1)}const{layoutId:u,layout:A}=this.options;if(u===void 0&&!A)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(vI);return}this.isUpdating||this.nodes.forEach(oO),this.isUpdating=!1,this.nodes.forEach(iO),this.nodes.forEach($4),this.nodes.forEach(eO),this.clearAllSnapshots();const u=performance.now();Zt.delta=ro(0,1e3/60,u-Zt.timestamp),Zt.timestamp=u,Zt.isProcessing=!0,WA.update.process(Zt),WA.preRender.process(Zt),WA.render.process(Zt),Zt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(rO),this.sharedNodes.forEach(cO)}scheduleUpdateProjection(){Bt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Bt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let A=0;A<this.path.length;A++)this.path[A].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Wt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u&&(this.scroll={animationId:this.root.animationId,phase:l,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform,u=this.projectionDelta&&!pI(this.projectionDelta),A=this.getTransformTemplate(),f=A?A(this.latestValues,""):void 0,p=f!==this.prevTransformTemplateValue;l&&(u||Vo(this.latestValues)||p)&&(o(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let A=this.removeElementScroll(u);return l&&(A=this.removeTransform(A)),gO(A),{animationId:this.root.animationId,measuredBox:u,layoutBox:A,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return Wt();const u=l.measureViewportBox(),{scroll:A}=this.root;return A&&(co(u.x,A.offset.x),co(u.y,A.offset.y)),u}removeElementScroll(l){const u=Wt();zn(u,l);for(let A=0;A<this.path.length;A++){const f=this.path[A],{scroll:p,options:C}=f;if(f!==this.root&&p&&C.layoutScroll){if(p.isRoot){zn(u,l);const{scroll:h}=this.root;h&&(co(u.x,-h.offset.x),co(u.y,-h.offset.y))}co(u.x,p.offset.x),co(u.y,p.offset.y)}}return u}applyTransform(l,u=!1){const A=Wt();zn(A,l);for(let f=0;f<this.path.length;f++){const p=this.path[f];!u&&p.options.layoutScroll&&p.scroll&&p!==p.root&&ji(A,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),Vo(p.latestValues)&&ji(A,p.latestValues)}return Vo(this.latestValues)&&ji(A,this.latestValues),A}removeTransform(l){const u=Wt();zn(u,l);for(let A=0;A<this.path.length;A++){const f=this.path[A];if(!f.instance||!Vo(f.latestValues))continue;Cd(f.latestValues)&&f.updateSnapshot();const p=Wt(),C=f.measurePageBox();zn(p,C),gI(u,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,p)}return Vo(this.latestValues)&&gI(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.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!==Zt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var u;const A=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=A.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=A.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=A.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==A;if(!(l||f&&this.isSharedProjectionDirty||this.isProjectionDirty||!((u=this.parent)===null||u===void 0)&&u.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:C,layoutId:h}=this.options;if(!(!this.layout||!(C||h))){if(this.resolvedRelativeTargetAt=Zt.timestamp,!this.targetDelta&&!this.relativeTarget){const E=this.getClosestProjectingParent();E&&E.layout&&this.animationProgress!==1?(this.relativeParent=E,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wt(),this.relativeTargetOrigin=Wt(),Us(this.relativeTargetOrigin,this.layout.layoutBox,E.layout.layoutBox),zn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Wt(),this.targetWithTransforms=Wt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),p4(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):zn(this.target,this.layout.layoutBox),qE(this.target,this.targetDelta)):zn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const E=this.getClosestProjectingParent();E&&!!E.resumingFrom==!!this.resumingFrom&&!E.options.layoutScroll&&E.target&&this.animationProgress!==1?(this.relativeParent=E,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wt(),this.relativeTargetOrigin=Wt(),Us(this.relativeTargetOrigin,this.target,E.target),zn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ho.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Cd(this.parent.latestValues)||XE(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var l;const u=this.getLead(),A=!!this.resumingFrom||this!==u;let f=!0;if((this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty)&&(f=!1),A&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===Zt.timestamp&&(f=!1),f)return;const{layout:p,layoutId:C}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||C))return;zn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,E=this.treeScale.y;b4(this.layoutCorrected,this.treeScale,this.path,A),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox);const{target:m}=u;if(!m){this.projectionTransform&&(this.projectionDelta=Oi(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Oi(),this.projectionDeltaWithTransform=Oi());const B=this.projectionTransform;Ws(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=EI(this.projectionDelta,this.treeScale),(this.projectionTransform!==B||this.treeScale.x!==h||this.treeScale.y!==E)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),Ho.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),l){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(l,u=!1){const A=this.snapshot,f=A?A.latestValues:{},p={...this.latestValues},C=Oi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const h=Wt(),E=A?A.source:void 0,m=this.layout?this.layout.source:void 0,B=E!==m,v=this.getStack(),j=!v||v.members.length<=1,R=!!(B&&!j&&this.options.crossfade===!0&&!this.path.some(AO));this.animationProgress=0;let x;this.mixTargetDelta=O=>{const P=O/1e3;bI(C.x,l.x,P),bI(C.y,l.y,P),this.setTargetDelta(C),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Us(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),uO(this.relativeTarget,this.relativeTargetOrigin,h,P),x&&U4(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Wt()),zn(x,this.relativeTarget)),B&&(this.animationValues=p,L4(p,f,this.latestValues,P,R,j)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Rr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Bt.update(()=>{kl.hasAnimatedSinceResize=!0,this.currentAnimation=_4(0,mI,{...l,onUpdate:u=>{this.mixTargetDelta(u),l.onUpdate&&l.onUpdate(u)},onComplete:()=>{l.onComplete&&l.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 l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(mI),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:A,layout:f,latestValues:p}=l;if(!(!u||!A||!f)){if(this!==l&&this.layout&&f&&PI(this.options.animationType,this.layout.layoutBox,f.layoutBox)){A=this.target||Wt();const C=Tn(this.layout.layoutBox.x);A.x.min=l.target.x.min,A.x.max=A.x.min+C;const h=Tn(this.layout.layoutBox.y);A.y.min=l.target.y.min,A.y.max=A.y.min+h}zn(u,A),ji(u,p),Ws(this.projectionDeltaWithTransform,this.layoutCorrected,u,p)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new Y4),this.sharedNodes.get(l).add(u);const f=u.options.initialPromotionConfig;u.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var l;const{layoutId:u}=this.options;return u?((l=this.getStack())===null||l===void 0?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:u}=this.options;return u?(l=this.getStack())===null||l===void 0?void 0:l.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:A}={}){const f=this.getStack();f&&f.promote(this,A),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:A}=l;if((A.rotate||A.rotateX||A.rotateY||A.rotateZ)&&(u=!0),!u)return;const f={};for(let p=0;p<II.length;p++){const C="rotate"+II[p];A[C]&&(f[C]=A[C],l.setStaticValue(C,0))}l.render();for(const p in f)l.setStaticValue(p,f[p]);l.scheduleRender()}getProjectionStyles(l={}){var u,A;const f={};if(!this.instance||this.isSVG)return f;if(this.isVisible)f.visibility="";else return{visibility:"hidden"};const p=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,f.opacity="",f.pointerEvents=Ql(l.pointerEvents)||"",f.transform=p?p(this.latestValues,""):"none",f;const C=this.getLead();if(!this.projectionDelta||!this.layout||!C.target){const B={};return this.options.layoutId&&(B.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,B.pointerEvents=Ql(l.pointerEvents)||""),this.hasProjected&&!Vo(this.latestValues)&&(B.transform=p?p({},""):"none",this.hasProjected=!1),B}const h=C.animationValues||C.latestValues;this.applyTransformsToTarget(),f.transform=EI(this.projectionDeltaWithTransform,this.treeScale,h),p&&(f.transform=p(h,f.transform));const{x:E,y:m}=this.projectionDelta;f.transformOrigin=`${E.origin*100}% ${m.origin*100}% 0`,C.animationValues?f.opacity=C===this?(A=(u=h.opacity)!==null&&u!==void 0?u:this.latestValues.opacity)!==null&&A!==void 0?A:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:f.opacity=C===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const B in ml){if(h[B]===void 0)continue;const{correct:v,applyTo:j}=ml[B],R=f.transform==="none"?h[B]:v(h[B],C);if(j){const x=j.length;for(let O=0;O<x;O++)f[j[O]]=R}else f[B]=R}return this.options.layoutId&&(f.pointerEvents=C===this?Ql(l.pointerEvents)||"":"none"),f}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(vI),this.root.sharedNodes.clear()}}}function $4(e){e.updateLayout()}function eO(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,l=n.source!==e.layout.source;s==="size"?vr(C=>{const h=l?n.measuredBox[C]:n.layoutBox[C],E=Tn(h);h.min=r[C].min,h.max=h.min+E}):PI(s,n.layoutBox,r)&&vr(C=>{const h=l?n.measuredBox[C]:n.layoutBox[C],E=Tn(r[C]);h.max=h.min+E,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[C].max=e.relativeTarget[C].min+E)});const u=Oi();Ws(u,r,n.layoutBox);const A=Oi();l?Ws(A,e.applyTransform(o,!0),n.measuredBox):Ws(A,r,n.layoutBox);const f=!pI(u);let p=!1;if(!e.resumeFrom){const C=e.getClosestProjectingParent();if(C&&!C.resumeFrom){const{snapshot:h,layout:E}=C;if(h&&E){const m=Wt();Us(m,n.layoutBox,h.layoutBox);const B=Wt();Us(B,r,E.layoutBox),hI(m,B)||(p=!0),C.options.layoutRoot&&(e.relativeTarget=B,e.relativeTargetOrigin=m,e.relativeParent=C)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:A,layoutDelta:u,hasLayoutChanged:f,hasRelativeTargetChanged:p})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function tO(e){Ho.totalNodes++,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 nO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function rO(e){e.clearSnapshot()}function vI(e){e.clearMeasurements()}function oO(e){e.isLayoutDirty=!1}function iO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function yI(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function sO(e){e.resolveTargetDelta()}function aO(e){e.calcProjection()}function lO(e){e.resetRotation()}function cO(e){e.removeLeadSnapshot()}function bI(e,t,n){e.translate=St(t.translate,0,n),e.scale=St(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function QI(e,t,n,r){e.min=St(t.min,n.min,r),e.max=St(t.max,n.max,r)}function uO(e,t,n,r){QI(e.x,t.x,n.x,r),QI(e.y,t.y,n.y,r)}function AO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const dO={duration:.45,ease:[.4,0,.1,1]},xI=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),wI=xI("applewebkit/")&&!xI("chrome/")?Math.round:Dt;function TI(e){e.min=wI(e.min),e.max=wI(e.max)}function gO(e){TI(e.x),TI(e.y)}function PI(e,t,n){return e==="position"||e==="preserve-aspect"&&!fd(CI(t),CI(n),.2)}const fO=BI({attachResizeListener:(e,t)=>Dr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Id={current:void 0},SI=BI({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Id.current){const e=new fO({});e.mount(window),e.setOptions({layoutScroll:!0}),Id.current=e}return Id.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),pO={pan:{Feature:j4},drag:{Feature:O4,ProjectionNode:SI,MeasureLayout:oI}},hO=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function CO(e){const t=hO.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const EO=4;function md(e,t,n=1){Br(n<=EO,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=CO(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const l=s.trim();return SE(l)?parseFloat(l):l}else return DA(o)?md(o,t,n+1):o}function IO(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(o=>{const s=o.get();if(!DA(s))return;const l=md(s,r);l&&o.set(l)});for(const o in t){const s=t[o];if(!DA(s))continue;const l=md(s,r);l&&(t[o]=l,n||(n={}),n[o]===void 0&&(n[o]=s))}return{target:t,transitionEnd:n}}const mO=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),OI=e=>mO.has(e),BO=e=>Object.keys(e).some(OI),Fl=e=>e===Fo||e===De,jI=(e,t)=>parseFloat(e.split(", ")[t]),MI=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return jI(o[1],t);{const s=r.match(/^matrix\((.+)\)$/);return s?jI(s[1],e):0}},vO=new Set(["x","y","z"]),yO=Ms.filter(e=>!vO.has(e));function bO(e){const t=[];return yO.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Mi={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:MI(4,13),y:MI(5,14)};Mi.translateX=Mi.x,Mi.translateY=Mi.y;const QO=(e,t,n)=>{const r=t.measureViewportBox(),o=t.current,s=getComputedStyle(o),{display:l}=s,u={};l==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(f=>{u[f]=Mi[f](r,s)}),t.render();const A=t.measureViewportBox();return n.forEach(f=>{const p=t.getValue(f);p&&p.jump(u[f]),e[f]=Mi[f](A,s)}),e},xO=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(OI);let s=[],l=!1;const u=[];if(o.forEach(A=>{const f=e.getValue(A);if(!e.hasValue(A))return;let p=n[A],C=zs(p);const h=t[A];let E;if(bl(h)){const m=h.length,B=h[0]===null?1:0;p=h[B],C=zs(p);for(let v=B;v<m&&h[v]!==null;v++)E?Br(zs(h[v])===E,"All keyframes must be of the same type"):(E=zs(h[v]),Br(E===C||Fl(C)&&Fl(E),"Keyframes must be of the same dimension as the current value"))}else E=zs(h);if(C!==E)if(Fl(C)&&Fl(E)){const m=f.get();typeof m=="string"&&f.set(parseFloat(m)),typeof h=="string"?t[A]=parseFloat(h):Array.isArray(h)&&E===De&&(t[A]=h.map(parseFloat))}else C!=null&&C.transform&&(E!=null&&E.transform)&&(p===0||h===0)?p===0?f.set(E.transform(p)):t[A]=C.transform(h):(l||(s=bO(e),l=!0),u.push(A),r[A]=r[A]!==void 0?r[A]:t[A],f.jump(h))}),u.length){const A=u.indexOf("height")>=0?window.pageYOffset:null,f=QO(t,e,u);return s.length&&s.forEach(([p,C])=>{e.getValue(p).set(C)}),e.render(),Cl&&A!==null&&window.scrollTo({top:A}),{target:f,transitionEnd:r}}else return{target:t,transitionEnd:r}};function wO(e,t,n,r){return BO(t)?xO(e,t,n,r):{target:t,transitionEnd:r}}const TO=(e,t,n,r)=>{const o=IO(e,t,r);return t=o.target,r=o.transitionEnd,wO(e,t,n,r)},Bd={current:null},RI={current:!1};function PO(){if(RI.current=!0,!!Cl)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Bd.current=e.matches;e.addListener(t),t()}else Bd.current=!1}function SO(e,t,n){const{willChange:r}=t;for(const o in t){const s=t[o],l=n[o];if(pn(s))e.addValue(o,s),Ml(r)&&r.add(o),process.env.NODE_ENV==="development"&&ud(s.version==="10.16.4",`Attempting to mix Framer Motion versions ${s.version} with 10.16.4 may not work as expected.`);else if(pn(l))e.addValue(o,Si(s,{owner:e})),Ml(r)&&r.remove(o);else if(l!==s)if(e.hasValue(o)){const u=e.getValue(o);!u.hasAnimated&&u.set(s)}else{const u=e.getStaticValue(o);e.addValue(o,Si(u!==void 0?u:s,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const DI=new WeakMap,kI=Object.keys(js),OO=kI.length,FI=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],jO=MA.length;class MO{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:s},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>Bt.render(this.render,!1,!0);const{latestValues:u,renderState:A}=s;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=A,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=l,this.isControllingVariants=Il(n),this.isVariantNode=hC(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{});for(const C in p){const h=p[C];u[C]!==void 0&&pn(h)&&(h.set(u[C],!1),Ml(f)&&f.add(C))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,DI.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((n,r)=>this.bindToMotionValue(r,n)),RI.current||PO(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Bd.current,process.env.NODE_ENV!=="production"&&ud(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){DI.delete(this.current),this.projection&&this.projection.unmount(),Rr(this.notifyUpdate),Rr(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=ko.has(t),o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Bt.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,o,s){let l,u;if(process.env.NODE_ENV!=="production"&&o&&r){const A="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?Ls(!1,A):Br(!1,A)}for(let A=0;A<OO;A++){const f=kI[A],{isEnabled:p,Feature:C,ProjectionNode:h,MeasureLayout:E}=js[f];h&&(l=h),p(n)&&(!this.features[f]&&C&&(this.features[f]=new C(this)),E&&(u=E))}if(!this.projection&&l){this.projection=new l(this.latestValues,this.parent&&this.parent.projection);const{layoutId:A,layout:f,drag:p,dragConstraints:C,layoutScroll:h,layoutRoot:E}=n;this.projection.setOptions({layoutId:A,layout:f,alwaysMeasureLayout:!!p||C&&Ti(C),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:s,layoutScroll:h,layoutRoot:E})}return u}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Wt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,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<FI.length;r++){const o=FI[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s=t["on"+o];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=SO(this,this.scrapeMotionValuesFromProps(t,this.prevProps),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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<jO;r++){const o=MA[r],s=this.props[o];(Os(s)||s===!1)&&(n[o]=s)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(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=Si(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,o=typeof r=="string"||typeof r=="object"?(n=zA(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!pn(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new cd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class LI extends MO{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:o},s){let l=_S(r,t||{},this);if(o&&(n&&(n=o(n)),r&&(r=o(r)),l&&(l=o(l))),s){XS(this,r,l);const u=TO(this,r,l,n);n=u.transitionEnd,r=u.target}return{transition:t,transitionEnd:n,...r}}}function RO(e){return window.getComputedStyle(e)}class DO extends LI{readValueFromInstance(t,n){if(ko.has(n)){const r=id(n);return r&&r.default||0}else{const r=RO(t),o=(yC(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return tI(t,n)}build(t,n,r,o){kA(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n){return HA(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;pn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,o){jC(t,n,r,o)}}class kO extends LI{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ko.has(n)){const r=id(n);return r&&r.default||0}return n=MC.has(n)?n:VA(n),t.getAttribute(n)}measureInstanceViewportBox(){return Wt()}scrapeMotionValuesFromProps(t,n){return DC(t,n)}build(t,n,r,o){LA(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){RC(t,n,r,o)}mount(t){this.isSVGTag=NA(t.tagName),super.mount(t)}}const FO=(e,t)=>RA(e)?new kO(t,{enableHardwareAcceleration:!1}):new DO(t,{enableHardwareAcceleration:!0}),LO={...A4,...kP,...pO,...{layout:{ProjectionNode:SI,MeasureLayout:oI}}},Ll=UT((e,t)=>yP(e,t,LO,FO)),NO=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function NI(...e){const t=w.useRef(0),[n,r]=w.useState(e[t.current]),o=w.useCallback(s=>{t.current=typeof s!="number"?NO(0,e.length,t.current+1):s,r(e[t.current])},[e.length,...e]);return[n,o]}function VI({children:e,type:t="scale",direction:n="right",offset:r=10,scale:o={hover:1.05,tap:.95}}){let s,l;switch(n){case"up":case"left":s=r,l=0;break;case"right":case"down":default:s=0,l=r;break}const[u,A]=NI(s,l),[f,p]=NI(s,l);switch(t){case"rotate":return g.jsx(Ll.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:e});case"slide":return n==="up"||n==="down"?g.jsx(Ll.div,{animate:{y:f!==void 0?f:""},onHoverEnd:()=>p(),onHoverStart:()=>p(),children:e}):g.jsx(Ll.div,{animate:{x:u!==void 0?u:""},onHoverEnd:()=>A(),onHoverStart:()=>A(),children:e});case"scale":default:return typeof o=="number"&&(o={hover:o,tap:o}),g.jsx(Ll.div,{whileHover:{scale:o==null?void 0:o.hover},whileTap:{scale:o==null?void 0:o.tap},children:e})}}VI.propTypes={children:c.node,offset:c.number,type:c.oneOf(["slide","scale","rotate"]),direction:c.oneOf(["up","down","left","right"]),scale:c.oneOfType([c.number,c.object])};function VO(e){return Lt("MuiSvgIcon",e)}Ht("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const HO=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],zO=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Pe(t)}`,`fontSize${Pe(n)}`]};return nn(o,VO,r)},WO=Ae("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Pe(n.color)}`],t[`fontSize${Pe(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,s,l,u,A,f,p,C,h,E,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||(l=s.pxToRem)==null?void 0:l.call(s,20))||"1.25rem",medium:((u=e.typography)==null||(A=u.pxToRem)==null?void 0:A.call(u,24))||"1.5rem",large:((f=e.typography)==null||(p=f.pxToRem)==null?void 0:p.call(f,35))||"2.1875rem"}[t.fontSize],color:(C=(h=(e.vars||e).palette)==null||(h=h[t.color])==null?void 0:h.main)!=null?C:{action:(E=(e.vars||e).palette)==null||(E=E.action)==null?void 0:E.active,disabled:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.disabled,inherit:void 0}[t.color]}}),vd=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:l="inherit",component:u="svg",fontSize:A="medium",htmlColor:f,inheritViewBox:p=!1,titleAccess:C,viewBox:h="0 0 24 24"}=r,E=Ue(r,HO),m=k.isValidElement(o)&&o.type==="svg",B=W({},r,{color:l,component:u,fontSize:A,instanceFontSize:t.fontSize,inheritViewBox:p,viewBox:h,hasSvgAsChild:m}),v={};p||(v.viewBox=h);const j=zO(B);return g.jsxs(WO,W({as:u,className:Ye(j.root,s),focusable:"false",color:f,"aria-hidden":C?void 0:!0,role:C?"img":void 0,ref:n},v,E,m&&o.props,{ownerState:B,children:[m?o.props.children:o,C?g.jsx("title",{children:C}):null]}))});process.env.NODE_ENV!=="production"&&(vd.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),c.string]),component:c.elementType,fontSize:c.oneOfType([c.oneOf(["inherit","large","medium","small"]),c.string]),htmlColor:c.string,inheritViewBox:c.bool,shapeRendering:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),titleAccess:c.string,viewBox:c.string}),vd.muiName="SvgIcon";const HI=vd;function yd(e,t){function n(r,o){return g.jsx(HI,W({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=HI.muiName,k.memo(k.forwardRef(n))}const UO=yd(g.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function YO(e){return Lt("MuiAvatar",e)}Ht("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const GO=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],KO=e=>{const{classes:t,variant:n,colorDefault:r}=e;return nn({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},YO,t)},JO=Ae("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e,ownerState:t})=>W({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.variant==="square"&&{borderRadius:0},t.colorDefault&&W({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}))),XO=Ae("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),ZO=Ae(UO,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function _O({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,s]=k.useState(!1);return k.useEffect(()=>{if(!n&&!r)return;s(!1);let l=!0;const u=new Image;return u.onload=()=>{l&&s("loaded")},u.onerror=()=>{l&&s("error")},u.crossOrigin=e,u.referrerPolicy=t,u.src=n,r&&(u.srcset=r),()=>{l=!1}},[e,t,n,r]),o}const zI=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiAvatar"}),{alt:o,children:s,className:l,component:u="div",imgProps:A,sizes:f,src:p,srcSet:C,variant:h="circular"}=r,E=Ue(r,GO);let m=null;const B=_O(W({},A,{src:p,srcSet:C})),v=p||C,j=v&&B!=="error",R=W({},r,{colorDefault:!j,component:u,variant:h}),x=KO(R);return j?m=g.jsx(XO,W({alt:o,srcSet:C,src:p,sizes:f,ownerState:R,className:x.img},A)):s!=null?m=s:v&&o?m=o[0]:m=g.jsx(ZO,{ownerState:R,className:x.fallback}),g.jsx(JO,W({as:u,ownerState:R,className:Ye(x.root,l),ref:n},E,{children:m}))});process.env.NODE_ENV!=="production"&&(zI.propTypes={alt:c.string,children:c.node,classes:c.object,className:c.string,component:c.elementType,imgProps:c.object,sizes:c.string,src:c.string,srcSet:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["circular","rounded","square"]),c.string])});const qO=zI,rn=(e,t)=>{switch(t){case"secondary":return e.palette.secondary;case"error":return e.palette.error;case"warning":return e.palette.warning;case"info":return e.palette.info;case"success":return e.palette.success;default:return e.palette.primary}};function $O({theme:e,color:t,type:n}){const r=rn(e,t),{lighter:o,light:s,main:l,contrastText:u}=r;switch(n){case"filled":return{color:u,backgroundColor:l};case"outlined":return{color:l,border:"1px solid",borderColor:l,backgroundColor:"transparent"};case"combined":return{color:l,border:"1px solid",borderColor:s,backgroundColor:o};default:return{color:l,backgroundColor:o}}}function ej(e){switch(e){case"badge":return{border:"2px solid",fontSize:"0.675rem",width:20,height:20};case"xs":return{fontSize:"0.75rem",width:24,height:24};case"sm":return{fontSize:"0.875rem",width:32,height:32};case"lg":return{fontSize:"1.2rem",width:52,height:52};case"xl":return{fontSize:"1.5rem",width:64,height:64};case"md":default:return{fontSize:"1rem",width:40,height:40}}}const tj=Ae(qO,{shouldForwardProp:e=>e!=="color"&&e!=="type"&&e!=="size"})(({theme:e,variant:t,color:n,type:r,size:o})=>({...ej(o),...$O({variant:t,theme:e,color:n,type:r}),...o==="badge"&&{borderColor:e.palette.background.default}}));function Gs({variant:e="circular",children:t,color:n="primary",type:r,size:o="md",...s}){const l=Pt();return g.jsx(tj,{variant:e,theme:l,color:n,type:r,size:o,...s,children:t})}Gs.propTypes={children:c.node,color:c.string,type:c.string,size:c.string,variant:c.string};const WI={p:2.5,"& .MuiCardHeader-action":{m:"0px auto",alignSelf:"center"}},Wn=w.forwardRef(({border:e=!0,boxShadow:t,children:n,subheader:r,content:o=!0,contentSX:s={},darkTitle:l,divider:u=!0,elevation:A,secondary:f,shadow:p,sx:C={},title:h,modal:E=!1,color:m="default",...B},v)=>{const j=Pt();return t=j.palette.mode==="dark"?t||!0:t,g.jsxs(b.Card,{elevation:A||0,ref:v,...B,sx:{position:"relative",border:e?"1px solid":"none",borderRadius:1,borderColor:j.palette.mode==="dark"?j.palette.divider:j.palette.grey.A800,boxShadow:t&&(!e||j.palette.mode==="dark")?p||j.customShadows.z1:"inherit",":hover":{boxShadow:t?p||j.customShadows.z1:"inherit"},backgroundColor:m==="default"?j.palette.background.paper:Bi(m==="primary"?j.palette.primary[100]:j.palette.secondary[100],.5),...E&&{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:"calc( 100% - 50px)",sm:"auto"},"& .MuiCardContent-root":{overflowY:"auto",minHeight:"auto",maxHeight:"calc(100vh - 200px)"}},...C},children:[!l&&h&&g.jsx(b.CardHeader,{sx:WI,titleTypographyProps:{variant:"subtitle1"},title:h,action:f,subheader:r}),l&&h&&g.jsx(b.CardHeader,{sx:WI,title:g.jsx(b.Typography,{variant:"h4",children:h}),action:f}),h&&u&&g.jsx(b.Divider,{}),o&&g.jsx(b.CardContent,{sx:s,children:n}),!o&&n]})});Wn.propTypes={border:c.bool,boxShadow:c.bool,children:c.oneOfType([c.node,c.arrayOf(c.node)]),subheader:c.oneOfType([c.node,c.string]),content:c.bool,contentClass:c.string,contentSX:c.object,darkTitle:c.bool,divider:c.bool,elevation:c.number,secondary:c.oneOfType([c.node,c.string,c.object]),shadow:c.string,sx:c.object,title:c.oneOfType([c.node,c.string,c.object]),modal:c.bool,color:c.oneOf(["default","primary","secondary"])};var bd={exports:{}},ct={};/**
|
|
97
|
+
}`;var Je=Rx(function(){return rt(T,Qe+"return "+ae).apply(n,D)});if(Je.source=ae,Np(Je))throw Je;return Je}function xK(i){return At(i).toLowerCase()}function wK(i){return At(i).toUpperCase()}function TK(i,a,d){if(i=At(i),i&&(d||a===n))return Wb(i);if(!i||!(a=Fn(a)))return i;var I=dr(i),y=dr(a),T=Ub(I,y),D=Yb(I,y)+1;return Po(I,T,D).join("")}function PK(i,a,d){if(i=At(i),i&&(d||a===n))return i.slice(0,Kb(i)+1);if(!i||!(a=Fn(a)))return i;var I=dr(i),y=Yb(I,dr(a))+1;return Po(I,0,y).join("")}function SK(i,a,d){if(i=At(i),i&&(d||a===n))return i.replace(Wr,"");if(!i||!(a=Fn(a)))return i;var I=dr(i),y=Ub(I,dr(a));return Po(I,y).join("")}function OK(i,a){var d=Y,I=$;if(jt(a)){var y="separator"in a?a.separator:y;d="length"in a?We(a.length):d,I="omission"in a?Fn(a.omission):I}i=At(i);var T=i.length;if(us(i)){var D=dr(i);T=D.length}if(d>=T)return i;var V=d-As(I);if(V<1)return I;var G=D?Po(D,0,V).join(""):i.slice(0,V);if(y===n)return G+I;if(D&&(V+=G.length-V),Vp(y)){if(i.slice(V).search(y)){var oe,ie=G;for(y.global||(y=np(y.source,At(wa.exec(y))+"g")),y.lastIndex=0;oe=y.exec(ie);)var ae=oe.index;G=G.slice(0,ae===n?V:ae)}}else if(i.indexOf(Fn(y),V)!=V){var me=G.lastIndexOf(y);me>-1&&(G=G.slice(0,me))}return G+I}function jK(i){return i=At(i),i&&Kc.test(i)?i.replace(Gc,az):i}var MK=Es(function(i,a,d){return i+(d?" ":"")+a.toUpperCase()}),Wp=DQ("toUpperCase");function Mx(i,a,d){return i=At(i),a=d?n:a,a===n?nz(i)?uz(i):KH(i):i.match(a)||[]}var Rx=Xe(function(i,a){try{return Dn(i,n,a)}catch(d){return Np(d)?d:new Le(d)}}),RK=Jr(function(i,a){return qn(a,function(d){d=Sr(d),Gr(i,d,Fp(i[d],i))}),i});function DK(i){var a=i==null?0:i.length,d=je();return i=a?Tt(i,function(I){if(typeof I[1]!="function")throw new $n(l);return[d(I[0]),I[1]]}):[],Xe(function(I){for(var y=-1;++y<a;){var T=i[y];if(Dn(T[0],this,I))return Dn(T[1],this,I)}})}function kK(i){return aW(tr(i,C))}function Up(i){return function(){return i}}function FK(i,a){return i==null||i!==i?a:i}var LK=FQ(),NK=FQ(!0);function bn(i){return i}function Yp(i){return gQ(typeof i=="function"?i:tr(i,C))}function VK(i){return pQ(tr(i,C))}function HK(i,a){return hQ(i,tr(a,C))}var zK=Xe(function(i,a){return function(d){return ka(d,i,a)}}),WK=Xe(function(i,a){return function(d){return ka(i,d,a)}});function Gp(i,a,d){var I=$t(a),y=Bu(a,I);d==null&&!(jt(a)&&(y.length||!I.length))&&(d=a,a=i,i=this,y=Bu(a,$t(a)));var T=!(jt(d)&&"chain"in d)||!!d.chain,D=Zr(i);return qn(y,function(V){var G=a[V];i[V]=G,D&&(i.prototype[V]=function(){var oe=this.__chain__;if(T||oe){var ie=i(this.__wrapped__),ae=ie.__actions__=Bn(this.__actions__);return ae.push({func:G,args:arguments,thisArg:i}),ie.__chain__=oe,ie}return G.apply(i,yo([this.value()],arguments))})}),i}function UK(){return en._===this&&(en._=hz),this}function Kp(){}function YK(i){return i=We(i),Xe(function(a){return CQ(a,i)})}var GK=bp(Tt),KK=bp(Lb),JK=bp(Xf);function Dx(i){return Op(i)?Zf(Sr(i)):bW(i)}function XK(i){return function(a){return i==null?n:ci(i,a)}}var ZK=NQ(),_K=NQ(!0);function Jp(){return[]}function Xp(){return!1}function qK(){return{}}function $K(){return""}function eJ(){return!0}function tJ(i,a){if(i=We(i),i<1||i>L)return[];var d=_,I=ln(i,_);a=je(a),i-=_;for(var y=$f(I,a);++d<i;)a(d);return y}function nJ(i){return Ne(i)?Tt(i,Sr):Ln(i)?[i]:Bn(tx(At(i)))}function rJ(i){var a=++fz;return At(i)+a}var oJ=wu(function(i,a){return i+a},0),iJ=Qp("ceil"),sJ=wu(function(i,a){return i/a},1),aJ=Qp("floor");function lJ(i){return i&&i.length?mu(i,bn,up):n}function cJ(i,a){return i&&i.length?mu(i,je(a,2),up):n}function uJ(i){return Hb(i,bn)}function AJ(i,a){return Hb(i,je(a,2))}function dJ(i){return i&&i.length?mu(i,bn,fp):n}function gJ(i,a){return i&&i.length?mu(i,je(a,2),fp):n}var fJ=wu(function(i,a){return i*a},1),pJ=Qp("round"),hJ=wu(function(i,a){return i-a},0);function CJ(i){return i&&i.length?qf(i,bn):0}function EJ(i,a){return i&&i.length?qf(i,je(a,2)):0}return Q.after=VY,Q.ary=dx,Q.assign=wG,Q.assignIn=xx,Q.assignInWith=Vu,Q.assignWith=TG,Q.at=PG,Q.before=gx,Q.bind=Fp,Q.bindAll=RK,Q.bindKey=fx,Q.castArray=qY,Q.chain=cx,Q.chunk=aU,Q.compact=lU,Q.concat=cU,Q.cond=DK,Q.conforms=kK,Q.constant=Up,Q.countBy=CY,Q.create=SG,Q.curry=px,Q.curryRight=hx,Q.debounce=Cx,Q.defaults=OG,Q.defaultsDeep=jG,Q.defer=HY,Q.delay=zY,Q.difference=uU,Q.differenceBy=AU,Q.differenceWith=dU,Q.drop=gU,Q.dropRight=fU,Q.dropRightWhile=pU,Q.dropWhile=hU,Q.fill=CU,Q.filter=IY,Q.flatMap=vY,Q.flatMapDeep=yY,Q.flatMapDepth=bY,Q.flatten=ix,Q.flattenDeep=EU,Q.flattenDepth=IU,Q.flip=WY,Q.flow=LK,Q.flowRight=NK,Q.fromPairs=mU,Q.functions=NG,Q.functionsIn=VG,Q.groupBy=QY,Q.initial=vU,Q.intersection=yU,Q.intersectionBy=bU,Q.intersectionWith=QU,Q.invert=zG,Q.invertBy=WG,Q.invokeMap=wY,Q.iteratee=Yp,Q.keyBy=TY,Q.keys=$t,Q.keysIn=yn,Q.map=Ru,Q.mapKeys=YG,Q.mapValues=GG,Q.matches=VK,Q.matchesProperty=HK,Q.memoize=ku,Q.merge=KG,Q.mergeWith=wx,Q.method=zK,Q.methodOf=WK,Q.mixin=Gp,Q.negate=Fu,Q.nthArg=YK,Q.omit=JG,Q.omitBy=XG,Q.once=UY,Q.orderBy=PY,Q.over=GK,Q.overArgs=YY,Q.overEvery=KK,Q.overSome=JK,Q.partial=Lp,Q.partialRight=Ex,Q.partition=SY,Q.pick=ZG,Q.pickBy=Tx,Q.property=Dx,Q.propertyOf=XK,Q.pull=PU,Q.pullAll=ax,Q.pullAllBy=SU,Q.pullAllWith=OU,Q.pullAt=jU,Q.range=ZK,Q.rangeRight=_K,Q.rearg=GY,Q.reject=MY,Q.remove=MU,Q.rest=KY,Q.reverse=Dp,Q.sampleSize=DY,Q.set=qG,Q.setWith=$G,Q.shuffle=kY,Q.slice=RU,Q.sortBy=NY,Q.sortedUniq=HU,Q.sortedUniqBy=zU,Q.split=vK,Q.spread=JY,Q.tail=WU,Q.take=UU,Q.takeRight=YU,Q.takeRightWhile=GU,Q.takeWhile=KU,Q.tap=lY,Q.throttle=XY,Q.thru=Mu,Q.toArray=yx,Q.toPairs=Px,Q.toPairsIn=Sx,Q.toPath=nJ,Q.toPlainObject=Qx,Q.transform=eK,Q.unary=ZY,Q.union=JU,Q.unionBy=XU,Q.unionWith=ZU,Q.uniq=_U,Q.uniqBy=qU,Q.uniqWith=$U,Q.unset=tK,Q.unzip=kp,Q.unzipWith=lx,Q.update=nK,Q.updateWith=rK,Q.values=Bs,Q.valuesIn=oK,Q.without=eY,Q.words=Mx,Q.wrap=_Y,Q.xor=tY,Q.xorBy=nY,Q.xorWith=rY,Q.zip=oY,Q.zipObject=iY,Q.zipObjectDeep=sY,Q.zipWith=aY,Q.entries=Px,Q.entriesIn=Sx,Q.extend=xx,Q.extendWith=Vu,Gp(Q,Q),Q.add=oJ,Q.attempt=Rx,Q.camelCase=lK,Q.capitalize=Ox,Q.ceil=iJ,Q.clamp=iK,Q.clone=$Y,Q.cloneDeep=tG,Q.cloneDeepWith=nG,Q.cloneWith=eG,Q.conformsTo=rG,Q.deburr=jx,Q.defaultTo=FK,Q.divide=sJ,Q.endsWith=cK,Q.eq=fr,Q.escape=uK,Q.escapeRegExp=AK,Q.every=EY,Q.find=mY,Q.findIndex=rx,Q.findKey=MG,Q.findLast=BY,Q.findLastIndex=ox,Q.findLastKey=RG,Q.floor=aJ,Q.forEach=ux,Q.forEachRight=Ax,Q.forIn=DG,Q.forInRight=kG,Q.forOwn=FG,Q.forOwnRight=LG,Q.get=Hp,Q.gt=oG,Q.gte=iG,Q.has=HG,Q.hasIn=zp,Q.head=sx,Q.identity=bn,Q.includes=xY,Q.indexOf=BU,Q.inRange=sK,Q.invoke=UG,Q.isArguments=di,Q.isArray=Ne,Q.isArrayBuffer=sG,Q.isArrayLike=vn,Q.isArrayLikeObject=Nt,Q.isBoolean=aG,Q.isBuffer=So,Q.isDate=lG,Q.isElement=cG,Q.isEmpty=uG,Q.isEqual=AG,Q.isEqualWith=dG,Q.isError=Np,Q.isFinite=gG,Q.isFunction=Zr,Q.isInteger=Ix,Q.isLength=Lu,Q.isMap=mx,Q.isMatch=fG,Q.isMatchWith=pG,Q.isNaN=hG,Q.isNative=CG,Q.isNil=IG,Q.isNull=EG,Q.isNumber=Bx,Q.isObject=jt,Q.isObjectLike=Ft,Q.isPlainObject=za,Q.isRegExp=Vp,Q.isSafeInteger=mG,Q.isSet=vx,Q.isString=Nu,Q.isSymbol=Ln,Q.isTypedArray=ms,Q.isUndefined=BG,Q.isWeakMap=vG,Q.isWeakSet=yG,Q.join=xU,Q.kebabCase=dK,Q.last=rr,Q.lastIndexOf=wU,Q.lowerCase=gK,Q.lowerFirst=fK,Q.lt=bG,Q.lte=QG,Q.max=lJ,Q.maxBy=cJ,Q.mean=uJ,Q.meanBy=AJ,Q.min=dJ,Q.minBy=gJ,Q.stubArray=Jp,Q.stubFalse=Xp,Q.stubObject=qK,Q.stubString=$K,Q.stubTrue=eJ,Q.multiply=fJ,Q.nth=TU,Q.noConflict=UK,Q.noop=Kp,Q.now=Du,Q.pad=pK,Q.padEnd=hK,Q.padStart=CK,Q.parseInt=EK,Q.random=aK,Q.reduce=OY,Q.reduceRight=jY,Q.repeat=IK,Q.replace=mK,Q.result=_G,Q.round=pJ,Q.runInContext=U,Q.sample=RY,Q.size=FY,Q.snakeCase=BK,Q.some=LY,Q.sortedIndex=DU,Q.sortedIndexBy=kU,Q.sortedIndexOf=FU,Q.sortedLastIndex=LU,Q.sortedLastIndexBy=NU,Q.sortedLastIndexOf=VU,Q.startCase=yK,Q.startsWith=bK,Q.subtract=hJ,Q.sum=CJ,Q.sumBy=EJ,Q.template=QK,Q.times=tJ,Q.toFinite=_r,Q.toInteger=We,Q.toLength=bx,Q.toLower=xK,Q.toNumber=or,Q.toSafeInteger=xG,Q.toString=At,Q.toUpper=wK,Q.trim=TK,Q.trimEnd=PK,Q.trimStart=SK,Q.truncate=OK,Q.unescape=jK,Q.uniqueId=rJ,Q.upperCase=MK,Q.upperFirst=Wp,Q.each=ux,Q.eachRight=Ax,Q.first=sx,Gp(Q,function(){var i={};return Tr(Q,function(a,d){gt.call(Q.prototype,d)||(i[d]=a)}),i}(),{chain:!1}),Q.VERSION=r,qn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){Q[i].placeholder=Q}),qn(["drop","take"],function(i,a){_e.prototype[i]=function(d){d=d===n?1:Jt(We(d),0);var I=this.__filtered__&&!a?new _e(this):this.clone();return I.__filtered__?I.__takeCount__=ln(d,I.__takeCount__):I.__views__.push({size:ln(d,_),type:i+(I.__dir__<0?"Right":"")}),I},_e.prototype[i+"Right"]=function(d){return this.reverse()[i](d).reverse()}}),qn(["filter","map","takeWhile"],function(i,a){var d=a+1,I=d==q||d==H;_e.prototype[i]=function(y){var T=this.clone();return T.__iteratees__.push({iteratee:je(y,3),type:d}),T.__filtered__=T.__filtered__||I,T}}),qn(["head","last"],function(i,a){var d="take"+(a?"Right":"");_e.prototype[i]=function(){return this[d](1).value()[0]}}),qn(["initial","tail"],function(i,a){var d="drop"+(a?"":"Right");_e.prototype[i]=function(){return this.__filtered__?new _e(this):this[d](1)}}),_e.prototype.compact=function(){return this.filter(bn)},_e.prototype.find=function(i){return this.filter(i).head()},_e.prototype.findLast=function(i){return this.reverse().find(i)},_e.prototype.invokeMap=Xe(function(i,a){return typeof i=="function"?new _e(this):this.map(function(d){return ka(d,i,a)})}),_e.prototype.reject=function(i){return this.filter(Fu(je(i)))},_e.prototype.slice=function(i,a){i=We(i);var d=this;return d.__filtered__&&(i>0||a<0)?new _e(d):(i<0?d=d.takeRight(-i):i&&(d=d.drop(i)),a!==n&&(a=We(a),d=a<0?d.dropRight(-a):d.take(a-i)),d)},_e.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},_e.prototype.toArray=function(){return this.take(_)},Tr(_e.prototype,function(i,a){var d=/^(?:filter|find|map|reject)|While$/.test(a),I=/^(?:head|last)$/.test(a),y=Q[I?"take"+(a=="last"?"Right":""):a],T=I||/^find/.test(a);y&&(Q.prototype[a]=function(){var D=this.__wrapped__,V=I?[1]:arguments,G=D instanceof _e,oe=V[0],ie=G||Ne(D),ae=function(Ze){var qe=y.apply(Q,yo([Ze],V));return I&&me?qe[0]:qe};ie&&d&&typeof oe=="function"&&oe.length!=1&&(G=ie=!1);var me=this.__chain__,Qe=!!this.__actions__.length,Me=T&&!me,Je=G&&!Qe;if(!T&&ie){D=Je?D:new _e(this);var Re=i.apply(D,V);return Re.__actions__.push({func:Mu,args:[ae],thisArg:n}),new er(Re,me)}return Me&&Je?i.apply(this,V):(Re=this.thru(ae),Me?I?Re.value()[0]:Re.value():Re)})}),qn(["pop","push","shift","sort","splice","unshift"],function(i){var a=iu[i],d=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",I=/^(?:pop|shift)$/.test(i);Q.prototype[i]=function(){var y=arguments;if(I&&!this.__chain__){var T=this.value();return a.apply(Ne(T)?T:[],y)}return this[d](function(D){return a.apply(Ne(D)?D:[],y)})}}),Tr(_e.prototype,function(i,a){var d=Q[a];if(d){var I=d.name+"";gt.call(ps,I)||(ps[I]=[]),ps[I].push({name:a,func:d})}}),ps[xu(n,j).name]=[{name:"wrapper",func:n}],_e.prototype.clone=jz,_e.prototype.reverse=Mz,_e.prototype.value=Rz,Q.prototype.at=cY,Q.prototype.chain=uY,Q.prototype.commit=AY,Q.prototype.next=dY,Q.prototype.plant=fY,Q.prototype.reverse=pY,Q.prototype.toJSON=Q.prototype.valueOf=Q.prototype.value=hY,Q.prototype.first=Q.prototype.head,Pa&&(Q.prototype[Pa]=gY),Q},ds=Az();oi?((oi.exports=ds)._=ds,Yf._=ds):en._=ds}).call(Hn)}(gl,gl.exports);var dt=gl.exports;const ge=$r(dt),eC=e=>function(){return e.apply(this,arguments)},wi=c.shape({id:c.string,title:c.string,type:c.oneOf(["group","item","collapse"]),icon:c.elementType,url:c.string,parent:c.shape(eC(()=>wi)),children:c.arrayOf(eC(()=>wi)),resource:c.bool}),tC={fontFamily:"'Inter', sans-serif",menuOrientation:"vertical",miniDrawer:!1,container:!1,mode:"light",presetColor:"theme4",themeDirection:"ltr",appDefaultPath:"/",drawerWidth:260,horizontalMaxItems:6,spacing:2},mA=w.createContext(tC),BT=e=>e==="vertical",vT=e=>e==="horizontal",fl=({initialConfig:e,children:t})=>{const[n,r]=PA("theme-config",{...tC,...e}),o=m=>r(B=>({...B,fontFamily:m})),s=m=>r(B=>({...B,menuOrientation:m})),l=m=>r(B=>({...B,miniDrawer:m})),u=m=>r(B=>({...B,container:m})),A=m=>r(B=>({...B,mode:m})),f=m=>r(B=>({...B,presetColor:m})),p=m=>r(B=>({...B,themeDirection:m})),C=m=>r(B=>({...B,appDefaultPath:m})),h=m=>r(B=>({...B,drawerWidth:m})),E=m=>r(B=>({...B,horizontalMaxItems:m}));return g.jsx(mA.Provider,{value:{...n,setFontFamily:o,setMenuOrientation:s,setMiniDrawer:l,setContainer:u,setMode:A,setPresetColor:f,setThemeDirection:p,setAppDefaultPath:C,setDrawerWidth:h,setHorizontalMaxItems:E,isVerticalLayout:BT,isHorizontalLayout:vT},children:t})};fl.propTypes={children:c.node};const nC={openItem:["dashboard"],openComponent:"buttons",selectedID:null,drawerOpen:!1,componentDrawerOpen:!0,menuDashboard:{},error:null},BA=w.createContext(nC),vA=({menu:e,children:t})=>{const[n,r]=PA("menu-config",{...nC}),o=C=>{r(h=>({...h,openItem:C}))},s=C=>{r(h=>({...h,selectedID:C}))},l=C=>{r(h=>({...h,openComponent:C}))},u=C=>{r(h=>({...h,drawerOpen:C}))},A=C=>{r(h=>({...h,componentDrawerOpen:C}))},f=C=>{r(h=>({...h,menuDashboard:C}))},p=C=>{r(h=>({...h,error:C}))};return g.jsx(BA.Provider,{value:{...n,groups:e,activeItem:o,activeComponent:l,openDrawer:u,openComponentDrawer:A,activeID:s,getMenuSuccess:f,hasError:p},children:t})};vA.propTypes={children:c.node,menu:c.arrayOf(wi)};const yA=w.createContext(void 0),bA=w.createContext(void 0),no=()=>w.useContext(BA),yT=["e-","entities/"],bT=e=>{let t=e;return yT.forEach(n=>{t=t!=null&&t.startsWith(n)?t==null?void 0:t.substring(n.length):t}),t},QT=(e,t)=>{var n,r;return((n=t.options)==null?void 0:n.group)===e.id||!((r=t.options)!=null&&r.group)&&e.id==="admin"},xT=(e,t)=>{const n=bT(e.name);return t==null?void 0:t.includes(`${n}:list`)},QA=(e,t)=>{let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const o=e[r];if(o.children&&(n=QA(o.children,t),n))return n}return n},rC=(e,t,n)=>{let r=e.find(o=>["group","collapse"].indexOf(o.type)!==-1&&QT(o,t));if(!r)for(let o=0;o<e.length;o++){const s=e[o];if(s.children&&(r=rC(s.children,t),r))return r}return r},oC=(e,t)=>{let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const o=e[r];if(o.children&&(n=oC(o.children,t),n))return n}return n},iC=e=>e?e.type==="item"?!0:(e.children&&(e.children=e.children.filter(iC)),e.children&&e.children.length>0):!1,sC=e=>(e.children&&e.children.forEach(t=>{t.parent=e,sC(t)}),e),wT=({userGroups:e,resources:t,permissions:n,translate:r,roles:o})=>{const s=C=>(C.title=r(C.title,{_:C.title}),C.children&&C.children.forEach(h=>s(h)),C),l=Object.keys(t),u=(C,h)=>(C.children&&(C.children=C.children.filter(E=>{if(E.resource===!1){const m=E.roles||[];return!!(m.length===0||m.some(B=>o.includes(B)))}return E.type==="item"?h.includes(E.id):(u(E,h),E.children&&E.children.length>0)})),C),A=dt.cloneDeep(e).map(C=>({type:"group",icon:et.AntDesignOutlined,children:[],...C})).map(s).map(C=>u(C,l)),f=Object.values(t).map(C=>{var h;return((h=C.options)==null?void 0:h.group)||"admin"}).filter((C,h,E)=>E.indexOf(C)===h).filter(C=>C!==void 0&&oC(e,C)===null).map(C=>({id:C,title:r(`ra.menu.group.${C}`),type:"group",icon:et.AntDesignOutlined,children:[]})),p=[...A,...f];return Object.values(t).forEach(C=>{var R,x,O,P;const h=rC(p,C),E=(R=h==null?void 0:h.children)==null?void 0:R.find(N=>N.id===C.name),m=(x=h==null?void 0:h.children)==null?void 0:x.some(N=>N.id===C.name),B=(E==null?void 0:E.roles)||((O=C.options)==null?void 0:O.roles)||[],v=!B||B.length===0||B.some(N=>o.includes(N));if(!xT(C,n)||!C.hasList||!v){m&&((P=h==null?void 0:h.children)==null?void 0:P.length)>0&&(h.children=h.children.filter(N=>N.id!==C.name));return}h&&(h.children||(h.children=[]))}),p.filter(iC).map(sC)},xA=()=>{const e=S.useResourceDefinitions(),{isLoading:t,data:n}=S.useGetIdentity(),r=n&&n.id>0,{isLoading:o,permissions:s}=S.usePermissions(r),{groups:l}=no(),u=S.useTranslate(),A=w.useMemo(()=>{if(t||!n||n===null||(n==null?void 0:n.id)<=0)return null;const p=((n==null?void 0:n.roles)||[]).map(h=>h.id);return wT({resources:e,permissions:s,translate:u,userGroups:l,roles:p})},[t,o,n,e,s,u,l]),f=w.useMemo(()=>t,[t]);return{menu:A,isLoading:f,getItem:p=>f?!1:QA(A,p),findInMenu:f?()=>{}:QA}},aC=()=>{const e=S.useTranslate(),{isLoading:t,menu:n,findInMenu:r}=xA(),{pathname:o}=mt.useLocation();return w.useMemo(()=>{var C;const s=o.split("/").filter(h=>h);let l=dt.cloneDeep(n),u=o,A=r(l,o);if(A||(A=r(l,s[s.length-1]),u=A?A.id:u),!A)for(let h=s.length;h>=0;h--){let E=s.slice(0,h).join("/");if(A=r(l,E),A){u=A.id;break}}const f=(C=A==null?void 0:A.url)==null?void 0:C.split("/");if(s.length>=(f==null?void 0:f.length)){const h=s[s.length-1];if(A){const E=h==="create"||o===A.url?"create":"edit",m=`resources.${u}.breadcrumbs.${E}`,B={id:`${u}-${E}`,type:"item",title:e(m,{_:e(m,{_:m})}),url:o,breadcrumbs:!0,parent:A};A.type="collapse",A.breadcrumbs=!0,A.children=A.children||[],A.children.push(B),A=B}}let p=[];if(A){let h={...A,last:!0};for(;h;)p.push(h),h=h.parent;p=p.reverse()}return{isLoading:t,navigation:{items:l},breadcrumbs:p}},[t,o,n,r,e])};var lC={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Hn,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",l="second",u="minute",A="hour",f="day",p="week",C="month",h="quarter",E="year",m="date",B="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,j=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,R={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var J=["th","st","nd","rd"],H=q%100;return"["+q+(J[(H-20)%10]||J[H]||J[0])+"]"}},x=function(q,J,H){var K=String(q);return!K||K.length>=J?q:""+Array(J+1-K.length).join(H)+q},O={s:x,z:function(q){var J=-q.utcOffset(),H=Math.abs(J),K=Math.floor(H/60),L=H%60;return(J<=0?"+":"-")+x(K,2,"0")+":"+x(L,2,"0")},m:function q(J,H){if(J.date()<H.date())return-q(H,J);var K=12*(H.year()-J.year())+(H.month()-J.month()),L=J.clone().add(K,C),ee=H-L<0,z=J.clone().add(K+(ee?-1:1),C);return+(-(K+(H-L)/(ee?L-z:z-L))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:C,y:E,w:p,d:f,D:m,h:A,m:u,s:l,ms:s,Q:h}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},P="en",N={};N[P]=R;var F="$isDayjsObject",X=function(q){return q instanceof ce||!(!q||!q[F])},Z=function q(J,H,K){var L;if(!J)return P;if(typeof J=="string"){var ee=J.toLowerCase();N[ee]&&(L=ee),H&&(N[ee]=H,L=ee);var z=J.split("-");if(!L&&z.length>1)return q(z[0])}else{var _=J.name;N[_]=J,L=_}return!K&&L&&(P=L),L||!K&&P},Y=function(q,J){if(X(q))return q.clone();var H=typeof J=="object"?J:{};return H.date=q,H.args=arguments,new ce(H)},$=O;$.l=Z,$.i=X,$.w=function(q,J){return Y(q,{locale:J.$L,utc:J.$u,x:J.$x,$offset:J.$offset})};var ce=function(){function q(H){this.$L=Z(H.locale,null,!0),this.parse(H),this.$x=this.$x||H.x||{},this[F]=!0}var J=q.prototype;return J.parse=function(H){this.$d=function(K){var L=K.date,ee=K.utc;if(L===null)return new Date(NaN);if($.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var z=L.match(v);if(z){var _=z[2]-1||0,fe=(z[7]||"0").substring(0,3);return ee?new Date(Date.UTC(z[1],_,z[3]||1,z[4]||0,z[5]||0,z[6]||0,fe)):new Date(z[1],_,z[3]||1,z[4]||0,z[5]||0,z[6]||0,fe)}}return new Date(L)}(H),this.init()},J.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds()},J.$utils=function(){return $},J.isValid=function(){return this.$d.toString()!==B},J.isSame=function(H,K){var L=Y(H);return this.startOf(K)<=L&&L<=this.endOf(K)},J.isAfter=function(H,K){return Y(H)<this.startOf(K)},J.isBefore=function(H,K){return this.endOf(K)<Y(H)},J.$g=function(H,K,L){return $.u(H)?this[K]:this.set(L,H)},J.unix=function(){return Math.floor(this.valueOf()/1e3)},J.valueOf=function(){return this.$d.getTime()},J.startOf=function(H,K){var L=this,ee=!!$.u(K)||K,z=$.p(H),_=function(Ee,Be){var xe=$.w(L.$u?Date.UTC(L.$y,Be,Ee):new Date(L.$y,Be,Ee),L);return ee?xe:xe.endOf(f)},fe=function(Ee,Be){return $.w(L.toDate()[Ee].apply(L.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(Be)),L)},he=this.$W,ue=this.$M,pe=this.$D,Ce="set"+(this.$u?"UTC":"");switch(z){case E:return ee?_(1,0):_(31,11);case C:return ee?_(1,ue):_(0,ue+1);case p:var ve=this.$locale().weekStart||0,Ie=(he<ve?he+7:he)-ve;return _(ee?pe-Ie:pe+(6-Ie),ue);case f:case m:return fe(Ce+"Hours",0);case A:return fe(Ce+"Minutes",1);case u:return fe(Ce+"Seconds",2);case l:return fe(Ce+"Milliseconds",3);default:return this.clone()}},J.endOf=function(H){return this.startOf(H,!1)},J.$set=function(H,K){var L,ee=$.p(H),z="set"+(this.$u?"UTC":""),_=(L={},L[f]=z+"Date",L[m]=z+"Date",L[C]=z+"Month",L[E]=z+"FullYear",L[A]=z+"Hours",L[u]=z+"Minutes",L[l]=z+"Seconds",L[s]=z+"Milliseconds",L)[ee],fe=ee===f?this.$D+(K-this.$W):K;if(ee===C||ee===E){var he=this.clone().set(m,1);he.$d[_](fe),he.init(),this.$d=he.set(m,Math.min(this.$D,he.daysInMonth())).$d}else _&&this.$d[_](fe);return this.init(),this},J.set=function(H,K){return this.clone().$set(H,K)},J.get=function(H){return this[$.p(H)]()},J.add=function(H,K){var L,ee=this;H=Number(H);var z=$.p(K),_=function(ue){var pe=Y(ee);return $.w(pe.date(pe.date()+Math.round(ue*H)),ee)};if(z===C)return this.set(C,this.$M+H);if(z===E)return this.set(E,this.$y+H);if(z===f)return _(1);if(z===p)return _(7);var fe=(L={},L[u]=r,L[A]=o,L[l]=n,L)[z]||1,he=this.$d.getTime()+H*fe;return $.w(he,this)},J.subtract=function(H,K){return this.add(-1*H,K)},J.format=function(H){var K=this,L=this.$locale();if(!this.isValid())return L.invalidDate||B;var ee=H||"YYYY-MM-DDTHH:mm:ssZ",z=$.z(this),_=this.$H,fe=this.$m,he=this.$M,ue=L.weekdays,pe=L.months,Ce=L.meridiem,ve=function(Be,xe,le,Ve){return Be&&(Be[xe]||Be(K,ee))||le[xe].slice(0,Ve)},Ie=function(Be){return $.s(_%12||12,Be,"0")},Ee=Ce||function(Be,xe,le){var Ve=Be<12?"AM":"PM";return le?Ve.toLowerCase():Ve};return ee.replace(j,function(Be,xe){return xe||function(le){switch(le){case"YY":return String(K.$y).slice(-2);case"YYYY":return $.s(K.$y,4,"0");case"M":return he+1;case"MM":return $.s(he+1,2,"0");case"MMM":return ve(L.monthsShort,he,pe,3);case"MMMM":return ve(pe,he);case"D":return K.$D;case"DD":return $.s(K.$D,2,"0");case"d":return String(K.$W);case"dd":return ve(L.weekdaysMin,K.$W,ue,2);case"ddd":return ve(L.weekdaysShort,K.$W,ue,3);case"dddd":return ue[K.$W];case"H":return String(_);case"HH":return $.s(_,2,"0");case"h":return Ie(1);case"hh":return Ie(2);case"a":return Ee(_,fe,!0);case"A":return Ee(_,fe,!1);case"m":return String(fe);case"mm":return $.s(fe,2,"0");case"s":return String(K.$s);case"ss":return $.s(K.$s,2,"0");case"SSS":return $.s(K.$ms,3,"0");case"Z":return z}return null}(Be)||z.replace(":","")})},J.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},J.diff=function(H,K,L){var ee,z=this,_=$.p(K),fe=Y(H),he=(fe.utcOffset()-this.utcOffset())*r,ue=this-fe,pe=function(){return $.m(z,fe)};switch(_){case E:ee=pe()/12;break;case C:ee=pe();break;case h:ee=pe()/3;break;case p:ee=(ue-he)/6048e5;break;case f:ee=(ue-he)/864e5;break;case A:ee=ue/o;break;case u:ee=ue/r;break;case l:ee=ue/n;break;default:ee=ue}return L?ee:$.a(ee)},J.daysInMonth=function(){return this.endOf(C).$D},J.$locale=function(){return N[this.$L]},J.locale=function(H,K){if(!H)return this.$L;var L=this.clone(),ee=Z(H,K,!0);return ee&&(L.$L=ee),L},J.clone=function(){return $.w(this.$d,this)},J.toDate=function(){return new Date(this.valueOf())},J.toJSON=function(){return this.isValid()?this.toISOString():null},J.toISOString=function(){return this.$d.toISOString()},J.toString=function(){return this.$d.toUTCString()},q}(),se=ce.prototype;return Y.prototype=se,[["$ms",s],["$s",l],["$m",u],["$H",A],["$W",f],["$M",C],["$y",E],["$D",m]].forEach(function(q){se[q[1]]=function(J){return this.$g(J,q[0],q[1])}}),Y.extend=function(q,J){return q.$i||(q(J,ce,Y),q.$i=!0),Y},Y.locale=Z,Y.isDayjs=X,Y.unix=function(q){return Y(1e3*q)},Y.en=N[P],Y.Ls=N,Y.p={},Y})})(lC);var TT=lC.exports;const Mr=$r(TT),cC=e=>{const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return Mr().hour(n).minute(r)};function PT(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}function wA(e={},t=[],n={}){const{isEmpty:r=ge.isEmpty}=n;return!ge.some(t,o=>r((e??{})[o.locale]))}function TA(e,t,n){if(!ge.isPlainObject(e)||t===void 0)return;const r=ge.isPlainObject(n)?n:{},o=!!((r==null?void 0:r.fallback)??!0);let s=e[String(t)];if(s===void 0&&o){const l=ge.isArray(r.fallbackLocales)&&!ge.isEmpty(r.fallbackLocales)?r.fallbackLocales:["en"];s=ge.chain(l).map(u=>e[String(u)]).reject(ge.isUndefined).first().value(),s===void 0&&(s=ge.chain(e).values().first().value())}return s}function uC(e){const[t]=de.useLocaleState();return e!==void 0?String(e):t}function ST(e,t){const n=uC(t==null?void 0:t.locale);return TA(e,n,t)}function OT(e){const t=uC(e==null?void 0:e.locale);return w.useCallback(r=>TA(r,t,e),[t,e])}function PA(e,t){const[n,r]=w.useState(()=>{const s=typeof window<"u"?localStorage.getItem(e):null;return s===null?t:JSON.parse(s)});return w.useEffect(()=>{const s=l=>{typeof window<"u"&&l.storageArea===localStorage&&l.key===e&&r(l.newValue?JSON.parse(l.newValue):l.newValue)};return window.addEventListener("storage",s),()=>{window.removeEventListener("storage",s)}},[e,t]),[n,s=>{r(l=>{const u=typeof s=="function"?s(l):s;return typeof window<"u"&&localStorage.setItem(e,JSON.stringify(u)),u})}]}function AC(e){if(!ge.isPlainObject(e))throw new Error("[useMemoizedObject]: param must be a plain JS object");const[t,n]=w.useState(e);return w.useEffect(()=>{ge.isEqual(e,t)||n(e)},[e,t]),t}function pl(){const[e,t]=w.useState(null),n=!!e,r=w.useCallback(l=>t((l==null?void 0:l.currentTarget)??null),[t]),o=w.useCallback(()=>t(null),[t]),s=w.useCallback(l=>{n?o():r(l)},[n,r,o]);return{anchorEl:e,open:n,handleClick:r,handleClose:o,handleToggle:s}}function jT(e,t){const[n,r]=w.useState({width:1,height:1}),o=e.current;return w.useEffect(()=>{function s(){var f;let u=0,A=0;switch(t){case"client":u=(o==null?void 0:o.clientWidth)??0,A=(o==null?void 0:o.clientHeight)??0;break;case"offset":u=(o==null?void 0:o.offsetWidth)??0,A=(o==null?void 0:o.offsetHeight)??0;break;case"scroll":u=(o==null?void 0:o.scrollWidth)??0,A=(o==null?void 0:o.scrollHeight)??0;break;case"bounding":default:{const p=((f=e.current)==null?void 0:f.getBoundingClientRect())??{width:0,height:0};u=p.width,A=p.height;break}}r({width:u,height:A})}const l=new ResizeObserver(s);return ge.isEmpty(e==null?void 0:e.current)||(l.observe(e==null?void 0:e.current),s()),()=>{l.disconnect()}},[o,t]),n}const SA=e=>{const t=S.useRecordContext(),n=S.useTranslate(),r=S.useResourceContext(),o=t!=null&&t.id?"edit":"create";return w.useMemo(()=>{if(e===!1)return;const l=`resources.${r}.title`;return e||n(`resources.${r}.title.${o}`,{_:n(l,{_:l}),...t})},[o,t,r,n,e])};function Ir(e,t,n){const r=ge.chain((e==null?void 0:e.sx)??{}).cloneDeepWith(l=>ge.isFunction(l)?l:void 0).value();n!=null&&n.defaults?ge.defaultsDeep(r,t):ge.merge(r,t);const[o,s]=w.useState(r);return w.useEffect(()=>{ge.isEqual(o,r)||s(r)},[o,r]),o}const dC=()=>w.useContext(yA),MT=()=>w.useContext(bA),wn=()=>w.useContext(mA),gC=Ae(mT,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=wn();return{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),...!t&&{width:`calc(100% - ${e.spacing(7.5)})`},...t&&{marginLeft:n,width:`calc(100% - ${n}px)`,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})}}});gC.propTypes={open:c.bool};const RT=w.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary"},{defaults:!0});return g.jsx(b.Button,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),fC=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),hl=w.createContext({}),OA=w.createContext(null),Cl=typeof document<"u",DT=Cl?w.useLayoutEffect:w.useEffect,pC=w.createContext({strict:!1});function kT(e,t,n,r){const{visualElement:o}=w.useContext(hl),s=w.useContext(pC),l=w.useContext(OA),u=w.useContext(fC).reducedMotion,A=w.useRef();r=r||s.renderer,!A.current&&r&&(A.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const f=A.current;w.useInsertionEffect(()=>{f&&f.update(n,l)});const p=w.useRef(!!window.HandoffAppearAnimations);return DT(()=>{f&&(f.render(),p.current&&f.animationState&&f.animationState.animateChanges())}),w.useEffect(()=>{f&&(f.updateFeatures(),!p.current&&f.animationState&&f.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,p.current=!1)}),f}function Ti(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function FT(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Ti(n)&&(n.current=r))},[t])}function Os(e){return typeof e=="string"||Array.isArray(e)}function El(e){return typeof e=="object"&&typeof e.start=="function"}const jA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],MA=["initial",...jA];function Il(e){return El(e.animate)||MA.some(t=>Os(e[t]))}function hC(e){return!!(Il(e)||e.variants)}function LT(e,t){if(Il(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Os(n)?n:void 0,animate:Os(r)?r:void 0}}return e.inherit!==!1?t:{}}function NT(e){const{initial:t,animate:n}=LT(e,w.useContext(hl));return w.useMemo(()=>({initial:t,animate:n}),[CC(t),CC(n)])}function CC(e){return Array.isArray(e)?e.join(" "):e}const EC={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"]},js={};for(const e in EC)js[e]={isEnabled:t=>EC[e].some(n=>!!t[n])};function VT(e){for(const t in e)js[t]={...js[t],...e[t]}}const IC=w.createContext({}),mC=w.createContext({}),HT=Symbol.for("motionComponentSymbol");function zT({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&VT(e);function s(u,A){let f;const p={...w.useContext(fC),...u,layoutId:WT(u)},{isStatic:C}=p,h=NT(u),E=r(u,C);if(!C&&Cl){h.visualElement=kT(o,E,p,t);const m=w.useContext(mC),B=w.useContext(pC).strict;h.visualElement&&(f=h.visualElement.loadFeatures(p,B,e,m))}return k.createElement(hl.Provider,{value:h},f&&h.visualElement?k.createElement(f,{visualElement:h.visualElement,...p}):null,n(o,u,FT(E,h.visualElement,A),E,C,h.visualElement))}const l=w.forwardRef(s);return l[HT]=o,l}function WT({layoutId:e}){const t=w.useContext(IC).id;return t&&e!==void 0?t+"-"+e:e}function UT(e){function t(r,o={}){return zT(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const YT=["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 RA(e){return typeof e!="string"||e.includes("-")?!1:!!(YT.indexOf(e)>-1||/[A-Z]/.test(e))}const ml={};function GT(e){Object.assign(ml,e)}const Ms=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ko=new Set(Ms);function BC(e,{layout:t,layoutId:n}){return ko.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ml[e]||e==="opacity")}const pn=e=>!!(e&&e.getVelocity),KT={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},JT=Ms.length;function XT(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let s="";for(let l=0;l<JT;l++){const u=Ms[l];if(e[u]!==void 0){const A=KT[u]||u;s+=`${A}(${e[u]}) `}}return t&&!e.z&&(s+="translateZ(0)"),s=s.trim(),o?s=o(e,r?"":s):n&&r&&(s="none"),s}const vC=e=>t=>typeof t=="string"&&t.startsWith(e),yC=vC("--"),DA=vC("var(--"),ZT=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,_T=(e,t)=>t&&typeof e=="number"?t.transform(e):e,ro=(e,t,n)=>Math.min(Math.max(n,e),t),Fo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Rs={...Fo,transform:e=>ro(0,1,e)},Bl={...Fo,default:1},Ds=e=>Math.round(e*1e5)/1e5,vl=/(-)?([\d]*\.?[\d])+/g,bC=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,qT=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ks(e){return typeof e=="string"}const Fs=e=>({test:t=>ks(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),oo=Fs("deg"),mr=Fs("%"),De=Fs("px"),$T=Fs("vh"),eP=Fs("vw"),QC={...mr,parse:e=>mr.parse(e)/100,transform:e=>mr.transform(e*100)},xC={...Fo,transform:Math.round},wC={borderWidth:De,borderTopWidth:De,borderRightWidth:De,borderBottomWidth:De,borderLeftWidth:De,borderRadius:De,radius:De,borderTopLeftRadius:De,borderTopRightRadius:De,borderBottomRightRadius:De,borderBottomLeftRadius:De,width:De,maxWidth:De,height:De,maxHeight:De,size:De,top:De,right:De,bottom:De,left:De,padding:De,paddingTop:De,paddingRight:De,paddingBottom:De,paddingLeft:De,margin:De,marginTop:De,marginRight:De,marginBottom:De,marginLeft:De,rotate:oo,rotateX:oo,rotateY:oo,rotateZ:oo,scale:Bl,scaleX:Bl,scaleY:Bl,scaleZ:Bl,skew:oo,skewX:oo,skewY:oo,distance:De,translateX:De,translateY:De,translateZ:De,x:De,y:De,z:De,perspective:De,transformPerspective:De,opacity:Rs,originX:QC,originY:QC,originZ:De,zIndex:xC,fillOpacity:Rs,strokeOpacity:Rs,numOctaves:xC};function kA(e,t,n,r){const{style:o,vars:s,transform:l,transformOrigin:u}=e;let A=!1,f=!1,p=!0;for(const C in t){const h=t[C];if(yC(C)){s[C]=h;continue}const E=wC[C],m=_T(h,E);if(ko.has(C)){if(A=!0,l[C]=m,!p)continue;h!==(E.default||0)&&(p=!1)}else C.startsWith("origin")?(f=!0,u[C]=m):o[C]=m}if(t.transform||(A||r?o.transform=XT(e.transform,n,p,r):o.transform&&(o.transform="none")),f){const{originX:C="50%",originY:h="50%",originZ:E=0}=u;o.transformOrigin=`${C} ${h} ${E}`}}const FA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function TC(e,t,n){for(const r in t)!pn(t[r])&&!BC(r,n)&&(e[r]=t[r])}function tP({transformTemplate:e},t,n){return w.useMemo(()=>{const r=FA();return kA(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function nP(e,t,n){const r=e.style||{},o={};return TC(o,r,e),Object.assign(o,tP(e,t,n)),e.transformValues?e.transformValues(o):o}function rP(e,t,n){const r={},o=nP(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const oP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function yl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||oP.has(e)}let PC=e=>!yl(e);function iP(e){e&&(PC=t=>t.startsWith("on")?!yl(t):e(t))}try{iP(require("@emotion/is-prop-valid").default)}catch{}function sP(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(PC(o)||n===!0&&yl(o)||!t&&!yl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function SC(e,t,n){return typeof e=="string"?e:De.transform(t+n*e)}function aP(e,t,n){const r=SC(t,e.x,e.width),o=SC(n,e.y,e.height);return`${r} ${o}`}const lP={offset:"stroke-dashoffset",array:"stroke-dasharray"},cP={offset:"strokeDashoffset",array:"strokeDasharray"};function uP(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?lP:cP;e[s.offset]=De.transform(-r);const l=De.transform(t),u=De.transform(n);e[s.array]=`${l} ${u}`}function LA(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:l,pathSpacing:u=1,pathOffset:A=0,...f},p,C,h){if(kA(e,f,p,h),C){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:E,style:m,dimensions:B}=e;E.transform&&(B&&(m.transform=E.transform),delete E.transform),B&&(o!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=aP(B,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(E.x=t),n!==void 0&&(E.y=n),r!==void 0&&(E.scale=r),l!==void 0&&uP(E,l,u,A,!1)}const OC=()=>({...FA(),attrs:{}}),NA=e=>typeof e=="string"&&e.toLowerCase()==="svg";function AP(e,t,n,r){const o=w.useMemo(()=>{const s=OC();return LA(s,t,{enableHardwareAcceleration:!1},NA(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};TC(s,e.style,e),o.style={...s,...o.style}}return o}function dP(e=!1){return(n,r,o,{latestValues:s},l)=>{const A=(RA(n)?AP:rP)(r,s,l,n),p={...sP(r,typeof n=="string",e),...A,ref:o},{children:C}=r,h=w.useMemo(()=>pn(C)?C.get():C,[C]);return w.createElement(n,{...p,children:h})}}const VA=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function jC(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const MC=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function RC(e,t,n,r){jC(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(MC.has(o)?o:VA(o),t.attrs[o])}function HA(e,t){const{style:n}=e,r={};for(const o in n)(pn(n[o])||t.style&&pn(t.style[o])||BC(o,e))&&(r[o]=n[o]);return r}function DC(e,t){const n=HA(e,t);for(const r in e)if(pn(e[r])||pn(t[r])){const o=Ms.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}function zA(e,t,n,r={},o={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),t}function gP(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const bl=e=>Array.isArray(e),fP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),pP=e=>bl(e)?e[e.length-1]||0:e;function Ql(e){const t=pn(e)?e.get():e;return fP(t)?t.toValue():t}function hP({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,s){const l={latestValues:CP(r,o,s,e),renderState:t()};return n&&(l.mount=u=>n(r,u,l)),l}const kC=e=>(t,n)=>{const r=w.useContext(hl),o=w.useContext(OA),s=()=>hP(e,t,r,o);return n?s():gP(s)};function CP(e,t,n,r){const o={},s=r(e,{});for(const h in s)o[h]=Ql(s[h]);let{initial:l,animate:u}=e;const A=Il(e),f=hC(e);t&&f&&!A&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let p=n?n.initial===!1:!1;p=p||l===!1;const C=p?u:l;return C&&typeof C!="boolean"&&!El(C)&&(Array.isArray(C)?C:[C]).forEach(E=>{const m=zA(e,E);if(!m)return;const{transitionEnd:B,transition:v,...j}=m;for(const R in j){let x=j[R];if(Array.isArray(x)){const O=p?x.length-1:0;x=x[O]}x!==null&&(o[R]=x)}for(const R in B)o[R]=B[R]}),o}const Dt=e=>e;class FC{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function EP(e){let t=new FC,n=new FC,r=0,o=!1,s=!1;const l=new WeakSet,u={schedule:(A,f=!1,p=!1)=>{const C=p&&o,h=C?t:n;return f&&l.add(A),h.add(A)&&C&&o&&(r=t.order.length),A},cancel:A=>{n.remove(A),l.delete(A)},process:A=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let f=0;f<r;f++){const p=t.order[f];p(A),l.has(p)&&(u.schedule(p),e())}o=!1,s&&(s=!1,u.process(A))}};return u}const xl=["prepare","read","update","preRender","render","postRender"],IP=40;function mP(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=xl.reduce((C,h)=>(C[h]=EP(()=>n=!0),C),{}),l=C=>s[C].process(o),u=()=>{const C=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(C-o.timestamp,IP),1),o.timestamp=C,o.isProcessing=!0,xl.forEach(l),o.isProcessing=!1,n&&t&&(r=!1,e(u))},A=()=>{n=!0,r=!0,o.isProcessing||e(u)};return{schedule:xl.reduce((C,h)=>{const E=s[h];return C[h]=(m,B=!1,v=!1)=>(n||A(),E.schedule(m,B,v)),C},{}),cancel:C=>xl.forEach(h=>s[h].cancel(C)),state:o,steps:s}}const{schedule:Bt,cancel:Rr,state:Zt,steps:WA}=mP(typeof requestAnimationFrame<"u"?requestAnimationFrame:Dt,!0),BP={useVisualState:kC({scrapeMotionValuesFromProps:DC,createRenderState:OC,onMount:(e,t,{renderState:n,latestValues:r})=>{Bt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Bt.render(()=>{LA(n,r,{enableHardwareAcceleration:!1},NA(t.tagName),e.transformTemplate),RC(t,n)})}})},vP={useVisualState:kC({scrapeMotionValuesFromProps:HA,createRenderState:FA})};function yP(e,{forwardMotionProps:t=!1},n,r){return{...RA(e)?BP:vP,preloadedFeatures:n,useRender:dP(t),createVisualElement:r,Component:e}}function Dr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const LC=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function wl(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const bP=e=>t=>LC(t)&&e(t,wl(t));function kr(e,t,n,r){return Dr(e,t,bP(n),r)}const QP=(e,t)=>n=>t(e(n)),io=(...e)=>e.reduce(QP);function NC(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const VC=NC("dragHorizontal"),HC=NC("dragVertical");function zC(e){let t=!1;if(e==="y")t=HC();else if(e==="x")t=VC();else{const n=VC(),r=HC();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function WC(){const e=zC(!0);return e?(e(),!1):!0}class so{constructor(t){this.isMounted=!1,this.node=t}update(){}}function UC(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),o=(s,l)=>{if(s.type==="touch"||WC())return;const u=e.getProps();e.animationState&&u.whileHover&&e.animationState.setActive("whileHover",t),u[r]&&Bt.update(()=>u[r](s,l))};return kr(e.current,n,o,{passive:!e.getProps()[r]})}class xP extends so{mount(){this.unmount=io(UC(this.node,!0),UC(this.node,!1))}unmount(){}}class wP extends so{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=io(Dr(this.node.current,"focus",()=>this.onFocus()),Dr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const YC=(e,t)=>t?e===t?!0:YC(e,t.parentElement):!1;function UA(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,wl(n))}class TP extends so{constructor(){super(...arguments),this.removeStartListeners=Dt,this.removeEndListeners=Dt,this.removeAccessibleListeners=Dt,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),s=kr(window,"pointerup",(u,A)=>{if(!this.checkPressEnd())return;const{onTap:f,onTapCancel:p}=this.node.getProps();Bt.update(()=>{YC(this.node.current,u.target)?f&&f(u,A):p&&p(u,A)})},{passive:!(r.onTap||r.onPointerUp)}),l=kr(window,"pointercancel",(u,A)=>this.cancelPress(u,A),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=io(s,l),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const l=u=>{u.key!=="Enter"||!this.checkPressEnd()||UA("up",(A,f)=>{const{onTap:p}=this.node.getProps();p&&Bt.update(()=>p(A,f))})};this.removeEndListeners(),this.removeEndListeners=Dr(this.node.current,"keyup",l),UA("down",(u,A)=>{this.startPress(u,A)})},n=Dr(this.node.current,"keydown",t),r=()=>{this.isPressing&&UA("cancel",(s,l)=>this.cancelPress(s,l))},o=Dr(this.node.current,"blur",r);this.removeAccessibleListeners=io(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Bt.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!WC()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Bt.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=kr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Dr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=io(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const YA=new WeakMap,GA=new WeakMap,PP=e=>{const t=YA.get(e.target);t&&t(e)},SP=e=>{e.forEach(PP)};function OP({root:e,...t}){const n=e||document;GA.has(n)||GA.set(n,{});const r=GA.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(SP,{root:e,...t})),r[o]}function jP(e,t,n){const r=OP(t);return YA.set(e,n),r.observe(e),()=>{YA.delete(e),r.unobserve(e)}}const MP={some:0,all:1};class RP extends so{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,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:MP[o]},u=A=>{const{isIntersecting:f}=A;if(this.isInView===f||(this.isInView=f,s&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:p,onViewportLeave:C}=this.node.getProps(),h=f?p:C;h&&h(A)};return jP(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(DP(t,n))&&this.startObserver()}unmount(){}}function DP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const kP={inView:{Feature:RP},tap:{Feature:TP},focus:{Feature:wP},hover:{Feature:xP}};function GC(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}function FP(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function LP(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Tl(e,t,n){const r=e.getProps();return zA(r,t,n!==void 0?n:r.custom,FP(e),LP(e))}const NP="data-"+VA("framerAppearId");let Ls=Dt,Br=Dt;process.env.NODE_ENV!=="production"&&(Ls=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Br=(e,t)=>{if(!e)throw new Error(t)});const ao=e=>e*1e3,Fr=e=>e/1e3,VP={current:!1},KC=e=>Array.isArray(e)&&typeof e[0]=="number";function JC(e){return!!(!e||typeof e=="string"&&XC[e]||KC(e)||Array.isArray(e)&&e.every(JC))}const Ns=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,XC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ns([0,.65,.55,1]),circOut:Ns([.55,0,1,.45]),backIn:Ns([.31,.01,.66,-.59]),backOut:Ns([.33,1.53,.69,.99])};function ZC(e){if(e)return KC(e)?Ns(e):Array.isArray(e)?e.map(ZC):XC[e]}function HP(e,t,n,{delay:r=0,duration:o,repeat:s=0,repeatType:l="loop",ease:u,times:A}={}){const f={[t]:n};A&&(f.offset=A);const p=ZC(u);return Array.isArray(p)&&(f.easing=p),e.animate(f,{delay:r,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:s+1,direction:l==="reverse"?"alternate":"normal"})}function zP(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const _C=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,WP=1e-7,UP=12;function YP(e,t,n,r,o){let s,l,u=0;do l=t+(n-t)/2,s=_C(l,r,o)-e,s>0?n=l:t=l;while(Math.abs(s)>WP&&++u<UP);return l}function Vs(e,t,n,r){if(e===t&&n===r)return Dt;const o=s=>YP(s,0,1,e,n);return s=>s===0||s===1?s:_C(o(s),t,r)}const GP=Vs(.42,0,1,1),KP=Vs(0,0,.58,1),qC=Vs(.42,0,.58,1),JP=e=>Array.isArray(e)&&typeof e[0]!="number",$C=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,eE=e=>t=>1-e(1-t),tE=e=>1-Math.sin(Math.acos(e)),KA=eE(tE),XP=$C(KA),nE=Vs(.33,1.53,.69,.99),JA=eE(nE),ZP=$C(JA),rE={linear:Dt,easeIn:GP,easeInOut:qC,easeOut:KP,circIn:tE,circInOut:XP,circOut:KA,backIn:JA,backInOut:ZP,backOut:nE,anticipate:e=>(e*=2)<1?.5*JA(e):.5*(2-Math.pow(2,-10*(e-1)))},oE=e=>{if(Array.isArray(e)){Br(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Vs(t,n,r,o)}else if(typeof e=="string")return Br(rE[e]!==void 0,`Invalid easing type '${e}'`),rE[e];return e},XA=(e,t)=>n=>!!(ks(n)&&qT.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),iE=(e,t,n)=>r=>{if(!ks(r))return r;const[o,s,l,u]=r.match(vl);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},_P=e=>ro(0,255,e),ZA={...Fo,transform:e=>Math.round(_P(e))},Lo={test:XA("rgb","red"),parse:iE("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ZA.transform(e)+", "+ZA.transform(t)+", "+ZA.transform(n)+", "+Ds(Rs.transform(r))+")"};function qP(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 _A={test:XA("#"),parse:qP,transform:Lo.transform},Pi={test:XA("hsl","hue"),parse:iE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+mr.transform(Ds(t))+", "+mr.transform(Ds(n))+", "+Ds(Rs.transform(r))+")"},un={test:e=>Lo.test(e)||_A.test(e)||Pi.test(e),parse:e=>Lo.test(e)?Lo.parse(e):Pi.test(e)?Pi.parse(e):_A.parse(e),transform:e=>ks(e)?e:e.hasOwnProperty("red")?Lo.transform(e):Pi.transform(e)},St=(e,t,n)=>-n*e+n*t+e;function qA(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 $P({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,l=0;if(!t)o=s=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,A=2*n-u;o=qA(A,u,e+1/3),s=qA(A,u,e),l=qA(A,u,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(l*255),alpha:r}}const $A=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},eS=[_A,Lo,Pi],tS=e=>eS.find(t=>t.test(e));function sE(e){const t=tS(e);Br(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Pi&&(n=$P(n)),n}const aE=(e,t)=>{const n=sE(e),r=sE(t),o={...n};return s=>(o.red=$A(n.red,r.red,s),o.green=$A(n.green,r.green,s),o.blue=$A(n.blue,r.blue,s),o.alpha=St(n.alpha,r.alpha,s),Lo.transform(o))};function nS(e){var t,n;return isNaN(e)&&ks(e)&&(((t=e.match(vl))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(bC))===null||n===void 0?void 0:n.length)||0)>0}const lE={regex:ZT,countKey:"Vars",token:"${v}",parse:Dt},cE={regex:bC,countKey:"Colors",token:"${c}",parse:un.parse},uE={regex:vl,countKey:"Numbers",token:"${n}",parse:Fo.parse};function ed(e,{regex:t,countKey:n,token:r,parse:o}){const s=e.tokenised.match(t);s&&(e["num"+n]=s.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...s.map(o)))}function Pl(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&ed(n,lE),ed(n,cE),ed(n,uE),n}function AE(e){return Pl(e).values}function dE(e){const{values:t,numColors:n,numVars:r,tokenised:o}=Pl(e),s=t.length;return l=>{let u=o;for(let A=0;A<s;A++)A<r?u=u.replace(lE.token,l[A]):A<r+n?u=u.replace(cE.token,un.transform(l[A])):u=u.replace(uE.token,Ds(l[A]));return u}}const rS=e=>typeof e=="number"?0:e;function oS(e){const t=AE(e);return dE(e)(t.map(rS))}const lo={test:nS,parse:AE,createTransformer:dE,getAnimatableNone:oS},gE=(e,t)=>n=>`${n>0?t:e}`;function fE(e,t){return typeof e=="number"?n=>St(e,t,n):un.test(e)?aE(e,t):e.startsWith("var(")?gE(e,t):hE(e,t)}const pE=(e,t)=>{const n=[...e],r=n.length,o=e.map((s,l)=>fE(s,t[l]));return s=>{for(let l=0;l<r;l++)n[l]=o[l](s);return n}},iS=(e,t)=>{const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=fE(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}},hE=(e,t)=>{const n=lo.createTransformer(t),r=Pl(e),o=Pl(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?io(pE(r.values,o.values),n):(Ls(!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.`),gE(e,t))},Hs=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},CE=(e,t)=>n=>St(e,t,n);function sS(e){return typeof e=="number"?CE:typeof e=="string"?un.test(e)?aE:hE:Array.isArray(e)?pE:typeof e=="object"?iS:CE}function aS(e,t,n){const r=[],o=n||sS(e[0]),s=e.length-1;for(let l=0;l<s;l++){let u=o(e[l],e[l+1]);if(t){const A=Array.isArray(t)?t[l]||Dt:t;u=io(A,u)}r.push(u)}return r}function EE(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Br(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=aS(t,r,o),u=l.length,A=f=>{let p=0;if(u>1)for(;p<e.length-2&&!(f<e[p+1]);p++);const C=Hs(e[p],e[p+1],f);return l[p](C)};return n?f=>A(ro(e[0],e[s-1],f)):A}function lS(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Hs(0,t,r);e.push(St(n,1,o))}}function cS(e){const t=[0];return lS(t,e.length-1),t}function uS(e,t){return e.map(n=>n*t)}function AS(e,t){return e.map(()=>t||qC).splice(0,e.length-1)}function Sl({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=JP(r)?r.map(oE):oE(r),s={done:!1,value:t[0]},l=uS(n&&n.length===t.length?n:cS(t),e),u=EE(l,t,{ease:Array.isArray(o)?o:AS(t,o)});return{calculatedDuration:e,next:A=>(s.value=u(A),s.done=A>=e,s)}}function IE(e,t){return t?e*(1e3/t):0}const dS=5;function mE(e,t,n){const r=Math.max(t-dS,0);return IE(n-e(r),t-r)}const td=.001,gS=.01,BE=10,fS=.05,pS=1;function hS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;Ls(e<=ao(BE),"Spring duration must be 10 seconds or less");let l=1-t;l=ro(fS,pS,l),e=ro(gS,BE,Fr(e)),l<1?(o=f=>{const p=f*l,C=p*e,h=p-n,E=nd(f,l),m=Math.exp(-C);return td-h/E*m},s=f=>{const C=f*l*e,h=C*n+n,E=Math.pow(l,2)*Math.pow(f,2)*e,m=Math.exp(-C),B=nd(Math.pow(f,2),l);return(-o(f)+td>0?-1:1)*((h-E)*m)/B}):(o=f=>{const p=Math.exp(-f*e),C=(f-n)*e+1;return-td+p*C},s=f=>{const p=Math.exp(-f*e),C=(n-f)*(e*e);return p*C});const u=5/e,A=ES(o,s,u);if(e=ao(e),isNaN(A))return{stiffness:100,damping:10,duration:e};{const f=Math.pow(A,2)*r;return{stiffness:f,damping:l*2*Math.sqrt(r*f),duration:e}}}const CS=12;function ES(e,t,n){let r=n;for(let o=1;o<CS;o++)r=r-e(r)/t(r);return r}function nd(e,t){return e*Math.sqrt(1-t*t)}const IS=["duration","bounce"],mS=["stiffness","damping","mass"];function vE(e,t){return t.some(n=>e[n]!==void 0)}function BS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!vE(e,mS)&&vE(e,IS)){const n=hS(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function yE({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],l={done:!1,value:o},{stiffness:u,damping:A,mass:f,velocity:p,duration:C,isResolvedFromDuration:h}=BS(r),E=p?-Fr(p):0,m=A/(2*Math.sqrt(u*f)),B=s-o,v=Fr(Math.sqrt(u/f)),j=Math.abs(B)<5;n||(n=j?.01:2),t||(t=j?.005:.5);let R;if(m<1){const x=nd(v,m);R=O=>{const P=Math.exp(-m*v*O);return s-P*((E+m*v*B)/x*Math.sin(x*O)+B*Math.cos(x*O))}}else if(m===1)R=x=>s-Math.exp(-v*x)*(B+(E+v*B)*x);else{const x=v*Math.sqrt(m*m-1);R=O=>{const P=Math.exp(-m*v*O),N=Math.min(x*O,300);return s-P*((E+m*v*B)*Math.sinh(N)+x*B*Math.cosh(N))/x}}return{calculatedDuration:h&&C||null,next:x=>{const O=R(x);if(h)l.done=x>=C;else{let P=E;x!==0&&(m<1?P=mE(R,x,O):P=0);const N=Math.abs(P)<=n,F=Math.abs(s-O)<=t;l.done=N&&F}return l.value=l.done?s:O,l}}}function bE({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:l,min:u,max:A,restDelta:f=.5,restSpeed:p}){const C=e[0],h={done:!1,value:C},E=X=>u!==void 0&&X<u||A!==void 0&&X>A,m=X=>u===void 0?A:A===void 0||Math.abs(u-X)<Math.abs(A-X)?u:A;let B=n*t;const v=C+B,j=l===void 0?v:l(v);j!==v&&(B=j-C);const R=X=>-B*Math.exp(-X/r),x=X=>j+R(X),O=X=>{const Z=R(X),Y=x(X);h.done=Math.abs(Z)<=f,h.value=h.done?j:Y};let P,N;const F=X=>{E(h.value)&&(P=X,N=yE({keyframes:[h.value,m(h.value)],velocity:mE(x,X,h.value),damping:o,stiffness:s,restDelta:f,restSpeed:p}))};return F(0),{calculatedDuration:null,next:X=>{let Z=!1;return!N&&P===void 0&&(Z=!0,O(X),F(X)),P!==void 0&&X>P?N.next(X-P):(!Z&&O(X),h)}}}const vS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Bt.update(t,!0),stop:()=>Rr(t),now:()=>Zt.isProcessing?Zt.timestamp:performance.now()}},QE=2e4;function xE(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<QE;)t+=n,r=e.next(t);return t>=QE?1/0:t}const yS={decay:bE,inertia:bE,tween:Sl,keyframes:Sl,spring:yE};function Ol({autoplay:e=!0,delay:t=0,driver:n=vS,keyframes:r,type:o="keyframes",repeat:s=0,repeatDelay:l=0,repeatType:u="loop",onPlay:A,onStop:f,onComplete:p,onUpdate:C,...h}){let E=1,m=!1,B,v;const j=()=>{v=new Promise(_=>{B=_})};j();let R;const x=yS[o]||Sl;let O;x!==Sl&&typeof r[0]!="number"&&(O=EE([0,100],r,{clamp:!1}),r=[0,100]);const P=x({...h,keyframes:r});let N;u==="mirror"&&(N=x({...h,keyframes:[...r].reverse(),velocity:-(h.velocity||0)}));let F="idle",X=null,Z=null,Y=null;P.calculatedDuration===null&&s&&(P.calculatedDuration=xE(P));const{calculatedDuration:$}=P;let ce=1/0,se=1/0;$!==null&&(ce=$+l,se=ce*(s+1)-l);let q=0;const J=_=>{if(Z===null)return;E>0&&(Z=Math.min(Z,_)),E<0&&(Z=Math.min(_-se/E,Z)),X!==null?q=X:q=Math.round(_-Z)*E;const fe=q-t*(E>=0?1:-1),he=E>=0?fe<0:fe>se;q=Math.max(fe,0),F==="finished"&&X===null&&(q=se);let ue=q,pe=P;if(s){const Ee=q/ce;let Be=Math.floor(Ee),xe=Ee%1;!xe&&Ee>=1&&(xe=1),xe===1&&Be--,Be=Math.min(Be,s+1);const le=!!(Be%2);le&&(u==="reverse"?(xe=1-xe,l&&(xe-=l/ce)):u==="mirror"&&(pe=N));let Ve=ro(0,1,xe);q>se&&(Ve=u==="reverse"&&le?1:0),ue=Ve*ce}const Ce=he?{done:!1,value:r[0]}:pe.next(ue);O&&(Ce.value=O(Ce.value));let{done:ve}=Ce;!he&&$!==null&&(ve=E>=0?q>=se:q<=0);const Ie=X===null&&(F==="finished"||F==="running"&&ve);return C&&C(Ce.value),Ie&&L(),Ce},H=()=>{R&&R.stop(),R=void 0},K=()=>{F="idle",H(),B(),j(),Z=Y=null},L=()=>{F="finished",p&&p(),H(),B()},ee=()=>{if(m)return;R||(R=n(J));const _=R.now();A&&A(),X!==null?Z=_-X:(!Z||F==="finished")&&(Z=_),F==="finished"&&j(),Y=Z,X=null,F="running",R.start()};e&&ee();const z={then(_,fe){return v.then(_,fe)},get time(){return Fr(q)},set time(_){_=ao(_),q=_,X!==null||!R||E===0?X=_:Z=R.now()-_/E},get duration(){const _=P.calculatedDuration===null?xE(P):P.calculatedDuration;return Fr(_)},get speed(){return E},set speed(_){_===E||!R||(E=_,z.time=Fr(q))},get state(){return F},play:ee,pause:()=>{F="paused",X=q},stop:()=>{m=!0,F!=="idle"&&(F="idle",f&&f(),K())},cancel:()=>{Y!==null&&J(Y),K()},complete:()=>{F="finished"},sample:_=>(Z=0,J(_))};return z}function bS(e){let t;return()=>(t===void 0&&(t=e()),t)}const QS=bS(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),xS=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),jl=10,wS=2e4,TS=(e,t)=>t.type==="spring"||e==="backgroundColor"||!JC(t.ease);function PS(e,t,{onUpdate:n,onComplete:r,...o}){if(!(QS()&&xS.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let l=!1,u,A;const f=()=>{A=new Promise(R=>{u=R})};f();let{keyframes:p,duration:C=300,ease:h,times:E}=o;if(TS(t,o)){const R=Ol({...o,repeat:0,delay:0});let x={done:!1,value:p[0]};const O=[];let P=0;for(;!x.done&&P<wS;)x=R.sample(P),O.push(x.value),P+=jl;E=void 0,p=O,C=P-jl,h="linear"}const m=HP(e.owner.current,t,p,{...o,duration:C,ease:h,times:E});o.syncStart&&(m.startTime=Zt.isProcessing?Zt.timestamp:document.timeline?document.timeline.currentTime:performance.now());const B=()=>m.cancel(),v=()=>{Bt.update(B),u(),f()};return m.onfinish=()=>{e.set(zP(p,o)),r&&r(),v()},{then(R,x){return A.then(R,x)},attachTimeline(R){return m.timeline=R,m.onfinish=null,Dt},get time(){return Fr(m.currentTime||0)},set time(R){m.currentTime=ao(R)},get speed(){return m.playbackRate},set speed(R){m.playbackRate=R},get duration(){return Fr(C)},play:()=>{l||(m.play(),Rr(B))},pause:()=>m.pause(),stop:()=>{if(l=!0,m.playState==="idle")return;const{currentTime:R}=m;if(R){const x=Ol({...o,autoplay:!1});e.setWithVelocity(x.sample(R-jl).value,x.sample(R).value,jl)}v()},complete:()=>m.finish(),cancel:v}}function SS({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Dt,pause:Dt,stop:Dt,then:s=>(s(),Promise.resolve()),cancel:Dt,complete:Dt});return t?Ol({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const OS={type:"spring",stiffness:500,damping:25,restSpeed:10},jS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),MS={type:"keyframes",duration:.8},RS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},DS=(e,{keyframes:t})=>t.length>2?MS:ko.has(e)?e.startsWith("scale")?jS(t[1]):OS:RS,rd=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(lo.test(t)||t==="0")&&!t.startsWith("url(")),kS=new Set(["brightness","contrast","saturate","opacity"]);function FS(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(vl)||[];if(!r)return e;const o=n.replace(r,"");let s=kS.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const LS=/([a-z-]*)\(.*?\)/g,od={...lo,getAnimatableNone:e=>{const t=e.match(LS);return t?t.map(FS).join(" "):e}},NS={...wC,color:un,backgroundColor:un,outlineColor:un,fill:un,stroke:un,borderColor:un,borderTopColor:un,borderRightColor:un,borderBottomColor:un,borderLeftColor:un,filter:od,WebkitFilter:od},id=e=>NS[e];function wE(e,t){let n=id(e);return n!==od&&(n=lo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const TE=e=>/^0[^.\s]+$/.test(e);function VS(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||TE(e)}function HS(e,t,n,r){const o=rd(t,n);let s;Array.isArray(n)?s=[...n]:s=[null,n];const l=r.from!==void 0?r.from:e.get();let u;const A=[];for(let f=0;f<s.length;f++)s[f]===null&&(s[f]=f===0?l:s[f-1]),VS(s[f])&&A.push(f),typeof s[f]=="string"&&s[f]!=="none"&&s[f]!=="0"&&(u=s[f]);if(o&&A.length&&u)for(let f=0;f<A.length;f++){const p=A[f];s[p]=wE(t,u)}return s}function zS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:l,repeatDelay:u,from:A,elapsed:f,...p}){return!!Object.keys(p).length}function PE(e,t){return e[t]||e.default||e}const sd=(e,t,n,r={})=>o=>{const s=PE(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u=u-ao(l);const A=HS(t,e,n,s),f=A[0],p=A[A.length-1],C=rd(e,f),h=rd(e,p);Ls(C===h,`You are trying to animate ${e} from "${f}" to "${p}". ${f} is not an animatable value - to enable this animation set ${f} to a value animatable to ${p} via the \`style\` property.`);let E={keyframes:A,velocity:t.getVelocity(),ease:"easeOut",...s,delay:-u,onUpdate:m=>{t.set(m),s.onUpdate&&s.onUpdate(m)},onComplete:()=>{o(),s.onComplete&&s.onComplete()}};if(zS(s)||(E={...E,...DS(e,E)}),E.duration&&(E.duration=ao(E.duration)),E.repeatDelay&&(E.repeatDelay=ao(E.repeatDelay)),!C||!h||VP.current||s.type===!1)return SS(E);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const m=PS(t,e,E);if(m)return m}return Ol(E)};function Ml(e){return!!(pn(e)&&e.add)}const SE=e=>/^\-?\d*\.?\d+$/.test(e);function ad(e,t){e.indexOf(t)===-1&&e.push(t)}function ld(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class cd{constructor(){this.subscriptions=[]}add(t){return ad(this.subscriptions,t),()=>ld(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 l=this.subscriptions[s];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const OE=new Set;function ud(e,t,n){e||OE.has(t)||(console.warn(t),n&&console.warn(n),OE.add(t))}const WS=e=>!isNaN(parseFloat(e));class US{constructor(t,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,o=!0)=>{this.prev=this.current,this.current=r;const{delta:s,timestamp:l}=Zt;this.lastUpdated!==l&&(this.timeDelta=s,this.lastUpdated=l,Bt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Bt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=WS(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&ud(!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 cd);const r=this.events[t].add(n);return t==="change"?()=>{r(),Bt.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,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?IE(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}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(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Si(e,t){return new US(e,t)}const jE=e=>t=>t.test(e),ME=[Fo,De,mr,oo,eP,$T,{test:e=>e==="auto",parse:e=>e}],zs=e=>ME.find(jE(e)),YS=[...ME,un,lo],GS=e=>YS.find(jE(e));function KS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Si(n))}function JS(e,t){const n=Tl(e,t);let{transitionEnd:r={},transition:o={},...s}=n?e.makeTargetAnimatable(n,!1):{};s={...s,...r};for(const l in s){const u=pP(s[l]);KS(e,l,u)}}function XS(e,t,n){var r,o;const s=Object.keys(t).filter(u=>!e.hasValue(u)),l=s.length;if(l)for(let u=0;u<l;u++){const A=s[u],f=t[A];let p=null;Array.isArray(f)&&(p=f[0]),p===null&&(p=(o=(r=n[A])!==null&&r!==void 0?r:e.readValue(A))!==null&&o!==void 0?o:t[A]),p!=null&&(typeof p=="string"&&(SE(p)||TE(p))?p=parseFloat(p):!GS(p)&&lo.test(f)&&(p=wE(A,f)),e.addValue(A,Si(p,{owner:e})),n[A]===void 0&&(n[A]=p),p!==null&&e.setBaseTarget(A,p))}}function ZS(e,t){return t?(t[e]||t.default||t).from:void 0}function _S(e,t,n){const r={};for(const o in e){const s=ZS(o,t);if(s!==void 0)r[o]=s;else{const l=n.getValue(o);l&&(r[o]=l.get())}}return r}function qS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function RE(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:l,...u}=e.makeTargetAnimatable(t);const A=e.getValue("willChange");r&&(s=r);const f=[],p=o&&e.animationState&&e.animationState.getState()[o];for(const C in u){const h=e.getValue(C),E=u[C];if(!h||E===void 0||p&&qS(p,C))continue;const m={delay:n,elapsed:0,...s};if(window.HandoffAppearAnimations&&!h.hasAnimated){const v=e.getProps()[NP];v&&(m.elapsed=window.HandoffAppearAnimations(v,C,h,Bt),m.syncStart=!0)}h.start(sd(C,h,E,e.shouldReduceMotion&&ko.has(C)?{type:!1}:m));const B=h.animation;Ml(A)&&(A.add(C),B.then(()=>A.remove(C))),f.push(B)}return l&&Promise.all(f).then(()=>{l&&JS(e,l)}),f}function Ad(e,t,n={}){const r=Tl(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(RE(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(A=0)=>{const{delayChildren:f=0,staggerChildren:p,staggerDirection:C}=o;return $S(e,t,f+A,p,C,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[A,f]=u==="beforeChildren"?[s,l]:[l,s];return A().then(()=>f())}else return Promise.all([s(),l(n.delay)])}function $S(e,t,n=0,r=0,o=1,s){const l=[],u=(e.variantChildren.size-1)*r,A=o===1?(f=0)=>f*r:(f=0)=>u-f*r;return Array.from(e.variantChildren).sort(e4).forEach((f,p)=>{f.notify("AnimationStart",t),l.push(Ad(f,t,{...s,delay:n+A(p)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(l)}function e4(e,t){return e.sortNodePosition(t)}function t4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Ad(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Ad(e,t,n);else{const o=typeof t=="function"?Tl(e,t,n.custom):t;r=Promise.all(RE(e,o,n))}return r.then(()=>e.notify("AnimationComplete",t))}const n4=[...jA].reverse(),r4=jA.length;function o4(e){return t=>Promise.all(t.map(({animation:n,options:r})=>t4(e,n,r)))}function i4(e){let t=o4(e);const n=a4();let r=!0;const o=(A,f)=>{const p=Tl(e,f);if(p){const{transition:C,transitionEnd:h,...E}=p;A={...A,...E,...h}}return A};function s(A){t=A(e)}function l(A,f){const p=e.getProps(),C=e.getVariantContext(!0)||{},h=[],E=new Set;let m={},B=1/0;for(let j=0;j<r4;j++){const R=n4[j],x=n[R],O=p[R]!==void 0?p[R]:C[R],P=Os(O),N=R===f?x.isActive:null;N===!1&&(B=j);let F=O===C[R]&&O!==p[R]&&P;if(F&&r&&e.manuallyAnimateOnMount&&(F=!1),x.protectedKeys={...m},!x.isActive&&N===null||!O&&!x.prevProp||El(O)||typeof O=="boolean")continue;const X=s4(x.prevProp,O);let Z=X||R===f&&x.isActive&&!F&&P||j>B&&P;const Y=Array.isArray(O)?O:[O];let $=Y.reduce(o,{});N===!1&&($={});const{prevResolvedValues:ce={}}=x,se={...ce,...$},q=J=>{Z=!0,E.delete(J),x.needsAnimating[J]=!0};for(const J in se){const H=$[J],K=ce[J];m.hasOwnProperty(J)||(H!==K?bl(H)&&bl(K)?!GC(H,K)||X?q(J):x.protectedKeys[J]=!0:H!==void 0?q(J):E.add(J):H!==void 0&&E.has(J)?q(J):x.protectedKeys[J]=!0)}x.prevProp=O,x.prevResolvedValues=$,x.isActive&&(m={...m,...$}),r&&e.blockInitialAnimation&&(Z=!1),Z&&!F&&h.push(...Y.map(J=>({animation:J,options:{type:R,...A}})))}if(E.size){const j={};E.forEach(R=>{const x=e.getBaseTarget(R);x!==void 0&&(j[R]=x)}),h.push({animation:j})}let v=!!h.length;return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(h):Promise.resolve()}function u(A,f,p){var C;if(n[A].isActive===f)return Promise.resolve();(C=e.variantChildren)===null||C===void 0||C.forEach(E=>{var m;return(m=E.animationState)===null||m===void 0?void 0:m.setActive(A,f)}),n[A].isActive=f;const h=l(p,A);for(const E in n)n[E].protectedKeys={};return h}return{animateChanges:l,setActive:u,setAnimateFunction:s,getState:()=>n}}function s4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!GC(t,e):!1}function No(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function a4(){return{animate:No(!0),whileInView:No(),whileHover:No(),whileTap:No(),whileDrag:No(),whileFocus:No(),exit:No()}}class l4 extends so{constructor(t){super(t),t.animationState||(t.animationState=i4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),El(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let c4=0;class u4 extends so{constructor(){super(...arguments),this.id=c4++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const s=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const A4={animation:{Feature:l4},exit:{Feature:u4}},DE=(e,t)=>Math.abs(e-t);function d4(e,t){const n=DE(e.x,t.x),r=DE(e.y,t.y);return Math.sqrt(n**2+r**2)}class kE{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=gd(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,C=d4(f.offset,{x:0,y:0})>=3;if(!p&&!C)return;const{point:h}=f,{timestamp:E}=Zt;this.history.push({...h,timestamp:E});const{onStart:m,onMove:B}=this.handlers;p||(m&&m(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),B&&B(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=dd(p,this.transformPagePoint),Bt.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:C,onSessionEnd:h}=this.handlers,E=gd(f.type==="pointercancel"?this.lastMoveEventInfo:dd(p,this.transformPagePoint),this.history);this.startEvent&&C&&C(f,E),h&&h(f,E)},!LC(t))return;this.handlers=n,this.transformPagePoint=r;const o=wl(t),s=dd(o,this.transformPagePoint),{point:l}=s,{timestamp:u}=Zt;this.history=[{...l,timestamp:u}];const{onSessionStart:A}=n;A&&A(t,gd(s,this.history)),this.removeListeners=io(kr(window,"pointermove",this.handlePointerMove),kr(window,"pointerup",this.handlePointerUp),kr(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Rr(this.updatePoint)}}function dd(e,t){return t?{point:t(e.point)}:e}function FE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gd({point:e},t){return{point:e,delta:FE(e,LE(t)),offset:FE(e,g4(t)),velocity:f4(t,.1)}}function g4(e){return e[0]}function LE(e){return e[e.length-1]}function f4(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=LE(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ao(t)));)n--;if(!r)return{x:0,y:0};const s=Fr(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const l={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function Tn(e){return e.max-e.min}function fd(e,t=0,n=.01){return Math.abs(e-t)<=n}function NE(e,t,n,r=.5){e.origin=r,e.originPoint=St(t.min,t.max,e.origin),e.scale=Tn(n)/Tn(t),(fd(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=St(n.min,n.max,e.origin)-e.originPoint,(fd(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Ws(e,t,n,r){NE(e.x,t.x,n.x,r?r.originX:void 0),NE(e.y,t.y,n.y,r?r.originY:void 0)}function VE(e,t,n){e.min=n.min+t.min,e.max=e.min+Tn(t)}function p4(e,t,n){VE(e.x,t.x,n.x),VE(e.y,t.y,n.y)}function HE(e,t,n){e.min=t.min-n.min,e.max=e.min+Tn(t)}function Us(e,t,n){HE(e.x,t.x,n.x),HE(e.y,t.y,n.y)}function h4(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?St(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?St(n,e,r.max):Math.min(e,n)),e}function zE(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 C4(e,{top:t,left:n,bottom:r,right:o}){return{x:zE(e.x,n,o),y:zE(e.y,t,r)}}function WE(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 E4(e,t){return{x:WE(e.x,t.x),y:WE(e.y,t.y)}}function I4(e,t){let n=.5;const r=Tn(e),o=Tn(t);return o>r?n=Hs(t.min,t.max-r,e.min):r>o&&(n=Hs(e.min,e.max-o,t.min)),ro(0,1,n)}function m4(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 pd=.35;function B4(e=pd){return e===!1?e=0:e===!0&&(e=pd),{x:UE(e,"left","right"),y:UE(e,"top","bottom")}}function UE(e,t,n){return{min:YE(e,t),max:YE(e,n)}}function YE(e,t){return typeof e=="number"?e:e[t]||0}const GE=()=>({translate:0,scale:1,origin:0,originPoint:0}),Oi=()=>({x:GE(),y:GE()}),KE=()=>({min:0,max:0}),Wt=()=>({x:KE(),y:KE()});function vr(e){return[e("x"),e("y")]}function JE({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function v4({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function y4(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 hd(e){return e===void 0||e===1}function Cd({scale:e,scaleX:t,scaleY:n}){return!hd(e)||!hd(t)||!hd(n)}function Vo(e){return Cd(e)||XE(e)||e.z||e.rotate||e.rotateX||e.rotateY}function XE(e){return ZE(e.x)||ZE(e.y)}function ZE(e){return e&&e!=="0%"}function Rl(e,t,n){const r=e-n,o=t*r;return n+o}function _E(e,t,n,r,o){return o!==void 0&&(e=Rl(e,o,r)),Rl(e,n,r)+t}function Ed(e,t=0,n=1,r,o){e.min=_E(e.min,t,n,r,o),e.max=_E(e.max,t,n,r,o)}function qE(e,{x:t,y:n}){Ed(e.x,t.translate,t.scale,t.originPoint),Ed(e.y,n.translate,n.scale,n.originPoint)}function b4(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,l;for(let u=0;u<o;u++){s=n[u],l=s.projectionDelta;const A=s.instance;A&&A.style&&A.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ji(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,qE(e,l)),r&&Vo(s.latestValues)&&ji(e,s.latestValues))}t.x=$E(t.x),t.y=$E(t.y)}function $E(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function co(e,t){e.min=e.min+t,e.max=e.max+t}function eI(e,t,[n,r,o]){const s=t[o]!==void 0?t[o]:.5,l=St(e.min,e.max,s);Ed(e,t[n],t[r],l,t.scale)}const Q4=["x","scaleX","originX"],x4=["y","scaleY","originY"];function ji(e,t){eI(e.x,t,Q4),eI(e.y,t,x4)}function tI(e,t){return JE(y4(e.getBoundingClientRect(),t))}function w4(e,t,n){const r=tI(e,n),{scroll:o}=t;return o&&(co(r.x,o.offset.x),co(r.y,o.offset.y)),r}const T4=new WeakMap;class P4{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Wt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=A=>{this.stopAnimation(),n&&this.snapToCursor(wl(A,"page").point)},s=(A,f)=>{const{drag:p,dragPropagation:C,onDragStart:h}=this.getProps();if(p&&!C&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=zC(p),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),vr(m=>{let B=this.getAxisMotionValue(m).get()||0;if(mr.test(B)){const{projection:v}=this.visualElement;if(v&&v.layout){const j=v.layout.layoutBox[m];j&&(B=Tn(j)*(parseFloat(B)/100))}}this.originPoint[m]=B}),h&&Bt.update(()=>h(A,f),!1,!0);const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},l=(A,f)=>{const{dragPropagation:p,dragDirectionLock:C,onDirectionLock:h,onDrag:E}=this.getProps();if(!p&&!this.openGlobalLock)return;const{offset:m}=f;if(C&&this.currentDirection===null){this.currentDirection=S4(m),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",f.point,m),this.updateAxis("y",f.point,m),this.visualElement.render(),E&&E(A,f)},u=(A,f)=>this.stop(A,f);this.panSession=new kE(t,{onSessionStart:o,onStart:s,onMove:l,onSessionEnd:u},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&Bt.update(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Dl(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=h4(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},o=this.constraints;t&&Ti(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=C4(r.layoutBox,t):this.constraints=!1,this.elastic=B4(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&vr(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=m4(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ti(t))return!1;const r=t.current;Br(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=w4(r,o.root,this.visualElement.getTransformPagePoint());let l=E4(o.layout.layoutBox,s);if(n){const u=n(v4(l));this.hasMutatedConstraints=!!u,u&&(l=JE(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),A=this.constraints||{},f=vr(p=>{if(!Dl(p,n,this.currentDirection))return;let C=A&&A[p]||{};l&&(C={min:0,max:0});const h=o?200:1e6,E=o?40:1e7,m={type:"inertia",velocity:r?t[p]:0,bounceStiffness:h,bounceDamping:E,timeConstant:750,restDelta:1,restSpeed:10,...s,...C};return this.startAxisValueAnimation(p,m)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(sd(t,r,0,n))}stopAnimation(){vr(t=>this.getAxisMotionValue(t).stop())}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){vr(n=>{const{drag:r}=this.getProps();if(!Dl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:u}=o.layout.layoutBox[n];s.set(t[n]-St(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ti(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};vr(l=>{const u=this.getAxisMotionValue(l);if(u){const A=u.get();o[l]=I4({min:A,max:A},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),vr(l=>{if(!Dl(l,t,null))return;const u=this.getAxisMotionValue(l),{min:A,max:f}=this.constraints[l];u.set(St(A,f,o[l]))})}addListeners(){if(!this.visualElement.current)return;T4.set(this.visualElement,this);const t=this.visualElement.current,n=kr(t,"pointerdown",A=>{const{drag:f,dragListener:p=!0}=this.getProps();f&&p&&this.start(A)}),r=()=>{const{dragConstraints:A}=this.getProps();Ti(A)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),r();const l=Dr(window,"resize",()=>this.scalePositionWithinConstraints()),u=o.addEventListener("didUpdate",({delta:A,hasLayoutChanged:f})=>{this.isDragging&&f&&(vr(p=>{const C=this.getAxisMotionValue(p);C&&(this.originPoint[p]+=A[p].translate,C.set(C.get()+A[p].translate))}),this.visualElement.render())});return()=>{l(),n(),s(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:l=pd,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:l,dragMomentum:u}}}function Dl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function S4(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class O4 extends so{constructor(t){super(t),this.removeGroupControls=Dt,this.removeListeners=Dt,this.controls=new P4(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Dt}unmount(){this.removeGroupControls(),this.removeListeners()}}const nI=e=>(t,n)=>{e&&Bt.update(()=>e(t,n))};class j4 extends so{constructor(){super(...arguments),this.removePointerDownListener=Dt}onPointerDown(t){this.session=new kE(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:nI(t),onStart:nI(n),onMove:r,onEnd:(s,l)=>{delete this.session,o&&Bt.update(()=>o(s,l))}}}mount(){this.removePointerDownListener=kr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function M4(){const e=w.useContext(OA);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=w.useId();return w.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const kl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rI(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ys={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(De.test(e))e=parseFloat(e);else return e;const n=rI(e,t.target.x),r=rI(e,t.target.y);return`${n}% ${r}%`}},R4={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=lo.parse(e);if(o.length>5)return r;const s=lo.createTransformer(e),l=typeof o[0]!="number"?1:0,u=n.x.scale*t.x,A=n.y.scale*t.y;o[0+l]/=u,o[1+l]/=A;const f=St(u,A,.5);return typeof o[2+l]=="number"&&(o[2+l]/=f),typeof o[3+l]=="number"&&(o[3+l]/=f),s(o)}};class D4 extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;GT(k4),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),kl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,l=r.projection;return l&&(l.isPresent=s,o||t.layoutDependency!==n||n===void 0?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||Bt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;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 oI(e){const[t,n]=M4(),r=w.useContext(IC);return w.createElement(D4,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(mC),isPresent:t,safeToRemove:n})}const k4={borderRadius:{...Ys,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ys,borderTopRightRadius:Ys,borderBottomLeftRadius:Ys,borderBottomRightRadius:Ys,boxShadow:R4},iI=["TopLeft","TopRight","BottomLeft","BottomRight"],F4=iI.length,sI=e=>typeof e=="string"?parseFloat(e):e,aI=e=>typeof e=="number"||De.test(e);function L4(e,t,n,r,o,s){o?(e.opacity=St(0,n.opacity!==void 0?n.opacity:1,N4(r)),e.opacityExit=St(t.opacity!==void 0?t.opacity:1,0,V4(r))):s&&(e.opacity=St(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let l=0;l<F4;l++){const u=`border${iI[l]}Radius`;let A=lI(t,u),f=lI(n,u);if(A===void 0&&f===void 0)continue;A||(A=0),f||(f=0),A===0||f===0||aI(A)===aI(f)?(e[u]=Math.max(St(sI(A),sI(f),r),0),(mr.test(f)||mr.test(A))&&(e[u]+="%")):e[u]=f}(t.rotate||n.rotate)&&(e.rotate=St(t.rotate||0,n.rotate||0,r))}function lI(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const N4=cI(0,.5,KA),V4=cI(.5,.95,Dt);function cI(e,t,n){return r=>r<e?0:r>t?1:n(Hs(e,t,r))}function uI(e,t){e.min=t.min,e.max=t.max}function zn(e,t){uI(e.x,t.x),uI(e.y,t.y)}function AI(e,t,n,r,o){return e-=t,e=Rl(e,1/n,r),o!==void 0&&(e=Rl(e,1/o,r)),e}function H4(e,t=0,n=1,r=.5,o,s=e,l=e){if(mr.test(t)&&(t=parseFloat(t),t=St(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=St(s.min,s.max,r);e===s&&(u-=t),e.min=AI(e.min,t,n,u,o),e.max=AI(e.max,t,n,u,o)}function dI(e,t,[n,r,o],s,l){H4(e,t[n],t[r],t[o],t.scale,s,l)}const z4=["x","scaleX","originX"],W4=["y","scaleY","originY"];function gI(e,t,n,r){dI(e.x,t,z4,n?n.x:void 0,r?r.x:void 0),dI(e.y,t,W4,n?n.y:void 0,r?r.y:void 0)}function fI(e){return e.translate===0&&e.scale===1}function pI(e){return fI(e.x)&&fI(e.y)}function U4(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function hI(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function CI(e){return Tn(e.x)/Tn(e.y)}class Y4{constructor(){this.members=[]}add(t){ad(this.members,t),t.scheduleRender()}remove(t){if(ld(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(),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:o}=t.options;o===!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)}}function EI(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y;if((o||s)&&(r=`translate3d(${o}px, ${s}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:A,rotateX:f,rotateY:p}=n;A&&(r+=`rotate(${A}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const G4=(e,t)=>e.depth-t.depth;class K4{constructor(){this.children=[],this.isDirty=!1}add(t){ad(this.children,t),this.isDirty=!0}remove(t){ld(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(G4),this.isDirty=!1,this.children.forEach(t)}}function J4(e,t){const n=performance.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Rr(r),e(s-t))};return Bt.read(r,!0),()=>Rr(r)}function X4(e){window.MotionDebug&&window.MotionDebug.record(e)}function Z4(e){return e instanceof SVGElement&&e.tagName!=="svg"}function _4(e,t,n){const r=pn(e)?e:Si(e);return r.start(sd("",r,t,n)),r.animation}const II=["","X","Y","Z"],mI=1e3;let q4=0;const Ho={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function BI({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(l={},u=t==null?void 0:t()){this.id=q4++,this.animationId=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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{Ho.totalNodes=Ho.resolvedTargetDeltas=Ho.recalculatedProjection=0,this.nodes.forEach(tO),this.nodes.forEach(sO),this.nodes.forEach(aO),this.nodes.forEach(nO),X4(Ho)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let A=0;A<this.path.length;A++)this.path[A].shouldResetTransform=!0;this.root===this&&(this.nodes=new K4)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new cd),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const A=this.eventHandlers.get(l);A&&A.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l,u=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Z4(l),this.instance=l;const{layoutId:A,layout:f,visualElement:p}=this.options;if(p&&!p.current&&p.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),u&&(f||A)&&(this.isLayoutDirty=!0),e){let C;const h=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,C&&C(),C=J4(h,250),kl.hasAnimatedSinceResize&&(kl.hasAnimatedSinceResize=!1,this.nodes.forEach(yI))})}A&&this.root.registerSharedNode(A,this),this.options.animate!==!1&&p&&(A||f)&&this.addEventListener("didUpdate",({delta:C,hasLayoutChanged:h,hasRelativeTargetChanged:E,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const B=this.options.transition||p.getDefaultTransition()||dO,{onLayoutAnimationStart:v,onLayoutAnimationComplete:j}=p.getProps(),R=!this.targetLayout||!hI(this.targetLayout,m)||E,x=!h&&E;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||h&&(R||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(C,x);const O={...PE(B,"layout"),onPlay:v,onComplete:j};(p.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O)}else h||yI(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Rr(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(lO),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const C=this.path[p];C.shouldResetTransform=!0,C.updateScroll("snapshot"),C.options.layoutRoot&&C.willUpdate(!1)}const{layoutId:u,layout:A}=this.options;if(u===void 0&&!A)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(vI);return}this.isUpdating||this.nodes.forEach(oO),this.isUpdating=!1,this.nodes.forEach(iO),this.nodes.forEach($4),this.nodes.forEach(eO),this.clearAllSnapshots();const u=performance.now();Zt.delta=ro(0,1e3/60,u-Zt.timestamp),Zt.timestamp=u,Zt.isProcessing=!0,WA.update.process(Zt),WA.preRender.process(Zt),WA.render.process(Zt),Zt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(rO),this.sharedNodes.forEach(cO)}scheduleUpdateProjection(){Bt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Bt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let A=0;A<this.path.length;A++)this.path[A].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Wt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u&&(this.scroll={animationId:this.root.animationId,phase:l,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform,u=this.projectionDelta&&!pI(this.projectionDelta),A=this.getTransformTemplate(),f=A?A(this.latestValues,""):void 0,p=f!==this.prevTransformTemplateValue;l&&(u||Vo(this.latestValues)||p)&&(o(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let A=this.removeElementScroll(u);return l&&(A=this.removeTransform(A)),gO(A),{animationId:this.root.animationId,measuredBox:u,layoutBox:A,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return Wt();const u=l.measureViewportBox(),{scroll:A}=this.root;return A&&(co(u.x,A.offset.x),co(u.y,A.offset.y)),u}removeElementScroll(l){const u=Wt();zn(u,l);for(let A=0;A<this.path.length;A++){const f=this.path[A],{scroll:p,options:C}=f;if(f!==this.root&&p&&C.layoutScroll){if(p.isRoot){zn(u,l);const{scroll:h}=this.root;h&&(co(u.x,-h.offset.x),co(u.y,-h.offset.y))}co(u.x,p.offset.x),co(u.y,p.offset.y)}}return u}applyTransform(l,u=!1){const A=Wt();zn(A,l);for(let f=0;f<this.path.length;f++){const p=this.path[f];!u&&p.options.layoutScroll&&p.scroll&&p!==p.root&&ji(A,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),Vo(p.latestValues)&&ji(A,p.latestValues)}return Vo(this.latestValues)&&ji(A,this.latestValues),A}removeTransform(l){const u=Wt();zn(u,l);for(let A=0;A<this.path.length;A++){const f=this.path[A];if(!f.instance||!Vo(f.latestValues))continue;Cd(f.latestValues)&&f.updateSnapshot();const p=Wt(),C=f.measurePageBox();zn(p,C),gI(u,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,p)}return Vo(this.latestValues)&&gI(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.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!==Zt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var u;const A=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=A.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=A.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=A.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==A;if(!(l||f&&this.isSharedProjectionDirty||this.isProjectionDirty||!((u=this.parent)===null||u===void 0)&&u.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:C,layoutId:h}=this.options;if(!(!this.layout||!(C||h))){if(this.resolvedRelativeTargetAt=Zt.timestamp,!this.targetDelta&&!this.relativeTarget){const E=this.getClosestProjectingParent();E&&E.layout&&this.animationProgress!==1?(this.relativeParent=E,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wt(),this.relativeTargetOrigin=Wt(),Us(this.relativeTargetOrigin,this.layout.layoutBox,E.layout.layoutBox),zn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Wt(),this.targetWithTransforms=Wt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),p4(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):zn(this.target,this.layout.layoutBox),qE(this.target,this.targetDelta)):zn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const E=this.getClosestProjectingParent();E&&!!E.resumingFrom==!!this.resumingFrom&&!E.options.layoutScroll&&E.target&&this.animationProgress!==1?(this.relativeParent=E,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wt(),this.relativeTargetOrigin=Wt(),Us(this.relativeTargetOrigin,this.target,E.target),zn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ho.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Cd(this.parent.latestValues)||XE(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var l;const u=this.getLead(),A=!!this.resumingFrom||this!==u;let f=!0;if((this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty)&&(f=!1),A&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===Zt.timestamp&&(f=!1),f)return;const{layout:p,layoutId:C}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||C))return;zn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,E=this.treeScale.y;b4(this.layoutCorrected,this.treeScale,this.path,A),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox);const{target:m}=u;if(!m){this.projectionTransform&&(this.projectionDelta=Oi(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Oi(),this.projectionDeltaWithTransform=Oi());const B=this.projectionTransform;Ws(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=EI(this.projectionDelta,this.treeScale),(this.projectionTransform!==B||this.treeScale.x!==h||this.treeScale.y!==E)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),Ho.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),l){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(l,u=!1){const A=this.snapshot,f=A?A.latestValues:{},p={...this.latestValues},C=Oi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const h=Wt(),E=A?A.source:void 0,m=this.layout?this.layout.source:void 0,B=E!==m,v=this.getStack(),j=!v||v.members.length<=1,R=!!(B&&!j&&this.options.crossfade===!0&&!this.path.some(AO));this.animationProgress=0;let x;this.mixTargetDelta=O=>{const P=O/1e3;bI(C.x,l.x,P),bI(C.y,l.y,P),this.setTargetDelta(C),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Us(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),uO(this.relativeTarget,this.relativeTargetOrigin,h,P),x&&U4(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Wt()),zn(x,this.relativeTarget)),B&&(this.animationValues=p,L4(p,f,this.latestValues,P,R,j)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Rr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Bt.update(()=>{kl.hasAnimatedSinceResize=!0,this.currentAnimation=_4(0,mI,{...l,onUpdate:u=>{this.mixTargetDelta(u),l.onUpdate&&l.onUpdate(u)},onComplete:()=>{l.onComplete&&l.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 l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(mI),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:A,layout:f,latestValues:p}=l;if(!(!u||!A||!f)){if(this!==l&&this.layout&&f&&PI(this.options.animationType,this.layout.layoutBox,f.layoutBox)){A=this.target||Wt();const C=Tn(this.layout.layoutBox.x);A.x.min=l.target.x.min,A.x.max=A.x.min+C;const h=Tn(this.layout.layoutBox.y);A.y.min=l.target.y.min,A.y.max=A.y.min+h}zn(u,A),ji(u,p),Ws(this.projectionDeltaWithTransform,this.layoutCorrected,u,p)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new Y4),this.sharedNodes.get(l).add(u);const f=u.options.initialPromotionConfig;u.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var l;const{layoutId:u}=this.options;return u?((l=this.getStack())===null||l===void 0?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:u}=this.options;return u?(l=this.getStack())===null||l===void 0?void 0:l.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:A}={}){const f=this.getStack();f&&f.promote(this,A),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:A}=l;if((A.rotate||A.rotateX||A.rotateY||A.rotateZ)&&(u=!0),!u)return;const f={};for(let p=0;p<II.length;p++){const C="rotate"+II[p];A[C]&&(f[C]=A[C],l.setStaticValue(C,0))}l.render();for(const p in f)l.setStaticValue(p,f[p]);l.scheduleRender()}getProjectionStyles(l={}){var u,A;const f={};if(!this.instance||this.isSVG)return f;if(this.isVisible)f.visibility="";else return{visibility:"hidden"};const p=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,f.opacity="",f.pointerEvents=Ql(l.pointerEvents)||"",f.transform=p?p(this.latestValues,""):"none",f;const C=this.getLead();if(!this.projectionDelta||!this.layout||!C.target){const B={};return this.options.layoutId&&(B.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,B.pointerEvents=Ql(l.pointerEvents)||""),this.hasProjected&&!Vo(this.latestValues)&&(B.transform=p?p({},""):"none",this.hasProjected=!1),B}const h=C.animationValues||C.latestValues;this.applyTransformsToTarget(),f.transform=EI(this.projectionDeltaWithTransform,this.treeScale,h),p&&(f.transform=p(h,f.transform));const{x:E,y:m}=this.projectionDelta;f.transformOrigin=`${E.origin*100}% ${m.origin*100}% 0`,C.animationValues?f.opacity=C===this?(A=(u=h.opacity)!==null&&u!==void 0?u:this.latestValues.opacity)!==null&&A!==void 0?A:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:f.opacity=C===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const B in ml){if(h[B]===void 0)continue;const{correct:v,applyTo:j}=ml[B],R=f.transform==="none"?h[B]:v(h[B],C);if(j){const x=j.length;for(let O=0;O<x;O++)f[j[O]]=R}else f[B]=R}return this.options.layoutId&&(f.pointerEvents=C===this?Ql(l.pointerEvents)||"":"none"),f}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(vI),this.root.sharedNodes.clear()}}}function $4(e){e.updateLayout()}function eO(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,l=n.source!==e.layout.source;s==="size"?vr(C=>{const h=l?n.measuredBox[C]:n.layoutBox[C],E=Tn(h);h.min=r[C].min,h.max=h.min+E}):PI(s,n.layoutBox,r)&&vr(C=>{const h=l?n.measuredBox[C]:n.layoutBox[C],E=Tn(r[C]);h.max=h.min+E,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[C].max=e.relativeTarget[C].min+E)});const u=Oi();Ws(u,r,n.layoutBox);const A=Oi();l?Ws(A,e.applyTransform(o,!0),n.measuredBox):Ws(A,r,n.layoutBox);const f=!pI(u);let p=!1;if(!e.resumeFrom){const C=e.getClosestProjectingParent();if(C&&!C.resumeFrom){const{snapshot:h,layout:E}=C;if(h&&E){const m=Wt();Us(m,n.layoutBox,h.layoutBox);const B=Wt();Us(B,r,E.layoutBox),hI(m,B)||(p=!0),C.options.layoutRoot&&(e.relativeTarget=B,e.relativeTargetOrigin=m,e.relativeParent=C)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:A,layoutDelta:u,hasLayoutChanged:f,hasRelativeTargetChanged:p})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function tO(e){Ho.totalNodes++,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 nO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function rO(e){e.clearSnapshot()}function vI(e){e.clearMeasurements()}function oO(e){e.isLayoutDirty=!1}function iO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function yI(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function sO(e){e.resolveTargetDelta()}function aO(e){e.calcProjection()}function lO(e){e.resetRotation()}function cO(e){e.removeLeadSnapshot()}function bI(e,t,n){e.translate=St(t.translate,0,n),e.scale=St(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function QI(e,t,n,r){e.min=St(t.min,n.min,r),e.max=St(t.max,n.max,r)}function uO(e,t,n,r){QI(e.x,t.x,n.x,r),QI(e.y,t.y,n.y,r)}function AO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const dO={duration:.45,ease:[.4,0,.1,1]},xI=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),wI=xI("applewebkit/")&&!xI("chrome/")?Math.round:Dt;function TI(e){e.min=wI(e.min),e.max=wI(e.max)}function gO(e){TI(e.x),TI(e.y)}function PI(e,t,n){return e==="position"||e==="preserve-aspect"&&!fd(CI(t),CI(n),.2)}const fO=BI({attachResizeListener:(e,t)=>Dr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Id={current:void 0},SI=BI({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Id.current){const e=new fO({});e.mount(window),e.setOptions({layoutScroll:!0}),Id.current=e}return Id.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),pO={pan:{Feature:j4},drag:{Feature:O4,ProjectionNode:SI,MeasureLayout:oI}},hO=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function CO(e){const t=hO.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const EO=4;function md(e,t,n=1){Br(n<=EO,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=CO(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const l=s.trim();return SE(l)?parseFloat(l):l}else return DA(o)?md(o,t,n+1):o}function IO(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(o=>{const s=o.get();if(!DA(s))return;const l=md(s,r);l&&o.set(l)});for(const o in t){const s=t[o];if(!DA(s))continue;const l=md(s,r);l&&(t[o]=l,n||(n={}),n[o]===void 0&&(n[o]=s))}return{target:t,transitionEnd:n}}const mO=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),OI=e=>mO.has(e),BO=e=>Object.keys(e).some(OI),Fl=e=>e===Fo||e===De,jI=(e,t)=>parseFloat(e.split(", ")[t]),MI=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return jI(o[1],t);{const s=r.match(/^matrix\((.+)\)$/);return s?jI(s[1],e):0}},vO=new Set(["x","y","z"]),yO=Ms.filter(e=>!vO.has(e));function bO(e){const t=[];return yO.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Mi={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:MI(4,13),y:MI(5,14)};Mi.translateX=Mi.x,Mi.translateY=Mi.y;const QO=(e,t,n)=>{const r=t.measureViewportBox(),o=t.current,s=getComputedStyle(o),{display:l}=s,u={};l==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(f=>{u[f]=Mi[f](r,s)}),t.render();const A=t.measureViewportBox();return n.forEach(f=>{const p=t.getValue(f);p&&p.jump(u[f]),e[f]=Mi[f](A,s)}),e},xO=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(OI);let s=[],l=!1;const u=[];if(o.forEach(A=>{const f=e.getValue(A);if(!e.hasValue(A))return;let p=n[A],C=zs(p);const h=t[A];let E;if(bl(h)){const m=h.length,B=h[0]===null?1:0;p=h[B],C=zs(p);for(let v=B;v<m&&h[v]!==null;v++)E?Br(zs(h[v])===E,"All keyframes must be of the same type"):(E=zs(h[v]),Br(E===C||Fl(C)&&Fl(E),"Keyframes must be of the same dimension as the current value"))}else E=zs(h);if(C!==E)if(Fl(C)&&Fl(E)){const m=f.get();typeof m=="string"&&f.set(parseFloat(m)),typeof h=="string"?t[A]=parseFloat(h):Array.isArray(h)&&E===De&&(t[A]=h.map(parseFloat))}else C!=null&&C.transform&&(E!=null&&E.transform)&&(p===0||h===0)?p===0?f.set(E.transform(p)):t[A]=C.transform(h):(l||(s=bO(e),l=!0),u.push(A),r[A]=r[A]!==void 0?r[A]:t[A],f.jump(h))}),u.length){const A=u.indexOf("height")>=0?window.pageYOffset:null,f=QO(t,e,u);return s.length&&s.forEach(([p,C])=>{e.getValue(p).set(C)}),e.render(),Cl&&A!==null&&window.scrollTo({top:A}),{target:f,transitionEnd:r}}else return{target:t,transitionEnd:r}};function wO(e,t,n,r){return BO(t)?xO(e,t,n,r):{target:t,transitionEnd:r}}const TO=(e,t,n,r)=>{const o=IO(e,t,r);return t=o.target,r=o.transitionEnd,wO(e,t,n,r)},Bd={current:null},RI={current:!1};function PO(){if(RI.current=!0,!!Cl)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Bd.current=e.matches;e.addListener(t),t()}else Bd.current=!1}function SO(e,t,n){const{willChange:r}=t;for(const o in t){const s=t[o],l=n[o];if(pn(s))e.addValue(o,s),Ml(r)&&r.add(o),process.env.NODE_ENV==="development"&&ud(s.version==="10.16.4",`Attempting to mix Framer Motion versions ${s.version} with 10.16.4 may not work as expected.`);else if(pn(l))e.addValue(o,Si(s,{owner:e})),Ml(r)&&r.remove(o);else if(l!==s)if(e.hasValue(o)){const u=e.getValue(o);!u.hasAnimated&&u.set(s)}else{const u=e.getStaticValue(o);e.addValue(o,Si(u!==void 0?u:s,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const DI=new WeakMap,kI=Object.keys(js),OO=kI.length,FI=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],jO=MA.length;class MO{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:s},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>Bt.render(this.render,!1,!0);const{latestValues:u,renderState:A}=s;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=A,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=l,this.isControllingVariants=Il(n),this.isVariantNode=hC(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{});for(const C in p){const h=p[C];u[C]!==void 0&&pn(h)&&(h.set(u[C],!1),Ml(f)&&f.add(C))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,DI.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((n,r)=>this.bindToMotionValue(r,n)),RI.current||PO(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Bd.current,process.env.NODE_ENV!=="production"&&ud(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){DI.delete(this.current),this.projection&&this.projection.unmount(),Rr(this.notifyUpdate),Rr(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=ko.has(t),o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Bt.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,o,s){let l,u;if(process.env.NODE_ENV!=="production"&&o&&r){const A="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?Ls(!1,A):Br(!1,A)}for(let A=0;A<OO;A++){const f=kI[A],{isEnabled:p,Feature:C,ProjectionNode:h,MeasureLayout:E}=js[f];h&&(l=h),p(n)&&(!this.features[f]&&C&&(this.features[f]=new C(this)),E&&(u=E))}if(!this.projection&&l){this.projection=new l(this.latestValues,this.parent&&this.parent.projection);const{layoutId:A,layout:f,drag:p,dragConstraints:C,layoutScroll:h,layoutRoot:E}=n;this.projection.setOptions({layoutId:A,layout:f,alwaysMeasureLayout:!!p||C&&Ti(C),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:s,layoutScroll:h,layoutRoot:E})}return u}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Wt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,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<FI.length;r++){const o=FI[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s=t["on"+o];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=SO(this,this.scrapeMotionValuesFromProps(t,this.prevProps),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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<jO;r++){const o=MA[r],s=this.props[o];(Os(s)||s===!1)&&(n[o]=s)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(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=Si(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,o=typeof r=="string"||typeof r=="object"?(n=zA(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!pn(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new cd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class LI extends MO{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:o},s){let l=_S(r,t||{},this);if(o&&(n&&(n=o(n)),r&&(r=o(r)),l&&(l=o(l))),s){XS(this,r,l);const u=TO(this,r,l,n);n=u.transitionEnd,r=u.target}return{transition:t,transitionEnd:n,...r}}}function RO(e){return window.getComputedStyle(e)}class DO extends LI{readValueFromInstance(t,n){if(ko.has(n)){const r=id(n);return r&&r.default||0}else{const r=RO(t),o=(yC(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return tI(t,n)}build(t,n,r,o){kA(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n){return HA(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;pn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,o){jC(t,n,r,o)}}class kO extends LI{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ko.has(n)){const r=id(n);return r&&r.default||0}return n=MC.has(n)?n:VA(n),t.getAttribute(n)}measureInstanceViewportBox(){return Wt()}scrapeMotionValuesFromProps(t,n){return DC(t,n)}build(t,n,r,o){LA(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){RC(t,n,r,o)}mount(t){this.isSVGTag=NA(t.tagName),super.mount(t)}}const FO=(e,t)=>RA(e)?new kO(t,{enableHardwareAcceleration:!1}):new DO(t,{enableHardwareAcceleration:!0}),LO={...A4,...kP,...pO,...{layout:{ProjectionNode:SI,MeasureLayout:oI}}},Ll=UT((e,t)=>yP(e,t,LO,FO)),NO=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function NI(...e){const t=w.useRef(0),[n,r]=w.useState(e[t.current]),o=w.useCallback(s=>{t.current=typeof s!="number"?NO(0,e.length,t.current+1):s,r(e[t.current])},[e.length,...e]);return[n,o]}function VI({children:e,type:t="scale",direction:n="right",offset:r=10,scale:o={hover:1.05,tap:.95}}){let s,l;switch(n){case"up":case"left":s=r,l=0;break;case"right":case"down":default:s=0,l=r;break}const[u,A]=NI(s,l),[f,p]=NI(s,l);switch(t){case"rotate":return g.jsx(Ll.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:e});case"slide":return n==="up"||n==="down"?g.jsx(Ll.div,{animate:{y:f!==void 0?f:""},onHoverEnd:()=>p(),onHoverStart:()=>p(),children:e}):g.jsx(Ll.div,{animate:{x:u!==void 0?u:""},onHoverEnd:()=>A(),onHoverStart:()=>A(),children:e});case"scale":default:return typeof o=="number"&&(o={hover:o,tap:o}),g.jsx(Ll.div,{whileHover:{scale:o==null?void 0:o.hover},whileTap:{scale:o==null?void 0:o.tap},children:e})}}VI.propTypes={children:c.node,offset:c.number,type:c.oneOf(["slide","scale","rotate"]),direction:c.oneOf(["up","down","left","right"]),scale:c.oneOfType([c.number,c.object])};function VO(e){return Lt("MuiSvgIcon",e)}Ht("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const HO=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],zO=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Pe(t)}`,`fontSize${Pe(n)}`]};return nn(o,VO,r)},WO=Ae("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Pe(n.color)}`],t[`fontSize${Pe(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,s,l,u,A,f,p,C,h,E,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||(l=s.pxToRem)==null?void 0:l.call(s,20))||"1.25rem",medium:((u=e.typography)==null||(A=u.pxToRem)==null?void 0:A.call(u,24))||"1.5rem",large:((f=e.typography)==null||(p=f.pxToRem)==null?void 0:p.call(f,35))||"2.1875rem"}[t.fontSize],color:(C=(h=(e.vars||e).palette)==null||(h=h[t.color])==null?void 0:h.main)!=null?C:{action:(E=(e.vars||e).palette)==null||(E=E.action)==null?void 0:E.active,disabled:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.disabled,inherit:void 0}[t.color]}}),vd=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:l="inherit",component:u="svg",fontSize:A="medium",htmlColor:f,inheritViewBox:p=!1,titleAccess:C,viewBox:h="0 0 24 24"}=r,E=Ue(r,HO),m=k.isValidElement(o)&&o.type==="svg",B=W({},r,{color:l,component:u,fontSize:A,instanceFontSize:t.fontSize,inheritViewBox:p,viewBox:h,hasSvgAsChild:m}),v={};p||(v.viewBox=h);const j=zO(B);return g.jsxs(WO,W({as:u,className:Ye(j.root,s),focusable:"false",color:f,"aria-hidden":C?void 0:!0,role:C?"img":void 0,ref:n},v,E,m&&o.props,{ownerState:B,children:[m?o.props.children:o,C?g.jsx("title",{children:C}):null]}))});process.env.NODE_ENV!=="production"&&(vd.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),c.string]),component:c.elementType,fontSize:c.oneOfType([c.oneOf(["inherit","large","medium","small"]),c.string]),htmlColor:c.string,inheritViewBox:c.bool,shapeRendering:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),titleAccess:c.string,viewBox:c.string}),vd.muiName="SvgIcon";const HI=vd;function yd(e,t){function n(r,o){return g.jsx(HI,W({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=HI.muiName,k.memo(k.forwardRef(n))}const UO=yd(g.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function YO(e){return Lt("MuiAvatar",e)}Ht("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const GO=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],KO=e=>{const{classes:t,variant:n,colorDefault:r}=e;return nn({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},YO,t)},JO=Ae("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e,ownerState:t})=>W({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.variant==="square"&&{borderRadius:0},t.colorDefault&&W({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}))),XO=Ae("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),ZO=Ae(UO,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function _O({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,s]=k.useState(!1);return k.useEffect(()=>{if(!n&&!r)return;s(!1);let l=!0;const u=new Image;return u.onload=()=>{l&&s("loaded")},u.onerror=()=>{l&&s("error")},u.crossOrigin=e,u.referrerPolicy=t,u.src=n,r&&(u.srcset=r),()=>{l=!1}},[e,t,n,r]),o}const zI=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiAvatar"}),{alt:o,children:s,className:l,component:u="div",imgProps:A,sizes:f,src:p,srcSet:C,variant:h="circular"}=r,E=Ue(r,GO);let m=null;const B=_O(W({},A,{src:p,srcSet:C})),v=p||C,j=v&&B!=="error",R=W({},r,{colorDefault:!j,component:u,variant:h}),x=KO(R);return j?m=g.jsx(XO,W({alt:o,srcSet:C,src:p,sizes:f,ownerState:R,className:x.img},A)):s!=null?m=s:v&&o?m=o[0]:m=g.jsx(ZO,{ownerState:R,className:x.fallback}),g.jsx(JO,W({as:u,ownerState:R,className:Ye(x.root,l),ref:n},E,{children:m}))});process.env.NODE_ENV!=="production"&&(zI.propTypes={alt:c.string,children:c.node,classes:c.object,className:c.string,component:c.elementType,imgProps:c.object,sizes:c.string,src:c.string,srcSet:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["circular","rounded","square"]),c.string])});const qO=zI,rn=(e,t)=>{switch(t){case"secondary":return e.palette.secondary;case"error":return e.palette.error;case"warning":return e.palette.warning;case"info":return e.palette.info;case"success":return e.palette.success;default:return e.palette.primary}};function $O({theme:e,color:t,type:n}){const r=rn(e,t),{lighter:o,light:s,main:l,contrastText:u}=r;switch(n){case"filled":return{color:u,backgroundColor:l};case"outlined":return{color:l,border:"1px solid",borderColor:l,backgroundColor:"transparent"};case"combined":return{color:l,border:"1px solid",borderColor:s,backgroundColor:o};default:return{color:l,backgroundColor:o}}}function ej(e){switch(e){case"badge":return{border:"2px solid",fontSize:"0.675rem",width:20,height:20};case"xs":return{fontSize:"0.75rem",width:24,height:24};case"sm":return{fontSize:"0.875rem",width:32,height:32};case"lg":return{fontSize:"1.2rem",width:52,height:52};case"xl":return{fontSize:"1.5rem",width:64,height:64};case"md":default:return{fontSize:"1rem",width:40,height:40}}}const tj=Ae(qO,{shouldForwardProp:e=>e!=="color"&&e!=="type"&&e!=="size"})(({theme:e,variant:t,color:n,type:r,size:o})=>({...ej(o),...$O({variant:t,theme:e,color:n,type:r}),...o==="badge"&&{borderColor:e.palette.background.default}}));function Gs({variant:e="circular",children:t,color:n="primary",type:r,size:o="md",...s}){const l=Pt();return g.jsx(tj,{variant:e,theme:l,color:n,type:r,size:o,...s,children:t})}Gs.propTypes={children:c.node,color:c.string,type:c.string,size:c.string,variant:c.string};const WI={p:2.5,"& .MuiCardHeader-action":{m:"0px auto",alignSelf:"center"}},Wn=w.forwardRef(({border:e=!0,boxShadow:t,children:n,subheader:r,content:o=!0,contentSX:s={},darkTitle:l,divider:u=!0,elevation:A,secondary:f,shadow:p,sx:C={},title:h,modal:E=!1,color:m="default",...B},v)=>{const j=Pt();return t=j.palette.mode==="dark"?t||!0:t,g.jsxs(b.Card,{elevation:A||0,ref:v,...B,sx:{position:"relative",border:e?"1px solid":"none",borderRadius:1,borderColor:j.palette.mode==="dark"?j.palette.divider:j.palette.grey.A800,boxShadow:t&&(!e||j.palette.mode==="dark")?p||j.customShadows.z1:"inherit",":hover":{boxShadow:t?p||j.customShadows.z1:"inherit"},backgroundColor:m==="default"?j.palette.background.paper:Bi(m==="primary"?j.palette.primary[100]:j.palette.secondary[100],.5),...E&&{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:"calc( 100% - 50px)",sm:"auto"},"& .MuiCardContent-root":{overflowY:"auto",minHeight:"auto",maxHeight:"calc(100vh - 200px)"}},...C},children:[!l&&h&&g.jsx(b.CardHeader,{sx:WI,titleTypographyProps:{variant:"subtitle1"},title:h,action:f,subheader:r}),l&&h&&g.jsx(b.CardHeader,{sx:WI,title:g.jsx(b.Typography,{variant:"h4",children:h}),action:f}),h&&u&&g.jsx(b.Divider,{}),o&&g.jsx(b.CardContent,{sx:s,children:n}),!o&&n]})});Wn.propTypes={border:c.bool,boxShadow:c.bool,children:c.oneOfType([c.node,c.arrayOf(c.node)]),subheader:c.oneOfType([c.node,c.string]),content:c.bool,contentClass:c.string,contentSX:c.object,darkTitle:c.bool,divider:c.bool,elevation:c.number,secondary:c.oneOfType([c.node,c.string,c.object]),shadow:c.string,sx:c.object,title:c.oneOfType([c.node,c.string,c.object]),modal:c.bool,color:c.oneOf(["default","primary","secondary"])};var bd={exports:{}},ct={};/**
|
|
98
98
|
* @license React
|
|
99
99
|
* react-is.production.min.js
|
|
100
100
|
*
|
|
@@ -215,7 +215,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
215
215
|
animation: ${0} 1.4s linear infinite;
|
|
216
216
|
`),A3)),p3=Ae("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),h3=Ae("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Pe(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>W({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&Xt.css(gm||(gm=Ul`
|
|
217
217
|
animation: ${0} 1.4s ease-in-out infinite;
|
|
218
|
-
`),d3)),fm=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:l=!1,size:u=40,style:A,thickness:f=3.6,value:p=0,variant:C="indeterminate"}=r,h=Ue(r,u3),E=W({},r,{color:s,disableShrink:l,size:u,thickness:f,value:p,variant:C}),m=g3(E),B={},v={},j={};if(C==="determinate"){const R=2*Math.PI*((uo-f)/2);B.strokeDasharray=R.toFixed(3),j["aria-valuenow"]=Math.round(p),B.strokeDashoffset=`${((100-p)/100*R).toFixed(3)}px`,v.transform="rotate(-90deg)"}return g.jsx(f3,W({className:Ye(m.root,o),style:W({width:u,height:u},v,A),ownerState:E,ref:n,role:"progressbar"},j,h,{children:g.jsx(p3,{className:m.svg,ownerState:E,viewBox:`${uo/2} ${uo/2} ${uo} ${uo}`,children:g.jsx(h3,{className:m.circle,style:B,ownerState:E,cx:uo,cy:uo,r:(uo-f)/2,fill:"none",strokeWidth:f})})}))});process.env.NODE_ENV!=="production"&&(fm.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","error","info","success","warning"]),c.string]),disableShrink:Cr(c.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:c.oneOfType([c.number,c.string]),style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),thickness:c.number,value:c.number,variant:c.oneOf(["determinate","indeterminate"])});const Dd=fm;function C3(e){return Lt("MuiLoadingButton",e)}const Nr=Ht("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),E3=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],I3=e=>{const{loading:t,loadingPosition:n,classes:r}=e,o={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${Pe(n)}`],endIcon:[t&&`endIconLoading${Pe(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Pe(n)}`]},s=ir.unstable_composeClasses(o,C3,r);return W({},r,s)},m3=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",B3=Ae(l3,{shouldForwardProp:e=>m3(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${Nr.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${Nr.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>W({[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},e.loadingPosition==="center"&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${Nr.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),v3=Ae("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Pe(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>W({position:"absolute",visibility:"visible",display:"flex"},t.loadingPosition==="start"&&(t.variant==="outlined"||t.variant==="contained")&&{left:t.size==="small"?10:14},t.loadingPosition==="start"&&t.variant==="text"&&{left:6},t.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},t.loadingPosition==="end"&&(t.variant==="outlined"||t.variant==="contained")&&{right:t.size==="small"?10:14},t.loadingPosition==="end"&&t.variant==="text"&&{right:6},t.loadingPosition==="start"&&t.fullWidth&&{position:"relative",left:-10},t.loadingPosition==="end"&&t.fullWidth&&{position:"relative",right:-10})),pm=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiLoadingButton"}),{children:o,disabled:s=!1,id:l,loading:u=!1,loadingIndicator:A,loadingPosition:f="center",variant:p="text"}=r,C=Ue(r,E3),h=$u(l),E=A??g.jsx(Dd,{"aria-labelledby":h,color:"inherit",size:16}),m=W({},r,{disabled:s,loading:u,loadingIndicator:E,loadingPosition:f,variant:p}),B=I3(m),v=u?g.jsx(v3,{className:B.loadingIndicator,ownerState:m,children:E}):null;return g.jsxs(B3,W({disabled:s||u,id:h,ref:n},C,{variant:p,classes:B,ownerState:m,children:[m.loadingPosition==="end"?o:v,m.loadingPosition==="end"?v:o]}))});process.env.NODE_ENV!=="production"&&(pm.propTypes={children:c.node,classes:c.object,disabled:c.bool,id:c.string,loading:c.bool,loadingIndicator:c.node,loadingPosition:Cr(c.oneOf(["start","end","center"]),e=>e.loadingPosition==="start"&&!e.startIcon?new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.'):e.loadingPosition==="end"&&!e.endIcon?new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.'):null),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["contained","outlined","text"]),c.string])});const y3=pm;function kd({variant:e,theme:t,color:n,loadingPosition:r}){const o=rn(t,n),{lighter:s,main:l,dark:u,contrastText:A}=o,f=`${n}Button`,p=ki(t,f),C={"& .MuiLoadingButton-loadingIndicator":{color:l}},h={...r&&r!=="center"&&{color:l}},E={"&::after":{boxShadow:`0 0 6px 6px ${He(l,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${He(l,.9)}`},"&:focus-visible":{outline:`2px solid ${u}`,outlineOffset:2}};switch(e){case"contained":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...E};case"light":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...E};case"shadow":return{boxShadow:p,backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{boxShadow:"none",backgroundColor:u,color:A},...E};case"outlined":return{backgroundColor:"transparent",borderColor:l,...h,...C};case"dashed":return{backgroundColor:s,borderColor:l,...h,...C,...E};case"text":default:return{color:l,...C,...E}}}const b3=Ae(y3,{shouldForwardProp:e=>e!=="shape"&&e!=="variant"})(({theme:e,variant:t,shape:n,color:r,loading:o,loadingPosition:s})=>({"::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:n==="rounded"?"50%":4,opacity:0,transition:"all 0.5s"},":active::after":{position:"absolute",borderRadius:n==="rounded"?"50%":4,left:0,top:0,opacity:1,transition:"0s"},...t==="text"&&{...kd({variant:t,theme:e,color:r,loadingPosition:s}),"&.MuiButton-sizeMedium":{height:36},"&.MuiButton-sizeSmall":{height:30},"&.MuiButton-sizeLarge":{height:44}},...n&&{minWidth:0,"&.MuiButton-sizeMedium":{width:36,height:36},"&.MuiButton-sizeSmall":{width:30,height:30},"&.MuiButton-sizeLarge":{width:44,height:44},...n==="rounded"&&{borderRadius:"50%"}},...t==="outlined"&&{border:"1px solid"},...t==="dashed"&&{border:"1px dashed"},...(t==="contained"||t==="shadow")&&!o&&{color:"#fff"},...t!=="text"&&{...kd({variant:t,theme:e,color:r,loadingPosition:s})},"&.Mui-disabled":{...t!=="text"&&{...kd({variant:t,theme:e,color:r,loadingPosition:s})}}})),Fd=w.forwardRef(({variant:e="text",shape:t,children:n,color:r="primary",...o},s)=>{const l=Pt();return g.jsx(b3,{ref:s,variant:e,shape:t,theme:l,loadingPosition:o.loadingPosition,loading:o.loading,color:r,...o,children:n})});Fd.propTypes={variant:c.string,shape:c.string,children:c.node,color:c.string},Fd.displayName="LoadingButton";function Q3({color:e,theme:t,labelColor:n}){const r=rn(t,e),{main:o,contrastText:s}=r;let l=e||"";return["primary","secondary","info","success","warning","error"].includes(l)?{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:o,color:n||s},[`& .${b.tooltipClasses.arrow}`]:{color:o}}:{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:l,color:n||s,boxShadow:t.shadows[1]},[`& .${b.tooltipClasses.arrow}`]:{color:l}}}const x3=Ae(({className:e,...t})=>g.jsx(b.Tooltip,{...t,classes:{popper:e}}),{shouldForwardProp:e=>e!=="color"&&e!=="labelColor"})(({theme:e,color:t,labelColor:n})=>({...t&&Q3({color:t,theme:e,labelColor:n})}));function Ld({children:e,arrow:t,labelColor:n="",...r}){const o=Pt();return g.jsx(b.Box,{display:"flex",children:g.jsx(x3,{arrow:t,...r,theme:o,labelColor:n,children:e})})}Ld.propTypes={children:c.element,arrow:c.bool,labelColor:c.string,rest:c.array};const Ao=w.forwardRef(({children:e,position:t="top-left",type:n="grow",direction:r="up",...o},s)=>{let l={transformOrigin:"0 0 0"};switch(t){case"top-right":l={transformOrigin:"top right"};break;case"top":l={transformOrigin:"top"};break;case"bottom-left":l={transformOrigin:"bottom left"};break;case"bottom-right":l={transformOrigin:"bottom right"};break;case"bottom":l={transformOrigin:"bottom"};break;case"top-left":default:l={transformOrigin:"0 0 0"};break}return g.jsxs(b.Box,{ref:s,children:[n==="grow"&&g.jsx(b.Grow,{...o,timeout:{appear:0,enter:150,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="collapse"&&g.jsx(b.Collapse,{...o,sx:l,children:e}),n==="fade"&&g.jsx(b.Fade,{...o,timeout:{appear:0,enter:300,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="slide"&&g.jsx(b.Slide,{...o,timeout:{appear:0,enter:150,exit:150},direction:r,children:g.jsx(b.Box,{sx:l,children:e})}),n==="zoom"&&g.jsx(b.Zoom,{...o,children:g.jsx(b.Box,{sx:l,children:e})})]})});Ao.propTypes={children:c.node,type:c.oneOf(["grow","fade","collapse","slide","zoom"]),position:c.oneOf(["top-left","top-right","top","bottom-left","bottom-right","bottom"]),direction:c.oneOf(["up","down","left","right"])},w.forwardRef(function(t,n){return g.jsx(b.Zoom,{ref:n,timeout:200,...t})});function hm({value:e,...t}){return g.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[g.jsx(b.CircularProgress,{variant:"determinate",value:e,...t}),g.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e)}%`})})]})}hm.propTypes={value:c.number};function Cm({value:e,size:t,variant:n,thickness:r,showLabel:o,pathColor:s,sx:l,...u}){return g.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[g.jsx(b.CircularProgress,{variant:"determinate",sx:{color:s||"grey.200"},size:t,thickness:r,...u,value:100}),o&&g.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:e?`${Math.round(e)}%`:"0%"})}),g.jsx(b.CircularProgress,{variant:n,sx:{...l,position:"absolute",left:0,[`& .${b.circularProgressClasses.circle}`]:{strokeLinecap:"round"}},size:t,thickness:r,value:e,...u})]})}Cm.propTypes={value:c.number,size:c.number,variant:c.string,thickness:c.number,showLabel:c.bool,pathColor:c.string,sx:c.array,others:c.array};function Em({icon:e,value:t,...n}){return g.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(b.Box,{sx:{width:"100%",mr:1},children:g.jsx(b.LinearProgress,{variant:"determinate",value:t,...n})}),g.jsx(b.Box,{sx:{minWidth:35},children:e})]})}Em.propTypes={icon:c.node,value:c.number};function Im({value:e,...t}){return g.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(b.Box,{sx:{width:"100%",mr:1},children:g.jsx(b.LinearProgress,{variant:"determinate",value:e,...t})}),g.jsx(b.Box,{sx:{minWidth:35},children:g.jsx(b.Typography,{variant:"body2",color:"text.secondary",children:`${Math.round(e)}%`})})]})}Im.propTypes={value:c.number};const w3=w.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary"},{defaults:!0});return g.jsx(Fi,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),Js=w.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return g.jsx(b.ToggleButton,{ref:n,...t,color:"secondary",sx:r})}),mm=w.createContext({});function T3(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=S.useResourceContext(),o=S.useDataProvider(),{search:s}=fi.useLocation(),l=`${r}/new`,u=w.useCallback(()=>{if(!t||!ge.isFunction(o.get))return Promise.resolve({});const h={};return new URLSearchParams(s??"").forEach((E,m)=>{h[m]=E}),o.get(l,h).then(E=>E.data).then(E=>{const{responseCode:m,value:B}=E;return m==="ok"?B:Promise.reject(E)})},[r,t,s,o]),A=w.useMemo(()=>ge.chain(n).extend({queryKey:[r,s],queryFn:u}).value(),[r,s,u,n]),{data:f,isLoading:p}=Hu.useQuery(A),C=ge.omit(e,["useDefaults"]);return p?g.jsx(b.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:g.jsx(b.CircularProgress,{})}):g.jsx(mm.Provider,{value:f??{},children:g.jsx(S.Create,{...C})})}function P3(){return w.useContext(mm)}const S3=Ae(T3,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main>.MuiPaper-root:first-of-type":{overflow:"visible",backgroundColor:e.palette.background.default}})),O3=Ts(S.Toolbar,{name:"RaApplicaToolbar",slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}})),lr=e=>g.jsx(O3,{...e});lr.defaultProps={...S.Toolbar.defaultProps},lr.propTypes={...S.Toolbar.propTypes};const Nd=({children:e,content:t,title:n,subheader:r,secondary:o,toolbar:s,...l})=>{const u=S.useTranslate(),A=S.useResourceContext(),{cardTitle:f,cardSubheader:p}=w.useMemo(()=>{const C=n||`resources.${A}.title`;return{cardTitle:u(C,{_:C}),cardSubheader:r!==null?u(r,{_:r}):null}},[A,r,n,u]);return g.jsx(b.Grid,{item:!0,...l,children:g.jsx(Wn,{content:t,title:f,subheader:p,secondary:o,divider:!0,children:g.jsxs(w.Fragment,{children:[e,s===!0?g.jsx(lr,{children:g.jsx(S.SaveButton,{})}):s]})})})};Nd.defaultProps={...b.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12},Nd.propTypes={...b.Grid.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),contained:c.bool,content:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object]),spacing:c.number,toolbar:c.oneOfType([c.node,c.bool])};const j3=Ae(S.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),Yl=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:o}=wn();return g.jsx(j3,{defaultValues:n,spacing:t||o,children:g.jsx(b.Grid,{container:!0,...r,spacing:t||o,children:e})})};Yl.propTypes={...b.Grid.propTypes,...S.Form.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),spacing:c.number,defaultValues:c.oneOfType([c.object,c.func]),record:c.object,validate:c.func},Yl.defaultProps={...b.Stack.defaultProps},Yl.Section=Nd;const M3=Ts(S.SimpleForm,{name:"RaApplicaSimpleForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?0:1)},[e.breakpoints.down("sm")]:{paddingBottom:0}})),Gl=({title:e,modal:t,content:n,subheader:r,secondary:o,sx:s,...l})=>{const u=SA(e),A=S.useRecordContext();return g.jsx(Wn,{content:n,title:u,subheader:r,secondary:A!=null&&A.id?o:null,sx:{...s,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!t,divider:!0,children:g.jsx(M3,{toolbar:g.jsx(lr,{}),...l})})};Gl.defaultProps={modal:!1,content:!1,subheader:null,title:null,toolbar:g.jsx(lr,{children:g.jsx(S.SaveButton,{type:"button"})}),secondary:g.jsx(Ro,{children:g.jsx(S.DeleteWithConfirmButton,{})})},Gl.propTypes={...S.SimpleForm.propTypes,modal:c.bool,content:c.bool,contained:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object])};const Kl=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:l,...u})=>{const A=Xt.useTheme(),{getCurrentDialog:f}=Do(),{source:p,resource:C,isRequired:h}=u,{getFieldState:E,formState:m}=Oo.useFormContext(),{error:B}=E(p,m),v=f();return g.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:B?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&g.jsx(b.InputLabel,{error:!!B,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(S.FieldTitle,{label:e,source:p,resource:v||C,isRequired:h})}),w.isValidElement(t)?w.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!B,children:r})]})};Kl.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},Kl.defaultProps={display:"label",divider:!1};const R3=Ae(S.ArrayInput,{name:"ApplicaArrayInput",slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}})),D3=({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s})=>g.jsx(Kl,{label:e,addLabel:t,source:n,helperText:r,divider:o,children:g.jsx(R3,{source:n,label:!1,...s})}),Vd=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:g.jsxs(Ro,{children:[e&&g.jsx(S.EditButton,{}),t&&g.jsx(S.DeleteWithConfirmButton,{}),n&&g.jsx(S.CloneButton,{})]});Vd.defaultProps={canEdit:!0,canDelete:!0,canClone:!1},Vd.propTypes={canEdit:c.bool,canDelete:c.bool,canClone:c.bool};const Bm=Ae("div",{name:"ApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),k3=Ae("ul")({display:"inline-block"}),vm=e=>{var p;const{className:t,emptyText:n,source:r,title:o,...s}=e,l=de.useRecordContext(e),u=dt.get(l,r),A=de.useTranslate();if(!u)return n?g.jsx(b.Typography,{component:"span",variant:"body2",className:t,...s,children:n&&A(n,{_:n})}):g.jsx(Bm,{className:t,...s});if(Array.isArray(u))return g.jsx(k3,{className:t,...s,children:u.map((C,h)=>{var m;const E=o instanceof String?(m=dt.get(C,o))==null?void 0:m.toString():o;return g.jsx("li",{children:E},h)})});const f=o instanceof String?(p=dt.get(l,o))==null?void 0:p.toString():o;return g.jsx(Bm,{className:t,...s,children:f})};vm.propTypes={className:c.string,emptyText:c.string,source:c.string.isRequired,src:c.string,title:c.oneOfType([c.string,c.element]),target:c.string,download:c.oneOfType([c.bool,c.string]),ping:c.string,rel:c.string};const Hd=({entityId:e,property:t,disabled:n,userResource:r="entities/user",...o})=>{const[s,l]=w.useState(null),u=S.useRecordContext(o),A=S.useDataProvider(),f=S.useResourceContext(),p=w.useCallback(async E=>{E.preventDefault(),E.stopPropagation();const m=dt.get(u,o==null?void 0:o.source),B=f.replace("entities/",""),v=await A.getFile(`/attachments/${B}/${e||(u==null?void 0:u.id)}/${t||(o==null?void 0:o.source)}/${(m==null?void 0:m.id)||(u==null?void 0:u.id)}`),j=document.createElement("a");j.href=v,j.download=dt.get(u,(o==null?void 0:o.title)||(o==null?void 0:o.source)),j.click()},[A,u,e,f,t,o==null?void 0:o.source,o==null?void 0:o.title]),C=w.useMemo(()=>({...u,[o==null?void 0:o.source]:(u==null?void 0:u.src)||dt.get(u,o==null?void 0:o.source),[o==null?void 0:o.title]:(u==null?void 0:u.title)||dt.get(u,(o==null?void 0:o.title)||(o==null?void 0:o.source))}),[u,o==null?void 0:o.source,o==null?void 0:o.title]),h=S.useTranslate();return w.useEffect(()=>{!u||!(u!=null&&u.userId)||A.getOne(r,{id:u==null?void 0:u.userId}).then(({data:E})=>l(E)).catch(()=>l(null))},[u,A,r]),g.jsx(vm,{...o,disabled:n,record:C,onClick:p,title:g.jsxs(b.Box,{sx:{cursor:"pointer"},children:[g.jsx(b.Typography,{variant:"subtitle1",children:dt.get(C,(o==null?void 0:o.title)||(o==null?void 0:o.source))}),g.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[dt.get(C,"sizeDescription"),s&&" | ",s&&h("ra.attachment.info",{user:s==null?void 0:s.name,created:Mr(C==null?void 0:C.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};Hd.propTypes={...S.FileField.propTypes,source:c.string,title:c.string,disabled:c.bool};const F3=Ae(S.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),Xs=e=>{const t=`_${e==null?void 0:e.source}`;return g.jsx(F3,{...e,source:t})};Xs.propTypes={...S.ImageField.propTypes,source:c.string};const Jl=({width:e,height:t,circle:n,justify:r,record:o,...s})=>{const l=w.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5}),[e,t,n]),u=S.useRecordContext(),A=o||u;return g.jsx(Xs,{sx:f=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${f.palette.divider}`,objectFit:"cover !important",...l,minWidth:l.width,minHeight:l.height}}),...s,record:A})};Jl.defaultProps={...Xs.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"},Jl.propTypes={...Xs.propTypes,width:c.oneOfType([c.number,c.string]),height:c.oneOfType([c.number,c.string]),circle:c.bool,justify:c.oneOf(["flex-start","center","flex-end"])};var ym={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Hn,function(){return function(n,r,o){n=n||{};var s=r.prototype,l={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(f,p,C,h){return s.fromToBase(f,p,C,h)}o.en.relativeTime=l,s.fromToBase=function(f,p,C,h,E){for(var m,B,v,j=C.$locale().relativeTime||l,R=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],x=R.length,O=0;O<x;O+=1){var P=R[O];P.d&&(m=h?o(f).diff(C,P.d,!0):C.diff(f,P.d,!0));var N=(n.rounding||Math.round)(Math.abs(m));if(v=m>0,N<=P.r||!P.r){N<=1&&O>0&&(P=R[O-1]);var F=j[P.l];E&&(N=E(""+N)),B=typeof F=="string"?F.replace("%d",N):F(N,p,P.l,v);break}}if(p)return B;var X=v?j.future:j.past;return typeof X=="function"?X(B):X.replace("%s",B)},s.to=function(f,p){return u(f,p,this,!0)},s.from=function(f,p){return u(f,p,this)};var A=function(f){return f.$u?o.utc():o()};s.toNow=function(f){return this.to(A(this),f)},s.fromNow=function(f){return this.from(A(this),f)}}})})(ym);var L3=ym.exports;const N3=$r(L3);Mr.extend(N3);const Xl=e=>{const t=S.useRecordContext(e),[n]=S.useLocaleState(),r=w.useMemo(()=>Mr(dt.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return g.jsxs(w.Fragment,{children:[g.jsx(S.DateField,{record:t,source:e.source,showTime:!0}),g.jsx("br",{}),g.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})};Xl.displayName="DateAgoField",Xl.propTypes={source:c.string.isRequired};const bm=Ae(S.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));bm.propTypes={...S.DateField.propTypes};const zd=e=>g.jsx(bm,{...e});zd.defaultProps={...S.DateField.defaultProps,variant:"body1"},zd.propTypes={...S.DateField.propTypes};const Qm=Ae(S.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));Qm.propTypes={...S.EmailField.propTypes};const Wd=e=>g.jsx(Qm,{...e});Wd.defaultProps={...S.EmailField.defaultProps,variant:"body1"},Wd.propTypes={...S.EmailField.propTypes};const V3=Ae(S.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),Ud=({...e})=>{const t=S.useRecordContext(e),n=w.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=dt.get(t,`_${e==null?void 0:e.source}`,dt.get(t,e==null?void 0:e.source)),s=dt.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),l=document.createElement("a");l.href=o,l.download=s,l.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return g.jsx(V3,{...e,record:t,onClick:n})};Ud.propTypes={...S.FileField.propTypes,source:c.string,title:c.string};const xm=e=>g.jsx(S.FunctionField,{...e});xm.defaultProps={variant:"body1"};const wm=Ae(S.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));wm.propTypes={...S.TextField.propTypes};const Zl=e=>g.jsx(wm,{...e});Zl.defaultProps={...S.TextField.defaultProps,variant:"body1"},Zl.propTypes={...S.TextField.propTypes};function H3(e){const t=b.useTheme(),n=de.useLocales(),{source:r=""}=e,o=de.useRecordContext(e),s=o[r],l=!wA(s,n),u=Ir(e,{flex:1}),[A]=de.useLocaleState(),f=w.useMemo(()=>l?g.jsx(et.FlagFilled,{style:{color:t.palette.warning.main}}):g.jsx(et.FlagOutlined,{}),[l]),p=w.useMemo(()=>g.jsx(b.Stack,{children:ge.map(n,(C,h)=>g.jsx(b.Typography,{children:`${C.locale.toUpperCase()}: ${(s??{})[C.locale]??""}`},h))}),[s,n]);return g.jsx(Ld,{title:p,arrow:!1,children:g.jsxs(b.Stack,{alignItems:"center",direction:"row",gap:1,children:[f,g.jsx(Zl,{...e,source:`${r}.${A}`,sx:u})]})})}const z3=Ae("div")(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),Yd=({source:e,defaultValue:t,...n})=>{const r=S.useRecordContext(n),o=dt.get(r,e,t);return g.jsx("span",{dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})};Yd.propTypes={defaultValue:c.any,source:c.string,record:c.object},Yd.defaultProps={defaultValue:" "};const Tm=({title:e,children:t})=>e&&e!==!1?g.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t;Tm.propTypes={title:c.oneOfType([c.string,c.bool]),children:c.oneOfType([c.element,c.arrayOf(c.element)])};const Gd=({label:e,source:t,defaultValue:n,children:r,tooltip:o,...s})=>{const{getCurrentDialog:l}=Do(),u=S.useRecordContext(s),A=S.useResourceContext(s),f=l(),p=w.useMemo(()=>!o||o===!1?!1:typeof o=="function"?o(u):typeof o=="string"?dt.get(u,o,o):o,[u,o]);return g.jsx(Tm,{title:p,children:g.jsxs(w.Fragment,{children:[g.jsx(b.InputLabel,{children:g.jsx(S.FieldTitle,{label:e,source:t,resource:f||A})}),g.jsx(z3,{...s,children:w.cloneElement(r,{source:t,record:u,defaultValue:n,resource:f||A})})]})})};Gd.propTypes={defaultValue:c.any,tooltip:c.oneOfType([c.string,c.bool,c.func]),source:c.string,label:c.string,name:c.string,children:c.element},Gd.defaultProps={defaultValue:" ",children:g.jsx(Yd,{})};const Kd=function({children:e,className:t}){return g.jsx("div",{className:t,children:e})};Kd.defaultProps={children:null,className:""},Kd.propTypes={children:c.node,className:c.string};const W3=Ts(Kd,{name:"RaApplicaReferenceManyField",slot:"root"})(({theme:e,margin:t,border:n,bulkActionButtons:r})=>({marginLeft:t?0:`-${e.spacing(2.5)}`,marginRight:t?0:`-${e.spacing(2.5)}`,borderBottom:n?`1px solid ${e.palette.divider}`:"none","& form":{padding:e.spacing(2)},"& .MuiCardContent-root":{borderTop:n?`1px solid ${e.palette.divider}`:"none"},"& .MuiToolbar-root":{[e.breakpoints.up("sm")]:{marginTop:`-${e.spacing(2)}`,marginBottom:e.spacing(t?0:1),marginLeft:e.spacing(t?1:2),marginRight:e.spacing(t?1:2),width:t?"auto":`calc(100% - ${e.spacing(5)})`},[e.breakpoints.down("md")]:{marginTop:0}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:r===!1?0:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 34px)"}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`},"& .MuiTablePagination-toolbar":{marginTop:e.spacing(1),marginBottom:0},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0},"& .RaBulkActionsToolbar-toolbar":{minHeight:48,bottom:-56,"& h6":{marginTop:e.spacing(.5)},"& .RaBulkActionsToolbar-topToolbar":{marginTop:e.spacing(1)},[e.breakpoints.down("sm")]:{bottom:-48,borderRadius:0}}})),Li=e=>g.jsx(W3,{...e,children:g.jsx(S.ReferenceManyField,{pagination:g.jsx(S.Pagination,{}),...e})});Li.defaultProps={margin:!1,border:!1},Li.propTypes={...S.ReferenceManyField.propTypes,margin:c.bool,border:c.bool};const Pm=({source:e,...t})=>{const n=S.useRecordContext(t),r=dt.get(n,e,0),o=r/1024,s=o/1024,l=s/1024,u=l>1?`${l.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return g.jsx(b.Typography,{component:"span",variant:"body1",...t,children:u})};Pm.propTypes={record:c.object,source:c.string};const nt=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:l,...u})=>{const A=Xt.useTheme(),{getCurrentDialog:f}=Do(),{source:p,resource:C,isRequired:h}=u,{fieldState:{invalid:E}}=S.useInput(u),m=f();return g.jsxs(b.Stack,{spacing:1,sx:{width:u!=null&&u.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:E?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&g.jsx(b.InputLabel,{error:E===!0,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(S.FieldTitle,{label:e,source:p,resource:m||C,isRequired:h})}),w.isValidElement(t)?w.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:E===!0,children:r})]})};nt.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},nt.defaultProps={display:"label",divider:!1};const U3=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},Y3=Ae(S.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...U3(e)})),Jd=({children:e,disabled:t,type:n,...r})=>{const o=S.useRecordContext(r),s=r==null?void 0:r.source,l=o==null?void 0:o.id;return S.useInput({source:`__${n}__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),g.jsx(nt,{...r,children:g.jsx(Y3,{disabled:t,children:w.cloneElement(e,{...e.props,entityId:l,property:s})})})};Jd.propTypes={...S.FileInput.propTypes,children:c.node,multiple:c.bool,disabled:c.bool},Jd.defaultProps={children:g.jsx(Hd,{title:"name",source:"path"}),multiple:!0,disabled:!1,type:"attachment"};const G3=Ae(S.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"}})),Xd=({...e})=>g.jsx(nt,{...e,children:g.jsx(G3,{})});Xd.propTypes={...S.AutocompleteArrayInput.propTypes,...nt.propTypes},Xd.defaultProps={...S.AutocompleteArrayInput.defaultProps,size:"small"};const K3=Ae(S.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall":{paddingTop:"4px"}})),Zd=e=>{const{perPage:t,...n}=e;return g.jsx(nt,{...n,children:g.jsx(K3,{})})};Zd.propTypes={...S.AutocompleteInput.propTypes,...nt.propTypes},Zd.defaultProps={...S.AutocompleteInput.defaultProps,size:"small"};const J3=Ae(S.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({})),_d=({horizontal:e,...t})=>{const n=Pt();return g.jsx(nt,{...t,sx:e?{flexDirection:e?"row":"column",alignItems:e?"center":"flex-start","& .MuiFormGroup-root":{margin:0},"& .MuiFormControlLabel-root":{margin:0,"& .MuiTypography-root":{display:"none",visibility:"hidden"},"& .MuiSwitch-root":{marginRight:`-${n.spacing(.5)}`}}}:{},children:g.jsx(J3,{})})};_d.defaultProps={...S.BooleanInput.defaultProps,...nt.defaultProps},_d.propTypes={...S.BooleanInput.propTypes,...nt.propTypes,horizontal:c.bool};const X3=Ae(S.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),qd=e=>g.jsx(nt,{...e,children:g.jsx(X3,{})});qd.propTypes={...S.DateInput.propTypes,...nt.propTypes},qd.defaultProps={...S.DateInput.defaultProps,...nt.defaultProps};const Z3=Ae(S.DateTimeInput,{name:"RaApplicaDateTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),$d=e=>g.jsx(nt,{...e,children:g.jsx(Z3,{})});$d.propTypes={...S.DateTimeInput.propTypes,...nt.propTypes},$d.defaultProps={...nt.defaultProps};const _3=Ae(S.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}})),eg=({children:e,title:t,...n})=>{const r=Oo.useWatch({name:n.source}),o=S.useRecordContext(n),{source:s}=n,l=w.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const u=dt.get(o,s);if(u){const A=u.split("__");return A.length>0?A[A.length-1]:u}return u},[o,s,r]);return g.jsx(nt,{...n,children:g.jsx(_3,{children:w.cloneElement(e,{...e.props,title:t||s,source:s,record:{...o,[s]:(r==null?void 0:r.title)||dt.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||dt.get(o,`_${s}`),[t||s]:l}})})})};eg.propTypes={...S.FileInput.propTypes,source:c.string,title:c.string,children:c.node},eg.defaultProps={children:g.jsx(Ud,{})};const tg=({children:e,title:t,...n})=>{const r=Oo.useWatch({name:n.source}),o=S.useRecordContext(n),{source:s}=n;return S.useInput({source:`__image__${n==null?void 0:n.source}`,defaultValue:n==null?void 0:n.source}),g.jsx(nt,{...n,children:g.jsx(S.ImageInput,{accept:"image/*",children:w.cloneElement(e,{...e.props,title:t,source:s,record:{...o,[s]:(r==null?void 0:r.title)||dt.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||dt.get(o,`_${s}`)}})})})};tg.defaultProps={children:g.jsx(Jl,{}),multiple:!1},tg.propTypes={...S.ImageInput.propTypes,source:c.string,title:c.string,children:c.node,multiple:c.bool};const Pn=e=>g.jsx(nt,{...e,children:g.jsx(S.TextInput,{})});Pn.propTypes={...S.TextInput.propTypes,...nt.propTypes};const q3={vertical:"bottom",horizontal:"right"},$3={vertical:"top",horizontal:"right"};function eM(e){const{source:t}=e,{fieldState:n}=de.useInput(e),r=Oo.useWatch({name:t}),{error:o}=n,s=de.useLocales(),l=!wA(r,s),[u]=de.useLocaleState(),[A,f]=w.useState(u),[p,C]=w.useState(null),h=!!p,E=w.useCallback(v=>C(h?null:v.currentTarget),[h,C]),m=w.useCallback(()=>C(null),[C]),B=w.useMemo(()=>ge.map(s,(v,j)=>g.jsx(b.MenuItem,{onClick:()=>{f(v.locale),m()},children:g.jsx(b.ListItemText,{primary:`${v.locale.toUpperCase()}: ${(r??{})[v.locale]??""}`})},j)),[s,f,m,r]);return g.jsx(nt,{...e,helperText:o==null?void 0:o.message,children:g.jsxs(b.Box,{flex:1,children:[ge.map(s,(v,j)=>g.jsx(Pn,{...e,source:`${t}.${v.locale}`,sx:{width:"100%",display:v.locale===A?"inline-flex":"none"},label:!1,InputProps:{endAdornment:g.jsx(b.Chip,{label:g.jsx(b.Typography,{variant:"button",children:A}),size:"small",onClick:E,color:l?"warning":void 0})}},j)),g.jsx(b.Menu,{anchorEl:p,open:h,anchorOrigin:q3,transformOrigin:$3,onClose:m,children:B})]})})}const tM=Ae(S.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),ng=e=>g.jsx(nt,{...e,children:g.jsx(tM,{})});ng.propTypes={...S.NumberInput.propTypes,...nt.propTypes},ng.defaultProps={...S.NumberInput.defaultProps,...nt.defaultProps};const Sm=({source:e,minWidth:t=300,children:n})=>{const r=S.useResourceContext(),o=S.useRecordContext(),[s,l]=w.useState(dt.get(o,e,"")),[u,A]=w.useState(!1),f=w.useCallback(m=>l(m.target.value),[]),p=S.useDataProvider(),C=w.useCallback(m=>{m.key==="Enter"&&(A(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,o,e]),h=w.useCallback(()=>{dt.get(o,e)!==s&&(A(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,e,o]),E=w.useCallback(m=>{A(!0),p.update(r,{id:o.id,data:{...o,[e]:m,_changed:e}}).then(()=>A(!1))},[p,r,e,o]);return w.useEffect(()=>l(dt.get(o,e)),[o,e]),n?w.cloneElement(n,{...n.props,source:e,value:s,onChange:E}):g.jsx(b.TextField,{value:s,disabled:u,onChange:f,onKeyPress:C,onBlur:h,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})};Sm.propTypes={source:c.string.isRequired,minWidth:c.number,children:c.element};const rg=({children:e,...t})=>g.jsx(S.ReferenceArrayInput,{...t,children:w.cloneElement(e,{...t,source:e.props.source||t.source})});rg.propTypes={...S.ReferenceArrayInput.propTypes,children:c.element},rg.defaultProps={...S.ReferenceArrayInput.defaultProps};const og=({children:e,...t})=>g.jsx(S.ReferenceInput,{...t,children:w.cloneElement(e,{...t,source:e.props.source||t.source})});og.propTypes={...S.ReferenceInput.propTypes,children:c.element},og.defaultProps={...S.ReferenceInput.defaultProps};const ig=({reference:e,target:t,children:n,filters:r,actions:o,...s})=>g.jsx(S.ResourceContextProvider,{value:e,children:g.jsx(Li,{perPage:5,pagination:g.jsx(S.Pagination,{}),...s,reference:e,target:t,children:g.jsxs(w.Fragment,{children:[g.jsx(S.ListToolbar,{filters:r,actions:o}),n]})})});ig.propTypes={...Li.propTypes,children:c.node.isRequired,reference:c.string.isRequired,target:c.string.isRequired,filters:c.oneOfType([c.element,c.func,c.element,c.arrayOf(c.node)]),actions:c.oneOfType([c.element,c.func,c.element])},ig.defaultProps={...Li.defaultProps};const nM=Ae(S.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),rM=e=>g.jsx(nM,{...e}),Om=Ae(S.SelectArrayInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .RaSelectArrayInput-chips > .RaSelectArrayInput-chip":{marginTop:"-2px",marginBottom:"-2px"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}}));Om.propTypes={...S.SelectArrayInput.propTypes};const sg=e=>g.jsx(nt,{...e,children:g.jsx(Om,{options:{autoWidth:!1}})});sg.defaultProps={optionText:"name",optionValue:"id"},sg.propTypes={...S.SelectArrayInput.propTypes,...nt.propTypes};const oM=Ae(S.SelectInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}})),jm=e=>g.jsx(nt,{...e,children:g.jsx(oM,{})});jm.propTypes={...S.SelectInput.propTypes,...nt.propTypes};const _l=({...e})=>{var u,A;const t=S.useTranslate(),n=S.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(A=(u=Oo.useController({name:e==null?void 0:e.source}))==null?void 0:u.field)==null?void 0:A.value;let o=e.helperText,s=e.validate;s?Array.isArray(s)&&s.indexOf(n)===-1&&s.push(n):s=[n];const l=t("app.input.max_length_info",{count:(r==null?void 0:r.length)||0,max:e==null?void 0:e.maxLength});return e!=null&&e.maxLength&&(o=o&&o.length>0?`${l} - ${t(o)}`:l),g.jsx(Pn,{...e,validate:s,helperText:o,inputProps:{maxLength:e==null?void 0:e.maxLength}})};_l.displayName="SmartTextInput",_l.defaultProps={multiline:!1},_l.propTypes={...Pn.propTypes,maxLength:c.number,multiline:c.bool,rows:c.number};const iM=e=>{if(!e)return"";const t=cC(e);return t?t.format("HH:mm"):""},sM=e=>e,aM=Ae(S.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),ag=e=>g.jsx(nt,{...e,children:g.jsx(aM,{})});ag.defaultProps={...S.TimeInput.defaultProps,format:iM,parse:sM},ag.propTypes={...S.TimeInput.propTypes,...nt.propTypes};const lg=({onSuccess:e,firstAccess:t})=>{const{spacing:n}=wn(),[r,o]=w.useState(!1),s=de.useAuthProvider(),l=de.useTranslate(),u=de.useNotify(),A=w.useCallback(f=>{const{oldPassword:p,newPassword:C}=f;o(!0),s==null||s.changePassword(p,C).then(()=>{u("ra.auth.password_changed"),e()}).catch(h=>{u((h==null?void 0:h.message)||(h==null?void 0:h.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e]);return g.jsx(de.ResourceContextProvider,{value:"user/change-password",children:g.jsx(de.EditContextProvider,{value:{record:{},resource:"user/change-password",save:A},children:g.jsx(Gl,{onSubmit:A,toolbar:g.jsx(lr,{children:g.jsx(S.SaveButton,{disabled:r})}),children:g.jsxs(b.Grid,{container:!0,spacing:n,children:[t===!0&&g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Alert,{severity:"warning",children:[g.jsx(b.AlertTitle,{children:l("ra.auth.first_access.change_password")}),l("ra.auth.first_access.change_password_helper")]})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Pn,{source:"oldPassword",type:"password",validate:de.required()})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Pn,{source:"newPassword",type:"password",validate:de.required()})})]})})})})},lM=Ae(S.Edit,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-card":{[e.breakpoints.down("sm")]:{marginBottom:e.spacing(6)}},"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{borderTop:`1px solid ${e.palette.divider}`},"& .RaEdit-main>.MuiPaper-root:first-of-type":{overflow:"visible",backgroundColor:e.palette.background.default}})),cM=Ae(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),uM=Ae(b.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`})),cg=({title:e,divider:t,variant:n})=>{const r=S.useTranslate();return g.jsxs(w.Fragment,{children:[g.jsx(cM,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&g.jsx(uM,{})]})};cg.propTypes={title:c.string.isRequired,divider:c.bool,variant:c.oneOf(["h1","h2","h3","h4","h5","h6"])},cg.defaultProps={divider:!0,variant:"h4"};const AM=Ae(b.Grid,{name:"ApplicaLongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root":{position:"initial",marginTop:e.spacing(2),marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,borderTop:`1px solid ${e.palette.divider}`,[e.breakpoints.down("sm")]:{position:"initial !important",width:"auto !important",marginRight:0}},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function Mm(e){const{spacing:t}=wn(),{spacing:n=t}=e,r=ge.omit(e,["spacing"]);return g.jsx(S.Form,{...r,children:g.jsx(AM,{container:!0,spacing:n*2,children:e.children})})}function ug(e){return e.id??e.label}function Rm(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function dM(e){return ge.map(e,"id")}function ql(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function Dm(e,t){const n=e!==void 0?ql(e):0;return ge.chain(t).filter(o=>e!==void 0?Rm(e,o.id):!0).filter(o=>ql(o.id)===n+1).value()}function gM(e,t){var s;const n=ge.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return ge.extend(n,{formRootPath:o});case"setSyncWithLocation":return ge.extend(n,{syncWithLocation:o});case"setErrorCount":return ge.extend(n,{errorCount:o});case"setActiveItem":return ge.includes(dM(e.items),o)?ge.extend(n,{activeItem:o}):n;case"addItem":{const{id:l}=o;return ge.extend(n,{items:ge.chain(n.items).clone().reject(u=>u.id===l).concat([o]).orderBy(u=>u.index).value()})}case"removeItem":{const l=ge.isString(o)?o:o.id,u=ge.chain(n.items).clone().reject(A=>A.id===l).value();return ge.extend(n,{items:u}),n.activeItem===l&&ge.extend(n,{activeItem:((s=ge.first(u))==null?void 0:s.id)??void 0}),n}default:return n}}const fM={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},km=w.createContext(void 0);function Fm(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=fi.useLocation(),[s,l]=w.useReducer(gM,ge.cloneDeep(fM)),{formRootPath:u,items:A}=s,f=w.useMemo(()=>({state:s,dispatch:l}),[s,l]);return w.useEffect(()=>{const p=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&p.push(r);const C=ge.chain(p).map(E=>fi.matchPath(E,o)).reject(E=>E===null).first().value(),h=C==null?void 0:C.pathnameBase;h!==void 0&&h!==u&&l({type:"setFormRootPath",payload:h})},[o,u,r]),w.useEffect(()=>{l({type:"setSyncWithLocation",payload:!!t})},[t,l]),w.useEffect(()=>{l({type:"setErrorCount",payload:!!n})},[n,l]),w.useEffect(()=>{var p;if(t&&u!==void 0){let C=o.replace(u,"").replace(new RegExp(/^\/?/),"");ge.isEmpty(C)&&(C=((p=ge.chain(A).filter(h=>Dm(h.id,A).length===0).orderBy([h=>ql(h.id),h=>h.index]).first().value())==null?void 0:p.id)??void 0),l({type:"setActiveItem",payload:C})}},[l,u,o,A]),g.jsx(km.Provider,{value:f,children:e.children})}function Lm(){const e=w.useContext(km);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function Zs(){return Lm().state}function Ag(){return Lm().dispatch}function Nm(){return Zs().formRootPath}function Vm(){return Zs().activeItem}function Hm(){return Zs().items}function zm(){return Zs().syncWithLocation}function Wm(){return Zs().errorCount}function Um(){const e=Ag();return w.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function Ym(){const e=Ag();return w.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function Gm(){const e=Ag();return w.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}var pM=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},Km=e=>e.firstChild?e.firstChild.offsetParent===e:!0,hM=(e,t)=>{let n=e,r=0;Km(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},CM=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},_s=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?_s="sticky":CSS.supports("position","-webkit-sticky")&&(_s="-webkit-sticky"));var $l=!1;try{const e=Object.defineProperty({},"passive",{get(){$l={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var dg=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),l=o(s()),u=()=>{Object.assign(l,o(s())),n()};return window.addEventListener("resize",u,$l),r.push(()=>window.removeEventListener("resize",u)),l}else{const s=o(t.getBoundingClientRect()),l=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},u=new ResizeObserver(l);return u.observe(t),r.push(()=>u.disconnect()),s}},EM=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},IM=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,l=pM(e);let u=!1;const A=()=>{u||requestAnimationFrame(()=>{const F=C();F!==x&&O(F),u=!1}),u=!0};let f=l===window?window.scrollY:l.scrollTop;const p=F=>{const{offsetTop:X,height:Z}=E,{naturalTop:Y}=v,{height:$}=j;return F+X+Z>=Y+$+R+o},C=()=>{const{height:F}=E,{height:X}=j;return X+s+o<=F?3:p(f)?1:2},h=l!==window&&Km(l),E=dg({el:l,onChange:A,unsubs:t,measure:({height:F,top:X})=>({height:F,offsetTop:h?X:0})}),m=CM(e),B=m===window?{top:0,bottom:0}:EM(m),v=dg({el:m,onChange:A,unsubs:t,measure:({height:F})=>({height:F-B.top-B.bottom,naturalTop:m===window?0:hM(m,l)+B.top+E.offsetTop})}),j=dg({el:e,onChange:A,unsubs:t,measure:({height:F})=>({height:F})});let R=0,x=C();const O=F=>{const X=x;if(x=F,X===2&&(R=-1),F===3){e.style.position=_s,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:Z,offsetTop:Y}=E,{height:$,naturalTop:ce}=v,{height:se}=j;if(F===2)if(e.style.position="relative",R=X===0?Math.max(0,Y+f-ce+s):Math.max(0,Y+f+Z-(ce+se+o)),r){const q=Math.max(0,$-se-R);e.style.bottom=`${q}px`}else e.style.top=`${R}px`;else e.style.position=_s,F===1?r?e.style.bottom=`${o}px`:e.style.top=`${Z-se-o}px`:r?e.style.bottom=`${Z-se-o}px`:e.style.top=`${s}px`};O(x);const P=F=>{if(F===f)return;const X=F-f;if(f=F,x===3)return;const{offsetTop:Z,height:Y}=E,{naturalTop:$,height:ce}=v,{height:se}=j;if(X>0)if(x===0){if(F+Z+s>$){const q=Math.max(0,Z+f-$+s);F+Z+Y<=$+se+q+o?O(2):O(1)}}else x===2&&p(F)&&O(1);else if(x===1){if(Z+F+Y<$+ce+o){const q=Math.max(0,Z+f+Y-($+se+o));Z+F+s>=$+q?O(2):O(0)}}else x===2&&Z+F+s<$+R&&O(0)},N=l===window?()=>P(window.scrollY):()=>P(l.scrollTop);l.addEventListener("scroll",N,$l),l.addEventListener("mousewheel",N,$l),t.push(()=>l.removeEventListener("scroll",N),()=>l.removeEventListener("mousewheel",N))},mM=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=w.useState(null);return w.useEffect(()=>{if(!r||!_s)return;const s=[];return IM(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(l=>l())}},[r,t,e,n]),o},BM=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:l}=e,u=mM({offsetTop:t,offsetBottom:n,bottom:r});return g.jsx("div",{className:s,style:l,ref:u,children:o})},vM=BM,Jm=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(Jm||{});function Xm(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=ge.omit(e,["sticky","disposition","spacing"]),s=t?vM:b.Box,l=w.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return g.jsx(b.Grid,{...o,item:!0,...n,children:g.jsx(s,{...l,children:g.jsx(b.Stack,{spacing:r,children:e.children})})})}function Zm(e){return g.jsx(g.Fragment,{children:e.children})}function _m(e){const{children:t}=e;return w.useMemo(()=>{const r={top:[],bottom:[]};return w.Children.forEach(t,o=>{if(w.isValidElement(o)&&(o==null?void 0:o.type)===Zm){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function qm(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=ge.omit(e,["disposition"]);return g.jsx(b.Grid,{...n,item:!0,...t,children:e.children})}function $m(e){const t=Vm();return t===void 0?!1:e===t||Rm(e,t)}function e0(e){const t=Hm();return w.useMemo(()=>Dm(e,t),[t,e])}function yM(){const e=Nm(),{search:t}=fi.useLocation(),n=fi.useNavigate();return w.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n])}function t0(){const e=e0();return g.jsx(b.Card,{variant:"outlined",children:g.jsx(b.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:ge.map(e,(t,n)=>g.jsx(gg,{...t},n))})})}function gg(e){const t=de.useTranslate()??ge.identity,n=n0(e),{selected:r,label:o,icon:s,onClick:l,badge:u,items:A,isGroup:f,level:p,errors:C=0}=n,{spacing:h}=wn(),[E,m]=w.useState(r),B=w.useCallback(R=>{m(!E),l(R)},[l,E]),v=s!==void 0,j=ge.omit(e,["label","icon","selected","badge"]);return w.useEffect(()=>{r&&!E&&m(r)},[r,E,m]),g.jsxs(g.Fragment,{children:[g.jsx(b.ListItem,{...j,disablePadding:!0,children:g.jsxs(b.ListItemButton,{selected:r&&!f,onClick:B,sx:{pl:h*p},children:[v&&g.jsx(b.ListItemIcon,{children:s}),g.jsx(b.ListItemText,{inset:!v,primary:C===0?t(o):g.jsx(b.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),u&&g.jsx(b.ListItemAvatar,{children:g.jsx(Gs,{type:"filled",size:"xs",color:u.color??"default",children:u.content})}),f&&(E?g.jsx(fn.ExpandLess,{}):g.jsx(fn.ExpandMore,{}))]})}),f&&g.jsx(b.Collapse,{in:E,timeout:"auto",children:g.jsx(b.List,{children:ge.map(A,(R,x)=>g.jsx(gg,{...R},x))})})]})}function n0(e){const{id:t}=e,n=$m(t),r=ql(t),o=yM(),s=zm(),l=Um(),u=e0(t),A=!ge.isEmpty(u),f=w.useCallback(C=>{A||(s?o(e.id):l(e.id)),ge.isFunction(e.onClick)&&e.onClick(C)},[l,o,e,s,A]);return w.useMemo(()=>({...e,selected:n,onClick:f,items:u,isGroup:A,level:r}),[e,n,f,u,A])}function r0(e=[],t){const n=ge.isArray(e)?e:[e],r=ge.filter(n,o=>w.isValidElement(o));ge.each(r,o=>{var s;t(o),r0(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}function o0(e){const{errors:t}=Oo.useFormState(),n=Wm(),{label:r,icon:o,badge:s,index:l=0,children:u}=e,A=ug(e),f=Ym(),p=Gm(),C=$m(A),h=[];n&&(e.sources!==void 0?h.push(...e.sources):r0(u,m=>{var B;((B=m==null?void 0:m.props)==null?void 0:B.source)!==void 0&&h.push(m.props.source)}));const E=ge.chain(h).uniq().map(m=>ge.get(t,m)).reject(m=>m===void 0).value().length;return w.useEffect(()=>{f({id:A,index:l,label:r,icon:o,badge:s,errors:E})},[f,p,r,o,A,s,l,E]),w.useEffect(()=>()=>{p(A)},[A]),g.jsx(b.Box,{display:C?"unset":"none",children:e.children})}function i0(e){const t=fg(e),n=ug(e);return g.jsx(o0,{...e,id:n,children:w.Children.map(t,r=>{const o=ug(r.props);return w.cloneElement(r,{id:`${n}.${o}`})})})}function s0(e){return g.jsx(o0,{...e})}function fg(e){const{children:t}=e;return w.useMemo(()=>ge.chain(w.Children.toArray(t)).filter(r=>w.isValidElement(r)&&((r==null?void 0:r.type)===s0||(r==null?void 0:r.type)===i0)).map((r,o)=>w.cloneElement(r,{index:o})).value(),[t])}function bM(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=ge.pick(e,["syncWithLocation","errorCount"]),s=ge.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:l,bottom:u}=_m(e),A=fg(e);return g.jsx(Fm,{...o,children:g.jsxs(Mm,{...s,spacing:r,children:[g.jsxs(Xm,{disposition:t,spacing:r,children:[l,g.jsx(t0,{}),u]}),g.jsx(qm,{disposition:n,children:A})]})})}const kt=bM;kt.BaseForm=Mm,kt.Content=qm,kt.Provider=Fm,kt.useItems=Hm,kt.useSyncWithLocation=zm,kt.useErrorCount=Wm,kt.useFormRootPath=Nm,kt.useActiveItem=Vm,kt.useSetActiveItem=Um,kt.useAddItem=Ym,kt.useRemoveItem=Gm,kt.Sidebar=Xm,kt.SidebarSection=Zm,kt.SidebarSectionPosition=Jm,kt.useSidebarChildren=_m,kt.NavMenu=t0,kt.NavMenuItem=gg,kt.useNavMenuItem=n0,kt.Tab=s0,kt.Group=i0,kt.useBaseItemChildren=fg;const QM=Ae(S.Show,{name:"RaApplicaShow",slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaShow-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaShow-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),xM=Ae(S.SimpleFormIterator,{name:"ApplicaSimpleFormIterator",root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}})),wM=Ts(S.TabbedForm,{name:"RaApplicaTabbedForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?0:1)},[e.breakpoints.down("sm")]:{paddingBottom:0}})),pg=e=>{const{title:t,modal:n,content:r,subheader:o,secondary:s,sx:l,...u}=e,A=SA(t);return g.jsx(Wn,{title:A,modal:n,content:r,subheader:o,secondary:s,sx:{...l,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!n,divider:!0,children:g.jsx(wM,{toolbar:g.jsx(lr,{}),...u})})};pg.defaultProps={toolbar:g.jsx(lr,{children:g.jsx(S.SaveButton,{type:"button"})}),secondary:g.jsx(Ro,{children:g.jsx(S.DeleteWithConfirmButton,{})})},pg.Tab=S.TabbedForm.Tab;const TM=k.forwardRef((e,t)=>{const{children:n,disabled:r,disableActions:o=!1,index:s,member:l,resource:u}=e,A=S.useTranslate(),[f,p]=k.useState(!1),{total:C,remove:h}=dC(),E=k.useCallback(()=>{p(!1),h(s)},[s,h]),m=w.useMemo(()=>({index:s,total:C,remove:()=>h(s)}),[s,C,h]);return g.jsxs(bA.Provider,{value:m,children:[w.Children.map(n,(B,v)=>{if(!w.isValidElement(B))return null;const{source:j,...R}=B.props;return g.jsx(b.TableCell,{sx:{border:0,verticalAlign:"top"},children:w.cloneElement(B,{source:j?`${l}.${j}`:l,index:j?void 0:v,resource:u,disabled:r,...R,label:""})})}),!o&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",border:0,pt:2.5},children:g.jsx(Ro,{horizontal:!0,children:g.jsx(b.Typography,{color:"error",onClick:()=>p(!0),children:A("ra.action.delete")})})}),n.length>0&&g.jsx(S.Confirm,{isOpen:f,title:A("ra.action.remove_item"),content:A("ra.message.remove_item"),onConfirm:E,onClose:()=>p(!1)})]})});var PM=Array.isArray,ec=PM,SM=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,OM=SM,jM=OM,MM=typeof self=="object"&&self&&self.Object===Object&&self,RM=jM||MM||Function("return this")(),tc=RM,DM=tc,kM=DM.Symbol,nc=kM,a0=nc,l0=Object.prototype,FM=l0.hasOwnProperty,LM=l0.toString,qs=a0?a0.toStringTag:void 0;function NM(e){var t=FM.call(e,qs),n=e[qs];try{e[qs]=void 0;var r=!0}catch{}var o=LM.call(e);return r&&(t?e[qs]=n:delete e[qs]),o}var VM=NM,HM=Object.prototype,zM=HM.toString;function WM(e){return zM.call(e)}var UM=WM,c0=nc,YM=VM,GM=UM,KM="[object Null]",JM="[object Undefined]",u0=c0?c0.toStringTag:void 0;function XM(e){return e==null?e===void 0?JM:KM:u0&&u0 in Object(e)?YM(e):GM(e)}var hg=XM;function ZM(e){return e!=null&&typeof e=="object"}var rc=ZM,_M=hg,qM=rc,$M="[object Symbol]";function eR(e){return typeof e=="symbol"||qM(e)&&_M(e)==$M}var Cg=eR,tR=ec,nR=Cg,rR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oR=/^\w*$/;function iR(e,t){if(tR(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||nR(e)?!0:oR.test(e)||!rR.test(e)||t!=null&&e in Object(t)}var sR=iR;function aR(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var A0=aR,lR=hg,cR=A0,uR="[object AsyncFunction]",AR="[object Function]",dR="[object GeneratorFunction]",gR="[object Proxy]";function fR(e){if(!cR(e))return!1;var t=lR(e);return t==AR||t==dR||t==uR||t==gR}var d0=fR,pR=tc,hR=pR["__core-js_shared__"],CR=hR,Eg=CR,g0=function(){var e=/[^.]+$/.exec(Eg&&Eg.keys&&Eg.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ER(e){return!!g0&&g0 in e}var IR=ER,mR=Function.prototype,BR=mR.toString;function vR(e){if(e!=null){try{return BR.call(e)}catch{}try{return e+""}catch{}}return""}var yR=vR,bR=d0,QR=IR,xR=A0,wR=yR,TR=/[\\^$.*+?()[\]{}|]/g,PR=/^\[object .+?Constructor\]$/,SR=Function.prototype,OR=Object.prototype,jR=SR.toString,MR=OR.hasOwnProperty,RR=RegExp("^"+jR.call(MR).replace(TR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function DR(e){if(!xR(e)||QR(e))return!1;var t=bR(e)?RR:PR;return t.test(wR(e))}var kR=DR;function FR(e,t){return e==null?void 0:e[t]}var LR=FR,NR=kR,VR=LR;function HR(e,t){var n=VR(e,t);return NR(n)?n:void 0}var oc=HR,zR=oc,WR=zR(Object,"create"),ic=WR,f0=ic;function UR(){this.__data__=f0?f0(null):{},this.size=0}var YR=UR;function GR(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var KR=GR,JR=ic,XR="__lodash_hash_undefined__",ZR=Object.prototype,_R=ZR.hasOwnProperty;function qR(e){var t=this.__data__;if(JR){var n=t[e];return n===XR?void 0:n}return _R.call(t,e)?t[e]:void 0}var $R=qR,eD=ic,tD=Object.prototype,nD=tD.hasOwnProperty;function rD(e){var t=this.__data__;return eD?t[e]!==void 0:nD.call(t,e)}var oD=rD,iD=ic,sD="__lodash_hash_undefined__";function aD(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=iD&&t===void 0?sD:t,this}var lD=aD,cD=YR,uD=KR,AD=$R,dD=oD,gD=lD;function Ni(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ni.prototype.clear=cD,Ni.prototype.delete=uD,Ni.prototype.get=AD,Ni.prototype.has=dD,Ni.prototype.set=gD;var fD=Ni;function pD(){this.__data__=[],this.size=0}var hD=pD;function CD(e,t){return e===t||e!==e&&t!==t}var ED=CD,ID=ED;function mD(e,t){for(var n=e.length;n--;)if(ID(e[n][0],t))return n;return-1}var sc=mD,BD=sc,vD=Array.prototype,yD=vD.splice;function bD(e){var t=this.__data__,n=BD(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():yD.call(t,n,1),--this.size,!0}var QD=bD,xD=sc;function wD(e){var t=this.__data__,n=xD(t,e);return n<0?void 0:t[n][1]}var TD=wD,PD=sc;function SD(e){return PD(this.__data__,e)>-1}var OD=SD,jD=sc;function MD(e,t){var n=this.__data__,r=jD(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var RD=MD,DD=hD,kD=QD,FD=TD,LD=OD,ND=RD;function Vi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Vi.prototype.clear=DD,Vi.prototype.delete=kD,Vi.prototype.get=FD,Vi.prototype.has=LD,Vi.prototype.set=ND;var VD=Vi,HD=oc,zD=tc,WD=HD(zD,"Map"),UD=WD,p0=fD,YD=VD,GD=UD;function KD(){this.size=0,this.__data__={hash:new p0,map:new(GD||YD),string:new p0}}var JD=KD;function XD(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ZD=XD,_D=ZD;function qD(e,t){var n=e.__data__;return _D(t)?n[typeof t=="string"?"string":"hash"]:n.map}var ac=qD,$D=ac;function ek(e){var t=$D(this,e).delete(e);return this.size-=t?1:0,t}var tk=ek,nk=ac;function rk(e){return nk(this,e).get(e)}var ok=rk,ik=ac;function sk(e){return ik(this,e).has(e)}var ak=sk,lk=ac;function ck(e,t){var n=lk(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var uk=ck,Ak=JD,dk=tk,gk=ok,fk=ak,pk=uk;function Hi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Hi.prototype.clear=Ak,Hi.prototype.delete=dk,Hi.prototype.get=gk,Hi.prototype.has=fk,Hi.prototype.set=pk;var h0=Hi,C0=h0,hk="Expected a function";function Ig(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(hk);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var l=e.apply(this,r);return n.cache=s.set(o,l)||s,l};return n.cache=new(Ig.Cache||C0),n}Ig.Cache=C0;var Ck=Ig,Ek=Ck,Ik=500;function mk(e){var t=Ek(e,function(r){return n.size===Ik&&n.clear(),r}),n=t.cache;return t}var Bk=mk,vk=Bk,yk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bk=/\\(\\)?/g,Qk=vk(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(yk,function(n,r,o,s){t.push(o?s.replace(bk,"$1"):r||n)}),t}),xk=Qk;function wk(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var E0=wk,I0=nc,Tk=E0,Pk=ec,Sk=Cg,Ok=1/0,m0=I0?I0.prototype:void 0,B0=m0?m0.toString:void 0;function v0(e){if(typeof e=="string")return e;if(Pk(e))return Tk(e,v0)+"";if(Sk(e))return B0?B0.call(e):"";var t=e+"";return t=="0"&&1/e==-Ok?"-0":t}var jk=v0,Mk=jk;function Rk(e){return e==null?"":Mk(e)}var Dk=Rk,kk=ec,Fk=sR,Lk=xk,Nk=Dk;function Vk(e,t){return kk(e)?e:Fk(e,t)?[e]:Lk(Nk(e))}var Hk=Vk,zk=Cg,Wk=1/0;function Uk(e){if(typeof e=="string"||zk(e))return e;var t=e+"";return t=="0"&&1/e==-Wk?"-0":t}var Yk=Uk,Gk=Hk,Kk=Yk;function Jk(e,t){t=Gk(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Kk(t[n++])];return n&&n==r?e:void 0}var Xk=Jk,Zk=Xk;function _k(e,t,n){var r=e==null?void 0:Zk(e,t);return r===void 0?n:r}var qk=_k;const $k=$r(qk),y0=e=>{var q,J;const{children:t,resource:n,source:r,label:o,disableActions:s=!1,disableAdd:l=!1,disableRemove:u=!1,className:A,empty:f,template:p={}}=e,[C,h]=w.useState(!1),{fields:E,remove:m,replace:B,append:v}=S.useArrayInput(e),{resetField:j}=Oo.useFormContext(),R=Pt(),x=de.useTranslate(),O=de.useRecordContext(e),P=w.useRef(p||{}),N=de.useTranslateLabel(),F=w.useCallback(H=>{m(H)},[m]);if(E.length>0){const{...H}=E[0];P.current=H;for(const K in P.current)P.current[K]=null}const X=w.useCallback((H=void 0)=>{let K=H;H==null&&(K=P.current,w.Children.count(t)===1&&k.isValidElement(w.Children.only(t))&&!w.Children.only(t).props.source&&w.Children.map(t,ee=>k.isValidElement(ee)&&ee.type!==de.FormDataConsumer).some(Boolean)?K="":(K=K||{},w.Children.forEach(t,ee=>{k.isValidElement(ee)&&ee.type!==de.FormDataConsumer&&ee.props.source&&(K[ee.props.source]=ee.props.defaultValue??null)})));const L={...K,...p};v(L),j(`${r}.${E.length}`,{defaultValue:K})},[v,t,j,r,E.length,p]),Z=H=>K=>{X(),H&&H(K)},Y=w.useCallback(()=>{B([]),h(!1)},[B]),$=$k(O,r),ce=w.useMemo(()=>({total:E.length,remove:F,source:r}),[E.length,F,r]),se=R.palette.mode==="dark"?R.palette.grey.A400:R.palette.grey.A800;return E?g.jsx(yA.Provider,{value:ce,children:g.jsxs("div",{className:A,children:[k.cloneElement(g.jsx(b0,{}),{label:o,source:r,disableAdd:l,template:p,onClick:Z((J=(q=e==null?void 0:e.addButton)==null?void 0:q.props)==null?void 0:J.onClick)}),g.jsx(b.TableContainer,{component:b.Paper,sx:{mt:2,border:`1px solid ${se}`},children:g.jsxs(b.Table,{children:[g.jsx(b.TableHead,{sx:{borderTop:0,borderBottom:`1px solid ${se}`},children:g.jsxs(b.TableRow,{children:[w.Children.map(t,(H,K)=>k.isValidElement(H)?g.jsx(b.TableCell,{children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none",children:N({...H.props,resource:n})})},K):null),!s&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",verticalAlign:"top"},children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none"})},"actions")]})}),g.jsxs(b.TableBody,{children:[E.length===0&&g.jsx(b.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:g.jsx(b.TableCell,{colSpan:4+(s?0:1),align:"center",children:f||g.jsx(b.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),E.length>0&&E.map((H,K)=>g.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${se}}`},children:g.jsx(TM,{disableRemove:u,disableActions:s,index:K,member:`${r}.${K}`,onRemoveField:F,record:$&&$[K]||{},resource:n,source:r,children:t})},H.id))]})]})}),E.length>0&&g.jsx(S.Confirm,{isOpen:C,title:x("ra.action.clear_array_input"),content:x("ra.message.clear_array_input"),onConfirm:Y,onClose:()=>h(!1)})]})}):null},b0=e=>{const{label:t,disableAdd:n,onClick:r}=e,o=Pt(),s=o.palette.mode==="dark"?o.palette.grey.A400:o.palette.grey.A800,l=o.palette.mode==="light"?"#000000":"#FFFFFF";return g.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[t!==!1&&g.jsx(b.Typography,{children:t}),!n&&(k.isValidElement(e==null?void 0:e.addButton)?k.cloneElement(e==null?void 0:e.addButton,{onClick:r}):g.jsx(b.IconButton,{size:"small",color:"secondary",sx:{border:`1px solid ${s}`},onClick:r,children:g.jsx(et.PlusCircleOutlined,{style:{color:l}})}))]})},e5=Ae(y0,{name:"RaApplicaTableFormIterator",slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8)})`}}}));b0.propTypes={label:c.oneOfType([c.string,c.bool]),source:c.string,defaultValue:c.any},y0.propTypes={addButton:c.element,children:c.node,className:c.string,field:c.object,fields:c.array,fieldState:c.object,formState:c.object,record:c.object,source:c.string,label:c.oneOfType([c.string,c.bool]),resource:c.string,translate:c.func,disableAdd:c.bool,disableRemove:c.oneOfType([c.func,c.bool]),TransitionProps:c.shape({}),empty:c.oneOfType([c.node,c.string]),template:c.object};function t5(e,t){const n=ge.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=ge.chain(n.media).clone().extend(o).value();return ge.extend(n,{media:s})}case"updateDrawer":{const s=ge.chain(n.drawer).clone().extend(o).value();return ge.extend(n,{drawer:s})}case"updateLogo":{const s=ge.chain(n.logo).clone().extend(o).value();return ge.extend(n,{logo:s})}case"updateNotifications":{const s=ge.chain(n.notifications).clone().extend(o).value();return ge.extend(n,{notifications:s})}case"updateTheme":{const s=ge.chain(n.theme).clone().extend(o).value();return ge.extend(n,{theme:s})}default:return n}}const n5={drawer:{open:!0,width:260,handleDrawerToggle:()=>{}},media:{downMd:!1,downLg:!1,downXl:!1,horizontal:!1},logo:{},notifications:{enable:!0,resource:"entities/notification"},theme:{iconColor:"grey.300",iconColorOpen:"grey.100"}},Q0=w.createContext(void 0);function x0(e){var Z;const t=de.useAuthProvider(),n=de.useGetIdentity(),r=b.useTheme(),o=b.useMediaQuery(r.breakpoints.down("md")),s=b.useMediaQuery(r.breakpoints.down("lg")),l=b.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:u,isHorizontalLayout:A,menuOrientation:f,drawerWidth:p}=wn(),C=A(f)&&!s,{drawerOpen:h,openDrawer:E}=no(),m=w.useCallback(()=>{E(!h)},[h,E]),[B,v]=w.useState(!1),[j,R]=w.useReducer(t5,ge.chain(n5).clone().merge({drawer:{open:!u||h}}).value()),x=w.useCallback(()=>v(!1),[]),O=w.useMemo(()=>({state:j,dispatch:R}),[j,R]),{logoIcon:P,logoMain:N,enableNotification:F,notification:X}=e;return w.useEffect(()=>{R({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:l,horizontal:C}})},[f,o,s,l]),w.useEffect(()=>{R({type:"updateDrawer",payload:{open:h,width:p,handleDrawerToggle:m}})},[h,p,m]),w.useEffect(()=>{u||E(!l)},[l,u]),w.useEffect(()=>{R({type:"updateLogo",payload:{main:N,icon:P}})},[P,N]),w.useEffect(()=>{R({type:"updateNotifications",payload:{enable:F,resource:X??"entities/notification"}})},[F,X]),w.useEffect(()=>{R({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),w.useEffect(()=>{t.isImpersonating().then(Y=>{var $;v(!Y&&(($=n==null?void 0:n.data)==null?void 0:$.needToChangePassword)===!0)})},[(Z=n==null?void 0:n.data)==null?void 0:Z.needToChangePassword,t]),g.jsxs(Q0.Provider,{value:O,children:[g.jsx(b.Dialog,{open:B,maxWidth:"xs",fullWidth:!0,children:g.jsx(lg,{onSuccess:x,firstAccess:!0})}),e.children]})}function w0(e){return w.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s}=t;return g.jsx(x0,{logoIcon:r,logoMain:o,enableNotification:s,children:g.jsx(e,{ref:n,...t})})})}function mg(){const e=w.useContext(Q0);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function r5(){return mg().dispatch}function zi(){return mg().state}function Yn(){return zi().media}function Yo(){return zi().drawer}function T0(){return zi().logo}function lc(){return zi().notifications}function o5(){return zi().theme}const i5={ml:{xs:0,lg:-2}};function P0(){const{open:e,handleDrawerToggle:t}=Yo();return g.jsx(Js,{value:"drawer","aria-label":"open drawer",sx:i5,onChange:t,selected:e,children:e?g.jsx(et.MenuFoldOutlined,{}):g.jsx(et.MenuUnfoldOutlined,{})})}function S0(e){const t=w.useRef(),n=b.useTheme(),{downLg:r,horizontal:o}=Yn(),{open:s,width:l}=Yo(),u=r?b.AppBar:gC,A=Ir(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":s?`calc(100% - ${l}px)`:{xs:"100%",lg:"calc(100% - 60px)"}}),f={position:"fixed",color:"inherit",elevation:0,sx:A};return r||ge.extend(f,{open:s}),g.jsx(u,{ref:t,...f,children:g.jsxs(b.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&g.jsx(P0,{}),e.children]})})}function s5(e){const t=b.useTheme(),{notification:n,onClick:r,selected:o,divider:s}=e,{resource:l}=lc(),u=de.useNotify(),A=de.useRedirect(),[f]=de.useUpdate(l,{id:n==null?void 0:n.id,data:{...n,readed:Mr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(A(n==null?void 0:n.resource),r()):(r(),document.location.href=n==null?void 0:n.resource):r()},onFailure:()=>{u("resources.notifications.messages.readed.error","warning")}}),p=w.useCallback(()=>f(),[f]),[C]=de.useLocaleState(),h=w.useMemo(()=>Mr(n.created).locale(C).fromNow(),[n,C]);return g.jsx(b.ListItem,{disablePadding:!0,divider:s,children:g.jsxs(b.ListItemButton,{selected:o,onClick:p,children:[g.jsx(b.ListItemAvatar,{children:g.jsx(b.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:g.jsx(et.MessageOutlined,{})})}),g.jsx(b.ListItemText,{primary:n.title,secondary:n.content}),g.jsx(b.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),g.jsx(b.ListItemText,{primary:h,primaryTypographyProps:{variant:"caption"}})]})})}const a5={width:36,height:36,fontSize:"1rem"},l5={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function O0(){const{enable:e}=lc();return e?g.jsx(c5,{}):null}function c5(){const e=de.useTranslate(),t=b.useTheme(),{downMd:n}=Yn(),{resource:r}=lc(),[o,s]=w.useState([]),{data:l,isLoading:u}=de.useGetList(r,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),A=o.filter(E=>E.readed===null).length,{open:f,anchorEl:p,handleClose:C,handleToggle:h}=pl();return w.useEffect(()=>{!u&&l&&s(l??[])},[l,u]),g.jsxs(g.Fragment,{children:[g.jsx(Js,{value:"notifications",selected:f,onChange:h,children:g.jsx(b.Badge,{badgeContent:A,color:"primary",children:g.jsx(et.BellOutlined,{})})}),g.jsx(b.Popper,{placement:n?"bottom":"bottom-end",open:f,anchorEl:p,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[n?-5:0,9]}}]},children:({TransitionProps:E})=>g.jsx(Ao,{type:"grow",position:n?"top":"top-right",in:f,...E,children:g.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:g.jsx(b.ClickAwayListener,{onClickAway:C,children:g.jsxs(Wn,{title:"Notification",elevation:0,border:!1,content:!1,secondary:g.jsx(g.Fragment,{children:A>0&&g.jsx(b.Tooltip,{title:"Mark as all read",children:g.jsx(Fi,{color:"success",size:"small",children:g.jsx(et.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[g.jsx(b.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":a5,"& .MuiListItemSecondaryAction-root":{...l5,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:o.map((m,B)=>g.jsx(s5,{selected:A>0,notification:m,onClick:C,divider:B<o.length-1},m.id))}),g.jsx(b.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${r}`,LinkComponent:mt.Link,onClick:C,children:g.jsx(b.ListItemText,{primary:g.jsx(b.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})}),g.jsx(b.Divider,{})]})})})})})]})}const u5=()=>{const[e,t]=w.useState(!1),n=w.useCallback(()=>t(!1),[t]),r=w.useCallback(()=>t(!0),[t]),o=de.useTranslate();return g.jsxs(w.Fragment,{children:[g.jsxs(b.ListItemButton,{onClick:r,children:[g.jsx(b.ListItemIcon,{children:g.jsx(fn.Key,{})}),g.jsx(b.ListItemText,{primary:o("ra.auth.change_password")})]}),g.jsx(b.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:g.jsx(lg,{onSuccess:n})})]})},A5=()=>{const e=de.useLogout(),t=de.useTranslate();return g.jsx(w.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:e,children:[g.jsx(b.ListItemIcon,{children:g.jsx(fn.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:t("ra.auth.logout")})]})})},d5=()=>{const e=de.useTranslate(),t=de.useAuthProvider(),n=w.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t==null?void 0:t.stopImpersonating]),[r,o]=w.useState(!1);return w.useEffect(()=>{t.isImpersonating&&t.isImpersonating().then(s=>o(s))},[t,o]),r?g.jsx(w.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:n,children:[g.jsx(b.ListItemIcon,{children:g.jsx(fn.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null};function j0(){var E;const e=b.useTheme(),t=de.useDataProvider(),n=de.useAuthProvider(),{identity:r}=de.useGetIdentity(),o=r!==void 0&&r.image&&r.image!==null&&r.image!=="",[s,l]=w.useState(null),{open:u,anchorEl:A,handleToggle:f,handleClose:p}=pl(),C=de.useLogout(),h=w.useCallback(()=>{C()},[n,C]);return w.useEffect(()=>{o&&t.getFile("/profile/me/image").then(m=>l(m))},[t,o]),g.jsxs(g.Fragment,{children:[g.jsx(Js,{sx:{p:.25,width:"auto"},onClick:f,value:"profile",selected:u,children:g.jsxs(b.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[g.jsx(Gs,{alt:(E=r==null?void 0:r.name)==null?void 0:E.toUpperCase(),src:s,size:"xs"}),g.jsx(b.Typography,{variant:"subtitle1",children:r==null?void 0:r.name})]})}),g.jsx(ir.Popper,{placement:"bottom-end",open:u,anchorEl:A,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:m})=>{var B;return g.jsx(Ao,{type:"grow",position:"top-right",in:u,...m,children:g.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250}},children:g.jsx(b.ClickAwayListener,{onClickAway:p,children:g.jsxs(Wn,{elevation:0,border:!1,content:!1,children:[g.jsx(b.CardContent,{sx:{px:2.5,pt:3},children:g.jsxs(b.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[g.jsx(b.Grid,{item:!0,children:g.jsxs(b.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[g.jsx(Gs,{alt:"profile user",src:s,sx:{width:32,height:32}}),g.jsxs(b.Stack,{children:[g.jsx(b.Typography,{variant:"h6",children:r==null?void 0:r.name}),g.jsx(b.Typography,{variant:"body2",color:"textSecondary",children:(B=r==null?void 0:r.roles)==null?void 0:B.map(v=>v.name.replace("ROLE_","")).join(",")})]})]})}),g.jsx(b.Grid,{item:!0,children:g.jsx(b.Tooltip,{title:"Logout",children:g.jsx(Fi,{size:"large",sx:{color:"text.primary"},onClick:h,children:g.jsx(et.LogoutOutlined,{})})})})]})}),g.jsx(b.Grid,{container:!0,children:g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[g.jsx(u5,{}),g.jsx(A5,{}),g.jsx(d5,{})]})})})]})})})})}})]})}const M0=e=>{const t=Pt(),{downMd:n}=Yn(),{open:r,anchorEl:o,handleToggle:s,handleClose:l}=pl();return n?g.jsxs(g.Fragment,{children:[g.jsx(Js,{"aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:s,selected:r,children:g.jsx(et.MoreOutlined,{})}),g.jsx(b.Popper,{placement:"bottom-end",open:r,anchorEl:o,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:u})=>g.jsx(Ao,{type:"fade",in:r,...u,children:g.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1},children:g.jsx(b.ClickAwayListener,{onClickAway:l,children:g.jsx(b.AppBar,{color:"inherit",children:g.jsx(b.Toolbar,{children:e.children})})})})})})]}):g.jsx(g.Fragment,{children:e.children})};function R0(e){return g.jsx(b.Box,{...e,flex:1})}function $s(e){const{name:t,version:n}=e;return g.jsx(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{p:"24px 16px 0px",mt:"auto"},children:g.jsxs(b.Typography,{variant:"caption",children:[g.jsx("span",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.copy)||""}})," ",t," - ",n]})})}$s.propTypes={name:c.string.isRequired,version:c.string.isRequired,copy:c.string},$s.defaultProps={copy:"© Applica Software Guru for"};var D0={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})(D0);var cc=D0.exports,Bg={};const g5=Hx($j);var k0;function uc(){return k0||(k0=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=g5}(Bg)),Bg}function F0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=F0(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function L0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=F0(e))&&(r&&(r+=" "),r+=t);return r}var f5="__lodash_hash_undefined__";function p5(e){return this.__data__.set(e,f5),this}var h5=p5;function C5(e){return this.__data__.has(e)}var E5=C5,I5=h0,m5=h5,B5=E5;function Ac(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new I5;++t<n;)this.add(e[t])}Ac.prototype.add=Ac.prototype.push=m5,Ac.prototype.has=B5;var N0=Ac;function v5(e,t){return e.has(t)}var V0=v5;function y5(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var H0=y5;function b5(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Q5=b5,x5=hg,w5=rc,T5="[object Arguments]";function P5(e){return w5(e)&&x5(e)==T5}var S5=P5,z0=S5,O5=rc,W0=Object.prototype,j5=W0.hasOwnProperty,M5=W0.propertyIsEnumerable,R5=z0(function(){return arguments}())?z0:function(e){return O5(e)&&j5.call(e,"callee")&&!M5.call(e,"callee")},D5=R5,k5=9007199254740991;function F5(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=k5}var L5=F5;function N5(e){return function(t){return e(t)}}var V5=N5,H5=d0,z5=L5;function W5(e){return e!=null&&z5(e.length)&&!H5(e)}var U5=W5,Y5=oc,G5=tc,K5=Y5(G5,"Set"),J5=K5,vg=globalThis&&globalThis.__assign||function(){return vg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},vg.apply(this,arguments)},X5=globalThis&&globalThis.__rest||function(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},U0=function(e){var t=e.className,n=e.sx,r=X5(e,["className","sx"]),o=de.useLoading(),s=Pt();return k.createElement(Z5,{className:t,sx:n},o?k.createElement(Dd,vg({className:L0("app-loader",dc.loader),color:"inherit",size:s.spacing(2),thickness:6},r)):k.createElement(OB,{className:dc.loadedIcon}))};U0.propTypes={classes:c.object,className:c.string,width:c.string};var yg="RaLoadingIndicator",dc={loader:"".concat(yg,"-loader"),loadedIcon:"".concat(yg,"-loadedIcon")},Z5=Ae("div",{name:yg,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={},t["& .".concat(dc.loader)]={marginLeft:n.spacing(1.5),marginRight:n.spacing(1.5)},t["& .".concat(dc.loadedIcon)]={},t});const bg=e=>e.scrollTop;function Wi(e,t){var n,r;const{timeout:o,easing:s,style:l={}}=e;return{duration:(n=l.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=l.transitionTimingFunction)!=null?r:typeof s=="object"?s[t.mode]:s,delay:l.transitionDelay}}const _5=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function q5(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),s=Ei(t);let l;if(t.fakeTransform)l=t.fakeTransform;else{const f=s.getComputedStyle(t);l=f.getPropertyValue("-webkit-transform")||f.getPropertyValue("transform")}let u=0,A=0;if(l&&l!=="none"&&typeof l=="string"){const f=l.split("(")[1].split(")")[0].split(",");u=parseInt(f[4],10),A=parseInt(f[5],10)}return e==="left"?o?`translateX(${o.right+u-r.left}px)`:`translateX(${s.innerWidth+u-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-u}px)`:`translateX(-${r.left+r.width-u}px)`:e==="up"?o?`translateY(${o.bottom+A-r.top}px)`:`translateY(${s.innerHeight+A-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-A}px)`:`translateY(-${r.top+r.height-A}px)`}function Y0(e){return typeof e=="function"?e():e}function gc(e,t,n){const r=Y0(n),o=q5(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const G0=k.forwardRef(function(t,n){const r=Pt(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:l,appear:u=!0,children:A,container:f,direction:p="down",easing:C=o,in:h,onEnter:E,onEntered:m,onEntering:B,onExit:v,onExited:j,onExiting:R,style:x,timeout:O=s,TransitionComponent:P=Td}=t,N=Ue(t,_5),F=k.useRef(null),X=Qn(A.ref,F,n),Z=L=>ee=>{L&&(ee===void 0?L(F.current):L(F.current,ee))},Y=Z((L,ee)=>{gc(p,L,f),bg(L),E&&E(L,ee)}),$=Z((L,ee)=>{const z=Wi({timeout:O,style:x,easing:C},{mode:"enter"});L.style.webkitTransition=r.transitions.create("-webkit-transform",W({},z)),L.style.transition=r.transitions.create("transform",W({},z)),L.style.webkitTransform="none",L.style.transform="none",B&&B(L,ee)}),ce=Z(m),se=Z(R),q=Z(L=>{const ee=Wi({timeout:O,style:x,easing:C},{mode:"exit"});L.style.webkitTransition=r.transitions.create("-webkit-transform",ee),L.style.transition=r.transitions.create("transform",ee),gc(p,L,f),v&&v(L)}),J=Z(L=>{L.style.webkitTransition="",L.style.transition="",j&&j(L)}),H=L=>{l&&l(F.current,L)},K=k.useCallback(()=>{F.current&&gc(p,F.current,f)},[p,f]);return k.useEffect(()=>{if(h||p==="down"||p==="right")return;const L=hh(()=>{F.current&&gc(p,F.current,f)}),ee=Ei(F.current);return ee.addEventListener("resize",L),()=>{L.clear(),ee.removeEventListener("resize",L)}},[p,h,f]),k.useEffect(()=>{h||K()},[h,K]),g.jsx(P,W({nodeRef:F,onEnter:Y,onEntered:ce,onEntering:$,onExit:q,onExited:J,onExiting:se,addEndListener:H,appear:u,in:h,timeout:O},N,{children:(L,ee)=>k.cloneElement(A,W({ref:X,style:W({visibility:L==="exited"&&!h?"hidden":void 0},x,A.props.style)},ee))}))});process.env.NODE_ENV!=="production"&&(G0.propTypes={addEndListener:c.func,appear:c.bool,children:hi.isRequired,container:Cr(c.oneOfType([jo,c.func]),e=>{if(e.open){const t=Y0(e.container);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `container` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
218
|
+
`),d3)),fm=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:l=!1,size:u=40,style:A,thickness:f=3.6,value:p=0,variant:C="indeterminate"}=r,h=Ue(r,u3),E=W({},r,{color:s,disableShrink:l,size:u,thickness:f,value:p,variant:C}),m=g3(E),B={},v={},j={};if(C==="determinate"){const R=2*Math.PI*((uo-f)/2);B.strokeDasharray=R.toFixed(3),j["aria-valuenow"]=Math.round(p),B.strokeDashoffset=`${((100-p)/100*R).toFixed(3)}px`,v.transform="rotate(-90deg)"}return g.jsx(f3,W({className:Ye(m.root,o),style:W({width:u,height:u},v,A),ownerState:E,ref:n,role:"progressbar"},j,h,{children:g.jsx(p3,{className:m.svg,ownerState:E,viewBox:`${uo/2} ${uo/2} ${uo} ${uo}`,children:g.jsx(h3,{className:m.circle,style:B,ownerState:E,cx:uo,cy:uo,r:(uo-f)/2,fill:"none",strokeWidth:f})})}))});process.env.NODE_ENV!=="production"&&(fm.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","error","info","success","warning"]),c.string]),disableShrink:Cr(c.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:c.oneOfType([c.number,c.string]),style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),thickness:c.number,value:c.number,variant:c.oneOf(["determinate","indeterminate"])});const Dd=fm;function C3(e){return Lt("MuiLoadingButton",e)}const Nr=Ht("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),E3=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],I3=e=>{const{loading:t,loadingPosition:n,classes:r}=e,o={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${Pe(n)}`],endIcon:[t&&`endIconLoading${Pe(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Pe(n)}`]},s=ir.unstable_composeClasses(o,C3,r);return W({},r,s)},m3=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",B3=Ae(l3,{shouldForwardProp:e=>m3(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${Nr.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${Nr.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>W({[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},e.loadingPosition==="center"&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${Nr.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),v3=Ae("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Pe(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>W({position:"absolute",visibility:"visible",display:"flex"},t.loadingPosition==="start"&&(t.variant==="outlined"||t.variant==="contained")&&{left:t.size==="small"?10:14},t.loadingPosition==="start"&&t.variant==="text"&&{left:6},t.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},t.loadingPosition==="end"&&(t.variant==="outlined"||t.variant==="contained")&&{right:t.size==="small"?10:14},t.loadingPosition==="end"&&t.variant==="text"&&{right:6},t.loadingPosition==="start"&&t.fullWidth&&{position:"relative",left:-10},t.loadingPosition==="end"&&t.fullWidth&&{position:"relative",right:-10})),pm=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiLoadingButton"}),{children:o,disabled:s=!1,id:l,loading:u=!1,loadingIndicator:A,loadingPosition:f="center",variant:p="text"}=r,C=Ue(r,E3),h=$u(l),E=A??g.jsx(Dd,{"aria-labelledby":h,color:"inherit",size:16}),m=W({},r,{disabled:s,loading:u,loadingIndicator:E,loadingPosition:f,variant:p}),B=I3(m),v=u?g.jsx(v3,{className:B.loadingIndicator,ownerState:m,children:E}):null;return g.jsxs(B3,W({disabled:s||u,id:h,ref:n},C,{variant:p,classes:B,ownerState:m,children:[m.loadingPosition==="end"?o:v,m.loadingPosition==="end"?v:o]}))});process.env.NODE_ENV!=="production"&&(pm.propTypes={children:c.node,classes:c.object,disabled:c.bool,id:c.string,loading:c.bool,loadingIndicator:c.node,loadingPosition:Cr(c.oneOf(["start","end","center"]),e=>e.loadingPosition==="start"&&!e.startIcon?new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.'):e.loadingPosition==="end"&&!e.endIcon?new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.'):null),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["contained","outlined","text"]),c.string])});const y3=pm;function kd({variant:e,theme:t,color:n,loadingPosition:r}){const o=rn(t,n),{lighter:s,main:l,dark:u,contrastText:A}=o,f=`${n}Button`,p=ki(t,f),C={"& .MuiLoadingButton-loadingIndicator":{color:l}},h={...r&&r!=="center"&&{color:l}},E={"&::after":{boxShadow:`0 0 6px 6px ${He(l,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${He(l,.9)}`},"&:focus-visible":{outline:`2px solid ${u}`,outlineOffset:2}};switch(e){case"contained":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...E};case"light":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...E};case"shadow":return{boxShadow:p,backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{boxShadow:"none",backgroundColor:u,color:A},...E};case"outlined":return{backgroundColor:"transparent",borderColor:l,...h,...C};case"dashed":return{backgroundColor:s,borderColor:l,...h,...C,...E};case"text":default:return{color:l,...C,...E}}}const b3=Ae(y3,{shouldForwardProp:e=>e!=="shape"&&e!=="variant"})(({theme:e,variant:t,shape:n,color:r,loading:o,loadingPosition:s})=>({"::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:n==="rounded"?"50%":4,opacity:0,transition:"all 0.5s"},":active::after":{position:"absolute",borderRadius:n==="rounded"?"50%":4,left:0,top:0,opacity:1,transition:"0s"},...t==="text"&&{...kd({variant:t,theme:e,color:r,loadingPosition:s}),"&.MuiButton-sizeMedium":{height:36},"&.MuiButton-sizeSmall":{height:30},"&.MuiButton-sizeLarge":{height:44}},...n&&{minWidth:0,"&.MuiButton-sizeMedium":{width:36,height:36},"&.MuiButton-sizeSmall":{width:30,height:30},"&.MuiButton-sizeLarge":{width:44,height:44},...n==="rounded"&&{borderRadius:"50%"}},...t==="outlined"&&{border:"1px solid"},...t==="dashed"&&{border:"1px dashed"},...(t==="contained"||t==="shadow")&&!o&&{color:"#fff"},...t!=="text"&&{...kd({variant:t,theme:e,color:r,loadingPosition:s})},"&.Mui-disabled":{...t!=="text"&&{...kd({variant:t,theme:e,color:r,loadingPosition:s})}}})),Fd=w.forwardRef(({variant:e="text",shape:t,children:n,color:r="primary",...o},s)=>{const l=Pt();return g.jsx(b3,{ref:s,variant:e,shape:t,theme:l,loadingPosition:o.loadingPosition,loading:o.loading,color:r,...o,children:n})});Fd.propTypes={variant:c.string,shape:c.string,children:c.node,color:c.string},Fd.displayName="LoadingButton";function Q3({color:e,theme:t,labelColor:n}){const r=rn(t,e),{main:o,contrastText:s}=r;let l=e||"";return["primary","secondary","info","success","warning","error"].includes(l)?{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:o,color:n||s},[`& .${b.tooltipClasses.arrow}`]:{color:o}}:{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:l,color:n||s,boxShadow:t.shadows[1]},[`& .${b.tooltipClasses.arrow}`]:{color:l}}}const x3=Ae(({className:e,...t})=>g.jsx(b.Tooltip,{...t,classes:{popper:e}}),{shouldForwardProp:e=>e!=="color"&&e!=="labelColor"})(({theme:e,color:t,labelColor:n})=>({...t&&Q3({color:t,theme:e,labelColor:n})}));function Ld({children:e,arrow:t,labelColor:n="",...r}){const o=Pt();return g.jsx(b.Box,{display:"flex",children:g.jsx(x3,{arrow:t,...r,theme:o,labelColor:n,children:e})})}Ld.propTypes={children:c.element,arrow:c.bool,labelColor:c.string,rest:c.array};const Ao=w.forwardRef(({children:e,position:t="top-left",type:n="grow",direction:r="up",...o},s)=>{let l={transformOrigin:"0 0 0"};switch(t){case"top-right":l={transformOrigin:"top right"};break;case"top":l={transformOrigin:"top"};break;case"bottom-left":l={transformOrigin:"bottom left"};break;case"bottom-right":l={transformOrigin:"bottom right"};break;case"bottom":l={transformOrigin:"bottom"};break;case"top-left":default:l={transformOrigin:"0 0 0"};break}return g.jsxs(b.Box,{ref:s,children:[n==="grow"&&g.jsx(b.Grow,{...o,timeout:{appear:0,enter:150,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="collapse"&&g.jsx(b.Collapse,{...o,sx:l,children:e}),n==="fade"&&g.jsx(b.Fade,{...o,timeout:{appear:0,enter:300,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="slide"&&g.jsx(b.Slide,{...o,timeout:{appear:0,enter:150,exit:150},direction:r,children:g.jsx(b.Box,{sx:l,children:e})}),n==="zoom"&&g.jsx(b.Zoom,{...o,children:g.jsx(b.Box,{sx:l,children:e})})]})});Ao.propTypes={children:c.node,type:c.oneOf(["grow","fade","collapse","slide","zoom"]),position:c.oneOf(["top-left","top-right","top","bottom-left","bottom-right","bottom"]),direction:c.oneOf(["up","down","left","right"])},w.forwardRef(function(t,n){return g.jsx(b.Zoom,{ref:n,timeout:200,...t})});function hm({value:e,...t}){return g.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[g.jsx(b.CircularProgress,{variant:"determinate",value:e,...t}),g.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e)}%`})})]})}hm.propTypes={value:c.number};function Cm({value:e,size:t,variant:n,thickness:r,showLabel:o,pathColor:s,sx:l,...u}){return g.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[g.jsx(b.CircularProgress,{variant:"determinate",sx:{color:s||"grey.200"},size:t,thickness:r,...u,value:100}),o&&g.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:e?`${Math.round(e)}%`:"0%"})}),g.jsx(b.CircularProgress,{variant:n,sx:{...l,position:"absolute",left:0,[`& .${b.circularProgressClasses.circle}`]:{strokeLinecap:"round"}},size:t,thickness:r,value:e,...u})]})}Cm.propTypes={value:c.number,size:c.number,variant:c.string,thickness:c.number,showLabel:c.bool,pathColor:c.string,sx:c.array,others:c.array};function Em({icon:e,value:t,...n}){return g.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(b.Box,{sx:{width:"100%",mr:1},children:g.jsx(b.LinearProgress,{variant:"determinate",value:t,...n})}),g.jsx(b.Box,{sx:{minWidth:35},children:e})]})}Em.propTypes={icon:c.node,value:c.number};function Im({value:e,...t}){return g.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(b.Box,{sx:{width:"100%",mr:1},children:g.jsx(b.LinearProgress,{variant:"determinate",value:e,...t})}),g.jsx(b.Box,{sx:{minWidth:35},children:g.jsx(b.Typography,{variant:"body2",color:"text.secondary",children:`${Math.round(e)}%`})})]})}Im.propTypes={value:c.number};const w3=w.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary"},{defaults:!0});return g.jsx(Fi,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),Js=w.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return g.jsx(b.ToggleButton,{ref:n,...t,color:"secondary",sx:r})}),mm=w.createContext({});function T3(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=S.useResourceContext(),o=S.useDataProvider(),{search:s}=fi.useLocation(),l=`${r}/new`,u=w.useCallback(()=>{if(!t||!ge.isFunction(o.get))return Promise.resolve({});const h={};return new URLSearchParams(s??"").forEach((E,m)=>{h[m]=E}),o.get(l,h).then(E=>E.data).then(E=>{const{responseCode:m,value:B}=E;return m==="ok"?B:Promise.reject(E)})},[r,t,s,o]),A=w.useMemo(()=>ge.chain(n).extend({queryKey:[r,s],queryFn:u}).value(),[r,s,u,n]),{data:f,isLoading:p}=Hu.useQuery(A),C=ge.omit(e,["useDefaults"]);return p?g.jsx(b.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:g.jsx(b.CircularProgress,{})}):g.jsx(mm.Provider,{value:f??{},children:g.jsx(S.Create,{...C})})}function P3(){return w.useContext(mm)}const S3=Ae(T3,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main>.MuiPaper-root:first-of-type":{overflow:"visible",backgroundColor:e.palette.background.default}})),O3=Ts(S.Toolbar,{name:"RaApplicaToolbar",slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}})),lr=e=>g.jsx(O3,{...e});lr.defaultProps={...S.Toolbar.defaultProps},lr.propTypes={...S.Toolbar.propTypes};const Nd=({children:e,content:t,title:n,subheader:r,secondary:o,toolbar:s,...l})=>{const u=S.useTranslate(),A=S.useResourceContext(),{cardTitle:f,cardSubheader:p}=w.useMemo(()=>{const C=n||`resources.${A}.title`;return{cardTitle:u(C,{_:C}),cardSubheader:r!==null?u(r,{_:r}):null}},[A,r,n,u]);return g.jsx(b.Grid,{item:!0,...l,children:g.jsx(Wn,{content:t,title:f,subheader:p,secondary:o,divider:!0,children:g.jsxs(w.Fragment,{children:[e,s===!0?g.jsx(lr,{children:g.jsx(S.SaveButton,{})}):s]})})})};Nd.defaultProps={...b.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12},Nd.propTypes={...b.Grid.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),contained:c.bool,content:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object]),spacing:c.number,toolbar:c.oneOfType([c.node,c.bool])};const j3=Ae(S.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),Yl=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:o}=wn();return g.jsx(j3,{defaultValues:n,spacing:t||o,children:g.jsx(b.Grid,{container:!0,...r,spacing:t||o,children:e})})};Yl.propTypes={...b.Grid.propTypes,...S.Form.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),spacing:c.number,defaultValues:c.oneOfType([c.object,c.func]),record:c.object,validate:c.func},Yl.defaultProps={...b.Stack.defaultProps},Yl.Section=Nd;const M3=Ts(S.SimpleForm,{name:"RaApplicaSimpleForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?0:1)},[e.breakpoints.down("sm")]:{paddingBottom:0}})),Gl=({title:e,modal:t,content:n,subheader:r,secondary:o,sx:s,...l})=>{const u=SA(e),A=S.useRecordContext();return g.jsx(Wn,{content:n,title:u,subheader:r,secondary:A!=null&&A.id?o:null,sx:{...s,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!t,divider:!0,children:g.jsx(M3,{toolbar:g.jsx(lr,{}),...l})})};Gl.defaultProps={modal:!1,content:!1,subheader:null,title:null,toolbar:g.jsx(lr,{children:g.jsx(S.SaveButton,{type:"button"})}),secondary:g.jsx(Ro,{children:g.jsx(S.DeleteWithConfirmButton,{})})},Gl.propTypes={...S.SimpleForm.propTypes,modal:c.bool,content:c.bool,contained:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object])};const Kl=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:l,...u})=>{const A=Xt.useTheme(),{getCurrentDialog:f}=Do(),{source:p,resource:C,isRequired:h}=u,{getFieldState:E,formState:m}=Oo.useFormContext(),{error:B}=E(p,m),v=f();return g.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:B?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&g.jsx(b.InputLabel,{error:!!B,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(S.FieldTitle,{label:e,source:p,resource:v||C,isRequired:h})}),w.isValidElement(t)?w.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!B,children:r})]})};Kl.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},Kl.defaultProps={display:"label",divider:!1};const R3=Ae(S.ArrayInput,{name:"ApplicaArrayInput",slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}})),D3=({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s})=>g.jsx(Kl,{label:e,addLabel:t,source:n,helperText:r,divider:o,children:g.jsx(R3,{source:n,label:!1,...s})}),Vd=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:g.jsxs(Ro,{children:[e&&g.jsx(S.EditButton,{}),t&&g.jsx(S.DeleteWithConfirmButton,{}),n&&g.jsx(S.CloneButton,{})]});Vd.defaultProps={canEdit:!0,canDelete:!0,canClone:!1},Vd.propTypes={canEdit:c.bool,canDelete:c.bool,canClone:c.bool};const Bm=Ae("div",{name:"ApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),k3=Ae("ul")({display:"inline-block"}),vm=e=>{var p;const{className:t,emptyText:n,source:r,title:o,...s}=e,l=de.useRecordContext(e),u=dt.get(l,r),A=de.useTranslate();if(!u)return n?g.jsx(b.Typography,{component:"span",variant:"body2",className:t,...s,children:n&&A(n,{_:n})}):g.jsx(Bm,{className:t,...s});if(Array.isArray(u))return g.jsx(k3,{className:t,...s,children:u.map((C,h)=>{var m;const E=o instanceof String?(m=dt.get(C,o))==null?void 0:m.toString():o;return g.jsx("li",{children:E},h)})});const f=o instanceof String?(p=dt.get(l,o))==null?void 0:p.toString():o;return g.jsx(Bm,{className:t,...s,children:f})};vm.propTypes={className:c.string,emptyText:c.string,source:c.string.isRequired,src:c.string,title:c.oneOfType([c.string,c.element]),target:c.string,download:c.oneOfType([c.bool,c.string]),ping:c.string,rel:c.string};const Hd=({entityId:e,property:t,disabled:n,userResource:r="entities/user",...o})=>{const[s,l]=w.useState(null),u=S.useRecordContext(o),A=S.useDataProvider(),f=S.useResourceContext(),p=w.useCallback(async E=>{E.preventDefault(),E.stopPropagation();const m=dt.get(u,o==null?void 0:o.source),B=f.replace("entities/",""),v=await A.getFile(`/attachments/${B}/${e||(u==null?void 0:u.id)}/${t||(o==null?void 0:o.source)}/${(m==null?void 0:m.id)||(u==null?void 0:u.id)}`),j=document.createElement("a");j.href=v,j.download=dt.get(u,(o==null?void 0:o.title)||(o==null?void 0:o.source)),j.click()},[A,u,e,f,t,o==null?void 0:o.source,o==null?void 0:o.title]),C=w.useMemo(()=>({...u,[o==null?void 0:o.source]:(u==null?void 0:u.src)||dt.get(u,o==null?void 0:o.source),[o==null?void 0:o.title]:(u==null?void 0:u.title)||dt.get(u,(o==null?void 0:o.title)||(o==null?void 0:o.source))}),[u,o==null?void 0:o.source,o==null?void 0:o.title]),h=S.useTranslate();return w.useEffect(()=>{!u||!(u!=null&&u.userId)||A.getOne(r,{id:u==null?void 0:u.userId}).then(({data:E})=>l(E)).catch(()=>l(null))},[u,A,r]),g.jsx(vm,{...o,disabled:n,record:C,onClick:p,title:g.jsxs(b.Box,{sx:{cursor:"pointer"},children:[g.jsx(b.Typography,{variant:"subtitle1",children:dt.get(C,(o==null?void 0:o.title)||(o==null?void 0:o.source))}),g.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[dt.get(C,"sizeDescription"),s&&" | ",s&&h("ra.attachment.info",{user:s==null?void 0:s.name,created:Mr(C==null?void 0:C.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};Hd.propTypes={...S.FileField.propTypes,source:c.string,title:c.string,disabled:c.bool};const F3=Ae(S.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),Xs=e=>{const t=`_${e==null?void 0:e.source}`;return g.jsx(F3,{...e,source:t})};Xs.propTypes={...S.ImageField.propTypes,source:c.string};const Jl=({width:e,height:t,circle:n,justify:r,record:o,...s})=>{const l=w.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5}),[e,t,n]),u=S.useRecordContext(),A=o||u;return g.jsx(Xs,{sx:f=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${f.palette.divider}`,objectFit:"cover !important",...l,minWidth:l.width,minHeight:l.height}}),...s,record:A})};Jl.defaultProps={...Xs.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"},Jl.propTypes={...Xs.propTypes,width:c.oneOfType([c.number,c.string]),height:c.oneOfType([c.number,c.string]),circle:c.bool,justify:c.oneOf(["flex-start","center","flex-end"])};var ym={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Hn,function(){return function(n,r,o){n=n||{};var s=r.prototype,l={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(f,p,C,h){return s.fromToBase(f,p,C,h)}o.en.relativeTime=l,s.fromToBase=function(f,p,C,h,E){for(var m,B,v,j=C.$locale().relativeTime||l,R=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],x=R.length,O=0;O<x;O+=1){var P=R[O];P.d&&(m=h?o(f).diff(C,P.d,!0):C.diff(f,P.d,!0));var N=(n.rounding||Math.round)(Math.abs(m));if(v=m>0,N<=P.r||!P.r){N<=1&&O>0&&(P=R[O-1]);var F=j[P.l];E&&(N=E(""+N)),B=typeof F=="string"?F.replace("%d",N):F(N,p,P.l,v);break}}if(p)return B;var X=v?j.future:j.past;return typeof X=="function"?X(B):X.replace("%s",B)},s.to=function(f,p){return u(f,p,this,!0)},s.from=function(f,p){return u(f,p,this)};var A=function(f){return f.$u?o.utc():o()};s.toNow=function(f){return this.to(A(this),f)},s.fromNow=function(f){return this.from(A(this),f)}}})})(ym);var L3=ym.exports;const N3=$r(L3);Mr.extend(N3);const Xl=e=>{const t=S.useRecordContext(e),[n]=S.useLocaleState(),r=w.useMemo(()=>Mr(dt.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return g.jsxs(w.Fragment,{children:[g.jsx(S.DateField,{record:t,source:e.source,showTime:!0}),g.jsx("br",{}),g.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})};Xl.displayName="DateAgoField",Xl.propTypes={source:c.string.isRequired};const bm=Ae(S.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));bm.propTypes={...S.DateField.propTypes};const zd=e=>g.jsx(bm,{...e});zd.defaultProps={...S.DateField.defaultProps,variant:"body1"},zd.propTypes={...S.DateField.propTypes};const Qm=Ae(S.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));Qm.propTypes={...S.EmailField.propTypes};const Wd=e=>g.jsx(Qm,{...e});Wd.defaultProps={...S.EmailField.defaultProps,variant:"body1"},Wd.propTypes={...S.EmailField.propTypes};const V3=Ae(S.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),Ud=({...e})=>{const t=S.useRecordContext(e),n=w.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=dt.get(t,`_${e==null?void 0:e.source}`,dt.get(t,e==null?void 0:e.source)),s=dt.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),l=document.createElement("a");l.href=o,l.download=s,l.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return g.jsx(V3,{...e,record:t,onClick:n})};Ud.propTypes={...S.FileField.propTypes,source:c.string,title:c.string};const xm=e=>g.jsx(S.FunctionField,{...e});xm.defaultProps={variant:"body1"};const wm=Ae(S.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));wm.propTypes={...S.TextField.propTypes};const Zl=e=>g.jsx(wm,{...e});Zl.defaultProps={...S.TextField.defaultProps,variant:"body1"},Zl.propTypes={...S.TextField.propTypes};function H3(e){const t=b.useTheme(),n=de.useLocales(),{source:r=""}=e,o=de.useRecordContext(e),s=o[r],l=!wA(s,n),u=Ir(e,{flex:1}),[A]=de.useLocaleState(),f=w.useMemo(()=>l?g.jsx(et.FlagFilled,{style:{color:t.palette.warning.main}}):g.jsx(et.FlagOutlined,{}),[l]),p=w.useMemo(()=>g.jsx(b.Stack,{children:ge.map(n,(C,h)=>g.jsx(b.Typography,{children:`${C.locale.toUpperCase()}: ${(s??{})[C.locale]??""}`},h))}),[s,n]);return g.jsx(Ld,{title:p,arrow:!1,children:g.jsxs(b.Stack,{alignItems:"center",direction:"row",gap:1,children:[f,g.jsx(Zl,{...e,source:`${r}.${A}`,sx:u})]})})}const z3=Ae("div")(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),Yd=({source:e,defaultValue:t,...n})=>{const r=S.useRecordContext(n),o=dt.get(r,e,t);return g.jsx("span",{dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})};Yd.propTypes={defaultValue:c.any,source:c.string,record:c.object},Yd.defaultProps={defaultValue:" "};const Tm=({title:e,children:t})=>e&&e!==!1?g.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t;Tm.propTypes={title:c.oneOfType([c.string,c.bool]),children:c.oneOfType([c.element,c.arrayOf(c.element)])};const Gd=({label:e,source:t,defaultValue:n,children:r,tooltip:o,...s})=>{const{getCurrentDialog:l}=Do(),u=S.useRecordContext(s),A=S.useResourceContext(s),f=l(),p=w.useMemo(()=>!o||o===!1?!1:typeof o=="function"?o(u):typeof o=="string"?dt.get(u,o,o):o,[u,o]);return g.jsx(Tm,{title:p,children:g.jsxs(w.Fragment,{children:[g.jsx(b.InputLabel,{children:g.jsx(S.FieldTitle,{label:e,source:t,resource:f||A})}),g.jsx(z3,{...s,children:w.cloneElement(r,{source:t,record:u,defaultValue:n,resource:f||A})})]})})};Gd.propTypes={defaultValue:c.any,tooltip:c.oneOfType([c.string,c.bool,c.func]),source:c.string,label:c.string,name:c.string,children:c.element},Gd.defaultProps={defaultValue:" ",children:g.jsx(Yd,{})};const Kd=function({children:e,className:t}){return g.jsx("div",{className:t,children:e})};Kd.defaultProps={children:null,className:""},Kd.propTypes={children:c.node,className:c.string};const W3=Ts(Kd,{name:"RaApplicaReferenceManyField",slot:"root"})(({theme:e,margin:t,border:n,bulkActionButtons:r})=>({marginLeft:t?0:`-${e.spacing(2.5)}`,marginRight:t?0:`-${e.spacing(2.5)}`,borderBottom:n?`1px solid ${e.palette.divider}`:"none","& form":{padding:e.spacing(2)},"& .MuiCardContent-root":{borderTop:n?`1px solid ${e.palette.divider}`:"none"},"& .MuiToolbar-root":{[e.breakpoints.up("sm")]:{marginTop:`-${e.spacing(2)}`,marginBottom:e.spacing(t?0:1),marginLeft:e.spacing(t?1:2),marginRight:e.spacing(t?1:2),width:t?"auto":`calc(100% - ${e.spacing(5)})`},[e.breakpoints.down("md")]:{marginTop:0}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:r===!1?0:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 34px)"}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`},"& .MuiTablePagination-toolbar":{marginTop:e.spacing(1),marginBottom:0},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0},"& .RaBulkActionsToolbar-toolbar":{minHeight:48,bottom:-56,"& h6":{marginTop:e.spacing(.5)},"& .RaBulkActionsToolbar-topToolbar":{marginTop:e.spacing(1)},[e.breakpoints.down("sm")]:{bottom:-48,borderRadius:0}}})),Li=e=>g.jsx(W3,{...e,children:g.jsx(S.ReferenceManyField,{pagination:g.jsx(S.Pagination,{}),...e})});Li.defaultProps={margin:!1,border:!1},Li.propTypes={...S.ReferenceManyField.propTypes,margin:c.bool,border:c.bool};const Pm=({source:e,...t})=>{const n=S.useRecordContext(t),r=dt.get(n,e,0),o=r/1024,s=o/1024,l=s/1024,u=l>1?`${l.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return g.jsx(b.Typography,{component:"span",variant:"body1",...t,children:u})};Pm.propTypes={record:c.object,source:c.string};const nt=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:l,...u})=>{const A=Xt.useTheme(),{getCurrentDialog:f}=Do(),{source:p,resource:C,isRequired:h}=u,{fieldState:{invalid:E}}=S.useInput(u),m=f();return g.jsxs(b.Stack,{spacing:1,sx:{width:u!=null&&u.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:E?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&g.jsx(b.InputLabel,{error:E===!0,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(S.FieldTitle,{label:e,source:p,resource:m||C,isRequired:h})}),w.isValidElement(t)?w.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:E===!0,children:r})]})};nt.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},nt.defaultProps={display:"label",divider:!1};const U3=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},Y3=Ae(S.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...U3(e)})),Jd=({children:e,disabled:t,type:n,...r})=>{const o=S.useRecordContext(r),s=r==null?void 0:r.source,l=o==null?void 0:o.id;return S.useInput({source:`__${n}__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),g.jsx(nt,{...r,children:g.jsx(Y3,{disabled:t,children:w.cloneElement(e,{...e.props,entityId:l,property:s})})})};Jd.propTypes={...S.FileInput.propTypes,children:c.node,multiple:c.bool,disabled:c.bool},Jd.defaultProps={children:g.jsx(Hd,{title:"name",source:"path"}),multiple:!0,disabled:!1,type:"attachment"};const G3=Ae(S.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"}})),Xd=({...e})=>g.jsx(nt,{...e,children:g.jsx(G3,{})});Xd.propTypes={...S.AutocompleteArrayInput.propTypes,...nt.propTypes},Xd.defaultProps={...S.AutocompleteArrayInput.defaultProps,size:"small"};const K3=Ae(S.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall":{paddingTop:"4px"}})),Zd=e=>{const{perPage:t,...n}=e;return g.jsx(nt,{...n,children:g.jsx(K3,{})})};Zd.propTypes={...S.AutocompleteInput.propTypes,...nt.propTypes},Zd.defaultProps={...S.AutocompleteInput.defaultProps,size:"small"};const J3=Ae(S.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({})),_d=({horizontal:e,...t})=>{const n=Pt();return g.jsx(nt,{...t,sx:e?{flexDirection:e?"row":"column",alignItems:e?"center":"flex-start","& .MuiFormGroup-root":{margin:0},"& .MuiFormControlLabel-root":{margin:0,"& .MuiTypography-root":{display:"none",visibility:"hidden"},"& .MuiSwitch-root":{marginRight:`-${n.spacing(.5)}`}}}:{},children:g.jsx(J3,{})})};_d.defaultProps={...S.BooleanInput.defaultProps,...nt.defaultProps},_d.propTypes={...S.BooleanInput.propTypes,...nt.propTypes,horizontal:c.bool};const X3=Ae(S.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),qd=e=>g.jsx(nt,{...e,children:g.jsx(X3,{})});qd.propTypes={...S.DateInput.propTypes,...nt.propTypes},qd.defaultProps={...S.DateInput.defaultProps,...nt.defaultProps};const Z3=Ae(S.DateTimeInput,{name:"RaApplicaDateTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),$d=e=>g.jsx(nt,{...e,children:g.jsx(Z3,{})});$d.propTypes={...S.DateTimeInput.propTypes,...nt.propTypes},$d.defaultProps={...nt.defaultProps};const _3=Ae(S.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}})),eg=({children:e,title:t,...n})=>{const r=Oo.useWatch({name:n.source}),o=S.useRecordContext(n),{source:s}=n,l=w.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const u=dt.get(o,s);if(u){const A=u.split("__");return A.length>0?A[A.length-1]:u}return u},[o,s,r]);return g.jsx(nt,{...n,children:g.jsx(_3,{children:w.cloneElement(e,{...e.props,title:t||s,source:s,record:{...o,[s]:(r==null?void 0:r.title)||dt.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||dt.get(o,`_${s}`),[t||s]:l}})})})};eg.propTypes={...S.FileInput.propTypes,source:c.string,title:c.string,children:c.node},eg.defaultProps={children:g.jsx(Ud,{})};const tg=({children:e,title:t,...n})=>{const r=Oo.useWatch({name:n.source}),o=S.useRecordContext(n),{source:s}=n;return S.useInput({source:`__image__${n==null?void 0:n.source}`,defaultValue:n==null?void 0:n.source}),g.jsx(nt,{...n,children:g.jsx(S.ImageInput,{accept:"image/*",children:w.cloneElement(e,{...e.props,title:t,source:s,record:{...o,[s]:(r==null?void 0:r.title)||dt.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||dt.get(o,`_${s}`)}})})})};tg.defaultProps={children:g.jsx(Jl,{}),multiple:!1},tg.propTypes={...S.ImageInput.propTypes,source:c.string,title:c.string,children:c.node,multiple:c.bool};const Pn=e=>g.jsx(nt,{...e,children:g.jsx(S.TextInput,{})});Pn.propTypes={...S.TextInput.propTypes,...nt.propTypes};const q3={vertical:"bottom",horizontal:"right"},$3={vertical:"top",horizontal:"right"};function eM(e){const{source:t}=e,{fieldState:n}=de.useInput(e),r=Oo.useWatch({name:t}),{error:o}=n,s=de.useLocales(),l=!wA(r,s),[u]=de.useLocaleState(),[A,f]=w.useState(u),[p,C]=w.useState(null),h=!!p,E=w.useCallback(v=>C(h?null:v.currentTarget),[h,C]),m=w.useCallback(()=>C(null),[C]),B=w.useMemo(()=>ge.map(s,(v,j)=>g.jsx(b.MenuItem,{onClick:()=>{f(v.locale),m()},children:g.jsx(b.ListItemText,{primary:`${v.locale.toUpperCase()}: ${(r??{})[v.locale]??""}`})},j)),[s,f,m,r]);return g.jsx(nt,{...e,helperText:o==null?void 0:o.message,children:g.jsxs(b.Box,{flex:1,children:[ge.map(s,(v,j)=>g.jsx(Pn,{...e,source:`${t}.${v.locale}`,sx:{width:"100%",display:v.locale===A?"inline-flex":"none"},label:!1,InputProps:{endAdornment:g.jsx(b.Chip,{label:g.jsx(b.Typography,{variant:"button",children:A}),size:"small",onClick:E,color:l?"warning":void 0})}},j)),g.jsx(b.Menu,{anchorEl:p,open:h,anchorOrigin:q3,transformOrigin:$3,onClose:m,children:B})]})})}const tM=Ae(S.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),ng=e=>g.jsx(nt,{...e,children:g.jsx(tM,{})});ng.propTypes={...S.NumberInput.propTypes,...nt.propTypes},ng.defaultProps={...S.NumberInput.defaultProps,...nt.defaultProps};const Sm=({source:e,minWidth:t=300,children:n})=>{const r=S.useResourceContext(),o=S.useRecordContext(),[s,l]=w.useState(dt.get(o,e,"")),[u,A]=w.useState(!1),f=w.useCallback(m=>l(m.target.value),[]),p=S.useDataProvider(),C=w.useCallback(m=>{m.key==="Enter"&&(A(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,o,e]),h=w.useCallback(()=>{dt.get(o,e)!==s&&(A(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,e,o]),E=w.useCallback(m=>{A(!0),p.update(r,{id:o.id,data:{...o,[e]:m,_changed:e}}).then(()=>A(!1))},[p,r,e,o]);return w.useEffect(()=>l(dt.get(o,e)),[o,e]),n?w.cloneElement(n,{...n.props,source:e,value:s,onChange:E}):g.jsx(b.TextField,{value:s,disabled:u,onChange:f,onKeyPress:C,onBlur:h,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})};Sm.propTypes={source:c.string.isRequired,minWidth:c.number,children:c.element};const rg=({children:e,...t})=>g.jsx(S.ReferenceArrayInput,{...t,children:w.cloneElement(e,{...t,source:e.props.source||t.source})});rg.propTypes={...S.ReferenceArrayInput.propTypes,children:c.element},rg.defaultProps={...S.ReferenceArrayInput.defaultProps};const og=({children:e,...t})=>g.jsx(S.ReferenceInput,{...t,children:w.cloneElement(e,{...t,source:e.props.source||t.source})});og.propTypes={...S.ReferenceInput.propTypes,children:c.element},og.defaultProps={...S.ReferenceInput.defaultProps};const ig=({reference:e,target:t,children:n,filters:r,actions:o,...s})=>g.jsx(S.ResourceContextProvider,{value:e,children:g.jsx(Li,{perPage:5,pagination:g.jsx(S.Pagination,{}),...s,reference:e,target:t,children:g.jsxs(w.Fragment,{children:[g.jsx(S.ListToolbar,{filters:r,actions:o}),n]})})});ig.propTypes={...Li.propTypes,children:c.node.isRequired,reference:c.string.isRequired,target:c.string.isRequired,filters:c.oneOfType([c.element,c.func,c.element,c.arrayOf(c.node)]),actions:c.oneOfType([c.element,c.func,c.element])},ig.defaultProps={...Li.defaultProps};const nM=Ae(S.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),rM=e=>g.jsx(nM,{...e}),Om=Ae(S.SelectArrayInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .RaSelectArrayInput-chips > .RaSelectArrayInput-chip":{marginTop:"-2px",marginBottom:"-2px"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}}));Om.propTypes={...S.SelectArrayInput.propTypes};const sg=e=>g.jsx(nt,{...e,children:g.jsx(Om,{options:{autoWidth:!1}})});sg.defaultProps={optionText:"name",optionValue:"id"},sg.propTypes={...S.SelectArrayInput.propTypes,...nt.propTypes};const oM=Ae(S.SelectInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}})),jm=e=>g.jsx(nt,{...e,children:g.jsx(oM,{})});jm.propTypes={...S.SelectInput.propTypes,...nt.propTypes};const _l=({...e})=>{var u,A;const t=S.useTranslate(),n=S.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(A=(u=Oo.useController({name:e==null?void 0:e.source}))==null?void 0:u.field)==null?void 0:A.value;let o=e.helperText,s=e.validate;s?Array.isArray(s)&&s.indexOf(n)===-1&&s.push(n):s=[n];const l=t("app.input.max_length_info",{count:(r==null?void 0:r.length)||0,max:e==null?void 0:e.maxLength});return e!=null&&e.maxLength&&(o=o&&o.length>0?`${l} - ${t(o)}`:l),g.jsx(Pn,{...e,validate:s,helperText:o,inputProps:{maxLength:e==null?void 0:e.maxLength}})};_l.displayName="SmartTextInput",_l.defaultProps={multiline:!1},_l.propTypes={...Pn.propTypes,maxLength:c.number,multiline:c.bool,rows:c.number};const iM=e=>{if(!e)return"";const t=cC(e);return t?t.format("HH:mm"):""},sM=e=>e,aM=Ae(S.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),ag=e=>g.jsx(nt,{...e,children:g.jsx(aM,{})});ag.defaultProps={...S.TimeInput.defaultProps,format:iM,parse:sM},ag.propTypes={...S.TimeInput.propTypes,...nt.propTypes};const lg=({onSuccess:e,firstAccess:t})=>{const{spacing:n}=wn(),[r,o]=w.useState(!1),s=de.useAuthProvider(),l=de.useTranslate(),u=de.useNotify(),A=w.useCallback(f=>{const{oldPassword:p,newPassword:C}=f;o(!0),s==null||s.changePassword(p,C).then(()=>{u("ra.auth.password_changed"),e()}).catch(h=>{u((h==null?void 0:h.message)||(h==null?void 0:h.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e]);return g.jsx(de.ResourceContextProvider,{value:"user/change-password",children:g.jsx(de.EditContextProvider,{value:{record:{},resource:"user/change-password",save:A},children:g.jsx(Gl,{onSubmit:A,toolbar:g.jsx(lr,{children:g.jsx(S.SaveButton,{disabled:r})}),children:g.jsxs(b.Grid,{container:!0,spacing:n,children:[t===!0&&g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Alert,{severity:"warning",children:[g.jsx(b.AlertTitle,{children:l("ra.auth.first_access.change_password")}),l("ra.auth.first_access.change_password_helper")]})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Pn,{source:"oldPassword",type:"password",validate:de.required()})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Pn,{source:"newPassword",type:"password",validate:de.required()})})]})})})})},lM=Ae(S.Edit,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-card":{[e.breakpoints.down("sm")]:{marginBottom:e.spacing(6)}},"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{borderTop:`1px solid ${e.palette.divider}`},"& .RaEdit-main>.MuiPaper-root:first-of-type":{overflow:"visible",backgroundColor:e.palette.background.default}})),cM=Ae(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),uM=Ae(b.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`})),cg=({title:e,divider:t,variant:n})=>{const r=S.useTranslate();return g.jsxs(w.Fragment,{children:[g.jsx(cM,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&g.jsx(uM,{})]})};cg.propTypes={title:c.string.isRequired,divider:c.bool,variant:c.oneOf(["h1","h2","h3","h4","h5","h6"])},cg.defaultProps={divider:!0,variant:"h4"};const AM=Ae(b.Grid,{name:"ApplicaLongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root":{position:"initial",marginTop:e.spacing(2),marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,borderTop:`1px solid ${e.palette.divider}`,[e.breakpoints.down("sm")]:{position:"initial !important",width:"auto !important",marginRight:0}},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function Mm(e){const{spacing:t}=wn(),{spacing:n=t}=e,r=ge.omit(e,["spacing"]);return g.jsx(S.Form,{...r,children:g.jsx(AM,{container:!0,spacing:n*2,children:e.children})})}function ug(e){return e.id??e.label}function Rm(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function dM(e){return ge.map(e,"id")}function ql(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function Dm(e,t){const n=e!==void 0?ql(e):0;return ge.chain(t).filter(o=>e!==void 0?Rm(e,o.id):!0).filter(o=>ql(o.id)===n+1).value()}function gM(e,t){var s;const n=ge.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return ge.extend(n,{formRootPath:o});case"setSyncWithLocation":return ge.extend(n,{syncWithLocation:o});case"setErrorCount":return ge.extend(n,{errorCount:o});case"setActiveItem":return ge.includes(dM(e.items),o)?ge.extend(n,{activeItem:o}):n;case"addItem":{const{id:l}=o;return ge.extend(n,{items:ge.chain(n.items).clone().reject(u=>u.id===l).concat([o]).orderBy(u=>u.index).value()})}case"removeItem":{const l=ge.isString(o)?o:o.id,u=ge.chain(n.items).clone().reject(A=>A.id===l).value();return ge.extend(n,{items:u}),n.activeItem===l&&ge.extend(n,{activeItem:((s=ge.first(u))==null?void 0:s.id)??void 0}),n}default:return n}}const fM={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},km=w.createContext(void 0);function Fm(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=fi.useLocation(),[s,l]=w.useReducer(gM,ge.cloneDeep(fM)),{formRootPath:u,items:A}=s,f=w.useMemo(()=>({state:s,dispatch:l}),[s,l]);return w.useEffect(()=>{const p=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&p.push(r);const C=ge.chain(p).map(E=>fi.matchPath(E,o)).reject(E=>E===null).first().value(),h=C==null?void 0:C.pathnameBase;h!==void 0&&h!==u&&l({type:"setFormRootPath",payload:h})},[o,u,r]),w.useEffect(()=>{l({type:"setSyncWithLocation",payload:!!t})},[t,l]),w.useEffect(()=>{l({type:"setErrorCount",payload:!!n})},[n,l]),w.useEffect(()=>{var p;if(t&&u!==void 0){let C=o.replace(u,"").replace(new RegExp(/^\/?/),"");ge.isEmpty(C)&&(C=((p=ge.chain(A).filter(h=>Dm(h.id,A).length===0).orderBy([h=>ql(h.id),h=>h.index]).first().value())==null?void 0:p.id)??void 0),l({type:"setActiveItem",payload:C})}},[l,u,o,A]),g.jsx(km.Provider,{value:f,children:e.children})}function Lm(){const e=w.useContext(km);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function Zs(){return Lm().state}function Ag(){return Lm().dispatch}function Nm(){return Zs().formRootPath}function Vm(){return Zs().activeItem}function Hm(){return Zs().items}function zm(){return Zs().syncWithLocation}function Wm(){return Zs().errorCount}function Um(){const e=Ag();return w.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function Ym(){const e=Ag();return w.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function Gm(){const e=Ag();return w.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}var pM=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},Km=e=>e.firstChild?e.firstChild.offsetParent===e:!0,hM=(e,t)=>{let n=e,r=0;Km(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},CM=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},_s=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?_s="sticky":CSS.supports("position","-webkit-sticky")&&(_s="-webkit-sticky"));var $l=!1;try{const e=Object.defineProperty({},"passive",{get(){$l={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var dg=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),l=o(s()),u=()=>{Object.assign(l,o(s())),n()};return window.addEventListener("resize",u,$l),r.push(()=>window.removeEventListener("resize",u)),l}else{const s=o(t.getBoundingClientRect()),l=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},u=new ResizeObserver(l);return u.observe(t),r.push(()=>u.disconnect()),s}},EM=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},IM=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,l=pM(e);let u=!1;const A=()=>{u||requestAnimationFrame(()=>{const F=C();F!==x&&O(F),u=!1}),u=!0};let f=l===window?window.scrollY:l.scrollTop;const p=F=>{const{offsetTop:X,height:Z}=E,{naturalTop:Y}=v,{height:$}=j;return F+X+Z>=Y+$+R+o},C=()=>{const{height:F}=E,{height:X}=j;return X+s+o<=F?3:p(f)?1:2},h=l!==window&&Km(l),E=dg({el:l,onChange:A,unsubs:t,measure:({height:F,top:X})=>({height:F,offsetTop:h?X:0})}),m=CM(e),B=m===window?{top:0,bottom:0}:EM(m),v=dg({el:m,onChange:A,unsubs:t,measure:({height:F})=>({height:F-B.top-B.bottom,naturalTop:m===window?0:hM(m,l)+B.top+E.offsetTop})}),j=dg({el:e,onChange:A,unsubs:t,measure:({height:F})=>({height:F})});let R=0,x=C();const O=F=>{const X=x;if(x=F,X===2&&(R=-1),F===3){e.style.position=_s,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:Z,offsetTop:Y}=E,{height:$,naturalTop:ce}=v,{height:se}=j;if(F===2)if(e.style.position="relative",R=X===0?Math.max(0,Y+f-ce+s):Math.max(0,Y+f+Z-(ce+se+o)),r){const q=Math.max(0,$-se-R);e.style.bottom=`${q}px`}else e.style.top=`${R}px`;else e.style.position=_s,F===1?r?e.style.bottom=`${o}px`:e.style.top=`${Z-se-o}px`:r?e.style.bottom=`${Z-se-o}px`:e.style.top=`${s}px`};O(x);const P=F=>{if(F===f)return;const X=F-f;if(f=F,x===3)return;const{offsetTop:Z,height:Y}=E,{naturalTop:$,height:ce}=v,{height:se}=j;if(X>0)if(x===0){if(F+Z+s>$){const q=Math.max(0,Z+f-$+s);F+Z+Y<=$+se+q+o?O(2):O(1)}}else x===2&&p(F)&&O(1);else if(x===1){if(Z+F+Y<$+ce+o){const q=Math.max(0,Z+f+Y-($+se+o));Z+F+s>=$+q?O(2):O(0)}}else x===2&&Z+F+s<$+R&&O(0)},N=l===window?()=>P(window.scrollY):()=>P(l.scrollTop);l.addEventListener("scroll",N,$l),l.addEventListener("mousewheel",N,$l),t.push(()=>l.removeEventListener("scroll",N),()=>l.removeEventListener("mousewheel",N))},mM=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=w.useState(null);return w.useEffect(()=>{if(!r||!_s)return;const s=[];return IM(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(l=>l())}},[r,t,e,n]),o},BM=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:l}=e,u=mM({offsetTop:t,offsetBottom:n,bottom:r});return g.jsx("div",{className:s,style:l,ref:u,children:o})},vM=BM,Jm=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(Jm||{});function Xm(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=ge.omit(e,["sticky","disposition","spacing"]),s=t?vM:b.Box,l=w.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return g.jsx(b.Grid,{...o,item:!0,...n,children:g.jsx(s,{...l,children:g.jsx(b.Stack,{spacing:r,children:e.children})})})}function Zm(e){return g.jsx(g.Fragment,{children:e.children})}function _m(e){const{children:t}=e;return w.useMemo(()=>{const r={top:[],bottom:[]};return w.Children.forEach(t,o=>{if(w.isValidElement(o)&&(o==null?void 0:o.type)===Zm){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function qm(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=ge.omit(e,["disposition"]);return g.jsx(b.Grid,{...n,item:!0,...t,children:e.children})}function $m(e){const t=Vm();return t===void 0?!1:e===t||Rm(e,t)}function e0(e){const t=Hm();return w.useMemo(()=>Dm(e,t),[t,e])}function yM(){const e=Nm(),{search:t}=fi.useLocation(),n=fi.useNavigate();return w.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n])}function t0(){const e=e0();return g.jsx(b.Card,{variant:"outlined",children:g.jsx(b.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:ge.map(e,(t,n)=>g.jsx(gg,{...t},n))})})}function gg(e){const t=de.useTranslate()??ge.identity,n=n0(e),{selected:r,label:o,icon:s,onClick:l,badge:u,items:A,isGroup:f,level:p,errors:C=0}=n,{spacing:h}=wn(),[E,m]=w.useState(r),B=w.useCallback(R=>{m(!E),l(R)},[l,E]),v=s!==void 0,j=ge.omit(e,["label","icon","selected","badge"]);return w.useEffect(()=>{r&&!E&&m(r)},[r,E,m]),g.jsxs(g.Fragment,{children:[g.jsx(b.ListItem,{...j,disablePadding:!0,children:g.jsxs(b.ListItemButton,{selected:r&&!f,onClick:B,sx:{pl:h*p},children:[v&&g.jsx(b.ListItemIcon,{children:s}),g.jsx(b.ListItemText,{inset:!v,primary:C===0?t(o):g.jsx(b.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),u&&g.jsx(b.ListItemAvatar,{children:g.jsx(Gs,{type:"filled",size:"xs",color:u.color??"default",children:u.content})}),f&&(E?g.jsx(fn.ExpandLess,{}):g.jsx(fn.ExpandMore,{}))]})}),f&&g.jsx(b.Collapse,{in:E,timeout:"auto",children:g.jsx(b.List,{children:ge.map(A,(R,x)=>g.jsx(gg,{...R},x))})})]})}function n0(e){const{id:t}=e,n=$m(t),r=ql(t),o=yM(),s=zm(),l=Um(),u=e0(t),A=!ge.isEmpty(u),f=w.useCallback(C=>{A||(s?o(e.id):l(e.id)),ge.isFunction(e.onClick)&&e.onClick(C)},[l,o,e,s,A]);return w.useMemo(()=>({...e,selected:n,onClick:f,items:u,isGroup:A,level:r}),[e,n,f,u,A])}function r0(e=[],t){const n=ge.isArray(e)?e:[e],r=ge.filter(n,o=>w.isValidElement(o));ge.each(r,o=>{var s;t(o),r0(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}function o0(e){const{errors:t}=Oo.useFormState(),n=Wm(),{label:r,icon:o,badge:s,index:l=0,children:u}=e,A=ug(e),f=Ym(),p=Gm(),C=$m(A),h=[];n&&(e.sources!==void 0?h.push(...e.sources):r0(u,m=>{var B;((B=m==null?void 0:m.props)==null?void 0:B.source)!==void 0&&h.push(m.props.source)}));const E=ge.chain(h).uniq().map(m=>ge.get(t,m)).reject(m=>m===void 0).value().length;return w.useEffect(()=>{f({id:A,index:l,label:r,icon:o,badge:s,errors:E})},[f,p,r,o,A,s,l,E]),w.useEffect(()=>()=>{p(A)},[A]),g.jsx(b.Box,{display:C?"unset":"none",children:e.children})}function i0(e){const t=fg(e),n=ug(e);return g.jsx(o0,{...e,id:n,children:w.Children.map(t,r=>{const o=ug(r.props);return w.cloneElement(r,{id:`${n}.${o}`})})})}function s0(e){return g.jsx(o0,{...e})}function fg(e){const{children:t}=e;return w.useMemo(()=>ge.chain(w.Children.toArray(t)).filter(r=>w.isValidElement(r)&&((r==null?void 0:r.type)===s0||(r==null?void 0:r.type)===i0)).map((r,o)=>w.cloneElement(r,{index:o})).value(),[t])}function bM(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=ge.pick(e,["syncWithLocation","errorCount"]),s=ge.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:l,bottom:u}=_m(e),A=fg(e);return g.jsx(Fm,{...o,children:g.jsxs(Mm,{...s,spacing:r,children:[g.jsxs(Xm,{disposition:t,spacing:r,children:[l,g.jsx(t0,{}),u]}),g.jsx(qm,{disposition:n,children:A})]})})}const kt=bM;kt.BaseForm=Mm,kt.Content=qm,kt.Provider=Fm,kt.useItems=Hm,kt.useSyncWithLocation=zm,kt.useErrorCount=Wm,kt.useFormRootPath=Nm,kt.useActiveItem=Vm,kt.useSetActiveItem=Um,kt.useAddItem=Ym,kt.useRemoveItem=Gm,kt.Sidebar=Xm,kt.SidebarSection=Zm,kt.SidebarSectionPosition=Jm,kt.useSidebarChildren=_m,kt.NavMenu=t0,kt.NavMenuItem=gg,kt.useNavMenuItem=n0,kt.Tab=s0,kt.Group=i0,kt.useBaseItemChildren=fg;const QM=Ae(S.Show,{name:"RaApplicaShow",slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaShow-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaShow-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),xM=Ae(S.SimpleFormIterator,{name:"ApplicaSimpleFormIterator",root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}})),wM=Ts(S.TabbedForm,{name:"RaApplicaTabbedForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?0:1)},[e.breakpoints.down("sm")]:{paddingBottom:0}})),pg=e=>{const{title:t,modal:n,content:r,subheader:o,secondary:s,sx:l,...u}=e,A=SA(t);return g.jsx(Wn,{title:A,modal:n,content:r,subheader:o,secondary:s,sx:{...l,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!n,divider:!0,children:g.jsx(wM,{toolbar:g.jsx(lr,{}),...u})})};pg.defaultProps={toolbar:g.jsx(lr,{children:g.jsx(S.SaveButton,{type:"button"})}),secondary:g.jsx(Ro,{children:g.jsx(S.DeleteWithConfirmButton,{})})},pg.Tab=S.TabbedForm.Tab;const TM=k.forwardRef((e,t)=>{const{children:n,disabled:r,disableActions:o=!1,index:s,member:l,resource:u}=e,A=S.useTranslate(),[f,p]=k.useState(!1),{total:C,remove:h}=dC(),E=k.useCallback(()=>{p(!1),h(s)},[s,h]),m=w.useMemo(()=>({index:s,total:C,remove:()=>h(s)}),[s,C,h]);return g.jsxs(bA.Provider,{value:m,children:[w.Children.map(n,(B,v)=>{if(!w.isValidElement(B))return null;const{source:j,...R}=B.props;return g.jsx(b.TableCell,{sx:{border:0,verticalAlign:"top"},children:w.cloneElement(B,{source:j?`${l}.${j}`:l,index:j?void 0:v,resource:u,disabled:r,...R,label:""})})}),!o&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",border:0,pt:2.5},children:g.jsx(Ro,{horizontal:!0,children:g.jsx(b.Typography,{color:"error",onClick:()=>p(!0),children:A("ra.action.delete")})})}),n.length>0&&g.jsx(S.Confirm,{isOpen:f,title:A("ra.action.remove_item"),content:A("ra.message.remove_item"),onConfirm:E,onClose:()=>p(!1)})]})});var PM=Array.isArray,ec=PM,SM=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,OM=SM,jM=OM,MM=typeof self=="object"&&self&&self.Object===Object&&self,RM=jM||MM||Function("return this")(),tc=RM,DM=tc,kM=DM.Symbol,nc=kM,a0=nc,l0=Object.prototype,FM=l0.hasOwnProperty,LM=l0.toString,qs=a0?a0.toStringTag:void 0;function NM(e){var t=FM.call(e,qs),n=e[qs];try{e[qs]=void 0;var r=!0}catch{}var o=LM.call(e);return r&&(t?e[qs]=n:delete e[qs]),o}var VM=NM,HM=Object.prototype,zM=HM.toString;function WM(e){return zM.call(e)}var UM=WM,c0=nc,YM=VM,GM=UM,KM="[object Null]",JM="[object Undefined]",u0=c0?c0.toStringTag:void 0;function XM(e){return e==null?e===void 0?JM:KM:u0&&u0 in Object(e)?YM(e):GM(e)}var hg=XM;function ZM(e){return e!=null&&typeof e=="object"}var rc=ZM,_M=hg,qM=rc,$M="[object Symbol]";function eR(e){return typeof e=="symbol"||qM(e)&&_M(e)==$M}var Cg=eR,tR=ec,nR=Cg,rR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oR=/^\w*$/;function iR(e,t){if(tR(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||nR(e)?!0:oR.test(e)||!rR.test(e)||t!=null&&e in Object(t)}var sR=iR;function aR(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var A0=aR,lR=hg,cR=A0,uR="[object AsyncFunction]",AR="[object Function]",dR="[object GeneratorFunction]",gR="[object Proxy]";function fR(e){if(!cR(e))return!1;var t=lR(e);return t==AR||t==dR||t==uR||t==gR}var d0=fR,pR=tc,hR=pR["__core-js_shared__"],CR=hR,Eg=CR,g0=function(){var e=/[^.]+$/.exec(Eg&&Eg.keys&&Eg.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ER(e){return!!g0&&g0 in e}var IR=ER,mR=Function.prototype,BR=mR.toString;function vR(e){if(e!=null){try{return BR.call(e)}catch{}try{return e+""}catch{}}return""}var yR=vR,bR=d0,QR=IR,xR=A0,wR=yR,TR=/[\\^$.*+?()[\]{}|]/g,PR=/^\[object .+?Constructor\]$/,SR=Function.prototype,OR=Object.prototype,jR=SR.toString,MR=OR.hasOwnProperty,RR=RegExp("^"+jR.call(MR).replace(TR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function DR(e){if(!xR(e)||QR(e))return!1;var t=bR(e)?RR:PR;return t.test(wR(e))}var kR=DR;function FR(e,t){return e==null?void 0:e[t]}var LR=FR,NR=kR,VR=LR;function HR(e,t){var n=VR(e,t);return NR(n)?n:void 0}var oc=HR,zR=oc,WR=zR(Object,"create"),ic=WR,f0=ic;function UR(){this.__data__=f0?f0(null):{},this.size=0}var YR=UR;function GR(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var KR=GR,JR=ic,XR="__lodash_hash_undefined__",ZR=Object.prototype,_R=ZR.hasOwnProperty;function qR(e){var t=this.__data__;if(JR){var n=t[e];return n===XR?void 0:n}return _R.call(t,e)?t[e]:void 0}var $R=qR,eD=ic,tD=Object.prototype,nD=tD.hasOwnProperty;function rD(e){var t=this.__data__;return eD?t[e]!==void 0:nD.call(t,e)}var oD=rD,iD=ic,sD="__lodash_hash_undefined__";function aD(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=iD&&t===void 0?sD:t,this}var lD=aD,cD=YR,uD=KR,AD=$R,dD=oD,gD=lD;function Ni(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ni.prototype.clear=cD,Ni.prototype.delete=uD,Ni.prototype.get=AD,Ni.prototype.has=dD,Ni.prototype.set=gD;var fD=Ni;function pD(){this.__data__=[],this.size=0}var hD=pD;function CD(e,t){return e===t||e!==e&&t!==t}var ED=CD,ID=ED;function mD(e,t){for(var n=e.length;n--;)if(ID(e[n][0],t))return n;return-1}var sc=mD,BD=sc,vD=Array.prototype,yD=vD.splice;function bD(e){var t=this.__data__,n=BD(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():yD.call(t,n,1),--this.size,!0}var QD=bD,xD=sc;function wD(e){var t=this.__data__,n=xD(t,e);return n<0?void 0:t[n][1]}var TD=wD,PD=sc;function SD(e){return PD(this.__data__,e)>-1}var OD=SD,jD=sc;function MD(e,t){var n=this.__data__,r=jD(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var RD=MD,DD=hD,kD=QD,FD=TD,LD=OD,ND=RD;function Vi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Vi.prototype.clear=DD,Vi.prototype.delete=kD,Vi.prototype.get=FD,Vi.prototype.has=LD,Vi.prototype.set=ND;var VD=Vi,HD=oc,zD=tc,WD=HD(zD,"Map"),UD=WD,p0=fD,YD=VD,GD=UD;function KD(){this.size=0,this.__data__={hash:new p0,map:new(GD||YD),string:new p0}}var JD=KD;function XD(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ZD=XD,_D=ZD;function qD(e,t){var n=e.__data__;return _D(t)?n[typeof t=="string"?"string":"hash"]:n.map}var ac=qD,$D=ac;function ek(e){var t=$D(this,e).delete(e);return this.size-=t?1:0,t}var tk=ek,nk=ac;function rk(e){return nk(this,e).get(e)}var ok=rk,ik=ac;function sk(e){return ik(this,e).has(e)}var ak=sk,lk=ac;function ck(e,t){var n=lk(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var uk=ck,Ak=JD,dk=tk,gk=ok,fk=ak,pk=uk;function Hi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Hi.prototype.clear=Ak,Hi.prototype.delete=dk,Hi.prototype.get=gk,Hi.prototype.has=fk,Hi.prototype.set=pk;var h0=Hi,C0=h0,hk="Expected a function";function Ig(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(hk);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var l=e.apply(this,r);return n.cache=s.set(o,l)||s,l};return n.cache=new(Ig.Cache||C0),n}Ig.Cache=C0;var Ck=Ig,Ek=Ck,Ik=500;function mk(e){var t=Ek(e,function(r){return n.size===Ik&&n.clear(),r}),n=t.cache;return t}var Bk=mk,vk=Bk,yk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bk=/\\(\\)?/g,Qk=vk(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(yk,function(n,r,o,s){t.push(o?s.replace(bk,"$1"):r||n)}),t}),xk=Qk;function wk(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var E0=wk,I0=nc,Tk=E0,Pk=ec,Sk=Cg,Ok=1/0,m0=I0?I0.prototype:void 0,B0=m0?m0.toString:void 0;function v0(e){if(typeof e=="string")return e;if(Pk(e))return Tk(e,v0)+"";if(Sk(e))return B0?B0.call(e):"";var t=e+"";return t=="0"&&1/e==-Ok?"-0":t}var jk=v0,Mk=jk;function Rk(e){return e==null?"":Mk(e)}var Dk=Rk,kk=ec,Fk=sR,Lk=xk,Nk=Dk;function Vk(e,t){return kk(e)?e:Fk(e,t)?[e]:Lk(Nk(e))}var Hk=Vk,zk=Cg,Wk=1/0;function Uk(e){if(typeof e=="string"||zk(e))return e;var t=e+"";return t=="0"&&1/e==-Wk?"-0":t}var Yk=Uk,Gk=Hk,Kk=Yk;function Jk(e,t){t=Gk(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Kk(t[n++])];return n&&n==r?e:void 0}var Xk=Jk,Zk=Xk;function _k(e,t,n){var r=e==null?void 0:Zk(e,t);return r===void 0?n:r}var qk=_k;const $k=$r(qk),y0=e=>{var q,J;const{children:t,resource:n,source:r,label:o,disableActions:s=!1,disableAdd:l=!1,disableRemove:u=!1,className:A,empty:f,template:p={}}=e,[C,h]=w.useState(!1),{fields:E,remove:m,replace:B,append:v}=S.useArrayInput(e),{resetField:j}=Oo.useFormContext(),R=Pt(),x=de.useTranslate(),O=de.useRecordContext(e),P=w.useRef(p||{}),N=de.useTranslateLabel(),F=w.useCallback(H=>{m(H)},[m]);if(E.length>0){const{...H}=E[0];P.current=H;for(const K in P.current)P.current[K]=null}const X=w.useCallback((H=void 0)=>{let K=H;H==null&&(K=P.current,w.Children.count(t)===1&&k.isValidElement(w.Children.only(t))&&!w.Children.only(t).props.source&&w.Children.map(t,ee=>k.isValidElement(ee)&&ee.type!==de.FormDataConsumer).some(Boolean)?K="":(K=K||{},w.Children.forEach(t,ee=>{k.isValidElement(ee)&&ee.type!==de.FormDataConsumer&&ee.props.source&&(K[ee.props.source]=ee.props.defaultValue??null)})));const L={...K,...p};v(L),j(`${r}.${E.length}`,{defaultValue:K})},[v,t,j,r,E.length,p]),Z=H=>K=>{X(),H&&H(K)},Y=w.useCallback(()=>{B([]),h(!1)},[B]),$=$k(O,r),ce=w.useMemo(()=>({total:E.length,remove:F,source:r}),[E.length,F,r]),se=R.palette.mode==="dark"?R.palette.grey.A400:R.palette.grey.A800;return E?g.jsx(yA.Provider,{value:ce,children:g.jsxs("div",{className:A,children:[k.cloneElement(g.jsx(b0,{}),{label:o,source:r,disableAdd:l,template:p,onClick:Z((J=(q=e==null?void 0:e.addButton)==null?void 0:q.props)==null?void 0:J.onClick)}),g.jsx(b.TableContainer,{component:b.Paper,sx:{mt:2,border:`1px solid ${se}`},children:g.jsxs(b.Table,{children:[g.jsx(b.TableHead,{sx:{borderTop:0,borderBottom:`1px solid ${se}`},children:g.jsxs(b.TableRow,{children:[w.Children.map(t,(H,K)=>k.isValidElement(H)?g.jsx(b.TableCell,{children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none",children:N({...H.props,resource:n})})},K):null),!s&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",verticalAlign:"top"},children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none"})},"actions")]})}),g.jsxs(b.TableBody,{children:[E.length===0&&g.jsx(b.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:g.jsx(b.TableCell,{colSpan:4+(s?0:1),align:"center",children:f||g.jsx(b.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),E.length>0&&E.map((H,K)=>g.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${se}}`},children:g.jsx(TM,{disableRemove:u,disableActions:s,index:K,member:`${r}.${K}`,onRemoveField:F,record:$&&$[K]||{},resource:n,source:r,children:t})},H.id))]})]})}),E.length>0&&g.jsx(S.Confirm,{isOpen:C,title:x("ra.action.clear_array_input"),content:x("ra.message.clear_array_input"),onConfirm:Y,onClose:()=>h(!1)})]})}):null},b0=e=>{const{label:t,disableAdd:n,onClick:r}=e,o=Pt(),s=o.palette.mode==="dark"?o.palette.grey.A400:o.palette.grey.A800,l=o.palette.mode==="light"?"#000000":"#FFFFFF";return g.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[t!==!1&&g.jsx(b.Typography,{children:t}),!n&&(k.isValidElement(e==null?void 0:e.addButton)?k.cloneElement(e==null?void 0:e.addButton,{onClick:r}):g.jsx(b.IconButton,{size:"small",color:"secondary",sx:{border:`1px solid ${s}`},onClick:r,children:g.jsx(et.PlusCircleOutlined,{style:{color:l}})}))]})},e5=Ae(y0,{name:"RaApplicaTableFormIterator",slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8)})`}}}));b0.propTypes={label:c.oneOfType([c.string,c.bool]),source:c.string,defaultValue:c.any},y0.propTypes={addButton:c.element,children:c.node,className:c.string,field:c.object,fields:c.array,fieldState:c.object,formState:c.object,record:c.object,source:c.string,label:c.oneOfType([c.string,c.bool]),resource:c.string,translate:c.func,disableAdd:c.bool,disableRemove:c.oneOfType([c.func,c.bool]),TransitionProps:c.shape({}),empty:c.oneOfType([c.node,c.string]),template:c.object};function t5(e,t){const n=ge.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=ge.chain(n.media).clone().extend(o).value();return ge.extend(n,{media:s})}case"updateDrawer":{const s=ge.chain(n.drawer).clone().extend(o).value();return ge.extend(n,{drawer:s})}case"updateLogo":{const s=ge.chain(n.logo).clone().extend(o).value();return ge.extend(n,{logo:s})}case"updateNotifications":{const s=ge.chain(n.notifications).clone().extend(o).value();return ge.extend(n,s)}case"updateTheme":{const s=ge.chain(n.theme).clone().extend(o).value();return ge.extend(n,{theme:s})}default:return n}}const n5={drawer:{open:!0,width:260,handleDrawerToggle:()=>{}},media:{downMd:!1,downLg:!1,downXl:!1,horizontal:!1},logo:{},notifications:{enable:!0,resource:"entities/notification"},theme:{iconColor:"grey.300",iconColorOpen:"grey.100"}},Q0=w.createContext(void 0);function x0(e){var Z;const t=de.useAuthProvider(),n=de.useGetIdentity(),r=b.useTheme(),o=b.useMediaQuery(r.breakpoints.down("md")),s=b.useMediaQuery(r.breakpoints.down("lg")),l=b.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:u,isHorizontalLayout:A,menuOrientation:f,drawerWidth:p}=wn(),C=A(f)&&!s,{drawerOpen:h,openDrawer:E}=no(),m=w.useCallback(()=>{E(!h)},[h,E]),[B,v]=w.useState(!1),[j,R]=w.useReducer(t5,ge.chain(n5).clone().merge({drawer:{open:!u||h}}).value()),x=w.useCallback(()=>v(!1),[]),O=w.useMemo(()=>({state:j,dispatch:R}),[j,R]),{logoIcon:P,logoMain:N,enableNotification:F,notification:X}=e;return w.useEffect(()=>{R({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:l,horizontal:C}})},[f,o,s,l]),w.useEffect(()=>{R({type:"updateDrawer",payload:{open:h,width:p,handleDrawerToggle:m}})},[h,p,m]),w.useEffect(()=>{u||E(!l)},[l,u]),w.useEffect(()=>{R({type:"updateLogo",payload:{main:N,icon:P}})},[P,N]),w.useEffect(()=>{R({type:"updateNotifications",payload:{enable:F,resource:X??"entities/notification"}})},[F,X]),w.useEffect(()=>{R({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),w.useEffect(()=>{t.isImpersonating().then(Y=>{var $;v(!Y&&(($=n==null?void 0:n.data)==null?void 0:$.needToChangePassword)===!0)})},[(Z=n==null?void 0:n.data)==null?void 0:Z.needToChangePassword,t]),g.jsxs(Q0.Provider,{value:O,children:[g.jsx(b.Dialog,{open:B,maxWidth:"xs",fullWidth:!0,children:g.jsx(lg,{onSuccess:x,firstAccess:!0})}),e.children]})}function w0(e){return w.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s,notification:l}=t;return g.jsx(x0,{logoIcon:r,logoMain:o,enableNotification:s,notification:l,children:g.jsx(e,{ref:n,...t})})})}function mg(){const e=w.useContext(Q0);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function r5(){return mg().dispatch}function zi(){return mg().state}function Yn(){return zi().media}function Yo(){return zi().drawer}function T0(){return zi().logo}function lc(){return zi().notifications}function o5(){return zi().theme}const i5={ml:{xs:0,lg:-2}};function P0(){const{open:e,handleDrawerToggle:t}=Yo();return g.jsx(Js,{value:"drawer","aria-label":"open drawer",sx:i5,onChange:t,selected:e,children:e?g.jsx(et.MenuFoldOutlined,{}):g.jsx(et.MenuUnfoldOutlined,{})})}function S0(e){const t=w.useRef(),n=b.useTheme(),{downLg:r,horizontal:o}=Yn(),{open:s,width:l}=Yo(),u=r?b.AppBar:gC,A=Ir(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":s?`calc(100% - ${l}px)`:{xs:"100%",lg:"calc(100% - 60px)"}}),f={position:"fixed",color:"inherit",elevation:0,sx:A};return r||ge.extend(f,{open:s}),g.jsx(u,{ref:t,...f,children:g.jsxs(b.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&g.jsx(P0,{}),e.children]})})}function s5(e){const t=b.useTheme(),{notification:n,onClick:r,selected:o,divider:s}=e,{resource:l}=lc(),u=de.useNotify(),A=de.useRedirect(),[f]=de.useUpdate(l,{id:n==null?void 0:n.id,data:{...n,readed:Mr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(A(n==null?void 0:n.resource),r()):(r(),document.location.href=n==null?void 0:n.resource):r()},onFailure:()=>{u("resources.notifications.messages.readed.error","warning")}}),p=w.useCallback(()=>f(),[f]),[C]=de.useLocaleState(),h=w.useMemo(()=>Mr(n.created).locale(C).fromNow(),[n,C]);return g.jsx(b.ListItem,{disablePadding:!0,divider:s,children:g.jsxs(b.ListItemButton,{selected:o,onClick:p,children:[g.jsx(b.ListItemAvatar,{children:g.jsx(b.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:g.jsx(et.MessageOutlined,{})})}),g.jsx(b.ListItemText,{primary:n.title,secondary:n.content}),g.jsx(b.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),g.jsx(b.ListItemText,{primary:h,primaryTypographyProps:{variant:"caption"}})]})})}const a5={width:36,height:36,fontSize:"1rem"},l5={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function O0(){const{enable:e}=lc();return e?g.jsx(c5,{}):null}function c5(){const e=de.useTranslate(),t=b.useTheme(),{downMd:n}=Yn(),{resource:r}=lc(),[o,s]=w.useState([]),{data:l,isLoading:u}=de.useGetList(r,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),A=o.filter(E=>E.readed===null).length,{open:f,anchorEl:p,handleClose:C,handleToggle:h}=pl();return w.useEffect(()=>{!u&&l&&s(l??[])},[l,u]),g.jsxs(g.Fragment,{children:[g.jsx(Js,{value:"notifications",selected:f,onChange:h,children:g.jsx(b.Badge,{badgeContent:A,color:"primary",children:g.jsx(et.BellOutlined,{})})}),g.jsx(b.Popper,{placement:n?"bottom":"bottom-end",open:f,anchorEl:p,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[n?-5:0,9]}}]},children:({TransitionProps:E})=>g.jsx(Ao,{type:"grow",position:n?"top":"top-right",in:f,...E,children:g.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:g.jsx(b.ClickAwayListener,{onClickAway:C,children:g.jsxs(Wn,{title:"Notification",elevation:0,border:!1,content:!1,secondary:g.jsx(g.Fragment,{children:A>0&&g.jsx(b.Tooltip,{title:"Mark as all read",children:g.jsx(Fi,{color:"success",size:"small",children:g.jsx(et.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[g.jsx(b.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":a5,"& .MuiListItemSecondaryAction-root":{...l5,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:o.map((m,B)=>g.jsx(s5,{selected:A>0,notification:m,onClick:C,divider:B<o.length-1},m.id))}),g.jsx(b.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${r}`,LinkComponent:mt.Link,onClick:C,children:g.jsx(b.ListItemText,{primary:g.jsx(b.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})}),g.jsx(b.Divider,{})]})})})})})]})}const u5=()=>{const[e,t]=w.useState(!1),n=w.useCallback(()=>t(!1),[t]),r=w.useCallback(()=>t(!0),[t]),o=de.useTranslate();return g.jsxs(w.Fragment,{children:[g.jsxs(b.ListItemButton,{onClick:r,children:[g.jsx(b.ListItemIcon,{children:g.jsx(fn.Key,{})}),g.jsx(b.ListItemText,{primary:o("ra.auth.change_password")})]}),g.jsx(b.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:g.jsx(lg,{onSuccess:n})})]})},A5=()=>{const e=de.useLogout(),t=de.useTranslate();return g.jsx(w.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:e,children:[g.jsx(b.ListItemIcon,{children:g.jsx(fn.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:t("ra.auth.logout")})]})})},d5=()=>{const e=de.useTranslate(),t=de.useAuthProvider(),n=w.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t==null?void 0:t.stopImpersonating]),[r,o]=w.useState(!1);return w.useEffect(()=>{t.isImpersonating&&t.isImpersonating().then(s=>o(s))},[t,o]),r?g.jsx(w.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:n,children:[g.jsx(b.ListItemIcon,{children:g.jsx(fn.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null};function j0(){var E;const e=b.useTheme(),t=de.useDataProvider(),n=de.useAuthProvider(),{identity:r}=de.useGetIdentity(),o=r!==void 0&&r.image&&r.image!==null&&r.image!=="",[s,l]=w.useState(null),{open:u,anchorEl:A,handleToggle:f,handleClose:p}=pl(),C=de.useLogout(),h=w.useCallback(()=>{C()},[n,C]);return w.useEffect(()=>{o&&t.getFile("/profile/me/image").then(m=>l(m))},[t,o]),g.jsxs(g.Fragment,{children:[g.jsx(Js,{sx:{p:.25,width:"auto"},onClick:f,value:"profile",selected:u,children:g.jsxs(b.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[g.jsx(Gs,{alt:(E=r==null?void 0:r.name)==null?void 0:E.toUpperCase(),src:s,size:"xs"}),g.jsx(b.Typography,{variant:"subtitle1",children:r==null?void 0:r.name})]})}),g.jsx(ir.Popper,{placement:"bottom-end",open:u,anchorEl:A,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:m})=>{var B;return g.jsx(Ao,{type:"grow",position:"top-right",in:u,...m,children:g.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250}},children:g.jsx(b.ClickAwayListener,{onClickAway:p,children:g.jsxs(Wn,{elevation:0,border:!1,content:!1,children:[g.jsx(b.CardContent,{sx:{px:2.5,pt:3},children:g.jsxs(b.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[g.jsx(b.Grid,{item:!0,children:g.jsxs(b.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[g.jsx(Gs,{alt:"profile user",src:s,sx:{width:32,height:32}}),g.jsxs(b.Stack,{children:[g.jsx(b.Typography,{variant:"h6",children:r==null?void 0:r.name}),g.jsx(b.Typography,{variant:"body2",color:"textSecondary",children:(B=r==null?void 0:r.roles)==null?void 0:B.map(v=>v.name.replace("ROLE_","")).join(",")})]})]})}),g.jsx(b.Grid,{item:!0,children:g.jsx(b.Tooltip,{title:"Logout",children:g.jsx(Fi,{size:"large",sx:{color:"text.primary"},onClick:h,children:g.jsx(et.LogoutOutlined,{})})})})]})}),g.jsx(b.Grid,{container:!0,children:g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[g.jsx(u5,{}),g.jsx(A5,{}),g.jsx(d5,{})]})})})]})})})})}})]})}const M0=e=>{const t=Pt(),{downMd:n}=Yn(),{open:r,anchorEl:o,handleToggle:s,handleClose:l}=pl();return n?g.jsxs(g.Fragment,{children:[g.jsx(Js,{"aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:s,selected:r,children:g.jsx(et.MoreOutlined,{})}),g.jsx(b.Popper,{placement:"bottom-end",open:r,anchorEl:o,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:u})=>g.jsx(Ao,{type:"fade",in:r,...u,children:g.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1},children:g.jsx(b.ClickAwayListener,{onClickAway:l,children:g.jsx(b.AppBar,{color:"inherit",children:g.jsx(b.Toolbar,{children:e.children})})})})})})]}):g.jsx(g.Fragment,{children:e.children})};function R0(e){return g.jsx(b.Box,{...e,flex:1})}function $s(e){const{name:t,version:n}=e;return g.jsx(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{p:"24px 16px 0px",mt:"auto"},children:g.jsxs(b.Typography,{variant:"caption",children:[g.jsx("span",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.copy)||""}})," ",t," - ",n]})})}$s.propTypes={name:c.string.isRequired,version:c.string.isRequired,copy:c.string},$s.defaultProps={copy:"© Applica Software Guru for"};var D0={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})(D0);var cc=D0.exports,Bg={};const g5=Hx($j);var k0;function uc(){return k0||(k0=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=g5}(Bg)),Bg}function F0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=F0(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function L0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=F0(e))&&(r&&(r+=" "),r+=t);return r}var f5="__lodash_hash_undefined__";function p5(e){return this.__data__.set(e,f5),this}var h5=p5;function C5(e){return this.__data__.has(e)}var E5=C5,I5=h0,m5=h5,B5=E5;function Ac(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new I5;++t<n;)this.add(e[t])}Ac.prototype.add=Ac.prototype.push=m5,Ac.prototype.has=B5;var N0=Ac;function v5(e,t){return e.has(t)}var V0=v5;function y5(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var H0=y5;function b5(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Q5=b5,x5=hg,w5=rc,T5="[object Arguments]";function P5(e){return w5(e)&&x5(e)==T5}var S5=P5,z0=S5,O5=rc,W0=Object.prototype,j5=W0.hasOwnProperty,M5=W0.propertyIsEnumerable,R5=z0(function(){return arguments}())?z0:function(e){return O5(e)&&j5.call(e,"callee")&&!M5.call(e,"callee")},D5=R5,k5=9007199254740991;function F5(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=k5}var L5=F5;function N5(e){return function(t){return e(t)}}var V5=N5,H5=d0,z5=L5;function W5(e){return e!=null&&z5(e.length)&&!H5(e)}var U5=W5,Y5=oc,G5=tc,K5=Y5(G5,"Set"),J5=K5,vg=globalThis&&globalThis.__assign||function(){return vg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},vg.apply(this,arguments)},X5=globalThis&&globalThis.__rest||function(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},U0=function(e){var t=e.className,n=e.sx,r=X5(e,["className","sx"]),o=de.useLoading(),s=Pt();return k.createElement(Z5,{className:t,sx:n},o?k.createElement(Dd,vg({className:L0("app-loader",dc.loader),color:"inherit",size:s.spacing(2),thickness:6},r)):k.createElement(OB,{className:dc.loadedIcon}))};U0.propTypes={classes:c.object,className:c.string,width:c.string};var yg="RaLoadingIndicator",dc={loader:"".concat(yg,"-loader"),loadedIcon:"".concat(yg,"-loadedIcon")},Z5=Ae("div",{name:yg,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={},t["& .".concat(dc.loader)]={marginLeft:n.spacing(1.5),marginRight:n.spacing(1.5)},t["& .".concat(dc.loadedIcon)]={},t});const bg=e=>e.scrollTop;function Wi(e,t){var n,r;const{timeout:o,easing:s,style:l={}}=e;return{duration:(n=l.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=l.transitionTimingFunction)!=null?r:typeof s=="object"?s[t.mode]:s,delay:l.transitionDelay}}const _5=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function q5(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),s=Ei(t);let l;if(t.fakeTransform)l=t.fakeTransform;else{const f=s.getComputedStyle(t);l=f.getPropertyValue("-webkit-transform")||f.getPropertyValue("transform")}let u=0,A=0;if(l&&l!=="none"&&typeof l=="string"){const f=l.split("(")[1].split(")")[0].split(",");u=parseInt(f[4],10),A=parseInt(f[5],10)}return e==="left"?o?`translateX(${o.right+u-r.left}px)`:`translateX(${s.innerWidth+u-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-u}px)`:`translateX(-${r.left+r.width-u}px)`:e==="up"?o?`translateY(${o.bottom+A-r.top}px)`:`translateY(${s.innerHeight+A-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-A}px)`:`translateY(-${r.top+r.height-A}px)`}function Y0(e){return typeof e=="function"?e():e}function gc(e,t,n){const r=Y0(n),o=q5(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const G0=k.forwardRef(function(t,n){const r=Pt(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:l,appear:u=!0,children:A,container:f,direction:p="down",easing:C=o,in:h,onEnter:E,onEntered:m,onEntering:B,onExit:v,onExited:j,onExiting:R,style:x,timeout:O=s,TransitionComponent:P=Td}=t,N=Ue(t,_5),F=k.useRef(null),X=Qn(A.ref,F,n),Z=L=>ee=>{L&&(ee===void 0?L(F.current):L(F.current,ee))},Y=Z((L,ee)=>{gc(p,L,f),bg(L),E&&E(L,ee)}),$=Z((L,ee)=>{const z=Wi({timeout:O,style:x,easing:C},{mode:"enter"});L.style.webkitTransition=r.transitions.create("-webkit-transform",W({},z)),L.style.transition=r.transitions.create("transform",W({},z)),L.style.webkitTransform="none",L.style.transform="none",B&&B(L,ee)}),ce=Z(m),se=Z(R),q=Z(L=>{const ee=Wi({timeout:O,style:x,easing:C},{mode:"exit"});L.style.webkitTransition=r.transitions.create("-webkit-transform",ee),L.style.transition=r.transitions.create("transform",ee),gc(p,L,f),v&&v(L)}),J=Z(L=>{L.style.webkitTransition="",L.style.transition="",j&&j(L)}),H=L=>{l&&l(F.current,L)},K=k.useCallback(()=>{F.current&&gc(p,F.current,f)},[p,f]);return k.useEffect(()=>{if(h||p==="down"||p==="right")return;const L=hh(()=>{F.current&&gc(p,F.current,f)}),ee=Ei(F.current);return ee.addEventListener("resize",L),()=>{L.clear(),ee.removeEventListener("resize",L)}},[p,h,f]),k.useEffect(()=>{h||K()},[h,K]),g.jsx(P,W({nodeRef:F,onEnter:Y,onEntered:ce,onEntering:$,onExit:q,onExited:J,onExiting:se,addEndListener:H,appear:u,in:h,timeout:O},N,{children:(L,ee)=>k.cloneElement(A,W({ref:X,style:W({visibility:L==="exited"&&!h?"hidden":void 0},x,A.props.style)},ee))}))});process.env.NODE_ENV!=="production"&&(G0.propTypes={addEndListener:c.func,appear:c.bool,children:hi.isRequired,container:Cr(c.oneOfType([jo,c.func]),e=>{if(e.open){const t=Y0(e.container);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `container` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
219
219
|
`))}else if(!t||typeof t.getBoundingClientRect!="function"||t.contextElement!=null&&t.contextElement.nodeType!==1)return new Error(["MUI: The `container` prop provided to the component is invalid.","It should be an HTML element instance."].join(`
|
|
220
220
|
`))}return null}),direction:c.oneOf(["down","left","right","up"]),easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});const $5=G0;function e8(e){return typeof e=="string"}function t8(e,t,n){return e===void 0||e8(e)?t:W({},t,{ownerState:W({},t.ownerState,n)})}const n8={disableDefaultClasses:!1},r8=k.createContext(n8);function o8(e){const{disableDefaultClasses:t}=k.useContext(r8);return n=>t?"":e(n)}function K0(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function i8(e,t,n){return typeof e=="function"?e(t,n):e}function J0(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function s8(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:s}=e;if(!t){const E=Ye(o==null?void 0:o.className,r==null?void 0:r.className,s,n==null?void 0:n.className),m=W({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),B=W({},n,o,r);return E.length>0&&(B.className=E),Object.keys(m).length>0&&(B.style=m),{props:B,internalRef:void 0}}const l=K0(W({},o,r)),u=J0(r),A=J0(o),f=t(l),p=Ye(f==null?void 0:f.className,n==null?void 0:n.className,s,o==null?void 0:o.className,r==null?void 0:r.className),C=W({},f==null?void 0:f.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),h=W({},f,n,A,u);return p.length>0&&(h.className=p),Object.keys(C).length>0&&(h.style=C),{props:h,internalRef:f.ref}}const a8=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function l8(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:s=!1}=e,l=Ue(e,a8),u=s?{}:i8(r,o),{props:A,internalRef:f}=s8(W({},l,{externalSlotProps:u})),p=Qn(f,u==null?void 0:u.ref,(t=e.additionalProps)==null?void 0:t.ref);return t8(n,W({},A,{ref:p}),o)}function c8(e){const t=ar(e);return t.body===e?Ei(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ea(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function X0(e){return parseInt(Ei(e).getComputedStyle(e).paddingRight,10)||0}function u8(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function Z0(e,t,n,r,o){const s=[t,n,...r];[].forEach.call(e.children,l=>{const u=s.indexOf(l)===-1,A=!u8(l);u&&A&&ea(l,o)})}function Qg(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function A8(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(c8(r)){const l=E1(ar(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${X0(r)+l}px`;const u=ar(r).querySelectorAll(".mui-fixed");[].forEach.call(u,A=>{n.push({value:A.style.paddingRight,property:"padding-right",el:A}),A.style.paddingRight=`${X0(A)+l}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=ar(r).body;else{const l=r.parentElement,u=Ei(r);s=(l==null?void 0:l.nodeName)==="HTML"&&u.getComputedStyle(l).overflowY==="scroll"?l:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:l,property:u})=>{s?l.style.setProperty(u,s):l.style.removeProperty(u)})}}function d8(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class g8{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&ea(t.modalRef,!1);const o=d8(n);Z0(n,t.mount,t.modalRef,o,!0);const s=Qg(this.containers,l=>l.container===n);return s!==-1?(this.containers[s].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=Qg(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[r];o.restore||(o.restore=A8(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=Qg(this.containers,l=>l.modals.indexOf(t)!==-1),s=this.containers[o];if(s.modals.splice(s.modals.indexOf(t),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),t.modalRef&&ea(t.modalRef,n),Z0(s.container,t.mount,t.modalRef,s.hiddenSiblings,!1),this.containers.splice(o,1);else{const l=s.modals[s.modals.length-1];l.modalRef&&ea(l.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function f8(e){return typeof e=="function"?e():e}function p8(e){return e?e.props.hasOwnProperty("in"):!1}const h8=new g8;function C8(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=h8,closeAfterTransition:s=!1,onTransitionEnter:l,onTransitionExited:u,children:A,onClose:f,open:p,rootRef:C}=e,h=k.useRef({}),E=k.useRef(null),m=k.useRef(null),B=Qn(m,C),[v,j]=k.useState(!p),R=p8(A);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const O=()=>ar(E.current),P=()=>(h.current.modalRef=m.current,h.current.mount=E.current,h.current),N=()=>{o.mount(P(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},F=eo(()=>{const H=f8(t)||O().body;o.add(P(),H),m.current&&N()}),X=k.useCallback(()=>o.isTopModal(P()),[o]),Z=eo(H=>{E.current=H,H&&(p&&X()?N():m.current&&ea(m.current,x))}),Y=k.useCallback(()=>{o.remove(P(),x)},[x,o]);k.useEffect(()=>()=>{Y()},[Y]),k.useEffect(()=>{p?F():(!R||!s)&&Y()},[p,Y,R,s,F]);const $=H=>K=>{var L;(L=H.onKeyDown)==null||L.call(H,K),!(K.key!=="Escape"||!X())&&(n||(K.stopPropagation(),f&&f(K,"escapeKeyDown")))},ce=H=>K=>{var L;(L=H.onClick)==null||L.call(H,K),K.target===K.currentTarget&&f&&f(K,"backdropClick")};return{getRootProps:(H={})=>{const K=K0(e);delete K.onTransitionEnter,delete K.onTransitionExited;const L=W({},K,H);return W({role:"presentation"},L,{onKeyDown:$(L),ref:B})},getBackdropProps:(H={})=>{const K=H;return W({"aria-hidden":!0},K,{onClick:ce(K),open:p})},getTransitionProps:()=>{const H=()=>{j(!1),l&&l()},K=()=>{j(!0),u&&u(),s&&Y()};return{onEnter:qu(H,A==null?void 0:A.props.onEnter),onExited:qu(K,A==null?void 0:A.props.onExited)}},rootRef:B,portalRef:Z,isTopModal:X,exited:v,hasTransition:R}}const E8=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function I8(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function m8(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function B8(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||m8(e))}function v8(e){const t=[],n=[];return Array.from(e.querySelectorAll(E8)).forEach((r,o)=>{const s=I8(r);s===-1||!B8(r)||(s===0?t.push(r):n.push({documentOrder:o,tabIndex:s,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function y8(){return!0}function fc(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:s=v8,isEnabled:l=y8,open:u}=e,A=k.useRef(!1),f=k.useRef(null),p=k.useRef(null),C=k.useRef(null),h=k.useRef(null),E=k.useRef(!1),m=k.useRef(null),B=Qn(t.ref,m),v=k.useRef(null);k.useEffect(()=>{!u||!m.current||(E.current=!n)},[n,u]),k.useEffect(()=>{if(!u||!m.current)return;const x=ar(m.current);return m.current.contains(x.activeElement)||(m.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
|
|
221
221
|
`)),m.current.setAttribute("tabIndex","-1")),E.current&&m.current.focus()),()=>{o||(C.current&&C.current.focus&&(A.current=!0,C.current.focus()),C.current=null)}},[u]),k.useEffect(()=>{if(!u||!m.current)return;const x=ar(m.current),O=F=>{v.current=F,!(r||!l()||F.key!=="Tab")&&x.activeElement===m.current&&F.shiftKey&&(A.current=!0,p.current&&p.current.focus())},P=()=>{const F=m.current;if(F===null)return;if(!x.hasFocus()||!l()||A.current){A.current=!1;return}if(F.contains(x.activeElement)||r&&x.activeElement!==f.current&&x.activeElement!==p.current)return;if(x.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!E.current)return;let X=[];if((x.activeElement===f.current||x.activeElement===p.current)&&(X=s(m.current)),X.length>0){var Z,Y;const $=!!((Z=v.current)!=null&&Z.shiftKey&&((Y=v.current)==null?void 0:Y.key)==="Tab"),ce=X[0],se=X[X.length-1];typeof ce!="string"&&typeof se!="string"&&($?se.focus():ce.focus())}else F.focus()};x.addEventListener("focusin",P),x.addEventListener("keydown",O,!0);const N=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&P()},50);return()=>{clearInterval(N),x.removeEventListener("focusin",P),x.removeEventListener("keydown",O,!0)}},[n,r,o,l,u,s]);const j=x=>{C.current===null&&(C.current=x.relatedTarget),E.current=!0,h.current=x.target;const O=t.props.onFocus;O&&O(x)},R=x=>{C.current===null&&(C.current=x.relatedTarget),E.current=!0};return g.jsxs(k.Fragment,{children:[g.jsx("div",{tabIndex:u?0:-1,onFocus:R,ref:f,"data-testid":"sentinelStart"}),k.cloneElement(t,{ref:B,onFocus:j}),g.jsx("div",{tabIndex:u?0:-1,onFocus:R,ref:p,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(fc.propTypes={children:hi,disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableRestoreFocus:c.bool,getTabbable:c.func,isEnabled:c.func,open:c.bool.isRequired}),process.env.NODE_ENV!=="production"&&(fc["propTypes"]=Ya(fc.propTypes));function b8(e){return typeof e=="function"?e():e}const ta=k.forwardRef(function(t,n){const{children:r,container:o,disablePortal:s=!1}=t,[l,u]=k.useState(null),A=Qn(k.isValidElement(r)?r.ref:null,n);if(Ii(()=>{s||u(b8(o)||document.body)},[o,s]),Ii(()=>{if(l&&!s)return Ga(n,l),()=>{Ga(n,null)}},[n,l,s]),s){if(k.isValidElement(r)){const f={ref:A};return k.cloneElement(r,f)}return g.jsx(k.Fragment,{children:r})}return g.jsx(k.Fragment,{children:l&&Vx.createPortal(r,l)})});process.env.NODE_ENV!=="production"&&(ta.propTypes={children:c.node,container:c.oneOfType([jo,c.func]),disablePortal:c.bool}),process.env.NODE_ENV!=="production"&&(ta["propTypes"]=Ya(ta.propTypes));const Q8=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],x8={entering:{opacity:1},entered:{opacity:1}},_0=k.forwardRef(function(t,n){const r=Pt(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:l=!0,children:u,easing:A,in:f,onEnter:p,onEntered:C,onEntering:h,onExit:E,onExited:m,onExiting:B,style:v,timeout:j=o,TransitionComponent:R=Td}=t,x=Ue(t,Q8),O=k.useRef(null),P=Qn(O,u.ref,n),N=q=>J=>{if(q){const H=O.current;J===void 0?q(H):q(H,J)}},F=N(h),X=N((q,J)=>{bg(q);const H=Wi({style:v,timeout:j,easing:A},{mode:"enter"});q.style.webkitTransition=r.transitions.create("opacity",H),q.style.transition=r.transitions.create("opacity",H),p&&p(q,J)}),Z=N(C),Y=N(B),$=N(q=>{const J=Wi({style:v,timeout:j,easing:A},{mode:"exit"});q.style.webkitTransition=r.transitions.create("opacity",J),q.style.transition=r.transitions.create("opacity",J),E&&E(q)}),ce=N(m),se=q=>{s&&s(O.current,q)};return g.jsx(R,W({appear:l,in:f,nodeRef:O,onEnter:X,onEntered:Z,onEntering:F,onExit:$,onExited:ce,onExiting:Y,addEndListener:se,timeout:j},x,{children:(q,J)=>k.cloneElement(u,W({style:W({opacity:0,visibility:q==="exited"&&!f?"hidden":void 0},x8[q],v,u.props.style),ref:P},J))}))});process.env.NODE_ENV!=="production"&&(_0.propTypes={addEndListener:c.func,appear:c.bool,children:hi.isRequired,easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});const w8=_0;function T8(e){return Lt("MuiBackdrop",e)}Ht("MuiBackdrop",["root","invisible"]);const P8=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],S8=e=>{const{classes:t,invisible:n}=e;return nn({root:["root",n&&"invisible"]},T8,t)},O8=Ae("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>W({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),q0=k.forwardRef(function(t,n){var r,o,s;const l=zt({props:t,name:"MuiBackdrop"}),{children:u,className:A,component:f="div",components:p={},componentsProps:C={},invisible:h=!1,open:E,slotProps:m={},slots:B={},TransitionComponent:v=w8,transitionDuration:j}=l,R=Ue(l,P8),x=W({},l,{component:f,invisible:h}),O=S8(x),P=(r=m.root)!=null?r:C.root;return g.jsx(v,W({in:E,timeout:j},R,{children:g.jsx(O8,W({"aria-hidden":!0},P,{as:(o=(s=B.root)!=null?s:p.Root)!=null?o:f,className:Ye(O.root,A,P==null?void 0:P.className),ownerState:W({},x,P==null?void 0:P.ownerState),classes:O,ref:n,children:u}))}))});process.env.NODE_ENV!=="production"&&(q0.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,components:c.shape({Root:c.elementType}),componentsProps:c.shape({root:c.object}),invisible:c.bool,open:c.bool.isRequired,slotProps:c.shape({root:c.object}),slots:c.shape({root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),TransitionComponent:c.elementType,transitionDuration:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});const j8=q0;function M8(e){return Lt("MuiModal",e)}Ht("MuiModal",["root","hidden","backdrop"]);const R8=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],D8=e=>{const{open:t,exited:n,classes:r}=e;return nn({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},M8,r)},k8=Ae("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>W({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),F8=Ae(j8,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),$0=k.forwardRef(function(t,n){var r,o,s,l,u,A;const f=zt({name:"MuiModal",props:t}),{BackdropComponent:p=F8,BackdropProps:C,className:h,closeAfterTransition:E=!1,children:m,container:B,component:v,components:j={},componentsProps:R={},disableAutoFocus:x=!1,disableEnforceFocus:O=!1,disableEscapeKeyDown:P=!1,disablePortal:N=!1,disableRestoreFocus:F=!1,disableScrollLock:X=!1,hideBackdrop:Z=!1,keepMounted:Y=!1,onBackdropClick:$,open:ce,slotProps:se,slots:q}=f,J=Ue(f,R8),H=W({},f,{closeAfterTransition:E,disableAutoFocus:x,disableEnforceFocus:O,disableEscapeKeyDown:P,disablePortal:N,disableRestoreFocus:F,disableScrollLock:X,hideBackdrop:Z,keepMounted:Y}),{getRootProps:K,getBackdropProps:L,getTransitionProps:ee,portalRef:z,isTopModal:_,exited:fe,hasTransition:he}=C8(W({},H,{rootRef:n})),ue=W({},H,{exited:fe}),pe=D8(ue),Ce={};if(m.props.tabIndex===void 0&&(Ce.tabIndex="-1"),he){const{onEnter:Ve,onExited:ne}=ee();Ce.onEnter=Ve,Ce.onExited=ne}const ve=(r=(o=q==null?void 0:q.root)!=null?o:j.Root)!=null?r:k8,Ie=(s=(l=q==null?void 0:q.backdrop)!=null?l:j.Backdrop)!=null?s:p,Ee=(u=se==null?void 0:se.root)!=null?u:R.root,Be=(A=se==null?void 0:se.backdrop)!=null?A:R.backdrop,xe=ir.useSlotProps({elementType:ve,externalSlotProps:Ee,externalForwardedProps:J,getSlotProps:K,additionalProps:{ref:n,as:v},ownerState:ue,className:Ye(h,Ee==null?void 0:Ee.className,pe==null?void 0:pe.root,!ue.open&&ue.exited&&(pe==null?void 0:pe.hidden))}),le=ir.useSlotProps({elementType:Ie,externalSlotProps:Be,additionalProps:C,getSlotProps:Ve=>L(W({},Ve,{onClick:ne=>{$&&$(ne),Ve!=null&&Ve.onClick&&Ve.onClick(ne)}})),className:Ye(Be==null?void 0:Be.className,C==null?void 0:C.className,pe==null?void 0:pe.backdrop),ownerState:ue});return!Y&&!ce&&(!he||fe)?null:g.jsx(ta,{ref:z,container:B,disablePortal:N,children:g.jsxs(ve,W({},xe,{children:[!Z&&p?g.jsx(Ie,W({},le)):null,g.jsx(fc,{disableEnforceFocus:O,disableAutoFocus:x,disableRestoreFocus:F,isEnabled:_,open:ce,children:k.cloneElement(m,Ce)})]}))})});process.env.NODE_ENV!=="production"&&($0.propTypes={BackdropComponent:c.elementType,BackdropProps:c.object,children:hi.isRequired,classes:c.object,className:c.string,closeAfterTransition:c.bool,component:c.elementType,components:c.shape({Backdrop:c.elementType,Root:c.elementType}),componentsProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),container:c.oneOfType([jo,c.func]),disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableEscapeKeyDown:c.bool,disablePortal:c.bool,disableRestoreFocus:c.bool,disableScrollLock:c.bool,hideBackdrop:c.bool,keepMounted:c.bool,onBackdropClick:c.func,onClose:c.func,onTransitionEnter:c.func,onTransitionExited:c.func,open:c.bool.isRequired,slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});const L8=$0;var xg={},N8=cc;Object.defineProperty(xg,"__esModule",{value:!0});var eB=xg.default=void 0,V8=N8(uc()),H8=g,z8=(0,V8.default)((0,H8.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"}),"History");eB=xg.default=z8;var wg={},W8=cc;Object.defineProperty(wg,"__esModule",{value:!0});var tB=wg.default=void 0,U8=W8(uc()),Y8=g,G8=(0,U8.default)((0,Y8.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings");tB=wg.default=G8;var K8=function(e){var t=e.children,n=e.editor,r=e.preferenceKey,o=e.openButtonLabel,s=o===void 0?"ra.configurable.customize":o,l=e.sx,u="preferences.".concat(r),A=de.usePreferencesEditor(),f=!!A,p=de.useTranslate(),C=A||{},h=C.isEnabled,E=C.setEditor,m=C.preferenceKey,B=C.setPreferenceKey,v=u===m,j=w.useRef(v),R=w.useRef(null),x=w.useState(!1),O=x[0],P=x[1];if(w.useEffect(function(){j.current=v},[v]),w.useEffect(function(){return function(){j.current&&(B&&B(null),E&&E(null))}},[E,B]),!f)return t;var N=function(){E(w.cloneElement(n,{preferenceKey:u,key:u})),B(u)},F=function(){P(!0)},X=function(){P(!1)};return k.createElement(de.PreferenceKeyContextProvider,{value:u},k.createElement(J8,{className:L0(Vr.root,h&&Vr.editMode,v&&Vr.editorActive),sx:l,ref:R,onMouseEnter:h?F:void 0,onMouseLeave:h?X:void 0},t),k.createElement(b.Popover,{open:h&&(O||v),sx:{pointerEvents:"none","& .MuiPaper-root":{pointerEvents:"auto",borderRadius:10,padding:"2px",lineHeight:0,backgroundColor:"warning.light",color:"warning.contrastText","&:hover":{cursor:"pointer"}}},anchorEl:R.current,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"center"},onClose:X,PaperProps:{elevation:1,onMouseEnter:F,onMouseLeave:X,title:p(s),onClick:N},disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:!0,disableScrollLock:!0,marginThreshold:8},k.createElement(tB,{fontSize:"12px"})))},pc="RaConfigurable",Vr={root:"".concat(pc,"-root"),editMode:"".concat(pc,"-editMode"),editorActive:"".concat(pc,"-editorActive")},J8=Ae("span",{name:pc,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={position:"relative",display:"inline-block"},t["&.".concat(Vr.editMode)]={transition:n.transitions.create("outline"),outline:"".concat(b.alpha(n.palette.warning.main,.3)," solid 2px")},t["&.".concat(Vr.editMode,":hover ")]={outline:"".concat(b.alpha(n.palette.warning.main,.5)," solid 2px")},t["&.".concat(Vr.editMode,".").concat(Vr.editorActive," , &.").concat(Vr.editMode,".").concat(Vr.editorActive,":hover ")]={outline:"".concat(n.palette.warning.main," solid 2px")},t}),Go=globalThis&&globalThis.__assign||function(){return Go=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Go.apply(this,arguments)},X8=globalThis&&globalThis.__rest||function(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},Z8=function(e){var t=e.title,n=e.defaultTitle,r=e.className,o=X8(e,["title","defaultTitle","className"]),s=de.usePreference()[0],l=de.useTranslate(),u=de.useRecordContext();return s?k.createElement("span",Go({className:r},o),l(s,Go(Go({},u),{_:s}))):k.createElement("span",{className:r},t?typeof t=="string"?k.createElement("span",Go({},o),l(t,{_:t})):t:k.createElement("span",Go({},o),n))},hc=globalThis&&globalThis.__assign||function(){return hc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},hc.apply(this,arguments)},_8=globalThis&&globalThis.__rest||function(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},q8=function(){var e=de.usePreferenceInput();return k.createElement("form",null,k.createElement(b.TextField,hc({label:"title",variant:"filled",size:"small",fullWidth:!0,sx:{mb:1}},e)))},$8=function(e){var t=e.preferenceKey,n=_8(e,["preferenceKey"]),r=mt.useLocation().pathname;return k.createElement(K8,{editor:k.createElement(q8,null),preferenceKey:t||"".concat(r,".title"),sx:{"&.RaConfigurable-editMode":{margin:"2px"}}},k.createElement(Z8,hc({},n)))},Tg=globalThis&&globalThis.__assign||function(){return Tg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Tg.apply(this,arguments)},eF=globalThis&&globalThis.__rest||function(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},nB=function(e){var t=e.defaultTitle,n=e.title,r=e.preferenceKey,o=eF(e,["defaultTitle","title","preferenceKey"]),s=w.useState(function(){return typeof document<"u"?document.getElementById("react-admin-title"):null}),l=s[0],u=s[1];return w.useEffect(function(){u(function(A){var f=typeof document<"u"&&document.body.contains(A);return A&&f?A:typeof document<"u"?document.getElementById("react-admin-title"):null})},[]),l?(de.warning(!t&&!n,"Missing title prop in <Title> element"),pi.createPortal(k.createElement($8,Tg({title:n,defaultTitle:t,preferenceKey:r},o)),l)):null},rB=c.oneOfType([c.string,c.element]);nB.propTypes={defaultTitle:c.string,className:c.string,record:c.any,title:rB};var tF=function(e){var t=fi.useLocation().pathname,n=w.useRef(t);w.useEffect(function(){t!==n.current&&e()},[t,e])},nF=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),t.length!==n.length||t.some(function(r,o){return!Object.is(r,n[o])})},oB={error:null},rF=function(e){xd(t,e);function t(){for(var r,o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];return r=e.call.apply(e,[this].concat(s))||this,r.state=oB,r.resetErrorBoundary=function(){for(var u,A=arguments.length,f=new Array(A),p=0;p<A;p++)f[p]=arguments[p];r.props.onReset==null||(u=r.props).onReset.apply(u,f),r.reset()},r}t.getDerivedStateFromError=function(o){return{error:o}};var n=t.prototype;return n.reset=function(){this.setState(oB)},n.componentDidCatch=function(o,s){var l,u;(l=(u=this.props).onError)==null||l.call(u,o,s)},n.componentDidUpdate=function(o,s){var l=this.state.error,u=this.props.resetKeys;if(l!==null&&s.error!==null&&nF(o.resetKeys,u)){var A,f;(A=(f=this.props).onResetKeysChange)==null||A.call(f,o.resetKeys,u),this.reset()}},n.render=function(){var o=this.state.error,s=this.props,l=s.fallbackRender,u=s.FallbackComponent,A=s.fallback;if(o!==null){var f={error:o,resetErrorBoundary:this.resetErrorBoundary};if(k.isValidElement(A))return A;if(typeof l=="function")return l(f);if(u)return k.createElement(u,f);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(k.Component),Pg=globalThis&&globalThis.__assign||function(){return Pg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Pg.apply(this,arguments)},oF=globalThis&&globalThis.__rest||function(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},iB=function(e){var t=e.className,n=e.loadingPrimary,r=n===void 0?"ra.page.loading":n,o=e.loadingSecondary,s=o===void 0?"ra.message.loading":o,l=oF(e,["className","loadingPrimary","loadingSecondary"]),u=de.useTimeout(1e3),A=de.useTranslate();return u?k.createElement(iF,Pg({className:t},l),k.createElement("div",{className:Ec.message},k.createElement(Dd,{className:Ec.icon}),k.createElement(b.Typography,{variant:"h5",mt:3,color:"text.secondary"},A(r,{_:r})),k.createElement(b.Typography,{variant:"body2"},A(s,{_:s})))):null};iB.propTypes={className:c.string,loadingPrimary:c.string,loadingSecondary:c.string};var Cc="RaLoading",Ec={root:"".concat(Cc,"-root"),icon:"".concat(Cc,"-icon"),message:"".concat(Cc,"-message")},iF=Ae("div",{name:Cc,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100%"},t["& .".concat(Ec.message)]={textAlign:"center",fontFamily:"Roboto, sans-serif",color:n.palette.text.disabled,paddingTop:"1em",paddingBottom:"1em"},t["& .".concat(Ec.icon)]={width:"9em",height:"9em"},t});function sF(e){return Lt("MuiToolbar",e)}Ht("MuiToolbar",["root","gutters","regular","dense"]);const aF=["className","component","disableGutters","variant"],lF=e=>{const{classes:t,disableGutters:n,variant:r}=e;return nn({root:["root",!n&&"gutters",r]},sF,t)},cF=Ae("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>W({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),sB=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiToolbar"}),{className:o,component:s="div",disableGutters:l=!1,variant:u="regular"}=r,A=Ue(r,aF),f=W({},r,{component:s,disableGutters:l,variant:u}),p=lF(f);return g.jsx(cF,W({as:s,className:Ye(p.root,o),ref:n,ownerState:f},A))});process.env.NODE_ENV!=="production"&&(sB.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,disableGutters:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["dense","regular"]),c.string])});const uF=sB;var Sg={},AF=cc;Object.defineProperty(Sg,"__esModule",{value:!0});var aB=Sg.default=void 0,dF=AF(uc()),gF=g,fF=(0,dF.default)((0,gF.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),"Refresh");aB=Sg.default=fF;const pF=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Og(e){return`scale(${e}, ${e**2})`}const hF={entering:{opacity:1,transform:Og(1)},entered:{opacity:1,transform:"none"}},jg=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Mg=k.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:s,easing:l,in:u,onEnter:A,onEntered:f,onEntering:p,onExit:C,onExited:h,onExiting:E,style:m,timeout:B="auto",TransitionComponent:v=Td}=t,j=Ue(t,pF),R=k.useRef(),x=k.useRef(),O=Pt(),P=k.useRef(null),N=Qn(P,s.ref,n),F=J=>H=>{if(J){const K=P.current;H===void 0?J(K):J(K,H)}},X=F(p),Z=F((J,H)=>{bg(J);const{duration:K,delay:L,easing:ee}=Wi({style:m,timeout:B,easing:l},{mode:"enter"});let z;B==="auto"?(z=O.transitions.getAutoHeightDuration(J.clientHeight),x.current=z):z=K,J.style.transition=[O.transitions.create("opacity",{duration:z,delay:L}),O.transitions.create("transform",{duration:jg?z:z*.666,delay:L,easing:ee})].join(","),A&&A(J,H)}),Y=F(f),$=F(E),ce=F(J=>{const{duration:H,delay:K,easing:L}=Wi({style:m,timeout:B,easing:l},{mode:"exit"});let ee;B==="auto"?(ee=O.transitions.getAutoHeightDuration(J.clientHeight),x.current=ee):ee=H,J.style.transition=[O.transitions.create("opacity",{duration:ee,delay:K}),O.transitions.create("transform",{duration:jg?ee:ee*.666,delay:jg?K:K||ee*.333,easing:L})].join(","),J.style.opacity=0,J.style.transform=Og(.75),C&&C(J)}),se=F(h),q=J=>{B==="auto"&&(R.current=setTimeout(J,x.current||0)),r&&r(P.current,J)};return k.useEffect(()=>()=>{clearTimeout(R.current)},[]),g.jsx(v,W({appear:o,in:u,nodeRef:P,onEnter:Z,onEntered:Y,onEntering:X,onExit:ce,onExited:se,onExiting:$,addEndListener:q,timeout:B==="auto"?null:B},j,{children:(J,H)=>k.cloneElement(s,W({style:W({opacity:0,transform:Og(.75),visibility:J==="exited"&&!u?"hidden":void 0},hF[J],m,s.props.style),ref:N},H))}))});process.env.NODE_ENV!=="production"&&(Mg.propTypes={addEndListener:c.func,appear:c.bool,children:hi.isRequired,easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.oneOf(["auto"]),c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])}),Mg.muiSupportAuto=!0;const lB=Mg;var hn="top",Gn="bottom",Kn="right",Cn="left",Rg="auto",na=[hn,Gn,Kn,Cn],Ui="start",ra="end",CF="clippingParents",cB="viewport",oa="popper",EF="reference",uB=na.reduce(function(e,t){return e.concat([t+"-"+Ui,t+"-"+ra])},[]),AB=[].concat(na,[Rg]).reduce(function(e,t){return e.concat([t,t+"-"+Ui,t+"-"+ra])},[]),IF="beforeRead",mF="read",BF="afterRead",vF="beforeMain",yF="main",bF="afterMain",QF="beforeWrite",xF="write",wF="afterWrite",TF=[IF,mF,BF,vF,yF,bF,QF,xF,wF];function yr(e){return e?(e.nodeName||"").toLowerCase():null}function Sn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ko(e){var t=Sn(e).Element;return e instanceof t||e instanceof Element}function Jn(e){var t=Sn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Dg(e){if(typeof ShadowRoot>"u")return!1;var t=Sn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function PF(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},s=t.elements[n];!Jn(s)||!yr(s)||(Object.assign(s.style,r),Object.keys(o).forEach(function(l){var u=o[l];u===!1?s.removeAttribute(l):s.setAttribute(l,u===!0?"":u)}))})}function SF(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],s=t.attributes[r]||{},l=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),u=l.reduce(function(A,f){return A[f]="",A},{});!Jn(o)||!yr(o)||(Object.assign(o.style,u),Object.keys(s).forEach(function(A){o.removeAttribute(A)}))})}}const OF={name:"applyStyles",enabled:!0,phase:"write",fn:PF,effect:SF,requires:["computeStyles"]};function br(e){return e.split("-")[0]}var Jo=Math.max,Ic=Math.min,Yi=Math.round;function kg(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function dB(){return!/^((?!chrome|android).)*safari/i.test(kg())}function Gi(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&Jn(e)&&(o=e.offsetWidth>0&&Yi(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Yi(r.height)/e.offsetHeight||1);var l=Ko(e)?Sn(e):window,u=l.visualViewport,A=!dB()&&n,f=(r.left+(A&&u?u.offsetLeft:0))/o,p=(r.top+(A&&u?u.offsetTop:0))/s,C=r.width/o,h=r.height/s;return{width:C,height:h,top:p,right:f+C,bottom:p+h,left:f,x:f,y:p}}function Fg(e){var t=Gi(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function gB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Dg(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Hr(e){return Sn(e).getComputedStyle(e)}function jF(e){return["table","td","th"].indexOf(yr(e))>=0}function go(e){return((Ko(e)?e.ownerDocument:e.document)||window.document).documentElement}function mc(e){return yr(e)==="html"?e:e.assignedSlot||e.parentNode||(Dg(e)?e.host:null)||go(e)}function fB(e){return!Jn(e)||Hr(e).position==="fixed"?null:e.offsetParent}function MF(e){var t=/firefox/i.test(kg()),n=/Trident/i.test(kg());if(n&&Jn(e)){var r=Hr(e);if(r.position==="fixed")return null}var o=mc(e);for(Dg(o)&&(o=o.host);Jn(o)&&["html","body"].indexOf(yr(o))<0;){var s=Hr(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function ia(e){for(var t=Sn(e),n=fB(e);n&&jF(n)&&Hr(n).position==="static";)n=fB(n);return n&&(yr(n)==="html"||yr(n)==="body"&&Hr(n).position==="static")?t:n||MF(e)||t}function Lg(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function sa(e,t,n){return Jo(e,Ic(t,n))}function RF(e,t,n){var r=sa(e,t,n);return r>n?n:r}function pB(){return{top:0,right:0,bottom:0,left:0}}function hB(e){return Object.assign({},pB(),e)}function CB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var DF=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,hB(typeof t!="number"?t:CB(t,na))};function kF(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,l=n.modifiersData.popperOffsets,u=br(n.placement),A=Lg(u),f=[Cn,Kn].indexOf(u)>=0,p=f?"height":"width";if(!(!s||!l)){var C=DF(o.padding,n),h=Fg(s),E=A==="y"?hn:Cn,m=A==="y"?Gn:Kn,B=n.rects.reference[p]+n.rects.reference[A]-l[A]-n.rects.popper[p],v=l[A]-n.rects.reference[A],j=ia(s),R=j?A==="y"?j.clientHeight||0:j.clientWidth||0:0,x=B/2-v/2,O=C[E],P=R-h[p]-C[m],N=R/2-h[p]/2+x,F=sa(O,N,P),X=A;n.modifiersData[r]=(t={},t[X]=F,t.centerOffset=F-N,t)}}function FF(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||gB(t.elements.popper,o)&&(t.elements.arrow=o))}const LF={name:"arrow",enabled:!0,phase:"main",fn:kF,effect:FF,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ki(e){return e.split("-")[1]}var NF={top:"auto",right:"auto",bottom:"auto",left:"auto"};function VF(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Yi(n*o)/o||0,y:Yi(r*o)/o||0}}function EB(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.variation,l=e.offsets,u=e.position,A=e.gpuAcceleration,f=e.adaptive,p=e.roundOffsets,C=e.isFixed,h=l.x,E=h===void 0?0:h,m=l.y,B=m===void 0?0:m,v=typeof p=="function"?p({x:E,y:B}):{x:E,y:B};E=v.x,B=v.y;var j=l.hasOwnProperty("x"),R=l.hasOwnProperty("y"),x=Cn,O=hn,P=window;if(f){var N=ia(n),F="clientHeight",X="clientWidth";if(N===Sn(n)&&(N=go(n),Hr(N).position!=="static"&&u==="absolute"&&(F="scrollHeight",X="scrollWidth")),N=N,o===hn||(o===Cn||o===Kn)&&s===ra){O=Gn;var Z=C&&N===P&&P.visualViewport?P.visualViewport.height:N[F];B-=Z-r.height,B*=A?1:-1}if(o===Cn||(o===hn||o===Gn)&&s===ra){x=Kn;var Y=C&&N===P&&P.visualViewport?P.visualViewport.width:N[X];E-=Y-r.width,E*=A?1:-1}}var $=Object.assign({position:u},f&&NF),ce=p===!0?VF({x:E,y:B},Sn(n)):{x:E,y:B};if(E=ce.x,B=ce.y,A){var se;return Object.assign({},$,(se={},se[O]=R?"0":"",se[x]=j?"0":"",se.transform=(P.devicePixelRatio||1)<=1?"translate("+E+"px, "+B+"px)":"translate3d("+E+"px, "+B+"px, 0)",se))}return Object.assign({},$,(t={},t[O]=R?B+"px":"",t[x]=j?E+"px":"",t.transform="",t))}function HF(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,l=s===void 0?!0:s,u=n.roundOffsets,A=u===void 0?!0:u,f={placement:br(t.placement),variation:Ki(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,EB(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:A})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,EB(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:A})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const zF={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:HF,data:{}};var Bc={passive:!0};function WF(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,l=r.resize,u=l===void 0?!0:l,A=Sn(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&f.forEach(function(p){p.addEventListener("scroll",n.update,Bc)}),u&&A.addEventListener("resize",n.update,Bc),function(){s&&f.forEach(function(p){p.removeEventListener("scroll",n.update,Bc)}),u&&A.removeEventListener("resize",n.update,Bc)}}const UF={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:WF,data:{}};var YF={left:"right",right:"left",bottom:"top",top:"bottom"};function vc(e){return e.replace(/left|right|bottom|top/g,function(t){return YF[t]})}var GF={start:"end",end:"start"};function IB(e){return e.replace(/start|end/g,function(t){return GF[t]})}function Ng(e){var t=Sn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Vg(e){return Gi(go(e)).left+Ng(e).scrollLeft}function KF(e,t){var n=Sn(e),r=go(e),o=n.visualViewport,s=r.clientWidth,l=r.clientHeight,u=0,A=0;if(o){s=o.width,l=o.height;var f=dB();(f||!f&&t==="fixed")&&(u=o.offsetLeft,A=o.offsetTop)}return{width:s,height:l,x:u+Vg(e),y:A}}function JF(e){var t,n=go(e),r=Ng(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=Jo(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=Jo(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-r.scrollLeft+Vg(e),A=-r.scrollTop;return Hr(o||n).direction==="rtl"&&(u+=Jo(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:l,x:u,y:A}}function Hg(e){var t=Hr(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function mB(e){return["html","body","#document"].indexOf(yr(e))>=0?e.ownerDocument.body:Jn(e)&&Hg(e)?e:mB(mc(e))}function aa(e,t){var n;t===void 0&&(t=[]);var r=mB(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=Sn(r),l=o?[s].concat(s.visualViewport||[],Hg(r)?r:[]):r,u=t.concat(l);return o?u:u.concat(aa(mc(l)))}function zg(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function XF(e,t){var n=Gi(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function BB(e,t,n){return t===cB?zg(KF(e,n)):Ko(t)?XF(t,n):zg(JF(go(e)))}function ZF(e){var t=aa(mc(e)),n=["absolute","fixed"].indexOf(Hr(e).position)>=0,r=n&&Jn(e)?ia(e):e;return Ko(r)?t.filter(function(o){return Ko(o)&&gB(o,r)&&yr(o)!=="body"}):[]}function _F(e,t,n,r){var o=t==="clippingParents"?ZF(e):[].concat(t),s=[].concat(o,[n]),l=s[0],u=s.reduce(function(A,f){var p=BB(e,f,r);return A.top=Jo(p.top,A.top),A.right=Ic(p.right,A.right),A.bottom=Ic(p.bottom,A.bottom),A.left=Jo(p.left,A.left),A},BB(e,l,r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function vB(e){var t=e.reference,n=e.element,r=e.placement,o=r?br(r):null,s=r?Ki(r):null,l=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,A;switch(o){case hn:A={x:l,y:t.y-n.height};break;case Gn:A={x:l,y:t.y+t.height};break;case Kn:A={x:t.x+t.width,y:u};break;case Cn:A={x:t.x-n.width,y:u};break;default:A={x:t.x,y:t.y}}var f=o?Lg(o):null;if(f!=null){var p=f==="y"?"height":"width";switch(s){case Ui:A[f]=A[f]-(t[p]/2-n[p]/2);break;case ra:A[f]=A[f]+(t[p]/2-n[p]/2);break}}return A}function la(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,l=s===void 0?e.strategy:s,u=n.boundary,A=u===void 0?CF:u,f=n.rootBoundary,p=f===void 0?cB:f,C=n.elementContext,h=C===void 0?oa:C,E=n.altBoundary,m=E===void 0?!1:E,B=n.padding,v=B===void 0?0:B,j=hB(typeof v!="number"?v:CB(v,na)),R=h===oa?EF:oa,x=e.rects.popper,O=e.elements[m?R:h],P=_F(Ko(O)?O:O.contextElement||go(e.elements.popper),A,p,l),N=Gi(e.elements.reference),F=vB({reference:N,element:x,strategy:"absolute",placement:o}),X=zg(Object.assign({},x,F)),Z=h===oa?X:N,Y={top:P.top-Z.top+j.top,bottom:Z.bottom-P.bottom+j.bottom,left:P.left-Z.left+j.left,right:Z.right-P.right+j.right},$=e.modifiersData.offset;if(h===oa&&$){var ce=$[o];Object.keys(Y).forEach(function(se){var q=[Kn,Gn].indexOf(se)>=0?1:-1,J=[hn,Gn].indexOf(se)>=0?"y":"x";Y[se]+=ce[J]*q})}return Y}function qF(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,l=n.padding,u=n.flipVariations,A=n.allowedAutoPlacements,f=A===void 0?AB:A,p=Ki(r),C=p?u?uB:uB.filter(function(m){return Ki(m)===p}):na,h=C.filter(function(m){return f.indexOf(m)>=0});h.length===0&&(h=C);var E=h.reduce(function(m,B){return m[B]=la(e,{placement:B,boundary:o,rootBoundary:s,padding:l})[br(B)],m},{});return Object.keys(E).sort(function(m,B){return E[m]-E[B]})}function $F(e){if(br(e)===Rg)return[];var t=vc(e);return[IB(e),t,IB(t)]}function e6(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,l=n.altAxis,u=l===void 0?!0:l,A=n.fallbackPlacements,f=n.padding,p=n.boundary,C=n.rootBoundary,h=n.altBoundary,E=n.flipVariations,m=E===void 0?!0:E,B=n.allowedAutoPlacements,v=t.options.placement,j=br(v),R=j===v,x=A||(R||!m?[vc(v)]:$F(v)),O=[v].concat(x).reduce(function(ue,pe){return ue.concat(br(pe)===Rg?qF(t,{placement:pe,boundary:p,rootBoundary:C,padding:f,flipVariations:m,allowedAutoPlacements:B}):pe)},[]),P=t.rects.reference,N=t.rects.popper,F=new Map,X=!0,Z=O[0],Y=0;Y<O.length;Y++){var $=O[Y],ce=br($),se=Ki($)===Ui,q=[hn,Gn].indexOf(ce)>=0,J=q?"width":"height",H=la(t,{placement:$,boundary:p,rootBoundary:C,altBoundary:h,padding:f}),K=q?se?Kn:Cn:se?Gn:hn;P[J]>N[J]&&(K=vc(K));var L=vc(K),ee=[];if(s&&ee.push(H[ce]<=0),u&&ee.push(H[K]<=0,H[L]<=0),ee.every(function(ue){return ue})){Z=$,X=!1;break}F.set($,ee)}if(X)for(var z=m?3:1,_=function(pe){var Ce=O.find(function(ve){var Ie=F.get(ve);if(Ie)return Ie.slice(0,pe).every(function(Ee){return Ee})});if(Ce)return Z=Ce,"break"},fe=z;fe>0;fe--){var he=_(fe);if(he==="break")break}t.placement!==Z&&(t.modifiersData[r]._skip=!0,t.placement=Z,t.reset=!0)}}const t6={name:"flip",enabled:!0,phase:"main",fn:e6,requiresIfExists:["offset"],data:{_skip:!1}};function yB(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function bB(e){return[hn,Kn,Gn,Cn].some(function(t){return e[t]>=0})}function n6(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,l=la(t,{elementContext:"reference"}),u=la(t,{altBoundary:!0}),A=yB(l,r),f=yB(u,o,s),p=bB(A),C=bB(f);t.modifiersData[n]={referenceClippingOffsets:A,popperEscapeOffsets:f,isReferenceHidden:p,hasPopperEscaped:C},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":C})}const r6={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:n6};function o6(e,t,n){var r=br(e),o=[Cn,hn].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,l=s[0],u=s[1];return l=l||0,u=(u||0)*o,[Cn,Kn].indexOf(r)>=0?{x:u,y:l}:{x:l,y:u}}function i6(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,l=AB.reduce(function(p,C){return p[C]=o6(C,t.rects,s),p},{}),u=l[t.placement],A=u.x,f=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=A,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=l}const s6={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:i6};function a6(e){var t=e.state,n=e.name;t.modifiersData[n]=vB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const l6={name:"popperOffsets",enabled:!0,phase:"read",fn:a6,data:{}};function c6(e){return e==="x"?"y":"x"}function u6(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,l=n.altAxis,u=l===void 0?!1:l,A=n.boundary,f=n.rootBoundary,p=n.altBoundary,C=n.padding,h=n.tether,E=h===void 0?!0:h,m=n.tetherOffset,B=m===void 0?0:m,v=la(t,{boundary:A,rootBoundary:f,padding:C,altBoundary:p}),j=br(t.placement),R=Ki(t.placement),x=!R,O=Lg(j),P=c6(O),N=t.modifiersData.popperOffsets,F=t.rects.reference,X=t.rects.popper,Z=typeof B=="function"?B(Object.assign({},t.rects,{placement:t.placement})):B,Y=typeof Z=="number"?{mainAxis:Z,altAxis:Z}:Object.assign({mainAxis:0,altAxis:0},Z),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ce={x:0,y:0};if(N){if(s){var se,q=O==="y"?hn:Cn,J=O==="y"?Gn:Kn,H=O==="y"?"height":"width",K=N[O],L=K+v[q],ee=K-v[J],z=E?-X[H]/2:0,_=R===Ui?F[H]:X[H],fe=R===Ui?-X[H]:-F[H],he=t.elements.arrow,ue=E&&he?Fg(he):{width:0,height:0},pe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:pB(),Ce=pe[q],ve=pe[J],Ie=sa(0,F[H],ue[H]),Ee=x?F[H]/2-z-Ie-Ce-Y.mainAxis:_-Ie-Ce-Y.mainAxis,Be=x?-F[H]/2+z+Ie+ve+Y.mainAxis:fe+Ie+ve+Y.mainAxis,xe=t.elements.arrow&&ia(t.elements.arrow),le=xe?O==="y"?xe.clientTop||0:xe.clientLeft||0:0,Ve=(se=$==null?void 0:$[O])!=null?se:0,ne=K+Ee-Ve-le,$e=K+Be-Ve,xt=sa(E?Ic(L,ne):L,K,E?Jo(ee,$e):ee);N[O]=xt,ce[O]=xt-K}if(u){var ft,Ot=O==="x"?hn:Cn,xr=O==="x"?Gn:Kn,wt=N[P],vt=P==="y"?"height":"width",pt=wt+v[Ot],Ut=wt-v[xr],Yt=[hn,Cn].indexOf(j)!==-1,Oe=(ft=$==null?void 0:$[P])!=null?ft:0,Fe=Yt?pt:wt-F[vt]-X[vt]-Oe+Y.altAxis,Te=Yt?wt+F[vt]+X[vt]-Oe-Y.altAxis:Ut,Ge=E&&Yt?RF(Fe,wt,Te):sa(E?Fe:pt,wt,E?Te:Ut);N[P]=Ge,ce[P]=Ge-wt}t.modifiersData[r]=ce}}const A6={name:"preventOverflow",enabled:!0,phase:"main",fn:u6,requiresIfExists:["offset"]};function d6(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function g6(e){return e===Sn(e)||!Jn(e)?Ng(e):d6(e)}function f6(e){var t=e.getBoundingClientRect(),n=Yi(t.width)/e.offsetWidth||1,r=Yi(t.height)/e.offsetHeight||1;return n!==1||r!==1}function p6(e,t,n){n===void 0&&(n=!1);var r=Jn(t),o=Jn(t)&&f6(t),s=go(t),l=Gi(e,o,n),u={scrollLeft:0,scrollTop:0},A={x:0,y:0};return(r||!r&&!n)&&((yr(t)!=="body"||Hg(s))&&(u=g6(t)),Jn(t)?(A=Gi(t,!0),A.x+=t.clientLeft,A.y+=t.clientTop):s&&(A.x=Vg(s))),{x:l.left+u.scrollLeft-A.x,y:l.top+u.scrollTop-A.y,width:l.width,height:l.height}}function h6(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function o(s){n.add(s.name);var l=[].concat(s.requires||[],s.requiresIfExists||[]);l.forEach(function(u){if(!n.has(u)){var A=t.get(u);A&&o(A)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function C6(e){var t=h6(e);return TF.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function E6(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function I6(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var QB={placement:"bottom",modifiers:[],strategy:"absolute"};function xB(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function m6(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,s=o===void 0?QB:o;return function(u,A,f){f===void 0&&(f=s);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},QB,s),modifiersData:{},elements:{reference:u,popper:A},attributes:{},styles:{}},C=[],h=!1,E={state:p,setOptions:function(j){var R=typeof j=="function"?j(p.options):j;B(),p.options=Object.assign({},s,p.options,R),p.scrollParents={reference:Ko(u)?aa(u):u.contextElement?aa(u.contextElement):[],popper:aa(A)};var x=C6(I6([].concat(r,p.options.modifiers)));return p.orderedModifiers=x.filter(function(O){return O.enabled}),m(),E.update()},forceUpdate:function(){if(!h){var j=p.elements,R=j.reference,x=j.popper;if(xB(R,x)){p.rects={reference:p6(R,ia(x),p.options.strategy==="fixed"),popper:Fg(x)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(Y){return p.modifiersData[Y.name]=Object.assign({},Y.data)});for(var O=0;O<p.orderedModifiers.length;O++){if(p.reset===!0){p.reset=!1,O=-1;continue}var P=p.orderedModifiers[O],N=P.fn,F=P.options,X=F===void 0?{}:F,Z=P.name;typeof N=="function"&&(p=N({state:p,options:X,name:Z,instance:E})||p)}}}},update:E6(function(){return new Promise(function(v){E.forceUpdate(),v(p)})}),destroy:function(){B(),h=!0}};if(!xB(u,A))return E;E.setOptions(f).then(function(v){!h&&f.onFirstUpdate&&f.onFirstUpdate(v)});function m(){p.orderedModifiers.forEach(function(v){var j=v.name,R=v.options,x=R===void 0?{}:R,O=v.effect;if(typeof O=="function"){var P=O({state:p,name:j,instance:E,options:x}),N=function(){};C.push(P||N)}})}function B(){C.forEach(function(v){return v()}),C=[]}return E}}var B6=[UF,l6,zF,OF,s6,t6,A6,LF,r6],v6=m6({defaultModifiers:B6});function y6(e){return Lt("MuiPopper",e)}Ht("MuiPopper",["root"]);const b6=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Q6=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function x6(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function yc(e){return typeof e=="function"?e():e}function bc(e){return e.nodeType!==void 0}function w6(e){return!bc(e)}const T6=()=>nn({root:["root"]},o8(y6)),P6={},S6=k.forwardRef(function(t,n){var r;const{anchorEl:o,children:s,direction:l,disablePortal:u,modifiers:A,open:f,placement:p,popperOptions:C,popperRef:h,slotProps:E={},slots:m={},TransitionProps:B}=t,v=Ue(t,b6),j=k.useRef(null),R=Qn(j,n),x=k.useRef(null),O=Qn(x,h),P=k.useRef(O);Ii(()=>{P.current=O},[O]),k.useImperativeHandle(h,()=>x.current,[]);const N=x6(p,l),[F,X]=k.useState(N),[Z,Y]=k.useState(yc(o));k.useEffect(()=>{x.current&&x.current.forceUpdate()}),k.useEffect(()=>{o&&Y(yc(o))},[o]),Ii(()=>{if(!Z||!f)return;const J=L=>{X(L.placement)};if(process.env.NODE_ENV!=="production"&&Z&&bc(Z)&&Z.nodeType===1){const L=Z.getBoundingClientRect();process.env.NODE_ENV!=="test"&&L.top===0&&L.left===0&&L.right===0&&L.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|