pankosmia-rcl 0.8.21 → 0.8.22
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(ee,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react"),require("@mui/material"),require("@emotion/styled"),require("@emotion/react"),require("notistack")):typeof define=="function"&&define.amd?define(["exports","react","@mui/material","@emotion/styled","@emotion/react","notistack"],v):(ee=typeof globalThis<"u"?globalThis:ee||self,v(ee.pankosmiaRcl={},ee.React,ee.material,ee.emStyled,ee.react,ee.notistack))})(this,(function(ee,v,l,hc,Ue,qe){"use strict";var qh=Object.defineProperty;var Yh=(ee,v,l)=>v in ee?qh(ee,v,{enumerable:!0,configurable:!0,writable:!0,value:l}):ee[v]=l;var An=(ee,v,l)=>Yh(ee,typeof v!="symbol"?v+"":v,l);function mc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const F=mc(v);function zr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bn={exports:{}},ln={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var us;function yc(){return us||(us=1,process.env.NODE_ENV!=="production"&&(function(){function e(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===S?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case C:return"Fragment";case w:return"Profiler";case E:return"StrictMode";case O:return"Suspense";case $:return"SuspenseList";case z:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case h:return"Portal";case P:return k.displayName||"Context";case T:return(k._context.displayName||"Context")+".Consumer";case _:var q=k.render;return k=k.displayName,k||(k=q.displayName||q.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case j:return q=k.displayName||null,q!==null?q:e(k.type)||"Memo";case B:q=k._payload,k=k._init;try{return e(k(q))}catch{}}return null}function t(k){return""+k}function n(k){try{t(k);var q=!1}catch{q=!0}if(q){q=console;var
|
|
17
|
+
*/var us;function yc(){return us||(us=1,process.env.NODE_ENV!=="production"&&(function(){function e(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===S?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case C:return"Fragment";case w:return"Profiler";case E:return"StrictMode";case O:return"Suspense";case $:return"SuspenseList";case z:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case h:return"Portal";case P:return k.displayName||"Context";case T:return(k._context.displayName||"Context")+".Consumer";case _:var q=k.render;return k=k.displayName,k||(k=q.displayName||q.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case j:return q=k.displayName||null,q!==null?q:e(k.type)||"Memo";case B:q=k._payload,k=k._init;try{return e(k(q))}catch{}}return null}function t(k){return""+k}function n(k){try{t(k);var q=!1}catch{q=!0}if(q){q=console;var G=q.error,M=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return G.call(q,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",M),t(k)}}function r(k){if(k===C)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===B)return"<...>";try{var q=e(k);return q?"<"+q+">":"<...>"}catch{return"<...>"}}function o(){var k=d.A;return k===null?null:k.getOwner()}function s(){return Error("react-stack-top-frame")}function a(k){if(A.call(k,"key")){var q=Object.getOwnPropertyDescriptor(k,"key").get;if(q&&q.isReactWarning)return!1}return k.key!==void 0}function c(k,q){function G(){H||(H=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",q))}G.isReactWarning=!0,Object.defineProperty(k,"key",{get:G,configurable:!0})}function u(){var k=e(this.type);return Z[k]||(Z[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function p(k,q,G,M,Q,N){var I=G.ref;return k={$$typeof:x,type:k,key:q,props:G,_owner:M},(I!==void 0?I:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:u}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function f(k,q,G,M,Q,N){var I=q.children;if(I!==void 0)if(M)if(R(I)){for(M=0;M<I.length;M++)g(I[M]);Object.freeze&&Object.freeze(I)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(I);if(A.call(q,"key")){I=e(k);var W=Object.keys(q).filter(function(K){return K!=="key"});M=0<W.length?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}",V[I+M]||(W=0<W.length?"{"+W.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,M,I,
|
|
22
|
+
<%s key={someKey} {...props} />`,M,I,W,I),V[I+M]=!0)}if(I=null,G!==void 0&&(n(G),I=""+G),a(q)&&(n(q.key),I=""+q.key),"key"in q){G={};for(var J in q)J!=="key"&&(G[J]=q[J])}else G=q;return I&&c(G,typeof k=="function"?k.displayName||k.name||"Unknown":k),p(k,I,G,o(),Q,N)}function g(k){b(k)?k._store&&(k._store.validated=1):typeof k=="object"&&k!==null&&k.$$typeof===B&&(k._payload.status==="fulfilled"?b(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function b(k){return typeof k=="object"&&k!==null&&k.$$typeof===x}var m=v,x=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),P=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),S=Symbol.for("react.client.reference"),d=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,R=Array.isArray,D=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(k){return k()}};var H,Z={},re=m.react_stack_bottom_frame.bind(m,s)(),ie=D(r(s)),V={};un.Fragment=C,un.jsx=function(k,q,G){var M=1e4>d.recentlyCreatedOwnerStacks++;return f(k,q,G,!1,M?Error("react-stack-top-frame"):re,M?D(r(k)):ie)},un.jsxs=function(k,q,G){var M=1e4>d.recentlyCreatedOwnerStacks++;return f(k,q,G,!0,M?Error("react-stack-top-frame"):re,M?D(r(k)):ie)}})()),un}var ds;function bc(){return ds||(ds=1,process.env.NODE_ENV==="production"?Bn.exports=gc():Bn.exports=yc()),Bn.exports}var i=bc();async function ke(e,t=!1){try{const n=await fetch(e);if(!n.ok){const o={url:e,ok:!1,status:n.status,error:JSON.parse(await n.text())};return t&&console.log("getJson",o),o}const r={url:e,ok:!0,status:n.status,json:await n.json()};return t&&console.log("getJson",r),r}catch(n){const r={url:e,ok:!1,status:0,error:n.message};return t&&console.log("getJson",r),r}}const Nn=async({url:e,setter:t,debug:n=!1})=>{const r=await ke(e,n);if(r.ok)t(r.json);else return r};async function dn(e,t=!1){try{const n=await fetch(e,{method:"POST"});if(!n.ok){const o={url:e,ok:!1,status:n.status,error:JSON.parse(await n.text())};return t&&console.log("postEmpty",o),o}const r={url:e,ok:!0,status:n.status,json:await n.json()};return t&&console.log("postEmpty",r),r}catch(n){const r={url:e,ok:!1,status:0,error:n.message};return t&&console.log("postEmpty",r),r}}async function xc(e,t,n=!1,r="application/json"){try{const o=await fetch(e,{method:"POST",headers:{"Content-Type":r},body:t});if(!o.ok){const a={url:e,ok:!1,status:o.status,error:JSON.parse(await o.text())};return n&&console.log("postJson",a),a}const s={url:e,ok:!0,status:o.status,json:await o.json()};return n&&console.log("postJson",s),s}catch(o){const s={url:e,ok:!1,status:0,error:o.message};return n&&console.log("postJson",s),s}}const U=(e,t)=>t[e]||e,xt=v.createContext({debug:!1,setDebug:()=>{}}),ve=v.createContext({i18n:{},setI18n:()=>{}}),ut=v.createContext({enableNet:!1,setEnableNet:()=>{}});function Wr({callBack:e=()=>{},internetDialogOpen:t,setInternetDialogOpen:n}){const{i18nRef:r}=v.useContext(ve),{debugRef:o}=v.useContext(xt),{enabledRef:s}=v.useContext(ut);v.useEffect(()=>{t&&s.current&&a()},[t]);const a=()=>{n(!1),e()},c=()=>{dn("/api/net/enable",o.current)};return i.jsxs(l.Dialog,{open:t,onClose:a,slotProps:{paper:{component:"form"}},children:[i.jsx(l.DialogTitle,{children:i.jsx("b",{children:U("components:header:internet_question_label",r.current)})}),i.jsx(l.DialogContent,{children:i.jsx(l.DialogContentText,{children:i.jsx(l.Typography,{children:U("components:header:internet_question",r.current)})})}),i.jsxs(l.DialogActions,{children:[i.jsx(l.Button,{onClick:a,children:U("components:header:cancel",r.current)}),i.jsx(l.Button,{onClick:()=>{c(),n(!1)},children:U("components:header:accept",r.current)})]})]})}var Dn={exports:{}},Ln={exports:{}},fe={};/** @license React v16.13.1
|
|
23
23
|
* react-is.production.min.js
|
|
24
24
|
*
|
|
25
25
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -33,12 +33,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/var ps;function Cc(){return ps||(ps=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function T(
|
|
36
|
+
*/var ps;function Cc(){return ps||(ps=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function T(X){return typeof X=="string"||typeof X=="function"||X===r||X===p||X===s||X===o||X===g||X===b||typeof X=="object"&&X!==null&&(X.$$typeof===x||X.$$typeof===m||X.$$typeof===a||X.$$typeof===c||X.$$typeof===f||X.$$typeof===C||X.$$typeof===E||X.$$typeof===w||X.$$typeof===h)}function P(X){if(typeof X=="object"&&X!==null){var Pe=X.$$typeof;switch(Pe){case t:var Re=X.type;switch(Re){case u:case p:case r:case s:case o:case g:return Re;default:var ot=Re&&Re.$$typeof;switch(ot){case c:case f:case x:case m:case a:return ot;default:return Pe}}case n:return Pe}}}var _=u,O=p,$=c,j=a,B=t,z=f,S=r,d=x,A=m,R=n,D=s,H=o,Z=g,re=!1;function ie(X){return re||(re=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),V(X)||P(X)===u}function V(X){return P(X)===p}function k(X){return P(X)===c}function q(X){return P(X)===a}function G(X){return typeof X=="object"&&X!==null&&X.$$typeof===t}function M(X){return P(X)===f}function Q(X){return P(X)===r}function N(X){return P(X)===x}function I(X){return P(X)===m}function W(X){return P(X)===n}function J(X){return P(X)===s}function K(X){return P(X)===o}function oe(X){return P(X)===g}pe.AsyncMode=_,pe.ConcurrentMode=O,pe.ContextConsumer=$,pe.ContextProvider=j,pe.Element=B,pe.ForwardRef=z,pe.Fragment=S,pe.Lazy=d,pe.Memo=A,pe.Portal=R,pe.Profiler=D,pe.StrictMode=H,pe.Suspense=Z,pe.isAsyncMode=ie,pe.isConcurrentMode=V,pe.isContextConsumer=k,pe.isContextProvider=q,pe.isElement=G,pe.isForwardRef=M,pe.isFragment=Q,pe.isLazy=N,pe.isMemo=I,pe.isPortal=W,pe.isProfiler=J,pe.isStrictMode=K,pe.isSuspense=oe,pe.isValidElementType=T,pe.typeOf=P})()),pe}var hs;function ms(){return hs||(hs=1,process.env.NODE_ENV==="production"?Ln.exports=vc():Ln.exports=Cc()),Ln.exports}/*
|
|
37
37
|
object-assign
|
|
38
38
|
(c) Sindre Sorhus
|
|
39
39
|
@license MIT
|
|
40
|
-
*/var Ur,gs;function Sc(){if(gs)return Ur;gs=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},c=0;c<10;c++)a["_"+String.fromCharCode(c)]=c;var u=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(u.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(f){p[f]=f}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ur=o()?Object.assign:function(s,a){for(var c,u=r(s),p,f=1;f<arguments.length;f++){c=Object(arguments[f]);for(var g in c)t.call(c,g)&&(u[g]=c[g]);if(e){p=e(c);for(var b=0;b<p.length;b++)n.call(c,p[b])&&(u[p[b]]=c[p[b]])}}return u},Ur}var qr,ys;function Yr(){if(ys)return qr;ys=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return qr=e,qr}var Hr,bs;function xs(){return bs||(bs=1,Hr=Function.call.bind(Object.prototype.hasOwnProperty)),Hr}var Gr,vs;function wc(){if(vs)return Gr;vs=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Yr(),n={},r=xs();e=function(s){var a="Warning: "+s;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(s,a,c,u,p){if(process.env.NODE_ENV!=="production"){for(var f in s)if(r(s,f)){var g;try{if(typeof s[f]!="function"){var b=Error((u||"React class")+": "+c+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}g=s[f](a,f,u,c,null,t)}catch(x){g=x}if(g&&!(g instanceof Error)&&e((u||"React class")+": type specification of "+c+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in n)){n[g.message]=!0;var m=p?p():"";e("Failed "+c+" type: "+g.message+(m??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Gr=o,Gr}var Kr,Cs;function Tc(){if(Cs)return Kr;Cs=1;var e=ms(),t=Sc(),n=Yr(),r=xs(),o=wc(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(c){var u="Warning: "+c;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function a(){return null}return Kr=function(c,u){var p=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function g(V){var k=V&&(p&&V[p]||V[f]);if(typeof k=="function")return k}var b="<<anonymous>>",m={array:E("array"),bigint:E("bigint"),bool:E("boolean"),func:E("function"),number:E("number"),object:E("object"),string:E("string"),symbol:E("symbol"),any:w(),arrayOf:T,element:P(),elementType:_(),instanceOf:O,node:z(),objectOf:j,oneOf:$,oneOfType:B,shape:d,exact:A};function x(V,k){return V===k?V!==0||1/V===1/k:V!==V&&k!==k}function h(V,k){this.message=V,this.data=k&&typeof k=="object"?k:{},this.stack=""}h.prototype=Error.prototype;function C(V){if(process.env.NODE_ENV!=="production")var k={},q=0;function
|
|
41
|
-
Valid keys: `+JSON.stringify(Object.keys(V),null," "));var
|
|
40
|
+
*/var Ur,gs;function Sc(){if(gs)return Ur;gs=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},c=0;c<10;c++)a["_"+String.fromCharCode(c)]=c;var u=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(u.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(f){p[f]=f}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ur=o()?Object.assign:function(s,a){for(var c,u=r(s),p,f=1;f<arguments.length;f++){c=Object(arguments[f]);for(var g in c)t.call(c,g)&&(u[g]=c[g]);if(e){p=e(c);for(var b=0;b<p.length;b++)n.call(c,p[b])&&(u[p[b]]=c[p[b]])}}return u},Ur}var qr,ys;function Yr(){if(ys)return qr;ys=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return qr=e,qr}var Hr,bs;function xs(){return bs||(bs=1,Hr=Function.call.bind(Object.prototype.hasOwnProperty)),Hr}var Gr,vs;function wc(){if(vs)return Gr;vs=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Yr(),n={},r=xs();e=function(s){var a="Warning: "+s;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(s,a,c,u,p){if(process.env.NODE_ENV!=="production"){for(var f in s)if(r(s,f)){var g;try{if(typeof s[f]!="function"){var b=Error((u||"React class")+": "+c+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}g=s[f](a,f,u,c,null,t)}catch(x){g=x}if(g&&!(g instanceof Error)&&e((u||"React class")+": type specification of "+c+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in n)){n[g.message]=!0;var m=p?p():"";e("Failed "+c+" type: "+g.message+(m??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Gr=o,Gr}var Kr,Cs;function Tc(){if(Cs)return Kr;Cs=1;var e=ms(),t=Sc(),n=Yr(),r=xs(),o=wc(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(c){var u="Warning: "+c;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function a(){return null}return Kr=function(c,u){var p=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function g(V){var k=V&&(p&&V[p]||V[f]);if(typeof k=="function")return k}var b="<<anonymous>>",m={array:E("array"),bigint:E("bigint"),bool:E("boolean"),func:E("function"),number:E("number"),object:E("object"),string:E("string"),symbol:E("symbol"),any:w(),arrayOf:T,element:P(),elementType:_(),instanceOf:O,node:z(),objectOf:j,oneOf:$,oneOfType:B,shape:d,exact:A};function x(V,k){return V===k?V!==0||1/V===1/k:V!==V&&k!==k}function h(V,k){this.message=V,this.data=k&&typeof k=="object"?k:{},this.stack=""}h.prototype=Error.prototype;function C(V){if(process.env.NODE_ENV!=="production")var k={},q=0;function G(Q,N,I,W,J,K,oe){if(W=W||b,K=K||I,oe!==n){if(u){var X=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw X.name="Invariant Violation",X}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Pe=W+":"+I;!k[Pe]&&q<3&&(s("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),k[Pe]=!0,q++)}}return N[I]==null?Q?N[I]===null?new h("The "+J+" `"+K+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new h("The "+J+" `"+K+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:V(N,I,W,J,K)}var M=G.bind(null,!1);return M.isRequired=G.bind(null,!0),M}function E(V){function k(q,G,M,Q,N,I){var W=q[G],J=H(W);if(J!==V){var K=Z(W);return new h("Invalid "+Q+" `"+N+"` of type "+("`"+K+"` supplied to `"+M+"`, expected ")+("`"+V+"`."),{expectedType:V})}return null}return C(k)}function w(){return C(a)}function T(V){function k(q,G,M,Q,N){if(typeof V!="function")return new h("Property `"+N+"` of component `"+M+"` has invalid PropType notation inside arrayOf.");var I=q[G];if(!Array.isArray(I)){var W=H(I);return new h("Invalid "+Q+" `"+N+"` of type "+("`"+W+"` supplied to `"+M+"`, expected an array."))}for(var J=0;J<I.length;J++){var K=V(I,J,M,Q,N+"["+J+"]",n);if(K instanceof Error)return K}return null}return C(k)}function P(){function V(k,q,G,M,Q){var N=k[q];if(!c(N)){var I=H(N);return new h("Invalid "+M+" `"+Q+"` of type "+("`"+I+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return C(V)}function _(){function V(k,q,G,M,Q){var N=k[q];if(!e.isValidElementType(N)){var I=H(N);return new h("Invalid "+M+" `"+Q+"` of type "+("`"+I+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return C(V)}function O(V){function k(q,G,M,Q,N){if(!(q[G]instanceof V)){var I=V.name||b,W=ie(q[G]);return new h("Invalid "+Q+" `"+N+"` of type "+("`"+W+"` supplied to `"+M+"`, expected ")+("instance of `"+I+"`."))}return null}return C(k)}function $(V){if(!Array.isArray(V))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),a;function k(q,G,M,Q,N){for(var I=q[G],W=0;W<V.length;W++)if(x(I,V[W]))return null;var J=JSON.stringify(V,function(oe,X){var Pe=Z(X);return Pe==="symbol"?String(X):X});return new h("Invalid "+Q+" `"+N+"` of value `"+String(I)+"` "+("supplied to `"+M+"`, expected one of "+J+"."))}return C(k)}function j(V){function k(q,G,M,Q,N){if(typeof V!="function")return new h("Property `"+N+"` of component `"+M+"` has invalid PropType notation inside objectOf.");var I=q[G],W=H(I);if(W!=="object")return new h("Invalid "+Q+" `"+N+"` of type "+("`"+W+"` supplied to `"+M+"`, expected an object."));for(var J in I)if(r(I,J)){var K=V(I,J,M,Q,N+"."+J,n);if(K instanceof Error)return K}return null}return C(k)}function B(V){if(!Array.isArray(V))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var k=0;k<V.length;k++){var q=V[k];if(typeof q!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+re(q)+" at index "+k+"."),a}function G(M,Q,N,I,W){for(var J=[],K=0;K<V.length;K++){var oe=V[K],X=oe(M,Q,N,I,W,n);if(X==null)return null;X.data&&r(X.data,"expectedType")&&J.push(X.data.expectedType)}var Pe=J.length>0?", expected one of type ["+J.join(", ")+"]":"";return new h("Invalid "+I+" `"+W+"` supplied to "+("`"+N+"`"+Pe+"."))}return C(G)}function z(){function V(k,q,G,M,Q){return R(k[q])?null:new h("Invalid "+M+" `"+Q+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return C(V)}function S(V,k,q,G,M){return new h((V||"React class")+": "+k+" type `"+q+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+M+"`.")}function d(V){function k(q,G,M,Q,N){var I=q[G],W=H(I);if(W!=="object")return new h("Invalid "+Q+" `"+N+"` of type `"+W+"` "+("supplied to `"+M+"`, expected `object`."));for(var J in V){var K=V[J];if(typeof K!="function")return S(M,Q,N,J,Z(K));var oe=K(I,J,M,Q,N+"."+J,n);if(oe)return oe}return null}return C(k)}function A(V){function k(q,G,M,Q,N){var I=q[G],W=H(I);if(W!=="object")return new h("Invalid "+Q+" `"+N+"` of type `"+W+"` "+("supplied to `"+M+"`, expected `object`."));var J=t({},q[G],V);for(var K in J){var oe=V[K];if(r(V,K)&&typeof oe!="function")return S(M,Q,N,K,Z(oe));if(!oe)return new h("Invalid "+Q+" `"+N+"` key `"+K+"` supplied to `"+M+"`.\nBad object: "+JSON.stringify(q[G],null," ")+`
|
|
41
|
+
Valid keys: `+JSON.stringify(Object.keys(V),null," "));var X=oe(I,K,M,Q,N+"."+K,n);if(X)return X}return null}return C(k)}function R(V){switch(typeof V){case"number":case"string":case"undefined":return!0;case"boolean":return!V;case"object":if(Array.isArray(V))return V.every(R);if(V===null||c(V))return!0;var k=g(V);if(k){var q=k.call(V),G;if(k!==V.entries){for(;!(G=q.next()).done;)if(!R(G.value))return!1}else for(;!(G=q.next()).done;){var M=G.value;if(M&&!R(M[1]))return!1}}else return!1;return!0;default:return!1}}function D(V,k){return V==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function H(V){var k=typeof V;return Array.isArray(V)?"array":V instanceof RegExp?"object":D(k,V)?"symbol":k}function Z(V){if(typeof V>"u"||V===null)return""+V;var k=H(V);if(k==="object"){if(V instanceof Date)return"date";if(V instanceof RegExp)return"regexp"}return k}function re(V){var k=Z(V);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function ie(V){return!V.constructor||!V.constructor.name?b:V.constructor.name}return m.checkPropTypes=o,m.resetWarningCache=o.resetWarningCache,m.PropTypes=m,m},Kr}var Xr,Ss;function kc(){if(Ss)return Xr;Ss=1;var e=Yr();function t(){}function n(){}return n.resetWarningCache=t,Xr=function(){function r(a,c,u,p,f,g){if(g!==e){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Xr}var ws;function Ec(){if(ws)return Dn.exports;if(ws=1,process.env.NODE_ENV!=="production"){var e=ms(),t=!0;Dn.exports=Tc()(e.isElement,t)}else Dn.exports=kc()();return Dn.exports}var Fn=Ec();const y=zr(Fn);function Ts(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ts(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ae(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ts(e))&&(r&&(r+=" "),r+=t);return r}function Vn(e,t,n=!1){const r={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const s=o;if(s==="components"||s==="slots")r[s]={...e[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){const a=e[s],c=t[s];if(!c)r[s]=a||{};else if(!a)r[s]=c;else{r[s]={...c};for(const u in a)if(Object.prototype.hasOwnProperty.call(a,u)){const p=u;r[s][p]=Vn(a[p],c[p],n)}}}else s==="className"&&n&&t.className!==void 0?r.className=Ae(e==null?void 0:e.className,t==null?void 0:t.className):s==="style"&&n&&t.style?r.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:r[s]===void 0&&(r[s]=e[s])}return r}function qt(e,t,n=void 0){const r={};for(const o in e){const s=e[o];let a="",c=!0;for(let u=0;u<s.length;u+=1){const p=s[u];p&&(a+=(c===!0?"":" ")+t(p),c=!1,n&&n[p]&&(a+=" "+n[p]))}r[o]=a}return r}const jc=y.oneOfType([y.func,y.object]);function Qr(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function _c(e){const{prototype:t={}}=e;return!!t.isReactComponent}function $c(e,t,n,r,o){const s=e[t],a=o||t;if(s==null||typeof window>"u")return null;let c;return typeof s=="function"&&!_c(s)&&(c="Did you accidentally provide a plain function component instead?"),s===F.Fragment&&(c="Did you accidentally provide a React.Fragment instead?"),c!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Ic=Qr(y.elementType,$c);function ks(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!window.navigator.userAgent.includes("jsdom")&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
42
42
|
`))}return!1}function Yt(e,t){const n=Array.isArray(t),r=Array.isArray(e);return Ac(t)?t:Bc(e)?Ht(t):n&&r?Rc(e,t):n!==r?Ht(t):Nc(e,t)}function Pc(e){let t=0;const n=e.length,r=new Array(n);for(t=0;t<n;t+=1)r[t]=Ht(e[t]);return r}function Oc(e){const t={};for(const n in e)n==="__proto__"||n==="constructor"||n==="prototype"||(t[n]=Ht(e[n]));return t}function Rc(e,t){const n=e.length;for(let r=0;r<t.length;r+=1)e[n+r]=Ht(t[r]);return e}function Mc(e){return typeof e=="object"&&e!==null&&!(e instanceof RegExp)&&!(e instanceof Date)}function Ac(e){return typeof e!="object"||e===null}function Bc(e){return typeof e!="object"||e===null||e instanceof RegExp||e instanceof Date}function Ht(e){return Mc(e)?Array.isArray(e)?Pc(e):Oc(e):e}function Nc(e,t){for(const n in t)n==="__proto__"||n==="constructor"||n==="prototype"||(n in e?e[n]=Yt(e[n],t[n]):e[n]=Ht(t[n]));return e}function Nt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function De(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Nt(7));return e.charAt(0).toUpperCase()+e.slice(1)}const vt=process.env.NODE_ENV!=="production"?y.oneOfType([y.number,y.string,y.object,y.array]):{};function Es(e){if(e==null)return!0;for(const t in e)return!1;return!0}var zn={exports:{}},ge={};/**
|
|
43
43
|
* @license React
|
|
44
44
|
* react-is.production.js
|
|
@@ -56,17 +56,17 @@ Valid keys: `+JSON.stringify(Object.keys(V),null," "));var Y=te(I,ne,M,Q,N+"."+
|
|
|
56
56
|
* This source code is licensed under the MIT license found in the
|
|
57
57
|
* LICENSE file in the root directory of this source tree.
|
|
58
58
|
*/var _s;function Lc(){return _s||(_s=1,process.env.NODE_ENV!=="production"&&(function(){function e(h){if(typeof h=="object"&&h!==null){var C=h.$$typeof;switch(C){case t:switch(h=h.type,h){case r:case s:case o:case p:case f:case m:return h;default:switch(h=h&&h.$$typeof,h){case c:case u:case b:case g:return h;case a:return h;default:return C}}case n:return C}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");ye.ContextConsumer=a,ye.ContextProvider=c,ye.Element=t,ye.ForwardRef=u,ye.Fragment=r,ye.Lazy=b,ye.Memo=g,ye.Portal=n,ye.Profiler=s,ye.StrictMode=o,ye.Suspense=p,ye.SuspenseList=f,ye.isContextConsumer=function(h){return e(h)===a},ye.isContextProvider=function(h){return e(h)===c},ye.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},ye.isForwardRef=function(h){return e(h)===u},ye.isFragment=function(h){return e(h)===r},ye.isLazy=function(h){return e(h)===b},ye.isMemo=function(h){return e(h)===g},ye.isPortal=function(h){return e(h)===n},ye.isProfiler=function(h){return e(h)===s},ye.isStrictMode=function(h){return e(h)===o},ye.isSuspense=function(h){return e(h)===p},ye.isSuspenseList=function(h){return e(h)===f},ye.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===r||h===s||h===o||h===p||h===f||typeof h=="object"&&h!==null&&(h.$$typeof===b||h.$$typeof===g||h.$$typeof===c||h.$$typeof===a||h.$$typeof===u||h.$$typeof===x||h.getModuleId!==void 0)},ye.typeOf=e})()),ye}var $s;function Fc(){return $s||($s=1,process.env.NODE_ENV==="production"?zn.exports=Dc():zn.exports=Lc()),zn.exports}var fn=Fc();function dt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Is(e){if(F.isValidElement(e)||fn.isValidElementType(e)||!dt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Is(e[n])}),t}function Ke(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return dt(e)&&dt(t)&&Object.keys(t).forEach(o=>{F.isValidElement(t[o])||fn.isValidElementType(t[o])?r[o]=t[o]:dt(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&dt(e[o])?r[o]=Ke(e[o],t[o],n):n.clone?r[o]=dt(t[o])?Is(t[o]):t[o]:r[o]=t[o]}),r}const Ps=/min-width:\s*([0-9.]+)/;function Os(e,t){if(!e.containerQueries||!Vc(t))return t;const n=[];for(const o in t)o.startsWith("@container")&&n.push(o);n.sort((o,s)=>{var a,c;return+(((a=o.match(Ps))==null?void 0:a[1])||0)-+(((c=s.match(Ps))==null?void 0:c[1])||0)});const r=t;for(let o=0;o<n.length;o+=1){const s=n[o],a=r[s];delete r[s],r[s]=a}return r}function Vc(e){for(const t in e)if(t.startsWith("@container"))return!0;return!1}function Rs(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function zc(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
59
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`);return null}const[,r,o]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(s)}function Wc(e){const t=(s,a)=>s.replace("@media",a?`@container ${a}`:"@container");function n(s,a){s.up=(...c)=>t(e.breakpoints.up(...c),a),s.down=(...c)=>t(e.breakpoints.down(...c),a),s.between=(...c)=>t(e.breakpoints.between(...c),a),s.only=(...c)=>t(e.breakpoints.only(...c),a),s.not=(...c)=>{const u=t(e.breakpoints.not(...c),a);return u.includes("not all and")?u.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):u}}const r={},o=s=>(n(r,s),r);return n(o),{...e,containerQueries:o}}const Uc=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function Ms(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,s=Uc(t),a=Object.keys(s);function c(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n})`}function u(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-r/100}${n})`}function p(m,x){const h=a.indexOf(x);return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n}) and (max-width:${(h!==-1&&typeof t[a[h]]=="number"?t[a[h]]:x)-r/100}${n})`}function f(m){return a.indexOf(m)+1<a.length?p(m,a[a.indexOf(m)+1]):c(m)}function g(m){const x=a.indexOf(m);return x===0?c(a[1]):x===a.length-1?u(a[x]):p(m,a[a.indexOf(m)+1]).replace("@media","@media not all and")}const b=[];for(let m=0;m<a.length;m+=1)b.push(c(a[m]));return{keys:a,values:s,up:c,down:u,between:p,only:f,not:g,unit:n,internal_mediaKeys:b,...o}}const qc={},Wn={xs:0,sm:600,md:900,lg:1200,xl:1536},Un=Ms({values:Wn}),Yc={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Wn[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Gt(e,t,n){const r={};return qn(r,e.theme,t,(o,s,a)=>{const c=n(s,a);o?r[o]=c:Yt(r,c)})}function qn(e,t,n,r){if(t??(t=qc),Array.isArray(n)){const o=t.breakpoints??Un;for(let s=0;s<n.length;s+=1)Jr(e,o.up(o.keys[s]),n[s],void 0,r);return e}if(typeof n=="object"){const o=t.breakpoints??Un,s=o.values??Wn;for(const a in n)if(Rs(o.keys,a)){const c=zc(t.containerQueries?t:Yc,a);c&&Jr(e,c,n[a],a,r)}else if(a in s){const c=o.up(a);Jr(e,c,n[a],a,r)}else{const c=a;e[c]=n[c]}return e}return r(void 0,n),e}function Jr(e,t,n,r,o){e[t]??(e[t]={}),o(t,n,r)}function Hc(e=Un){const{internal_mediaKeys:t}=e,n={};for(let r=0;r<t.length;r+=1)n[t[r]]={};return n}function As(e,t){const n=e.internal_mediaKeys;for(let r=0;r<n.length;r+=1){const o=n[r];Es(t[o])&&delete t[o]}return t}function Gc(e,t){if(Array.isArray(t))return!0;if(typeof t=="object"&&t!==null){for(let r=0;r<e.keys.length;r+=1)if(e.keys[r]in t)return!0;const n=Object.keys(t);for(let r=0;r<n.length;r+=1)if(Rs(e.keys,n[r]))return!0}return!1}function Bs(e,t,n,r){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||n:typeof n=="string"?o=Yn(e,n,!0,r)||n:o=n,t&&(o=t(o,n,e)),o}function Yn(e,t,n=!0,r=void 0){if(!e||!t)return null;const o=t.split(".");if(e.vars&&n){const s=Ns(e.vars,o,r);if(s!=null)return s}return Ns(e,o,r)}function Ns(e,t,n=void 0){let r,o=e,s=0;for(;s<t.length;){if(o==null)return o;r=o,o=o[t[s]],s+=1}if(n&&o===void 0){const a=t[t.length-1],c=`${n}${a==="default"?"":De(a)}`;return r==null?void 0:r[c]}return o}function
|
|
59
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`);return null}const[,r,o]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(s)}function Wc(e){const t=(s,a)=>s.replace("@media",a?`@container ${a}`:"@container");function n(s,a){s.up=(...c)=>t(e.breakpoints.up(...c),a),s.down=(...c)=>t(e.breakpoints.down(...c),a),s.between=(...c)=>t(e.breakpoints.between(...c),a),s.only=(...c)=>t(e.breakpoints.only(...c),a),s.not=(...c)=>{const u=t(e.breakpoints.not(...c),a);return u.includes("not all and")?u.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):u}}const r={},o=s=>(n(r,s),r);return n(o),{...e,containerQueries:o}}const Uc=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function Ms(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,s=Uc(t),a=Object.keys(s);function c(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n})`}function u(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-r/100}${n})`}function p(m,x){const h=a.indexOf(x);return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n}) and (max-width:${(h!==-1&&typeof t[a[h]]=="number"?t[a[h]]:x)-r/100}${n})`}function f(m){return a.indexOf(m)+1<a.length?p(m,a[a.indexOf(m)+1]):c(m)}function g(m){const x=a.indexOf(m);return x===0?c(a[1]):x===a.length-1?u(a[x]):p(m,a[a.indexOf(m)+1]).replace("@media","@media not all and")}const b=[];for(let m=0;m<a.length;m+=1)b.push(c(a[m]));return{keys:a,values:s,up:c,down:u,between:p,only:f,not:g,unit:n,internal_mediaKeys:b,...o}}const qc={},Wn={xs:0,sm:600,md:900,lg:1200,xl:1536},Un=Ms({values:Wn}),Yc={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Wn[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Gt(e,t,n){const r={};return qn(r,e.theme,t,(o,s,a)=>{const c=n(s,a);o?r[o]=c:Yt(r,c)})}function qn(e,t,n,r){if(t??(t=qc),Array.isArray(n)){const o=t.breakpoints??Un;for(let s=0;s<n.length;s+=1)Jr(e,o.up(o.keys[s]),n[s],void 0,r);return e}if(typeof n=="object"){const o=t.breakpoints??Un,s=o.values??Wn;for(const a in n)if(Rs(o.keys,a)){const c=zc(t.containerQueries?t:Yc,a);c&&Jr(e,c,n[a],a,r)}else if(a in s){const c=o.up(a);Jr(e,c,n[a],a,r)}else{const c=a;e[c]=n[c]}return e}return r(void 0,n),e}function Jr(e,t,n,r,o){e[t]??(e[t]={}),o(t,n,r)}function Hc(e=Un){const{internal_mediaKeys:t}=e,n={};for(let r=0;r<t.length;r+=1)n[t[r]]={};return n}function As(e,t){const n=e.internal_mediaKeys;for(let r=0;r<n.length;r+=1){const o=n[r];Es(t[o])&&delete t[o]}return t}function Gc(e,t){if(Array.isArray(t))return!0;if(typeof t=="object"&&t!==null){for(let r=0;r<e.keys.length;r+=1)if(e.keys[r]in t)return!0;const n=Object.keys(t);for(let r=0;r<n.length;r+=1)if(Rs(e.keys,n[r]))return!0}return!1}function Bs(e,t,n,r){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||n:typeof n=="string"?o=Yn(e,n,!0,r)||n:o=n,t&&(o=t(o,n,e)),o}function Yn(e,t,n=!0,r=void 0){if(!e||!t)return null;const o=t.split(".");if(e.vars&&n){const s=Ns(e.vars,o,r);if(s!=null)return s}return Ns(e,o,r)}function Ns(e,t,n=void 0){let r,o=e,s=0;for(;s<t.length;){if(o==null)return o;r=o,o=o[t[s]],s+=1}if(n&&o===void 0){const a=t[t.length-1],c=`${n}${a==="default"?"":De(a)}`;return r==null?void 0:r[c]}return o}function Ee(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,s=a=>{if(a[t]==null)return null;const c=a[t],u=a.theme,p=Yn(u,r)||{};return Gt(a,c,g=>{const b=Bs(p,o,g,t);return n===!1?b:{[n]:b}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:vt}:{},s.filterProps=[t],s}const Kc={internal_cache:{}},Hn={m:"margin",p:"padding"},Ds={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ls={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},pn={};for(const e in Hn)pn[e]=[Hn[e]];for(const e in Hn)for(const t in Ds){const n=Hn[e],r=Ds[t],o=Array.isArray(r)?r.map(s=>n+s):[n+r];pn[e+t]=o}for(const e in Ls)pn[e]=pn[Ls[e]];const Gn=new Set(["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"]),Kn=new Set(["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"]),Xc=new Set([...Gn,...Kn]);function hn(e,t,n,r){const o=Yn(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${s}.`),typeof o=="string"?o.startsWith("var(")&&s===0?0:o.startsWith("var(")&&s===1?o:`calc(${s} * ${o})`:o*s):Array.isArray(o)?s=>{if(typeof s=="string")return s;const a=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(a)?a>o.length-1&&console.error([`MUI: The value provided (${a}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${a} > ${o.length-1}, you need to add the missing values.`].join(`
|
|
60
60
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
61
61
|
`)));const c=o[a];return s>=0?c:typeof c=="number"?-c:typeof c=="string"&&c.startsWith("var(")?`calc(-1 * ${c})`:`-${c}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
62
|
-
`)),()=>{})}function Zr(e){return hn(e,"spacing",8,"spacing")}function mn(e,t){return typeof t=="string"||t==null?t:e(t)}const Fs=[""];function Vs(e,t){var s;const n=e.theme??Kc,r=((s=n==null?void 0:n.internal_cache)==null?void 0:s.unarySpacing)??Zr(n),o={};for(const a in e){if(!t.has(a))continue;const c=pn[a]??(Fs[0]=a,Fs),u=e[a];qn(o,e.theme,u,(p,f)=>{const g=p?o[p]:o;for(let b=0;b<c.length;b+=1)g[c[b]]=mn(r,f)})}return o}function eo(e){return Vs(e,Gn)}eo.propTypes=process.env.NODE_ENV!=="production"?Array.from(Gn).reduce((e,t)=>(e[t]=vt,e),{}):{},eo.filterProps=Gn;const _e=eo;function to(e){return Vs(e,Kn)}to.propTypes=process.env.NODE_ENV!=="production"?Array.from(Kn).reduce((e,t)=>(e[t]=vt,e),{}):{},to.filterProps=Kn;const $e=to;process.env.NODE_ENV!=="production"&&Array.from(Xc).reduce((e,t)=>(e[t]=vt,e),{});function Xn(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(s=>{r[s]=o}),r),{}),n=r=>{const o={};for(const s in r)t[s]&&Yt(o,t[s](r));return o};return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Xe(e){return typeof e!="number"?e:`${e}px solid`}function Qe(e,t){return je({prop:e,themeKey:"borders",transform:t})}const Qc=Qe("border",Xe),Jc=Qe("borderTop",Xe),Zc=Qe("borderRight",Xe),el=Qe("borderBottom",Xe),tl=Qe("borderLeft",Xe),nl=Qe("borderColor"),rl=Qe("borderTopColor"),ol=Qe("borderRightColor"),sl=Qe("borderBottomColor"),il=Qe("borderLeftColor"),al=Qe("outline",Xe),cl=Qe("outlineColor"),Qn=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=hn(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:mn(t,r)});return Gt(e,e.borderRadius,n)}return null};Qn.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:vt}:{},Qn.filterProps=["borderRadius"],Xn(Qc,Jc,Zc,el,tl,nl,rl,ol,sl,il,Qn,al,cl);const Jn=e=>{if(e.gap!==void 0&&e.gap!==null){const t=hn(e.theme,"spacing",8,"gap"),n=r=>({gap:mn(t,r)});return Gt(e,e.gap,n)}return null};Jn.propTypes=process.env.NODE_ENV!=="production"?{gap:vt}:{},Jn.filterProps=["gap"];const Zn=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=hn(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:mn(t,r)});return Gt(e,e.columnGap,n)}return null};Zn.propTypes=process.env.NODE_ENV!=="production"?{columnGap:vt}:{},Zn.filterProps=["columnGap"];const er=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=hn(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:mn(t,r)});return Gt(e,e.rowGap,n)}return null};er.propTypes=process.env.NODE_ENV!=="production"?{rowGap:vt}:{},er.filterProps=["rowGap"];const ll=je({prop:"gridColumn"}),ul=je({prop:"gridRow"}),dl=je({prop:"gridAutoFlow"}),fl=je({prop:"gridAutoColumns"}),pl=je({prop:"gridAutoRows"}),hl=je({prop:"gridTemplateColumns"}),ml=je({prop:"gridTemplateRows"}),gl=je({prop:"gridTemplateAreas"}),yl=je({prop:"gridArea"});Xn(Jn,Zn,er,ll,ul,dl,fl,pl,hl,ml,gl,yl);function Kt(e,t){return t==="grey"?t:e}const bl=je({prop:"color",themeKey:"palette",transform:Kt}),xl=je({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Kt}),vl=je({prop:"backgroundColor",themeKey:"palette",transform:Kt});Xn(bl,xl,vl);const Cl=Wn;function Ye(e){return e<=1&&e!==0?`${e*100}%`:e}const Sl=je({prop:"width",transform:Ye}),no=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,s,a,c,u;const r=((a=(s=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:s.values)==null?void 0:a[n])||Cl[n];return r?((u=(c=e.theme)==null?void 0:c.breakpoints)==null?void 0:u.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Ye(n)}};return Gt(e,e.maxWidth,t)}return null};no.filterProps=["maxWidth"];const wl=je({prop:"minWidth",transform:Ye}),Tl=je({prop:"height",transform:Ye}),kl=je({prop:"maxHeight",transform:Ye}),El=je({prop:"minHeight",transform:Ye});je({prop:"size",cssProperty:"width",transform:Ye}),je({prop:"size",cssProperty:"height",transform:Ye});const jl=je({prop:"boxSizing"});Xn(Sl,no,wl,Tl,kl,El,jl);const tr={border:{themeKey:"borders",transform:Xe},borderTop:{themeKey:"borders",transform:Xe},borderRight:{themeKey:"borders",transform:Xe},borderBottom:{themeKey:"borders",transform:Xe},borderLeft:{themeKey:"borders",transform:Xe},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Xe},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Qn},color:{themeKey:"palette",transform:Kt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Kt},backgroundColor:{themeKey:"palette",transform:Kt},p:{style:$e},pt:{style:$e},pr:{style:$e},pb:{style:$e},pl:{style:$e},px:{style:$e},py:{style:$e},padding:{style:$e},paddingTop:{style:$e},paddingRight:{style:$e},paddingBottom:{style:$e},paddingLeft:{style:$e},paddingX:{style:$e},paddingY:{style:$e},paddingInline:{style:$e},paddingInlineStart:{style:$e},paddingInlineEnd:{style:$e},paddingBlock:{style:$e},paddingBlockStart:{style:$e},paddingBlockEnd:{style:$e},m:{style:_e},mt:{style:_e},mr:{style:_e},mb:{style:_e},ml:{style:_e},mx:{style:_e},my:{style:_e},margin:{style:_e},marginTop:{style:_e},marginRight:{style:_e},marginBottom:{style:_e},marginLeft:{style:_e},marginX:{style:_e},marginY:{style:_e},marginInline:{style:_e},marginInlineStart:{style:_e},marginInlineEnd:{style:_e},marginBlock:{style:_e},marginBlockStart:{style:_e},marginBlockEnd:{style:_e},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Jn},rowGap:{style:er},columnGap:{style:Zn},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ye},maxWidth:{style:no},minWidth:{transform:Ye},height:{transform:Ye},maxHeight:{transform:Ye},minHeight:{transform:Ye},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},_l={};function $l(){function e(t){if(!t.sx)return null;const{sx:n,theme:r=_l,nested:o}=t,s=r.unstable_sxConfig??tr,a={sx:null,theme:r,nested:!0};function c(u){let p=u;if(typeof u=="function")p=u(r);else if(typeof u!="object")return u;if(!p)return null;const f=r.breakpoints??Un,g=Hc(f);for(const b in p){const m=Il(p[b],r);if(m!=null){if(typeof m!="object"){zs(g,b,m,r,s);continue}if(s[b]){zs(g,b,m,r,s);continue}Gc(f,m)?qn(g,t.theme,m,(x,h)=>{g[x][b]=h}):(a.sx=m,g[b]=e(a))}}return!o&&r.modularCssLayers?{"@layer sx":Os(r,As(f,g))}:Os(r,As(f,g))}return Array.isArray(n)?n.map(c):c(n)}return e.filterProps=["sx"],e}const Dt=$l();function zs(e,t,n,r,o){const s=o[t];if(!s){e[t]=n;return}if(n==null)return;const{themeKey:a}=s;if(a==="typography"&&n==="inherit"){e[t]=n;return}const{style:c}=s;if(c){Yt(e,c({[t]:n,theme:r}));return}const{cssProperty:u=t,transform:p}=s,f=Yn(r,a);qn(e,r,n,(g,b)=>{const m=Bs(f,p,b,t);u===!1?Yt(g?e[g]:e,m):g?e[g][u]=m:e[u]=m})}function Il(e,t){return typeof e=="function"?e(t):e}function Pl(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Ol={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Rl(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Ml=/[A-Z]|^ms/g,Al=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ws=function(t){return t.charCodeAt(1)===45},Us=function(t){return t!=null&&typeof t!="boolean"},ro=Rl(function(e){return Ws(e)?e:e.replace(Ml,"-$&").toLowerCase()}),qs=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Al,function(r,o,s){return Ct={name:o,styles:s,next:Ct},o})}return Ol[t]!==1&&!Ws(t)&&typeof n=="number"&&n!==0?n+"px":n};function nr(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Ct={name:o.name,styles:o.styles,next:Ct},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)Ct={name:a.name,styles:a.styles,next:Ct},a=a.next;var c=s.styles+";";return c}return Bl(e,t,n)}}var u=n;return u}function Bl(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=nr(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var c=a;Us(c)&&(r+=ro(s)+":"+qs(s,c)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var u=0;u<a.length;u++)Us(a[u])&&(r+=ro(s)+":"+qs(s,a[u])+";");else{var p=nr(e,t,a);switch(s){case"animation":case"animationName":{r+=ro(s)+":"+p+";";break}default:r+=s+"{"+p+"}"}}}return r}var Ys=/label:\s*([^\s;{]+)\s*(;|$)/g,Ct;function Nl(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Ct=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=nr(n,t,s);else{var a=s;o+=a[0]}for(var c=1;c<e.length;c++)if(o+=nr(n,t,e[c]),r){var u=s;o+=u[c]}Ys.lastIndex=0;for(var p="",f;(f=Ys.exec(o))!==null;)p+="-"+f[1];var g=Pl(o)+p;return{name:g,styles:o,next:Ct}}function Dl(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Ll(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Fl=(function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Ll(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=Dl(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e})(),Le="-ms-",rr="-moz-",le="-webkit-",Hs="comm",oo="rule",so="decl",Vl="@import",Gs="@keyframes",zl="@layer",Wl=Math.abs,or=String.fromCharCode,Ul=Object.assign;function ql(e,t){return Be(e,0)^45?(((t<<2^Be(e,0))<<2^Be(e,1))<<2^Be(e,2))<<2^Be(e,3):0}function Ks(e){return e.trim()}function Yl(e,t){return(e=t.exec(e))?e[0]:e}function ue(e,t,n){return e.replace(t,n)}function io(e,t){return e.indexOf(t)}function Be(e,t){return e.charCodeAt(t)|0}function gn(e,t,n){return e.slice(t,n)}function st(e){return e.length}function ao(e){return e.length}function sr(e,t){return t.push(e),e}function Hl(e,t){return e.map(t).join("")}var ir=1,Xt=1,Xs=0,ze=0,Ie=0,Qt="";function ar(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:ir,column:Xt,length:a,return:""}}function yn(e,t){return Ul(ar("",null,null,"",null,null,0),e,{length:-e.length},t)}function Gl(){return Ie}function Kl(){return Ie=ze>0?Be(Qt,--ze):0,Xt--,Ie===10&&(Xt=1,ir--),Ie}function He(){return Ie=ze<Xs?Be(Qt,ze++):0,Xt++,Ie===10&&(Xt=1,ir++),Ie}function it(){return Be(Qt,ze)}function cr(){return ze}function bn(e,t){return gn(Qt,e,t)}function xn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Qs(e){return ir=Xt=1,Xs=st(Qt=e),ze=0,[]}function Js(e){return Qt="",e}function lr(e){return Ks(bn(ze-1,co(e===91?e+2:e===40?e+1:e)))}function Xl(e){for(;(Ie=it())&&Ie<33;)He();return xn(e)>2||xn(Ie)>3?"":" "}function Ql(e,t){for(;--t&&He()&&!(Ie<48||Ie>102||Ie>57&&Ie<65||Ie>70&&Ie<97););return bn(e,cr()+(t<6&&it()==32&&He()==32))}function co(e){for(;He();)switch(Ie){case e:return ze;case 34:case 39:e!==34&&e!==39&&co(Ie);break;case 40:e===41&&co(e);break;case 92:He();break}return ze}function Jl(e,t){for(;He()&&e+Ie!==57;)if(e+Ie===84&&it()===47)break;return"/*"+bn(t,ze-1)+"*"+or(e===47?e:He())}function Zl(e){for(;!xn(it());)He();return bn(e,ze)}function eu(e){return Js(ur("",null,null,null,[""],e=Qs(e),0,[0],e))}function ur(e,t,n,r,o,s,a,c,u){for(var p=0,f=0,g=a,b=0,m=0,x=0,h=1,C=1,E=1,w=0,T="",P=o,_=s,O=r,$=T;C;)switch(x=w,w=He()){case 40:if(x!=108&&Be($,g-1)==58){io($+=ue(lr(w),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:$+=lr(w);break;case 9:case 10:case 13:case 32:$+=Xl(x);break;case 92:$+=Ql(cr()-1,7);continue;case 47:switch(it()){case 42:case 47:sr(tu(Jl(He(),cr()),t,n),u);break;default:$+="/"}break;case 123*h:c[p++]=st($)*E;case 125*h:case 59:case 0:switch(w){case 0:case 125:C=0;case 59+f:E==-1&&($=ue($,/\f/g,"")),m>0&&st($)-g&&sr(m>32?ei($+";",r,n,g-1):ei(ue($," ","")+";",r,n,g-2),u);break;case 59:$+=";";default:if(sr(O=Zs($,t,n,p,f,o,c,T,P=[],_=[],g),s),w===123)if(f===0)ur($,t,O,O,P,s,g,c,_);else switch(b===99&&Be($,3)===110?100:b){case 100:case 108:case 109:case 115:ur(e,O,O,r&&sr(Zs(e,O,O,0,0,o,c,T,o,P=[],g),_),o,_,g,c,r?P:_);break;default:ur($,O,O,O,[""],_,0,c,_)}}p=f=m=0,h=E=1,T=$="",g=a;break;case 58:g=1+st($),m=x;default:if(h<1){if(w==123)--h;else if(w==125&&h++==0&&Kl()==125)continue}switch($+=or(w),w*h){case 38:E=f>0?1:($+="\f",-1);break;case 44:c[p++]=(st($)-1)*E,E=1;break;case 64:it()===45&&($+=lr(He())),b=it(),f=g=st(T=$+=Zl(cr())),w++;break;case 45:x===45&&st($)==2&&(h=0)}}return s}function Zs(e,t,n,r,o,s,a,c,u,p,f){for(var g=o-1,b=o===0?s:[""],m=ao(b),x=0,h=0,C=0;x<r;++x)for(var E=0,w=gn(e,g+1,g=Wl(h=a[x])),T=e;E<m;++E)(T=Ks(h>0?b[E]+" "+w:ue(w,/&\f/g,b[E])))&&(u[C++]=T);return ar(e,t,n,o===0?oo:c,u,p,f)}function tu(e,t,n){return ar(e,t,n,Hs,or(Gl()),gn(e,2,-2),0)}function ei(e,t,n,r){return ar(e,t,n,so,gn(e,0,r),gn(e,r+1,-1),r)}function Jt(e,t){for(var n="",r=ao(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function nu(e,t,n,r){switch(e.type){case zl:if(e.children.length)break;case Vl:case so:return e.return=e.return||e.value;case Hs:return"";case Gs:return e.return=e.value+"{"+Jt(e.children,r)+"}";case oo:e.value=e.props.join(",")}return st(n=Jt(e.children,r))?e.return=e.value+"{"+n+"}":""}function ru(e){var t=ao(e);return function(n,r,o,s){for(var a="",c=0;c<t;c++)a+=e[c](n,r,o,s)||"";return a}}function ou(e){return function(t){t.root||(t=t.return)&&e(t)}}var su=function(t,n,r){for(var o=0,s=0;o=s,s=it(),o===38&&s===12&&(n[r]=1),!xn(s);)He();return bn(t,ze)},iu=function(t,n){var r=-1,o=44;do switch(xn(o)){case 0:o===38&&it()===12&&(n[r]=1),t[r]+=su(ze-1,n,r);break;case 2:t[r]+=lr(o);break;case 4:if(o===44){t[++r]=it()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=or(o)}while(o=He());return t},au=function(t,n){return Js(iu(Qs(t),n))},ti=new WeakMap,cu=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!ti.get(r))&&!o){ti.set(t,!0);for(var s=[],a=au(n,s),c=r.props,u=0,p=0;u<a.length;u++)for(var f=0;f<c.length;f++,p++)t.props[p]=s[u]?a[u].replace(/&\f/g,c[f]):c[f]+" "+a[u]}}},lu=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function ni(e,t){switch(ql(e,t)){case 5103:return le+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return le+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return le+e+rr+e+Le+e+e;case 6828:case 4268:return le+e+Le+e+e;case 6165:return le+e+Le+"flex-"+e+e;case 5187:return le+e+ue(e,/(\w+).+(:[^]+)/,le+"box-$1$2"+Le+"flex-$1$2")+e;case 5443:return le+e+Le+"flex-item-"+ue(e,/flex-|-self/,"")+e;case 4675:return le+e+Le+"flex-line-pack"+ue(e,/align-content|flex-|-self/,"")+e;case 5548:return le+e+Le+ue(e,"shrink","negative")+e;case 5292:return le+e+Le+ue(e,"basis","preferred-size")+e;case 6060:return le+"box-"+ue(e,"-grow","")+le+e+Le+ue(e,"grow","positive")+e;case 4554:return le+ue(e,/([^-])(transform)/g,"$1"+le+"$2")+e;case 6187:return ue(ue(ue(e,/(zoom-|grab)/,le+"$1"),/(image-set)/,le+"$1"),e,"")+e;case 5495:case 3959:return ue(e,/(image-set\([^]*)/,le+"$1$`$1");case 4968:return ue(ue(e,/(.+:)(flex-)?(.*)/,le+"box-pack:$3"+Le+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+le+e+e;case 4095:case 3583:case 4068:case 2532:return ue(e,/(.+)-inline(.+)/,le+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(st(e)-1-t>6)switch(Be(e,t+1)){case 109:if(Be(e,t+4)!==45)break;case 102:return ue(e,/(.+:)(.+)-([^]+)/,"$1"+le+"$2-$3$1"+rr+(Be(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~io(e,"stretch")?ni(ue(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Be(e,t+1)!==115)break;case 6444:switch(Be(e,st(e)-3-(~io(e,"!important")&&10))){case 107:return ue(e,":",":"+le)+e;case 101:return ue(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+le+(Be(e,14)===45?"inline-":"")+"box$3$1"+le+"$2$3$1"+Le+"$2box$3")+e}break;case 5936:switch(Be(e,t+11)){case 114:return le+e+Le+ue(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return le+e+Le+ue(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return le+e+Le+ue(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return le+e+Le+e+e}return e}var uu=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case so:t.return=ni(t.value,t.length);break;case Gs:return Jt([yn(t,{value:ue(t.value,"@","@"+le)})],o);case oo:if(t.length)return Hl(t.props,function(s){switch(Yl(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Jt([yn(t,{props:[ue(s,/:(read-\w+)/,":"+rr+"$1")]})],o);case"::placeholder":return Jt([yn(t,{props:[ue(s,/:(plac\w+)/,":"+le+"input-$1")]}),yn(t,{props:[ue(s,/:(plac\w+)/,":"+rr+"$1")]}),yn(t,{props:[ue(s,/:(plac\w+)/,Le+"input-$1")]})],o)}return""})}},du=[uu],ri=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var C=h.getAttribute("data-emotion");C.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||du,s={},a,c=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var C=h.getAttribute("data-emotion").split(" "),E=1;E<C.length;E++)s[C[E]]=!0;c.push(h)});var u,p=[cu,lu];{var f,g=[nu,ou(function(h){f.insert(h)})],b=ru(p.concat(o,g)),m=function(C){return Jt(eu(C),b)};u=function(C,E,w,T){f=w,m(C?C+"{"+E.styles+"}":E.styles),T&&(x.inserted[E.name]=!0)}}var x={key:n,sheet:new Fl({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:u};return x.sheet.hydrate(c),x};function fu(e){return e==null||Object.keys(e).length===0}function lo(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(fu(o)?n:o):t;return i.jsx(Ue.Global,{styles:r})}process.env.NODE_ENV!=="production"&&(lo.propTypes={defaultTheme:y.object,styles:y.oneOfType([y.array,y.string,y.object,y.func])});/**
|
|
62
|
+
`)),()=>{})}function Zr(e){return hn(e,"spacing",8,"spacing")}function mn(e,t){return typeof t=="string"||t==null?t:e(t)}const Fs=[""];function Vs(e,t){var s;const n=e.theme??Kc,r=((s=n==null?void 0:n.internal_cache)==null?void 0:s.unarySpacing)??Zr(n),o={};for(const a in e){if(!t.has(a))continue;const c=pn[a]??(Fs[0]=a,Fs),u=e[a];qn(o,e.theme,u,(p,f)=>{const g=p?o[p]:o;for(let b=0;b<c.length;b+=1)g[c[b]]=mn(r,f)})}return o}function eo(e){return Vs(e,Gn)}eo.propTypes=process.env.NODE_ENV!=="production"?Array.from(Gn).reduce((e,t)=>(e[t]=vt,e),{}):{},eo.filterProps=Gn;const je=eo;function to(e){return Vs(e,Kn)}to.propTypes=process.env.NODE_ENV!=="production"?Array.from(Kn).reduce((e,t)=>(e[t]=vt,e),{}):{},to.filterProps=Kn;const _e=to;process.env.NODE_ENV!=="production"&&Array.from(Xc).reduce((e,t)=>(e[t]=vt,e),{});function Xn(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(s=>{r[s]=o}),r),{}),n=r=>{const o={};for(const s in r)t[s]&&Yt(o,t[s](r));return o};return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Xe(e){return typeof e!="number"?e:`${e}px solid`}function Qe(e,t){return Ee({prop:e,themeKey:"borders",transform:t})}const Qc=Qe("border",Xe),Jc=Qe("borderTop",Xe),Zc=Qe("borderRight",Xe),el=Qe("borderBottom",Xe),tl=Qe("borderLeft",Xe),nl=Qe("borderColor"),rl=Qe("borderTopColor"),ol=Qe("borderRightColor"),sl=Qe("borderBottomColor"),il=Qe("borderLeftColor"),al=Qe("outline",Xe),cl=Qe("outlineColor"),Qn=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=hn(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:mn(t,r)});return Gt(e,e.borderRadius,n)}return null};Qn.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:vt}:{},Qn.filterProps=["borderRadius"],Xn(Qc,Jc,Zc,el,tl,nl,rl,ol,sl,il,Qn,al,cl);const Jn=e=>{if(e.gap!==void 0&&e.gap!==null){const t=hn(e.theme,"spacing",8,"gap"),n=r=>({gap:mn(t,r)});return Gt(e,e.gap,n)}return null};Jn.propTypes=process.env.NODE_ENV!=="production"?{gap:vt}:{},Jn.filterProps=["gap"];const Zn=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=hn(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:mn(t,r)});return Gt(e,e.columnGap,n)}return null};Zn.propTypes=process.env.NODE_ENV!=="production"?{columnGap:vt}:{},Zn.filterProps=["columnGap"];const er=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=hn(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:mn(t,r)});return Gt(e,e.rowGap,n)}return null};er.propTypes=process.env.NODE_ENV!=="production"?{rowGap:vt}:{},er.filterProps=["rowGap"];const ll=Ee({prop:"gridColumn"}),ul=Ee({prop:"gridRow"}),dl=Ee({prop:"gridAutoFlow"}),fl=Ee({prop:"gridAutoColumns"}),pl=Ee({prop:"gridAutoRows"}),hl=Ee({prop:"gridTemplateColumns"}),ml=Ee({prop:"gridTemplateRows"}),gl=Ee({prop:"gridTemplateAreas"}),yl=Ee({prop:"gridArea"});Xn(Jn,Zn,er,ll,ul,dl,fl,pl,hl,ml,gl,yl);function Kt(e,t){return t==="grey"?t:e}const bl=Ee({prop:"color",themeKey:"palette",transform:Kt}),xl=Ee({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Kt}),vl=Ee({prop:"backgroundColor",themeKey:"palette",transform:Kt});Xn(bl,xl,vl);const Cl=Wn;function Ye(e){return e<=1&&e!==0?`${e*100}%`:e}const Sl=Ee({prop:"width",transform:Ye}),no=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,s,a,c,u;const r=((a=(s=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:s.values)==null?void 0:a[n])||Cl[n];return r?((u=(c=e.theme)==null?void 0:c.breakpoints)==null?void 0:u.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Ye(n)}};return Gt(e,e.maxWidth,t)}return null};no.filterProps=["maxWidth"];const wl=Ee({prop:"minWidth",transform:Ye}),Tl=Ee({prop:"height",transform:Ye}),kl=Ee({prop:"maxHeight",transform:Ye}),El=Ee({prop:"minHeight",transform:Ye});Ee({prop:"size",cssProperty:"width",transform:Ye}),Ee({prop:"size",cssProperty:"height",transform:Ye});const jl=Ee({prop:"boxSizing"});Xn(Sl,no,wl,Tl,kl,El,jl);const tr={border:{themeKey:"borders",transform:Xe},borderTop:{themeKey:"borders",transform:Xe},borderRight:{themeKey:"borders",transform:Xe},borderBottom:{themeKey:"borders",transform:Xe},borderLeft:{themeKey:"borders",transform:Xe},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Xe},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Qn},color:{themeKey:"palette",transform:Kt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Kt},backgroundColor:{themeKey:"palette",transform:Kt},p:{style:_e},pt:{style:_e},pr:{style:_e},pb:{style:_e},pl:{style:_e},px:{style:_e},py:{style:_e},padding:{style:_e},paddingTop:{style:_e},paddingRight:{style:_e},paddingBottom:{style:_e},paddingLeft:{style:_e},paddingX:{style:_e},paddingY:{style:_e},paddingInline:{style:_e},paddingInlineStart:{style:_e},paddingInlineEnd:{style:_e},paddingBlock:{style:_e},paddingBlockStart:{style:_e},paddingBlockEnd:{style:_e},m:{style:je},mt:{style:je},mr:{style:je},mb:{style:je},ml:{style:je},mx:{style:je},my:{style:je},margin:{style:je},marginTop:{style:je},marginRight:{style:je},marginBottom:{style:je},marginLeft:{style:je},marginX:{style:je},marginY:{style:je},marginInline:{style:je},marginInlineStart:{style:je},marginInlineEnd:{style:je},marginBlock:{style:je},marginBlockStart:{style:je},marginBlockEnd:{style:je},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Jn},rowGap:{style:er},columnGap:{style:Zn},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ye},maxWidth:{style:no},minWidth:{transform:Ye},height:{transform:Ye},maxHeight:{transform:Ye},minHeight:{transform:Ye},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},_l={};function $l(){function e(t){if(!t.sx)return null;const{sx:n,theme:r=_l,nested:o}=t,s=r.unstable_sxConfig??tr,a={sx:null,theme:r,nested:!0};function c(u){let p=u;if(typeof u=="function")p=u(r);else if(typeof u!="object")return u;if(!p)return null;const f=r.breakpoints??Un,g=Hc(f);for(const b in p){const m=Il(p[b],r);if(m!=null){if(typeof m!="object"){zs(g,b,m,r,s);continue}if(s[b]){zs(g,b,m,r,s);continue}Gc(f,m)?qn(g,t.theme,m,(x,h)=>{g[x][b]=h}):(a.sx=m,g[b]=e(a))}}return!o&&r.modularCssLayers?{"@layer sx":Os(r,As(f,g))}:Os(r,As(f,g))}return Array.isArray(n)?n.map(c):c(n)}return e.filterProps=["sx"],e}const Dt=$l();function zs(e,t,n,r,o){const s=o[t];if(!s){e[t]=n;return}if(n==null)return;const{themeKey:a}=s;if(a==="typography"&&n==="inherit"){e[t]=n;return}const{style:c}=s;if(c){Yt(e,c({[t]:n,theme:r}));return}const{cssProperty:u=t,transform:p}=s,f=Yn(r,a);qn(e,r,n,(g,b)=>{const m=Bs(f,p,b,t);u===!1?Yt(g?e[g]:e,m):g?e[g][u]=m:e[u]=m})}function Il(e,t){return typeof e=="function"?e(t):e}function Pl(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Ol={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Rl(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Ml=/[A-Z]|^ms/g,Al=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ws=function(t){return t.charCodeAt(1)===45},Us=function(t){return t!=null&&typeof t!="boolean"},ro=Rl(function(e){return Ws(e)?e:e.replace(Ml,"-$&").toLowerCase()}),qs=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Al,function(r,o,s){return Ct={name:o,styles:s,next:Ct},o})}return Ol[t]!==1&&!Ws(t)&&typeof n=="number"&&n!==0?n+"px":n};function nr(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Ct={name:o.name,styles:o.styles,next:Ct},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)Ct={name:a.name,styles:a.styles,next:Ct},a=a.next;var c=s.styles+";";return c}return Bl(e,t,n)}}var u=n;return u}function Bl(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=nr(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var c=a;Us(c)&&(r+=ro(s)+":"+qs(s,c)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var u=0;u<a.length;u++)Us(a[u])&&(r+=ro(s)+":"+qs(s,a[u])+";");else{var p=nr(e,t,a);switch(s){case"animation":case"animationName":{r+=ro(s)+":"+p+";";break}default:r+=s+"{"+p+"}"}}}return r}var Ys=/label:\s*([^\s;{]+)\s*(;|$)/g,Ct;function Nl(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Ct=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=nr(n,t,s);else{var a=s;o+=a[0]}for(var c=1;c<e.length;c++)if(o+=nr(n,t,e[c]),r){var u=s;o+=u[c]}Ys.lastIndex=0;for(var p="",f;(f=Ys.exec(o))!==null;)p+="-"+f[1];var g=Pl(o)+p;return{name:g,styles:o,next:Ct}}function Dl(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Ll(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Fl=(function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Ll(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=Dl(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e})(),Le="-ms-",rr="-moz-",le="-webkit-",Hs="comm",oo="rule",so="decl",Vl="@import",Gs="@keyframes",zl="@layer",Wl=Math.abs,or=String.fromCharCode,Ul=Object.assign;function ql(e,t){return Be(e,0)^45?(((t<<2^Be(e,0))<<2^Be(e,1))<<2^Be(e,2))<<2^Be(e,3):0}function Ks(e){return e.trim()}function Yl(e,t){return(e=t.exec(e))?e[0]:e}function ue(e,t,n){return e.replace(t,n)}function io(e,t){return e.indexOf(t)}function Be(e,t){return e.charCodeAt(t)|0}function gn(e,t,n){return e.slice(t,n)}function st(e){return e.length}function ao(e){return e.length}function sr(e,t){return t.push(e),e}function Hl(e,t){return e.map(t).join("")}var ir=1,Xt=1,Xs=0,ze=0,$e=0,Qt="";function ar(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:ir,column:Xt,length:a,return:""}}function yn(e,t){return Ul(ar("",null,null,"",null,null,0),e,{length:-e.length},t)}function Gl(){return $e}function Kl(){return $e=ze>0?Be(Qt,--ze):0,Xt--,$e===10&&(Xt=1,ir--),$e}function He(){return $e=ze<Xs?Be(Qt,ze++):0,Xt++,$e===10&&(Xt=1,ir++),$e}function it(){return Be(Qt,ze)}function cr(){return ze}function bn(e,t){return gn(Qt,e,t)}function xn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Qs(e){return ir=Xt=1,Xs=st(Qt=e),ze=0,[]}function Js(e){return Qt="",e}function lr(e){return Ks(bn(ze-1,co(e===91?e+2:e===40?e+1:e)))}function Xl(e){for(;($e=it())&&$e<33;)He();return xn(e)>2||xn($e)>3?"":" "}function Ql(e,t){for(;--t&&He()&&!($e<48||$e>102||$e>57&&$e<65||$e>70&&$e<97););return bn(e,cr()+(t<6&&it()==32&&He()==32))}function co(e){for(;He();)switch($e){case e:return ze;case 34:case 39:e!==34&&e!==39&&co($e);break;case 40:e===41&&co(e);break;case 92:He();break}return ze}function Jl(e,t){for(;He()&&e+$e!==57;)if(e+$e===84&&it()===47)break;return"/*"+bn(t,ze-1)+"*"+or(e===47?e:He())}function Zl(e){for(;!xn(it());)He();return bn(e,ze)}function eu(e){return Js(ur("",null,null,null,[""],e=Qs(e),0,[0],e))}function ur(e,t,n,r,o,s,a,c,u){for(var p=0,f=0,g=a,b=0,m=0,x=0,h=1,C=1,E=1,w=0,T="",P=o,_=s,O=r,$=T;C;)switch(x=w,w=He()){case 40:if(x!=108&&Be($,g-1)==58){io($+=ue(lr(w),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:$+=lr(w);break;case 9:case 10:case 13:case 32:$+=Xl(x);break;case 92:$+=Ql(cr()-1,7);continue;case 47:switch(it()){case 42:case 47:sr(tu(Jl(He(),cr()),t,n),u);break;default:$+="/"}break;case 123*h:c[p++]=st($)*E;case 125*h:case 59:case 0:switch(w){case 0:case 125:C=0;case 59+f:E==-1&&($=ue($,/\f/g,"")),m>0&&st($)-g&&sr(m>32?ei($+";",r,n,g-1):ei(ue($," ","")+";",r,n,g-2),u);break;case 59:$+=";";default:if(sr(O=Zs($,t,n,p,f,o,c,T,P=[],_=[],g),s),w===123)if(f===0)ur($,t,O,O,P,s,g,c,_);else switch(b===99&&Be($,3)===110?100:b){case 100:case 108:case 109:case 115:ur(e,O,O,r&&sr(Zs(e,O,O,0,0,o,c,T,o,P=[],g),_),o,_,g,c,r?P:_);break;default:ur($,O,O,O,[""],_,0,c,_)}}p=f=m=0,h=E=1,T=$="",g=a;break;case 58:g=1+st($),m=x;default:if(h<1){if(w==123)--h;else if(w==125&&h++==0&&Kl()==125)continue}switch($+=or(w),w*h){case 38:E=f>0?1:($+="\f",-1);break;case 44:c[p++]=(st($)-1)*E,E=1;break;case 64:it()===45&&($+=lr(He())),b=it(),f=g=st(T=$+=Zl(cr())),w++;break;case 45:x===45&&st($)==2&&(h=0)}}return s}function Zs(e,t,n,r,o,s,a,c,u,p,f){for(var g=o-1,b=o===0?s:[""],m=ao(b),x=0,h=0,C=0;x<r;++x)for(var E=0,w=gn(e,g+1,g=Wl(h=a[x])),T=e;E<m;++E)(T=Ks(h>0?b[E]+" "+w:ue(w,/&\f/g,b[E])))&&(u[C++]=T);return ar(e,t,n,o===0?oo:c,u,p,f)}function tu(e,t,n){return ar(e,t,n,Hs,or(Gl()),gn(e,2,-2),0)}function ei(e,t,n,r){return ar(e,t,n,so,gn(e,0,r),gn(e,r+1,-1),r)}function Jt(e,t){for(var n="",r=ao(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function nu(e,t,n,r){switch(e.type){case zl:if(e.children.length)break;case Vl:case so:return e.return=e.return||e.value;case Hs:return"";case Gs:return e.return=e.value+"{"+Jt(e.children,r)+"}";case oo:e.value=e.props.join(",")}return st(n=Jt(e.children,r))?e.return=e.value+"{"+n+"}":""}function ru(e){var t=ao(e);return function(n,r,o,s){for(var a="",c=0;c<t;c++)a+=e[c](n,r,o,s)||"";return a}}function ou(e){return function(t){t.root||(t=t.return)&&e(t)}}var su=function(t,n,r){for(var o=0,s=0;o=s,s=it(),o===38&&s===12&&(n[r]=1),!xn(s);)He();return bn(t,ze)},iu=function(t,n){var r=-1,o=44;do switch(xn(o)){case 0:o===38&&it()===12&&(n[r]=1),t[r]+=su(ze-1,n,r);break;case 2:t[r]+=lr(o);break;case 4:if(o===44){t[++r]=it()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=or(o)}while(o=He());return t},au=function(t,n){return Js(iu(Qs(t),n))},ti=new WeakMap,cu=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!ti.get(r))&&!o){ti.set(t,!0);for(var s=[],a=au(n,s),c=r.props,u=0,p=0;u<a.length;u++)for(var f=0;f<c.length;f++,p++)t.props[p]=s[u]?a[u].replace(/&\f/g,c[f]):c[f]+" "+a[u]}}},lu=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function ni(e,t){switch(ql(e,t)){case 5103:return le+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return le+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return le+e+rr+e+Le+e+e;case 6828:case 4268:return le+e+Le+e+e;case 6165:return le+e+Le+"flex-"+e+e;case 5187:return le+e+ue(e,/(\w+).+(:[^]+)/,le+"box-$1$2"+Le+"flex-$1$2")+e;case 5443:return le+e+Le+"flex-item-"+ue(e,/flex-|-self/,"")+e;case 4675:return le+e+Le+"flex-line-pack"+ue(e,/align-content|flex-|-self/,"")+e;case 5548:return le+e+Le+ue(e,"shrink","negative")+e;case 5292:return le+e+Le+ue(e,"basis","preferred-size")+e;case 6060:return le+"box-"+ue(e,"-grow","")+le+e+Le+ue(e,"grow","positive")+e;case 4554:return le+ue(e,/([^-])(transform)/g,"$1"+le+"$2")+e;case 6187:return ue(ue(ue(e,/(zoom-|grab)/,le+"$1"),/(image-set)/,le+"$1"),e,"")+e;case 5495:case 3959:return ue(e,/(image-set\([^]*)/,le+"$1$`$1");case 4968:return ue(ue(e,/(.+:)(flex-)?(.*)/,le+"box-pack:$3"+Le+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+le+e+e;case 4095:case 3583:case 4068:case 2532:return ue(e,/(.+)-inline(.+)/,le+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(st(e)-1-t>6)switch(Be(e,t+1)){case 109:if(Be(e,t+4)!==45)break;case 102:return ue(e,/(.+:)(.+)-([^]+)/,"$1"+le+"$2-$3$1"+rr+(Be(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~io(e,"stretch")?ni(ue(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Be(e,t+1)!==115)break;case 6444:switch(Be(e,st(e)-3-(~io(e,"!important")&&10))){case 107:return ue(e,":",":"+le)+e;case 101:return ue(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+le+(Be(e,14)===45?"inline-":"")+"box$3$1"+le+"$2$3$1"+Le+"$2box$3")+e}break;case 5936:switch(Be(e,t+11)){case 114:return le+e+Le+ue(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return le+e+Le+ue(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return le+e+Le+ue(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return le+e+Le+e+e}return e}var uu=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case so:t.return=ni(t.value,t.length);break;case Gs:return Jt([yn(t,{value:ue(t.value,"@","@"+le)})],o);case oo:if(t.length)return Hl(t.props,function(s){switch(Yl(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Jt([yn(t,{props:[ue(s,/:(read-\w+)/,":"+rr+"$1")]})],o);case"::placeholder":return Jt([yn(t,{props:[ue(s,/:(plac\w+)/,":"+le+"input-$1")]}),yn(t,{props:[ue(s,/:(plac\w+)/,":"+rr+"$1")]}),yn(t,{props:[ue(s,/:(plac\w+)/,Le+"input-$1")]})],o)}return""})}},du=[uu],ri=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var C=h.getAttribute("data-emotion");C.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||du,s={},a,c=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var C=h.getAttribute("data-emotion").split(" "),E=1;E<C.length;E++)s[C[E]]=!0;c.push(h)});var u,p=[cu,lu];{var f,g=[nu,ou(function(h){f.insert(h)})],b=ru(p.concat(o,g)),m=function(C){return Jt(eu(C),b)};u=function(C,E,w,T){f=w,m(C?C+"{"+E.styles+"}":E.styles),T&&(x.inserted[E.name]=!0)}}var x={key:n,sheet:new Fl({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:u};return x.sheet.hydrate(c),x};function fu(e){return e==null||Object.keys(e).length===0}function lo(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(fu(o)?n:o):t;return i.jsx(Ue.Global,{styles:r})}process.env.NODE_ENV!=="production"&&(lo.propTypes={defaultTheme:y.object,styles:y.oneOfType([y.array,y.string,y.object,y.func])});/**
|
|
63
63
|
* @mui/styled-engine v9.3.0
|
|
64
64
|
*
|
|
65
65
|
* @license MIT
|
|
66
66
|
* This source code is licensed under the MIT license found in the
|
|
67
67
|
* LICENSE file in the root directory of this source tree.
|
|
68
68
|
*/function oi(e,t){const n=hc(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const o=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
69
|
-
`)):r.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),n(...r)}:n}function pu(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const si=[];function St(e){return si[0]=e,Nl(si)}const hu={borderRadius:4};function ii(e=8,t=Zr({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(s=>{const a=t(s);return typeof a=="number"?`${a}px`:a}).join(" "));return n.mui=!0,n}function mu(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function uo(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:s={},...a}=e,c=Ms(n),u=ii(o);let p=Ke({breakpoints:c,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:u,shape:{...hu,...s}},a);return p=Wc(p),p.applyStyles=mu,p=t.reduce((f,g)=>Ke(f,g),p),p.unstable_sxConfig={...tr,...a==null?void 0:a.unstable_sxConfig},p.unstable_sx=function(g){return Dt({sx:g,theme:this})},p.internal_cache={},p}function gu(e){return Object.keys(e).length===0}function fo(e=null){const t=F.useContext(Ue.ThemeContext);return!t||gu(t)?e:t}const yu=uo();function po(e=yu){return fo(e)}function ho(e){const t=St(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function ai({styles:e,themeId:t,defaultTheme:n={}}){const r=po(n),o=t&&r[t]||r;let s=typeof e=="function"?e(o):e;return o.modularCssLayers&&(Array.isArray(s)?s=s.map(a=>ho(typeof a=="function"?a(o):a)):s=ho(s)),i.jsx(lo,{styles:s})}process.env.NODE_ENV!=="production"&&(ai.propTypes={defaultTheme:y.object,styles:y.oneOfType([y.array,y.func,y.number,y.object,y.string,y.bool]),themeId:y.string});const ci=e=>e,li=(()=>{let e=ci;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ci}}})();function bu(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,s=oi("div",{shouldForwardProp:c=>c!=="theme"&&c!=="sx"&&c!=="as"})(Dt);return F.forwardRef(function(u,p){const f=po(n),{className:g,component:b="div",...m}=u;return i.jsx(s,{as:b,ref:p,className:Ae(g,o?o(r):r),theme:t&&f[t]||f,...m})})}const xu={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function wt(e,t,n="Mui"){const r=xu[t];return r?`${n}-${r}`:`${li.generate(e)}-${t}`}function Tt(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=wt(e,o,n)}),r}function ui(e,t=""){return e.displayName||e.name||t}function di(e,t,n){const r=ui(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function vu(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return ui(e,"Component");if(typeof e=="object")switch(e.$$typeof){case fn.ForwardRef:return di(e,e.render,"ForwardRef");case fn.Memo:return di(e,e.type,"memo");default:return}}}function fi(e){const{variants:t,...n}=e,r={variants:t,style:St(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=St(o.style))}),r}const Cu=uo();function mo(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Lt(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Su(e){return e?(t,n)=>n[e]:null}function wu(e,t,n){e.theme=Es(e.theme)?n:e.theme[t]||e.theme}function dr(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(o=>dr(e,o,n));if(Array.isArray(r==null?void 0:r.variants)){let o;if(r.isProcessed)o=n?Lt(r.style,n):r.style;else{const{variants:s,...a}=r;o=n?Lt(St(a),n):a}return pi(e,r.variants,[o],n)}return r!=null&&r.isProcessed?n?Lt(St(r.style),n):r.style:n?Lt(St(r),n):r}function pi(e,t,n=[],r=void 0){var s;let o;e:for(let a=0;a<t.length;a+=1){const c=t[a];if(typeof c.props=="function"){if(o??(o={...e,...e.ownerState,ownerState:e.ownerState}),!c.props(o))continue}else for(const u in c.props)if(e[u]!==c.props[u]&&((s=e.ownerState)==null?void 0:s[u])!==c.props[u])continue e;typeof c.style=="function"?(o??(o={...e,...e.ownerState,ownerState:e.ownerState}),n.push(r?Lt(St(c.style(o)),r):c.style(o))):n.push(r?Lt(St(c.style),r):c.style)}return n}function Tu(e={}){const{themeId:t,defaultTheme:n=Cu,rootShouldForwardProp:r=mo,slotShouldForwardProp:o=mo}=e;function s(c){wu(c,t,n)}return(c,u={})=>{pu(c,O=>O.filter($=>$!==Dt));const{name:p,slot:f,skipVariantsResolver:g,skipSx:b,overridesResolver:m=Su(hi(f)),...x}=u,h=p&&p.startsWith("Mui")||f?"components":"custom",C=g!==void 0?g:f&&f!=="Root"&&f!=="root"||!1,E=b||!1;let w=mo;f==="Root"||f==="root"?w=r:f?w=o:ju(c)&&(w=void 0);const T=oi(c,{shouldForwardProp:w,label:Eu(p,f),...x}),P=O=>{if(O.__emotion_real===O)return O;if(typeof O=="function")return function(j){return dr(j,O,j.theme.modularCssLayers?h:void 0)};if(dt(O)){const $=fi(O);return function(B){return $.variants?dr(B,$,B.theme.modularCssLayers?h:void 0):B.theme.modularCssLayers?Lt($.style,h):$.style}}return O},_=(...O)=>{const $=[],j=O.map(P),B=[];if($.push(s),p&&m&&B.push(function(A){var
|
|
69
|
+
`)):r.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),n(...r)}:n}function pu(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const si=[];function St(e){return si[0]=e,Nl(si)}const hu={borderRadius:4};function ii(e=8,t=Zr({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(s=>{const a=t(s);return typeof a=="number"?`${a}px`:a}).join(" "));return n.mui=!0,n}function mu(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function uo(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:s={},...a}=e,c=Ms(n),u=ii(o);let p=Ke({breakpoints:c,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:u,shape:{...hu,...s}},a);return p=Wc(p),p.applyStyles=mu,p=t.reduce((f,g)=>Ke(f,g),p),p.unstable_sxConfig={...tr,...a==null?void 0:a.unstable_sxConfig},p.unstable_sx=function(g){return Dt({sx:g,theme:this})},p.internal_cache={},p}function gu(e){return Object.keys(e).length===0}function fo(e=null){const t=F.useContext(Ue.ThemeContext);return!t||gu(t)?e:t}const yu=uo();function po(e=yu){return fo(e)}function ho(e){const t=St(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function ai({styles:e,themeId:t,defaultTheme:n={}}){const r=po(n),o=t&&r[t]||r;let s=typeof e=="function"?e(o):e;return o.modularCssLayers&&(Array.isArray(s)?s=s.map(a=>ho(typeof a=="function"?a(o):a)):s=ho(s)),i.jsx(lo,{styles:s})}process.env.NODE_ENV!=="production"&&(ai.propTypes={defaultTheme:y.object,styles:y.oneOfType([y.array,y.func,y.number,y.object,y.string,y.bool]),themeId:y.string});const ci=e=>e,li=(()=>{let e=ci;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ci}}})();function bu(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,s=oi("div",{shouldForwardProp:c=>c!=="theme"&&c!=="sx"&&c!=="as"})(Dt);return F.forwardRef(function(u,p){const f=po(n),{className:g,component:b="div",...m}=u;return i.jsx(s,{as:b,ref:p,className:Ae(g,o?o(r):r),theme:t&&f[t]||f,...m})})}const xu={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function wt(e,t,n="Mui"){const r=xu[t];return r?`${n}-${r}`:`${li.generate(e)}-${t}`}function Tt(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=wt(e,o,n)}),r}function ui(e,t=""){return e.displayName||e.name||t}function di(e,t,n){const r=ui(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function vu(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return ui(e,"Component");if(typeof e=="object")switch(e.$$typeof){case fn.ForwardRef:return di(e,e.render,"ForwardRef");case fn.Memo:return di(e,e.type,"memo");default:return}}}function fi(e){const{variants:t,...n}=e,r={variants:t,style:St(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=St(o.style))}),r}const Cu=uo();function mo(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Lt(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Su(e){return e?(t,n)=>n[e]:null}function wu(e,t,n){e.theme=Es(e.theme)?n:e.theme[t]||e.theme}function dr(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(o=>dr(e,o,n));if(Array.isArray(r==null?void 0:r.variants)){let o;if(r.isProcessed)o=n?Lt(r.style,n):r.style;else{const{variants:s,...a}=r;o=n?Lt(St(a),n):a}return pi(e,r.variants,[o],n)}return r!=null&&r.isProcessed?n?Lt(St(r.style),n):r.style:n?Lt(St(r),n):r}function pi(e,t,n=[],r=void 0){var s;let o;e:for(let a=0;a<t.length;a+=1){const c=t[a];if(typeof c.props=="function"){if(o??(o={...e,...e.ownerState,ownerState:e.ownerState}),!c.props(o))continue}else for(const u in c.props)if(e[u]!==c.props[u]&&((s=e.ownerState)==null?void 0:s[u])!==c.props[u])continue e;typeof c.style=="function"?(o??(o={...e,...e.ownerState,ownerState:e.ownerState}),n.push(r?Lt(St(c.style(o)),r):c.style(o))):n.push(r?Lt(St(c.style),r):c.style)}return n}function Tu(e={}){const{themeId:t,defaultTheme:n=Cu,rootShouldForwardProp:r=mo,slotShouldForwardProp:o=mo}=e;function s(c){wu(c,t,n)}return(c,u={})=>{pu(c,O=>O.filter($=>$!==Dt));const{name:p,slot:f,skipVariantsResolver:g,skipSx:b,overridesResolver:m=Su(hi(f)),...x}=u,h=p&&p.startsWith("Mui")||f?"components":"custom",C=g!==void 0?g:f&&f!=="Root"&&f!=="root"||!1,E=b||!1;let w=mo;f==="Root"||f==="root"?w=r:f?w=o:ju(c)&&(w=void 0);const T=oi(c,{shouldForwardProp:w,label:Eu(p,f),...x}),P=O=>{if(O.__emotion_real===O)return O;if(typeof O=="function")return function(j){return dr(j,O,j.theme.modularCssLayers?h:void 0)};if(dt(O)){const $=fi(O);return function(B){return $.variants?dr(B,$,B.theme.modularCssLayers?h:void 0):B.theme.modularCssLayers?Lt($.style,h):$.style}}return O},_=(...O)=>{const $=[],j=O.map(P),B=[];if($.push(s),p&&m&&B.push(function(A){var Z,re;const D=(re=(Z=A.theme.components)==null?void 0:Z[p])==null?void 0:re.styleOverrides;if(!D)return null;const H={};for(const ie in D)H[ie]=dr(A,D[ie],A.theme.modularCssLayers?"theme":void 0);return m(A,H)}),p&&!C&&B.push(function(A){var H,Z;const R=A.theme,D=(Z=(H=R==null?void 0:R.components)==null?void 0:H[p])==null?void 0:Z.variants;return D?pi(A,D,[],A.theme.modularCssLayers?"theme":void 0):null}),E||B.push(Dt),Array.isArray(j[0])){const d=j.shift(),A=new Array($.length).fill(""),R=new Array(B.length).fill("");let D;D=[...A,...d,...R],D.raw=[...A,...d.raw,...R],$.unshift(D)}const z=[...$,...j,...B],S=T(...z);return c.muiName&&(S.muiName=c.muiName),process.env.NODE_ENV!=="production"&&(S.displayName=ku(p,f,c)),S};return T.withConfig&&(_.withConfig=T.withConfig),_}}function ku(e,t,n){return e?`${e}${De(t||"")}`:`Styled(${vu(n)})`}function Eu(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${hi(t||"Root")}`),n}function ju(e){return typeof e=="string"&&e.charCodeAt(0)>96}function hi(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Zt=typeof window<"u"?F.useLayoutEffect:F.useEffect;function _u(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function go(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),_u(e,t,n)}function $u(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function kt(e){if(e.type)return e;if(e.charAt(0)==="#")return kt($u(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
70
70
|
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Nt(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
|
|
71
71
|
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Nt(10,o))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:o}}const Iu=e=>{const t=kt(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},vn=(e,t)=>{try{return Iu(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function fr(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,s)=>s<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function mi(e){e=kt(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,s=r*Math.min(o,1-o),a=(p,f=(p+n/30)%12)=>o-s*Math.max(Math.min(f-3,9-f,1),-1);let c="rgb";const u=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(c+="a",u.push(t[3])),fr({type:c,values:u})}function yo(e){e=kt(e);let t=e.type==="hsl"||e.type==="hsla"?kt(mi(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function gi(e,t){const n=yo(e),r=yo(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function ft(e,t){return e=kt(e),t=go(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,fr(e)}function Ft(e,t,n){try{return ft(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function pr(e,t){if(e=kt(e),t=go(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return fr(e)}function he(e,t,n){try{return pr(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function hr(e,t){if(e=kt(e),t=go(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return fr(e)}function me(e,t,n){try{return hr(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function Pu(e,t=.15){return yo(e)>.5?pr(e,t):hr(e,t)}function mr(e,t,n){try{return Pu(e,t)}catch{return e}}const Ou="exact-prop: ";function yi(e){return process.env.NODE_ENV==="production"?e:{...e,[Ou]:t=>{const n=Object.keys(t).filter(r=>!e.hasOwnProperty(r));return n.length>0?new Error(`The following props are not supported: ${n.map(r=>`\`${r}\``).join(", ")}. Please remove them.`):null}}}const bo=F.createContext(null);process.env.NODE_ENV!=="production"&&(bo.displayName="ThemeContext");function xo(){const e=F.useContext(bo);return process.env.NODE_ENV!=="production"&&F.useDebugValue(e),e}const Ru=typeof Symbol=="function"&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function Mu(e,t){if(typeof t=="function"){const n=t(e);return process.env.NODE_ENV!=="production"&&(n||console.error(["MUI: You should return an object from your theme function, i.e.","<ThemeProvider theme={() => ({})} />"].join(`
|
|
72
72
|
`))),n}return{...e,...t}}function gr(e){const{children:t,theme:n}=e,r=xo();process.env.NODE_ENV!=="production"&&r===null&&typeof n=="function"&&console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:","<ThemeProvider theme={outerTheme => outerTheme} />","","However, no outer theme is present.","Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
|
|
@@ -98,9 +98,9 @@ try {
|
|
|
98
98
|
if (colorScheme) {
|
|
99
99
|
${p}
|
|
100
100
|
}
|
|
101
|
-
} catch(e){}})();`}},"mui-color-scheme-init")}function Wu(){}const Uu=({key:e,storageWindow:t})=>(!t&&typeof window<"u"&&(t=window),{get(n){if(typeof window>"u")return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return Wu;const r=o=>{const s=o.newValue;o.key===e&&n(s)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function So(){}function _i(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function $i(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function qu(e){return $i(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function Yu(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:s=vo,colorSchemeStorageKey:a=Co,storageWindow:c=typeof window>"u"?void 0:window,storageManager:u=Uu,noSsr:p=!1}=e,f=o.join(","),g=o.length>1,b=F.useMemo(()=>u==null?void 0:u({key:s,storageWindow:c}),[u,s,c]),m=F.useMemo(()=>u==null?void 0:u({key:`${a}-light`,storageWindow:c}),[u,a,c]),x=F.useMemo(()=>u==null?void 0:u({key:`${a}-dark`,storageWindow:c}),[u,a,c]),[h,C]=F.useState(()=>{const j=(b==null?void 0:b.get(t))||t,B=(m==null?void 0:m.get(n))||n,z=(x==null?void 0:x.get(r))||r;return{mode:j,systemMode:_i(j),lightColorScheme:B,darkColorScheme:z}}),[E,w]=F.useState(p||!g);F.useEffect(()=>{w(!0)},[]);const T=qu(h),P=F.useCallback(j=>{C(B=>{if(j===B.mode)return B;const z=j??t;return b==null||b.set(z),{...B,mode:z,systemMode:_i(z)}})},[b,t]),_=F.useCallback(j=>{j?typeof j=="string"?j&&!f.includes(j)?console.error(`\`${j}\` does not exist in \`theme.colorSchemes\`.`):C(B=>{const z={...B};return $i(B,S=>{S==="light"&&(m==null||m.set(j),z.lightColorScheme=j),S==="dark"&&(x==null||x.set(j),z.darkColorScheme=j)}),z}):C(B=>{const z={...B},S=j.light===null?n:j.light,d=j.dark===null?r:j.dark;return S&&(f.includes(S)?(z.lightColorScheme=S,m==null||m.set(S)):console.error(`\`${S}\` does not exist in \`theme.colorSchemes\`.`)),d&&(f.includes(d)?(z.darkColorScheme=d,x==null||x.set(d)):console.error(`\`${d}\` does not exist in \`theme.colorSchemes\`.`)),z}):C(B=>(m==null||m.set(n),x==null||x.set(r),{...B,lightColorScheme:n,darkColorScheme:r}))},[f,m,x,n,r]),O=F.useCallback(j=>{h.mode==="system"&&C(B=>{const z=j!=null&&j.matches?"dark":"light";return B.systemMode===z?B:{...B,systemMode:z}})},[h.mode]),$=F.useRef(O);return $.current=O,F.useEffect(()=>{if(typeof window.matchMedia!="function"||!g)return;const j=(...z)=>$.current(...z),B=window.matchMedia("(prefers-color-scheme: dark)");return B.addListener(j),j(B),()=>{B.removeListener(j)}},[g]),F.useEffect(()=>{if(g){const j=(b==null?void 0:b.subscribe(S=>{(!S||["light","dark","system"].includes(S))&&P(S||t)}))||So,B=(m==null?void 0:m.subscribe(S=>{(!S||f.match(S))&&_({light:S})}))||So,z=(x==null?void 0:x.subscribe(S=>{(!S||f.match(S))&&_({dark:S})}))||So;return()=>{j(),B(),z()}}},[_,P,f,t,c,g,b,m,x]),{...h,mode:E?h.mode:void 0,systemMode:E?h.systemMode:void 0,colorScheme:E?T:void 0,setMode:P,setColorScheme:_}}const Hu="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Gu(e){const{themeId:t,theme:n={},modeStorageKey:r=vo,colorSchemeStorageKey:o=Co,disableTransitionOnChange:s=!1,defaultColorScheme:a,resolveTheme:c}=e,u={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},p=F.createContext(void 0);process.env.NODE_ENV!=="production"&&(p.displayName="ColorSchemeContext");const f=()=>F.useContext(p)||u,g={},b={};function m(E){var Ot,Rt,Mt,At;const{children:w,theme:T,modeStorageKey:P=r,colorSchemeStorageKey:_=o,disableTransitionOnChange:O=s,storageManager:$,storageWindow:j=typeof window>"u"?void 0:window,documentNode:B=typeof document>"u"?void 0:document,colorSchemeNode:z=typeof document>"u"?void 0:document.documentElement,disableNestedContext:S=!1,disableStyleSheetGeneration:d=!1,defaultMode:A="system",forceThemeRerender:R=!1,noSsr:D}=E,
|
|
102
|
-
`));let lt=Me||q.defaultColorScheme;q.vars&&!R&&(lt=q.defaultColorScheme);const et=F.useMemo(()=>{var We;const Se=((We=q.generateThemeVars)==null?void 0:We.call(q))||q.vars,be={...q,components:M,colorSchemes:
|
|
103
|
-
`)),
|
|
101
|
+
} catch(e){}})();`}},"mui-color-scheme-init")}function Wu(){}const Uu=({key:e,storageWindow:t})=>(!t&&typeof window<"u"&&(t=window),{get(n){if(typeof window>"u")return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return Wu;const r=o=>{const s=o.newValue;o.key===e&&n(s)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function So(){}function _i(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function $i(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function qu(e){return $i(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function Yu(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:s=vo,colorSchemeStorageKey:a=Co,storageWindow:c=typeof window>"u"?void 0:window,storageManager:u=Uu,noSsr:p=!1}=e,f=o.join(","),g=o.length>1,b=F.useMemo(()=>u==null?void 0:u({key:s,storageWindow:c}),[u,s,c]),m=F.useMemo(()=>u==null?void 0:u({key:`${a}-light`,storageWindow:c}),[u,a,c]),x=F.useMemo(()=>u==null?void 0:u({key:`${a}-dark`,storageWindow:c}),[u,a,c]),[h,C]=F.useState(()=>{const j=(b==null?void 0:b.get(t))||t,B=(m==null?void 0:m.get(n))||n,z=(x==null?void 0:x.get(r))||r;return{mode:j,systemMode:_i(j),lightColorScheme:B,darkColorScheme:z}}),[E,w]=F.useState(p||!g);F.useEffect(()=>{w(!0)},[]);const T=qu(h),P=F.useCallback(j=>{C(B=>{if(j===B.mode)return B;const z=j??t;return b==null||b.set(z),{...B,mode:z,systemMode:_i(z)}})},[b,t]),_=F.useCallback(j=>{j?typeof j=="string"?j&&!f.includes(j)?console.error(`\`${j}\` does not exist in \`theme.colorSchemes\`.`):C(B=>{const z={...B};return $i(B,S=>{S==="light"&&(m==null||m.set(j),z.lightColorScheme=j),S==="dark"&&(x==null||x.set(j),z.darkColorScheme=j)}),z}):C(B=>{const z={...B},S=j.light===null?n:j.light,d=j.dark===null?r:j.dark;return S&&(f.includes(S)?(z.lightColorScheme=S,m==null||m.set(S)):console.error(`\`${S}\` does not exist in \`theme.colorSchemes\`.`)),d&&(f.includes(d)?(z.darkColorScheme=d,x==null||x.set(d)):console.error(`\`${d}\` does not exist in \`theme.colorSchemes\`.`)),z}):C(B=>(m==null||m.set(n),x==null||x.set(r),{...B,lightColorScheme:n,darkColorScheme:r}))},[f,m,x,n,r]),O=F.useCallback(j=>{h.mode==="system"&&C(B=>{const z=j!=null&&j.matches?"dark":"light";return B.systemMode===z?B:{...B,systemMode:z}})},[h.mode]),$=F.useRef(O);return $.current=O,F.useEffect(()=>{if(typeof window.matchMedia!="function"||!g)return;const j=(...z)=>$.current(...z),B=window.matchMedia("(prefers-color-scheme: dark)");return B.addListener(j),j(B),()=>{B.removeListener(j)}},[g]),F.useEffect(()=>{if(g){const j=(b==null?void 0:b.subscribe(S=>{(!S||["light","dark","system"].includes(S))&&P(S||t)}))||So,B=(m==null?void 0:m.subscribe(S=>{(!S||f.match(S))&&_({light:S})}))||So,z=(x==null?void 0:x.subscribe(S=>{(!S||f.match(S))&&_({dark:S})}))||So;return()=>{j(),B(),z()}}},[_,P,f,t,c,g,b,m,x]),{...h,mode:E?h.mode:void 0,systemMode:E?h.systemMode:void 0,colorScheme:E?T:void 0,setMode:P,setColorScheme:_}}const Hu="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Gu(e){const{themeId:t,theme:n={},modeStorageKey:r=vo,colorSchemeStorageKey:o=Co,disableTransitionOnChange:s=!1,defaultColorScheme:a,resolveTheme:c}=e,u={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},p=F.createContext(void 0);process.env.NODE_ENV!=="production"&&(p.displayName="ColorSchemeContext");const f=()=>F.useContext(p)||u,g={},b={};function m(E){var Ot,Rt,Mt,At;const{children:w,theme:T,modeStorageKey:P=r,colorSchemeStorageKey:_=o,disableTransitionOnChange:O=s,storageManager:$,storageWindow:j=typeof window>"u"?void 0:window,documentNode:B=typeof document>"u"?void 0:document,colorSchemeNode:z=typeof document>"u"?void 0:document.documentElement,disableNestedContext:S=!1,disableStyleSheetGeneration:d=!1,defaultMode:A="system",forceThemeRerender:R=!1,noSsr:D}=E,H=F.useRef(!1),Z=xo(),re=F.useContext(p),ie=!!re&&!S,V=F.useMemo(()=>T||(typeof n=="function"?n():n),[T]),k=V[t],q=k||V,{colorSchemes:G=g,components:M=b,cssVarPrefix:Q}=q,N=Object.keys(G).filter(Se=>!!G[Se]).join(","),I=F.useMemo(()=>N.split(","),[N]),W=typeof a=="string"?a:a.light,J=typeof a=="string"?a:a.dark,K=G[W]&&G[J]?A:((Rt=(Ot=G[q.defaultColorScheme])==null?void 0:Ot.palette)==null?void 0:Rt.mode)||((Mt=q.palette)==null?void 0:Mt.mode),{mode:oe,setMode:X,systemMode:Pe,lightColorScheme:Re,darkColorScheme:ot,colorScheme:$t,setColorScheme:yt}=Yu({supportedColorSchemes:I,defaultLightColorScheme:W,defaultDarkColorScheme:J,modeStorageKey:P,colorSchemeStorageKey:_,defaultMode:K,storageManager:$,storageWindow:j,noSsr:D});let bt=oe,Me=$t;ie&&(bt=re.mode,Me=re.colorScheme),process.env.NODE_ENV!=="production"&&R&&!q.vars&&console.warn(["MUI: The `forceThemeRerender` prop should only be used with CSS theme variables.","Note that it will slow down the app when changing between modes, so only do this when you cannot find a better solution."].join(`
|
|
102
|
+
`));let lt=Me||q.defaultColorScheme;q.vars&&!R&&(lt=q.defaultColorScheme);const et=F.useMemo(()=>{var We;const Se=((We=q.generateThemeVars)==null?void 0:We.call(q))||q.vars,be={...q,components:M,colorSchemes:G,cssVarPrefix:Q,vars:Se};if(typeof be.generateSpacing=="function"&&(be.spacing=be.generateSpacing()),lt){const Fe=G[lt];Fe&&typeof Fe=="object"&&Object.keys(Fe).forEach(ce=>{Fe[ce]&&typeof Fe[ce]=="object"?be[ce]={...be[ce],...Fe[ce]}:be[ce]=Fe[ce]})}return c?c(be):be},[q,lt,M,G,Q]),tt=q.colorSchemeSelector;Zt(()=>{if(Me&&z&&tt&&tt!=="media"){const Se=tt;let be=tt;if(Se==="class"&&(be=".%s"),Se==="data"&&(be="[data-%s]"),Se!=null&&Se.startsWith("data-")&&!Se.includes("%s")&&(be=`[${Se}="%s"]`),be.startsWith("."))z.classList.remove(...I.map(We=>be.substring(1).replace("%s",We))),z.classList.add(be.substring(1).replace("%s",Me));else{const We=be.replace("%s",Me).match(/\[([^\]]+)\]/);if(We){const[Fe,ce]=We[1].split("=");ce||I.forEach(On=>{z.removeAttribute(Fe.replace(Me,On))}),z.setAttribute(Fe,ce?ce.replace(/"|'/g,""):"")}else z.setAttribute(be,Me)}}},[Me,tt,z,I]),F.useEffect(()=>{let Se;if(O&&H.current&&B){const be=B.createElement("style");be.appendChild(B.createTextNode(Hu)),B.head.appendChild(be),window.getComputedStyle(B.body),Se=setTimeout(()=>{B.head.removeChild(be)},1)}return()=>{clearTimeout(Se)}},[Me,O,B]),F.useEffect(()=>(H.current=!0,()=>{H.current=!1}),[]);const Ut=F.useMemo(()=>({allColorSchemes:I,colorScheme:Me,darkColorScheme:ot,lightColorScheme:Re,mode:bt,setColorScheme:yt,setMode:process.env.NODE_ENV==="production"?X:Se=>{et.colorSchemeSelector==="media"&&console.error(["MUI: The `setMode` function has no effect if `colorSchemeSelector` is `media` (`media` is the default value).","To toggle the mode manually, please configure `colorSchemeSelector` to use a class or data attribute.","To learn more, visit https://mui.com/material-ui/customization/css-theme-variables/configuration/#toggling-dark-mode-manually"].join(`
|
|
103
|
+
`)),X(Se)},systemMode:Pe}),[I,Me,ot,Re,bt,yt,X,Pe,et.colorSchemeSelector]);let It=!0;(d||q.cssVariables===!1||ie&&(Z==null?void 0:Z.cssVarPrefix)===Q)&&(It=!1);const Pt=i.jsxs(F.Fragment,{children:[i.jsx(Cn,{themeId:k?t:void 0,theme:et,children:w}),It&&i.jsx(lo,{styles:((At=et.generateStyleSheets)==null?void 0:At.call(et))||[]})]});return ie?Pt:i.jsx(p.Provider,{value:Ut,children:Pt})}process.env.NODE_ENV!=="production"&&(m.propTypes={children:y.node,colorSchemeNode:y.any,colorSchemeStorageKey:y.string,defaultMode:y.string,disableNestedContext:y.bool,disableStyleSheetGeneration:y.bool,disableTransitionOnChange:y.bool,documentNode:y.any,forceThemeRerender:y.bool,modeStorageKey:y.string,noSsr:y.bool,storageManager:y.func,storageWindow:y.any,theme:y.object});const x=typeof a=="string"?a:a.light,h=typeof a=="string"?a:a.dark;return{CssVarsProvider:m,useColorScheme:f,getInitColorSchemeScript:E=>zu({colorSchemeStorageKey:o,defaultLightColorScheme:x,defaultDarkColorScheme:h,modeStorageKey:r,...E})}}function Ku(e=""){function t(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${t(...o)})`}const Xu=new Set(["__proto__","constructor","prototype"]),Ii=(e,t,n,r=[])=>{let o=e;for(let s=0;s<t.length;s+=1){const a=t[s];if(Xu.has(a))break;s===t.length-1?Array.isArray(o)?o[Number(a)]=n:o&&typeof o=="object"&&(o[a]=n):o&&typeof o=="object"&&(o[a]||(o[a]=r.includes(a)?[]:{}),o=o[a])}},Qu=(e,t,n)=>{function r(o,s=[],a=[]){Object.entries(o).forEach(([c,u])=>{(!n||n&&!n([...s,c]))&&u!=null&&(typeof u=="object"&&Object.keys(u).length>0?r(u,[...s,c],Array.isArray(u)?[...a,c]:a):t([...s,c],u,a))})}r(e)},Ju=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function wo(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},s={},a={};return Qu(e,(c,u,p)=>{if((typeof u=="string"||typeof u=="number")&&(!r||!r(c,u))){const f=`--${n?`${n}-`:""}${c.join("-")}`,g=Ju(c,u);Object.assign(o,{[f]:g}),Ii(s,c,`var(${f})`,p),Ii(a,c,`var(${f}, ${g})`,p)}},c=>c[0]==="vars"),{css:o,vars:s,varsWithDefaults:a}}function Zu(e,t={}){const{getSelector:n=E,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:s}=t,{colorSchemes:a={},components:c,defaultColorScheme:u="light",...p}=e,{vars:f,css:g,varsWithDefaults:b}=wo(p,t);let m=b;const x={},{[u]:h,...C}=a;if(Object.entries(C||{}).forEach(([P,_])=>{const{vars:O,css:$,varsWithDefaults:j}=wo(_,t);m=Ke(m,j),x[P]={css:$,vars:O}}),h){const{css:P,vars:_,varsWithDefaults:O}=wo(h,t);m=Ke(m,O),x[u]={css:P,vars:_}}function E(P,_){var $,j;let O=o;if(o==="class"&&(O=".%s"),o==="data"&&(O="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(O=`[${o}="%s"]`),P){if(O==="media")return e.defaultColorScheme===P?":root":{[`@media (prefers-color-scheme: ${((j=($=a[P])==null?void 0:$.palette)==null?void 0:j.mode)||P})`]:{":root":_}};if(O)return e.defaultColorScheme===P?`:root, ${O.replace("%s",String(P))}`:O.replace("%s",String(P))}return":root"}return{vars:m,generateThemeVars:()=>{let P={...f};return Object.entries(x).forEach(([,{vars:_}])=>{P=Ke(P,_)}),P},generateStyleSheets:()=>{var B,z;const P=[],_=e.defaultColorScheme||"light";function O(S,d){Object.keys(d).length&&P.push(typeof S=="string"?{[S]:{...d}}:S)}O(n(void 0,{...g}),g);const{[_]:$,...j}=x;if($){const{css:S}=$,d=(z=(B=a[_])==null?void 0:B.palette)==null?void 0:z.mode,A=!r&&d?{colorScheme:d,...S}:{...S};O(n(_,{...A}),A)}return Object.entries(j).forEach(([S,{css:d}])=>{var D,H;const A=(H=(D=a[S])==null?void 0:D.palette)==null?void 0:H.mode,R=!r&&A?{colorScheme:A,...d}:{...d};O(n(S,{...R}),R)}),s&&P.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),P}}}function ed(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Sn={black:"#000",white:"#fff"},td={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},en={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},tn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},wn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},nn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},rn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},on={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Pi(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Sn.white,default:Sn.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Oi=Pi();function Ri(){return{text:{primary:Sn.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Sn.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const To=Ri();function Mi(e,t,n,r){const o=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=hr(e.main,o):t==="dark"&&(e.dark=pr(e.main,s)))}function Ai(e,t,n,r,o){const s=o.light||o,a=o.dark||o*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(s*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(a*100).toFixed(0)}%)`))}function nd(e="light"){return e==="dark"?{main:nn[200],light:nn[50],dark:nn[400]}:{main:nn[700],light:nn[400],dark:nn[800]}}function rd(e="light"){return e==="dark"?{main:en[200],light:en[50],dark:en[400]}:{main:en[500],light:en[300],dark:en[700]}}function od(e="light"){return e==="dark"?{main:tn[500],light:tn[300],dark:tn[700]}:{main:tn[700],light:tn[400],dark:tn[800]}}function sd(e="light"){return e==="dark"?{main:rn[400],light:rn[300],dark:rn[700]}:{main:rn[700],light:rn[500],dark:rn[900]}}function id(e="light"){return e==="dark"?{main:on[400],light:on[300],dark:on[700]}:{main:on[800],light:on[500],dark:on[900]}}function ad(e="light"){return e==="dark"?{main:wn[400],light:wn[300],dark:wn[700]}:{main:"#ed6c02",light:wn[500],dark:wn[900]}}function cd(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function ko(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:o,...s}=e,a=e.primary||nd(t),c=e.secondary||rd(t),u=e.error||od(t),p=e.info||sd(t),f=e.success||id(t),g=e.warning||ad(t);function b(C){if(o)return cd(C);const E=gi(C,To.text.primary)>=n?To.text.primary:Oi.text.primary;if(process.env.NODE_ENV!=="production"){const w=gi(C,E);w<3&&console.error([`MUI: The contrast ratio of ${w}:1 for ${E} on ${C}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
104
104
|
`))}return E}const m=({color:C,name:E,mainShade:w=500,lightShade:T=300,darkShade:P=700})=>{if(C={...C},!C.main&&C[w]&&(C.main=C[w]),!C.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${E?` (${E})`:""} provided to augmentColor(color) is invalid.
|
|
105
105
|
The color object needs to have a \`main\` property or a \`${w}\` property.`:Nt(11,E?` (${E})`:"",w));if(typeof C.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${E?` (${E})`:""} provided to augmentColor(color) is invalid.
|
|
106
106
|
\`color.main\` should be a string, but \`${JSON.stringify(C.main)}\` was provided instead.
|
|
@@ -126,7 +126,7 @@ theme.transitions = createTransitions(theme.transitions || {});
|
|
|
126
126
|
|
|
127
127
|
export default theme;`}function Vi(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const Ed=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;r<t.length;r+=1)n+=+t[r];return n};function jd(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:ft(t,Ed(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Vi(n)})`:hr(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Vi(n)})`:pr(t,n)}})}function Eo(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:s={},motion:a={},transitions:c={},typography:u={},shape:p,colorSpace:f,...g}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Nt(22));const b=ko({...s,colorSpace:f}),m=uo(e);let x=Ke(m,{mixins:ud(m.breakpoints,r),palette:b,shadows:md.slice(),typography:Di(b,u),motion:wd(a),transitions:Cd(c),zIndex:{...Td}});if(x=Ke(x,g),x=t.reduce((h,C)=>Ke(h,C),x),delete x.transitions.reducedMotion,process.env.NODE_ENV!=="production"){const h=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],C=(E,w)=>{let T;for(T in E){const P=E[T];if(h.includes(T)&&Object.keys(P).length>0){if(process.env.NODE_ENV!=="production"){const _=wt("",T);console.error([`MUI: The \`${w}\` component increases the CSS specificity of the \`${T}\` internal state.`,"You can not override it like this: ",JSON.stringify(E,null,2),"",`Instead, you need to use the '&.${_}' syntax:`,JSON.stringify({root:{[`&.${_}`]:P}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
128
128
|
`))}E[T]={}}}};Object.keys(x.components).forEach(E=>{const w=x.components[E].styleOverrides;w&&E.startsWith("Mui")&&C(w,E)})}return x.unstable_sxConfig={...tr,...g==null?void 0:g.unstable_sxConfig},x.unstable_sx=function(C){return Dt({sx:C,theme:this})},x.toRuntimeSource=Fi,jd(x),x}function _d(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const $d=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=_d(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function zi(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Wi(e){return e==="dark"?$d:[]}function Id(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:o,...s}=e,a=ko({...t,colorSpace:o});return{palette:a,opacity:{...zi(a.mode),...n},overlays:r||Wi(a.mode),...s}}function Pd(e){var t;return e[0]==="motion"||!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Od=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Rd=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let s=o;if(o==="class"&&(s=".%s"),o==="data"&&(s="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(s=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return Od(e.cssVarPrefix).forEach(c=>{a[c]=n[c],delete n[c]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:s?{[s.replace("%s",t)]:a,[`${r}, ${s.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(s)return s.replace("%s",String(t))}return r};function Md(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function L(e,t,n){!e[t]&&n&&(e[t]=n)}function Tn(e){return typeof e!="string"||!e.startsWith("hsl")?e:mi(e)}function pt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=vn(Tn(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
129
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Ad(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const at=e=>{try{return e()}catch{}},Bd=(e="mui")=>Ku(e);function jo(e,t,n,r,o){if(!n)return;n=n===!0?{}:n;const s=o==="dark"?"dark":"light";if(!r){t[o]=Id({...n,palette:{mode:s,...n==null?void 0:n.palette},colorSpace:e});return}const{palette:a,...c}=Eo({...r,palette:{mode:s,...n==null?void 0:n.palette},colorSpace:e});return t[o]={...n,palette:a,opacity:{...zi(s),...n==null?void 0:n.opacity},overlays:(n==null?void 0:n.overlays)||Wi(s)},c}function Nd(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",nativeColor:a=!1,shouldSkipGeneratingVar:c=Pd,colorSchemeSelector:u=n.light&&n.dark?"media":void 0,rootSelector:p=":root",...f}=e,g=Object.keys(n)[0],b=r||(n.light&&g!=="light"?"light":g),m=Bd(s),{[b]:x,light:h,dark:C,...E}=n,w={...E};let T=x;if((b==="dark"&&!("dark"in n)||b==="light"&&!("light"in n))&&(T=!0),!T)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${b}\` option is either missing or invalid.`:Nt(21,b));let P;a&&(P="oklch");const _=jo(P,w,T,f,b);h&&!w.light&&jo(P,w,h,void 0,"light"),C&&!w.dark&&jo(P,w,C,void 0,"dark");let O={defaultColorScheme:b,..._,cssVarPrefix:s,colorSchemeSelector:u,rootSelector:p,getCssVar:m,colorSchemes:w,font:{...ld(_.typography),..._.font},spacing:Ad(f.spacing)};Object.keys(O.colorSchemes).forEach(S=>{const d=O.colorSchemes[S].palette,A=D=>{const G=D.split("-"),J=G[1],oe=G[2];return m(D,d[J][oe])};d.mode==="light"&&(L(d.common,"background","#fff"),L(d.common,"onBackground","#000")),d.mode==="dark"&&(L(d.common,"background","#000"),L(d.common,"onBackground","#fff"));function R(D,G,J){if(P){let oe;return D===Ft&&(oe=`transparent ${((1-J)*100).toFixed(0)}%`),D===he&&(oe=`#000 ${(J*100).toFixed(0)}%`),D===me&&(oe=`#fff ${(J*100).toFixed(0)}%`),`color-mix(in ${P}, ${G}, ${oe})`}return D(G,J)}if(Md(d,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),d.mode==="light"){L(d.Alert,"errorColor",R(he,a?m("palette-error-light"):d.error.light,.6)),L(d.Alert,"infoColor",R(he,a?m("palette-info-light"):d.info.light,.6)),L(d.Alert,"successColor",R(he,a?m("palette-success-light"):d.success.light,.6)),L(d.Alert,"warningColor",R(he,a?m("palette-warning-light"):d.warning.light,.6)),L(d.Alert,"errorFilledBg",A("palette-error-main")),L(d.Alert,"infoFilledBg",A("palette-info-main")),L(d.Alert,"successFilledBg",A("palette-success-main")),L(d.Alert,"warningFilledBg",A("palette-warning-main")),L(d.Alert,"errorFilledColor",at(()=>d.getContrastText(d.error.main))),L(d.Alert,"infoFilledColor",at(()=>d.getContrastText(d.info.main))),L(d.Alert,"successFilledColor",at(()=>d.getContrastText(d.success.main))),L(d.Alert,"warningFilledColor",at(()=>d.getContrastText(d.warning.main))),L(d.Alert,"errorStandardBg",R(me,a?m("palette-error-light"):d.error.light,.9)),L(d.Alert,"infoStandardBg",R(me,a?m("palette-info-light"):d.info.light,.9)),L(d.Alert,"successStandardBg",R(me,a?m("palette-success-light"):d.success.light,.9)),L(d.Alert,"warningStandardBg",R(me,a?m("palette-warning-light"):d.warning.light,.9)),L(d.Alert,"errorIconColor",A("palette-error-main")),L(d.Alert,"infoIconColor",A("palette-info-main")),L(d.Alert,"successIconColor",A("palette-success-main")),L(d.Alert,"warningIconColor",A("palette-warning-main")),L(d.AppBar,"defaultBg",A("palette-grey-100")),L(d.Avatar,"defaultBg",A("palette-grey-400")),L(d.Button,"inheritContainedBg",A("palette-grey-300")),L(d.Button,"inheritContainedHoverBg",A("palette-grey-A100")),L(d.Chip,"defaultBorder",A("palette-grey-400")),L(d.Chip,"defaultAvatarColor",A("palette-grey-700")),L(d.Chip,"defaultIconColor",A("palette-grey-700")),L(d.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),L(d.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),L(d.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),L(d.LinearProgress,"primaryBg",R(me,a?m("palette-primary-main"):d.primary.main,.62)),L(d.LinearProgress,"secondaryBg",R(me,a?m("palette-secondary-main"):d.secondary.main,.62)),L(d.LinearProgress,"errorBg",R(me,a?m("palette-error-main"):d.error.main,.62)),L(d.LinearProgress,"infoBg",R(me,a?m("palette-info-main"):d.info.main,.62)),L(d.LinearProgress,"successBg",R(me,a?m("palette-success-main"):d.success.main,.62)),L(d.LinearProgress,"warningBg",R(me,a?m("palette-warning-light"):d.warning.main,.62)),L(d.Skeleton,"bg",P?R(Ft,a?m("palette-text-primary"):d.text.primary,.11):`rgba(${A("palette-text-primaryChannel")} / 0.11)`),L(d.Slider,"primaryTrack",R(me,a?m("palette-primary-main"):d.primary.main,.62)),L(d.Slider,"secondaryTrack",R(me,a?m("palette-secondary-main"):d.secondary.main,.62)),L(d.Slider,"errorTrack",R(me,a?m("palette-error-main"):d.error.main,.62)),L(d.Slider,"infoTrack",R(me,a?m("palette-info-main"):d.info.main,.62)),L(d.Slider,"successTrack",R(me,a?m("palette-success-main"):d.success.main,.62)),L(d.Slider,"warningTrack",R(me,a?m("palette-warning-main"):d.warning.main,.62));const D=P?R(he,a?m("palette-background-default"):d.background.default,.6825):mr(d.background.default,.8);L(d.SnackbarContent,"bg",D),L(d.SnackbarContent,"color",at(()=>P?To.text.primary:d.getContrastText(D))),L(d.SpeedDialAction,"fabHoverBg",mr(d.background.paper,.15)),L(d.StepConnector,"border",A("palette-grey-400")),L(d.StepContent,"border",A("palette-grey-400")),L(d.Switch,"defaultColor",A("palette-common-white")),L(d.Switch,"defaultDisabledColor",A("palette-grey-100")),L(d.Switch,"primaryDisabledColor",R(me,a?m("palette-primary-main"):d.primary.main,.62)),L(d.Switch,"secondaryDisabledColor",R(me,a?m("palette-secondary-main"):d.secondary.main,.62)),L(d.Switch,"errorDisabledColor",R(me,a?m("palette-error-main"):d.error.main,.62)),L(d.Switch,"infoDisabledColor",R(me,a?m("palette-info-main"):d.info.main,.62)),L(d.Switch,"successDisabledColor",R(me,a?m("palette-success-main"):d.success.main,.62)),L(d.Switch,"warningDisabledColor",R(me,a?m("palette-warning-main"):d.warning.main,.62)),L(d.TableCell,"border",R(me,Ft(a?m("palette-divider"):d.divider,1),.88)),L(d.Tooltip,"bg",R(Ft,a?m("palette-grey-700"):d.grey[700],.92))}if(d.mode==="dark"){L(d.Alert,"errorColor",R(me,a?m("palette-error-light"):d.error.light,.6)),L(d.Alert,"infoColor",R(me,a?m("palette-info-light"):d.info.light,.6)),L(d.Alert,"successColor",R(me,a?m("palette-success-light"):d.success.light,.6)),L(d.Alert,"warningColor",R(me,a?m("palette-warning-light"):d.warning.light,.6)),L(d.Alert,"errorFilledBg",A("palette-error-dark")),L(d.Alert,"infoFilledBg",A("palette-info-dark")),L(d.Alert,"successFilledBg",A("palette-success-dark")),L(d.Alert,"warningFilledBg",A("palette-warning-dark")),L(d.Alert,"errorFilledColor",at(()=>d.getContrastText(d.error.dark))),L(d.Alert,"infoFilledColor",at(()=>d.getContrastText(d.info.dark))),L(d.Alert,"successFilledColor",at(()=>d.getContrastText(d.success.dark))),L(d.Alert,"warningFilledColor",at(()=>d.getContrastText(d.warning.dark))),L(d.Alert,"errorStandardBg",R(he,a?m("palette-error-light"):d.error.light,.9)),L(d.Alert,"infoStandardBg",R(he,a?m("palette-info-light"):d.info.light,.9)),L(d.Alert,"successStandardBg",R(he,a?m("palette-success-light"):d.success.light,.9)),L(d.Alert,"warningStandardBg",R(he,a?m("palette-warning-light"):d.warning.light,.9)),L(d.Alert,"errorIconColor",A("palette-error-main")),L(d.Alert,"infoIconColor",A("palette-info-main")),L(d.Alert,"successIconColor",A("palette-success-main")),L(d.Alert,"warningIconColor",A("palette-warning-main")),L(d.AppBar,"defaultBg",A("palette-grey-900")),L(d.AppBar,"darkBg",A("palette-background-paper")),L(d.AppBar,"darkColor",A("palette-text-primary")),L(d.Avatar,"defaultBg",A("palette-grey-600")),L(d.Button,"inheritContainedBg",A("palette-grey-800")),L(d.Button,"inheritContainedHoverBg",A("palette-grey-700")),L(d.Chip,"defaultBorder",A("palette-grey-700")),L(d.Chip,"defaultAvatarColor",A("palette-grey-300")),L(d.Chip,"defaultIconColor",A("palette-grey-300")),L(d.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),L(d.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),L(d.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),L(d.LinearProgress,"primaryBg",R(he,a?m("palette-primary-main"):d.primary.main,.5)),L(d.LinearProgress,"secondaryBg",R(he,a?m("palette-secondary-main"):d.secondary.main,.5)),L(d.LinearProgress,"errorBg",R(he,a?m("palette-error-main"):d.error.main,.5)),L(d.LinearProgress,"infoBg",R(he,a?m("palette-info-main"):d.info.main,.5)),L(d.LinearProgress,"successBg",R(he,a?m("palette-success-main"):d.success.main,.5)),L(d.LinearProgress,"warningBg",R(he,a?m("palette-warning-main"):d.warning.main,.5)),L(d.Skeleton,"bg",P?R(Ft,a?m("palette-text-primary"):d.text.primary,.13):`rgba(${A("palette-text-primaryChannel")} / 0.13)`),L(d.Slider,"primaryTrack",R(he,a?m("palette-primary-main"):d.primary.main,.5)),L(d.Slider,"secondaryTrack",R(he,a?m("palette-secondary-main"):d.secondary.main,.5)),L(d.Slider,"errorTrack",R(he,a?m("palette-error-main"):d.error.main,.5)),L(d.Slider,"infoTrack",R(he,a?m("palette-info-main"):d.info.main,.5)),L(d.Slider,"successTrack",R(he,a?m("palette-success-main"):d.success.main,.5)),L(d.Slider,"warningTrack",R(he,a?m("palette-warning-light"):d.warning.main,.5));const D=P?R(me,a?m("palette-background-default"):d.background.default,.985):mr(d.background.default,.98);L(d.SnackbarContent,"bg",D),L(d.SnackbarContent,"color",at(()=>P?Oi.text.primary:d.getContrastText(D))),L(d.SpeedDialAction,"fabHoverBg",mr(d.background.paper,.15)),L(d.StepConnector,"border",A("palette-grey-600")),L(d.StepContent,"border",A("palette-grey-600")),L(d.Switch,"defaultColor",A("palette-grey-300")),L(d.Switch,"defaultDisabledColor",A("palette-grey-600")),L(d.Switch,"primaryDisabledColor",R(he,a?m("palette-primary-main"):d.primary.main,.55)),L(d.Switch,"secondaryDisabledColor",R(he,a?m("palette-secondary-main"):d.secondary.main,.55)),L(d.Switch,"errorDisabledColor",R(he,a?m("palette-error-main"):d.error.main,.55)),L(d.Switch,"infoDisabledColor",R(he,a?m("palette-info-main"):d.info.main,.55)),L(d.Switch,"successDisabledColor",R(he,a?m("palette-success-main"):d.success.main,.55)),L(d.Switch,"warningDisabledColor",R(he,a?m("palette-warning-light"):d.warning.main,.55)),L(d.TableCell,"border",R(he,Ft(a?m("palette-divider"):d.divider,1),.68)),L(d.Tooltip,"bg",R(Ft,a?m("palette-grey-700"):d.grey[700],.92))}a||(pt(d.background,"default"),pt(d.background,"paper"),pt(d.common,"background"),pt(d.common,"onBackground"),pt(d,"divider")),Object.keys(d).forEach(D=>{const G=d[D];D!=="tonalOffset"&&!a&&G&&typeof G=="object"&&(G.main&&L(d[D],"mainChannel",vn(Tn(G.main))),G.light&&L(d[D],"lightChannel",vn(Tn(G.light))),G.dark&&L(d[D],"darkChannel",vn(Tn(G.dark))),G.contrastText&&L(d[D],"contrastTextChannel",vn(Tn(G.contrastText))),D==="text"&&(pt(d[D],"primary"),pt(d[D],"secondary")),D==="action"&&(G.active&&pt(d[D],"active"),G.selected&&pt(d[D],"selected")))})}),O=t.reduce((S,d)=>Ke(S,d),O);const $={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:c,getSelector:Rd(O),enableContrastVars:a},{vars:j,generateThemeVars:B,generateStyleSheets:z}=Zu(O,$);return O.vars=j,Object.entries(O.colorSchemes[O.defaultColorScheme]).forEach(([S,d])=>{O[S]=d}),O.generateThemeVars=B,O.generateStyleSheets=z,O.generateSpacing=function(){return ii(f.spacing,Zr(this))},O.getColorSchemeSelector=ed(u),O.spacing=O.generateSpacing(),O.shouldSkipGeneratingVar=c,O.unstable_sxConfig={...tr,...f==null?void 0:f.unstable_sxConfig},O.unstable_sx=function(d){return Dt({sx:d,theme:this})},O.internal_cache={},O.toRuntimeSource=Fi,O}function Ui(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:ko({...n===!0?{}:n.palette,mode:t})})}function yr(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:s=n==null?void 0:n.mode,...a}=e,c=s||"light",u=o==null?void 0:o[c],p={...o,...n?{[c]:{...typeof u!="boolean"&&u,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Eo(e,...t);let f=n;"palette"in e||p[c]&&(p[c]!==!0?f=p[c].palette:c==="dark"&&(f={mode:"dark"}));const g=Eo({...e,palette:f},...t);return g.defaultColorScheme=c,g.colorSchemes=p,g.palette.mode==="light"&&(g.colorSchemes.light={...p.light!==!0&&p.light,palette:g.palette},Ui(g,"dark",p.dark)),g.palette.mode==="dark"&&(g.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:g.palette},Ui(g,"light",p.light)),g}return!n&&!("light"in p)&&c==="light"&&(p.light=!0),Nd({...a,colorSchemes:p,defaultColorScheme:c,...typeof r!="boolean"&&r},...t)}const qi=yr(),ht="$$material";function Dd(){const e=po(qi);return process.env.NODE_ENV!=="production"&&F.useDebugValue(e),e[ht]||e}function Ld(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ge=Tu({themeId:ht,defaultTheme:qi,rootShouldForwardProp:e=>Ld(e)&&e!=="classes"});process.env.NODE_ENV!=="production"&&(y.node,y.object.isRequired);function Vt(e){return Nu(e)}function _o(...e){const t=F.useRef(void 0),n=F.useCallback(r=>{const o=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,c=a(r);return typeof c=="function"?c:()=>{a(null)}}return s.current=r,()=>{s.current=null}});return()=>{o.forEach(s=>s==null?void 0:s())}},e);return F.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function Je(e){const t=F.useRef(e);return Zt(()=>{t.current=e}),F.useRef((...n)=>(0,t.current)(...n)).current}function Fd(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,a=r&&t!==!1,c=r&&t===!1;return F.useMemo(()=>{const p={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(p.tabIndex=o,!s&&n&&(p.tabIndex=t?o:-1)),(s&&(t||a)||!s&&n)&&(p["aria-disabled"]=n),s&&(!t||c)&&(p.disabled=n),p},[r,n,t,a,c,s,o])}const Vd={};function zd(e){const{nativeButton:t,nativeButtonProp:n,internalNativeButton:r=t,allowInferredHostMismatch:o=!1,disabled:s,type:a,hasFormAction:c=!1,tabIndex:u=0,focusableWhenDisabled:p,stopEventPropagation:f=!1,onBeforeKeyDown:g,onBeforeKeyUp:b}=e,m=F.useRef(null),x=p===!0,h=Fd({focusableWhenDisabled:x,disabled:s,isNativeButton:t,tabIndex:u});process.env.NODE_ENV!=="production"&&F.useEffect(()=>{const T=m.current;if(T==null)return;const P=T.tagName==="BUTTON";if(n!==void 0){n&&!P&&console.error("MUI: A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Render a real <button> or set `nativeButton` to `false`."),!n&&P&&console.error("MUI: A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while additionally applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Render a non-<button> such as <div>, or set `nativeButton` to `true`.");return}o||(r&&!P&&console.error("MUI: A component rendering a native <button> resolved to a non-<button> element, but `nativeButton={false}` was not specified and the resolved root is a non-<button>. When rendering a custom component, set `nativeButton={false}` explicitly or render a <button> element."),!r&&P&&console.error("MUI: A component that acts as a non-native button resolved to a native <button> element, but `nativeButton={true}` was not specified. When rendering a custom component, set `nativeButton={true}` explicitly or render a non-<button> element."))},[o,r,n]);const C=F.useCallback(()=>{const T=m.current;return T==null?t:T.tagName==="BUTTON"?!0:!!(T.tagName==="A"&&T.href)},[t]),E=F.useMemo(()=>{const T=x?{}:{tabIndex:s?-1:u};return t?(T.type=a===void 0&&!c?"button":a,x||(T.disabled=s)):(T.role="button",!x&&s&&(T["aria-disabled"]=s)),x?{...T,...h}:T},[s,x,h,c,t,u,a]);return{getButtonProps:F.useCallback((T=Vd)=>{const{onClick:P,onKeyDown:_,onKeyUp:O,...$}=T;return{...E,...$,onClick:S=>{if(f&&S.stopPropagation(),s){S.preventDefault();return}P==null||P(S)},onKeyDown:S=>{if(x&&h.onKeyDown(S),!s&&(g==null||g(S),_==null||_(S),!(S.target!==S.currentTarget||C()))){if(S.key===" "){S.preventDefault();return}S.key==="Enter"&&(S.preventDefault(),S.currentTarget.click())}},onKeyUp:S=>{s||(b==null||b(S),O==null||O(S),S.target===S.currentTarget&&!C()&&S.key===" "&&!S.defaultPrevented&&S.currentTarget.click())}}},[E,s,x,h,C,g,b,f]),rootRef:m}}const Yi={};function Hi(e,t){const n=F.useRef(Yi);return n.current===Yi&&(n.current=e(t)),n}class br{constructor(){An(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new br}static use(){const t=Hi(br.create).current,[n,r]=F.useState(!1);return t.shouldMount=n,t.setShouldMount=r,F.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=Ud(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function Wd(){return br.use()}function Ud(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}const qd=[];function Gi(e){F.useEffect(e,qd)}class $o{constructor(){An(this,"currentId",null);An(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});An(this,"disposeEffect",()=>this.clear)}static create(){return new $o}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Ki(){const e=Hi($o.create).current;return Gi(e.disposeEffect),e}function Xi(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:s,rippleSize:a,in:c,onExited:u,timeout:p}=e,[f,g]=F.useState(!1),b=Ki(),m=F.useRef(!1),x=F.useRef(u);x.current=u;const h=u!=null,C=Ae(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),E={width:a,height:a,top:-(a/2)+s,left:-(a/2)+o},w=Ae(n.child,f&&n.childLeaving,r&&n.childPulsate);return!c&&!f&&g(!0),F.useEffect(()=>{!c&&h?m.current||(m.current=!0,b.start(p,()=>{var T;m.current=!1,(T=x.current)==null||T.call(x)})):(m.current=!1,b.clear())},[b,h,c,p]),i.jsx("span",{className:C,style:E,children:i.jsx("span",{className:w})})}process.env.NODE_ENV!=="production"&&(Xi.propTypes={classes:y.object.isRequired,className:y.string,in:y.bool,onExited:y.func,pulsate:y.bool,rippleSize:y.number,rippleX:y.number,rippleY:y.number,timeout:y.number.isRequired});const Ve=Tt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Qi="(prefers-reduced-motion: reduce)",Yd=0,Hd="0ms",Gd=()=>{},Ji=()=>!1,Kd=()=>!0,Xd=()=>Gd;function Qd(e){const[t,n]=F.useState(()=>({enabled:e,matches:e?null:!1}));let r=t.matches;return t.enabled!==e&&(r=null,e||(r=!1)),Zt(()=>{const o=c=>{n(u=>u.enabled===e&&u.matches===c?u:{enabled:e,matches:c})};if(!e){t.enabled&&o(!1);return}if(typeof window>"u"||typeof window.matchMedia!="function"){o(!1);return}const s=window.matchMedia(Qi),a=()=>{o(s.matches)};return a(),s.addEventListener("change",a),()=>{s.removeEventListener("change",a)}},[e,t.enabled]),r}const Zi={...F}.useSyncExternalStore;function Jd(e){const t=e?Kd:Ji,[n,r]=F.useMemo(()=>{if(!e||typeof window>"u"||typeof window.matchMedia!="function")return[Ji,Xd];const o=window.matchMedia(Qi);return[()=>o.matches,s=>(o.addEventListener("change",s),()=>{o.removeEventListener("change",s)})]},[e]);return Zi(r,n,t)}const Zd=Zi!==void 0?Jd:Qd;function ef(e,t){const n=Zd(e==="system"),r=e==="always"||e==="system"&&n!==!1;return F.useMemo(()=>({shouldReduceMotion:r,getTransitionTiming(o){return r?{duration:Yd,delay:Hd}:o}}),[r])}const Io=550,tf=80,xr={},ea=[],nf=()=>{};function Po(e,t){const n=new Set(t),r=new Map;let o=[];for(const a of e)n.has(a)?o.length>0&&(r.set(a,o),o=[]):o.push(a);const s=[];for(const a of t){const c=r.get(a);c&&s.push(...c),s.push(a)}return s.push(...o),s}function rf({event:e,element:t,center:n}){const r=t?t.getBoundingClientRect():{width:0,height:0,left:0,top:0};let o,s;if(n||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)o=Math.round(r.width/2),s=Math.round(r.height/2);else{const{clientX:c,clientY:u}=e.touches&&e.touches.length>0?e.touches[0]:e;o=Math.round(c-r.left),s=Math.round(u-r.top)}let a;if(n)a=Math.sqrt((2*r.width**2+r.height**2)/3),a%2===0&&(a+=1);else{const c=Math.max(Math.abs((t?t.clientWidth:0)-o),o)*2+2,u=Math.max(Math.abs((t?t.clientHeight:0)-s),s)*2+2;a=Math.sqrt(c**2+u**2)}return{rippleX:o,rippleY:s,rippleSize:a}}const of=Ue.keyframes`
|
|
129
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Ad(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const at=e=>{try{return e()}catch{}},Bd=(e="mui")=>Ku(e);function jo(e,t,n,r,o){if(!n)return;n=n===!0?{}:n;const s=o==="dark"?"dark":"light";if(!r){t[o]=Id({...n,palette:{mode:s,...n==null?void 0:n.palette},colorSpace:e});return}const{palette:a,...c}=Eo({...r,palette:{mode:s,...n==null?void 0:n.palette},colorSpace:e});return t[o]={...n,palette:a,opacity:{...zi(s),...n==null?void 0:n.opacity},overlays:(n==null?void 0:n.overlays)||Wi(s)},c}function Nd(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",nativeColor:a=!1,shouldSkipGeneratingVar:c=Pd,colorSchemeSelector:u=n.light&&n.dark?"media":void 0,rootSelector:p=":root",...f}=e,g=Object.keys(n)[0],b=r||(n.light&&g!=="light"?"light":g),m=Bd(s),{[b]:x,light:h,dark:C,...E}=n,w={...E};let T=x;if((b==="dark"&&!("dark"in n)||b==="light"&&!("light"in n))&&(T=!0),!T)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${b}\` option is either missing or invalid.`:Nt(21,b));let P;a&&(P="oklch");const _=jo(P,w,T,f,b);h&&!w.light&&jo(P,w,h,void 0,"light"),C&&!w.dark&&jo(P,w,C,void 0,"dark");let O={defaultColorScheme:b,..._,cssVarPrefix:s,colorSchemeSelector:u,rootSelector:p,getCssVar:m,colorSchemes:w,font:{...ld(_.typography),..._.font},spacing:Ad(f.spacing)};Object.keys(O.colorSchemes).forEach(S=>{const d=O.colorSchemes[S].palette,A=D=>{const H=D.split("-"),Z=H[1],re=H[2];return m(D,d[Z][re])};d.mode==="light"&&(L(d.common,"background","#fff"),L(d.common,"onBackground","#000")),d.mode==="dark"&&(L(d.common,"background","#000"),L(d.common,"onBackground","#fff"));function R(D,H,Z){if(P){let re;return D===Ft&&(re=`transparent ${((1-Z)*100).toFixed(0)}%`),D===he&&(re=`#000 ${(Z*100).toFixed(0)}%`),D===me&&(re=`#fff ${(Z*100).toFixed(0)}%`),`color-mix(in ${P}, ${H}, ${re})`}return D(H,Z)}if(Md(d,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),d.mode==="light"){L(d.Alert,"errorColor",R(he,a?m("palette-error-light"):d.error.light,.6)),L(d.Alert,"infoColor",R(he,a?m("palette-info-light"):d.info.light,.6)),L(d.Alert,"successColor",R(he,a?m("palette-success-light"):d.success.light,.6)),L(d.Alert,"warningColor",R(he,a?m("palette-warning-light"):d.warning.light,.6)),L(d.Alert,"errorFilledBg",A("palette-error-main")),L(d.Alert,"infoFilledBg",A("palette-info-main")),L(d.Alert,"successFilledBg",A("palette-success-main")),L(d.Alert,"warningFilledBg",A("palette-warning-main")),L(d.Alert,"errorFilledColor",at(()=>d.getContrastText(d.error.main))),L(d.Alert,"infoFilledColor",at(()=>d.getContrastText(d.info.main))),L(d.Alert,"successFilledColor",at(()=>d.getContrastText(d.success.main))),L(d.Alert,"warningFilledColor",at(()=>d.getContrastText(d.warning.main))),L(d.Alert,"errorStandardBg",R(me,a?m("palette-error-light"):d.error.light,.9)),L(d.Alert,"infoStandardBg",R(me,a?m("palette-info-light"):d.info.light,.9)),L(d.Alert,"successStandardBg",R(me,a?m("palette-success-light"):d.success.light,.9)),L(d.Alert,"warningStandardBg",R(me,a?m("palette-warning-light"):d.warning.light,.9)),L(d.Alert,"errorIconColor",A("palette-error-main")),L(d.Alert,"infoIconColor",A("palette-info-main")),L(d.Alert,"successIconColor",A("palette-success-main")),L(d.Alert,"warningIconColor",A("palette-warning-main")),L(d.AppBar,"defaultBg",A("palette-grey-100")),L(d.Avatar,"defaultBg",A("palette-grey-400")),L(d.Button,"inheritContainedBg",A("palette-grey-300")),L(d.Button,"inheritContainedHoverBg",A("palette-grey-A100")),L(d.Chip,"defaultBorder",A("palette-grey-400")),L(d.Chip,"defaultAvatarColor",A("palette-grey-700")),L(d.Chip,"defaultIconColor",A("palette-grey-700")),L(d.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),L(d.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),L(d.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),L(d.LinearProgress,"primaryBg",R(me,a?m("palette-primary-main"):d.primary.main,.62)),L(d.LinearProgress,"secondaryBg",R(me,a?m("palette-secondary-main"):d.secondary.main,.62)),L(d.LinearProgress,"errorBg",R(me,a?m("palette-error-main"):d.error.main,.62)),L(d.LinearProgress,"infoBg",R(me,a?m("palette-info-main"):d.info.main,.62)),L(d.LinearProgress,"successBg",R(me,a?m("palette-success-main"):d.success.main,.62)),L(d.LinearProgress,"warningBg",R(me,a?m("palette-warning-light"):d.warning.main,.62)),L(d.Skeleton,"bg",P?R(Ft,a?m("palette-text-primary"):d.text.primary,.11):`rgba(${A("palette-text-primaryChannel")} / 0.11)`),L(d.Slider,"primaryTrack",R(me,a?m("palette-primary-main"):d.primary.main,.62)),L(d.Slider,"secondaryTrack",R(me,a?m("palette-secondary-main"):d.secondary.main,.62)),L(d.Slider,"errorTrack",R(me,a?m("palette-error-main"):d.error.main,.62)),L(d.Slider,"infoTrack",R(me,a?m("palette-info-main"):d.info.main,.62)),L(d.Slider,"successTrack",R(me,a?m("palette-success-main"):d.success.main,.62)),L(d.Slider,"warningTrack",R(me,a?m("palette-warning-main"):d.warning.main,.62));const D=P?R(he,a?m("palette-background-default"):d.background.default,.6825):mr(d.background.default,.8);L(d.SnackbarContent,"bg",D),L(d.SnackbarContent,"color",at(()=>P?To.text.primary:d.getContrastText(D))),L(d.SpeedDialAction,"fabHoverBg",mr(d.background.paper,.15)),L(d.StepConnector,"border",A("palette-grey-400")),L(d.StepContent,"border",A("palette-grey-400")),L(d.Switch,"defaultColor",A("palette-common-white")),L(d.Switch,"defaultDisabledColor",A("palette-grey-100")),L(d.Switch,"primaryDisabledColor",R(me,a?m("palette-primary-main"):d.primary.main,.62)),L(d.Switch,"secondaryDisabledColor",R(me,a?m("palette-secondary-main"):d.secondary.main,.62)),L(d.Switch,"errorDisabledColor",R(me,a?m("palette-error-main"):d.error.main,.62)),L(d.Switch,"infoDisabledColor",R(me,a?m("palette-info-main"):d.info.main,.62)),L(d.Switch,"successDisabledColor",R(me,a?m("palette-success-main"):d.success.main,.62)),L(d.Switch,"warningDisabledColor",R(me,a?m("palette-warning-main"):d.warning.main,.62)),L(d.TableCell,"border",R(me,Ft(a?m("palette-divider"):d.divider,1),.88)),L(d.Tooltip,"bg",R(Ft,a?m("palette-grey-700"):d.grey[700],.92))}if(d.mode==="dark"){L(d.Alert,"errorColor",R(me,a?m("palette-error-light"):d.error.light,.6)),L(d.Alert,"infoColor",R(me,a?m("palette-info-light"):d.info.light,.6)),L(d.Alert,"successColor",R(me,a?m("palette-success-light"):d.success.light,.6)),L(d.Alert,"warningColor",R(me,a?m("palette-warning-light"):d.warning.light,.6)),L(d.Alert,"errorFilledBg",A("palette-error-dark")),L(d.Alert,"infoFilledBg",A("palette-info-dark")),L(d.Alert,"successFilledBg",A("palette-success-dark")),L(d.Alert,"warningFilledBg",A("palette-warning-dark")),L(d.Alert,"errorFilledColor",at(()=>d.getContrastText(d.error.dark))),L(d.Alert,"infoFilledColor",at(()=>d.getContrastText(d.info.dark))),L(d.Alert,"successFilledColor",at(()=>d.getContrastText(d.success.dark))),L(d.Alert,"warningFilledColor",at(()=>d.getContrastText(d.warning.dark))),L(d.Alert,"errorStandardBg",R(he,a?m("palette-error-light"):d.error.light,.9)),L(d.Alert,"infoStandardBg",R(he,a?m("palette-info-light"):d.info.light,.9)),L(d.Alert,"successStandardBg",R(he,a?m("palette-success-light"):d.success.light,.9)),L(d.Alert,"warningStandardBg",R(he,a?m("palette-warning-light"):d.warning.light,.9)),L(d.Alert,"errorIconColor",A("palette-error-main")),L(d.Alert,"infoIconColor",A("palette-info-main")),L(d.Alert,"successIconColor",A("palette-success-main")),L(d.Alert,"warningIconColor",A("palette-warning-main")),L(d.AppBar,"defaultBg",A("palette-grey-900")),L(d.AppBar,"darkBg",A("palette-background-paper")),L(d.AppBar,"darkColor",A("palette-text-primary")),L(d.Avatar,"defaultBg",A("palette-grey-600")),L(d.Button,"inheritContainedBg",A("palette-grey-800")),L(d.Button,"inheritContainedHoverBg",A("palette-grey-700")),L(d.Chip,"defaultBorder",A("palette-grey-700")),L(d.Chip,"defaultAvatarColor",A("palette-grey-300")),L(d.Chip,"defaultIconColor",A("palette-grey-300")),L(d.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),L(d.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),L(d.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),L(d.LinearProgress,"primaryBg",R(he,a?m("palette-primary-main"):d.primary.main,.5)),L(d.LinearProgress,"secondaryBg",R(he,a?m("palette-secondary-main"):d.secondary.main,.5)),L(d.LinearProgress,"errorBg",R(he,a?m("palette-error-main"):d.error.main,.5)),L(d.LinearProgress,"infoBg",R(he,a?m("palette-info-main"):d.info.main,.5)),L(d.LinearProgress,"successBg",R(he,a?m("palette-success-main"):d.success.main,.5)),L(d.LinearProgress,"warningBg",R(he,a?m("palette-warning-main"):d.warning.main,.5)),L(d.Skeleton,"bg",P?R(Ft,a?m("palette-text-primary"):d.text.primary,.13):`rgba(${A("palette-text-primaryChannel")} / 0.13)`),L(d.Slider,"primaryTrack",R(he,a?m("palette-primary-main"):d.primary.main,.5)),L(d.Slider,"secondaryTrack",R(he,a?m("palette-secondary-main"):d.secondary.main,.5)),L(d.Slider,"errorTrack",R(he,a?m("palette-error-main"):d.error.main,.5)),L(d.Slider,"infoTrack",R(he,a?m("palette-info-main"):d.info.main,.5)),L(d.Slider,"successTrack",R(he,a?m("palette-success-main"):d.success.main,.5)),L(d.Slider,"warningTrack",R(he,a?m("palette-warning-light"):d.warning.main,.5));const D=P?R(me,a?m("palette-background-default"):d.background.default,.985):mr(d.background.default,.98);L(d.SnackbarContent,"bg",D),L(d.SnackbarContent,"color",at(()=>P?Oi.text.primary:d.getContrastText(D))),L(d.SpeedDialAction,"fabHoverBg",mr(d.background.paper,.15)),L(d.StepConnector,"border",A("palette-grey-600")),L(d.StepContent,"border",A("palette-grey-600")),L(d.Switch,"defaultColor",A("palette-grey-300")),L(d.Switch,"defaultDisabledColor",A("palette-grey-600")),L(d.Switch,"primaryDisabledColor",R(he,a?m("palette-primary-main"):d.primary.main,.55)),L(d.Switch,"secondaryDisabledColor",R(he,a?m("palette-secondary-main"):d.secondary.main,.55)),L(d.Switch,"errorDisabledColor",R(he,a?m("palette-error-main"):d.error.main,.55)),L(d.Switch,"infoDisabledColor",R(he,a?m("palette-info-main"):d.info.main,.55)),L(d.Switch,"successDisabledColor",R(he,a?m("palette-success-main"):d.success.main,.55)),L(d.Switch,"warningDisabledColor",R(he,a?m("palette-warning-light"):d.warning.main,.55)),L(d.TableCell,"border",R(he,Ft(a?m("palette-divider"):d.divider,1),.68)),L(d.Tooltip,"bg",R(Ft,a?m("palette-grey-700"):d.grey[700],.92))}a||(pt(d.background,"default"),pt(d.background,"paper"),pt(d.common,"background"),pt(d.common,"onBackground"),pt(d,"divider")),Object.keys(d).forEach(D=>{const H=d[D];D!=="tonalOffset"&&!a&&H&&typeof H=="object"&&(H.main&&L(d[D],"mainChannel",vn(Tn(H.main))),H.light&&L(d[D],"lightChannel",vn(Tn(H.light))),H.dark&&L(d[D],"darkChannel",vn(Tn(H.dark))),H.contrastText&&L(d[D],"contrastTextChannel",vn(Tn(H.contrastText))),D==="text"&&(pt(d[D],"primary"),pt(d[D],"secondary")),D==="action"&&(H.active&&pt(d[D],"active"),H.selected&&pt(d[D],"selected")))})}),O=t.reduce((S,d)=>Ke(S,d),O);const $={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:c,getSelector:Rd(O),enableContrastVars:a},{vars:j,generateThemeVars:B,generateStyleSheets:z}=Zu(O,$);return O.vars=j,Object.entries(O.colorSchemes[O.defaultColorScheme]).forEach(([S,d])=>{O[S]=d}),O.generateThemeVars=B,O.generateStyleSheets=z,O.generateSpacing=function(){return ii(f.spacing,Zr(this))},O.getColorSchemeSelector=ed(u),O.spacing=O.generateSpacing(),O.shouldSkipGeneratingVar=c,O.unstable_sxConfig={...tr,...f==null?void 0:f.unstable_sxConfig},O.unstable_sx=function(d){return Dt({sx:d,theme:this})},O.internal_cache={},O.toRuntimeSource=Fi,O}function Ui(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:ko({...n===!0?{}:n.palette,mode:t})})}function yr(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:s=n==null?void 0:n.mode,...a}=e,c=s||"light",u=o==null?void 0:o[c],p={...o,...n?{[c]:{...typeof u!="boolean"&&u,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Eo(e,...t);let f=n;"palette"in e||p[c]&&(p[c]!==!0?f=p[c].palette:c==="dark"&&(f={mode:"dark"}));const g=Eo({...e,palette:f},...t);return g.defaultColorScheme=c,g.colorSchemes=p,g.palette.mode==="light"&&(g.colorSchemes.light={...p.light!==!0&&p.light,palette:g.palette},Ui(g,"dark",p.dark)),g.palette.mode==="dark"&&(g.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:g.palette},Ui(g,"light",p.light)),g}return!n&&!("light"in p)&&c==="light"&&(p.light=!0),Nd({...a,colorSchemes:p,defaultColorScheme:c,...typeof r!="boolean"&&r},...t)}const qi=yr(),ht="$$material";function Dd(){const e=po(qi);return process.env.NODE_ENV!=="production"&&F.useDebugValue(e),e[ht]||e}function Ld(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ge=Tu({themeId:ht,defaultTheme:qi,rootShouldForwardProp:e=>Ld(e)&&e!=="classes"});process.env.NODE_ENV!=="production"&&(y.node,y.object.isRequired);function Vt(e){return Nu(e)}function _o(...e){const t=F.useRef(void 0),n=F.useCallback(r=>{const o=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,c=a(r);return typeof c=="function"?c:()=>{a(null)}}return s.current=r,()=>{s.current=null}});return()=>{o.forEach(s=>s==null?void 0:s())}},e);return F.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function Je(e){const t=F.useRef(e);return Zt(()=>{t.current=e}),F.useRef((...n)=>(0,t.current)(...n)).current}function Fd(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,a=r&&t!==!1,c=r&&t===!1;return F.useMemo(()=>{const p={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(p.tabIndex=o,!s&&n&&(p.tabIndex=t?o:-1)),(s&&(t||a)||!s&&n)&&(p["aria-disabled"]=n),s&&(!t||c)&&(p.disabled=n),p},[r,n,t,a,c,s,o])}const Vd={};function zd(e){const{nativeButton:t,nativeButtonProp:n,internalNativeButton:r=t,allowInferredHostMismatch:o=!1,disabled:s,type:a,hasFormAction:c=!1,tabIndex:u=0,focusableWhenDisabled:p,stopEventPropagation:f=!1,onBeforeKeyDown:g,onBeforeKeyUp:b}=e,m=F.useRef(null),x=p===!0,h=Fd({focusableWhenDisabled:x,disabled:s,isNativeButton:t,tabIndex:u});process.env.NODE_ENV!=="production"&&F.useEffect(()=>{const T=m.current;if(T==null)return;const P=T.tagName==="BUTTON";if(n!==void 0){n&&!P&&console.error("MUI: A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Render a real <button> or set `nativeButton` to `false`."),!n&&P&&console.error("MUI: A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while additionally applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Render a non-<button> such as <div>, or set `nativeButton` to `true`.");return}o||(r&&!P&&console.error("MUI: A component rendering a native <button> resolved to a non-<button> element, but `nativeButton={false}` was not specified and the resolved root is a non-<button>. When rendering a custom component, set `nativeButton={false}` explicitly or render a <button> element."),!r&&P&&console.error("MUI: A component that acts as a non-native button resolved to a native <button> element, but `nativeButton={true}` was not specified. When rendering a custom component, set `nativeButton={true}` explicitly or render a non-<button> element."))},[o,r,n]);const C=F.useCallback(()=>{const T=m.current;return T==null?t:T.tagName==="BUTTON"?!0:!!(T.tagName==="A"&&T.href)},[t]),E=F.useMemo(()=>{const T=x?{}:{tabIndex:s?-1:u};return t?(T.type=a===void 0&&!c?"button":a,x||(T.disabled=s)):(T.role="button",!x&&s&&(T["aria-disabled"]=s)),x?{...T,...h}:T},[s,x,h,c,t,u,a]);return{getButtonProps:F.useCallback((T=Vd)=>{const{onClick:P,onKeyDown:_,onKeyUp:O,...$}=T;return{...E,...$,onClick:S=>{if(f&&S.stopPropagation(),s){S.preventDefault();return}P==null||P(S)},onKeyDown:S=>{if(x&&h.onKeyDown(S),!s&&(g==null||g(S),_==null||_(S),!(S.target!==S.currentTarget||C()))){if(S.key===" "){S.preventDefault();return}S.key==="Enter"&&(S.preventDefault(),S.currentTarget.click())}},onKeyUp:S=>{s||(b==null||b(S),O==null||O(S),S.target===S.currentTarget&&!C()&&S.key===" "&&!S.defaultPrevented&&S.currentTarget.click())}}},[E,s,x,h,C,g,b,f]),rootRef:m}}const Yi={};function Hi(e,t){const n=F.useRef(Yi);return n.current===Yi&&(n.current=e(t)),n}class br{constructor(){An(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new br}static use(){const t=Hi(br.create).current,[n,r]=F.useState(!1);return t.shouldMount=n,t.setShouldMount=r,F.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=Ud(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function Wd(){return br.use()}function Ud(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}const qd=[];function Gi(e){F.useEffect(e,qd)}class $o{constructor(){An(this,"currentId",null);An(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});An(this,"disposeEffect",()=>this.clear)}static create(){return new $o}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Ki(){const e=Hi($o.create).current;return Gi(e.disposeEffect),e}function Xi(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:s,rippleSize:a,in:c,onExited:u,timeout:p}=e,[f,g]=F.useState(!1),b=Ki(),m=F.useRef(!1),x=F.useRef(u);x.current=u;const h=u!=null,C=Ae(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),E={width:a,height:a,top:-(a/2)+s,left:-(a/2)+o},w=Ae(n.child,f&&n.childLeaving,r&&n.childPulsate);return!c&&!f&&g(!0),F.useEffect(()=>{!c&&h?m.current||(m.current=!0,b.start(p,()=>{var T;m.current=!1,(T=x.current)==null||T.call(x)})):(m.current=!1,b.clear())},[b,h,c,p]),i.jsx("span",{className:C,style:E,children:i.jsx("span",{className:w})})}process.env.NODE_ENV!=="production"&&(Xi.propTypes={classes:y.object.isRequired,className:y.string,in:y.bool,onExited:y.func,pulsate:y.bool,rippleSize:y.number,rippleX:y.number,rippleY:y.number,timeout:y.number.isRequired});const Ve=Tt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Qi="(prefers-reduced-motion: reduce)",Yd=0,Hd="0ms",Gd=()=>{},Ji=()=>!1,Kd=()=>!0,Xd=()=>Gd;function Qd(e){const[t,n]=F.useState(()=>({enabled:e,matches:e?null:!1}));let r=t.matches;return t.enabled!==e&&(r=null,e||(r=!1)),Zt(()=>{const o=c=>{n(u=>u.enabled===e&&u.matches===c?u:{enabled:e,matches:c})};if(!e){t.enabled&&o(!1);return}if(typeof window>"u"||typeof window.matchMedia!="function"){o(!1);return}const s=window.matchMedia(Qi),a=()=>{o(s.matches)};return a(),s.addEventListener("change",a),()=>{s.removeEventListener("change",a)}},[e,t.enabled]),r}const Zi={...F}.useSyncExternalStore;function Jd(e){const t=e?Kd:Ji,[n,r]=F.useMemo(()=>{if(!e||typeof window>"u"||typeof window.matchMedia!="function")return[Ji,Xd];const o=window.matchMedia(Qi);return[()=>o.matches,s=>(o.addEventListener("change",s),()=>{o.removeEventListener("change",s)})]},[e]);return Zi(r,n,t)}const Zd=Zi!==void 0?Jd:Qd;function ef(e,t){const n=Zd(e==="system"),r=e==="always"||e==="system"&&n!==!1;return F.useMemo(()=>({shouldReduceMotion:r,getTransitionTiming(o){return r?{duration:Yd,delay:Hd}:o}}),[r])}const Io=550,tf=80,xr={},ea=[],nf=()=>{};function Po(e,t){const n=new Set(t),r=new Map;let o=[];for(const a of e)n.has(a)?o.length>0&&(r.set(a,o),o=[]):o.push(a);const s=[];for(const a of t){const c=r.get(a);c&&s.push(...c),s.push(a)}return s.push(...o),s}function rf({event:e,element:t,center:n}){const r=t?t.getBoundingClientRect():{width:0,height:0,left:0,top:0};let o,s;if(n||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)o=Math.round(r.width/2),s=Math.round(r.height/2);else{const{clientX:c,clientY:u}=e.touches&&e.touches.length>0?e.touches[0]:e;o=Math.round(c-r.left),s=Math.round(u-r.top)}let a;if(n)a=Math.sqrt((2*r.width**2+r.height**2)/3),a%2===0&&(a+=1);else{const c=Math.max(Math.abs((t?t.clientWidth:0)-o),o)*2+2,u=Math.max(Math.abs((t?t.clientHeight:0)-s),s)*2+2;a=Math.sqrt(c**2+u**2)}return{rippleX:o,rippleY:s,rippleSize:a}}const of=Ue.keyframes`
|
|
130
130
|
0% {
|
|
131
131
|
transform: scale(0);
|
|
132
132
|
opacity: 0.1;
|
|
@@ -222,8 +222,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
${({theme:e})=>cf(e)}
|
|
225
|
-
`,ta=F.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiTouchRipple"}),o=Dd(),s=ef(o.motion.reducedMotion),{center:a=!1,classes:c=xr,className:u,...p}=r,[f,g]=F.useState({items:ea,order:ea}),b=f.items,m=F.useRef(0),x=F.useRef(null),h=F.useRef(!1);Gi(()=>(h.current=!0,()=>{h.current=!1})),F.useEffect(()=>{x.current&&(x.current(),x.current=null)},[b]);const C=F.useRef(!1),E=Ki(),w=F.useRef(null),T=F.useRef(null),P=Je(S=>{h.current&&g(d=>{const A=d.items.filter(D=>D.key!==S),R=Po(d.order.filter(D=>D!==S),A.filter(D=>!D.exiting).map(D=>D.key));return{items:A,order:R}})}),_=Je(S=>{const{pulsate:d,rippleX:A,rippleY:R,rippleSize:D,cb:G}=S,J=m.current;m.current+=1,g(oe=>{const ie=[...oe.items,{key:J,pulsate:d,rippleX:A,rippleY:R,rippleSize:D,exiting:!1}];return{items:ie,order:Po(oe.order,ie.filter(V=>!V.exiting).map(V=>V.key))}}),x.current=G}),O=Je((S=xr,d=xr,A=nf)=>{const{pulsate:R=!1,center:D=a||d.pulsate,fakeElement:G=!1}=d;if((S==null?void 0:S.type)==="mousedown"&&C.current){C.current=!1;return}(S==null?void 0:S.type)==="touchstart"&&(C.current=!0);const J=G?null:T.current,{rippleX:oe,rippleY:ie,rippleSize:V}=rf({event:S,element:J,center:D});S!=null&&S.touches?w.current===null&&(w.current=()=>{_({pulsate:R,rippleX:oe,rippleY:ie,rippleSize:V,cb:A})},E.start(tf,()=>{w.current&&(w.current(),w.current=null)})):_({pulsate:R,rippleX:oe,rippleY:ie,rippleSize:V,cb:A})}),$=Je(()=>{O(xr,{pulsate:!0})}),j=Je((S,d)=>{if(E.clear(),(S==null?void 0:S.type)==="touchend"&&w.current){w.current(),w.current=null,E.start(0,()=>{j(S,d)});return}w.current=null,g(A=>{const R=A.items.findIndex(G=>!G.exiting);if(R===-1)return A;const D=A.items.slice();return D[R]={...D[R],exiting:!0},{items:D,order:Po(A.order,D.filter(G=>!G.exiting).map(G=>G.key))}}),x.current=d});F.useImperativeHandle(n,()=>({pulsate:$,start:O,stop:j}),[$,O,j]);const B=new Map(b.map(S=>[S.key,S])),z=f.order.map(S=>B.get(S)).filter(Boolean);return i.jsx(lf,{className:Ae(Ve.root,c.root,u),ref:T,...p,children:z.map(S=>i.jsx(uf,{classes:{ripple:Ae(c.ripple,Ve.ripple),rippleVisible:Ae(c.rippleVisible,Ve.rippleVisible),ripplePulsate:Ae(c.ripplePulsate,Ve.ripplePulsate),child:Ae(c.child,Ve.child),childLeaving:Ae(c.childLeaving,Ve.childLeaving),childPulsate:Ae(c.childPulsate,Ve.childPulsate)},timeout:s.shouldReduceMotion?0:Io,pulsate:S.pulsate,rippleX:S.rippleX,rippleY:S.rippleY,rippleSize:S.rippleSize,in:!S.exiting,onExited:()=>P(S.key)},S.key))})});process.env.NODE_ENV!=="production"&&(ta.propTypes={center:y.bool,classes:y.object,className:y.string});function df(e){return wt("MuiButtonBase",e)}const ff=Tt("MuiButtonBase",["root","disabled","focusVisible"]),pf=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,suppressFocusVisible:o,classes:s}=e,c=qt({root:["root",t&&"disabled",n&&!o&&"focusVisible"]},df,s);return n&&!o&&r&&(c.root+=` ${r}`),c},hf=Ge("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${ff.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Oo=F.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:s=!1,children:a,className:c,component:u="button",disabled:p=!1,disableRipple:f=!1,disableTouchRipple:g=!1,focusRipple:b=!1,focusVisibleClassName:m,focusableWhenDisabled:x,suppressFocusVisible:h=!1,internalNativeButton:C,LinkComponent:E="a",nativeButton:w,onBlur:T,onClick:P,onContextMenu:_,onDragLeave:O,onFocus:$,onFocusVisible:j,onKeyDown:B,onKeyUp:z,onMouseDown:S,onMouseLeave:d,onMouseUp:A,onTouchEnd:R,onTouchMove:D,onTouchStart:G,tabIndex:J=0,TouchRippleProps:oe,touchRippleRef:ie,type:V,...k}=r,q=!!(k.href||k.to),K=!!k.formAction;let M=u;M==="button"&&q&&(M=E);const Q=typeof M=="string"?M==="button":C??!1,N=w??Q,I=Wd(),U=_o(I.ref,ie),[X,ne]=F.useState(!1);(p||h)&&X&&ne(!1);const te=Je(ce=>{b&&!ce.repeat&&X&&ce.key===" "&&I.stop(ce,()=>{I.start(ce)})}),Y=Je(ce=>{b&&ce.key===" "&&X&&!ce.defaultPrevented&&I.stop(ce,()=>{I.pulsate(ce)})}),{getButtonProps:ke,rootRef:Re}=zd({nativeButton:N,nativeButtonProp:w,internalNativeButton:Q,allowInferredHostMismatch:q||typeof M=="string",disabled:p,type:V,hasFormAction:K,tabIndex:J,onBeforeKeyDown:te,onBeforeKeyUp:Y}),{onClick:ot,onKeyDown:$t,onKeyUp:yt,...bt}=ke({onClick:P,onKeyDown:B,onKeyUp:z});F.useImperativeHandle(o,()=>({focusVisible:()=>{ne(!0),Re.current.focus()}}),[Re]);const Me=I.shouldMount&&!f&&!p;F.useEffect(()=>{X&&b&&!f&&I.pulsate()},[f,b,X,I]);const lt=mt(I,"start",S,g),et=mt(I,"stop",_,g),tt=mt(I,"stop",O,g),Ut=mt(I,"stop",A,g),It=mt(I,"stop",ce=>{X&&ce.preventDefault(),d&&d(ce)},g),Pt=mt(I,"start",G,g),Ot=mt(I,"stop",R,g),Rt=mt(I,"stop",D,g),Mt=mt(I,"stop",ce=>{ks(ce.target)||ne(!1),T&&T(ce)},!1),At=Je(ce=>{Re.current||(Re.current=ce.currentTarget),!h&&ks(ce.target)&&(ne(!0),j&&j(ce)),$&&$(ce)}),Se={};q&&(Se.tabIndex=p?-1:J,p&&(Se["aria-disabled"]=p),Se.type=V);const be=_o(n,Re),We={...r,centerRipple:s,component:u,disabled:p,disableRipple:f,disableTouchRipple:g,focusRipple:b,suppressFocusVisible:h,tabIndex:J,focusVisible:X},Fe=pf(We);return i.jsxs(hf,{as:M,className:Ae(Fe.root,c),ownerState:We,onBlur:Mt,onClick:ot,onContextMenu:et,onFocus:At,onKeyDown:$t,onKeyUp:yt,onMouseDown:lt,onMouseLeave:It,onMouseUp:Ut,onDragLeave:tt,onTouchEnd:Ot,onTouchMove:Rt,onTouchStart:Pt,ref:be,...q?Se:bt,...k,children:[a,Me?i.jsx(ta,{ref:U,center:s,...oe}):null]})});function mt(e,t,n,r=!1){return Je(o=>(n&&n(o),r||e[t](o),!0))}process.env.NODE_ENV!=="production"&&(Oo.propTypes={action:jc,centerRipple:y.bool,children:y.node,classes:y.object,className:y.string,component:Ic,disabled:y.bool,disableRipple:y.bool,disableTouchRipple:y.bool,focusRipple:y.bool,focusVisibleClassName:y.string,formAction:y.oneOfType([y.func,y.string]),href:y.any,LinkComponent:y.elementType,nativeButton:y.bool,onBlur:y.func,onClick:y.func,onContextMenu:y.func,onDragLeave:y.func,onFocus:y.func,onFocusVisible:y.func,onKeyDown:y.func,onKeyUp:y.func,onMouseDown:y.func,onMouseLeave:y.func,onMouseUp:y.func,onTouchEnd:y.func,onTouchMove:y.func,onTouchStart:y.func,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),tabIndex:y.number,TouchRippleProps:y.object,touchRippleRef:y.oneOfType([y.func,y.shape({current:y.shape({pulsate:y.func.isRequired,start:y.func.isRequired,stop:y.func.isRequired})})]),type:y.string});const Et=Fu;function mf(e){return typeof e.main=="string"}function gf(e,t=[]){if(!mf(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Ro(e=[]){return([,t])=>t&&gf(t,e)}function yf(e){return wt("MuiToggleButton",e)}const zt=Tt("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),Mo=F.createContext({});process.env.NODE_ENV!=="production"&&(Mo.displayName="ToggleButtonGroupContext");const Ao=F.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ao.displayName="ToggleButtonGroupButtonContext");function bf(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}const Bo=F.createContext(void 0);process.env.NODE_ENV!=="production"&&(Bo.displayName="RovingTabIndexContext");function na(){const e=F.useContext(Bo);if(e===void 0)throw new Error("MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.");return e}const xf=Object.is;function vf(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const o in e)if(n+=1,!xf(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}function ra(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function oa(e){return e&&e.ownerDocument||document}function Cf(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Sf=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End"];function wf(e){const{activeItemId:t,getDefaultActiveItemId:n,orientation:r,isRtl:o=!1,isItemFocusable:s=jf,wrap:a=!0}=e,[c,u]=F.useState(t),[p,f]=F.useState(t);let g=c;t!==p&&(f(t),t!==void 0&&t!==c&&(g=t,u(t)));const b=F.useRef(null),m=F.useRef(new Map),[x,h]=F.useState(0),C=F.useMemo(()=>No(m.current),[x]),E=sa(g,C,s,n),w=F.useRef(E);w.current=E;const T=F.useCallback(()=>{const d=No(m.current),A=sa(w.current,d,s,n);return la(d,A)},[n,s]),P=F.useCallback(()=>m.current,[]),_=Je(d=>{const A=m.current.get(d.id);vf(A??null,d)||(m.current.set(d.id,d),h(R=>R+1))}),O=Je(d=>{m.current.delete(d)&&h(A=>A+1)}),$=Je(d=>{u(d)}),j=F.useCallback(d=>w.current===d,[]),B=F.useCallback((d,A,R,D)=>{var oe;const G=vr(m.current),J=aa(G,d,A,R,D??s);return J?((oe=J.element)==null||oe.focus(),u(J.id),J):null},[s]),z=F.useCallback((d,A,R)=>({onFocus:J=>{A==null||A(J);const oe=vr(m.current),ie=da(oe,J.target);ie!==-1&&u(oe[ie].id)},onKeyDown:J=>{if(R==null||R(J),J.defaultPrevented||J.altKey||J.shiftKey||J.ctrlKey||J.metaKey||!Sf.includes(J.key))return;let oe=r==="horizontal"?"ArrowLeft":"ArrowUp",ie=r==="horizontal"?"ArrowRight":"ArrowDown";r==="horizontal"&&o&&(oe="ArrowRight",ie="ArrowLeft");const V=vr(m.current),k=ra(oa(b.current)),q=k===b.current;let K=ia(V,k,w.current),M="next";switch(J.key){case oe:M="previous",J.preventDefault(),q&&(K=V.length);break;case ie:J.preventDefault(),q&&(K=-1);break;case"Home":J.preventDefault(),K=-1;break;case"End":J.preventDefault(),M="previous",K=V.length;break;default:return}B(K,M,a)},ref:$f(d,J=>{b.current=J})}),[B,o,r,a]),S=F.useCallback(d=>{var J;const A=vr(m.current),R=ra(oa(b.current)),G=R===b.current?-1:ia(A,R,w.current);return((J=B(G,"next",!0,d))==null?void 0:J.id)??null},[B]);return F.useMemo(()=>({activeItemId:E,focusNext:S,getActiveItem:T,getContainerProps:z,getItemMap:P,isItemActive:j,registerItem:_,setActiveItemId:$,unregisterItem:O}),[E,S,T,z,P,j,_,$,O])}function Tf(e){const t=na(),{activeItemId:n,registerItem:r,unregisterItem:o}=t,s=F.useRef(null),a=F.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),c=F.useRef(a);c.current=a;const u=F.useCallback(f=>{if(s.current=f,f==null){queueMicrotask(()=>{s.current==null&&o(e.id)});return}r({...c.current,element:f})},[e.id,r,o]),p=_o(e.ref,u);return Zt(()=>{s.current&&r({...a,element:s.current})},[a,r]),Zt(()=>{const f=e.id;return()=>{o(f)}},[e.id,o]),{ref:p,tabIndex:n===e.id?0:-1}}function sa(e,t,n,r){return e!=null?kf(e,t,n):Ef(t,n,r)}function kf(e,t,n){var o;const r=ua(t,e);return r===-1?ca(t,n):n(t[r])?t[r].id:((o=aa(t,r,"next",!1,n))==null?void 0:o.id)??null}function Ef(e,t,n){const r=n==null?void 0:n(e);if(r!=null){const o=la(e,r);if(o&&t(o))return o.id}return ca(e,t)}function ia(e,t,n){if(t){const r=da(e,t);if(r!==-1)return r}return ua(e,n)}function aa(e,t,n,r,o){const s=e.length-1;if(s===-1)return null;let a=!1,c=fa(t,s,n,r);const u=c;for(;c!==-1;){if(c===u){if(a)return null;a=!0}const p=e[c];if(!p||!o(p))c=fa(c,s,n,r);else return p}return null}function ca(e,t){var n;return((n=e.find(r=>t(r)))==null?void 0:n.id)??null}function la(e,t){return t==null?null:e.find(n=>n.id===t)??null}function ua(e,t){return t==null?-1:e.findIndex(n=>n.id===t)}function da(e,t){return t?e.findIndex(n=>{var r;return n.element===t||((r=n.element)==null?void 0:r.contains(t))}):-1}function No(e){const t=Array.from(e.values());if(t.every(o=>o.element==null))return t;const n=t.filter(Do).sort((o,s)=>_f(o.element,s.element)),r=t.filter(o=>!Do(o));return[...n,...r]}function vr(e){return No(e).filter(Do)}function fa(e,t,n,r=!0){return n==="next"?e===t?r?0:-1:e+1:e===0?r?t:-1:e-1}function jf(e){return e.element?e.focusableWhenDisabled?!0:!e.disabled&&!e.element.hasAttribute("disabled")&&e.element.getAttribute("aria-disabled")!=="true"&&e.element.hasAttribute("tabindex"):!1}function Do(e){return e.element!=null&&e.element.isConnected}function _f(e,t){if(e===t)return 0;const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function $f(...e){return t=>{e.forEach(n=>{Cf(n??null,t)})}}function If(e,t){const{children:n,disabled:r=!1,selected:o=!1,value:s}=e,a=na(),c=Tf({id:s,ref:t,disabled:r,selected:o}),p=a.getItemMap().size===0&&o?0:c.tabIndex;return F.cloneElement(F.Children.only(n),{...c,tabIndex:n.props.tabIndex??p})}const Pf=F.forwardRef(If),Of=e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:s,color:a}=e,c={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${De(s)}`,a]};return qt(c,yf,t)},Rf=Ge(Oo,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${De(n.size)}`]]}})(Et(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${zt.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${zt.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(Ro()).map(([t])=>({props:{color:t},style:{[`&.${zt.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),Lo=F.forwardRef(function(t,n){const{value:r,isRovingTabIndex:o,...s}=F.useContext(Mo),a=F.useContext(Ao),c=Vn({...s,selected:bf(t.value,r)},t),u=Vt({props:c,name:"MuiToggleButton"}),{children:p,className:f,color:g="standard",disabled:b=!1,disableFocusRipple:m=!1,fullWidth:x=!1,onChange:h,onClick:C,selected:E,size:w="medium",value:T,...P}=u,_={...u,color:g,disabled:b,disableFocusRipple:m,fullWidth:x,size:w},O=Of(_),$=z=>{C&&(C(z,T),z.defaultPrevented)||h&&h(z,T)},j=a||"",B=i.jsx(Rf,{className:Ae(s.className,O.root,f,j),internalNativeButton:!0,disabled:b,focusRipple:!m,ref:o?void 0:n,onClick:$,onChange:h,value:T,ownerState:_,"aria-pressed":E,...P,children:p});return o?i.jsx(Pf,{disabled:b,selected:E,ref:n,value:T,children:B}):B});process.env.NODE_ENV!=="production"&&(Lo.propTypes={children:y.node,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["standard","primary","secondary","error","info","success","warning"]),y.string]),disabled:y.bool,disableFocusRipple:y.bool,disableRipple:y.bool,fullWidth:y.bool,onChange:y.func,onClick:y.func,selected:y.bool,size:y.oneOfType([y.oneOf(["small","medium","large"]),y.string]),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),value:y.any.isRequired});function Mf(e){return F.Children.toArray(e).filter(t=>F.isValidElement(t))}function Af(e){return wt("MuiToggleButtonGroup",e)}const Te=Tt("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","fullWidth","firstButton","lastButton","middleButton"]),Bf=e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e;return qt({root:["root",n,r&&"fullWidth"],grouped:["grouped",o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]},Af,t)},Nf=Ge("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Te.grouped}`]:t.grouped},{[`& .${Te.firstButton}`]:t.firstButton},{[`& .${Te.lastButton}`]:t.lastButton},{[`& .${Te.middleButton}`]:t.middleButton},t.root,n.orientation==="vertical"&&t.vertical,n.fullWidth&&t.fullWidth]}})(Et(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${Te.grouped}`]:{[`&.${Te.selected} + .${Te.grouped}.${Te.selected}`]:{borderTop:0,marginTop:0}},[`& .${Te.firstButton},& .${Te.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${Te.lastButton},& .${Te.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${Te.lastButton}.${zt.disabled},& .${Te.middleButton}.${zt.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${Te.grouped}`]:{[`&.${Te.selected} + .${Te.grouped}.${Te.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${Te.firstButton},& .${Te.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${Te.lastButton},& .${Te.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${Te.lastButton}.${zt.disabled},& .${Te.middleButton}.${zt.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),pa=F.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiToggleButtonGroup"}),{children:o,className:s,color:a="standard",disabled:c=!1,exclusive:u=!1,fullWidth:p=!1,onChange:f,orientation:g="horizontal",size:b="medium",value:m,...x}=r,h={...r,disabled:c,fullWidth:p,orientation:g,size:b},C=Bf(h),E=Au(),w=F.useCallback((z,S)=>{if(!f)return;const d=m&&m.indexOf(S);let A;m&&d>=0?(A=m.slice(),A.splice(d,1)):A=m?m.concat(S):[S],f(z,A)},[f,m]),T=F.useCallback((z,S)=>{f&&f(z,m===S?null:S)},[f,m]),P=F.useMemo(()=>({className:C.grouped,onChange:u?T:w,value:m,size:b,fullWidth:p,color:a,disabled:c,isRovingTabIndex:!0}),[C.grouped,u,T,w,m,b,p,a,c]),_=Mf(o),O=_.length,$=z=>{const S=z===0,d=z===O-1;return S&&d?"":S?C.firstButton:d?C.lastButton:C.middleButton},j=wf({orientation:g,isRtl:E}),B=j.getContainerProps(n,x.onFocus,x.onKeyDown);return i.jsx(Nf,{role:"group",className:Ae(C.root,s),ownerState:h,...x,...B,children:i.jsx(Bo.Provider,{value:j,children:i.jsx(Mo.Provider,{value:P,children:_.map((z,S)=>(process.env.NODE_ENV!=="production"&&fn.isFragment(z)&&console.error(["MUI: The ToggleButtonGroup component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
226
|
-
`)),i.jsx(Ao.Provider,{value:$(S),children:z},S)))})})})});process.env.NODE_ENV!=="production"&&(pa.propTypes={children:y.node,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["standard","primary","secondary","error","info","success","warning"]),y.string]),disabled:y.bool,exclusive:y.bool,fullWidth:y.bool,onChange:y.func,onFocus:y.func,onKeyDown:y.func,orientation:y.oneOf(["horizontal","vertical"]),size:y.oneOfType([y.oneOf(["small","medium","large"]),y.string]),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),value:y.any});function Df(e){return wt("MuiSvgIcon",e)}Tt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Lf={transition:"none"};function Ff(e,t){return e==="always"?t:e==="system"?{"@media (prefers-reduced-motion: reduce)":t}:null}const Vf={},zf=["all"],Wf={};function Fo(e,t){var r;const n=t??Lf;return Ff((r=e.motion)==null?void 0:r.reducedMotion,n)}function Cr(e,t=zf,n=Wf){var a,c;const r=(c=(a=e.transitions)==null?void 0:a.create)==null?void 0:c.call(a,t,n),o=Fo(e);if(r===void 0)return o??Vf;const s={transition:r};return o?{...s,...o}:s}const Uf=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${De(t)}`,`fontSize${De(n)}`]};return qt(o,Df,r)},qf=Ge("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${De(n.color)}`],t[`fontSize${De(n.fontSize)}`]]}})(Et(({theme:e})=>{var t,n,r,o,s,a,c,u,p,f,g,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,...Cr(e,"fill",{duration:(n=(t=(e.vars??e).transitions)==null?void 0:t.duration)==null?void 0:n.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(r=e.typography)==null?void 0:r.pxToRem)==null?void 0:o.call(r,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((a=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:a.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var x,h;return{props:{color:m},style:{color:(h=(x=(e.vars??e).palette)==null?void 0:x[m])==null?void 0:h.main}}}),{props:{color:"action"},style:{color:(f=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(b=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Sr=F.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:a="inherit",component:c="svg",fontSize:u="medium",htmlColor:p,inheritViewBox:f=!1,titleAccess:g,viewBox:b="0 0 24 24",...m}=r,x=F.isValidElement(o)&&o.type==="svg",h={...r,color:a,component:c,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:b,hasSvgAsChild:x},C={};f||(C.viewBox=b);const E=Uf(h);return i.jsxs(qf,{as:c,className:Ae(E.root,s),focusable:"false",color:p,"aria-hidden":g?void 0:!0,role:g?"img":void 0,ref:n,...C,...m,...x&&o.props,ownerState:h,children:[x?o.props.children:o,g?i.jsx("title",{children:g}):null]})});process.env.NODE_ENV!=="production"&&(Sr.propTypes={children:y.node,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),y.string]),component:y.elementType,fontSize:y.oneOfType([y.oneOf(["inherit","large","medium","small"]),y.string]),htmlColor:y.string,inheritViewBox:y.bool,shapeRendering:y.string,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),titleAccess:y.string,viewBox:y.string}),Sr.muiName="SvgIcon";function xe(e,t){function n(r,o){return i.jsx(Sr,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:o,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Sr.muiName,F.memo(F.forwardRef(n))}const ha=xe(i.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"DoneOutlined");function Yf({theme:e,...t}){const n=ht in e?e[ht]:void 0;return i.jsx(Cn,{...t,themeId:n?ht:void 0,theme:n||e})}const wr={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"};process.env.NODE_ENV!=="production"&&(y.string,y.string,y.string,y.string,y.string,y.oneOf(["dark","light","system"]),y.string,y.string);const{CssVarsProvider:Hf}=Gu({themeId:ht,theme:()=>yr({cssVariables:!0}),colorSchemeStorageKey:wr.colorSchemeStorageKey,modeStorageKey:wr.modeStorageKey,defaultColorScheme:{light:wr.defaultLightColorScheme,dark:wr.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:Di(e.palette,e.typography)};return t.unstable_sx=function(r){return Dt({sx:r,theme:this})},t}}),Gf=Hf;function Kf({theme:e,...t}){const n=F.useMemo(()=>{if(typeof e=="function")return e;const r=ht in e?e[ht]:e;return"colorSchemes"in r?null:"vars"in r?e:{...e,vars:null}},[e]);return n?i.jsx(Yf,{theme:n,...t}):i.jsx(Gf,{theme:e,...t})}const Xf=xe(i.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Qf({tooltipLabel:e}){return i.jsx(l.Tooltip,{title:e,children:i.jsx(l.IconButton,{disableRipple:!0,sx:{color:"inherit"},children:i.jsx(Xf,{})})})}function Vo({title:e,color:t}){return i.jsx(Qf,{color:t,tooltipLabel:e})}const Jf=xe(i.jsx("path",{d:"M22 16v-2l-8.5-5V3.5c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5V9L2 14v2l8.5-2.5V19L8 20.5V22l4-1 4 1v-1.5L13.5 19v-5.5z"}),"AirplanemodeActive"),Zf=xe(i.jsx("path",{d:"M10.5 7.67V3.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V9l8.5 5v2l-4.49-1.32zm9.28 14.94 1.41-1.41-7.69-7.7-3.94-3.94-6.75-6.75-1.42 1.41 6.38 6.38L2 14v2l8.5-2.5V19L8 20.5V22l4-1 4 1v-1.5L13.5 19v-2.67z"}),"AirplanemodeInactive");function zo({netEnabled:e,debug:t=!1,isAndroid:n}){const{i18nRef:r}=v.useContext(ve),[o,s]=v.useState(!1),[a,c]=v.useState(""),u=()=>{dn("/api/net/disable",t)},p=(f,g)=>{e?u():s(!0)};return v.useEffect(()=>{Ee("/api/version").then(f=>f.json).then(f=>c(f.product_name)).catch(f=>console.error("Error :",f))},[]),i.jsxs(l.Box,{children:[i.jsxs(l.Grid,{container:!0,spacing:1,sx:{alignItems:"center"},children:[i.jsx(l.Grid,{children:i.jsxs(pa,{onChange:f=>{p()},exclusive:!0,color:"secondary",size:"small",value:e,sx:{background:f=>ft(f.palette.common.white,.3),height:"34px"},children:[(!n||!e)&&i.jsxs(Lo,{disableFocusRipple:!0,value:!1,sx:{color:"white","&.Mui-selected":{color:"white",backgroundColor:f=>ft(f.palette.secondary.main,1)},"&.Mui-selected:hover":{backgroundColor:f=>ft(f.palette.secondary.main,1),color:"white"}},children:[n?i.jsx(Jf,{fontSize:"small",sx:{paddingRight:1}}):!e&&i.jsx(ha,{fontSize:"small",sx:{paddingRight:1}}),W("components:header:offline_mode",r.current)]}),(!n||e)&&i.jsxs(Lo,{disableFocusRipple:!0,value:!0,sx:{color:"white","&.Mui-selected":{color:"white",backgroundColor:f=>ft(f.palette.secondary.main,1)},"&.Mui-selected:hover":{backgroundColor:f=>ft(f.palette.secondary.main,1),color:"white"}},children:[n?i.jsx(Zf,{fontSize:"small",sx:{paddingRight:1}}):e&&i.jsx(ha,{fontSize:"small",sx:{paddingRight:1}}),W("components:header:online_mode",r.current)]})]})}),i.jsx(l.Grid,{children:i.jsx(Vo,{title:W("components:header:tooltip_offline_mode",r.current).replace("{1}",a)})})]}),i.jsx(Wr,{internetDialogOpen:o,setInternetDialogOpen:s})]})}const ma=xe(i.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),ep=xe(i.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),tp=xe(i.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");function np({i18n:e,netEnabled:t,debug:n}){const[r,o]=v.useState(!1),[s,a]=v.useState(!1),[c,u]=v.useState([]);v.useEffect(()=>{(async()=>{const g=await Ee("/api/list-clients",n);g.ok&&u(g.json.filter(b=>!b.exclude_from_menu&&(n||!b.requires.debug)))})().then()},[n]);const p=f=>{Ee(`/api/debug/${n} ? "disable" : "enable"}`).then(()=>{f.stopPropagation(),f.preventDefault()})};return i.jsxs(l.Box,{sx:{m:0,mr:2},children:[i.jsx(l.IconButton,{onClick:f=>o(!0),children:i.jsx(ma,{})}),i.jsx(l.Drawer,{open:r,onClose:()=>o(!1),slotProps:{paper:{sx:{width:"auto",overflow:"hidden"}}},children:i.jsx(l.Box,{sx:{width:"100%",minHeight:"98vh",minWidth:"20vw",m:0,p:0},role:"presentation",children:i.jsx(l.List,{sx:{height:"100%",width:"100%"},children:i.jsxs(l.Stack,{direction:"column",spacing:0,sx:{height:"100%",width:"100%",justifyContent:"space-between",alignItems:"flex-start"},children:[i.jsx(l.Box,{sx:{width:"100%"},children:c.map((f,g)=>i.jsx(l.ListItem,{disablePadding:!0,children:i.jsx(l.ListItemButton,{disabled:f.requires.net&&!t.current,onClick:()=>{window.location.href=f.url},children:i.jsx(l.ListItemText,{primary:W(`pages:${f.id}:title`,e)})})},g))}),i.jsxs(l.Box,{children:[i.jsx(l.ListItem,{disablePadding:!0,children:i.jsx(l.ListItemButton,{onClick:()=>{window.location.href="/clients/settings"},children:i.jsx(l.ListItemText,{primary:W("pages:core-settings:title",e)})})}),i.jsx(l.ListItem,{sx:{width:"auto"},disablePadding:!0,children:i.jsxs(l.ListItemButton,{onClick:()=>a(f=>!f),children:[i.jsx(l.ListItemText,{primary:W("components:header:advanced",e)}),s?i.jsx(ep,{}):i.jsx(tp,{})]})}),i.jsx(l.Collapse,{in:s,timeout:"auto",unmountOnExit:!0,children:i.jsx(l.List,{component:"div",disablePadding:!0,children:i.jsxs(l.ListItemButton,{onClick:p,sx:{pl:4},children:[i.jsx(l.ListItemText,{primary:W("components:header:experimental_mode",e)}),i.jsx(l.Switch,{edge:"end",onChange:p,checked:n})]})})}),i.jsx(l.Box,{sx:{visibility:"hidden",position:"absolute",whiteSpace:"nowrap",top:0,left:0},children:i.jsx(l.List,{component:"div",disablePadding:!0,children:i.jsxs(l.ListItemButton,{onClick:p,sx:{pl:4},children:[i.jsx(l.ListItemText,{primary:W("components:header:experimental_mode",e)}),i.jsx(l.Switch,{edge:"end",onChange:p,checked:n})]})})})]})]})})})})]})}const Tr=v.createContext({clientConfig:{},setClientConfig:()=>{}});function rp({titleLabel:e,isOpen:t,closeFn:n,children:r,theme:o,size:s="md",fullWidth:a=!0,showInternetSwitch:c=!1,isLoading:u=!1}){var E,w,T,P,_;const p=o?l.ThemeProvider:v.Fragment,f=o?{theme:o}:{},{enabledRef:g}=v.useContext(ut),{i18nRef:b}=v.useContext(ve),{debugRef:m}=v.useContext(xt),{clientConfigRef:x}=v.useContext(Tr),h=((T=(w=(E=x.current._global)==null?void 0:E.find(O=>O.id==="internetConfig"))==null?void 0:w.fields.find(O=>O.id==="internetConnectionAccess"))==null?void 0:T.value)??!0,C=(O,$)=>{u&&($==="backdropClick"||$==="escapeKeyDown")||n()};return i.jsx(p,{...f,children:i.jsxs(l.Dialog,{open:t,onClose:C,sx:{overflow:"hidden"},slotProps:{sx:{overflow:"hidden !important",display:"flex",flexDirection:"column"},paper:{component:"form"}},fullWidth:a,maxWidth:s,children:[i.jsx(l.AppBar,{position:"sticky",sx:{position:"relative",borderTopLeftRadius:4,borderTopRightRadius:4,backgroundColor:(_=(P=o==null?void 0:o.palette)==null?void 0:P.secondary)==null?void 0:_.main},children:i.jsxs(l.Toolbar,{sx:{justifyContent:"space-between"},children:[i.jsx(l.Typography,{variant:"h6",component:"div",children:e}),h&&c&&i.jsx(zo,{i18n:b.current,netEnabled:g.current,debug:m.current})]})}),r]})})}function op(e){return wt("MuiCircularProgress",e)}Tt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDisableShrink"]);const nt=44;let ga=!1,ya=!1;const Wo=Ue.keyframes`
|
|
225
|
+
`,ta=F.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiTouchRipple"}),o=Dd(),s=ef(o.motion.reducedMotion),{center:a=!1,classes:c=xr,className:u,...p}=r,[f,g]=F.useState({items:ea,order:ea}),b=f.items,m=F.useRef(0),x=F.useRef(null),h=F.useRef(!1);Gi(()=>(h.current=!0,()=>{h.current=!1})),F.useEffect(()=>{x.current&&(x.current(),x.current=null)},[b]);const C=F.useRef(!1),E=Ki(),w=F.useRef(null),T=F.useRef(null),P=Je(S=>{h.current&&g(d=>{const A=d.items.filter(D=>D.key!==S),R=Po(d.order.filter(D=>D!==S),A.filter(D=>!D.exiting).map(D=>D.key));return{items:A,order:R}})}),_=Je(S=>{const{pulsate:d,rippleX:A,rippleY:R,rippleSize:D,cb:H}=S,Z=m.current;m.current+=1,g(re=>{const ie=[...re.items,{key:Z,pulsate:d,rippleX:A,rippleY:R,rippleSize:D,exiting:!1}];return{items:ie,order:Po(re.order,ie.filter(V=>!V.exiting).map(V=>V.key))}}),x.current=H}),O=Je((S=xr,d=xr,A=nf)=>{const{pulsate:R=!1,center:D=a||d.pulsate,fakeElement:H=!1}=d;if((S==null?void 0:S.type)==="mousedown"&&C.current){C.current=!1;return}(S==null?void 0:S.type)==="touchstart"&&(C.current=!0);const Z=H?null:T.current,{rippleX:re,rippleY:ie,rippleSize:V}=rf({event:S,element:Z,center:D});S!=null&&S.touches?w.current===null&&(w.current=()=>{_({pulsate:R,rippleX:re,rippleY:ie,rippleSize:V,cb:A})},E.start(tf,()=>{w.current&&(w.current(),w.current=null)})):_({pulsate:R,rippleX:re,rippleY:ie,rippleSize:V,cb:A})}),$=Je(()=>{O(xr,{pulsate:!0})}),j=Je((S,d)=>{if(E.clear(),(S==null?void 0:S.type)==="touchend"&&w.current){w.current(),w.current=null,E.start(0,()=>{j(S,d)});return}w.current=null,g(A=>{const R=A.items.findIndex(H=>!H.exiting);if(R===-1)return A;const D=A.items.slice();return D[R]={...D[R],exiting:!0},{items:D,order:Po(A.order,D.filter(H=>!H.exiting).map(H=>H.key))}}),x.current=d});F.useImperativeHandle(n,()=>({pulsate:$,start:O,stop:j}),[$,O,j]);const B=new Map(b.map(S=>[S.key,S])),z=f.order.map(S=>B.get(S)).filter(Boolean);return i.jsx(lf,{className:Ae(Ve.root,c.root,u),ref:T,...p,children:z.map(S=>i.jsx(uf,{classes:{ripple:Ae(c.ripple,Ve.ripple),rippleVisible:Ae(c.rippleVisible,Ve.rippleVisible),ripplePulsate:Ae(c.ripplePulsate,Ve.ripplePulsate),child:Ae(c.child,Ve.child),childLeaving:Ae(c.childLeaving,Ve.childLeaving),childPulsate:Ae(c.childPulsate,Ve.childPulsate)},timeout:s.shouldReduceMotion?0:Io,pulsate:S.pulsate,rippleX:S.rippleX,rippleY:S.rippleY,rippleSize:S.rippleSize,in:!S.exiting,onExited:()=>P(S.key)},S.key))})});process.env.NODE_ENV!=="production"&&(ta.propTypes={center:y.bool,classes:y.object,className:y.string});function df(e){return wt("MuiButtonBase",e)}const ff=Tt("MuiButtonBase",["root","disabled","focusVisible"]),pf=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,suppressFocusVisible:o,classes:s}=e,c=qt({root:["root",t&&"disabled",n&&!o&&"focusVisible"]},df,s);return n&&!o&&r&&(c.root+=` ${r}`),c},hf=Ge("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${ff.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Oo=F.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:s=!1,children:a,className:c,component:u="button",disabled:p=!1,disableRipple:f=!1,disableTouchRipple:g=!1,focusRipple:b=!1,focusVisibleClassName:m,focusableWhenDisabled:x,suppressFocusVisible:h=!1,internalNativeButton:C,LinkComponent:E="a",nativeButton:w,onBlur:T,onClick:P,onContextMenu:_,onDragLeave:O,onFocus:$,onFocusVisible:j,onKeyDown:B,onKeyUp:z,onMouseDown:S,onMouseLeave:d,onMouseUp:A,onTouchEnd:R,onTouchMove:D,onTouchStart:H,tabIndex:Z=0,TouchRippleProps:re,touchRippleRef:ie,type:V,...k}=r,q=!!(k.href||k.to),G=!!k.formAction;let M=u;M==="button"&&q&&(M=E);const Q=typeof M=="string"?M==="button":C??!1,N=w??Q,I=Wd(),W=_o(I.ref,ie),[J,K]=F.useState(!1);(p||h)&&J&&K(!1);const oe=Je(ce=>{b&&!ce.repeat&&J&&ce.key===" "&&I.stop(ce,()=>{I.start(ce)})}),X=Je(ce=>{b&&ce.key===" "&&J&&!ce.defaultPrevented&&I.stop(ce,()=>{I.pulsate(ce)})}),{getButtonProps:Pe,rootRef:Re}=zd({nativeButton:N,nativeButtonProp:w,internalNativeButton:Q,allowInferredHostMismatch:q||typeof M=="string",disabled:p,type:V,hasFormAction:G,tabIndex:Z,onBeforeKeyDown:oe,onBeforeKeyUp:X}),{onClick:ot,onKeyDown:$t,onKeyUp:yt,...bt}=Pe({onClick:P,onKeyDown:B,onKeyUp:z});F.useImperativeHandle(o,()=>({focusVisible:()=>{K(!0),Re.current.focus()}}),[Re]);const Me=I.shouldMount&&!f&&!p;F.useEffect(()=>{J&&b&&!f&&I.pulsate()},[f,b,J,I]);const lt=mt(I,"start",S,g),et=mt(I,"stop",_,g),tt=mt(I,"stop",O,g),Ut=mt(I,"stop",A,g),It=mt(I,"stop",ce=>{J&&ce.preventDefault(),d&&d(ce)},g),Pt=mt(I,"start",H,g),Ot=mt(I,"stop",R,g),Rt=mt(I,"stop",D,g),Mt=mt(I,"stop",ce=>{ks(ce.target)||K(!1),T&&T(ce)},!1),At=Je(ce=>{Re.current||(Re.current=ce.currentTarget),!h&&ks(ce.target)&&(K(!0),j&&j(ce)),$&&$(ce)}),Se={};q&&(Se.tabIndex=p?-1:Z,p&&(Se["aria-disabled"]=p),Se.type=V);const be=_o(n,Re),We={...r,centerRipple:s,component:u,disabled:p,disableRipple:f,disableTouchRipple:g,focusRipple:b,suppressFocusVisible:h,tabIndex:Z,focusVisible:J},Fe=pf(We);return i.jsxs(hf,{as:M,className:Ae(Fe.root,c),ownerState:We,onBlur:Mt,onClick:ot,onContextMenu:et,onFocus:At,onKeyDown:$t,onKeyUp:yt,onMouseDown:lt,onMouseLeave:It,onMouseUp:Ut,onDragLeave:tt,onTouchEnd:Ot,onTouchMove:Rt,onTouchStart:Pt,ref:be,...q?Se:bt,...k,children:[a,Me?i.jsx(ta,{ref:W,center:s,...re}):null]})});function mt(e,t,n,r=!1){return Je(o=>(n&&n(o),r||e[t](o),!0))}process.env.NODE_ENV!=="production"&&(Oo.propTypes={action:jc,centerRipple:y.bool,children:y.node,classes:y.object,className:y.string,component:Ic,disabled:y.bool,disableRipple:y.bool,disableTouchRipple:y.bool,focusRipple:y.bool,focusVisibleClassName:y.string,formAction:y.oneOfType([y.func,y.string]),href:y.any,LinkComponent:y.elementType,nativeButton:y.bool,onBlur:y.func,onClick:y.func,onContextMenu:y.func,onDragLeave:y.func,onFocus:y.func,onFocusVisible:y.func,onKeyDown:y.func,onKeyUp:y.func,onMouseDown:y.func,onMouseLeave:y.func,onMouseUp:y.func,onTouchEnd:y.func,onTouchMove:y.func,onTouchStart:y.func,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),tabIndex:y.number,TouchRippleProps:y.object,touchRippleRef:y.oneOfType([y.func,y.shape({current:y.shape({pulsate:y.func.isRequired,start:y.func.isRequired,stop:y.func.isRequired})})]),type:y.string});const Et=Fu;function mf(e){return typeof e.main=="string"}function gf(e,t=[]){if(!mf(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Ro(e=[]){return([,t])=>t&&gf(t,e)}function yf(e){return wt("MuiToggleButton",e)}const zt=Tt("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),Mo=F.createContext({});process.env.NODE_ENV!=="production"&&(Mo.displayName="ToggleButtonGroupContext");const Ao=F.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ao.displayName="ToggleButtonGroupButtonContext");function bf(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}const Bo=F.createContext(void 0);process.env.NODE_ENV!=="production"&&(Bo.displayName="RovingTabIndexContext");function na(){const e=F.useContext(Bo);if(e===void 0)throw new Error("MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.");return e}const xf=Object.is;function vf(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const o in e)if(n+=1,!xf(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}function ra(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function oa(e){return e&&e.ownerDocument||document}function Cf(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Sf=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End"];function wf(e){const{activeItemId:t,getDefaultActiveItemId:n,orientation:r,isRtl:o=!1,isItemFocusable:s=jf,wrap:a=!0}=e,[c,u]=F.useState(t),[p,f]=F.useState(t);let g=c;t!==p&&(f(t),t!==void 0&&t!==c&&(g=t,u(t)));const b=F.useRef(null),m=F.useRef(new Map),[x,h]=F.useState(0),C=F.useMemo(()=>No(m.current),[x]),E=sa(g,C,s,n),w=F.useRef(E);w.current=E;const T=F.useCallback(()=>{const d=No(m.current),A=sa(w.current,d,s,n);return la(d,A)},[n,s]),P=F.useCallback(()=>m.current,[]),_=Je(d=>{const A=m.current.get(d.id);vf(A??null,d)||(m.current.set(d.id,d),h(R=>R+1))}),O=Je(d=>{m.current.delete(d)&&h(A=>A+1)}),$=Je(d=>{u(d)}),j=F.useCallback(d=>w.current===d,[]),B=F.useCallback((d,A,R,D)=>{var re;const H=vr(m.current),Z=aa(H,d,A,R,D??s);return Z?((re=Z.element)==null||re.focus(),u(Z.id),Z):null},[s]),z=F.useCallback((d,A,R)=>({onFocus:Z=>{A==null||A(Z);const re=vr(m.current),ie=da(re,Z.target);ie!==-1&&u(re[ie].id)},onKeyDown:Z=>{if(R==null||R(Z),Z.defaultPrevented||Z.altKey||Z.shiftKey||Z.ctrlKey||Z.metaKey||!Sf.includes(Z.key))return;let re=r==="horizontal"?"ArrowLeft":"ArrowUp",ie=r==="horizontal"?"ArrowRight":"ArrowDown";r==="horizontal"&&o&&(re="ArrowRight",ie="ArrowLeft");const V=vr(m.current),k=ra(oa(b.current)),q=k===b.current;let G=ia(V,k,w.current),M="next";switch(Z.key){case re:M="previous",Z.preventDefault(),q&&(G=V.length);break;case ie:Z.preventDefault(),q&&(G=-1);break;case"Home":Z.preventDefault(),G=-1;break;case"End":Z.preventDefault(),M="previous",G=V.length;break;default:return}B(G,M,a)},ref:$f(d,Z=>{b.current=Z})}),[B,o,r,a]),S=F.useCallback(d=>{var Z;const A=vr(m.current),R=ra(oa(b.current)),H=R===b.current?-1:ia(A,R,w.current);return((Z=B(H,"next",!0,d))==null?void 0:Z.id)??null},[B]);return F.useMemo(()=>({activeItemId:E,focusNext:S,getActiveItem:T,getContainerProps:z,getItemMap:P,isItemActive:j,registerItem:_,setActiveItemId:$,unregisterItem:O}),[E,S,T,z,P,j,_,$,O])}function Tf(e){const t=na(),{activeItemId:n,registerItem:r,unregisterItem:o}=t,s=F.useRef(null),a=F.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),c=F.useRef(a);c.current=a;const u=F.useCallback(f=>{if(s.current=f,f==null){queueMicrotask(()=>{s.current==null&&o(e.id)});return}r({...c.current,element:f})},[e.id,r,o]),p=_o(e.ref,u);return Zt(()=>{s.current&&r({...a,element:s.current})},[a,r]),Zt(()=>{const f=e.id;return()=>{o(f)}},[e.id,o]),{ref:p,tabIndex:n===e.id?0:-1}}function sa(e,t,n,r){return e!=null?kf(e,t,n):Ef(t,n,r)}function kf(e,t,n){var o;const r=ua(t,e);return r===-1?ca(t,n):n(t[r])?t[r].id:((o=aa(t,r,"next",!1,n))==null?void 0:o.id)??null}function Ef(e,t,n){const r=n==null?void 0:n(e);if(r!=null){const o=la(e,r);if(o&&t(o))return o.id}return ca(e,t)}function ia(e,t,n){if(t){const r=da(e,t);if(r!==-1)return r}return ua(e,n)}function aa(e,t,n,r,o){const s=e.length-1;if(s===-1)return null;let a=!1,c=fa(t,s,n,r);const u=c;for(;c!==-1;){if(c===u){if(a)return null;a=!0}const p=e[c];if(!p||!o(p))c=fa(c,s,n,r);else return p}return null}function ca(e,t){var n;return((n=e.find(r=>t(r)))==null?void 0:n.id)??null}function la(e,t){return t==null?null:e.find(n=>n.id===t)??null}function ua(e,t){return t==null?-1:e.findIndex(n=>n.id===t)}function da(e,t){return t?e.findIndex(n=>{var r;return n.element===t||((r=n.element)==null?void 0:r.contains(t))}):-1}function No(e){const t=Array.from(e.values());if(t.every(o=>o.element==null))return t;const n=t.filter(Do).sort((o,s)=>_f(o.element,s.element)),r=t.filter(o=>!Do(o));return[...n,...r]}function vr(e){return No(e).filter(Do)}function fa(e,t,n,r=!0){return n==="next"?e===t?r?0:-1:e+1:e===0?r?t:-1:e-1}function jf(e){return e.element?e.focusableWhenDisabled?!0:!e.disabled&&!e.element.hasAttribute("disabled")&&e.element.getAttribute("aria-disabled")!=="true"&&e.element.hasAttribute("tabindex"):!1}function Do(e){return e.element!=null&&e.element.isConnected}function _f(e,t){if(e===t)return 0;const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function $f(...e){return t=>{e.forEach(n=>{Cf(n??null,t)})}}function If(e,t){const{children:n,disabled:r=!1,selected:o=!1,value:s}=e,a=na(),c=Tf({id:s,ref:t,disabled:r,selected:o}),p=a.getItemMap().size===0&&o?0:c.tabIndex;return F.cloneElement(F.Children.only(n),{...c,tabIndex:n.props.tabIndex??p})}const Pf=F.forwardRef(If),Of=e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:s,color:a}=e,c={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${De(s)}`,a]};return qt(c,yf,t)},Rf=Ge(Oo,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${De(n.size)}`]]}})(Et(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${zt.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${zt.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(Ro()).map(([t])=>({props:{color:t},style:{[`&.${zt.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),Lo=F.forwardRef(function(t,n){const{value:r,isRovingTabIndex:o,...s}=F.useContext(Mo),a=F.useContext(Ao),c=Vn({...s,selected:bf(t.value,r)},t),u=Vt({props:c,name:"MuiToggleButton"}),{children:p,className:f,color:g="standard",disabled:b=!1,disableFocusRipple:m=!1,fullWidth:x=!1,onChange:h,onClick:C,selected:E,size:w="medium",value:T,...P}=u,_={...u,color:g,disabled:b,disableFocusRipple:m,fullWidth:x,size:w},O=Of(_),$=z=>{C&&(C(z,T),z.defaultPrevented)||h&&h(z,T)},j=a||"",B=i.jsx(Rf,{className:Ae(s.className,O.root,f,j),internalNativeButton:!0,disabled:b,focusRipple:!m,ref:o?void 0:n,onClick:$,onChange:h,value:T,ownerState:_,"aria-pressed":E,...P,children:p});return o?i.jsx(Pf,{disabled:b,selected:E,ref:n,value:T,children:B}):B});process.env.NODE_ENV!=="production"&&(Lo.propTypes={children:y.node,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["standard","primary","secondary","error","info","success","warning"]),y.string]),disabled:y.bool,disableFocusRipple:y.bool,disableRipple:y.bool,fullWidth:y.bool,onChange:y.func,onClick:y.func,selected:y.bool,size:y.oneOfType([y.oneOf(["small","medium","large"]),y.string]),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),value:y.any.isRequired});function Mf(e){return F.Children.toArray(e).filter(t=>F.isValidElement(t))}function Af(e){return wt("MuiToggleButtonGroup",e)}const Te=Tt("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","fullWidth","firstButton","lastButton","middleButton"]),Bf=e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e;return qt({root:["root",n,r&&"fullWidth"],grouped:["grouped",o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]},Af,t)},Nf=Ge("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Te.grouped}`]:t.grouped},{[`& .${Te.firstButton}`]:t.firstButton},{[`& .${Te.lastButton}`]:t.lastButton},{[`& .${Te.middleButton}`]:t.middleButton},t.root,n.orientation==="vertical"&&t.vertical,n.fullWidth&&t.fullWidth]}})(Et(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${Te.grouped}`]:{[`&.${Te.selected} + .${Te.grouped}.${Te.selected}`]:{borderTop:0,marginTop:0}},[`& .${Te.firstButton},& .${Te.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${Te.lastButton},& .${Te.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${Te.lastButton}.${zt.disabled},& .${Te.middleButton}.${zt.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${Te.grouped}`]:{[`&.${Te.selected} + .${Te.grouped}.${Te.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${Te.firstButton},& .${Te.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${Te.lastButton},& .${Te.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${Te.lastButton}.${zt.disabled},& .${Te.middleButton}.${zt.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),pa=F.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiToggleButtonGroup"}),{children:o,className:s,color:a="standard",disabled:c=!1,exclusive:u=!1,fullWidth:p=!1,onChange:f,orientation:g="horizontal",size:b="medium",value:m,...x}=r,h={...r,disabled:c,fullWidth:p,orientation:g,size:b},C=Bf(h),E=Au(),w=F.useCallback((z,S)=>{if(!f)return;const d=m&&m.indexOf(S);let A;m&&d>=0?(A=m.slice(),A.splice(d,1)):A=m?m.concat(S):[S],f(z,A)},[f,m]),T=F.useCallback((z,S)=>{f&&f(z,m===S?null:S)},[f,m]),P=F.useMemo(()=>({className:C.grouped,onChange:u?T:w,value:m,size:b,fullWidth:p,color:a,disabled:c,isRovingTabIndex:!0}),[C.grouped,u,T,w,m,b,p,a,c]),_=Mf(o),O=_.length,$=z=>{const S=z===0,d=z===O-1;return S&&d?"":S?C.firstButton:d?C.lastButton:C.middleButton},j=wf({orientation:g,isRtl:E}),B=j.getContainerProps(n,x.onFocus,x.onKeyDown);return i.jsx(Nf,{role:"group",className:Ae(C.root,s),ownerState:h,...x,...B,children:i.jsx(Bo.Provider,{value:j,children:i.jsx(Mo.Provider,{value:P,children:_.map((z,S)=>(process.env.NODE_ENV!=="production"&&fn.isFragment(z)&&console.error(["MUI: The ToggleButtonGroup component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
226
|
+
`)),i.jsx(Ao.Provider,{value:$(S),children:z},S)))})})})});process.env.NODE_ENV!=="production"&&(pa.propTypes={children:y.node,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["standard","primary","secondary","error","info","success","warning"]),y.string]),disabled:y.bool,exclusive:y.bool,fullWidth:y.bool,onChange:y.func,onFocus:y.func,onKeyDown:y.func,orientation:y.oneOf(["horizontal","vertical"]),size:y.oneOfType([y.oneOf(["small","medium","large"]),y.string]),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),value:y.any});function Df(e){return wt("MuiSvgIcon",e)}Tt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Lf={transition:"none"};function Ff(e,t){return e==="always"?t:e==="system"?{"@media (prefers-reduced-motion: reduce)":t}:null}const Vf={},zf=["all"],Wf={};function Fo(e,t){var r;const n=t??Lf;return Ff((r=e.motion)==null?void 0:r.reducedMotion,n)}function Cr(e,t=zf,n=Wf){var a,c;const r=(c=(a=e.transitions)==null?void 0:a.create)==null?void 0:c.call(a,t,n),o=Fo(e);if(r===void 0)return o??Vf;const s={transition:r};return o?{...s,...o}:s}const Uf=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${De(t)}`,`fontSize${De(n)}`]};return qt(o,Df,r)},qf=Ge("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${De(n.color)}`],t[`fontSize${De(n.fontSize)}`]]}})(Et(({theme:e})=>{var t,n,r,o,s,a,c,u,p,f,g,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,...Cr(e,"fill",{duration:(n=(t=(e.vars??e).transitions)==null?void 0:t.duration)==null?void 0:n.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(r=e.typography)==null?void 0:r.pxToRem)==null?void 0:o.call(r,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((a=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:a.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var x,h;return{props:{color:m},style:{color:(h=(x=(e.vars??e).palette)==null?void 0:x[m])==null?void 0:h.main}}}),{props:{color:"action"},style:{color:(f=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(b=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Sr=F.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:a="inherit",component:c="svg",fontSize:u="medium",htmlColor:p,inheritViewBox:f=!1,titleAccess:g,viewBox:b="0 0 24 24",...m}=r,x=F.isValidElement(o)&&o.type==="svg",h={...r,color:a,component:c,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:b,hasSvgAsChild:x},C={};f||(C.viewBox=b);const E=Uf(h);return i.jsxs(qf,{as:c,className:Ae(E.root,s),focusable:"false",color:p,"aria-hidden":g?void 0:!0,role:g?"img":void 0,ref:n,...C,...m,...x&&o.props,ownerState:h,children:[x?o.props.children:o,g?i.jsx("title",{children:g}):null]})});process.env.NODE_ENV!=="production"&&(Sr.propTypes={children:y.node,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),y.string]),component:y.elementType,fontSize:y.oneOfType([y.oneOf(["inherit","large","medium","small"]),y.string]),htmlColor:y.string,inheritViewBox:y.bool,shapeRendering:y.string,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),titleAccess:y.string,viewBox:y.string}),Sr.muiName="SvgIcon";function xe(e,t){function n(r,o){return i.jsx(Sr,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:o,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Sr.muiName,F.memo(F.forwardRef(n))}const ha=xe(i.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"DoneOutlined");function Yf({theme:e,...t}){const n=ht in e?e[ht]:void 0;return i.jsx(Cn,{...t,themeId:n?ht:void 0,theme:n||e})}const wr={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"};process.env.NODE_ENV!=="production"&&(y.string,y.string,y.string,y.string,y.string,y.oneOf(["dark","light","system"]),y.string,y.string);const{CssVarsProvider:Hf}=Gu({themeId:ht,theme:()=>yr({cssVariables:!0}),colorSchemeStorageKey:wr.colorSchemeStorageKey,modeStorageKey:wr.modeStorageKey,defaultColorScheme:{light:wr.defaultLightColorScheme,dark:wr.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:Di(e.palette,e.typography)};return t.unstable_sx=function(r){return Dt({sx:r,theme:this})},t}}),Gf=Hf;function Kf({theme:e,...t}){const n=F.useMemo(()=>{if(typeof e=="function")return e;const r=ht in e?e[ht]:e;return"colorSchemes"in r?null:"vars"in r?e:{...e,vars:null}},[e]);return n?i.jsx(Yf,{theme:n,...t}):i.jsx(Gf,{theme:e,...t})}const Xf=xe(i.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Qf({tooltipLabel:e}){return i.jsx(l.Tooltip,{title:e,children:i.jsx(l.IconButton,{disableRipple:!0,sx:{color:"inherit"},children:i.jsx(Xf,{})})})}function Vo({title:e,color:t}){return i.jsx(Qf,{color:t,tooltipLabel:e})}const Jf=xe(i.jsx("path",{d:"M22 16v-2l-8.5-5V3.5c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5V9L2 14v2l8.5-2.5V19L8 20.5V22l4-1 4 1v-1.5L13.5 19v-5.5z"}),"AirplanemodeActive"),Zf=xe(i.jsx("path",{d:"M10.5 7.67V3.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V9l8.5 5v2l-4.49-1.32zm9.28 14.94 1.41-1.41-7.69-7.7-3.94-3.94-6.75-6.75-1.42 1.41 6.38 6.38L2 14v2l8.5-2.5V19L8 20.5V22l4-1 4 1v-1.5L13.5 19v-2.67z"}),"AirplanemodeInactive");function zo({netEnabled:e,debug:t=!1,isAndroid:n}){const{i18nRef:r}=v.useContext(ve),[o,s]=v.useState(!1),[a,c]=v.useState(""),u=()=>{dn("/api/net/disable",t)},p=(f,g)=>{e?u():s(!0)};return v.useEffect(()=>{ke("/api/version").then(f=>f.json).then(f=>c(f.product_name)).catch(f=>console.error("Error :",f))},[]),i.jsxs(l.Box,{children:[i.jsxs(l.Grid,{container:!0,spacing:1,sx:{alignItems:"center"},children:[i.jsx(l.Grid,{children:i.jsxs(pa,{onChange:f=>{p()},exclusive:!0,color:"secondary",size:"small",value:e,sx:{background:f=>ft(f.palette.common.white,.3),height:"34px"},children:[(!n||!e)&&i.jsxs(Lo,{disableFocusRipple:!0,value:!1,sx:{color:"white","&.Mui-selected":{color:"white",backgroundColor:f=>ft(f.palette.secondary.main,1)},"&.Mui-selected:hover":{backgroundColor:f=>ft(f.palette.secondary.main,1),color:"white"}},children:[n?i.jsx(Jf,{fontSize:"small",sx:{paddingRight:1}}):!e&&i.jsx(ha,{fontSize:"small",sx:{paddingRight:1}}),U("components:header:offline_mode",r.current)]}),(!n||e)&&i.jsxs(Lo,{disableFocusRipple:!0,value:!0,sx:{color:"white","&.Mui-selected":{color:"white",backgroundColor:f=>ft(f.palette.secondary.main,1)},"&.Mui-selected:hover":{backgroundColor:f=>ft(f.palette.secondary.main,1),color:"white"}},children:[n?i.jsx(Zf,{fontSize:"small",sx:{paddingRight:1}}):e&&i.jsx(ha,{fontSize:"small",sx:{paddingRight:1}}),U("components:header:online_mode",r.current)]})]})}),i.jsx(l.Grid,{children:i.jsx(Vo,{title:U("components:header:tooltip_offline_mode",r.current).replace("{1}",a)})})]}),i.jsx(Wr,{internetDialogOpen:o,setInternetDialogOpen:s})]})}const ma=xe(i.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),ep=xe(i.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),tp=xe(i.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");function np({i18n:e,netEnabled:t,debug:n}){const[r,o]=v.useState(!1),[s,a]=v.useState(!1),[c,u]=v.useState([]);v.useEffect(()=>{(async()=>{const g=await ke("/api/list-clients",n);g.ok&&u(g.json.filter(b=>!b.exclude_from_menu&&(n||!b.requires.debug)))})().then()},[n]);const p=f=>{ke(`/api/debug/${n} ? "disable" : "enable"}`).then(()=>{f.stopPropagation(),f.preventDefault()})};return i.jsxs(l.Box,{sx:{m:0,mr:2},children:[i.jsx(l.IconButton,{onClick:f=>o(!0),children:i.jsx(ma,{})}),i.jsx(l.Drawer,{open:r,onClose:()=>o(!1),slotProps:{paper:{sx:{width:"auto",overflow:"hidden"}}},children:i.jsx(l.Box,{sx:{width:"100%",minHeight:"98vh",minWidth:"20vw",m:0,p:0},role:"presentation",children:i.jsx(l.List,{sx:{height:"100%",width:"100%"},children:i.jsxs(l.Stack,{direction:"column",spacing:0,sx:{height:"100%",width:"100%",justifyContent:"space-between",alignItems:"flex-start"},children:[i.jsx(l.Box,{sx:{width:"100%"},children:c.map((f,g)=>i.jsx(l.ListItem,{disablePadding:!0,children:i.jsx(l.ListItemButton,{disabled:f.requires.net&&!t.current,onClick:()=>{window.location.href=f.url},children:i.jsx(l.ListItemText,{primary:U(`pages:${f.id}:title`,e)})})},g))}),i.jsxs(l.Box,{children:[i.jsx(l.ListItem,{disablePadding:!0,children:i.jsx(l.ListItemButton,{onClick:()=>{window.location.href="/clients/settings"},children:i.jsx(l.ListItemText,{primary:U("pages:core-settings:title",e)})})}),i.jsx(l.ListItem,{sx:{width:"auto"},disablePadding:!0,children:i.jsxs(l.ListItemButton,{onClick:()=>a(f=>!f),children:[i.jsx(l.ListItemText,{primary:U("components:header:advanced",e)}),s?i.jsx(ep,{}):i.jsx(tp,{})]})}),i.jsx(l.Collapse,{in:s,timeout:"auto",unmountOnExit:!0,children:i.jsx(l.List,{component:"div",disablePadding:!0,children:i.jsxs(l.ListItemButton,{onClick:p,sx:{pl:4},children:[i.jsx(l.ListItemText,{primary:U("components:header:experimental_mode",e)}),i.jsx(l.Switch,{edge:"end",onChange:p,checked:n})]})})}),i.jsx(l.Box,{sx:{visibility:"hidden",position:"absolute",whiteSpace:"nowrap",top:0,left:0},children:i.jsx(l.List,{component:"div",disablePadding:!0,children:i.jsxs(l.ListItemButton,{onClick:p,sx:{pl:4},children:[i.jsx(l.ListItemText,{primary:U("components:header:experimental_mode",e)}),i.jsx(l.Switch,{edge:"end",onChange:p,checked:n})]})})})]})]})})})})]})}const Tr=v.createContext({clientConfig:{},setClientConfig:()=>{}});function rp({titleLabel:e,isOpen:t,closeFn:n,children:r,theme:o,size:s="md",fullWidth:a=!0,showInternetSwitch:c=!1,isLoading:u=!1}){var E,w,T,P,_;const p=o?l.ThemeProvider:v.Fragment,f=o?{theme:o}:{},{enabledRef:g}=v.useContext(ut),{i18nRef:b}=v.useContext(ve),{debugRef:m}=v.useContext(xt),{clientConfigRef:x}=v.useContext(Tr),h=((T=(w=(E=x.current._global)==null?void 0:E.find(O=>O.id==="internetConfig"))==null?void 0:w.fields.find(O=>O.id==="internetConnectionAccess"))==null?void 0:T.value)??!0,C=(O,$)=>{u&&($==="backdropClick"||$==="escapeKeyDown")||n()};return i.jsx(p,{...f,children:i.jsxs(l.Dialog,{open:t,onClose:C,sx:{overflow:"hidden"},slotProps:{sx:{overflow:"hidden !important",display:"flex",flexDirection:"column"},paper:{component:"form"}},fullWidth:a,maxWidth:s,children:[i.jsx(l.AppBar,{position:"sticky",sx:{position:"relative",borderTopLeftRadius:4,borderTopRightRadius:4,backgroundColor:(_=(P=o==null?void 0:o.palette)==null?void 0:P.secondary)==null?void 0:_.main},children:i.jsxs(l.Toolbar,{sx:{justifyContent:"space-between"},children:[i.jsx(l.Typography,{variant:"h6",component:"div",children:e}),h&&c&&i.jsx(zo,{i18n:b.current,netEnabled:g.current,debug:m.current})]})}),r]})})}function op(e){return wt("MuiCircularProgress",e)}Tt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDisableShrink"]);const nt=44;let ga=!1,ya=!1;const Wo=Ue.keyframes`
|
|
227
227
|
0% {
|
|
228
228
|
transform: rotate(0deg);
|
|
229
229
|
}
|
|
@@ -250,8 +250,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
250
250
|
animation: ${Wo} 1.4s linear infinite;
|
|
251
251
|
`:null,ip=typeof Uo!="string"?Ue.css`
|
|
252
252
|
animation: ${Uo} 1.4s ease-in-out infinite;
|
|
253
|
-
`:null,ap=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,s={root:["root",n,`color${De(r)}`],svg:["svg"],track:["track"],circle:["circle",o&&"circleDisableShrink"]};return qt(s,op,t)},cp=Ge("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${De(n.color)}`]]}})(Et(({theme:e})=>{const t=Fo(e,{animation:"none"});return{display:"inline-block",variants:[{props:{variant:"determinate"},style:{...Cr(e,"transform")}},{props:{variant:"indeterminate"},style:sp||{animation:`${Wo} 1.4s linear infinite`}},...t?[{props:{variant:"indeterminate"},style:t}]:[],...Object.entries(e.palette).filter(Ro()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}}))]}})),lp=Ge("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),up=Ge("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(Et(({theme:e})=>{const t=Fo(e,{animation:"none"});return{stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{...Cr(e,"stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:n})=>n.variant==="indeterminate"&&!n.disableShrink,style:ip||{animation:`${Uo} 1.4s ease-in-out infinite`}},...t?[{props:({ownerState:n})=>n.variant==="indeterminate"&&!n.disableShrink,style:t}]:[]]}})),dp=Ge("circle",{name:"MuiCircularProgress",slot:"Track"})(Et(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),qo=F.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:a=!1,enableTrackSlot:c=!1,min:u,max:p,size:f=40,style:g,thickness:b=3.6,value:m=r.min??0,variant:x="indeterminate",...h}=r;process.env.NODE_ENV!=="production"&&!ga&&x==="indeterminate"&&(u!==void 0||p!==void 0)&&(console.warn("MUI: You have provided the `min` or `max` props with an 'indeterminate' variant. These props will have no effect."),ga=!0);const C=u??0,E=p??100,w={...r,color:s,disableShrink:a,size:f,thickness:b,value:m,variant:x,enableTrackSlot:c},T=ap(w),P={},_={},O={};if(x==="determinate"){const $=2*Math.PI*((nt-b)/2);process.env.NODE_ENV!=="production"&&!ya&&(m<C||m>E||C>=E)&&(console.error(`MUI: The min, max, and value props in CircularProgress should be numbers where min < max and min <= value <= max. Received min=${C}, max=${E}, value=${m}.`),ya=!0);const j=E-C;P.strokeDasharray=$.toFixed(3),P.strokeDashoffset=j>0?`${((E-m)/j*$).toFixed(3)}px`:`${$.toFixed(3)}px`,_.transform="rotate(-90deg)",O["aria-valuenow"]=m,O["aria-valuemin"]=C,O["aria-valuemax"]=E}return i.jsx(cp,{className:Ae(T.root,o),style:{width:f,height:f,..._,...g},ownerState:w,ref:n,role:"progressbar",...O,...h,children:i.jsxs(lp,{className:T.svg,ownerState:w,viewBox:`${nt/2} ${nt/2} ${nt} ${nt}`,children:[c?i.jsx(dp,{className:T.track,ownerState:w,cx:nt,cy:nt,r:(nt-b)/2,fill:"none",strokeWidth:b,"aria-hidden":"true"}):null,i.jsx(up,{className:T.circle,style:P,ownerState:w,cx:nt,cy:nt,r:(nt-b)/2,fill:"none",strokeWidth:b})]})})});process.env.NODE_ENV!=="production"&&(qo.propTypes={classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["inherit","primary","secondary","error","info","success","warning"]),y.string]),disableShrink:Qr(y.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),enableTrackSlot:y.bool,max:y.number,min:y.number,size:y.oneOfType([y.number,y.string]),style:y.object,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),thickness:y.number,value:y.number,variant:y.oneOf(["determinate","indeterminate"])});function kr({label:e,actionFn:t,isDisabled:n,variant:r,isLoading:o,loadingLabel:s,sx:a}){return i.jsx(l.Button,{onClick:t,disabled:n||o,startIcon:o?i.jsx(qo,{size:16,color:"inherit"}):null,color:"primary",variant:r,sx:a,children:o&&s?s:e})}function fp({actionFn:e,actionLabel:t,closeFn:n,closeLabel:r,isDisabled:o,closeOnAction:s=!0,onlyCloseButton:a=!1,actionVariant:c,closeVariant:u,isLoading:p,loadingLabel:f}){return i.jsxs(l.DialogActions,{children:[i.jsx(kr,{actionFn:n,isDisabled:!1,label:r,variant:u,isLoading:p,loadingLabel:f}),a?null:i.jsx(kr,{actionFn:()=>{e(),s&&n()},isDisabled:o,label:t,variant:c})]})}const pp=xe(i.jsx("path",{d:"M14.59 8 12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"HighlightOff"),hp=xe(i.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),ba=xe(i.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),mp={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function xa(e){const{onSelectAllClick:t,numSelected:n,order:r,orderBy:o,rowCount:s,onRequestSort:a,columns:c,columnFilters:u,setColumnFilter:p,showColumnFilters:f,groupOperations:g,checkboxSelection:b}=e,m=$=>j=>{a(j,$)},[x,h]=v.useState(null),[C,E]=v.useState(null),w=($,j)=>{$.stopPropagation(),h($.currentTarget),E(j)},T=()=>{h(null),E(null)},P=$=>{const j=$.target.value;p(C,j)},_=!!x,O=_?"filter-popover":void 0;return i.jsxs(l.TableHead,{children:[i.jsxs(l.TableRow,{children:[(b||g)&&i.jsx(l.TableCell,{padding:"checkbox",children:i.jsx(l.Checkbox,{color:"primary",indeterminate:n>0&&n<s,checked:s>0&&n===s,onChange:t,slotProps:{"aria-label":"select all rows"}})}),c.map($=>i.jsx(l.TableCell,{align:$.alignRight?"right":"left",padding:$.disablePadding?"none":"normal",sortDirection:o===$.field?r:!1,sx:{width:$.width||"auto",minWidth:$.minWidth||"none",flex:$.flex||"none"},children:i.jsxs(l.Box,{sx:{display:"flex",alignItems:"center",justifyContent:$.alignRight?"flex-end":"flex-start"},children:[i.jsxs(l.TableSortLabel,{active:o===$.field,direction:o===$.field?r:"asc",onClick:m($.field),children:[$.headerName,o===$.field?i.jsx(l.Box,{component:"span",sx:mp,children:r==="desc"?"sorted descending":"sorted ascending"}):null]}),f&&!$.numeric&&i.jsx(l.IconButton,{size:"small",onClick:j=>w(j,$.field),sx:{ml:.5,p:.5},color:u[$.field]?"primary":"default",children:i.jsx(hp,{fontSize:"small"})})]})},$.field))]}),i.jsx(l.Popover,{id:O,open:_,anchorEl:x,onClose:T,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:i.jsx(l.Box,{sx:{p:2},children:i.jsx(l.TextField,{label:`Filter ${C}`,variant:"outlined",value:C?u[C]:"",onChange:P,size:"small",autoFocus:!0,slotProps:{input:{endAdornment:C&&u[C]&&i.jsx(l.IconButton,{size:"small",onClick:$=>{$.stopPropagation(),p(C,""),T()},edge:"end",sx:{color:"primary.main","&:hover":{backgroundColor:"action.hover"}},children:i.jsx(ba,{fontSize:"small"})})}}})})})]})}xa.propTypes={onRequestSort:y.func.isRequired,order:y.oneOf(["asc","desc"]).isRequired,orderBy:y.string.isRequired,columns:y.array.isRequired,setColumnFilter:y.func.isRequired,columnFilters:y.object.isRequired};function va(e){const{numSelected:t,selectedIds:n,clearSelection:r,tableTitle:o,groupOperations:s,dataRows:a}=e,c=v.useMemo(()=>{if(s&&s.length>0){const u={selectedIds:n,numSelected:t,clearSelection:r},p={};return s.forEach(f=>{p[f.label]=()=>f.action(u,a)}),p}},[n,t,a]);return i.jsxs(l.Toolbar,{sx:{pl:{sm:2},pr:{xs:1,sm:1},...t>0&&{bgcolor:u=>ft(u.palette.primary.main,u.palette.action.activatedOpacity)}},children:[t>0?i.jsxs(l.Typography,{variant:"subtitle1",component:"div",sx:{color:"inherit",flex:"1 1 100%"},children:[t," selected"]}):o&&i.jsx(l.Typography,{sx:{flex:"1 1 100%"},variant:"h6",id:"tableTitle",component:"div",children:o}),t>0?i.jsx(i.Fragment,{children:s&&s.map((u,p)=>{const f=u.icon,g=c[u.label];return i.jsx(l.Tooltip,{title:u.label,children:i.jsx(l.IconButton,{onClick:g,disabled:t===0,children:i.jsx(f,{sx:{fontSize:28,color:"black"}})})},p)})}):i.jsx(i.Fragment,{})]})}va.propTypes={numSelected:y.number.isRequired,selectedIds:y.array.isRequired,clearSelection:y.func.isRequired};function gp(e,t){return e==="desc"?(n,r)=>String(r[t]??"").localeCompare(String(n[t]??""),void 0,{sensitivity:"base"}):(n,r)=>String(n[t]??"").localeCompare(String(r[t]??""),void 0,{sensitivity:"base"})}function Ca({columns:e,rows:t,defaultFilter:n,setDefaultFilter:r,filterPreset:o,showColumnFilters:s,tableTitle:a,groupOperations:c,sx:u,theme:p,onRowSelectionModelChange:f,checkboxSelection:g,initialState:b,preSelections:m}){var M,Q;const[x,h]=v.useState(b!=null&&b.sorting?(M=b==null?void 0:b.sorting)==null?void 0:M.order:"asc"),[C,E]=v.useState(b!=null&&b.sorting?(Q=b==null?void 0:b.sorting)==null?void 0:Q.field:"date"),[w,T]=v.useState([]),[P,_]=v.useState([]),O=p?l.ThemeProvider:v.Fragment,$=p?{theme:p}:{},[j,B]=v.useState(0),z=v.useRef(null),[S,d]=v.useState(0),A=v.useRef(null);v.useEffect(()=>{if(!A.current)return;const N=new ResizeObserver(I=>{for(const U of I)d(U.contentRect.height)});return N.observe(A.current),()=>N.disconnect()},[o]),v.useEffect(()=>{if(!z.current)return;const N=new ResizeObserver(I=>{for(const U of I)B(U.contentRect.height)});return N.observe(z.current),()=>N.disconnect()},[o]);const[R,D]=v.useState(()=>{const N={};return e.forEach(I=>{N[I.field]=""}),N}),G=(N,I)=>{h(C===I&&x==="asc"?"desc":"asc"),E(I)};v.useEffect(()=>{m&&T(m)},[m]);const J=N=>{const I=N.target.checked?K.map(U=>U.id):[];T(I),f&&f(I)},oe=(N,I)=>{const U=w.indexOf(I);let X=[];U===-1?X=X.concat(w,I):U===0?X=X.concat(w.slice(1)):U===w.length-1?X=X.concat(w.slice(0,-1)):U>0&&(X=X.concat(w.slice(0,U),w.slice(U+1))),T(X),f&&f(X)},ie=()=>{T([]),f&&f([])},V=(N,I)=>{D(U=>({...U,[N]:I}))},k=N=>{_(I=>I.includes(N)?I.filter(U=>U!==N):[...I,N])},q=v.useMemo(()=>{if(!o||P.length===0)return()=>!0;const N=P.map(I=>{const U=o[I];return U&&typeof U.filter=="function"?U.filter:(console.warn(`Invalid filter function found for index ${I}`),()=>!1)});return I=>N.some(U=>U(I))},[P,o]),K=v.useMemo(()=>[...t].filter(N=>{if(n&&typeof n=="function"&&!n(N)||!q(N))return!1;for(const I in R){const U=R[I].toLowerCase();if(U&&!String(N[I]).toLowerCase().includes(U))return!1}return!0}).sort(gp(x,C)),[x,C,t,n,q,R]);return i.jsx(O,{...$,children:i.jsxs(l.Box,{id:"test",sx:{width:"100%",height:`calc(100% - ${j+S}px)`},children:[o&&i.jsx(l.Box,{ref:z,sx:{display:"flex",gap:1,flexWrap:"wrap",p:1},children:i.jsx(l.Stack,{direction:"row",spacing:1,children:o.map((N,I)=>{const U=P.includes(I);return i.jsx(l.Chip,{label:i.jsxs(l.Box,{sx:{display:"flex",alignItems:"center",gap:U?.5:0},children:[i.jsx("span",{children:N.label}),U&&i.jsx(pp,{sx:{fontSize:24}})]}),variant:U?"filled":"outlined",color:"secondary",onClick:()=>k(I)},N.label)})})}),i.jsxs(l.Box,{ref:A,children:[c&&i.jsx(va,{numSelected:w.length,selectedIds:w,clearSelection:ie,tableTitle:a,groupOperations:c,dataRows:t}),!c&&a&&i.jsx(l.Toolbar,{sx:{pl:{sm:2},pr:{xs:1,sm:1}},children:i.jsx(l.Typography,{sx:{flex:"1 1 100%"},variant:"h6",id:"tableTitle",component:"div",children:a})})]}),i.jsxs(l.TableContainer,{component:l.Paper,sx:u||{height:"100%"},children:[" ",i.jsxs(l.Table,{stickyHeader:!0,"aria-label":"pan table",sx:{width:"100%"},children:[i.jsx(xa,{numSelected:w.length,order:x,orderBy:C,onSelectAllClick:J,onRequestSort:G,rowCount:K.length,columns:e,setColumnFilter:V,columnFilters:R,showColumnFilters:s,groupOperations:c,checkboxSelection:g}),i.jsxs(l.TableBody,{sx:{verticalAlign:"top"},children:[K.map((N,I)=>{const U=w.includes(N.id);return i.jsxs(l.TableRow,{hover:!0,onClick:X=>{(g||c)&&oe(X,N.id)},role:"checkbox",tabIndex:-1,selected:U,children:[(g||c)&&i.jsx(l.TableCell,{padding:"checkbox",children:i.jsx(l.Checkbox,{color:"primary",checked:U})}),e.map(X=>i.jsx(l.TableCell,{align:X.alignRight?"right":"left",sx:{whiteSpace:"normal",wordBreak:"break-word"},children:X.renderCell?X.renderCell({row:N,id:N.id,field:X.field}):N[X.field]},X.field))]},N.id)}),i.jsx(l.TableRow,{sx:{height:"100%"},children:i.jsx(l.TableCell,{colSpan:e.length,sx:{padding:0,borderBottom:"none",height:"100%"}})})]})]})]})]})})}const Sa=xe(i.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5z"}),"FileDownloadOutlined"),yp=xe(i.jsx("path",{d:"M5 18h14v2H5zm4.6-2.7L5 10.7l2-1.9 2.6 2.6L17 4l2 2z"}),"FileDownloadDone"),bp=xe(i.jsx("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update"),xp=xe(i.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"AddOutlined"),vp=xe(i.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBackOutlined"),Cp=xe(i.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"BlockOutlined"),wa=xe(i.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Sp=xe(i.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"CheckOutlined"),wp=xe(i.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"}),"EditOutlined"),Tp=xe(i.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"ErrorOutlined"),kp=xe(i.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),Ep=xe(i.jsx("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H8V4h12zM10 9h8v2h-8zm0 3h4v2h-4zm0-6h8v2h-8z"}),"LibraryBooksOutlined"),jp=xe(i.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVertOutlined"),_p=xe(i.jsx("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H8V4h12zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm12 6V9c0-.55-.45-1-1-1h-2v5h2c.55 0 1-.45 1-1m-2-3h1v3h-1zm4 2h1v-1h-1V9h1V8h-2v5h1zm-8 0h1c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9v5h1zm0-2h1v1h-1z"}),"PictureAsPdfOutlined"),$p=xe(i.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonUnchecked"),Ip=xe(i.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7zm-6 .67 2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAltOutlined"),Pp=async(e,t)=>{const n=await Ee("/api/burrito/metadata/summaries",t.current);e(n.json)};function Op({downloadedType:e="org",downloadFunction:t,sources:n,showColumnFilters:r,tableTitle:o,sx:s,theme:a,preSelected:c=[],topicsFilter:u=["pushing2sb","tc-ready"],showFilterButtons:p,onDownloadingChange:f,languageLookup:g=[]}){const{i18nRef:b}=v.useContext(ve),{debugRef:m}=v.useContext(xt),[x,h]=v.useState(0),C=v.useRef(0),[E,w]=v.useState([]),[T,P]=v.useState(null),[_,O]=v.useState({}),[$,j]=v.useState(!0),B=v.useRef(null),[z,S]=v.useState(0),[d,A]=v.useState(!1),{sourceWhitelist:R,filterExample:D,listMode:G}=v.useMemo(()=>{if(Array.isArray(n))return{listMode:!1,sourceWhitelist:n,filterExample:n.map(([M,Q,N])=>({label:Q,icon:N||i.jsx($p,{}),filter:I=>!0}))};if(n&&typeof n=="object"){const M=[];for(const[Q,N]of Object.entries(n))for(const I of Object.keys(N))M.push([`${Q}/${I}`,I]);return{listMode:!0,sourceWhitelist:M,filterExample:[]}}return{listMode:!1,sourceWhitelist:[],filterExample:[]}},[n]),J=v.useMemo(()=>Object.fromEntries(g.map(M=>[M.id,M.endonym])),[g]);v.useEffect(()=>{D.length>0&&x===null&&h(0)},[D,x]),v.useEffect(()=>{if(!B.current)return;const M=new ResizeObserver(Q=>{for(const N of Q)S(N.contentRect.height)});return M.observe(B.current),()=>M.disconnect()},[D]);const oe=v.useMemo(()=>{var M;return x!==null?(M=D[x])==null?void 0:M.filter:null},[x,D]);v.useEffect(()=>{(async()=>{j(!0),P(null);const Q=++C.current;Pp(O,m);let N=[];if(G)for(let I=0;I<R.length;I++){let U=R[I],X=U[0].split("/"),ne;if(e==="org"&&(ne=await Ee(`/api/gitea/remote-repos/${U[0]}`,m.current)),e==="user"&&(ne=await Ee(`/api/gitea/user-remote-repos/${U[0]}`,m.current)),Q!==C.current)return;if(ne.ok&&ne.json.length>0)if(G){const te=ne.json.filter(Y=>n[X[0]][X[1]].includes(Y.name)).map(Y=>({...Y,source:U[0]}));N=[...N,...te]}else{const te=ne.json.map(Y=>({...Y,source:U[0]}));N=[...N,...te]}}else{let I=R[x],U=I[0].split("/"),X;if(e==="org"&&(X=await Ee(`/api/gitea/remote-repos/${I[0]}`,m.current)),e==="user"&&(X=await Ee(`/api/gitea/user-remote-repos/${I[0]}`,m.current)),Q!==C.current)return;if(X.ok&&X.json.length>0)if(G){const ne=X.json.filter(te=>n[U[0]][U[1]].includes(te.name)).map(te=>({...te,source:I[0]}));N=[...N,...ne]}else{const ne=X.json.map(te=>({...te,source:I[0]}));N=[...N,...ne]}}N.length>0?(j(!1),A(!1),w(N)):(j(!1),A(!0),qe.enqueueSnackbar(W("library:pankosmia-rcl:catalog_empty",b.current),{variant:"error"}))})()},[R,x]),v.useEffect(()=>{if(E.length===0)return;(async()=>{const Q={};for(const N of E)if(_[`${N.source}/${N.name}`]){const U=_[`${N.source}/${N.name}`].timestamp,X=Date.parse(N.released)/1e3;Q[`${N.source}/${N.name}`]=X-U>0?"updatable":"downloaded"}else Q[`${N.source}/${N.name}`]="notDownloaded";P(Q)})()},[E,_]),v.useEffect(()=>{if(!T)return;const M=Object.values(T).includes("downloading");f==null||f(M)},[T,f]);const ie=v.useCallback(async(M,Q,N)=>{P(U=>({...U,[Q]:"downloading"})),qe.enqueueSnackbar(`${W("pages:core-remote-resources:downloading",b.current)} ${M.row.abbreviation}`,{variant:"info"});let I;I=await t(M,Q,N),I.ok?(qe.enqueueSnackbar(`${M.row.abbreviation} ${W(N==="clone"?"pages:core-remote-resources:downloaded":"pages:core-remote-resources:updated",b.current)}`,{variant:"success"}),P(U=>({...U,[Q]:"downloaded"}))):(qe.enqueueSnackbar(`${M.row.abbreviation} ${W("pages:core-remote-resources:failed",b.current)} : ${I.error.reason} (${I.status})`,{variant:"error"}),P(U=>({...U,[Q]:"notDownloaded"})))},[]),V=v.useMemo(()=>[{field:"resourceCode",headerName:W("library:pankosmia-rcl:row_resource_code",b.current),flex:.5,minWidth:140},{field:"language",headerName:W("library:pankosmia-rcl:row_language",b.current),flex:.5,minWidth:120},{field:"description",headerName:W("library:pankosmia-rcl:row_description",b.current),flex:2,minWidth:130},{field:"type",headerName:W("library:pankosmia-rcl:row_type",b.current),flex:1.5,minWidth:80},{field:"download",sortable:!1,headerName:W("library:pankosmia-rcl:row_download",b.current),flex:.5,minWidth:120,renderCell:M=>{const Q=`${M.row.source}/${M.row.name}`,N=T==null?void 0:T[Q],I=N==="updatable",U=N==="downloading",X=N==="downloaded"||!N;return i.jsx(l.IconButton,{onClick:ne=>{ne.stopPropagation(),ie(M,Q,I?"fetch":"clone")},loading:U,disabled:X,children:X?i.jsx(yp,{}):I?i.jsx(bp,{}):i.jsx(Sa,{})})}}],[b,T,ie]),k=v.useMemo(()=>E.filter(M=>M.flavor).map(M=>({...M,id:`${M.source}/${M.name}`,url:M.latest_zip,metadata_types:M.metadata_types,resourceCode:M.abbreviation.toUpperCase(),language:J[M.language_code]??M.language_code,description:M.description,flavor:M.flavor,flavorType:M.flavor_type,clone_url:M.clone_url,ingredients:M.ingredients,topics:M.topics,type:W(`flavors:names:${M.flavor_type}/${M.flavor}`,b.current).includes("flavors:names")?`${W("library:pankosmia-rcl:unknown",b.current)}:${M.flavor}`:W(`flavors:names:${M.flavor_type}/${M.flavor}`,b.current)})).filter(M=>M.metadata_types==="rc"&&M.topics.some(Q=>u.includes(Q))||M.metadata_types==="sb"||!1),[E,b,J]),q=[{label:"Download selected",icon:Sa,action:(M,Q)=>{if(!T)return;Q.filter(I=>M.selectedIds.includes(I.id)).forEach(I=>{const U=`${I.source}/${I.name}`;T[U]==="notDownloaded"?ie({row:I},U,"clone"):T[U]==="updatable"&&ie({row:I},U,"fetch")})}}],K=a?{theme:a}:{};return i.jsxs(l.Box,{...K,sx:{height:"100%"},children:[(D==null?void 0:D.length)>0&&p&&i.jsx(l.Stack,{ref:B,direction:"row",spacing:0,sx:{alignItems:"center",mb:1},children:D.map((M,Q)=>{const N=x===Q,I=Q===0,U=Q===D.length-1;return i.jsx(l.Chip,{label:M.label,onClick:()=>h(Q),color:"primary",variant:N?"filled":"outlined",icon:N?i.jsx(wa,{}):M.icon,sx:{borderRadius:0,height:40,border:"1px solid",borderColor:"primary.main",...!I&&{borderLeft:"none"},...I&&{borderTopLeftRadius:"20px",borderBottomLeftRadius:"20px"},...U&&{borderTopRightRadius:"20px",borderBottomRightRadius:"20px"},"& .MuiChip-icon":{width:20,marginLeft:"8px",marginRight:"-4px"},...N&&{zIndex:1,borderColor:"primary.main"}}},M.label)})}),!$&&!d?i.jsx(l.Box,{sx:{height:z>0?`calc(100% - ${z+8}px)`:"100%"},children:i.jsx(Ca,{columns:V,rows:k,tableTitle:o,groupOperations:G?q:null,defaultFilter:oe,showColumnFilters:r,preSelections:c,sx:{...s,height:"100%","& .MuiTableBody-root .MuiTableRow-root:nth-of-type(even) .MuiTableCell-root":{backgroundColor:M=>ft(M.palette.primary.main,.05)}}})}):!d&&i.jsx(l.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:i.jsx(l.CircularProgress,{})}),d&&i.jsx(l.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:i.jsxs(l.Typography,{children:[" ",W("library:pankosmia-rcl:catalog_empty",b.current)]})})]})}function Yo({data:e,titleLabel:t,getOptionLabel:n,value:r,setValue:o,filterOptions:s}){return i.jsx(l.Autocomplete,{disableClearable:!0,filterOptions:s,value:r,onChange:(a,c)=>{o(c)},options:e,getOptionLabel:n,sx:{width:"100%"},renderInput:a=>i.jsx(l.TextField,{...a,label:t})})}const Er=v.createContext({product:null,setProduct:()=>{}}),jr=v.createContext({debug:!1,setBeta:()=>{}});function Rp({currentId:e}){const[t,n]=v.useState("auto"),[r,o]=v.useState(!1),s=v.useRef(null),[a,c]=v.useState(!1),[u,p]=v.useState([]),[f,g]=v.useState([]),[b,m]=v.useState([]),x=l.useTheme(),{i18nRef:h}=v.useContext(ve),{enabledRef:C}=v.useContext(ut),{debugRef:E}=v.useContext(xt),{productRef:w}=v.useContext(Er),{betaRef:T}=v.useContext(jr);v.useEffect(()=>{(async()=>{const j=await Ee("/api/list-clients",E.current);j.ok&&(p(j.json.filter(B=>!B.exclude_from_menu&&!B.requires.debug&&!B.requires.beta)),g(j.json.filter(B=>!B.exclude_from_menu&&B.requires.debug)),m(j.json.filter(B=>!B.exclude_from_menu&&B.requires.beta)))})().then()},[T.current,E.current]);const P=$=>{dn(`/api/beta/${T.current?"disable":"enable"}`).then(()=>{$.stopPropagation(),$.preventDefault()})};v.useEffect(()=>{let $;if(a&&!r)return $=setTimeout(()=>{if(s.current){const j=s.current.clientWidth;j>0&&(n(`${j}px`),o(!0))}},50),()=>clearTimeout($)},[a,r]);let _=w&&w.current&&w.current.os==="android",O=_?"30px":"0px";return i.jsxs(l.Box,{sx:{m:0,mr:2},children:[i.jsx(l.IconButton,{onClick:$=>c(!0),children:i.jsx(ma,{sx:{color:"#FFF"}})}),i.jsx(l.Drawer,{open:a,onClose:()=>c(!1),sx:{"& .MuiDrawer-paper":{overflow:"hidden"}},children:i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"column",minWidth:"16rem",height:_?"calc(100vh - 60px)":"100vh",overflowY:"auto",overflowX:"hidden",m:0,p:0,paddingTop:O,paddingBottom:O},role:"presentation",children:[i.jsxs(l.List,{sx:{width:"100%"},children:[u.map(($,j)=>$.id===e?i.jsx(l.ListItem,{disablePadding:!0,onClick:()=>c(!1),children:i.jsx(l.ListItemButton,{selected:!0,children:i.jsx(l.ListItemText,{primary:W(`pages:${$.id}:title`,h.current)})})},j):i.jsx(l.ListItem,{disablePadding:!0,children:i.jsx(l.ListItemButton,{disabled:$.requires.net&&!C.current,onClick:()=>{window.location.href=$.url},children:i.jsx(l.ListItemText,{primary:W(`pages:${$.id}:title`,h.current)})})},j)),T.current&&b.length>0&&i.jsx(i.Fragment,{children:b.map(($,j)=>i.jsx(l.ListItem,{disablePadding:!0,children:i.jsx(l.ListItemButton,{disabled:$.requires.net&&!netEnabled.current,onClick:()=>{window.location.href=$.url},children:i.jsx(l.ListItemText,{primary:i.jsxs(l.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[i.jsx("span",{children:W(`pages:${$.id}:title`,h.current)}),i.jsx(l.Box,{component:"span",sx:{fontSize:"1em",opacity:.7},children:"β"})]})})})},j))}),E.current&&f.length>0&&i.jsxs(i.Fragment,{children:[i.jsx(l.ListSubheader,{children:W("components:header:debug_mode",h.current)}),f.map(($,j)=>i.jsx(l.ListItem,{disablePadding:!0,children:i.jsx(l.ListItemButton,{disabled:$.requires.net&&!netEnabled.current,onClick:()=>{window.location.href=$.url},children:i.jsx(l.ListItemText,{primary:W(`pages:${$.id}:title`,h.current)})})},j))]})]}),i.jsx(l.Box,{sx:{flexGrow:1}}),i.jsxs(l.List,{sx:{width:"100%"},children:[i.jsx(l.ListItem,{disablePadding:!0,children:i.jsx(l.ListItemButton,{selected:e.includes("settings"),onClick:()=>{window.location.href="/clients/settings"},children:i.jsx(l.ListItemText,{primary:W("pages:core-settings:title",h.current)})})}),b.length>0&&i.jsxs(l.ListItemButton,{onClick:P,children:[i.jsx(l.ListItemText,{primary:W("components:header:beta_mode",h.current)}),i.jsx(l.Switch,{edge:"end",onChange:P,checked:T.current})]})]}),E.current&&i.jsx(l.Typography,{sx:{width:"100%",textAlign:"center",color:x.palette.text.secondary},children:W("components:header:debug_mode_active",h.current)})]})})]})}function Ta({titleKey:e,widget:t,currentId:n,theme:r,showInternetSwitch:o=!0}){var m,x,h;const{i18nRef:s}=v.useContext(ve),{clientConfigRef:a}=v.useContext(Tr),{enabledRef:c}=v.useContext(ut),u=((h=(x=(m=a.current._global)==null?void 0:m.find(C=>C.id==="internetConfig"))==null?void 0:x.fields.find(C=>C.id==="internetConnectionAccess"))==null?void 0:h.value)??!0;v.useEffect(()=>{const C=W("branding:software:name",s.current),E=W(e,s.current);document.title=`${E} - ${C}`});const p=r?l.ThemeProvider:v.Fragment,f=r?{theme:r}:{};let{product:g}=v.useContext(Er),b=g&&g.os==="android";return i.jsx(p,{...f,children:i.jsx(l.Box,{sx:{display:"flex-start",flexGrow:1,m:0,p:0},children:i.jsx(l.AppBar,{position:"static",sx:{m:0,p:0,paddingTop:b?"30px":"0px",paddingLeft:b?"30px":"0px",paddingRight:b?"30px":"0px"},children:i.jsxs(l.Toolbar,{variant:"dense",sx:{m:0,p:0},children:[i.jsx(Rp,{currentId:n}),e&&e.length>0&&i.jsx(l.Typography,{variant:"h6",sx:{m:0,p:0},children:W(e,s.current)}),i.jsx(l.Box,{sx:{flexGrow:1,m:0,p:0},children:t}),i.jsx(l.Box,{sx:{m:0,p:0},children:u&&o&&i.jsx(zo,{netEnabled:c.current,i18n:s.current,isAndroid:b})})]})})})})}async function Mp(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function Ap(e){let t,n,r,o=!1;return function(a){t===void 0?(t=a,n=0,r=-1):t=Np(t,a);const c=t.length;let u=0;for(;n<c;){o&&(t[n]===10&&(u=++n),o=!1);let p=-1;for(;n<c&&p===-1;++n)switch(t[n]){case 58:r===-1&&(r=n-u);break;case 13:o=!0;case 10:p=n;break}if(p===-1)break;e(t.subarray(u,p),r),u=n,r=-1}u===c?t=void 0:u!==0&&(t=t.subarray(u),n-=u)}}function Bp(e,t,n){let r=ka();const o=new TextDecoder;return function(a,c){if(a.length===0)n==null||n(r),r=ka();else if(c>0){const u=o.decode(a.subarray(0,c)),p=c+(a[c+1]===32?2:1),f=o.decode(a.subarray(p));switch(u){case"data":r.data=r.data?r.data+`
|
|
254
|
-
`+f:f;break;case"event":r.event=f;break;case"id":e(r.id=f);break;case"retry":const g=parseInt(f,10);isNaN(g)||t(r.retry=g);break}}}}function Np(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function ka(){return{data:"",event:"",id:"",retry:void 0}}var Dp=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};const Ho="text/event-stream",Lp=1e3,Ea="last-event-id";function Fp(e,t){var{signal:n,headers:r,onopen:o,onmessage:s,onclose:a,onerror:c,openWhenHidden:u,fetch:p}=t,f=Dp(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((g,b)=>{const m=Object.assign({},r);m.accept||(m.accept=Ho);let x;function h(){x.abort(),document.hidden||_()}u||document.addEventListener("visibilitychange",h);let C=Lp,E=0;function w(){document.removeEventListener("visibilitychange",h),window.clearTimeout(E),x.abort()}n==null||n.addEventListener("abort",()=>{w(),g()});const T=p??window.fetch,P=o??Vp;async function _(){var O;x=new AbortController;try{const $=await T(e,Object.assign(Object.assign({},f),{headers:m,signal:x.signal}));await P($),await Mp($.body,Ap(Bp(j=>{j?m[Ea]=j:delete m[Ea]},j=>{C=j},s))),a==null||a(),w(),g()}catch($){if(!x.signal.aborted)try{const j=(O=c==null?void 0:c($))!==null&&O!==void 0?O:C;window.clearTimeout(E),E=window.setTimeout(_,j)}catch(j){w(),b(j)}}}_()})}function Vp(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(Ho)))throw new Error(`Expected content-type to be ${Ho}, Actual: ${t}`)}const ja=v.createContext({auth:!1,setAuth:()=>{}}),_a=v.createContext({typography:{},setTypography:()=>{}}),$a=v.createContext({currentProject:null,setCurrentProject:()=>{}}),Ia=v.createContext({systemBcv:!1,setSystemBcv:()=>{}}),Pa=v.createContext({messages:[],setMessages:()=>{}}),Oa=v.createContext({clientInterfaces:{},setClientInterfaces:()=>{}}),Ra=v.createContext({snippet:{},setSnippet:()=>{}}),Ma=v.createContext({word:{},setWord:()=>{}});var Ce="-ms-",kn="-moz-",de="-webkit-",Go="comm",En="rule",Ko="decl",zp="@media",Wp="@import",Up="@supports",Aa="@keyframes",qp=Math.abs,jn=String.fromCharCode,Xo=Object.assign;function Yp(e,t){return Oe(e,0)^45?(((t<<2^Oe(e,0))<<2^Oe(e,1))<<2^Oe(e,2))<<2^Oe(e,3):0}function Ba(e){return e.trim()}function gt(e,t){return(e=t.exec(e))?e[0]:e}function ae(e,t,n){return e.replace(t,n)}function Qo(e,t){return e.indexOf(t)}function Oe(e,t){return e.charCodeAt(t)|0}function Wt(e,t,n){return e.slice(t,n)}function ct(e){return e.length}function Hp(e){return e.length}function _n(e,t){return t.push(e),e}function Gp(e,t){return e.map(t).join("")}function Na(e,t){return e.filter(function(n){return!gt(n,t)})}var _r=1,sn=1,Da=0,Ze=0,Pe=0,an="";function $r(e,t,n,r,o,s,a,c){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:_r,column:sn,length:a,return:"",siblings:c}}function jt(e,t){return Xo($r("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function cn(e){for(;e.root;)e=jt(e.root,{children:[e]});_n(e,e.siblings)}function Kp(){return Pe}function Xp(){return Pe=Ze>0?Oe(an,--Ze):0,sn--,Pe===10&&(sn=1,_r--),Pe}function rt(){return Pe=Ze<Da?Oe(an,Ze++):0,sn++,Pe===10&&(sn=1,_r++),Pe}function _t(){return Oe(an,Ze)}function Ir(){return Ze}function Pr(e,t){return Wt(an,e,t)}function $n(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Qp(e){return _r=sn=1,Da=ct(an=e),Ze=0,[]}function Jp(e){return an="",e}function Jo(e){return Ba(Pr(Ze-1,Zo(e===91?e+2:e===40?e+1:e)))}function Zp(e){for(;(Pe=_t())&&Pe<33;)rt();return $n(e)>2||$n(Pe)>3?"":" "}function eh(e,t){for(;--t&&rt()&&!(Pe<48||Pe>102||Pe>57&&Pe<65||Pe>70&&Pe<97););return Pr(e,Ir()+(t<6&&_t()==32&&rt()==32))}function Zo(e){for(;rt();)switch(Pe){case e:return Ze;case 34:case 39:e!==34&&e!==39&&Zo(Pe);break;case 40:e===41&&Zo(e);break;case 92:rt();break}return Ze}function th(e,t){for(;rt()&&e+Pe!==57;)if(e+Pe===84&&_t()===47)break;return"/*"+Pr(t,Ze-1)+"*"+jn(e===47?e:rt())}function nh(e){for(;!$n(_t());)rt();return Pr(e,Ze)}function rh(e){return Jp(Or("",null,null,null,[""],e=Qp(e),0,[0],e))}function Or(e,t,n,r,o,s,a,c,u){for(var p=0,f=0,g=a,b=0,m=0,x=0,h=1,C=1,E=1,w=0,T=0,P="",_=o,O=s,$=r,j=P;C;)switch(x=T,T=rt()){case 40:x!=108&&Oe(j,g-1)==58?(w++,j+="("):j+=Jo(T);break;case 41:w--,j+=")";break;case 34:case 39:case 91:j+=Jo(T);break;case 9:case 10:case 13:case 32:if(w>0){j+=jn(T);break}j+=Zp(x);break;case 92:j+=eh(Ir()-1,7);continue;case 47:switch(_t()){case 42:case 47:_n(oh(th(rt(),Ir()),t,n,u),u),($n(x||1)==5||$n(_t()||1)==5)&&ct(j)&&Wt(j,-1,void 0)!==" "&&(j+=" ");break;default:j+="/"}break;case 123*h:c[p++]=ct(j)*E;case 125*h:case 59:case 0:if(w>0&&T){j+=jn(T);break}switch(T){case 0:case 125:C=0;case 59+f:E==-1&&(j=ae(j,/\f/g,"")),m>0&&(ct(j)-g||h===0)&&_n(m>32?Fa(j+";",r,n,g-1,u):Fa(ae(j," ","")+";",r,n,g-2,u),u);break;case 59:j+=";";default:if(_n($=La(j,t,n,p,f,o,c,P,_=[],O=[],g,s),s),T===123)if(f===0)Or(j,t,$,$,_,s,g,c,O);else{switch(b){case 99:if(Oe(j,3)===110)break;case 108:if(Oe(j,2)===97)break;default:f=0;case 100:case 109:case 115:}f?Or(e,$,$,r&&_n(La(e,$,$,0,0,o,c,P,o,_=[],g,O),O),o,O,g,c,r?_:O):Or(j,$,$,$,[""],O,0,c,O)}}p=f=m=0,h=E=1,P=j="",g=a;break;case 58:g=1+ct(j),m=x;default:if(h<1){if(T==123)--h;else if(T==125&&h++==0&&Xp()==125)continue}switch(j+=jn(T),T*h){case 38:E=f>0?1:(j+="\f",-1);break;case 44:if(w>0)break;c[p++]=(ct(j)-1)*E,E=1;break;case 64:_t()===45&&(j+=Jo(rt())),b=_t(),f=g=ct(P=j+=nh(Ir())),T++;break;case 45:x===45&&ct(j)==2&&(h=0)}}return s}function La(e,t,n,r,o,s,a,c,u,p,f,g){for(var b=o-1,m=o===0?s:[""],x=Hp(m),h=0,C=0,E=0;h<r;++h)for(var w=0,T=Wt(e,b+1,b=qp(C=a[h])),P=e;w<x;++w)(P=Ba(C>0?m[w]+" "+T:ae(T,/&\f/g,m[w])))&&(u[E++]=P);return $r(e,t,n,o===0?En:c,u,p,f,g)}function oh(e,t,n,r){return $r(e,t,n,Go,jn(Kp()),Wt(e,2,-2),0,r)}function Fa(e,t,n,r,o){return $r(e,t,n,Ko,Wt(e,0,r),Wt(e,r+1,-1),r,o)}function Va(e,t,n){switch(Yp(e,t)){case 5103:return de+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return de+e+e;case 4855:return de+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return kn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return de+e+kn+e+Ce+e+e;case 5936:switch(Oe(e,t+11)){case 114:return de+e+Ce+ae(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return de+e+Ce+ae(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return de+e+Ce+ae(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return de+e+Ce+e+e;case 6165:return de+e+Ce+"flex-"+e+e;case 5187:return de+e+ae(e,/(\w+).+(:[^]+)/,de+"box-$1$2"+Ce+"flex-$1$2")+e;case 5443:return de+e+Ce+"flex-item-"+ae(e,/flex-|-self/g,"")+(gt(e,/flex-|baseline/)?"":Ce+"grid-row-"+ae(e,/flex-|-self/g,""))+e;case 4675:return de+e+Ce+"flex-line-pack"+ae(e,/align-content|flex-|-self/g,"")+e;case 5548:return de+e+Ce+ae(e,"shrink","negative")+e;case 5292:return de+e+Ce+ae(e,"basis","preferred-size")+e;case 6060:return de+"box-"+ae(e,"-grow","")+de+e+Ce+ae(e,"grow","positive")+e;case 4554:return de+ae(e,/([^-])(transform)/g,"$1"+de+"$2")+e;case 6187:return ae(ae(ae(e,/(zoom-|grab)/,de+"$1"),/(image-set)/,de+"$1"),e,"")+e;case 5495:case 3959:return ae(e,/(image-set\([^]*)/,de+"$1$`$1");case 4968:return ae(ae(e,/(.+:)(flex-)?(.*)/,de+"box-pack:$3"+Ce+"flex-pack:$3"),/space-between/,"justify")+de+e+e;case 4200:if(!gt(e,/flex-|baseline/))return Ce+"grid-column-align"+Wt(e,t)+e;break;case 2592:case 3360:return Ce+ae(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,o){return t=o,gt(r.props,/grid-\w+-end/)})?~Qo(e+(n=n[t].value),"span")?e:Ce+ae(e,"-start","")+e+Ce+"grid-row-span:"+(~Qo(n,"span")?gt(n,/\d+/):+gt(n,/\d+/)-+gt(e,/\d+/))+";":Ce+ae(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return gt(r.props,/grid-\w+-start/)})?e:Ce+ae(ae(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return ae(e,/(.+)-inline(.+)/,de+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ct(e)-1-t>6)switch(Oe(e,t+1)){case 109:if(Oe(e,t+4)!==45)break;case 102:return ae(e,/(.+:)(.+)-([^]+)/,"$1"+de+"$2-$3$1"+kn+(Oe(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Qo(e,"stretch")?Va(ae(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return ae(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,o,s,a,c,u,p){return Ce+o+":"+s+p+(a?Ce+o+"-span:"+(c?u:+u-+s)+p:"")+e});case 4949:if(Oe(e,t+6)===121)return ae(e,":",":"+de)+e;break;case 6444:switch(Oe(e,Oe(e,14)===45?18:11)){case 120:return ae(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+de+(Oe(e,14)===45?"inline-":"")+"box$3$1"+de+"$2$3$1"+Ce+"$2box$3")+e;case 100:return ae(e,":",":"+Ce)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return ae(e,"scroll-","scroll-snap-")+e}return e}function za(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Wa(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Ko:e.return=Va(e.value,e.length,n);return;case Aa:return za([jt(e,{value:ae(e.value,"@","@"+de)})],r);case En:if(e.length)return Gp(n=e.props,function(o){switch(gt(o,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":cn(jt(e,{props:[ae(o,/:(read-\w+)/,":"+kn+"$1")]})),cn(jt(e,{props:[o]})),Xo(e,{props:Na(n,r)});break;case"::placeholder":cn(jt(e,{props:[ae(o,/:(plac\w+)/,":"+de+"input-$1")]})),cn(jt(e,{props:[ae(o,/:(plac\w+)/,":"+kn+"$1")]})),cn(jt(e,{props:[ae(o,/:(plac\w+)/,Ce+"input-$1")]})),cn(jt(e,{props:[o]})),Xo(e,{props:Na(n,r)});break}return""})}}var Rr={exports:{}};/*!
|
|
253
|
+
`:null,ap=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,s={root:["root",n,`color${De(r)}`],svg:["svg"],track:["track"],circle:["circle",o&&"circleDisableShrink"]};return qt(s,op,t)},cp=Ge("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${De(n.color)}`]]}})(Et(({theme:e})=>{const t=Fo(e,{animation:"none"});return{display:"inline-block",variants:[{props:{variant:"determinate"},style:{...Cr(e,"transform")}},{props:{variant:"indeterminate"},style:sp||{animation:`${Wo} 1.4s linear infinite`}},...t?[{props:{variant:"indeterminate"},style:t}]:[],...Object.entries(e.palette).filter(Ro()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}}))]}})),lp=Ge("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),up=Ge("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(Et(({theme:e})=>{const t=Fo(e,{animation:"none"});return{stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{...Cr(e,"stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:n})=>n.variant==="indeterminate"&&!n.disableShrink,style:ip||{animation:`${Uo} 1.4s ease-in-out infinite`}},...t?[{props:({ownerState:n})=>n.variant==="indeterminate"&&!n.disableShrink,style:t}]:[]]}})),dp=Ge("circle",{name:"MuiCircularProgress",slot:"Track"})(Et(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),qo=F.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:a=!1,enableTrackSlot:c=!1,min:u,max:p,size:f=40,style:g,thickness:b=3.6,value:m=r.min??0,variant:x="indeterminate",...h}=r;process.env.NODE_ENV!=="production"&&!ga&&x==="indeterminate"&&(u!==void 0||p!==void 0)&&(console.warn("MUI: You have provided the `min` or `max` props with an 'indeterminate' variant. These props will have no effect."),ga=!0);const C=u??0,E=p??100,w={...r,color:s,disableShrink:a,size:f,thickness:b,value:m,variant:x,enableTrackSlot:c},T=ap(w),P={},_={},O={};if(x==="determinate"){const $=2*Math.PI*((nt-b)/2);process.env.NODE_ENV!=="production"&&!ya&&(m<C||m>E||C>=E)&&(console.error(`MUI: The min, max, and value props in CircularProgress should be numbers where min < max and min <= value <= max. Received min=${C}, max=${E}, value=${m}.`),ya=!0);const j=E-C;P.strokeDasharray=$.toFixed(3),P.strokeDashoffset=j>0?`${((E-m)/j*$).toFixed(3)}px`:`${$.toFixed(3)}px`,_.transform="rotate(-90deg)",O["aria-valuenow"]=m,O["aria-valuemin"]=C,O["aria-valuemax"]=E}return i.jsx(cp,{className:Ae(T.root,o),style:{width:f,height:f,..._,...g},ownerState:w,ref:n,role:"progressbar",...O,...h,children:i.jsxs(lp,{className:T.svg,ownerState:w,viewBox:`${nt/2} ${nt/2} ${nt} ${nt}`,children:[c?i.jsx(dp,{className:T.track,ownerState:w,cx:nt,cy:nt,r:(nt-b)/2,fill:"none",strokeWidth:b,"aria-hidden":"true"}):null,i.jsx(up,{className:T.circle,style:P,ownerState:w,cx:nt,cy:nt,r:(nt-b)/2,fill:"none",strokeWidth:b})]})})});process.env.NODE_ENV!=="production"&&(qo.propTypes={classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["inherit","primary","secondary","error","info","success","warning"]),y.string]),disableShrink:Qr(y.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),enableTrackSlot:y.bool,max:y.number,min:y.number,size:y.oneOfType([y.number,y.string]),style:y.object,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),thickness:y.number,value:y.number,variant:y.oneOf(["determinate","indeterminate"])});function kr({label:e,actionFn:t,isDisabled:n,variant:r,isLoading:o,loadingLabel:s,sx:a}){return i.jsx(l.Button,{onClick:t,disabled:n||o,startIcon:o?i.jsx(qo,{size:16,color:"inherit"}):null,color:"primary",variant:r,sx:a,children:o&&s?s:e})}function fp({actionFn:e,actionLabel:t,closeFn:n,closeLabel:r,isDisabled:o,closeOnAction:s=!0,onlyCloseButton:a=!1,actionVariant:c,closeVariant:u,isLoading:p,loadingLabel:f}){return i.jsxs(l.DialogActions,{children:[i.jsx(kr,{actionFn:n,isDisabled:!1,label:r,variant:u,isLoading:p,loadingLabel:f}),a?null:i.jsx(kr,{actionFn:()=>{e(),s&&n()},isDisabled:o,label:t,variant:c})]})}const pp=xe(i.jsx("path",{d:"M14.59 8 12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"HighlightOff"),hp=xe(i.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),ba=xe(i.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),mp={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function xa(e){const{onSelectAllClick:t,numSelected:n,order:r,orderBy:o,rowCount:s,onRequestSort:a,columns:c,columnFilters:u,setColumnFilter:p,showColumnFilters:f,groupOperations:g,checkboxSelection:b}=e,m=$=>j=>{a(j,$)},[x,h]=v.useState(null),[C,E]=v.useState(null),w=($,j)=>{$.stopPropagation(),h($.currentTarget),E(j)},T=()=>{h(null),E(null)},P=$=>{const j=$.target.value;p(C,j)},_=!!x,O=_?"filter-popover":void 0;return i.jsxs(l.TableHead,{children:[i.jsxs(l.TableRow,{children:[(b||g)&&i.jsx(l.TableCell,{padding:"checkbox",children:i.jsx(l.Checkbox,{color:"primary",indeterminate:n>0&&n<s,checked:s>0&&n===s,onChange:t,slotProps:{"aria-label":"select all rows"}})}),c.map($=>i.jsx(l.TableCell,{align:$.alignRight?"right":"left",padding:$.disablePadding?"none":"normal",sortDirection:o===$.field?r:!1,sx:{width:$.width||"auto",minWidth:$.minWidth||"none",flex:$.flex||"none"},children:i.jsxs(l.Box,{sx:{display:"flex",alignItems:"center",justifyContent:$.alignRight?"flex-end":"flex-start"},children:[i.jsxs(l.TableSortLabel,{active:o===$.field,direction:o===$.field?r:"asc",onClick:m($.field),children:[$.headerName,o===$.field?i.jsx(l.Box,{component:"span",sx:mp,children:r==="desc"?"sorted descending":"sorted ascending"}):null]}),f&&!$.numeric&&i.jsx(l.IconButton,{size:"small",onClick:j=>w(j,$.field),sx:{ml:.5,p:.5},color:u[$.field]?"primary":"default",children:i.jsx(hp,{fontSize:"small"})})]})},$.field))]}),i.jsx(l.Popover,{id:O,open:_,anchorEl:x,onClose:T,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:i.jsx(l.Box,{sx:{p:2},children:i.jsx(l.TextField,{label:`Filter ${C}`,variant:"outlined",value:C?u[C]:"",onChange:P,size:"small",autoFocus:!0,slotProps:{input:{endAdornment:C&&u[C]&&i.jsx(l.IconButton,{size:"small",onClick:$=>{$.stopPropagation(),p(C,""),T()},edge:"end",sx:{color:"primary.main","&:hover":{backgroundColor:"action.hover"}},children:i.jsx(ba,{fontSize:"small"})})}}})})})]})}xa.propTypes={onRequestSort:y.func.isRequired,order:y.oneOf(["asc","desc"]).isRequired,orderBy:y.string.isRequired,columns:y.array.isRequired,setColumnFilter:y.func.isRequired,columnFilters:y.object.isRequired};function va(e){const{numSelected:t,selectedIds:n,clearSelection:r,tableTitle:o,groupOperations:s,dataRows:a}=e,c=v.useMemo(()=>{if(s&&s.length>0){const u={selectedIds:n,numSelected:t,clearSelection:r},p={};return s.forEach(f=>{p[f.label]=()=>f.action(u,a)}),p}},[n,t,a]);return i.jsxs(l.Toolbar,{sx:{pl:{sm:2},pr:{xs:1,sm:1},...t>0&&{bgcolor:u=>ft(u.palette.primary.main,u.palette.action.activatedOpacity)}},children:[t>0?i.jsxs(l.Typography,{variant:"subtitle1",component:"div",sx:{color:"inherit",flex:"1 1 100%"},children:[t," selected"]}):o&&i.jsx(l.Typography,{sx:{flex:"1 1 100%"},variant:"h6",id:"tableTitle",component:"div",children:o}),t>0?i.jsx(i.Fragment,{children:s&&s.map((u,p)=>{const f=u.icon,g=c[u.label];return i.jsx(l.Tooltip,{title:u.label,children:i.jsx(l.IconButton,{onClick:g,disabled:t===0,children:i.jsx(f,{sx:{fontSize:28,color:"black"}})})},p)})}):i.jsx(i.Fragment,{})]})}va.propTypes={numSelected:y.number.isRequired,selectedIds:y.array.isRequired,clearSelection:y.func.isRequired};function gp(e,t){return e==="desc"?(n,r)=>String(r[t]??"").localeCompare(String(n[t]??""),void 0,{sensitivity:"base"}):(n,r)=>String(n[t]??"").localeCompare(String(r[t]??""),void 0,{sensitivity:"base"})}function Ca({columns:e,rows:t,defaultFilter:n,setDefaultFilter:r,filterPreset:o,showColumnFilters:s,tableTitle:a,groupOperations:c,sx:u,theme:p,onRowSelectionModelChange:f,checkboxSelection:g,initialState:b,preSelections:m}){var M,Q;const[x,h]=v.useState(b!=null&&b.sorting?(M=b==null?void 0:b.sorting)==null?void 0:M.order:"asc"),[C,E]=v.useState(b!=null&&b.sorting?(Q=b==null?void 0:b.sorting)==null?void 0:Q.field:"date"),[w,T]=v.useState([]),[P,_]=v.useState([]),O=p?l.ThemeProvider:v.Fragment,$=p?{theme:p}:{},[j,B]=v.useState(0),z=v.useRef(null),[S,d]=v.useState(0),A=v.useRef(null);v.useEffect(()=>{if(!A.current)return;const N=new ResizeObserver(I=>{for(const W of I)d(W.contentRect.height)});return N.observe(A.current),()=>N.disconnect()},[o]),v.useEffect(()=>{if(!z.current)return;const N=new ResizeObserver(I=>{for(const W of I)B(W.contentRect.height)});return N.observe(z.current),()=>N.disconnect()},[o]);const[R,D]=v.useState(()=>{const N={};return e.forEach(I=>{N[I.field]=""}),N}),H=(N,I)=>{h(C===I&&x==="asc"?"desc":"asc"),E(I)};v.useEffect(()=>{m&&T(m)},[m]);const Z=N=>{const I=N.target.checked?G.map(W=>W.id):[];T(I),f&&f(I)},re=(N,I)=>{const W=w.indexOf(I);let J=[];W===-1?J=J.concat(w,I):W===0?J=J.concat(w.slice(1)):W===w.length-1?J=J.concat(w.slice(0,-1)):W>0&&(J=J.concat(w.slice(0,W),w.slice(W+1))),T(J),f&&f(J)},ie=()=>{T([]),f&&f([])},V=(N,I)=>{D(W=>({...W,[N]:I}))},k=N=>{_(I=>I.includes(N)?I.filter(W=>W!==N):[...I,N])},q=v.useMemo(()=>{if(!o||P.length===0)return()=>!0;const N=P.map(I=>{const W=o[I];return W&&typeof W.filter=="function"?W.filter:(console.warn(`Invalid filter function found for index ${I}`),()=>!1)});return I=>N.some(W=>W(I))},[P,o]),G=v.useMemo(()=>[...t].filter(N=>{if(n&&typeof n=="function"&&!n(N)||!q(N))return!1;for(const I in R){const W=R[I].toLowerCase();if(W&&!String(N[I]).toLowerCase().includes(W))return!1}return!0}).sort(gp(x,C)),[x,C,t,n,q,R]);return i.jsx(O,{...$,children:i.jsxs(l.Box,{id:"test",sx:{width:"100%",height:`calc(100% - ${j+S}px)`},children:[o&&i.jsx(l.Box,{ref:z,sx:{display:"flex",gap:1,flexWrap:"wrap",p:1},children:i.jsx(l.Stack,{direction:"row",spacing:1,children:o.map((N,I)=>{const W=P.includes(I);return i.jsx(l.Chip,{label:i.jsxs(l.Box,{sx:{display:"flex",alignItems:"center",gap:W?.5:0},children:[i.jsx("span",{children:N.label}),W&&i.jsx(pp,{sx:{fontSize:24}})]}),variant:W?"filled":"outlined",color:"secondary",onClick:()=>k(I)},N.label)})})}),i.jsxs(l.Box,{ref:A,children:[c&&i.jsx(va,{numSelected:w.length,selectedIds:w,clearSelection:ie,tableTitle:a,groupOperations:c,dataRows:t}),!c&&a&&i.jsx(l.Toolbar,{sx:{pl:{sm:2},pr:{xs:1,sm:1}},children:i.jsx(l.Typography,{sx:{flex:"1 1 100%"},variant:"h6",id:"tableTitle",component:"div",children:a})})]}),i.jsxs(l.TableContainer,{component:l.Paper,sx:u||{height:"100%"},children:[" ",i.jsxs(l.Table,{stickyHeader:!0,"aria-label":"pan table",sx:{width:"100%"},children:[i.jsx(xa,{numSelected:w.length,order:x,orderBy:C,onSelectAllClick:Z,onRequestSort:H,rowCount:G.length,columns:e,setColumnFilter:V,columnFilters:R,showColumnFilters:s,groupOperations:c,checkboxSelection:g}),i.jsxs(l.TableBody,{sx:{verticalAlign:"top"},children:[G.map((N,I)=>{const W=w.includes(N.id);return i.jsxs(l.TableRow,{hover:!0,onClick:J=>{(g||c)&&re(J,N.id)},role:"checkbox",tabIndex:-1,selected:W,children:[(g||c)&&i.jsx(l.TableCell,{padding:"checkbox",children:i.jsx(l.Checkbox,{color:"primary",checked:W})}),e.map(J=>i.jsx(l.TableCell,{align:J.alignRight?"right":"left",sx:{whiteSpace:"normal",wordBreak:"break-word"},children:J.renderCell?J.renderCell({row:N,id:N.id,field:J.field}):N[J.field]},J.field))]},N.id)}),i.jsx(l.TableRow,{sx:{height:"100%"},children:i.jsx(l.TableCell,{colSpan:e.length,sx:{padding:0,borderBottom:"none",height:"100%"}})})]})]})]})]})})}const Sa=xe(i.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5z"}),"FileDownloadOutlined"),yp=xe(i.jsx("path",{d:"M5 18h14v2H5zm4.6-2.7L5 10.7l2-1.9 2.6 2.6L17 4l2 2z"}),"FileDownloadDone"),bp=xe(i.jsx("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update"),xp=xe(i.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"AddOutlined"),vp=xe(i.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBackOutlined"),Cp=xe(i.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"BlockOutlined"),wa=xe(i.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Sp=xe(i.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"CheckOutlined"),wp=xe(i.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"}),"EditOutlined"),Tp=xe(i.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"ErrorOutlined"),kp=xe(i.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),Ep=xe(i.jsx("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H8V4h12zM10 9h8v2h-8zm0 3h4v2h-4zm0-6h8v2h-8z"}),"LibraryBooksOutlined"),jp=xe(i.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVertOutlined"),_p=xe(i.jsx("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H8V4h12zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm12 6V9c0-.55-.45-1-1-1h-2v5h2c.55 0 1-.45 1-1m-2-3h1v3h-1zm4 2h1v-1h-1V9h1V8h-2v5h1zm-8 0h1c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9v5h1zm0-2h1v1h-1z"}),"PictureAsPdfOutlined"),$p=xe(i.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonUnchecked"),Ip=xe(i.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7zm-6 .67 2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAltOutlined"),Pp=async(e,t)=>{const n=await ke("/api/burrito/metadata/summaries",t.current);e(n.json)};function Op({downloadedType:e="org",downloadFunction:t,sources:n,showColumnFilters:r,tableTitle:o,sx:s,theme:a,preSelected:c=[],topicsFilter:u=["pushing2sb","tc-ready"],showFilterButtons:p,onDownloadingChange:f,languageLookup:g=[]}){const{i18nRef:b}=v.useContext(ve),{debugRef:m}=v.useContext(xt),[x,h]=v.useState(0),C=v.useRef(0),[E,w]=v.useState([]),[T,P]=v.useState(null),[_,O]=v.useState({}),[$,j]=v.useState(!0),B=v.useRef(null),[z,S]=v.useState(0),[d,A]=v.useState(!1),{sourceWhitelist:R,filterExample:D,listMode:H}=v.useMemo(()=>{if(Array.isArray(n))return{listMode:!1,sourceWhitelist:n,filterExample:n.map(([M,Q,N])=>({label:Q,icon:N||i.jsx($p,{}),filter:I=>!0}))};if(n&&typeof n=="object"){const M=[];for(const[Q,N]of Object.entries(n))for(const I of Object.keys(N))M.push([`${Q}/${I}`,I]);return{listMode:!0,sourceWhitelist:M,filterExample:[]}}return{listMode:!1,sourceWhitelist:[],filterExample:[]}},[n]),Z=v.useMemo(()=>Object.fromEntries(g.map(M=>[M.id,M.endonym])),[g]);v.useEffect(()=>{D.length>0&&x===null&&h(0)},[D,x]),v.useEffect(()=>{if(!B.current)return;const M=new ResizeObserver(Q=>{for(const N of Q)S(N.contentRect.height)});return M.observe(B.current),()=>M.disconnect()},[D]);const re=v.useMemo(()=>{var M;return x!==null?(M=D[x])==null?void 0:M.filter:null},[x,D]);v.useEffect(()=>{(async()=>{j(!0),P(null);const Q=++C.current;Pp(O,m);let N=[];if(H)for(let I=0;I<R.length;I++){let W=R[I],J=W[0].split("/"),K;if(e==="org"&&(K=await ke(`/api/gitea/remote-repos/${W[0]}`,m.current)),e==="user"&&(K=await ke(`/api/gitea/user-remote-repos/${W[0]}`,m.current)),Q!==C.current)return;if(K.ok&&K.json.length>0)if(H){const oe=K.json.filter(X=>n[J[0]][J[1]].includes(X.name)).map(X=>({...X,source:W[0]}));N=[...N,...oe]}else{const oe=K.json.map(X=>({...X,source:W[0]}));N=[...N,...oe]}}else{let I=R[x],W=I[0].split("/"),J;if(e==="org"&&(J=await ke(`/api/gitea/remote-repos/${I[0]}`,m.current)),e==="user"&&(J=await ke(`/api/gitea/user-remote-repos/${I[0]}`,m.current)),Q!==C.current)return;if(J.ok&&J.json.length>0)if(H){const K=J.json.filter(oe=>n[W[0]][W[1]].includes(oe.name)).map(oe=>({...oe,source:I[0]}));N=[...N,...K]}else{const K=J.json.map(oe=>({...oe,source:I[0]}));N=[...N,...K]}}N.length>0?(j(!1),A(!1),w(N)):(j(!1),A(!0),qe.enqueueSnackbar(U("library:pankosmia-rcl:catalog_empty",b.current),{variant:"error"}))})()},[R,x]),v.useEffect(()=>{if(E.length===0)return;(async()=>{const Q={};for(const N of E)if(_[`${N.source}/${N.name}`]){const W=_[`${N.source}/${N.name}`].timestamp,J=Date.parse(N.released)/1e3;Q[`${N.source}/${N.name}`]=J-W>0?"updatable":"downloaded"}else Q[`${N.source}/${N.name}`]="notDownloaded";P(Q)})()},[E,_]),v.useEffect(()=>{if(!T)return;const M=Object.values(T).includes("downloading");f==null||f(M)},[T,f]);const ie=v.useCallback(async(M,Q,N)=>{P(W=>({...W,[Q]:"downloading"})),qe.enqueueSnackbar(`${U("pages:core-remote-resources:downloading",b.current)} ${M.row.abbreviation}`,{variant:"info"});let I;I=await t(M,Q,N),I.ok?(qe.enqueueSnackbar(`${M.row.abbreviation} ${U(N==="clone"?"pages:core-remote-resources:downloaded":"pages:core-remote-resources:updated",b.current)}`,{variant:"success"}),P(W=>({...W,[Q]:"downloaded"}))):(qe.enqueueSnackbar(`${M.row.abbreviation} ${U("pages:core-remote-resources:failed",b.current)} : ${I.error.reason} (${I.status})`,{variant:"error"}),P(W=>({...W,[Q]:"notDownloaded"})))},[]),V=v.useMemo(()=>[{field:"resourceCode",headerName:U("library:pankosmia-rcl:row_resource_code",b.current),flex:.5,minWidth:140},{field:"language",headerName:U("library:pankosmia-rcl:row_language",b.current),flex:.5,minWidth:120},{field:"description",headerName:U("library:pankosmia-rcl:row_description",b.current),flex:2,minWidth:130},{field:"type",headerName:U("library:pankosmia-rcl:row_type",b.current),flex:1.5,minWidth:80},{field:"download",sortable:!1,headerName:U("library:pankosmia-rcl:row_download",b.current),flex:.5,minWidth:120,renderCell:M=>{const Q=`${M.row.source}/${M.row.name}`,N=T==null?void 0:T[Q],I=N==="updatable",W=N==="downloading",J=N==="downloaded"||!N;return i.jsx(l.IconButton,{onClick:K=>{K.stopPropagation(),ie(M,Q,I?"fetch":"clone")},loading:W,disabled:J,children:J?i.jsx(yp,{}):I?i.jsx(bp,{}):i.jsx(Sa,{})})}}],[b,T,ie]),k=v.useMemo(()=>E.filter(M=>M.flavor).map(M=>({...M,id:`${M.source}/${M.name}`,url:M.latest_zip,metadata_types:M.metadata_types,resourceCode:M.abbreviation.toUpperCase(),language:Z[M.language_code]??M.language_code,description:M.description,flavor:M.flavor,flavorType:M.flavor_type,clone_url:M.clone_url,ingredients:M.ingredients,topics:M.topics,type:U(`flavors:names:${M.flavor_type}/${M.flavor}`,b.current).includes("flavors:names")?`${U("library:pankosmia-rcl:unknown",b.current)}:${M.flavor}`:U(`flavors:names:${M.flavor_type}/${M.flavor}`,b.current)})).filter(M=>M.metadata_types==="rc"&&M.topics.some(Q=>u.includes(Q))||M.metadata_types==="sb"||!1),[E,b,Z]),q=[{label:"Download selected",icon:Sa,action:(M,Q)=>{if(!T)return;Q.filter(I=>M.selectedIds.includes(I.id)).forEach(I=>{const W=`${I.source}/${I.name}`;T[W]==="notDownloaded"?ie({row:I},W,"clone"):T[W]==="updatable"&&ie({row:I},W,"fetch")})}}],G=a?{theme:a}:{};return i.jsxs(l.Box,{...G,sx:{height:"100%"},children:[(D==null?void 0:D.length)>0&&p&&i.jsx(l.Stack,{ref:B,direction:"row",spacing:0,sx:{alignItems:"center",mb:1},children:D.map((M,Q)=>{const N=x===Q,I=Q===0,W=Q===D.length-1;return i.jsx(l.Chip,{label:M.label,onClick:()=>h(Q),color:"primary",variant:N?"filled":"outlined",icon:N?i.jsx(wa,{}):M.icon,sx:{borderRadius:0,height:40,border:"1px solid",borderColor:"primary.main",...!I&&{borderLeft:"none"},...I&&{borderTopLeftRadius:"20px",borderBottomLeftRadius:"20px"},...W&&{borderTopRightRadius:"20px",borderBottomRightRadius:"20px"},"& .MuiChip-icon":{width:20,marginLeft:"8px",marginRight:"-4px"},...N&&{zIndex:1,borderColor:"primary.main"}}},M.label)})}),!$&&!d?i.jsx(l.Box,{sx:{height:z>0?`calc(100% - ${z+8}px)`:"100%"},children:i.jsx(Ca,{columns:V,rows:k,tableTitle:o,groupOperations:H?q:null,defaultFilter:re,showColumnFilters:r,preSelections:c,sx:{...s,height:"100%","& .MuiTableBody-root .MuiTableRow-root:nth-of-type(even) .MuiTableCell-root":{backgroundColor:M=>ft(M.palette.primary.main,.05)}}})}):!d&&i.jsx(l.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:i.jsx(l.CircularProgress,{})}),d&&i.jsx(l.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:i.jsxs(l.Typography,{children:[" ",U("library:pankosmia-rcl:catalog_empty",b.current)]})})]})}function Yo({data:e,titleLabel:t,getOptionLabel:n,value:r,setValue:o,filterOptions:s}){return i.jsx(l.Autocomplete,{disableClearable:!0,filterOptions:s,value:r,onChange:(a,c)=>{o(c)},options:e,getOptionLabel:n,sx:{width:"100%"},renderInput:a=>i.jsx(l.TextField,{...a,label:t})})}const Er=v.createContext({product:null,setProduct:()=>{}}),jr=v.createContext({debug:!1,setBeta:()=>{}});function Rp({currentId:e}){const[t,n]=v.useState("auto"),[r,o]=v.useState(!1),s=v.useRef(null),[a,c]=v.useState(!1),[u,p]=v.useState([]),[f,g]=v.useState([]),[b,m]=v.useState([]),x=l.useTheme(),{i18nRef:h}=v.useContext(ve),{enabledRef:C}=v.useContext(ut),{debugRef:E}=v.useContext(xt),{productRef:w}=v.useContext(Er),{betaRef:T}=v.useContext(jr);v.useEffect(()=>{(async()=>{const j=await ke("/api/list-clients",E.current);j.ok&&(p(j.json.filter(B=>!B.exclude_from_menu&&!B.requires.debug&&!B.requires.beta)),g(j.json.filter(B=>!B.exclude_from_menu&&B.requires.debug)),m(j.json.filter(B=>!B.exclude_from_menu&&B.requires.beta)))})().then()},[T.current,E.current]);const P=$=>{dn(`/api/beta/${T.current?"disable":"enable"}`).then(()=>{$.stopPropagation(),$.preventDefault()})};v.useEffect(()=>{let $;if(a&&!r)return $=setTimeout(()=>{if(s.current){const j=s.current.clientWidth;j>0&&(n(`${j}px`),o(!0))}},50),()=>clearTimeout($)},[a,r]);let _=w&&w.current&&w.current.os==="android",O=_?"30px":"0px";return i.jsxs(l.Box,{sx:{m:0,mr:2},children:[i.jsx(l.IconButton,{onClick:$=>c(!0),children:i.jsx(ma,{sx:{color:"#FFF"}})}),i.jsx(l.Drawer,{open:a,onClose:()=>c(!1),sx:{"& .MuiDrawer-paper":{overflow:"hidden"}},children:i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"column",minWidth:"16rem",height:_?"calc(100vh - 60px)":"100vh",overflowY:"auto",overflowX:"hidden",m:0,p:0,paddingTop:O,paddingBottom:O},role:"presentation",children:[i.jsxs(l.List,{sx:{width:"100%"},children:[u.map(($,j)=>$.id===e?i.jsx(l.ListItem,{disablePadding:!0,onClick:()=>c(!1),children:i.jsx(l.ListItemButton,{selected:!0,children:i.jsx(l.ListItemText,{primary:U(`pages:${$.id}:title`,h.current)})})},j):i.jsx(l.ListItem,{disablePadding:!0,children:i.jsx(l.ListItemButton,{disabled:$.requires.net&&!C.current,onClick:()=>{window.location.href=$.url},children:i.jsx(l.ListItemText,{primary:U(`pages:${$.id}:title`,h.current)})})},j)),T.current&&b.length>0&&i.jsx(i.Fragment,{children:b.map(($,j)=>i.jsx(l.ListItem,{disablePadding:!0,children:i.jsx(l.ListItemButton,{disabled:$.requires.net&&!netEnabled.current,onClick:()=>{window.location.href=$.url},children:i.jsx(l.ListItemText,{primary:i.jsxs(l.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[i.jsx("span",{children:U(`pages:${$.id}:title`,h.current)}),i.jsx(l.Box,{component:"span",sx:{fontSize:"1em",opacity:.7},children:"β"})]})})})},j))}),E.current&&f.length>0&&i.jsxs(i.Fragment,{children:[i.jsx(l.ListSubheader,{children:U("components:header:debug_mode",h.current)}),f.map(($,j)=>i.jsx(l.ListItem,{disablePadding:!0,children:i.jsx(l.ListItemButton,{disabled:$.requires.net&&!netEnabled.current,onClick:()=>{window.location.href=$.url},children:i.jsx(l.ListItemText,{primary:U(`pages:${$.id}:title`,h.current)})})},j))]})]}),i.jsx(l.Box,{sx:{flexGrow:1}}),i.jsxs(l.List,{sx:{width:"100%"},children:[i.jsx(l.ListItem,{disablePadding:!0,children:i.jsx(l.ListItemButton,{selected:e.includes("settings"),onClick:()=>{window.location.href="/clients/settings"},children:i.jsx(l.ListItemText,{primary:U("pages:core-settings:title",h.current)})})}),b.length>0&&i.jsxs(l.ListItemButton,{onClick:P,children:[i.jsx(l.ListItemText,{primary:U("components:header:beta_mode",h.current)}),i.jsx(l.Switch,{edge:"end",onChange:P,checked:T.current})]})]}),E.current&&i.jsx(l.Typography,{sx:{width:"100%",textAlign:"center",color:x.palette.text.secondary},children:U("components:header:debug_mode_active",h.current)})]})})]})}function Ta({titleKey:e,widget:t,currentId:n,theme:r,showInternetSwitch:o=!0}){var m,x,h;const{i18nRef:s}=v.useContext(ve),{clientConfigRef:a}=v.useContext(Tr),{enabledRef:c}=v.useContext(ut),u=((h=(x=(m=a.current._global)==null?void 0:m.find(C=>C.id==="internetConfig"))==null?void 0:x.fields.find(C=>C.id==="internetConnectionAccess"))==null?void 0:h.value)??!0;v.useEffect(()=>{const C=U("branding:software:name",s.current),E=U(e,s.current);document.title=`${E} - ${C}`});const p=r?l.ThemeProvider:v.Fragment,f=r?{theme:r}:{};let{product:g}=v.useContext(Er),b=g&&g.os==="android";return i.jsx(p,{...f,children:i.jsx(l.Box,{sx:{display:"flex-start",flexGrow:1,m:0,p:0},children:i.jsx(l.AppBar,{position:"static",sx:{m:0,p:0,paddingTop:b?"30px":"0px",paddingLeft:b?"30px":"0px",paddingRight:b?"30px":"0px"},children:i.jsxs(l.Toolbar,{variant:"dense",sx:{m:0,p:0},children:[i.jsx(Rp,{currentId:n}),e&&e.length>0&&i.jsx(l.Typography,{variant:"h6",sx:{m:0,p:0},children:U(e,s.current)}),i.jsx(l.Box,{sx:{flexGrow:1,m:0,p:0},children:t}),i.jsx(l.Box,{sx:{m:0,p:0},children:u&&o&&i.jsx(zo,{netEnabled:c.current,i18n:s.current,isAndroid:b})})]})})})})}async function Mp(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function Ap(e){let t,n,r,o=!1;return function(a){t===void 0?(t=a,n=0,r=-1):t=Np(t,a);const c=t.length;let u=0;for(;n<c;){o&&(t[n]===10&&(u=++n),o=!1);let p=-1;for(;n<c&&p===-1;++n)switch(t[n]){case 58:r===-1&&(r=n-u);break;case 13:o=!0;case 10:p=n;break}if(p===-1)break;e(t.subarray(u,p),r),u=n,r=-1}u===c?t=void 0:u!==0&&(t=t.subarray(u),n-=u)}}function Bp(e,t,n){let r=ka();const o=new TextDecoder;return function(a,c){if(a.length===0)n==null||n(r),r=ka();else if(c>0){const u=o.decode(a.subarray(0,c)),p=c+(a[c+1]===32?2:1),f=o.decode(a.subarray(p));switch(u){case"data":r.data=r.data?r.data+`
|
|
254
|
+
`+f:f;break;case"event":r.event=f;break;case"id":e(r.id=f);break;case"retry":const g=parseInt(f,10);isNaN(g)||t(r.retry=g);break}}}}function Np(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function ka(){return{data:"",event:"",id:"",retry:void 0}}var Dp=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};const Ho="text/event-stream",Lp=1e3,Ea="last-event-id";function Fp(e,t){var{signal:n,headers:r,onopen:o,onmessage:s,onclose:a,onerror:c,openWhenHidden:u,fetch:p}=t,f=Dp(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((g,b)=>{const m=Object.assign({},r);m.accept||(m.accept=Ho);let x;function h(){x.abort(),document.hidden||_()}u||document.addEventListener("visibilitychange",h);let C=Lp,E=0;function w(){document.removeEventListener("visibilitychange",h),window.clearTimeout(E),x.abort()}n==null||n.addEventListener("abort",()=>{w(),g()});const T=p??window.fetch,P=o??Vp;async function _(){var O;x=new AbortController;try{const $=await T(e,Object.assign(Object.assign({},f),{headers:m,signal:x.signal}));await P($),await Mp($.body,Ap(Bp(j=>{j?m[Ea]=j:delete m[Ea]},j=>{C=j},s))),a==null||a(),w(),g()}catch($){if(!x.signal.aborted)try{const j=(O=c==null?void 0:c($))!==null&&O!==void 0?O:C;window.clearTimeout(E),E=window.setTimeout(_,j)}catch(j){w(),b(j)}}}_()})}function Vp(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(Ho)))throw new Error(`Expected content-type to be ${Ho}, Actual: ${t}`)}const ja=v.createContext({auth:!1,setAuth:()=>{}}),_a=v.createContext({typography:{},setTypography:()=>{}}),$a=v.createContext({currentProject:null,setCurrentProject:()=>{}}),Ia=v.createContext({systemBcv:!1,setSystemBcv:()=>{}}),Pa=v.createContext({messages:[],setMessages:()=>{}}),Oa=v.createContext({clientInterfaces:{},setClientInterfaces:()=>{}}),Ra=v.createContext({snippet:{},setSnippet:()=>{}}),Ma=v.createContext({word:{},setWord:()=>{}});var Ce="-ms-",kn="-moz-",de="-webkit-",Go="comm",En="rule",Ko="decl",zp="@media",Wp="@import",Up="@supports",Aa="@keyframes",qp=Math.abs,jn=String.fromCharCode,Xo=Object.assign;function Yp(e,t){return Oe(e,0)^45?(((t<<2^Oe(e,0))<<2^Oe(e,1))<<2^Oe(e,2))<<2^Oe(e,3):0}function Ba(e){return e.trim()}function gt(e,t){return(e=t.exec(e))?e[0]:e}function ae(e,t,n){return e.replace(t,n)}function Qo(e,t){return e.indexOf(t)}function Oe(e,t){return e.charCodeAt(t)|0}function Wt(e,t,n){return e.slice(t,n)}function ct(e){return e.length}function Hp(e){return e.length}function _n(e,t){return t.push(e),e}function Gp(e,t){return e.map(t).join("")}function Na(e,t){return e.filter(function(n){return!gt(n,t)})}var _r=1,sn=1,Da=0,Ze=0,Ie=0,an="";function $r(e,t,n,r,o,s,a,c){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:_r,column:sn,length:a,return:"",siblings:c}}function jt(e,t){return Xo($r("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function cn(e){for(;e.root;)e=jt(e.root,{children:[e]});_n(e,e.siblings)}function Kp(){return Ie}function Xp(){return Ie=Ze>0?Oe(an,--Ze):0,sn--,Ie===10&&(sn=1,_r--),Ie}function rt(){return Ie=Ze<Da?Oe(an,Ze++):0,sn++,Ie===10&&(sn=1,_r++),Ie}function _t(){return Oe(an,Ze)}function Ir(){return Ze}function Pr(e,t){return Wt(an,e,t)}function $n(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Qp(e){return _r=sn=1,Da=ct(an=e),Ze=0,[]}function Jp(e){return an="",e}function Jo(e){return Ba(Pr(Ze-1,Zo(e===91?e+2:e===40?e+1:e)))}function Zp(e){for(;(Ie=_t())&&Ie<33;)rt();return $n(e)>2||$n(Ie)>3?"":" "}function eh(e,t){for(;--t&&rt()&&!(Ie<48||Ie>102||Ie>57&&Ie<65||Ie>70&&Ie<97););return Pr(e,Ir()+(t<6&&_t()==32&&rt()==32))}function Zo(e){for(;rt();)switch(Ie){case e:return Ze;case 34:case 39:e!==34&&e!==39&&Zo(Ie);break;case 40:e===41&&Zo(e);break;case 92:rt();break}return Ze}function th(e,t){for(;rt()&&e+Ie!==57;)if(e+Ie===84&&_t()===47)break;return"/*"+Pr(t,Ze-1)+"*"+jn(e===47?e:rt())}function nh(e){for(;!$n(_t());)rt();return Pr(e,Ze)}function rh(e){return Jp(Or("",null,null,null,[""],e=Qp(e),0,[0],e))}function Or(e,t,n,r,o,s,a,c,u){for(var p=0,f=0,g=a,b=0,m=0,x=0,h=1,C=1,E=1,w=0,T=0,P="",_=o,O=s,$=r,j=P;C;)switch(x=T,T=rt()){case 40:x!=108&&Oe(j,g-1)==58?(w++,j+="("):j+=Jo(T);break;case 41:w--,j+=")";break;case 34:case 39:case 91:j+=Jo(T);break;case 9:case 10:case 13:case 32:if(w>0){j+=jn(T);break}j+=Zp(x);break;case 92:j+=eh(Ir()-1,7);continue;case 47:switch(_t()){case 42:case 47:_n(oh(th(rt(),Ir()),t,n,u),u),($n(x||1)==5||$n(_t()||1)==5)&&ct(j)&&Wt(j,-1,void 0)!==" "&&(j+=" ");break;default:j+="/"}break;case 123*h:c[p++]=ct(j)*E;case 125*h:case 59:case 0:if(w>0&&T){j+=jn(T);break}switch(T){case 0:case 125:C=0;case 59+f:E==-1&&(j=ae(j,/\f/g,"")),m>0&&(ct(j)-g||h===0)&&_n(m>32?Fa(j+";",r,n,g-1,u):Fa(ae(j," ","")+";",r,n,g-2,u),u);break;case 59:j+=";";default:if(_n($=La(j,t,n,p,f,o,c,P,_=[],O=[],g,s),s),T===123)if(f===0)Or(j,t,$,$,_,s,g,c,O);else{switch(b){case 99:if(Oe(j,3)===110)break;case 108:if(Oe(j,2)===97)break;default:f=0;case 100:case 109:case 115:}f?Or(e,$,$,r&&_n(La(e,$,$,0,0,o,c,P,o,_=[],g,O),O),o,O,g,c,r?_:O):Or(j,$,$,$,[""],O,0,c,O)}}p=f=m=0,h=E=1,P=j="",g=a;break;case 58:g=1+ct(j),m=x;default:if(h<1){if(T==123)--h;else if(T==125&&h++==0&&Xp()==125)continue}switch(j+=jn(T),T*h){case 38:E=f>0?1:(j+="\f",-1);break;case 44:if(w>0)break;c[p++]=(ct(j)-1)*E,E=1;break;case 64:_t()===45&&(j+=Jo(rt())),b=_t(),f=g=ct(P=j+=nh(Ir())),T++;break;case 45:x===45&&ct(j)==2&&(h=0)}}return s}function La(e,t,n,r,o,s,a,c,u,p,f,g){for(var b=o-1,m=o===0?s:[""],x=Hp(m),h=0,C=0,E=0;h<r;++h)for(var w=0,T=Wt(e,b+1,b=qp(C=a[h])),P=e;w<x;++w)(P=Ba(C>0?m[w]+" "+T:ae(T,/&\f/g,m[w])))&&(u[E++]=P);return $r(e,t,n,o===0?En:c,u,p,f,g)}function oh(e,t,n,r){return $r(e,t,n,Go,jn(Kp()),Wt(e,2,-2),0,r)}function Fa(e,t,n,r,o){return $r(e,t,n,Ko,Wt(e,0,r),Wt(e,r+1,-1),r,o)}function Va(e,t,n){switch(Yp(e,t)){case 5103:return de+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return de+e+e;case 4855:return de+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return kn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return de+e+kn+e+Ce+e+e;case 5936:switch(Oe(e,t+11)){case 114:return de+e+Ce+ae(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return de+e+Ce+ae(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return de+e+Ce+ae(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return de+e+Ce+e+e;case 6165:return de+e+Ce+"flex-"+e+e;case 5187:return de+e+ae(e,/(\w+).+(:[^]+)/,de+"box-$1$2"+Ce+"flex-$1$2")+e;case 5443:return de+e+Ce+"flex-item-"+ae(e,/flex-|-self/g,"")+(gt(e,/flex-|baseline/)?"":Ce+"grid-row-"+ae(e,/flex-|-self/g,""))+e;case 4675:return de+e+Ce+"flex-line-pack"+ae(e,/align-content|flex-|-self/g,"")+e;case 5548:return de+e+Ce+ae(e,"shrink","negative")+e;case 5292:return de+e+Ce+ae(e,"basis","preferred-size")+e;case 6060:return de+"box-"+ae(e,"-grow","")+de+e+Ce+ae(e,"grow","positive")+e;case 4554:return de+ae(e,/([^-])(transform)/g,"$1"+de+"$2")+e;case 6187:return ae(ae(ae(e,/(zoom-|grab)/,de+"$1"),/(image-set)/,de+"$1"),e,"")+e;case 5495:case 3959:return ae(e,/(image-set\([^]*)/,de+"$1$`$1");case 4968:return ae(ae(e,/(.+:)(flex-)?(.*)/,de+"box-pack:$3"+Ce+"flex-pack:$3"),/space-between/,"justify")+de+e+e;case 4200:if(!gt(e,/flex-|baseline/))return Ce+"grid-column-align"+Wt(e,t)+e;break;case 2592:case 3360:return Ce+ae(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,o){return t=o,gt(r.props,/grid-\w+-end/)})?~Qo(e+(n=n[t].value),"span")?e:Ce+ae(e,"-start","")+e+Ce+"grid-row-span:"+(~Qo(n,"span")?gt(n,/\d+/):+gt(n,/\d+/)-+gt(e,/\d+/))+";":Ce+ae(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return gt(r.props,/grid-\w+-start/)})?e:Ce+ae(ae(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return ae(e,/(.+)-inline(.+)/,de+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ct(e)-1-t>6)switch(Oe(e,t+1)){case 109:if(Oe(e,t+4)!==45)break;case 102:return ae(e,/(.+:)(.+)-([^]+)/,"$1"+de+"$2-$3$1"+kn+(Oe(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Qo(e,"stretch")?Va(ae(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return ae(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,o,s,a,c,u,p){return Ce+o+":"+s+p+(a?Ce+o+"-span:"+(c?u:+u-+s)+p:"")+e});case 4949:if(Oe(e,t+6)===121)return ae(e,":",":"+de)+e;break;case 6444:switch(Oe(e,Oe(e,14)===45?18:11)){case 120:return ae(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+de+(Oe(e,14)===45?"inline-":"")+"box$3$1"+de+"$2$3$1"+Ce+"$2box$3")+e;case 100:return ae(e,":",":"+Ce)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return ae(e,"scroll-","scroll-snap-")+e}return e}function za(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Wa(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Ko:e.return=Va(e.value,e.length,n);return;case Aa:return za([jt(e,{value:ae(e.value,"@","@"+de)})],r);case En:if(e.length)return Gp(n=e.props,function(o){switch(gt(o,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":cn(jt(e,{props:[ae(o,/:(read-\w+)/,":"+kn+"$1")]})),cn(jt(e,{props:[o]})),Xo(e,{props:Na(n,r)});break;case"::placeholder":cn(jt(e,{props:[ae(o,/:(plac\w+)/,":"+de+"input-$1")]})),cn(jt(e,{props:[ae(o,/:(plac\w+)/,":"+kn+"$1")]})),cn(jt(e,{props:[ae(o,/:(plac\w+)/,Ce+"input-$1")]})),cn(jt(e,{props:[o]})),Xo(e,{props:Na(n,r)});break}return""})}}var Rr={exports:{}};/*!
|
|
255
255
|
* CSSJanus. https://www.mediawiki.org/wiki/CSSJanus
|
|
256
256
|
*
|
|
257
257
|
* Copyright 2014 Trevor Parscal
|
|
@@ -269,6 +269,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
269
269
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
270
270
|
* See the License for the specific language governing permissions and
|
|
271
271
|
* limitations under the License.
|
|
272
|
-
*/var Ua;function sh(){return Ua||(Ua=1,(function(e,t){var n;function r(s,a){var c=[],u=0;function p(g){return c.push(g),a}function f(){return c[u++]}return{tokenize:function(g){return g.replace(s,p)},detokenize:function(g){return g.replace(new RegExp("("+a+")","g"),f)}}}function o(){var s="`TMP`",a="`TMPLTR`",c="`TMPRTL`",u="`NOFLIP_SINGLE`",p="`NOFLIP_CLASS`",f="`COMMENT`",g="[^\\u0020-\\u007e]",b="(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)",m="(?:[0-9]*\\.[0-9]+|[0-9]+)",x="(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)",h="direction\\s*:\\s*",C="[!#$%&*-~]",E=`['"]?\\s*`,w="(^|[^a-zA-Z])",T="[^\\}]*?",P="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",_="\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/",O="(?:"+b+"|\\\\[^\\r\\n\\f0-9a-f])",$="(?:[_a-z]|"+g+"|"+O+")",j="(?:[_a-z0-9-]|"+g+"|"+O+")",B="-?"+$+j+"*",z=m+"(?:\\s*"+x+"|"+B+")?",S="((?:-?"+z+")|(?:inherit|auto))",d="(?:-?"+m+"(?:\\s*"+x+")?)",A="(?:\\+|\\-|\\*|\\/)",R="(?:\\(|\\)|\\t| )",D="(?:"+R+"|"+d+"|"+A+"){3,}",G="(?:calc\\((?:"+D+")\\))",J="((?:-?"+z+")|(?:inherit|auto)|"+G+")",oe="((?:margin|padding|border-width)\\s*:\\s*)",ie="((?:-color|border-style)\\s*:\\s*)",V="(#?"+j+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",k="(?:"+C+"|"+g+"|"+O+")*?",q="(?![a-zA-Z])",K="(?!("+j+`|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|"[^"]*"|`+f+")*?{)",M="(?!"+k+E+"\\))",Q="(?="+k+E+"\\))",N="(\\s*(?:!important\\s*)?[;}])",I=/`TMP`/g,U=/`TMPLTR`/g,X=/`TMPRTL`/g,ne=new RegExp(_,"gi"),te=new RegExp("("+P+K+"[^;}]+;?)","gi"),Y=new RegExp("("+P+T+"})","gi"),ke=new RegExp("("+h+")ltr","gi"),Re=new RegExp("("+h+")rtl","gi"),ot=new RegExp(w+"(left)"+q+M+K,"gi"),$t=new RegExp(w+"(right)"+q+M+K,"gi"),yt=new RegExp(w+"(left)"+Q,"gi"),bt=new RegExp(w+"(right)"+Q,"gi"),Me=/(:dir\( *)ltr( *\))/g,lt=/(:dir\( *)rtl( *\))/g,et=new RegExp(w+"(ltr)"+Q,"gi"),tt=new RegExp(w+"(rtl)"+Q,"gi"),Ut=new RegExp(w+"([ns]?)e-resize","gi"),It=new RegExp(w+"([ns]?)w-resize","gi"),Pt=new RegExp(oe+J+"(\\s+)"+J+"(\\s+)"+J+"(\\s+)"+J+N,"gi"),Ot=new RegExp(ie+V+"(\\s+)"+V+"(\\s+)"+V+"(\\s+)"+V+N,"gi"),Rt=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+z+")","gi"),Mt=new RegExp("(background-position-x\\s*:\\s*)(-?"+m+"%)","gi"),At=new RegExp("(border-radius\\s*:\\s*)"+S+"(?:(?:\\s+"+S+")(?:\\s+"+S+")?(?:\\s+"+S+")?)?(?:(?:(?:\\s*\\/\\s*)"+S+")(?:\\s+"+S+")?(?:\\s+"+S+")?(?:\\s+"+S+")?)?"+N,"gi"),Se=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+S,"gi"),be=new RegExp("(text-shadow\\s*:\\s*)"+S+"(\\s*)"+V,"gi"),We=new RegExp("(text-shadow\\s*:\\s*)"+V+"(\\s*)"+S,"gi"),Fe=new RegExp("(text-shadow\\s*:\\s*)"+S,"gi"),ce=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+S+"(\\s*\\))","gi"),On=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+S+"((?:\\s*,\\s*"+S+"){0,2}\\s*\\))","gi");function Nr(se,H,re){var ee,Ne;return H.split("(").length>H.split(")").length?se:(re.slice(-1)==="%"&&(ee=re.indexOf("."),ee!==-1?(Ne=re.length-ee-2,re=100-parseFloat(re),re=re.toFixed(Ne)+"%"):re=100-parseFloat(re)+"%"),H+re)}function Rn(se){switch(se.length){case 4:se=[se[1],se[0],se[3],se[2]];break;case 3:se=[se[1],se[0],se[1],se[2]];break;case 2:se=[se[1],se[0]];break;case 1:se=[se[0]];break}return se.join(" ")}function as(se,H){var re,ee=[].slice.call(arguments),Ne=ee.slice(2,6).filter(function(cs){return cs}),Bt=ee.slice(6,10).filter(function(cs){return cs}),Vr=ee[10]||"";return Bt.length?re=Rn(Ne)+" / "+Rn(Bt):re=Rn(Ne),H+re+Vr}function Mn(se){return parseFloat(se)===0?se:se[0]==="-"?se.slice(1):"-"+se}function Dr(se,H,re){return H+Mn(re)}function Lr(se,H,re,ee,Ne){return H+re+Mn(ee)+Ne}function Fr(se,H,re,ee,Ne){return H+re+ee+Mn(Ne)}return{transform:function(se,H){var re=new r(te,u),ee=new r(Y,p),Ne=new r(ne,f);return se=Ne.tokenize(ee.tokenize(re.tokenize(se.replace("`","%60")))),H.transformDirInUrl&&(se=se.replace(Me,"$1"+a+"$2").replace(lt,"$1"+c+"$2").replace(et,"$1"+s).replace(tt,"$1ltr").replace(I,"rtl").replace(U,"ltr").replace(X,"rtl")),H.transformEdgeInUrl&&(se=se.replace(yt,"$1"+s).replace(bt,"$1left").replace(I,"right")),se=se.replace(ke,"$1"+s).replace(Re,"$1ltr").replace(I,"rtl").replace(ot,"$1"+s).replace($t,"$1left").replace(I,"right").replace(Ut,"$1$2"+s).replace(It,"$1$2e-resize").replace(I,"w-resize").replace(At,as).replace(Se,Dr).replace(be,Fr).replace(We,Fr).replace(Fe,Dr).replace(ce,Lr).replace(On,Lr).replace(Pt,"$1$2$3$8$5$6$7$4$9").replace(Ot,"$1$2$3$8$5$6$7$4$9").replace(Rt,Nr).replace(Mt,Nr),se=re.detokenize(ee.detokenize(Ne.detokenize(se))),se}}}n=new o,e.exports?t.transform=function(s,a,c){var u;return typeof a=="object"?u=a:(u={},typeof a=="boolean"&&(u.transformDirInUrl=a),typeof c=="boolean"&&(u.transformEdgeInUrl=c)),n.transform(s,u)}:typeof window<"u"&&(window.cssjanus=n)})(Rr,Rr.exports)),Rr.exports}var ih=sh();const ah=zr(ih);function qa(e,t,n){switch(e.type){case Wp:case Ko:case Go:return e.return=e.return||e.value;case En:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach(function(o){o.type===Go&&(o.children=o.value)})}var r=za(Array.prototype.concat(e.children),qa);return ct(r)?e.return=e.value+"{"+r+"}":""}function Ya(e,t,n,r){if(e.type===Aa||e.type===Up||e.type===En&&(!e.parent||e.parent.type===zp||e.parent.type===En)){var o=ah.transform(qa(e));e.children=o?rh(o)[0].children:[],e.return=""}}Object.defineProperty(Ya,"name",{value:"stylisRTLPlugin"});function Ha(){return i.jsx(l.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100%"},children:i.jsx(l.CircularProgress,{})})}function Ga({children:e,netValue:t,debugValue:n,bcvValue:r,i18nValue:o,authValue:s,typographyValue:a,currentProjectValue:c,clientConfigValue:u,clientInterfacesValue:p,snippetValue:f,wordValue:g,productValue:b,betaValue:m}){var S,d;const[x,h]=v.useState([]),C={messages:x,setMessages:h},{enqueueSnackbar:E}=qe.useSnackbar(),[w,T]=v.useState(""),[P,_]=v.useState(null),[O,$]=v.useState({palette:{primary:{main:"#666"},secondary:{main:"#888"}}}),[j,B]=v.useState(null);v.useEffect(()=>{Nn({url:"/api/app-resources/themes/default.json",setter:$}).catch(A=>{console.error("Failed to load Pankosmia theme:",A)})},[]),v.useEffect(()=>{let A={};document.fonts.ready.then(()=>{document.fonts.forEach(R=>{const D=R.family.replace(/['"]/g,"").trim().replace(/\s+/g," ");A[D.replaceAll(" ","")]=D}),_(A)})},[]),v.useEffect(()=>{if(P){let A=[],R={},D=a.typographyRef.current.font_set.split("Pankosmia");D.shift(),D=D.map(G=>"Pankosmia"+G),Object.entries(P).forEach(([G,J])=>{let oe=D.indexOf(G);oe>=0&&(R[oe]=J)});for(let G=0;G<Object.keys(D).length;G++)R[G]&&A.push(R[G]);T(A)}},[(S=a.typographyRef.current)==null?void 0:S.font_set,P]),v.useEffect(()=>{const A=R=>{const D=R.split("--");D.length===4&&E(`${D[2]} => ${D[3]}`,{variant:D[0],anchorOrigin:{vertical:"bottom",horizontal:"right"}})};x.length>0&&(x.forEach(R=>A(R)),h([]))},[x,E]),v.useEffect(()=>{var D;const A=((D=a==null?void 0:a.typography)==null?void 0:D.direction)==="rtl"?"rtl":"ltr",R=yr({direction:A,typography:{...O.typography||{},fontFamily:w.length?w.join(","):"inherit"},components:{MuiCssBaseline:{styleOverrides:{html:{fontFamily:w.length?w.join(","):void 0},body:{fontFamily:w.length?w.join(","):void 0},"#root":{fontFamily:w.length?w.join(","):void 0},"*, *::before, *::after":{fontFamily:"inherit"}}},MuiFab:{styleOverrides:{root:{textTransform:"none"}}},MuiButton:{styleOverrides:{root:{textTransform:"none"}}},MuiTab:{styleOverrides:{root:{textTransform:"none"}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none"}}}}},O);B(R)},[O,w,(d=a==null?void 0:a.typography)==null?void 0:d.direction]),console.log(j);const z=v.useMemo(()=>j?j.direction==="rtl"?ri({key:"muirtl",stylisPlugins:[Wa,Ya]}):ri({key:"mui",stylisPlugins:[Wa]}):null,[j]);return v.useEffect(()=>{j!=null&&j.direction&&(document.documentElement.dir=j.direction)},[j==null?void 0:j.direction]),!j||!z?i.jsx(Ha,{}):i.jsx(Ue.CacheProvider,{value:z,children:i.jsxs(Kf,{theme:j,children:[i.jsx(l.CssBaseline,{}),i.jsx(jr.Provider,{value:m,children:i.jsx(Tr.Provider,{value:u,children:i.jsx(Oa.Provider,{value:p,children:i.jsx(ve.Provider,{value:o,children:i.jsx(Ra.Provider,{value:f,children:i.jsx(Ma.Provider,{value:g,children:i.jsx(_a.Provider,{value:a,children:i.jsx(ja.Provider,{value:s,children:i.jsx($a.Provider,{value:c,children:i.jsx(Ia.Provider,{value:r,children:i.jsx(Pa.Provider,{value:C,children:i.jsx(xt.Provider,{value:n,children:i.jsx(Er.Provider,{value:b,children:i.jsx(ut.Provider,{value:t,children:i.jsx(l.Box,{sx:{height:"100vh",overflow:"hidden"},children:!o||!o.i18n||Object.keys(o.i18n).length===0?i.jsx(Ha,{}):e})})})})})})})})})})})})})})})]})})}var Mr={exports:{}},ch=Mr.exports,Ka;function lh(){return Ka||(Ka=1,(function(e,t){(function(n,r,o){e.exports=o()})("dcopy",ch,function(){return function(r){if(/number|string|boolean/.test(typeof r))return r;if(r instanceof Date)return new Date(r.getTime());var o=r instanceof Array?[]:{};return s(r,o),o;function s(a,c){for(var u in a){var p=a[u];if(p instanceof Date){var f=new Date(p.getTime());n(c,u,f)}else if(p instanceof Function){var f=p;n(c,u,f)}else if(p instanceof Array){var f=[],g=n(c,u,f);s(p,g)}else if(p instanceof Object){var f={},g=n(c,u,f);s(p,g)}else{var f=p;n(c,u,f)}}}};function n(r,o,s){if(r instanceof Array)return r.push(s),r[r.length-1];if(r instanceof Object)return r[o]=s,r[o]}})})(Mr)),Mr.exports}var uh=lh();const dh=zr(uh);function Xa({children:e}){const[t,n]=v.useState(!1),r=v.useRef(t),o=H=>{r.current=H,n(H)},[s,a]=v.useState(!1),c=v.useRef(s),u=H=>{c.current=H,a(H)},[p,f]=v.useState(!1),g=v.useRef(p),b=H=>{g.current=H,f(H)},[m,x]=v.useState({}),h=v.useRef(m),C=H=>{h.current=H,x(H)},[E,w]=v.useState({bookCode:"TIT",chapterNum:1,verseNum:1,endVerseNum:1}),T=v.useRef(E),P=H=>{T.current=H,w(H)},[_,O]=v.useState({}),$=v.useRef(_),j=H=>{$.current=H,O(H)},[B,z]=v.useState({font_set:"Pankosmia-CardoPankosmia-EzraSILPankosmia-PadaukPankosmia-AwamiNastaliqPankosmia-NotoNastaliqUrduPankosmia-GentiumPlus",size:"medium",direction:"ltr"}),S=v.useRef(B),d=H=>{S.current=H,z(H)},[A,R]=v.useState(null),D=v.useRef(A),G=H=>{D.current=H,R(H)},[J,oe]=v.useState({}),ie=v.useRef(J),V=H=>{ie.current=H,oe(H)},k=async()=>{await Ee("/api/client-config").then(H=>H.json).then(H=>V(H)).catch(H=>console.error("Error :",H))},[q,K]=v.useState({}),M=v.useRef(q),Q=H=>{M.current=H,K(H)},[N,I]=v.useState(null),U=v.useRef(N),X=H=>{U.current=H,I(H)},[ne,te]=v.useState(null),Y=v.useRef(ne),ke=H=>{Y.current=H,te(H)},[Re,ot]=v.useState(null),$t=v.useRef(Re),yt=H=>{$t.current=H,ot(H)},bt=async()=>{await Ee("/api/client-interfaces").then(H=>H.json).then(H=>Q(H)).catch(H=>console.error("Error :",H))},Me=async()=>{const H=await Ee("/api/i18n/flat",c.current);H.ok?j(H.json):qe.enqueueSnackbar(`Could not load i18n: ${H.error.reason}`,{variant:"error",anchorOrigin:{vertical:"bottom",horizontal:"left"},persist:!0})},lt=async()=>{const H=await Ee("/api/settings/typography",c.current);H.ok?d(H.json):qe.enqueueSnackbar(`Could not load typography: ${H.error.reason}`,{variant:"error",anchorOrigin:{vertical:"bottom",horizontal:"left"},persist:!0})},et=async()=>{const H=await Ee("/api/version",c.current);H.ok?yt(H.json):qe.enqueueSnackbar(`Could not load version for product: ${H.error.reason}`,{variant:"error",anchorOrigin:{vertical:"bottom",horizontal:"left"},persist:!0})},tt=async()=>{const H=await Ee("/api/app-state/alignment",c.current);if(H.ok){const re=H.json.snippet,ee=H.json.word;re!==U.current&&X(re),JSON.stringify(ee)!==JSON.stringify(Y.current)&&ke(ee)}else qe.enqueueSnackbar(`Could not load alignment: ${H.error.reason}`,{variant:"error",anchorOrigin:{vertical:"bottom",horizontal:"left"},persist:!0})};v.useEffect(()=>{Me().then(),tt().then(),lt().then(),k().then(),bt().then(),et().then()},[]),v.useEffect(()=>{(async()=>{const re=await Ee("/api/navigation/bcv",c.current);if(re.ok){const ee=re.json;P({bookCode:ee.book_code,chapterNum:ee.chapter,verseNum:ee.verse})}else qe.enqueueSnackbar(`Could not load bcv: ${re.error.reason}`,{variant:"error",anchorOrigin:{vertical:"bottom",horizontal:"left"},persist:!0})})().then()},[]);const Ut=H=>{const re=H.data.split("--");if(re.length===6){const ee=re[1]==="enabled";ee!==r.current&&o(ee);const Ne=re[3]==="enabled";Ne!==c.current&&u(Ne);const Bt=re[5]==="enabled";Bt!==g.current&&b(Bt)}},It=H=>{const re=H.data.split("--");if(re.length===4){const ee={bookCode:re[0],chapterNum:parseInt(re[1]),verseNum:parseInt(re[2]),endVerseNum:parseInt(re[3])};(ee.bookCode!==T.current.bookCode||ee.chapterNum!==T.current.chapterNum||ee.verseNum!==T.current.verseNum||ee.endVerseNum!==T.current.endVerseNum)&&P(ee)}},Pt=H=>{const re=H.data.split("--");if(re.length===3){const ee={font_set:re[0],size:re[1],direction:re[2]};(ee.font_set!==S.current.font_set||ee.size!==S.current.size||ee.direction!==S.current.direction)&&d(ee)}},Ot=()=>{Me().then()},Rt=H=>{try{const re=dh(h.current),[ee,Ne,Bt]=H.data.split("--");if(["true","false"].includes(Bt)){const Vr=Bt==="true";(!(ee in re)||!("isActive"in re[ee])||Vr!==re[ee].isActive)&&(re[ee]={endpoint:Ne,isActive:Vr},C(re))}}catch(re){console.log(`Auth Error: ${re}, data: ${H.data}`)}},Mt=H=>{if(H.data===null)D.current!==null&&G(null);else{const re=H.data.split("--");if(re.length===3){let ee={source:re[0],organization:re[1],project:re[2]};(!D.current||ee.source!==D.current.source||ee.organization!==D.current.organization||ee.project!==D.current.project)&&G(ee)}else G(null)}},At=()=>{tt().then()};v.useEffect(()=>{const H=new AbortController;return(async()=>{await Fp("/api/notifications",{method:"GET",headers:{Accept:"text/event-stream"},onopen(ee){ee.ok&&ee.status===200||ee.status>=400&&ee.status<500&&ee.status!==429&&console.log("Error from SSE",ee.status)},onmessage(ee){ee.event==="misc"?miscHandler(ee):ee.event==="status"?Ut(ee):ee.event==="bcv"?It(ee):ee.event==="auth"?Rt(ee):ee.event==="languages"?Ot():ee.event==="typography"?Pt(ee):ee.event==="current_project"?Mt(ee):ee.event==="alignment"&&At()},onclose(){console.log("SSE connection closed by the server")},onerror(ee){console.log("There was an error from the SSE server",ee)}})})(),()=>H.abort()},[]);const Se={enableNet:t,setEnableNet:o,enabledRef:r},be={debug:s,setDebug:u,debugRef:c},We={beta:p,setBeta:b,betaRef:g},Fe={systemBcv:E,setSystemBcv:P,bcvRef:T},ce={auth:m,setAuth:C,authRef:h},On={i18n:_,setI18n:j,i18nRef:$},Nr={typography:B,setTypography:d,typographyRef:S},Rn={currentProject:A,setCurrentProject:G,currentProjectRef:D},as={clientInterfaces:q,setClientInterfaces:Q,clientInterfacesRef:M},Mn={snippet:N,setSnippet:X,snippetRef:U},Dr={word:ne,setWord:ke,wordRef:Y},Lr={clientConfig:J,setClientConfig:V,clientConfigRef:ie},Fr={product:Re,setProduct:yt,productRef:$t},se=Ge(qe.MaterialDesignContent)(()=>({"&.notistack-MuiContent-error":{backgroundColor:"#FDEDED",color:"#D32F2F"},"&.notistack-MuiContent-info":{backgroundColor:"#E5F6FD",color:"#0288D1"},"&.notistack-MuiContent-warning":{backgroundColor:"#FFF4E5",color:"#EF6C00"},"&.notistack-MuiContent-success":{backgroundColor:"#EDF7ED",color:"#2E7D32"}}));return i.jsx(qe.SnackbarProvider,{Components:{error:se,info:se,warning:se,success:se},maxSnack:6,children:i.jsx(Ga,{netValue:Se,debugValue:be,i18nValue:On,bcvValue:Fe,authValue:ce,typographyValue:Nr,currentProjectValue:Rn,clientConfigValue:Lr,clientInterfacesValue:as,snippetValue:Mn,wordValue:Dr,productValue:Fr,betaValue:We,children:e})})}function Qa({children:e}){return i.jsx(qe.SnackbarProvider,{maxSnack:3,children:i.jsx(Xa,{children:e})})}function Ja({titleKey:e,widget:t,margin:n=0,children:r,requireNet:o=!1,currentId:s}){const{enableNet:a}=v.useContext(ut),{i18nRef:c}=v.useContext(ve);return o&&!a?i.jsx(l.Box,{sx:{m:0,height:"100%",overflowX:"hidden",overflowY:"auto"},children:i.jsx(l.Grid,{container:!0,sx:{alignItems:"center",justifyContent:"center",minHeight:"100vh"},children:i.jsxs(l.Grid,{rowSpacing:.5,sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[i.jsx(Cp,{sx:{fontSize:80},color:"warning"}),i.jsx("p",{children:W("components:framework:no_entry_if_offline",c.current)})]})})}):i.jsxs(i.Fragment,{children:[i.jsx(l.Box,{children:i.jsx(Ta,{titleKey:e||null,widget:t||null,currentId:s})}),i.jsx(l.Box,{sx:{m:n,overflowX:"hidden",overflowY:"auto"},children:r})]})}function fh({children:e,titleKey:t,requireNet:n,currentId:r,widget:o,margin:s}){return i.jsx(Qa,{children:i.jsx(Ja,{titleKey:t,requireNet:n,currentId:r,widget:o||null,margin:s||0,children:e})})}const ph=v.createContext({languages:!1,setLanguages:()=>{}}),Ar={select:{background:"white"},inputLabel:{}};function es(e){const{listItem:t}=e,n={menuItem:{display:"flex",justifyContent:"space-between",color:"Black"}};return i.jsx("div",{style:n.menuItem,children:i.jsx("div",{style:n.menuItem,children:i.jsx(l.Typography,{style:{width:"100%"},noWrap:!0,variant:"body2",component:"div",children:t})})})}es.propTypes={listItem:Fn.PropTypes.shape({index:Fn.PropTypes.objectOf(Fn.PropTypes.string)})};function hh({isOpen:e,versification:t,setVersification:n}){const{i18nRef:r}=v.useContext(ve),[o,s]=v.useState([]),[a,c]=v.useState(!1),u=()=>c(p=>!p);return v.useEffect(()=>{e&&Nn({url:"/api/content-utils/versifications",setter:s}).then()},[e]),i.jsxs(l.Stack,{spacing:1,children:[i.jsxs(l.Typography,{variant:"body1",children:[" ",W("library:pankosmia-rcl:choose_versification",r.current)," "]}),i.jsxs(l.Stack,{spacing:0,children:[i.jsx(l.Typography,{variant:"body2",sx:{display:"-webkit-box",WebkitLineClamp:a?"unset":1,WebkitBoxOrient:"vertical",overflow:"hidden"},children:W("library:pankosmia-rcl:text_versification",r.current)}),i.jsx(l.Button,{onClick:u,color:"secondary",size:"small",disableRipple:!0,sx:{alignSelf:"flex-start",p:0,minWidth:0,textTransform:"none",fontSize:"0.8rem",fontWeight:400,"&:hover":{background:"none",textDecoration:"underline"}},children:W(a?"library:pankosmia-rcl:show_less":"library:pankosmia-rcl:show_more",r.current)})]}),i.jsxs(l.FormControl,{sx:{width:"100%"},children:[i.jsx(l.InputLabel,{id:"booksVersification-label",required:!0,htmlFor:"booksVersification",sx:Ar.inputLabel,children:W("library:pankosmia-rcl:versification_scheme",r.current)}),i.jsx(l.Select,{variant:"outlined",required:!0,labelId:"booksVersification-label",name:"booksVersification",inputProps:{id:"bookVersification"},value:t,label:W("library:pankosmia-rcl:versification_scheme",r.current),onChange:p=>{n(p.target.value)},sx:Ar.select,children:o.map((p,f)=>i.jsx(l.MenuItem,{value:p,dense:!0,children:i.jsx(es,{listItem:`${p.toUpperCase()} - ${W(`scripture:versifications:${p}`,r.current)}`})},f))}),i.jsxs(l.FormHelperText,{children:[" ",W("library:pankosmia-rcl:helper_versification",r.current)]})]})]})}function mh({bookCode:e,setBookCode:t,bookAbbr:n,setBookAbbr:r,bookTitle:o,setBookTitle:s,bookCodes:a,showVersification:c,setShowVersification:u,bookProject:p,addVerses:f=!0}){var w,T,P,_,O,$,j,B;const{i18nRef:g}=v.useContext(ve),[b,m]=v.useState(!0),[x,h]=v.useState({});v.useEffect(()=>{Ee("/api/client-config").then(z=>z.json).then(z=>h(z)).catch(z=>console.error("Error :",z))},[]);const C=((_=(P=(T=(w=x==null?void 0:x["core-contenthandler_text_translation"])==null?void 0:w.find(z=>z.id==="config"))==null?void 0:T.fields)==null?void 0:P.find(z=>z.id==="protestantBooksOnlyCheckbox"))==null?void 0:_.value)!==!1,E=((B=(j=($=(O=x==null?void 0:x["core-contenthandler_text_translation"])==null?void 0:O.find(z=>z.id==="config"))==null?void 0:$.fields)==null?void 0:j.find(z=>z.id==="protestantBooksOnlyDefaultChecked"))==null?void 0:B.value)!==!1;return v.useEffect(()=>{m(E)},[E]),i.jsx(i.Fragment,{children:i.jsxs(l.Grid,{container:!0,spacing:1,sx:{justifyItems:"flex-end",alignItems:"stretch"},children:[i.jsx(l.Grid,{size:4,children:i.jsxs(l.FormControl,{sx:{width:"100%"},children:[i.jsx(l.InputLabel,{id:"bookCode-label",required:!0,htmlFor:"bookCode",sx:Ar.inputLabel,children:W("library:pankosmia-rcl:book_code",g.current)}),i.jsx(l.Select,{variant:"outlined",labelId:"bookCode-label",name:"bookCode",inputProps:{id:"bookCode"},value:e,label:W("library:pankosmia-rcl:book_code",g.current),onChange:z=>{t(z.target.value),r(["1","2","3"].includes(z.target.value[0])?z.target.value.slice(0,2)+z.target.value[2].toLowerCase():z.target.value[0]+z.target.value.slice(1).toLowerCase()),s(W(`scripture:books:${z.target.value}`,g.current))},sx:Ar.select,children:(b?a.slice(0,66):a).map((z,S)=>i.jsx(l.MenuItem,{value:z,dense:!0,disabled:p?p.includes(z):!1,children:i.jsx(es,{listItem:`${z} - ${W(`scripture:books:${z}`,g.current)}`})},S))})]})}),i.jsx(l.Grid,{size:4,children:i.jsx(l.TextField,{id:"bookAbbr",required:!0,sx:{width:"100%"},label:W("library:pankosmia-rcl:book_abbr",g.current),value:n,onChange:z=>{r(z.target.value)}})}),i.jsx(l.Grid,{size:4,children:i.jsx(l.TextField,{id:"bookTitle",required:!0,sx:{width:"100%"},label:W("library:pankosmia-rcl:book_title",g.current),value:o,onChange:z=>{s(z.target.value)}})}),C&&i.jsx(l.FormGroup,{children:i.jsx(l.FormControlLabel,{control:i.jsx(l.Checkbox,{color:"secondary",checked:b,onChange:()=>m(!b)}),label:W("library:pankosmia-rcl:protestant_books_only",g.current)})}),f&&i.jsx(l.FormGroup,{children:i.jsx(l.FormControlLabel,{control:i.jsx(l.Checkbox,{color:"secondary",checked:!0,disabled:!0,onChange:()=>u(!c)}),label:W("library:pankosmia-rcl:add_versification_checkbox",g.current)})})]})})}function gh({steps:e,initialStep:t=0,renderStepContent:n,isStepValid:r,handleCreate:o,handleClose:s,requiredFieldsLabel:a,primaryButtonVariant:c,primaryActionKey:u,secondaryButtonVariant:p,secondaryActionKey:f,primaryAction:g,secondaryAction:b,isLeftStepperButtonDisabled:m,CustomHeader:x,isInDialogue:h=!1}){const C=Math.min(Math.max(t-1,0),e.length-1),[E,w]=v.useState(C),[T,P]=v.useState(new Set),{i18nRef:_}=v.useContext(ve),O=v.useRef(null),[$,j]=v.useState(0);v.useEffect(()=>{const d=O.current;if(!d)return;const A=()=>{j(d.getBoundingClientRect().height)};A();const R=new ResizeObserver(A);return R.observe(d),()=>R.disconnect()},[]);const B=d=>T.has(d),z=async()=>{let d=T;if(B(E)&&(d=new Set(d.values()),d.delete(E)),E===e.length-1){try{await o()}catch(A){console.error("Error create project",A)}return}w(A=>A+1),P(d)},S=()=>{w(d=>d-1)};return i.jsxs(i.Fragment,{children:[i.jsx(l.Stepper,{sx:{position:"sticky"},activeStep:E,children:e.map((d,A)=>{const R={},D={};return B(A)&&(R.completed=!1),i.jsx(l.Step,{...R,children:i.jsx(l.StepLabel,{...D,children:d})},d)})}),i.jsxs(l.Box,{ref:O,children:[x&&i.jsx(x,{}),a&&i.jsx(l.DialogContentText,{variant:"subtitle2",sx:{padding:"16px 0px"},children:W("library:pankosmia-rcl:required_field",_.current)})]}),i.jsx(l.Box,{sx:{maxHeight:h?`calc(100% - 64px - ${$}px)`:"100vh",overflowY:"auto",overflowX:"hidden"},children:E!==e.length&&i.jsx(i.Fragment,{children:n(E)})}),i.jsxs(l.DialogActions,{sx:{justifyContent:"space-between",padding:"16px 0px 0px"},children:[i.jsx(l.Button,{sx:{padding:0},color:p||"inherit",onClick:E===0?s:b||S,disabled:m&&E===0,children:E===0?`${W(`${f||"library:pankosmia-rcl:cancel"}`,_.current)}`:`${W("library:pankosmia-rcl:back_button",_.current)}`}),i.jsx(l.Button,{sx:{padding:0},color:c||"inherit",onClick:g||z,disabled:!r(E),children:E===e.length-1?`${W(`${u||"library:pankosmia-rcl:create"}`,_.current)}`:`${W("library:pankosmia-rcl:next_button",_.current)}`})]})]})}const yh={palette:{primary:{main:"#666"},secondary:{main:"#888"}}};function bh({isAndroid:e,children:t}){return i.jsx(l.Box,{sx:{mb:2,position:"fixed",top:e?"78px":"48px",left:e?"30px":0,bottom:e?"30px":0,right:e?"30px":0,overflow:"auto",width:e?"calc(100% - 60px)":"100%"},children:t})}const xh=v.forwardRef(function({href:t,netEnabled:n,children:r,...o},s){return i.jsx("a",{ref:s,href:n?t:void 0,target:n?"_blank":void 0,rel:"noopener noreferrer",style:n?void 0:{color:"inherit",textDecoration:"none",cursor:"default"},...o,children:r})});function Za({titleSection:e,children:t}){return i.jsxs(l.Stack,{spacing:1,children:[i.jsx(l.Typography,{variant:"body1",sx:{fontWeight:"bold"},children:e}),i.jsx(l.Stack,{spacing:1,children:t})]})}const vh={unavailable:"download_unavailable",checking:"download_checking",idle:"download",downloading:"download_downloading",complete:"download_installed",error:"download_retry"},Ch={ffmpeg:{check:"checkFfmpegInstalled",onProgress:"onFfmpegDownloadProgress",onComplete:"onFfmpegDownloadComplete",download:"downloadFfmpeg"},firefox:{check:"checkFirefoxInstalled",onProgress:"onDownloadProgress",onComplete:"onDownloadComplete",download:"downloadFirefox"}};function ec({asset:e,actionButtonPlugin:t}){const{i18nRef:n}=v.useContext(ve),{enabledRef:r}=v.useContext(ut),[o,s]=v.useState("checking"),[a,c]=v.useState(null),[u,p]=v.useState(null),f=!!window.electronAPI,g=Ch[e];v.useEffect(()=>{if(!f||!g)return;let x=!1;return window.electronAPI[g.check]().then(h=>{x||s(h?"complete":"idle")}),()=>{x=!0}},[e]),v.useEffect(()=>{if(!f||!g)return;const x=window.electronAPI[g.onProgress](C=>{typeof C=="number"&&!Number.isNaN(C)&&c(Math.max(0,Math.min(100,C)))}),h=window.electronAPI[g.onComplete]((C,E)=>{s(C?"complete":"error"),p(C?null:E||null),C&&(c(100),t&&setTimeout(()=>{t==null||t()},1e3))});return()=>{x(),h()}},[e]);const b=()=>{!f||!g||(s("downloading"),c(null),p(null),window.electronAPI[g.download]())},m=typeof a=="number";return i.jsxs(i.Fragment,{children:[i.jsx(l.Tooltip,{title:!f||!r.current&&W("library:pankosmia-rcl:tooltip_offline_mode",n.current),children:i.jsx("span",{style:{alignSelf:"center"},children:i.jsx(l.Button,{size:"medium",variant:"contained",startIcon:o==="complete"?i.jsx(Sp,{}):o==="error"?i.jsx(Tp,{}):i.jsx(Ip,{}),onClick:b,disabled:o==="checking"||o==="downloading"||o==="complete"||!f||!r.current,title:W(f?"library:pankosmia-rcl:download":"library:pankosmia-rcl:download_unavailable_tip",n.current),children:W(`library:pankosmia-rcl:${vh[o==="checking"&&!f?"unavailable":o]}`,n.current)})})}),o==="downloading"&&i.jsxs(i.Fragment,{children:[i.jsx(l.LinearProgress,{variant:m?"determinate":"indeterminate",value:m?a:void 0}),i.jsx(l.Typography,{variant:"body2",children:m?`${Math.round(a)}% ${W("library:pankosmia-rcl:download_percent_complete",n.current)}`:W("library:pankosmia-rcl:download_downloading",n.current)})]}),o==="error"&&i.jsxs(l.Typography,{variant:"body2",color:"error",children:[W("library:pankosmia-rcl:download_failed",n.current),u?`: ${u}`:"","."]})]})}function tc({titleLabel:e,isOpen:t,closeFn:n,children:r,actionsButtonArray:o,requiredFieldsLabel:s=!1,dividers:a=!1}){const c=l.useTheme(),{i18nRef:u}=v.useContext(ve);return i.jsxs(l.Dialog,{onClose:()=>n(),open:t,sx:{overflow:"hidden"},slotProps:{sx:{overflow:"hidden !important",display:"flex",flexDirection:"column"},paper:{component:"form",sx:{width:"auto",minWidth:"280px"}}},onKeyDown:p=>{var g,b;if(p.key!=="Enter")return;const f=o==null?void 0:o[1];(g=f==null?void 0:f.props)!=null&&g.actionFn&&!((b=f.props)!=null&&b.isDisabled)&&(p.preventDefault(),f.props.actionFn())},maxWidth:"sm",fullWidth:!1,children:[i.jsx(l.DialogTitle,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:i.jsx(l.Typography,{variant:"h6",sx:{color:c.palette.primary},component:"div",children:e})}),a&&i.jsx(l.Divider,{}),s&&i.jsx(l.Box,{sx:{paddingTop:a?"16px":"0px",paddingBottom:"16px",px:3},children:i.jsx(l.Typography,{variant:"subtitle2",children:W("library:pankosmia-rcl:required_field",u.current)})}),i.jsx(l.DialogContent,{sx:{paddingTop:s?"0px":"16px",paddingBottom:2},children:r}),a&&i.jsx(l.Divider,{}),i.jsx(l.DialogActions,{children:o&&o.map(p=>p)})]})}function Br({actionFn:e,actionLabel:t,closeFn:n,closeLabel:r,isDisabled:o,closeOnAction:s=!0,onlyCloseButton:a=!1,actionVariant:c,closeVariant:u,isLoading:p,loadingLabel:f}){return[i.jsx(kr,{actionFn:n,isDisabled:!1,label:r,variant:u,isLoading:p,loadingLabel:f}),a?null:i.jsx(kr,{actionFn:()=>{e(),s&&n()},isDisabled:o,label:t,variant:c})]}function Sh({isOpen:e,closeFn:t,asset:n,actionButtonPlugin:r}){const{i18nRef:o}=v.useContext(ve);return i.jsx(tc,{titleLabel:W("library:pankosmia-rcl:Firefox_not_installed",o.current),isOpen:e,closeFn:()=>t(),actionsButtonArray:Br({closeFn:()=>t(),closeLabel:W("library:pankosmia-rcl:cancel",o.current),onlyCloseButton:!0}),children:i.jsxs(l.Stack,{spacing:2,justifyContent:"center",alignItems:"center",sx:{width:"100%"},children:[n==="firefox"&&i.jsx(l.Typography,{variant:"body1",children:W("library:pankosmia-rcl:need_pdf_engine",o.current)}),n==="ffmpeg"&&i.jsx(l.Typography,{variant:"body1",children:W("library:pankosmia-rcl:need_ffmpeg",o.current)}),i.jsx(ec,{asset:n,actionButtonPlugin:r})]})})}function ts({titleLabel:e,isOpen:t,closeFn:n,children:r,actionsButtonArray:o,requiredFieldsLabel:s=!1,header:a=null,fullHeight:c=!1}){const u=l.useTheme(),p=l.useMediaQuery(u.breakpoints.down("sm")),{i18nRef:f}=v.useContext(ve);return i.jsxs(l.Dialog,{fullScreen:p,open:t,sx:{overflow:"hidden"},onKeyDown:g=>{var m,x;if(g.key!=="Enter")return;const b=o==null?void 0:o[1];(m=b==null?void 0:b.props)!=null&&m.actionFn&&!((x=b.props)!=null&&x.isDisabled)&&(g.preventDefault(),b.props.actionFn())},slotProps:{paper:{component:"form",sx:{display:"flex",flexDirection:"column",overflow:"hidden",...c&&!p&&{height:"calc(100% - 64px)"}}}},maxWidth:"sm",fullWidth:!0,children:[i.jsxs(l.DialogTitle,{sx:{backgroundColor:u.palette.primary.main,display:"flex",flexDirection:"row",alignItems:"center"},children:[p&&i.jsx(l.IconButton,{sx:{color:u.palette.primary.contrastText},onClick:()=>{n()},children:i.jsx(ba,{})}),i.jsx(l.Typography,{variant:"h6",sx:{color:u.palette.primary.contrastText},component:"div",children:e}),o&&p&&o[1]&&v.cloneElement(o[1],{sx:{...o[1].props.sx,marginInlineStart:"auto",color:`${u.palette.primary.contrastText} !important`}})]}),(a||s)&&i.jsxs(l.Box,{sx:{py:2,px:3,flexShrink:0,display:"flex",flexDirection:"column",gap:2},children:[s&&i.jsx(l.Typography,{variant:"subtitle2",children:W("library:pankosmia-rcl:required_field",f.current)}),a]}),i.jsx(l.DialogContent,{sx:{pb:"16px !important",pt:a||s?"0px":"16px !important",flex:1,minHeight:0},children:r}),!p&&i.jsx(l.Divider,{}),!p&&i.jsx(l.DialogActions,{children:o&&o.map(g=>g)})]})}function wh({isOpen:e,setIsOpen:t,theme:n,children:r}){return i.jsx(l.SwipeableDrawer,{anchor:"bottom",open:e,onOpen:()=>{},onClose:()=>t(!1),swipeAreaWidth:40,PaperProps:{sx:{width:"100%",boxSizing:"border-box",overflow:"hidden"}},children:i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[i.jsx(l.Box,{sx:{width:"100%",paddingY:"22px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:i.jsx(l.Box,{sx:{width:32,height:4,borderRadius:2,backgroundColor:n.palette.action.active}})}),i.jsx(l.Box,{sx:{display:"flex",flexDirection:"column",overflow:"auto"},children:i.jsx(l.MenuList,{sx:{marginX:"16px",marginBottom:2},children:r})})]})})}function Th({isOpen:e,setIsOpen:t,children:n,anchorEl:r}){return i.jsx(l.Menu,{onClose:()=>t(!1),anchorEl:r,open:e,children:n})}function ns({isOpen:e,setIsOpen:t,anchorEl:n,children:r}){const o=l.useTheme();return l.useMediaQuery(o.breakpoints.down("sm"))?i.jsx(wh,{theme:o,isOpen:e,setIsOpen:t,children:r}):i.jsx(Th,{anchorEl:n,isOpen:e,setIsOpen:t,children:r})}function kh(e){return wt("MuiIconButton",e)}const nc=Tt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Eh=e=>{const{classes:t,disabled:n,color:r,edge:o,size:s,loading:a}=e,c={root:["root",a&&"loading",n&&"disabled",r!=="default"&&`color${De(r)}`,o&&`edge${De(o)}`,`size${De(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return qt(c,kh,t)},jh=Ge(Oo,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${De(n.color)}`],n.edge&&t[`edge${De(n.edge)}`],t[`size${De(n.size)}`]]}})(Et(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,...Cr(e,"background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Et(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Ro()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main,"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${nc.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${nc.loading}`]:{color:"transparent"}}))),_h=Ge("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),rc=F.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiIconButton"}),{edge:o=!1,children:s,className:a,color:c="default",disabled:u=!1,disableFocusRipple:p=!1,size:f="medium",id:g,loading:b=null,loadingIndicator:m,...x}=r,h=Ti(g),C=m??i.jsx(qo,{"aria-labelledby":h,color:"inherit",size:16}),E={...r,edge:o,color:c,disabled:u,disableFocusRipple:p,loading:b,loadingIndicator:C,size:f},w=Eh(E);return i.jsxs(jh,{id:b?h:g,className:Ae(w.root,a),centerRipple:!0,internalNativeButton:!0,focusRipple:!p,disabled:u||b,ref:n,...x,ownerState:E,children:[typeof b=="boolean"&&i.jsx("span",{className:w.loadingWrapper,style:{display:"contents"},children:i.jsx(_h,{className:w.loadingIndicator,ownerState:E,children:b&&C})}),s]})});process.env.NODE_ENV!=="production"&&(rc.propTypes={children:Qr(y.node,e=>F.Children.toArray(e.children).some(n=>F.isValidElement(n)&&n.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
273
|
-
`)):null),classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),y.string]),disabled:y.bool,disableFocusRipple:y.bool,disableRipple:y.bool,edge:y.oneOf(["end","start",!1]),id:y.string,loading:y.bool,loadingIndicator:y.node,size:y.oneOfType([y.oneOf(["small","medium","large"]),y.string]),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object])});function rs({children:e}){const t=l.useTheme(),n=l.useMediaQuery(t.breakpoints.down("lg")),r=l.useMediaQuery(t.breakpoints.down("sm"));return i.jsx(l.AppBar,{position:"static",children:i.jsx(l.Toolbar,{sx:{px:r?2:3},variant:n?"dense":"regular",children:i.jsx(l.Box,{sx:{display:"flex",gap:"4px",alignItems:"center",width:"100%"},children:e})})})}function $h({titleKey:e}){return i.jsxs(rs,{children:[i.jsx(rc,{size:"medium",edge:"start",color:"inherit",onClick:()=>window.history.back(),children:i.jsx(vp,{sx:{transform:t=>t.direction==="rtl"?"scaleX(-1)":"none"}})}),i.jsx(l.Typography,{variant:"h6",children:e})]})}function Ih(){return i.jsx(l.SvgIcon,{children:i.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",stroke:"none",children:[i.jsx("path",{d:"M13.9392 4H4C2.892 4 2 4.892 2 6V18C2 19.108 2.892 20 4 20H20C21.108 20 22 19.108 22 18V6L20 8V18H4V6H11.9392",fill:"currentColor",stroke:"none"}),i.jsx("path",{d:"M20 12H4V14H20V12Z",fill:"currentColor",stroke:"none"}),i.jsx("path",{d:"M10 14H8V18H10V14Z",fill:"currentColor",stroke:"none"}),i.jsx("path",{d:"M16 14H14V18H16V14Z",fill:"currentColor",stroke:"none"}),i.jsx("path",{d:"M13 10V6.925L18.525 1.425C18.675 1.275 18.8417 1.16667 19.025 1.1C19.2083 1.03333 19.3917 1 19.575 1C19.775 1 19.9667 1.0375 20.15 1.1125C20.3333 1.1875 20.5 1.3 20.65 1.45L21.575 2.375C21.7083 2.525 21.8125 2.69167 21.8875 2.875C21.9625 3.05833 22 3.24167 22 3.425C22 3.60833 21.9667 3.79583 21.9 3.9875C21.8333 4.17917 21.725 4.35 21.575 4.5L16.075 10H13ZM14.5 8.5H15.45L18.475 5.45L18.025 4.975L17.55 4.525L14.5 7.55V8.5ZM18.025 4.975L17.55 4.525L18.475 5.45L18.025 4.975Z",fill:"currentColor",stroke:"none"})]})})}function oc(){return i.jsx(l.SvgIcon,{children:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:"24px",width:"24px",fill:"currentColor",children:i.jsx("path",{d:"M9.25,22l-0.4-3.2q-0.32-0.13-0.61-0.3T7.68,18.13L4.7,19.38L1.95,14.63l2.58-1.95Q4.5,12.5 4.5,12.34q0-0.16 0-0.34t0-0.34t0.03-0.34L1.95,9.38L4.7,4.63L7.68,5.88Q7.95,5.68 8.25,5.5t0.6-0.3L9.25,2h5.5l0.4,3.2q0.33,0.13 0.61,0.3t0.56,0.38L19.3,4.63l2.75,4.75l-2.57,1.95q0.02,0.18 0.02,0.34t0,0.34t0,0.34t-0.05,0.34l2.57,1.95l-2.75,4.75l-2.95-1.25q-0.27,0.2-0.57,0.38t-0.6,0.3L14.75,22H9.25ZM11,20h1.98l0.35-2.65q0.78-0.2 1.44-0.59t1.21-0.94l2.47,1.03l0.98-1.7l-2.15-1.63q0.13-0.35 0.17-0.74T17.5,12t-0.05-0.79q-0.05-0.39-0.17-0.74l2.15-1.63l-0.98-1.7L15.98,8.2q-0.55-0.57-1.21-0.96T13.33,6.65L13,4H11.03L10.68,6.65Q9.9,6.85 9.24,7.24T8.03,8.17L5.55,7.15L4.58,8.85l2.15,1.6Q6.6,10.83 6.55,11.2T6.5,12q0,0.4 0.05,0.77t0.17,0.75L4.58,15.15l0.98,1.7L8.03,15.8q0.55,0.58 1.21,0.96t1.44,0.59L11,20Zm1.05-4.5q1.45,0 2.47-1.03T15.55,12T14.53,9.52T12.05,8.5q-1.47,0-2.49,1.02T8.55,12t1.01,2.47t2.49,1.03ZM12,12Z"})})})}function sc({listClients:e,debugRef:t,i18nRef:n}){const[r,o]=v.useState([]);return v.useEffect(()=>{t.current?o(e.filter(s=>!s.exclude_from_menu&&s.requires.debug)):o([])},[t.current]),i.jsxs(i.Fragment,{children:[r.length>0&&i.jsx(l.ListSubheader,{children:W("components:header:debug_mode",n.current)}),r.map((s,a)=>i.jsxs(l.MenuItem,{inset:!0,disabled:s.requires.net&&!netEnabled.current,onClick:()=>{window.location.href=s.url},children:[i.jsx(l.ListItemIcon,{}),i.jsx(l.ListItemText,{primary:W(`pages:${s.id}:title`,n.current)})]}))]})}const Ph=Tt("MuiBox",["root"]),Oh=yr(),os=bu({themeId:ht,defaultTheme:Oh,defaultClassName:Ph.root,generateClassName:li.generate});process.env.NODE_ENV!=="production"&&(os.propTypes={children:y.node,component:y.elementType,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object])});function ic({i18nRef:e,betaRef:t,debugRef:n}){const[r,o]=v.useState([]);v.useEffect(()=>{(async()=>{const c=await Ee("/api/list-clients",n.current);c.ok&&o(c.json.filter(u=>!u.exclude_from_menu&&u.requires.beta))})().then()},[t.current,n.current]);const s=a=>{dn(`/api/beta/${t.current?"disable":"enable"}`).then(()=>{a.stopPropagation(),a.preventDefault()})};return i.jsxs(i.Fragment,{children:[r.length>0&&i.jsxs(l.MenuItem,{onClick:s,children:[i.jsx(l.ListItemIcon,{children:" "}),i.jsx(l.ListItemText,{primary:W("components:header:beta_mode",e.current)}),i.jsx(l.Switch,{edge:"end",onChange:s,checked:t.current})]}),t.current&&r.length>0&&r.map((a,c)=>i.jsxs(l.MenuItem,{disablePadding:!0,onClick:()=>{window.location.href=a.url},children:[i.jsx(l.ListItemIcon,{}),i.jsx(l.ListItemText,{primary:i.jsxs(os,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"1em"},children:[i.jsx(l.Typography,{children:W(`pages:${a.id}:title`,e.current)}),i.jsx(os,{component:"span",sx:{fontSize:"1em",opacity:.7},children:"β"})]})})]},c))]})}function Rh({navigation:e}){const t=l.useTheme(),[n,r]=v.useState(null),[o,s]=v.useState(null),[a,c]=v.useState(!1),[u,p]=v.useState(!1),[f,g]=v.useState(""),[b,m]=v.useState([]),{enabledRef:x}=v.useContext(ut),{debugRef:h}=v.useContext(xt),{i18nRef:C}=v.useContext(ve),{betaRef:E}=v.useContext(jr),[w,T]=v.useState(!1),P=l.useMediaQuery(t.breakpoints.down("sm")),_=B=>{p(!0),s(B.currentTarget)},O=B=>{c(!0),r(B.currentTarget)},$=()=>{p(!1),x.current?dn("/api/net/disable",h.current):T(!0)};v.useEffect(()=>{Ee("/api/version").then(B=>B.json).then(B=>g(B.product_name)).catch(B=>console.error("Error :",B))},[]),v.useEffect(()=>{Ee("/api/list-clients").then(B=>B.json).then(B=>m(B)).catch(B=>console.error("Error :",B))},[]);const j=B=>{const z=b.find(S=>S.id===B);z&&(p(!1),window.location.href=z.url)};return i.jsxs(rs,{children:[e,i.jsxs(l.Box,{sx:{display:"flex",gap:1,alignItems:"center",marginInlineStart:"auto"},children:[i.jsx(l.IconButton,{color:"inherit",onClick:O,sx:{backgroundColor:t.palette.secondary.main,"&:hover":{backgroundColor:t.palette.secondary.main}},children:i.jsx(Ih,{})}),i.jsx(ns,{anchorEl:n,setIsOpen:c,isOpen:a,children:b.some(B=>B.id==="core-local-workspace")&&i.jsxs(l.MenuItem,{onClick:()=>j("core-local-workspace"),children:[i.jsx(l.ListItemIcon,{children:i.jsx(xp,{})}),i.jsx(l.ListItemText,{children:W("library:pankosmia-rcl:add_workspace",C.current)})]})}),!P&&i.jsx(l.IconButton,{onClick:()=>j("core-settings"),color:"inherit",children:i.jsx(oc,{})}),i.jsx(l.IconButton,{color:"inherit",onClick:_,children:i.jsx(jp,{})}),i.jsxs(ns,{anchorEl:o,setIsOpen:p,isOpen:u,children:[P&&i.jsxs(l.MenuItem,{onClick:()=>j("core-settings"),children:[i.jsx(l.ListItemIcon,{children:i.jsx(oc,{})}),i.jsx(l.ListItemText,{children:W("library:pankosmia-rcl:setting",C.current)})]}),i.jsxs(l.MenuItem,{onClick:$,selected:x.current,children:[i.jsx(l.ListItemIcon,{children:x.current?i.jsx(wa,{fontSize:"small"}):null}),i.jsx(l.ListItemText,{children:W("library:pankosmia-rcl:online_mode",C.current)}),i.jsx(l.ListItemIcon,{children:i.jsx(Vo,{color:"primary",title:W("components:header:tooltip_offline_mode",C.current).replace("{1}",f)})})]}),i.jsx(l.Divider,{}),b.some(B=>B.id==="core-dashboard")&&i.jsxs(l.MenuItem,{onClick:()=>j("core-dashboard"),children:[i.jsx(l.ListItemIcon,{children:i.jsx(wp,{})}),i.jsx(l.ListItemText,{children:W("library:pankosmia-rcl:my_project",C.current)})]}),b.some(B=>B.id==="core-client_pdf_publisher")&&i.jsxs(l.MenuItem,{onClick:()=>j("core-client_pdf_publisher"),children:[i.jsx(l.ListItemIcon,{children:i.jsx(_p,{})}),i.jsx(l.ListItemText,{children:W("library:pankosmia-rcl:pdf_publisher",C.current)})]}),b.some(B=>B.id==="content")&&i.jsxs(l.MenuItem,{onClick:()=>j("content"),children:[i.jsx(l.ListItemIcon,{children:i.jsx(Ep,{})}),i.jsx(l.ListItemText,{children:W("library:pankosmia-rcl:content_manager",C.current)})]}),i.jsx(ic,{i18nRef:C,betaRef:E,debugRef:h}),i.jsx(sc,{listClients:b,debugRef:h,i18nRef:C})]}),i.jsx(Wr,{internetDialogOpen:w,setInternetDialogOpen:T})]})]})}function In({text:e,icon:t=null,truncate:n=!1}){return i.jsxs(l.Typography,{variant:"caption",sx:{px:1,borderRadius:"4px",bgcolor:"grey.300",color:"text.primary",display:"flex",alignItems:"center",gap:"4px",minWidth:0,flexShrink:n?1:0,overflow:n?"hidden":"visible","& svg":{width:"20px",height:"20px",color:"action.active",flexShrink:0}},children:[t,i.jsx("span",{style:{minWidth:0,overflow:n?"hidden":"visible",textOverflow:n?"ellipsis":"clip",whiteSpace:"nowrap",flexShrink:n?1:0},children:e})]})}function Mh(){const e=l.useTheme(),t=l.useMediaQuery(e.breakpoints.down("sm"));return{panMarginHorizontal:t?"16px":"24px",panMarginVertical:t?"16px":"24px",panGapHorizontal:t?"16px":"24px",panGapContentSmall:t?"4px":"8px",panGapContentMedium:t?"4px":"8px"}}const ss=[{value:"CC BY",versioned:!0},{value:"CC BY-SA",versioned:!0},{value:"CC BY-NC",versioned:!0},{value:"CC BY-NC-SA",versioned:!0},{value:"CC BY-ND",versioned:!0},{value:"CC BY-NC-ND",versioned:!0},{value:"all_rights_reserved",versioned:!1,i18n:!0}],Ah=["4.0","3.0","2.5","2.0","1.0"],Bh={free_text:"",author_name:"",year:"",license:"",version:"4.0",order:"holder_first"},ac=/^\d{4}(-\d{4})?$/,Nh={unspecified:"Unspecified",public_domain:"Public Domain",all_rights_reserved:"All Rights Reserved"},is=(e,t)=>t?t(e):Nh[e];function Pn(e,t,n){var r;switch(e){case"unspecified":return is("unspecified",n);case"public-domain":return is("public_domain",n);case"free":{const o=(r=t==null?void 0:t.free_text)==null?void 0:r.trim();return o?`© ${o}`:""}case"builder":{const o=t.author_name.trim(),s=t.year.trim();if(!o||!ac.test(s))return"";const a=ss.find(p=>p.value===t.license);if(a!=null&&a.versioned&&!t.version)return"";a!=null&&a.i18nKey?n(a.value):a==null||a.value;const c=a?a.i18n?is(a.value,n):a.versioned?`${a.value} ${t.version}`:a.value:"";return`© ${t.order==="year_first"?`${s} ${o}`:`${o} ${s}`}${c?`, ${c}`:""}`}default:return""}}const Dh=(e,t)=>Pn(e,t)!=="";function Lh(e){const t=(e??"").trim(),n={...Bh};if(!t||t==="?"||/^unspecified$/i.test(t)||/^%%.*%%$/.test(t))return{optionCopyright:"unspecified",copyright:n};if(/public domain|cc0/i.test(t))return{optionCopyright:"public-domain",copyright:n};const r=t.replace(/^(copyright\s*)?©\s*/i,"").trim();return r?{optionCopyright:"free",copyright:{...n,free_text:r}}:{optionCopyright:"unspecified",copyright:n}}const Fh=!0;function cc({repoSummary:e,readOnly:t=!1,defaultEditMode:n=!1,onSaved:r,renderActions:o}){const{i18nRef:s}=v.useContext(ve),{debugRef:a}=v.useContext(xt),c=te=>W(te,s.current),[u,p]=v.useState(e),f=(u==null?void 0:u.local_path)??(u==null?void 0:u.path),[g,b]=v.useState("details"),[m,x]=v.useState(n),[h,C]=v.useState(!1),E=!t&&m,w=!E,[T,P]=v.useState({abbreviation:"",name:"",description:""}),[_,O]=v.useState({language_code:"",language_name:"",script_direction:""}),[$,j]=v.useState(!1),[B,z]=v.useState(),[S,d]=v.useState(),A=te=>te.trim()===""?"library:pankosmia-rcl:required_field":null,R=te=>te.trim()===""?"library:pankosmia-rcl:required_field":null,D=A(T.abbreviation),G=R(T.name),J=!D&&!G,oe=S!=="free"||((B==null?void 0:B.free_text)??"").trim()!=="",ie={details:J,language:$,copyright:oe},V=Object.values(ie).every(Boolean),k=E&&V&&!h,q=[{label:"library:pankosmia-rcl:abbreviation",value:T.abbreviation},{label:"library:pankosmia-rcl:repo_name",value:T.name},{label:"library:pankosmia-rcl:description",value:T.description}],K=v.useMemo(()=>{var te;return u?{...u,nBooks:((te=u.book_codes)==null?void 0:te.length)??0}:null},[u]),M=te=>{if(P({abbreviation:te.abbreviation??"",name:te.name??"",description:te.description??""}),O({language_code:te.language_code??"",language_name:te.language_name??"",script_direction:te.script_direction??""}),te.copyright!==void 0){const Y=Lh(te.copyright);z(Y.copyright),d(Y.optionCopyright)}};v.useEffect(()=>{p(e)},[e]),v.useEffect(()=>{u&&M(u)},[u]),v.useEffect(()=>{b("details"),x(n)},[f]);const Q=(te,Y)=>{E&&!ie[g]||b(Y)},N=()=>{M(u),x(!1)},I=()=>{E?N():x(!0)},U=()=>({abbreviation:T.abbreviation.trim(),name:T.name.trim(),description:T.description,language_code:_.language_code,language_name:_.language_name,script_direction:_.script_direction,copyright:B?Pn(S,B)??"":""}),X=async()=>{if(k){C(!0);try{const te=U(),Y=await xc(`/api/burrito/metadata/edit/${f}`,JSON.stringify(te),a.current);if(Y.ok){const ke={...u,...te};p(ke),x(!1),r==null||r(ke)}else console.error(c("library:pankosmia-rcl:error_data"),Y)}catch(te){console.error(te)}finally{C(!1)}}};if(!K)return i.jsx(l.CircularProgress,{});const ne=o?o({isEditMode:E,canSave:k,isSaving:h,save:X,cancel:N}):E?i.jsx(l.Box,{sx:{display:"flex",justifyContent:"flex-end",mt:2},children:i.jsx(l.Button,{variant:"contained",disabled:!k,onClick:X,children:c("library:pankosmia-rcl:edit")})}):null;return i.jsxs(l.Box,{children:[i.jsxs(l.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2,borderBottom:1,borderColor:"divider"},children:[i.jsxs(l.Tabs,{value:g,onChange:Q,children:[i.jsx(l.Tab,{value:"details",label:c("library:pankosmia-rcl:details")}),i.jsx(l.Tab,{value:"language",label:c("library:pankosmia-rcl:language")}),i.jsx(l.Tab,{value:"copyright",label:c("library:pankosmia-rcl:copyright")})]}),!t&&i.jsx(l.Button,{size:"small",variant:E?"contained":"outlined",onClick:I,children:c("library:pankosmia-rcl:edit_mode")})]}),g==="details"&&i.jsxs(l.Stack,{spacing:2,children:[i.jsxs(l.Stack,{direction:"row",spacing:1,children:[K.flavor&&i.jsx(In,{text:c(`flavors:names:${K.flavor_type}/${K.flavor}`)}),K.generated_date&&i.jsx(In,{text:`${c("library:pankosmia-rcl:dateUdapted")} ${K.generated_date}`})]}),w?i.jsx(l.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:q.map(({label:te,value:Y})=>i.jsxs(l.Box,{children:[i.jsx(l.Typography,{variant:"caption",sx:{display:"block",color:"text.secondary"},children:c(te)}),i.jsx(l.Typography,{variant:"body1",sx:{whiteSpace:"pre-wrap"},children:Y})]},te))}):i.jsxs(i.Fragment,{children:[i.jsx(l.TextField,{fullWidth:!0,required:!0,error:!!D,helperText:D?c(D):" ",label:c("library:pankosmia-rcl:abbreviation"),value:T.abbreviation,onChange:te=>P(Y=>({...Y,abbreviation:te.target.value}))}),i.jsx(l.TextField,{fullWidth:!0,required:!0,error:!!G,helperText:G?c(G):" ",label:c("library:pankosmia-rcl:repo_name"),value:T.name,onChange:te=>P(Y=>({...Y,name:te.target.value}))}),i.jsx(l.TextField,{fullWidth:!0,label:c("library:pankosmia-rcl:description"),value:T.description,onChange:te=>P(Y=>({...Y,description:te.target.value}))})]})]}),g==="language"&&i.jsx(pc,{currentLanguage:_,setCurrentLanguage:O,setIsValid:j,readOnly:w}),g==="copyright"&&i.jsx(dc,{optionCopyright:S,setOptionCopyright:d,copyright:B,setCopyright:z,readOnly:w,editMode:Fh}),ne]})}const Vh={onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onMouseUp:e=>e.stopPropagation(),onTouchStart:e=>e.stopPropagation(),onTouchEnd:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),onKeyUp:e=>e.stopPropagation(),onFocus:e=>e.stopPropagation(),onBlur:e=>e.stopPropagation()};function zh({list:e,IconButtonSecondary:t=null,onItemClick:n,infoReadOnly:r=!0,onInfoSaved:o}){const{i18nRef:s}=v.useContext(ve),{panGapContentMedium:a,panGapContentSmall:c}=Mh(),u=l.useTheme(),p=l.useMediaQuery(u.breakpoints.down("sm")),[f,g]=v.useState(null),b=u.direction==="rtl",m=!!n,x=h=>W(h,s.current);return e?i.jsxs(i.Fragment,{children:[i.jsx(l.List,{sx:{width:"100%",minWidth:0},children:e.map(h=>{const C=h.abbreviation??"",E=h.language_code??"",w=m?l.ListItemButton:l.Box,T=m?{component:"div",onClick:()=>n(h)}:{};return i.jsx(l.ListItem,{disablePadding:!0,sx:{display:"block",width:"100%",minWidth:0},children:i.jsxs(w,{...T,sx:{display:"flex",alignItems:"flex-start",width:"100%",minWidth:0,gap:1,px:1,borderRadius:1},children:[i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"column",flex:"1 1 0%",minWidth:0},children:[i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:a,minWidth:0,overflow:"hidden"},children:[i.jsx(l.Typography,{sx:{flexShrink:0,fontWeight:"bold"},children:C.toUpperCase()}),i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:c,minWidth:0,overflow:"hidden"},children:[i.jsx(In,{text:p?E.toUpperCase():h.language_name?`${E.toUpperCase()} - ${h.language_name}`:E.toUpperCase(),truncate:!0}),i.jsx(In,{text:W(`flavors:names:${h.flavor_type}/${h.flavor}`,s.current),truncate:!0})]})]}),i.jsx(l.Typography,{sx:{width:"100%",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"text.secondary"},children:b?`${h.description?`${h.description} - `:""}${h.name}`:`${h.name}${h.description?` - ${h.description}`:""}`})]}),i.jsxs(l.Box,{...Vh,sx:{display:"flex",flexDirection:"row",alignItems:"center",flexShrink:0,flexGrow:0,cursor:"default"},children:[i.jsx(l.IconButton,{onClick:()=>g(h),children:i.jsx(kp,{})}),t]})]})},h.local_path??`${C}-${E}-${h.name}`)})}),i.jsx(ts,{titleLabel:`${x("pages:core-contenthandler-generic:about_document")} ${(f==null?void 0:f.name)??""}`,isOpen:!!f,closeFn:()=>g(null),actionsButtonArray:Br({onlyCloseButton:!0,closeLabel:x("pages:core-contenthandler-generic:close"),closeFn:()=>g(null)}),children:f&&i.jsx(cc,{repoSummary:f,readOnly:r,onSaved:h=>{g(h),o==null||o(h)}})})]}):i.jsx(l.CircularProgress,{})}function lc({optionCopyright:e,copyright:t}){const{i18nRef:n}=v.useContext(ve),r=s=>W(`library:pankosmia-rcl:${s}`,n.current),o=Pn(e,t,r);return i.jsxs(l.Box,{sx:{mb:2,px:2,py:1,borderRadius:"4px",backgroundColor:"grey.200"},children:[i.jsx(l.Typography,{variant:"caption",color:"text.secondary",display:"block",children:r("preview")}),i.jsx(l.Typography,{variant:"body1",sx:{fontStyle:o?"normal":"italic"},color:o?"text.primary":"text.disabled",children:o||r("preview_incomplete")})]})}const Wh={author_name:"",year:"",license:"",version:"",order:"year_first"};function Uh({isOpen:e,closeFn:t,onApply:n}){const{i18nRef:r}=v.useContext(ve),o=w=>W(`library:pankosmia-rcl:${w}`,r.current),[s,a]=v.useState(Wh),c=w=>a(T=>({...T,...w})),u=ss.find(w=>w.value===s.license),p=!!(u!=null&&u.versioned),[f,g]=v.useState(!1),b=f&&!s.author_name.trim(),m=f&&!ac.test(s.year.trim()),x=f&&p&&!s.version,h=()=>{if(g(!0),!Dh("builder",s))return;const w=Pn("builder",s,o).replace(/^©\s*/,"");n(w),t()},C=i.jsx(l.MenuItem,{value:"",children:i.jsx("em",{children:o("none")})}),E={select:{displayEmpty:!0},inputLabel:{shrink:!0}};return i.jsxs(ts,{titleLabel:o("copyright_builder"),isOpen:e,requiredFieldsLabel:!0,closeFn:t,actionsButtonArray:Br({actionLabel:o("OK"),actionFn:h,closeFn:t,closeOnAction:!1,closeLabel:o("cancel")}),children:[i.jsx(lc,{optionCopyright:"builder",copyright:s}),i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"column",gap:3},children:[i.jsx(l.TextField,{required:!0,error:b,fullWidth:!0,label:o("name"),value:s.author_name,onChange:w=>c({author_name:w.target.value})}),i.jsx(l.TextField,{required:!0,fullWidth:!0,error:m,label:o("year"),helperText:o("year_helper"),value:s.year,onChange:w=>c({year:w.target.value.replace(/[^\d-]/g,"").slice(0,9)})}),i.jsxs(l.Box,{sx:{display:"flex",gap:2},children:[i.jsxs(l.TextField,{select:!0,sx:{flex:1},label:o("licence"),value:s.license,onChange:w=>c({license:w.target.value,version:""}),slotProps:E,children:[C,ss.map(w=>i.jsx(l.MenuItem,{value:w.value,children:w.i18n?o(w.value):w.value},w.value))]}),i.jsx(l.TextField,{select:!0,sx:{flex:1},required:p,disabled:!p,error:x,label:o("version"),value:s.version,onChange:w=>c({version:w.target.value}),children:Ah.map(w=>i.jsx(l.MenuItem,{value:w,children:w},w))})]}),i.jsxs(l.FormControl,{children:[i.jsx(l.FormLabel,{id:"copyright-order-label",sx:{color:"text.primary"},children:o("order")}),i.jsxs(l.RadioGroup,{"aria-labelledby":"copyright-order-label",value:s.order,onChange:w=>c({order:w.target.value}),sx:{pl:1,mt:1},children:[i.jsx(l.FormControlLabel,{value:"year_first",control:i.jsx(l.Radio,{}),label:o("order_year_first")}),i.jsx(l.FormControlLabel,{value:"holder_first",control:i.jsx(l.Radio,{}),label:o("order_holder_first")})]})]})]})]})}function uc({optionCopyright:e,setOptionCopyright:t,setCopyright:n,copyright:r}){const{i18nRef:o}=v.useContext(ve),s=f=>W(`library:pankosmia-rcl:${f}`,o.current),[a,c]=v.useState(!1),u=f=>n({...r,...f}),p=e==="free";return i.jsxs(Za,{titleSection:s("copyright"),children:[i.jsx(lc,{optionCopyright:e,copyright:r}),i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:[i.jsx(l.FormControl,{children:i.jsxs(l.RadioGroup,{value:e,onChange:f=>t(f.target.value),row:!0,name:"copyright-option",children:[i.jsx(l.FormControlLabel,{value:"unspecified",control:i.jsx(l.Radio,{}),label:s("unspecified")}),i.jsx(l.FormControlLabel,{value:"public-domain",control:i.jsx(l.Radio,{}),label:s("public_domain")}),i.jsx(l.FormControlLabel,{value:"free",control:i.jsx(l.Radio,{}),label:s("licenced")})]})}),i.jsx(l.TextField,{id:"copyright_free_text",fullWidth:!0,required:p,disabled:!p,label:s("copyright"),value:r.free_text,onChange:f=>u({free_text:f.target.value}),slotProps:{input:{startAdornment:i.jsx(l.InputAdornment,{position:"start",children:"©"})}}}),i.jsx(l.Box,{children:i.jsx(l.Button,{variant:"outlined",disabled:!p,onClick:()=>c(!0),children:s("copyright_builder")})})]}),a&&i.jsx(Uh,{isOpen:a,closeFn:()=>c(!1),onApply:f=>u({free_text:f})})]})}function dc({readOnly:e=!0,optionCopyright:t,setOptionCopyright:n,setCopyright:r,copyright:o}){const{i18nRef:s}=v.useContext(ve),a=[{label:"library:pankosmia-rcl:copyright",value:o?Pn(t,o)??"":""}];return e?i.jsx(l.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:a.map(({label:c,value:u})=>i.jsxs(l.Box,{children:[i.jsx(l.Typography,{variant:"caption",sx:{display:"block",color:"text.secondary"},children:W(c,s.current)}),i.jsx(l.Typography,{variant:"body1",sx:{whiteSpace:"pre-wrap"},children:u})]},c))}):i.jsx(uc,{optionCopyright:t,setOptionCopyright:n,setCopyright:r,copyright:o})}function fc({currentLanguage:e,setCurrentLanguage:t,setIsValid:n,open:r=!0}){const[o,s]=v.useState("BCP47List"),[a,c]=v.useState(!1),{i18nRef:u}=v.useContext(ve),[p,f]=v.useState(!0),[g,b]=v.useState(!1),[m,x]=v.useState(""),[h,C]=v.useState([]),[E,w]=v.useState(!1),[T,P]=v.useState({}),[_,O]=v.useState(!0),$=/^x-[a-z]{3}$/,j=S=>S.replace(/^x-/,"X ");v.useEffect(()=>{r&&Nn({url:"/api/git/list-local-repos",setter:C}).then()},[r]),v.useEffect(()=>{r&&Nn({url:"/api/app-resources/lookups/bcp47-language_codes.json",setter:P}).then()},[r]);const B=Object.entries(T).map(([S,d])=>({language_code:S,language_name:d.en}));v.useEffect(()=>{e.language_code&&n(!a)},[a]),v.useEffect(()=>{_&&Object.keys(T).length>0&&(e.language_code&&(T[e.language_code]?t({...e,language_code:e.language_code,language_name:T[e.language_code].en}):(t({...e,language_code:`${e.language_code}`,language_name:`${e.language_name}`}),s("customLanguage"))),O(!1))},[T,_,B]),v.useEffect(()=>{m&&Ee(`/api/burrito/metadata/summary/${m}`).then(S=>S.json).then(S=>t({...e,language_code:S.language_code,language_name:S.language_name,script_direction:["ltr","rtl"].includes(S.script_direction)?S.script_direction:e==null?void 0:e.script_direction})).catch(S=>console.error("Error :",S))},[r,m]);const z=h.filter(S=>p&&S.startsWith("_local_")||g&&S.startsWith("git"));return i.jsxs(l.Box,{sx:{width:"100%"},children:[i.jsxs(l.FormControl,{children:[i.jsx(l.FormLabel,{sx:{color:"text.secondary","&.Mui-focused":{color:"text.secondary"}},id:"demo-radio-buttons-group-label",children:W("library:pankosmia-rcl:choose_language",u.current)}),i.jsxs(l.RadioGroup,{row:!0,value:o,onChange:S=>{s(S.target.value),w(!1),t({language_code:"",language_name:"",script_direction:e==null?void 0:e.script_direction})},"aria-labelledby":"demo-radio-buttons-group-label",name:"radio-buttons-group",children:[i.jsx(l.FormControlLabel,{value:"BCP47List",control:i.jsx(l.Radio,{}),label:W("library:pankosmia-rcl:lang_code_bcp47_list",u.current)}),i.jsx(l.FormControlLabel,{value:"burrito",control:i.jsx(l.Radio,{}),label:W("library:pankosmia-rcl:lang_code_burrito",u.current)}),i.jsx(l.FormControlLabel,{value:"customLanguage",control:i.jsx(l.Radio,{}),label:W("library:pankosmia-rcl:lang_code_custom_language",u.current)})]})]}),o==="BCP47List"&&i.jsxs(l.Grid,{container:!0,spacing:2,children:[i.jsx(l.Grid,{size:12,children:i.jsx(l.Typography,{children:W("library:pankosmia-rcl:description_bcp47_list",u.current)})}),i.jsx(l.Grid,{size:6,children:T&&i.jsx(Yo,{value:e.language_code??null,setValue:S=>{var d;return t({...e,language_code:S,language_name:((d=T[S])==null?void 0:d.en)??""})},data:Object.keys(T),getOptionLabel:S=>{const{en:d,...A}=T[S]??{},R=Object.values(A);return R.length>0?`${S} - ${R} - ${d}`:d?`${S} - ${d}`:""},filterOptions:(S,{inputValue:d})=>{const A=d.toLowerCase();return S.filter(R=>{var G,J;const D=T[R];return((G=D==null?void 0:D.en)==null?void 0:G.toLowerCase().includes(A))||((J=D==null?void 0:D[R])==null?void 0:J.toLowerCase().includes(A))}).sort((R,D)=>{var G,J,oe,ie;return((J=(G=T[R])==null?void 0:G.en)==null?void 0:J.toLowerCase().indexOf(A))-((ie=(oe=T[D])==null?void 0:oe.en)==null?void 0:ie.toLowerCase().indexOf(A))})},titleLabel:`${W("library:pankosmia-rcl:language",u.current)} *`})}),i.jsx(l.Grid,{size:6,children:i.jsx(l.TextField,{disabled:!0,id:"language_code",sx:{width:"100%"},label:W("library:pankosmia-rcl:lang_code",u.current),value:e?e.language_code:null})})]}),o==="burrito"&&i.jsxs(l.Grid,{container:!0,spacing:1,sx:{justifyItems:"flex-end",alignItems:"stretch"},children:[i.jsx(l.Typography,{children:W("library:pankosmia-rcl:description_lang_code_burrito",u.current)}),i.jsxs(l.Grid,{size:12,children:[i.jsx(l.FormLabel,{children:W("library:pankosmia-rcl:title_section_burrito",u.current)}),i.jsxs(l.FormGroup,{row:!0,required:!0,children:[i.jsx(l.FormControlLabel,{control:i.jsx(l.Checkbox,{color:"secondary",checked:p,onChange:()=>f(!p),defaultChecked:!0}),label:W("library:pankosmia-rcl:local_project",u.current)}),i.jsx(l.FormControlLabel,{control:i.jsx(l.Checkbox,{color:"secondary",checked:g,onChange:()=>b(!g)}),label:W("library:pankosmia-rcl:burrito_resources",u.current)})]})]}),i.jsx(l.Grid,{size:12,children:i.jsx(Yo,{data:z,setValue:x,getOptionLabel:S=>`${S}`,titleLabel:`${W("library:pankosmia-rcl:document",u.current)} *`})}),i.jsx(l.Grid,{size:6,children:i.jsx(l.TextField,{disabled:!0,id:"language_name",sx:{width:"100%"},label:W("library:pankosmia-rcl:lang_name",u.current),value:e?e.language_name:null})}),i.jsx(l.Grid,{size:6,children:i.jsx(l.TextField,{disabled:!0,id:"language_code",sx:{width:"100%"},label:W("library:pankosmia-rcl:lang_code",u.current),value:e?e.language_code:null})})]}),o==="customLanguage"&&i.jsxs(l.Grid,{container:!0,spacing:1,sx:{justifyItems:"flex-end",alignItems:"stretch"},children:[i.jsx(l.Grid,{size:12,children:i.jsx(l.Typography,{children:W("library:pankosmia-rcl:description_custom_language",u.current)})}),i.jsx(l.Grid,{size:6,children:i.jsx(l.TextField,{id:"language_name",required:!0,sx:{width:"100%"},label:W("library:pankosmia-rcl:lang_name",u.current),value:(e==null?void 0:e.language_name)??"",onChange:S=>{const d=S.target.value;w(d!==""),t({...e,language_name:d})},onBlur:()=>{e!=null&&e.language_name||(w(!1),t({...e,language_name:j((e==null?void 0:e.language_code)??"")}))}})}),i.jsx(l.Grid,{size:6,children:i.jsx(l.TextField,{id:"language_code",placeholder:"x-abc",error:a,helperText:W("library:pankosmia-rcl:helper_language_code",u.current),required:!0,sx:{width:"100%"},label:W("library:pankosmia-rcl:lang_code",u.current),value:e?e.language_code:null,onChange:S=>{const d=S.target.value.toLocaleLowerCase();t({...e,language_code:d,...E?{}:{language_name:j(d)}}),c(d.length>0&&!$.test(d))}})})]}),i.jsxs(l.FormControl,{sx:{mb:2},children:[i.jsx(l.FormLabel,{sx:{color:"text.secondary","&.Mui-focused":{color:"text.secondary"}},id:"script-direction-label",children:W("library:pankosmia-rcl:script_direction",u.current)}),i.jsx(l.RadioGroup,{row:!0,"aria-labelledby":"script-direction-label",name:"script-direction-group",value:(e==null?void 0:e.script_direction)==="rtl"?"rtl":"ltr",onChange:S=>t({...e,script_direction:S.target.value}),children:i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"column"},children:[i.jsx(l.FormControlLabel,{value:"ltr",control:i.jsx(l.Radio,{}),label:W("library:pankosmia-rcl:ltr",u.current)}),i.jsx(l.FormControlLabel,{value:"rtl",control:i.jsx(l.Radio,{}),label:W("library:pankosmia-rcl:rtl",u.current)})]})})]})]})}function pc({readOnly:e=!0,currentLanguage:t,setCurrentLanguage:n,setIsValid:r}){const{i18nRef:o}=v.useContext(ve),s=[{label:"library:pankosmia-rcl:language",value:t.language_name},{label:"library:pankosmia-rcl:lang_code",value:t.language_code},{label:"library:pankosmia-rcl:script_direction",value:W(t.script_direction==="rtl"?"library:pankosmia-rcl:rtl":"library:pankosmia-rcl:ltr",o.current)}];return e?i.jsx(l.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:s.map(({label:a,value:c})=>i.jsxs(l.Box,{children:[i.jsx(l.Typography,{variant:"caption",sx:{display:"block",color:"text.secondary"},children:W(a,o.current)}),i.jsx(l.Typography,{variant:"body1",children:c})]},a))}):i.jsx(fc,{setIsValid:r,currentLanguage:t,setCurrentLanguage:n})}Z.AdvancedAppBar=Rh,Z.AdvancedAppBarMenuBeta=ic,Z.AdvancedAppBarMenuDebug=sc,Z.AppWrapper=Ga,Z.AppbarHamburger=np,Z.AssetDownloadButton=ec,Z.AssetDownloadDialog=Sh,Z.BasiqueAppBar=$h,Z.ButtonInfo=Vo,Z.ExternalLink=xh,Z.Header=Ta,Z.InternetSwitch=zo,Z.InternetWarningDialog=Wr,Z.PanAdvancedDialog=ts,Z.PanBasicDialog=tc,Z.PanBookPicker=mh,Z.PanCopyright=uc,Z.PanCopyrightWrapper=dc,Z.PanDialog=rp,Z.PanDialogActions=fp,Z.PanDialogActionsArray=Br,Z.PanDownload=Op,Z.PanFilteredMenu=Yo,Z.PanLanguagePicker=fc,Z.PanLanguagePickerWrapper=pc,Z.PanListTable=zh,Z.PanMenuWrapper=ns,Z.PanPillTypography=In,Z.PanRepoInfo=cc,Z.PanStepperPicker=gh,Z.PanTable=Ca,Z.PanVersificationPicker=hh,Z.ScrollableBody=bh,Z.SectionDialogTitle=Za,Z.SpSpa=fh,Z.SpSpaPage=Ja,Z.Spa=Xa,Z.SpaContainer=Qa,Z.WrapperAppBar=rs,Z.authContext=ja,Z.bcvContext=Ia,Z.betaContext=jr,Z.clientConfigContext=Tr,Z.clientInterfacesContext=Oa,Z.currentProjectContext=$a,Z.debugContext=xt,Z.fallbackTheme=yh,Z.i18nContext=ve,Z.languagesContext=ph,Z.messagesContext=Pa,Z.netContext=ut,Z.productContext=Er,Z.snippetContext=Ra,Z.typographyContext=_a,Z.wordContext=Ma,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})}));
|
|
272
|
+
*/var Ua;function sh(){return Ua||(Ua=1,(function(e,t){var n;function r(s,a){var c=[],u=0;function p(g){return c.push(g),a}function f(){return c[u++]}return{tokenize:function(g){return g.replace(s,p)},detokenize:function(g){return g.replace(new RegExp("("+a+")","g"),f)}}}function o(){var s="`TMP`",a="`TMPLTR`",c="`TMPRTL`",u="`NOFLIP_SINGLE`",p="`NOFLIP_CLASS`",f="`COMMENT`",g="[^\\u0020-\\u007e]",b="(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)",m="(?:[0-9]*\\.[0-9]+|[0-9]+)",x="(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)",h="direction\\s*:\\s*",C="[!#$%&*-~]",E=`['"]?\\s*`,w="(^|[^a-zA-Z])",T="[^\\}]*?",P="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",_="\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/",O="(?:"+b+"|\\\\[^\\r\\n\\f0-9a-f])",$="(?:[_a-z]|"+g+"|"+O+")",j="(?:[_a-z0-9-]|"+g+"|"+O+")",B="-?"+$+j+"*",z=m+"(?:\\s*"+x+"|"+B+")?",S="((?:-?"+z+")|(?:inherit|auto))",d="(?:-?"+m+"(?:\\s*"+x+")?)",A="(?:\\+|\\-|\\*|\\/)",R="(?:\\(|\\)|\\t| )",D="(?:"+R+"|"+d+"|"+A+"){3,}",H="(?:calc\\((?:"+D+")\\))",Z="((?:-?"+z+")|(?:inherit|auto)|"+H+")",re="((?:margin|padding|border-width)\\s*:\\s*)",ie="((?:-color|border-style)\\s*:\\s*)",V="(#?"+j+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",k="(?:"+C+"|"+g+"|"+O+")*?",q="(?![a-zA-Z])",G="(?!("+j+`|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|"[^"]*"|`+f+")*?{)",M="(?!"+k+E+"\\))",Q="(?="+k+E+"\\))",N="(\\s*(?:!important\\s*)?[;}])",I=/`TMP`/g,W=/`TMPLTR`/g,J=/`TMPRTL`/g,K=new RegExp(_,"gi"),oe=new RegExp("("+P+G+"[^;}]+;?)","gi"),X=new RegExp("("+P+T+"})","gi"),Pe=new RegExp("("+h+")ltr","gi"),Re=new RegExp("("+h+")rtl","gi"),ot=new RegExp(w+"(left)"+q+M+G,"gi"),$t=new RegExp(w+"(right)"+q+M+G,"gi"),yt=new RegExp(w+"(left)"+Q,"gi"),bt=new RegExp(w+"(right)"+Q,"gi"),Me=/(:dir\( *)ltr( *\))/g,lt=/(:dir\( *)rtl( *\))/g,et=new RegExp(w+"(ltr)"+Q,"gi"),tt=new RegExp(w+"(rtl)"+Q,"gi"),Ut=new RegExp(w+"([ns]?)e-resize","gi"),It=new RegExp(w+"([ns]?)w-resize","gi"),Pt=new RegExp(re+Z+"(\\s+)"+Z+"(\\s+)"+Z+"(\\s+)"+Z+N,"gi"),Ot=new RegExp(ie+V+"(\\s+)"+V+"(\\s+)"+V+"(\\s+)"+V+N,"gi"),Rt=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+z+")","gi"),Mt=new RegExp("(background-position-x\\s*:\\s*)(-?"+m+"%)","gi"),At=new RegExp("(border-radius\\s*:\\s*)"+S+"(?:(?:\\s+"+S+")(?:\\s+"+S+")?(?:\\s+"+S+")?)?(?:(?:(?:\\s*\\/\\s*)"+S+")(?:\\s+"+S+")?(?:\\s+"+S+")?(?:\\s+"+S+")?)?"+N,"gi"),Se=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+S,"gi"),be=new RegExp("(text-shadow\\s*:\\s*)"+S+"(\\s*)"+V,"gi"),We=new RegExp("(text-shadow\\s*:\\s*)"+V+"(\\s*)"+S,"gi"),Fe=new RegExp("(text-shadow\\s*:\\s*)"+S,"gi"),ce=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+S+"(\\s*\\))","gi"),On=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+S+"((?:\\s*,\\s*"+S+"){0,2}\\s*\\))","gi");function Nr(se,Y,ne){var te,Ne;return Y.split("(").length>Y.split(")").length?se:(ne.slice(-1)==="%"&&(te=ne.indexOf("."),te!==-1?(Ne=ne.length-te-2,ne=100-parseFloat(ne),ne=ne.toFixed(Ne)+"%"):ne=100-parseFloat(ne)+"%"),Y+ne)}function Rn(se){switch(se.length){case 4:se=[se[1],se[0],se[3],se[2]];break;case 3:se=[se[1],se[0],se[1],se[2]];break;case 2:se=[se[1],se[0]];break;case 1:se=[se[0]];break}return se.join(" ")}function as(se,Y){var ne,te=[].slice.call(arguments),Ne=te.slice(2,6).filter(function(cs){return cs}),Bt=te.slice(6,10).filter(function(cs){return cs}),Vr=te[10]||"";return Bt.length?ne=Rn(Ne)+" / "+Rn(Bt):ne=Rn(Ne),Y+ne+Vr}function Mn(se){return parseFloat(se)===0?se:se[0]==="-"?se.slice(1):"-"+se}function Dr(se,Y,ne){return Y+Mn(ne)}function Lr(se,Y,ne,te,Ne){return Y+ne+Mn(te)+Ne}function Fr(se,Y,ne,te,Ne){return Y+ne+te+Mn(Ne)}return{transform:function(se,Y){var ne=new r(oe,u),te=new r(X,p),Ne=new r(K,f);return se=Ne.tokenize(te.tokenize(ne.tokenize(se.replace("`","%60")))),Y.transformDirInUrl&&(se=se.replace(Me,"$1"+a+"$2").replace(lt,"$1"+c+"$2").replace(et,"$1"+s).replace(tt,"$1ltr").replace(I,"rtl").replace(W,"ltr").replace(J,"rtl")),Y.transformEdgeInUrl&&(se=se.replace(yt,"$1"+s).replace(bt,"$1left").replace(I,"right")),se=se.replace(Pe,"$1"+s).replace(Re,"$1ltr").replace(I,"rtl").replace(ot,"$1"+s).replace($t,"$1left").replace(I,"right").replace(Ut,"$1$2"+s).replace(It,"$1$2e-resize").replace(I,"w-resize").replace(At,as).replace(Se,Dr).replace(be,Fr).replace(We,Fr).replace(Fe,Dr).replace(ce,Lr).replace(On,Lr).replace(Pt,"$1$2$3$8$5$6$7$4$9").replace(Ot,"$1$2$3$8$5$6$7$4$9").replace(Rt,Nr).replace(Mt,Nr),se=ne.detokenize(te.detokenize(Ne.detokenize(se))),se}}}n=new o,e.exports?t.transform=function(s,a,c){var u;return typeof a=="object"?u=a:(u={},typeof a=="boolean"&&(u.transformDirInUrl=a),typeof c=="boolean"&&(u.transformEdgeInUrl=c)),n.transform(s,u)}:typeof window<"u"&&(window.cssjanus=n)})(Rr,Rr.exports)),Rr.exports}var ih=sh();const ah=zr(ih);function qa(e,t,n){switch(e.type){case Wp:case Ko:case Go:return e.return=e.return||e.value;case En:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach(function(o){o.type===Go&&(o.children=o.value)})}var r=za(Array.prototype.concat(e.children),qa);return ct(r)?e.return=e.value+"{"+r+"}":""}function Ya(e,t,n,r){if(e.type===Aa||e.type===Up||e.type===En&&(!e.parent||e.parent.type===zp||e.parent.type===En)){var o=ah.transform(qa(e));e.children=o?rh(o)[0].children:[],e.return=""}}Object.defineProperty(Ya,"name",{value:"stylisRTLPlugin"});function Ha(){return i.jsx(l.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100%"},children:i.jsx(l.CircularProgress,{})})}function Ga({children:e,netValue:t,debugValue:n,bcvValue:r,i18nValue:o,authValue:s,typographyValue:a,currentProjectValue:c,clientConfigValue:u,clientInterfacesValue:p,snippetValue:f,wordValue:g,productValue:b,betaValue:m}){var S,d;const[x,h]=v.useState([]),C={messages:x,setMessages:h},{enqueueSnackbar:E}=qe.useSnackbar(),[w,T]=v.useState(""),[P,_]=v.useState(null),[O,$]=v.useState({palette:{primary:{main:"#666"},secondary:{main:"#888"}}}),[j,B]=v.useState(null);v.useEffect(()=>{Nn({url:"/api/app-resources/themes/default.json",setter:$}).catch(A=>{console.error("Failed to load Pankosmia theme:",A)})},[]),v.useEffect(()=>{let A={};document.fonts.ready.then(()=>{document.fonts.forEach(R=>{const D=R.family.replace(/['"]/g,"").trim().replace(/\s+/g," ");A[D.replaceAll(" ","")]=D}),_(A)})},[]),v.useEffect(()=>{if(P){let A=[],R={},D=a.typographyRef.current.font_set.split("Pankosmia");D.shift(),D=D.map(H=>"Pankosmia"+H),Object.entries(P).forEach(([H,Z])=>{let re=D.indexOf(H);re>=0&&(R[re]=Z)});for(let H=0;H<Object.keys(D).length;H++)R[H]&&A.push(R[H]);T(A)}},[(S=a.typographyRef.current)==null?void 0:S.font_set,P]),v.useEffect(()=>{const A=R=>{const D=R.split("--");D.length===4&&E(`${D[2]} => ${D[3]}`,{variant:D[0],anchorOrigin:{vertical:"bottom",horizontal:"right"}})};x.length>0&&(x.forEach(R=>A(R)),h([]))},[x,E]),v.useEffect(()=>{var D;const A=((D=a==null?void 0:a.typography)==null?void 0:D.direction)==="rtl"?"rtl":"ltr",R=yr({direction:A,typography:{...O.typography||{},fontFamily:w.length?w.join(","):"inherit"},components:{MuiCssBaseline:{styleOverrides:{html:{fontFamily:w.length?w.join(","):void 0},body:{fontFamily:w.length?w.join(","):void 0},"#root":{fontFamily:w.length?w.join(","):void 0},"*, *::before, *::after":{fontFamily:"inherit"}}},MuiFab:{styleOverrides:{root:{textTransform:"none"}}},MuiButton:{styleOverrides:{root:{textTransform:"none"}}},MuiTab:{styleOverrides:{root:{textTransform:"none"}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none"}}}}},O);B(R)},[O,w,(d=a==null?void 0:a.typography)==null?void 0:d.direction]),console.log(j);const z=v.useMemo(()=>j?j.direction==="rtl"?ri({key:"muirtl",stylisPlugins:[Wa,Ya]}):ri({key:"mui",stylisPlugins:[Wa]}):null,[j]);return v.useEffect(()=>{j!=null&&j.direction&&(document.documentElement.dir=j.direction)},[j==null?void 0:j.direction]),!j||!z?i.jsx(Ha,{}):i.jsx(Ue.CacheProvider,{value:z,children:i.jsxs(Kf,{theme:j,children:[i.jsx(l.CssBaseline,{}),i.jsx(jr.Provider,{value:m,children:i.jsx(Tr.Provider,{value:u,children:i.jsx(Oa.Provider,{value:p,children:i.jsx(ve.Provider,{value:o,children:i.jsx(Ra.Provider,{value:f,children:i.jsx(Ma.Provider,{value:g,children:i.jsx(_a.Provider,{value:a,children:i.jsx(ja.Provider,{value:s,children:i.jsx($a.Provider,{value:c,children:i.jsx(Ia.Provider,{value:r,children:i.jsx(Pa.Provider,{value:C,children:i.jsx(xt.Provider,{value:n,children:i.jsx(Er.Provider,{value:b,children:i.jsx(ut.Provider,{value:t,children:i.jsx(l.Box,{sx:{height:"100vh",overflow:"hidden"},children:!o||!o.i18n||Object.keys(o.i18n).length===0?i.jsx(Ha,{}):e})})})})})})})})})})})})})})})]})})}var Mr={exports:{}},ch=Mr.exports,Ka;function lh(){return Ka||(Ka=1,(function(e,t){(function(n,r,o){e.exports=o()})("dcopy",ch,function(){return function(r){if(/number|string|boolean/.test(typeof r))return r;if(r instanceof Date)return new Date(r.getTime());var o=r instanceof Array?[]:{};return s(r,o),o;function s(a,c){for(var u in a){var p=a[u];if(p instanceof Date){var f=new Date(p.getTime());n(c,u,f)}else if(p instanceof Function){var f=p;n(c,u,f)}else if(p instanceof Array){var f=[],g=n(c,u,f);s(p,g)}else if(p instanceof Object){var f={},g=n(c,u,f);s(p,g)}else{var f=p;n(c,u,f)}}}};function n(r,o,s){if(r instanceof Array)return r.push(s),r[r.length-1];if(r instanceof Object)return r[o]=s,r[o]}})})(Mr)),Mr.exports}var uh=lh();const dh=zr(uh);function Xa({children:e}){const[t,n]=v.useState(!1),r=v.useRef(t),o=Y=>{r.current=Y,n(Y)},[s,a]=v.useState(!1),c=v.useRef(s),u=Y=>{c.current=Y,a(Y)},[p,f]=v.useState(!1),g=v.useRef(p),b=Y=>{g.current=Y,f(Y)},[m,x]=v.useState({}),h=v.useRef(m),C=Y=>{h.current=Y,x(Y)},[E,w]=v.useState({bookCode:"TIT",chapterNum:1,verseNum:1,endVerseNum:1}),T=v.useRef(E),P=Y=>{T.current=Y,w(Y)},[_,O]=v.useState({}),$=v.useRef(_),j=Y=>{$.current=Y,O(Y)},[B,z]=v.useState({font_set:"Pankosmia-CardoPankosmia-EzraSILPankosmia-PadaukPankosmia-AwamiNastaliqPankosmia-NotoNastaliqUrduPankosmia-GentiumPlus",size:"medium",direction:"ltr"}),S=v.useRef(B),d=Y=>{S.current=Y,z(Y)},[A,R]=v.useState(null),D=v.useRef(A),H=Y=>{D.current=Y,R(Y)},[Z,re]=v.useState({}),ie=v.useRef(Z),V=Y=>{ie.current=Y,re(Y)},k=async()=>{await ke("/api/client-config").then(Y=>Y.json).then(Y=>V(Y)).catch(Y=>console.error("Error :",Y))},[q,G]=v.useState({}),M=v.useRef(q),Q=Y=>{M.current=Y,G(Y)},[N,I]=v.useState(null),W=v.useRef(N),J=Y=>{W.current=Y,I(Y)},[K,oe]=v.useState(null),X=v.useRef(K),Pe=Y=>{X.current=Y,oe(Y)},[Re,ot]=v.useState(null),$t=v.useRef(Re),yt=Y=>{$t.current=Y,ot(Y)},bt=async()=>{await ke("/api/client-interfaces").then(Y=>Y.json).then(Y=>Q(Y)).catch(Y=>console.error("Error :",Y))},Me=async()=>{const Y=await ke("/api/i18n/flat",c.current);Y.ok?j(Y.json):qe.enqueueSnackbar(`Could not load i18n: ${Y.error.reason}`,{variant:"error",anchorOrigin:{vertical:"bottom",horizontal:"left"},persist:!0})},lt=async()=>{const Y=await ke("/api/settings/typography",c.current);Y.ok?d(Y.json):qe.enqueueSnackbar(`Could not load typography: ${Y.error.reason}`,{variant:"error",anchorOrigin:{vertical:"bottom",horizontal:"left"},persist:!0})},et=async()=>{const Y=await ke("/api/version",c.current);Y.ok?yt(Y.json):qe.enqueueSnackbar(`Could not load version for product: ${Y.error.reason}`,{variant:"error",anchorOrigin:{vertical:"bottom",horizontal:"left"},persist:!0})},tt=async()=>{const Y=await ke("/api/app-state/alignment",c.current);if(Y.ok){const ne=Y.json.snippet,te=Y.json.word;ne!==W.current&&J(ne),JSON.stringify(te)!==JSON.stringify(X.current)&&Pe(te)}else qe.enqueueSnackbar(`Could not load alignment: ${Y.error.reason}`,{variant:"error",anchorOrigin:{vertical:"bottom",horizontal:"left"},persist:!0})};v.useEffect(()=>{Me().then(),tt().then(),lt().then(),k().then(),bt().then(),et().then()},[]),v.useEffect(()=>{(async()=>{const ne=await ke("/api/navigation/bcv",c.current);if(ne.ok){const te=ne.json;P({bookCode:te.book_code,chapterNum:te.chapter,verseNum:te.verse})}else qe.enqueueSnackbar(`Could not load bcv: ${ne.error.reason}`,{variant:"error",anchorOrigin:{vertical:"bottom",horizontal:"left"},persist:!0})})().then()},[]);const Ut=Y=>{const ne=Y.data.split("--");if(ne.length===6){const te=ne[1]==="enabled";te!==r.current&&o(te);const Ne=ne[3]==="enabled";Ne!==c.current&&u(Ne);const Bt=ne[5]==="enabled";Bt!==g.current&&b(Bt)}},It=Y=>{const ne=Y.data.split("--");if(ne.length===4){const te={bookCode:ne[0],chapterNum:parseInt(ne[1]),verseNum:parseInt(ne[2]),endVerseNum:parseInt(ne[3])};(te.bookCode!==T.current.bookCode||te.chapterNum!==T.current.chapterNum||te.verseNum!==T.current.verseNum||te.endVerseNum!==T.current.endVerseNum)&&P(te)}},Pt=Y=>{const ne=Y.data.split("--");if(ne.length===3){const te={font_set:ne[0],size:ne[1],direction:ne[2]};(te.font_set!==S.current.font_set||te.size!==S.current.size||te.direction!==S.current.direction)&&d(te)}},Ot=()=>{Me().then()},Rt=Y=>{try{const ne=dh(h.current),[te,Ne,Bt]=Y.data.split("--");if(["true","false"].includes(Bt)){const Vr=Bt==="true";(!(te in ne)||!("isActive"in ne[te])||Vr!==ne[te].isActive)&&(ne[te]={endpoint:Ne,isActive:Vr},C(ne))}}catch(ne){console.log(`Auth Error: ${ne}, data: ${Y.data}`)}},Mt=Y=>{if(Y.data===null)D.current!==null&&H(null);else{const ne=Y.data.split("--");if(ne.length===3){let te={source:ne[0],organization:ne[1],project:ne[2]};(!D.current||te.source!==D.current.source||te.organization!==D.current.organization||te.project!==D.current.project)&&H(te)}else H(null)}},At=()=>{tt().then()};v.useEffect(()=>{const Y=new AbortController;return(async()=>{await Fp("/api/notifications",{method:"GET",headers:{Accept:"text/event-stream"},onopen(te){te.ok&&te.status===200||te.status>=400&&te.status<500&&te.status!==429&&console.log("Error from SSE",te.status)},onmessage(te){te.event==="misc"?miscHandler(te):te.event==="status"?Ut(te):te.event==="bcv"?It(te):te.event==="auth"?Rt(te):te.event==="languages"?Ot():te.event==="typography"?Pt(te):te.event==="current_project"?Mt(te):te.event==="alignment"&&At()},onclose(){console.log("SSE connection closed by the server")},onerror(te){console.log("There was an error from the SSE server",te)}})})(),()=>Y.abort()},[]);const Se={enableNet:t,setEnableNet:o,enabledRef:r},be={debug:s,setDebug:u,debugRef:c},We={beta:p,setBeta:b,betaRef:g},Fe={systemBcv:E,setSystemBcv:P,bcvRef:T},ce={auth:m,setAuth:C,authRef:h},On={i18n:_,setI18n:j,i18nRef:$},Nr={typography:B,setTypography:d,typographyRef:S},Rn={currentProject:A,setCurrentProject:H,currentProjectRef:D},as={clientInterfaces:q,setClientInterfaces:Q,clientInterfacesRef:M},Mn={snippet:N,setSnippet:J,snippetRef:W},Dr={word:K,setWord:Pe,wordRef:X},Lr={clientConfig:Z,setClientConfig:V,clientConfigRef:ie},Fr={product:Re,setProduct:yt,productRef:$t},se=Ge(qe.MaterialDesignContent)(()=>({"&.notistack-MuiContent-error":{backgroundColor:"#FDEDED",color:"#D32F2F"},"&.notistack-MuiContent-info":{backgroundColor:"#E5F6FD",color:"#0288D1"},"&.notistack-MuiContent-warning":{backgroundColor:"#FFF4E5",color:"#EF6C00"},"&.notistack-MuiContent-success":{backgroundColor:"#EDF7ED",color:"#2E7D32"}}));return i.jsx(qe.SnackbarProvider,{Components:{error:se,info:se,warning:se,success:se},maxSnack:6,children:i.jsx(Ga,{netValue:Se,debugValue:be,i18nValue:On,bcvValue:Fe,authValue:ce,typographyValue:Nr,currentProjectValue:Rn,clientConfigValue:Lr,clientInterfacesValue:as,snippetValue:Mn,wordValue:Dr,productValue:Fr,betaValue:We,children:e})})}function Qa({children:e}){return i.jsx(qe.SnackbarProvider,{maxSnack:3,children:i.jsx(Xa,{children:e})})}function Ja({titleKey:e,widget:t,margin:n=0,children:r,requireNet:o=!1,currentId:s}){const{enableNet:a}=v.useContext(ut),{i18nRef:c}=v.useContext(ve);return o&&!a?i.jsx(l.Box,{sx:{m:0,height:"100%",overflowX:"hidden",overflowY:"auto"},children:i.jsx(l.Grid,{container:!0,sx:{alignItems:"center",justifyContent:"center",minHeight:"100vh"},children:i.jsxs(l.Grid,{rowSpacing:.5,sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[i.jsx(Cp,{sx:{fontSize:80},color:"warning"}),i.jsx("p",{children:U("components:framework:no_entry_if_offline",c.current)})]})})}):i.jsxs(i.Fragment,{children:[i.jsx(l.Box,{children:i.jsx(Ta,{titleKey:e||null,widget:t||null,currentId:s})}),i.jsx(l.Box,{sx:{m:n,overflowX:"hidden",overflowY:"auto"},children:r})]})}function fh({children:e,titleKey:t,requireNet:n,currentId:r,widget:o,margin:s}){return i.jsx(Qa,{children:i.jsx(Ja,{titleKey:t,requireNet:n,currentId:r,widget:o||null,margin:s||0,children:e})})}const ph=v.createContext({languages:!1,setLanguages:()=>{}}),Ar={select:{background:"white"},inputLabel:{}};function es(e){const{listItem:t}=e,n={menuItem:{display:"flex",justifyContent:"space-between",color:"Black"}};return i.jsx("div",{style:n.menuItem,children:i.jsx("div",{style:n.menuItem,children:i.jsx(l.Typography,{style:{width:"100%"},noWrap:!0,variant:"body2",component:"div",children:t})})})}es.propTypes={listItem:Fn.PropTypes.shape({index:Fn.PropTypes.objectOf(Fn.PropTypes.string)})};function hh({isOpen:e,versification:t,setVersification:n}){const{i18nRef:r}=v.useContext(ve),[o,s]=v.useState([]),[a,c]=v.useState(!1),u=()=>c(p=>!p);return v.useEffect(()=>{e&&Nn({url:"/api/content-utils/versifications",setter:s}).then()},[e]),i.jsxs(l.Stack,{spacing:1,children:[i.jsxs(l.Typography,{variant:"body1",children:[" ",U("library:pankosmia-rcl:choose_versification",r.current)," "]}),i.jsxs(l.Stack,{spacing:0,children:[i.jsx(l.Typography,{variant:"body2",sx:{display:"-webkit-box",WebkitLineClamp:a?"unset":1,WebkitBoxOrient:"vertical",overflow:"hidden"},children:U("library:pankosmia-rcl:text_versification",r.current)}),i.jsx(l.Button,{onClick:u,color:"secondary",size:"small",disableRipple:!0,sx:{alignSelf:"flex-start",p:0,minWidth:0,textTransform:"none",fontSize:"0.8rem",fontWeight:400,"&:hover":{background:"none",textDecoration:"underline"}},children:U(a?"library:pankosmia-rcl:show_less":"library:pankosmia-rcl:show_more",r.current)})]}),i.jsxs(l.FormControl,{sx:{width:"100%"},children:[i.jsx(l.InputLabel,{id:"booksVersification-label",required:!0,htmlFor:"booksVersification",sx:Ar.inputLabel,children:U("library:pankosmia-rcl:versification_scheme",r.current)}),i.jsx(l.Select,{variant:"outlined",required:!0,labelId:"booksVersification-label",name:"booksVersification",inputProps:{id:"bookVersification"},value:t,label:U("library:pankosmia-rcl:versification_scheme",r.current),onChange:p=>{n(p.target.value)},sx:Ar.select,children:o.map((p,f)=>i.jsx(l.MenuItem,{value:p,dense:!0,children:i.jsx(es,{listItem:`${p.toUpperCase()} - ${U(`scripture:versifications:${p}`,r.current)}`})},f))}),i.jsxs(l.FormHelperText,{children:[" ",U("library:pankosmia-rcl:helper_versification",r.current)]})]})]})}function mh({bookCode:e,setBookCode:t,bookAbbr:n,setBookAbbr:r,bookTitle:o,setBookTitle:s,bookCodes:a,showVersification:c,setShowVersification:u,bookProject:p,addVerses:f=!0}){var w,T,P,_,O,$,j,B;const{i18nRef:g}=v.useContext(ve),[b,m]=v.useState(!0),[x,h]=v.useState({});v.useEffect(()=>{ke("/api/client-config").then(z=>z.json).then(z=>h(z)).catch(z=>console.error("Error :",z))},[]);const C=((_=(P=(T=(w=x==null?void 0:x["core-contenthandler_text_translation"])==null?void 0:w.find(z=>z.id==="config"))==null?void 0:T.fields)==null?void 0:P.find(z=>z.id==="protestantBooksOnlyCheckbox"))==null?void 0:_.value)!==!1,E=((B=(j=($=(O=x==null?void 0:x["core-contenthandler_text_translation"])==null?void 0:O.find(z=>z.id==="config"))==null?void 0:$.fields)==null?void 0:j.find(z=>z.id==="protestantBooksOnlyDefaultChecked"))==null?void 0:B.value)!==!1;return v.useEffect(()=>{m(E)},[E]),i.jsx(i.Fragment,{children:i.jsxs(l.Grid,{container:!0,spacing:1,sx:{justifyItems:"flex-end",alignItems:"stretch"},children:[i.jsx(l.Grid,{size:4,children:i.jsxs(l.FormControl,{sx:{width:"100%"},children:[i.jsx(l.InputLabel,{id:"bookCode-label",required:!0,htmlFor:"bookCode",sx:Ar.inputLabel,children:U("library:pankosmia-rcl:book_code",g.current)}),i.jsx(l.Select,{variant:"outlined",labelId:"bookCode-label",name:"bookCode",inputProps:{id:"bookCode"},value:e,label:U("library:pankosmia-rcl:book_code",g.current),onChange:z=>{t(z.target.value),r(["1","2","3"].includes(z.target.value[0])?z.target.value.slice(0,2)+z.target.value[2].toLowerCase():z.target.value[0]+z.target.value.slice(1).toLowerCase()),s(U(`scripture:books:${z.target.value}`,g.current))},sx:Ar.select,children:(b?a.slice(0,66):a).map((z,S)=>i.jsx(l.MenuItem,{value:z,dense:!0,disabled:p?p.includes(z):!1,children:i.jsx(es,{listItem:`${z} - ${U(`scripture:books:${z}`,g.current)}`})},S))})]})}),i.jsx(l.Grid,{size:4,children:i.jsx(l.TextField,{id:"bookAbbr",required:!0,sx:{width:"100%"},label:U("library:pankosmia-rcl:book_abbr",g.current),value:n,onChange:z=>{r(z.target.value)}})}),i.jsx(l.Grid,{size:4,children:i.jsx(l.TextField,{id:"bookTitle",required:!0,sx:{width:"100%"},label:U("library:pankosmia-rcl:book_title",g.current),value:o,onChange:z=>{s(z.target.value)}})}),C&&i.jsx(l.FormGroup,{children:i.jsx(l.FormControlLabel,{control:i.jsx(l.Checkbox,{color:"secondary",checked:b,onChange:()=>m(!b)}),label:U("library:pankosmia-rcl:protestant_books_only",g.current)})}),f&&i.jsx(l.FormGroup,{children:i.jsx(l.FormControlLabel,{control:i.jsx(l.Checkbox,{color:"secondary",checked:!0,disabled:!0,onChange:()=>u(!c)}),label:U("library:pankosmia-rcl:add_versification_checkbox",g.current)})})]})})}function gh({steps:e,initialStep:t=0,renderStepContent:n,isStepValid:r,handleCreate:o,handleClose:s,requiredFieldsLabel:a,primaryButtonVariant:c,primaryActionKey:u,secondaryButtonVariant:p,secondaryActionKey:f,primaryAction:g,secondaryAction:b,isLeftStepperButtonDisabled:m,CustomHeader:x,isInDialogue:h=!1}){const C=Math.min(Math.max(t-1,0),e.length-1),[E,w]=v.useState(C),[T,P]=v.useState(new Set),{i18nRef:_}=v.useContext(ve),O=v.useRef(null),[$,j]=v.useState(0);v.useEffect(()=>{const d=O.current;if(!d)return;const A=()=>{j(d.getBoundingClientRect().height)};A();const R=new ResizeObserver(A);return R.observe(d),()=>R.disconnect()},[]);const B=d=>T.has(d),z=async()=>{let d=T;if(B(E)&&(d=new Set(d.values()),d.delete(E)),E===e.length-1){try{await o()}catch(A){console.error("Error create project",A)}return}w(A=>A+1),P(d)},S=()=>{w(d=>d-1)};return i.jsxs(i.Fragment,{children:[i.jsx(l.Stepper,{sx:{position:"sticky"},activeStep:E,children:e.map((d,A)=>{const R={},D={};return B(A)&&(R.completed=!1),i.jsx(l.Step,{...R,children:i.jsx(l.StepLabel,{...D,children:d})},d)})}),i.jsxs(l.Box,{ref:O,children:[x&&i.jsx(x,{}),a&&i.jsx(l.DialogContentText,{variant:"subtitle2",sx:{padding:"16px 0px"},children:U("library:pankosmia-rcl:required_field",_.current)})]}),i.jsx(l.Box,{sx:{maxHeight:h?`calc(100% - 64px - ${$}px)`:"100vh",overflowY:"auto",overflowX:"hidden"},children:E!==e.length&&i.jsx(i.Fragment,{children:n(E)})}),i.jsxs(l.DialogActions,{sx:{justifyContent:"space-between",padding:"16px 0px 0px"},children:[i.jsx(l.Button,{sx:{padding:0},color:p||"inherit",onClick:E===0?s:b||S,disabled:m&&E===0,children:E===0?`${U(`${f||"library:pankosmia-rcl:cancel"}`,_.current)}`:`${U("library:pankosmia-rcl:back_button",_.current)}`}),i.jsx(l.Button,{sx:{padding:0},color:c||"inherit",onClick:g||z,disabled:!r(E),children:E===e.length-1?`${U(`${u||"library:pankosmia-rcl:create"}`,_.current)}`:`${U("library:pankosmia-rcl:next_button",_.current)}`})]})]})}const yh={palette:{primary:{main:"#666"},secondary:{main:"#888"}}};function bh({isAndroid:e,children:t}){return i.jsx(l.Box,{sx:{mb:2,position:"fixed",top:e?"78px":"48px",left:e?"30px":0,bottom:e?"30px":0,right:e?"30px":0,overflow:"auto",width:e?"calc(100% - 60px)":"100%"},children:t})}const xh=v.forwardRef(function({href:t,netEnabled:n,children:r,...o},s){return i.jsx("a",{ref:s,href:n?t:void 0,target:n?"_blank":void 0,rel:"noopener noreferrer",style:n?void 0:{color:"inherit",textDecoration:"none",cursor:"default"},...o,children:r})});function Za({titleSection:e,children:t}){return i.jsxs(l.Stack,{spacing:1,children:[i.jsx(l.Typography,{variant:"body1",sx:{fontWeight:"bold"},children:e}),i.jsx(l.Stack,{spacing:1,children:t})]})}const vh={unavailable:"download_unavailable",checking:"download_checking",idle:"download",downloading:"download_downloading",complete:"download_installed",error:"download_retry"},Ch={ffmpeg:{check:"checkFfmpegInstalled",onProgress:"onFfmpegDownloadProgress",onComplete:"onFfmpegDownloadComplete",download:"downloadFfmpeg"},firefox:{check:"checkFirefoxInstalled",onProgress:"onDownloadProgress",onComplete:"onDownloadComplete",download:"downloadFirefox"}};function ec({asset:e,actionButtonPlugin:t}){const{i18nRef:n}=v.useContext(ve),{enabledRef:r}=v.useContext(ut),[o,s]=v.useState("checking"),[a,c]=v.useState(null),[u,p]=v.useState(null),f=!!window.electronAPI,g=Ch[e];v.useEffect(()=>{if(!f||!g)return;let x=!1;return window.electronAPI[g.check]().then(h=>{x||s(h?"complete":"idle")}),()=>{x=!0}},[e]),v.useEffect(()=>{if(!f||!g)return;const x=window.electronAPI[g.onProgress](C=>{typeof C=="number"&&!Number.isNaN(C)&&c(Math.max(0,Math.min(100,C)))}),h=window.electronAPI[g.onComplete]((C,E)=>{s(C?"complete":"error"),p(C?null:E||null),C&&(c(100),t&&setTimeout(()=>{t==null||t()},1e3))});return()=>{x(),h()}},[e]);const b=()=>{!f||!g||(s("downloading"),c(null),p(null),window.electronAPI[g.download]())},m=typeof a=="number";return i.jsxs(i.Fragment,{children:[i.jsx(l.Tooltip,{title:!f||!r.current&&U("library:pankosmia-rcl:tooltip_offline_mode",n.current),children:i.jsx("span",{style:{alignSelf:"center"},children:i.jsx(l.Button,{size:"medium",variant:"contained",startIcon:o==="complete"?i.jsx(Sp,{}):o==="error"?i.jsx(Tp,{}):i.jsx(Ip,{}),onClick:b,disabled:o==="checking"||o==="downloading"||o==="complete"||!f||!r.current,title:U(f?"library:pankosmia-rcl:download":"library:pankosmia-rcl:download_unavailable_tip",n.current),children:U(`library:pankosmia-rcl:${vh[o==="checking"&&!f?"unavailable":o]}`,n.current)})})}),o==="downloading"&&i.jsxs(i.Fragment,{children:[i.jsx(l.LinearProgress,{variant:m?"determinate":"indeterminate",value:m?a:void 0}),i.jsx(l.Typography,{variant:"body2",children:m?`${Math.round(a)}% ${U("library:pankosmia-rcl:download_percent_complete",n.current)}`:U("library:pankosmia-rcl:download_downloading",n.current)})]}),o==="error"&&i.jsxs(l.Typography,{variant:"body2",color:"error",children:[U("library:pankosmia-rcl:download_failed",n.current),u?`: ${u}`:"","."]})]})}function tc({titleLabel:e,isOpen:t,closeFn:n,children:r,actionsButtonArray:o,requiredFieldsLabel:s=!1,dividers:a=!1}){const c=l.useTheme(),{i18nRef:u}=v.useContext(ve);return i.jsxs(l.Dialog,{onClose:()=>n(),open:t,sx:{overflow:"hidden"},slotProps:{sx:{overflow:"hidden !important",display:"flex",flexDirection:"column"},paper:{component:"form",sx:{width:"auto",minWidth:"280px"}}},onKeyDown:p=>{var g,b;if(p.key!=="Enter")return;const f=o==null?void 0:o[1];(g=f==null?void 0:f.props)!=null&&g.actionFn&&!((b=f.props)!=null&&b.isDisabled)&&(p.preventDefault(),f.props.actionFn())},maxWidth:"sm",fullWidth:!1,children:[i.jsx(l.DialogTitle,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:i.jsx(l.Typography,{variant:"h6",sx:{color:c.palette.primary},component:"div",children:e})}),a&&i.jsx(l.Divider,{}),s&&i.jsx(l.Box,{sx:{paddingTop:a?"16px":"0px",paddingBottom:"16px",px:3},children:i.jsx(l.Typography,{variant:"subtitle2",children:U("library:pankosmia-rcl:required_field",u.current)})}),i.jsx(l.DialogContent,{sx:{paddingTop:s?"0px":"16px",paddingBottom:2},children:r}),a&&i.jsx(l.Divider,{}),i.jsx(l.DialogActions,{children:o&&o.map(p=>p)})]})}function Br({actionFn:e,actionLabel:t,closeFn:n,closeLabel:r,isDisabled:o,closeOnAction:s=!0,onlyCloseButton:a=!1,actionVariant:c,closeVariant:u,isLoading:p,loadingLabel:f}){return[i.jsx(kr,{actionFn:n,isDisabled:!1,label:r,variant:u,isLoading:p,loadingLabel:f}),a?null:i.jsx(kr,{actionFn:()=>{e(),s&&n()},isDisabled:o,label:t,variant:c})]}function Sh({isOpen:e,closeFn:t,asset:n,actionButtonPlugin:r}){const{i18nRef:o}=v.useContext(ve);return i.jsx(tc,{titleLabel:U("library:pankosmia-rcl:Firefox_not_installed",o.current),isOpen:e,closeFn:()=>t(),actionsButtonArray:Br({closeFn:()=>t(),closeLabel:U("library:pankosmia-rcl:cancel",o.current),onlyCloseButton:!0}),children:i.jsxs(l.Stack,{spacing:2,justifyContent:"center",alignItems:"center",sx:{width:"100%"},children:[n==="firefox"&&i.jsx(l.Typography,{variant:"body1",children:U("library:pankosmia-rcl:need_pdf_engine",o.current)}),n==="ffmpeg"&&i.jsx(l.Typography,{variant:"body1",children:U("library:pankosmia-rcl:need_ffmpeg",o.current)}),i.jsx(ec,{asset:n,actionButtonPlugin:r})]})})}function ts({titleLabel:e,isOpen:t,closeFn:n,children:r,actionsButtonArray:o,requiredFieldsLabel:s=!1,header:a=null,fullHeight:c=!1}){const u=l.useTheme(),p=l.useMediaQuery(u.breakpoints.down("sm")),{i18nRef:f}=v.useContext(ve);return i.jsxs(l.Dialog,{fullScreen:p,open:t,sx:{overflow:"hidden"},onKeyDown:g=>{var m,x;if(g.key!=="Enter")return;const b=o==null?void 0:o[1];(m=b==null?void 0:b.props)!=null&&m.actionFn&&!((x=b.props)!=null&&x.isDisabled)&&(g.preventDefault(),b.props.actionFn())},slotProps:{paper:{component:"form",sx:{display:"flex",flexDirection:"column",overflow:"hidden",...c&&!p&&{height:"calc(100% - 64px)"}}}},maxWidth:"sm",fullWidth:!0,children:[i.jsxs(l.DialogTitle,{sx:{backgroundColor:u.palette.primary.main,display:"flex",flexDirection:"row",alignItems:"center"},children:[p&&i.jsx(l.IconButton,{sx:{color:u.palette.primary.contrastText},onClick:()=>{n()},children:i.jsx(ba,{})}),i.jsx(l.Typography,{variant:"h6",sx:{color:u.palette.primary.contrastText},component:"div",children:e}),o&&p&&o[1]&&v.cloneElement(o[1],{sx:{...o[1].props.sx,marginInlineStart:"auto",color:`${u.palette.primary.contrastText} !important`}})]}),(a||s)&&i.jsxs(l.Box,{sx:{py:2,px:3,flexShrink:0,display:"flex",flexDirection:"column",gap:2},children:[s&&i.jsx(l.Typography,{variant:"subtitle2",children:U("library:pankosmia-rcl:required_field",f.current)}),a]}),i.jsx(l.DialogContent,{sx:{pb:"16px !important",pt:a||s?"0px":"16px !important",flex:1,minHeight:0},children:r}),!p&&i.jsx(l.Divider,{}),!p&&i.jsx(l.DialogActions,{children:o&&o.map(g=>g)})]})}function wh({isOpen:e,setIsOpen:t,theme:n,children:r}){return i.jsx(l.SwipeableDrawer,{anchor:"bottom",open:e,onOpen:()=>{},onClose:()=>t(!1),swipeAreaWidth:40,PaperProps:{sx:{width:"100%",boxSizing:"border-box",overflow:"hidden"}},children:i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[i.jsx(l.Box,{sx:{width:"100%",paddingY:"22px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:i.jsx(l.Box,{sx:{width:32,height:4,borderRadius:2,backgroundColor:n.palette.action.active}})}),i.jsx(l.Box,{sx:{display:"flex",flexDirection:"column",overflow:"auto"},children:i.jsx(l.MenuList,{sx:{marginX:"16px",marginBottom:2},children:r})})]})})}function Th({isOpen:e,setIsOpen:t,children:n,anchorEl:r}){return i.jsx(l.Menu,{onClose:()=>t(!1),anchorEl:r,open:e,children:n})}function ns({isOpen:e,setIsOpen:t,anchorEl:n,children:r}){const o=l.useTheme();return l.useMediaQuery(o.breakpoints.down("sm"))?i.jsx(wh,{theme:o,isOpen:e,setIsOpen:t,children:r}):i.jsx(Th,{anchorEl:n,isOpen:e,setIsOpen:t,children:r})}function kh(e){return wt("MuiIconButton",e)}const nc=Tt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Eh=e=>{const{classes:t,disabled:n,color:r,edge:o,size:s,loading:a}=e,c={root:["root",a&&"loading",n&&"disabled",r!=="default"&&`color${De(r)}`,o&&`edge${De(o)}`,`size${De(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return qt(c,kh,t)},jh=Ge(Oo,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${De(n.color)}`],n.edge&&t[`edge${De(n.edge)}`],t[`size${De(n.size)}`]]}})(Et(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,...Cr(e,"background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Et(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Ro()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main,"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${nc.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${nc.loading}`]:{color:"transparent"}}))),_h=Ge("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),rc=F.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiIconButton"}),{edge:o=!1,children:s,className:a,color:c="default",disabled:u=!1,disableFocusRipple:p=!1,size:f="medium",id:g,loading:b=null,loadingIndicator:m,...x}=r,h=Ti(g),C=m??i.jsx(qo,{"aria-labelledby":h,color:"inherit",size:16}),E={...r,edge:o,color:c,disabled:u,disableFocusRipple:p,loading:b,loadingIndicator:C,size:f},w=Eh(E);return i.jsxs(jh,{id:b?h:g,className:Ae(w.root,a),centerRipple:!0,internalNativeButton:!0,focusRipple:!p,disabled:u||b,ref:n,...x,ownerState:E,children:[typeof b=="boolean"&&i.jsx("span",{className:w.loadingWrapper,style:{display:"contents"},children:i.jsx(_h,{className:w.loadingIndicator,ownerState:E,children:b&&C})}),s]})});process.env.NODE_ENV!=="production"&&(rc.propTypes={children:Qr(y.node,e=>F.Children.toArray(e.children).some(n=>F.isValidElement(n)&&n.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
273
|
+
`)):null),classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),y.string]),disabled:y.bool,disableFocusRipple:y.bool,disableRipple:y.bool,edge:y.oneOf(["end","start",!1]),id:y.string,loading:y.bool,loadingIndicator:y.node,size:y.oneOfType([y.oneOf(["small","medium","large"]),y.string]),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object])});function rs({children:e}){const t=l.useTheme(),n=l.useMediaQuery(t.breakpoints.down("lg")),r=l.useMediaQuery(t.breakpoints.down("sm"));return i.jsx(l.AppBar,{position:"static",children:i.jsx(l.Toolbar,{sx:{px:r?2:3},variant:n?"dense":"regular",children:i.jsx(l.Box,{sx:{display:"flex",gap:"4px",alignItems:"center",width:"100%"},children:e})})})}function $h({titleKey:e}){return i.jsxs(rs,{children:[i.jsx(rc,{size:"medium",edge:"start",color:"inherit",onClick:()=>window.history.back(),children:i.jsx(vp,{sx:{transform:t=>t.direction==="rtl"?"scaleX(-1)":"none"}})}),i.jsx(l.Typography,{variant:"h6",children:e})]})}function Ih(){return i.jsx(l.SvgIcon,{children:i.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",stroke:"none",children:[i.jsx("path",{d:"M13.9392 4H4C2.892 4 2 4.892 2 6V18C2 19.108 2.892 20 4 20H20C21.108 20 22 19.108 22 18V6L20 8V18H4V6H11.9392",fill:"currentColor",stroke:"none"}),i.jsx("path",{d:"M20 12H4V14H20V12Z",fill:"currentColor",stroke:"none"}),i.jsx("path",{d:"M10 14H8V18H10V14Z",fill:"currentColor",stroke:"none"}),i.jsx("path",{d:"M16 14H14V18H16V14Z",fill:"currentColor",stroke:"none"}),i.jsx("path",{d:"M13 10V6.925L18.525 1.425C18.675 1.275 18.8417 1.16667 19.025 1.1C19.2083 1.03333 19.3917 1 19.575 1C19.775 1 19.9667 1.0375 20.15 1.1125C20.3333 1.1875 20.5 1.3 20.65 1.45L21.575 2.375C21.7083 2.525 21.8125 2.69167 21.8875 2.875C21.9625 3.05833 22 3.24167 22 3.425C22 3.60833 21.9667 3.79583 21.9 3.9875C21.8333 4.17917 21.725 4.35 21.575 4.5L16.075 10H13ZM14.5 8.5H15.45L18.475 5.45L18.025 4.975L17.55 4.525L14.5 7.55V8.5ZM18.025 4.975L17.55 4.525L18.475 5.45L18.025 4.975Z",fill:"currentColor",stroke:"none"})]})})}function oc(){return i.jsx(l.SvgIcon,{children:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:"24px",width:"24px",fill:"currentColor",children:i.jsx("path",{d:"M9.25,22l-0.4-3.2q-0.32-0.13-0.61-0.3T7.68,18.13L4.7,19.38L1.95,14.63l2.58-1.95Q4.5,12.5 4.5,12.34q0-0.16 0-0.34t0-0.34t0.03-0.34L1.95,9.38L4.7,4.63L7.68,5.88Q7.95,5.68 8.25,5.5t0.6-0.3L9.25,2h5.5l0.4,3.2q0.33,0.13 0.61,0.3t0.56,0.38L19.3,4.63l2.75,4.75l-2.57,1.95q0.02,0.18 0.02,0.34t0,0.34t0,0.34t-0.05,0.34l2.57,1.95l-2.75,4.75l-2.95-1.25q-0.27,0.2-0.57,0.38t-0.6,0.3L14.75,22H9.25ZM11,20h1.98l0.35-2.65q0.78-0.2 1.44-0.59t1.21-0.94l2.47,1.03l0.98-1.7l-2.15-1.63q0.13-0.35 0.17-0.74T17.5,12t-0.05-0.79q-0.05-0.39-0.17-0.74l2.15-1.63l-0.98-1.7L15.98,8.2q-0.55-0.57-1.21-0.96T13.33,6.65L13,4H11.03L10.68,6.65Q9.9,6.85 9.24,7.24T8.03,8.17L5.55,7.15L4.58,8.85l2.15,1.6Q6.6,10.83 6.55,11.2T6.5,12q0,0.4 0.05,0.77t0.17,0.75L4.58,15.15l0.98,1.7L8.03,15.8q0.55,0.58 1.21,0.96t1.44,0.59L11,20Zm1.05-4.5q1.45,0 2.47-1.03T15.55,12T14.53,9.52T12.05,8.5q-1.47,0-2.49,1.02T8.55,12t1.01,2.47t2.49,1.03ZM12,12Z"})})})}function sc({listClients:e,debugRef:t,i18nRef:n}){const[r,o]=v.useState([]);return v.useEffect(()=>{t.current?o(e.filter(s=>!s.exclude_from_menu&&s.requires.debug)):o([])},[t.current]),i.jsxs(i.Fragment,{children:[r.length>0&&i.jsx(l.ListSubheader,{children:U("components:header:debug_mode",n.current)}),r.map((s,a)=>i.jsxs(l.MenuItem,{inset:!0,disabled:s.requires.net&&!netEnabled.current,onClick:()=>{window.location.href=s.url},children:[i.jsx(l.ListItemIcon,{}),i.jsx(l.ListItemText,{primary:U(`pages:${s.id}:title`,n.current)})]}))]})}const Ph=Tt("MuiBox",["root"]),Oh=yr(),os=bu({themeId:ht,defaultTheme:Oh,defaultClassName:Ph.root,generateClassName:li.generate});process.env.NODE_ENV!=="production"&&(os.propTypes={children:y.node,component:y.elementType,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object])});function ic({i18nRef:e,betaRef:t,debugRef:n}){const[r,o]=v.useState([]);v.useEffect(()=>{(async()=>{const c=await ke("/api/list-clients",n.current);c.ok&&o(c.json.filter(u=>!u.exclude_from_menu&&u.requires.beta))})().then()},[t.current,n.current]);const s=a=>{dn(`/api/beta/${t.current?"disable":"enable"}`).then(()=>{a.stopPropagation(),a.preventDefault()})};return i.jsxs(i.Fragment,{children:[r.length>0&&i.jsxs(l.MenuItem,{onClick:s,children:[i.jsx(l.ListItemIcon,{children:" "}),i.jsx(l.ListItemText,{primary:U("components:header:beta_mode",e.current)}),i.jsx(l.Switch,{edge:"end",onChange:s,checked:t.current})]}),t.current&&r.length>0&&r.map((a,c)=>i.jsxs(l.MenuItem,{disablePadding:!0,onClick:()=>{window.location.href=a.url},children:[i.jsx(l.ListItemIcon,{}),i.jsx(l.ListItemText,{primary:i.jsxs(os,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"1em"},children:[i.jsx(l.Typography,{children:U(`pages:${a.id}:title`,e.current)}),i.jsx(os,{component:"span",sx:{fontSize:"1em",opacity:.7},children:"β"})]})})]},c))]})}function Rh({navigation:e}){const t=l.useTheme(),[n,r]=v.useState(null),[o,s]=v.useState(null),[a,c]=v.useState(!1),[u,p]=v.useState(!1),[f,g]=v.useState(""),[b,m]=v.useState([]),{enabledRef:x}=v.useContext(ut),{debugRef:h}=v.useContext(xt),{i18nRef:C}=v.useContext(ve),{betaRef:E}=v.useContext(jr),[w,T]=v.useState(!1),P=l.useMediaQuery(t.breakpoints.down("sm")),_=B=>{p(!0),s(B.currentTarget)},O=B=>{c(!0),r(B.currentTarget)},$=()=>{p(!1),x.current?dn("/api/net/disable",h.current):T(!0)};v.useEffect(()=>{ke("/api/version").then(B=>B.json).then(B=>g(B.product_name)).catch(B=>console.error("Error :",B))},[]),v.useEffect(()=>{ke("/api/list-clients").then(B=>B.json).then(B=>m(B)).catch(B=>console.error("Error :",B))},[]);const j=B=>{const z=b.find(S=>S.id===B);z&&(p(!1),window.location.href=z.url)};return i.jsxs(rs,{children:[e,i.jsxs(l.Box,{sx:{display:"flex",gap:1,alignItems:"center",marginInlineStart:"auto"},children:[i.jsx(l.IconButton,{color:"inherit",onClick:O,sx:{backgroundColor:t.palette.secondary.main,"&:hover":{backgroundColor:t.palette.secondary.main}},children:i.jsx(Ih,{})}),i.jsx(ns,{anchorEl:n,setIsOpen:c,isOpen:a,children:b.some(B=>B.id==="core-local-workspace")&&i.jsxs(l.MenuItem,{onClick:()=>j("core-local-workspace"),children:[i.jsx(l.ListItemIcon,{children:i.jsx(xp,{})}),i.jsx(l.ListItemText,{children:U("library:pankosmia-rcl:add_workspace",C.current)})]})}),!P&&i.jsx(l.IconButton,{onClick:()=>j("core-settings"),color:"inherit",children:i.jsx(oc,{})}),i.jsx(l.IconButton,{color:"inherit",onClick:_,children:i.jsx(jp,{})}),i.jsxs(ns,{anchorEl:o,setIsOpen:p,isOpen:u,children:[P&&i.jsxs(l.MenuItem,{onClick:()=>j("core-settings"),children:[i.jsx(l.ListItemIcon,{children:i.jsx(oc,{})}),i.jsx(l.ListItemText,{children:U("library:pankosmia-rcl:setting",C.current)})]}),i.jsxs(l.MenuItem,{onClick:$,selected:x.current,children:[i.jsx(l.ListItemIcon,{children:x.current?i.jsx(wa,{fontSize:"small"}):null}),i.jsx(l.ListItemText,{children:U("library:pankosmia-rcl:online_mode",C.current)}),i.jsx(l.ListItemIcon,{children:i.jsx(Vo,{color:"primary",title:U("components:header:tooltip_offline_mode",C.current).replace("{1}",f)})})]}),i.jsx(l.Divider,{}),b.some(B=>B.id==="core-dashboard")&&i.jsxs(l.MenuItem,{onClick:()=>j("core-dashboard"),children:[i.jsx(l.ListItemIcon,{children:i.jsx(wp,{})}),i.jsx(l.ListItemText,{children:U("library:pankosmia-rcl:my_project",C.current)})]}),b.some(B=>B.id==="core-client_pdf_publisher")&&i.jsxs(l.MenuItem,{onClick:()=>j("core-client_pdf_publisher"),children:[i.jsx(l.ListItemIcon,{children:i.jsx(_p,{})}),i.jsx(l.ListItemText,{children:U("library:pankosmia-rcl:pdf_publisher",C.current)})]}),b.some(B=>B.id==="content")&&i.jsxs(l.MenuItem,{onClick:()=>j("content"),children:[i.jsx(l.ListItemIcon,{children:i.jsx(Ep,{})}),i.jsx(l.ListItemText,{children:U("library:pankosmia-rcl:content_manager",C.current)})]}),i.jsx(ic,{i18nRef:C,betaRef:E,debugRef:h}),i.jsx(sc,{listClients:b,debugRef:h,i18nRef:C})]}),i.jsx(Wr,{internetDialogOpen:w,setInternetDialogOpen:T})]})]})}function In({text:e,icon:t=null,truncate:n=!1}){return i.jsxs(l.Typography,{variant:"caption",sx:{px:1,borderRadius:"4px",bgcolor:"grey.300",color:"text.primary",display:"flex",alignItems:"center",gap:"4px",minWidth:0,flexShrink:n?1:0,overflow:n?"hidden":"visible","& svg":{width:"20px",height:"20px",color:"action.active",flexShrink:0}},children:[t,i.jsx("span",{style:{minWidth:0,overflow:n?"hidden":"visible",textOverflow:n?"ellipsis":"clip",whiteSpace:"nowrap",flexShrink:n?1:0},children:e})]})}function Mh(){const e=l.useTheme(),t=l.useMediaQuery(e.breakpoints.down("sm"));return{panMarginHorizontal:t?"16px":"24px",panMarginVertical:t?"16px":"24px",panGapHorizontal:t?"16px":"24px",panGapContentSmall:t?"4px":"8px",panGapContentMedium:t?"4px":"8px"}}const ss=[{value:"CC BY",versioned:!0},{value:"CC BY-SA",versioned:!0},{value:"CC BY-NC",versioned:!0},{value:"CC BY-NC-SA",versioned:!0},{value:"CC BY-ND",versioned:!0},{value:"CC BY-NC-ND",versioned:!0},{value:"all_rights_reserved",versioned:!1,i18n:!0}],Ah=["4.0","3.0","2.5","2.0","1.0"],Bh={free_text:"",author_name:"",year:"",license:"",version:"4.0",order:"holder_first"},ac=/^\d{4}(-\d{4})?$/,Nh={unspecified:"Unspecified",public_domain:"Public Domain",all_rights_reserved:"All Rights Reserved"},is=(e,t)=>t?t(e):Nh[e];function Pn(e,t,n){var r;switch(e){case"unspecified":return is("unspecified",n);case"public-domain":return is("public_domain",n);case"free":{const o=(r=t==null?void 0:t.free_text)==null?void 0:r.trim();return o?`© ${o}`:""}case"builder":{const o=t.author_name.trim(),s=t.year.trim();if(!o||!ac.test(s))return"";const a=ss.find(p=>p.value===t.license);if(a!=null&&a.versioned&&!t.version)return"";a!=null&&a.i18nKey?n(a.value):a==null||a.value;const c=a?a.i18n?is(a.value,n):a.versioned?`${a.value} ${t.version}`:a.value:"";return`© ${t.order==="year_first"?`${s} ${o}`:`${o} ${s}`}${c?`, ${c}`:""}`}default:return""}}const Dh=(e,t)=>Pn(e,t)!=="";function Lh(e){const t=(e??"").trim(),n={...Bh};if(!t||t==="?"||/^unspecified$/i.test(t)||/^%%.*%%$/.test(t))return{optionCopyright:"unspecified",copyright:n};if(/public domain|cc0/i.test(t))return{optionCopyright:"public-domain",copyright:n};const r=t.replace(/^(copyright\s*)?©\s*/i,"").trim();return r?{optionCopyright:"free",copyright:{...n,free_text:r}}:{optionCopyright:"unspecified",copyright:n}}const Fh=!0;function cc({repoSummary:e,readOnly:t=!1,defaultEditMode:n=!1,onSaved:r,renderActions:o}){const{i18nRef:s}=v.useContext(ve),{debugRef:a}=v.useContext(xt),c=K=>U(K,s.current),[u,p]=v.useState(e),f=(u==null?void 0:u.local_path)??(u==null?void 0:u.path),[g,b]=v.useState("details"),[m,x]=v.useState(n),[h,C]=v.useState(!1),E=!t&&m,w=!E,[T,P]=v.useState({abbreviation:"",name:"",description:""}),[_,O]=v.useState({language_code:"",language_name:"",script_direction:""}),[$,j]=v.useState(!1),[B,z]=v.useState(),[S,d]=v.useState(),A=K=>K.trim()===""?"library:pankosmia-rcl:required_field":null,R=K=>K.trim()===""?"library:pankosmia-rcl:required_field":null,D=A(T.abbreviation),H=R(T.name),Z=!D&&!H,re=S!=="free"||((B==null?void 0:B.free_text)??"").trim()!=="",ie={details:Z,language:$,copyright:re},V=Object.values(ie).every(Boolean),k=E&&V&&!h,q=[{label:"library:pankosmia-rcl:abbreviation",value:T.abbreviation},{label:"library:pankosmia-rcl:repo_name",value:T.name},{label:"library:pankosmia-rcl:description",value:T.description}],G=v.useMemo(()=>{var K;return u?{...u,nBooks:((K=u.book_codes)==null?void 0:K.length)??0}:null},[u]),M=K=>{if(P({abbreviation:K.abbreviation??"",name:K.name??"",description:K.description??""}),O({language_code:K.language_code??"",language_name:K.language_name??"",script_direction:K.script_direction??""}),j(!!K.language_code),K.copyright!==void 0){const oe=Lh(K.copyright);z(oe.copyright),d(oe.optionCopyright)}};v.useEffect(()=>{p(e)},[e]),v.useEffect(()=>{u&&M(u)},[u]),v.useEffect(()=>{b("details"),x(n)},[f]);const Q=(K,oe)=>{E&&!ie[g]||b(oe)},N=()=>{M(u),x(!1)},I=()=>({abbreviation:T.abbreviation.trim(),name:T.name.trim(),description:T.description,language_code:_.language_code,language_name:_.language_name,script_direction:_.script_direction,copyright:B?Pn(S,B)??"":""}),W=async()=>{if(k){C(!0);try{const K=I(),oe=await xc(`/api/burrito/metadata/edit/${f}`,JSON.stringify(K),a.current);if(oe.ok){const X={...u,...K};p(X),x(!1),r==null||r(X)}else console.error(c("library:pankosmia-rcl:error_data"),oe)}catch(K){console.error(K)}finally{C(!1)}}};if(!G)return i.jsx(l.CircularProgress,{});const J=o?o({isEditMode:E,canSave:k,isSaving:h,save:W,cancel:N}):null;return i.jsxs(l.Box,{children:[!t&&i.jsx(l.Box,{sx:{display:"flex",gap:1,flexWrap:"wrap",mb:2},children:E?i.jsxs(i.Fragment,{children:[i.jsx(l.Button,{size:"small",variant:"outlined",disabled:!0,children:c("library:pankosmia-rcl:editing")}),i.jsx(l.Button,{size:"small",variant:"outlined",onClick:N,disabled:h,children:c("library:pankosmia-rcl:cancel")}),i.jsx(l.Button,{size:"small",variant:"outlined",onClick:W,disabled:!k,children:c("library:pankosmia-rcl:save")})]}):i.jsx(l.Button,{size:"small",variant:"outlined",onClick:()=>x(!0),children:c("library:pankosmia-rcl:edit_data")})}),i.jsxs(l.Tabs,{value:g,onChange:Q,sx:{mb:2,borderBottom:1,borderColor:"divider"},children:[i.jsx(l.Tab,{value:"details",label:c("library:pankosmia-rcl:details")}),i.jsx(l.Tab,{value:"language",label:c("library:pankosmia-rcl:language")}),i.jsx(l.Tab,{value:"copyright",label:c("library:pankosmia-rcl:copyright")})]}),g==="details"&&i.jsxs(l.Stack,{spacing:2,children:[i.jsxs(l.Stack,{direction:"row",spacing:1,children:[G.flavor&&i.jsx(In,{text:c(`flavors:names:${G.flavor_type}/${G.flavor}`)}),G.generated_date&&i.jsx(In,{text:`${c("library:pankosmia-rcl:dateUdapted")} ${G.generated_date}`})]}),w?i.jsx(l.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:q.map(({label:K,value:oe})=>i.jsxs(l.Box,{children:[i.jsx(l.Typography,{variant:"caption",sx:{display:"block",color:"text.secondary"},children:c(K)}),i.jsx(l.Typography,{variant:"body1",sx:{whiteSpace:"pre-wrap"},children:oe})]},K))}):i.jsxs(i.Fragment,{children:[i.jsx(l.TextField,{fullWidth:!0,required:!0,error:!!D,helperText:D?c(D):" ",label:c("library:pankosmia-rcl:abbreviation"),value:T.abbreviation,onChange:K=>P(oe=>({...oe,abbreviation:K.target.value}))}),i.jsx(l.TextField,{fullWidth:!0,required:!0,error:!!H,helperText:H?c(H):" ",label:c("library:pankosmia-rcl:repo_name"),value:T.name,onChange:K=>P(oe=>({...oe,name:K.target.value}))}),i.jsx(l.TextField,{fullWidth:!0,label:c("library:pankosmia-rcl:description"),value:T.description,onChange:K=>P(oe=>({...oe,description:K.target.value}))})]})]}),g==="language"&&i.jsx(pc,{currentLanguage:_,setCurrentLanguage:O,setIsValid:j,readOnly:w}),g==="copyright"&&i.jsx(dc,{optionCopyright:S,setOptionCopyright:d,copyright:B,setCopyright:z,readOnly:w,editMode:Fh}),J]})}const Vh={onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onMouseUp:e=>e.stopPropagation(),onTouchStart:e=>e.stopPropagation(),onTouchEnd:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),onKeyUp:e=>e.stopPropagation(),onFocus:e=>e.stopPropagation(),onBlur:e=>e.stopPropagation()};function zh({list:e,IconButtonSecondary:t=null,onItemClick:n,infoReadOnly:r=!0,onInfoSaved:o}){const{i18nRef:s}=v.useContext(ve),{panGapContentMedium:a,panGapContentSmall:c}=Mh(),u=l.useTheme(),p=l.useMediaQuery(u.breakpoints.down("sm")),[f,g]=v.useState(null),b=u.direction==="rtl",m=!!n,x=h=>U(h,s.current);return e?i.jsxs(i.Fragment,{children:[i.jsx(l.List,{sx:{width:"100%",minWidth:0},children:e.map(h=>{const C=h.abbreviation??"",E=h.language_code??"",w=m?l.ListItemButton:l.Box,T=m?{component:"div",onClick:()=>n(h)}:{};return i.jsx(l.ListItem,{disablePadding:!0,sx:{display:"block",width:"100%",minWidth:0},children:i.jsxs(w,{...T,sx:{display:"flex",alignItems:"flex-start",width:"100%",minWidth:0,gap:1,px:1,borderRadius:1},children:[i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"column",flex:"1 1 0%",minWidth:0},children:[i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:a,minWidth:0,overflow:"hidden"},children:[i.jsx(l.Typography,{sx:{flexShrink:0,fontWeight:"bold"},children:C.toUpperCase()}),i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:c,minWidth:0,overflow:"hidden"},children:[i.jsx(In,{text:p?E.toUpperCase():h.language_name?`${E.toUpperCase()} - ${h.language_name}`:E.toUpperCase(),truncate:!0}),i.jsx(In,{text:U(`flavors:names:${h.flavor_type}/${h.flavor}`,s.current),truncate:!0})]})]}),i.jsx(l.Typography,{sx:{width:"100%",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"text.secondary"},children:b?`${h.description?`${h.description} - `:""}${h.name}`:`${h.name}${h.description?` - ${h.description}`:""}`})]}),i.jsxs(l.Box,{...Vh,sx:{display:"flex",flexDirection:"row",alignItems:"center",flexShrink:0,flexGrow:0,cursor:"default"},children:[i.jsx(l.IconButton,{onClick:()=>g(h),children:i.jsx(kp,{})}),t]})]})},h.local_path??`${C}-${E}-${h.name}`)})}),i.jsx(ts,{titleLabel:`${x("pages:core-contenthandler-generic:about_document")} ${(f==null?void 0:f.name)??""}`,isOpen:!!f,closeFn:()=>g(null),actionsButtonArray:Br({onlyCloseButton:!0,closeLabel:x("pages:core-contenthandler-generic:close"),closeFn:()=>g(null)}),children:f&&i.jsx(cc,{repoSummary:f,readOnly:r,onSaved:h=>{g(h),o==null||o(h)}})})]}):i.jsx(l.CircularProgress,{})}function lc({optionCopyright:e,copyright:t}){const{i18nRef:n}=v.useContext(ve),r=s=>U(`library:pankosmia-rcl:${s}`,n.current),o=Pn(e,t,r);return i.jsxs(l.Box,{sx:{mb:2,px:2,py:1,borderRadius:"4px",backgroundColor:"grey.200"},children:[i.jsx(l.Typography,{variant:"caption",color:"text.secondary",display:"block",children:r("preview")}),i.jsx(l.Typography,{variant:"body1",sx:{fontStyle:o?"normal":"italic"},color:o?"text.primary":"text.disabled",children:o||r("preview_incomplete")})]})}const Wh={author_name:"",year:"",license:"",version:"",order:"year_first"};function Uh({isOpen:e,closeFn:t,onApply:n}){const{i18nRef:r}=v.useContext(ve),o=w=>U(`library:pankosmia-rcl:${w}`,r.current),[s,a]=v.useState(Wh),c=w=>a(T=>({...T,...w})),u=ss.find(w=>w.value===s.license),p=!!(u!=null&&u.versioned),[f,g]=v.useState(!1),b=f&&!s.author_name.trim(),m=f&&!ac.test(s.year.trim()),x=f&&p&&!s.version,h=()=>{if(g(!0),!Dh("builder",s))return;const w=Pn("builder",s,o).replace(/^©\s*/,"");n(w),t()},C=i.jsx(l.MenuItem,{value:"",children:i.jsx("em",{children:o("none")})}),E={select:{displayEmpty:!0},inputLabel:{shrink:!0}};return i.jsxs(ts,{titleLabel:o("copyright_builder"),isOpen:e,requiredFieldsLabel:!0,closeFn:t,actionsButtonArray:Br({actionLabel:o("OK"),actionFn:h,closeFn:t,closeOnAction:!1,closeLabel:o("cancel")}),children:[i.jsx(lc,{optionCopyright:"builder",copyright:s}),i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"column",gap:3},children:[i.jsx(l.TextField,{required:!0,error:b,fullWidth:!0,label:o("name"),value:s.author_name,onChange:w=>c({author_name:w.target.value})}),i.jsx(l.TextField,{required:!0,fullWidth:!0,error:m,label:o("year"),helperText:o("year_helper"),value:s.year,onChange:w=>c({year:w.target.value.replace(/[^\d-]/g,"").slice(0,9)})}),i.jsxs(l.Box,{sx:{display:"flex",gap:2},children:[i.jsxs(l.TextField,{select:!0,sx:{flex:1},label:o("licence"),value:s.license,onChange:w=>c({license:w.target.value,version:""}),slotProps:E,children:[C,ss.map(w=>i.jsx(l.MenuItem,{value:w.value,children:w.i18n?o(w.value):w.value},w.value))]}),i.jsx(l.TextField,{select:!0,sx:{flex:1},required:p,disabled:!p,error:x,label:o("version"),value:s.version,onChange:w=>c({version:w.target.value}),children:Ah.map(w=>i.jsx(l.MenuItem,{value:w,children:w},w))})]}),i.jsxs(l.FormControl,{children:[i.jsx(l.FormLabel,{id:"copyright-order-label",sx:{color:"text.primary"},children:o("order")}),i.jsxs(l.RadioGroup,{"aria-labelledby":"copyright-order-label",value:s.order,onChange:w=>c({order:w.target.value}),sx:{pl:1,mt:1},children:[i.jsx(l.FormControlLabel,{value:"year_first",control:i.jsx(l.Radio,{}),label:o("order_year_first")}),i.jsx(l.FormControlLabel,{value:"holder_first",control:i.jsx(l.Radio,{}),label:o("order_holder_first")})]})]})]})]})}function uc({optionCopyright:e,setOptionCopyright:t,setCopyright:n,copyright:r}){const{i18nRef:o}=v.useContext(ve),s=f=>U(`library:pankosmia-rcl:${f}`,o.current),[a,c]=v.useState(!1),u=f=>n({...r,...f}),p=e==="free";return i.jsxs(Za,{titleSection:s("copyright"),children:[i.jsx(lc,{optionCopyright:e,copyright:r}),i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:[i.jsx(l.FormControl,{children:i.jsxs(l.RadioGroup,{value:e,onChange:f=>t(f.target.value),row:!0,name:"copyright-option",children:[i.jsx(l.FormControlLabel,{value:"unspecified",control:i.jsx(l.Radio,{}),label:s("unspecified")}),i.jsx(l.FormControlLabel,{value:"public-domain",control:i.jsx(l.Radio,{}),label:s("public_domain")}),i.jsx(l.FormControlLabel,{value:"free",control:i.jsx(l.Radio,{}),label:s("licenced")})]})}),i.jsx(l.TextField,{id:"copyright_free_text",fullWidth:!0,required:p,disabled:!p,label:s("copyright"),value:r.free_text,onChange:f=>u({free_text:f.target.value}),slotProps:{input:{startAdornment:i.jsx(l.InputAdornment,{position:"start",children:"©"})}}}),i.jsx(l.Box,{children:i.jsx(l.Button,{variant:"outlined",disabled:!p,onClick:()=>c(!0),children:s("copyright_builder")})})]}),a&&i.jsx(Uh,{isOpen:a,closeFn:()=>c(!1),onApply:f=>u({free_text:f})})]})}function dc({readOnly:e=!0,optionCopyright:t,setOptionCopyright:n,setCopyright:r,copyright:o}){const{i18nRef:s}=v.useContext(ve),a=[{label:"library:pankosmia-rcl:copyright",value:o?Pn(t,o)??"":""}];return e?i.jsx(l.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:a.map(({label:c,value:u})=>i.jsxs(l.Box,{children:[i.jsx(l.Typography,{variant:"caption",sx:{display:"block",color:"text.secondary"},children:U(c,s.current)}),i.jsx(l.Typography,{variant:"body1",sx:{whiteSpace:"pre-wrap"},children:u})]},c))}):i.jsx(uc,{optionCopyright:t,setOptionCopyright:n,setCopyright:r,copyright:o})}function fc({currentLanguage:e,setCurrentLanguage:t,setIsValid:n,open:r=!0}){const[o,s]=v.useState("BCP47List"),[a,c]=v.useState(!1),{i18nRef:u}=v.useContext(ve),[p,f]=v.useState(!0),[g,b]=v.useState(!1),[m,x]=v.useState(""),[h,C]=v.useState([]),[E,w]=v.useState(!1),[T,P]=v.useState({}),[_,O]=v.useState(!0),$=/^x-[a-z]{3}$/,j=S=>S.replace(/^x-/,"X ");v.useEffect(()=>{r&&Nn({url:"/api/git/list-local-repos",setter:C}).then()},[r]),v.useEffect(()=>{r&&Nn({url:"/api/app-resources/lookups/bcp47-language_codes.json",setter:P}).then()},[r]);const B=Object.entries(T).map(([S,d])=>({language_code:S,language_name:d.en}));v.useEffect(()=>{e.language_code&&n(!a)},[a]),v.useEffect(()=>{_&&Object.keys(T).length>0&&(e.language_code&&(T[e.language_code]?t({...e,language_code:e.language_code,language_name:T[e.language_code].en}):(t({...e,language_code:`${e.language_code}`,language_name:`${e.language_name}`}),s("customLanguage"))),O(!1))},[T,_,B]),v.useEffect(()=>{m&&ke(`/api/burrito/metadata/summary/${m}`).then(S=>S.json).then(S=>t({...e,language_code:S.language_code,language_name:S.language_name,script_direction:["ltr","rtl"].includes(S.script_direction)?S.script_direction:e==null?void 0:e.script_direction})).catch(S=>console.error("Error :",S))},[r,m]);const z=h.filter(S=>p&&S.startsWith("_local_")||g&&S.startsWith("git"));return i.jsxs(l.Box,{sx:{width:"100%"},children:[i.jsxs(l.FormControl,{children:[i.jsx(l.FormLabel,{sx:{color:"text.secondary","&.Mui-focused":{color:"text.secondary"}},id:"demo-radio-buttons-group-label",children:U("library:pankosmia-rcl:choose_language",u.current)}),i.jsxs(l.RadioGroup,{row:!0,value:o,onChange:S=>{s(S.target.value),w(!1),t({language_code:"",language_name:"",script_direction:e==null?void 0:e.script_direction})},"aria-labelledby":"demo-radio-buttons-group-label",name:"radio-buttons-group",children:[i.jsx(l.FormControlLabel,{value:"BCP47List",control:i.jsx(l.Radio,{}),label:U("library:pankosmia-rcl:lang_code_bcp47_list",u.current)}),i.jsx(l.FormControlLabel,{value:"burrito",control:i.jsx(l.Radio,{}),label:U("library:pankosmia-rcl:lang_code_burrito",u.current)}),i.jsx(l.FormControlLabel,{value:"customLanguage",control:i.jsx(l.Radio,{}),label:U("library:pankosmia-rcl:lang_code_custom_language",u.current)})]})]}),o==="BCP47List"&&i.jsxs(l.Grid,{container:!0,spacing:2,children:[i.jsx(l.Grid,{size:12,children:i.jsx(l.Typography,{children:U("library:pankosmia-rcl:description_bcp47_list",u.current)})}),i.jsx(l.Grid,{size:6,children:T&&i.jsx(Yo,{value:e.language_code??null,setValue:S=>{var d;return t({...e,language_code:S,language_name:((d=T[S])==null?void 0:d.en)??""})},data:Object.keys(T),getOptionLabel:S=>{const{en:d,...A}=T[S]??{},R=Object.values(A);return R.length>0?`${S} - ${R} - ${d}`:d?`${S} - ${d}`:""},filterOptions:(S,{inputValue:d})=>{const A=d.toLowerCase();return S.filter(R=>{var H,Z;const D=T[R];return((H=D==null?void 0:D.en)==null?void 0:H.toLowerCase().includes(A))||((Z=D==null?void 0:D[R])==null?void 0:Z.toLowerCase().includes(A))}).sort((R,D)=>{var H,Z,re,ie;return((Z=(H=T[R])==null?void 0:H.en)==null?void 0:Z.toLowerCase().indexOf(A))-((ie=(re=T[D])==null?void 0:re.en)==null?void 0:ie.toLowerCase().indexOf(A))})},titleLabel:`${U("library:pankosmia-rcl:language",u.current)} *`})}),i.jsx(l.Grid,{size:6,children:i.jsx(l.TextField,{disabled:!0,id:"language_code",sx:{width:"100%"},label:U("library:pankosmia-rcl:lang_code",u.current),value:e?e.language_code:null})})]}),o==="burrito"&&i.jsxs(l.Grid,{container:!0,spacing:1,sx:{justifyItems:"flex-end",alignItems:"stretch"},children:[i.jsx(l.Typography,{children:U("library:pankosmia-rcl:description_lang_code_burrito",u.current)}),i.jsxs(l.Grid,{size:12,children:[i.jsx(l.FormLabel,{children:U("library:pankosmia-rcl:title_section_burrito",u.current)}),i.jsxs(l.FormGroup,{row:!0,required:!0,children:[i.jsx(l.FormControlLabel,{control:i.jsx(l.Checkbox,{color:"secondary",checked:p,onChange:()=>f(!p),defaultChecked:!0}),label:U("library:pankosmia-rcl:local_project",u.current)}),i.jsx(l.FormControlLabel,{control:i.jsx(l.Checkbox,{color:"secondary",checked:g,onChange:()=>b(!g)}),label:U("library:pankosmia-rcl:burrito_resources",u.current)})]})]}),i.jsx(l.Grid,{size:12,children:i.jsx(Yo,{data:z,setValue:x,getOptionLabel:S=>`${S}`,titleLabel:`${U("library:pankosmia-rcl:document",u.current)} *`})}),i.jsx(l.Grid,{size:6,children:i.jsx(l.TextField,{disabled:!0,id:"language_name",sx:{width:"100%"},label:U("library:pankosmia-rcl:lang_name",u.current),value:e?e.language_name:null})}),i.jsx(l.Grid,{size:6,children:i.jsx(l.TextField,{disabled:!0,id:"language_code",sx:{width:"100%"},label:U("library:pankosmia-rcl:lang_code",u.current),value:e?e.language_code:null})})]}),o==="customLanguage"&&i.jsxs(l.Grid,{container:!0,spacing:1,sx:{justifyItems:"flex-end",alignItems:"stretch"},children:[i.jsx(l.Grid,{size:12,children:i.jsx(l.Typography,{children:U("library:pankosmia-rcl:description_custom_language",u.current)})}),i.jsx(l.Grid,{size:6,children:i.jsx(l.TextField,{id:"language_name",required:!0,sx:{width:"100%"},label:U("library:pankosmia-rcl:lang_name",u.current),value:(e==null?void 0:e.language_name)??"",onChange:S=>{const d=S.target.value;w(d!==""),t({...e,language_name:d})},onBlur:()=>{e!=null&&e.language_name||(w(!1),t({...e,language_name:j((e==null?void 0:e.language_code)??"")}))}})}),i.jsx(l.Grid,{size:6,children:i.jsx(l.TextField,{id:"language_code",placeholder:"x-abc",error:a,helperText:U("library:pankosmia-rcl:helper_language_code",u.current),required:!0,sx:{width:"100%"},label:U("library:pankosmia-rcl:lang_code",u.current),value:e?e.language_code:null,onChange:S=>{const d=S.target.value.toLocaleLowerCase();t({...e,language_code:d,...E?{}:{language_name:j(d)}}),c(d.length>0&&!$.test(d))}})})]}),i.jsxs(l.FormControl,{sx:{mb:2},children:[i.jsx(l.FormLabel,{sx:{color:"text.secondary","&.Mui-focused":{color:"text.secondary"}},id:"script-direction-label",children:U("library:pankosmia-rcl:script_direction",u.current)}),i.jsx(l.RadioGroup,{row:!0,"aria-labelledby":"script-direction-label",name:"script-direction-group",value:(e==null?void 0:e.script_direction)==="rtl"?"rtl":"ltr",onChange:S=>t({...e,script_direction:S.target.value}),children:i.jsxs(l.Box,{sx:{display:"flex",flexDirection:"column"},children:[i.jsx(l.FormControlLabel,{value:"ltr",control:i.jsx(l.Radio,{}),label:U("library:pankosmia-rcl:ltr",u.current)}),i.jsx(l.FormControlLabel,{value:"rtl",control:i.jsx(l.Radio,{}),label:U("library:pankosmia-rcl:rtl",u.current)})]})})]})]})}function pc({readOnly:e=!0,currentLanguage:t,setCurrentLanguage:n,setIsValid:r}){const{i18nRef:o}=v.useContext(ve),s=[{label:"library:pankosmia-rcl:language",value:t.language_name},{label:"library:pankosmia-rcl:lang_code",value:t.language_code},{label:"library:pankosmia-rcl:script_direction",value:U(t.script_direction==="rtl"?"library:pankosmia-rcl:rtl":"library:pankosmia-rcl:ltr",o.current)}];return e?i.jsx(l.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:s.map(({label:a,value:c})=>i.jsxs(l.Box,{children:[i.jsx(l.Typography,{variant:"caption",sx:{display:"block",color:"text.secondary"},children:U(a,o.current)}),i.jsx(l.Typography,{variant:"body1",children:c})]},a))}):i.jsx(fc,{setIsValid:r,currentLanguage:t,setCurrentLanguage:n})}ee.AdvancedAppBar=Rh,ee.AdvancedAppBarMenuBeta=ic,ee.AdvancedAppBarMenuDebug=sc,ee.AppWrapper=Ga,ee.AppbarHamburger=np,ee.AssetDownloadButton=ec,ee.AssetDownloadDialog=Sh,ee.BasiqueAppBar=$h,ee.ButtonInfo=Vo,ee.ExternalLink=xh,ee.Header=Ta,ee.InternetSwitch=zo,ee.InternetWarningDialog=Wr,ee.PanAdvancedDialog=ts,ee.PanBasicDialog=tc,ee.PanBookPicker=mh,ee.PanCopyright=uc,ee.PanCopyrightWrapper=dc,ee.PanDialog=rp,ee.PanDialogActions=fp,ee.PanDialogActionsArray=Br,ee.PanDownload=Op,ee.PanFilteredMenu=Yo,ee.PanLanguagePicker=fc,ee.PanLanguagePickerWrapper=pc,ee.PanListTable=zh,ee.PanMenuWrapper=ns,ee.PanPillTypography=In,ee.PanRepoInfo=cc,ee.PanStepperPicker=gh,ee.PanTable=Ca,ee.PanVersificationPicker=hh,ee.ScrollableBody=bh,ee.SectionDialogTitle=Za,ee.SpSpa=fh,ee.SpSpaPage=Ja,ee.Spa=Xa,ee.SpaContainer=Qa,ee.WrapperAppBar=rs,ee.authContext=ja,ee.bcvContext=Ia,ee.betaContext=jr,ee.clientConfigContext=Tr,ee.clientInterfacesContext=Oa,ee.currentProjectContext=$a,ee.debugContext=xt,ee.fallbackTheme=yh,ee.i18nContext=ve,ee.languagesContext=ph,ee.messagesContext=Pa,ee.netContext=ut,ee.productContext=Er,ee.snippetContext=Ra,ee.typographyContext=_a,ee.wordContext=Ma,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})}));
|
|
274
274
|
//# sourceMappingURL=pankosmia-rcl.umd.js.map
|