fansunited-management-components 1.55.0-RC3 → 1.55.0-RC5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.es.js +662 -646
- package/index.umd.js +32 -32
- package/package.json +1 -1
- package/src/components/WidgetEmbedCode/WidgetEmbedCode.d.ts +2 -2
- package/src/components/WidgetEmbedCode/WidgetEmbedCode.d.ts.map +1 -1
- package/src/constants/components.d.ts +2 -2
- package/src/context/ComponentContext.d.ts +2 -2
package/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(x,Me){typeof exports=="object"&&typeof module!="undefined"?module.exports=Me(require("react"),require("fansunited-sdk-esm"),require("react-dom"),require("@emotion/styled"),require("@emotion/react"),require("react-quill"),require("@mui/joy"),require("@mui/icons-material")):typeof define=="function"&&define.amd?define(["react","fansunited-sdk-esm","react-dom","@emotion/styled","@emotion/react","react-quill","@mui/joy","@mui/icons-material"],Me):(x=typeof globalThis!="undefined"?globalThis:x||self,x.FansUnitedComponents=Me(x.React,x.FansUnitedSDK,x.ReactDOM,x.EmotionStyled,x.EmotionReact,x.ReactQuill,x.MaterialUIJoy,x.MaterialUIIcons))})(this,function(x,Me,Re,Mt,ge,xi,v,De){"use strict";var RF=Object.defineProperty,LF=Object.defineProperties;var MF=Object.getOwnPropertyDescriptors;var Bs=Object.getOwnPropertySymbols,BF=Object.getPrototypeOf,mb=Object.prototype.hasOwnProperty,vb=Object.prototype.propertyIsEnumerable,$F=Reflect.get;var yi=Math.pow,Bu=(x,Me,Re)=>Me in x?RF(x,Me,{enumerable:!0,configurable:!0,writable:!0,value:Re}):x[Me]=Re,z=(x,Me)=>{for(var Re in Me||(Me={}))mb.call(Me,Re)&&Bu(x,Re,Me[Re]);if(Bs)for(var Re of Bs(Me))vb.call(Me,Re)&&Bu(x,Re,Me[Re]);return x},q=(x,Me)=>LF(x,MF(Me));var $s=x=>typeof x=="symbol"?x:x+"",Ge=(x,Me)=>{var Re={};for(var Mt in x)mb.call(x,Mt)&&Me.indexOf(Mt)<0&&(Re[Mt]=x[Mt]);if(x!=null&&Bs)for(var Mt of Bs(x))Me.indexOf(Mt)<0&&vb.call(x,Mt)&&(Re[Mt]=x[Mt]);return Re};var ne=(x,Me,Re)=>Bu(x,typeof Me!="symbol"?Me+"":Me,Re);var Er=(x,Me,Re)=>$F(BF(x),Re,Me);var _=(x,Me,Re)=>new Promise((Mt,ge)=>{var xi=An=>{try{De(Re.next(An))}catch(G){ge(G)}},v=An=>{try{De(Re.throw(An))}catch(G){ge(G)}},De=An=>An.done?Mt(An.value):Promise.resolve(An.value).then(xi,v);De((Re=Re.apply(x,Me)).next())});function An(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 G=An(x);var Bt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function
|
|
1
|
+
(function(x,Me){typeof exports=="object"&&typeof module!="undefined"?module.exports=Me(require("react"),require("fansunited-sdk-esm"),require("react-dom"),require("@emotion/styled"),require("@emotion/react"),require("react-quill"),require("@mui/joy"),require("@mui/icons-material")):typeof define=="function"&&define.amd?define(["react","fansunited-sdk-esm","react-dom","@emotion/styled","@emotion/react","react-quill","@mui/joy","@mui/icons-material"],Me):(x=typeof globalThis!="undefined"?globalThis:x||self,x.FansUnitedComponents=Me(x.React,x.FansUnitedSDK,x.ReactDOM,x.EmotionStyled,x.EmotionReact,x.ReactQuill,x.MaterialUIJoy,x.MaterialUIIcons))})(this,function(x,Me,Re,Mt,ge,xi,v,De){"use strict";var RF=Object.defineProperty,LF=Object.defineProperties;var MF=Object.getOwnPropertyDescriptors;var Bs=Object.getOwnPropertySymbols,BF=Object.getPrototypeOf,mb=Object.prototype.hasOwnProperty,vb=Object.prototype.propertyIsEnumerable,$F=Reflect.get;var yi=Math.pow,Bu=(x,Me,Re)=>Me in x?RF(x,Me,{enumerable:!0,configurable:!0,writable:!0,value:Re}):x[Me]=Re,z=(x,Me)=>{for(var Re in Me||(Me={}))mb.call(Me,Re)&&Bu(x,Re,Me[Re]);if(Bs)for(var Re of Bs(Me))vb.call(Me,Re)&&Bu(x,Re,Me[Re]);return x},q=(x,Me)=>LF(x,MF(Me));var $s=x=>typeof x=="symbol"?x:x+"",Ge=(x,Me)=>{var Re={};for(var Mt in x)mb.call(x,Mt)&&Me.indexOf(Mt)<0&&(Re[Mt]=x[Mt]);if(x!=null&&Bs)for(var Mt of Bs(x))Me.indexOf(Mt)<0&&vb.call(x,Mt)&&(Re[Mt]=x[Mt]);return Re};var ne=(x,Me,Re)=>Bu(x,typeof Me!="symbol"?Me+"":Me,Re);var Er=(x,Me,Re)=>$F(BF(x),Re,Me);var _=(x,Me,Re)=>new Promise((Mt,ge)=>{var xi=An=>{try{De(Re.next(An))}catch(G){ge(G)}},v=An=>{try{De(Re.throw(An))}catch(G){ge(G)}},De=An=>An.done?Mt(An.value):Promise.resolve(An.value).then(xi,v);De((Re=Re.apply(x,Me)).next())});function An(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 G=An(x);var Bt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $u(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Nu={exports:{}},Eo={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -552,7 +552,7 @@
|
|
|
552
552
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
553
553
|
* See the License for the specific language governing permissions and
|
|
554
554
|
* limitations under the License.
|
|
555
|
-
*/function vt(e,...t){throw nl(e,...t)}function gt(e,...t){return nl(e,...t)}function tl(e,t,n){const r=Object.assign(Object.assign({},uy()),{[t]:n});return new cr("auth","Firebase",r).create(t,{appName:e.name})}function bt(e){return tl(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Rr(e,t,n){const r=n;if(!(t instanceof r))throw r.name!==t.constructor.name&&vt(e,"argument-error"),tl(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function nl(e,...t){if(typeof e!="string"){const n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return wd.create(e,...t)}function oe(e,t,...n){if(!e)throw nl(t,...n)}function
|
|
555
|
+
*/function vt(e,...t){throw nl(e,...t)}function gt(e,...t){return nl(e,...t)}function tl(e,t,n){const r=Object.assign(Object.assign({},uy()),{[t]:n});return new cr("auth","Firebase",r).create(t,{appName:e.name})}function bt(e){return tl(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Rr(e,t,n){const r=n;if(!(t instanceof r))throw r.name!==t.constructor.name&&vt(e,"argument-error"),tl(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function nl(e,...t){if(typeof e!="string"){const n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return wd.create(e,...t)}function oe(e,t,...n){if(!e)throw nl(t,...n)}function pn(e){const t="INTERNAL ASSERTION FAILED: "+e;throw Mo(t),new Error(t)}function sn(e,t){e||pn(t)}/**
|
|
556
556
|
* @license
|
|
557
557
|
* Copyright 2020 Google LLC
|
|
558
558
|
*
|
|
@@ -597,7 +597,7 @@
|
|
|
597
597
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
598
598
|
* See the License for the specific language governing permissions and
|
|
599
599
|
* limitations under the License.
|
|
600
|
-
*/class Ti{constructor(t,n){this.shortDelay=t,this.longDelay=n,
|
|
600
|
+
*/class Ti{constructor(t,n){this.shortDelay=t,this.longDelay=n,sn(n>t,"Short delay should be less than long delay!"),this.isMobile=Rb()||Fs()}get(){return fy()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
|
|
601
601
|
* @license
|
|
602
602
|
* Copyright 2020 Google LLC
|
|
603
603
|
*
|
|
@@ -612,7 +612,7 @@
|
|
|
612
612
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
613
613
|
* See the License for the specific language governing permissions and
|
|
614
614
|
* limitations under the License.
|
|
615
|
-
*/function il(e,t){
|
|
615
|
+
*/function il(e,t){sn(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}/**
|
|
616
616
|
* @license
|
|
617
617
|
* Copyright 2020 Google LLC
|
|
618
618
|
*
|
|
@@ -627,7 +627,7 @@
|
|
|
627
627
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
628
628
|
* See the License for the specific language governing permissions and
|
|
629
629
|
* limitations under the License.
|
|
630
|
-
*/class Sd{static initialize(t,n,r){this.fetchImpl=t,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self!="undefined"&&"fetch"in self)return self.fetch;if(typeof globalThis!="undefined"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch!="undefined")return fetch;
|
|
630
|
+
*/class Sd{static initialize(t,n,r){this.fetchImpl=t,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self!="undefined"&&"fetch"in self)return self.fetch;if(typeof globalThis!="undefined"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch!="undefined")return fetch;pn("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self!="undefined"&&"Headers"in self)return self.Headers;if(typeof globalThis!="undefined"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers!="undefined")return Headers;pn("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self!="undefined"&&"Response"in self)return self.Response;if(typeof globalThis!="undefined"&&globalThis.Response)return globalThis.Response;if(typeof Response!="undefined")return Response;pn("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
|
|
631
631
|
* @license
|
|
632
632
|
* Copyright 2020 Google LLC
|
|
633
633
|
*
|
|
@@ -807,7 +807,7 @@
|
|
|
807
807
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
808
808
|
* See the License for the specific language governing permissions and
|
|
809
809
|
* limitations under the License.
|
|
810
|
-
*/class Lr{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){oe(t.idToken,"internal-error"),oe(typeof t.idToken!="undefined","internal-error"),oe(typeof t.refreshToken!="undefined","internal-error");const n="expiresIn"in t&&typeof t.expiresIn!="undefined"?Number(t.expiresIn):Pd(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,n)}updateFromIdToken(t){oe(t.length!==0,"internal-error");const n=Pd(t);this.updateTokensAndExpiration(t,null,n)}getToken(t,n=!1){return _(this,null,function*(){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(oe(this.refreshToken,t,"user-token-expired"),this.refreshToken?(yield this.refresh(t,this.refreshToken),this.accessToken):null)})}clearRefreshToken(){this.refreshToken=null}refresh(t,n){return _(this,null,function*(){const{accessToken:r,refreshToken:i,expiresIn:o}=yield ky(t,n);this.updateTokensAndExpiration(r,i,Number(o))})}updateTokensAndExpiration(t,n,r){this.refreshToken=n||null,this.accessToken=t||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(t,n){const{refreshToken:r,accessToken:i,expirationTime:o}=n,a=new Lr;return r&&(oe(typeof r=="string","internal-error",{appName:t}),a.refreshToken=r),i&&(oe(typeof i=="string","internal-error",{appName:t}),a.accessToken=i),o&&(oe(typeof o=="number","internal-error",{appName:t}),a.expirationTime=o),a}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new Lr,this.toJSON())}_performRefresh(){return
|
|
810
|
+
*/class Lr{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){oe(t.idToken,"internal-error"),oe(typeof t.idToken!="undefined","internal-error"),oe(typeof t.refreshToken!="undefined","internal-error");const n="expiresIn"in t&&typeof t.expiresIn!="undefined"?Number(t.expiresIn):Pd(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,n)}updateFromIdToken(t){oe(t.length!==0,"internal-error");const n=Pd(t);this.updateTokensAndExpiration(t,null,n)}getToken(t,n=!1){return _(this,null,function*(){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(oe(this.refreshToken,t,"user-token-expired"),this.refreshToken?(yield this.refresh(t,this.refreshToken),this.accessToken):null)})}clearRefreshToken(){this.refreshToken=null}refresh(t,n){return _(this,null,function*(){const{accessToken:r,refreshToken:i,expiresIn:o}=yield ky(t,n);this.updateTokensAndExpiration(r,i,Number(o))})}updateTokensAndExpiration(t,n,r){this.refreshToken=n||null,this.accessToken=t||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(t,n){const{refreshToken:r,accessToken:i,expirationTime:o}=n,a=new Lr;return r&&(oe(typeof r=="string","internal-error",{appName:t}),a.refreshToken=r),i&&(oe(typeof i=="string","internal-error",{appName:t}),a.accessToken=i),o&&(oe(typeof o=="number","internal-error",{appName:t}),a.expirationTime=o),a}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new Lr,this.toJSON())}_performRefresh(){return pn("not implemented")}}/**
|
|
811
811
|
* @license
|
|
812
812
|
* Copyright 2020 Google LLC
|
|
813
813
|
*
|
|
@@ -837,7 +837,7 @@
|
|
|
837
837
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
838
838
|
* See the License for the specific language governing permissions and
|
|
839
839
|
* limitations under the License.
|
|
840
|
-
*/const Od=new Map;function Ut(e){
|
|
840
|
+
*/const Od=new Map;function Ut(e){sn(e instanceof Function,"Expected a class definition");let t=Od.get(e);return t?(sn(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,Od.set(e,t),t)}/**
|
|
841
841
|
* @license
|
|
842
842
|
* Copyright 2019 Google LLC
|
|
843
843
|
*
|
|
@@ -1002,7 +1002,7 @@
|
|
|
1002
1002
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1003
1003
|
* See the License for the specific language governing permissions and
|
|
1004
1004
|
* limitations under the License.
|
|
1005
|
-
*/class $r{constructor(t,n){this.providerId=t,this.signInMethod=n}toJSON(){return
|
|
1005
|
+
*/class $r{constructor(t,n){this.providerId=t,this.signInMethod=n}toJSON(){return pn("not implemented")}_getIdTokenResponse(t){return pn("not implemented")}_linkToIdToken(t,n){return pn("not implemented")}_getReauthenticationResolver(t){return pn("not implemented")}}/**
|
|
1006
1006
|
* @license
|
|
1007
1007
|
* Copyright 2020 Google LLC
|
|
1008
1008
|
*
|
|
@@ -1092,7 +1092,7 @@
|
|
|
1092
1092
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1093
1093
|
* See the License for the specific language governing permissions and
|
|
1094
1094
|
* limitations under the License.
|
|
1095
|
-
*/const ox="http://localhost";class
|
|
1095
|
+
*/const ox="http://localhost";class gn extends $r{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){const n=new gn(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(n.idToken=t.idToken),t.accessToken&&(n.accessToken=t.accessToken),t.nonce&&!t.pendingToken&&(n.nonce=t.nonce),t.pendingToken&&(n.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(n.accessToken=t.oauthToken,n.secret=t.oauthTokenSecret):vt("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(t){const n=typeof t=="string"?JSON.parse(t):t,{providerId:r,signInMethod:i}=n,o=el(n,["providerId","signInMethod"]);if(!r||!i)return null;const a=new gn(r,i);return a.idToken=o.idToken||void 0,a.accessToken=o.accessToken||void 0,a.secret=o.secret,a.nonce=o.nonce,a.pendingToken=o.pendingToken||null,a}_getIdTokenResponse(t){const n=this.buildRequest();return Dn(t,n)}_linkToIdToken(t,n){const r=this.buildRequest();return r.idToken=n,Dn(t,r)}_getReauthenticationResolver(t){const n=this.buildRequest();return n.autoCreate=!1,Dn(t,n)}buildRequest(){const t={requestUri:ox,returnSecureToken:!0};if(this.pendingToken)t.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),t.postBody=kr(n)}return t}}/**
|
|
1096
1096
|
* @license
|
|
1097
1097
|
* Copyright 2020 Google LLC
|
|
1098
1098
|
*
|
|
@@ -1182,7 +1182,7 @@
|
|
|
1182
1182
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1183
1183
|
* See the License for the specific language governing permissions and
|
|
1184
1184
|
* limitations under the License.
|
|
1185
|
-
*/class Nr extends On{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}}class Fr extends Nr{static credentialFromJSON(t){const n=typeof t=="string"?JSON.parse(t):t;return oe("providerId"in n&&"signInMethod"in n,"argument-error"),
|
|
1185
|
+
*/class Nr extends On{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}}class Fr extends Nr{static credentialFromJSON(t){const n=typeof t=="string"?JSON.parse(t):t;return oe("providerId"in n&&"signInMethod"in n,"argument-error"),gn._fromParams(n)}credential(t){return this._credential(Object.assign(Object.assign({},t),{nonce:t.rawNonce}))}_credential(t){return oe(t.idToken||t.accessToken,"argument-error"),gn._fromParams(Object.assign(Object.assign({},t),{providerId:this.providerId,signInMethod:this.providerId}))}static credentialFromResult(t){return Fr.oauthCredentialFromTaggedObject(t)}static credentialFromError(t){return Fr.oauthCredentialFromTaggedObject(t.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthIdToken:n,oauthAccessToken:r,oauthTokenSecret:i,pendingToken:o,nonce:a,providerId:s}=t;if(!r&&!i&&!n&&!o||!s)return null;try{return new Fr(s)._credential({idToken:n,accessToken:r,nonce:a,pendingToken:o})}catch(l){return null}}}/**
|
|
1186
1186
|
* @license
|
|
1187
1187
|
* Copyright 2020 Google LLC
|
|
1188
1188
|
*
|
|
@@ -1197,7 +1197,7 @@
|
|
|
1197
1197
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1198
1198
|
* See the License for the specific language governing permissions and
|
|
1199
1199
|
* limitations under the License.
|
|
1200
|
-
*/class
|
|
1200
|
+
*/class mn extends Nr{constructor(){super("facebook.com")}static credential(t){return gn._fromParams({providerId:mn.PROVIDER_ID,signInMethod:mn.FACEBOOK_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return mn.credentialFromTaggedObject(t)}static credentialFromError(t){return mn.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return mn.credential(t.oauthAccessToken)}catch(n){return null}}}mn.FACEBOOK_SIGN_IN_METHOD="facebook.com",mn.PROVIDER_ID="facebook.com";/**
|
|
1201
1201
|
* @license
|
|
1202
1202
|
* Copyright 2020 Google LLC
|
|
1203
1203
|
*
|
|
@@ -1212,7 +1212,7 @@
|
|
|
1212
1212
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1213
1213
|
* See the License for the specific language governing permissions and
|
|
1214
1214
|
* limitations under the License.
|
|
1215
|
-
*/class
|
|
1215
|
+
*/class vn extends Nr{constructor(){super("google.com"),this.addScope("profile")}static credential(t,n){return gn._fromParams({providerId:vn.PROVIDER_ID,signInMethod:vn.GOOGLE_SIGN_IN_METHOD,idToken:t,accessToken:n})}static credentialFromResult(t){return vn.credentialFromTaggedObject(t)}static credentialFromError(t){return vn.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthIdToken:n,oauthAccessToken:r}=t;if(!n&&!r)return null;try{return vn.credential(n,r)}catch(i){return null}}}vn.GOOGLE_SIGN_IN_METHOD="google.com",vn.PROVIDER_ID="google.com";/**
|
|
1216
1216
|
* @license
|
|
1217
1217
|
* Copyright 2020 Google LLC
|
|
1218
1218
|
*
|
|
@@ -1227,7 +1227,7 @@
|
|
|
1227
1227
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1228
1228
|
* See the License for the specific language governing permissions and
|
|
1229
1229
|
* limitations under the License.
|
|
1230
|
-
*/class
|
|
1230
|
+
*/class bn extends Nr{constructor(){super("github.com")}static credential(t){return gn._fromParams({providerId:bn.PROVIDER_ID,signInMethod:bn.GITHUB_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return bn.credentialFromTaggedObject(t)}static credentialFromError(t){return bn.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return bn.credential(t.oauthAccessToken)}catch(n){return null}}}bn.GITHUB_SIGN_IN_METHOD="github.com",bn.PROVIDER_ID="github.com";/**
|
|
1231
1231
|
* @license
|
|
1232
1232
|
* Copyright 2020 Google LLC
|
|
1233
1233
|
*
|
|
@@ -1272,7 +1272,7 @@
|
|
|
1272
1272
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1273
1273
|
* See the License for the specific language governing permissions and
|
|
1274
1274
|
* limitations under the License.
|
|
1275
|
-
*/class
|
|
1275
|
+
*/class yn extends Nr{constructor(){super("twitter.com")}static credential(t,n){return gn._fromParams({providerId:yn.PROVIDER_ID,signInMethod:yn.TWITTER_SIGN_IN_METHOD,oauthToken:t,oauthTokenSecret:n})}static credentialFromResult(t){return yn.credentialFromTaggedObject(t)}static credentialFromError(t){return yn.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=t;if(!n||!r)return null;try{return yn.credential(n,r)}catch(i){return null}}}yn.TWITTER_SIGN_IN_METHOD="twitter.com",yn.PROVIDER_ID="twitter.com";/**
|
|
1276
1276
|
* @license
|
|
1277
1277
|
* Copyright 2020 Google LLC
|
|
1278
1278
|
*
|
|
@@ -1887,7 +1887,7 @@
|
|
|
1887
1887
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1888
1888
|
* See the License for the specific language governing permissions and
|
|
1889
1889
|
* limitations under the License.
|
|
1890
|
-
*/class gf{constructor(t,n,r,i,o=!1){this.auth=t,this.resolver=r,this.user=i,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise((t,n)=>_(this,null,function*(){this.pendingPromise={resolve:t,reject:n};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}}))}onAuthEvent(t){return _(this,null,function*(){const{urlResponse:n,sessionId:r,postBody:i,tenantId:o,error:a,type:s}=t;if(a){this.reject(a);return}const l={auth:this.auth,requestUri:n,sessionId:r,tenantId:o||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(s)(l))}catch(u){this.reject(u)}})}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return TC;case"linkViaPopup":case"linkViaRedirect":return kC;case"reauthViaPopup":case"reauthViaRedirect":return EC;default:vt(this.auth,"internal-error")}}resolve(t){
|
|
1890
|
+
*/class gf{constructor(t,n,r,i,o=!1){this.auth=t,this.resolver=r,this.user=i,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise((t,n)=>_(this,null,function*(){this.pendingPromise={resolve:t,reject:n};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}}))}onAuthEvent(t){return _(this,null,function*(){const{urlResponse:n,sessionId:r,postBody:i,tenantId:o,error:a,type:s}=t;if(a){this.reject(a);return}const l={auth:this.auth,requestUri:n,sessionId:r,tenantId:o||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(s)(l))}catch(u){this.reject(u)}})}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return TC;case"linkViaPopup":case"linkViaRedirect":return kC;case"reauthViaPopup":case"reauthViaRedirect":return EC;default:vt(this.auth,"internal-error")}}resolve(t){sn(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){sn(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
|
|
1891
1891
|
* @license
|
|
1892
1892
|
* Copyright 2020 Google LLC
|
|
1893
1893
|
*
|
|
@@ -1902,7 +1902,7 @@
|
|
|
1902
1902
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1903
1903
|
* See the License for the specific language governing permissions and
|
|
1904
1904
|
* limitations under the License.
|
|
1905
|
-
*/const _C=new Ti(2e3,1e4);function PC(e,t,n){return _(this,null,function*(){if(Ye(e.app))return Promise.reject(gt(e,"operation-not-supported-in-this-environment"));const r=qe(e);Rr(e,t,On);const i=vr(r,n);return new Rn(r,"signInViaPopup",t,i).executeNotNull()})}function DC(e,t,n){return _(this,null,function*(){const r=_e(e);if(Ye(r.auth.app))return Promise.reject(gt(r.auth,"operation-not-supported-in-this-environment"));Rr(r.auth,t,On);const i=vr(r.auth,n);return new Rn(r.auth,"reauthViaPopup",t,i,r).executeNotNull()})}function OC(e,t,n){return _(this,null,function*(){const r=_e(e);Rr(r.auth,t,On);const i=vr(r.auth,n);return new Rn(r.auth,"linkViaPopup",t,i,r).executeNotNull()})}class Rn extends gf{constructor(t,n,r,i,o){super(t,n,i,o),this.provider=r,this.authWindow=null,this.pollId=null,Rn.currentPopupAction&&Rn.currentPopupAction.cancel(),Rn.currentPopupAction=this}executeNotNull(){return _(this,null,function*(){const t=yield this.execute();return oe(t,this.auth,"internal-error"),t})}onExecution(){return _(this,null,function*(){
|
|
1905
|
+
*/const _C=new Ti(2e3,1e4);function PC(e,t,n){return _(this,null,function*(){if(Ye(e.app))return Promise.reject(gt(e,"operation-not-supported-in-this-environment"));const r=qe(e);Rr(e,t,On);const i=vr(r,n);return new Rn(r,"signInViaPopup",t,i).executeNotNull()})}function DC(e,t,n){return _(this,null,function*(){const r=_e(e);if(Ye(r.auth.app))return Promise.reject(gt(r.auth,"operation-not-supported-in-this-environment"));Rr(r.auth,t,On);const i=vr(r.auth,n);return new Rn(r.auth,"reauthViaPopup",t,i,r).executeNotNull()})}function OC(e,t,n){return _(this,null,function*(){const r=_e(e);Rr(r.auth,t,On);const i=vr(r.auth,n);return new Rn(r.auth,"linkViaPopup",t,i,r).executeNotNull()})}class Rn extends gf{constructor(t,n,r,i,o){super(t,n,i,o),this.provider=r,this.authWindow=null,this.pollId=null,Rn.currentPopupAction&&Rn.currentPopupAction.cancel(),Rn.currentPopupAction=this}executeNotNull(){return _(this,null,function*(){const t=yield this.execute();return oe(t,this.auth,"internal-error"),t})}onExecution(){return _(this,null,function*(){sn(this.filter.length===1,"Popup operations only handle one event");const t=Bi();this.authWindow=yield this.resolver._openPopup(this.auth,this.provider,this.filter[0],t),this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(gt(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()})}get eventId(){var t;return((t=this.authWindow)===null||t===void 0?void 0:t.associatedEvent)||null}cancel(){this.reject(gt(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Rn.currentPopupAction=null}pollUserCancellation(){const t=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(gt(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,_C.get())};t()}}Rn.currentPopupAction=null;/**
|
|
1906
1906
|
* @license
|
|
1907
1907
|
* Copyright 2020 Google LLC
|
|
1908
1908
|
*
|
|
@@ -2052,7 +2052,7 @@
|
|
|
2052
2052
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2053
2053
|
* See the License for the specific language governing permissions and
|
|
2054
2054
|
* limitations under the License.
|
|
2055
|
-
*/const Sl="webStorageSupport";class mw{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Xn,this._completeRedirectFn=Jo,this._overrideRedirectResult=wl}_openPopup(t,n,r,i){return _(this,null,function*(){var o;
|
|
2055
|
+
*/const Sl="webStorageSupport";class mw{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Xn,this._completeRedirectFn=Jo,this._overrideRedirectResult=wl}_openPopup(t,n,r,i){return _(this,null,function*(){var o;sn((o=this.eventManagers[t._key()])===null||o===void 0?void 0:o.manager,"_initialize() not called before _openPopup()");const a=yield Il(t,n,r,Ai(),i);return uw(t,a,Bi())})}_openRedirect(t,n,r,i){return _(this,null,function*(){yield this._originValidation(t);const o=yield Il(t,n,r,Ai(),i);return Zx(o),new Promise(()=>{})})}_initialize(t){const n=t._key();if(this.eventManagers[n]){const{manager:i,promise:o}=this.eventManagers[n];return i?Promise.resolve(i):(sn(o,"If manager is not set, promise should be"),o)}const r=this.initAndGetManager(t);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}initAndGetManager(t){return _(this,null,function*(){const n=yield iw(t),r=new yf(t);return n.register("authEvent",i=>(oe(i==null?void 0:i.authEvent,t,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:r},this.iframes[t._key()]=n,r})}_isIframeWebStorageSupported(t,n){this.iframes[t._key()].send(Sl,{type:Sl},i=>{var o;const a=(o=i==null?void 0:i[0])===null||o===void 0?void 0:o[Sl];a!==void 0&&n(!!a),vt(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){const n=t._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=YC(t)),this.originValidationPromises[n]}get _shouldInitProactively(){return jd()||Bd()||Di()}}const Af=mw;class vw{constructor(t){this.factorId=t}_process(t,n,r){switch(n.type){case"enroll":return this._finalizeEnroll(t,n.credential,r);case"signin":return this._finalizeSignIn(t,n.credential);default:return pn("unexpected MultiFactorSessionType")}}}class Al extends vw{constructor(t){super("phone"),this.credential=t}static _fromCredential(t){return new Al(t)}_finalizeEnroll(t,n,r){return Gx(t,{idToken:n,displayName:r,phoneVerificationInfo:this.credential._makeVerificationRequest()})}_finalizeSignIn(t,n){return cC(t,{mfaPendingCredential:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}class Tf{constructor(){}static assertion(t){return Al._fromCredential(t)}}Tf.FACTOR_ID="phone";var Ef="@firebase/auth",kf="1.7.7";/**
|
|
2056
2056
|
* @license
|
|
2057
2057
|
* Copyright 2020 Google LLC
|
|
2058
2058
|
*
|
|
@@ -2127,7 +2127,7 @@
|
|
|
2127
2127
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2128
2128
|
* See the License for the specific language governing permissions and
|
|
2129
2129
|
* limitations under the License.
|
|
2130
|
-
*/const Tw=2e3;function Ew(e,t,n){return _(this,null,function*(){var r;const{BuildInfo:i}=br();
|
|
2130
|
+
*/const Tw=2e3;function Ew(e,t,n){return _(this,null,function*(){var r;const{BuildInfo:i}=br();sn(t.sessionId,"AuthEvent did not contain a session ID");const o=yield Ow(t.sessionId),a={};return Di()?a.ibi=i.packageName:Pi()?a.apn=i.packageName:vt(e,"operation-not-supported-in-this-environment"),i.displayName&&(a.appDisplayName=i.displayName),a.sessionId=o,Il(e,n,t.type,void 0,(r=t.eventId)!==null&&r!==void 0?r:void 0,a)})}function kw(e){return _(this,null,function*(){const{BuildInfo:t}=br(),n={};Di()?n.iosBundleId=t.packageName:Pi()?n.androidPackageName=t.packageName:vt(e,"operation-not-supported-in-this-environment"),yield wf(e,n)})}function _w(e){const{cordova:t}=br();return new Promise(n=>{t.plugins.browsertab.isAvailable(r=>{let i=null;r?t.plugins.browsertab.openUrl(e):i=t.InAppBrowser.open(e,Py()?"_blank":"_system","location=yes"),n(i)})})}function Pw(e,t,n){return _(this,null,function*(){const{cordova:r}=br();let i=()=>{};try{yield new Promise((o,a)=>{let s=null;function l(){var f;o();const h=(f=r.plugins.browsertab)===null||f===void 0?void 0:f.close;typeof h=="function"&&h(),typeof(n==null?void 0:n.close)=="function"&&n.close()}function u(){s||(s=window.setTimeout(()=>{a(gt(e,"redirect-cancelled-by-user"))},Tw))}function d(){(document==null?void 0:document.visibilityState)==="visible"&&u()}t.addPassiveListener(l),document.addEventListener("resume",u,!1),Pi()&&document.addEventListener("visibilitychange",d,!1),i=()=>{t.removePassiveListener(l),document.removeEventListener("resume",u,!1),document.removeEventListener("visibilitychange",d,!1),s&&window.clearTimeout(s)}})}finally{i()}})}function Dw(e){var t,n,r,i,o,a,s,l,u,d;const f=br();oe(typeof((t=f==null?void 0:f.universalLinks)===null||t===void 0?void 0:t.subscribe)=="function",e,"invalid-cordova-configuration",{missingPlugin:"cordova-universal-links-plugin-fix"}),oe(typeof((n=f==null?void 0:f.BuildInfo)===null||n===void 0?void 0:n.packageName)!="undefined",e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-buildInfo"}),oe(typeof((o=(i=(r=f==null?void 0:f.cordova)===null||r===void 0?void 0:r.plugins)===null||i===void 0?void 0:i.browsertab)===null||o===void 0?void 0:o.openUrl)=="function",e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),oe(typeof((l=(s=(a=f==null?void 0:f.cordova)===null||a===void 0?void 0:a.plugins)===null||s===void 0?void 0:s.browsertab)===null||l===void 0?void 0:l.isAvailable)=="function",e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),oe(typeof((d=(u=f==null?void 0:f.cordova)===null||u===void 0?void 0:u.InAppBrowser)===null||d===void 0?void 0:d.open)=="function",e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-inappbrowser"})}function Ow(e){return _(this,null,function*(){const t=Rw(e),n=yield crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(i=>i.toString(16).padStart(2,"0")).join("")})}function Rw(e){if(sn(/[0-9a-zA-Z]+/.test(e),"Can only convert alpha-numeric strings"),typeof TextEncoder!="undefined")return new TextEncoder().encode(e);const t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}/**
|
|
2131
2131
|
* @license
|
|
2132
2132
|
* Copyright 2020 Google LLC
|
|
2133
2133
|
*
|
|
@@ -2247,7 +2247,7 @@
|
|
|
2247
2247
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2248
2248
|
* See the License for the specific language governing permissions and
|
|
2249
2249
|
* limitations under the License.
|
|
2250
|
-
*/function aI(e){return Nf(e)}function sI(e,t){var n;const r=(n=t.customData)===null||n===void 0?void 0:n._tokenResponse;if((t==null?void 0:t.code)==="auth/multi-factor-auth-required"){const i=t;i.resolver=new lI(e,Hx(e,t))}else if(r){const i=Nf(t),o=t;i&&(o.credential=i,o.tenantId=r.tenantId||void 0,o.email=r.email||void 0,o.phoneNumber=r.phoneNumber||void 0)}}function Nf(e){const{_tokenResponse:t}=e instanceof $t?e.customData:e;if(!t)return null;if(!(e instanceof $t)&&"temporaryProof"in t&&"phoneNumber"in t)return mr.credentialFromResult(e);const n=t.providerId;if(!n||n===Si.PASSWORD)return null;let r;switch(n){case Si.GOOGLE:r=
|
|
2250
|
+
*/function aI(e){return Nf(e)}function sI(e,t){var n;const r=(n=t.customData)===null||n===void 0?void 0:n._tokenResponse;if((t==null?void 0:t.code)==="auth/multi-factor-auth-required"){const i=t;i.resolver=new lI(e,Hx(e,t))}else if(r){const i=Nf(t),o=t;i&&(o.credential=i,o.tenantId=r.tenantId||void 0,o.email=r.email||void 0,o.phoneNumber=r.phoneNumber||void 0)}}function Nf(e){const{_tokenResponse:t}=e instanceof $t?e.customData:e;if(!t)return null;if(!(e instanceof $t)&&"temporaryProof"in t&&"phoneNumber"in t)return mr.credentialFromResult(e);const n=t.providerId;if(!n||n===Si.PASSWORD)return null;let r;switch(n){case Si.GOOGLE:r=vn;break;case Si.FACEBOOK:r=mn;break;case Si.GITHUB:r=bn;break;case Si.TWITTER:r=yn;break;default:const{oauthIdToken:i,oauthAccessToken:o,oauthTokenSecret:a,pendingToken:s,nonce:l}=t;return!o&&!a&&!i&&!s?null:s?n.startsWith("saml.")?zr._create(n,s):gn._fromParams({providerId:n,signInMethod:n,pendingToken:s,idToken:i,accessToken:o}):new Fr(n).credential({idToken:i,accessToken:o,rawNonce:l})}return e instanceof $t?r.credentialFromError(e):r.credentialFromResult(e)}function Nt(e,t){return t.catch(n=>{throw n instanceof $t&&sI(e,n),n}).then(n=>{const r=n.operationType,i=n.user;return{operationType:r,credential:aI(n),additionalUserInfo:jx(n),user:Ln.getOrCreate(i)}})}function Dl(e,t){return _(this,null,function*(){const n=yield t;return{verificationId:n.verificationId,confirm:r=>Nt(e,n.confirm(r))}})}class lI{constructor(t,n){this.resolver=n,this.auth=oI(t)}get session(){return this.resolver.session}get hints(){return this.resolver.hints}resolveSignIn(t){return Nt($f(this.auth),this.resolver.resolveSignIn(t))}}/**
|
|
2251
2251
|
* @license
|
|
2252
2252
|
* Copyright 2020 Google LLC
|
|
2253
2253
|
*
|
|
@@ -2322,7 +2322,7 @@
|
|
|
2322
2322
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2323
2323
|
* See the License for the specific language governing permissions and
|
|
2324
2324
|
* limitations under the License.
|
|
2325
|
-
*/const fI="auth-compat";function hI(e){e.INTERNAL.registerComponent(new Wn(fI,t=>{const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("auth");return new Ol(n,r)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:Or.EMAIL_SIGNIN,PASSWORD_RESET:Or.PASSWORD_RESET,RECOVER_EMAIL:Or.RECOVER_EMAIL,REVERT_SECOND_FACTOR_ADDITION:Or.REVERT_SECOND_FACTOR_ADDITION,VERIFY_AND_CHANGE_EMAIL:Or.VERIFY_AND_CHANGE_EMAIL,VERIFY_EMAIL:Or.VERIFY_EMAIL}},EmailAuthProvider:Jn,FacebookAuthProvider:gn,GithubAuthProvider:vn,GoogleAuthProvider:mn,OAuthProvider:Fr,SAMLAuthProvider:Fo,PhoneAuthProvider:Rl,PhoneMultiFactorGenerator:Tf,RecaptchaVerifier:dI,TwitterAuthProvider:bn,Auth:Ol,AuthCredential:$r,Error:$t}).setInstantiationMode("LAZY").setMultipleInstances(!1)),e.registerVersion(Gw,Yw)}hI(Qn);let zf=!1;const Vi=e=>{if(zf)return Qn.auth();if(e&&e==="dev"){Qn.initializeApp({apiKey:"api_key"});const n=Sw();ll(n,"http://localhost:39199")}else{const n={apiKey:e&&e==="staging"?"AIzaSyBKhAYwkvkmjm16FxCMvCUQjSRpKC0DbM8":"AIzaSyDPD_SETLswR_U3dKawYkAyRhbzVXziD_4",authDomain:"fans-united-clients.firebaseapp.com",projectId:"fans-united-clients",messagingSenderId:"78627953958",appId:"1:78627953958:web:2ee87d5b274e0e7685f5e7",measurementId:"G-RH90B03KJG"};Qn.initializeApp(n)}return zf=!0,Qn.auth()},pI=e=>e==="dev"?"http://localhost:8070/v1":e==="staging"?"https://client.fansunitedstagingapi.com/v1":e==="watg"?"https://client.watg.fansunitedapi.com/v1":e==="yolo"?"https://client.yolo.fansunitedapi.com/v1":e==="cska"?"https://client.cska.fansunitedapi.com/v1":"https://client.fansunitedapi.com/v1";class gI{constructor(t,n){ne(this,"apiKey","");ne(this,"clientId","");ne(this,"environment","");ne(this,"mainQueryParams",{key:"",client_id:""});ne(this,"headers",{"Content-Type":"application/json"});ne(this,"clientApiBaseUrl","");ne(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");ne(this,"sportal365Config",null);ne(this,"generateSignedInUrl",t=>_(this,null,function*(){const n=`/clients/${this.clientId}/generate-signed-url?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(t)})}));ne(this,"storeInBucket",(t,n,r)=>_(this,null,function*(){const i=yield fetch(t,{headers:r,method:"PUT",body:n});if(i.ok)return this.constructAssetsUrl(n.name);const o=yield i.text();this.throwErrorFromXmlResponse(o)}));ne(this,"fetchImagesFromSportal365",(t,n,r)=>_(this,null,function*(){if(this.sportal365Config){const i={Project:this.sportal365Config.project,Authorization:this.sportal365Config.authorization};let o={query:t,page:r.toString()};return n&&(n.from&&(o=q(z({},o),{from:n.from})),n.to&&(o=q(z({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));ne(this,"getSchedulersByEntityId",t=>_(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks?`,r={key:this.apiKey,limit:"50",entity_id:t},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"setSchedulers",(t,n,r)=>_(this,null,function*(){let i="",o="";n==="CREATE"?(i=`/clients/${this.clientId}/scheduler/tasks?`,o="POST"):(i=`/clients/${this.clientId}/scheduler/tasks/${r}?`,o="PUT");const a={key:this.apiKey},s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(a),{headers:q(z({},this.headers),{Authorization:"Bearer "+s}),body:JSON.stringify(t),method:o})}));ne(this,"deleteScheduledTask",t=>_(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks/${t}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ne(this,"getLoggedInStaffMember",()=>_(this,null,function*(){const r=(yield this.getToken()).split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(window.atob(r).split("").map(function(o){return"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}));ne(this,"constructAssetsUrl",t=>this.environment==="dev"?`https://storage.googleapis.com/client_images_cms_fans-united-dev/${this.clientId}/${t}`:this.environment==="staging"?`https://storage.googleapis.com/client_images_cms_fans-united-stage/${this.clientId}/${t}`:`https://uploads.fansunitedassets.com/${this.clientId}/${t}`);ne(this,"throwErrorFromXmlResponse",t=>{const n=new window.DOMParser().parseFromString(t,"text/xml"),r=n.getElementsByTagName("Message")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Message")[0].textContent:"",i=n.getElementsByTagName("Details")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Details")[0].textContent:"";throw new Error(r+" "+i)});ne(this,"getToken",()=>_(this,null,function*(){const t=Vi(this.environment).currentUser;return t?yield t.getIdToken():""}));this.apiKey=t.apiKey,this.clientId=t.clientId,this.environment=t.environment,this.mainQueryParams={key:t.apiKey,client_id:t.clientId},this.sportal365Config=n,this.clientApiBaseUrl=pI(this.environment)}}const mI=e=>e==="dev"?"http://localhost:8060/v1":e==="staging"?"https://loyalty.fansunitedstagingapi.com/v1":e==="watg"?"https://loyalty.watg.fansunitedapi.com/v1":e==="yolo"?"https://loyalty.yolo.fansunitedapi.com/v1":e==="cska"?"https://loyalty.cska.fansunitedapi.com/v1":"https://loyalty.fansunitedapi.com/v1",vI=e=>e==="dev"?"http://localhost:8040/v1":e==="staging"?"https://prediction.fansunitedstagingapi.com/v1":e==="watg"?"https://prediction.watg.fansunitedapi.com/v1":e==="yolo"?"https://prediction.yolo.fansunitedapi.com/v1":e==="cska"?"https://prediction.cska.fansunitedapi.com/v1":"https://prediction.fansunitedapi.com/v1",bI=e=>e==="dev"?"http://localhost:9040/v1":e==="staging"?"https://mini-games.fansunitedstagingapi.com/v1":e==="watg"?"https://mini-games.watg.fansunitedapi.com/v1":e==="yolo"?"https://mini-games.yolo.fansunitedapi.com/v1":e==="cska"?"https://mini-games.cska.fansunitedapi.com/v1":"https://mini-games.fansunitedapi.com/v1",yI=e=>e==="dev"?"http://localhost:8020/v1":e==="staging"?"https://reporting.fansunitedstagingapi.com/v1":e==="watg"?"https://reporting.watg.fansunitedapi.com/v1":e==="yolo"?"https://reporting.yolo.fansunitedapi.com/v1":e==="cska"?"https://reporting.cska.fansunitedapi.com/v1":"https://reporting.fansunitedapi.com/v1",xI=e=>e==="dev"?"http://localhost:9030/v1":e==="staging"?"https://voting.fansunitedstagingapi.com/v1":e==="watg"?"https://voting.watg.fansunitedapi.com/v1":e==="yolo"?"https://voting.yolo.fansunitedapi.com/v1":e==="cska"?"https://voting.cska.fansunitedapi.com/v1":"https://voting.fansunitedapi.com/v1",CI=e=>e==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1":e==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1":e==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1":e==="cska"?"https://custom-games-resolver-414330847655.europe-west1.run.app/v1":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1",wI=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://profile.fansunitedstagingapi.com/v1":e==="watg"?"https://profile.watg.fansunitedapi.com/v1":e==="yolo"?"https://profile.yolo.fansunitedapi.com/v1":e==="cska"?"https://profile.cska.fansunitedapi.com/v1":"https://profile.fansunitedapi.com/v1",II=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://discussions.fansunitedstagingapi.com/v1":e==="watg"?"https://discussions.watg.fansunitedapi.com/v1":e==="yolo"?"https://discussions.yolo.fansunitedapi.com/v1":e==="cska"?"https://discussions.cska.fansunitedapi.com/v1":"https://discussions.fansunitedapi.com/v1";class SI extends gI{constructor(n,r){super(n,r);ne(this,"loyaltyBaseUrl","");ne(this,"predictionBaseUrl","");ne(this,"miniGamesApiBaseUrl","");ne(this,"reportingApiBaseUrl","");ne(this,"votingApiBaseUrl","");ne(this,"profileApiBaseUrl","");ne(this,"customResolverUrl","");ne(this,"discussionsApiBaseUrl","");ne(this,"getClientById",()=>_(this,null,function*(){const n=`/clients/${this.clientId}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"createTemplate",n=>_(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"editTemplate",(n,r)=>_(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"deleteTemplate",n=>_(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ne(this,"setWinners",n=>_(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"exportDetailedLeaderboard",(n,r,i)=>_(this,null,function*(){const o=`/leaderboard/${n}/detailed?`,a=yield this.getToken(),s=z({},this.mainQueryParams);return r&&(s.group_id=r),yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(q(z({},s),{limit:i.toString()})),{headers:q(z({},this.headers),{Authorization:"Bearer "+a})})}));ne(this,"exportDetailedGameLeaderboard",(n,r)=>_(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(q(z({},this.mainQueryParams),{limit:r.toString()})),{headers:q(z({},this.headers),{Authorization:"Bearer "+o})})}));ne(this,"createGame",n=>_(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"editGame",(n,r)=>_(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));ne(this,"getEntityFeature",(n,r)=>_(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o={key:this.apiKey};return r&&(o.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o))}));ne(this,"getClientFeatures",(n,r=1)=>_(this,null,function*(){const i=`/clients/${this.clientId}/features?`,o={key:this.apiKey};n&&(o.disable_cache=Date.now().toString());const a=q(z({},this.headers),{"x-api-version":r.toString()});return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:a})}));ne(this,"updateEntityFeatures",(n,r)=>_(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams({key:this.apiKey}),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));ne(this,"getClassicQuizFeature",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));ne(this,"getEitherOrFeature",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));ne(this,"getPollFeature",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));ne(this,"createClassicQuiz",n=>_(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"updateClassicQuiz",(n,r)=>_(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"getClassicQuizById",n=>_(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"deleteClassicQuiz",n=>_(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ne(this,"calculateQuestionsReport",n=>_(this,null,function*(){const r=`/classic-quizzes/${n}/questions-report?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));ne(this,"exportUsers",n=>_(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"getClassicQuizParticipations",(n,r,i,o)=>_(this,null,function*(){const a="/classic-quizzes/participations?",s=q(z({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(s),{headers:q(z({},this.headers),{Authorization:"Bearer "+l})})}));ne(this,"getEntityParticipations",(n,r,i)=>_(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=q(z({},this.mainQueryParams),{from_date:r,to_date:i}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:q(z({},this.headers),{Authorization:"Bearer "+s})})}));ne(this,"createPoll",n=>_(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"updatePoll",(n,r)=>_(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"deletePoll",n=>_(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ne(this,"getEitherOrById",(n,r)=>_(this,null,function*(){const i=`/either-or/${n}/staff?`,o=yield this.getToken();let a=null;return r&&(a=q(z({},this.mainQueryParams),{client_id:r})),yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(a||this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o})})}));ne(this,"getEitherOrByIdReadOnlyClient",(n,r,i)=>_(this,null,function*(){const o="https://mini-games.fansunitedapi.com/v1",a=`/either-or/${n}/staff?`,s=yield this.getToken(),l={key:r,client_id:i};return yield fetch(o+a+new URLSearchParams(l),{headers:q(z({},this.headers),{Authorization:"Bearer "+s})})}));ne(this,"createEitherOr",n=>_(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"updateEitherOr",(n,r)=>_(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"deleteEitherOr",n=>_(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ne(this,"getLists",(n,r,i="DESC")=>_(this,null,function*(){const o=`/clients/${this.clientId}/lists?`,a={key:this.apiKey,limit:n.toString(),sort_order:i};r&&(a.start_after=r);const s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:q(z({},this.headers),{Authorization:"Bearer "+s})})}));ne(this,"getListById",n=>_(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:q(z({},this.headers),{Authorization:"Bearer "+o})})}));ne(this,"getListContent",(n,r,i="DESC",o)=>_(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,s={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(s.page=o.toString());const l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(s),{headers:q(z({},this.headers),{Authorization:"Bearer "+l})})}));ne(this,"createList",n=>_(this,null,function*(){const r=`/clients/${this.clientId}/lists/?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));ne(this,"updateList",(n,r)=>_(this,null,function*(){const i=`/clients/${this.clientId}/lists/${n}?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:q(z({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"deleteList",n=>_(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));ne(this,"getLanguageConfig",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/config/language?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"updateLanguageConfig",n=>_(this,null,function*(){const r=`/clients/${this.clientId}/config/language?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));ne(this,"createBracketGame",n=>_(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"updateBracketGame",(n,r)=>_(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"resolvePredictions",n=>_(this,null,function*(){const r="/custom/bracket/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));ne(this,"exportLeadsPerEntity",n=>_(this,null,function*(){const r="/leads/export?",i=q(z({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:q(z({},this.headers),{Authorization:"Bearer "+o})})}));ne(this,"getLeadStatistics",n=>_(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(z(z({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"exportLeads",n=>_(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(z(z({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"createStandingGame",n=>_(this,null,function*(){const r="/custom/standing?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"updateStandingGame",(n,r)=>_(this,null,function*(){const i=`/custom/standing/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"resolveStandingPredictions",n=>_(this,null,function*(){const r="/custom/standing/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));ne(this,"moderateUserPosts",(n,r)=>_(this,null,function*(){const i="/moderation/bulk?",o=yield this.getToken(),a=q(z({},this.mainQueryParams),{user_id:n,reason:r});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"POST"})}));ne(this,"getUserBanStatus",n=>_(this,null,function*(){const r=`/discussions/users/${n}/ban?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"banUser",(n,r,i)=>_(this,null,function*(){const o=`/discussions/users/${n}/ban?`,a=yield this.getToken(),s={banned_period_in_days:r,banned_reason:i};return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(s)})}));ne(this,"unbanUser",(n,r)=>_(this,null,function*(){const i=`/discussions/users/${n}/ban?`,o=yield this.getToken(),a={unban_reason:r};return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE",body:JSON.stringify(a)})}));ne(this,"updateUser",(n,r,i)=>_(this,null,function*(){const o=`/profiles/${n}/verify?`,a=yield this.getToken(),s=r==="verify"?{verified:i}:{staff_member:i};return yield fetch(this.profileApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(s)})}));ne(this,"deleteUserProfile",n=>_(this,null,function*(){const r=`/profiles/${n}?`,i=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ne(this,"createDiscussion",n=>_(this,null,function*(){const r="/discussions?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"deleteDiscussion",n=>_(this,null,function*(){const r=`/discussions/${n}?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ne(this,"moderatePosts",(...o)=>_(this,[...o],function*(n="",r=[],i){const a="/moderation/bulk?",s=yield this.getToken();let l={};if(r.length>0){const u=r.join(",");l=q(z({},this.mainQueryParams),{post_ids:u,reason:i})}else l=q(z({},this.mainQueryParams),{discussion_id:n,reason:i});return yield fetch(this.discussionsApiBaseUrl+a+new URLSearchParams(l),{headers:q(z({},this.headers),{Authorization:"Bearer "+s}),method:"POST"})}));ne(this,"pinDiscussionPosts",(n,r)=>_(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=q(z({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH"})}));ne(this,"unpinDiscussionPosts",(n,r)=>_(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=q(z({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));ne(this,"getPostsByStaffMember",n=>_(this,null,function*(){const r="/posts/staff?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(z(z({},this.mainQueryParams),n)),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"getReportedPosts",n=>_(this,null,function*(){const r="/posts/staff/reported?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(z(z({},this.mainQueryParams),n)),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"updateDiscussionsFeature",n=>_(this,null,function*(){const r=`/clients/${this.clientId}/features/discussions?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));ne(this,"updateProfilePreferences",n=>_(this,null,function*(){const r=`/clients/${this.clientId}/features/profile_preferences?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));ne(this,"getClientBadges",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/features/loyalty/badges?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"updateClientBadges",n=>_(this,null,function*(){const r=`/clients/${this.clientId}/features/loyalty/badges?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"PUT",body:JSON.stringify(n)})}));ne(this,"getEngagementThroughPredictionsReport",(n,r,i)=>_(this,null,function*(){const o="/predictions/football/engagements?",a=q(z({},this.mainQueryParams),{from_date:r,to_date:i,type:n}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:q(z({},this.headers),{Authorization:"Bearer "+s})})}));ne(this,"createPersonalityQuiz",n=>_(this,null,function*(){const r="/personality-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"updatePersonalityQuiz",(n,r)=>_(this,null,function*(){const i=`/personality-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"deletePersonalityQuiz",n=>_(this,null,function*(){const r=`/personality-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));this.loyaltyBaseUrl=mI(n.environment),this.predictionBaseUrl=vI(n.environment),this.miniGamesApiBaseUrl=bI(n.environment),this.reportingApiBaseUrl=yI(n.environment),this.votingApiBaseUrl=xI(n.environment),this.profileApiBaseUrl=wI(n.environment),this.customResolverUrl=CI(n.environment),this.discussionsApiBaseUrl=II(n.environment)}}const AI=(e,t)=>!e&&!t?null:!e&&t?(console.warn("'sportal365Project' prop is not provided. The prop is required when 'sportal365Infrastructure' prop is provided. Functionalities with Sportal365 API will not be exposed"),null):{project:e,authorization:`Bearer ${t&&t==="betway"?"24PkUfW1ce63mH9jvAAug2QQzdASj9k5smngepPUZD2KUq5cbTFGE98KgZ0zg2wCtuQcoJrHElW7Dr0K":"dEZS1V21veHBIDIik8Y33dDkZAoCmxgge5MBnAORN7IKbltA79giTZLaXJ6OVgQkGnYxwtyRv8ObRSvY"}`},ea=x.createContext(null),TI=({config:e,children:t})=>{const n={apiKey:e.apiKey,clientId:e.clientId,environment:e.environment,lang:e.language,errorHandlingMode:e.errorHandlingMode,authProvider:{getIdToken:()=>"",logout:()=>{}}},r=AI(e.sportal365Project,e.sportal365Infrastructure),i=Me.FansUnitedSDK(n),o=new SI(n,r);return c.jsx(ea.Provider,{value:{sdk:i,https:o},children:t})},jf=x.createContext(null),EI=({children:e,environment:t})=>{const[n,r]=x.useState(null),[i,o]=x.useState(!0);return x.useEffect(()=>Vi(t).onAuthStateChanged(s=>{Re.unstable_batchedUpdates(()=>{o(!1),r(s)})}),[t]),c.jsx(jf.Provider,{value:n,children:!i&&e})};function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(null,arguments)}function Ae(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var Uf={exports:{}},kI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",_I=kI,PI=_I;function Vf(){}function Hf(){}Hf.resetWarningCache=Vf;var DI=function(){function e(r,i,o,a,s,l){if(l!==PI){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Hf,resetWarningCache:Vf};return n.PropTypes=n,n};Uf.exports=DI();var OI=Uf.exports;function RI(e){return typeof e=="string"}function LI(e,t,n){return e===void 0||RI(e)?t:D({},t,{ownerState:D({},t.ownerState,n)})}function Wf(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}function Mn(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function MI(e,t,n){return typeof e=="function"?e(t,n):e}function BI(e){const{rootElementName:t="",componentName:n}=e,[r,i]=G.useState(t.toUpperCase()),o=G.useCallback(a=>{var s;i((s=a==null?void 0:a.tagName)!=null?s:"")},[]);return[r,o]}function $I(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function sn(...e){return G.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{$I(n,t)})},e)}function Gf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Gf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bn(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Gf(e))&&(r&&(r+=" "),r+=t);return r}function Yf(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function NI(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const p=Bn(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),m=D({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=D({},n,i,r);return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=Mn(D({},i,r)),s=Yf(r),l=Yf(i),u=t(a),d=Bn(u==null?void 0:u.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=D({},u==null?void 0:u.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=D({},u,n,l,s);return d.length>0&&(h.className=d),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:u.ref}}function er(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 Kf(e){if(G.isValidElement(e)||!er(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Kf(e[n])}),t}function $n(e,t,n={clone:!0}){const r=n.clone?D({},e):e;return er(e)&&er(t)&&Object.keys(t).forEach(i=>{G.isValidElement(t[i])?r[i]=t[i]:er(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&er(e[i])?r[i]=$n(e[i],t[i],n):n.clone?r[i]=er(t[i])?Kf(t[i]):t[i]:r[i]=t[i]}),r}function ta(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var Qf={exports:{}},$e={};/**
|
|
2325
|
+
*/const fI="auth-compat";function hI(e){e.INTERNAL.registerComponent(new Wn(fI,t=>{const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("auth");return new Ol(n,r)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:Or.EMAIL_SIGNIN,PASSWORD_RESET:Or.PASSWORD_RESET,RECOVER_EMAIL:Or.RECOVER_EMAIL,REVERT_SECOND_FACTOR_ADDITION:Or.REVERT_SECOND_FACTOR_ADDITION,VERIFY_AND_CHANGE_EMAIL:Or.VERIFY_AND_CHANGE_EMAIL,VERIFY_EMAIL:Or.VERIFY_EMAIL}},EmailAuthProvider:Jn,FacebookAuthProvider:mn,GithubAuthProvider:bn,GoogleAuthProvider:vn,OAuthProvider:Fr,SAMLAuthProvider:Fo,PhoneAuthProvider:Rl,PhoneMultiFactorGenerator:Tf,RecaptchaVerifier:dI,TwitterAuthProvider:yn,Auth:Ol,AuthCredential:$r,Error:$t}).setInstantiationMode("LAZY").setMultipleInstances(!1)),e.registerVersion(Gw,Yw)}hI(Qn);let zf=!1;const Vi=e=>{if(zf)return Qn.auth();if(e&&e==="dev"){Qn.initializeApp({apiKey:"api_key"});const n=Sw();ll(n,"http://localhost:39199")}else{const n={apiKey:e&&e==="staging"?"AIzaSyBKhAYwkvkmjm16FxCMvCUQjSRpKC0DbM8":"AIzaSyDPD_SETLswR_U3dKawYkAyRhbzVXziD_4",authDomain:"fans-united-clients.firebaseapp.com",projectId:"fans-united-clients",messagingSenderId:"78627953958",appId:"1:78627953958:web:2ee87d5b274e0e7685f5e7",measurementId:"G-RH90B03KJG"};Qn.initializeApp(n)}return zf=!0,Qn.auth()},pI=e=>e==="dev"?"http://localhost:8070/v1":e==="staging"?"https://client.fansunitedstagingapi.com/v1":e==="watg"?"https://client.watg.fansunitedapi.com/v1":e==="yolo"?"https://client.yolo.fansunitedapi.com/v1":e==="cska"?"https://client.cska.fansunitedapi.com/v1":"https://client.fansunitedapi.com/v1";class gI{constructor(t,n){ne(this,"apiKey","");ne(this,"clientId","");ne(this,"environment","");ne(this,"mainQueryParams",{key:"",client_id:""});ne(this,"headers",{"Content-Type":"application/json"});ne(this,"clientApiBaseUrl","");ne(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");ne(this,"sportal365Config",null);ne(this,"generateSignedInUrl",t=>_(this,null,function*(){const n=`/clients/${this.clientId}/generate-signed-url?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(t)})}));ne(this,"storeInBucket",(t,n,r)=>_(this,null,function*(){const i=yield fetch(t,{headers:r,method:"PUT",body:n});if(i.ok)return this.constructAssetsUrl(n.name);const o=yield i.text();this.throwErrorFromXmlResponse(o)}));ne(this,"fetchImagesFromSportal365",(t,n,r)=>_(this,null,function*(){if(this.sportal365Config){const i={Project:this.sportal365Config.project,Authorization:this.sportal365Config.authorization};let o={query:t,page:r.toString()};return n&&(n.from&&(o=q(z({},o),{from:n.from})),n.to&&(o=q(z({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));ne(this,"getSchedulersByEntityId",t=>_(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks?`,r={key:this.apiKey,limit:"50",entity_id:t},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"setSchedulers",(t,n,r)=>_(this,null,function*(){let i="",o="";n==="CREATE"?(i=`/clients/${this.clientId}/scheduler/tasks?`,o="POST"):(i=`/clients/${this.clientId}/scheduler/tasks/${r}?`,o="PUT");const a={key:this.apiKey},s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(a),{headers:q(z({},this.headers),{Authorization:"Bearer "+s}),body:JSON.stringify(t),method:o})}));ne(this,"deleteScheduledTask",t=>_(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks/${t}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ne(this,"getLoggedInStaffMember",()=>_(this,null,function*(){const r=(yield this.getToken()).split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(window.atob(r).split("").map(function(o){return"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}));ne(this,"constructAssetsUrl",t=>this.environment==="dev"?`https://storage.googleapis.com/client_images_cms_fans-united-dev/${this.clientId}/${t}`:this.environment==="staging"?`https://storage.googleapis.com/client_images_cms_fans-united-stage/${this.clientId}/${t}`:`https://uploads.fansunitedassets.com/${this.clientId}/${t}`);ne(this,"throwErrorFromXmlResponse",t=>{const n=new window.DOMParser().parseFromString(t,"text/xml"),r=n.getElementsByTagName("Message")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Message")[0].textContent:"",i=n.getElementsByTagName("Details")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Details")[0].textContent:"";throw new Error(r+" "+i)});ne(this,"getToken",()=>_(this,null,function*(){const t=Vi(this.environment).currentUser;return t?yield t.getIdToken():""}));this.apiKey=t.apiKey,this.clientId=t.clientId,this.environment=t.environment,this.mainQueryParams={key:t.apiKey,client_id:t.clientId},this.sportal365Config=n,this.clientApiBaseUrl=pI(this.environment)}}const mI=e=>e==="dev"?"http://localhost:8060/v1":e==="staging"?"https://loyalty.fansunitedstagingapi.com/v1":e==="watg"?"https://loyalty.watg.fansunitedapi.com/v1":e==="yolo"?"https://loyalty.yolo.fansunitedapi.com/v1":e==="cska"?"https://loyalty.cska.fansunitedapi.com/v1":"https://loyalty.fansunitedapi.com/v1",vI=e=>e==="dev"?"http://localhost:8040/v1":e==="staging"?"https://prediction.fansunitedstagingapi.com/v1":e==="watg"?"https://prediction.watg.fansunitedapi.com/v1":e==="yolo"?"https://prediction.yolo.fansunitedapi.com/v1":e==="cska"?"https://prediction.cska.fansunitedapi.com/v1":"https://prediction.fansunitedapi.com/v1",bI=e=>e==="dev"?"http://localhost:9040/v1":e==="staging"?"https://mini-games.fansunitedstagingapi.com/v1":e==="watg"?"https://mini-games.watg.fansunitedapi.com/v1":e==="yolo"?"https://mini-games.yolo.fansunitedapi.com/v1":e==="cska"?"https://mini-games.cska.fansunitedapi.com/v1":"https://mini-games.fansunitedapi.com/v1",yI=e=>e==="dev"?"http://localhost:8020/v1":e==="staging"?"https://reporting.fansunitedstagingapi.com/v1":e==="watg"?"https://reporting.watg.fansunitedapi.com/v1":e==="yolo"?"https://reporting.yolo.fansunitedapi.com/v1":e==="cska"?"https://reporting.cska.fansunitedapi.com/v1":"https://reporting.fansunitedapi.com/v1",xI=e=>e==="dev"?"http://localhost:9030/v1":e==="staging"?"https://voting.fansunitedstagingapi.com/v1":e==="watg"?"https://voting.watg.fansunitedapi.com/v1":e==="yolo"?"https://voting.yolo.fansunitedapi.com/v1":e==="cska"?"https://voting.cska.fansunitedapi.com/v1":"https://voting.fansunitedapi.com/v1",CI=e=>e==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1":e==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1":e==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1":e==="cska"?"https://custom-games-resolver-414330847655.europe-west1.run.app/v1":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1",wI=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://profile.fansunitedstagingapi.com/v1":e==="watg"?"https://profile.watg.fansunitedapi.com/v1":e==="yolo"?"https://profile.yolo.fansunitedapi.com/v1":e==="cska"?"https://profile.cska.fansunitedapi.com/v1":"https://profile.fansunitedapi.com/v1",II=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://discussions.fansunitedstagingapi.com/v1":e==="watg"?"https://discussions.watg.fansunitedapi.com/v1":e==="yolo"?"https://discussions.yolo.fansunitedapi.com/v1":e==="cska"?"https://discussions.cska.fansunitedapi.com/v1":"https://discussions.fansunitedapi.com/v1";class SI extends gI{constructor(n,r){super(n,r);ne(this,"loyaltyBaseUrl","");ne(this,"predictionBaseUrl","");ne(this,"miniGamesApiBaseUrl","");ne(this,"reportingApiBaseUrl","");ne(this,"votingApiBaseUrl","");ne(this,"profileApiBaseUrl","");ne(this,"customResolverUrl","");ne(this,"discussionsApiBaseUrl","");ne(this,"getClientById",()=>_(this,null,function*(){const n=`/clients/${this.clientId}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"createTemplate",n=>_(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"editTemplate",(n,r)=>_(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"deleteTemplate",n=>_(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ne(this,"setWinners",n=>_(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"exportDetailedLeaderboard",(n,r,i)=>_(this,null,function*(){const o=`/leaderboard/${n}/detailed?`,a=yield this.getToken(),s=z({},this.mainQueryParams);return r&&(s.group_id=r),yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(q(z({},s),{limit:i.toString()})),{headers:q(z({},this.headers),{Authorization:"Bearer "+a})})}));ne(this,"exportDetailedGameLeaderboard",(n,r)=>_(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(q(z({},this.mainQueryParams),{limit:r.toString()})),{headers:q(z({},this.headers),{Authorization:"Bearer "+o})})}));ne(this,"createGame",n=>_(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"editGame",(n,r)=>_(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));ne(this,"getEntityFeature",(n,r)=>_(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o={key:this.apiKey};return r&&(o.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o))}));ne(this,"getClientFeatures",(n,r=1)=>_(this,null,function*(){const i=`/clients/${this.clientId}/features?`,o={key:this.apiKey};n&&(o.disable_cache=Date.now().toString());const a=q(z({},this.headers),{"x-api-version":r.toString()});return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:a})}));ne(this,"updateEntityFeatures",(n,r)=>_(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams({key:this.apiKey}),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));ne(this,"getClassicQuizFeature",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));ne(this,"getEitherOrFeature",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));ne(this,"getPollFeature",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));ne(this,"createClassicQuiz",n=>_(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"updateClassicQuiz",(n,r)=>_(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"getClassicQuizById",n=>_(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"deleteClassicQuiz",n=>_(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ne(this,"calculateQuestionsReport",n=>_(this,null,function*(){const r=`/classic-quizzes/${n}/questions-report?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));ne(this,"exportUsers",n=>_(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"getClassicQuizParticipations",(n,r,i,o)=>_(this,null,function*(){const a="/classic-quizzes/participations?",s=q(z({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(s),{headers:q(z({},this.headers),{Authorization:"Bearer "+l})})}));ne(this,"getEntityParticipations",(n,r,i)=>_(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=q(z({},this.mainQueryParams),{from_date:r,to_date:i}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:q(z({},this.headers),{Authorization:"Bearer "+s})})}));ne(this,"createPoll",n=>_(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"updatePoll",(n,r)=>_(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"deletePoll",n=>_(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ne(this,"getEitherOrById",(n,r)=>_(this,null,function*(){const i=`/either-or/${n}/staff?`,o=yield this.getToken();let a=null;return r&&(a=q(z({},this.mainQueryParams),{client_id:r})),yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(a||this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o})})}));ne(this,"getEitherOrByIdReadOnlyClient",(n,r,i)=>_(this,null,function*(){const o="https://mini-games.fansunitedapi.com/v1",a=`/either-or/${n}/staff?`,s=yield this.getToken(),l={key:r,client_id:i};return yield fetch(o+a+new URLSearchParams(l),{headers:q(z({},this.headers),{Authorization:"Bearer "+s})})}));ne(this,"createEitherOr",n=>_(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"updateEitherOr",(n,r)=>_(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"deleteEitherOr",n=>_(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ne(this,"getLists",(n,r,i="DESC")=>_(this,null,function*(){const o=`/clients/${this.clientId}/lists?`,a={key:this.apiKey,limit:n.toString(),sort_order:i};r&&(a.start_after=r);const s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:q(z({},this.headers),{Authorization:"Bearer "+s})})}));ne(this,"getListById",n=>_(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:q(z({},this.headers),{Authorization:"Bearer "+o})})}));ne(this,"getListContent",(n,r,i="DESC",o)=>_(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,s={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(s.page=o.toString());const l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(s),{headers:q(z({},this.headers),{Authorization:"Bearer "+l})})}));ne(this,"createList",n=>_(this,null,function*(){const r=`/clients/${this.clientId}/lists/?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));ne(this,"updateList",(n,r)=>_(this,null,function*(){const i=`/clients/${this.clientId}/lists/${n}?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:q(z({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"deleteList",n=>_(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));ne(this,"getLanguageConfig",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/config/language?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"updateLanguageConfig",n=>_(this,null,function*(){const r=`/clients/${this.clientId}/config/language?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));ne(this,"createBracketGame",n=>_(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"updateBracketGame",(n,r)=>_(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"resolvePredictions",n=>_(this,null,function*(){const r="/custom/bracket/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));ne(this,"exportLeadsPerEntity",n=>_(this,null,function*(){const r="/leads/export?",i=q(z({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:q(z({},this.headers),{Authorization:"Bearer "+o})})}));ne(this,"getLeadStatistics",n=>_(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(z(z({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"exportLeads",n=>_(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(z(z({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"createStandingGame",n=>_(this,null,function*(){const r="/custom/standing?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"updateStandingGame",(n,r)=>_(this,null,function*(){const i=`/custom/standing/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"resolveStandingPredictions",n=>_(this,null,function*(){const r="/custom/standing/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));ne(this,"moderateUserPosts",(n,r)=>_(this,null,function*(){const i="/moderation/bulk?",o=yield this.getToken(),a=q(z({},this.mainQueryParams),{user_id:n,reason:r});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"POST"})}));ne(this,"getUserBanStatus",n=>_(this,null,function*(){const r=`/discussions/users/${n}/ban?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"banUser",(n,r,i)=>_(this,null,function*(){const o=`/discussions/users/${n}/ban?`,a=yield this.getToken(),s={banned_period_in_days:r,banned_reason:i};return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(s)})}));ne(this,"unbanUser",(n,r)=>_(this,null,function*(){const i=`/discussions/users/${n}/ban?`,o=yield this.getToken(),a={unban_reason:r};return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE",body:JSON.stringify(a)})}));ne(this,"updateUser",(n,r,i)=>_(this,null,function*(){const o=`/profiles/${n}/verify?`,a=yield this.getToken(),s=r==="verify"?{verified:i}:{staff_member:i};return yield fetch(this.profileApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(s)})}));ne(this,"deleteUserProfile",n=>_(this,null,function*(){const r=`/profiles/${n}?`,i=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ne(this,"createDiscussion",n=>_(this,null,function*(){const r="/discussions?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"deleteDiscussion",n=>_(this,null,function*(){const r=`/discussions/${n}?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ne(this,"moderatePosts",(...o)=>_(this,[...o],function*(n="",r=[],i){const a="/moderation/bulk?",s=yield this.getToken();let l={};if(r.length>0){const u=r.join(",");l=q(z({},this.mainQueryParams),{post_ids:u,reason:i})}else l=q(z({},this.mainQueryParams),{discussion_id:n,reason:i});return yield fetch(this.discussionsApiBaseUrl+a+new URLSearchParams(l),{headers:q(z({},this.headers),{Authorization:"Bearer "+s}),method:"POST"})}));ne(this,"pinDiscussionPosts",(n,r)=>_(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=q(z({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH"})}));ne(this,"unpinDiscussionPosts",(n,r)=>_(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=q(z({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));ne(this,"getPostsByStaffMember",n=>_(this,null,function*(){const r="/posts/staff?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(z(z({},this.mainQueryParams),n)),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"getReportedPosts",n=>_(this,null,function*(){const r="/posts/staff/reported?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(z(z({},this.mainQueryParams),n)),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"updateDiscussionsFeature",n=>_(this,null,function*(){const r=`/clients/${this.clientId}/features/discussions?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));ne(this,"updateProfilePreferences",n=>_(this,null,function*(){const r=`/clients/${this.clientId}/features/profile_preferences?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));ne(this,"getClientBadges",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/features/loyalty/badges?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:q(z({},this.headers),{Authorization:"Bearer "+i})})}));ne(this,"updateClientBadges",n=>_(this,null,function*(){const r=`/clients/${this.clientId}/features/loyalty/badges?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"PUT",body:JSON.stringify(n)})}));ne(this,"getEngagementThroughPredictionsReport",(n,r,i)=>_(this,null,function*(){const o="/predictions/football/engagements?",a=q(z({},this.mainQueryParams),{from_date:r,to_date:i,type:n}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:q(z({},this.headers),{Authorization:"Bearer "+s})})}));ne(this,"createPersonalityQuiz",n=>_(this,null,function*(){const r="/personality-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ne(this,"updatePersonalityQuiz",(n,r)=>_(this,null,function*(){const i=`/personality-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ne(this,"deletePersonalityQuiz",n=>_(this,null,function*(){const r=`/personality-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(z({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));this.loyaltyBaseUrl=mI(n.environment),this.predictionBaseUrl=vI(n.environment),this.miniGamesApiBaseUrl=bI(n.environment),this.reportingApiBaseUrl=yI(n.environment),this.votingApiBaseUrl=xI(n.environment),this.profileApiBaseUrl=wI(n.environment),this.customResolverUrl=CI(n.environment),this.discussionsApiBaseUrl=II(n.environment)}}const AI=(e,t)=>!e&&!t?null:!e&&t?(console.warn("'sportal365Project' prop is not provided. The prop is required when 'sportal365Infrastructure' prop is provided. Functionalities with Sportal365 API will not be exposed"),null):{project:e,authorization:`Bearer ${t&&t==="betway"?"24PkUfW1ce63mH9jvAAug2QQzdASj9k5smngepPUZD2KUq5cbTFGE98KgZ0zg2wCtuQcoJrHElW7Dr0K":"dEZS1V21veHBIDIik8Y33dDkZAoCmxgge5MBnAORN7IKbltA79giTZLaXJ6OVgQkGnYxwtyRv8ObRSvY"}`},ea=x.createContext(null),TI=({config:e,children:t})=>{const n={apiKey:e.apiKey,clientId:e.clientId,environment:e.environment,lang:e.language,errorHandlingMode:e.errorHandlingMode,authProvider:{getIdToken:()=>"",logout:()=>{}}},r=AI(e.sportal365Project,e.sportal365Infrastructure),i=Me.FansUnitedSDK(n),o=new SI(n,r);return c.jsx(ea.Provider,{value:{sdk:i,https:o},children:t})},jf=x.createContext(null),EI=({children:e,environment:t})=>{const[n,r]=x.useState(null),[i,o]=x.useState(!0);return x.useEffect(()=>Vi(t).onAuthStateChanged(s=>{Re.unstable_batchedUpdates(()=>{o(!1),r(s)})}),[t]),c.jsx(jf.Provider,{value:n,children:!i&&e})};function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(null,arguments)}function Ae(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var Uf={exports:{}},kI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",_I=kI,PI=_I;function Vf(){}function Hf(){}Hf.resetWarningCache=Vf;var DI=function(){function e(r,i,o,a,s,l){if(l!==PI){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Hf,resetWarningCache:Vf};return n.PropTypes=n,n};Uf.exports=DI();var OI=Uf.exports;function RI(e){return typeof e=="string"}function LI(e,t,n){return e===void 0||RI(e)?t:D({},t,{ownerState:D({},t.ownerState,n)})}function Wf(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}function Mn(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function MI(e,t,n){return typeof e=="function"?e(t,n):e}function BI(e){const{rootElementName:t="",componentName:n}=e,[r,i]=G.useState(t.toUpperCase()),o=G.useCallback(a=>{var s;i((s=a==null?void 0:a.tagName)!=null?s:"")},[]);return[r,o]}function $I(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function ln(...e){return G.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{$I(n,t)})},e)}function Gf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Gf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bn(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Gf(e))&&(r&&(r+=" "),r+=t);return r}function Yf(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function NI(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const p=Bn(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),m=D({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=D({},n,i,r);return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=Mn(D({},i,r)),s=Yf(r),l=Yf(i),u=t(a),d=Bn(u==null?void 0:u.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=D({},u==null?void 0:u.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=D({},u,n,l,s);return d.length>0&&(h.className=d),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:u.ref}}function er(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 Kf(e){if(G.isValidElement(e)||!er(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Kf(e[n])}),t}function $n(e,t,n={clone:!0}){const r=n.clone?D({},e):e;return er(e)&&er(t)&&Object.keys(t).forEach(i=>{G.isValidElement(t[i])?r[i]=t[i]:er(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&er(e[i])?r[i]=$n(e[i],t[i],n):n.clone?r[i]=er(t[i])?Kf(t[i]):t[i]:r[i]=t[i]}),r}function ta(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var Qf={exports:{}},$e={};/**
|
|
2326
2326
|
* @license React
|
|
2327
2327
|
* react-is.production.js
|
|
2328
2328
|
*
|
|
@@ -2330,7 +2330,7 @@
|
|
|
2330
2330
|
*
|
|
2331
2331
|
* This source code is licensed under the MIT license found in the
|
|
2332
2332
|
* LICENSE file in the root directory of this source tree.
|
|
2333
|
-
*/var Ll=Symbol.for("react.transitional.element"),Ml=Symbol.for("react.portal"),na=Symbol.for("react.fragment"),ra=Symbol.for("react.strict_mode"),ia=Symbol.for("react.profiler"),oa=Symbol.for("react.consumer"),aa=Symbol.for("react.context"),sa=Symbol.for("react.forward_ref"),la=Symbol.for("react.suspense"),ca=Symbol.for("react.suspense_list"),ua=Symbol.for("react.memo"),da=Symbol.for("react.lazy"),FI=Symbol.for("react.offscreen"),zI=Symbol.for("react.client.reference");function Xt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Ll:switch(e=e.type,e){case na:case ia:case ra:case la:case ca:return e;default:switch(e=e&&e.$$typeof,e){case aa:case sa:case da:case ua:return e;case oa:return e;default:return t}}case Ml:return t}}}$e.ContextConsumer=oa,$e.ContextProvider=aa,$e.Element=Ll,$e.ForwardRef=sa,$e.Fragment=na,$e.Lazy=da,$e.Memo=ua,$e.Portal=Ml,$e.Profiler=ia,$e.StrictMode=ra,$e.Suspense=la,$e.SuspenseList=ca,$e.isContextConsumer=function(e){return Xt(e)===oa},$e.isContextProvider=function(e){return Xt(e)===aa},$e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ll},$e.isForwardRef=function(e){return Xt(e)===sa},$e.isFragment=function(e){return Xt(e)===na},$e.isLazy=function(e){return Xt(e)===da},$e.isMemo=function(e){return Xt(e)===ua},$e.isPortal=function(e){return Xt(e)===Ml},$e.isProfiler=function(e){return Xt(e)===ia},$e.isStrictMode=function(e){return Xt(e)===ra},$e.isSuspense=function(e){return Xt(e)===la},$e.isSuspenseList=function(e){return Xt(e)===ca},$e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===na||e===ia||e===ra||e===la||e===ca||e===FI||typeof e=="object"&&e!==null&&(e.$$typeof===da||e.$$typeof===ua||e.$$typeof===aa||e.$$typeof===oa||e.$$typeof===sa||e.$$typeof===zI||e.getModuleId!==void 0)},$e.typeOf=Xt,Qf.exports=$e;var qf=Qf.exports;function ye(e){if(typeof e!="string")throw new Error(ta(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Jf(e,t){var n,r;return G.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}const jI=typeof window!="undefined"?G.useLayoutEffect:G.useEffect;let Xf=0;function UI(e){const[t,n]=G.useState(e),r=e||t;return G.useEffect(()=>{t==null&&(Xf+=1,n(`mui-${Xf}`))},[t]),r}const Zf=G.useId;function Hi(e){if(Zf!==void 0){const t=Zf();return e!=null?e:t}return UI(e)}function Bl({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=G.useRef(e!==void 0),[o,a]=G.useState(t),s=i?e:o,l=G.useCallback(u=>{i||a(u)},[]);return[s,l]}class $l{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new $l}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let fa=!0,Nl=!1;const VI=new $l,HI={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function WI(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&HI[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function GI(e){e.metaKey||e.altKey||e.ctrlKey||(fa=!0)}function Fl(){fa=!1}function YI(){this.visibilityState==="hidden"&&Nl&&(fa=!0)}function KI(e){e.addEventListener("keydown",GI,!0),e.addEventListener("mousedown",Fl,!0),e.addEventListener("pointerdown",Fl,!0),e.addEventListener("touchstart",Fl,!0),e.addEventListener("visibilitychange",YI,!0)}function QI(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return fa||WI(t)}function eh(){const e=G.useCallback(i=>{i!=null&&KI(i.ownerDocument)},[]),t=G.useRef(!1);function n(){return t.current?(Nl=!0,VI.start(100,()=>{Nl=!1}),t.current=!1,!0):!1}function r(i){return QI(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function th(e,t){const n=D({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=D({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=D({},o),Object.keys(i).forEach(a=>{n[r][a]=th(i[a],o[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function dt(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,a)=>{if(a){const s=t(a);s!==""&&o.push(s),n&&n[a]&&o.push(n[a])}return o},[]).join(" ")}),r}const nh=e=>e,qI=(()=>{let e=nh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=nh}}})(),JI={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 rh(e,t,n="Mui"){const r=JI[t];return r?`${n}-${r}`:`${qI.generate(e)}-${t}`}function XI(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=rh(e,i,n)}),r}function zl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,href:r,rootRef:i,tabIndex:o,to:a,type:s,rootElementName:l}=e,u=G.useRef(null),[d,f]=G.useState(!1),{isFocusVisibleRef:h,onFocus:p,onBlur:m,ref:g}=eh(),[b,w]=G.useState(!1);t&&!n&&b&&w(!1),G.useEffect(()=>{h.current=b},[b,h]);const[S,C]=BI({rootElementName:l!=null?l:r||a?"a":void 0,componentName:"Button"}),I=j=>$=>{var M;b&&$.preventDefault(),(M=j.onMouseLeave)==null||M.call(j,$)},y=j=>$=>{var M;m($),h.current===!1&&w(!1),(M=j.onBlur)==null||M.call(j,$)},A=j=>$=>{var M;if(u.current||(u.current=$.currentTarget),p($),h.current===!0){var H;w(!0),(H=j.onFocusVisible)==null||H.call(j,$)}(M=j.onFocus)==null||M.call(j,$)},E=()=>{const j=u.current;return S==="BUTTON"||S==="INPUT"&&["button","submit","reset"].includes(j==null?void 0:j.type)||S==="A"&&(j==null?void 0:j.href)},k=j=>$=>{if(!t){var M;(M=j.onClick)==null||M.call(j,$)}},F=j=>$=>{var M;t||(f(!0),document.addEventListener("mouseup",()=>{f(!1)},{once:!0})),(M=j.onMouseDown)==null||M.call(j,$)},Y=j=>$=>{var M;if((M=j.onKeyDown)==null||M.call(j,$),!$.defaultMuiPrevented&&($.target===$.currentTarget&&!E()&&$.key===" "&&$.preventDefault(),$.target===$.currentTarget&&$.key===" "&&!t&&f(!0),$.target===$.currentTarget&&!E()&&$.key==="Enter"&&!t)){var H;(H=j.onClick)==null||H.call(j,$),$.preventDefault()}},O=j=>$=>{var M;if($.target===$.currentTarget&&f(!1),(M=j.onKeyUp)==null||M.call(j,$),$.target===$.currentTarget&&!E()&&!t&&$.key===" "&&!$.defaultMuiPrevented){var H;(H=j.onClick)==null||H.call(j,$)}},T=sn(C,i,g,u),N={};return o!==void 0&&(N.tabIndex=o),S==="BUTTON"?(N.type=s!=null?s:"button",n?N["aria-disabled"]=t:N.disabled=t):S==="INPUT"?s&&["button","submit","reset"].includes(s)&&(n?N["aria-disabled"]=t:N.disabled=t):S!==""&&(!r&&!a&&(N.role="button",N.tabIndex=o!=null?o:0),t&&(N["aria-disabled"]=t,N.tabIndex=n?o!=null?o:0:-1)),{getRootProps:(j={})=>{const $=D({},Mn(e),Mn(j)),M=D({type:s},$,N,j,{onBlur:y($),onClick:k($),onFocus:A($),onKeyDown:Y($),onKeyUp:O($),onMouseDown:F($),onMouseLeave:I($),ref:T});return delete M.onFocusVisible,M},focusVisible:b,setFocusVisible:w,active:d,rootRef:T}}function ZI(e,t){return e===t}const jl={},ih=()=>{};function Ul(e,t){const n=D({},e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n}function eS(e){const{nextState:t,initialState:n,stateComparers:r,onStateChange:i,controlledProps:o,lastActionRef:a}=e,s=G.useRef(n);G.useEffect(()=>{if(a.current===null)return;const l=Ul(s.current,o);Object.keys(t).forEach(u=>{var d;const f=(d=r[u])!=null?d:ZI,h=t[u],p=l[u];if(p==null&&h!=null||p!=null&&h==null||p!=null&&h!=null&&!f(h,p)){var m,g;i==null||i((m=a.current.event)!=null?m:null,u,h,(g=a.current.type)!=null?g:"",t)}}),s.current=t,a.current=null},[s,t,a,i,r,o])}function tS(e){const t=G.useRef(null),{reducer:n,initialState:r,controlledProps:i=jl,stateComparers:o=jl,onStateChange:a=ih,actionContext:s,componentName:l=""}=e;G.useRef(i);const u=G.useCallback((p,m)=>{t.current=m;const g=Ul(p,i);return n(g,m)},[i,n]),[d,f]=G.useReducer(u,r),h=G.useCallback(p=>{f(D({},p,{context:s}))},[s]);return eS({nextState:d,initialState:r,stateComparers:o!=null?o:jl,onStateChange:a!=null?a:ih,controlledProps:i,lastActionRef:t}),[Ul(d,i),h]}const nS=G.createContext(void 0);function rS(){return G.useContext(nS)}function iS(e={}){const{defaultValue:t,disabled:n=!1,error:r=!1,onBlur:i,onChange:o,onFocus:a,required:s=!1,value:l,inputRef:u}=e,d=rS();let f,h,p,m,g;if(d){var b,w,S;f=void 0,h=(b=d.disabled)!=null?b:!1,p=(w=d.error)!=null?w:!1,m=(S=d.required)!=null?S:!1,g=d.value}else f=t,h=n,p=r,m=s,g=l;const{current:C}=G.useRef(g!=null),I=G.useCallback(j=>{},[]),y=G.useRef(null),A=sn(y,u,I),[E,k]=G.useState(!1);G.useEffect(()=>{!d&&h&&E&&(k(!1),i==null||i())},[d,h,E,i]);const F=j=>$=>{var M;if(d!=null&&d.disabled){$.stopPropagation();return}if((M=j.onFocus)==null||M.call(j,$),d&&d.onFocus){var H;d==null||(H=d.onFocus)==null||H.call(d)}else k(!0)},Y=j=>$=>{var M;(M=j.onBlur)==null||M.call(j,$),d&&d.onBlur?d.onBlur():k(!1)},O=j=>($,...M)=>{var H,Q;if(!C&&($.target||y.current)==null)throw new Error(ta(17));d==null||(H=d.onChange)==null||H.call(d,$),(Q=j.onChange)==null||Q.call(j,$,...M)},T=j=>$=>{var M;y.current&&$.currentTarget===$.target&&y.current.focus(),(M=j.onClick)==null||M.call(j,$)};return{disabled:h,error:p,focused:E,formControlContext:d,getInputProps:(j={})=>{const M=D({},{onBlur:i,onChange:o,onFocus:a},Mn(j)),H=D({},M,{onBlur:Y(M),onChange:O(M),onFocus:F(M)});return D({},H,{"aria-invalid":p||void 0,defaultValue:f,value:g,required:m,disabled:h},j,{ref:A},H)},getRootProps:(j={})=>{const $=Mn(e,["onBlur","onChange","onFocus"]),M=D({},$,Mn(j));return D({},j,M,{onClick:T(M)})},inputRef:A,required:m,value:g}}const yt={blur:"list:blur",focus:"list:focus",itemClick:"list:itemClick",itemHover:"list:itemHover",itemsChange:"list:itemsChange",keyDown:"list:keyDown",resetHighlight:"list:resetHighlight",highlightLast:"list:highlightLast",textNavigation:"list:textNavigation",clearSelection:"list:clearSelection"};function oS(e,t,n,r,i,o){if(n.length===0||!r&&n.every((s,l)=>i(s,l)))return-1;let a=e;for(;;){if(!o&&t==="next"&&a===n.length||!o&&t==="previous"&&a===-1)return-1;if(r?!1:i(n[a],a))a+=t==="next"?1:-1,o&&(a=(a+n.length)%n.length);else return a}}function Dt(e,t,n){var r;const{items:i,isItemDisabled:o,disableListWrap:a,disabledItemsFocusable:s,itemComparer:l,focusManagement:u}=n,d=u==="DOM"?0:-1,f=i.length-1,h=e==null?-1:i.findIndex(w=>l(w,e));let p,m,g=!a;switch(t){case"reset":if(d===-1)return null;p=0,m="next",g=!1;break;case"start":p=0,m="next",g=!1;break;case"end":p=f,m="previous",g=!1;break;default:{const w=h+t;w<0?!g&&h!==-1||Math.abs(t)>1?(p=0,m="next"):(p=f,m="previous"):w>f?!g||Math.abs(t)>1?(p=f,m="previous"):(p=0,m="next"):(p=w,m=t>=0?"next":"previous")}}const b=oS(p,m,i,s,o,g);return b===-1&&e!==null&&!o(e,h)?e:(r=i[b])!=null?r:null}function aS(e,t,n,r){return n==="none"?[]:n==="single"?r(t[0],e)?t:[e]:t.some(i=>r(i,e))?t.filter(i=>!r(i,e)):[...t,e]}function oh(e,t,n){const{itemComparer:r,isItemDisabled:i,selectionMode:o,items:a}=n,{selectedValues:s}=t,l=a.findIndex(d=>r(e,d));if(i(e,l))return t;const u=aS(e,s,o,r);return D({},t,{selectedValues:u,highlightedValue:e})}function sS(e,t,n){const r=t.highlightedValue,{orientation:i,pageSize:o}=n;switch(e){case"Home":return D({},t,{highlightedValue:Dt(r,"start",n)});case"End":return D({},t,{highlightedValue:Dt(r,"end",n)});case"PageUp":return D({},t,{highlightedValue:Dt(r,-o,n)});case"PageDown":return D({},t,{highlightedValue:Dt(r,o,n)});case"ArrowUp":if(i!=="vertical")break;return D({},t,{highlightedValue:Dt(r,-1,n)});case"ArrowDown":if(i!=="vertical")break;return D({},t,{highlightedValue:Dt(r,1,n)});case"ArrowLeft":{if(i==="vertical")break;return D({},t,{highlightedValue:Dt(r,i==="horizontal-ltr"?-1:1,n)})}case"ArrowRight":{if(i==="vertical")break;return D({},t,{highlightedValue:Dt(r,i==="horizontal-ltr"?1:-1,n)})}case"Enter":case" ":return t.highlightedValue===null?t:oh(t.highlightedValue,t,n)}return t}function lS(e,t){return t.focusManagement==="DOM"?e:D({},e,{highlightedValue:null})}function cS(e,t,n){var r;const i=(r=n(e))==null?void 0:r.trim().toLowerCase();return!i||i.length===0?!1:i.indexOf(t)===0}function uS(e,t,n){const{items:r,isItemDisabled:i,disabledItemsFocusable:o,getItemAsString:a}=n,s=t.length>1;let l=s?e.highlightedValue:Dt(e.highlightedValue,1,n);for(let u=0;u<r.length;u+=1){if(!l||!s&&e.highlightedValue===l)return e;if(cS(l,t,a)&&(!i(l,r.indexOf(l))||o))return D({},e,{highlightedValue:l});l=Dt(l,1,n)}return e}function dS(e,t,n,r){var i;const{itemComparer:o,focusManagement:a}=r;let s=null;if(n.highlightedValue!=null){var l;s=(l=e.find(f=>o(f,n.highlightedValue)))!=null?l:null}else a==="DOM"&&t.length===0&&(s=Dt(null,"reset",r));const d=((i=n.selectedValues)!=null?i:[]).filter(f=>e.some(h=>o(h,f)));return D({},n,{highlightedValue:s,selectedValues:d})}function fS(e,t){return D({},e,{highlightedValue:Dt(null,"reset",t)})}function hS(e,t){return D({},e,{highlightedValue:Dt(null,"end",t)})}function pS(e,t){return D({},e,{selectedValues:[],highlightedValue:Dt(null,"reset",t)})}function ah(e,t){const{type:n,context:r}=t;switch(n){case yt.keyDown:return sS(t.key,e,r);case yt.itemClick:return oh(t.item,e,r);case yt.blur:return lS(e,r);case yt.textNavigation:return uS(e,t.searchString,r);case yt.itemsChange:return dS(t.items,t.previousItems,e,r);case yt.resetHighlight:return fS(e,r);case yt.highlightLast:return hS(e,r);case yt.clearSelection:return pS(e,r);default:return e}}const gS=500;function mS(e){const t=G.useRef({searchString:"",lastTime:null});return G.useCallback(n=>{if(n.key.length===1&&n.key!==" "){const r=t.current,i=n.key.toLowerCase(),o=performance.now();r.searchString.length>0&&r.lastTime&&o-r.lastTime>gS?r.searchString=i:(r.searchString.length!==1||i!==r.searchString)&&(r.searchString+=i),r.lastTime=o,e(r.searchString,n)}},[e])}const sh={},vS=()=>{},bS=(e,t)=>e===t,yS=()=>!1,xS=e=>typeof e=="string"?e:String(e),CS=()=>({highlightedValue:null,selectedValues:[]});function wS(e){const{controlledProps:t=sh,disabledItemsFocusable:n=!1,disableListWrap:r=!1,focusManagement:i="activeDescendant",getInitialState:o=CS,getItemDomElement:a,getItemId:s,isItemDisabled:l=yS,rootRef:u,onStateChange:d=vS,items:f,itemComparer:h=bS,getItemAsString:p=xS,onChange:m,onHighlightChange:g,onItemsChange:b,orientation:w="vertical",pageSize:S=5,reducerActionContext:C=sh,selectionMode:I="single",stateReducer:y,componentName:A="useList"}=e,E=G.useRef(null),k=sn(u,E),F=G.useCallback((ae,X,le)=>{if(g==null||g(ae,X,le),i==="DOM"&&X!=null&&(le===yt.itemClick||le===yt.keyDown||le===yt.textNavigation)){var Z;a==null||(Z=a(X))==null||Z.focus()}},[a,g,i]),Y=G.useMemo(()=>({highlightedValue:h,selectedValues:(ae,X)=>Wf(ae,X,h)}),[h]),O=G.useCallback((ae,X,le,Z,he)=>{switch(d==null||d(ae,X,le,Z,he),X){case"highlightedValue":F(ae,le,Z);break;case"selectedValues":m==null||m(ae,le,Z);break}},[F,m,d]),T=G.useMemo(()=>({disabledItemsFocusable:n,disableListWrap:r,focusManagement:i,isItemDisabled:l,itemComparer:h,items:f,getItemAsString:p,onHighlightChange:F,orientation:w,pageSize:S,selectionMode:I,stateComparers:Y}),[n,r,i,l,h,f,p,F,w,S,I,Y]),N=o(),V=y!=null?y:ah,j=G.useMemo(()=>D({},C,T),[C,T]),[$,M]=tS({reducer:V,actionContext:j,initialState:N,controlledProps:t,stateComparers:Y,onStateChange:O,componentName:A}),{highlightedValue:H,selectedValues:Q}=$,te=mS((ae,X)=>M({type:yt.textNavigation,event:X,searchString:ae})),R=G.useRef([]);G.useEffect(()=>{Wf(R.current,f,h)||(M({type:yt.itemsChange,event:null,items:f,previousItems:R.current}),R.current=f,b==null||b(f))},[f,h,M,b]);const L=ae=>X=>{var le;if((le=ae.onKeyDown)==null||le.call(ae,X),X.defaultMuiPrevented)return;const Z=["Home","End","PageUp","PageDown"];w==="vertical"?Z.push("ArrowUp","ArrowDown"):Z.push("ArrowLeft","ArrowRight"),i==="activeDescendant"&&Z.push(" ","Enter"),Z.includes(X.key)&&X.preventDefault(),M({type:yt.keyDown,key:X.key,event:X}),te(X)},U=ae=>X=>{var le,Z;(le=ae.onBlur)==null||le.call(ae,X),!X.defaultMuiPrevented&&((Z=E.current)!=null&&Z.contains(X.relatedTarget)||M({type:yt.blur,event:X}))},W=(ae={})=>{const X=Mn(ae);return D({},ae,{"aria-activedescendant":i==="activeDescendant"&&H!=null?s(H):void 0,tabIndex:i==="DOM"?-1:0,ref:k},X,{onBlur:U(X),onKeyDown:L(X)})},re=G.useCallback(ae=>{const X=(Q!=null?Q:[]).some(he=>he!=null&&h(ae,he)),le=H!=null&&h(ae,H);return{focusable:i==="DOM",highlighted:le,selected:X}},[h,Q,H,i]),se=G.useMemo(()=>({dispatch:M,getItemState:re}),[M,re]);return G.useDebugValue({state:$}),{contextValue:se,dispatch:M,getRootProps:W,rootRef:k,state:$}}const lh=G.createContext(null);function IS(e){const{handlePointerOverEvents:t=!1,item:n}=e,r=G.useContext(lh);if(!r)throw new Error("useListItem must be used within a ListProvider");const{dispatch:i,getItemState:o}=r,{highlighted:a,selected:s,focusable:l}=o(n),u=G.useCallback(p=>m=>{var g;(g=p.onClick)==null||g.call(p,m),!m.defaultPrevented&&i({type:yt.itemClick,item:n,event:m})},[i,n]),d=G.useCallback(p=>m=>{var g;(g=p.onMouseOver)==null||g.call(p,m),!m.defaultPrevented&&i({type:yt.itemHover,item:n,event:m})},[i,n]);let f;return l&&(f=a?0:-1),{getRootProps:(p={})=>{const m=Mn(p);return D({},p,{onClick:u(m),onPointerOver:t?d(m):void 0,tabIndex:f})},highlighted:a,selected:s}}const Vl=G.createContext(null);function SS(e){const t=Array.from(e.keys()).map(n=>{const r=e.get(n);return{key:n,subitem:r}});return t.sort((n,r)=>{const i=n.subitem.ref.current,o=r.subitem.ref.current;return i===null||o===null||i===o?0:i.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING?1:-1}),new Map(t.map(n=>[n.key,n.subitem]))}function ch(){const[e,t]=G.useState(new Map),n=G.useRef(new Set),r=G.useCallback(function(u){n.current.delete(u),t(d=>{const f=new Map(d);return f.delete(u),f})},[]),i=G.useCallback(function(u,d){let f;return typeof u=="function"?f=u(n.current):f=u,n.current.add(f),t(h=>{const p=new Map(h);return p.set(f,d),p}),{id:f,deregister:()=>r(f)}},[r]),o=G.useMemo(()=>SS(e),[e]),a=G.useCallback(function(u){return Array.from(o.keys()).indexOf(u)},[o]);return{contextValue:G.useMemo(()=>({getItemIndex:a,registerItem:i,totalSubitemCount:e.size}),[a,i,e.size]),subitems:o}}function uh(e,t){const n=G.useContext(Vl);if(n===null)throw new Error("useCompoundItem must be used within a useCompoundParent");const{registerItem:r}=n,[i,o]=G.useState(typeof e=="function"?void 0:e);return jI(()=>{const{id:a,deregister:s}=r(e,t);return o(a),s},[r,t,e]),{id:i,index:i!==void 0?n.getItemIndex(i):-1,totalItemCount:n.totalSubitemCount}}function AS(e,t){return function(r={}){const i=D({},r,e(r));return D({},i,t(i))}}const TS=Math.min,ES=Math.max,ha=Math.round,pa=Math.floor,ga=e=>({x:e,y:e});function kS(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function dh(e){return hh(e)?(e.nodeName||"").toLowerCase():"#document"}function Nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fh(e){var t;return(t=(hh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hh(e){return e instanceof Node||e instanceof Nn(e).Node}function _S(e){return e instanceof Element||e instanceof Nn(e).Element}function Hl(e){return e instanceof HTMLElement||e instanceof Nn(e).HTMLElement}function ph(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Nn(e).ShadowRoot}function gh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Wl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function PS(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function DS(e){return["html","body","#document"].includes(dh(e))}function Wl(e){return Nn(e).getComputedStyle(e)}function OS(e){if(dh(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ph(e)&&e.host||fh(e);return ph(t)?t.host:t}function mh(e){const t=OS(e);return DS(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hl(t)&&gh(t)?t:mh(t)}function ma(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=mh(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Nn(i);if(o){const s=Gl(a);return t.concat(a,a.visualViewport||[],gh(i)?i:[],s&&n?ma(s):[])}return t.concat(i,ma(i,[],n))}function Gl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function RS(e){const t=Wl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Hl(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=ha(n)!==o||ha(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Yl(e){return _S(e)?e:e.contextElement}function vh(e){const t=Yl(e);if(!Hl(t))return ga(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=RS(t);let a=(o?ha(n.width):n.width)/r,s=(o?ha(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const LS=ga(0);function MS(e){const t=Nn(e);return!PS()||!t.visualViewport?LS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function BS(e,t,n){return!1}function bh(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=Yl(e);let a=ga(1);t&&(a=vh(e));const s=BS()?MS(o):ga(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(o){const h=Nn(o),p=r;let m=h,g=Gl(m);for(;g&&r&&p!==m;){const b=vh(g),w=g.getBoundingClientRect(),S=Wl(g),C=w.left+(g.clientLeft+parseFloat(S.paddingLeft))*b.x,I=w.top+(g.clientTop+parseFloat(S.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,f*=b.y,l+=C,u+=I,m=Nn(g),g=Gl(m)}}return kS({width:d,height:f,x:l,y:u})}function $S(e,t){let n=null,r;const i=fh(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(s||t(),!f||!h)return;const p=pa(d),m=pa(i.clientWidth-(u+f)),g=pa(i.clientHeight-(d+h)),b=pa(u),S={rootMargin:-p+"px "+-m+"px "+-g+"px "+-b+"px",threshold:ES(0,TS(1,l))||1};let C=!0;function I(y){const A=y[0].intersectionRatio;if(A!==l){if(!C)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(I,q(z({},S),{root:i.ownerDocument}))}catch(y){n=new IntersectionObserver(I,S)}n.observe(e)}return a(!0),o}function NS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Yl(e),d=i||o?[...u?ma(u):[],...ma(t)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const f=u&&s?$S(u,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(w=>{let[S]=w;S&&S.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let m,g=l?bh(e):null;l&&b();function b(){const w=bh(e);g&&(w.x!==g.x||w.y!==g.y||w.width!==g.width||w.height!==g.height)&&n(),g=w,m=requestAnimationFrame(b)}return n(),()=>{var w;d.forEach(S=>{i&&S.removeEventListener("scroll",n),o&&S.removeEventListener("resize",n)}),f==null||f(),(w=p)==null||w.disconnect(),p=null,l&&cancelAnimationFrame(m)}}function FS(e){const{checked:t,defaultChecked:n,disabled:r,onBlur:i,onChange:o,onFocus:a,onFocusVisible:s,readOnly:l,required:u}=e,[d,f]=Bl({controlled:t,default:!!n,name:"Switch",state:"checked"}),h=k=>F=>{var Y;F.nativeEvent.defaultPrevented||(f(F.target.checked),o==null||o(F),(Y=k.onChange)==null||Y.call(k,F))},{isFocusVisibleRef:p,onBlur:m,onFocus:g,ref:b}=eh(),[w,S]=G.useState(!1);r&&w&&S(!1),G.useEffect(()=>{p.current=w},[w,p]);const C=G.useRef(null),I=k=>F=>{var Y;C.current||(C.current=F.currentTarget),g(F),p.current===!0&&(S(!0),s==null||s(F)),a==null||a(F),(Y=k.onFocus)==null||Y.call(k,F)},y=k=>F=>{var Y;m(F),p.current===!1&&S(!1),i==null||i(F),(Y=k.onBlur)==null||Y.call(k,F)},A=sn(b,C);return{checked:d,disabled:!!r,focusVisible:w,getInputProps:(k={})=>D({checked:t,defaultChecked:n,disabled:r,readOnly:l,ref:A,required:u,type:"checkbox",role:"switch","aria-checked":t},k,{onChange:h(k),onFocus:I(k),onBlur:y(k)}),inputRef:A,readOnly:!!l}}function zS(e){const{value:t,defaultValue:n,onChange:r,orientation:i="horizontal",direction:o="ltr",selectionFollowsFocus:a=!1}=e,[s,l]=Bl({controlled:t,default:n,name:"Tabs",state:"value"}),u=G.useCallback((b,w)=>{l(w),r==null||r(b,w)},[r,l]),{subitems:d,contextValue:f}=ch(),h=G.useRef(()=>{}),p=G.useCallback(b=>{var w;return(w=d.get(b))==null?void 0:w.id},[d]),m=G.useCallback(b=>h.current(b),[]),g=G.useCallback(b=>{h.current=b},[]);return{contextValue:D({direction:o,getTabId:m,getTabPanelId:p,onSelected:u,orientation:i,registerTabIdLookup:g,selectionFollowsFocus:a,value:s},f)}}const yh=G.createContext(null);function va(){const e=G.useContext(yh);if(e==null)throw new Error("No TabsContext provided");return e}function jS(e){const{value:t,children:n}=e,{direction:r,getItemIndex:i,onSelected:o,orientation:a,registerItem:s,registerTabIdLookup:l,selectionFollowsFocus:u,totalSubitemCount:d,value:f,getTabId:h,getTabPanelId:p}=t,m=G.useMemo(()=>({getItemIndex:i,registerItem:s,totalSubitemCount:d}),[s,i,d]),g=G.useMemo(()=>({direction:r,getTabId:h,getTabPanelId:p,onSelected:o,orientation:a,registerTabIdLookup:l,selectionFollowsFocus:u,value:f}),[r,h,p,o,a,l,u,f]);return c.jsx(Vl.Provider,{value:m,children:c.jsx(yh.Provider,{value:g,children:n})})}function US(e){return e.size}function VS(e){const{value:t,id:n,rootRef:r}=e,i=va();if(i===null)throw new Error("No TabContext provided");const{value:o,getTabId:a}=i,s=Hi(n),l=G.useRef(null),u=sn(l,r),d=G.useMemo(()=>({id:s,ref:l}),[s]),{id:f}=uh(t!=null?t:US,d),h=f!==o,p=f!==void 0?a(f):void 0;return{hidden:h,getRootProps:(g={})=>D({"aria-labelledby":p!=null?p:void 0,hidden:h,id:s!=null?s:void 0},g,{ref:u}),rootRef:u}}const xh={valueChange:"valueChange"};function HS(e,t){if(t.type===xh.valueChange)return D({},e,{highlightedValue:t.value});const n=ah(e,t),{context:{selectionFollowsFocus:r}}=t;if(t.type===yt.itemsChange){if(n.selectedValues.length>0)return D({},n,{highlightedValue:n.selectedValues[0]});Dt(null,"reset",t.context)}return r&&n.highlightedValue!=null?D({},n,{selectedValues:[n.highlightedValue]}):n}function WS(e){var t;const{rootRef:n}=e,{direction:r="ltr",onSelected:i,orientation:o="horizontal",value:a,registerTabIdLookup:s,selectionFollowsFocus:l}=va(),{subitems:u,contextValue:d}=ch(),f=G.useCallback(O=>{var T;return(T=u.get(O))==null?void 0:T.id},[u]);s(f);const h=G.useMemo(()=>Array.from(u.keys()),[u]),p=G.useCallback(O=>{var T,N;return O==null?null:(T=(N=u.get(O))==null?void 0:N.ref.current)!=null?T:null},[u]),m=r==="rtl";let g;o==="vertical"?g="vertical":g=m?"horizontal-rtl":"horizontal-ltr";const b=G.useCallback((O,T)=>{var N;i(O,(N=T[0])!=null?N:null)},[i]),w=G.useMemo(()=>a===void 0?{}:a!=null?{selectedValues:[a]}:{selectedValues:[]},[a]),S=G.useCallback(O=>{var T,N;return(T=(N=u.get(O))==null?void 0:N.disabled)!=null?T:!1},[u]),{contextValue:C,dispatch:I,getRootProps:y,state:{highlightedValue:A,selectedValues:E},rootRef:k}=wS({controlledProps:w,disabledItemsFocusable:!l,focusManagement:"DOM",getItemDomElement:p,isItemDisabled:S,items:h,rootRef:n,onChange:b,orientation:g,reducerActionContext:G.useMemo(()=>({selectionFollowsFocus:l||!1}),[l]),selectionMode:"single",stateReducer:HS});G.useEffect(()=>{a!==void 0&&a!=null&&I({type:xh.valueChange,value:a})},[I,a]);const F=(O={})=>D({},O,y(O),{"aria-orientation":o==="vertical"?"vertical":void 0,role:"tablist"});return{contextValue:G.useMemo(()=>D({},d,C),[d,C]),dispatch:I,getRootProps:F,highlightedValue:A,isRtl:m,orientation:o,rootRef:k,selectedValue:(t=E[0])!=null?t:null}}function GS(e){const{value:t,children:n}=e,{dispatch:r,getItemIndex:i,getItemState:o,registerItem:a,totalSubitemCount:s}=t,l=G.useMemo(()=>({dispatch:r,getItemState:o,getItemIndex:i}),[r,i,o]),u=G.useMemo(()=>({getItemIndex:i,registerItem:a,totalSubitemCount:s}),[a,i,s]);return c.jsx(Vl.Provider,{value:u,children:c.jsx(lh.Provider,{value:l,children:n})})}function YS(e){return e.size}function KS(e){const{value:t,rootRef:n,disabled:r=!1,id:i}=e,o=G.useRef(null),a=Hi(i),{value:s,selectionFollowsFocus:l,getTabPanelId:u}=va(),d=G.useMemo(()=>({disabled:r,ref:o,id:a}),[r,o,a]),{id:f,index:h,totalItemCount:p}=uh(t!=null?t:YS,d),{getRootProps:m,highlighted:g,selected:b}=IS({item:f}),{getRootProps:w,rootRef:S,active:C,focusVisible:I,setFocusVisible:y}=zl({disabled:r,focusableWhenDisabled:!l,type:"button"}),A=sn(o,n,S),E=f!==void 0?u(f):void 0;return{getRootProps:(F={})=>{const Y=Mn(F),O=AS(m,w);return D({},F,O(Y),{role:"tab","aria-controls":E,"aria-selected":b,id:a,ref:A})},active:C,focusVisible:I,highlighted:g,index:h,rootRef:A,selected:b||f===s,setFocusVisible:y,totalTabsCount:p}}const Ch="$$joy";function QS(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}function qS(e,t){return Mt(e,t)}const JS=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},XS=["values","unit","step"],ZS=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)=>D({},n,{[r.key]:r.val}),{})};function wh(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ae(e,XS),o=ZS(t),a=Object.keys(o);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function u(h,p){const m=a.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:p)-r/100}${n})`}function d(h){return a.indexOf(h)+1<a.length?u(h,a[a.indexOf(h)+1]):s(h)}function f(h){const p=a.indexOf(h);return p===0?s(a[1]):p===a.length-1?l(a[p]):u(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return D({keys:a,values:o,up:s,down:l,between:u,only:d,not:f,unit:n},i)}const eA={borderRadius:4};function Wi(e,t){return t?$n(e,t,{clone:!1}):e}const Kl={xs:0,sm:600,md:900,lg:1200,xl:1536},Ih={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Kl[e]}px)`};function Fn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Ih;return t.reduce((a,s,l)=>(a[o.up(o.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const o=r.breakpoints||Ih;return Object.keys(t).reduce((a,s)=>{if(Object.keys(o.values||Kl).indexOf(s)!==-1){const l=o.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function tA(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function nA(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function tr(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function ba(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=tr(e,n)||r,t&&(i=t(i,r,e)),i}function ot(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,u=tr(l,r)||{};return Fn(a,s,f=>{let h=ba(u,i,f);return f===h&&typeof f=="string"&&(h=ba(u,i,`${t}${f==="default"?"":ye(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function rA(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const iA={m:"margin",p:"padding"},oA={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Sh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},aA=rA(e=>{if(e.length>2)if(Sh[e])e=Sh[e];else return[e];const[t,n]=e.split(""),r=iA[t],i=oA[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Ql=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],ql=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Ql,...ql];function Gi(e,t,n,r){var i;const o=(i=tr(e,t,!1))!=null?i:n;return typeof o=="number"?a=>typeof a=="string"?a:o*a:Array.isArray(o)?a=>typeof a=="string"?a:o[a]:typeof o=="function"?o:()=>{}}function Ah(e){return Gi(e,"spacing",8)}function Yi(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function sA(e,t){return n=>e.reduce((r,i)=>(r[i]=Yi(t,n),r),{})}function lA(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=aA(n),o=sA(i,r),a=e[n];return Fn(e,a,o)}function Th(e,t){const n=Ah(e.theme);return Object.keys(e).map(r=>lA(e,t,r,n)).reduce(Wi,{})}function Je(e){return Th(e,Ql)}Je.propTypes={},Je.filterProps=Ql;function Xe(e){return Th(e,ql)}Xe.propTypes={},Xe.filterProps=ql;function Eh(e=8){if(e.mui)return e;const t=Ah({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const a=t(o);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function ya(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Wi(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Zt(e){return typeof e!="number"?e:`${e}px solid`}function en(e,t){return ot({prop:e,themeKey:"borders",transform:t})}const cA=en("border",Zt),uA=en("borderTop",Zt),dA=en("borderRight",Zt),fA=en("borderBottom",Zt),hA=en("borderLeft",Zt),pA=en("borderColor"),gA=en("borderTopColor"),mA=en("borderRightColor"),vA=en("borderBottomColor"),bA=en("borderLeftColor"),yA=en("outline",Zt),xA=en("outlineColor"),xa=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Gi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Yi(t,r)});return Fn(e,e.borderRadius,n)}return null};xa.propTypes={},xa.filterProps=["borderRadius"],ya(cA,uA,dA,fA,hA,pA,gA,mA,vA,bA,xa,yA,xA);const Ca=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Gi(e.theme,"spacing",8),n=r=>({gap:Yi(t,r)});return Fn(e,e.gap,n)}return null};Ca.propTypes={},Ca.filterProps=["gap"];const wa=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Gi(e.theme,"spacing",8),n=r=>({columnGap:Yi(t,r)});return Fn(e,e.columnGap,n)}return null};wa.propTypes={},wa.filterProps=["columnGap"];const Ia=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Gi(e.theme,"spacing",8),n=r=>({rowGap:Yi(t,r)});return Fn(e,e.rowGap,n)}return null};Ia.propTypes={},Ia.filterProps=["rowGap"];const CA=ot({prop:"gridColumn"}),wA=ot({prop:"gridRow"}),IA=ot({prop:"gridAutoFlow"}),SA=ot({prop:"gridAutoColumns"}),AA=ot({prop:"gridAutoRows"}),TA=ot({prop:"gridTemplateColumns"}),EA=ot({prop:"gridTemplateRows"}),kA=ot({prop:"gridTemplateAreas"}),_A=ot({prop:"gridArea"});ya(Ca,wa,Ia,CA,wA,IA,SA,AA,TA,EA,kA,_A);function Hr(e,t){return t==="grey"?t:e}const PA=ot({prop:"color",themeKey:"palette",transform:Hr}),DA=ot({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Hr}),OA=ot({prop:"backgroundColor",themeKey:"palette",transform:Hr});ya(PA,DA,OA);function Ht(e){return e<=1&&e!==0?`${e*100}%`:e}const RA=ot({prop:"width",transform:Ht}),Jl=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||Kl[n];return o?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Ht(n)}};return Fn(e,e.maxWidth,t)}return null};Jl.filterProps=["maxWidth"];const LA=ot({prop:"minWidth",transform:Ht}),MA=ot({prop:"height",transform:Ht}),BA=ot({prop:"maxHeight",transform:Ht}),$A=ot({prop:"minHeight",transform:Ht});ot({prop:"size",cssProperty:"width",transform:Ht}),ot({prop:"size",cssProperty:"height",transform:Ht});const NA=ot({prop:"boxSizing"});ya(RA,Jl,LA,MA,BA,$A,NA);const Sa={border:{themeKey:"borders",transform:Zt},borderTop:{themeKey:"borders",transform:Zt},borderRight:{themeKey:"borders",transform:Zt},borderBottom:{themeKey:"borders",transform:Zt},borderLeft:{themeKey:"borders",transform:Zt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Zt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:xa},color:{themeKey:"palette",transform:Hr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Hr},backgroundColor:{themeKey:"palette",transform:Hr},p:{style:Xe},pt:{style:Xe},pr:{style:Xe},pb:{style:Xe},pl:{style:Xe},px:{style:Xe},py:{style:Xe},padding:{style:Xe},paddingTop:{style:Xe},paddingRight:{style:Xe},paddingBottom:{style:Xe},paddingLeft:{style:Xe},paddingX:{style:Xe},paddingY:{style:Xe},paddingInline:{style:Xe},paddingInlineStart:{style:Xe},paddingInlineEnd:{style:Xe},paddingBlock:{style:Xe},paddingBlockStart:{style:Xe},paddingBlockEnd:{style:Xe},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:Ca},rowGap:{style:Ia},columnGap:{style:wa},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ht},maxWidth:{style:Jl},minWidth:{transform:Ht},height:{transform:Ht},maxHeight:{transform:Ht},minHeight:{transform:Ht},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function FA(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function zA(e,t){return typeof e=="function"?e(t):e}function jA(){function e(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:d,style:f}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=tr(i,u)||{};return f?f(a):Fn(a,r,m=>{let g=ba(h,d,m);return m===g&&typeof m=="string"&&(g=ba(h,d,`${n}${m==="default"?"":ye(m)}`,m)),l===!1?g:{[l]:g}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:Sa;function s(l){let u=l;if(typeof l=="function")u=l(o);else if(typeof l!="object")return l;if(!u)return null;const d=tA(o.breakpoints),f=Object.keys(d);let h=d;return Object.keys(u).forEach(p=>{const m=zA(u[p],o);if(m!=null)if(typeof m=="object")if(a[p])h=Wi(h,e(p,m,o,a));else{const g=Fn({theme:o},m,b=>({[p]:b}));FA(g,m)?h[p]=t({sx:m,theme:o}):h=Wi(h,g)}else h=Wi(h,e(p,m,o,a))}),nA(f,h)}return Array.isArray(i)?i.map(s):s(i)}return t}const Aa=jA();Aa.filterProps=["sx"];function kh(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const UA=["breakpoints","palette","spacing","shape"];function _h(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=Ae(e,UA),s=wh(n),l=Eh(i);let u=$n({breakpoints:s,direction:"ltr",components:{},palette:D({mode:"light"},r),spacing:l,shape:D({},eA,o)},a);return u.applyStyles=kh,u=t.reduce((d,f)=>$n(d,f),u),u.unstable_sxConfig=D({},Sa,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(f){return Aa({sx:f,theme:this})},u}function VA(e){return Object.keys(e).length===0}function HA(e=null){const t=G.useContext(ge.ThemeContext);return!t||VA(t)?e:t}const WA=_h();function GA(e=WA){return HA(e)}const YA=["sx"],KA=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:Sa;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function QA(e){const{sx:t}=e,n=Ae(e,YA),{systemProps:r,otherProps:i}=KA(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...a)=>{const s=t(...a);return er(s)?D({},r,s):r}:o=D({},r,t),D({},i,{sx:o})}const qA=["ownerState"],JA=["variants"],XA=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function ZA(e){return Object.keys(e).length===0}function e1(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Xl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const t1=_h(),n1=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Ta({defaultTheme:e,theme:t,themeId:n}){return ZA(t)?e:t[n]||t}function r1(e){return e?(t,n)=>n[e]:null}function Ea(e,t){let{ownerState:n}=t,r=Ae(t,qA);const i=typeof e=="function"?e(D({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Ea(o,D({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let s=Ae(i,JA);return o.forEach(l=>{let u=!0;typeof l.props=="function"?u=l.props(D({ownerState:n},r,n)):Object.keys(l.props).forEach(d=>{(n==null?void 0:n[d])!==l.props[d]&&r[d]!==l.props[d]&&(u=!1)}),u&&(Array.isArray(s)||(s=[s]),s.push(typeof l.style=="function"?l.style(D({ownerState:n},r,n)):l.style))}),s}return i}function i1(e={}){const{themeId:t,defaultTheme:n=t1,rootShouldForwardProp:r=Xl,slotShouldForwardProp:i=Xl}=e,o=a=>Aa(D({},a,{theme:Ta(D({},a,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(a,s={})=>{JS(a,y=>y.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:d,skipSx:f,overridesResolver:h=r1(n1(u))}=s,p=Ae(s,XA),m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,g=f||!1;let b,w=Xl;u==="Root"||u==="root"?w=r:u?w=i:e1(a)&&(w=void 0);const S=qS(a,D({shouldForwardProp:w,label:b},p)),C=y=>typeof y=="function"&&y.__emotion_real!==y||er(y)?A=>Ea(y,D({},A,{theme:Ta({theme:A.theme,defaultTheme:n,themeId:t})})):y,I=(y,...A)=>{let E=C(y);const k=A?A.map(C):[];l&&h&&k.push(O=>{const T=Ta(D({},O,{defaultTheme:n,themeId:t}));if(!T.components||!T.components[l]||!T.components[l].styleOverrides)return null;const N=T.components[l].styleOverrides,V={};return Object.entries(N).forEach(([j,$])=>{V[j]=Ea($,D({},O,{theme:T}))}),h(O,V)}),l&&!m&&k.push(O=>{var T;const N=Ta(D({},O,{defaultTheme:n,themeId:t})),V=N==null||(T=N.components)==null||(T=T[l])==null?void 0:T.variants;return Ea({variants:V},D({},O,{theme:N}))}),g||k.push(o);const F=k.length-A.length;if(Array.isArray(y)&&F>0){const O=new Array(F).fill("");E=[...y,...O],E.raw=[...y.raw,...O]}const Y=S(E,...k);return a.muiName&&(Y.muiName=a.muiName),Y};return S.withConfig&&(I.withConfig=S.withConfig),I}}function o1(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:th(t.components[n].defaultProps,r)}function a1({props:e,name:t,defaultTheme:n,themeId:r}){let i=GA(n);return r&&(i=i[r]||i),o1({theme:i,name:t,props:e})}function s1(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Ph(e){if(e.type)return e;if(e.charAt(0)==="#")return Ph(s1(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(ta(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(ta(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const yr=e=>{const t=Ph(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};function Zl(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.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}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const Dh=(e,t,n,r=[])=>{let i=e;t.forEach((o,a)=>{a===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},l1=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([s,l])=>{(!n||n&&!n([...o,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...o,s],Array.isArray(l)?[...a,s]:a):t([...o,s],l,a))})}r(e)},c1=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().indexOf("opacity")>=0?t:`${t}px`:t;function ec(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return l1(e,(s,l,u)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const d=`--${n?`${n}-`:""}${s.join("-")}`;Object.assign(i,{[d]:c1(s,l)}),Dh(o,s,`var(${d})`,u),Dh(a,s,`var(${d}, ${l})`,u)}},s=>s[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function xr(e){"@babel/helpers - typeof";return xr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xr(e)}function u1(e,t){if(xr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function tc(e){var t=u1(e,"string");return xr(t)=="symbol"?t:t+""}const d1=["colorSchemes","components","defaultColorScheme"];function f1(e,t){const{colorSchemes:n={},defaultColorScheme:r="light"}=e,i=Ae(e,d1),{vars:o,css:a,varsWithDefaults:s}=ec(i,t);let l=s;const u={},{[r]:d}=n,f=Ae(n,[r].map(tc));if(Object.entries(f||{}).forEach(([p,m])=>{const{vars:g,css:b,varsWithDefaults:w}=ec(m,t);l=$n(l,w),u[p]={css:b,vars:g}}),d){const{css:p,vars:m,varsWithDefaults:g}=ec(d,t);l=$n(l,g),u[r]={css:p,vars:m}}return{vars:l,generateCssVars:p=>{var m;if(!p){var g;const w=D({},a);return{css:w,vars:o,selector:(t==null||(g=t.getSelector)==null?void 0:g.call(t,p,w))||":root"}}const b=D({},u[p].css);return{css:b,vars:u[p].vars,selector:(t==null||(m=t.getSelector)==null?void 0:m.call(t,p,b))||":root"}}}}const h1=D({},Sa,{borderRadius:{themeKey:"radius"},boxShadow:{themeKey:"shadow"},fontFamily:{themeKey:"fontFamily"},fontSize:{themeKey:"fontSize"},fontWeight:{themeKey:"fontWeight"},letterSpacing:{themeKey:"letterSpacing"},lineHeight:{themeKey:"lineHeight"}}),Ki={grey:{50:"#FBFCFE",100:"#F0F4F8",200:"#DDE7EE",300:"#CDD7E1",400:"#9FA6AD",500:"#636B74",600:"#555E68",700:"#32383E",800:"#171A1C",900:"#0B0D0E"},blue:{50:"#EDF5FD",100:"#E3EFFB",200:"#C7DFF7",300:"#97C3F0",400:"#4393E4",500:"#0B6BCB",600:"#185EA5",700:"#12467B",800:"#0A2744",900:"#051423"},yellow:{50:"#FEFAF6",100:"#FDF0E1",200:"#FCE1C2",300:"#F3C896",400:"#EA9A3E",500:"#9A5B13",600:"#72430D",700:"#492B08",800:"#2E1B05",900:"#1D1002"},red:{50:"#FEF6F6",100:"#FCE4E4",200:"#F7C5C5",300:"#F09898",400:"#E47474",500:"#C41C1C",600:"#A51818",700:"#7D1212",800:"#430A0A",900:"#240505"},green:{50:"#F6FEF6",100:"#E3FBE3",200:"#C7F7C7",300:"#A1E8A1",400:"#51BC51",500:"#1F7A1F",600:"#136C13",700:"#0A470A",800:"#042F04",900:"#021D02"}};function p1(e){var t;return!!e[0].match(/^(typography|variants|breakpoints)$/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/^(mode)$/))||e[0]==="focus"&&e[1]!=="thickness"}const at=(e,t)=>rh(e,t,"Mui"),Ze=(e,t)=>XI(e,t,"Mui"),g1=e=>e&&typeof e=="object"&&Object.keys(e).some(t=>{var n;return(n=t.match)==null?void 0:n.call(t,/^(plain(Hover|Active|Disabled)?(Color|Bg)|outlined(Hover|Active|Disabled)?(Color|Border|Bg)|soft(Hover|Active|Disabled)?(Color|Bg)|solid(Hover|Active|Disabled)?(Color|Bg))$/)}),Oh=(e,t,n)=>{t.includes("Color")&&(e.color=n),t.includes("Bg")&&(e.backgroundColor=n),t.includes("Border")&&(e.borderColor=n)},Rh=(e,t,n)=>{const r={};return Object.entries(t||{}).forEach(([i,o])=>{if(i.match(new RegExp(`${e}(color|bg|border)`,"i"))&&o){const a=n?n(i):o;i.includes("Disabled")&&(r.pointerEvents="none",r.cursor="default",r["--Icon-color"]="currentColor"),i.match(/(Hover|Active|Disabled)/)||(r["--variant-borderWidth"]||(r["--variant-borderWidth"]="0px"),i.includes("Border")&&(r["--variant-borderWidth"]="1px",r.border="var(--variant-borderWidth) solid")),Oh(r,i,a)}}),r},Tt=(e,t)=>{let n={};if(t){const{getCssVar:r,palette:i}=t;Object.entries(i).forEach(o=>{const[a,s]=o;g1(s)&&typeof s=="object"&&(n=D({},n,{[a]:Rh(e,s,l=>`var(--variant-${l}, ${r(`palette-${a}-${l}`,i[a][l])})`)}))})}return n.context=Rh(e,{plainColor:"var(--variant-plainColor)",plainHoverColor:"var(--variant-plainHoverColor)",plainHoverBg:"var(--variant-plainHoverBg)",plainActiveBg:"var(--variant-plainActiveBg)",plainDisabledColor:"var(--variant-plainDisabledColor)",outlinedColor:"var(--variant-outlinedColor)",outlinedBorder:"var(--variant-outlinedBorder)",outlinedHoverColor:"var(--variant-outlinedHoverColor)",outlinedHoverBorder:"var(--variant-outlinedHoverBorder)",outlinedHoverBg:"var(--variant-outlinedHoverBg)",outlinedActiveBg:"var(--variant-outlinedActiveBg)",outlinedDisabledColor:"var(--variant-outlinedDisabledColor)",outlinedDisabledBorder:"var(--variant-outlinedDisabledBorder)",softColor:"var(--variant-softColor)",softBg:"var(--variant-softBg)",softHoverColor:"var(--variant-softHoverColor)",softHoverBg:"var(--variant-softHoverBg)",softActiveBg:"var(--variant-softActiveBg)",softDisabledColor:"var(--variant-softDisabledColor)",softDisabledBg:"var(--variant-softDisabledBg)",solidColor:"var(--variant-solidColor)",solidBg:"var(--variant-solidBg)",solidHoverBg:"var(--variant-solidHoverBg)",solidActiveBg:"var(--variant-solidActiveBg)",solidDisabledColor:"var(--variant-solidDisabledColor)",solidDisabledBg:"var(--variant-solidDisabledBg)"}),n},m1=["cssVarPrefix","breakpoints","spacing","components","variants","shouldSkipGeneratingVar"],v1=["colorSchemes"],b1=(e="joy")=>Zl(e);function y1(e){var t,n,r,i,o,a,s,l,u,d;const f={},{cssVarPrefix:h="joy",breakpoints:p,spacing:m,components:g,variants:b,shouldSkipGeneratingVar:w=p1}=f,S=Ae(f,m1),C=b1(h),I={primary:Ki.blue,neutral:Ki.grey,danger:Ki.red,success:Ki.green,warning:Ki.yellow,common:{white:"#FFF",black:"#000"}},y=X=>{var le;const Z=X.split("-"),he=Z[1],Se=Z[2];return C(X,(le=I[he])==null?void 0:le[Se])},A=X=>({plainColor:y(`palette-${X}-500`),plainHoverBg:y(`palette-${X}-100`),plainActiveBg:y(`palette-${X}-200`),plainDisabledColor:y("palette-neutral-400"),outlinedColor:y(`palette-${X}-500`),outlinedBorder:y(`palette-${X}-300`),outlinedHoverBg:y(`palette-${X}-100`),outlinedActiveBg:y(`palette-${X}-200`),outlinedDisabledColor:y("palette-neutral-400"),outlinedDisabledBorder:y("palette-neutral-200"),softColor:y(`palette-${X}-700`),softBg:y(`palette-${X}-100`),softHoverBg:y(`palette-${X}-200`),softActiveColor:y(`palette-${X}-800`),softActiveBg:y(`palette-${X}-300`),softDisabledColor:y("palette-neutral-400"),softDisabledBg:y("palette-neutral-50"),solidColor:y("palette-common-white"),solidBg:y(`palette-${X}-500`),solidHoverBg:y(`palette-${X}-600`),solidActiveBg:y(`palette-${X}-700`),solidDisabledColor:y("palette-neutral-400"),solidDisabledBg:y("palette-neutral-100")}),E=X=>({plainColor:y(`palette-${X}-300`),plainHoverBg:y(`palette-${X}-800`),plainActiveBg:y(`palette-${X}-700`),plainDisabledColor:y("palette-neutral-500"),outlinedColor:y(`palette-${X}-200`),outlinedBorder:y(`palette-${X}-700`),outlinedHoverBg:y(`palette-${X}-800`),outlinedActiveBg:y(`palette-${X}-700`),outlinedDisabledColor:y("palette-neutral-500"),outlinedDisabledBorder:y("palette-neutral-800"),softColor:y(`palette-${X}-200`),softBg:y(`palette-${X}-800`),softHoverBg:y(`palette-${X}-700`),softActiveColor:y(`palette-${X}-100`),softActiveBg:y(`palette-${X}-600`),softDisabledColor:y("palette-neutral-500"),softDisabledBg:y("palette-neutral-800"),solidColor:y("palette-common-white"),solidBg:y(`palette-${X}-500`),solidHoverBg:y(`palette-${X}-600`),solidActiveBg:y(`palette-${X}-700`),solidDisabledColor:y("palette-neutral-500"),solidDisabledBg:y("palette-neutral-800")}),k={palette:{mode:"light",primary:D({},I.primary,A("primary")),neutral:D({},I.neutral,A("neutral"),{plainColor:y("palette-neutral-700"),plainHoverColor:y("palette-neutral-900"),outlinedColor:y("palette-neutral-700")}),danger:D({},I.danger,A("danger")),success:D({},I.success,A("success")),warning:D({},I.warning,A("warning")),common:{white:"#FFF",black:"#000"},text:{primary:y("palette-neutral-800"),secondary:y("palette-neutral-700"),tertiary:y("palette-neutral-600"),icon:y("palette-neutral-500")},background:{body:y("palette-common-white"),surface:y("palette-neutral-50"),popup:y("palette-common-white"),level1:y("palette-neutral-100"),level2:y("palette-neutral-200"),level3:y("palette-neutral-300"),tooltip:y("palette-neutral-500"),backdrop:`rgba(${C("palette-neutral-darkChannel",yr(I.neutral[900]))} / 0.25)`},divider:`rgba(${C("palette-neutral-mainChannel",yr(I.neutral[500]))} / 0.2)`,focusVisible:y("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"21 21 21",shadowOpacity:"0.08"},F={palette:{mode:"dark",primary:D({},I.primary,E("primary")),neutral:D({},I.neutral,E("neutral"),{plainColor:y("palette-neutral-300"),plainHoverColor:y("palette-neutral-300")}),danger:D({},I.danger,E("danger")),success:D({},I.success,E("success")),warning:D({},I.warning,E("warning")),common:{white:"#FFF",black:"#000"},text:{primary:y("palette-neutral-100"),secondary:y("palette-neutral-300"),tertiary:y("palette-neutral-400"),icon:y("palette-neutral-400")},background:{body:y("palette-common-black"),surface:y("palette-neutral-900"),popup:y("palette-common-black"),level1:y("palette-neutral-800"),level2:y("palette-neutral-700"),level3:y("palette-neutral-600"),tooltip:y("palette-neutral-600"),backdrop:`rgba(${C("palette-neutral-darkChannel",yr(I.neutral[50]))} / 0.25)`},divider:`rgba(${C("palette-neutral-mainChannel",yr(I.neutral[500]))} / 0.16)`,focusVisible:y("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"0 0 0",shadowOpacity:"0.6"},Y='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',O=D({body:`"Inter", ${C(`fontFamily-fallback, ${Y}`)}`,display:`"Inter", ${C(`fontFamily-fallback, ${Y}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:Y},S.fontFamily),T=D({sm:300,md:500,lg:600,xl:700},S.fontWeight),N=D({xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem"},S.fontSize),V=D({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},S.lineHeight),j=(t=(n=S.colorSchemes)==null||(n=n.light)==null?void 0:n.shadowRing)!=null?t:k.shadowRing,$=(r=(i=S.colorSchemes)==null||(i=i.light)==null?void 0:i.shadowChannel)!=null?r:k.shadowChannel,M=(o=(a=S.colorSchemes)==null||(a=a.light)==null?void 0:a.shadowOpacity)!=null?o:k.shadowOpacity,H={colorSchemes:{light:k,dark:F},fontSize:N,fontFamily:O,fontWeight:T,focus:{thickness:"2px",selector:`&.${at("","focusVisible")}, &:focus-visible`,default:{outlineOffset:`var(--focus-outline-offset, ${C("focus-thickness",(s=(l=S.focus)==null?void 0:l.thickness)!=null?s:"2px")})`,outline:`${C("focus-thickness",(u=(d=S.focus)==null?void 0:d.thickness)!=null?u:"2px")} solid ${C("palette-focusVisible",I.primary[500])}`}},lineHeight:V,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${C("shadowRing",j)}, 0px 1px 2px 0px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)})`,sm:`${C("shadowRing",j)}, 0px 1px 2px 0px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)}), 0px 2px 4px 0px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)})`,md:`${C("shadowRing",j)}, 0px 2px 8px -2px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)}), 0px 6px 12px -2px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)})`,lg:`${C("shadowRing",j)}, 0px 2px 8px -2px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)}), 0px 12px 16px -4px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)})`,xl:`${C("shadowRing",j)}, 0px 2px 8px -2px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)}), 0px 20px 24px -4px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,snackbar:1400,tooltip:1500},typography:{h1:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-xl, ${T.xl}`),fontSize:C(`fontSize-xl4, ${N.xl4}`),lineHeight:C(`lineHeight-xs, ${V.xs}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},h2:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-xl, ${T.xl}`),fontSize:C(`fontSize-xl3, ${N.xl3}`),lineHeight:C(`lineHeight-xs, ${V.xs}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},h3:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-lg, ${T.lg}`),fontSize:C(`fontSize-xl2, ${N.xl2}`),lineHeight:C(`lineHeight-xs, ${V.xs}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},h4:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-lg, ${T.lg}`),fontSize:C(`fontSize-xl, ${N.xl}`),lineHeight:C(`lineHeight-md, ${V.md}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},"title-lg":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-lg, ${T.lg}`),fontSize:C(`fontSize-lg, ${N.lg}`),lineHeight:C(`lineHeight-xs, ${V.xs}`),color:C(`palette-text-primary, ${k.palette.text.primary}`)},"title-md":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-md, ${T.md}`),fontSize:C(`fontSize-md, ${N.md}`),lineHeight:C(`lineHeight-md, ${V.md}`),color:C(`palette-text-primary, ${k.palette.text.primary}`)},"title-sm":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-md, ${T.md}`),fontSize:C(`fontSize-sm, ${N.sm}`),lineHeight:C(`lineHeight-sm, ${V.sm}`),color:C(`palette-text-primary, ${k.palette.text.primary}`)},"body-lg":{fontFamily:C(`fontFamily-body, ${O.body}`),fontSize:C(`fontSize-lg, ${N.lg}`),lineHeight:C(`lineHeight-md, ${V.md}`),color:C(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-md":{fontFamily:C(`fontFamily-body, ${O.body}`),fontSize:C(`fontSize-md, ${N.md}`),lineHeight:C(`lineHeight-md, ${V.md}`),color:C(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-sm":{fontFamily:C(`fontFamily-body, ${O.body}`),fontSize:C(`fontSize-sm, ${N.sm}`),lineHeight:C(`lineHeight-md, ${V.md}`),color:C(`palette-text-tertiary, ${k.palette.text.tertiary}`)},"body-xs":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-md, ${T.md}`),fontSize:C(`fontSize-xs, ${N.xs}`),lineHeight:C(`lineHeight-md, ${V.md}`),color:C(`palette-text-tertiary, ${k.palette.text.tertiary}`)}}},Q=S?$n(H,S):H,{colorSchemes:te}=Q,R=Ae(Q,v1),L=D({colorSchemes:te},R,{breakpoints:wh(p!=null?p:{}),components:$n({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:X,theme:le})=>{var Z;const he=X.instanceFontSize;return D({margin:"var(--Icon-margin)"},X.fontSize&&X.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${le.vars.fontSize[X.fontSize]})`},!X.htmlColor&&D({color:`var(--Icon-color, ${L.vars.palette.text.icon})`},X.color&&X.color!=="inherit"&&le.vars.palette[X.color]&&{color:`rgba(${(Z=le.vars.palette[X.color])==null?void 0:Z.mainChannel} / 1)`}),he&&he!=="inherit"&&{"--Icon-fontSize":le.vars.fontSize[he]})}}}},g),cssVarPrefix:h,getCssVar:C,spacing:Eh(m)});function U(X,le){Object.keys(le).forEach(Z=>{const he={main:"500",light:"200",dark:"700"};X==="dark"&&(he.main=400),!le[Z].mainChannel&&le[Z][he.main]&&(le[Z].mainChannel=yr(le[Z][he.main])),!le[Z].lightChannel&&le[Z][he.light]&&(le[Z].lightChannel=yr(le[Z][he.light])),!le[Z].darkChannel&&le[Z][he.dark]&&(le[Z].darkChannel=yr(le[Z][he.dark]))})}Object.entries(L.colorSchemes).forEach(([X,le])=>{U(X,le.palette)});const W={prefix:h,shouldSkipGeneratingVar:w},{vars:re,generateCssVars:se}=f1(D({colorSchemes:te},R),W);L.vars=re,L.generateCssVars=se,L.unstable_sxConfig=D({},h1,void 0),L.unstable_sx=function(le){return Aa({sx:le,theme:this})},L.getColorSchemeSelector=X=>X==="light"?"&":`&[data-joy-color-scheme="${X}"], [data-joy-color-scheme="${X}"] &`;const ae={getCssVar:C,palette:L.colorSchemes.light.palette};return L.variants=$n({plain:Tt("plain",ae),plainHover:Tt("plainHover",ae),plainActive:Tt("plainActive",ae),plainDisabled:Tt("plainDisabled",ae),outlined:Tt("outlined",ae),outlinedHover:Tt("outlinedHover",ae),outlinedActive:Tt("outlinedActive",ae),outlinedDisabled:Tt("outlinedDisabled",ae),soft:Tt("soft",ae),softHover:Tt("softHover",ae),softActive:Tt("softActive",ae),softDisabled:Tt("softDisabled",ae),solid:Tt("solid",ae),solidHover:Tt("solidHover",ae),solidActive:Tt("solidActive",ae),solidDisabled:Tt("solidDisabled",ae)},b),L.palette=D({},L.colorSchemes.light.palette,{colorScheme:"light"}),L.shouldSkipGeneratingVar=w,L.applyStyles=kh,L}const Lh=y1(),be=i1({defaultTheme:Lh,themeId:Ch});function ft({props:e,name:t}){return a1({props:e,name:t,defaultTheme:D({},Lh,{components:{}}),themeId:Ch})}function x1(e){return at("MuiAccordion",e)}const C1=Ze("MuiAccordion",["root","expanded","disabled"]),w1=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],I1=["component","slots","slotProps"],S1=["component"];function Ie(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:s}=t,l=Ae(t,w1),{component:u,slots:d={[e]:void 0},slotProps:f={[e]:void 0}}=o,h=Ae(o,I1),p=d[e]||r,m=MI(f[e],i),g=NI(D({className:n},l,{externalForwardedProps:e==="root"?h:void 0,externalSlotProps:m})),{props:{component:b},internalRef:w}=g,S=Ae(g.props,S1),C=sn(w,m==null?void 0:m.ref,t.ref),I=a?a(S):{},y=D({},i,I),A=e==="root"?b||u:b,E=LI(p,D({},e==="root"&&!u&&!d[e]&&s,e!=="root"&&!d[e]&&s,S,A&&{as:A},{ref:C}),y);return Object.keys(I).forEach(k=>{delete E[k]}),[p,E]}const nc=G.createContext({});function A1(e){return at("MuiListItem",e)}const Mh=Ze("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),ka=G.createContext(!1),rc=G.createContext(!1),Bh=G.createContext(!1),$h=G.createContext(void 0),T1=G.createContext(void 0),Nh=G.createContext(void 0),E1=["component","className","children","nested","sticky","variant","color","startAction","endAction","role","slots","slotProps"],k1=e=>{const{sticky:t,nested:n,nesting:r,variant:i,color:o}=e,a={root:["root",n&&"nested",r&&"nesting",t&&"sticky",o&&`color${ye(o)}`,i&&`variant${ye(i)}`],startAction:["startAction"],endAction:["endAction"]};return dt(a,A1,{})},ic=be("li")(({theme:e,ownerState:t})=>{var n;return[!t.nested&&{"--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItemButton-marginBlock":"calc(-1 * var(--ListItem-paddingY))",alignItems:"center",gap:"var(--ListItem-gap)",marginInline:"var(--ListItem-marginInline)"},t.nested&&{"--NestedList-marginRight":"calc(-1 * var(--ListItem-paddingRight))","--NestedList-marginLeft":"calc(-1 * var(--ListItem-paddingLeft))","--NestedListItem-paddingLeft":"calc(var(--ListItem-paddingLeft) + var(--List-nestedInsetStart))","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItem-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",flexDirection:"column"},D({"--unstable_actionRadius":"calc(var(--ListItem-radius) - var(--variant-borderWidth, 0px))"},t.startAction&&{"--unstable_startActionWidth":"2rem"},t.endAction&&{"--unstable_endActionWidth":"2.5rem"},{boxSizing:"border-box",borderRadius:"var(--ListItem-radius)",display:"var(--_ListItem-display)","&:not([hidden])":{"--_ListItem-display":"var(--_List-markerDisplay, flex)"},flex:"none",listStyleType:"var(--_List-markerType, disc)",position:"relative",paddingBlockStart:t.nested?0:"var(--ListItem-paddingY)",paddingBlockEnd:t.nested?0:"var(--ListItem-paddingY)",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)"},t["data-first-child"]===void 0&&D({},t.row?{marginInlineStart:"var(--List-gap)"}:{marginBlockStart:"var(--List-gap)"}),t.row&&t.wrap&&{marginInlineStart:"var(--List-gap)",marginBlockStart:"var(--List-gap)"},{minBlockSize:"var(--ListItem-minHeight)"},t.sticky&&{position:"sticky",top:"var(--ListItem-stickyTop, 0px)",zIndex:1,background:`var(--ListItem-stickyBackground, ${e.vars.palette.background.body})`},{[`.${Mh.nested} > &`]:{"--_ListItem-display":"flex"}}),(n=e.variants[t.variant])==null?void 0:n[t.color]]}),_1=be(ic,{name:"JoyListItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),P1=be("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",left:0,transform:"translate(var(--ListItem-startActionTranslateX), -50%)",zIndex:1})),D1=be("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",right:0,transform:"translate(var(--ListItem-endActionTranslateX), -50%)"})),Fh=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyListItem"}),i=G.useContext(Nh),o=G.useContext($h),a=G.useContext(rc),s=G.useContext(Bh),l=G.useContext(ka),{component:u,className:d,children:f,nested:h=!1,sticky:p=!1,variant:m="plain",color:g="neutral",startAction:b,endAction:w,role:S,slots:C={},slotProps:I={}}=r,y=Ae(r,E1),[A,E]=G.useState(""),[k,F]=(o==null?void 0:o.split(":"))||["",""],Y=u||(k&&!k.match(/^(ul|ol|menu)$/)?"div":void 0);let O=i==="menu"?"none":void 0;o&&(O={menu:"none",menubar:"none",group:"presentation"}[F]),S&&(O=S);const T=D({},r,{sticky:p,startAction:b,endAction:w,row:a,wrap:s,variant:m,color:g,nesting:l,nested:h,component:Y,role:O}),N=k1(T),V=D({},y,{component:Y,slots:C,slotProps:I}),[j,$]=Ie("root",{additionalProps:{role:O},ref:n,className:Bn(N.root,d),elementType:_1,externalForwardedProps:V,ownerState:T}),[M,H]=Ie("startAction",{className:N.startAction,elementType:P1,externalForwardedProps:V,ownerState:T}),[Q,te]=Ie("endAction",{className:N.endAction,elementType:D1,externalForwardedProps:V,ownerState:T});return c.jsx(T1.Provider,{value:E,children:c.jsx(ka.Provider,{value:h?A||!0:!1,children:c.jsxs(j,D({},$,{children:[b&&c.jsx(M,D({},H,{children:b})),G.Children.map(f,(R,L)=>{var U;return G.isValidElement(R)?G.cloneElement(R,D({},L===0&&{"data-first-child":""},Jf(R,["ListItem"])&&{component:((U=R.props)==null?void 0:U.component)||"div"})):R}),w&&c.jsx(Q,D({},te,{children:w}))]}))})})});Fh.muiName="ListItem";const zh=Fh;function O1(e){return at("MuiAccordionDetails",e)}const Cr=Ze("MuiAccordionDetails",["root","content","expanded"]),R1=["accordionId","component","color","children","defaultExpanded","disabled","expanded","onChange","variant","slots","slotProps"],L1=e=>{const{variant:t,color:n,expanded:r,disabled:i}=e,o={root:["root",r&&"expanded",i&&"disabled",n&&`color${ye(n)}`,t&&`variant${ye(t)}`]};return dt(o,x1,{})},M1=be(ic,{name:"JoyAccordion",slot:"Root",overridesResolver:(e,t)=>t.root})({borderBottom:"var(--Accordion-borderBottom)","&[data-first-child]":{"--ListItem-radius":"var(--unstable_List-childRadius) var(--unstable_List-childRadius) 0 0"},"&[data-last-child]":{"--ListItem-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)",'& [aria-expanded="true"]':{"--ListItem-radius":"0"},[`& .${Cr.root}`]:{"--AccordionDetails-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)"}},"&:not([data-first-child]):not([data-last-child])":{"--ListItem-radius":"0"}}),B1=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyAccordion"}),{accordionId:i,component:o="div",color:a="neutral",children:s,defaultExpanded:l=!1,disabled:u=!1,expanded:d,onChange:f,variant:h="plain",slots:p={},slotProps:m={}}=r,g=Ae(r,R1),b=Hi(i),[w,S]=Bl({controlled:d,default:l,name:"Accordion",state:"expanded"}),C=G.useCallback(Y=>{S(!w),f&&f(Y,!w)},[w,f,S]),I=G.useMemo(()=>({accordionId:b,expanded:w,disabled:u,toggle:C}),[b,w,u,C]),y=D({},g,{component:o,slots:p,slotProps:m}),A=D({},r,{component:o,color:a,variant:h,expanded:w,disabled:u,nested:!0}),E=L1(A),[k,F]=Ie("root",{ref:n,className:E.root,elementType:M1,externalForwardedProps:y,ownerState:A});return c.jsx(nc.Provider,{value:I,children:c.jsx(k,D({},F,{children:G.Children.map(s,(Y,O)=>G.isValidElement(Y)&&O===0?G.cloneElement(Y,{"data-first-child":""}):Y)}))})});function $1(e){return at("MuiAccordionGroup",e)}Ze("MuiAccordionGroup",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const N1={"--NestedList-marginRight":"0px","--NestedList-marginLeft":"0px","--NestedListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px"};function oc(e){const{children:t,nested:n,row:r=!1,wrap:i=!1}=e,o=c.jsx(rc.Provider,{value:r,children:c.jsx(Bh.Provider,{value:i,children:G.Children.map(t,(a,s)=>G.isValidElement(a)?G.cloneElement(a,D({},s===0&&{"data-first-child":""},s===G.Children.count(t)-1&&{"data-last-child":""})):a)})});return n===void 0?o:c.jsx(ka.Provider,{value:n,children:o})}const ac=({theme:e,ownerState:t},n)=>{let r={};function i(o){if(typeof o=="function"){const a=o(e);i(a)}else Array.isArray(o)?o.forEach(a=>{typeof a!="boolean"&&i(a)}):typeof o=="object"&&(r=D({},r,o))}return t.sx&&(i(t.sx),n.forEach(o=>{const a=r[o];if(typeof a=="string"||typeof a=="number")if(o==="borderRadius")if(typeof a=="number")r[o]=`${a}px`;else{var s;r[o]=((s=e.vars)==null?void 0:s.radius[a])||a}else["p","padding","m","margin"].indexOf(o)!==-1&&typeof a=="number"?r[o]=e.spacing(a):r[o]=a;else typeof a=="function"?r[o]=a(e):r[o]=void 0})),r};function F1(e){return at("MuiList",e)}Ze("MuiList",["root","nesting","scoped","sizeSm","sizeMd","sizeLg","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]);const z1=G.createContext(void 0),j1=["component","className","children","size","orientation","wrap","variant","color","role","slots","slotProps"],U1=e=>{const{variant:t,color:n,size:r,nesting:i,orientation:o,instanceSize:a}=e,s={root:["root",o,t&&`variant${ye(t)}`,n&&`color${ye(n)}`,!a&&!i&&r&&`size${ye(r)}`,a&&`size${ye(a)}`,i&&"nesting"]};return dt(s,F1,{})},sc=be("ul")(({theme:e,ownerState:t})=>{var n;const{p:r,padding:i,borderRadius:o}=ac({theme:e,ownerState:t},["p","padding","borderRadius"]);function a(s){return s==="sm"?{"--ListDivider-gap":"0.25rem","--ListItem-minHeight":"2rem","--ListItem-paddingY":"3px","--ListItem-paddingX":t.marker?"3px":"0.5rem","--ListItem-gap":"0.5rem","--ListItemDecorator-size":t.orientation==="horizontal"?"1.5rem":"2rem","--Icon-fontSize":e.vars.fontSize.lg}:s==="md"?{"--ListDivider-gap":"0.375rem","--ListItem-minHeight":"2.25rem","--ListItem-paddingY":"0.25rem","--ListItem-paddingX":t.marker?"0.25rem":"0.75rem","--ListItem-gap":"0.625rem","--ListItemDecorator-size":t.orientation==="horizontal"?"1.75rem":"2.5rem","--Icon-fontSize":e.vars.fontSize.xl}:s==="lg"?{"--ListDivider-gap":"0.5rem","--ListItem-minHeight":"2.75rem","--ListItem-paddingY":"0.375rem","--ListItem-paddingX":t.marker?"0.5rem":"1rem","--ListItem-gap":"0.75rem","--ListItemDecorator-size":t.orientation==="horizontal"?"2.25rem":"3rem","--Icon-fontSize":e.vars.fontSize.xl2}:{}}return[t.nesting&&D({},a(t.instanceSize),{"--ListItem-paddingRight":"var(--ListItem-paddingX)","--ListItem-paddingLeft":"var(--NestedListItem-paddingLeft)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px",padding:0},t.marker&&{paddingInlineStart:"calc(3ch - var(--_List-markerDeduct, 0px))"},{marginInlineStart:"var(--NestedList-marginLeft)",marginInlineEnd:"var(--NestedList-marginRight)",marginBlockStart:"var(--List-gap)",marginBlockEnd:"initial"}),!t.nesting&&D({},a(t.size),{"--List-gap":"0px","--List-nestedInsetStart":"0px","--ListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItem-paddingRight":"var(--ListItem-paddingX)"},t.marker&&{"--_List-markerDeduct":"1ch"},{"--unstable_List-childRadius":"calc(max(var(--List-radius) - var(--List-padding), min(var(--List-padding) / 2, var(--List-radius) / 2)) - var(--variant-borderWidth, 0px))","--ListItem-radius":"var(--unstable_List-childRadius)","--ListItem-startActionTranslateX":"calc(0.5 * var(--ListItem-paddingLeft))","--ListItem-endActionTranslateX":"calc(-0.5 * var(--ListItem-paddingRight))",margin:"initial"},e.typography[`body-${t.size}`],t.orientation==="horizontal"?D({},t.wrap?{padding:"var(--List-padding)",marginInlineStart:"calc(-1 * var(--List-gap))",marginBlockStart:"calc(-1 * var(--List-gap))"}:{paddingInline:"var(--List-padding, var(--ListDivider-gap))",paddingBlock:"var(--List-padding)"}):{paddingBlock:"var(--List-padding, var(--ListDivider-gap))",paddingInline:"var(--List-padding)"},t.marker&&{paddingInlineStart:"3ch"}),D({boxSizing:"border-box",borderRadius:"var(--List-radius)",listStyle:"none",display:"flex",flexDirection:t.orientation==="horizontal"?"row":"column"},t.wrap&&{flexWrap:"wrap"},t.marker&&{"--_List-markerDisplay":"list-item","--_List-markerType":t.marker,lineHeight:"calc(var(--ListItem-minHeight) - 2 * var(--ListItem-paddingY))"},{flexGrow:1,position:"relative"},(n=e.variants[t.variant])==null?void 0:n[t.color],{"--unstable_List-borderWidth":"var(--variant-borderWidth, 0px)"},o!==void 0&&{"--List-radius":o},r!==void 0&&{"--List-padding":r},i!==void 0&&{"--List-padding":i})]}),V1=be(sc,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({}),H1=G.forwardRef(function(t,n){var r;const i=G.useContext(ka),o=G.useContext(Nh),a=G.useContext(z1),s=ft({props:t,name:"JoyList"}),{component:l,className:u,children:d,size:f,orientation:h="vertical",wrap:p=!1,variant:m="plain",color:g="neutral",role:b,slots:w={},slotProps:S={}}=s,C=Ae(s,j1),I=f||((r=t.size)!=null?r:"md");let y;o&&(y="group"),a&&(y="presentation"),b&&(y=b);const A=D({},s,{instanceSize:t.size,size:I,nesting:i,orientation:h,wrap:p,variant:m,color:g,role:y}),E=U1(A),k=D({},C,{component:l,slots:w,slotProps:S}),[F,Y]=Ie("root",{ref:n,className:Bn(E.root,u),elementType:V1,externalForwardedProps:k,ownerState:A,additionalProps:{as:l,role:y,"aria-labelledby":typeof i=="string"?i:void 0}});return c.jsx(F,D({},Y,{children:c.jsx($h.Provider,{value:`${typeof l=="string"?l:""}:${y||""}`,children:c.jsx(oc,{row:h==="horizontal",wrap:p,children:d})})}))}),W1=["component","color","children","disableDivider","variant","transition","size","slots","slotProps"],G1=e=>{const{variant:t,color:n,size:r}=e,i={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`,r&&`size${ye(r)}`]};return dt(i,$1,{})},Y1=be(sc,{name:"JoyAccordionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{let n={};return t.transition&&(typeof t.transition=="string"&&(n={"--AccordionDetails-transition":`grid-template-rows ${t.transition}, padding-block ${t.transition}`}),typeof t.transition=="object"&&(n={"--AccordionDetails-transition":`grid-template-rows ${t.transition.initial}, padding-block ${t.transition.initial}`,[`& .${Cr.root}.${Cr.expanded}`]:{"--AccordionDetails-transition":`grid-template-rows ${t.transition.expanded}, padding-block ${t.transition.expanded}`}})),D({"--List-padding":"0px","--ListDivider-gap":"0px"},n,!t.disableDivider&&{[`& .${C1.root}:not([data-last-child])`]:{"--Accordion-borderBottom":`1px solid ${e.vars.palette.divider}`}})}),K1=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyAccordionGroup"}),{component:i="div",color:o="neutral",children:a,disableDivider:s=!1,variant:l="plain",transition:u="0.2s ease",size:d="md",slots:f={},slotProps:h={}}=r,p=Ae(r,W1),m=D({},p,{component:i,slots:f,slotProps:h}),g=D({},r,{component:i,color:o,disableDivider:s,variant:l,transition:u,size:d}),b=G1(g),[w,S]=Ie("root",{ref:n,className:b.root,elementType:Y1,externalForwardedProps:m,ownerState:g});return c.jsx(w,D({},S,{children:c.jsx(oc,{children:a})}))}),Q1=["component","children","color","variant","slots","slotProps"],q1=e=>{const{expanded:t}=e;return dt({root:["root",t&&"expanded"],content:["content",t&&"expanded"]},O1,{})},J1=be("div",{name:"JoyAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n;return D({overflow:"hidden",borderRadius:"var(--AccordionDetails-radius)",display:"grid",gridTemplateRows:"1fr",marginInline:"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",transition:"var(--AccordionDetails-transition)"},(n=t.variants[e.variant])==null?void 0:n[e.color],{[`&:not(.${Cr.expanded})`]:{gridTemplateRows:"0fr"}})}),X1=be("div",{name:"JoyAccordionDetails",slot:"Content",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",overflow:"hidden",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)",paddingBlockStart:"calc(var(--ListItem-paddingY) / 2)",paddingBlockEnd:"calc(2.5 * var(--ListItem-paddingY))",transition:"var(--AccordionDetails-transition)",[`&:not(.${Cr.expanded})`]:{paddingBlock:0}}),Z1=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyAccordionDetails"}),{component:i="div",children:o,color:a="neutral",variant:s="plain",slots:l={},slotProps:u={}}=r,d=Ae(r,Q1),{accordionId:f,expanded:h=!1}=G.useContext(nc),p=G.useRef(null),m=sn(p,n);G.useEffect(()=>{p.current&&p.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])').forEach(E=>{if(h){const k=E.getAttribute("data-prev-tabindex"),F=E.getAttribute("tabindex");F&&k&&(E.setAttribute("tabindex",k),E.removeAttribute("data-prev-tabindex")),!k&&!F&&E.removeAttribute("tabindex")}else E.setAttribute("data-prev-tabindex",E.getAttribute("tabindex")||""),E.setAttribute("tabindex","-1")})},[h]);const g=D({},d,{component:i,slots:l,slotProps:u}),b=D({},r,{component:i,color:a,variant:s,expanded:h,nesting:!0}),w=q1(b),[S,C]=Ie("root",{ref:m,className:w.root,elementType:J1,externalForwardedProps:g,additionalProps:{id:`${f}-details`,"aria-labelledby":`${f}-summary`,role:"region",hidden:h?void 0:!0},ownerState:b}),[I,y]=Ie("content",{className:w.content,elementType:X1,externalForwardedProps:g,ownerState:b});return c.jsx(S,D({},C,{children:c.jsx(I,D({},y,{children:o}))}))});function eT(e){return at("MuiAccordionSummary",e)}const _a=Ze("MuiAccordionSummary",["root","button","indicator","disabled","expanded"]),Pa=Ze("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]),tT=G.createContext("horizontal"),lc=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,s;return D({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",font:"inherit",display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"stretch",gap:"var(--ListItem-gap)"},t.orientation==="vertical"&&{flexDirection:"column",justifyContent:"center"},{textAlign:"initial",textDecoration:"initial",backgroundColor:"initial",cursor:"pointer",marginInline:"var(--ListItemButton-marginInline)",marginBlock:"var(--ListItemButton-marginBlock)"},t["data-first-child"]===void 0&&{marginInlineStart:t.row?"var(--List-gap)":void 0,marginBlockStart:t.row?void 0:"var(--List-gap)"},{paddingBlock:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px))",paddingInlineStart:"calc(var(--ListItem-paddingLeft) + var(--ListItem-startActionWidth, var(--unstable_startActionWidth, 0px)))",paddingInlineEnd:"calc(var(--ListItem-paddingRight) + var(--ListItem-endActionWidth, var(--unstable_endActionWidth, 0px)))",minBlockSize:"var(--ListItem-minHeight)",border:"1px solid transparent",borderRadius:"var(--ListItem-radius)",flex:"var(--unstable_ListItem-flex, none)",fontSize:"inherit",lineHeight:"inherit",minInlineSize:0,[e.focus.selector]:D({},e.focus.default,{zIndex:1})},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:active":(r=e.variants[`${t.variant}Active`])==null?void 0:r[t.color],[`.${Mh.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${Pa.selected}`]:D({},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${Pa.selected}, [aria-selected="true"])`]:{"&:hover":(o=e.variants[`${t.variant}Hover`])==null?void 0:o[t.color],"&:active":(a=e.variants[`${t.variant}Active`])==null?void 0:a[t.color]},[`&.${Pa.disabled}`]:D({},(s=e.variants[`${t.variant}Disabled`])==null?void 0:s[t.color])})});be(lc,{name:"JoyListItemButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>D({},!e.row&&{[`&.${Pa.selected}`]:{fontWeight:t.vars.fontWeight.md}}));function nT(e){return at("MuiSvgIcon",e)}Ze("MuiSvgIcon",["root","colorInherit","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","fontSizeInherit","fontSizeXs","fontSizeSm","fontSizeMd","fontSizeLg","fontSizeXl","fontSizeXl2","fontSizeXl3","fontSizeXl4","sizeSm","sizeMd","sizeLg"]);const rT=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],iT=e=>{const{color:t,size:n,fontSize:r}=e,i={root:["root",t&&t!=="inherit"&&`color${ye(t)}`,n&&`size${ye(n)}`,r&&`fontSize${ye(r)}`]};return dt(i,nT,{})},jh={sm:"xl",md:"xl2",lg:"xl3"},oT=be("svg",{name:"JoySvgIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return D({},t.instanceSize&&{"--Icon-fontSize":e.vars.fontSize[jh[t.instanceSize]]},t.instanceFontSize&&t.instanceFontSize!=="inherit"&&{"--Icon-fontSize":e.vars.fontSize[t.instanceFontSize]},{userSelect:"none",margin:"var(--Icon-margin)",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,fontSize:`var(--Icon-fontSize, ${e.vars.fontSize[jh[t.size]]||"unset"})`},t.fontSize&&t.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${e.fontSize[t.fontSize]})`},!t.htmlColor&&D({color:`var(--Icon-color, ${e.vars.palette.text.icon})`},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&e.vars.palette[t.color]&&{color:`rgba(${(n=e.vars.palette[t.color])==null?void 0:n.mainChannel} / 1)`}))}),Uh=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoySvgIcon"}),{children:i,className:o,color:a,component:s="svg",fontSize:l,htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24",size:p="md",slots:m={},slotProps:g={}}=r,b=Ae(r,rT),w=G.isValidElement(i)&&i.type==="svg",S=D({},r,{color:a,component:s,size:p,instanceSize:t.size,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:w}),C=iT(S),I=D({},b,{component:s,slots:m,slotProps:g}),[y,A]=Ie("root",{ref:n,className:Bn(C.root,o),elementType:oT,externalForwardedProps:I,ownerState:S,additionalProps:D({color:u,focusable:!1},f&&{role:"img"},!f&&{"aria-hidden":!0},!d&&{viewBox:h},w&&i.props)});return c.jsxs(y,D({},A,{children:[w?i.props.children:i,f?c.jsx("title",{children:f}):null]}))});function cc(e,t){function n(r,i){return c.jsx(Uh,D({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=Uh.muiName,G.memo(G.forwardRef(n))}const aT=cc(c.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");var Vh;const sT=["component","color","children","indicator","variant","slots","slotProps"],lT=e=>{const{disabled:t,expanded:n}=e;return dt({root:["root",t&&"disabled",n&&"expanded"],button:["button",t&&"disabled",n&&"expanded"],indicator:["indicator",t&&"disabled",n&&"expanded"]},eT,{})},cT=be(ic,{name:"JoyAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({fontWeight:e.vars.fontWeight.md,gap:"calc(var(--ListItem-paddingX, 0.75rem) + 0.25rem)",[`&.${_a.expanded}`]:{"--Icon-color":"currentColor"}})),uT=be(lc,{name:"JoyAccordionSummary",slot:"Button",overridesResolver:(e,t)=>t.button})({gap:"inherit",fontWeight:"inherit",justifyContent:"space-between",font:"inherit","&:focus-visible":{zIndex:1},[`.${_a.root} &`]:{"--unstable_ListItem-flex":"1 0 0%"}}),dT=be("span",{name:"JoyAccordionSummary",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})({display:"inline-flex",[`&.${_a.expanded}`]:{transform:"rotate(180deg)"}}),fT=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyAccordionSummary"}),{component:i="div",color:o="neutral",children:a,indicator:s=Vh||(Vh=c.jsx(aT,{})),variant:l="plain",slots:u={},slotProps:d={}}=r,f=Ae(r,sT),{accordionId:h,disabled:p=!1,expanded:m=!1,toggle:g}=G.useContext(nc),b=D({},f,{component:i,slots:u,slotProps:d}),w=D({},r,{component:i,color:o,disabled:p,expanded:m,variant:l}),S=Y=>{if(g&&g(Y),typeof d.button=="function"){var O,T;(O=d.button(w))==null||(T=O.onClick)==null||T.call(O,Y)}else{var N,V;(N=d.button)==null||(V=N.onClick)==null||V.call(N,Y)}},C=lT(w),[I,y]=Ie("root",{ref:n,className:C.root,elementType:cT,externalForwardedProps:b,ownerState:w}),[A,E]=Ie("button",{ref:n,className:C.button,elementType:uT,externalForwardedProps:b,additionalProps:{component:"button",id:`${h}-summary`,"aria-expanded":m?"true":"false","aria-controls":`${h}-details`,disabled:p,type:"button",onClick:S},ownerState:w}),[k,F]=Ie("indicator",{ref:n,className:C.indicator,elementType:dT,externalForwardedProps:b,ownerState:w});return c.jsx(I,D({},y,{children:c.jsxs(A,D({},E,{children:[a,s&&c.jsx(k,D({},F,{children:s}))]}))}))}),hT=({label:e,disabled:t,children:n})=>(t=t||!1,c.jsx(K1,{variant:"outlined",transition:"0.2s",sx:{borderRadius:"md",overflow:"hidden",[`& .${_a.button}:hover`]:{backgroundColor:"#fff"},[`& .${Cr.content}`]:{boxShadow:r=>`inset 0 1px ${r.vars.palette.divider}`,[`&.${Cr.expanded}`]:{paddingBlock:"0.75rem"}},marginBottom:"8px",backgroundColor:"#fff"},children:c.jsxs(B1,{disabled:t,children:[c.jsx(fT,{children:e}),c.jsx(Z1,{variant:"soft",children:n})]})})),uc={toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["blockquote","code-block"],[{direction:"rtl"}],[{script:"sub"},{script:"super"}],[{color:[]},{background:[]}],[{font:[]}],["link","image","video"],["clean"]]},dc=({label:e,property:t,value:n,defaultValue:r,placeholder:i,description:o,onChange:a})=>{const s=(l,u,d,f)=>{d!=="api"&&(f.getText().trim()===""?a(""):a(l))};return t==="description"?c.jsxs(v.FormControl,{sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{color:"primary",children:e}),c.jsx(xi,{value:n||r,defaultValue:r,onChange:s,modules:uc,placeholder:i,className:"ql-container ql-toolbar"})]}):t==="mini_games_explanation"?c.jsxs(v.FormControl,{children:[c.jsx(v.FormLabel,{color:"primary",children:e}),c.jsx(xi,{value:n||r,defaultValue:r,onChange:s,modules:uc,placeholder:i,className:"ql-container ql-toolbar"}),c.jsx(v.FormHelperText,{children:o})]}):c.jsx(v.Box,{sx:()=>({marginBottom:"16px"}),children:c.jsx(xi,{value:n||r,defaultValue:r,onChange:s,modules:uc,placeholder:i})})},pT=e=>{const t=n=>{n.persist(),e.onChange(n.target.value)};return c.jsxs(v.Tabs,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[c.jsxs(v.TabList,{sx:{borderRadius:0},tabFlex:"auto",children:[c.jsx(v.Tab,{children:e.labels.richText}),c.jsx(v.Tab,{children:e.labels.plainText})]}),c.jsx(v.TabPanel,{value:0,sx:{px:0},children:c.jsx(dc,{label:"",placeholder:"",defaultValue:e.defaultValue,property:"ad_content",onChange:e.onChange})}),c.jsx(v.TabPanel,{value:1,sx:{px:0},children:c.jsx(v.Textarea,{defaultValue:e.defaultValue,minRows:"7",onChange:t,sx:{marginBottom:"16px",overflow:"auto",resize:"vertical"}})})]})},gT=({label:e,defaultValue:t,values:n,description:r,onChange:i})=>{const o=(a,s)=>{i(s||"")};return c.jsxs(v.FormControl,{sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{color:"primary",children:e}),c.jsx(v.Select,{defaultValue:t,onChange:o,children:n.map((a,s)=>c.jsx(v.Option,{value:a,children:a},`basic-select-${a}-${s}`))}),r?c.jsx(v.FormHelperText,{children:r}):c.jsx(c.Fragment,{})]})},fc=G.createContext("md");function mT(e){return at("MuiTabs",e)}Ze("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const vT=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],bT=e=>{const{orientation:t,variant:n,color:r,size:i}=e,o={root:["root",t,n&&`variant${ye(n)}`,r&&`color${ye(r)}`,i&&`size${ye(i)}`]};return dt(o,mT,{})},yT=be("div",{name:"JoyTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r;const i=(n=t.variants[e.variant])==null?void 0:n[e.color],{bgcolor:o,backgroundColor:a,background:s,p:l,padding:u}=ac({theme:t,ownerState:e},["bgcolor","backgroundColor","background","p","padding"]),d=tr(t,`palette.${o}`)||o||tr(t,`palette.${a}`)||a||s||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||t.vars.palette.background.surface;return D({},e.size==="sm"&&{"--Tabs-spacing":"0.75rem"},e.size==="md"&&{"--Tabs-spacing":"1rem"},e.size==="lg"&&{"--Tabs-spacing":"1.25rem"},{"--Tab-indicatorThickness":"2px","--Icon-color":e.color!=="neutral"||e.variant==="solid"?"currentColor":t.vars.palette.text.icon,"--TabList-stickyBackground":d==="transparent"?"initial":d,display:"flex",flexDirection:"column"},e.orientation==="vertical"&&{flexDirection:"row"},{backgroundColor:t.vars.palette.background.surface,position:"relative"},t.typography[`body-${e.size}`],(r=t.variants[e.variant])==null?void 0:r[e.color],l!==void 0&&{"--Tabs-padding":l},u!==void 0&&{"--Tabs-padding":u})}),Hh=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyTabs"}),{children:i,value:o,defaultValue:a,orientation:s="horizontal",direction:l="ltr",component:u,variant:d="plain",color:f="neutral",size:h="md",slots:p={},slotProps:m={}}=r,g=Ae(r,vT),b=a||(o===void 0?0:void 0),{contextValue:w}=zS(D({},r,{orientation:s,defaultValue:b})),S=D({},r,{orientation:s,direction:l,variant:d,color:f,size:h}),C=bT(S),I=D({},g,{component:u,slots:p,slotProps:m}),[y,A]=Ie("root",{ref:n,elementType:yT,externalForwardedProps:I,additionalProps:{ref:n,as:u},ownerState:S,className:C.root});return c.jsx(y,D({},A,{children:c.jsx(jS,{value:w,children:c.jsx(fc.Provider,{value:h,children:i})})}))});function xT(e){return at("MuiTabList",e)}Ze("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);function CT(e){return at("MuiTab",e)}const hc=Ze("MuiTab",["root","disabled","focusVisible","selected","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]),wT=["component","children","variant","color","size","disableUnderline","underlinePlacement","tabFlex","sticky","slots","slotProps"],IT=e=>{const{orientation:t,size:n,variant:r,color:i}=e,o={root:["root",t,r&&`variant${ye(r)}`,i&&`color${ye(i)}`,n&&`size${ye(n)}`]};return dt(o,xT,{})},ST=be(sc,{name:"JoyTabList",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;const r=(n=e.variants[t.variant])==null?void 0:n[t.color];return D({"--List-gap":"0px","--ListDivider-gap":"0px","--ListItem-paddingX":"var(--Tabs-spacing)","--ListItem-gap":"0.375rem","--unstable_TabList-hasUnderline":t.disableUnderline?"var(--unknown,)":"initial"},N1,{flexGrow:"initial",flexDirection:t.orientation==="vertical"?"column":"row",borderRadius:"var(--List-radius, 0px)",padding:"var(--List-padding, 0px)",zIndex:1},t.sticky&&{position:"sticky",top:t.sticky==="top"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",bottom:t.sticky==="bottom"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",backgroundColor:(r==null?void 0:r.backgroundColor)||`var(--TabList-stickyBackground, ${e.vars.palette.background.body})`},!t.disableUnderline&&D({},t.underlinePlacement==="bottom"&&{"--unstable_TabList-underlineBottom":"1px",paddingBottom:1,boxShadow:`inset 0 -1px ${e.vars.palette.divider}`},t.underlinePlacement==="top"&&{"--unstable_TabList-underlineTop":"1px",paddingTop:1,boxShadow:`inset 0 1px ${e.vars.palette.divider}`},t.underlinePlacement==="right"&&{"--unstable_TabList-underlineRight":"1px",paddingRight:1,boxShadow:`inset -1px 0 ${e.vars.palette.divider}`},t.underlinePlacement==="left"&&{"--unstable_TabList-underlineLeft":"1px",paddingLeft:1,boxShadow:`inset 1px 0 ${e.vars.palette.divider}`}),t.tabFlex&&{[`& .${hc.root}`]:{flex:t.tabFlex}})}),Wh=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyTabList"}),i=G.useContext(fc),{isRtl:o,orientation:a,getRootProps:s,contextValue:l}=WS({rootRef:n}),{component:u="div",children:d,variant:f="plain",color:h="neutral",size:p,disableUnderline:m=!1,underlinePlacement:g=a==="horizontal"?"bottom":"right",tabFlex:b,sticky:w,slots:S={},slotProps:C={}}=r,I=Ae(r,wT),y=p!=null?p:i,A=D({},r,{isRtl:o,orientation:a,variant:f,color:h,size:y,sticky:w,tabFlex:b,nesting:!1,disableUnderline:m,underlinePlacement:g}),E=IT(A),k=D({},I,{component:u,slots:S,slotProps:C}),[F,Y]=Ie("root",{ref:n,elementType:ST,getSlotProps:s,externalForwardedProps:k,ownerState:A,className:E.root});return c.jsx(F,D({},Y,{children:c.jsx(GS,{value:l,children:c.jsx(oc,{row:a==="horizontal",nested:!0,children:d})})}))}),AT=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],TT=e=>{const{selected:t,disabled:n,focusVisible:r,variant:i,color:o,orientation:a}=e,s={root:["root",a,n&&"disabled",r&&"focusVisible",t&&"selected",i&&`variant${ye(i)}`,o&&`color${ye(o)}`]};return dt(s,CT,{})},ET=be(lc,{name:"JoyTab",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e})=>[{flex:"initial",justifyContent:e.row?"center":"initial","--unstable_ListItemDecorator-alignItems":"center","--unstable_offset":"min(calc(-1 * var(--variant-borderWidth, 0px)), -1px)"},!e.disableIndicator&&{'&[aria-selected="true"]':{"--Tab-indicatorColor":"currentColor",zIndex:1},"&::after":{content:'""',display:"block",position:"absolute",margin:"auto",background:"var(--Tab-indicatorColor)",borderRadius:"var(--Tab-indicatorRadius)"}},!e.disableIndicator&&e.indicatorPlacement==="bottom"&&{paddingBottom:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorThickness)",width:"var(--Tab-indicatorSize)",left:e.indicatorInset?"var(--ListItem-paddingLeft)":"var(--unstable_offset)",right:e.indicatorInset?"var(--ListItem-paddingRight)":"var(--unstable_offset)",bottom:"calc(-1px - var(--unstable_TabList-underlineBottom, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="top"&&{paddingTop:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorThickness)",width:"var(--Tab-indicatorSize)",left:e.indicatorInset?"var(--ListItem-paddingLeft)":"var(--unstable_offset)",right:e.indicatorInset?"var(--ListItem-paddingRight)":"var(--unstable_offset)",top:"calc(-1px - var(--unstable_TabList-underlineTop, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="right"&&{paddingRight:"calc(var(--ListItem-paddingRight) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorSize)",width:"var(--Tab-indicatorThickness)",top:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",bottom:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",right:"calc(-1px - var(--unstable_TabList-underlineRight, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="left"&&{paddingLeft:"calc(var(--ListItem-paddingLeft) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorSize)",width:"var(--Tab-indicatorThickness)",top:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",bottom:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",left:"calc(-1px - var(--unstable_TabList-underlineLeft, 0px))"}}]),Wr=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyTab"}),i=G.useContext(rc),{action:o,children:a,disabled:s=!1,component:l="button",orientation:u="horizontal",variant:d="plain",color:f="neutral",disableIndicator:h=!1,indicatorPlacement:p=i?"bottom":"right",indicatorInset:m=!1,slots:g={},slotProps:b={}}=r,w=Ae(r,AT),S=G.useRef(null),C=sn(S,n),{active:I,focusVisible:y,setFocusVisible:A,selected:E,getRootProps:k}=KS(D({},r,{rootRef:C}));G.useImperativeHandle(o,()=>({focusVisible:()=>{A(!0),S.current.focus()}}),[A]);const F=D({},r,{disableIndicator:h,indicatorPlacement:p,indicatorInset:m,orientation:u,row:i,active:I,focusVisible:y,disabled:s,selected:E,variant:d,color:f}),Y=TT(F),O=D({},w,{component:l,slots:g,slotProps:b}),[T,N]=Ie("root",{ref:n,elementType:ET,getSlotProps:k,externalForwardedProps:O,ownerState:F,className:Y.root});return c.jsx(tT.Provider,{value:u,children:c.jsx(T,D({},N,{children:a}))})});function zn(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 Gh(e){if(G.isValidElement(e)||qf.isValidElementType(e)||!zn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Gh(e[n])}),t}function Wt(e,t,n={clone:!0}){const r=n.clone?z({},e):e;return zn(e)&&zn(t)&&Object.keys(t).forEach(i=>{G.isValidElement(t[i])||qf.isValidElementType(t[i])?r[i]=t[i]:zn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&zn(e[i])?r[i]=Wt(e[i],t[i],n):n.clone?r[i]=zn(t[i])?Gh(t[i]):t[i]:r[i]=t[i]}),r}function wr(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 Gr(e){if(typeof e!="string")throw new Error(wr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function pc(e,t){const n=z({},t);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]=z(z({},e[i]),n[i]);else if(i==="componentsProps"||i==="slotProps"){const o=e[i],a=t[i];if(!a)n[i]=o||{};else if(!o)n[i]=a;else{n[i]=z({},a);for(const s in o)if(Object.prototype.hasOwnProperty.call(o,s)){const l=s;n[i][l]=pc(o[l],a[l])}}}else n[i]===void 0&&(n[i]=e[i])}return n}function kT(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let l=0;l<o.length;l+=1){const u=o[l];u&&(a+=(s===!0?"":" ")+t(u),s=!1,n&&n[u]&&(a+=" "+n[u]))}r[i]=a}return r}const Yh=e=>e,_T=(()=>{let e=Yh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Yh}}})(),PT={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 Kh(e,t,n="Mui"){const r=PT[t];return r?`${n}-${r}`:`${_T.generate(e)}-${t}`}function DT(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Kh(e,i,n)}),r}function OT(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Qi(e,t){return t?Wt(e,t,{clone:!1}):e}function RT(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var a,s;const o=/min-width:\s*([0-9.]+)/;return+(((a=r.match(o))==null?void 0:a[1])||0)-+(((s=i.match(o))==null?void 0:s[1])||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},z({},t)):t}function LT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function MT(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,i]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(o)}function BT(e){const t=(o,a)=>o.replace("@media",a?`@container ${a}`:"@container");function n(o,a){o.up=(...s)=>t(e.breakpoints.up(...s),a),o.down=(...s)=>t(e.breakpoints.down(...s),a),o.between=(...s)=>t(e.breakpoints.between(...s),a),o.only=(...s)=>t(e.breakpoints.only(...s),a),o.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},i=o=>(n(r,o),r);return n(i),q(z({},e),{containerQueries:i})}const Da={xs:0,sm:600,md:900,lg:1200,xl:1536},Qh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Da[e]}px)`},$T={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Da[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function jn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Qh;return t.reduce((a,s,l)=>(a[o.up(o.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const o=r.breakpoints||Qh;return Object.keys(t).reduce((a,s)=>{if(LT(o.keys,s)){const l=MT(r.containerQueries?r:$T,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(o.values||Da).includes(s)){const l=o.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function NT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function FT(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Oa(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Ra(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Oa(e,n)||r,t&&(i=t(i,r,e)),i}function st(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,u=Oa(l,r)||{};return jn(a,s,f=>{let h=Ra(u,i,f);return f===h&&typeof f=="string"&&(h=Ra(u,i,`${t}${f==="default"?"":Gr(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function zT(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const jT={m:"margin",p:"padding"},UT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},qh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},VT=zT(e=>{if(e.length>2)if(qh[e])e=qh[e];else return[e];const[t,n]=e.split(""),r=jT[t],i=UT[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),gc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],mc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...gc,...mc];function qi(e,t,n,r){var o;const i=(o=Oa(e,t,!0))!=null?o:n;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:typeof i=="string"?`calc(${a} * ${i})`:i*a:Array.isArray(i)?a=>{if(typeof a=="string")return a;const s=Math.abs(a),l=i[s];return a>=0?l:typeof l=="number"?-l:`-${l}`}:typeof i=="function"?i:()=>{}}function vc(e){return qi(e,"spacing",8)}function Ji(e,t){return typeof t=="string"||t==null?t:e(t)}function HT(e,t){return n=>e.reduce((r,i)=>(r[i]=Ji(t,n),r),{})}function WT(e,t,n,r){if(!t.includes(n))return null;const i=VT(n),o=HT(i,r),a=e[n];return jn(e,a,o)}function Jh(e,t){const n=vc(e.theme);return Object.keys(e).map(r=>WT(e,t,r,n)).reduce(Qi,{})}function et(e){return Jh(e,gc)}et.propTypes={},et.filterProps=gc;function tt(e){return Jh(e,mc)}tt.propTypes={},tt.filterProps=mc;function La(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Qi(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function tn(e){return typeof e!="number"?e:`${e}px solid`}function nn(e,t){return st({prop:e,themeKey:"borders",transform:t})}const GT=nn("border",tn),YT=nn("borderTop",tn),KT=nn("borderRight",tn),QT=nn("borderBottom",tn),qT=nn("borderLeft",tn),JT=nn("borderColor"),XT=nn("borderTopColor"),ZT=nn("borderRightColor"),eE=nn("borderBottomColor"),tE=nn("borderLeftColor"),nE=nn("outline",tn),rE=nn("outlineColor"),Ma=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=qi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Ji(t,r)});return jn(e,e.borderRadius,n)}return null};Ma.propTypes={},Ma.filterProps=["borderRadius"],La(GT,YT,KT,QT,qT,JT,XT,ZT,eE,tE,Ma,nE,rE);const Ba=e=>{if(e.gap!==void 0&&e.gap!==null){const t=qi(e.theme,"spacing",8),n=r=>({gap:Ji(t,r)});return jn(e,e.gap,n)}return null};Ba.propTypes={},Ba.filterProps=["gap"];const $a=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=qi(e.theme,"spacing",8),n=r=>({columnGap:Ji(t,r)});return jn(e,e.columnGap,n)}return null};$a.propTypes={},$a.filterProps=["columnGap"];const Na=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=qi(e.theme,"spacing",8),n=r=>({rowGap:Ji(t,r)});return jn(e,e.rowGap,n)}return null};Na.propTypes={},Na.filterProps=["rowGap"];const iE=st({prop:"gridColumn"}),oE=st({prop:"gridRow"}),aE=st({prop:"gridAutoFlow"}),sE=st({prop:"gridAutoColumns"}),lE=st({prop:"gridAutoRows"}),cE=st({prop:"gridTemplateColumns"}),uE=st({prop:"gridTemplateRows"}),dE=st({prop:"gridTemplateAreas"}),fE=st({prop:"gridArea"});La(Ba,$a,Na,iE,oE,aE,sE,lE,cE,uE,dE,fE);function Yr(e,t){return t==="grey"?t:e}const hE=st({prop:"color",themeKey:"palette",transform:Yr}),pE=st({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Yr}),gE=st({prop:"backgroundColor",themeKey:"palette",transform:Yr});La(hE,pE,gE);function Gt(e){return e<=1&&e!==0?`${e*100}%`:e}const mE=st({prop:"width",transform:Gt}),bc=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,o,a,s,l;const r=((a=(o=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:o.values)==null?void 0:a[n])||Da[n];return r?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Gt(n)}};return jn(e,e.maxWidth,t)}return null};bc.filterProps=["maxWidth"];const vE=st({prop:"minWidth",transform:Gt}),bE=st({prop:"height",transform:Gt}),yE=st({prop:"maxHeight",transform:Gt}),xE=st({prop:"minHeight",transform:Gt});st({prop:"size",cssProperty:"width",transform:Gt}),st({prop:"size",cssProperty:"height",transform:Gt});const CE=st({prop:"boxSizing"});La(mE,bc,vE,bE,yE,xE,CE);const Fa={border:{themeKey:"borders",transform:tn},borderTop:{themeKey:"borders",transform:tn},borderRight:{themeKey:"borders",transform:tn},borderBottom:{themeKey:"borders",transform:tn},borderLeft:{themeKey:"borders",transform:tn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:tn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ma},color:{themeKey:"palette",transform:Yr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Yr},backgroundColor:{themeKey:"palette",transform:Yr},p:{style:tt},pt:{style:tt},pr:{style:tt},pb:{style:tt},pl:{style:tt},px:{style:tt},py:{style:tt},padding:{style:tt},paddingTop:{style:tt},paddingRight:{style:tt},paddingBottom:{style:tt},paddingLeft:{style:tt},paddingX:{style:tt},paddingY:{style:tt},paddingInline:{style:tt},paddingInlineStart:{style:tt},paddingInlineEnd:{style:tt},paddingBlock:{style:tt},paddingBlockStart:{style:tt},paddingBlockEnd:{style:tt},m:{style:et},mt:{style:et},mr:{style:et},mb:{style:et},ml:{style:et},mx:{style:et},my:{style:et},margin:{style:et},marginTop:{style:et},marginRight:{style:et},marginBottom:{style:et},marginLeft:{style:et},marginX:{style:et},marginY:{style:et},marginInline:{style:et},marginInlineStart:{style:et},marginInlineEnd:{style:et},marginBlock:{style:et},marginBlockStart:{style:et},marginBlockEnd:{style:et},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:Ba},rowGap:{style:Na},columnGap:{style:$a},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Gt},maxWidth:{style:bc},minWidth:{transform:Gt},height:{transform:Gt},maxHeight:{transform:Gt},minHeight:{transform:Gt},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"}};function wE(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function IE(e,t){return typeof e=="function"?e(t):e}function SE(){function e(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:d,style:f}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=Oa(i,u)||{};return f?f(a):jn(a,r,m=>{let g=Ra(h,d,m);return m===g&&typeof m=="string"&&(g=Ra(h,d,`${n}${m==="default"?"":Gr(m)}`,m)),l===!1?g:{[l]:g}})}function t(n){var s;const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=(s=i.unstable_sxConfig)!=null?s:Fa;function a(l){let u=l;if(typeof l=="function")u=l(i);else if(typeof l!="object")return l;if(!u)return null;const d=NT(i.breakpoints),f=Object.keys(d);let h=d;return Object.keys(u).forEach(p=>{const m=IE(u[p],i);if(m!=null)if(typeof m=="object")if(o[p])h=Qi(h,e(p,m,i,o));else{const g=jn({theme:i},m,b=>({[p]:b}));wE(g,m)?h[p]=t({sx:m,theme:i}):h=Qi(h,g)}else h=Qi(h,e(p,m,i,o))}),RT(i,FT(f,h))}return Array.isArray(r)?r.map(a):a(r)}return t}const Kr=SE();Kr.filterProps=["sx"];function AE(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=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(i){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 TE={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},EE=!1,kE=/[A-Z]|^ms/g,_E=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Xh=function(t){return t.charCodeAt(1)===45},Zh=function(t){return t!=null&&typeof t!="boolean"},yc=QS(function(e){return Xh(e)?e:e.replace(kE,"-$&").toLowerCase()}),ep=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(_E,function(r,i,o){return nr={name:i,styles:o,next:nr},i})}return TE[t]!==1&&!Xh(t)&&typeof n=="number"&&n!==0?n+"px":n},PE="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function za(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 i=n;if(i.anim===1)return nr={name:i.name,styles:i.styles,next:nr},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)nr={name:a.name,styles:a.styles,next:nr},a=a.next;var s=o.styles+";";return s}return DE(e,t,n)}}var l=n;return l}function DE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=za(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;Zh(s)&&(r+=yc(o)+":"+ep(o,s)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&EE)throw new Error(PE);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var l=0;l<a.length;l++)Zh(a[l])&&(r+=yc(o)+":"+ep(o,a[l])+";");else{var u=za(e,t,a);switch(o){case"animation":case"animationName":{r+=yc(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}}return r}var tp=/label:\s*([^\s;{]+)\s*(;|$)/g,nr;function OE(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,i="";nr=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=za(n,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=za(n,t,e[s]),r){var l=o;i+=l[s]}tp.lastIndex=0;for(var u="",d;(d=tp.exec(i))!==null;)u+="-"+d[1];var f=AE(i)+u;return{name:f,styles:i,next:nr}}/**
|
|
2333
|
+
*/var Ll=Symbol.for("react.transitional.element"),Ml=Symbol.for("react.portal"),na=Symbol.for("react.fragment"),ra=Symbol.for("react.strict_mode"),ia=Symbol.for("react.profiler"),oa=Symbol.for("react.consumer"),aa=Symbol.for("react.context"),sa=Symbol.for("react.forward_ref"),la=Symbol.for("react.suspense"),ca=Symbol.for("react.suspense_list"),ua=Symbol.for("react.memo"),da=Symbol.for("react.lazy"),FI=Symbol.for("react.offscreen"),zI=Symbol.for("react.client.reference");function Xt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Ll:switch(e=e.type,e){case na:case ia:case ra:case la:case ca:return e;default:switch(e=e&&e.$$typeof,e){case aa:case sa:case da:case ua:return e;case oa:return e;default:return t}}case Ml:return t}}}$e.ContextConsumer=oa,$e.ContextProvider=aa,$e.Element=Ll,$e.ForwardRef=sa,$e.Fragment=na,$e.Lazy=da,$e.Memo=ua,$e.Portal=Ml,$e.Profiler=ia,$e.StrictMode=ra,$e.Suspense=la,$e.SuspenseList=ca,$e.isContextConsumer=function(e){return Xt(e)===oa},$e.isContextProvider=function(e){return Xt(e)===aa},$e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ll},$e.isForwardRef=function(e){return Xt(e)===sa},$e.isFragment=function(e){return Xt(e)===na},$e.isLazy=function(e){return Xt(e)===da},$e.isMemo=function(e){return Xt(e)===ua},$e.isPortal=function(e){return Xt(e)===Ml},$e.isProfiler=function(e){return Xt(e)===ia},$e.isStrictMode=function(e){return Xt(e)===ra},$e.isSuspense=function(e){return Xt(e)===la},$e.isSuspenseList=function(e){return Xt(e)===ca},$e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===na||e===ia||e===ra||e===la||e===ca||e===FI||typeof e=="object"&&e!==null&&(e.$$typeof===da||e.$$typeof===ua||e.$$typeof===aa||e.$$typeof===oa||e.$$typeof===sa||e.$$typeof===zI||e.getModuleId!==void 0)},$e.typeOf=Xt,Qf.exports=$e;var qf=Qf.exports;function ye(e){if(typeof e!="string")throw new Error(ta(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Jf(e,t){var n,r;return G.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}const jI=typeof window!="undefined"?G.useLayoutEffect:G.useEffect;let Xf=0;function UI(e){const[t,n]=G.useState(e),r=e||t;return G.useEffect(()=>{t==null&&(Xf+=1,n(`mui-${Xf}`))},[t]),r}const Zf=G.useId;function Hi(e){if(Zf!==void 0){const t=Zf();return e!=null?e:t}return UI(e)}function Bl({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=G.useRef(e!==void 0),[o,a]=G.useState(t),s=i?e:o,l=G.useCallback(u=>{i||a(u)},[]);return[s,l]}class $l{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new $l}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let fa=!0,Nl=!1;const VI=new $l,HI={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function WI(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&HI[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function GI(e){e.metaKey||e.altKey||e.ctrlKey||(fa=!0)}function Fl(){fa=!1}function YI(){this.visibilityState==="hidden"&&Nl&&(fa=!0)}function KI(e){e.addEventListener("keydown",GI,!0),e.addEventListener("mousedown",Fl,!0),e.addEventListener("pointerdown",Fl,!0),e.addEventListener("touchstart",Fl,!0),e.addEventListener("visibilitychange",YI,!0)}function QI(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return fa||WI(t)}function eh(){const e=G.useCallback(i=>{i!=null&&KI(i.ownerDocument)},[]),t=G.useRef(!1);function n(){return t.current?(Nl=!0,VI.start(100,()=>{Nl=!1}),t.current=!1,!0):!1}function r(i){return QI(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function th(e,t){const n=D({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=D({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=D({},o),Object.keys(i).forEach(a=>{n[r][a]=th(i[a],o[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function dt(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,a)=>{if(a){const s=t(a);s!==""&&o.push(s),n&&n[a]&&o.push(n[a])}return o},[]).join(" ")}),r}const nh=e=>e,qI=(()=>{let e=nh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=nh}}})(),JI={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 rh(e,t,n="Mui"){const r=JI[t];return r?`${n}-${r}`:`${qI.generate(e)}-${t}`}function XI(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=rh(e,i,n)}),r}function zl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,href:r,rootRef:i,tabIndex:o,to:a,type:s,rootElementName:l}=e,u=G.useRef(null),[d,f]=G.useState(!1),{isFocusVisibleRef:h,onFocus:p,onBlur:m,ref:g}=eh(),[b,w]=G.useState(!1);t&&!n&&b&&w(!1),G.useEffect(()=>{h.current=b},[b,h]);const[S,C]=BI({rootElementName:l!=null?l:r||a?"a":void 0,componentName:"Button"}),I=j=>$=>{var M;b&&$.preventDefault(),(M=j.onMouseLeave)==null||M.call(j,$)},y=j=>$=>{var M;m($),h.current===!1&&w(!1),(M=j.onBlur)==null||M.call(j,$)},A=j=>$=>{var M;if(u.current||(u.current=$.currentTarget),p($),h.current===!0){var H;w(!0),(H=j.onFocusVisible)==null||H.call(j,$)}(M=j.onFocus)==null||M.call(j,$)},E=()=>{const j=u.current;return S==="BUTTON"||S==="INPUT"&&["button","submit","reset"].includes(j==null?void 0:j.type)||S==="A"&&(j==null?void 0:j.href)},k=j=>$=>{if(!t){var M;(M=j.onClick)==null||M.call(j,$)}},F=j=>$=>{var M;t||(f(!0),document.addEventListener("mouseup",()=>{f(!1)},{once:!0})),(M=j.onMouseDown)==null||M.call(j,$)},Y=j=>$=>{var M;if((M=j.onKeyDown)==null||M.call(j,$),!$.defaultMuiPrevented&&($.target===$.currentTarget&&!E()&&$.key===" "&&$.preventDefault(),$.target===$.currentTarget&&$.key===" "&&!t&&f(!0),$.target===$.currentTarget&&!E()&&$.key==="Enter"&&!t)){var H;(H=j.onClick)==null||H.call(j,$),$.preventDefault()}},O=j=>$=>{var M;if($.target===$.currentTarget&&f(!1),(M=j.onKeyUp)==null||M.call(j,$),$.target===$.currentTarget&&!E()&&!t&&$.key===" "&&!$.defaultMuiPrevented){var H;(H=j.onClick)==null||H.call(j,$)}},T=ln(C,i,g,u),N={};return o!==void 0&&(N.tabIndex=o),S==="BUTTON"?(N.type=s!=null?s:"button",n?N["aria-disabled"]=t:N.disabled=t):S==="INPUT"?s&&["button","submit","reset"].includes(s)&&(n?N["aria-disabled"]=t:N.disabled=t):S!==""&&(!r&&!a&&(N.role="button",N.tabIndex=o!=null?o:0),t&&(N["aria-disabled"]=t,N.tabIndex=n?o!=null?o:0:-1)),{getRootProps:(j={})=>{const $=D({},Mn(e),Mn(j)),M=D({type:s},$,N,j,{onBlur:y($),onClick:k($),onFocus:A($),onKeyDown:Y($),onKeyUp:O($),onMouseDown:F($),onMouseLeave:I($),ref:T});return delete M.onFocusVisible,M},focusVisible:b,setFocusVisible:w,active:d,rootRef:T}}function ZI(e,t){return e===t}const jl={},ih=()=>{};function Ul(e,t){const n=D({},e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n}function eS(e){const{nextState:t,initialState:n,stateComparers:r,onStateChange:i,controlledProps:o,lastActionRef:a}=e,s=G.useRef(n);G.useEffect(()=>{if(a.current===null)return;const l=Ul(s.current,o);Object.keys(t).forEach(u=>{var d;const f=(d=r[u])!=null?d:ZI,h=t[u],p=l[u];if(p==null&&h!=null||p!=null&&h==null||p!=null&&h!=null&&!f(h,p)){var m,g;i==null||i((m=a.current.event)!=null?m:null,u,h,(g=a.current.type)!=null?g:"",t)}}),s.current=t,a.current=null},[s,t,a,i,r,o])}function tS(e){const t=G.useRef(null),{reducer:n,initialState:r,controlledProps:i=jl,stateComparers:o=jl,onStateChange:a=ih,actionContext:s,componentName:l=""}=e;G.useRef(i);const u=G.useCallback((p,m)=>{t.current=m;const g=Ul(p,i);return n(g,m)},[i,n]),[d,f]=G.useReducer(u,r),h=G.useCallback(p=>{f(D({},p,{context:s}))},[s]);return eS({nextState:d,initialState:r,stateComparers:o!=null?o:jl,onStateChange:a!=null?a:ih,controlledProps:i,lastActionRef:t}),[Ul(d,i),h]}const nS=G.createContext(void 0);function rS(){return G.useContext(nS)}function iS(e={}){const{defaultValue:t,disabled:n=!1,error:r=!1,onBlur:i,onChange:o,onFocus:a,required:s=!1,value:l,inputRef:u}=e,d=rS();let f,h,p,m,g;if(d){var b,w,S;f=void 0,h=(b=d.disabled)!=null?b:!1,p=(w=d.error)!=null?w:!1,m=(S=d.required)!=null?S:!1,g=d.value}else f=t,h=n,p=r,m=s,g=l;const{current:C}=G.useRef(g!=null),I=G.useCallback(j=>{},[]),y=G.useRef(null),A=ln(y,u,I),[E,k]=G.useState(!1);G.useEffect(()=>{!d&&h&&E&&(k(!1),i==null||i())},[d,h,E,i]);const F=j=>$=>{var M;if(d!=null&&d.disabled){$.stopPropagation();return}if((M=j.onFocus)==null||M.call(j,$),d&&d.onFocus){var H;d==null||(H=d.onFocus)==null||H.call(d)}else k(!0)},Y=j=>$=>{var M;(M=j.onBlur)==null||M.call(j,$),d&&d.onBlur?d.onBlur():k(!1)},O=j=>($,...M)=>{var H,Q;if(!C&&($.target||y.current)==null)throw new Error(ta(17));d==null||(H=d.onChange)==null||H.call(d,$),(Q=j.onChange)==null||Q.call(j,$,...M)},T=j=>$=>{var M;y.current&&$.currentTarget===$.target&&y.current.focus(),(M=j.onClick)==null||M.call(j,$)};return{disabled:h,error:p,focused:E,formControlContext:d,getInputProps:(j={})=>{const M=D({},{onBlur:i,onChange:o,onFocus:a},Mn(j)),H=D({},M,{onBlur:Y(M),onChange:O(M),onFocus:F(M)});return D({},H,{"aria-invalid":p||void 0,defaultValue:f,value:g,required:m,disabled:h},j,{ref:A},H)},getRootProps:(j={})=>{const $=Mn(e,["onBlur","onChange","onFocus"]),M=D({},$,Mn(j));return D({},j,M,{onClick:T(M)})},inputRef:A,required:m,value:g}}const yt={blur:"list:blur",focus:"list:focus",itemClick:"list:itemClick",itemHover:"list:itemHover",itemsChange:"list:itemsChange",keyDown:"list:keyDown",resetHighlight:"list:resetHighlight",highlightLast:"list:highlightLast",textNavigation:"list:textNavigation",clearSelection:"list:clearSelection"};function oS(e,t,n,r,i,o){if(n.length===0||!r&&n.every((s,l)=>i(s,l)))return-1;let a=e;for(;;){if(!o&&t==="next"&&a===n.length||!o&&t==="previous"&&a===-1)return-1;if(r?!1:i(n[a],a))a+=t==="next"?1:-1,o&&(a=(a+n.length)%n.length);else return a}}function Dt(e,t,n){var r;const{items:i,isItemDisabled:o,disableListWrap:a,disabledItemsFocusable:s,itemComparer:l,focusManagement:u}=n,d=u==="DOM"?0:-1,f=i.length-1,h=e==null?-1:i.findIndex(w=>l(w,e));let p,m,g=!a;switch(t){case"reset":if(d===-1)return null;p=0,m="next",g=!1;break;case"start":p=0,m="next",g=!1;break;case"end":p=f,m="previous",g=!1;break;default:{const w=h+t;w<0?!g&&h!==-1||Math.abs(t)>1?(p=0,m="next"):(p=f,m="previous"):w>f?!g||Math.abs(t)>1?(p=f,m="previous"):(p=0,m="next"):(p=w,m=t>=0?"next":"previous")}}const b=oS(p,m,i,s,o,g);return b===-1&&e!==null&&!o(e,h)?e:(r=i[b])!=null?r:null}function aS(e,t,n,r){return n==="none"?[]:n==="single"?r(t[0],e)?t:[e]:t.some(i=>r(i,e))?t.filter(i=>!r(i,e)):[...t,e]}function oh(e,t,n){const{itemComparer:r,isItemDisabled:i,selectionMode:o,items:a}=n,{selectedValues:s}=t,l=a.findIndex(d=>r(e,d));if(i(e,l))return t;const u=aS(e,s,o,r);return D({},t,{selectedValues:u,highlightedValue:e})}function sS(e,t,n){const r=t.highlightedValue,{orientation:i,pageSize:o}=n;switch(e){case"Home":return D({},t,{highlightedValue:Dt(r,"start",n)});case"End":return D({},t,{highlightedValue:Dt(r,"end",n)});case"PageUp":return D({},t,{highlightedValue:Dt(r,-o,n)});case"PageDown":return D({},t,{highlightedValue:Dt(r,o,n)});case"ArrowUp":if(i!=="vertical")break;return D({},t,{highlightedValue:Dt(r,-1,n)});case"ArrowDown":if(i!=="vertical")break;return D({},t,{highlightedValue:Dt(r,1,n)});case"ArrowLeft":{if(i==="vertical")break;return D({},t,{highlightedValue:Dt(r,i==="horizontal-ltr"?-1:1,n)})}case"ArrowRight":{if(i==="vertical")break;return D({},t,{highlightedValue:Dt(r,i==="horizontal-ltr"?1:-1,n)})}case"Enter":case" ":return t.highlightedValue===null?t:oh(t.highlightedValue,t,n)}return t}function lS(e,t){return t.focusManagement==="DOM"?e:D({},e,{highlightedValue:null})}function cS(e,t,n){var r;const i=(r=n(e))==null?void 0:r.trim().toLowerCase();return!i||i.length===0?!1:i.indexOf(t)===0}function uS(e,t,n){const{items:r,isItemDisabled:i,disabledItemsFocusable:o,getItemAsString:a}=n,s=t.length>1;let l=s?e.highlightedValue:Dt(e.highlightedValue,1,n);for(let u=0;u<r.length;u+=1){if(!l||!s&&e.highlightedValue===l)return e;if(cS(l,t,a)&&(!i(l,r.indexOf(l))||o))return D({},e,{highlightedValue:l});l=Dt(l,1,n)}return e}function dS(e,t,n,r){var i;const{itemComparer:o,focusManagement:a}=r;let s=null;if(n.highlightedValue!=null){var l;s=(l=e.find(f=>o(f,n.highlightedValue)))!=null?l:null}else a==="DOM"&&t.length===0&&(s=Dt(null,"reset",r));const d=((i=n.selectedValues)!=null?i:[]).filter(f=>e.some(h=>o(h,f)));return D({},n,{highlightedValue:s,selectedValues:d})}function fS(e,t){return D({},e,{highlightedValue:Dt(null,"reset",t)})}function hS(e,t){return D({},e,{highlightedValue:Dt(null,"end",t)})}function pS(e,t){return D({},e,{selectedValues:[],highlightedValue:Dt(null,"reset",t)})}function ah(e,t){const{type:n,context:r}=t;switch(n){case yt.keyDown:return sS(t.key,e,r);case yt.itemClick:return oh(t.item,e,r);case yt.blur:return lS(e,r);case yt.textNavigation:return uS(e,t.searchString,r);case yt.itemsChange:return dS(t.items,t.previousItems,e,r);case yt.resetHighlight:return fS(e,r);case yt.highlightLast:return hS(e,r);case yt.clearSelection:return pS(e,r);default:return e}}const gS=500;function mS(e){const t=G.useRef({searchString:"",lastTime:null});return G.useCallback(n=>{if(n.key.length===1&&n.key!==" "){const r=t.current,i=n.key.toLowerCase(),o=performance.now();r.searchString.length>0&&r.lastTime&&o-r.lastTime>gS?r.searchString=i:(r.searchString.length!==1||i!==r.searchString)&&(r.searchString+=i),r.lastTime=o,e(r.searchString,n)}},[e])}const sh={},vS=()=>{},bS=(e,t)=>e===t,yS=()=>!1,xS=e=>typeof e=="string"?e:String(e),CS=()=>({highlightedValue:null,selectedValues:[]});function wS(e){const{controlledProps:t=sh,disabledItemsFocusable:n=!1,disableListWrap:r=!1,focusManagement:i="activeDescendant",getInitialState:o=CS,getItemDomElement:a,getItemId:s,isItemDisabled:l=yS,rootRef:u,onStateChange:d=vS,items:f,itemComparer:h=bS,getItemAsString:p=xS,onChange:m,onHighlightChange:g,onItemsChange:b,orientation:w="vertical",pageSize:S=5,reducerActionContext:C=sh,selectionMode:I="single",stateReducer:y,componentName:A="useList"}=e,E=G.useRef(null),k=ln(u,E),F=G.useCallback((ae,X,le)=>{if(g==null||g(ae,X,le),i==="DOM"&&X!=null&&(le===yt.itemClick||le===yt.keyDown||le===yt.textNavigation)){var Z;a==null||(Z=a(X))==null||Z.focus()}},[a,g,i]),Y=G.useMemo(()=>({highlightedValue:h,selectedValues:(ae,X)=>Wf(ae,X,h)}),[h]),O=G.useCallback((ae,X,le,Z,he)=>{switch(d==null||d(ae,X,le,Z,he),X){case"highlightedValue":F(ae,le,Z);break;case"selectedValues":m==null||m(ae,le,Z);break}},[F,m,d]),T=G.useMemo(()=>({disabledItemsFocusable:n,disableListWrap:r,focusManagement:i,isItemDisabled:l,itemComparer:h,items:f,getItemAsString:p,onHighlightChange:F,orientation:w,pageSize:S,selectionMode:I,stateComparers:Y}),[n,r,i,l,h,f,p,F,w,S,I,Y]),N=o(),V=y!=null?y:ah,j=G.useMemo(()=>D({},C,T),[C,T]),[$,M]=tS({reducer:V,actionContext:j,initialState:N,controlledProps:t,stateComparers:Y,onStateChange:O,componentName:A}),{highlightedValue:H,selectedValues:Q}=$,te=mS((ae,X)=>M({type:yt.textNavigation,event:X,searchString:ae})),R=G.useRef([]);G.useEffect(()=>{Wf(R.current,f,h)||(M({type:yt.itemsChange,event:null,items:f,previousItems:R.current}),R.current=f,b==null||b(f))},[f,h,M,b]);const L=ae=>X=>{var le;if((le=ae.onKeyDown)==null||le.call(ae,X),X.defaultMuiPrevented)return;const Z=["Home","End","PageUp","PageDown"];w==="vertical"?Z.push("ArrowUp","ArrowDown"):Z.push("ArrowLeft","ArrowRight"),i==="activeDescendant"&&Z.push(" ","Enter"),Z.includes(X.key)&&X.preventDefault(),M({type:yt.keyDown,key:X.key,event:X}),te(X)},U=ae=>X=>{var le,Z;(le=ae.onBlur)==null||le.call(ae,X),!X.defaultMuiPrevented&&((Z=E.current)!=null&&Z.contains(X.relatedTarget)||M({type:yt.blur,event:X}))},W=(ae={})=>{const X=Mn(ae);return D({},ae,{"aria-activedescendant":i==="activeDescendant"&&H!=null?s(H):void 0,tabIndex:i==="DOM"?-1:0,ref:k},X,{onBlur:U(X),onKeyDown:L(X)})},re=G.useCallback(ae=>{const X=(Q!=null?Q:[]).some(he=>he!=null&&h(ae,he)),le=H!=null&&h(ae,H);return{focusable:i==="DOM",highlighted:le,selected:X}},[h,Q,H,i]),se=G.useMemo(()=>({dispatch:M,getItemState:re}),[M,re]);return G.useDebugValue({state:$}),{contextValue:se,dispatch:M,getRootProps:W,rootRef:k,state:$}}const lh=G.createContext(null);function IS(e){const{handlePointerOverEvents:t=!1,item:n}=e,r=G.useContext(lh);if(!r)throw new Error("useListItem must be used within a ListProvider");const{dispatch:i,getItemState:o}=r,{highlighted:a,selected:s,focusable:l}=o(n),u=G.useCallback(p=>m=>{var g;(g=p.onClick)==null||g.call(p,m),!m.defaultPrevented&&i({type:yt.itemClick,item:n,event:m})},[i,n]),d=G.useCallback(p=>m=>{var g;(g=p.onMouseOver)==null||g.call(p,m),!m.defaultPrevented&&i({type:yt.itemHover,item:n,event:m})},[i,n]);let f;return l&&(f=a?0:-1),{getRootProps:(p={})=>{const m=Mn(p);return D({},p,{onClick:u(m),onPointerOver:t?d(m):void 0,tabIndex:f})},highlighted:a,selected:s}}const Vl=G.createContext(null);function SS(e){const t=Array.from(e.keys()).map(n=>{const r=e.get(n);return{key:n,subitem:r}});return t.sort((n,r)=>{const i=n.subitem.ref.current,o=r.subitem.ref.current;return i===null||o===null||i===o?0:i.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING?1:-1}),new Map(t.map(n=>[n.key,n.subitem]))}function ch(){const[e,t]=G.useState(new Map),n=G.useRef(new Set),r=G.useCallback(function(u){n.current.delete(u),t(d=>{const f=new Map(d);return f.delete(u),f})},[]),i=G.useCallback(function(u,d){let f;return typeof u=="function"?f=u(n.current):f=u,n.current.add(f),t(h=>{const p=new Map(h);return p.set(f,d),p}),{id:f,deregister:()=>r(f)}},[r]),o=G.useMemo(()=>SS(e),[e]),a=G.useCallback(function(u){return Array.from(o.keys()).indexOf(u)},[o]);return{contextValue:G.useMemo(()=>({getItemIndex:a,registerItem:i,totalSubitemCount:e.size}),[a,i,e.size]),subitems:o}}function uh(e,t){const n=G.useContext(Vl);if(n===null)throw new Error("useCompoundItem must be used within a useCompoundParent");const{registerItem:r}=n,[i,o]=G.useState(typeof e=="function"?void 0:e);return jI(()=>{const{id:a,deregister:s}=r(e,t);return o(a),s},[r,t,e]),{id:i,index:i!==void 0?n.getItemIndex(i):-1,totalItemCount:n.totalSubitemCount}}function AS(e,t){return function(r={}){const i=D({},r,e(r));return D({},i,t(i))}}const TS=Math.min,ES=Math.max,ha=Math.round,pa=Math.floor,ga=e=>({x:e,y:e});function kS(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function dh(e){return hh(e)?(e.nodeName||"").toLowerCase():"#document"}function Nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fh(e){var t;return(t=(hh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hh(e){return e instanceof Node||e instanceof Nn(e).Node}function _S(e){return e instanceof Element||e instanceof Nn(e).Element}function Hl(e){return e instanceof HTMLElement||e instanceof Nn(e).HTMLElement}function ph(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Nn(e).ShadowRoot}function gh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Wl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function PS(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function DS(e){return["html","body","#document"].includes(dh(e))}function Wl(e){return Nn(e).getComputedStyle(e)}function OS(e){if(dh(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ph(e)&&e.host||fh(e);return ph(t)?t.host:t}function mh(e){const t=OS(e);return DS(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hl(t)&&gh(t)?t:mh(t)}function ma(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=mh(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Nn(i);if(o){const s=Gl(a);return t.concat(a,a.visualViewport||[],gh(i)?i:[],s&&n?ma(s):[])}return t.concat(i,ma(i,[],n))}function Gl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function RS(e){const t=Wl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Hl(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=ha(n)!==o||ha(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Yl(e){return _S(e)?e:e.contextElement}function vh(e){const t=Yl(e);if(!Hl(t))return ga(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=RS(t);let a=(o?ha(n.width):n.width)/r,s=(o?ha(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const LS=ga(0);function MS(e){const t=Nn(e);return!PS()||!t.visualViewport?LS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function BS(e,t,n){return!1}function bh(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=Yl(e);let a=ga(1);t&&(a=vh(e));const s=BS()?MS(o):ga(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(o){const h=Nn(o),p=r;let m=h,g=Gl(m);for(;g&&r&&p!==m;){const b=vh(g),w=g.getBoundingClientRect(),S=Wl(g),C=w.left+(g.clientLeft+parseFloat(S.paddingLeft))*b.x,I=w.top+(g.clientTop+parseFloat(S.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,f*=b.y,l+=C,u+=I,m=Nn(g),g=Gl(m)}}return kS({width:d,height:f,x:l,y:u})}function $S(e,t){let n=null,r;const i=fh(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(s||t(),!f||!h)return;const p=pa(d),m=pa(i.clientWidth-(u+f)),g=pa(i.clientHeight-(d+h)),b=pa(u),S={rootMargin:-p+"px "+-m+"px "+-g+"px "+-b+"px",threshold:ES(0,TS(1,l))||1};let C=!0;function I(y){const A=y[0].intersectionRatio;if(A!==l){if(!C)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(I,q(z({},S),{root:i.ownerDocument}))}catch(y){n=new IntersectionObserver(I,S)}n.observe(e)}return a(!0),o}function NS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Yl(e),d=i||o?[...u?ma(u):[],...ma(t)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const f=u&&s?$S(u,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(w=>{let[S]=w;S&&S.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let m,g=l?bh(e):null;l&&b();function b(){const w=bh(e);g&&(w.x!==g.x||w.y!==g.y||w.width!==g.width||w.height!==g.height)&&n(),g=w,m=requestAnimationFrame(b)}return n(),()=>{var w;d.forEach(S=>{i&&S.removeEventListener("scroll",n),o&&S.removeEventListener("resize",n)}),f==null||f(),(w=p)==null||w.disconnect(),p=null,l&&cancelAnimationFrame(m)}}function FS(e){const{checked:t,defaultChecked:n,disabled:r,onBlur:i,onChange:o,onFocus:a,onFocusVisible:s,readOnly:l,required:u}=e,[d,f]=Bl({controlled:t,default:!!n,name:"Switch",state:"checked"}),h=k=>F=>{var Y;F.nativeEvent.defaultPrevented||(f(F.target.checked),o==null||o(F),(Y=k.onChange)==null||Y.call(k,F))},{isFocusVisibleRef:p,onBlur:m,onFocus:g,ref:b}=eh(),[w,S]=G.useState(!1);r&&w&&S(!1),G.useEffect(()=>{p.current=w},[w,p]);const C=G.useRef(null),I=k=>F=>{var Y;C.current||(C.current=F.currentTarget),g(F),p.current===!0&&(S(!0),s==null||s(F)),a==null||a(F),(Y=k.onFocus)==null||Y.call(k,F)},y=k=>F=>{var Y;m(F),p.current===!1&&S(!1),i==null||i(F),(Y=k.onBlur)==null||Y.call(k,F)},A=ln(b,C);return{checked:d,disabled:!!r,focusVisible:w,getInputProps:(k={})=>D({checked:t,defaultChecked:n,disabled:r,readOnly:l,ref:A,required:u,type:"checkbox",role:"switch","aria-checked":t},k,{onChange:h(k),onFocus:I(k),onBlur:y(k)}),inputRef:A,readOnly:!!l}}function zS(e){const{value:t,defaultValue:n,onChange:r,orientation:i="horizontal",direction:o="ltr",selectionFollowsFocus:a=!1}=e,[s,l]=Bl({controlled:t,default:n,name:"Tabs",state:"value"}),u=G.useCallback((b,w)=>{l(w),r==null||r(b,w)},[r,l]),{subitems:d,contextValue:f}=ch(),h=G.useRef(()=>{}),p=G.useCallback(b=>{var w;return(w=d.get(b))==null?void 0:w.id},[d]),m=G.useCallback(b=>h.current(b),[]),g=G.useCallback(b=>{h.current=b},[]);return{contextValue:D({direction:o,getTabId:m,getTabPanelId:p,onSelected:u,orientation:i,registerTabIdLookup:g,selectionFollowsFocus:a,value:s},f)}}const yh=G.createContext(null);function va(){const e=G.useContext(yh);if(e==null)throw new Error("No TabsContext provided");return e}function jS(e){const{value:t,children:n}=e,{direction:r,getItemIndex:i,onSelected:o,orientation:a,registerItem:s,registerTabIdLookup:l,selectionFollowsFocus:u,totalSubitemCount:d,value:f,getTabId:h,getTabPanelId:p}=t,m=G.useMemo(()=>({getItemIndex:i,registerItem:s,totalSubitemCount:d}),[s,i,d]),g=G.useMemo(()=>({direction:r,getTabId:h,getTabPanelId:p,onSelected:o,orientation:a,registerTabIdLookup:l,selectionFollowsFocus:u,value:f}),[r,h,p,o,a,l,u,f]);return c.jsx(Vl.Provider,{value:m,children:c.jsx(yh.Provider,{value:g,children:n})})}function US(e){return e.size}function VS(e){const{value:t,id:n,rootRef:r}=e,i=va();if(i===null)throw new Error("No TabContext provided");const{value:o,getTabId:a}=i,s=Hi(n),l=G.useRef(null),u=ln(l,r),d=G.useMemo(()=>({id:s,ref:l}),[s]),{id:f}=uh(t!=null?t:US,d),h=f!==o,p=f!==void 0?a(f):void 0;return{hidden:h,getRootProps:(g={})=>D({"aria-labelledby":p!=null?p:void 0,hidden:h,id:s!=null?s:void 0},g,{ref:u}),rootRef:u}}const xh={valueChange:"valueChange"};function HS(e,t){if(t.type===xh.valueChange)return D({},e,{highlightedValue:t.value});const n=ah(e,t),{context:{selectionFollowsFocus:r}}=t;if(t.type===yt.itemsChange){if(n.selectedValues.length>0)return D({},n,{highlightedValue:n.selectedValues[0]});Dt(null,"reset",t.context)}return r&&n.highlightedValue!=null?D({},n,{selectedValues:[n.highlightedValue]}):n}function WS(e){var t;const{rootRef:n}=e,{direction:r="ltr",onSelected:i,orientation:o="horizontal",value:a,registerTabIdLookup:s,selectionFollowsFocus:l}=va(),{subitems:u,contextValue:d}=ch(),f=G.useCallback(O=>{var T;return(T=u.get(O))==null?void 0:T.id},[u]);s(f);const h=G.useMemo(()=>Array.from(u.keys()),[u]),p=G.useCallback(O=>{var T,N;return O==null?null:(T=(N=u.get(O))==null?void 0:N.ref.current)!=null?T:null},[u]),m=r==="rtl";let g;o==="vertical"?g="vertical":g=m?"horizontal-rtl":"horizontal-ltr";const b=G.useCallback((O,T)=>{var N;i(O,(N=T[0])!=null?N:null)},[i]),w=G.useMemo(()=>a===void 0?{}:a!=null?{selectedValues:[a]}:{selectedValues:[]},[a]),S=G.useCallback(O=>{var T,N;return(T=(N=u.get(O))==null?void 0:N.disabled)!=null?T:!1},[u]),{contextValue:C,dispatch:I,getRootProps:y,state:{highlightedValue:A,selectedValues:E},rootRef:k}=wS({controlledProps:w,disabledItemsFocusable:!l,focusManagement:"DOM",getItemDomElement:p,isItemDisabled:S,items:h,rootRef:n,onChange:b,orientation:g,reducerActionContext:G.useMemo(()=>({selectionFollowsFocus:l||!1}),[l]),selectionMode:"single",stateReducer:HS});G.useEffect(()=>{a!==void 0&&a!=null&&I({type:xh.valueChange,value:a})},[I,a]);const F=(O={})=>D({},O,y(O),{"aria-orientation":o==="vertical"?"vertical":void 0,role:"tablist"});return{contextValue:G.useMemo(()=>D({},d,C),[d,C]),dispatch:I,getRootProps:F,highlightedValue:A,isRtl:m,orientation:o,rootRef:k,selectedValue:(t=E[0])!=null?t:null}}function GS(e){const{value:t,children:n}=e,{dispatch:r,getItemIndex:i,getItemState:o,registerItem:a,totalSubitemCount:s}=t,l=G.useMemo(()=>({dispatch:r,getItemState:o,getItemIndex:i}),[r,i,o]),u=G.useMemo(()=>({getItemIndex:i,registerItem:a,totalSubitemCount:s}),[a,i,s]);return c.jsx(Vl.Provider,{value:u,children:c.jsx(lh.Provider,{value:l,children:n})})}function YS(e){return e.size}function KS(e){const{value:t,rootRef:n,disabled:r=!1,id:i}=e,o=G.useRef(null),a=Hi(i),{value:s,selectionFollowsFocus:l,getTabPanelId:u}=va(),d=G.useMemo(()=>({disabled:r,ref:o,id:a}),[r,o,a]),{id:f,index:h,totalItemCount:p}=uh(t!=null?t:YS,d),{getRootProps:m,highlighted:g,selected:b}=IS({item:f}),{getRootProps:w,rootRef:S,active:C,focusVisible:I,setFocusVisible:y}=zl({disabled:r,focusableWhenDisabled:!l,type:"button"}),A=ln(o,n,S),E=f!==void 0?u(f):void 0;return{getRootProps:(F={})=>{const Y=Mn(F),O=AS(m,w);return D({},F,O(Y),{role:"tab","aria-controls":E,"aria-selected":b,id:a,ref:A})},active:C,focusVisible:I,highlighted:g,index:h,rootRef:A,selected:b||f===s,setFocusVisible:y,totalTabsCount:p}}const Ch="$$joy";function QS(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}function qS(e,t){return Mt(e,t)}const JS=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},XS=["values","unit","step"],ZS=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)=>D({},n,{[r.key]:r.val}),{})};function wh(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ae(e,XS),o=ZS(t),a=Object.keys(o);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function u(h,p){const m=a.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:p)-r/100}${n})`}function d(h){return a.indexOf(h)+1<a.length?u(h,a[a.indexOf(h)+1]):s(h)}function f(h){const p=a.indexOf(h);return p===0?s(a[1]):p===a.length-1?l(a[p]):u(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return D({keys:a,values:o,up:s,down:l,between:u,only:d,not:f,unit:n},i)}const eA={borderRadius:4};function Wi(e,t){return t?$n(e,t,{clone:!1}):e}const Kl={xs:0,sm:600,md:900,lg:1200,xl:1536},Ih={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Kl[e]}px)`};function Fn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Ih;return t.reduce((a,s,l)=>(a[o.up(o.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const o=r.breakpoints||Ih;return Object.keys(t).reduce((a,s)=>{if(Object.keys(o.values||Kl).indexOf(s)!==-1){const l=o.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function tA(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function nA(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function tr(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function ba(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=tr(e,n)||r,t&&(i=t(i,r,e)),i}function ot(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,u=tr(l,r)||{};return Fn(a,s,f=>{let h=ba(u,i,f);return f===h&&typeof f=="string"&&(h=ba(u,i,`${t}${f==="default"?"":ye(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function rA(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const iA={m:"margin",p:"padding"},oA={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Sh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},aA=rA(e=>{if(e.length>2)if(Sh[e])e=Sh[e];else return[e];const[t,n]=e.split(""),r=iA[t],i=oA[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Ql=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],ql=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Ql,...ql];function Gi(e,t,n,r){var i;const o=(i=tr(e,t,!1))!=null?i:n;return typeof o=="number"?a=>typeof a=="string"?a:o*a:Array.isArray(o)?a=>typeof a=="string"?a:o[a]:typeof o=="function"?o:()=>{}}function Ah(e){return Gi(e,"spacing",8)}function Yi(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function sA(e,t){return n=>e.reduce((r,i)=>(r[i]=Yi(t,n),r),{})}function lA(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=aA(n),o=sA(i,r),a=e[n];return Fn(e,a,o)}function Th(e,t){const n=Ah(e.theme);return Object.keys(e).map(r=>lA(e,t,r,n)).reduce(Wi,{})}function Je(e){return Th(e,Ql)}Je.propTypes={},Je.filterProps=Ql;function Xe(e){return Th(e,ql)}Xe.propTypes={},Xe.filterProps=ql;function Eh(e=8){if(e.mui)return e;const t=Ah({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const a=t(o);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function ya(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Wi(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Zt(e){return typeof e!="number"?e:`${e}px solid`}function en(e,t){return ot({prop:e,themeKey:"borders",transform:t})}const cA=en("border",Zt),uA=en("borderTop",Zt),dA=en("borderRight",Zt),fA=en("borderBottom",Zt),hA=en("borderLeft",Zt),pA=en("borderColor"),gA=en("borderTopColor"),mA=en("borderRightColor"),vA=en("borderBottomColor"),bA=en("borderLeftColor"),yA=en("outline",Zt),xA=en("outlineColor"),xa=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Gi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Yi(t,r)});return Fn(e,e.borderRadius,n)}return null};xa.propTypes={},xa.filterProps=["borderRadius"],ya(cA,uA,dA,fA,hA,pA,gA,mA,vA,bA,xa,yA,xA);const Ca=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Gi(e.theme,"spacing",8),n=r=>({gap:Yi(t,r)});return Fn(e,e.gap,n)}return null};Ca.propTypes={},Ca.filterProps=["gap"];const wa=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Gi(e.theme,"spacing",8),n=r=>({columnGap:Yi(t,r)});return Fn(e,e.columnGap,n)}return null};wa.propTypes={},wa.filterProps=["columnGap"];const Ia=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Gi(e.theme,"spacing",8),n=r=>({rowGap:Yi(t,r)});return Fn(e,e.rowGap,n)}return null};Ia.propTypes={},Ia.filterProps=["rowGap"];const CA=ot({prop:"gridColumn"}),wA=ot({prop:"gridRow"}),IA=ot({prop:"gridAutoFlow"}),SA=ot({prop:"gridAutoColumns"}),AA=ot({prop:"gridAutoRows"}),TA=ot({prop:"gridTemplateColumns"}),EA=ot({prop:"gridTemplateRows"}),kA=ot({prop:"gridTemplateAreas"}),_A=ot({prop:"gridArea"});ya(Ca,wa,Ia,CA,wA,IA,SA,AA,TA,EA,kA,_A);function Hr(e,t){return t==="grey"?t:e}const PA=ot({prop:"color",themeKey:"palette",transform:Hr}),DA=ot({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Hr}),OA=ot({prop:"backgroundColor",themeKey:"palette",transform:Hr});ya(PA,DA,OA);function Ht(e){return e<=1&&e!==0?`${e*100}%`:e}const RA=ot({prop:"width",transform:Ht}),Jl=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||Kl[n];return o?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Ht(n)}};return Fn(e,e.maxWidth,t)}return null};Jl.filterProps=["maxWidth"];const LA=ot({prop:"minWidth",transform:Ht}),MA=ot({prop:"height",transform:Ht}),BA=ot({prop:"maxHeight",transform:Ht}),$A=ot({prop:"minHeight",transform:Ht});ot({prop:"size",cssProperty:"width",transform:Ht}),ot({prop:"size",cssProperty:"height",transform:Ht});const NA=ot({prop:"boxSizing"});ya(RA,Jl,LA,MA,BA,$A,NA);const Sa={border:{themeKey:"borders",transform:Zt},borderTop:{themeKey:"borders",transform:Zt},borderRight:{themeKey:"borders",transform:Zt},borderBottom:{themeKey:"borders",transform:Zt},borderLeft:{themeKey:"borders",transform:Zt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Zt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:xa},color:{themeKey:"palette",transform:Hr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Hr},backgroundColor:{themeKey:"palette",transform:Hr},p:{style:Xe},pt:{style:Xe},pr:{style:Xe},pb:{style:Xe},pl:{style:Xe},px:{style:Xe},py:{style:Xe},padding:{style:Xe},paddingTop:{style:Xe},paddingRight:{style:Xe},paddingBottom:{style:Xe},paddingLeft:{style:Xe},paddingX:{style:Xe},paddingY:{style:Xe},paddingInline:{style:Xe},paddingInlineStart:{style:Xe},paddingInlineEnd:{style:Xe},paddingBlock:{style:Xe},paddingBlockStart:{style:Xe},paddingBlockEnd:{style:Xe},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:Ca},rowGap:{style:Ia},columnGap:{style:wa},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ht},maxWidth:{style:Jl},minWidth:{transform:Ht},height:{transform:Ht},maxHeight:{transform:Ht},minHeight:{transform:Ht},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function FA(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function zA(e,t){return typeof e=="function"?e(t):e}function jA(){function e(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:d,style:f}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=tr(i,u)||{};return f?f(a):Fn(a,r,m=>{let g=ba(h,d,m);return m===g&&typeof m=="string"&&(g=ba(h,d,`${n}${m==="default"?"":ye(m)}`,m)),l===!1?g:{[l]:g}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:Sa;function s(l){let u=l;if(typeof l=="function")u=l(o);else if(typeof l!="object")return l;if(!u)return null;const d=tA(o.breakpoints),f=Object.keys(d);let h=d;return Object.keys(u).forEach(p=>{const m=zA(u[p],o);if(m!=null)if(typeof m=="object")if(a[p])h=Wi(h,e(p,m,o,a));else{const g=Fn({theme:o},m,b=>({[p]:b}));FA(g,m)?h[p]=t({sx:m,theme:o}):h=Wi(h,g)}else h=Wi(h,e(p,m,o,a))}),nA(f,h)}return Array.isArray(i)?i.map(s):s(i)}return t}const Aa=jA();Aa.filterProps=["sx"];function kh(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const UA=["breakpoints","palette","spacing","shape"];function _h(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=Ae(e,UA),s=wh(n),l=Eh(i);let u=$n({breakpoints:s,direction:"ltr",components:{},palette:D({mode:"light"},r),spacing:l,shape:D({},eA,o)},a);return u.applyStyles=kh,u=t.reduce((d,f)=>$n(d,f),u),u.unstable_sxConfig=D({},Sa,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(f){return Aa({sx:f,theme:this})},u}function VA(e){return Object.keys(e).length===0}function HA(e=null){const t=G.useContext(ge.ThemeContext);return!t||VA(t)?e:t}const WA=_h();function GA(e=WA){return HA(e)}const YA=["sx"],KA=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:Sa;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function QA(e){const{sx:t}=e,n=Ae(e,YA),{systemProps:r,otherProps:i}=KA(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...a)=>{const s=t(...a);return er(s)?D({},r,s):r}:o=D({},r,t),D({},i,{sx:o})}const qA=["ownerState"],JA=["variants"],XA=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function ZA(e){return Object.keys(e).length===0}function e1(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Xl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const t1=_h(),n1=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Ta({defaultTheme:e,theme:t,themeId:n}){return ZA(t)?e:t[n]||t}function r1(e){return e?(t,n)=>n[e]:null}function Ea(e,t){let{ownerState:n}=t,r=Ae(t,qA);const i=typeof e=="function"?e(D({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Ea(o,D({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let s=Ae(i,JA);return o.forEach(l=>{let u=!0;typeof l.props=="function"?u=l.props(D({ownerState:n},r,n)):Object.keys(l.props).forEach(d=>{(n==null?void 0:n[d])!==l.props[d]&&r[d]!==l.props[d]&&(u=!1)}),u&&(Array.isArray(s)||(s=[s]),s.push(typeof l.style=="function"?l.style(D({ownerState:n},r,n)):l.style))}),s}return i}function i1(e={}){const{themeId:t,defaultTheme:n=t1,rootShouldForwardProp:r=Xl,slotShouldForwardProp:i=Xl}=e,o=a=>Aa(D({},a,{theme:Ta(D({},a,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(a,s={})=>{JS(a,y=>y.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:d,skipSx:f,overridesResolver:h=r1(n1(u))}=s,p=Ae(s,XA),m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,g=f||!1;let b,w=Xl;u==="Root"||u==="root"?w=r:u?w=i:e1(a)&&(w=void 0);const S=qS(a,D({shouldForwardProp:w,label:b},p)),C=y=>typeof y=="function"&&y.__emotion_real!==y||er(y)?A=>Ea(y,D({},A,{theme:Ta({theme:A.theme,defaultTheme:n,themeId:t})})):y,I=(y,...A)=>{let E=C(y);const k=A?A.map(C):[];l&&h&&k.push(O=>{const T=Ta(D({},O,{defaultTheme:n,themeId:t}));if(!T.components||!T.components[l]||!T.components[l].styleOverrides)return null;const N=T.components[l].styleOverrides,V={};return Object.entries(N).forEach(([j,$])=>{V[j]=Ea($,D({},O,{theme:T}))}),h(O,V)}),l&&!m&&k.push(O=>{var T;const N=Ta(D({},O,{defaultTheme:n,themeId:t})),V=N==null||(T=N.components)==null||(T=T[l])==null?void 0:T.variants;return Ea({variants:V},D({},O,{theme:N}))}),g||k.push(o);const F=k.length-A.length;if(Array.isArray(y)&&F>0){const O=new Array(F).fill("");E=[...y,...O],E.raw=[...y.raw,...O]}const Y=S(E,...k);return a.muiName&&(Y.muiName=a.muiName),Y};return S.withConfig&&(I.withConfig=S.withConfig),I}}function o1(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:th(t.components[n].defaultProps,r)}function a1({props:e,name:t,defaultTheme:n,themeId:r}){let i=GA(n);return r&&(i=i[r]||i),o1({theme:i,name:t,props:e})}function s1(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Ph(e){if(e.type)return e;if(e.charAt(0)==="#")return Ph(s1(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(ta(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(ta(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const yr=e=>{const t=Ph(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};function Zl(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.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}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const Dh=(e,t,n,r=[])=>{let i=e;t.forEach((o,a)=>{a===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},l1=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([s,l])=>{(!n||n&&!n([...o,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...o,s],Array.isArray(l)?[...a,s]:a):t([...o,s],l,a))})}r(e)},c1=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().indexOf("opacity")>=0?t:`${t}px`:t;function ec(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return l1(e,(s,l,u)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const d=`--${n?`${n}-`:""}${s.join("-")}`;Object.assign(i,{[d]:c1(s,l)}),Dh(o,s,`var(${d})`,u),Dh(a,s,`var(${d}, ${l})`,u)}},s=>s[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function xr(e){"@babel/helpers - typeof";return xr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xr(e)}function u1(e,t){if(xr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function tc(e){var t=u1(e,"string");return xr(t)=="symbol"?t:t+""}const d1=["colorSchemes","components","defaultColorScheme"];function f1(e,t){const{colorSchemes:n={},defaultColorScheme:r="light"}=e,i=Ae(e,d1),{vars:o,css:a,varsWithDefaults:s}=ec(i,t);let l=s;const u={},{[r]:d}=n,f=Ae(n,[r].map(tc));if(Object.entries(f||{}).forEach(([p,m])=>{const{vars:g,css:b,varsWithDefaults:w}=ec(m,t);l=$n(l,w),u[p]={css:b,vars:g}}),d){const{css:p,vars:m,varsWithDefaults:g}=ec(d,t);l=$n(l,g),u[r]={css:p,vars:m}}return{vars:l,generateCssVars:p=>{var m;if(!p){var g;const w=D({},a);return{css:w,vars:o,selector:(t==null||(g=t.getSelector)==null?void 0:g.call(t,p,w))||":root"}}const b=D({},u[p].css);return{css:b,vars:u[p].vars,selector:(t==null||(m=t.getSelector)==null?void 0:m.call(t,p,b))||":root"}}}}const h1=D({},Sa,{borderRadius:{themeKey:"radius"},boxShadow:{themeKey:"shadow"},fontFamily:{themeKey:"fontFamily"},fontSize:{themeKey:"fontSize"},fontWeight:{themeKey:"fontWeight"},letterSpacing:{themeKey:"letterSpacing"},lineHeight:{themeKey:"lineHeight"}}),Ki={grey:{50:"#FBFCFE",100:"#F0F4F8",200:"#DDE7EE",300:"#CDD7E1",400:"#9FA6AD",500:"#636B74",600:"#555E68",700:"#32383E",800:"#171A1C",900:"#0B0D0E"},blue:{50:"#EDF5FD",100:"#E3EFFB",200:"#C7DFF7",300:"#97C3F0",400:"#4393E4",500:"#0B6BCB",600:"#185EA5",700:"#12467B",800:"#0A2744",900:"#051423"},yellow:{50:"#FEFAF6",100:"#FDF0E1",200:"#FCE1C2",300:"#F3C896",400:"#EA9A3E",500:"#9A5B13",600:"#72430D",700:"#492B08",800:"#2E1B05",900:"#1D1002"},red:{50:"#FEF6F6",100:"#FCE4E4",200:"#F7C5C5",300:"#F09898",400:"#E47474",500:"#C41C1C",600:"#A51818",700:"#7D1212",800:"#430A0A",900:"#240505"},green:{50:"#F6FEF6",100:"#E3FBE3",200:"#C7F7C7",300:"#A1E8A1",400:"#51BC51",500:"#1F7A1F",600:"#136C13",700:"#0A470A",800:"#042F04",900:"#021D02"}};function p1(e){var t;return!!e[0].match(/^(typography|variants|breakpoints)$/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/^(mode)$/))||e[0]==="focus"&&e[1]!=="thickness"}const at=(e,t)=>rh(e,t,"Mui"),Ze=(e,t)=>XI(e,t,"Mui"),g1=e=>e&&typeof e=="object"&&Object.keys(e).some(t=>{var n;return(n=t.match)==null?void 0:n.call(t,/^(plain(Hover|Active|Disabled)?(Color|Bg)|outlined(Hover|Active|Disabled)?(Color|Border|Bg)|soft(Hover|Active|Disabled)?(Color|Bg)|solid(Hover|Active|Disabled)?(Color|Bg))$/)}),Oh=(e,t,n)=>{t.includes("Color")&&(e.color=n),t.includes("Bg")&&(e.backgroundColor=n),t.includes("Border")&&(e.borderColor=n)},Rh=(e,t,n)=>{const r={};return Object.entries(t||{}).forEach(([i,o])=>{if(i.match(new RegExp(`${e}(color|bg|border)`,"i"))&&o){const a=n?n(i):o;i.includes("Disabled")&&(r.pointerEvents="none",r.cursor="default",r["--Icon-color"]="currentColor"),i.match(/(Hover|Active|Disabled)/)||(r["--variant-borderWidth"]||(r["--variant-borderWidth"]="0px"),i.includes("Border")&&(r["--variant-borderWidth"]="1px",r.border="var(--variant-borderWidth) solid")),Oh(r,i,a)}}),r},Tt=(e,t)=>{let n={};if(t){const{getCssVar:r,palette:i}=t;Object.entries(i).forEach(o=>{const[a,s]=o;g1(s)&&typeof s=="object"&&(n=D({},n,{[a]:Rh(e,s,l=>`var(--variant-${l}, ${r(`palette-${a}-${l}`,i[a][l])})`)}))})}return n.context=Rh(e,{plainColor:"var(--variant-plainColor)",plainHoverColor:"var(--variant-plainHoverColor)",plainHoverBg:"var(--variant-plainHoverBg)",plainActiveBg:"var(--variant-plainActiveBg)",plainDisabledColor:"var(--variant-plainDisabledColor)",outlinedColor:"var(--variant-outlinedColor)",outlinedBorder:"var(--variant-outlinedBorder)",outlinedHoverColor:"var(--variant-outlinedHoverColor)",outlinedHoverBorder:"var(--variant-outlinedHoverBorder)",outlinedHoverBg:"var(--variant-outlinedHoverBg)",outlinedActiveBg:"var(--variant-outlinedActiveBg)",outlinedDisabledColor:"var(--variant-outlinedDisabledColor)",outlinedDisabledBorder:"var(--variant-outlinedDisabledBorder)",softColor:"var(--variant-softColor)",softBg:"var(--variant-softBg)",softHoverColor:"var(--variant-softHoverColor)",softHoverBg:"var(--variant-softHoverBg)",softActiveBg:"var(--variant-softActiveBg)",softDisabledColor:"var(--variant-softDisabledColor)",softDisabledBg:"var(--variant-softDisabledBg)",solidColor:"var(--variant-solidColor)",solidBg:"var(--variant-solidBg)",solidHoverBg:"var(--variant-solidHoverBg)",solidActiveBg:"var(--variant-solidActiveBg)",solidDisabledColor:"var(--variant-solidDisabledColor)",solidDisabledBg:"var(--variant-solidDisabledBg)"}),n},m1=["cssVarPrefix","breakpoints","spacing","components","variants","shouldSkipGeneratingVar"],v1=["colorSchemes"],b1=(e="joy")=>Zl(e);function y1(e){var t,n,r,i,o,a,s,l,u,d;const f={},{cssVarPrefix:h="joy",breakpoints:p,spacing:m,components:g,variants:b,shouldSkipGeneratingVar:w=p1}=f,S=Ae(f,m1),C=b1(h),I={primary:Ki.blue,neutral:Ki.grey,danger:Ki.red,success:Ki.green,warning:Ki.yellow,common:{white:"#FFF",black:"#000"}},y=X=>{var le;const Z=X.split("-"),he=Z[1],Se=Z[2];return C(X,(le=I[he])==null?void 0:le[Se])},A=X=>({plainColor:y(`palette-${X}-500`),plainHoverBg:y(`palette-${X}-100`),plainActiveBg:y(`palette-${X}-200`),plainDisabledColor:y("palette-neutral-400"),outlinedColor:y(`palette-${X}-500`),outlinedBorder:y(`palette-${X}-300`),outlinedHoverBg:y(`palette-${X}-100`),outlinedActiveBg:y(`palette-${X}-200`),outlinedDisabledColor:y("palette-neutral-400"),outlinedDisabledBorder:y("palette-neutral-200"),softColor:y(`palette-${X}-700`),softBg:y(`palette-${X}-100`),softHoverBg:y(`palette-${X}-200`),softActiveColor:y(`palette-${X}-800`),softActiveBg:y(`palette-${X}-300`),softDisabledColor:y("palette-neutral-400"),softDisabledBg:y("palette-neutral-50"),solidColor:y("palette-common-white"),solidBg:y(`palette-${X}-500`),solidHoverBg:y(`palette-${X}-600`),solidActiveBg:y(`palette-${X}-700`),solidDisabledColor:y("palette-neutral-400"),solidDisabledBg:y("palette-neutral-100")}),E=X=>({plainColor:y(`palette-${X}-300`),plainHoverBg:y(`palette-${X}-800`),plainActiveBg:y(`palette-${X}-700`),plainDisabledColor:y("palette-neutral-500"),outlinedColor:y(`palette-${X}-200`),outlinedBorder:y(`palette-${X}-700`),outlinedHoverBg:y(`palette-${X}-800`),outlinedActiveBg:y(`palette-${X}-700`),outlinedDisabledColor:y("palette-neutral-500"),outlinedDisabledBorder:y("palette-neutral-800"),softColor:y(`palette-${X}-200`),softBg:y(`palette-${X}-800`),softHoverBg:y(`palette-${X}-700`),softActiveColor:y(`palette-${X}-100`),softActiveBg:y(`palette-${X}-600`),softDisabledColor:y("palette-neutral-500"),softDisabledBg:y("palette-neutral-800"),solidColor:y("palette-common-white"),solidBg:y(`palette-${X}-500`),solidHoverBg:y(`palette-${X}-600`),solidActiveBg:y(`palette-${X}-700`),solidDisabledColor:y("palette-neutral-500"),solidDisabledBg:y("palette-neutral-800")}),k={palette:{mode:"light",primary:D({},I.primary,A("primary")),neutral:D({},I.neutral,A("neutral"),{plainColor:y("palette-neutral-700"),plainHoverColor:y("palette-neutral-900"),outlinedColor:y("palette-neutral-700")}),danger:D({},I.danger,A("danger")),success:D({},I.success,A("success")),warning:D({},I.warning,A("warning")),common:{white:"#FFF",black:"#000"},text:{primary:y("palette-neutral-800"),secondary:y("palette-neutral-700"),tertiary:y("palette-neutral-600"),icon:y("palette-neutral-500")},background:{body:y("palette-common-white"),surface:y("palette-neutral-50"),popup:y("palette-common-white"),level1:y("palette-neutral-100"),level2:y("palette-neutral-200"),level3:y("palette-neutral-300"),tooltip:y("palette-neutral-500"),backdrop:`rgba(${C("palette-neutral-darkChannel",yr(I.neutral[900]))} / 0.25)`},divider:`rgba(${C("palette-neutral-mainChannel",yr(I.neutral[500]))} / 0.2)`,focusVisible:y("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"21 21 21",shadowOpacity:"0.08"},F={palette:{mode:"dark",primary:D({},I.primary,E("primary")),neutral:D({},I.neutral,E("neutral"),{plainColor:y("palette-neutral-300"),plainHoverColor:y("palette-neutral-300")}),danger:D({},I.danger,E("danger")),success:D({},I.success,E("success")),warning:D({},I.warning,E("warning")),common:{white:"#FFF",black:"#000"},text:{primary:y("palette-neutral-100"),secondary:y("palette-neutral-300"),tertiary:y("palette-neutral-400"),icon:y("palette-neutral-400")},background:{body:y("palette-common-black"),surface:y("palette-neutral-900"),popup:y("palette-common-black"),level1:y("palette-neutral-800"),level2:y("palette-neutral-700"),level3:y("palette-neutral-600"),tooltip:y("palette-neutral-600"),backdrop:`rgba(${C("palette-neutral-darkChannel",yr(I.neutral[50]))} / 0.25)`},divider:`rgba(${C("palette-neutral-mainChannel",yr(I.neutral[500]))} / 0.16)`,focusVisible:y("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"0 0 0",shadowOpacity:"0.6"},Y='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',O=D({body:`"Inter", ${C(`fontFamily-fallback, ${Y}`)}`,display:`"Inter", ${C(`fontFamily-fallback, ${Y}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:Y},S.fontFamily),T=D({sm:300,md:500,lg:600,xl:700},S.fontWeight),N=D({xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem"},S.fontSize),V=D({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},S.lineHeight),j=(t=(n=S.colorSchemes)==null||(n=n.light)==null?void 0:n.shadowRing)!=null?t:k.shadowRing,$=(r=(i=S.colorSchemes)==null||(i=i.light)==null?void 0:i.shadowChannel)!=null?r:k.shadowChannel,M=(o=(a=S.colorSchemes)==null||(a=a.light)==null?void 0:a.shadowOpacity)!=null?o:k.shadowOpacity,H={colorSchemes:{light:k,dark:F},fontSize:N,fontFamily:O,fontWeight:T,focus:{thickness:"2px",selector:`&.${at("","focusVisible")}, &:focus-visible`,default:{outlineOffset:`var(--focus-outline-offset, ${C("focus-thickness",(s=(l=S.focus)==null?void 0:l.thickness)!=null?s:"2px")})`,outline:`${C("focus-thickness",(u=(d=S.focus)==null?void 0:d.thickness)!=null?u:"2px")} solid ${C("palette-focusVisible",I.primary[500])}`}},lineHeight:V,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${C("shadowRing",j)}, 0px 1px 2px 0px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)})`,sm:`${C("shadowRing",j)}, 0px 1px 2px 0px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)}), 0px 2px 4px 0px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)})`,md:`${C("shadowRing",j)}, 0px 2px 8px -2px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)}), 0px 6px 12px -2px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)})`,lg:`${C("shadowRing",j)}, 0px 2px 8px -2px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)}), 0px 12px 16px -4px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)})`,xl:`${C("shadowRing",j)}, 0px 2px 8px -2px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)}), 0px 20px 24px -4px rgba(${C("shadowChannel",$)} / ${C("shadowOpacity",M)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,snackbar:1400,tooltip:1500},typography:{h1:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-xl, ${T.xl}`),fontSize:C(`fontSize-xl4, ${N.xl4}`),lineHeight:C(`lineHeight-xs, ${V.xs}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},h2:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-xl, ${T.xl}`),fontSize:C(`fontSize-xl3, ${N.xl3}`),lineHeight:C(`lineHeight-xs, ${V.xs}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},h3:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-lg, ${T.lg}`),fontSize:C(`fontSize-xl2, ${N.xl2}`),lineHeight:C(`lineHeight-xs, ${V.xs}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},h4:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-lg, ${T.lg}`),fontSize:C(`fontSize-xl, ${N.xl}`),lineHeight:C(`lineHeight-md, ${V.md}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},"title-lg":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-lg, ${T.lg}`),fontSize:C(`fontSize-lg, ${N.lg}`),lineHeight:C(`lineHeight-xs, ${V.xs}`),color:C(`palette-text-primary, ${k.palette.text.primary}`)},"title-md":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-md, ${T.md}`),fontSize:C(`fontSize-md, ${N.md}`),lineHeight:C(`lineHeight-md, ${V.md}`),color:C(`palette-text-primary, ${k.palette.text.primary}`)},"title-sm":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-md, ${T.md}`),fontSize:C(`fontSize-sm, ${N.sm}`),lineHeight:C(`lineHeight-sm, ${V.sm}`),color:C(`palette-text-primary, ${k.palette.text.primary}`)},"body-lg":{fontFamily:C(`fontFamily-body, ${O.body}`),fontSize:C(`fontSize-lg, ${N.lg}`),lineHeight:C(`lineHeight-md, ${V.md}`),color:C(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-md":{fontFamily:C(`fontFamily-body, ${O.body}`),fontSize:C(`fontSize-md, ${N.md}`),lineHeight:C(`lineHeight-md, ${V.md}`),color:C(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-sm":{fontFamily:C(`fontFamily-body, ${O.body}`),fontSize:C(`fontSize-sm, ${N.sm}`),lineHeight:C(`lineHeight-md, ${V.md}`),color:C(`palette-text-tertiary, ${k.palette.text.tertiary}`)},"body-xs":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-md, ${T.md}`),fontSize:C(`fontSize-xs, ${N.xs}`),lineHeight:C(`lineHeight-md, ${V.md}`),color:C(`palette-text-tertiary, ${k.palette.text.tertiary}`)}}},Q=S?$n(H,S):H,{colorSchemes:te}=Q,R=Ae(Q,v1),L=D({colorSchemes:te},R,{breakpoints:wh(p!=null?p:{}),components:$n({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:X,theme:le})=>{var Z;const he=X.instanceFontSize;return D({margin:"var(--Icon-margin)"},X.fontSize&&X.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${le.vars.fontSize[X.fontSize]})`},!X.htmlColor&&D({color:`var(--Icon-color, ${L.vars.palette.text.icon})`},X.color&&X.color!=="inherit"&&le.vars.palette[X.color]&&{color:`rgba(${(Z=le.vars.palette[X.color])==null?void 0:Z.mainChannel} / 1)`}),he&&he!=="inherit"&&{"--Icon-fontSize":le.vars.fontSize[he]})}}}},g),cssVarPrefix:h,getCssVar:C,spacing:Eh(m)});function U(X,le){Object.keys(le).forEach(Z=>{const he={main:"500",light:"200",dark:"700"};X==="dark"&&(he.main=400),!le[Z].mainChannel&&le[Z][he.main]&&(le[Z].mainChannel=yr(le[Z][he.main])),!le[Z].lightChannel&&le[Z][he.light]&&(le[Z].lightChannel=yr(le[Z][he.light])),!le[Z].darkChannel&&le[Z][he.dark]&&(le[Z].darkChannel=yr(le[Z][he.dark]))})}Object.entries(L.colorSchemes).forEach(([X,le])=>{U(X,le.palette)});const W={prefix:h,shouldSkipGeneratingVar:w},{vars:re,generateCssVars:se}=f1(D({colorSchemes:te},R),W);L.vars=re,L.generateCssVars=se,L.unstable_sxConfig=D({},h1,void 0),L.unstable_sx=function(le){return Aa({sx:le,theme:this})},L.getColorSchemeSelector=X=>X==="light"?"&":`&[data-joy-color-scheme="${X}"], [data-joy-color-scheme="${X}"] &`;const ae={getCssVar:C,palette:L.colorSchemes.light.palette};return L.variants=$n({plain:Tt("plain",ae),plainHover:Tt("plainHover",ae),plainActive:Tt("plainActive",ae),plainDisabled:Tt("plainDisabled",ae),outlined:Tt("outlined",ae),outlinedHover:Tt("outlinedHover",ae),outlinedActive:Tt("outlinedActive",ae),outlinedDisabled:Tt("outlinedDisabled",ae),soft:Tt("soft",ae),softHover:Tt("softHover",ae),softActive:Tt("softActive",ae),softDisabled:Tt("softDisabled",ae),solid:Tt("solid",ae),solidHover:Tt("solidHover",ae),solidActive:Tt("solidActive",ae),solidDisabled:Tt("solidDisabled",ae)},b),L.palette=D({},L.colorSchemes.light.palette,{colorScheme:"light"}),L.shouldSkipGeneratingVar=w,L.applyStyles=kh,L}const Lh=y1(),be=i1({defaultTheme:Lh,themeId:Ch});function ft({props:e,name:t}){return a1({props:e,name:t,defaultTheme:D({},Lh,{components:{}}),themeId:Ch})}function x1(e){return at("MuiAccordion",e)}const C1=Ze("MuiAccordion",["root","expanded","disabled"]),w1=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],I1=["component","slots","slotProps"],S1=["component"];function Ie(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:s}=t,l=Ae(t,w1),{component:u,slots:d={[e]:void 0},slotProps:f={[e]:void 0}}=o,h=Ae(o,I1),p=d[e]||r,m=MI(f[e],i),g=NI(D({className:n},l,{externalForwardedProps:e==="root"?h:void 0,externalSlotProps:m})),{props:{component:b},internalRef:w}=g,S=Ae(g.props,S1),C=ln(w,m==null?void 0:m.ref,t.ref),I=a?a(S):{},y=D({},i,I),A=e==="root"?b||u:b,E=LI(p,D({},e==="root"&&!u&&!d[e]&&s,e!=="root"&&!d[e]&&s,S,A&&{as:A},{ref:C}),y);return Object.keys(I).forEach(k=>{delete E[k]}),[p,E]}const nc=G.createContext({});function A1(e){return at("MuiListItem",e)}const Mh=Ze("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),ka=G.createContext(!1),rc=G.createContext(!1),Bh=G.createContext(!1),$h=G.createContext(void 0),T1=G.createContext(void 0),Nh=G.createContext(void 0),E1=["component","className","children","nested","sticky","variant","color","startAction","endAction","role","slots","slotProps"],k1=e=>{const{sticky:t,nested:n,nesting:r,variant:i,color:o}=e,a={root:["root",n&&"nested",r&&"nesting",t&&"sticky",o&&`color${ye(o)}`,i&&`variant${ye(i)}`],startAction:["startAction"],endAction:["endAction"]};return dt(a,A1,{})},ic=be("li")(({theme:e,ownerState:t})=>{var n;return[!t.nested&&{"--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItemButton-marginBlock":"calc(-1 * var(--ListItem-paddingY))",alignItems:"center",gap:"var(--ListItem-gap)",marginInline:"var(--ListItem-marginInline)"},t.nested&&{"--NestedList-marginRight":"calc(-1 * var(--ListItem-paddingRight))","--NestedList-marginLeft":"calc(-1 * var(--ListItem-paddingLeft))","--NestedListItem-paddingLeft":"calc(var(--ListItem-paddingLeft) + var(--List-nestedInsetStart))","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItem-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",flexDirection:"column"},D({"--unstable_actionRadius":"calc(var(--ListItem-radius) - var(--variant-borderWidth, 0px))"},t.startAction&&{"--unstable_startActionWidth":"2rem"},t.endAction&&{"--unstable_endActionWidth":"2.5rem"},{boxSizing:"border-box",borderRadius:"var(--ListItem-radius)",display:"var(--_ListItem-display)","&:not([hidden])":{"--_ListItem-display":"var(--_List-markerDisplay, flex)"},flex:"none",listStyleType:"var(--_List-markerType, disc)",position:"relative",paddingBlockStart:t.nested?0:"var(--ListItem-paddingY)",paddingBlockEnd:t.nested?0:"var(--ListItem-paddingY)",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)"},t["data-first-child"]===void 0&&D({},t.row?{marginInlineStart:"var(--List-gap)"}:{marginBlockStart:"var(--List-gap)"}),t.row&&t.wrap&&{marginInlineStart:"var(--List-gap)",marginBlockStart:"var(--List-gap)"},{minBlockSize:"var(--ListItem-minHeight)"},t.sticky&&{position:"sticky",top:"var(--ListItem-stickyTop, 0px)",zIndex:1,background:`var(--ListItem-stickyBackground, ${e.vars.palette.background.body})`},{[`.${Mh.nested} > &`]:{"--_ListItem-display":"flex"}}),(n=e.variants[t.variant])==null?void 0:n[t.color]]}),_1=be(ic,{name:"JoyListItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),P1=be("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",left:0,transform:"translate(var(--ListItem-startActionTranslateX), -50%)",zIndex:1})),D1=be("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",right:0,transform:"translate(var(--ListItem-endActionTranslateX), -50%)"})),Fh=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyListItem"}),i=G.useContext(Nh),o=G.useContext($h),a=G.useContext(rc),s=G.useContext(Bh),l=G.useContext(ka),{component:u,className:d,children:f,nested:h=!1,sticky:p=!1,variant:m="plain",color:g="neutral",startAction:b,endAction:w,role:S,slots:C={},slotProps:I={}}=r,y=Ae(r,E1),[A,E]=G.useState(""),[k,F]=(o==null?void 0:o.split(":"))||["",""],Y=u||(k&&!k.match(/^(ul|ol|menu)$/)?"div":void 0);let O=i==="menu"?"none":void 0;o&&(O={menu:"none",menubar:"none",group:"presentation"}[F]),S&&(O=S);const T=D({},r,{sticky:p,startAction:b,endAction:w,row:a,wrap:s,variant:m,color:g,nesting:l,nested:h,component:Y,role:O}),N=k1(T),V=D({},y,{component:Y,slots:C,slotProps:I}),[j,$]=Ie("root",{additionalProps:{role:O},ref:n,className:Bn(N.root,d),elementType:_1,externalForwardedProps:V,ownerState:T}),[M,H]=Ie("startAction",{className:N.startAction,elementType:P1,externalForwardedProps:V,ownerState:T}),[Q,te]=Ie("endAction",{className:N.endAction,elementType:D1,externalForwardedProps:V,ownerState:T});return c.jsx(T1.Provider,{value:E,children:c.jsx(ka.Provider,{value:h?A||!0:!1,children:c.jsxs(j,D({},$,{children:[b&&c.jsx(M,D({},H,{children:b})),G.Children.map(f,(R,L)=>{var U;return G.isValidElement(R)?G.cloneElement(R,D({},L===0&&{"data-first-child":""},Jf(R,["ListItem"])&&{component:((U=R.props)==null?void 0:U.component)||"div"})):R}),w&&c.jsx(Q,D({},te,{children:w}))]}))})})});Fh.muiName="ListItem";const zh=Fh;function O1(e){return at("MuiAccordionDetails",e)}const Cr=Ze("MuiAccordionDetails",["root","content","expanded"]),R1=["accordionId","component","color","children","defaultExpanded","disabled","expanded","onChange","variant","slots","slotProps"],L1=e=>{const{variant:t,color:n,expanded:r,disabled:i}=e,o={root:["root",r&&"expanded",i&&"disabled",n&&`color${ye(n)}`,t&&`variant${ye(t)}`]};return dt(o,x1,{})},M1=be(ic,{name:"JoyAccordion",slot:"Root",overridesResolver:(e,t)=>t.root})({borderBottom:"var(--Accordion-borderBottom)","&[data-first-child]":{"--ListItem-radius":"var(--unstable_List-childRadius) var(--unstable_List-childRadius) 0 0"},"&[data-last-child]":{"--ListItem-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)",'& [aria-expanded="true"]':{"--ListItem-radius":"0"},[`& .${Cr.root}`]:{"--AccordionDetails-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)"}},"&:not([data-first-child]):not([data-last-child])":{"--ListItem-radius":"0"}}),B1=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyAccordion"}),{accordionId:i,component:o="div",color:a="neutral",children:s,defaultExpanded:l=!1,disabled:u=!1,expanded:d,onChange:f,variant:h="plain",slots:p={},slotProps:m={}}=r,g=Ae(r,R1),b=Hi(i),[w,S]=Bl({controlled:d,default:l,name:"Accordion",state:"expanded"}),C=G.useCallback(Y=>{S(!w),f&&f(Y,!w)},[w,f,S]),I=G.useMemo(()=>({accordionId:b,expanded:w,disabled:u,toggle:C}),[b,w,u,C]),y=D({},g,{component:o,slots:p,slotProps:m}),A=D({},r,{component:o,color:a,variant:h,expanded:w,disabled:u,nested:!0}),E=L1(A),[k,F]=Ie("root",{ref:n,className:E.root,elementType:M1,externalForwardedProps:y,ownerState:A});return c.jsx(nc.Provider,{value:I,children:c.jsx(k,D({},F,{children:G.Children.map(s,(Y,O)=>G.isValidElement(Y)&&O===0?G.cloneElement(Y,{"data-first-child":""}):Y)}))})});function $1(e){return at("MuiAccordionGroup",e)}Ze("MuiAccordionGroup",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const N1={"--NestedList-marginRight":"0px","--NestedList-marginLeft":"0px","--NestedListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px"};function oc(e){const{children:t,nested:n,row:r=!1,wrap:i=!1}=e,o=c.jsx(rc.Provider,{value:r,children:c.jsx(Bh.Provider,{value:i,children:G.Children.map(t,(a,s)=>G.isValidElement(a)?G.cloneElement(a,D({},s===0&&{"data-first-child":""},s===G.Children.count(t)-1&&{"data-last-child":""})):a)})});return n===void 0?o:c.jsx(ka.Provider,{value:n,children:o})}const ac=({theme:e,ownerState:t},n)=>{let r={};function i(o){if(typeof o=="function"){const a=o(e);i(a)}else Array.isArray(o)?o.forEach(a=>{typeof a!="boolean"&&i(a)}):typeof o=="object"&&(r=D({},r,o))}return t.sx&&(i(t.sx),n.forEach(o=>{const a=r[o];if(typeof a=="string"||typeof a=="number")if(o==="borderRadius")if(typeof a=="number")r[o]=`${a}px`;else{var s;r[o]=((s=e.vars)==null?void 0:s.radius[a])||a}else["p","padding","m","margin"].indexOf(o)!==-1&&typeof a=="number"?r[o]=e.spacing(a):r[o]=a;else typeof a=="function"?r[o]=a(e):r[o]=void 0})),r};function F1(e){return at("MuiList",e)}Ze("MuiList",["root","nesting","scoped","sizeSm","sizeMd","sizeLg","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]);const z1=G.createContext(void 0),j1=["component","className","children","size","orientation","wrap","variant","color","role","slots","slotProps"],U1=e=>{const{variant:t,color:n,size:r,nesting:i,orientation:o,instanceSize:a}=e,s={root:["root",o,t&&`variant${ye(t)}`,n&&`color${ye(n)}`,!a&&!i&&r&&`size${ye(r)}`,a&&`size${ye(a)}`,i&&"nesting"]};return dt(s,F1,{})},sc=be("ul")(({theme:e,ownerState:t})=>{var n;const{p:r,padding:i,borderRadius:o}=ac({theme:e,ownerState:t},["p","padding","borderRadius"]);function a(s){return s==="sm"?{"--ListDivider-gap":"0.25rem","--ListItem-minHeight":"2rem","--ListItem-paddingY":"3px","--ListItem-paddingX":t.marker?"3px":"0.5rem","--ListItem-gap":"0.5rem","--ListItemDecorator-size":t.orientation==="horizontal"?"1.5rem":"2rem","--Icon-fontSize":e.vars.fontSize.lg}:s==="md"?{"--ListDivider-gap":"0.375rem","--ListItem-minHeight":"2.25rem","--ListItem-paddingY":"0.25rem","--ListItem-paddingX":t.marker?"0.25rem":"0.75rem","--ListItem-gap":"0.625rem","--ListItemDecorator-size":t.orientation==="horizontal"?"1.75rem":"2.5rem","--Icon-fontSize":e.vars.fontSize.xl}:s==="lg"?{"--ListDivider-gap":"0.5rem","--ListItem-minHeight":"2.75rem","--ListItem-paddingY":"0.375rem","--ListItem-paddingX":t.marker?"0.5rem":"1rem","--ListItem-gap":"0.75rem","--ListItemDecorator-size":t.orientation==="horizontal"?"2.25rem":"3rem","--Icon-fontSize":e.vars.fontSize.xl2}:{}}return[t.nesting&&D({},a(t.instanceSize),{"--ListItem-paddingRight":"var(--ListItem-paddingX)","--ListItem-paddingLeft":"var(--NestedListItem-paddingLeft)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px",padding:0},t.marker&&{paddingInlineStart:"calc(3ch - var(--_List-markerDeduct, 0px))"},{marginInlineStart:"var(--NestedList-marginLeft)",marginInlineEnd:"var(--NestedList-marginRight)",marginBlockStart:"var(--List-gap)",marginBlockEnd:"initial"}),!t.nesting&&D({},a(t.size),{"--List-gap":"0px","--List-nestedInsetStart":"0px","--ListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItem-paddingRight":"var(--ListItem-paddingX)"},t.marker&&{"--_List-markerDeduct":"1ch"},{"--unstable_List-childRadius":"calc(max(var(--List-radius) - var(--List-padding), min(var(--List-padding) / 2, var(--List-radius) / 2)) - var(--variant-borderWidth, 0px))","--ListItem-radius":"var(--unstable_List-childRadius)","--ListItem-startActionTranslateX":"calc(0.5 * var(--ListItem-paddingLeft))","--ListItem-endActionTranslateX":"calc(-0.5 * var(--ListItem-paddingRight))",margin:"initial"},e.typography[`body-${t.size}`],t.orientation==="horizontal"?D({},t.wrap?{padding:"var(--List-padding)",marginInlineStart:"calc(-1 * var(--List-gap))",marginBlockStart:"calc(-1 * var(--List-gap))"}:{paddingInline:"var(--List-padding, var(--ListDivider-gap))",paddingBlock:"var(--List-padding)"}):{paddingBlock:"var(--List-padding, var(--ListDivider-gap))",paddingInline:"var(--List-padding)"},t.marker&&{paddingInlineStart:"3ch"}),D({boxSizing:"border-box",borderRadius:"var(--List-radius)",listStyle:"none",display:"flex",flexDirection:t.orientation==="horizontal"?"row":"column"},t.wrap&&{flexWrap:"wrap"},t.marker&&{"--_List-markerDisplay":"list-item","--_List-markerType":t.marker,lineHeight:"calc(var(--ListItem-minHeight) - 2 * var(--ListItem-paddingY))"},{flexGrow:1,position:"relative"},(n=e.variants[t.variant])==null?void 0:n[t.color],{"--unstable_List-borderWidth":"var(--variant-borderWidth, 0px)"},o!==void 0&&{"--List-radius":o},r!==void 0&&{"--List-padding":r},i!==void 0&&{"--List-padding":i})]}),V1=be(sc,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({}),H1=G.forwardRef(function(t,n){var r;const i=G.useContext(ka),o=G.useContext(Nh),a=G.useContext(z1),s=ft({props:t,name:"JoyList"}),{component:l,className:u,children:d,size:f,orientation:h="vertical",wrap:p=!1,variant:m="plain",color:g="neutral",role:b,slots:w={},slotProps:S={}}=s,C=Ae(s,j1),I=f||((r=t.size)!=null?r:"md");let y;o&&(y="group"),a&&(y="presentation"),b&&(y=b);const A=D({},s,{instanceSize:t.size,size:I,nesting:i,orientation:h,wrap:p,variant:m,color:g,role:y}),E=U1(A),k=D({},C,{component:l,slots:w,slotProps:S}),[F,Y]=Ie("root",{ref:n,className:Bn(E.root,u),elementType:V1,externalForwardedProps:k,ownerState:A,additionalProps:{as:l,role:y,"aria-labelledby":typeof i=="string"?i:void 0}});return c.jsx(F,D({},Y,{children:c.jsx($h.Provider,{value:`${typeof l=="string"?l:""}:${y||""}`,children:c.jsx(oc,{row:h==="horizontal",wrap:p,children:d})})}))}),W1=["component","color","children","disableDivider","variant","transition","size","slots","slotProps"],G1=e=>{const{variant:t,color:n,size:r}=e,i={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`,r&&`size${ye(r)}`]};return dt(i,$1,{})},Y1=be(sc,{name:"JoyAccordionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{let n={};return t.transition&&(typeof t.transition=="string"&&(n={"--AccordionDetails-transition":`grid-template-rows ${t.transition}, padding-block ${t.transition}`}),typeof t.transition=="object"&&(n={"--AccordionDetails-transition":`grid-template-rows ${t.transition.initial}, padding-block ${t.transition.initial}`,[`& .${Cr.root}.${Cr.expanded}`]:{"--AccordionDetails-transition":`grid-template-rows ${t.transition.expanded}, padding-block ${t.transition.expanded}`}})),D({"--List-padding":"0px","--ListDivider-gap":"0px"},n,!t.disableDivider&&{[`& .${C1.root}:not([data-last-child])`]:{"--Accordion-borderBottom":`1px solid ${e.vars.palette.divider}`}})}),K1=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyAccordionGroup"}),{component:i="div",color:o="neutral",children:a,disableDivider:s=!1,variant:l="plain",transition:u="0.2s ease",size:d="md",slots:f={},slotProps:h={}}=r,p=Ae(r,W1),m=D({},p,{component:i,slots:f,slotProps:h}),g=D({},r,{component:i,color:o,disableDivider:s,variant:l,transition:u,size:d}),b=G1(g),[w,S]=Ie("root",{ref:n,className:b.root,elementType:Y1,externalForwardedProps:m,ownerState:g});return c.jsx(w,D({},S,{children:c.jsx(oc,{children:a})}))}),Q1=["component","children","color","variant","slots","slotProps"],q1=e=>{const{expanded:t}=e;return dt({root:["root",t&&"expanded"],content:["content",t&&"expanded"]},O1,{})},J1=be("div",{name:"JoyAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n;return D({overflow:"hidden",borderRadius:"var(--AccordionDetails-radius)",display:"grid",gridTemplateRows:"1fr",marginInline:"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",transition:"var(--AccordionDetails-transition)"},(n=t.variants[e.variant])==null?void 0:n[e.color],{[`&:not(.${Cr.expanded})`]:{gridTemplateRows:"0fr"}})}),X1=be("div",{name:"JoyAccordionDetails",slot:"Content",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",overflow:"hidden",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)",paddingBlockStart:"calc(var(--ListItem-paddingY) / 2)",paddingBlockEnd:"calc(2.5 * var(--ListItem-paddingY))",transition:"var(--AccordionDetails-transition)",[`&:not(.${Cr.expanded})`]:{paddingBlock:0}}),Z1=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyAccordionDetails"}),{component:i="div",children:o,color:a="neutral",variant:s="plain",slots:l={},slotProps:u={}}=r,d=Ae(r,Q1),{accordionId:f,expanded:h=!1}=G.useContext(nc),p=G.useRef(null),m=ln(p,n);G.useEffect(()=>{p.current&&p.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])').forEach(E=>{if(h){const k=E.getAttribute("data-prev-tabindex"),F=E.getAttribute("tabindex");F&&k&&(E.setAttribute("tabindex",k),E.removeAttribute("data-prev-tabindex")),!k&&!F&&E.removeAttribute("tabindex")}else E.setAttribute("data-prev-tabindex",E.getAttribute("tabindex")||""),E.setAttribute("tabindex","-1")})},[h]);const g=D({},d,{component:i,slots:l,slotProps:u}),b=D({},r,{component:i,color:a,variant:s,expanded:h,nesting:!0}),w=q1(b),[S,C]=Ie("root",{ref:m,className:w.root,elementType:J1,externalForwardedProps:g,additionalProps:{id:`${f}-details`,"aria-labelledby":`${f}-summary`,role:"region",hidden:h?void 0:!0},ownerState:b}),[I,y]=Ie("content",{className:w.content,elementType:X1,externalForwardedProps:g,ownerState:b});return c.jsx(S,D({},C,{children:c.jsx(I,D({},y,{children:o}))}))});function eT(e){return at("MuiAccordionSummary",e)}const _a=Ze("MuiAccordionSummary",["root","button","indicator","disabled","expanded"]),Pa=Ze("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]),tT=G.createContext("horizontal"),lc=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,s;return D({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",font:"inherit",display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"stretch",gap:"var(--ListItem-gap)"},t.orientation==="vertical"&&{flexDirection:"column",justifyContent:"center"},{textAlign:"initial",textDecoration:"initial",backgroundColor:"initial",cursor:"pointer",marginInline:"var(--ListItemButton-marginInline)",marginBlock:"var(--ListItemButton-marginBlock)"},t["data-first-child"]===void 0&&{marginInlineStart:t.row?"var(--List-gap)":void 0,marginBlockStart:t.row?void 0:"var(--List-gap)"},{paddingBlock:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px))",paddingInlineStart:"calc(var(--ListItem-paddingLeft) + var(--ListItem-startActionWidth, var(--unstable_startActionWidth, 0px)))",paddingInlineEnd:"calc(var(--ListItem-paddingRight) + var(--ListItem-endActionWidth, var(--unstable_endActionWidth, 0px)))",minBlockSize:"var(--ListItem-minHeight)",border:"1px solid transparent",borderRadius:"var(--ListItem-radius)",flex:"var(--unstable_ListItem-flex, none)",fontSize:"inherit",lineHeight:"inherit",minInlineSize:0,[e.focus.selector]:D({},e.focus.default,{zIndex:1})},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:active":(r=e.variants[`${t.variant}Active`])==null?void 0:r[t.color],[`.${Mh.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${Pa.selected}`]:D({},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${Pa.selected}, [aria-selected="true"])`]:{"&:hover":(o=e.variants[`${t.variant}Hover`])==null?void 0:o[t.color],"&:active":(a=e.variants[`${t.variant}Active`])==null?void 0:a[t.color]},[`&.${Pa.disabled}`]:D({},(s=e.variants[`${t.variant}Disabled`])==null?void 0:s[t.color])})});be(lc,{name:"JoyListItemButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>D({},!e.row&&{[`&.${Pa.selected}`]:{fontWeight:t.vars.fontWeight.md}}));function nT(e){return at("MuiSvgIcon",e)}Ze("MuiSvgIcon",["root","colorInherit","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","fontSizeInherit","fontSizeXs","fontSizeSm","fontSizeMd","fontSizeLg","fontSizeXl","fontSizeXl2","fontSizeXl3","fontSizeXl4","sizeSm","sizeMd","sizeLg"]);const rT=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],iT=e=>{const{color:t,size:n,fontSize:r}=e,i={root:["root",t&&t!=="inherit"&&`color${ye(t)}`,n&&`size${ye(n)}`,r&&`fontSize${ye(r)}`]};return dt(i,nT,{})},jh={sm:"xl",md:"xl2",lg:"xl3"},oT=be("svg",{name:"JoySvgIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return D({},t.instanceSize&&{"--Icon-fontSize":e.vars.fontSize[jh[t.instanceSize]]},t.instanceFontSize&&t.instanceFontSize!=="inherit"&&{"--Icon-fontSize":e.vars.fontSize[t.instanceFontSize]},{userSelect:"none",margin:"var(--Icon-margin)",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,fontSize:`var(--Icon-fontSize, ${e.vars.fontSize[jh[t.size]]||"unset"})`},t.fontSize&&t.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${e.fontSize[t.fontSize]})`},!t.htmlColor&&D({color:`var(--Icon-color, ${e.vars.palette.text.icon})`},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&e.vars.palette[t.color]&&{color:`rgba(${(n=e.vars.palette[t.color])==null?void 0:n.mainChannel} / 1)`}))}),Uh=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoySvgIcon"}),{children:i,className:o,color:a,component:s="svg",fontSize:l,htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24",size:p="md",slots:m={},slotProps:g={}}=r,b=Ae(r,rT),w=G.isValidElement(i)&&i.type==="svg",S=D({},r,{color:a,component:s,size:p,instanceSize:t.size,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:w}),C=iT(S),I=D({},b,{component:s,slots:m,slotProps:g}),[y,A]=Ie("root",{ref:n,className:Bn(C.root,o),elementType:oT,externalForwardedProps:I,ownerState:S,additionalProps:D({color:u,focusable:!1},f&&{role:"img"},!f&&{"aria-hidden":!0},!d&&{viewBox:h},w&&i.props)});return c.jsxs(y,D({},A,{children:[w?i.props.children:i,f?c.jsx("title",{children:f}):null]}))});function cc(e,t){function n(r,i){return c.jsx(Uh,D({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=Uh.muiName,G.memo(G.forwardRef(n))}const aT=cc(c.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");var Vh;const sT=["component","color","children","indicator","variant","slots","slotProps"],lT=e=>{const{disabled:t,expanded:n}=e;return dt({root:["root",t&&"disabled",n&&"expanded"],button:["button",t&&"disabled",n&&"expanded"],indicator:["indicator",t&&"disabled",n&&"expanded"]},eT,{})},cT=be(ic,{name:"JoyAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({fontWeight:e.vars.fontWeight.md,gap:"calc(var(--ListItem-paddingX, 0.75rem) + 0.25rem)",[`&.${_a.expanded}`]:{"--Icon-color":"currentColor"}})),uT=be(lc,{name:"JoyAccordionSummary",slot:"Button",overridesResolver:(e,t)=>t.button})({gap:"inherit",fontWeight:"inherit",justifyContent:"space-between",font:"inherit","&:focus-visible":{zIndex:1},[`.${_a.root} &`]:{"--unstable_ListItem-flex":"1 0 0%"}}),dT=be("span",{name:"JoyAccordionSummary",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})({display:"inline-flex",[`&.${_a.expanded}`]:{transform:"rotate(180deg)"}}),fT=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyAccordionSummary"}),{component:i="div",color:o="neutral",children:a,indicator:s=Vh||(Vh=c.jsx(aT,{})),variant:l="plain",slots:u={},slotProps:d={}}=r,f=Ae(r,sT),{accordionId:h,disabled:p=!1,expanded:m=!1,toggle:g}=G.useContext(nc),b=D({},f,{component:i,slots:u,slotProps:d}),w=D({},r,{component:i,color:o,disabled:p,expanded:m,variant:l}),S=Y=>{if(g&&g(Y),typeof d.button=="function"){var O,T;(O=d.button(w))==null||(T=O.onClick)==null||T.call(O,Y)}else{var N,V;(N=d.button)==null||(V=N.onClick)==null||V.call(N,Y)}},C=lT(w),[I,y]=Ie("root",{ref:n,className:C.root,elementType:cT,externalForwardedProps:b,ownerState:w}),[A,E]=Ie("button",{ref:n,className:C.button,elementType:uT,externalForwardedProps:b,additionalProps:{component:"button",id:`${h}-summary`,"aria-expanded":m?"true":"false","aria-controls":`${h}-details`,disabled:p,type:"button",onClick:S},ownerState:w}),[k,F]=Ie("indicator",{ref:n,className:C.indicator,elementType:dT,externalForwardedProps:b,ownerState:w});return c.jsx(I,D({},y,{children:c.jsxs(A,D({},E,{children:[a,s&&c.jsx(k,D({},F,{children:s}))]}))}))}),hT=({label:e,disabled:t,children:n})=>(t=t||!1,c.jsx(K1,{variant:"outlined",transition:"0.2s",sx:{borderRadius:"md",overflow:"hidden",[`& .${_a.button}:hover`]:{backgroundColor:"#fff"},[`& .${Cr.content}`]:{boxShadow:r=>`inset 0 1px ${r.vars.palette.divider}`,[`&.${Cr.expanded}`]:{paddingBlock:"0.75rem"}},marginBottom:"8px",backgroundColor:"#fff"},children:c.jsxs(B1,{disabled:t,children:[c.jsx(fT,{children:e}),c.jsx(Z1,{variant:"soft",children:n})]})})),uc={toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["blockquote","code-block"],[{direction:"rtl"}],[{script:"sub"},{script:"super"}],[{color:[]},{background:[]}],[{font:[]}],["link","image","video"],["clean"]]},dc=({label:e,property:t,value:n,defaultValue:r,placeholder:i,description:o,onChange:a})=>{const s=(l,u,d,f)=>{d!=="api"&&(f.getText().trim()===""?a(""):a(l))};return t==="description"?c.jsxs(v.FormControl,{sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{color:"primary",children:e}),c.jsx(xi,{value:n||r,defaultValue:r,onChange:s,modules:uc,placeholder:i,className:"ql-container ql-toolbar"})]}):t==="mini_games_explanation"?c.jsxs(v.FormControl,{children:[c.jsx(v.FormLabel,{color:"primary",children:e}),c.jsx(xi,{value:n||r,defaultValue:r,onChange:s,modules:uc,placeholder:i,className:"ql-container ql-toolbar"}),c.jsx(v.FormHelperText,{children:o})]}):c.jsx(v.Box,{sx:()=>({marginBottom:"16px"}),children:c.jsx(xi,{value:n||r,defaultValue:r,onChange:s,modules:uc,placeholder:i})})},pT=e=>{const t=n=>{n.persist(),e.onChange(n.target.value)};return c.jsxs(v.Tabs,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[c.jsxs(v.TabList,{sx:{borderRadius:0},tabFlex:"auto",children:[c.jsx(v.Tab,{children:e.labels.richText}),c.jsx(v.Tab,{children:e.labels.plainText})]}),c.jsx(v.TabPanel,{value:0,sx:{px:0},children:c.jsx(dc,{label:"",placeholder:"",defaultValue:e.defaultValue,property:"ad_content",onChange:e.onChange})}),c.jsx(v.TabPanel,{value:1,sx:{px:0},children:c.jsx(v.Textarea,{defaultValue:e.defaultValue,minRows:"7",onChange:t,sx:{marginBottom:"16px",overflow:"auto",resize:"vertical"}})})]})},gT=({label:e,defaultValue:t,values:n,description:r,onChange:i})=>{const o=(a,s)=>{i(s||"")};return c.jsxs(v.FormControl,{sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{color:"primary",children:e}),c.jsx(v.Select,{defaultValue:t,onChange:o,children:n.map((a,s)=>c.jsx(v.Option,{value:a,children:a},`basic-select-${a}-${s}`))}),r?c.jsx(v.FormHelperText,{children:r}):c.jsx(c.Fragment,{})]})},fc=G.createContext("md");function mT(e){return at("MuiTabs",e)}Ze("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const vT=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],bT=e=>{const{orientation:t,variant:n,color:r,size:i}=e,o={root:["root",t,n&&`variant${ye(n)}`,r&&`color${ye(r)}`,i&&`size${ye(i)}`]};return dt(o,mT,{})},yT=be("div",{name:"JoyTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r;const i=(n=t.variants[e.variant])==null?void 0:n[e.color],{bgcolor:o,backgroundColor:a,background:s,p:l,padding:u}=ac({theme:t,ownerState:e},["bgcolor","backgroundColor","background","p","padding"]),d=tr(t,`palette.${o}`)||o||tr(t,`palette.${a}`)||a||s||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||t.vars.palette.background.surface;return D({},e.size==="sm"&&{"--Tabs-spacing":"0.75rem"},e.size==="md"&&{"--Tabs-spacing":"1rem"},e.size==="lg"&&{"--Tabs-spacing":"1.25rem"},{"--Tab-indicatorThickness":"2px","--Icon-color":e.color!=="neutral"||e.variant==="solid"?"currentColor":t.vars.palette.text.icon,"--TabList-stickyBackground":d==="transparent"?"initial":d,display:"flex",flexDirection:"column"},e.orientation==="vertical"&&{flexDirection:"row"},{backgroundColor:t.vars.palette.background.surface,position:"relative"},t.typography[`body-${e.size}`],(r=t.variants[e.variant])==null?void 0:r[e.color],l!==void 0&&{"--Tabs-padding":l},u!==void 0&&{"--Tabs-padding":u})}),Hh=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyTabs"}),{children:i,value:o,defaultValue:a,orientation:s="horizontal",direction:l="ltr",component:u,variant:d="plain",color:f="neutral",size:h="md",slots:p={},slotProps:m={}}=r,g=Ae(r,vT),b=a||(o===void 0?0:void 0),{contextValue:w}=zS(D({},r,{orientation:s,defaultValue:b})),S=D({},r,{orientation:s,direction:l,variant:d,color:f,size:h}),C=bT(S),I=D({},g,{component:u,slots:p,slotProps:m}),[y,A]=Ie("root",{ref:n,elementType:yT,externalForwardedProps:I,additionalProps:{ref:n,as:u},ownerState:S,className:C.root});return c.jsx(y,D({},A,{children:c.jsx(jS,{value:w,children:c.jsx(fc.Provider,{value:h,children:i})})}))});function xT(e){return at("MuiTabList",e)}Ze("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);function CT(e){return at("MuiTab",e)}const hc=Ze("MuiTab",["root","disabled","focusVisible","selected","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]),wT=["component","children","variant","color","size","disableUnderline","underlinePlacement","tabFlex","sticky","slots","slotProps"],IT=e=>{const{orientation:t,size:n,variant:r,color:i}=e,o={root:["root",t,r&&`variant${ye(r)}`,i&&`color${ye(i)}`,n&&`size${ye(n)}`]};return dt(o,xT,{})},ST=be(sc,{name:"JoyTabList",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;const r=(n=e.variants[t.variant])==null?void 0:n[t.color];return D({"--List-gap":"0px","--ListDivider-gap":"0px","--ListItem-paddingX":"var(--Tabs-spacing)","--ListItem-gap":"0.375rem","--unstable_TabList-hasUnderline":t.disableUnderline?"var(--unknown,)":"initial"},N1,{flexGrow:"initial",flexDirection:t.orientation==="vertical"?"column":"row",borderRadius:"var(--List-radius, 0px)",padding:"var(--List-padding, 0px)",zIndex:1},t.sticky&&{position:"sticky",top:t.sticky==="top"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",bottom:t.sticky==="bottom"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",backgroundColor:(r==null?void 0:r.backgroundColor)||`var(--TabList-stickyBackground, ${e.vars.palette.background.body})`},!t.disableUnderline&&D({},t.underlinePlacement==="bottom"&&{"--unstable_TabList-underlineBottom":"1px",paddingBottom:1,boxShadow:`inset 0 -1px ${e.vars.palette.divider}`},t.underlinePlacement==="top"&&{"--unstable_TabList-underlineTop":"1px",paddingTop:1,boxShadow:`inset 0 1px ${e.vars.palette.divider}`},t.underlinePlacement==="right"&&{"--unstable_TabList-underlineRight":"1px",paddingRight:1,boxShadow:`inset -1px 0 ${e.vars.palette.divider}`},t.underlinePlacement==="left"&&{"--unstable_TabList-underlineLeft":"1px",paddingLeft:1,boxShadow:`inset 1px 0 ${e.vars.palette.divider}`}),t.tabFlex&&{[`& .${hc.root}`]:{flex:t.tabFlex}})}),Wh=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyTabList"}),i=G.useContext(fc),{isRtl:o,orientation:a,getRootProps:s,contextValue:l}=WS({rootRef:n}),{component:u="div",children:d,variant:f="plain",color:h="neutral",size:p,disableUnderline:m=!1,underlinePlacement:g=a==="horizontal"?"bottom":"right",tabFlex:b,sticky:w,slots:S={},slotProps:C={}}=r,I=Ae(r,wT),y=p!=null?p:i,A=D({},r,{isRtl:o,orientation:a,variant:f,color:h,size:y,sticky:w,tabFlex:b,nesting:!1,disableUnderline:m,underlinePlacement:g}),E=IT(A),k=D({},I,{component:u,slots:S,slotProps:C}),[F,Y]=Ie("root",{ref:n,elementType:ST,getSlotProps:s,externalForwardedProps:k,ownerState:A,className:E.root});return c.jsx(F,D({},Y,{children:c.jsx(GS,{value:l,children:c.jsx(oc,{row:a==="horizontal",nested:!0,children:d})})}))}),AT=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],TT=e=>{const{selected:t,disabled:n,focusVisible:r,variant:i,color:o,orientation:a}=e,s={root:["root",a,n&&"disabled",r&&"focusVisible",t&&"selected",i&&`variant${ye(i)}`,o&&`color${ye(o)}`]};return dt(s,CT,{})},ET=be(lc,{name:"JoyTab",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e})=>[{flex:"initial",justifyContent:e.row?"center":"initial","--unstable_ListItemDecorator-alignItems":"center","--unstable_offset":"min(calc(-1 * var(--variant-borderWidth, 0px)), -1px)"},!e.disableIndicator&&{'&[aria-selected="true"]':{"--Tab-indicatorColor":"currentColor",zIndex:1},"&::after":{content:'""',display:"block",position:"absolute",margin:"auto",background:"var(--Tab-indicatorColor)",borderRadius:"var(--Tab-indicatorRadius)"}},!e.disableIndicator&&e.indicatorPlacement==="bottom"&&{paddingBottom:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorThickness)",width:"var(--Tab-indicatorSize)",left:e.indicatorInset?"var(--ListItem-paddingLeft)":"var(--unstable_offset)",right:e.indicatorInset?"var(--ListItem-paddingRight)":"var(--unstable_offset)",bottom:"calc(-1px - var(--unstable_TabList-underlineBottom, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="top"&&{paddingTop:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorThickness)",width:"var(--Tab-indicatorSize)",left:e.indicatorInset?"var(--ListItem-paddingLeft)":"var(--unstable_offset)",right:e.indicatorInset?"var(--ListItem-paddingRight)":"var(--unstable_offset)",top:"calc(-1px - var(--unstable_TabList-underlineTop, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="right"&&{paddingRight:"calc(var(--ListItem-paddingRight) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorSize)",width:"var(--Tab-indicatorThickness)",top:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",bottom:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",right:"calc(-1px - var(--unstable_TabList-underlineRight, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="left"&&{paddingLeft:"calc(var(--ListItem-paddingLeft) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorSize)",width:"var(--Tab-indicatorThickness)",top:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",bottom:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",left:"calc(-1px - var(--unstable_TabList-underlineLeft, 0px))"}}]),Wr=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyTab"}),i=G.useContext(rc),{action:o,children:a,disabled:s=!1,component:l="button",orientation:u="horizontal",variant:d="plain",color:f="neutral",disableIndicator:h=!1,indicatorPlacement:p=i?"bottom":"right",indicatorInset:m=!1,slots:g={},slotProps:b={}}=r,w=Ae(r,AT),S=G.useRef(null),C=ln(S,n),{active:I,focusVisible:y,setFocusVisible:A,selected:E,getRootProps:k}=KS(D({},r,{rootRef:C}));G.useImperativeHandle(o,()=>({focusVisible:()=>{A(!0),S.current.focus()}}),[A]);const F=D({},r,{disableIndicator:h,indicatorPlacement:p,indicatorInset:m,orientation:u,row:i,active:I,focusVisible:y,disabled:s,selected:E,variant:d,color:f}),Y=TT(F),O=D({},w,{component:l,slots:g,slotProps:b}),[T,N]=Ie("root",{ref:n,elementType:ET,getSlotProps:k,externalForwardedProps:O,ownerState:F,className:Y.root});return c.jsx(tT.Provider,{value:u,children:c.jsx(T,D({},N,{children:a}))})});function zn(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 Gh(e){if(G.isValidElement(e)||qf.isValidElementType(e)||!zn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Gh(e[n])}),t}function Wt(e,t,n={clone:!0}){const r=n.clone?z({},e):e;return zn(e)&&zn(t)&&Object.keys(t).forEach(i=>{G.isValidElement(t[i])||qf.isValidElementType(t[i])?r[i]=t[i]:zn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&zn(e[i])?r[i]=Wt(e[i],t[i],n):n.clone?r[i]=zn(t[i])?Gh(t[i]):t[i]:r[i]=t[i]}),r}function wr(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 Gr(e){if(typeof e!="string")throw new Error(wr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function pc(e,t){const n=z({},t);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]=z(z({},e[i]),n[i]);else if(i==="componentsProps"||i==="slotProps"){const o=e[i],a=t[i];if(!a)n[i]=o||{};else if(!o)n[i]=a;else{n[i]=z({},a);for(const s in o)if(Object.prototype.hasOwnProperty.call(o,s)){const l=s;n[i][l]=pc(o[l],a[l])}}}else n[i]===void 0&&(n[i]=e[i])}return n}function kT(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let l=0;l<o.length;l+=1){const u=o[l];u&&(a+=(s===!0?"":" ")+t(u),s=!1,n&&n[u]&&(a+=" "+n[u]))}r[i]=a}return r}const Yh=e=>e,_T=(()=>{let e=Yh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Yh}}})(),PT={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 Kh(e,t,n="Mui"){const r=PT[t];return r?`${n}-${r}`:`${_T.generate(e)}-${t}`}function DT(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Kh(e,i,n)}),r}function OT(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Qi(e,t){return t?Wt(e,t,{clone:!1}):e}function RT(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var a,s;const o=/min-width:\s*([0-9.]+)/;return+(((a=r.match(o))==null?void 0:a[1])||0)-+(((s=i.match(o))==null?void 0:s[1])||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},z({},t)):t}function LT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function MT(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,i]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(o)}function BT(e){const t=(o,a)=>o.replace("@media",a?`@container ${a}`:"@container");function n(o,a){o.up=(...s)=>t(e.breakpoints.up(...s),a),o.down=(...s)=>t(e.breakpoints.down(...s),a),o.between=(...s)=>t(e.breakpoints.between(...s),a),o.only=(...s)=>t(e.breakpoints.only(...s),a),o.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},i=o=>(n(r,o),r);return n(i),q(z({},e),{containerQueries:i})}const Da={xs:0,sm:600,md:900,lg:1200,xl:1536},Qh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Da[e]}px)`},$T={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Da[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function jn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Qh;return t.reduce((a,s,l)=>(a[o.up(o.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const o=r.breakpoints||Qh;return Object.keys(t).reduce((a,s)=>{if(LT(o.keys,s)){const l=MT(r.containerQueries?r:$T,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(o.values||Da).includes(s)){const l=o.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function NT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function FT(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Oa(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Ra(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Oa(e,n)||r,t&&(i=t(i,r,e)),i}function st(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,u=Oa(l,r)||{};return jn(a,s,f=>{let h=Ra(u,i,f);return f===h&&typeof f=="string"&&(h=Ra(u,i,`${t}${f==="default"?"":Gr(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function zT(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const jT={m:"margin",p:"padding"},UT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},qh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},VT=zT(e=>{if(e.length>2)if(qh[e])e=qh[e];else return[e];const[t,n]=e.split(""),r=jT[t],i=UT[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),gc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],mc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...gc,...mc];function qi(e,t,n,r){var o;const i=(o=Oa(e,t,!0))!=null?o:n;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:typeof i=="string"?`calc(${a} * ${i})`:i*a:Array.isArray(i)?a=>{if(typeof a=="string")return a;const s=Math.abs(a),l=i[s];return a>=0?l:typeof l=="number"?-l:`-${l}`}:typeof i=="function"?i:()=>{}}function vc(e){return qi(e,"spacing",8)}function Ji(e,t){return typeof t=="string"||t==null?t:e(t)}function HT(e,t){return n=>e.reduce((r,i)=>(r[i]=Ji(t,n),r),{})}function WT(e,t,n,r){if(!t.includes(n))return null;const i=VT(n),o=HT(i,r),a=e[n];return jn(e,a,o)}function Jh(e,t){const n=vc(e.theme);return Object.keys(e).map(r=>WT(e,t,r,n)).reduce(Qi,{})}function et(e){return Jh(e,gc)}et.propTypes={},et.filterProps=gc;function tt(e){return Jh(e,mc)}tt.propTypes={},tt.filterProps=mc;function La(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Qi(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function tn(e){return typeof e!="number"?e:`${e}px solid`}function nn(e,t){return st({prop:e,themeKey:"borders",transform:t})}const GT=nn("border",tn),YT=nn("borderTop",tn),KT=nn("borderRight",tn),QT=nn("borderBottom",tn),qT=nn("borderLeft",tn),JT=nn("borderColor"),XT=nn("borderTopColor"),ZT=nn("borderRightColor"),eE=nn("borderBottomColor"),tE=nn("borderLeftColor"),nE=nn("outline",tn),rE=nn("outlineColor"),Ma=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=qi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Ji(t,r)});return jn(e,e.borderRadius,n)}return null};Ma.propTypes={},Ma.filterProps=["borderRadius"],La(GT,YT,KT,QT,qT,JT,XT,ZT,eE,tE,Ma,nE,rE);const Ba=e=>{if(e.gap!==void 0&&e.gap!==null){const t=qi(e.theme,"spacing",8),n=r=>({gap:Ji(t,r)});return jn(e,e.gap,n)}return null};Ba.propTypes={},Ba.filterProps=["gap"];const $a=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=qi(e.theme,"spacing",8),n=r=>({columnGap:Ji(t,r)});return jn(e,e.columnGap,n)}return null};$a.propTypes={},$a.filterProps=["columnGap"];const Na=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=qi(e.theme,"spacing",8),n=r=>({rowGap:Ji(t,r)});return jn(e,e.rowGap,n)}return null};Na.propTypes={},Na.filterProps=["rowGap"];const iE=st({prop:"gridColumn"}),oE=st({prop:"gridRow"}),aE=st({prop:"gridAutoFlow"}),sE=st({prop:"gridAutoColumns"}),lE=st({prop:"gridAutoRows"}),cE=st({prop:"gridTemplateColumns"}),uE=st({prop:"gridTemplateRows"}),dE=st({prop:"gridTemplateAreas"}),fE=st({prop:"gridArea"});La(Ba,$a,Na,iE,oE,aE,sE,lE,cE,uE,dE,fE);function Yr(e,t){return t==="grey"?t:e}const hE=st({prop:"color",themeKey:"palette",transform:Yr}),pE=st({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Yr}),gE=st({prop:"backgroundColor",themeKey:"palette",transform:Yr});La(hE,pE,gE);function Gt(e){return e<=1&&e!==0?`${e*100}%`:e}const mE=st({prop:"width",transform:Gt}),bc=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,o,a,s,l;const r=((a=(o=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:o.values)==null?void 0:a[n])||Da[n];return r?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Gt(n)}};return jn(e,e.maxWidth,t)}return null};bc.filterProps=["maxWidth"];const vE=st({prop:"minWidth",transform:Gt}),bE=st({prop:"height",transform:Gt}),yE=st({prop:"maxHeight",transform:Gt}),xE=st({prop:"minHeight",transform:Gt});st({prop:"size",cssProperty:"width",transform:Gt}),st({prop:"size",cssProperty:"height",transform:Gt});const CE=st({prop:"boxSizing"});La(mE,bc,vE,bE,yE,xE,CE);const Fa={border:{themeKey:"borders",transform:tn},borderTop:{themeKey:"borders",transform:tn},borderRight:{themeKey:"borders",transform:tn},borderBottom:{themeKey:"borders",transform:tn},borderLeft:{themeKey:"borders",transform:tn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:tn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ma},color:{themeKey:"palette",transform:Yr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Yr},backgroundColor:{themeKey:"palette",transform:Yr},p:{style:tt},pt:{style:tt},pr:{style:tt},pb:{style:tt},pl:{style:tt},px:{style:tt},py:{style:tt},padding:{style:tt},paddingTop:{style:tt},paddingRight:{style:tt},paddingBottom:{style:tt},paddingLeft:{style:tt},paddingX:{style:tt},paddingY:{style:tt},paddingInline:{style:tt},paddingInlineStart:{style:tt},paddingInlineEnd:{style:tt},paddingBlock:{style:tt},paddingBlockStart:{style:tt},paddingBlockEnd:{style:tt},m:{style:et},mt:{style:et},mr:{style:et},mb:{style:et},ml:{style:et},mx:{style:et},my:{style:et},margin:{style:et},marginTop:{style:et},marginRight:{style:et},marginBottom:{style:et},marginLeft:{style:et},marginX:{style:et},marginY:{style:et},marginInline:{style:et},marginInlineStart:{style:et},marginInlineEnd:{style:et},marginBlock:{style:et},marginBlockStart:{style:et},marginBlockEnd:{style:et},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:Ba},rowGap:{style:Na},columnGap:{style:$a},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Gt},maxWidth:{style:bc},minWidth:{transform:Gt},height:{transform:Gt},maxHeight:{transform:Gt},minHeight:{transform:Gt},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"}};function wE(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function IE(e,t){return typeof e=="function"?e(t):e}function SE(){function e(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:d,style:f}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=Oa(i,u)||{};return f?f(a):jn(a,r,m=>{let g=Ra(h,d,m);return m===g&&typeof m=="string"&&(g=Ra(h,d,`${n}${m==="default"?"":Gr(m)}`,m)),l===!1?g:{[l]:g}})}function t(n){var s;const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=(s=i.unstable_sxConfig)!=null?s:Fa;function a(l){let u=l;if(typeof l=="function")u=l(i);else if(typeof l!="object")return l;if(!u)return null;const d=NT(i.breakpoints),f=Object.keys(d);let h=d;return Object.keys(u).forEach(p=>{const m=IE(u[p],i);if(m!=null)if(typeof m=="object")if(o[p])h=Qi(h,e(p,m,i,o));else{const g=jn({theme:i},m,b=>({[p]:b}));wE(g,m)?h[p]=t({sx:m,theme:i}):h=Qi(h,g)}else h=Qi(h,e(p,m,i,o))}),RT(i,FT(f,h))}return Array.isArray(r)?r.map(a):a(r)}return t}const Kr=SE();Kr.filterProps=["sx"];function AE(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=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(i){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 TE={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},EE=!1,kE=/[A-Z]|^ms/g,_E=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Xh=function(t){return t.charCodeAt(1)===45},Zh=function(t){return t!=null&&typeof t!="boolean"},yc=QS(function(e){return Xh(e)?e:e.replace(kE,"-$&").toLowerCase()}),ep=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(_E,function(r,i,o){return nr={name:i,styles:o,next:nr},i})}return TE[t]!==1&&!Xh(t)&&typeof n=="number"&&n!==0?n+"px":n},PE="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function za(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 i=n;if(i.anim===1)return nr={name:i.name,styles:i.styles,next:nr},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)nr={name:a.name,styles:a.styles,next:nr},a=a.next;var s=o.styles+";";return s}return DE(e,t,n)}}var l=n;return l}function DE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=za(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;Zh(s)&&(r+=yc(o)+":"+ep(o,s)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&EE)throw new Error(PE);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var l=0;l<a.length;l++)Zh(a[l])&&(r+=yc(o)+":"+ep(o,a[l])+";");else{var u=za(e,t,a);switch(o){case"animation":case"animationName":{r+=yc(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}}return r}var tp=/label:\s*([^\s;{]+)\s*(;|$)/g,nr;function OE(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,i="";nr=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=za(n,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=za(n,t,e[s]),r){var l=o;i+=l[s]}tp.lastIndex=0;for(var u="",d;(d=tp.exec(i))!==null;)u+="-"+d[1];var f=AE(i)+u;return{name:f,styles:i,next:nr}}/**
|
|
2334
2334
|
* @mui/styled-engine v6.4.0
|
|
2335
2335
|
*
|
|
2336
2336
|
* @license MIT
|
|
@@ -2344,10 +2344,10 @@ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
|
2344
2344
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
2345
2345
|
|
|
2346
2346
|
export default theme;`}function Ec(e={},...t){const p=e,{breakpoints:n,mixins:r={},spacing:i,palette:o={},transitions:a={},typography:s={},shape:l}=p,u=Ge(p,["breakpoints","mixins","spacing","palette","transitions","typography","shape"]);if(e.vars)throw new Error(wr(20));const d=Tc(o),f=op(e);let h=Wt(f,{mixins:mk(f.breakpoints,r),palette:d,shadows:wk.slice(),typography:bk(d,s),transitions:Tk(a),zIndex:z({},Ek)});return h=Wt(h,u),h=t.reduce((m,g)=>Wt(m,g),h),h.unstable_sxConfig=z(z({},Fa),u==null?void 0:u.unstable_sxConfig),h.unstable_sx=function(g){return Kr({sx:g,theme:this})},h.toRuntimeSource=bp,h}function _k(e){let t;return e<1?t=5.11916*yi(e,2):t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Pk=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=_k(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function yp(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function xp(e){return e==="dark"?Pk:[]}function Dk(e){const a=e,{palette:t={mode:"light"},opacity:n,overlays:r}=a,i=Ge(a,["palette","opacity","overlays"]),o=Tc(t);return z({palette:o,opacity:z(z({},yp(o.mode)),n),overlays:r||xp(o.mode)},i)}function Ok(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Rk=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Lk=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let o=i;if(i==="class"&&(o=".%s"),i==="data"&&(o="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(o=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return Rk(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),o==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:o?{[o.replace("%s",t)]:a,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:z(z({},n),a)}}if(o&&o!=="media")return`${r}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(o)return o.replace("%s",String(t))}return r};function Mk(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function ee(e,t,n){!e[t]&&n&&(e[t]=n)}function to(e){return typeof e!="string"||!e.startsWith("hsl")?e:lp(e)}function Un(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Xi(to(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().
|
|
2347
|
-
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 Bk(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const yn=e=>{try{return e()}catch(t){}},$k=(e="mui")=>nk(e);function kc(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=Dk(q(z({},t),{palette:z({mode:i},t==null?void 0:t.palette)}));return}const s=Ec(q(z({},n),{palette:z({mode:i},t==null?void 0:t.palette)})),{palette:o}=s,a=Ge(s,["palette"]);return e[r]=q(z({},t),{palette:o,opacity:z(z({},yp(i)),t==null?void 0:t.opacity),overlays:(t==null?void 0:t.overlays)||xp(i)}),a}function Nk(e={},...t){const F=e,{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=Ok,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:l=":root"}=F,u=Ge(F,["colorSchemes","defaultColorScheme","disableCssColorScheme","cssVarPrefix","shouldSkipGeneratingVar","colorSchemeSelector","rootSelector"]),d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),h=$k(o),Y=n,{[f]:p,light:m,dark:g}=Y,b=Ge(Y,[$s(f),"light","dark"]),w=z({},b);let S=p;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(S=!0),!S)throw new Error(wr(21,f));const C=kc(w,S,u,f);m&&!w.light&&kc(w,m,void 0,"light"),g&&!w.dark&&kc(w,g,void 0,"dark");let I=q(z({defaultColorScheme:f},C),{cssVarPrefix:o,colorSchemeSelector:s,rootSelector:l,getCssVar:h,colorSchemes:w,font:z(z({},gk(C.typography)),C.font),spacing:Bk(u.spacing)});Object.keys(I.colorSchemes).forEach(O=>{const T=I.colorSchemes[O].palette,N=V=>{const j=V.split("-"),$=j[1],M=j[2];return h(V,T[$][M])};if(T.mode==="light"&&(ee(T.common,"background","#fff"),ee(T.common,"onBackground","#000")),T.mode==="dark"&&(ee(T.common,"background","#000"),ee(T.common,"onBackground","#fff")),Mk(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){ee(T.Alert,"errorColor",Ne(T.error.light,.6)),ee(T.Alert,"infoColor",Ne(T.info.light,.6)),ee(T.Alert,"successColor",Ne(T.success.light,.6)),ee(T.Alert,"warningColor",Ne(T.warning.light,.6)),ee(T.Alert,"errorFilledBg",N("palette-error-main")),ee(T.Alert,"infoFilledBg",N("palette-info-main")),ee(T.Alert,"successFilledBg",N("palette-success-main")),ee(T.Alert,"warningFilledBg",N("palette-warning-main")),ee(T.Alert,"errorFilledColor",yn(()=>T.getContrastText(T.error.main))),ee(T.Alert,"infoFilledColor",yn(()=>T.getContrastText(T.info.main))),ee(T.Alert,"successFilledColor",yn(()=>T.getContrastText(T.success.main))),ee(T.Alert,"warningFilledColor",yn(()=>T.getContrastText(T.warning.main))),ee(T.Alert,"errorStandardBg",Fe(T.error.light,.9)),ee(T.Alert,"infoStandardBg",Fe(T.info.light,.9)),ee(T.Alert,"successStandardBg",Fe(T.success.light,.9)),ee(T.Alert,"warningStandardBg",Fe(T.warning.light,.9)),ee(T.Alert,"errorIconColor",N("palette-error-main")),ee(T.Alert,"infoIconColor",N("palette-info-main")),ee(T.Alert,"successIconColor",N("palette-success-main")),ee(T.Alert,"warningIconColor",N("palette-warning-main")),ee(T.AppBar,"defaultBg",N("palette-grey-100")),ee(T.Avatar,"defaultBg",N("palette-grey-400")),ee(T.Button,"inheritContainedBg",N("palette-grey-300")),ee(T.Button,"inheritContainedHoverBg",N("palette-grey-A100")),ee(T.Chip,"defaultBorder",N("palette-grey-400")),ee(T.Chip,"defaultAvatarColor",N("palette-grey-700")),ee(T.Chip,"defaultIconColor",N("palette-grey-700")),ee(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),ee(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),ee(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),ee(T.LinearProgress,"primaryBg",Fe(T.primary.main,.62)),ee(T.LinearProgress,"secondaryBg",Fe(T.secondary.main,.62)),ee(T.LinearProgress,"errorBg",Fe(T.error.main,.62)),ee(T.LinearProgress,"infoBg",Fe(T.info.main,.62)),ee(T.LinearProgress,"successBg",Fe(T.success.main,.62)),ee(T.LinearProgress,"warningBg",Fe(T.warning.main,.62)),ee(T.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.11)`),ee(T.Slider,"primaryTrack",Fe(T.primary.main,.62)),ee(T.Slider,"secondaryTrack",Fe(T.secondary.main,.62)),ee(T.Slider,"errorTrack",Fe(T.error.main,.62)),ee(T.Slider,"infoTrack",Fe(T.info.main,.62)),ee(T.Slider,"successTrack",Fe(T.success.main,.62)),ee(T.Slider,"warningTrack",Fe(T.warning.main,.62));const V=Ha(T.background.default,.8);ee(T.SnackbarContent,"bg",V),ee(T.SnackbarContent,"color",yn(()=>T.getContrastText(V))),ee(T.SpeedDialAction,"fabHoverBg",Ha(T.background.paper,.15)),ee(T.StepConnector,"border",N("palette-grey-400")),ee(T.StepContent,"border",N("palette-grey-400")),ee(T.Switch,"defaultColor",N("palette-common-white")),ee(T.Switch,"defaultDisabledColor",N("palette-grey-100")),ee(T.Switch,"primaryDisabledColor",Fe(T.primary.main,.62)),ee(T.Switch,"secondaryDisabledColor",Fe(T.secondary.main,.62)),ee(T.Switch,"errorDisabledColor",Fe(T.error.main,.62)),ee(T.Switch,"infoDisabledColor",Fe(T.info.main,.62)),ee(T.Switch,"successDisabledColor",Fe(T.success.main,.62)),ee(T.Switch,"warningDisabledColor",Fe(T.warning.main,.62)),ee(T.TableCell,"border",Fe(Va(T.divider,1),.88)),ee(T.Tooltip,"bg",Va(T.grey[700],.92))}if(T.mode==="dark"){ee(T.Alert,"errorColor",Fe(T.error.light,.6)),ee(T.Alert,"infoColor",Fe(T.info.light,.6)),ee(T.Alert,"successColor",Fe(T.success.light,.6)),ee(T.Alert,"warningColor",Fe(T.warning.light,.6)),ee(T.Alert,"errorFilledBg",N("palette-error-dark")),ee(T.Alert,"infoFilledBg",N("palette-info-dark")),ee(T.Alert,"successFilledBg",N("palette-success-dark")),ee(T.Alert,"warningFilledBg",N("palette-warning-dark")),ee(T.Alert,"errorFilledColor",yn(()=>T.getContrastText(T.error.dark))),ee(T.Alert,"infoFilledColor",yn(()=>T.getContrastText(T.info.dark))),ee(T.Alert,"successFilledColor",yn(()=>T.getContrastText(T.success.dark))),ee(T.Alert,"warningFilledColor",yn(()=>T.getContrastText(T.warning.dark))),ee(T.Alert,"errorStandardBg",Ne(T.error.light,.9)),ee(T.Alert,"infoStandardBg",Ne(T.info.light,.9)),ee(T.Alert,"successStandardBg",Ne(T.success.light,.9)),ee(T.Alert,"warningStandardBg",Ne(T.warning.light,.9)),ee(T.Alert,"errorIconColor",N("palette-error-main")),ee(T.Alert,"infoIconColor",N("palette-info-main")),ee(T.Alert,"successIconColor",N("palette-success-main")),ee(T.Alert,"warningIconColor",N("palette-warning-main")),ee(T.AppBar,"defaultBg",N("palette-grey-900")),ee(T.AppBar,"darkBg",N("palette-background-paper")),ee(T.AppBar,"darkColor",N("palette-text-primary")),ee(T.Avatar,"defaultBg",N("palette-grey-600")),ee(T.Button,"inheritContainedBg",N("palette-grey-800")),ee(T.Button,"inheritContainedHoverBg",N("palette-grey-700")),ee(T.Chip,"defaultBorder",N("palette-grey-700")),ee(T.Chip,"defaultAvatarColor",N("palette-grey-300")),ee(T.Chip,"defaultIconColor",N("palette-grey-300")),ee(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),ee(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),ee(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),ee(T.LinearProgress,"primaryBg",Ne(T.primary.main,.5)),ee(T.LinearProgress,"secondaryBg",Ne(T.secondary.main,.5)),ee(T.LinearProgress,"errorBg",Ne(T.error.main,.5)),ee(T.LinearProgress,"infoBg",Ne(T.info.main,.5)),ee(T.LinearProgress,"successBg",Ne(T.success.main,.5)),ee(T.LinearProgress,"warningBg",Ne(T.warning.main,.5)),ee(T.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.13)`),ee(T.Slider,"primaryTrack",Ne(T.primary.main,.5)),ee(T.Slider,"secondaryTrack",Ne(T.secondary.main,.5)),ee(T.Slider,"errorTrack",Ne(T.error.main,.5)),ee(T.Slider,"infoTrack",Ne(T.info.main,.5)),ee(T.Slider,"successTrack",Ne(T.success.main,.5)),ee(T.Slider,"warningTrack",Ne(T.warning.main,.5));const V=Ha(T.background.default,.98);ee(T.SnackbarContent,"bg",V),ee(T.SnackbarContent,"color",yn(()=>T.getContrastText(V))),ee(T.SpeedDialAction,"fabHoverBg",Ha(T.background.paper,.15)),ee(T.StepConnector,"border",N("palette-grey-600")),ee(T.StepContent,"border",N("palette-grey-600")),ee(T.Switch,"defaultColor",N("palette-grey-300")),ee(T.Switch,"defaultDisabledColor",N("palette-grey-600")),ee(T.Switch,"primaryDisabledColor",Ne(T.primary.main,.55)),ee(T.Switch,"secondaryDisabledColor",Ne(T.secondary.main,.55)),ee(T.Switch,"errorDisabledColor",Ne(T.error.main,.55)),ee(T.Switch,"infoDisabledColor",Ne(T.info.main,.55)),ee(T.Switch,"successDisabledColor",Ne(T.success.main,.55)),ee(T.Switch,"warningDisabledColor",Ne(T.warning.main,.55)),ee(T.TableCell,"border",Ne(Va(T.divider,1),.68)),ee(T.Tooltip,"bg",Va(T.grey[700],.92))}Un(T.background,"default"),Un(T.background,"paper"),Un(T.common,"background"),Un(T.common,"onBackground"),Un(T,"divider"),Object.keys(T).forEach(V=>{const j=T[V];V!=="tonalOffset"&&j&&typeof j=="object"&&(j.main&&ee(T[V],"mainChannel",Xi(to(j.main))),j.light&&ee(T[V],"lightChannel",Xi(to(j.light))),j.dark&&ee(T[V],"darkChannel",Xi(to(j.dark))),j.contrastText&&ee(T[V],"contrastTextChannel",Xi(to(j.contrastText))),V==="text"&&(Un(T[V],"primary"),Un(T[V],"secondary")),V==="action"&&(j.active&&Un(T[V],"active"),j.selected&&Un(T[V],"selected")))})}),I=t.reduce((O,T)=>Wt(O,T),I);const y={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:Lk(I)},{vars:A,generateThemeVars:E,generateStyleSheets:k}=ok(I,y);return I.vars=A,Object.entries(I.colorSchemes[I.defaultColorScheme]).forEach(([O,T])=>{I[O]=T}),I.generateThemeVars=E,I.generateStyleSheets=k,I.generateSpacing=function(){return ip(u.spacing,vc(this))},I.getColorSchemeSelector=ak(s),I.spacing=I.generateSpacing(),I.shouldSkipGeneratingVar=a,I.unstable_sxConfig=z(z({},Fa),u==null?void 0:u.unstable_sxConfig),I.unstable_sx=function(T){return Kr({sx:T,theme:this})},I.toRuntimeSource=bp,I}function Cp(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]=q(z({},n!==!0&&n),{palette:Tc(q(z({},n===!0?{}:n.palette),{mode:t}))}))}function Fk(e={},...t){const d=e,{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n==null?void 0:n.mode}=d,a=Ge(d,["palette","cssVariables","colorSchemes","defaultColorScheme"]),s=o||"light",l=i==null?void 0:i[s],u=z(z({},i),n?{[s]:q(z({},typeof l!="boolean"&&l),{palette:n})}:void 0);if(r===!1){if(!("colorSchemes"in e))return Ec(e,...t);let f=n;"palette"in e||u[s]&&(u[s]!==!0?f=u[s].palette:s==="dark"&&(f={mode:"dark"}));const h=Ec(q(z({},e),{palette:f}),...t);return h.defaultColorScheme=s,h.colorSchemes=u,h.palette.mode==="light"&&(h.colorSchemes.light=q(z({},u.light!==!0&&u.light),{palette:h.palette}),Cp(h,"dark",u.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark=q(z({},u.dark!==!0&&u.dark),{palette:h.palette}),Cp(h,"light",u.light)),h}return!n&&!("light"in u)&&s==="light"&&(u.light=!0),Nk(z(q(z({},a),{colorSchemes:u,defaultColorScheme:s}),typeof r!="boolean"&&r),...t)}const zk=Fk(),jk="$$material";function Uk(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Vk=UE({themeId:jk,defaultTheme:zk,rootShouldForwardProp:e=>Uk(e)&&e!=="classes"}),Hk=tk;function Wk(e){return ek(e)}function Gk(e){return Kh("MuiSvgIcon",e)}DT("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Yk=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Gr(t)}`,`fontSize${Gr(n)}`]};return kT(i,Gk,r)},Kk=Vk("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Gr(n.color)}`],t[`fontSize${Gr(n.fontSize)}`]]}})(Hk(({theme:e})=>{var t,n,r,i,o,a,s,l,u,d,f,h,p,m,g,b,w,S;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(i=(r=((n=e.vars)!=null?n:e).transitions)==null?void 0:r.duration)==null?void 0:i.shorter}),variants:[{props:C=>!C.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((u=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:u.call(l,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}},...Object.entries(((h=e.vars)!=null?h:e).palette).filter(([,C])=>C&&C.main).map(([C])=>{var I,y,A;return{props:{color:C},style:{color:(A=(y=((I=e.vars)!=null?I:e).palette)==null?void 0:y[C])==null?void 0:A.main}}}),{props:{color:"action"},style:{color:(g=(m=((p=e.vars)!=null?p:e).palette)==null?void 0:m.action)==null?void 0:g.active}},{props:{color:"disabled"},style:{color:(S=(w=((b=e.vars)!=null?b:e).palette)==null?void 0:w.action)==null?void 0:S.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),_c=G.forwardRef(function(t,n){const r=Wk({props:t,name:"MuiSvgIcon"}),S=r,{children:i,className:o,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24"}=S,p=Ge(S,["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"]),m=G.isValidElement(i)&&i.type==="svg",g=q(z({},r),{color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:m}),b={};d||(b.viewBox=h);const w=Yk(g);return c.jsxs(Kk,q(z(z(z({as:s,className:Bn(w.root,o),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},b),p),m&&i.props),{ownerState:g,children:[m?i.props.children:i,f?c.jsx("title",{children:f}):null]}))});_c.muiName="SvgIcon";function Ve(e,t){function n(r,i){return c.jsx(_c,q(z({"data-testid":`${t}Icon`,ref:i},r),{children:e}))}return n.muiName=_c.muiName,G.memo(G.forwardRef(n))}const Pc=Ve(c.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),Qk=Ve(c.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8m-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12m3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8m5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8m3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"ColorLens"),qk=Ve(c.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function Jk(e){return at("MuiTabPanel",e)}Ze("MuiTabPanel",["root","hidden","sizeSm","sizeMd","sizeLg","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const Xk=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],Zk=e=>{const{hidden:t,size:n,variant:r,color:i,orientation:o}=e,a={root:["root",t&&"hidden",n&&`size${ye(n)}`,o,r&&`variant${ye(r)}`,i&&`color${ye(i)}`,n&&`size${ye(n)}`]};return dt(a,Jk,{})},e_=be("div",{name:"JoyTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return D({display:t.hidden?"none":"block",padding:"var(--Tabs-spacing)",flexGrow:1,fontFamily:e.vars.fontFamily.body},e.typography[`body-${t.size}`],(n=e.variants[t.variant])==null?void 0:n[t.color])}),ei=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyTabPanel"}),{orientation:i}=va()||{orientation:"horizontal"},o=G.useContext(fc),{children:a,value:s=0,component:l,color:u="neutral",variant:d="plain",size:f,slots:h={},slotProps:p={},keepMounted:m=!1}=r,g=Ae(r,Xk),{hidden:b,getRootProps:w}=VS(D({},r,{value:s})),S=f!=null?f:o,C=D({},r,{orientation:i,hidden:b,size:S,color:u,variant:d}),I=Zk(C),y=D({},g,{component:l,slots:h,slotProps:p}),[A,E]=Ie("root",{ref:n,elementType:e_,getSlotProps:w,externalForwardedProps:y,additionalProps:{role:"tabpanel",ref:n,as:l},ownerState:C,className:I.root});return m?c.jsx(A,D({},E,{children:a})):c.jsx(A,D({},E,{children:!b&&a}))});function t_(e){return at("MuiInput",e)}const wp=Ze("MuiInput",["root","input","formControl","focused","disabled","error","adornedStart","adornedEnd","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid","fullWidth","startDecorator","endDecorator"]),Wa=G.createContext(void 0),n_=["aria-describedby","aria-label","aria-labelledby","autoComplete","autoFocus","className","defaultValue","disabled","disabledInProp","error","id","name","onClick","onChange","onKeyDown","onKeyUp","onFocus","onBlur","placeholder","readOnly","required","type","value"];function r_(e,t){var n;const r=G.useContext(Wa),{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:s,autoFocus:l,className:u,defaultValue:d,disabled:f,disabledInProp:h,error:p,id:m,name:g,onClick:b,onChange:w,onKeyDown:S,onKeyUp:C,onFocus:I,onBlur:y,placeholder:A,readOnly:E,required:k,type:F,value:Y}=e,O=Ae(e,n_),{getRootProps:T,getInputProps:N,focused:V,error:j,disabled:$}=iS({disabled:(n=h!=null?h:r==null?void 0:r.disabled)!=null?n:f,defaultValue:d,error:p,onBlur:y,onClick:b,onChange:w,onFocus:I,required:k!=null?k:r==null?void 0:r.required,value:Y}),M={[t.disabled]:$,[t.error]:j,[t.focused]:V,[t.formControl]:!!r,[u]:u},H={[t.disabled]:$};return D({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:s,autoFocus:l,disabled:$,id:m,onKeyDown:S,onKeyUp:C,name:g,placeholder:A,readOnly:E,type:F},rootStateClasses:M,inputStateClasses:H,getRootProps:T,getInputProps:N,focused:V,error:j,disabled:$},O)}const Dc=e=>t=>`--${e?`${e}-`:""}${t.replace(/^--/,"")}`,no="data-skip-inverted-colors",Ip=`& :not([${no}], [${no}] *)`,Sp=e=>{var t,n,r,i,o,a,s,l,u,d,f,h,p,m,g,b,w,S,C,I,y,A;const E=Dc(e.cssVarPrefix);return{"--variant-plainColor":"var(--variant-plainColor) !important","--variant-plainHoverColor":"var(--variant-plainHoverColor) !important","--variant-plainHoverBg":"var(--variant-plainHoverBg) !important","--variant-plainActiveBg":"var(--variant-plainActiveBg) !important","--variant-plainDisabledColor":"var(--variant-plainDisabledColor) !important","--variant-outlinedColor":"var(--variant-outlinedColor) !important","--variant-outlinedBorder":"var(--variant-outlinedBorder) !important","--variant-outlinedHoverColor":"var(--variant-outlinedHoverColor) !important","--variant-outlinedHoverBorder":"var(--variant-outlinedHoverBorder) !important","--variant-outlinedHoverBg":"var(--variant-outlinedHoverBg) !important","--variant-outlinedActiveBg":"var(--variant-outlinedActiveBg) !important","--variant-outlinedDisabledColor":"var(--variant-outlinedDisabledColor) !important","--variant-outlinedDisabledBorder":"var(--variant-outlinedDisabledBorder) !important","--variant-softColor":"var(--variant-softColor) !important","--variant-softHoverColor":"var(--variant-softHoverColor) !important","--variant-softBg":"var(--variant-softBg) !important","--variant-softHoverBg":"var(--variant-softHoverBg) !important","--variant-softActiveBg":"var(--variant-softActiveBg) !important","--variant-softActiveColor":"var(--variant-softActiveColor) !important","--variant-softDisabledColor":"var(--variant-softDisabledColor) !important","--variant-softDisabledBg":"var(--variant-softDisabledBg) !important","--variant-solidColor":"var(--variant-solidColor) !important","--variant-solidBg":"var(--variant-solidBg) !important","--variant-solidHoverBg":"var(--variant-solidHoverBg) !important","--variant-solidActiveBg":"var(--variant-solidActiveBg) !important","--variant-solidDisabledColor":"var(--variant-solidDisabledColor) !important","--variant-solidDisabledBg":"var(--variant-solidDisabledBg) !important","--Badge-ringColor":"var(--Badge-ringColor) !important",colorScheme:"unset",[e.getColorSchemeSelector("light")]:{[E("--palette-focusVisible")]:`${(t=e.colorSchemes.light)==null?void 0:t.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(n=e.colorSchemes.light)==null?void 0:n.palette.background.body} !important`,[E("--palette-background-surface")]:`${(r=e.colorSchemes.light)==null?void 0:r.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(i=e.colorSchemes.light)==null?void 0:i.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(o=e.colorSchemes.light)==null?void 0:o.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(a=e.colorSchemes.light)==null?void 0:a.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(s=e.colorSchemes.light)==null?void 0:s.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(l=e.colorSchemes.light)==null?void 0:l.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(u=e.colorSchemes.light)==null?void 0:u.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(d=e.colorSchemes.light)==null?void 0:d.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(f=e.colorSchemes.light)==null?void 0:f.palette.divider} !important`},[e.getColorSchemeSelector("dark")]:{[E("--palette-focusVisible")]:`${(h=e.colorSchemes.dark)==null?void 0:h.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(p=e.colorSchemes.dark)==null?void 0:p.palette.background.body} !important`,[E("--palette-background-surface")]:`${(m=e.colorSchemes.dark)==null?void 0:m.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(g=e.colorSchemes.dark)==null?void 0:g.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(b=e.colorSchemes.dark)==null?void 0:b.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(w=e.colorSchemes.dark)==null?void 0:w.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(S=e.colorSchemes.dark)==null?void 0:S.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(C=e.colorSchemes.dark)==null?void 0:C.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(I=e.colorSchemes.dark)==null?void 0:I.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(y=e.colorSchemes.dark)==null?void 0:y.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(A=e.colorSchemes.dark)==null?void 0:A.palette.divider} !important`}}};function i_(e){return e.theme!==void 0}const o_=e=>t=>{const n=i_(t)?t.theme:t,r=Zl(n.cssVarPrefix),i=Dc(n.cssVarPrefix),o=a=>{const s=a.split("-");return r(a,n.palette[s[1]][s[2]])};return{[Ip]:{"--Badge-ringColor":o(`palette-${e}-solidBg`),"--Icon-color":"currentColor",[`${n.getColorSchemeSelector("light")}, ${n.getColorSchemeSelector("dark")}`]:{colorScheme:"dark",[i("--palette-focusVisible")]:o(`palette-${e}-200`),[i("--palette-background-body")]:"rgba(0 0 0 / 0.1)",[i("--palette-background-surface")]:"rgba(0 0 0 / 0.06)",[i("--palette-background-popup")]:o(`palette-${e}-700`),[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.36)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.6)`,[i("--palette-text-primary")]:o("palette-common-white"),[i("--palette-text-secondary")]:o(`palette-${e}-200`),[i("--palette-text-tertiary")]:o(`palette-${e}-300`),[i("--palette-text-icon")]:o(`palette-${e}-200`),[i("--palette-divider")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainColor":o(`palette-${e}-50`),"--variant-plainHoverColor":"#fff","--variant-plainHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedColor":o(`palette-${e}-50`),"--variant-outlinedBorder":`rgba(${o(`palette-${e}-lightChannel`)} / 0.5)`,"--variant-outlinedHoverColor":"#fff","--variant-outlinedHoverBorder":o(`palette-${e}-300`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":"rgba(255 255 255 / 0.2)","--variant-softColor":o("palette-common-white"),"--variant-softHoverColor":o("palette-common-white"),"--variant-softBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.24)`,"--variant-softHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.36)`,"--variant-softActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.16)`,"--variant-softActiveColor":"#fff","--variant-softDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.1)`,"--variant-solidColor":o(`palette-${e}-${e==="neutral"?"600":"500"}`),"--variant-solidBg":o("palette-common-white"),"--variant-solidHoverBg":o("palette-common-white"),"--variant-solidActiveBg":o(`palette-${e}-100`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.1)`}},[`&, & [${no}]`]:Sp(n)}},a_=e=>t=>{const{theme:n=t}=t,r=Zl(n.cssVarPrefix),i=Dc(n.cssVarPrefix),o=a=>{const s=a.split("-");return r(a,n.palette[s[1]][s[2]])};return{[Ip]:{"--Badge-ringColor":o(`palette-${e}-softBg`),"--Icon-color":"currentColor",[n.getColorSchemeSelector("dark")]:{[i("--palette-focusVisible")]:o(`palette-${e}-300`),[i("--palette-background-body")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.1)`,[i("--palette-background-surface")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,[i("--palette-text-primary")]:o(`palette-${e}-100`),[i("--palette-text-secondary")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,[i("--palette-text-tertiary")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.6)`,[i("--palette-text-icon")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.6)`,[i("--palette-divider")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.2)`,"--variant-plainColor":`rgba(${o(`palette-${e}-lightChannel`)} / 1)`,"--variant-plainHoverColor":o(`palette-${e}-50`),"--variant-plainHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.16)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-outlinedColor":`rgba(${o(`palette-${e}-lightChannel`)} / 1)`,"--variant-outlinedHoverColor":o(`palette-${e}-50`),"--variant-outlinedBg":"initial","--variant-outlinedBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverBorder":o(`palette-${e}-600`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.16)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,"--variant-softColor":o(`palette-${e}-200`),"--variant-softBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-softHoverColor":"#fff","--variant-softHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-softActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.48)`,"--variant-softDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-solidColor":"#fff","--variant-solidBg":o(`palette-${e}-500`),"--variant-solidHoverColor":"#fff","--variant-solidHoverBg":o(`palette-${e}-600`),"--variant-solidActiveBg":o(`palette-${e}-600`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`},[n.getColorSchemeSelector("light")]:{[i("--palette-focusVisible")]:o(`palette-${e}-500`),[i("--palette-background-body")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.1)`,[i("--palette-background-surface")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.48)`,[i("--palette-text-primary")]:o(`palette-${e}-700`),[i("--palette-text-secondary")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.8)`,[i("--palette-text-tertiary")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.68)`,[i("--palette-text-icon")]:o(`palette-${e}-500`),[i("--palette-divider")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-plainColor":`rgba(${o(`palette-${e}-darkChannel`)} / 0.8)`,"--variant-plainHoverColor":`rgba(${o(`palette-${e}-darkChannel`)} / 1)`,"--variant-plainHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-outlinedColor":`rgba(${o(`palette-${e}-mainChannel`)} / 1)`,"--variant-outlinedBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverColor":o(`palette-${e}-600`),"--variant-outlinedHoverBorder":o(`palette-${e}-300`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-outlinedDisabledBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-softColor":o(`palette-${e}-600`),"--variant-softBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.8)`,"--variant-softHoverColor":o(`palette-${e}-700`),"--variant-softHoverBg":o(`palette-${e}-200`),"--variant-softActiveBg":o(`palette-${e}-300`),"--variant-softDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,"--variant-solidColor":o("palette-common-white"),"--variant-solidBg":o(`palette-${e}-${e==="neutral"?"700":"500"}`),"--variant-solidHoverColor":o("palette-common-white"),"--variant-solidHoverBg":o(`palette-${e}-600`),"--variant-solidActiveBg":o(`palette-${e}-600`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`}},[`&, & [${no}]`]:Sp(n)}},s_=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","fullWidth","size","color","variant","startDecorator","endDecorator","component","slots","slotProps"],l_=e=>{const{disabled:t,fullWidth:n,variant:r,color:i,size:o}=e,a={root:["root",t&&"disabled",n&&"fullWidth",r&&`variant${ye(r)}`,i&&`color${ye(i)}`,o&&`size${ye(o)}`],input:["input"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return dt(a,t_,{})},c_=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,s;const l=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[D({"--Input-radius":e.vars.radius.sm,"--Input-gap":"0.5rem","--Input-placeholderColor":"inherit","--Input-placeholderOpacity":.64,"--Input-decoratorColor":e.vars.palette.text.icon,"--Input-focused":"0","--Input-focusedThickness":e.vars.focus.thickness,"--Input-focusedHighlight":(r=e.vars.palette[t.color==="neutral"?"primary":t.color])==null?void 0:r[500],[`&:not([${no}])`]:D({},t.instanceColor&&{"--_Input-focusedHighlight":(i=e.vars.palette[t.instanceColor==="neutral"?"primary":t.instanceColor])==null?void 0:i[500]},{"--Input-focusedHighlight":`var(--_Input-focusedHighlight, ${e.vars.palette.focusVisible})`})},t.size==="sm"&&{"--Input-minHeight":"2rem","--Input-paddingInline":"0.5rem","--Input-decoratorChildHeight":"min(1.5rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl},t.size==="md"&&{"--Input-minHeight":"2.25rem","--Input-paddingInline":"0.75rem","--Input-decoratorChildHeight":"min(1.75rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},t.size==="lg"&&{"--Input-minHeight":"2.75rem","--Input-paddingInline":"1rem","--Input-gap":"0.75rem","--Input-decoratorChildHeight":"min(2.25rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},{"--Input-decoratorChildOffset":"min(calc(var(--Input-paddingInline) - (var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2), var(--Input-paddingInline))","--_Input-paddingBlock":"max((var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2, 0px)","--Input-decoratorChildRadius":"max(var(--Input-radius) - var(--variant-borderWidth, 0px) - var(--_Input-paddingBlock), min(var(--_Input-paddingBlock) + var(--variant-borderWidth, 0px), var(--Input-radius) / 2))","--Button-minHeight":"var(--Input-decoratorChildHeight)","--Button-paddingBlock":"0px","--IconButton-size":"var(--Input-decoratorChildHeight)","--Button-radius":"var(--Input-decoratorChildRadius)","--IconButton-radius":"var(--Input-decoratorChildRadius)",boxSizing:"border-box"},t.variant!=="plain"&&{boxShadow:e.shadow.xs},{minWidth:0,minHeight:"var(--Input-minHeight)"},t.fullWidth&&{width:"100%"},{cursor:"text",position:"relative",display:"flex",paddingInline:"var(--Input-paddingInline)",borderRadius:"var(--Input-radius)"},e.typography[`body-${t.size}`],l,{backgroundColor:(o=l==null?void 0:l.backgroundColor)!=null?o:e.vars.palette.background.surface,"&::before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,zIndex:1,borderRadius:"inherit",margin:"calc(var(--variant-borderWidth, 0px) * -1)",boxShadow:"var(--Input-focusedInset, inset) 0 0 0 calc(var(--Input-focused) * var(--Input-focusedThickness)) var(--Input-focusedHighlight)"}}),{"&:hover":D({},(a=e.variants[`${t.variant}Hover`])==null?void 0:a[t.color],{backgroundColor:null}),[`&.${wp.disabled}`]:(s=e.variants[`${t.variant}Disabled`])==null?void 0:s[t.color],"&:focus-within::before":{"--Input-focused":"1"}}]}),u_=be("input")(({ownerState:e})=>({border:"none",minWidth:0,outline:0,padding:0,flex:1,color:"inherit",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontWeight:"inherit",lineHeight:"inherit",textOverflow:"ellipsis","&:-webkit-autofill":D({paddingInline:"var(--Input-paddingInline)"},!e.startDecorator&&{marginInlineStart:"calc(-1 * var(--Input-paddingInline))",paddingInlineStart:"var(--Input-paddingInline)",borderTopLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"},!e.endDecorator&&{marginInlineEnd:"calc(-1 * var(--Input-paddingInline))",paddingInlineEnd:"var(--Input-paddingInline)",borderTopRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"}),"&::-webkit-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-moz-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&:-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"}})),d_=be("div")({"--Button-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--IconButton-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--Icon-margin":"0 0 0 calc(var(--Input-paddingInline) / -4)",display:"inherit",alignItems:"center",paddingBlock:"var(--unstable_InputPaddingBlock)",flexWrap:"wrap",marginInlineEnd:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),f_=be("div")({"--Button-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--IconButton-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--Icon-margin":"0 calc(var(--Input-paddingInline) / -4) 0 0",display:"inherit",alignItems:"center",marginInlineStart:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),h_=be(c_,{name:"JoyInput",slot:"Root",overridesResolver:(e,t)=>t.root})({}),p_=be(u_,{name:"JoyInput",slot:"Input",overridesResolver:(e,t)=>t.input})({}),g_=be(d_,{name:"JoyInput",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({}),m_=be(f_,{name:"JoyInput",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({}),Ga=G.forwardRef(function(t,n){var r,i,o,a,s,l;const u=ft({props:t,name:"JoyInput"}),d=r_(D({},u,{disabledInProp:t.disabled}),wp),{propsToForward:f,rootStateClasses:h,inputStateClasses:p,getRootProps:m,getInputProps:g,formControl:b,focused:w,error:S=!1,disabled:C,fullWidth:I=!1,size:y="md",color:A="neutral",variant:E="outlined",startDecorator:k,endDecorator:F,component:Y,slots:O={},slotProps:T={}}=d,N=Ae(d,s_),V=(r=(i=t.error)!=null?i:b==null?void 0:b.error)!=null?r:S,j=(o=(a=t.size)!=null?a:b==null?void 0:b.size)!=null?o:y,$=(s=t.color)!=null?s:V?"danger":(l=b==null?void 0:b.color)!=null?l:A,M=D({instanceColor:V?"danger":t.color},u,{fullWidth:I,color:$,disabled:C,error:V,focused:w,size:j,variant:E}),H=l_(M),Q=D({},N,{component:Y,slots:O,slotProps:T}),[te,R]=Ie("root",{ref:n,className:[H.root,h],elementType:h_,getSlotProps:m,externalForwardedProps:Q,ownerState:M}),[L,U]=Ie("input",D({},b&&{additionalProps:{id:b.htmlFor,"aria-describedby":b["aria-describedby"]}},{className:[H.input,p],elementType:p_,getSlotProps:g,internalForwardedProps:f,externalForwardedProps:Q,ownerState:M})),[W,re]=Ie("startDecorator",{className:H.startDecorator,elementType:g_,externalForwardedProps:Q,ownerState:M}),[se,ae]=Ie("endDecorator",{className:H.endDecorator,elementType:m_,externalForwardedProps:Q,ownerState:M});return c.jsxs(te,D({},R,{children:[k&&c.jsx(W,D({},re,{children:k})),c.jsx(L,D({},U)),F&&c.jsx(se,D({},ae,{children:F}))]}))}),xn=({label:e,placeholder:t,value:n,defaultValue:r,required:i,size:o,readOnly:a=!1,endDecorator:s=void 0,onChange:l})=>c.jsxs(v.FormControl,{size:o||"md",sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{required:i,color:"primary",children:e}),c.jsx(Ga,{placeholder:t,size:"md",variant:"outlined",color:"neutral",value:n||r,defaultValue:r,readOnly:a,endDecorator:s,onChange:l,sx:{backgroundColor:"#fff",borderRadius:"md"}})]}),Ap=Ve(c.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");function v_(e){return at("MuiCircularProgress",e)}Ze("MuiCircularProgress",["root","determinate","svg","track","progress","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);let b_=e=>e,Tp;const y_=["color","backgroundColor"],x_=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],C_=ge.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),w_=e=>{const{determinate:t,color:n,variant:r,size:i}=e,o={root:["root",t&&"determinate",n&&`color${ye(n)}`,r&&`variant${ye(r)}`,i&&`size${ye(i)}`],svg:["svg"],track:["track"],progress:["progress"]};return dt(o,v_,{})};function ti(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}const I_=be("span",{name:"JoyCircularProgress",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i,o;const a=((n=t.variants[e.variant])==null?void 0:n[e.color])||{},{color:s,backgroundColor:l}=a,u=Ae(a,y_);return D({"--Icon-fontSize":"calc(0.4 * var(--_root-size))","--CircularProgress-trackColor":l,"--CircularProgress-progressColor":s,"--CircularProgress-percent":e.value,"--CircularProgress-linecap":"round"},e.size==="sm"&&{"--_root-size":"var(--CircularProgress-size, 24px)","--_track-thickness":ti("track","3px"),"--_progress-thickness":ti("progress","3px")},e.instanceSize==="sm"&&{"--CircularProgress-size":"24px"},e.size==="md"&&{"--_track-thickness":ti("track","6px"),"--_progress-thickness":ti("progress","6px"),"--_root-size":"var(--CircularProgress-size, 40px)"},e.instanceSize==="md"&&{"--CircularProgress-size":"40px"},e.size==="lg"&&{"--_track-thickness":ti("track","8px"),"--_progress-thickness":ti("progress","8px"),"--_root-size":"var(--CircularProgress-size, 64px)"},e.instanceSize==="lg"&&{"--CircularProgress-size":"64px"},e.thickness&&{"--_track-thickness":`${e.thickness}px`,"--_progress-thickness":`${e.thickness}px`},{"--_thickness-diff":"calc(var(--_track-thickness) - var(--_progress-thickness))","--_inner-size":"calc(var(--_root-size) - 2 * var(--variant-borderWidth, 0px))","--_outlined-inset":"max(var(--_track-thickness), var(--_progress-thickness))",width:"var(--_root-size)",height:"var(--_root-size)",borderRadius:"var(--_root-size)",margin:"var(--CircularProgress-margin)",boxSizing:"border-box",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0,position:"relative",color:s},e.children&&{fontFamily:t.vars.fontFamily.body,fontWeight:t.vars.fontWeight.md,fontSize:"calc(0.2 * var(--_root-size))"},u,e.variant==="outlined"&&{"&::before":D({content:'""',display:"block",position:"absolute",borderRadius:"inherit",top:"var(--_outlined-inset)",left:"var(--_outlined-inset)",right:"var(--_outlined-inset)",bottom:"var(--_outlined-inset)"},u)},e.variant==="soft"&&{"--CircularProgress-trackColor":t.variants.soft.neutral.backgroundColor,"--CircularProgress-progressColor":(r=t.variants.solid)==null?void 0:r[e.color].backgroundColor},e.variant==="solid"&&{"--CircularProgress-trackColor":(i=t.variants.softHover)==null?void 0:i[e.color].backgroundColor,"--CircularProgress-progressColor":(o=t.variants.solid)==null?void 0:o[e.color].backgroundColor})}),S_=be("svg",{name:"JoyCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({width:"inherit",height:"inherit",display:"inherit",boxSizing:"inherit",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))"}),A_=be("circle",{name:"JoyCircularProgress",slot:"track",overridesResolver:(e,t)=>t.track})({cx:"50%",cy:"50%",r:"calc(var(--_inner-size) / 2 - var(--_track-thickness) / 2 + min(0px, var(--_thickness-diff) / 2))",fill:"transparent",strokeWidth:"var(--_track-thickness)",stroke:"var(--CircularProgress-trackColor)"}),T_=be("circle",{name:"JoyCircularProgress",slot:"progress",overridesResolver:(e,t)=>t.progress})({"--_progress-radius":"calc(var(--_inner-size) / 2 - var(--_progress-thickness) / 2 - max(0px, var(--_thickness-diff) / 2))","--_progress-length":"calc(2 * 3.1415926535 * var(--_progress-radius))",cx:"50%",cy:"50%",r:"var(--_progress-radius)",fill:"transparent",strokeWidth:"var(--_progress-thickness)",stroke:"var(--CircularProgress-progressColor)",strokeLinecap:"var(--CircularProgress-linecap, round)",strokeDasharray:"var(--_progress-length)",strokeDashoffset:"calc(var(--_progress-length) - var(--CircularProgress-percent) * var(--_progress-length) / 100)",transformOrigin:"center",transform:"rotate(-90deg)"},({ownerState:e})=>!e.determinate&&ge.css(Tp||(Tp=b_`
|
|
2347
|
+
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 Bk(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const xn=e=>{try{return e()}catch(t){}},$k=(e="mui")=>nk(e);function kc(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=Dk(q(z({},t),{palette:z({mode:i},t==null?void 0:t.palette)}));return}const s=Ec(q(z({},n),{palette:z({mode:i},t==null?void 0:t.palette)})),{palette:o}=s,a=Ge(s,["palette"]);return e[r]=q(z({},t),{palette:o,opacity:z(z({},yp(i)),t==null?void 0:t.opacity),overlays:(t==null?void 0:t.overlays)||xp(i)}),a}function Nk(e={},...t){const F=e,{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=Ok,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:l=":root"}=F,u=Ge(F,["colorSchemes","defaultColorScheme","disableCssColorScheme","cssVarPrefix","shouldSkipGeneratingVar","colorSchemeSelector","rootSelector"]),d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),h=$k(o),Y=n,{[f]:p,light:m,dark:g}=Y,b=Ge(Y,[$s(f),"light","dark"]),w=z({},b);let S=p;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(S=!0),!S)throw new Error(wr(21,f));const C=kc(w,S,u,f);m&&!w.light&&kc(w,m,void 0,"light"),g&&!w.dark&&kc(w,g,void 0,"dark");let I=q(z({defaultColorScheme:f},C),{cssVarPrefix:o,colorSchemeSelector:s,rootSelector:l,getCssVar:h,colorSchemes:w,font:z(z({},gk(C.typography)),C.font),spacing:Bk(u.spacing)});Object.keys(I.colorSchemes).forEach(O=>{const T=I.colorSchemes[O].palette,N=V=>{const j=V.split("-"),$=j[1],M=j[2];return h(V,T[$][M])};if(T.mode==="light"&&(ee(T.common,"background","#fff"),ee(T.common,"onBackground","#000")),T.mode==="dark"&&(ee(T.common,"background","#000"),ee(T.common,"onBackground","#fff")),Mk(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){ee(T.Alert,"errorColor",Ne(T.error.light,.6)),ee(T.Alert,"infoColor",Ne(T.info.light,.6)),ee(T.Alert,"successColor",Ne(T.success.light,.6)),ee(T.Alert,"warningColor",Ne(T.warning.light,.6)),ee(T.Alert,"errorFilledBg",N("palette-error-main")),ee(T.Alert,"infoFilledBg",N("palette-info-main")),ee(T.Alert,"successFilledBg",N("palette-success-main")),ee(T.Alert,"warningFilledBg",N("palette-warning-main")),ee(T.Alert,"errorFilledColor",xn(()=>T.getContrastText(T.error.main))),ee(T.Alert,"infoFilledColor",xn(()=>T.getContrastText(T.info.main))),ee(T.Alert,"successFilledColor",xn(()=>T.getContrastText(T.success.main))),ee(T.Alert,"warningFilledColor",xn(()=>T.getContrastText(T.warning.main))),ee(T.Alert,"errorStandardBg",Fe(T.error.light,.9)),ee(T.Alert,"infoStandardBg",Fe(T.info.light,.9)),ee(T.Alert,"successStandardBg",Fe(T.success.light,.9)),ee(T.Alert,"warningStandardBg",Fe(T.warning.light,.9)),ee(T.Alert,"errorIconColor",N("palette-error-main")),ee(T.Alert,"infoIconColor",N("palette-info-main")),ee(T.Alert,"successIconColor",N("palette-success-main")),ee(T.Alert,"warningIconColor",N("palette-warning-main")),ee(T.AppBar,"defaultBg",N("palette-grey-100")),ee(T.Avatar,"defaultBg",N("palette-grey-400")),ee(T.Button,"inheritContainedBg",N("palette-grey-300")),ee(T.Button,"inheritContainedHoverBg",N("palette-grey-A100")),ee(T.Chip,"defaultBorder",N("palette-grey-400")),ee(T.Chip,"defaultAvatarColor",N("palette-grey-700")),ee(T.Chip,"defaultIconColor",N("palette-grey-700")),ee(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),ee(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),ee(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),ee(T.LinearProgress,"primaryBg",Fe(T.primary.main,.62)),ee(T.LinearProgress,"secondaryBg",Fe(T.secondary.main,.62)),ee(T.LinearProgress,"errorBg",Fe(T.error.main,.62)),ee(T.LinearProgress,"infoBg",Fe(T.info.main,.62)),ee(T.LinearProgress,"successBg",Fe(T.success.main,.62)),ee(T.LinearProgress,"warningBg",Fe(T.warning.main,.62)),ee(T.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.11)`),ee(T.Slider,"primaryTrack",Fe(T.primary.main,.62)),ee(T.Slider,"secondaryTrack",Fe(T.secondary.main,.62)),ee(T.Slider,"errorTrack",Fe(T.error.main,.62)),ee(T.Slider,"infoTrack",Fe(T.info.main,.62)),ee(T.Slider,"successTrack",Fe(T.success.main,.62)),ee(T.Slider,"warningTrack",Fe(T.warning.main,.62));const V=Ha(T.background.default,.8);ee(T.SnackbarContent,"bg",V),ee(T.SnackbarContent,"color",xn(()=>T.getContrastText(V))),ee(T.SpeedDialAction,"fabHoverBg",Ha(T.background.paper,.15)),ee(T.StepConnector,"border",N("palette-grey-400")),ee(T.StepContent,"border",N("palette-grey-400")),ee(T.Switch,"defaultColor",N("palette-common-white")),ee(T.Switch,"defaultDisabledColor",N("palette-grey-100")),ee(T.Switch,"primaryDisabledColor",Fe(T.primary.main,.62)),ee(T.Switch,"secondaryDisabledColor",Fe(T.secondary.main,.62)),ee(T.Switch,"errorDisabledColor",Fe(T.error.main,.62)),ee(T.Switch,"infoDisabledColor",Fe(T.info.main,.62)),ee(T.Switch,"successDisabledColor",Fe(T.success.main,.62)),ee(T.Switch,"warningDisabledColor",Fe(T.warning.main,.62)),ee(T.TableCell,"border",Fe(Va(T.divider,1),.88)),ee(T.Tooltip,"bg",Va(T.grey[700],.92))}if(T.mode==="dark"){ee(T.Alert,"errorColor",Fe(T.error.light,.6)),ee(T.Alert,"infoColor",Fe(T.info.light,.6)),ee(T.Alert,"successColor",Fe(T.success.light,.6)),ee(T.Alert,"warningColor",Fe(T.warning.light,.6)),ee(T.Alert,"errorFilledBg",N("palette-error-dark")),ee(T.Alert,"infoFilledBg",N("palette-info-dark")),ee(T.Alert,"successFilledBg",N("palette-success-dark")),ee(T.Alert,"warningFilledBg",N("palette-warning-dark")),ee(T.Alert,"errorFilledColor",xn(()=>T.getContrastText(T.error.dark))),ee(T.Alert,"infoFilledColor",xn(()=>T.getContrastText(T.info.dark))),ee(T.Alert,"successFilledColor",xn(()=>T.getContrastText(T.success.dark))),ee(T.Alert,"warningFilledColor",xn(()=>T.getContrastText(T.warning.dark))),ee(T.Alert,"errorStandardBg",Ne(T.error.light,.9)),ee(T.Alert,"infoStandardBg",Ne(T.info.light,.9)),ee(T.Alert,"successStandardBg",Ne(T.success.light,.9)),ee(T.Alert,"warningStandardBg",Ne(T.warning.light,.9)),ee(T.Alert,"errorIconColor",N("palette-error-main")),ee(T.Alert,"infoIconColor",N("palette-info-main")),ee(T.Alert,"successIconColor",N("palette-success-main")),ee(T.Alert,"warningIconColor",N("palette-warning-main")),ee(T.AppBar,"defaultBg",N("palette-grey-900")),ee(T.AppBar,"darkBg",N("palette-background-paper")),ee(T.AppBar,"darkColor",N("palette-text-primary")),ee(T.Avatar,"defaultBg",N("palette-grey-600")),ee(T.Button,"inheritContainedBg",N("palette-grey-800")),ee(T.Button,"inheritContainedHoverBg",N("palette-grey-700")),ee(T.Chip,"defaultBorder",N("palette-grey-700")),ee(T.Chip,"defaultAvatarColor",N("palette-grey-300")),ee(T.Chip,"defaultIconColor",N("palette-grey-300")),ee(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),ee(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),ee(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),ee(T.LinearProgress,"primaryBg",Ne(T.primary.main,.5)),ee(T.LinearProgress,"secondaryBg",Ne(T.secondary.main,.5)),ee(T.LinearProgress,"errorBg",Ne(T.error.main,.5)),ee(T.LinearProgress,"infoBg",Ne(T.info.main,.5)),ee(T.LinearProgress,"successBg",Ne(T.success.main,.5)),ee(T.LinearProgress,"warningBg",Ne(T.warning.main,.5)),ee(T.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.13)`),ee(T.Slider,"primaryTrack",Ne(T.primary.main,.5)),ee(T.Slider,"secondaryTrack",Ne(T.secondary.main,.5)),ee(T.Slider,"errorTrack",Ne(T.error.main,.5)),ee(T.Slider,"infoTrack",Ne(T.info.main,.5)),ee(T.Slider,"successTrack",Ne(T.success.main,.5)),ee(T.Slider,"warningTrack",Ne(T.warning.main,.5));const V=Ha(T.background.default,.98);ee(T.SnackbarContent,"bg",V),ee(T.SnackbarContent,"color",xn(()=>T.getContrastText(V))),ee(T.SpeedDialAction,"fabHoverBg",Ha(T.background.paper,.15)),ee(T.StepConnector,"border",N("palette-grey-600")),ee(T.StepContent,"border",N("palette-grey-600")),ee(T.Switch,"defaultColor",N("palette-grey-300")),ee(T.Switch,"defaultDisabledColor",N("palette-grey-600")),ee(T.Switch,"primaryDisabledColor",Ne(T.primary.main,.55)),ee(T.Switch,"secondaryDisabledColor",Ne(T.secondary.main,.55)),ee(T.Switch,"errorDisabledColor",Ne(T.error.main,.55)),ee(T.Switch,"infoDisabledColor",Ne(T.info.main,.55)),ee(T.Switch,"successDisabledColor",Ne(T.success.main,.55)),ee(T.Switch,"warningDisabledColor",Ne(T.warning.main,.55)),ee(T.TableCell,"border",Ne(Va(T.divider,1),.68)),ee(T.Tooltip,"bg",Va(T.grey[700],.92))}Un(T.background,"default"),Un(T.background,"paper"),Un(T.common,"background"),Un(T.common,"onBackground"),Un(T,"divider"),Object.keys(T).forEach(V=>{const j=T[V];V!=="tonalOffset"&&j&&typeof j=="object"&&(j.main&&ee(T[V],"mainChannel",Xi(to(j.main))),j.light&&ee(T[V],"lightChannel",Xi(to(j.light))),j.dark&&ee(T[V],"darkChannel",Xi(to(j.dark))),j.contrastText&&ee(T[V],"contrastTextChannel",Xi(to(j.contrastText))),V==="text"&&(Un(T[V],"primary"),Un(T[V],"secondary")),V==="action"&&(j.active&&Un(T[V],"active"),j.selected&&Un(T[V],"selected")))})}),I=t.reduce((O,T)=>Wt(O,T),I);const y={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:Lk(I)},{vars:A,generateThemeVars:E,generateStyleSheets:k}=ok(I,y);return I.vars=A,Object.entries(I.colorSchemes[I.defaultColorScheme]).forEach(([O,T])=>{I[O]=T}),I.generateThemeVars=E,I.generateStyleSheets=k,I.generateSpacing=function(){return ip(u.spacing,vc(this))},I.getColorSchemeSelector=ak(s),I.spacing=I.generateSpacing(),I.shouldSkipGeneratingVar=a,I.unstable_sxConfig=z(z({},Fa),u==null?void 0:u.unstable_sxConfig),I.unstable_sx=function(T){return Kr({sx:T,theme:this})},I.toRuntimeSource=bp,I}function Cp(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]=q(z({},n!==!0&&n),{palette:Tc(q(z({},n===!0?{}:n.palette),{mode:t}))}))}function Fk(e={},...t){const d=e,{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n==null?void 0:n.mode}=d,a=Ge(d,["palette","cssVariables","colorSchemes","defaultColorScheme"]),s=o||"light",l=i==null?void 0:i[s],u=z(z({},i),n?{[s]:q(z({},typeof l!="boolean"&&l),{palette:n})}:void 0);if(r===!1){if(!("colorSchemes"in e))return Ec(e,...t);let f=n;"palette"in e||u[s]&&(u[s]!==!0?f=u[s].palette:s==="dark"&&(f={mode:"dark"}));const h=Ec(q(z({},e),{palette:f}),...t);return h.defaultColorScheme=s,h.colorSchemes=u,h.palette.mode==="light"&&(h.colorSchemes.light=q(z({},u.light!==!0&&u.light),{palette:h.palette}),Cp(h,"dark",u.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark=q(z({},u.dark!==!0&&u.dark),{palette:h.palette}),Cp(h,"light",u.light)),h}return!n&&!("light"in u)&&s==="light"&&(u.light=!0),Nk(z(q(z({},a),{colorSchemes:u,defaultColorScheme:s}),typeof r!="boolean"&&r),...t)}const zk=Fk(),jk="$$material";function Uk(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Vk=UE({themeId:jk,defaultTheme:zk,rootShouldForwardProp:e=>Uk(e)&&e!=="classes"}),Hk=tk;function Wk(e){return ek(e)}function Gk(e){return Kh("MuiSvgIcon",e)}DT("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Yk=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Gr(t)}`,`fontSize${Gr(n)}`]};return kT(i,Gk,r)},Kk=Vk("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Gr(n.color)}`],t[`fontSize${Gr(n.fontSize)}`]]}})(Hk(({theme:e})=>{var t,n,r,i,o,a,s,l,u,d,f,h,p,m,g,b,w,S;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(i=(r=((n=e.vars)!=null?n:e).transitions)==null?void 0:r.duration)==null?void 0:i.shorter}),variants:[{props:C=>!C.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((u=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:u.call(l,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}},...Object.entries(((h=e.vars)!=null?h:e).palette).filter(([,C])=>C&&C.main).map(([C])=>{var I,y,A;return{props:{color:C},style:{color:(A=(y=((I=e.vars)!=null?I:e).palette)==null?void 0:y[C])==null?void 0:A.main}}}),{props:{color:"action"},style:{color:(g=(m=((p=e.vars)!=null?p:e).palette)==null?void 0:m.action)==null?void 0:g.active}},{props:{color:"disabled"},style:{color:(S=(w=((b=e.vars)!=null?b:e).palette)==null?void 0:w.action)==null?void 0:S.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),_c=G.forwardRef(function(t,n){const r=Wk({props:t,name:"MuiSvgIcon"}),S=r,{children:i,className:o,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24"}=S,p=Ge(S,["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"]),m=G.isValidElement(i)&&i.type==="svg",g=q(z({},r),{color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:m}),b={};d||(b.viewBox=h);const w=Yk(g);return c.jsxs(Kk,q(z(z(z({as:s,className:Bn(w.root,o),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},b),p),m&&i.props),{ownerState:g,children:[m?i.props.children:i,f?c.jsx("title",{children:f}):null]}))});_c.muiName="SvgIcon";function Ve(e,t){function n(r,i){return c.jsx(_c,q(z({"data-testid":`${t}Icon`,ref:i},r),{children:e}))}return n.muiName=_c.muiName,G.memo(G.forwardRef(n))}const Pc=Ve(c.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),Qk=Ve(c.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8m-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12m3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8m5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8m3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"ColorLens"),qk=Ve(c.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function Jk(e){return at("MuiTabPanel",e)}Ze("MuiTabPanel",["root","hidden","sizeSm","sizeMd","sizeLg","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const Xk=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],Zk=e=>{const{hidden:t,size:n,variant:r,color:i,orientation:o}=e,a={root:["root",t&&"hidden",n&&`size${ye(n)}`,o,r&&`variant${ye(r)}`,i&&`color${ye(i)}`,n&&`size${ye(n)}`]};return dt(a,Jk,{})},e_=be("div",{name:"JoyTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return D({display:t.hidden?"none":"block",padding:"var(--Tabs-spacing)",flexGrow:1,fontFamily:e.vars.fontFamily.body},e.typography[`body-${t.size}`],(n=e.variants[t.variant])==null?void 0:n[t.color])}),ei=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyTabPanel"}),{orientation:i}=va()||{orientation:"horizontal"},o=G.useContext(fc),{children:a,value:s=0,component:l,color:u="neutral",variant:d="plain",size:f,slots:h={},slotProps:p={},keepMounted:m=!1}=r,g=Ae(r,Xk),{hidden:b,getRootProps:w}=VS(D({},r,{value:s})),S=f!=null?f:o,C=D({},r,{orientation:i,hidden:b,size:S,color:u,variant:d}),I=Zk(C),y=D({},g,{component:l,slots:h,slotProps:p}),[A,E]=Ie("root",{ref:n,elementType:e_,getSlotProps:w,externalForwardedProps:y,additionalProps:{role:"tabpanel",ref:n,as:l},ownerState:C,className:I.root});return m?c.jsx(A,D({},E,{children:a})):c.jsx(A,D({},E,{children:!b&&a}))});function t_(e){return at("MuiInput",e)}const wp=Ze("MuiInput",["root","input","formControl","focused","disabled","error","adornedStart","adornedEnd","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid","fullWidth","startDecorator","endDecorator"]),Wa=G.createContext(void 0),n_=["aria-describedby","aria-label","aria-labelledby","autoComplete","autoFocus","className","defaultValue","disabled","disabledInProp","error","id","name","onClick","onChange","onKeyDown","onKeyUp","onFocus","onBlur","placeholder","readOnly","required","type","value"];function r_(e,t){var n;const r=G.useContext(Wa),{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:s,autoFocus:l,className:u,defaultValue:d,disabled:f,disabledInProp:h,error:p,id:m,name:g,onClick:b,onChange:w,onKeyDown:S,onKeyUp:C,onFocus:I,onBlur:y,placeholder:A,readOnly:E,required:k,type:F,value:Y}=e,O=Ae(e,n_),{getRootProps:T,getInputProps:N,focused:V,error:j,disabled:$}=iS({disabled:(n=h!=null?h:r==null?void 0:r.disabled)!=null?n:f,defaultValue:d,error:p,onBlur:y,onClick:b,onChange:w,onFocus:I,required:k!=null?k:r==null?void 0:r.required,value:Y}),M={[t.disabled]:$,[t.error]:j,[t.focused]:V,[t.formControl]:!!r,[u]:u},H={[t.disabled]:$};return D({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:s,autoFocus:l,disabled:$,id:m,onKeyDown:S,onKeyUp:C,name:g,placeholder:A,readOnly:E,type:F},rootStateClasses:M,inputStateClasses:H,getRootProps:T,getInputProps:N,focused:V,error:j,disabled:$},O)}const Dc=e=>t=>`--${e?`${e}-`:""}${t.replace(/^--/,"")}`,no="data-skip-inverted-colors",Ip=`& :not([${no}], [${no}] *)`,Sp=e=>{var t,n,r,i,o,a,s,l,u,d,f,h,p,m,g,b,w,S,C,I,y,A;const E=Dc(e.cssVarPrefix);return{"--variant-plainColor":"var(--variant-plainColor) !important","--variant-plainHoverColor":"var(--variant-plainHoverColor) !important","--variant-plainHoverBg":"var(--variant-plainHoverBg) !important","--variant-plainActiveBg":"var(--variant-plainActiveBg) !important","--variant-plainDisabledColor":"var(--variant-plainDisabledColor) !important","--variant-outlinedColor":"var(--variant-outlinedColor) !important","--variant-outlinedBorder":"var(--variant-outlinedBorder) !important","--variant-outlinedHoverColor":"var(--variant-outlinedHoverColor) !important","--variant-outlinedHoverBorder":"var(--variant-outlinedHoverBorder) !important","--variant-outlinedHoverBg":"var(--variant-outlinedHoverBg) !important","--variant-outlinedActiveBg":"var(--variant-outlinedActiveBg) !important","--variant-outlinedDisabledColor":"var(--variant-outlinedDisabledColor) !important","--variant-outlinedDisabledBorder":"var(--variant-outlinedDisabledBorder) !important","--variant-softColor":"var(--variant-softColor) !important","--variant-softHoverColor":"var(--variant-softHoverColor) !important","--variant-softBg":"var(--variant-softBg) !important","--variant-softHoverBg":"var(--variant-softHoverBg) !important","--variant-softActiveBg":"var(--variant-softActiveBg) !important","--variant-softActiveColor":"var(--variant-softActiveColor) !important","--variant-softDisabledColor":"var(--variant-softDisabledColor) !important","--variant-softDisabledBg":"var(--variant-softDisabledBg) !important","--variant-solidColor":"var(--variant-solidColor) !important","--variant-solidBg":"var(--variant-solidBg) !important","--variant-solidHoverBg":"var(--variant-solidHoverBg) !important","--variant-solidActiveBg":"var(--variant-solidActiveBg) !important","--variant-solidDisabledColor":"var(--variant-solidDisabledColor) !important","--variant-solidDisabledBg":"var(--variant-solidDisabledBg) !important","--Badge-ringColor":"var(--Badge-ringColor) !important",colorScheme:"unset",[e.getColorSchemeSelector("light")]:{[E("--palette-focusVisible")]:`${(t=e.colorSchemes.light)==null?void 0:t.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(n=e.colorSchemes.light)==null?void 0:n.palette.background.body} !important`,[E("--palette-background-surface")]:`${(r=e.colorSchemes.light)==null?void 0:r.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(i=e.colorSchemes.light)==null?void 0:i.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(o=e.colorSchemes.light)==null?void 0:o.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(a=e.colorSchemes.light)==null?void 0:a.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(s=e.colorSchemes.light)==null?void 0:s.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(l=e.colorSchemes.light)==null?void 0:l.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(u=e.colorSchemes.light)==null?void 0:u.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(d=e.colorSchemes.light)==null?void 0:d.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(f=e.colorSchemes.light)==null?void 0:f.palette.divider} !important`},[e.getColorSchemeSelector("dark")]:{[E("--palette-focusVisible")]:`${(h=e.colorSchemes.dark)==null?void 0:h.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(p=e.colorSchemes.dark)==null?void 0:p.palette.background.body} !important`,[E("--palette-background-surface")]:`${(m=e.colorSchemes.dark)==null?void 0:m.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(g=e.colorSchemes.dark)==null?void 0:g.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(b=e.colorSchemes.dark)==null?void 0:b.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(w=e.colorSchemes.dark)==null?void 0:w.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(S=e.colorSchemes.dark)==null?void 0:S.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(C=e.colorSchemes.dark)==null?void 0:C.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(I=e.colorSchemes.dark)==null?void 0:I.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(y=e.colorSchemes.dark)==null?void 0:y.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(A=e.colorSchemes.dark)==null?void 0:A.palette.divider} !important`}}};function i_(e){return e.theme!==void 0}const o_=e=>t=>{const n=i_(t)?t.theme:t,r=Zl(n.cssVarPrefix),i=Dc(n.cssVarPrefix),o=a=>{const s=a.split("-");return r(a,n.palette[s[1]][s[2]])};return{[Ip]:{"--Badge-ringColor":o(`palette-${e}-solidBg`),"--Icon-color":"currentColor",[`${n.getColorSchemeSelector("light")}, ${n.getColorSchemeSelector("dark")}`]:{colorScheme:"dark",[i("--palette-focusVisible")]:o(`palette-${e}-200`),[i("--palette-background-body")]:"rgba(0 0 0 / 0.1)",[i("--palette-background-surface")]:"rgba(0 0 0 / 0.06)",[i("--palette-background-popup")]:o(`palette-${e}-700`),[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.36)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.6)`,[i("--palette-text-primary")]:o("palette-common-white"),[i("--palette-text-secondary")]:o(`palette-${e}-200`),[i("--palette-text-tertiary")]:o(`palette-${e}-300`),[i("--palette-text-icon")]:o(`palette-${e}-200`),[i("--palette-divider")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainColor":o(`palette-${e}-50`),"--variant-plainHoverColor":"#fff","--variant-plainHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedColor":o(`palette-${e}-50`),"--variant-outlinedBorder":`rgba(${o(`palette-${e}-lightChannel`)} / 0.5)`,"--variant-outlinedHoverColor":"#fff","--variant-outlinedHoverBorder":o(`palette-${e}-300`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":"rgba(255 255 255 / 0.2)","--variant-softColor":o("palette-common-white"),"--variant-softHoverColor":o("palette-common-white"),"--variant-softBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.24)`,"--variant-softHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.36)`,"--variant-softActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.16)`,"--variant-softActiveColor":"#fff","--variant-softDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.1)`,"--variant-solidColor":o(`palette-${e}-${e==="neutral"?"600":"500"}`),"--variant-solidBg":o("palette-common-white"),"--variant-solidHoverBg":o("palette-common-white"),"--variant-solidActiveBg":o(`palette-${e}-100`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.1)`}},[`&, & [${no}]`]:Sp(n)}},a_=e=>t=>{const{theme:n=t}=t,r=Zl(n.cssVarPrefix),i=Dc(n.cssVarPrefix),o=a=>{const s=a.split("-");return r(a,n.palette[s[1]][s[2]])};return{[Ip]:{"--Badge-ringColor":o(`palette-${e}-softBg`),"--Icon-color":"currentColor",[n.getColorSchemeSelector("dark")]:{[i("--palette-focusVisible")]:o(`palette-${e}-300`),[i("--palette-background-body")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.1)`,[i("--palette-background-surface")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,[i("--palette-text-primary")]:o(`palette-${e}-100`),[i("--palette-text-secondary")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,[i("--palette-text-tertiary")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.6)`,[i("--palette-text-icon")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.6)`,[i("--palette-divider")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.2)`,"--variant-plainColor":`rgba(${o(`palette-${e}-lightChannel`)} / 1)`,"--variant-plainHoverColor":o(`palette-${e}-50`),"--variant-plainHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.16)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-outlinedColor":`rgba(${o(`palette-${e}-lightChannel`)} / 1)`,"--variant-outlinedHoverColor":o(`palette-${e}-50`),"--variant-outlinedBg":"initial","--variant-outlinedBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverBorder":o(`palette-${e}-600`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.16)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,"--variant-softColor":o(`palette-${e}-200`),"--variant-softBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-softHoverColor":"#fff","--variant-softHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-softActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.48)`,"--variant-softDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-solidColor":"#fff","--variant-solidBg":o(`palette-${e}-500`),"--variant-solidHoverColor":"#fff","--variant-solidHoverBg":o(`palette-${e}-600`),"--variant-solidActiveBg":o(`palette-${e}-600`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`},[n.getColorSchemeSelector("light")]:{[i("--palette-focusVisible")]:o(`palette-${e}-500`),[i("--palette-background-body")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.1)`,[i("--palette-background-surface")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.48)`,[i("--palette-text-primary")]:o(`palette-${e}-700`),[i("--palette-text-secondary")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.8)`,[i("--palette-text-tertiary")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.68)`,[i("--palette-text-icon")]:o(`palette-${e}-500`),[i("--palette-divider")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-plainColor":`rgba(${o(`palette-${e}-darkChannel`)} / 0.8)`,"--variant-plainHoverColor":`rgba(${o(`palette-${e}-darkChannel`)} / 1)`,"--variant-plainHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-outlinedColor":`rgba(${o(`palette-${e}-mainChannel`)} / 1)`,"--variant-outlinedBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverColor":o(`palette-${e}-600`),"--variant-outlinedHoverBorder":o(`palette-${e}-300`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-outlinedDisabledBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-softColor":o(`palette-${e}-600`),"--variant-softBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.8)`,"--variant-softHoverColor":o(`palette-${e}-700`),"--variant-softHoverBg":o(`palette-${e}-200`),"--variant-softActiveBg":o(`palette-${e}-300`),"--variant-softDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,"--variant-solidColor":o("palette-common-white"),"--variant-solidBg":o(`palette-${e}-${e==="neutral"?"700":"500"}`),"--variant-solidHoverColor":o("palette-common-white"),"--variant-solidHoverBg":o(`palette-${e}-600`),"--variant-solidActiveBg":o(`palette-${e}-600`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`}},[`&, & [${no}]`]:Sp(n)}},s_=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","fullWidth","size","color","variant","startDecorator","endDecorator","component","slots","slotProps"],l_=e=>{const{disabled:t,fullWidth:n,variant:r,color:i,size:o}=e,a={root:["root",t&&"disabled",n&&"fullWidth",r&&`variant${ye(r)}`,i&&`color${ye(i)}`,o&&`size${ye(o)}`],input:["input"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return dt(a,t_,{})},c_=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,s;const l=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[D({"--Input-radius":e.vars.radius.sm,"--Input-gap":"0.5rem","--Input-placeholderColor":"inherit","--Input-placeholderOpacity":.64,"--Input-decoratorColor":e.vars.palette.text.icon,"--Input-focused":"0","--Input-focusedThickness":e.vars.focus.thickness,"--Input-focusedHighlight":(r=e.vars.palette[t.color==="neutral"?"primary":t.color])==null?void 0:r[500],[`&:not([${no}])`]:D({},t.instanceColor&&{"--_Input-focusedHighlight":(i=e.vars.palette[t.instanceColor==="neutral"?"primary":t.instanceColor])==null?void 0:i[500]},{"--Input-focusedHighlight":`var(--_Input-focusedHighlight, ${e.vars.palette.focusVisible})`})},t.size==="sm"&&{"--Input-minHeight":"2rem","--Input-paddingInline":"0.5rem","--Input-decoratorChildHeight":"min(1.5rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl},t.size==="md"&&{"--Input-minHeight":"2.25rem","--Input-paddingInline":"0.75rem","--Input-decoratorChildHeight":"min(1.75rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},t.size==="lg"&&{"--Input-minHeight":"2.75rem","--Input-paddingInline":"1rem","--Input-gap":"0.75rem","--Input-decoratorChildHeight":"min(2.25rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},{"--Input-decoratorChildOffset":"min(calc(var(--Input-paddingInline) - (var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2), var(--Input-paddingInline))","--_Input-paddingBlock":"max((var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2, 0px)","--Input-decoratorChildRadius":"max(var(--Input-radius) - var(--variant-borderWidth, 0px) - var(--_Input-paddingBlock), min(var(--_Input-paddingBlock) + var(--variant-borderWidth, 0px), var(--Input-radius) / 2))","--Button-minHeight":"var(--Input-decoratorChildHeight)","--Button-paddingBlock":"0px","--IconButton-size":"var(--Input-decoratorChildHeight)","--Button-radius":"var(--Input-decoratorChildRadius)","--IconButton-radius":"var(--Input-decoratorChildRadius)",boxSizing:"border-box"},t.variant!=="plain"&&{boxShadow:e.shadow.xs},{minWidth:0,minHeight:"var(--Input-minHeight)"},t.fullWidth&&{width:"100%"},{cursor:"text",position:"relative",display:"flex",paddingInline:"var(--Input-paddingInline)",borderRadius:"var(--Input-radius)"},e.typography[`body-${t.size}`],l,{backgroundColor:(o=l==null?void 0:l.backgroundColor)!=null?o:e.vars.palette.background.surface,"&::before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,zIndex:1,borderRadius:"inherit",margin:"calc(var(--variant-borderWidth, 0px) * -1)",boxShadow:"var(--Input-focusedInset, inset) 0 0 0 calc(var(--Input-focused) * var(--Input-focusedThickness)) var(--Input-focusedHighlight)"}}),{"&:hover":D({},(a=e.variants[`${t.variant}Hover`])==null?void 0:a[t.color],{backgroundColor:null}),[`&.${wp.disabled}`]:(s=e.variants[`${t.variant}Disabled`])==null?void 0:s[t.color],"&:focus-within::before":{"--Input-focused":"1"}}]}),u_=be("input")(({ownerState:e})=>({border:"none",minWidth:0,outline:0,padding:0,flex:1,color:"inherit",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontWeight:"inherit",lineHeight:"inherit",textOverflow:"ellipsis","&:-webkit-autofill":D({paddingInline:"var(--Input-paddingInline)"},!e.startDecorator&&{marginInlineStart:"calc(-1 * var(--Input-paddingInline))",paddingInlineStart:"var(--Input-paddingInline)",borderTopLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"},!e.endDecorator&&{marginInlineEnd:"calc(-1 * var(--Input-paddingInline))",paddingInlineEnd:"var(--Input-paddingInline)",borderTopRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"}),"&::-webkit-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-moz-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&:-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"}})),d_=be("div")({"--Button-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--IconButton-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--Icon-margin":"0 0 0 calc(var(--Input-paddingInline) / -4)",display:"inherit",alignItems:"center",paddingBlock:"var(--unstable_InputPaddingBlock)",flexWrap:"wrap",marginInlineEnd:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),f_=be("div")({"--Button-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--IconButton-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--Icon-margin":"0 calc(var(--Input-paddingInline) / -4) 0 0",display:"inherit",alignItems:"center",marginInlineStart:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),h_=be(c_,{name:"JoyInput",slot:"Root",overridesResolver:(e,t)=>t.root})({}),p_=be(u_,{name:"JoyInput",slot:"Input",overridesResolver:(e,t)=>t.input})({}),g_=be(d_,{name:"JoyInput",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({}),m_=be(f_,{name:"JoyInput",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({}),Ga=G.forwardRef(function(t,n){var r,i,o,a,s,l;const u=ft({props:t,name:"JoyInput"}),d=r_(D({},u,{disabledInProp:t.disabled}),wp),{propsToForward:f,rootStateClasses:h,inputStateClasses:p,getRootProps:m,getInputProps:g,formControl:b,focused:w,error:S=!1,disabled:C,fullWidth:I=!1,size:y="md",color:A="neutral",variant:E="outlined",startDecorator:k,endDecorator:F,component:Y,slots:O={},slotProps:T={}}=d,N=Ae(d,s_),V=(r=(i=t.error)!=null?i:b==null?void 0:b.error)!=null?r:S,j=(o=(a=t.size)!=null?a:b==null?void 0:b.size)!=null?o:y,$=(s=t.color)!=null?s:V?"danger":(l=b==null?void 0:b.color)!=null?l:A,M=D({instanceColor:V?"danger":t.color},u,{fullWidth:I,color:$,disabled:C,error:V,focused:w,size:j,variant:E}),H=l_(M),Q=D({},N,{component:Y,slots:O,slotProps:T}),[te,R]=Ie("root",{ref:n,className:[H.root,h],elementType:h_,getSlotProps:m,externalForwardedProps:Q,ownerState:M}),[L,U]=Ie("input",D({},b&&{additionalProps:{id:b.htmlFor,"aria-describedby":b["aria-describedby"]}},{className:[H.input,p],elementType:p_,getSlotProps:g,internalForwardedProps:f,externalForwardedProps:Q,ownerState:M})),[W,re]=Ie("startDecorator",{className:H.startDecorator,elementType:g_,externalForwardedProps:Q,ownerState:M}),[se,ae]=Ie("endDecorator",{className:H.endDecorator,elementType:m_,externalForwardedProps:Q,ownerState:M});return c.jsxs(te,D({},R,{children:[k&&c.jsx(W,D({},re,{children:k})),c.jsx(L,D({},U)),F&&c.jsx(se,D({},ae,{children:F}))]}))}),rn=({label:e,placeholder:t,value:n,defaultValue:r,required:i,size:o,readOnly:a=!1,endDecorator:s=void 0,onChange:l})=>c.jsxs(v.FormControl,{size:o||"md",sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{required:i,color:"primary",children:e}),c.jsx(Ga,{placeholder:t,size:"md",variant:"outlined",color:"neutral",value:n||r,defaultValue:r,readOnly:a,endDecorator:s,onChange:l,sx:{backgroundColor:"#fff",borderRadius:"md"}})]}),Ap=Ve(c.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");function v_(e){return at("MuiCircularProgress",e)}Ze("MuiCircularProgress",["root","determinate","svg","track","progress","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);let b_=e=>e,Tp;const y_=["color","backgroundColor"],x_=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],C_=ge.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),w_=e=>{const{determinate:t,color:n,variant:r,size:i}=e,o={root:["root",t&&"determinate",n&&`color${ye(n)}`,r&&`variant${ye(r)}`,i&&`size${ye(i)}`],svg:["svg"],track:["track"],progress:["progress"]};return dt(o,v_,{})};function ti(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}const I_=be("span",{name:"JoyCircularProgress",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i,o;const a=((n=t.variants[e.variant])==null?void 0:n[e.color])||{},{color:s,backgroundColor:l}=a,u=Ae(a,y_);return D({"--Icon-fontSize":"calc(0.4 * var(--_root-size))","--CircularProgress-trackColor":l,"--CircularProgress-progressColor":s,"--CircularProgress-percent":e.value,"--CircularProgress-linecap":"round"},e.size==="sm"&&{"--_root-size":"var(--CircularProgress-size, 24px)","--_track-thickness":ti("track","3px"),"--_progress-thickness":ti("progress","3px")},e.instanceSize==="sm"&&{"--CircularProgress-size":"24px"},e.size==="md"&&{"--_track-thickness":ti("track","6px"),"--_progress-thickness":ti("progress","6px"),"--_root-size":"var(--CircularProgress-size, 40px)"},e.instanceSize==="md"&&{"--CircularProgress-size":"40px"},e.size==="lg"&&{"--_track-thickness":ti("track","8px"),"--_progress-thickness":ti("progress","8px"),"--_root-size":"var(--CircularProgress-size, 64px)"},e.instanceSize==="lg"&&{"--CircularProgress-size":"64px"},e.thickness&&{"--_track-thickness":`${e.thickness}px`,"--_progress-thickness":`${e.thickness}px`},{"--_thickness-diff":"calc(var(--_track-thickness) - var(--_progress-thickness))","--_inner-size":"calc(var(--_root-size) - 2 * var(--variant-borderWidth, 0px))","--_outlined-inset":"max(var(--_track-thickness), var(--_progress-thickness))",width:"var(--_root-size)",height:"var(--_root-size)",borderRadius:"var(--_root-size)",margin:"var(--CircularProgress-margin)",boxSizing:"border-box",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0,position:"relative",color:s},e.children&&{fontFamily:t.vars.fontFamily.body,fontWeight:t.vars.fontWeight.md,fontSize:"calc(0.2 * var(--_root-size))"},u,e.variant==="outlined"&&{"&::before":D({content:'""',display:"block",position:"absolute",borderRadius:"inherit",top:"var(--_outlined-inset)",left:"var(--_outlined-inset)",right:"var(--_outlined-inset)",bottom:"var(--_outlined-inset)"},u)},e.variant==="soft"&&{"--CircularProgress-trackColor":t.variants.soft.neutral.backgroundColor,"--CircularProgress-progressColor":(r=t.variants.solid)==null?void 0:r[e.color].backgroundColor},e.variant==="solid"&&{"--CircularProgress-trackColor":(i=t.variants.softHover)==null?void 0:i[e.color].backgroundColor,"--CircularProgress-progressColor":(o=t.variants.solid)==null?void 0:o[e.color].backgroundColor})}),S_=be("svg",{name:"JoyCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({width:"inherit",height:"inherit",display:"inherit",boxSizing:"inherit",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))"}),A_=be("circle",{name:"JoyCircularProgress",slot:"track",overridesResolver:(e,t)=>t.track})({cx:"50%",cy:"50%",r:"calc(var(--_inner-size) / 2 - var(--_track-thickness) / 2 + min(0px, var(--_thickness-diff) / 2))",fill:"transparent",strokeWidth:"var(--_track-thickness)",stroke:"var(--CircularProgress-trackColor)"}),T_=be("circle",{name:"JoyCircularProgress",slot:"progress",overridesResolver:(e,t)=>t.progress})({"--_progress-radius":"calc(var(--_inner-size) / 2 - var(--_progress-thickness) / 2 - max(0px, var(--_thickness-diff) / 2))","--_progress-length":"calc(2 * 3.1415926535 * var(--_progress-radius))",cx:"50%",cy:"50%",r:"var(--_progress-radius)",fill:"transparent",strokeWidth:"var(--_progress-thickness)",stroke:"var(--CircularProgress-progressColor)",strokeLinecap:"var(--CircularProgress-linecap, round)",strokeDasharray:"var(--_progress-length)",strokeDashoffset:"calc(var(--_progress-length) - var(--CircularProgress-percent) * var(--_progress-length) / 100)",transformOrigin:"center",transform:"rotate(-90deg)"},({ownerState:e})=>!e.determinate&&ge.css(Tp||(Tp=b_`
|
|
2348
2348
|
animation: var(--CircularProgress-circulation, 0.8s linear 0s infinite normal none running)
|
|
2349
2349
|
${0};
|
|
2350
|
-
`),C_)),Ep=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyCircularProgress"}),{children:i,className:o,color:a="primary",size:s="md",variant:l="soft",thickness:u,determinate:d=!1,value:f=d?0:25,component:h,slots:p={},slotProps:m={}}=r,g=Ae(r,x_),b=D({},r,{color:a,size:s,variant:l,thickness:u,value:f,determinate:d,instanceSize:t.size}),w=w_(b),S=D({},g,{component:h,slots:p,slotProps:m}),[C,I]=Ie("root",{ref:n,className:Bn(w.root,o),elementType:I_,externalForwardedProps:S,ownerState:b,additionalProps:D({role:"progressbar",style:{"--CircularProgress-percent":f}},f&&d&&{"aria-valuenow":Math.round(typeof f=="number"?f:Number(f||0))})}),[y,A]=Ie("svg",{className:w.svg,elementType:S_,externalForwardedProps:S,ownerState:b}),[E,k]=Ie("track",{className:w.track,elementType:A_,externalForwardedProps:S,ownerState:b}),[F,Y]=Ie("progress",{className:w.progress,elementType:T_,externalForwardedProps:S,ownerState:b});return c.jsxs(C,D({},I,{children:[c.jsxs(y,D({},A,{children:[c.jsx(E,D({},k)),c.jsx(F,D({},Y))]})),i]}))});function E_(e){return at("MuiButton",e)}const kp=Ze("MuiButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]),_p=G.createContext({}),Pp=G.createContext(void 0),k_=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],__=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,fullWidth:o,size:a,variant:s,loading:l}=e,u={root:["root",n&&"disabled",r&&"focusVisible",o&&"fullWidth",s&&`variant${ye(s)}`,t&&`color${ye(t)}`,a&&`size${ye(a)}`,l&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]},d=dt(u,E_,{});return r&&i&&(d.root+=` ${i}`),d},P_=be("span",{name:"JoyButton",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Icon-margin":"0 0 0 calc(var(--Button-gap) / -2)","--CircularProgress-margin":"0 0 0 calc(var(--Button-gap) / -2)",display:"inherit",marginRight:"var(--Button-gap)"}),D_=be("span",{name:"JoyButton",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Icon-margin":"0 calc(var(--Button-gap) / -2) 0 0","--CircularProgress-margin":"0 calc(var(--Button-gap) / -2) 0 0",display:"inherit",marginLeft:"var(--Button-gap)"}),O_=be("span",{name:"JoyButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({theme:e,ownerState:t})=>{var n,r;return D({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:(n=e.variants[t.variant])==null||(n=n[t.color])==null?void 0:n.color},t.disabled&&{color:(r=e.variants[`${t.variant}Disabled`])==null||(r=r[t.color])==null?void 0:r.color})}),R_=({theme:e,ownerState:t})=>{var n,r,i,o;return[D({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon},t.size==="sm"&&{"--Icon-fontSize":e.vars.fontSize.lg,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.375rem",minHeight:"var(--Button-minHeight, 2rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.25rem)",paddingInline:"0.75rem"},t.size==="md"&&{"--Icon-fontSize":e.vars.fontSize.xl,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.5rem",minHeight:"var(--Button-minHeight, 2.25rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.375rem)",paddingInline:"1rem"},t.size==="lg"&&{"--Icon-fontSize":e.vars.fontSize.xl2,"--CircularProgress-size":"28px","--CircularProgress-thickness":"4px","--Button-gap":"0.75rem",minHeight:"var(--Button-minHeight, 2.75rem)",fontSize:e.vars.fontSize.md,paddingBlock:"var(--Button-paddingBlock, 0.5rem)",paddingInline:"1.5rem"},{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",borderRadius:`var(--Button-radius, ${e.vars.radius.sm})`,margin:"var(--Button-margin)",border:"none",backgroundColor:"transparent",cursor:"pointer",userSelect:"none",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",textDecoration:"none",fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.lg,lineHeight:e.vars.lineHeight.md},t.fullWidth&&{width:"100%"},{[e.focus.selector]:e.focus.default}),D({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color]},'&:active, &[aria-pressed="true"]':(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],[`&.${kp.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]},t.loadingPosition==="center"&&{[`&.${kp.loading}`]:{color:"transparent"}})]},L_=be("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(R_),ni=G.forwardRef(function(t,n){var r;const i=ft({props:t,name:"JoyButton"}),{children:o,action:a,color:s="primary",variant:l="solid",size:u="md",fullWidth:d=!1,startDecorator:f,endDecorator:h,loading:p=!1,loadingPosition:m="center",loadingIndicator:g,disabled:b,component:w,slots:S={},slotProps:C={}}=i,I=Ae(i,k_),y=G.useContext(_p),A=G.useContext(Pp),E=t.variant||y.variant||l,k=t.size||y.size||u,F=t.color||y.color||s,Y=(r=t.loading||t.disabled)!=null?r:y.disabled||p||b,O=G.useRef(null),T=sn(O,n),{focusVisible:N,setFocusVisible:V,getRootProps:j}=zl(D({},i,{disabled:Y,rootRef:T})),$=g!=null?g:c.jsx(Ep,{color:F,thickness:{sm:2,md:3,lg:4}[k]||3});G.useImperativeHandle(a,()=>({focusVisible:()=>{var Z;V(!0),(Z=O.current)==null||Z.focus()}}),[V]);const M=D({},i,{color:F,fullWidth:d,variant:E,size:k,focusVisible:N,loading:p,loadingPosition:m,disabled:Y}),H=__(M),Q=Z=>{var he;let Se=i.onClick;if(typeof C.root=="function"?Se=C.root(M).onClick:C.root&&(Se=C.root.onClick),(he=Se)==null||he(Z),A){var He;(He=A.onClick)==null||He.call(A,Z,i.value)}};let te=i["aria-pressed"];typeof C.root=="function"?te=C.root(M)["aria-pressed"]:C.root&&(te=C.root["aria-pressed"]),A!=null&&A.value&&(Array.isArray(A.value)?te=A.value.indexOf(i.value)!==-1:te=A.value===i.value);const R=D({},I,{component:w,slots:S,slotProps:C}),[L,U]=Ie("root",{ref:n,className:H.root,elementType:L_,externalForwardedProps:R,getSlotProps:j,ownerState:M,additionalProps:{onClick:Q,"aria-pressed":te}}),[W,re]=Ie("startDecorator",{className:H.startDecorator,elementType:P_,externalForwardedProps:R,ownerState:M}),[se,ae]=Ie("endDecorator",{className:H.endDecorator,elementType:D_,externalForwardedProps:R,ownerState:M}),[X,le]=Ie("loadingIndicatorCenter",{className:H.loadingIndicatorCenter,elementType:O_,externalForwardedProps:R,ownerState:M});return c.jsxs(L,D({},U,{children:[(f||p&&m==="start")&&c.jsx(W,D({},re,{children:p&&m==="start"?$:f})),o,p&&m==="center"&&c.jsx(X,D({},le,{children:$})),(h||p&&m==="end")&&c.jsx(se,D({},ae,{children:p&&m==="end"?$:h}))]}))});ni.muiName="Button";var Dp={exports:{}};function M_(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Oc={exports:{}};const B_=$u(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Op;function Rc(){return Op||(Op=1,function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n=n||function(r,i){var o;if(typeof window!="undefined"&&window.crypto&&(o=window.crypto),typeof self!="undefined"&&self.crypto&&(o=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window!="undefined"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Bt!="undefined"&&Bt.crypto&&(o=Bt.crypto),!o&&typeof M_=="function")try{o=B_}catch(S){}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch(S){}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch(S){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function S(){}return function(C){var I;return S.prototype=C,I=new S,S.prototype=null,I}}(),l={},u=l.lib={},d=u.Base=function(){return{extend:function(S){var C=s(this);return S&&C.mixIn(S),(!C.hasOwnProperty("init")||this.init===C.init)&&(C.init=function(){C.$super.init.apply(this,arguments)}),C.init.prototype=C,C.$super=this,C},create:function(){var S=this.extend();return S.init.apply(S,arguments),S},init:function(){},mixIn:function(S){for(var C in S)S.hasOwnProperty(C)&&(this[C]=S[C]);S.hasOwnProperty("toString")&&(this.toString=S.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=u.WordArray=d.extend({init:function(S,C){S=this.words=S||[],C!=i?this.sigBytes=C:this.sigBytes=S.length*4},toString:function(S){return(S||p).stringify(this)},concat:function(S){var C=this.words,I=S.words,y=this.sigBytes,A=S.sigBytes;if(this.clamp(),y%4)for(var E=0;E<A;E++){var k=I[E>>>2]>>>24-E%4*8&255;C[y+E>>>2]|=k<<24-(y+E)%4*8}else for(var F=0;F<A;F+=4)C[y+F>>>2]=I[F>>>2];return this.sigBytes+=A,this},clamp:function(){var S=this.words,C=this.sigBytes;S[C>>>2]&=4294967295<<32-C%4*8,S.length=r.ceil(C/4)},clone:function(){var S=d.clone.call(this);return S.words=this.words.slice(0),S},random:function(S){for(var C=[],I=0;I<S;I+=4)C.push(a());return new f.init(C,S)}}),h=l.enc={},p=h.Hex={stringify:function(S){for(var C=S.words,I=S.sigBytes,y=[],A=0;A<I;A++){var E=C[A>>>2]>>>24-A%4*8&255;y.push((E>>>4).toString(16)),y.push((E&15).toString(16))}return y.join("")},parse:function(S){for(var C=S.length,I=[],y=0;y<C;y+=2)I[y>>>3]|=parseInt(S.substr(y,2),16)<<24-y%8*4;return new f.init(I,C/2)}},m=h.Latin1={stringify:function(S){for(var C=S.words,I=S.sigBytes,y=[],A=0;A<I;A++){var E=C[A>>>2]>>>24-A%4*8&255;y.push(String.fromCharCode(E))}return y.join("")},parse:function(S){for(var C=S.length,I=[],y=0;y<C;y++)I[y>>>2]|=(S.charCodeAt(y)&255)<<24-y%4*8;return new f.init(I,C)}},g=h.Utf8={stringify:function(S){try{return decodeURIComponent(escape(m.stringify(S)))}catch(C){throw new Error("Malformed UTF-8 data")}},parse:function(S){return m.parse(unescape(encodeURIComponent(S)))}},b=u.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(S){typeof S=="string"&&(S=g.parse(S)),this._data.concat(S),this._nDataBytes+=S.sigBytes},_process:function(S){var C,I=this._data,y=I.words,A=I.sigBytes,E=this.blockSize,k=E*4,F=A/k;S?F=r.ceil(F):F=r.max((F|0)-this._minBufferSize,0);var Y=F*E,O=r.min(Y*4,A);if(Y){for(var T=0;T<Y;T+=E)this._doProcessBlock(y,T);C=y.splice(0,Y),I.sigBytes-=O}return new f.init(C,O)},clone:function(){var S=d.clone.call(this);return S._data=this._data.clone(),S},_minBufferSize:0});u.Hasher=b.extend({cfg:d.extend(),init:function(S){this.cfg=this.cfg.extend(S),this.reset()},reset:function(){b.reset.call(this),this._doReset()},update:function(S){return this._append(S),this._process(),this},finalize:function(S){S&&this._append(S);var C=this._doFinalize();return C},blockSize:16,_createHelper:function(S){return function(C,I){return new S.init(I).finalize(C)}},_createHmacHelper:function(S){return function(C,I){return new w.HMAC.init(S,I).finalize(C)}}});var w=l.algo={};return l}(Math);return n})}(Oc)),Oc.exports}(function(e,t){(function(n,r){e.exports=r(Rc())})(Bt,function(n){return function(r){var i=n,o=i.lib,a=o.WordArray,s=o.Hasher,l=i.algo,u=[];(function(){for(var g=0;g<64;g++)u[g]=r.abs(r.sin(g+1))*4294967296|0})();var d=l.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,b){for(var w=0;w<16;w++){var S=b+w,C=g[S];g[S]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}var I=this._hash.words,y=g[b+0],A=g[b+1],E=g[b+2],k=g[b+3],F=g[b+4],Y=g[b+5],O=g[b+6],T=g[b+7],N=g[b+8],V=g[b+9],j=g[b+10],$=g[b+11],M=g[b+12],H=g[b+13],Q=g[b+14],te=g[b+15],R=I[0],L=I[1],U=I[2],W=I[3];R=f(R,L,U,W,y,7,u[0]),W=f(W,R,L,U,A,12,u[1]),U=f(U,W,R,L,E,17,u[2]),L=f(L,U,W,R,k,22,u[3]),R=f(R,L,U,W,F,7,u[4]),W=f(W,R,L,U,Y,12,u[5]),U=f(U,W,R,L,O,17,u[6]),L=f(L,U,W,R,T,22,u[7]),R=f(R,L,U,W,N,7,u[8]),W=f(W,R,L,U,V,12,u[9]),U=f(U,W,R,L,j,17,u[10]),L=f(L,U,W,R,$,22,u[11]),R=f(R,L,U,W,M,7,u[12]),W=f(W,R,L,U,H,12,u[13]),U=f(U,W,R,L,Q,17,u[14]),L=f(L,U,W,R,te,22,u[15]),R=h(R,L,U,W,A,5,u[16]),W=h(W,R,L,U,O,9,u[17]),U=h(U,W,R,L,$,14,u[18]),L=h(L,U,W,R,y,20,u[19]),R=h(R,L,U,W,Y,5,u[20]),W=h(W,R,L,U,j,9,u[21]),U=h(U,W,R,L,te,14,u[22]),L=h(L,U,W,R,F,20,u[23]),R=h(R,L,U,W,V,5,u[24]),W=h(W,R,L,U,Q,9,u[25]),U=h(U,W,R,L,k,14,u[26]),L=h(L,U,W,R,N,20,u[27]),R=h(R,L,U,W,H,5,u[28]),W=h(W,R,L,U,E,9,u[29]),U=h(U,W,R,L,T,14,u[30]),L=h(L,U,W,R,M,20,u[31]),R=p(R,L,U,W,Y,4,u[32]),W=p(W,R,L,U,N,11,u[33]),U=p(U,W,R,L,$,16,u[34]),L=p(L,U,W,R,Q,23,u[35]),R=p(R,L,U,W,A,4,u[36]),W=p(W,R,L,U,F,11,u[37]),U=p(U,W,R,L,T,16,u[38]),L=p(L,U,W,R,j,23,u[39]),R=p(R,L,U,W,H,4,u[40]),W=p(W,R,L,U,y,11,u[41]),U=p(U,W,R,L,k,16,u[42]),L=p(L,U,W,R,O,23,u[43]),R=p(R,L,U,W,V,4,u[44]),W=p(W,R,L,U,M,11,u[45]),U=p(U,W,R,L,te,16,u[46]),L=p(L,U,W,R,E,23,u[47]),R=m(R,L,U,W,y,6,u[48]),W=m(W,R,L,U,T,10,u[49]),U=m(U,W,R,L,Q,15,u[50]),L=m(L,U,W,R,Y,21,u[51]),R=m(R,L,U,W,M,6,u[52]),W=m(W,R,L,U,k,10,u[53]),U=m(U,W,R,L,j,15,u[54]),L=m(L,U,W,R,A,21,u[55]),R=m(R,L,U,W,N,6,u[56]),W=m(W,R,L,U,te,10,u[57]),U=m(U,W,R,L,O,15,u[58]),L=m(L,U,W,R,H,21,u[59]),R=m(R,L,U,W,F,6,u[60]),W=m(W,R,L,U,$,10,u[61]),U=m(U,W,R,L,E,15,u[62]),L=m(L,U,W,R,V,21,u[63]),I[0]=I[0]+R|0,I[1]=I[1]+L|0,I[2]=I[2]+U|0,I[3]=I[3]+W|0},_doFinalize:function(){var g=this._data,b=g.words,w=this._nDataBytes*8,S=g.sigBytes*8;b[S>>>5]|=128<<24-S%32;var C=r.floor(w/4294967296),I=w;b[(S+64>>>9<<4)+15]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,b[(S+64>>>9<<4)+14]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,g.sigBytes=(b.length+1)*4,this._process();for(var y=this._hash,A=y.words,E=0;E<4;E++){var k=A[E];A[E]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}return y},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g}});function f(g,b,w,S,C,I,y){var A=g+(b&w|~b&S)+C+y;return(A<<I|A>>>32-I)+b}function h(g,b,w,S,C,I,y){var A=g+(b&S|w&~S)+C+y;return(A<<I|A>>>32-I)+b}function p(g,b,w,S,C,I,y){var A=g+(b^w^S)+C+y;return(A<<I|A>>>32-I)+b}function m(g,b,w,S,C,I,y){var A=g+(w^(b|~S))+C+y;return(A<<I|A>>>32-I)+b}i.MD5=s._createHelper(d),i.HmacMD5=s._createHmacHelper(d)}(Math),n.MD5})})(Dp);var $_=Dp.exports;const Rp=fn($_);var Lp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Rc())})(Bt,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,a=o.init,s=o.init=function(l){if(l instanceof ArrayBuffer&&(l=new Uint8Array(l)),(l instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&l instanceof Uint8ClampedArray||l instanceof Int16Array||l instanceof Uint16Array||l instanceof Int32Array||l instanceof Uint32Array||l instanceof Float32Array||l instanceof Float64Array)&&(l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength)),l instanceof Uint8Array){for(var u=l.byteLength,d=[],f=0;f<u;f++)d[f>>>2]|=l[f]<<24-f%4*8;a.call(this,d,u)}else a.apply(this,arguments)};s.prototype=o}}(),n.lib.WordArray})})(Lp);var N_=Lp.exports;const Mp=fn(N_);var Bp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Rc())})(Bt,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(l){var u=l.words,d=l.sigBytes,f=this._map;l.clamp();for(var h=[],p=0;p<d;p+=3)for(var m=u[p>>>2]>>>24-p%4*8&255,g=u[p+1>>>2]>>>24-(p+1)%4*8&255,b=u[p+2>>>2]>>>24-(p+2)%4*8&255,w=m<<16|g<<8|b,S=0;S<4&&p+S*.75<d;S++)h.push(f.charAt(w>>>6*(3-S)&63));var C=f.charAt(64);if(C)for(;h.length%4;)h.push(C);return h.join("")},parse:function(l){var u=l.length,d=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var h=0;h<d.length;h++)f[d.charCodeAt(h)]=h}var p=d.charAt(64);if(p){var m=l.indexOf(p);m!==-1&&(u=m)}return s(l,u,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(l,u,d){for(var f=[],h=0,p=0;p<u;p++)if(p%4){var m=d[l.charCodeAt(p-1)]<<p%4*2,g=d[l.charCodeAt(p)]>>>6-p%4*2,b=m|g;f[h>>>2]|=b<<24-h%4*8,h++}return o.create(f,h)}}(),n.enc.Base64})})(Bp);var F_=Bp.exports;const z_=fn(F_);class $p{constructor(){ne(this,"readFileAndHash",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,s=Mp.create(new Uint8Array(a)),u=Rp(s).toString(z_);n(u)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}));ne(this,"generateHashFileName",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,s=Mp.create(new Uint8Array(a)),l=Rp(s).toString();n(l)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}))}}const Np=({title:e,open:t,imageSrc:n,toggleModal:r})=>c.jsx(v.Modal,{open:t,onClose:r,children:c.jsxs(v.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[c.jsx(v.ModalClose,{}),c.jsx(v.DialogTitle,{sx:{marginBottom:"10px"},children:e}),c.jsx(v.DialogContent,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:c.jsx("img",{src:n,alt:"Image modal",style:{maxWidth:"100%",maxHeight:"100%"}})})]})}),Fp=Ve(c.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),lt=()=>{const e=x.useContext(ea);if(!e)throw new Error("useAPIContext must be used within a APIProvider");return e},j_=Ve(c.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),U_=({isLoading:e,images:t,onClick:n})=>c.jsxs(c.Fragment,{children:[c.jsx(v.Grid,{container:!0,spacing:2,children:t.map(r=>{var i,o;return c.jsx(v.Grid,{xs:5,sm:4,md:3,children:c.jsxs(v.Box,{sx:{position:"relative",width:"100%","&:hover .overlay":{backgroundColor:"rgba(0, 0, 0, 0.5)",opacity:1},"&:hover .plusSign":{opacity:1}},onClick:()=>{var a,s;return n(((s=(a=r.urls)==null?void 0:a.uploaded)==null?void 0:s.embed)||"")},children:[c.jsx(v.Box,{component:"img",src:(o=(i=r.urls)==null?void 0:i.uploaded)==null?void 0:o.thumbnail,alt:`image-${r.id}`,sx:{width:"100%",height:"auto",borderRadius:"8px"}}),c.jsx(v.Box,{className:"overlay",sx:{position:"absolute",top:0,left:0,right:0,bottom:5,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0)",opacity:0,transition:"background-color 0.3s ease, opacity 0.3s ease",borderRadius:"8px",cursor:"pointer"},children:c.jsx(v.Typography,{className:"plusSign",level:"h2",sx:{color:"white",opacity:0,transition:"opacity 0.3s ease"},children:"+"})})]})},`sportal-image-${r.id}`)})}),e?c.jsx(v.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:c.jsx(v.CircularProgress,{variant:"solid",color:"neutral"})}):c.jsx(c.Fragment,{})]}),V_=Ve(c.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),H_=Ve(c.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),W_=e=>c.jsx(v.Box,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:c.jsxs(v.Box,{display:"flex",children:[e.pageCount&&e.pageCount!==1&&c.jsx(v.Button,{variant:"outlined",color:"neutral",startDecorator:c.jsx(V_,{}),onClick:e.getPreviousPage,sx:{textTransform:"none",fontSize:"14px",fontWeight:"bold",paddingX:2,paddingY:1,borderRadius:"4px 0 0 4px",borderRight:0,"&:hover":{backgroundColor:"background.level1"}},children:e.labels.previous}),e.images&&e.images.length===20&&c.jsx(v.Button,{variant:"outlined",color:"neutral",endDecorator:c.jsx(H_,{}),onClick:e.getNextPage,sx:{textTransform:"none",fontSize:"14px",fontWeight:"bold",paddingX:2,paddingY:1,borderRadius:e.pageCount!==1?"0 4px 4px 0":"4px",borderLeft:e.pageCount!==1?0:1,"&:hover":{backgroundColor:"background.level1"}},children:e.labels.next})]})}),ir=Ve(c.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-6h2zm0-8h-2V7h2z"}),"Info"),G_=Ve(c.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),Y_=({color:e})=>e==="warning"?c.jsx(G_,{}):c.jsx(ir,{}),nt=e=>c.jsx(v.Snackbar,{anchorOrigin:{vertical:"top",horizontal:"right"},open:e.showToast,onClose:e.hideToast,autoHideDuration:3e3,color:e.color,startDecorator:c.jsx(Y_,{color:e.color}),children:e.message},e.message),ro=({label:e,defaultValue:t,required:n,onChange:r})=>{const i=o=>{r(o.target.value)};return c.jsxs(v.FormControl,{sx:{marginBottom:"16px"},children:[c.jsx(v.FormLabel,{required:n,color:"primary",children:e}),c.jsx(v.Input,{type:"date",defaultValue:t,onChange:i,sx:{backgroundColor:"#fff",borderRadius:"md"}})]})},K_=({labels:e,showFilters:t,onClick:n})=>c.jsx(v.Tooltip,{title:t?e.hideFilters:e.showFilters,children:c.jsx(v.IconButton,{"aria-label":"Filters",onClick:n,children:c.jsx(j_,{})})}),zp=({labels:e,onChangeImages:t})=>{const[n,r]=x.useState(!1),[i,o]=x.useState(!1),[a,s]=x.useState(!1),[l,u]=x.useState(!1),[d,f]=x.useState(1),[h,p]=x.useState(""),[m,g]=x.useState(null),[b,w]=x.useState([]),{https:S}=lt();x.useEffect(()=>{E()},[d]);const C=()=>u(!l),I=()=>f(F=>F-1),y=()=>f(F=>F+1),A=()=>_(this,null,function*(){if(h){o(!0);const F=m?z({},m):null,Y=yield S.fetchImagesFromSportal365(h,F,d);if(Y){const O=yield Y.json();Y.ok?(w(O.data),f(O.meta.pagination.current_page)):(console.error(O),C())}o(!1)}else w([])}),E=()=>_(this,null,function*(){if(h){s(!0),w([]);const F=m&&m.from&&m.to?z({},m):null,Y=yield S.fetchImagesFromSportal365(h,F,d);if(Y){const O=yield Y.json();Y.ok?(w(O.data),f(O.meta.pagination.current_page)):(console.error(O),C())}s(!1)}}),k=(F,Y)=>{g(O=>O?q(z({},O),{[Y]:F}):{[Y]:F})};return c.jsxs(c.Fragment,{children:[c.jsxs(v.Box,{sx:{marginBottom:"10px"},children:[c.jsx(v.Input,{value:h,onChange:F=>p(F.target.value),sx:{mb:2,width:"100%"},placeholder:e.searchImage,endDecorator:c.jsx(K_,{labels:e,showFilters:n,onClick:()=>r(!n)})}),n?c.jsxs(v.Grid,{container:!0,spacing:2,children:[c.jsx(v.Grid,{xs:6,children:c.jsx(ro,{label:e.fromDate,defaultValue:m==null?void 0:m.from,required:!1,onChange:F=>k(F,"from")})}),c.jsx(v.Grid,{xs:6,children:c.jsx(ro,{label:e.toDate,defaultValue:m==null?void 0:m.to,required:!1,onChange:F=>k(F,"to")})})]}):c.jsx(c.Fragment,{}),c.jsx(v.Button,{onClick:A,sx:{mb:2,backgroundColor:"#ef8b34","&:hover":{backgroundColor:"#d7772e"},"&:active":{backgroundColor:"#c06c29"}},loading:i,children:e.search}),c.jsx(U_,{images:b,isLoading:a,onClick:t}),c.jsx(W_,{labels:e,pageCount:d,images:b,getPreviousPage:I,getNextPage:y})]}),c.jsx(nt,{showToast:l,message:e.searchSportal365ImagesErrorMessage,color:"danger",hideToast:C})]})},jp=Ve(c.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10h8c1.1 0 2-.9 2-2v-8c0-5.51-4.49-10-10-10m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"Loupe"),Up=v.styled("input")`
|
|
2350
|
+
`),C_)),Ep=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyCircularProgress"}),{children:i,className:o,color:a="primary",size:s="md",variant:l="soft",thickness:u,determinate:d=!1,value:f=d?0:25,component:h,slots:p={},slotProps:m={}}=r,g=Ae(r,x_),b=D({},r,{color:a,size:s,variant:l,thickness:u,value:f,determinate:d,instanceSize:t.size}),w=w_(b),S=D({},g,{component:h,slots:p,slotProps:m}),[C,I]=Ie("root",{ref:n,className:Bn(w.root,o),elementType:I_,externalForwardedProps:S,ownerState:b,additionalProps:D({role:"progressbar",style:{"--CircularProgress-percent":f}},f&&d&&{"aria-valuenow":Math.round(typeof f=="number"?f:Number(f||0))})}),[y,A]=Ie("svg",{className:w.svg,elementType:S_,externalForwardedProps:S,ownerState:b}),[E,k]=Ie("track",{className:w.track,elementType:A_,externalForwardedProps:S,ownerState:b}),[F,Y]=Ie("progress",{className:w.progress,elementType:T_,externalForwardedProps:S,ownerState:b});return c.jsxs(C,D({},I,{children:[c.jsxs(y,D({},A,{children:[c.jsx(E,D({},k)),c.jsx(F,D({},Y))]})),i]}))});function E_(e){return at("MuiButton",e)}const kp=Ze("MuiButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]),_p=G.createContext({}),Pp=G.createContext(void 0),k_=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],__=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,fullWidth:o,size:a,variant:s,loading:l}=e,u={root:["root",n&&"disabled",r&&"focusVisible",o&&"fullWidth",s&&`variant${ye(s)}`,t&&`color${ye(t)}`,a&&`size${ye(a)}`,l&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]},d=dt(u,E_,{});return r&&i&&(d.root+=` ${i}`),d},P_=be("span",{name:"JoyButton",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Icon-margin":"0 0 0 calc(var(--Button-gap) / -2)","--CircularProgress-margin":"0 0 0 calc(var(--Button-gap) / -2)",display:"inherit",marginRight:"var(--Button-gap)"}),D_=be("span",{name:"JoyButton",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Icon-margin":"0 calc(var(--Button-gap) / -2) 0 0","--CircularProgress-margin":"0 calc(var(--Button-gap) / -2) 0 0",display:"inherit",marginLeft:"var(--Button-gap)"}),O_=be("span",{name:"JoyButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({theme:e,ownerState:t})=>{var n,r;return D({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:(n=e.variants[t.variant])==null||(n=n[t.color])==null?void 0:n.color},t.disabled&&{color:(r=e.variants[`${t.variant}Disabled`])==null||(r=r[t.color])==null?void 0:r.color})}),R_=({theme:e,ownerState:t})=>{var n,r,i,o;return[D({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon},t.size==="sm"&&{"--Icon-fontSize":e.vars.fontSize.lg,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.375rem",minHeight:"var(--Button-minHeight, 2rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.25rem)",paddingInline:"0.75rem"},t.size==="md"&&{"--Icon-fontSize":e.vars.fontSize.xl,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.5rem",minHeight:"var(--Button-minHeight, 2.25rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.375rem)",paddingInline:"1rem"},t.size==="lg"&&{"--Icon-fontSize":e.vars.fontSize.xl2,"--CircularProgress-size":"28px","--CircularProgress-thickness":"4px","--Button-gap":"0.75rem",minHeight:"var(--Button-minHeight, 2.75rem)",fontSize:e.vars.fontSize.md,paddingBlock:"var(--Button-paddingBlock, 0.5rem)",paddingInline:"1.5rem"},{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",borderRadius:`var(--Button-radius, ${e.vars.radius.sm})`,margin:"var(--Button-margin)",border:"none",backgroundColor:"transparent",cursor:"pointer",userSelect:"none",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",textDecoration:"none",fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.lg,lineHeight:e.vars.lineHeight.md},t.fullWidth&&{width:"100%"},{[e.focus.selector]:e.focus.default}),D({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color]},'&:active, &[aria-pressed="true"]':(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],[`&.${kp.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]},t.loadingPosition==="center"&&{[`&.${kp.loading}`]:{color:"transparent"}})]},L_=be("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(R_),ni=G.forwardRef(function(t,n){var r;const i=ft({props:t,name:"JoyButton"}),{children:o,action:a,color:s="primary",variant:l="solid",size:u="md",fullWidth:d=!1,startDecorator:f,endDecorator:h,loading:p=!1,loadingPosition:m="center",loadingIndicator:g,disabled:b,component:w,slots:S={},slotProps:C={}}=i,I=Ae(i,k_),y=G.useContext(_p),A=G.useContext(Pp),E=t.variant||y.variant||l,k=t.size||y.size||u,F=t.color||y.color||s,Y=(r=t.loading||t.disabled)!=null?r:y.disabled||p||b,O=G.useRef(null),T=ln(O,n),{focusVisible:N,setFocusVisible:V,getRootProps:j}=zl(D({},i,{disabled:Y,rootRef:T})),$=g!=null?g:c.jsx(Ep,{color:F,thickness:{sm:2,md:3,lg:4}[k]||3});G.useImperativeHandle(a,()=>({focusVisible:()=>{var Z;V(!0),(Z=O.current)==null||Z.focus()}}),[V]);const M=D({},i,{color:F,fullWidth:d,variant:E,size:k,focusVisible:N,loading:p,loadingPosition:m,disabled:Y}),H=__(M),Q=Z=>{var he;let Se=i.onClick;if(typeof C.root=="function"?Se=C.root(M).onClick:C.root&&(Se=C.root.onClick),(he=Se)==null||he(Z),A){var He;(He=A.onClick)==null||He.call(A,Z,i.value)}};let te=i["aria-pressed"];typeof C.root=="function"?te=C.root(M)["aria-pressed"]:C.root&&(te=C.root["aria-pressed"]),A!=null&&A.value&&(Array.isArray(A.value)?te=A.value.indexOf(i.value)!==-1:te=A.value===i.value);const R=D({},I,{component:w,slots:S,slotProps:C}),[L,U]=Ie("root",{ref:n,className:H.root,elementType:L_,externalForwardedProps:R,getSlotProps:j,ownerState:M,additionalProps:{onClick:Q,"aria-pressed":te}}),[W,re]=Ie("startDecorator",{className:H.startDecorator,elementType:P_,externalForwardedProps:R,ownerState:M}),[se,ae]=Ie("endDecorator",{className:H.endDecorator,elementType:D_,externalForwardedProps:R,ownerState:M}),[X,le]=Ie("loadingIndicatorCenter",{className:H.loadingIndicatorCenter,elementType:O_,externalForwardedProps:R,ownerState:M});return c.jsxs(L,D({},U,{children:[(f||p&&m==="start")&&c.jsx(W,D({},re,{children:p&&m==="start"?$:f})),o,p&&m==="center"&&c.jsx(X,D({},le,{children:$})),(h||p&&m==="end")&&c.jsx(se,D({},ae,{children:p&&m==="end"?$:h}))]}))});ni.muiName="Button";var Dp={exports:{}};function M_(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Oc={exports:{}};const B_=$u(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Op;function Rc(){return Op||(Op=1,function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n=n||function(r,i){var o;if(typeof window!="undefined"&&window.crypto&&(o=window.crypto),typeof self!="undefined"&&self.crypto&&(o=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window!="undefined"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Bt!="undefined"&&Bt.crypto&&(o=Bt.crypto),!o&&typeof M_=="function")try{o=B_}catch(S){}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch(S){}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch(S){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function S(){}return function(C){var I;return S.prototype=C,I=new S,S.prototype=null,I}}(),l={},u=l.lib={},d=u.Base=function(){return{extend:function(S){var C=s(this);return S&&C.mixIn(S),(!C.hasOwnProperty("init")||this.init===C.init)&&(C.init=function(){C.$super.init.apply(this,arguments)}),C.init.prototype=C,C.$super=this,C},create:function(){var S=this.extend();return S.init.apply(S,arguments),S},init:function(){},mixIn:function(S){for(var C in S)S.hasOwnProperty(C)&&(this[C]=S[C]);S.hasOwnProperty("toString")&&(this.toString=S.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=u.WordArray=d.extend({init:function(S,C){S=this.words=S||[],C!=i?this.sigBytes=C:this.sigBytes=S.length*4},toString:function(S){return(S||p).stringify(this)},concat:function(S){var C=this.words,I=S.words,y=this.sigBytes,A=S.sigBytes;if(this.clamp(),y%4)for(var E=0;E<A;E++){var k=I[E>>>2]>>>24-E%4*8&255;C[y+E>>>2]|=k<<24-(y+E)%4*8}else for(var F=0;F<A;F+=4)C[y+F>>>2]=I[F>>>2];return this.sigBytes+=A,this},clamp:function(){var S=this.words,C=this.sigBytes;S[C>>>2]&=4294967295<<32-C%4*8,S.length=r.ceil(C/4)},clone:function(){var S=d.clone.call(this);return S.words=this.words.slice(0),S},random:function(S){for(var C=[],I=0;I<S;I+=4)C.push(a());return new f.init(C,S)}}),h=l.enc={},p=h.Hex={stringify:function(S){for(var C=S.words,I=S.sigBytes,y=[],A=0;A<I;A++){var E=C[A>>>2]>>>24-A%4*8&255;y.push((E>>>4).toString(16)),y.push((E&15).toString(16))}return y.join("")},parse:function(S){for(var C=S.length,I=[],y=0;y<C;y+=2)I[y>>>3]|=parseInt(S.substr(y,2),16)<<24-y%8*4;return new f.init(I,C/2)}},m=h.Latin1={stringify:function(S){for(var C=S.words,I=S.sigBytes,y=[],A=0;A<I;A++){var E=C[A>>>2]>>>24-A%4*8&255;y.push(String.fromCharCode(E))}return y.join("")},parse:function(S){for(var C=S.length,I=[],y=0;y<C;y++)I[y>>>2]|=(S.charCodeAt(y)&255)<<24-y%4*8;return new f.init(I,C)}},g=h.Utf8={stringify:function(S){try{return decodeURIComponent(escape(m.stringify(S)))}catch(C){throw new Error("Malformed UTF-8 data")}},parse:function(S){return m.parse(unescape(encodeURIComponent(S)))}},b=u.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(S){typeof S=="string"&&(S=g.parse(S)),this._data.concat(S),this._nDataBytes+=S.sigBytes},_process:function(S){var C,I=this._data,y=I.words,A=I.sigBytes,E=this.blockSize,k=E*4,F=A/k;S?F=r.ceil(F):F=r.max((F|0)-this._minBufferSize,0);var Y=F*E,O=r.min(Y*4,A);if(Y){for(var T=0;T<Y;T+=E)this._doProcessBlock(y,T);C=y.splice(0,Y),I.sigBytes-=O}return new f.init(C,O)},clone:function(){var S=d.clone.call(this);return S._data=this._data.clone(),S},_minBufferSize:0});u.Hasher=b.extend({cfg:d.extend(),init:function(S){this.cfg=this.cfg.extend(S),this.reset()},reset:function(){b.reset.call(this),this._doReset()},update:function(S){return this._append(S),this._process(),this},finalize:function(S){S&&this._append(S);var C=this._doFinalize();return C},blockSize:16,_createHelper:function(S){return function(C,I){return new S.init(I).finalize(C)}},_createHmacHelper:function(S){return function(C,I){return new w.HMAC.init(S,I).finalize(C)}}});var w=l.algo={};return l}(Math);return n})}(Oc)),Oc.exports}(function(e,t){(function(n,r){e.exports=r(Rc())})(Bt,function(n){return function(r){var i=n,o=i.lib,a=o.WordArray,s=o.Hasher,l=i.algo,u=[];(function(){for(var g=0;g<64;g++)u[g]=r.abs(r.sin(g+1))*4294967296|0})();var d=l.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,b){for(var w=0;w<16;w++){var S=b+w,C=g[S];g[S]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}var I=this._hash.words,y=g[b+0],A=g[b+1],E=g[b+2],k=g[b+3],F=g[b+4],Y=g[b+5],O=g[b+6],T=g[b+7],N=g[b+8],V=g[b+9],j=g[b+10],$=g[b+11],M=g[b+12],H=g[b+13],Q=g[b+14],te=g[b+15],R=I[0],L=I[1],U=I[2],W=I[3];R=f(R,L,U,W,y,7,u[0]),W=f(W,R,L,U,A,12,u[1]),U=f(U,W,R,L,E,17,u[2]),L=f(L,U,W,R,k,22,u[3]),R=f(R,L,U,W,F,7,u[4]),W=f(W,R,L,U,Y,12,u[5]),U=f(U,W,R,L,O,17,u[6]),L=f(L,U,W,R,T,22,u[7]),R=f(R,L,U,W,N,7,u[8]),W=f(W,R,L,U,V,12,u[9]),U=f(U,W,R,L,j,17,u[10]),L=f(L,U,W,R,$,22,u[11]),R=f(R,L,U,W,M,7,u[12]),W=f(W,R,L,U,H,12,u[13]),U=f(U,W,R,L,Q,17,u[14]),L=f(L,U,W,R,te,22,u[15]),R=h(R,L,U,W,A,5,u[16]),W=h(W,R,L,U,O,9,u[17]),U=h(U,W,R,L,$,14,u[18]),L=h(L,U,W,R,y,20,u[19]),R=h(R,L,U,W,Y,5,u[20]),W=h(W,R,L,U,j,9,u[21]),U=h(U,W,R,L,te,14,u[22]),L=h(L,U,W,R,F,20,u[23]),R=h(R,L,U,W,V,5,u[24]),W=h(W,R,L,U,Q,9,u[25]),U=h(U,W,R,L,k,14,u[26]),L=h(L,U,W,R,N,20,u[27]),R=h(R,L,U,W,H,5,u[28]),W=h(W,R,L,U,E,9,u[29]),U=h(U,W,R,L,T,14,u[30]),L=h(L,U,W,R,M,20,u[31]),R=p(R,L,U,W,Y,4,u[32]),W=p(W,R,L,U,N,11,u[33]),U=p(U,W,R,L,$,16,u[34]),L=p(L,U,W,R,Q,23,u[35]),R=p(R,L,U,W,A,4,u[36]),W=p(W,R,L,U,F,11,u[37]),U=p(U,W,R,L,T,16,u[38]),L=p(L,U,W,R,j,23,u[39]),R=p(R,L,U,W,H,4,u[40]),W=p(W,R,L,U,y,11,u[41]),U=p(U,W,R,L,k,16,u[42]),L=p(L,U,W,R,O,23,u[43]),R=p(R,L,U,W,V,4,u[44]),W=p(W,R,L,U,M,11,u[45]),U=p(U,W,R,L,te,16,u[46]),L=p(L,U,W,R,E,23,u[47]),R=m(R,L,U,W,y,6,u[48]),W=m(W,R,L,U,T,10,u[49]),U=m(U,W,R,L,Q,15,u[50]),L=m(L,U,W,R,Y,21,u[51]),R=m(R,L,U,W,M,6,u[52]),W=m(W,R,L,U,k,10,u[53]),U=m(U,W,R,L,j,15,u[54]),L=m(L,U,W,R,A,21,u[55]),R=m(R,L,U,W,N,6,u[56]),W=m(W,R,L,U,te,10,u[57]),U=m(U,W,R,L,O,15,u[58]),L=m(L,U,W,R,H,21,u[59]),R=m(R,L,U,W,F,6,u[60]),W=m(W,R,L,U,$,10,u[61]),U=m(U,W,R,L,E,15,u[62]),L=m(L,U,W,R,V,21,u[63]),I[0]=I[0]+R|0,I[1]=I[1]+L|0,I[2]=I[2]+U|0,I[3]=I[3]+W|0},_doFinalize:function(){var g=this._data,b=g.words,w=this._nDataBytes*8,S=g.sigBytes*8;b[S>>>5]|=128<<24-S%32;var C=r.floor(w/4294967296),I=w;b[(S+64>>>9<<4)+15]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,b[(S+64>>>9<<4)+14]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,g.sigBytes=(b.length+1)*4,this._process();for(var y=this._hash,A=y.words,E=0;E<4;E++){var k=A[E];A[E]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}return y},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g}});function f(g,b,w,S,C,I,y){var A=g+(b&w|~b&S)+C+y;return(A<<I|A>>>32-I)+b}function h(g,b,w,S,C,I,y){var A=g+(b&S|w&~S)+C+y;return(A<<I|A>>>32-I)+b}function p(g,b,w,S,C,I,y){var A=g+(b^w^S)+C+y;return(A<<I|A>>>32-I)+b}function m(g,b,w,S,C,I,y){var A=g+(w^(b|~S))+C+y;return(A<<I|A>>>32-I)+b}i.MD5=s._createHelper(d),i.HmacMD5=s._createHmacHelper(d)}(Math),n.MD5})})(Dp);var $_=Dp.exports;const Rp=hn($_);var Lp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Rc())})(Bt,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,a=o.init,s=o.init=function(l){if(l instanceof ArrayBuffer&&(l=new Uint8Array(l)),(l instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&l instanceof Uint8ClampedArray||l instanceof Int16Array||l instanceof Uint16Array||l instanceof Int32Array||l instanceof Uint32Array||l instanceof Float32Array||l instanceof Float64Array)&&(l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength)),l instanceof Uint8Array){for(var u=l.byteLength,d=[],f=0;f<u;f++)d[f>>>2]|=l[f]<<24-f%4*8;a.call(this,d,u)}else a.apply(this,arguments)};s.prototype=o}}(),n.lib.WordArray})})(Lp);var N_=Lp.exports;const Mp=hn(N_);var Bp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Rc())})(Bt,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(l){var u=l.words,d=l.sigBytes,f=this._map;l.clamp();for(var h=[],p=0;p<d;p+=3)for(var m=u[p>>>2]>>>24-p%4*8&255,g=u[p+1>>>2]>>>24-(p+1)%4*8&255,b=u[p+2>>>2]>>>24-(p+2)%4*8&255,w=m<<16|g<<8|b,S=0;S<4&&p+S*.75<d;S++)h.push(f.charAt(w>>>6*(3-S)&63));var C=f.charAt(64);if(C)for(;h.length%4;)h.push(C);return h.join("")},parse:function(l){var u=l.length,d=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var h=0;h<d.length;h++)f[d.charCodeAt(h)]=h}var p=d.charAt(64);if(p){var m=l.indexOf(p);m!==-1&&(u=m)}return s(l,u,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(l,u,d){for(var f=[],h=0,p=0;p<u;p++)if(p%4){var m=d[l.charCodeAt(p-1)]<<p%4*2,g=d[l.charCodeAt(p)]>>>6-p%4*2,b=m|g;f[h>>>2]|=b<<24-h%4*8,h++}return o.create(f,h)}}(),n.enc.Base64})})(Bp);var F_=Bp.exports;const z_=hn(F_);class $p{constructor(){ne(this,"readFileAndHash",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,s=Mp.create(new Uint8Array(a)),u=Rp(s).toString(z_);n(u)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}));ne(this,"generateHashFileName",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,s=Mp.create(new Uint8Array(a)),l=Rp(s).toString();n(l)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}))}}const Np=({title:e,open:t,imageSrc:n,toggleModal:r})=>c.jsx(v.Modal,{open:t,onClose:r,children:c.jsxs(v.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[c.jsx(v.ModalClose,{}),c.jsx(v.DialogTitle,{sx:{marginBottom:"10px"},children:e}),c.jsx(v.DialogContent,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:c.jsx("img",{src:n,alt:"Image modal",style:{maxWidth:"100%",maxHeight:"100%"}})})]})}),Fp=Ve(c.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),lt=()=>{const e=x.useContext(ea);if(!e)throw new Error("useAPIContext must be used within a APIProvider");return e},j_=Ve(c.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),U_=({isLoading:e,images:t,onClick:n})=>c.jsxs(c.Fragment,{children:[c.jsx(v.Grid,{container:!0,spacing:2,children:t.map(r=>{var i,o;return c.jsx(v.Grid,{xs:5,sm:4,md:3,children:c.jsxs(v.Box,{sx:{position:"relative",width:"100%","&:hover .overlay":{backgroundColor:"rgba(0, 0, 0, 0.5)",opacity:1},"&:hover .plusSign":{opacity:1}},onClick:()=>{var a,s;return n(((s=(a=r.urls)==null?void 0:a.uploaded)==null?void 0:s.embed)||"")},children:[c.jsx(v.Box,{component:"img",src:(o=(i=r.urls)==null?void 0:i.uploaded)==null?void 0:o.thumbnail,alt:`image-${r.id}`,sx:{width:"100%",height:"auto",borderRadius:"8px"}}),c.jsx(v.Box,{className:"overlay",sx:{position:"absolute",top:0,left:0,right:0,bottom:5,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0)",opacity:0,transition:"background-color 0.3s ease, opacity 0.3s ease",borderRadius:"8px",cursor:"pointer"},children:c.jsx(v.Typography,{className:"plusSign",level:"h2",sx:{color:"white",opacity:0,transition:"opacity 0.3s ease"},children:"+"})})]})},`sportal-image-${r.id}`)})}),e?c.jsx(v.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:c.jsx(v.CircularProgress,{variant:"solid",color:"neutral"})}):c.jsx(c.Fragment,{})]}),V_=Ve(c.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),H_=Ve(c.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),W_=e=>c.jsx(v.Box,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:c.jsxs(v.Box,{display:"flex",children:[e.pageCount&&e.pageCount!==1&&c.jsx(v.Button,{variant:"outlined",color:"neutral",startDecorator:c.jsx(V_,{}),onClick:e.getPreviousPage,sx:{textTransform:"none",fontSize:"14px",fontWeight:"bold",paddingX:2,paddingY:1,borderRadius:"4px 0 0 4px",borderRight:0,"&:hover":{backgroundColor:"background.level1"}},children:e.labels.previous}),e.images&&e.images.length===20&&c.jsx(v.Button,{variant:"outlined",color:"neutral",endDecorator:c.jsx(H_,{}),onClick:e.getNextPage,sx:{textTransform:"none",fontSize:"14px",fontWeight:"bold",paddingX:2,paddingY:1,borderRadius:e.pageCount!==1?"0 4px 4px 0":"4px",borderLeft:e.pageCount!==1?0:1,"&:hover":{backgroundColor:"background.level1"}},children:e.labels.next})]})}),ir=Ve(c.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-6h2zm0-8h-2V7h2z"}),"Info"),G_=Ve(c.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),Y_=({color:e})=>e==="warning"?c.jsx(G_,{}):c.jsx(ir,{}),nt=e=>c.jsx(v.Snackbar,{anchorOrigin:{vertical:"top",horizontal:"right"},open:e.showToast,onClose:e.hideToast,autoHideDuration:3e3,color:e.color,startDecorator:c.jsx(Y_,{color:e.color}),children:e.message},e.message),ro=({label:e,defaultValue:t,required:n,onChange:r})=>{const i=o=>{r(o.target.value)};return c.jsxs(v.FormControl,{sx:{marginBottom:"16px"},children:[c.jsx(v.FormLabel,{required:n,color:"primary",children:e}),c.jsx(v.Input,{type:"date",defaultValue:t,onChange:i,sx:{backgroundColor:"#fff",borderRadius:"md"}})]})},K_=({labels:e,showFilters:t,onClick:n})=>c.jsx(v.Tooltip,{title:t?e.hideFilters:e.showFilters,children:c.jsx(v.IconButton,{"aria-label":"Filters",onClick:n,children:c.jsx(j_,{})})}),zp=({labels:e,onChangeImages:t})=>{const[n,r]=x.useState(!1),[i,o]=x.useState(!1),[a,s]=x.useState(!1),[l,u]=x.useState(!1),[d,f]=x.useState(1),[h,p]=x.useState(""),[m,g]=x.useState(null),[b,w]=x.useState([]),{https:S}=lt();x.useEffect(()=>{E()},[d]);const C=()=>u(!l),I=()=>f(F=>F-1),y=()=>f(F=>F+1),A=()=>_(this,null,function*(){if(h){o(!0);const F=m?z({},m):null,Y=yield S.fetchImagesFromSportal365(h,F,d);if(Y){const O=yield Y.json();Y.ok?(w(O.data),f(O.meta.pagination.current_page)):(console.error(O),C())}o(!1)}else w([])}),E=()=>_(this,null,function*(){if(h){s(!0),w([]);const F=m&&m.from&&m.to?z({},m):null,Y=yield S.fetchImagesFromSportal365(h,F,d);if(Y){const O=yield Y.json();Y.ok?(w(O.data),f(O.meta.pagination.current_page)):(console.error(O),C())}s(!1)}}),k=(F,Y)=>{g(O=>O?q(z({},O),{[Y]:F}):{[Y]:F})};return c.jsxs(c.Fragment,{children:[c.jsxs(v.Box,{sx:{marginBottom:"10px"},children:[c.jsx(v.Input,{value:h,onChange:F=>p(F.target.value),sx:{mb:2,width:"100%"},placeholder:e.searchImage,endDecorator:c.jsx(K_,{labels:e,showFilters:n,onClick:()=>r(!n)})}),n?c.jsxs(v.Grid,{container:!0,spacing:2,children:[c.jsx(v.Grid,{xs:6,children:c.jsx(ro,{label:e.fromDate,defaultValue:m==null?void 0:m.from,required:!1,onChange:F=>k(F,"from")})}),c.jsx(v.Grid,{xs:6,children:c.jsx(ro,{label:e.toDate,defaultValue:m==null?void 0:m.to,required:!1,onChange:F=>k(F,"to")})})]}):c.jsx(c.Fragment,{}),c.jsx(v.Button,{onClick:A,sx:{mb:2,backgroundColor:"#ef8b34","&:hover":{backgroundColor:"#d7772e"},"&:active":{backgroundColor:"#c06c29"}},loading:i,children:e.search}),c.jsx(U_,{images:b,isLoading:a,onClick:t}),c.jsx(W_,{labels:e,pageCount:d,images:b,getPreviousPage:I,getNextPage:y})]}),c.jsx(nt,{showToast:l,message:e.searchSportal365ImagesErrorMessage,color:"danger",hideToast:C})]})},jp=Ve(c.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10h8c1.1 0 2-.9 2-2v-8c0-5.51-4.49-10-10-10m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"Loupe"),Up=v.styled("input")`
|
|
2351
2351
|
clip: rect(0 0 0 0);
|
|
2352
2352
|
clip-path: inset(50%);
|
|
2353
2353
|
height: 1px;
|
|
@@ -2370,7 +2370,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
2370
2370
|
* @return {boolean} True if the event is supported.
|
|
2371
2371
|
* @internal
|
|
2372
2372
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
2373
|
-
*/function X_(e,t){if(!Kp.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r=typeof i[n]=="function"}return!r&&Qp&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var Z_=X_,eP=Q_,tP=Z_,qp=10,Jp=40,Xp=800;function Zp(e){var t=0,n=0,r=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=t*qp,i=n*qp,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||i)&&e.deltaMode&&(e.deltaMode==1?(r*=Jp,i*=Jp):(r*=Xp,i*=Xp)),r&&!t&&(t=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:i}}Zp.getEventType=function(){return eP.firefox()?"DOMMouseScroll":tP("wheel")?"wheel":"mousewheel"};var nP=Zp,rP=nP;const iP=
|
|
2373
|
+
*/function X_(e,t){if(!Kp.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r=typeof i[n]=="function"}return!r&&Qp&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var Z_=X_,eP=Q_,tP=Z_,qp=10,Jp=40,Xp=800;function Zp(e){var t=0,n=0,r=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=t*qp,i=n*qp,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||i)&&e.deltaMode&&(e.deltaMode==1?(r*=Jp,i*=Jp):(r*=Xp,i*=Xp)),r&&!t&&(t=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:i}}Zp.getEventType=function(){return eP.firefox()?"DOMMouseScroll":tP("wheel")?"wheel":"mousewheel"};var nP=Zp,rP=nP;const iP=hn(rP);function oP(e,t,n,r,i,o){o===void 0&&(o=0);var a=ri(e,t,o),s=a.width,l=a.height,u=Math.min(s,n),d=Math.min(l,r);return u>d*i?{width:d*i,height:d}:{width:u,height:u/i}}function aP(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function Ja(e,t,n,r,i){i===void 0&&(i=0);var o=ri(t.width,t.height,i),a=o.width,s=o.height;return{x:eg(e.x,a,n.width,r),y:eg(e.y,s,n.height,r)}}function eg(e,t,n,r){var i=t*r/2-n/2;return Xa(e,-i,i)}function tg(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function ng(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function sP(e,t,n,r,i,o,a){o===void 0&&(o=0),a===void 0&&(a=!0);var s=a?lP:cP,l=ri(t.width,t.height,o),u=ri(t.naturalWidth,t.naturalHeight,o),d={x:s(100,((l.width-n.width/i)/2-e.x/i)/l.width*100),y:s(100,((l.height-n.height/i)/2-e.y/i)/l.height*100),width:s(100,n.width/l.width*100/i),height:s(100,n.height/l.height*100/i)},f=Math.round(s(u.width,d.width*u.width/100)),h=Math.round(s(u.height,d.height*u.height/100)),p=u.width>=u.height*r,m=p?{width:Math.round(h*r),height:h}:{width:f,height:Math.round(f/r)},g=At(At({},m),{x:Math.round(s(u.width-m.width,d.x*u.width/100)),y:Math.round(s(u.height-m.height,d.y*u.height/100))});return{croppedAreaPercentages:d,croppedAreaPixels:g}}function lP(e,t){return Math.min(e,Math.max(0,t))}function cP(e,t){return t}function uP(e,t,n,r,i,o){var a=ri(t.width,t.height,n),s=Xa(r.width/a.width*(100/e.width),i,o),l={x:s*a.width/2-r.width/2-a.width*s*(e.x/100),y:s*a.height/2-r.height/2-a.height*s*(e.y/100)};return{crop:l,zoom:s}}function dP(e,t,n){var r=aP(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}function fP(e,t,n,r,i,o){n===void 0&&(n=0);var a=ri(t.naturalWidth,t.naturalHeight,n),s=Xa(dP(e,t,r),i,o),l=r.height>r.width?r.height/e.height:r.width/e.width,u={x:((a.width-e.width)/2-e.x)*l,y:((a.height-e.height)/2-e.y)*l};return{crop:u,zoom:s}}function rg(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function hP(e){return e*Math.PI/180}function ri(e,t,n){var r=hP(n);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function Xa(e,t,n){return Math.min(Math.max(e,t),n)}function Za(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(n){return typeof n=="string"&&n.length>0}).join(" ").trim()}var pP=`.reactEasyCrop_Container {
|
|
2374
2374
|
position: absolute;
|
|
2375
2375
|
top: 0;
|
|
2376
2376
|
left: 0;
|
|
@@ -2450,17 +2450,17 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
2450
2450
|
border-left: 0;
|
|
2451
2451
|
border-right: 0;
|
|
2452
2452
|
}
|
|
2453
|
-
`,gP=1,mP=3,vP=function(e){sy(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=G.createRef(),n.videoRef=G.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document!="undefined"?document:null,n.currentWindow=typeof window!="undefined"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver=="undefined"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=uP(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=i.crop,a=i.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}else if(n.props.initialCroppedAreaPixels){var s=fP(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=s.crop,a=s.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}},n.computeSizes=function(){var r,i,o,a,s,l,u=n.imageRef.current||n.videoRef.current;if(u&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var d=n.containerRect.width/n.containerRect.height,f=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,h=((o=n.imageRef.current)===null||o===void 0?void 0:o.naturalHeight)||((a=n.videoRef.current)===null||a===void 0?void 0:a.videoHeight)||0,p=u.offsetWidth<f||u.offsetHeight<h,m=f/h,g=void 0;if(p)switch(n.state.mediaObjectFit){default:case"contain":g=d>m?{width:n.containerRect.height*m,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/m};break;case"horizontal-cover":g={width:n.containerRect.width,height:n.containerRect.width/m};break;case"vertical-cover":g={width:n.containerRect.height*m,height:n.containerRect.height};break}else g={width:u.offsetWidth,height:u.offsetHeight};n.mediaSize=At(At({},g),{naturalWidth:f,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var b=n.props.cropSize?n.props.cropSize:oP(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((s=n.state.cropSize)===null||s===void 0?void 0:s.height)!==b.height||((l=n.state.cropSize)===null||l===void 0?void 0:l.width)!==b.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(b),n.setState({cropSize:b},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(b),b}},n.saveContainerPosition=function(){if(n.containerRef){var r=n.containerRef.getBoundingClientRect();n.containerPosition={x:r.left,y:r.top}}},n.onMouseDown=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(t.getMousePoint(r))},n.onScroll=function(r){n.currentDoc&&(r.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(r){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(t.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(t.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=t.getMousePoint(r),o=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var a=n.gestureRotationStart+r.rotation;n.props.onRotationChange(a)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,o,a=r.x,s=r.y;n.dragStartPosition={x:a,y:s},n.dragStartCrop=At({},n.props.crop),(o=(i=n.props).onInteractionStart)===null||o===void 0||o.call(i)},n.onDrag=function(r){var i=r.x,o=r.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(i===void 0||o===void 0)){var a=i-n.dragStartPosition.x,s=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+a,y:n.dragStartCrop.y+s},u=n.props.restrictPosition?Ja(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(u)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=t.getMousePoint(r),o=iP(r).pixelY,a=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(a,i,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var s,l;return(l=(s=n.props).onInteractionStart)===null||l===void 0?void 0:l.call(s)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var s,l;return(l=(s=n.props).onInteractionEnd)===null||l===void 0?void 0:l.call(s)})},250)}},n.getPointOnContainer=function(r,i){var o=r.x,a=r.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-i.x),y:n.containerRect.height/2-(a-i.y)}},n.getPointOnMedia=function(r){var i=r.x,o=r.y,a=n.props,s=a.crop,l=a.zoom;return{x:(i+s.x)/l,y:(o+s.y)/l}},n.setNewZoom=function(r,i,o){var a=o===void 0?{}:o,s=a.shouldUpdatePosition,l=s===void 0?!0:s;if(!(!n.state.cropSize||!n.props.onZoomChange)){var u=Xa(r,n.props.minZoom,n.props.maxZoom);if(l){var d=n.getPointOnContainer(i,n.containerPosition),f=n.getPointOnMedia(d),h={x:f.x*u-d.x,y:f.y*u-d.y},p=n.props.restrictPosition?Ja(h,n.mediaSize,n.state.cropSize,u,n.props.rotation):h;n.props.onCropChange(p)}n.props.onZoomChange(u)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?Ja(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return sP(r,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition)},n.emitCropData=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(i,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.emitCropAreaChange=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var r=n.props.restrictPosition?Ja(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(r),n.emitCropData()}},n}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver=="undefined"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=pP,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var n,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver=="undefined"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(n=this.resizeObserver)===null||n===void 0||n.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(n){var r,i,o,a,s,l,u,d,f;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.objectFit!==this.props.objectFit?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((o=n.cropSize)===null||o===void 0?void 0:o.width)!==((a=this.props.cropSize)===null||a===void 0?void 0:a.width)?this.computeSizes():(((s=n.crop)===null||s===void 0?void 0:s.x)!==((l=this.props.crop)===null||l===void 0?void 0:l.x)||((u=n.crop)===null||u===void 0?void 0:u.y)!==((d=this.props.crop)===null||d===void 0?void 0:d.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((f=this.videoRef.current)===null||f===void 0||f.load());var h=this.getObjectFit();h!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:h},this.computeSizes)},t.prototype.getAspect=function(){var n=this.props,r=n.cropSize,i=n.aspect;return r?r.width/r.height:i},t.prototype.getObjectFit=function(){var n,r,i,o;if(this.props.objectFit==="cover"){var a=this.imageRef.current||this.videoRef.current;if(a&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var s=this.containerRect.width/this.containerRect.height,l=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((o=this.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,d=l/u;return d<s?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(n){var r=t.getTouchPoint(n.touches[0]),i=t.getTouchPoint(n.touches[1]);this.lastPinchDistance=tg(r,i),this.lastPinchRotation=ng(r,i),this.onDragStart(rg(r,i))},t.prototype.onPinchMove=function(n){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var i=t.getTouchPoint(n.touches[0]),o=t.getTouchPoint(n.touches[1]),a=rg(i,o);this.onDrag(a),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var s=tg(i,o),l=r.props.zoom*(s/r.lastPinchDistance);r.setNewZoom(l,a,{shouldUpdatePosition:!1}),r.lastPinchDistance=s;var u=ng(i,o),d=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=u})}},t.prototype.render=function(){var n=this,r,i=this.props,o=i.image,a=i.video,s=i.mediaProps,l=i.transform,u=i.crop,d=u.x,f=u.y,h=i.rotation,p=i.zoom,m=i.cropShape,g=i.showGrid,b=i.style,w=b.containerStyle,S=b.cropAreaStyle,C=b.mediaStyle,I=i.classes,y=I.containerClassName,A=I.cropAreaClassName,E=I.mediaClassName,k=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return G.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(Y){return n.containerRef=Y},"data-testid":"container",style:w,className:Za("reactEasyCrop_Container",y)},o?G.createElement("img",At({alt:"",className:Za("reactEasyCrop_Image",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},s,{src:o,ref:this.imageRef,style:At(At({},C),{transform:l||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):a&&G.createElement("video",At({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:Za("reactEasyCrop_Video",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},s,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:At(At({},C),{transform:l||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(F){return G.createElement("source",At({key:F.src},F))})),this.state.cropSize&&G.createElement("div",{style:At(At({},S),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Za("reactEasyCrop_CropArea",m==="round"&&"reactEasyCrop_CropAreaRound",g&&"reactEasyCrop_CropAreaGrid",A)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:mP,minZoom:gP,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t}(G.Component);const bP=e=>new Promise((t,n)=>{const r=new Image;r.addEventListener("load",()=>t(r)),r.addEventListener("error",i=>n(i)),r.crossOrigin="Anonymous",r.src=e});function yP(e){return e*Math.PI/180}function xP(e,t,n=0){return _(this,null,function*(){const r=yield bP(e),i=document.createElement("canvas"),o=i.getContext("2d"),s=2*(Math.max(r.width,r.height)/2*Math.sqrt(2));i.width=s,i.height=s,o.translate(s/2,s/2),o.rotate(yP(n)),o.translate(-s/2,-s/2),o.drawImage(r,s/2-r.width*.5,s/2-r.height*.5);const l=o.getImageData(0,0,s,s);return i.width=t.width,i.height=t.height,o.putImageData(l,Math.round(0-s/2+r.width*.5-t.x),Math.round(0-s/2+r.height*.5-t.y)),new Promise(u=>i.toBlob(d=>{const f=new File([d],`cropped_image_${Date.now()}.jpeg`,{type:"image/jpeg"});u(f)},"image/jpeg"))})}const ig=({labels:e,open:t,imageSrc:n,resetDefaultImageUrl:r,toggleModal:i,uploadImage:o})=>{const[a,s]=x.useState({x:0,y:0}),[l,u]=x.useState(1),[d,f]=x.useState(16/9),[h,p]=x.useState(null),m=(C,I)=>{p(I)},g=(C,I)=>f(I),b=()=>_(this,null,function*(){const C=yield xP(n,h);S(),o(C)}),w=()=>{S(),r()},S=()=>{s({x:0,y:0}),u(1),f(16/9),p(null)};return c.jsx(v.Modal,{open:t,onClose:i,children:c.jsxs(v.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[c.jsx(v.ModalClose,{}),c.jsx(v.DialogTitle,{children:e.cropImage}),c.jsxs(v.DialogContent,{sx:{width:"100%"},children:[c.jsx(v.Box,{position:"relative",height:"100%",width:"100%",mb:2,children:c.jsx(vP,{image:n,crop:a,zoom:l,aspect:d,onCropChange:s,onCropComplete:m,onZoomChange:u})}),c.jsxs(v.FormControl,{sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{color:"primary",children:e.aspectRatio}),c.jsxs(v.Select,{value:d,onChange:g,children:[c.jsx(v.Option,{value:4/3,children:"4 / 3"}),c.jsx(v.Option,{value:16/9,children:"16 / 9"}),c.jsx(v.Option,{value:1,children:"1"})]})]}),c.jsx(v.Box,{mb:1,mx:2,children:c.jsx(v.Slider,{value:l,min:1,max:3,step:.1,onChange:(C,I)=>u(I)})}),c.jsxs(v.DialogActions,{children:[c.jsx(v.Button,{color:"primary",onClick:b,loading:!1,children:e.crop}),c.jsx(v.Button,{color:"primary",variant:"outlined",onClick:w,loading:!1,children:e.reset})]})]})]})})},og=Ve(c.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"CropOutlined"),ag=({labels:e,title:t,image:n,onChangeImages:r,clearImage:i})=>{const[o,a]=x.useState(!1),[s,l]=x.useState(!1),[u,d]=x.useState(!1),[f,h]=x.useState(!1),[p,m]=x.useState(""),[g,b]=x.useState("primary"),[w,S]=x.useState(""),C=x.useRef(null),I=()=>h(!f),y=()=>{C.current&&C.current.click()},A=new $p,E=x.useContext(ea),k=()=>{m(""),l(!1)},F=M=>{let H="",Q="primary";switch(M){case"copy_url":H=e.urlCopiedToClipboardMessage,Q="primary";break;case"image_deleted":H=e.imageDeletedMessage,Q="primary";break;case"image_reset":H=e.imageResetMessage,Q="primary";break;case"upload_success":H=e.uploadingImageMessage,Q="success";break;case"upload_failed":H=e.uploadingImageErrorMessage,Q="danger";break;case"sign_in_url_failed":H=e.generateSignedInUrlErrorMessage,Q="danger";break;case"encrypting_file_failed":H=e.encryptingImageErrorMessage,Q="danger";break}b(Q),m(H),l(!0)},Y=()=>d(!u),O=()=>{i(),F("image_deleted")},T=M=>{navigator.clipboard.writeText(M),F("copy_url")},N=M=>_(this,null,function*(){M.persist();const H=M.target.files?M.target.files[0]:null;if(H){a(!0);try{const Q=H.type.split("/")[1],te=yield A.readFileAndHash(H),R=(yield A.generateHashFileName(H))+"."+Q,L={image_type:Q,image_file_name:R,image_size:H.size,base64_sum:te},U=yield E==null?void 0:E.https.generateSignedInUrl(L);if(U!=null&&U.ok){const W=yield U.json(),re={"Content-Type":H.type,"Content-MD5":te};try{const se=new File([H],R,{type:H.type}),ae=yield E==null?void 0:E.https.storeInBucket(W.data.signed_url,se,re);r(ae||""),S(ae),F("upload_success")}catch(se){console.error("There was a problem with uploading the file: ",se),F("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield U==null?void 0:U.json()),F("sign_in_url_failed")}catch(Q){console.error("There was a problem with encrypting file...",Q),F("encrypting_file_failed")}a(!1)}}),V=M=>_(this,null,function*(){if(M){a(!0);try{const H=M.type.split("/")[1],Q=yield A.readFileAndHash(M),te=(yield A.generateHashFileName(M))+"."+H,R={image_type:H,image_file_name:te,image_size:M.size,base64_sum:Q},L=yield E==null?void 0:E.https.generateSignedInUrl(R);if(L!=null&&L.ok){const U=yield L.json(),W={"Content-Type":M.type,"Content-MD5":Q};try{const re=new File([M],te,{type:M.type}),se=yield E==null?void 0:E.https.storeInBucket(U.data.signed_url,re,W);r(se||""),F("upload_success")}catch(re){console.error("There was a problem with uploading the file: ",re),F("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield L==null?void 0:L.json()),F("sign_in_url_failed")}catch(H){console.error("There was a problem with encrypting file...",H),F("encrypting_file_failed")}a(!1)}}),j=()=>{r(w),F("image_reset")},$=M=>{r(M),S(M)};return c.jsxs(c.Fragment,{children:[c.jsxs(v.Card,{sx:{marginBottom:"10px"},children:[c.jsxs(v.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[c.jsx(v.Typography,{level:"title-lg",children:t}),c.jsx(v.Tooltip,{title:e.clearImage,children:c.jsx(v.IconButton,{"aria-label":e.clearImage,variant:"plain",color:"danger",size:"sm",onClick:O,children:c.jsx(Ap,{})})})]}),c.jsxs(v.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[c.jsxs(v.Skeleton,{loading:o,animation:"wave",children:[n?c.jsx(v.Box,{component:"img",src:n,loading:"lazy",alt:t,sx:{width:"100%",height:"100%",position:"relative",transition:"background-color 0.3s ease","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.3)"}}}):c.jsx(Pc,{sx:{fontSize:"3rem",opacity:.2}}),n?c.jsx(v.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",pointerEvents:"none",opacity:0,transition:"opacity 0.3s ease","&:hover":{opacity:1}},children:c.jsx(Fp,{sx:{fontSize:"3rem",color:"#fff"}})}):c.jsx(c.Fragment,{})]}),c.jsx(v.Tooltip,{title:e.copyUrl,children:c.jsx(ni,{onClick:()=>T(n),disabled:!n,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:c.jsx(De.ContentCopy,{})})}),c.jsx(v.Tooltip,{title:e.viewImage,children:c.jsx(ni,{onClick:Y,disabled:!n,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:c.jsx(jp,{})})}),c.jsx(v.Tooltip,{title:e.cropImage,children:c.jsx(ni,{onClick:I,disabled:!n,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:c.jsx(og,{})})})]}),c.jsx(v.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:c.jsxs(ni,{sx:{width:"100%"},onClick:y,children:[c.jsx(De.Upload,{})," ",e.uploadImage,c.jsx(Up,{type:"file",accept:"image/*",onChange:N,ref:C})]})}),E!=null&&E.https.sportal365Config?c.jsx(v.AccordionGroup,{variant:"soft",children:c.jsxs(v.Accordion,{children:[c.jsx(v.AccordionSummary,{children:c.jsx(v.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.sportal365Images})}),c.jsx(v.AccordionDetails,{children:c.jsx(zp,{labels:e,onChangeImages:$})})]})}):c.jsx(c.Fragment,{})]}),c.jsx(nt,{showToast:s,message:p,color:g,hideToast:k}),c.jsx(Np,{title:e.viewImage,open:u,imageSrc:n,toggleModal:Y}),c.jsx(ig,{labels:e,open:f,imageSrc:n,toggleModal:I,uploadImage:V,resetDefaultImageUrl:j})]})},CP=e=>new Map().set("main_logo",e.mainLogo).set("mobile_logo",e.mobileLogo).set("background_image",e.backgroundImage).set("mobile_background_image",e.mobileBackgroundImage).set("additional_image",e.additionalImage),wP=e=>new Map().set("primary_color",e.primaryColor).set("secondary_color",e.secondaryColor).set("content_color",e.contentColor).set("background_color",e.backgroundColor).set("border_color",e.borderColor).set("additional_color",e.additionalColor),IP=e=>new Map().set("primary_url",e.primaryUrl).set("secondary_url",e.secondaryUrl).set("privacy_policy_url",e.privacyPolicyUrl).set("terms_and_conditions_url",e.termsAndConditionsUrl).set("additional_url",e.additionalUrl),SP=({labels:e,defaultValue:t,onChange:n})=>{const[r,i]=x.useState(!1),o=JSON.parse(JSON.stringify(t)),a=["mobile_logo","background_image","mobile_background_image","additional_image"],s=CP(e),l=wP(e),u=IP(e),d=(m,g)=>{const b=m.target.value;o.colors[g]=b,n(o)},f=(m,g)=>{const b=m.target.value;o.urls[g]=b,n(o)},h=(m,g)=>{o.images[g]=m,n(o)},p=m=>{o.images[m]="",n(o)};return c.jsx(v.Box,{children:c.jsxs(Hh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[c.jsxs(Wh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${hc.root}`]:{'&[aria-selected="true"]':{bgcolor:"transparent",py:1,borderColor:"transparent","&::before":{content:'""',display:"block",position:"absolute",height:2,bottom:-2,left:0,right:0},"&::after":{bgcolor:"primary.500"}}}},tabFlex:"auto",children:[c.jsxs(Wr,{children:[c.jsx(v.ListItemDecorator,{children:c.jsx(Pc,{sx:{width:"20px"}})}),e.images]}),c.jsxs(Wr,{children:[c.jsx(v.ListItemDecorator,{children:c.jsx(Qk,{sx:{width:"20px"}})}),e.colors]}),c.jsxs(Wr,{children:[c.jsx(v.ListItemDecorator,{children:c.jsx(qk,{sx:{width:"20px"}})}),e.urls]})]}),c.jsxs(ei,{value:0,sx:{px:0},children:[c.jsx(ag,{labels:e,title:e.mainLogo,image:o.images.main_logo,onChangeImages:m=>h(m,"main_logo"),clearImage:()=>p("main_logo")}),c.jsx(v.Link,{underline:"hover",onClick:()=>i(!r),sx:{marginBottom:"10px"},children:r?e.hideMoreImages:e.showMoreImages}),r?c.jsx(c.Fragment,{children:a.map(m=>c.jsx(ag,{labels:e,title:s.get(m),image:o.images[m],onChangeImages:g=>h(g,m),clearImage:()=>p(m)},`branding-image-${m}`))}):c.jsx(c.Fragment,{})]}),c.jsx(ei,{value:1,sx:{px:0},children:c.jsx(v.Box,{children:Object.keys(o.colors).map(m=>c.jsx(v.Box,{mb:2,children:c.jsx(xn,{size:"sm",label:l.get(m),placeholder:"",defaultValue:o.colors[m],required:!1,onChange:g=>d(g,m)})},`branding-color-${m}`))})}),c.jsx(ei,{value:2,sx:{px:0},children:c.jsx(v.Box,{children:Object.keys(o.urls).map(m=>c.jsx(v.Box,{mb:2,children:c.jsx(xn,{size:"sm",label:u.get(m),placeholder:"",defaultValue:o.urls[m],required:!1,onChange:g=>f(g,m)})},`branding-url-${m}`))})})]})})},Uc=Ve(c.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.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"}),"AddCircleOutlineOutlined"),sg=e=>{const t=()=>_(this,null,function*(){yield Vi(e.environment).signOut()});return c.jsx(v.Button,{variant:"outlined",color:"danger",onClick:t,children:e.signOutLabel})},AP=({createLabel:e,createFromTemplateLabel:t,signOutLabel:n,environment:r,onClickCreate:i,onClickCreateFromTemplate:o})=>c.jsx(c.Fragment,{children:c.jsxs(v.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",p:1,sx:()=>({marginBottom:"16px"}),children:[t?c.jsxs(v.Stack,{direction:"row",alignItems:"center",spacing:2,children:[c.jsx(v.Button,{startDecorator:c.jsx(Uc,{}),variant:"solid",color:"primary",onClick:i,children:e}),c.jsx(v.Button,{startDecorator:c.jsx(Uc,{}),variant:"outlined",color:"primary",onClick:o,children:t})]}):c.jsx(v.Button,{startDecorator:c.jsx(Uc,{}),variant:"solid",color:"primary",onClick:i,children:e}),n?c.jsx(sg,{signOutLabel:n,environment:r}):c.jsx(c.Fragment,{})]})});var lg={},Vc=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ii={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return typeof console!="undefined"&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},io={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},zt=function(e,t){return t===void 0&&(t=2),("000"+e).slice(t*-1)},rn=function(e){return e===!0?1:0};function cg(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var Hc=function(e){return e instanceof Array?e:[e]};function Ot(e,t,n){if(n===!0)return e.classList.add(t);e.classList.remove(t)}function Le(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,n!==void 0&&(r.textContent=n),r}function es(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ug(e,t){if(t(e))return e;if(e.parentNode)return ug(e.parentNode,t)}function ts(e,t){var n=Le("div","numInputWrapper"),r=Le("input","numInput "+e),i=Le("span","arrowUp"),o=Le("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(i),n.appendChild(o),n}function Yt(e){try{if(typeof e.composedPath=="function"){var t=e.composedPath();return t[0]}return e.target}catch(n){return e.target}}var Wc=function(){},ns=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},TP={D:Wc,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*rn(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(parseFloat(t)*1e3)},W:function(e,t,n){var r=parseInt(t),i=new Date(e.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:Wc,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:Wc,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},Sr={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},oo={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[oo.w(e,t,n)]},F:function(e,t,n){return ns(oo.n(e,t,n)-1,!1,t)},G:function(e,t,n){return zt(oo.h(e,t,n))},H:function(e){return zt(e.getHours())},J:function(e,t){return t.ordinal!==void 0?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[rn(e.getHours()>11)]},M:function(e,t){return ns(e.getMonth(),!0,t)},S:function(e){return zt(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return zt(e.getFullYear(),4)},d:function(e){return zt(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return zt(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return zt(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},dg=function(e){var t=e.config,n=t===void 0?ii:t,r=e.l10n,i=r===void 0?io:r,o=e.isMobile,a=o===void 0?!1:o;return function(s,l,u){var d=u||i;return n.formatDate!==void 0&&!a?n.formatDate(s,l,d):l.split("").map(function(f,h,p){return oo[f]&&p[h-1]!=="\\"?oo[f](s,d,n):f!=="\\"?f:""}).join("")}},Gc=function(e){var t=e.config,n=t===void 0?ii:t,r=e.l10n,i=r===void 0?io:r;return function(o,a,s,l){if(!(o!==0&&!o)){var u=l||i,d,f=o;if(o instanceof Date)d=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)d=new Date(o);else if(typeof o=="string"){var h=a||(n||ii).dateFormat,p=String(o).trim();if(p==="today")d=new Date,s=!0;else if(n&&n.parseDate)d=n.parseDate(o,h);else if(/Z$/.test(p)||/GMT$/.test(p))d=new Date(o);else{for(var m=void 0,g=[],b=0,w=0,S="";b<h.length;b++){var C=h[b],I=C==="\\",y=h[b-1]==="\\"||I;if(Sr[C]&&!y){S+=Sr[C];var A=new RegExp(S).exec(o);A&&(m=!0)&&g[C!=="Y"?"push":"unshift"]({fn:TP[C],val:A[++w]})}else I||(S+=".")}d=!n||!n.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),g.forEach(function(E){var k=E.fn,F=E.val;return d=k(d,F,u)||d}),d=m?d:void 0}}if(!(d instanceof Date&&!isNaN(d.getTime()))){n.errorHandler(new Error("Invalid date provided: "+f));return}return s===!0&&d.setHours(0,0,0,0),d}}};function Kt(e,t,n){return n===void 0&&(n=!0),n!==!1?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var EP=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},Yc=function(e,t,n){return e*3600+t*60+n},kP=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},_P={DAY:864e5};function Kc(e){var t=e.defaultHour,n=e.defaultMinute,r=e.defaultSeconds;if(e.minDate!==void 0){var i=e.minDate.getHours(),o=e.minDate.getMinutes(),a=e.minDate.getSeconds();t<i&&(t=i),t===i&&n<o&&(n=o),t===i&&n===o&&r<a&&(r=e.minDate.getSeconds())}if(e.maxDate!==void 0){var s=e.maxDate.getHours(),l=e.maxDate.getMinutes();t=Math.min(t,s),t===s&&(n=Math.min(l,n)),t===s&&n===l&&(r=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var r=function(s){s&&Object.keys(s).forEach(function(l){return e[l]=s[l]})},i=0,o=t;i<o.length;i++){var a=o[i];r(a)}return e});var Et=function(){return Et=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Et.apply(this,arguments)},fg=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},PP=300;function DP(e,t){var n={config:Et(Et({},ii),ht.defaultConfig),l10n:io};n.parseDate=Gc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=g,n._setHoursFromDate=h,n._positionCalendar=xe,n.changeMonth=R,n.changeYear=ae,n.clear=L,n.close=U,n.onMouseOver=Se,n._createElement=Le,n.createDay=A,n.destroy=W,n.isEnabled=X,n.jumpToDate=S,n.updateValue=un,n.open=wt,n.redraw=Pe,n.set=jt,n.setDate=Qt,n.toggle=Lu;function r(){n.utils={getDaysInMonth:function(P,B){return P===void 0&&(P=n.currentMonth),B===void 0&&(B=n.currentYear),P===1&&(B%4===0&&B%100!==0||B%400===0)?29:n.l10n.daysInMonth[P]}}}function i(){n.element=n.input=e,n.isOpen=!1,_t(),pe(),In(),Rs(),r(),n.isMobile||y(),w(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&h(n.config.noCalendar?n.latestSelectedDateObj:void 0),un(!1)),s();var P=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&P&&xe(),je("onReady")}function o(){var P;return((P=n.calendarContainer)===null||P===void 0?void 0:P.getRootNode()).activeElement||document.activeElement}function a(P){return P.bind(n)}function s(){var P=n.config;P.weekNumbers===!1&&P.showMonths===1||P.noCalendar!==!0&&window.requestAnimationFrame(function(){if(n.calendarContainer!==void 0&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),n.daysContainer!==void 0){var B=(n.days.offsetWidth+1)*P.showMonths;n.daysContainer.style.width=B+"px",n.calendarContainer.style.width=B+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}})}function l(P){if(n.selectedDates.length===0){var B=n.config.minDate===void 0||Kt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),K=Kc(n.config);B.setHours(K.hours,K.minutes,K.seconds,B.getMilliseconds()),n.selectedDates=[B],n.latestSelectedDateObj=B}P!==void 0&&P.type!=="blur"&&Ct(P);var J=n._input.value;f(),un(),n._input.value!==J&&n._debouncedChange()}function u(P,B){return P%12+12*rn(B===n.l10n.amPM[1])}function d(P){switch(P%24){case 0:case 12:return 12;default:return P%12}}function f(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var P=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,B=(parseInt(n.minuteElement.value,10)||0)%60,K=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(P=u(P,n.amPM.textContent));var J=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&Kt(n.latestSelectedDateObj,n.config.minDate,!0)===0,ie=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&Kt(n.latestSelectedDateObj,n.config.maxDate,!0)===0;if(n.config.maxTime!==void 0&&n.config.minTime!==void 0&&n.config.minTime>n.config.maxTime){var ce=Yc(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),Ce=Yc(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),ue=Yc(P,B,K);if(ue>Ce&&ue<ce){var we=kP(ce);P=we[0],B=we[1],K=we[2]}}else{if(ie){var fe=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;P=Math.min(P,fe.getHours()),P===fe.getHours()&&(B=Math.min(B,fe.getMinutes())),B===fe.getMinutes()&&(K=Math.min(K,fe.getSeconds()))}if(J){var me=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;P=Math.max(P,me.getHours()),P===me.getHours()&&B<me.getMinutes()&&(B=me.getMinutes()),B===me.getMinutes()&&(K=Math.max(K,me.getSeconds()))}}p(P,B,K)}}function h(P){var B=P||n.latestSelectedDateObj;B&&B instanceof Date&&p(B.getHours(),B.getMinutes(),B.getSeconds())}function p(P,B,K){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(P%24,B,K||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=zt(n.config.time_24hr?P:(12+P)%12+12*rn(P%12===0)),n.minuteElement.value=zt(B),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[rn(P>=12)]),n.secondElement!==void 0&&(n.secondElement.value=zt(K)))}function m(P){var B=Yt(P),K=parseInt(B.value)+(P.delta||0);(K/1e3>1||P.key==="Enter"&&!/[^\d]/.test(K.toString()))&&ae(K)}function g(P,B,K,J){if(B instanceof Array)return B.forEach(function(ie){return g(P,ie,K,J)});if(P instanceof Array)return P.forEach(function(ie){return g(ie,B,K,J)});P.addEventListener(B,K,J),n._handlers.push({remove:function(){return P.removeEventListener(B,K,J)}})}function b(){je("onChange")}function w(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(K){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+K+"]"),function(J){return g(J,"click",n[K])})}),n.isMobile){Ru();return}var P=cg(He,50);if(n._debouncedChange=cg(b,PP),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(n.daysContainer,"mouseover",function(K){n.config.mode==="range"&&Se(Yt(K))}),g(n._input,"keydown",he),n.calendarContainer!==void 0&&g(n.calendarContainer,"keydown",he),!n.config.inline&&!n.config.static&&g(window,"resize",P),window.ontouchstart!==void 0?g(window.document,"touchstart",se):g(window.document,"mousedown",se),g(window.document,"focus",se,{capture:!0}),n.config.clickOpens===!0&&(g(n._input,"focus",n.open),g(n._input,"click",n.open)),n.daysContainer!==void 0&&(g(n.monthNav,"click",Ms),g(n.monthNav,["keyup","increment"],m),g(n.daysContainer,"click",It)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var B=function(K){return Yt(K).select()};g(n.timeContainer,["increment"],l),g(n.timeContainer,"blur",l,{capture:!0}),g(n.timeContainer,"click",C),g([n.hourElement,n.minuteElement],["focus","click"],B),n.secondElement!==void 0&&g(n.secondElement,"focus",function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&g(n.amPM,"click",function(K){l(K)})}n.config.allowInput&&g(n._input,"blur",Z)}function S(P,B){var K=P!==void 0?n.parseDate(P):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),J=n.currentYear,ie=n.currentMonth;try{K!==void 0&&(n.currentYear=K.getFullYear(),n.currentMonth=K.getMonth())}catch(ce){ce.message="Invalid date supplied: "+K,n.config.errorHandler(ce)}B&&n.currentYear!==J&&(je("onYearChange"),N()),B&&(n.currentYear!==J||n.currentMonth!==ie)&&je("onMonthChange"),n.redraw()}function C(P){var B=Yt(P);~B.className.indexOf("arrow")&&I(P,B.classList.contains("arrowUp")?1:-1)}function I(P,B,K){var J=P&&Yt(P),ie=K||J&&J.parentNode&&J.parentNode.firstChild,ce=vi("increment");ce.delta=B,ie&&ie.dispatchEvent(ce)}function y(){var P=window.document.createDocumentFragment();if(n.calendarContainer=Le("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(P.appendChild($()),n.innerContainer=Le("div","flatpickr-innerContainer"),n.config.weekNumbers){var B=te(),K=B.weekWrapper,J=B.weekNumbers;n.innerContainer.appendChild(K),n.weekNumbers=J,n.weekWrapper=K}n.rContainer=Le("div","flatpickr-rContainer"),n.rContainer.appendChild(H()),n.daysContainer||(n.daysContainer=Le("div","flatpickr-days"),n.daysContainer.tabIndex=-1),T(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),P.appendChild(n.innerContainer)}n.config.enableTime&&P.appendChild(M()),Ot(n.calendarContainer,"rangeMode",n.config.mode==="range"),Ot(n.calendarContainer,"animate",n.config.animate===!0),Ot(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(P);var ie=n.config.appendTo!==void 0&&n.config.appendTo.nodeType!==void 0;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!ie&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==void 0&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var ce=Le("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(ce,n.element),ce.appendChild(n.element),n.altInput&&ce.appendChild(n.altInput),ce.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo!==void 0?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}function A(P,B,K,J){var ie=X(B,!0),ce=Le("span",P,B.getDate().toString());return ce.dateObj=B,ce.$i=J,ce.setAttribute("aria-label",n.formatDate(B,n.config.ariaDateFormat)),P.indexOf("hidden")===-1&&Kt(B,n.now)===0&&(n.todayDateElem=ce,ce.classList.add("today"),ce.setAttribute("aria-current","date")),ie?(ce.tabIndex=-1,Ao(B)&&(ce.classList.add("selected"),n.selectedDateElem=ce,n.config.mode==="range"&&(Ot(ce,"startRange",n.selectedDates[0]&&Kt(B,n.selectedDates[0],!0)===0),Ot(ce,"endRange",n.selectedDates[1]&&Kt(B,n.selectedDates[1],!0)===0),P==="nextMonthDay"&&ce.classList.add("inRange")))):ce.classList.add("flatpickr-disabled"),n.config.mode==="range"&&Ls(B)&&!Ao(B)&&ce.classList.add("inRange"),n.weekNumbers&&n.config.showMonths===1&&P!=="prevMonthDay"&&J%7===6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(B)+"</span>"),je("onDayCreate",ce),ce}function E(P){P.focus(),n.config.mode==="range"&&Se(P)}function k(P){for(var B=P>0?0:n.config.showMonths-1,K=P>0?n.config.showMonths:-1,J=B;J!=K;J+=P)for(var ie=n.daysContainer.children[J],ce=P>0?0:ie.children.length-1,Ce=P>0?ie.children.length:-1,ue=ce;ue!=Ce;ue+=P){var we=ie.children[ue];if(we.className.indexOf("hidden")===-1&&X(we.dateObj))return we}}function F(P,B){for(var K=P.className.indexOf("Month")===-1?P.dateObj.getMonth():n.currentMonth,J=B>0?n.config.showMonths:-1,ie=B>0?1:-1,ce=K-n.currentMonth;ce!=J;ce+=ie)for(var Ce=n.daysContainer.children[ce],ue=K-n.currentMonth===ce?P.$i+B:B<0?Ce.children.length-1:0,we=Ce.children.length,fe=ue;fe>=0&&fe<we&&fe!=(B>0?we:-1);fe+=ie){var me=Ce.children[fe];if(me.className.indexOf("hidden")===-1&&X(me.dateObj)&&Math.abs(P.$i-fe)>=Math.abs(B))return E(me)}n.changeMonth(ie),Y(k(ie),0)}function Y(P,B){var K=o(),J=le(K||document.body),ie=P!==void 0?P:J?K:n.selectedDateElem!==void 0&&le(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&le(n.todayDateElem)?n.todayDateElem:k(B>0?1:-1);ie===void 0?n._input.focus():J?F(ie,B):E(ie)}function O(P,B){for(var K=(new Date(P,B,1).getDay()-n.l10n.firstDayOfWeek+7)%7,J=n.utils.getDaysInMonth((B-1+12)%12,P),ie=n.utils.getDaysInMonth(B,P),ce=window.document.createDocumentFragment(),Ce=n.config.showMonths>1,ue=Ce?"prevMonthDay hidden":"prevMonthDay",we=Ce?"nextMonthDay hidden":"nextMonthDay",fe=J+1-K,me=0;fe<=J;fe++,me++)ce.appendChild(A("flatpickr-day "+ue,new Date(P,B-1,fe),fe,me));for(fe=1;fe<=ie;fe++,me++)ce.appendChild(A("flatpickr-day",new Date(P,B,fe),fe,me));for(var Oe=ie+1;Oe<=42-K&&(n.config.showMonths===1||me%7!==0);Oe++,me++)ce.appendChild(A("flatpickr-day "+we,new Date(P,B+1,Oe%ie),Oe,me));var Pt=Le("div","dayContainer");return Pt.appendChild(ce),Pt}function T(){if(n.daysContainer!==void 0){es(n.daysContainer),n.weekNumbers&&es(n.weekNumbers);for(var P=document.createDocumentFragment(),B=0;B<n.config.showMonths;B++){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+B),P.appendChild(O(K.getFullYear(),K.getMonth()))}n.daysContainer.appendChild(P),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&Se()}}function N(){if(!(n.config.showMonths>1||n.config.monthSelectorType!=="dropdown")){var P=function(J){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&J<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&J>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var B=0;B<12;B++)if(P(B)){var K=Le("option","flatpickr-monthDropdown-month");K.value=new Date(n.currentYear,B).getMonth().toString(),K.textContent=ns(B,n.config.shorthandCurrentMonth,n.l10n),K.tabIndex=-1,n.currentMonth===B&&(K.selected=!0),n.monthsDropdownContainer.appendChild(K)}}}function V(){var P=Le("div","flatpickr-month"),B=window.document.createDocumentFragment(),K;n.config.showMonths>1||n.config.monthSelectorType==="static"?K=Le("span","cur-month"):(n.monthsDropdownContainer=Le("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),g(n.monthsDropdownContainer,"change",function(Ce){var ue=Yt(Ce),we=parseInt(ue.value,10);n.changeMonth(we-n.currentMonth),je("onMonthChange")}),N(),K=n.monthsDropdownContainer);var J=ts("cur-year",{tabindex:"-1"}),ie=J.getElementsByTagName("input")[0];ie.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&ie.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(ie.setAttribute("max",n.config.maxDate.getFullYear().toString()),ie.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var ce=Le("div","flatpickr-current-month");return ce.appendChild(K),ce.appendChild(J),B.appendChild(ce),P.appendChild(B),{container:P,yearElement:ie,monthElement:K}}function j(){es(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var P=n.config.showMonths;P--;){var B=V();n.yearElements.push(B.yearElement),n.monthElements.push(B.monthElement),n.monthNav.appendChild(B.container)}n.monthNav.appendChild(n.nextMonthNav)}function $(){return n.monthNav=Le("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=Le("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=Le("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,j(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(P){n.__hidePrevMonthArrow!==P&&(Ot(n.prevMonthNav,"flatpickr-disabled",P),n.__hidePrevMonthArrow=P)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(P){n.__hideNextMonthArrow!==P&&(Ot(n.nextMonthNav,"flatpickr-disabled",P),n.__hideNextMonthArrow=P)}}),n.currentYearElement=n.yearElements[0],bi(),n.monthNav}function M(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var P=Kc(n.config);n.timeContainer=Le("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var B=Le("span","flatpickr-time-separator",":"),K=ts("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=K.getElementsByTagName("input")[0];var J=ts("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=J.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?P.hours:d(P.hours)),n.minuteElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():P.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(K),n.timeContainer.appendChild(B),n.timeContainer.appendChild(J),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var ie=ts("flatpickr-second");n.secondElement=ie.getElementsByTagName("input")[0],n.secondElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():P.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(Le("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(ie)}return n.config.time_24hr||(n.amPM=Le("span","flatpickr-am-pm",n.l10n.amPM[rn((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function H(){n.weekdayContainer?es(n.weekdayContainer):n.weekdayContainer=Le("div","flatpickr-weekdays");for(var P=n.config.showMonths;P--;){var B=Le("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(B)}return Q(),n.weekdayContainer}function Q(){if(n.weekdayContainer){var P=n.l10n.firstDayOfWeek,B=fg(n.l10n.weekdays.shorthand);P>0&&P<B.length&&(B=fg(B.splice(P,B.length),B.splice(0,P)));for(var K=n.config.showMonths;K--;)n.weekdayContainer.children[K].innerHTML=`
|
|
2453
|
+
`,gP=1,mP=3,vP=function(e){sy(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=G.createRef(),n.videoRef=G.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document!="undefined"?document:null,n.currentWindow=typeof window!="undefined"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver=="undefined"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=uP(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=i.crop,a=i.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}else if(n.props.initialCroppedAreaPixels){var s=fP(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=s.crop,a=s.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}},n.computeSizes=function(){var r,i,o,a,s,l,u=n.imageRef.current||n.videoRef.current;if(u&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var d=n.containerRect.width/n.containerRect.height,f=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,h=((o=n.imageRef.current)===null||o===void 0?void 0:o.naturalHeight)||((a=n.videoRef.current)===null||a===void 0?void 0:a.videoHeight)||0,p=u.offsetWidth<f||u.offsetHeight<h,m=f/h,g=void 0;if(p)switch(n.state.mediaObjectFit){default:case"contain":g=d>m?{width:n.containerRect.height*m,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/m};break;case"horizontal-cover":g={width:n.containerRect.width,height:n.containerRect.width/m};break;case"vertical-cover":g={width:n.containerRect.height*m,height:n.containerRect.height};break}else g={width:u.offsetWidth,height:u.offsetHeight};n.mediaSize=At(At({},g),{naturalWidth:f,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var b=n.props.cropSize?n.props.cropSize:oP(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((s=n.state.cropSize)===null||s===void 0?void 0:s.height)!==b.height||((l=n.state.cropSize)===null||l===void 0?void 0:l.width)!==b.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(b),n.setState({cropSize:b},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(b),b}},n.saveContainerPosition=function(){if(n.containerRef){var r=n.containerRef.getBoundingClientRect();n.containerPosition={x:r.left,y:r.top}}},n.onMouseDown=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(t.getMousePoint(r))},n.onScroll=function(r){n.currentDoc&&(r.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(r){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(t.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(t.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=t.getMousePoint(r),o=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var a=n.gestureRotationStart+r.rotation;n.props.onRotationChange(a)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,o,a=r.x,s=r.y;n.dragStartPosition={x:a,y:s},n.dragStartCrop=At({},n.props.crop),(o=(i=n.props).onInteractionStart)===null||o===void 0||o.call(i)},n.onDrag=function(r){var i=r.x,o=r.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(i===void 0||o===void 0)){var a=i-n.dragStartPosition.x,s=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+a,y:n.dragStartCrop.y+s},u=n.props.restrictPosition?Ja(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(u)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=t.getMousePoint(r),o=iP(r).pixelY,a=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(a,i,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var s,l;return(l=(s=n.props).onInteractionStart)===null||l===void 0?void 0:l.call(s)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var s,l;return(l=(s=n.props).onInteractionEnd)===null||l===void 0?void 0:l.call(s)})},250)}},n.getPointOnContainer=function(r,i){var o=r.x,a=r.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-i.x),y:n.containerRect.height/2-(a-i.y)}},n.getPointOnMedia=function(r){var i=r.x,o=r.y,a=n.props,s=a.crop,l=a.zoom;return{x:(i+s.x)/l,y:(o+s.y)/l}},n.setNewZoom=function(r,i,o){var a=o===void 0?{}:o,s=a.shouldUpdatePosition,l=s===void 0?!0:s;if(!(!n.state.cropSize||!n.props.onZoomChange)){var u=Xa(r,n.props.minZoom,n.props.maxZoom);if(l){var d=n.getPointOnContainer(i,n.containerPosition),f=n.getPointOnMedia(d),h={x:f.x*u-d.x,y:f.y*u-d.y},p=n.props.restrictPosition?Ja(h,n.mediaSize,n.state.cropSize,u,n.props.rotation):h;n.props.onCropChange(p)}n.props.onZoomChange(u)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?Ja(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return sP(r,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition)},n.emitCropData=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(i,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.emitCropAreaChange=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var r=n.props.restrictPosition?Ja(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(r),n.emitCropData()}},n}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver=="undefined"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=pP,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var n,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver=="undefined"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(n=this.resizeObserver)===null||n===void 0||n.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(n){var r,i,o,a,s,l,u,d,f;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.objectFit!==this.props.objectFit?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((o=n.cropSize)===null||o===void 0?void 0:o.width)!==((a=this.props.cropSize)===null||a===void 0?void 0:a.width)?this.computeSizes():(((s=n.crop)===null||s===void 0?void 0:s.x)!==((l=this.props.crop)===null||l===void 0?void 0:l.x)||((u=n.crop)===null||u===void 0?void 0:u.y)!==((d=this.props.crop)===null||d===void 0?void 0:d.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((f=this.videoRef.current)===null||f===void 0||f.load());var h=this.getObjectFit();h!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:h},this.computeSizes)},t.prototype.getAspect=function(){var n=this.props,r=n.cropSize,i=n.aspect;return r?r.width/r.height:i},t.prototype.getObjectFit=function(){var n,r,i,o;if(this.props.objectFit==="cover"){var a=this.imageRef.current||this.videoRef.current;if(a&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var s=this.containerRect.width/this.containerRect.height,l=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((o=this.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,d=l/u;return d<s?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(n){var r=t.getTouchPoint(n.touches[0]),i=t.getTouchPoint(n.touches[1]);this.lastPinchDistance=tg(r,i),this.lastPinchRotation=ng(r,i),this.onDragStart(rg(r,i))},t.prototype.onPinchMove=function(n){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var i=t.getTouchPoint(n.touches[0]),o=t.getTouchPoint(n.touches[1]),a=rg(i,o);this.onDrag(a),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var s=tg(i,o),l=r.props.zoom*(s/r.lastPinchDistance);r.setNewZoom(l,a,{shouldUpdatePosition:!1}),r.lastPinchDistance=s;var u=ng(i,o),d=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=u})}},t.prototype.render=function(){var n=this,r,i=this.props,o=i.image,a=i.video,s=i.mediaProps,l=i.transform,u=i.crop,d=u.x,f=u.y,h=i.rotation,p=i.zoom,m=i.cropShape,g=i.showGrid,b=i.style,w=b.containerStyle,S=b.cropAreaStyle,C=b.mediaStyle,I=i.classes,y=I.containerClassName,A=I.cropAreaClassName,E=I.mediaClassName,k=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return G.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(Y){return n.containerRef=Y},"data-testid":"container",style:w,className:Za("reactEasyCrop_Container",y)},o?G.createElement("img",At({alt:"",className:Za("reactEasyCrop_Image",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},s,{src:o,ref:this.imageRef,style:At(At({},C),{transform:l||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):a&&G.createElement("video",At({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:Za("reactEasyCrop_Video",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},s,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:At(At({},C),{transform:l||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(F){return G.createElement("source",At({key:F.src},F))})),this.state.cropSize&&G.createElement("div",{style:At(At({},S),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Za("reactEasyCrop_CropArea",m==="round"&&"reactEasyCrop_CropAreaRound",g&&"reactEasyCrop_CropAreaGrid",A)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:mP,minZoom:gP,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t}(G.Component);const bP=e=>new Promise((t,n)=>{const r=new Image;r.addEventListener("load",()=>t(r)),r.addEventListener("error",i=>n(i)),r.crossOrigin="Anonymous",r.src=e});function yP(e){return e*Math.PI/180}function xP(e,t,n=0){return _(this,null,function*(){const r=yield bP(e),i=document.createElement("canvas"),o=i.getContext("2d"),s=2*(Math.max(r.width,r.height)/2*Math.sqrt(2));i.width=s,i.height=s,o.translate(s/2,s/2),o.rotate(yP(n)),o.translate(-s/2,-s/2),o.drawImage(r,s/2-r.width*.5,s/2-r.height*.5);const l=o.getImageData(0,0,s,s);return i.width=t.width,i.height=t.height,o.putImageData(l,Math.round(0-s/2+r.width*.5-t.x),Math.round(0-s/2+r.height*.5-t.y)),new Promise(u=>i.toBlob(d=>{const f=new File([d],`cropped_image_${Date.now()}.jpeg`,{type:"image/jpeg"});u(f)},"image/jpeg"))})}const ig=({labels:e,open:t,imageSrc:n,resetDefaultImageUrl:r,toggleModal:i,uploadImage:o})=>{const[a,s]=x.useState({x:0,y:0}),[l,u]=x.useState(1),[d,f]=x.useState(16/9),[h,p]=x.useState(null),m=(C,I)=>{p(I)},g=(C,I)=>f(I),b=()=>_(this,null,function*(){const C=yield xP(n,h);S(),o(C)}),w=()=>{S(),r()},S=()=>{s({x:0,y:0}),u(1),f(16/9),p(null)};return c.jsx(v.Modal,{open:t,onClose:i,children:c.jsxs(v.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[c.jsx(v.ModalClose,{}),c.jsx(v.DialogTitle,{children:e.cropImage}),c.jsxs(v.DialogContent,{sx:{width:"100%"},children:[c.jsx(v.Box,{position:"relative",height:"100%",width:"100%",mb:2,children:c.jsx(vP,{image:n,crop:a,zoom:l,aspect:d,onCropChange:s,onCropComplete:m,onZoomChange:u})}),c.jsxs(v.FormControl,{sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{color:"primary",children:e.aspectRatio}),c.jsxs(v.Select,{value:d,onChange:g,children:[c.jsx(v.Option,{value:4/3,children:"4 / 3"}),c.jsx(v.Option,{value:16/9,children:"16 / 9"}),c.jsx(v.Option,{value:1,children:"1"})]})]}),c.jsx(v.Box,{mb:1,mx:2,children:c.jsx(v.Slider,{value:l,min:1,max:3,step:.1,onChange:(C,I)=>u(I)})}),c.jsxs(v.DialogActions,{children:[c.jsx(v.Button,{color:"primary",onClick:b,loading:!1,children:e.crop}),c.jsx(v.Button,{color:"primary",variant:"outlined",onClick:w,loading:!1,children:e.reset})]})]})]})})},og=Ve(c.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"CropOutlined"),ag=({labels:e,title:t,image:n,onChangeImages:r,clearImage:i})=>{const[o,a]=x.useState(!1),[s,l]=x.useState(!1),[u,d]=x.useState(!1),[f,h]=x.useState(!1),[p,m]=x.useState(""),[g,b]=x.useState("primary"),[w,S]=x.useState(""),C=x.useRef(null),I=()=>h(!f),y=()=>{C.current&&C.current.click()},A=new $p,E=x.useContext(ea),k=()=>{m(""),l(!1)},F=M=>{let H="",Q="primary";switch(M){case"copy_url":H=e.urlCopiedToClipboardMessage,Q="primary";break;case"image_deleted":H=e.imageDeletedMessage,Q="primary";break;case"image_reset":H=e.imageResetMessage,Q="primary";break;case"upload_success":H=e.uploadingImageMessage,Q="success";break;case"upload_failed":H=e.uploadingImageErrorMessage,Q="danger";break;case"sign_in_url_failed":H=e.generateSignedInUrlErrorMessage,Q="danger";break;case"encrypting_file_failed":H=e.encryptingImageErrorMessage,Q="danger";break}b(Q),m(H),l(!0)},Y=()=>d(!u),O=()=>{i(),F("image_deleted")},T=M=>{navigator.clipboard.writeText(M),F("copy_url")},N=M=>_(this,null,function*(){M.persist();const H=M.target.files?M.target.files[0]:null;if(H){a(!0);try{const Q=H.type.split("/")[1],te=yield A.readFileAndHash(H),R=(yield A.generateHashFileName(H))+"."+Q,L={image_type:Q,image_file_name:R,image_size:H.size,base64_sum:te},U=yield E==null?void 0:E.https.generateSignedInUrl(L);if(U!=null&&U.ok){const W=yield U.json(),re={"Content-Type":H.type,"Content-MD5":te};try{const se=new File([H],R,{type:H.type}),ae=yield E==null?void 0:E.https.storeInBucket(W.data.signed_url,se,re);r(ae||""),S(ae),F("upload_success")}catch(se){console.error("There was a problem with uploading the file: ",se),F("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield U==null?void 0:U.json()),F("sign_in_url_failed")}catch(Q){console.error("There was a problem with encrypting file...",Q),F("encrypting_file_failed")}a(!1)}}),V=M=>_(this,null,function*(){if(M){a(!0);try{const H=M.type.split("/")[1],Q=yield A.readFileAndHash(M),te=(yield A.generateHashFileName(M))+"."+H,R={image_type:H,image_file_name:te,image_size:M.size,base64_sum:Q},L=yield E==null?void 0:E.https.generateSignedInUrl(R);if(L!=null&&L.ok){const U=yield L.json(),W={"Content-Type":M.type,"Content-MD5":Q};try{const re=new File([M],te,{type:M.type}),se=yield E==null?void 0:E.https.storeInBucket(U.data.signed_url,re,W);r(se||""),F("upload_success")}catch(re){console.error("There was a problem with uploading the file: ",re),F("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield L==null?void 0:L.json()),F("sign_in_url_failed")}catch(H){console.error("There was a problem with encrypting file...",H),F("encrypting_file_failed")}a(!1)}}),j=()=>{r(w),F("image_reset")},$=M=>{r(M),S(M)};return c.jsxs(c.Fragment,{children:[c.jsxs(v.Card,{sx:{marginBottom:"10px"},children:[c.jsxs(v.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[c.jsx(v.Typography,{level:"title-lg",children:t}),c.jsx(v.Tooltip,{title:e.clearImage,children:c.jsx(v.IconButton,{"aria-label":e.clearImage,variant:"plain",color:"danger",size:"sm",onClick:O,children:c.jsx(Ap,{})})})]}),c.jsxs(v.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[c.jsxs(v.Skeleton,{loading:o,animation:"wave",children:[n?c.jsx(v.Box,{component:"img",src:n,loading:"lazy",alt:t,sx:{width:"100%",height:"100%",position:"relative",transition:"background-color 0.3s ease","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.3)"}}}):c.jsx(Pc,{sx:{fontSize:"3rem",opacity:.2}}),n?c.jsx(v.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",pointerEvents:"none",opacity:0,transition:"opacity 0.3s ease","&:hover":{opacity:1}},children:c.jsx(Fp,{sx:{fontSize:"3rem",color:"#fff"}})}):c.jsx(c.Fragment,{})]}),c.jsx(v.Tooltip,{title:e.copyUrl,children:c.jsx(ni,{onClick:()=>T(n),disabled:!n,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:c.jsx(De.ContentCopy,{})})}),c.jsx(v.Tooltip,{title:e.viewImage,children:c.jsx(ni,{onClick:Y,disabled:!n,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:c.jsx(jp,{})})}),c.jsx(v.Tooltip,{title:e.cropImage,children:c.jsx(ni,{onClick:I,disabled:!n,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:c.jsx(og,{})})})]}),c.jsx(v.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:c.jsxs(ni,{sx:{width:"100%"},onClick:y,children:[c.jsx(De.Upload,{})," ",e.uploadImage,c.jsx(Up,{type:"file",accept:"image/*",onChange:N,ref:C})]})}),E!=null&&E.https.sportal365Config?c.jsx(v.AccordionGroup,{variant:"soft",children:c.jsxs(v.Accordion,{children:[c.jsx(v.AccordionSummary,{children:c.jsx(v.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.sportal365Images})}),c.jsx(v.AccordionDetails,{children:c.jsx(zp,{labels:e,onChangeImages:$})})]})}):c.jsx(c.Fragment,{})]}),c.jsx(nt,{showToast:s,message:p,color:g,hideToast:k}),c.jsx(Np,{title:e.viewImage,open:u,imageSrc:n,toggleModal:Y}),c.jsx(ig,{labels:e,open:f,imageSrc:n,toggleModal:I,uploadImage:V,resetDefaultImageUrl:j})]})},CP=e=>new Map().set("main_logo",e.mainLogo).set("mobile_logo",e.mobileLogo).set("background_image",e.backgroundImage).set("mobile_background_image",e.mobileBackgroundImage).set("additional_image",e.additionalImage),wP=e=>new Map().set("primary_color",e.primaryColor).set("secondary_color",e.secondaryColor).set("content_color",e.contentColor).set("background_color",e.backgroundColor).set("border_color",e.borderColor).set("additional_color",e.additionalColor),IP=e=>new Map().set("primary_url",e.primaryUrl).set("secondary_url",e.secondaryUrl).set("privacy_policy_url",e.privacyPolicyUrl).set("terms_and_conditions_url",e.termsAndConditionsUrl).set("additional_url",e.additionalUrl),SP=({labels:e,defaultValue:t,onChange:n})=>{const[r,i]=x.useState(!1),o=JSON.parse(JSON.stringify(t)),a=["mobile_logo","background_image","mobile_background_image","additional_image"],s=CP(e),l=wP(e),u=IP(e),d=(m,g)=>{const b=m.target.value;o.colors[g]=b,n(o)},f=(m,g)=>{const b=m.target.value;o.urls[g]=b,n(o)},h=(m,g)=>{o.images[g]=m,n(o)},p=m=>{o.images[m]="",n(o)};return c.jsx(v.Box,{children:c.jsxs(Hh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[c.jsxs(Wh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${hc.root}`]:{'&[aria-selected="true"]':{bgcolor:"transparent",py:1,borderColor:"transparent","&::before":{content:'""',display:"block",position:"absolute",height:2,bottom:-2,left:0,right:0},"&::after":{bgcolor:"primary.500"}}}},tabFlex:"auto",children:[c.jsxs(Wr,{children:[c.jsx(v.ListItemDecorator,{children:c.jsx(Pc,{sx:{width:"20px"}})}),e.images]}),c.jsxs(Wr,{children:[c.jsx(v.ListItemDecorator,{children:c.jsx(Qk,{sx:{width:"20px"}})}),e.colors]}),c.jsxs(Wr,{children:[c.jsx(v.ListItemDecorator,{children:c.jsx(qk,{sx:{width:"20px"}})}),e.urls]})]}),c.jsxs(ei,{value:0,sx:{px:0},children:[c.jsx(ag,{labels:e,title:e.mainLogo,image:o.images.main_logo,onChangeImages:m=>h(m,"main_logo"),clearImage:()=>p("main_logo")}),c.jsx(v.Link,{underline:"hover",onClick:()=>i(!r),sx:{marginBottom:"10px"},children:r?e.hideMoreImages:e.showMoreImages}),r?c.jsx(c.Fragment,{children:a.map(m=>c.jsx(ag,{labels:e,title:s.get(m),image:o.images[m],onChangeImages:g=>h(g,m),clearImage:()=>p(m)},`branding-image-${m}`))}):c.jsx(c.Fragment,{})]}),c.jsx(ei,{value:1,sx:{px:0},children:c.jsx(v.Box,{children:Object.keys(o.colors).map(m=>c.jsx(v.Box,{mb:2,children:c.jsx(rn,{size:"sm",label:l.get(m),placeholder:"",defaultValue:o.colors[m],required:!1,onChange:g=>d(g,m)})},`branding-color-${m}`))})}),c.jsx(ei,{value:2,sx:{px:0},children:c.jsx(v.Box,{children:Object.keys(o.urls).map(m=>c.jsx(v.Box,{mb:2,children:c.jsx(rn,{size:"sm",label:u.get(m),placeholder:"",defaultValue:o.urls[m],required:!1,onChange:g=>f(g,m)})},`branding-url-${m}`))})})]})})},Uc=Ve(c.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.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"}),"AddCircleOutlineOutlined"),sg=e=>{const t=()=>_(this,null,function*(){yield Vi(e.environment).signOut()});return c.jsx(v.Button,{variant:"outlined",color:"danger",onClick:t,children:e.signOutLabel})},AP=({createLabel:e,createFromTemplateLabel:t,signOutLabel:n,environment:r,onClickCreate:i,onClickCreateFromTemplate:o})=>c.jsx(c.Fragment,{children:c.jsxs(v.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",p:1,sx:()=>({marginBottom:"16px"}),children:[t?c.jsxs(v.Stack,{direction:"row",alignItems:"center",spacing:2,children:[c.jsx(v.Button,{startDecorator:c.jsx(Uc,{}),variant:"solid",color:"primary",onClick:i,children:e}),c.jsx(v.Button,{startDecorator:c.jsx(Uc,{}),variant:"outlined",color:"primary",onClick:o,children:t})]}):c.jsx(v.Button,{startDecorator:c.jsx(Uc,{}),variant:"solid",color:"primary",onClick:i,children:e}),n?c.jsx(sg,{signOutLabel:n,environment:r}):c.jsx(c.Fragment,{})]})});var lg={},Vc=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ii={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return typeof console!="undefined"&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},io={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},zt=function(e,t){return t===void 0&&(t=2),("000"+e).slice(t*-1)},on=function(e){return e===!0?1:0};function cg(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var Hc=function(e){return e instanceof Array?e:[e]};function Ot(e,t,n){if(n===!0)return e.classList.add(t);e.classList.remove(t)}function Le(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,n!==void 0&&(r.textContent=n),r}function es(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ug(e,t){if(t(e))return e;if(e.parentNode)return ug(e.parentNode,t)}function ts(e,t){var n=Le("div","numInputWrapper"),r=Le("input","numInput "+e),i=Le("span","arrowUp"),o=Le("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(i),n.appendChild(o),n}function Yt(e){try{if(typeof e.composedPath=="function"){var t=e.composedPath();return t[0]}return e.target}catch(n){return e.target}}var Wc=function(){},ns=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},TP={D:Wc,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*on(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(parseFloat(t)*1e3)},W:function(e,t,n){var r=parseInt(t),i=new Date(e.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:Wc,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:Wc,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},Sr={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},oo={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[oo.w(e,t,n)]},F:function(e,t,n){return ns(oo.n(e,t,n)-1,!1,t)},G:function(e,t,n){return zt(oo.h(e,t,n))},H:function(e){return zt(e.getHours())},J:function(e,t){return t.ordinal!==void 0?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[on(e.getHours()>11)]},M:function(e,t){return ns(e.getMonth(),!0,t)},S:function(e){return zt(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return zt(e.getFullYear(),4)},d:function(e){return zt(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return zt(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return zt(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},dg=function(e){var t=e.config,n=t===void 0?ii:t,r=e.l10n,i=r===void 0?io:r,o=e.isMobile,a=o===void 0?!1:o;return function(s,l,u){var d=u||i;return n.formatDate!==void 0&&!a?n.formatDate(s,l,d):l.split("").map(function(f,h,p){return oo[f]&&p[h-1]!=="\\"?oo[f](s,d,n):f!=="\\"?f:""}).join("")}},Gc=function(e){var t=e.config,n=t===void 0?ii:t,r=e.l10n,i=r===void 0?io:r;return function(o,a,s,l){if(!(o!==0&&!o)){var u=l||i,d,f=o;if(o instanceof Date)d=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)d=new Date(o);else if(typeof o=="string"){var h=a||(n||ii).dateFormat,p=String(o).trim();if(p==="today")d=new Date,s=!0;else if(n&&n.parseDate)d=n.parseDate(o,h);else if(/Z$/.test(p)||/GMT$/.test(p))d=new Date(o);else{for(var m=void 0,g=[],b=0,w=0,S="";b<h.length;b++){var C=h[b],I=C==="\\",y=h[b-1]==="\\"||I;if(Sr[C]&&!y){S+=Sr[C];var A=new RegExp(S).exec(o);A&&(m=!0)&&g[C!=="Y"?"push":"unshift"]({fn:TP[C],val:A[++w]})}else I||(S+=".")}d=!n||!n.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),g.forEach(function(E){var k=E.fn,F=E.val;return d=k(d,F,u)||d}),d=m?d:void 0}}if(!(d instanceof Date&&!isNaN(d.getTime()))){n.errorHandler(new Error("Invalid date provided: "+f));return}return s===!0&&d.setHours(0,0,0,0),d}}};function Kt(e,t,n){return n===void 0&&(n=!0),n!==!1?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var EP=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},Yc=function(e,t,n){return e*3600+t*60+n},kP=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},_P={DAY:864e5};function Kc(e){var t=e.defaultHour,n=e.defaultMinute,r=e.defaultSeconds;if(e.minDate!==void 0){var i=e.minDate.getHours(),o=e.minDate.getMinutes(),a=e.minDate.getSeconds();t<i&&(t=i),t===i&&n<o&&(n=o),t===i&&n===o&&r<a&&(r=e.minDate.getSeconds())}if(e.maxDate!==void 0){var s=e.maxDate.getHours(),l=e.maxDate.getMinutes();t=Math.min(t,s),t===s&&(n=Math.min(l,n)),t===s&&n===l&&(r=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var r=function(s){s&&Object.keys(s).forEach(function(l){return e[l]=s[l]})},i=0,o=t;i<o.length;i++){var a=o[i];r(a)}return e});var Et=function(){return Et=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Et.apply(this,arguments)},fg=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},PP=300;function DP(e,t){var n={config:Et(Et({},ii),ht.defaultConfig),l10n:io};n.parseDate=Gc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=g,n._setHoursFromDate=h,n._positionCalendar=xe,n.changeMonth=R,n.changeYear=ae,n.clear=L,n.close=U,n.onMouseOver=Se,n._createElement=Le,n.createDay=A,n.destroy=W,n.isEnabled=X,n.jumpToDate=S,n.updateValue=dn,n.open=wt,n.redraw=Pe,n.set=jt,n.setDate=Qt,n.toggle=Lu;function r(){n.utils={getDaysInMonth:function(P,B){return P===void 0&&(P=n.currentMonth),B===void 0&&(B=n.currentYear),P===1&&(B%4===0&&B%100!==0||B%400===0)?29:n.l10n.daysInMonth[P]}}}function i(){n.element=n.input=e,n.isOpen=!1,_t(),pe(),In(),Rs(),r(),n.isMobile||y(),w(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&h(n.config.noCalendar?n.latestSelectedDateObj:void 0),dn(!1)),s();var P=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&P&&xe(),je("onReady")}function o(){var P;return((P=n.calendarContainer)===null||P===void 0?void 0:P.getRootNode()).activeElement||document.activeElement}function a(P){return P.bind(n)}function s(){var P=n.config;P.weekNumbers===!1&&P.showMonths===1||P.noCalendar!==!0&&window.requestAnimationFrame(function(){if(n.calendarContainer!==void 0&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),n.daysContainer!==void 0){var B=(n.days.offsetWidth+1)*P.showMonths;n.daysContainer.style.width=B+"px",n.calendarContainer.style.width=B+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}})}function l(P){if(n.selectedDates.length===0){var B=n.config.minDate===void 0||Kt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),K=Kc(n.config);B.setHours(K.hours,K.minutes,K.seconds,B.getMilliseconds()),n.selectedDates=[B],n.latestSelectedDateObj=B}P!==void 0&&P.type!=="blur"&&Ct(P);var J=n._input.value;f(),dn(),n._input.value!==J&&n._debouncedChange()}function u(P,B){return P%12+12*on(B===n.l10n.amPM[1])}function d(P){switch(P%24){case 0:case 12:return 12;default:return P%12}}function f(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var P=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,B=(parseInt(n.minuteElement.value,10)||0)%60,K=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(P=u(P,n.amPM.textContent));var J=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&Kt(n.latestSelectedDateObj,n.config.minDate,!0)===0,ie=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&Kt(n.latestSelectedDateObj,n.config.maxDate,!0)===0;if(n.config.maxTime!==void 0&&n.config.minTime!==void 0&&n.config.minTime>n.config.maxTime){var ce=Yc(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),Ce=Yc(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),ue=Yc(P,B,K);if(ue>Ce&&ue<ce){var we=kP(ce);P=we[0],B=we[1],K=we[2]}}else{if(ie){var fe=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;P=Math.min(P,fe.getHours()),P===fe.getHours()&&(B=Math.min(B,fe.getMinutes())),B===fe.getMinutes()&&(K=Math.min(K,fe.getSeconds()))}if(J){var me=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;P=Math.max(P,me.getHours()),P===me.getHours()&&B<me.getMinutes()&&(B=me.getMinutes()),B===me.getMinutes()&&(K=Math.max(K,me.getSeconds()))}}p(P,B,K)}}function h(P){var B=P||n.latestSelectedDateObj;B&&B instanceof Date&&p(B.getHours(),B.getMinutes(),B.getSeconds())}function p(P,B,K){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(P%24,B,K||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=zt(n.config.time_24hr?P:(12+P)%12+12*on(P%12===0)),n.minuteElement.value=zt(B),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[on(P>=12)]),n.secondElement!==void 0&&(n.secondElement.value=zt(K)))}function m(P){var B=Yt(P),K=parseInt(B.value)+(P.delta||0);(K/1e3>1||P.key==="Enter"&&!/[^\d]/.test(K.toString()))&&ae(K)}function g(P,B,K,J){if(B instanceof Array)return B.forEach(function(ie){return g(P,ie,K,J)});if(P instanceof Array)return P.forEach(function(ie){return g(ie,B,K,J)});P.addEventListener(B,K,J),n._handlers.push({remove:function(){return P.removeEventListener(B,K,J)}})}function b(){je("onChange")}function w(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(K){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+K+"]"),function(J){return g(J,"click",n[K])})}),n.isMobile){Ru();return}var P=cg(He,50);if(n._debouncedChange=cg(b,PP),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(n.daysContainer,"mouseover",function(K){n.config.mode==="range"&&Se(Yt(K))}),g(n._input,"keydown",he),n.calendarContainer!==void 0&&g(n.calendarContainer,"keydown",he),!n.config.inline&&!n.config.static&&g(window,"resize",P),window.ontouchstart!==void 0?g(window.document,"touchstart",se):g(window.document,"mousedown",se),g(window.document,"focus",se,{capture:!0}),n.config.clickOpens===!0&&(g(n._input,"focus",n.open),g(n._input,"click",n.open)),n.daysContainer!==void 0&&(g(n.monthNav,"click",Ms),g(n.monthNav,["keyup","increment"],m),g(n.daysContainer,"click",It)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var B=function(K){return Yt(K).select()};g(n.timeContainer,["increment"],l),g(n.timeContainer,"blur",l,{capture:!0}),g(n.timeContainer,"click",C),g([n.hourElement,n.minuteElement],["focus","click"],B),n.secondElement!==void 0&&g(n.secondElement,"focus",function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&g(n.amPM,"click",function(K){l(K)})}n.config.allowInput&&g(n._input,"blur",Z)}function S(P,B){var K=P!==void 0?n.parseDate(P):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),J=n.currentYear,ie=n.currentMonth;try{K!==void 0&&(n.currentYear=K.getFullYear(),n.currentMonth=K.getMonth())}catch(ce){ce.message="Invalid date supplied: "+K,n.config.errorHandler(ce)}B&&n.currentYear!==J&&(je("onYearChange"),N()),B&&(n.currentYear!==J||n.currentMonth!==ie)&&je("onMonthChange"),n.redraw()}function C(P){var B=Yt(P);~B.className.indexOf("arrow")&&I(P,B.classList.contains("arrowUp")?1:-1)}function I(P,B,K){var J=P&&Yt(P),ie=K||J&&J.parentNode&&J.parentNode.firstChild,ce=vi("increment");ce.delta=B,ie&&ie.dispatchEvent(ce)}function y(){var P=window.document.createDocumentFragment();if(n.calendarContainer=Le("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(P.appendChild($()),n.innerContainer=Le("div","flatpickr-innerContainer"),n.config.weekNumbers){var B=te(),K=B.weekWrapper,J=B.weekNumbers;n.innerContainer.appendChild(K),n.weekNumbers=J,n.weekWrapper=K}n.rContainer=Le("div","flatpickr-rContainer"),n.rContainer.appendChild(H()),n.daysContainer||(n.daysContainer=Le("div","flatpickr-days"),n.daysContainer.tabIndex=-1),T(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),P.appendChild(n.innerContainer)}n.config.enableTime&&P.appendChild(M()),Ot(n.calendarContainer,"rangeMode",n.config.mode==="range"),Ot(n.calendarContainer,"animate",n.config.animate===!0),Ot(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(P);var ie=n.config.appendTo!==void 0&&n.config.appendTo.nodeType!==void 0;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!ie&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==void 0&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var ce=Le("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(ce,n.element),ce.appendChild(n.element),n.altInput&&ce.appendChild(n.altInput),ce.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo!==void 0?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}function A(P,B,K,J){var ie=X(B,!0),ce=Le("span",P,B.getDate().toString());return ce.dateObj=B,ce.$i=J,ce.setAttribute("aria-label",n.formatDate(B,n.config.ariaDateFormat)),P.indexOf("hidden")===-1&&Kt(B,n.now)===0&&(n.todayDateElem=ce,ce.classList.add("today"),ce.setAttribute("aria-current","date")),ie?(ce.tabIndex=-1,Ao(B)&&(ce.classList.add("selected"),n.selectedDateElem=ce,n.config.mode==="range"&&(Ot(ce,"startRange",n.selectedDates[0]&&Kt(B,n.selectedDates[0],!0)===0),Ot(ce,"endRange",n.selectedDates[1]&&Kt(B,n.selectedDates[1],!0)===0),P==="nextMonthDay"&&ce.classList.add("inRange")))):ce.classList.add("flatpickr-disabled"),n.config.mode==="range"&&Ls(B)&&!Ao(B)&&ce.classList.add("inRange"),n.weekNumbers&&n.config.showMonths===1&&P!=="prevMonthDay"&&J%7===6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(B)+"</span>"),je("onDayCreate",ce),ce}function E(P){P.focus(),n.config.mode==="range"&&Se(P)}function k(P){for(var B=P>0?0:n.config.showMonths-1,K=P>0?n.config.showMonths:-1,J=B;J!=K;J+=P)for(var ie=n.daysContainer.children[J],ce=P>0?0:ie.children.length-1,Ce=P>0?ie.children.length:-1,ue=ce;ue!=Ce;ue+=P){var we=ie.children[ue];if(we.className.indexOf("hidden")===-1&&X(we.dateObj))return we}}function F(P,B){for(var K=P.className.indexOf("Month")===-1?P.dateObj.getMonth():n.currentMonth,J=B>0?n.config.showMonths:-1,ie=B>0?1:-1,ce=K-n.currentMonth;ce!=J;ce+=ie)for(var Ce=n.daysContainer.children[ce],ue=K-n.currentMonth===ce?P.$i+B:B<0?Ce.children.length-1:0,we=Ce.children.length,fe=ue;fe>=0&&fe<we&&fe!=(B>0?we:-1);fe+=ie){var me=Ce.children[fe];if(me.className.indexOf("hidden")===-1&&X(me.dateObj)&&Math.abs(P.$i-fe)>=Math.abs(B))return E(me)}n.changeMonth(ie),Y(k(ie),0)}function Y(P,B){var K=o(),J=le(K||document.body),ie=P!==void 0?P:J?K:n.selectedDateElem!==void 0&&le(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&le(n.todayDateElem)?n.todayDateElem:k(B>0?1:-1);ie===void 0?n._input.focus():J?F(ie,B):E(ie)}function O(P,B){for(var K=(new Date(P,B,1).getDay()-n.l10n.firstDayOfWeek+7)%7,J=n.utils.getDaysInMonth((B-1+12)%12,P),ie=n.utils.getDaysInMonth(B,P),ce=window.document.createDocumentFragment(),Ce=n.config.showMonths>1,ue=Ce?"prevMonthDay hidden":"prevMonthDay",we=Ce?"nextMonthDay hidden":"nextMonthDay",fe=J+1-K,me=0;fe<=J;fe++,me++)ce.appendChild(A("flatpickr-day "+ue,new Date(P,B-1,fe),fe,me));for(fe=1;fe<=ie;fe++,me++)ce.appendChild(A("flatpickr-day",new Date(P,B,fe),fe,me));for(var Oe=ie+1;Oe<=42-K&&(n.config.showMonths===1||me%7!==0);Oe++,me++)ce.appendChild(A("flatpickr-day "+we,new Date(P,B+1,Oe%ie),Oe,me));var Pt=Le("div","dayContainer");return Pt.appendChild(ce),Pt}function T(){if(n.daysContainer!==void 0){es(n.daysContainer),n.weekNumbers&&es(n.weekNumbers);for(var P=document.createDocumentFragment(),B=0;B<n.config.showMonths;B++){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+B),P.appendChild(O(K.getFullYear(),K.getMonth()))}n.daysContainer.appendChild(P),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&Se()}}function N(){if(!(n.config.showMonths>1||n.config.monthSelectorType!=="dropdown")){var P=function(J){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&J<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&J>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var B=0;B<12;B++)if(P(B)){var K=Le("option","flatpickr-monthDropdown-month");K.value=new Date(n.currentYear,B).getMonth().toString(),K.textContent=ns(B,n.config.shorthandCurrentMonth,n.l10n),K.tabIndex=-1,n.currentMonth===B&&(K.selected=!0),n.monthsDropdownContainer.appendChild(K)}}}function V(){var P=Le("div","flatpickr-month"),B=window.document.createDocumentFragment(),K;n.config.showMonths>1||n.config.monthSelectorType==="static"?K=Le("span","cur-month"):(n.monthsDropdownContainer=Le("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),g(n.monthsDropdownContainer,"change",function(Ce){var ue=Yt(Ce),we=parseInt(ue.value,10);n.changeMonth(we-n.currentMonth),je("onMonthChange")}),N(),K=n.monthsDropdownContainer);var J=ts("cur-year",{tabindex:"-1"}),ie=J.getElementsByTagName("input")[0];ie.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&ie.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(ie.setAttribute("max",n.config.maxDate.getFullYear().toString()),ie.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var ce=Le("div","flatpickr-current-month");return ce.appendChild(K),ce.appendChild(J),B.appendChild(ce),P.appendChild(B),{container:P,yearElement:ie,monthElement:K}}function j(){es(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var P=n.config.showMonths;P--;){var B=V();n.yearElements.push(B.yearElement),n.monthElements.push(B.monthElement),n.monthNav.appendChild(B.container)}n.monthNav.appendChild(n.nextMonthNav)}function $(){return n.monthNav=Le("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=Le("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=Le("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,j(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(P){n.__hidePrevMonthArrow!==P&&(Ot(n.prevMonthNav,"flatpickr-disabled",P),n.__hidePrevMonthArrow=P)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(P){n.__hideNextMonthArrow!==P&&(Ot(n.nextMonthNav,"flatpickr-disabled",P),n.__hideNextMonthArrow=P)}}),n.currentYearElement=n.yearElements[0],bi(),n.monthNav}function M(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var P=Kc(n.config);n.timeContainer=Le("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var B=Le("span","flatpickr-time-separator",":"),K=ts("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=K.getElementsByTagName("input")[0];var J=ts("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=J.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?P.hours:d(P.hours)),n.minuteElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():P.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(K),n.timeContainer.appendChild(B),n.timeContainer.appendChild(J),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var ie=ts("flatpickr-second");n.secondElement=ie.getElementsByTagName("input")[0],n.secondElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():P.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(Le("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(ie)}return n.config.time_24hr||(n.amPM=Le("span","flatpickr-am-pm",n.l10n.amPM[on((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function H(){n.weekdayContainer?es(n.weekdayContainer):n.weekdayContainer=Le("div","flatpickr-weekdays");for(var P=n.config.showMonths;P--;){var B=Le("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(B)}return Q(),n.weekdayContainer}function Q(){if(n.weekdayContainer){var P=n.l10n.firstDayOfWeek,B=fg(n.l10n.weekdays.shorthand);P>0&&P<B.length&&(B=fg(B.splice(P,B.length),B.splice(0,P)));for(var K=n.config.showMonths;K--;)n.weekdayContainer.children[K].innerHTML=`
|
|
2454
2454
|
<span class='flatpickr-weekday'>
|
|
2455
2455
|
`+B.join("</span><span class='flatpickr-weekday'>")+`
|
|
2456
2456
|
</span>
|
|
2457
|
-
`}}function te(){n.calendarContainer.classList.add("hasWeeks");var P=Le("div","flatpickr-weekwrapper");P.appendChild(Le("span","flatpickr-weekday",n.l10n.weekAbbreviation));var B=Le("div","flatpickr-weeks");return P.appendChild(B),{weekWrapper:P,weekNumbers:B}}function R(P,B){B===void 0&&(B=!0);var K=B?P:P-n.currentMonth;K<0&&n._hidePrevMonthArrow===!0||K>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=K,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,je("onYearChange"),N()),T(),je("onMonthChange"),bi())}function L(P,B){if(P===void 0&&(P=!0),B===void 0&&(B=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,B===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var K=Kc(n.config),J=K.hours,ie=K.minutes,ce=K.seconds;p(J,ie,ce)}n.redraw(),P&&je("onChange")}function U(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),je("onClose")}function W(){n.config!==void 0&&je("onDestroy");for(var P=n._handlers.length;P--;)n._handlers[P].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var B=n.calendarContainer.parentNode;if(B.lastChild&&B.removeChild(B.lastChild),B.parentNode){for(;B.firstChild;)B.parentNode.insertBefore(B.firstChild,B);B.parentNode.removeChild(B)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(K){try{delete n[K]}catch(J){}})}function re(P){return n.calendarContainer.contains(P)}function se(P){if(n.isOpen&&!n.config.inline){var B=Yt(P),K=re(B),J=B===n.input||B===n.altInput||n.element.contains(B)||P.path&&P.path.indexOf&&(~P.path.indexOf(n.input)||~P.path.indexOf(n.altInput)),ie=!J&&!K&&!re(P.relatedTarget),ce=!n.config.ignoredFocusElements.some(function(Ce){return Ce.contains(B)});ie&&ce&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==""&&n.input.value!==void 0&&l(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function ae(P){if(!(!P||n.config.minDate&&P<n.config.minDate.getFullYear()||n.config.maxDate&&P>n.config.maxDate.getFullYear())){var B=P,K=n.currentYear!==B;n.currentYear=B||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),K&&(n.redraw(),je("onYearChange"),N())}}function X(P,B){var K;B===void 0&&(B=!0);var J=n.parseDate(P,void 0,B);if(n.config.minDate&&J&&Kt(J,n.config.minDate,B!==void 0?B:!n.minDateHasTime)<0||n.config.maxDate&&J&&Kt(J,n.config.maxDate,B!==void 0?B:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(J===void 0)return!1;for(var ie=!!n.config.enable,ce=(K=n.config.enable)!==null&&K!==void 0?K:n.config.disable,Ce=0,ue=void 0;Ce<ce.length;Ce++){if(ue=ce[Ce],typeof ue=="function"&&ue(J))return ie;if(ue instanceof Date&&J!==void 0&&ue.getTime()===J.getTime())return ie;if(typeof ue=="string"){var we=n.parseDate(ue,void 0,!0);return we&&we.getTime()===J.getTime()?ie:!ie}else if(typeof ue=="object"&&J!==void 0&&ue.from&&ue.to&&J.getTime()>=ue.from.getTime()&&J.getTime()<=ue.to.getTime())return ie}return!ie}function le(P){return n.daysContainer!==void 0?P.className.indexOf("hidden")===-1&&P.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(P):!1}function Z(P){var B=P.target===n._input,K=n._input.value.trimEnd()!==To();B&&K&&!(P.relatedTarget&&re(P.relatedTarget))&&n.setDate(n._input.value,!0,P.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function he(P){var B=Yt(P),K=n.config.wrap?e.contains(B):B===n._input,J=n.config.allowInput,ie=n.isOpen&&(!J||!K),ce=n.config.inline&&K&&!J;if(P.keyCode===13&&K){if(J)return n.setDate(n._input.value,!0,B===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),B.blur();n.open()}else if(re(B)||ie||ce){var Ce=!!n.timeContainer&&n.timeContainer.contains(B);switch(P.keyCode){case 13:Ce?(P.preventDefault(),l(),Ee()):It(P);break;case 27:P.preventDefault(),Ee();break;case 8:case 46:K&&!n.config.allowInput&&(P.preventDefault(),n.clear());break;case 37:case 39:if(!Ce&&!K){P.preventDefault();var ue=o();if(n.daysContainer!==void 0&&(J===!1||ue&&le(ue))){var we=P.keyCode===39?1:-1;P.ctrlKey?(P.stopPropagation(),R(we),Y(k(1),0)):Y(void 0,we)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:P.preventDefault();var fe=P.keyCode===40?1:-1;n.daysContainer&&B.$i!==void 0||B===n.input||B===n.altInput?P.ctrlKey?(P.stopPropagation(),ae(n.currentYear-fe),Y(k(1),0)):Ce||Y(void 0,fe*7):B===n.currentYearElement?ae(n.currentYear-fe):n.config.enableTime&&(!Ce&&n.hourElement&&n.hourElement.focus(),l(P),n._debouncedChange());break;case 9:if(Ce){var me=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(it){return it}),Oe=me.indexOf(B);if(Oe!==-1){var Pt=me[Oe+(P.shiftKey?-1:1)];P.preventDefault(),(Pt||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(B)&&P.shiftKey&&(P.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&B===n.amPM)switch(P.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],f(),un();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],f(),un();break}(K||re(B))&&je("onKeyDown",P)}function Se(P,B){if(B===void 0&&(B="flatpickr-day"),!(n.selectedDates.length!==1||P&&(!P.classList.contains(B)||P.classList.contains("flatpickr-disabled")))){for(var K=P?P.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),J=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),ie=Math.min(K,n.selectedDates[0].getTime()),ce=Math.max(K,n.selectedDates[0].getTime()),Ce=!1,ue=0,we=0,fe=ie;fe<ce;fe+=_P.DAY)X(new Date(fe),!0)||(Ce=Ce||fe>ie&&fe<ce,fe<J&&(!ue||fe>ue)?ue=fe:fe>J&&(!we||fe<we)&&(we=fe));var me=Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+B));me.forEach(function(Oe){var Pt=Oe.dateObj,it=Pt.getTime(),dn=ue>0&&it<ue||we>0&&it>we;if(dn){Oe.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Sn){Oe.classList.remove(Sn)});return}else if(Ce&&!dn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Sn){Oe.classList.remove(Sn)}),P!==void 0&&(P.classList.add(K<=n.selectedDates[0].getTime()?"startRange":"endRange"),J<K&&it===J?Oe.classList.add("startRange"):J>K&&it===J&&Oe.classList.add("endRange"),it>=ue&&(we===0||it<=we)&&EP(it,J,K)&&Oe.classList.add("inRange"))})}}function He(){n.isOpen&&!n.config.static&&!n.config.inline&&xe()}function wt(P,B){if(B===void 0&&(B=n._positionElement),n.isMobile===!0){if(P){P.preventDefault();var K=Yt(P);K&&K.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),je("onOpen");return}else if(n._input.disabled||n.config.inline)return;var J=n.isOpen;n.isOpen=!0,J||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),je("onOpen"),xe(B)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(P===void 0||!n.timeContainer.contains(P.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}function ct(P){return function(B){var K=n.config["_"+P+"Date"]=n.parseDate(B,n.config.dateFormat),J=n.config["_"+(P==="min"?"max":"min")+"Date"];K!==void 0&&(n[P==="min"?"minDateHasTime":"maxDateHasTime"]=K.getHours()>0||K.getMinutes()>0||K.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(ie){return X(ie)}),!n.selectedDates.length&&P==="min"&&h(K),un()),n.daysContainer&&(Pe(),K!==void 0?n.currentYearElement[P]=K.getFullYear().toString():n.currentYearElement.removeAttribute(P),n.currentYearElement.disabled=!!J&&K!==void 0&&J.getFullYear()===K.getFullYear())}}function _t(){var P=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],B=Et(Et({},JSON.parse(JSON.stringify(e.dataset||{}))),t),K={};n.config.parseDate=B.parseDate,n.config.formatDate=B.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(me){n.config._enable=lr(me)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(me){n.config._disable=lr(me)}});var J=B.mode==="time";if(!B.dateFormat&&(B.enableTime||J)){var ie=ht.defaultConfig.dateFormat||ii.dateFormat;K.dateFormat=B.noCalendar||J?"H:i"+(B.enableSeconds?":S":""):ie+" H:i"+(B.enableSeconds?":S":"")}if(B.altInput&&(B.enableTime||J)&&!B.altFormat){var ce=ht.defaultConfig.altFormat||ii.altFormat;K.altFormat=B.noCalendar||J?"h:i"+(B.enableSeconds?":S K":" K"):ce+(" h:i"+(B.enableSeconds?":S":"")+" K")}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:ct("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:ct("max")});var Ce=function(me){return function(Oe){n.config[me==="min"?"_minTime":"_maxTime"]=n.parseDate(Oe,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:Ce("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:Ce("max")}),B.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,K,B);for(var ue=0;ue<P.length;ue++)n.config[P[ue]]=n.config[P[ue]]===!0||n.config[P[ue]]==="true";Vc.filter(function(me){return n.config[me]!==void 0}).forEach(function(me){n.config[me]=Hc(n.config[me]||[]).map(a)}),n.isMobile=!n.config.disableMobile&&!n.config.inline&&n.config.mode==="single"&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var ue=0;ue<n.config.plugins.length;ue++){var we=n.config.plugins[ue](n)||{};for(var fe in we)Vc.indexOf(fe)>-1?n.config[fe]=Hc(we[fe]).map(a).concat(n.config[fe]):typeof B[fe]=="undefined"&&(n.config[fe]=we[fe])}B.altInputClass||(n.config.altInputClass=de().className+" "+n.config.altInputClass),je("onParseConfig")}function de(){return n.config.wrap?e.querySelector("[data-input]"):e}function pe(){typeof n.config.locale!="object"&&typeof ht.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Et(Et({},ht.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?ht.l10ns[n.config.locale]:void 0),Sr.D="("+n.l10n.weekdays.shorthand.join("|")+")",Sr.l="("+n.l10n.weekdays.longhand.join("|")+")",Sr.M="("+n.l10n.months.shorthand.join("|")+")",Sr.F="("+n.l10n.months.longhand.join("|")+")",Sr.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")";var P=Et(Et({},t),JSON.parse(JSON.stringify(e.dataset||{})));P.time_24hr===void 0&&ht.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=dg(n),n.parseDate=Gc({config:n.config,l10n:n.l10n})}function xe(P){if(typeof n.config.position=="function")return void n.config.position(n,P);if(n.calendarContainer!==void 0){je("onPreCalendarPosition");var B=P||n._positionElement,K=Array.prototype.reduce.call(n.calendarContainer.children,function(DF,OF){return DF+OF.offsetHeight},0),J=n.calendarContainer.offsetWidth,ie=n.config.position.split(" "),ce=ie[0],Ce=ie.length>1?ie[1]:null,ue=B.getBoundingClientRect(),we=window.innerHeight-ue.bottom,fe=ce==="above"||ce!=="below"&&we<K&&ue.top>K,me=window.pageYOffset+ue.top+(fe?-K-2:B.offsetHeight+2);if(Ot(n.calendarContainer,"arrowTop",!fe),Ot(n.calendarContainer,"arrowBottom",fe),!n.config.inline){var Oe=window.pageXOffset+ue.left,Pt=!1,it=!1;Ce==="center"?(Oe-=(J-ue.width)/2,Pt=!0):Ce==="right"&&(Oe-=J-ue.width,it=!0),Ot(n.calendarContainer,"arrowLeft",!Pt&&!it),Ot(n.calendarContainer,"arrowCenter",Pt),Ot(n.calendarContainer,"arrowRight",it);var dn=window.document.body.offsetWidth-(window.pageXOffset+ue.right),Sn=Oe+J>window.document.body.offsetWidth,SF=dn+J>window.document.body.offsetWidth;if(Ot(n.calendarContainer,"rightMost",Sn),!n.config.static)if(n.calendarContainer.style.top=me+"px",!Sn)n.calendarContainer.style.left=Oe+"px",n.calendarContainer.style.right="auto";else if(!SF)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=dn+"px";else{var Mu=Te();if(Mu===void 0)return;var AF=window.document.body.offsetWidth,TF=Math.max(0,AF/2-J/2),EF=".flatpickr-calendar.centerMost:before",kF=".flatpickr-calendar.centerMost:after",_F=Mu.cssRules.length,PF="{left:"+ue.left+"px;right:auto;}";Ot(n.calendarContainer,"rightMost",!1),Ot(n.calendarContainer,"centerMost",!0),Mu.insertRule(EF+","+kF+PF,_F),n.calendarContainer.style.left=TF+"px",n.calendarContainer.style.right="auto"}}}}function Te(){for(var P=null,B=0;B<document.styleSheets.length;B++){var K=document.styleSheets[B];if(K.cssRules){try{K.cssRules}catch(J){continue}P=K;break}}return P!=null?P:We()}function We(){var P=document.createElement("style");return document.head.appendChild(P),P.sheet}function Pe(){n.config.noCalendar||n.isMobile||(N(),bi(),T())}function Ee(){n._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function It(P){P.preventDefault(),P.stopPropagation();var B=function(me){return me.classList&&me.classList.contains("flatpickr-day")&&!me.classList.contains("flatpickr-disabled")&&!me.classList.contains("notAllowed")},K=ug(Yt(P),B);if(K!==void 0){var J=K,ie=n.latestSelectedDateObj=new Date(J.dateObj.getTime()),ce=(ie.getMonth()<n.currentMonth||ie.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!=="range";if(n.selectedDateElem=J,n.config.mode==="single")n.selectedDates=[ie];else if(n.config.mode==="multiple"){var Ce=Ao(ie);Ce?n.selectedDates.splice(parseInt(Ce),1):n.selectedDates.push(ie)}else n.config.mode==="range"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=ie,n.selectedDates.push(ie),Kt(ie,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(me,Oe){return me.getTime()-Oe.getTime()}));if(f(),ce){var ue=n.currentYear!==ie.getFullYear();n.currentYear=ie.getFullYear(),n.currentMonth=ie.getMonth(),ue&&(je("onYearChange"),N()),je("onMonthChange")}if(bi(),T(),un(),!ce&&n.config.mode!=="range"&&n.config.showMonths===1?E(J):n.selectedDateElem!==void 0&&n.hourElement===void 0&&n.selectedDateElem&&n.selectedDateElem.focus(),n.hourElement!==void 0&&n.hourElement!==void 0&&n.hourElement.focus(),n.config.closeOnSelect){var we=n.config.mode==="single"&&!n.config.enableTime,fe=n.config.mode==="range"&&n.selectedDates.length===2&&!n.config.enableTime;(we||fe)&&Ee()}b()}}var St={locale:[pe,Q],showMonths:[j,s,H],minDate:[S],maxDate:[S],positionElement:[So],clickOpens:[function(){n.config.clickOpens===!0?(g(n._input,"focus",n.open),g(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function jt(P,B){if(P!==null&&typeof P=="object"){Object.assign(n.config,P);for(var K in P)St[K]!==void 0&&St[K].forEach(function(J){return J()})}else n.config[P]=B,St[P]!==void 0?St[P].forEach(function(J){return J()}):Vc.indexOf(P)>-1&&(n.config[P]=Hc(B));n.redraw(),un(!0)}function Lt(P,B){var K=[];if(P instanceof Array)K=P.map(function(J){return n.parseDate(J,B)});else if(P instanceof Date||typeof P=="number")K=[n.parseDate(P,B)];else if(typeof P=="string")switch(n.config.mode){case"single":case"time":K=[n.parseDate(P,B)];break;case"multiple":K=P.split(n.config.conjunction).map(function(J){return n.parseDate(J,B)});break;case"range":K=P.split(n.l10n.rangeSeparator).map(function(J){return n.parseDate(J,B)});break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(P)));n.selectedDates=n.config.allowInvalidPreload?K:K.filter(function(J){return J instanceof Date&&X(J,!1)}),n.config.mode==="range"&&n.selectedDates.sort(function(J,ie){return J.getTime()-ie.getTime()})}function Qt(P,B,K){if(B===void 0&&(B=!1),K===void 0&&(K=n.config.dateFormat),P!==0&&!P||P instanceof Array&&P.length===0)return n.clear(B);Lt(P,K),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),S(void 0,B),h(),n.selectedDates.length===0&&n.clear(!1),un(B),B&&je("onChange")}function lr(P){return P.slice().map(function(B){return typeof B=="string"||typeof B=="number"||B instanceof Date?n.parseDate(B,void 0,!0):B&&typeof B=="object"&&B.from&&B.to?{from:n.parseDate(B.from,void 0),to:n.parseDate(B.to,void 0)}:B}).filter(function(B){return B})}function Rs(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var P=n.config.defaultDate||((n.input.nodeName==="INPUT"||n.input.nodeName==="TEXTAREA")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);P&&Lt(P,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),n.config.minTime!==void 0&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i")),n.config.maxTime!==void 0&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}function In(){if(n.input=de(),!n.input){n.config.errorHandler(new Error("Invalid input element specified"));return}n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=Le(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute("readonly","readonly"),So()}function So(){n._positionElement=n.config.positionElement||n._input}function Ru(){var P=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=Le("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=P,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=P==="datetime-local"?"Y-m-d\\TH:i:S":P==="date"?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d")),n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step"))),n.input.type="hidden",n.altInput!==void 0&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(B){}g(n.mobileInput,"change",function(B){n.setDate(Yt(B).value,!1,n.mobileFormatStr),je("onChange"),je("onClose")})}function Lu(P){if(n.isOpen===!0)return n.close();n.open(P)}function je(P,B){if(n.config!==void 0){var K=n.config[P];if(K!==void 0&&K.length>0)for(var J=0;K[J]&&J<K.length;J++)K[J](n.selectedDates,n.input.value,n,B);P==="onChange"&&(n.input.dispatchEvent(vi("change")),n.input.dispatchEvent(vi("input")))}}function vi(P){var B=document.createEvent("Event");return B.initEvent(P,!0,!0),B}function Ao(P){for(var B=0;B<n.selectedDates.length;B++){var K=n.selectedDates[B];if(K instanceof Date&&Kt(K,P)===0)return""+B}return!1}function Ls(P){return n.config.mode!=="range"||n.selectedDates.length<2?!1:Kt(P,n.selectedDates[0])>=0&&Kt(P,n.selectedDates[1])<=0}function bi(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(P,B){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+B),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[B].textContent=ns(K.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=K.getMonth().toString(),P.value=K.getFullYear().toString()}),n._hidePrevMonthArrow=n.config.minDate!==void 0&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=n.config.maxDate!==void 0&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function To(P){var B=P||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(K){return n.formatDate(K,B)}).filter(function(K,J,ie){return n.config.mode!=="range"||n.config.enableTime||ie.indexOf(K)===J}).join(n.config.mode!=="range"?n.config.conjunction:n.l10n.rangeSeparator)}function un(P){P===void 0&&(P=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=To(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=To(n.config.altFormat)),P!==!1&&je("onValueUpdate")}function Ms(P){var B=Yt(P),K=n.prevMonthNav.contains(B),J=n.nextMonthNav.contains(B);K||J?R(K?-1:1):n.yearElements.indexOf(B)>=0?B.select():B.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):B.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function Ct(P){P.preventDefault();var B=P.type==="keydown",K=Yt(P),J=K;n.amPM!==void 0&&K===n.amPM&&(n.amPM.textContent=n.l10n.amPM[rn(n.amPM.textContent===n.l10n.amPM[0])]);var ie=parseFloat(J.getAttribute("min")),ce=parseFloat(J.getAttribute("max")),Ce=parseFloat(J.getAttribute("step")),ue=parseInt(J.value,10),we=P.delta||(B?P.which===38?1:-1:0),fe=ue+Ce*we;if(typeof J.value!="undefined"&&J.value.length===2){var me=J===n.hourElement,Oe=J===n.minuteElement;fe<ie?(fe=ce+fe+rn(!me)+(rn(me)&&rn(!n.amPM)),Oe&&I(void 0,-1,n.hourElement)):fe>ce&&(fe=J===n.hourElement?fe-ce-rn(!n.amPM):ie,Oe&&I(void 0,1,n.hourElement)),n.amPM&&me&&(Ce===1?fe+ue===23:Math.abs(fe-ue)>Ce)&&(n.amPM.textContent=n.l10n.amPM[rn(n.amPM.textContent===n.l10n.amPM[0])]),J.value=zt(fe)}}return i(),n}function oi(e,t){for(var n=Array.prototype.slice.call(e).filter(function(a){return a instanceof HTMLElement}),r=[],i=0;i<n.length;i++){var o=n[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=DP(o,t||{}),r.push(o._flatpickr)}catch(a){console.error(a)}}return r.length===1?r[0]:r}typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return oi(this,e)},HTMLElement.prototype.flatpickr=function(e){return oi([this],e)});var ht=function(e,t){return typeof e=="string"?oi(window.document.querySelectorAll(e),t):e instanceof Node?oi([e],t):oi(e,t)};ht.defaultConfig={},ht.l10ns={en:Et({},io),default:Et({},io)},ht.localize=function(e){ht.l10ns.default=Et(Et({},ht.l10ns.default),e)},ht.setDefaults=function(e){ht.defaultConfig=Et(Et({},ht.defaultConfig),e)},ht.parseDate=Gc({}),ht.formatDate=dg({}),ht.compareDates=Kt,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(e){return oi(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof e=="string"?parseInt(e,10):e))},typeof window!="undefined"&&(window.flatpickr=ht);const OP=$u(Object.freeze(Object.defineProperty({__proto__:null,default:ht},Symbol.toStringTag,{value:"Module"})));(function(e){function t(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(U){return typeof U}:t=function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},t(R)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(x),r=o(OI),i=o(OP);function o(R){return R&&R.__esModule?R:{default:R}}function a(){if(typeof WeakMap!="function")return null;var R=new WeakMap;return a=function(){return R},R}function s(R){if(R&&R.__esModule)return R;if(R===null||t(R)!=="object"&&typeof R!="function")return{default:R};var L=a();if(L&&L.has(R))return L.get(R);var U={},W=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var re in R)if(Object.prototype.hasOwnProperty.call(R,re)){var se=W?Object.getOwnPropertyDescriptor(R,re):null;se&&(se.get||se.set)?Object.defineProperty(U,re,se):U[re]=R[re]}return U.default=R,L&&L.set(R,U),U}function l(R){return h(R)||f(R)||d(R)||u()}function u(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2458
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(R,L){if(R){if(typeof R=="string")return p(R,L);var U=Object.prototype.toString.call(R).slice(8,-1);if(U==="Object"&&R.constructor&&(U=R.constructor.name),U==="Map"||U==="Set")return Array.from(R);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return p(R,L)}}function f(R){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(R))return Array.from(R)}function h(R){if(Array.isArray(R))return p(R)}function p(R,L){(L==null||L>R.length)&&(L=R.length);for(var U=0,W=new Array(L);U<L;U++)W[U]=R[U];return W}function m(){return m=Object.assign||function(R){for(var L=1;L<arguments.length;L++){var U=arguments[L];for(var W in U)Object.prototype.hasOwnProperty.call(U,W)&&(R[W]=U[W])}return R},m.apply(this,arguments)}function g(R,L){if(R==null)return{};var U=b(R,L),W,re;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(R);for(re=0;re<se.length;re++)W=se[re],!(L.indexOf(W)>=0)&&Object.prototype.propertyIsEnumerable.call(R,W)&&(U[W]=R[W])}return U}function b(R,L){if(R==null)return{};var U={},W=Object.keys(R),re,se;for(se=0;se<W.length;se++)re=W[se],!(L.indexOf(re)>=0)&&(U[re]=R[re]);return U}function w(R,L){var U=Object.keys(R);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(R);L&&(W=W.filter(function(re){return Object.getOwnPropertyDescriptor(R,re).enumerable})),U.push.apply(U,W)}return U}function S(R){for(var L=1;L<arguments.length;L++){var U=arguments[L]!=null?arguments[L]:{};L%2?w(Object(U),!0).forEach(function(W){N(R,W,U[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(U)):w(Object(U)).forEach(function(W){Object.defineProperty(R,W,Object.getOwnPropertyDescriptor(U,W))})}return R}function C(R,L){if(!(R instanceof L))throw new TypeError("Cannot call a class as a function")}function I(R,L){for(var U=0;U<L.length;U++){var W=L[U];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(R,W.key,W)}}function y(R,L,U){return L&&I(R.prototype,L),R}function A(R,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(L&&L.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),L&&E(R,L)}function E(R,L){return E=Object.setPrototypeOf||function(W,re){return W.__proto__=re,W},E(R,L)}function k(R){var L=O();return function(){var W=T(R),re;if(L){var se=T(this).constructor;re=Reflect.construct(W,arguments,se)}else re=W.apply(this,arguments);return F(this,re)}}function F(R,L){return L&&(t(L)==="object"||typeof L=="function")?L:Y(R)}function Y(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function O(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(R){return!1}}function T(R){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(U){return U.__proto__||Object.getPrototypeOf(U)},T(R)}function N(R,L,U){return L in R?Object.defineProperty(R,L,{value:U,enumerable:!0,configurable:!0,writable:!0}):R[L]=U,R}var V=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],j=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),$=["onCreate","onDestroy"],M=r.default.func,H=function(R){A(U,R);var L=k(U);function U(){var W;C(this,U);for(var re=arguments.length,se=new Array(re),ae=0;ae<re;ae++)se[ae]=arguments[ae];return W=L.call.apply(L,[this].concat(se)),N(Y(W),"createFlatpickrInstance",function(){var X=S({onClose:function(){W.node.blur&&W.node.blur()}},W.props.options);X=Q(X,W.props),W.flatpickr=(0,i.default)(W.node,X),W.props.hasOwnProperty("value")&&W.flatpickr.setDate(W.props.value,!1);var le=W.props.onCreate;le&&le(W.flatpickr)}),N(Y(W),"destroyFlatpickrInstance",function(){var X=W.props.onDestroy;X&&X(W.flatpickr),W.flatpickr.destroy(),W.flatpickr=null}),N(Y(W),"handleNodeChange",function(X){W.node=X,W.flatpickr&&(W.destroyFlatpickrInstance(),W.createFlatpickrInstance())}),W}return y(U,[{key:"componentDidUpdate",value:function(re){var se=this.props.options,ae=re.options;se=Q(se,this.props),ae=Q(ae,re);for(var X=Object.getOwnPropertyNames(se),le=X.length-1;le>=0;le--){var Z=X[le],he=se[Z];he!==ae[Z]&&(V.indexOf(Z)!==-1&&!Array.isArray(he)&&(he=[he]),this.flatpickr.set(Z,he))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&re.value&&Array.isArray(re.value)&&this.props.value.every(function(Se,He){re[He]}))&&this.props.value!==re.value&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentDidMount",value:function(){this.createFlatpickrInstance()}},{key:"componentWillUnmount",value:function(){this.destroyFlatpickrInstance()}},{key:"render",value:function(){var re=this.props,se=re.options,ae=re.defaultValue,X=re.value,le=re.children,Z=re.render,he=g(re,["options","defaultValue","value","children","render"]);return V.forEach(function(Se){delete he[Se]}),$.forEach(function(Se){delete he[Se]}),Z?Z(S(S({},he),{},{defaultValue:ae,value:X}),this.handleNodeChange):se.wrap?n.default.createElement("div",m({},he,{ref:this.handleNodeChange}),le):n.default.createElement("input",m({},he,{defaultValue:ae,ref:this.handleNodeChange}))}}]),U}(n.Component);N(H,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:j,onOpen:j,onClose:j,onMonthChange:j,onYearChange:j,onReady:j,onValueUpdate:j,onDayCreate:j,onCreate:M,onDestroy:M,value:r.default.oneOfType([r.default.string,r.default.array,r.default.object,r.default.number]),children:r.default.node,className:r.default.string,render:r.default.func}),N(H,"defaultProps",{options:{}});function Q(R,L){var U=S({},R);return V.forEach(function(W){if(L.hasOwnProperty(W)){var re;U[W]&&!Array.isArray(U[W])?U[W]=[U[W]]:U[W]||(U[W]=[]);var se=Array.isArray(L[W])?L[W]:[L[W]];(re=U[W]).push.apply(re,l(se))}}),U}var te=H;e.default=te})(lg);const hg=fn(lg);var pg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",u="day",d="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var j=["th","st","nd","rd"],$=V%100;return"["+V+(j[($-20)%10]||j[$]||j[0])+"]"}},C=function(V,j,$){var M=String(V);return!M||M.length>=j?V:""+Array(j+1-M.length).join($)+V},I={s:C,z:function(V){var j=-V.utcOffset(),$=Math.abs(j),M=Math.floor($/60),H=$%60;return(j<=0?"+":"-")+C(M,2,"0")+":"+C(H,2,"0")},m:function V(j,$){if(j.date()<$.date())return-V($,j);var M=12*($.year()-j.year())+($.month()-j.month()),H=j.clone().add(M,f),Q=$-H<0,te=j.clone().add(M+(Q?-1:1),f);return+(-(M+($-H)/(Q?H-te:te-H))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:f,y:p,w:d,d:u,D:m,h:l,m:s,s:a,ms:o,Q:h}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},y="en",A={};A[y]=S;var E="$isDayjsObject",k=function(V){return V instanceof T||!(!V||!V[E])},F=function V(j,$,M){var H;if(!j)return y;if(typeof j=="string"){var Q=j.toLowerCase();A[Q]&&(H=Q),$&&(A[Q]=$,H=Q);var te=j.split("-");if(!H&&te.length>1)return V(te[0])}else{var R=j.name;A[R]=j,H=R}return!M&&H&&(y=H),H||!M&&y},Y=function(V,j){if(k(V))return V.clone();var $=typeof j=="object"?j:{};return $.date=V,$.args=arguments,new T($)},O=I;O.l=F,O.i=k,O.w=function(V,j){return Y(V,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var T=function(){function V($){this.$L=F($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[E]=!0}var j=V.prototype;return j.parse=function($){this.$d=function(M){var H=M.date,Q=M.utc;if(H===null)return new Date(NaN);if(O.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var te=H.match(b);if(te){var R=te[2]-1||0,L=(te[7]||"0").substring(0,3);return Q?new Date(Date.UTC(te[1],R,te[3]||1,te[4]||0,te[5]||0,te[6]||0,L)):new Date(te[1],R,te[3]||1,te[4]||0,te[5]||0,te[6]||0,L)}}return new Date(H)}($),this.init()},j.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},j.$utils=function(){return O},j.isValid=function(){return this.$d.toString()!==g},j.isSame=function($,M){var H=Y($);return this.startOf(M)<=H&&H<=this.endOf(M)},j.isAfter=function($,M){return Y($)<this.startOf(M)},j.isBefore=function($,M){return this.endOf(M)<Y($)},j.$g=function($,M,H){return O.u($)?this[M]:this.set(H,$)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function($,M){var H=this,Q=!!O.u(M)||M,te=O.p($),R=function(le,Z){var he=O.w(H.$u?Date.UTC(H.$y,Z,le):new Date(H.$y,Z,le),H);return Q?he:he.endOf(u)},L=function(le,Z){return O.w(H.toDate()[le].apply(H.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(Z)),H)},U=this.$W,W=this.$M,re=this.$D,se="set"+(this.$u?"UTC":"");switch(te){case p:return Q?R(1,0):R(31,11);case f:return Q?R(1,W):R(0,W+1);case d:var ae=this.$locale().weekStart||0,X=(U<ae?U+7:U)-ae;return R(Q?re-X:re+(6-X),W);case u:case m:return L(se+"Hours",0);case l:return L(se+"Minutes",1);case s:return L(se+"Seconds",2);case a:return L(se+"Milliseconds",3);default:return this.clone()}},j.endOf=function($){return this.startOf($,!1)},j.$set=function($,M){var H,Q=O.p($),te="set"+(this.$u?"UTC":""),R=(H={},H[u]=te+"Date",H[m]=te+"Date",H[f]=te+"Month",H[p]=te+"FullYear",H[l]=te+"Hours",H[s]=te+"Minutes",H[a]=te+"Seconds",H[o]=te+"Milliseconds",H)[Q],L=Q===u?this.$D+(M-this.$W):M;if(Q===f||Q===p){var U=this.clone().set(m,1);U.$d[R](L),U.init(),this.$d=U.set(m,Math.min(this.$D,U.daysInMonth())).$d}else R&&this.$d[R](L);return this.init(),this},j.set=function($,M){return this.clone().$set($,M)},j.get=function($){return this[O.p($)]()},j.add=function($,M){var H,Q=this;$=Number($);var te=O.p(M),R=function(W){var re=Y(Q);return O.w(re.date(re.date()+Math.round(W*$)),Q)};if(te===f)return this.set(f,this.$M+$);if(te===p)return this.set(p,this.$y+$);if(te===u)return R(1);if(te===d)return R(7);var L=(H={},H[s]=r,H[l]=i,H[a]=n,H)[te]||1,U=this.$d.getTime()+$*L;return O.w(U,this)},j.subtract=function($,M){return this.add(-1*$,M)},j.format=function($){var M=this,H=this.$locale();if(!this.isValid())return H.invalidDate||g;var Q=$||"YYYY-MM-DDTHH:mm:ssZ",te=O.z(this),R=this.$H,L=this.$m,U=this.$M,W=H.weekdays,re=H.months,se=H.meridiem,ae=function(Z,he,Se,He){return Z&&(Z[he]||Z(M,Q))||Se[he].slice(0,He)},X=function(Z){return O.s(R%12||12,Z,"0")},le=se||function(Z,he,Se){var He=Z<12?"AM":"PM";return Se?He.toLowerCase():He};return Q.replace(w,function(Z,he){return he||function(Se){switch(Se){case"YY":return String(M.$y).slice(-2);case"YYYY":return O.s(M.$y,4,"0");case"M":return U+1;case"MM":return O.s(U+1,2,"0");case"MMM":return ae(H.monthsShort,U,re,3);case"MMMM":return ae(re,U);case"D":return M.$D;case"DD":return O.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return ae(H.weekdaysMin,M.$W,W,2);case"ddd":return ae(H.weekdaysShort,M.$W,W,3);case"dddd":return W[M.$W];case"H":return String(R);case"HH":return O.s(R,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return le(R,L,!0);case"A":return le(R,L,!1);case"m":return String(L);case"mm":return O.s(L,2,"0");case"s":return String(M.$s);case"ss":return O.s(M.$s,2,"0");case"SSS":return O.s(M.$ms,3,"0");case"Z":return te}return null}(Z)||te.replace(":","")})},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function($,M,H){var Q,te=this,R=O.p(M),L=Y($),U=(L.utcOffset()-this.utcOffset())*r,W=this-L,re=function(){return O.m(te,L)};switch(R){case p:Q=re()/12;break;case f:Q=re();break;case h:Q=re()/3;break;case d:Q=(W-U)/6048e5;break;case u:Q=(W-U)/864e5;break;case l:Q=W/i;break;case s:Q=W/r;break;case a:Q=W/n;break;default:Q=W}return H?Q:O.a(Q)},j.daysInMonth=function(){return this.endOf(f).$D},j.$locale=function(){return A[this.$L]},j.locale=function($,M){if(!$)return this.$L;var H=this.clone(),Q=F($,M,!0);return Q&&(H.$L=Q),H},j.clone=function(){return O.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},V}(),N=T.prototype;return Y.prototype=N,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",u],["$M",f],["$y",p],["$D",m]].forEach(function(V){N[V[1]]=function(j){return this.$g(j,V[0],V[1])}}),Y.extend=function(V,j){return V.$i||(V(j,T,Y),V.$i=!0),Y},Y.locale=F,Y.isDayjs=k,Y.unix=function(V){return Y(1e3*V)},Y.en=A[y],Y.Ls=A,Y.p={},Y})})(pg);var RP=pg.exports;const kt=fn(RP);var gg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(i,o,a){var s,l=function(h,p,m){m===void 0&&(m={});var g=new Date(h),b=function(w,S){S===void 0&&(S={});var C=S.timeZoneName||"short",I=w+"|"+C,y=r[I];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:w,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:C}),r[I]=y),y}(p,m);return b.formatToParts(g)},u=function(h,p){for(var m=l(h,p),g=[],b=0;b<m.length;b+=1){var w=m[b],S=w.type,C=w.value,I=n[S];I>=0&&(g[I]=parseInt(C,10))}var y=g[3],A=y===24?0:y,E=g[0]+"-"+g[1]+"-"+g[2]+" "+A+":"+g[4]+":"+g[5]+":000",k=+h;return(a.utc(E).valueOf()-(k-=k%1e3))/6e4},d=o.prototype;d.tz=function(h,p){h===void 0&&(h=s);var m,g=this.utcOffset(),b=this.toDate(),w=b.toLocaleString("en-US",{timeZone:h}),S=Math.round((b-new Date(w))/1e3/60),C=15*-Math.round(b.getTimezoneOffset()/15)-S;if(!Number(C))m=this.utcOffset(0,p);else if(m=a(w,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(C,!0),p){var I=m.utcOffset();m=m.add(g-I,"minute")}return m.$x.$timezone=h,m},d.offsetName=function(h){var p=this.$x.$timezone||a.tz.guess(),m=l(this.valueOf(),p,{timeZoneName:h}).find(function(g){return g.type.toLowerCase()==="timezonename"});return m&&m.value};var f=d.startOf;d.startOf=function(h,p){if(!this.$x||!this.$x.$timezone)return f.call(this,h,p);var m=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(m,h,p).tz(this.$x.$timezone,!0)},a.tz=function(h,p,m){var g=m&&p,b=m||p||s,w=u(+a(),b);if(typeof h!="string")return a(h).tz(b);var S=function(A,E,k){var F=A-60*E*1e3,Y=u(F,k);if(E===Y)return[F,E];var O=u(F-=60*(Y-E)*1e3,k);return Y===O?[F,Y]:[A-60*Math.min(Y,O)*1e3,Math.max(Y,O)]}(a.utc(h,g).valueOf(),w,b),C=S[0],I=S[1],y=a(C).utcOffset(I);return y.$x.$timezone=b,y},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(h){s=h}}})})(gg);var LP=gg.exports;const MP=fn(LP);var mg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,a,s){var l=a.prototype;s.utc=function(g){var b={date:g,utc:!0,args:arguments};return new a(b)},l.utc=function(g){var b=s(this.toDate(),{locale:this.$L,utc:!0});return g?b.add(this.utcOffset(),n):b},l.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var u=l.parse;l.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),u.call(this,g)};var d=l.init;l.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else d.call(this)};var f=l.utcOffset;l.utcOffset=function(g,b){var w=this.$utils().u;if(w(g))return this.$u?0:w(this.$offset)?f.call(this):this.$offset;if(typeof g=="string"&&(g=function(y){y===void 0&&(y="");var A=y.match(r);if(!A)return null;var E=(""+A[0]).match(i)||["-",0,0],k=E[0],F=60*+E[1]+ +E[2];return F===0?0:k==="+"?F:-F}(g),g===null))return this;var S=Math.abs(g)<=16?60*g:g,C=this;if(b)return C.$offset=S,C.$u=g===0,C;if(g!==0){var I=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(C=this.local().add(S+I,n)).$offset=S,C.$x.$localOffset=I}else C=this.utc();return C};var h=l.format;l.format=function(g){var b=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,b)},l.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var p=l.toDate;l.toDate=function(g){return g==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var m=l.diff;l.diff=function(g,b,w){if(g&&this.$u===g.$u)return m.call(this,g,b,w);var S=this.local(),C=s(g).local();return m.call(S,C,b,w)}}})})(mg);var BP=mg.exports;const $P=fn(BP);kt.extend(MP),kt.extend($P);const NP=e=>{if(!kt(e).isAfter(kt(Date.now()).subtract(15,"minute")))return kt(Date.now()).add(15,"minute").toDate()},Qc=({defaultDate:e,minDate:t,maxDate:n,dateFormat:r="DD.MM.YYYY HH:mm",onChange:i})=>{const o=a=>{if(a&&a.length){const s=kt.utc(a[0]).toISOString();i(s)}else i("")};return c.jsx(v.Box,{sx:{width:"100%",".flatpickr-input":{width:"100%",paddingLeft:"0.5rem",boxSizing:"border-box",fontSize:"1rem",lineHeight:1.3,minHeight:"37px",color:"rgba(0, 0, 0, 0.87)",backgroundColor:"#fff",backgroundClip:"padding-box",border:"1px solid #ced4da",borderRadius:"0.375rem",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"}}},children:c.jsx(hg,{value:e&&kt(e).format("YYYY-MM-DD HH:mm")||void 0,onChange:o,className:"flatpickr-input",options:{enableTime:!0,dateFormat:r,position:"below",minDate:t||NP(e),maxDate:n,parseDate:(a,s)=>kt(a,s).toDate(),formatDate:(a,s)=>kt(a).format(s),time_24hr:!0,minuteIncrement:1}})})},FP=({required:e,defaultValue:t,onChangeFromDate:n,onChangeToDate:r})=>{const[i,o]=t;return c.jsxs(v.Box,{sx:{marginBottom:"16px"},children:[c.jsx(v.FormControl,{children:c.jsx(v.FormLabel,{required:e,color:"primary",children:"Duration"})}),c.jsxs(v.Grid,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",children:[c.jsx(ro,{label:"From date",defaultValue:i,required:e,onChange:n}),c.jsx(ro,{label:"To date",defaultValue:o,required:e,onChange:r})]})]})},vg=e=>{if(!e)return[];const{from:t,to:n}=e,r=[];return t&&r.push(kt(t).toDate()),n&&r.push(kt(n).toDate()),r},zP=({label:e,defaultValue:t,required:n,onChange:r})=>{const[i,o]=x.useState(vg(t)),[a,s]=x.useState(!1),l=()=>s(!a),u=d=>{if(d&&d.length>0){const f="YYYY-MM-DD",h=kt(d[0]).format(f),p=kt(d[1]).format(f);r({from:h,to:p})}else d&&d.length===0&&(r({from:"",to:""}),l());o(d)};return c.jsxs(v.FormControl,{sx:{marginBottom:"16px"},children:[c.jsx(v.FormLabel,{required:n,color:"primary",children:e}),c.jsx(v.Box,{sx:{width:"100%",".flatpickr-input":{width:"100%",padding:"0.5rem 0.75rem",boxSizing:"border-box",fontSize:"1rem",lineHeight:1.3,color:"rgba(0, 0, 0, 0.87)",backgroundColor:"#fff",backgroundClip:"padding-box",border:"1px solid #ced4da",borderRadius:"0.375rem",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"}}},children:c.jsx(hg,{value:i,onChange:u,placeholder:"Select Date...",className:"flatpickr-input",options:{mode:"range",enableTime:!1,dateFormat:"DD.MM.YYYY",altFormat:"DD.MM.YYYY",position:"below",parseDate:(d,f)=>kt(d,f).toDate(),formatDate:(d,f)=>kt(d).format(f),defaultDate:vg(t)||void 0}})}),c.jsx(nt,{showToast:a,message:"Succesfully cleared the duration time",color:"primary",hideToast:l})]})},jP=({environment:e,labels:t,setNoPermission:n})=>{const{featureDisabled:r,noPermissionMessage:i,tryAgainButton:o}=t,a=()=>{Vi(e).signOut().then(()=>n(null)).catch(s=>{console.error("There was a problem logging out the user:",s)})};return c.jsx(v.Box,{"data-testid":"no permission card",sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",bgcolor:"background.body"},children:c.jsx(v.Card,{variant:"outlined",sx:{maxWidth:300,overflow:"hidden",borderRadius:"md"},children:c.jsxs(v.CardContent,{children:[c.jsx(v.Typography,{level:"h2",textAlign:"center",mb:2,children:r}),c.jsx(v.Typography,{level:"body-md",color:"neutral",mb:2,children:i}),c.jsx(v.Box,{display:"flex",justifyContent:"center",children:c.jsx(v.Button,{variant:"solid",color:"neutral",fullWidth:!0,size:"sm",onClick:a,children:o})})]})})})},bg=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],qc=e=>e.reduce((t,n)=>(t[n.key]=n.value,t),{}),UP=({labels:e,type:t,defaultValue:n,onChange:r})=>{const[i,o]=x.useState(bg(n)),[a,s]=x.useState(null),[l,u]=x.useState(""),[d,f]=x.useState(""),[h,p]=x.useState(""),[m,g]=x.useState("");x.useEffect(()=>o(bg(n)),[n]);const b=()=>{const I=[...i];I.push({key:l,value:h}),o(I),u(""),p(""),r(qc(I))},w=I=>{const y=i.filter((A,E)=>E!==I);o(y),r(qc(y))},S=(I,y)=>{f(y.key),g(y.value),s(I)},C=I=>{const y=[...i];y[I]={key:d,value:m},o(y),s(null),f(""),g(""),r(qc(y))};return c.jsxs(v.Box,{children:[i.map((I,y)=>c.jsx(v.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:c.jsx(v.CardContent,{style:{flex:1},children:a===y?c.jsxs(v.Box,{display:"flex",alignItems:"center",children:[c.jsx(v.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:d,onChange:A=>f(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),c.jsx(v.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:m,onChange:A=>g(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),c.jsx(v.Tooltip,{title:e.save,children:d&&m?c.jsx(v.IconButton,{onClick:()=>C(y),children:c.jsx(De.Check,{})}):c.jsx("span",{children:c.jsx(v.IconButton,{disabled:!0,children:c.jsx(De.Check,{})})})})]}):c.jsxs(v.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[c.jsxs(v.Box,{children:[c.jsxs(v.Typography,{style:{fontWeight:"bold"},children:[e.keyDynamicFields,": ",c.jsx(v.Typography,{whiteSpace:"wrap",children:I.key})]}),c.jsxs(v.Typography,{style:{color:"gray"},children:[e.valueDynamicFields,": ",c.jsx(v.Typography,{whiteSpace:"wrap",children:I.value})]})]}),c.jsxs(v.Box,{children:[c.jsx(v.Tooltip,{title:e.edit,children:c.jsx(v.IconButton,{onClick:()=>S(y,I),children:c.jsx(De.Edit,{})})}),c.jsx(v.Tooltip,{title:e.delete,children:c.jsx(v.IconButton,{onClick:()=>w(y),children:c.jsx(De.Delete,{})})})]})]})})},`dynamic-fields-${t}-${y}`)),c.jsxs(v.Box,{display:"flex",alignItems:"center",style:{marginTop:i&&i.length?"20px":"0px"},children:[c.jsx(v.Input,{size:"md",variant:"outlined",color:"neutral",value:l,placeholder:e.keyDynamicFields,onChange:I=>u(I.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),c.jsx(v.Input,{size:"md",variant:"outlined",color:"neutral",value:h,onChange:I=>p(I.target.value),placeholder:e.valueDynamicFields,sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),c.jsx(v.Tooltip,{title:e.add,children:l&&h?c.jsx(v.Button,{onClick:b,children:c.jsx(De.Add,{})}):c.jsx("span",{children:c.jsx(v.Button,{disabled:!0,children:c.jsx(De.Add,{})})})})]})]})};function ao(e,t,n){return(t=tc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yg(Object(n),!0).forEach(function(r){ao(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tc(r.key),r)}}function HP(e,t,n){return t&&xg(e.prototype,t),n&&xg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jc(e,t){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Jc(e,t)}function WP(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)}function rs(e){return rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rs(e)}function Cg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Cg=function(){return!!e})()}function GP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YP(e,t){if(t&&(xr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GP(e)}function KP(e){var t=Cg();return function(){var n,r=rs(e);if(t){var i=rs(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return YP(this,n)}}function Xc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function QP(e){if(Array.isArray(e))return Xc(e)}function qP(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wg(e,t){if(e){if(typeof e=="string")return Xc(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xc(e,t):void 0}}function JP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2457
|
+
`}}function te(){n.calendarContainer.classList.add("hasWeeks");var P=Le("div","flatpickr-weekwrapper");P.appendChild(Le("span","flatpickr-weekday",n.l10n.weekAbbreviation));var B=Le("div","flatpickr-weeks");return P.appendChild(B),{weekWrapper:P,weekNumbers:B}}function R(P,B){B===void 0&&(B=!0);var K=B?P:P-n.currentMonth;K<0&&n._hidePrevMonthArrow===!0||K>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=K,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,je("onYearChange"),N()),T(),je("onMonthChange"),bi())}function L(P,B){if(P===void 0&&(P=!0),B===void 0&&(B=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,B===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var K=Kc(n.config),J=K.hours,ie=K.minutes,ce=K.seconds;p(J,ie,ce)}n.redraw(),P&&je("onChange")}function U(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),je("onClose")}function W(){n.config!==void 0&&je("onDestroy");for(var P=n._handlers.length;P--;)n._handlers[P].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var B=n.calendarContainer.parentNode;if(B.lastChild&&B.removeChild(B.lastChild),B.parentNode){for(;B.firstChild;)B.parentNode.insertBefore(B.firstChild,B);B.parentNode.removeChild(B)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(K){try{delete n[K]}catch(J){}})}function re(P){return n.calendarContainer.contains(P)}function se(P){if(n.isOpen&&!n.config.inline){var B=Yt(P),K=re(B),J=B===n.input||B===n.altInput||n.element.contains(B)||P.path&&P.path.indexOf&&(~P.path.indexOf(n.input)||~P.path.indexOf(n.altInput)),ie=!J&&!K&&!re(P.relatedTarget),ce=!n.config.ignoredFocusElements.some(function(Ce){return Ce.contains(B)});ie&&ce&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==""&&n.input.value!==void 0&&l(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function ae(P){if(!(!P||n.config.minDate&&P<n.config.minDate.getFullYear()||n.config.maxDate&&P>n.config.maxDate.getFullYear())){var B=P,K=n.currentYear!==B;n.currentYear=B||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),K&&(n.redraw(),je("onYearChange"),N())}}function X(P,B){var K;B===void 0&&(B=!0);var J=n.parseDate(P,void 0,B);if(n.config.minDate&&J&&Kt(J,n.config.minDate,B!==void 0?B:!n.minDateHasTime)<0||n.config.maxDate&&J&&Kt(J,n.config.maxDate,B!==void 0?B:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(J===void 0)return!1;for(var ie=!!n.config.enable,ce=(K=n.config.enable)!==null&&K!==void 0?K:n.config.disable,Ce=0,ue=void 0;Ce<ce.length;Ce++){if(ue=ce[Ce],typeof ue=="function"&&ue(J))return ie;if(ue instanceof Date&&J!==void 0&&ue.getTime()===J.getTime())return ie;if(typeof ue=="string"){var we=n.parseDate(ue,void 0,!0);return we&&we.getTime()===J.getTime()?ie:!ie}else if(typeof ue=="object"&&J!==void 0&&ue.from&&ue.to&&J.getTime()>=ue.from.getTime()&&J.getTime()<=ue.to.getTime())return ie}return!ie}function le(P){return n.daysContainer!==void 0?P.className.indexOf("hidden")===-1&&P.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(P):!1}function Z(P){var B=P.target===n._input,K=n._input.value.trimEnd()!==To();B&&K&&!(P.relatedTarget&&re(P.relatedTarget))&&n.setDate(n._input.value,!0,P.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function he(P){var B=Yt(P),K=n.config.wrap?e.contains(B):B===n._input,J=n.config.allowInput,ie=n.isOpen&&(!J||!K),ce=n.config.inline&&K&&!J;if(P.keyCode===13&&K){if(J)return n.setDate(n._input.value,!0,B===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),B.blur();n.open()}else if(re(B)||ie||ce){var Ce=!!n.timeContainer&&n.timeContainer.contains(B);switch(P.keyCode){case 13:Ce?(P.preventDefault(),l(),Ee()):It(P);break;case 27:P.preventDefault(),Ee();break;case 8:case 46:K&&!n.config.allowInput&&(P.preventDefault(),n.clear());break;case 37:case 39:if(!Ce&&!K){P.preventDefault();var ue=o();if(n.daysContainer!==void 0&&(J===!1||ue&&le(ue))){var we=P.keyCode===39?1:-1;P.ctrlKey?(P.stopPropagation(),R(we),Y(k(1),0)):Y(void 0,we)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:P.preventDefault();var fe=P.keyCode===40?1:-1;n.daysContainer&&B.$i!==void 0||B===n.input||B===n.altInput?P.ctrlKey?(P.stopPropagation(),ae(n.currentYear-fe),Y(k(1),0)):Ce||Y(void 0,fe*7):B===n.currentYearElement?ae(n.currentYear-fe):n.config.enableTime&&(!Ce&&n.hourElement&&n.hourElement.focus(),l(P),n._debouncedChange());break;case 9:if(Ce){var me=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(it){return it}),Oe=me.indexOf(B);if(Oe!==-1){var Pt=me[Oe+(P.shiftKey?-1:1)];P.preventDefault(),(Pt||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(B)&&P.shiftKey&&(P.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&B===n.amPM)switch(P.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],f(),dn();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],f(),dn();break}(K||re(B))&&je("onKeyDown",P)}function Se(P,B){if(B===void 0&&(B="flatpickr-day"),!(n.selectedDates.length!==1||P&&(!P.classList.contains(B)||P.classList.contains("flatpickr-disabled")))){for(var K=P?P.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),J=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),ie=Math.min(K,n.selectedDates[0].getTime()),ce=Math.max(K,n.selectedDates[0].getTime()),Ce=!1,ue=0,we=0,fe=ie;fe<ce;fe+=_P.DAY)X(new Date(fe),!0)||(Ce=Ce||fe>ie&&fe<ce,fe<J&&(!ue||fe>ue)?ue=fe:fe>J&&(!we||fe<we)&&(we=fe));var me=Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+B));me.forEach(function(Oe){var Pt=Oe.dateObj,it=Pt.getTime(),fn=ue>0&&it<ue||we>0&&it>we;if(fn){Oe.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Sn){Oe.classList.remove(Sn)});return}else if(Ce&&!fn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Sn){Oe.classList.remove(Sn)}),P!==void 0&&(P.classList.add(K<=n.selectedDates[0].getTime()?"startRange":"endRange"),J<K&&it===J?Oe.classList.add("startRange"):J>K&&it===J&&Oe.classList.add("endRange"),it>=ue&&(we===0||it<=we)&&EP(it,J,K)&&Oe.classList.add("inRange"))})}}function He(){n.isOpen&&!n.config.static&&!n.config.inline&&xe()}function wt(P,B){if(B===void 0&&(B=n._positionElement),n.isMobile===!0){if(P){P.preventDefault();var K=Yt(P);K&&K.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),je("onOpen");return}else if(n._input.disabled||n.config.inline)return;var J=n.isOpen;n.isOpen=!0,J||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),je("onOpen"),xe(B)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(P===void 0||!n.timeContainer.contains(P.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}function ct(P){return function(B){var K=n.config["_"+P+"Date"]=n.parseDate(B,n.config.dateFormat),J=n.config["_"+(P==="min"?"max":"min")+"Date"];K!==void 0&&(n[P==="min"?"minDateHasTime":"maxDateHasTime"]=K.getHours()>0||K.getMinutes()>0||K.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(ie){return X(ie)}),!n.selectedDates.length&&P==="min"&&h(K),dn()),n.daysContainer&&(Pe(),K!==void 0?n.currentYearElement[P]=K.getFullYear().toString():n.currentYearElement.removeAttribute(P),n.currentYearElement.disabled=!!J&&K!==void 0&&J.getFullYear()===K.getFullYear())}}function _t(){var P=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],B=Et(Et({},JSON.parse(JSON.stringify(e.dataset||{}))),t),K={};n.config.parseDate=B.parseDate,n.config.formatDate=B.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(me){n.config._enable=lr(me)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(me){n.config._disable=lr(me)}});var J=B.mode==="time";if(!B.dateFormat&&(B.enableTime||J)){var ie=ht.defaultConfig.dateFormat||ii.dateFormat;K.dateFormat=B.noCalendar||J?"H:i"+(B.enableSeconds?":S":""):ie+" H:i"+(B.enableSeconds?":S":"")}if(B.altInput&&(B.enableTime||J)&&!B.altFormat){var ce=ht.defaultConfig.altFormat||ii.altFormat;K.altFormat=B.noCalendar||J?"h:i"+(B.enableSeconds?":S K":" K"):ce+(" h:i"+(B.enableSeconds?":S":"")+" K")}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:ct("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:ct("max")});var Ce=function(me){return function(Oe){n.config[me==="min"?"_minTime":"_maxTime"]=n.parseDate(Oe,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:Ce("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:Ce("max")}),B.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,K,B);for(var ue=0;ue<P.length;ue++)n.config[P[ue]]=n.config[P[ue]]===!0||n.config[P[ue]]==="true";Vc.filter(function(me){return n.config[me]!==void 0}).forEach(function(me){n.config[me]=Hc(n.config[me]||[]).map(a)}),n.isMobile=!n.config.disableMobile&&!n.config.inline&&n.config.mode==="single"&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var ue=0;ue<n.config.plugins.length;ue++){var we=n.config.plugins[ue](n)||{};for(var fe in we)Vc.indexOf(fe)>-1?n.config[fe]=Hc(we[fe]).map(a).concat(n.config[fe]):typeof B[fe]=="undefined"&&(n.config[fe]=we[fe])}B.altInputClass||(n.config.altInputClass=de().className+" "+n.config.altInputClass),je("onParseConfig")}function de(){return n.config.wrap?e.querySelector("[data-input]"):e}function pe(){typeof n.config.locale!="object"&&typeof ht.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Et(Et({},ht.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?ht.l10ns[n.config.locale]:void 0),Sr.D="("+n.l10n.weekdays.shorthand.join("|")+")",Sr.l="("+n.l10n.weekdays.longhand.join("|")+")",Sr.M="("+n.l10n.months.shorthand.join("|")+")",Sr.F="("+n.l10n.months.longhand.join("|")+")",Sr.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")";var P=Et(Et({},t),JSON.parse(JSON.stringify(e.dataset||{})));P.time_24hr===void 0&&ht.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=dg(n),n.parseDate=Gc({config:n.config,l10n:n.l10n})}function xe(P){if(typeof n.config.position=="function")return void n.config.position(n,P);if(n.calendarContainer!==void 0){je("onPreCalendarPosition");var B=P||n._positionElement,K=Array.prototype.reduce.call(n.calendarContainer.children,function(DF,OF){return DF+OF.offsetHeight},0),J=n.calendarContainer.offsetWidth,ie=n.config.position.split(" "),ce=ie[0],Ce=ie.length>1?ie[1]:null,ue=B.getBoundingClientRect(),we=window.innerHeight-ue.bottom,fe=ce==="above"||ce!=="below"&&we<K&&ue.top>K,me=window.pageYOffset+ue.top+(fe?-K-2:B.offsetHeight+2);if(Ot(n.calendarContainer,"arrowTop",!fe),Ot(n.calendarContainer,"arrowBottom",fe),!n.config.inline){var Oe=window.pageXOffset+ue.left,Pt=!1,it=!1;Ce==="center"?(Oe-=(J-ue.width)/2,Pt=!0):Ce==="right"&&(Oe-=J-ue.width,it=!0),Ot(n.calendarContainer,"arrowLeft",!Pt&&!it),Ot(n.calendarContainer,"arrowCenter",Pt),Ot(n.calendarContainer,"arrowRight",it);var fn=window.document.body.offsetWidth-(window.pageXOffset+ue.right),Sn=Oe+J>window.document.body.offsetWidth,SF=fn+J>window.document.body.offsetWidth;if(Ot(n.calendarContainer,"rightMost",Sn),!n.config.static)if(n.calendarContainer.style.top=me+"px",!Sn)n.calendarContainer.style.left=Oe+"px",n.calendarContainer.style.right="auto";else if(!SF)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=fn+"px";else{var Mu=Te();if(Mu===void 0)return;var AF=window.document.body.offsetWidth,TF=Math.max(0,AF/2-J/2),EF=".flatpickr-calendar.centerMost:before",kF=".flatpickr-calendar.centerMost:after",_F=Mu.cssRules.length,PF="{left:"+ue.left+"px;right:auto;}";Ot(n.calendarContainer,"rightMost",!1),Ot(n.calendarContainer,"centerMost",!0),Mu.insertRule(EF+","+kF+PF,_F),n.calendarContainer.style.left=TF+"px",n.calendarContainer.style.right="auto"}}}}function Te(){for(var P=null,B=0;B<document.styleSheets.length;B++){var K=document.styleSheets[B];if(K.cssRules){try{K.cssRules}catch(J){continue}P=K;break}}return P!=null?P:We()}function We(){var P=document.createElement("style");return document.head.appendChild(P),P.sheet}function Pe(){n.config.noCalendar||n.isMobile||(N(),bi(),T())}function Ee(){n._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function It(P){P.preventDefault(),P.stopPropagation();var B=function(me){return me.classList&&me.classList.contains("flatpickr-day")&&!me.classList.contains("flatpickr-disabled")&&!me.classList.contains("notAllowed")},K=ug(Yt(P),B);if(K!==void 0){var J=K,ie=n.latestSelectedDateObj=new Date(J.dateObj.getTime()),ce=(ie.getMonth()<n.currentMonth||ie.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!=="range";if(n.selectedDateElem=J,n.config.mode==="single")n.selectedDates=[ie];else if(n.config.mode==="multiple"){var Ce=Ao(ie);Ce?n.selectedDates.splice(parseInt(Ce),1):n.selectedDates.push(ie)}else n.config.mode==="range"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=ie,n.selectedDates.push(ie),Kt(ie,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(me,Oe){return me.getTime()-Oe.getTime()}));if(f(),ce){var ue=n.currentYear!==ie.getFullYear();n.currentYear=ie.getFullYear(),n.currentMonth=ie.getMonth(),ue&&(je("onYearChange"),N()),je("onMonthChange")}if(bi(),T(),dn(),!ce&&n.config.mode!=="range"&&n.config.showMonths===1?E(J):n.selectedDateElem!==void 0&&n.hourElement===void 0&&n.selectedDateElem&&n.selectedDateElem.focus(),n.hourElement!==void 0&&n.hourElement!==void 0&&n.hourElement.focus(),n.config.closeOnSelect){var we=n.config.mode==="single"&&!n.config.enableTime,fe=n.config.mode==="range"&&n.selectedDates.length===2&&!n.config.enableTime;(we||fe)&&Ee()}b()}}var St={locale:[pe,Q],showMonths:[j,s,H],minDate:[S],maxDate:[S],positionElement:[So],clickOpens:[function(){n.config.clickOpens===!0?(g(n._input,"focus",n.open),g(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function jt(P,B){if(P!==null&&typeof P=="object"){Object.assign(n.config,P);for(var K in P)St[K]!==void 0&&St[K].forEach(function(J){return J()})}else n.config[P]=B,St[P]!==void 0?St[P].forEach(function(J){return J()}):Vc.indexOf(P)>-1&&(n.config[P]=Hc(B));n.redraw(),dn(!0)}function Lt(P,B){var K=[];if(P instanceof Array)K=P.map(function(J){return n.parseDate(J,B)});else if(P instanceof Date||typeof P=="number")K=[n.parseDate(P,B)];else if(typeof P=="string")switch(n.config.mode){case"single":case"time":K=[n.parseDate(P,B)];break;case"multiple":K=P.split(n.config.conjunction).map(function(J){return n.parseDate(J,B)});break;case"range":K=P.split(n.l10n.rangeSeparator).map(function(J){return n.parseDate(J,B)});break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(P)));n.selectedDates=n.config.allowInvalidPreload?K:K.filter(function(J){return J instanceof Date&&X(J,!1)}),n.config.mode==="range"&&n.selectedDates.sort(function(J,ie){return J.getTime()-ie.getTime()})}function Qt(P,B,K){if(B===void 0&&(B=!1),K===void 0&&(K=n.config.dateFormat),P!==0&&!P||P instanceof Array&&P.length===0)return n.clear(B);Lt(P,K),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),S(void 0,B),h(),n.selectedDates.length===0&&n.clear(!1),dn(B),B&&je("onChange")}function lr(P){return P.slice().map(function(B){return typeof B=="string"||typeof B=="number"||B instanceof Date?n.parseDate(B,void 0,!0):B&&typeof B=="object"&&B.from&&B.to?{from:n.parseDate(B.from,void 0),to:n.parseDate(B.to,void 0)}:B}).filter(function(B){return B})}function Rs(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var P=n.config.defaultDate||((n.input.nodeName==="INPUT"||n.input.nodeName==="TEXTAREA")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);P&&Lt(P,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),n.config.minTime!==void 0&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i")),n.config.maxTime!==void 0&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}function In(){if(n.input=de(),!n.input){n.config.errorHandler(new Error("Invalid input element specified"));return}n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=Le(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute("readonly","readonly"),So()}function So(){n._positionElement=n.config.positionElement||n._input}function Ru(){var P=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=Le("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=P,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=P==="datetime-local"?"Y-m-d\\TH:i:S":P==="date"?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d")),n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step"))),n.input.type="hidden",n.altInput!==void 0&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(B){}g(n.mobileInput,"change",function(B){n.setDate(Yt(B).value,!1,n.mobileFormatStr),je("onChange"),je("onClose")})}function Lu(P){if(n.isOpen===!0)return n.close();n.open(P)}function je(P,B){if(n.config!==void 0){var K=n.config[P];if(K!==void 0&&K.length>0)for(var J=0;K[J]&&J<K.length;J++)K[J](n.selectedDates,n.input.value,n,B);P==="onChange"&&(n.input.dispatchEvent(vi("change")),n.input.dispatchEvent(vi("input")))}}function vi(P){var B=document.createEvent("Event");return B.initEvent(P,!0,!0),B}function Ao(P){for(var B=0;B<n.selectedDates.length;B++){var K=n.selectedDates[B];if(K instanceof Date&&Kt(K,P)===0)return""+B}return!1}function Ls(P){return n.config.mode!=="range"||n.selectedDates.length<2?!1:Kt(P,n.selectedDates[0])>=0&&Kt(P,n.selectedDates[1])<=0}function bi(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(P,B){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+B),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[B].textContent=ns(K.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=K.getMonth().toString(),P.value=K.getFullYear().toString()}),n._hidePrevMonthArrow=n.config.minDate!==void 0&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=n.config.maxDate!==void 0&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function To(P){var B=P||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(K){return n.formatDate(K,B)}).filter(function(K,J,ie){return n.config.mode!=="range"||n.config.enableTime||ie.indexOf(K)===J}).join(n.config.mode!=="range"?n.config.conjunction:n.l10n.rangeSeparator)}function dn(P){P===void 0&&(P=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=To(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=To(n.config.altFormat)),P!==!1&&je("onValueUpdate")}function Ms(P){var B=Yt(P),K=n.prevMonthNav.contains(B),J=n.nextMonthNav.contains(B);K||J?R(K?-1:1):n.yearElements.indexOf(B)>=0?B.select():B.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):B.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function Ct(P){P.preventDefault();var B=P.type==="keydown",K=Yt(P),J=K;n.amPM!==void 0&&K===n.amPM&&(n.amPM.textContent=n.l10n.amPM[on(n.amPM.textContent===n.l10n.amPM[0])]);var ie=parseFloat(J.getAttribute("min")),ce=parseFloat(J.getAttribute("max")),Ce=parseFloat(J.getAttribute("step")),ue=parseInt(J.value,10),we=P.delta||(B?P.which===38?1:-1:0),fe=ue+Ce*we;if(typeof J.value!="undefined"&&J.value.length===2){var me=J===n.hourElement,Oe=J===n.minuteElement;fe<ie?(fe=ce+fe+on(!me)+(on(me)&&on(!n.amPM)),Oe&&I(void 0,-1,n.hourElement)):fe>ce&&(fe=J===n.hourElement?fe-ce-on(!n.amPM):ie,Oe&&I(void 0,1,n.hourElement)),n.amPM&&me&&(Ce===1?fe+ue===23:Math.abs(fe-ue)>Ce)&&(n.amPM.textContent=n.l10n.amPM[on(n.amPM.textContent===n.l10n.amPM[0])]),J.value=zt(fe)}}return i(),n}function oi(e,t){for(var n=Array.prototype.slice.call(e).filter(function(a){return a instanceof HTMLElement}),r=[],i=0;i<n.length;i++){var o=n[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=DP(o,t||{}),r.push(o._flatpickr)}catch(a){console.error(a)}}return r.length===1?r[0]:r}typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return oi(this,e)},HTMLElement.prototype.flatpickr=function(e){return oi([this],e)});var ht=function(e,t){return typeof e=="string"?oi(window.document.querySelectorAll(e),t):e instanceof Node?oi([e],t):oi(e,t)};ht.defaultConfig={},ht.l10ns={en:Et({},io),default:Et({},io)},ht.localize=function(e){ht.l10ns.default=Et(Et({},ht.l10ns.default),e)},ht.setDefaults=function(e){ht.defaultConfig=Et(Et({},ht.defaultConfig),e)},ht.parseDate=Gc({}),ht.formatDate=dg({}),ht.compareDates=Kt,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(e){return oi(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof e=="string"?parseInt(e,10):e))},typeof window!="undefined"&&(window.flatpickr=ht);const OP=$u(Object.freeze(Object.defineProperty({__proto__:null,default:ht},Symbol.toStringTag,{value:"Module"})));(function(e){function t(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(U){return typeof U}:t=function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},t(R)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(x),r=o(OI),i=o(OP);function o(R){return R&&R.__esModule?R:{default:R}}function a(){if(typeof WeakMap!="function")return null;var R=new WeakMap;return a=function(){return R},R}function s(R){if(R&&R.__esModule)return R;if(R===null||t(R)!=="object"&&typeof R!="function")return{default:R};var L=a();if(L&&L.has(R))return L.get(R);var U={},W=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var re in R)if(Object.prototype.hasOwnProperty.call(R,re)){var se=W?Object.getOwnPropertyDescriptor(R,re):null;se&&(se.get||se.set)?Object.defineProperty(U,re,se):U[re]=R[re]}return U.default=R,L&&L.set(R,U),U}function l(R){return h(R)||f(R)||d(R)||u()}function u(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2458
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(R,L){if(R){if(typeof R=="string")return p(R,L);var U=Object.prototype.toString.call(R).slice(8,-1);if(U==="Object"&&R.constructor&&(U=R.constructor.name),U==="Map"||U==="Set")return Array.from(R);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return p(R,L)}}function f(R){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(R))return Array.from(R)}function h(R){if(Array.isArray(R))return p(R)}function p(R,L){(L==null||L>R.length)&&(L=R.length);for(var U=0,W=new Array(L);U<L;U++)W[U]=R[U];return W}function m(){return m=Object.assign||function(R){for(var L=1;L<arguments.length;L++){var U=arguments[L];for(var W in U)Object.prototype.hasOwnProperty.call(U,W)&&(R[W]=U[W])}return R},m.apply(this,arguments)}function g(R,L){if(R==null)return{};var U=b(R,L),W,re;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(R);for(re=0;re<se.length;re++)W=se[re],!(L.indexOf(W)>=0)&&Object.prototype.propertyIsEnumerable.call(R,W)&&(U[W]=R[W])}return U}function b(R,L){if(R==null)return{};var U={},W=Object.keys(R),re,se;for(se=0;se<W.length;se++)re=W[se],!(L.indexOf(re)>=0)&&(U[re]=R[re]);return U}function w(R,L){var U=Object.keys(R);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(R);L&&(W=W.filter(function(re){return Object.getOwnPropertyDescriptor(R,re).enumerable})),U.push.apply(U,W)}return U}function S(R){for(var L=1;L<arguments.length;L++){var U=arguments[L]!=null?arguments[L]:{};L%2?w(Object(U),!0).forEach(function(W){N(R,W,U[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(U)):w(Object(U)).forEach(function(W){Object.defineProperty(R,W,Object.getOwnPropertyDescriptor(U,W))})}return R}function C(R,L){if(!(R instanceof L))throw new TypeError("Cannot call a class as a function")}function I(R,L){for(var U=0;U<L.length;U++){var W=L[U];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(R,W.key,W)}}function y(R,L,U){return L&&I(R.prototype,L),R}function A(R,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(L&&L.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),L&&E(R,L)}function E(R,L){return E=Object.setPrototypeOf||function(W,re){return W.__proto__=re,W},E(R,L)}function k(R){var L=O();return function(){var W=T(R),re;if(L){var se=T(this).constructor;re=Reflect.construct(W,arguments,se)}else re=W.apply(this,arguments);return F(this,re)}}function F(R,L){return L&&(t(L)==="object"||typeof L=="function")?L:Y(R)}function Y(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function O(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(R){return!1}}function T(R){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(U){return U.__proto__||Object.getPrototypeOf(U)},T(R)}function N(R,L,U){return L in R?Object.defineProperty(R,L,{value:U,enumerable:!0,configurable:!0,writable:!0}):R[L]=U,R}var V=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],j=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),$=["onCreate","onDestroy"],M=r.default.func,H=function(R){A(U,R);var L=k(U);function U(){var W;C(this,U);for(var re=arguments.length,se=new Array(re),ae=0;ae<re;ae++)se[ae]=arguments[ae];return W=L.call.apply(L,[this].concat(se)),N(Y(W),"createFlatpickrInstance",function(){var X=S({onClose:function(){W.node.blur&&W.node.blur()}},W.props.options);X=Q(X,W.props),W.flatpickr=(0,i.default)(W.node,X),W.props.hasOwnProperty("value")&&W.flatpickr.setDate(W.props.value,!1);var le=W.props.onCreate;le&&le(W.flatpickr)}),N(Y(W),"destroyFlatpickrInstance",function(){var X=W.props.onDestroy;X&&X(W.flatpickr),W.flatpickr.destroy(),W.flatpickr=null}),N(Y(W),"handleNodeChange",function(X){W.node=X,W.flatpickr&&(W.destroyFlatpickrInstance(),W.createFlatpickrInstance())}),W}return y(U,[{key:"componentDidUpdate",value:function(re){var se=this.props.options,ae=re.options;se=Q(se,this.props),ae=Q(ae,re);for(var X=Object.getOwnPropertyNames(se),le=X.length-1;le>=0;le--){var Z=X[le],he=se[Z];he!==ae[Z]&&(V.indexOf(Z)!==-1&&!Array.isArray(he)&&(he=[he]),this.flatpickr.set(Z,he))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&re.value&&Array.isArray(re.value)&&this.props.value.every(function(Se,He){re[He]}))&&this.props.value!==re.value&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentDidMount",value:function(){this.createFlatpickrInstance()}},{key:"componentWillUnmount",value:function(){this.destroyFlatpickrInstance()}},{key:"render",value:function(){var re=this.props,se=re.options,ae=re.defaultValue,X=re.value,le=re.children,Z=re.render,he=g(re,["options","defaultValue","value","children","render"]);return V.forEach(function(Se){delete he[Se]}),$.forEach(function(Se){delete he[Se]}),Z?Z(S(S({},he),{},{defaultValue:ae,value:X}),this.handleNodeChange):se.wrap?n.default.createElement("div",m({},he,{ref:this.handleNodeChange}),le):n.default.createElement("input",m({},he,{defaultValue:ae,ref:this.handleNodeChange}))}}]),U}(n.Component);N(H,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:j,onOpen:j,onClose:j,onMonthChange:j,onYearChange:j,onReady:j,onValueUpdate:j,onDayCreate:j,onCreate:M,onDestroy:M,value:r.default.oneOfType([r.default.string,r.default.array,r.default.object,r.default.number]),children:r.default.node,className:r.default.string,render:r.default.func}),N(H,"defaultProps",{options:{}});function Q(R,L){var U=S({},R);return V.forEach(function(W){if(L.hasOwnProperty(W)){var re;U[W]&&!Array.isArray(U[W])?U[W]=[U[W]]:U[W]||(U[W]=[]);var se=Array.isArray(L[W])?L[W]:[L[W]];(re=U[W]).push.apply(re,l(se))}}),U}var te=H;e.default=te})(lg);const hg=hn(lg);var pg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",u="day",d="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var j=["th","st","nd","rd"],$=V%100;return"["+V+(j[($-20)%10]||j[$]||j[0])+"]"}},C=function(V,j,$){var M=String(V);return!M||M.length>=j?V:""+Array(j+1-M.length).join($)+V},I={s:C,z:function(V){var j=-V.utcOffset(),$=Math.abs(j),M=Math.floor($/60),H=$%60;return(j<=0?"+":"-")+C(M,2,"0")+":"+C(H,2,"0")},m:function V(j,$){if(j.date()<$.date())return-V($,j);var M=12*($.year()-j.year())+($.month()-j.month()),H=j.clone().add(M,f),Q=$-H<0,te=j.clone().add(M+(Q?-1:1),f);return+(-(M+($-H)/(Q?H-te:te-H))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:f,y:p,w:d,d:u,D:m,h:l,m:s,s:a,ms:o,Q:h}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},y="en",A={};A[y]=S;var E="$isDayjsObject",k=function(V){return V instanceof T||!(!V||!V[E])},F=function V(j,$,M){var H;if(!j)return y;if(typeof j=="string"){var Q=j.toLowerCase();A[Q]&&(H=Q),$&&(A[Q]=$,H=Q);var te=j.split("-");if(!H&&te.length>1)return V(te[0])}else{var R=j.name;A[R]=j,H=R}return!M&&H&&(y=H),H||!M&&y},Y=function(V,j){if(k(V))return V.clone();var $=typeof j=="object"?j:{};return $.date=V,$.args=arguments,new T($)},O=I;O.l=F,O.i=k,O.w=function(V,j){return Y(V,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var T=function(){function V($){this.$L=F($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[E]=!0}var j=V.prototype;return j.parse=function($){this.$d=function(M){var H=M.date,Q=M.utc;if(H===null)return new Date(NaN);if(O.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var te=H.match(b);if(te){var R=te[2]-1||0,L=(te[7]||"0").substring(0,3);return Q?new Date(Date.UTC(te[1],R,te[3]||1,te[4]||0,te[5]||0,te[6]||0,L)):new Date(te[1],R,te[3]||1,te[4]||0,te[5]||0,te[6]||0,L)}}return new Date(H)}($),this.init()},j.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},j.$utils=function(){return O},j.isValid=function(){return this.$d.toString()!==g},j.isSame=function($,M){var H=Y($);return this.startOf(M)<=H&&H<=this.endOf(M)},j.isAfter=function($,M){return Y($)<this.startOf(M)},j.isBefore=function($,M){return this.endOf(M)<Y($)},j.$g=function($,M,H){return O.u($)?this[M]:this.set(H,$)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function($,M){var H=this,Q=!!O.u(M)||M,te=O.p($),R=function(le,Z){var he=O.w(H.$u?Date.UTC(H.$y,Z,le):new Date(H.$y,Z,le),H);return Q?he:he.endOf(u)},L=function(le,Z){return O.w(H.toDate()[le].apply(H.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(Z)),H)},U=this.$W,W=this.$M,re=this.$D,se="set"+(this.$u?"UTC":"");switch(te){case p:return Q?R(1,0):R(31,11);case f:return Q?R(1,W):R(0,W+1);case d:var ae=this.$locale().weekStart||0,X=(U<ae?U+7:U)-ae;return R(Q?re-X:re+(6-X),W);case u:case m:return L(se+"Hours",0);case l:return L(se+"Minutes",1);case s:return L(se+"Seconds",2);case a:return L(se+"Milliseconds",3);default:return this.clone()}},j.endOf=function($){return this.startOf($,!1)},j.$set=function($,M){var H,Q=O.p($),te="set"+(this.$u?"UTC":""),R=(H={},H[u]=te+"Date",H[m]=te+"Date",H[f]=te+"Month",H[p]=te+"FullYear",H[l]=te+"Hours",H[s]=te+"Minutes",H[a]=te+"Seconds",H[o]=te+"Milliseconds",H)[Q],L=Q===u?this.$D+(M-this.$W):M;if(Q===f||Q===p){var U=this.clone().set(m,1);U.$d[R](L),U.init(),this.$d=U.set(m,Math.min(this.$D,U.daysInMonth())).$d}else R&&this.$d[R](L);return this.init(),this},j.set=function($,M){return this.clone().$set($,M)},j.get=function($){return this[O.p($)]()},j.add=function($,M){var H,Q=this;$=Number($);var te=O.p(M),R=function(W){var re=Y(Q);return O.w(re.date(re.date()+Math.round(W*$)),Q)};if(te===f)return this.set(f,this.$M+$);if(te===p)return this.set(p,this.$y+$);if(te===u)return R(1);if(te===d)return R(7);var L=(H={},H[s]=r,H[l]=i,H[a]=n,H)[te]||1,U=this.$d.getTime()+$*L;return O.w(U,this)},j.subtract=function($,M){return this.add(-1*$,M)},j.format=function($){var M=this,H=this.$locale();if(!this.isValid())return H.invalidDate||g;var Q=$||"YYYY-MM-DDTHH:mm:ssZ",te=O.z(this),R=this.$H,L=this.$m,U=this.$M,W=H.weekdays,re=H.months,se=H.meridiem,ae=function(Z,he,Se,He){return Z&&(Z[he]||Z(M,Q))||Se[he].slice(0,He)},X=function(Z){return O.s(R%12||12,Z,"0")},le=se||function(Z,he,Se){var He=Z<12?"AM":"PM";return Se?He.toLowerCase():He};return Q.replace(w,function(Z,he){return he||function(Se){switch(Se){case"YY":return String(M.$y).slice(-2);case"YYYY":return O.s(M.$y,4,"0");case"M":return U+1;case"MM":return O.s(U+1,2,"0");case"MMM":return ae(H.monthsShort,U,re,3);case"MMMM":return ae(re,U);case"D":return M.$D;case"DD":return O.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return ae(H.weekdaysMin,M.$W,W,2);case"ddd":return ae(H.weekdaysShort,M.$W,W,3);case"dddd":return W[M.$W];case"H":return String(R);case"HH":return O.s(R,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return le(R,L,!0);case"A":return le(R,L,!1);case"m":return String(L);case"mm":return O.s(L,2,"0");case"s":return String(M.$s);case"ss":return O.s(M.$s,2,"0");case"SSS":return O.s(M.$ms,3,"0");case"Z":return te}return null}(Z)||te.replace(":","")})},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function($,M,H){var Q,te=this,R=O.p(M),L=Y($),U=(L.utcOffset()-this.utcOffset())*r,W=this-L,re=function(){return O.m(te,L)};switch(R){case p:Q=re()/12;break;case f:Q=re();break;case h:Q=re()/3;break;case d:Q=(W-U)/6048e5;break;case u:Q=(W-U)/864e5;break;case l:Q=W/i;break;case s:Q=W/r;break;case a:Q=W/n;break;default:Q=W}return H?Q:O.a(Q)},j.daysInMonth=function(){return this.endOf(f).$D},j.$locale=function(){return A[this.$L]},j.locale=function($,M){if(!$)return this.$L;var H=this.clone(),Q=F($,M,!0);return Q&&(H.$L=Q),H},j.clone=function(){return O.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},V}(),N=T.prototype;return Y.prototype=N,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",u],["$M",f],["$y",p],["$D",m]].forEach(function(V){N[V[1]]=function(j){return this.$g(j,V[0],V[1])}}),Y.extend=function(V,j){return V.$i||(V(j,T,Y),V.$i=!0),Y},Y.locale=F,Y.isDayjs=k,Y.unix=function(V){return Y(1e3*V)},Y.en=A[y],Y.Ls=A,Y.p={},Y})})(pg);var RP=pg.exports;const kt=hn(RP);var gg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(i,o,a){var s,l=function(h,p,m){m===void 0&&(m={});var g=new Date(h),b=function(w,S){S===void 0&&(S={});var C=S.timeZoneName||"short",I=w+"|"+C,y=r[I];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:w,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:C}),r[I]=y),y}(p,m);return b.formatToParts(g)},u=function(h,p){for(var m=l(h,p),g=[],b=0;b<m.length;b+=1){var w=m[b],S=w.type,C=w.value,I=n[S];I>=0&&(g[I]=parseInt(C,10))}var y=g[3],A=y===24?0:y,E=g[0]+"-"+g[1]+"-"+g[2]+" "+A+":"+g[4]+":"+g[5]+":000",k=+h;return(a.utc(E).valueOf()-(k-=k%1e3))/6e4},d=o.prototype;d.tz=function(h,p){h===void 0&&(h=s);var m,g=this.utcOffset(),b=this.toDate(),w=b.toLocaleString("en-US",{timeZone:h}),S=Math.round((b-new Date(w))/1e3/60),C=15*-Math.round(b.getTimezoneOffset()/15)-S;if(!Number(C))m=this.utcOffset(0,p);else if(m=a(w,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(C,!0),p){var I=m.utcOffset();m=m.add(g-I,"minute")}return m.$x.$timezone=h,m},d.offsetName=function(h){var p=this.$x.$timezone||a.tz.guess(),m=l(this.valueOf(),p,{timeZoneName:h}).find(function(g){return g.type.toLowerCase()==="timezonename"});return m&&m.value};var f=d.startOf;d.startOf=function(h,p){if(!this.$x||!this.$x.$timezone)return f.call(this,h,p);var m=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(m,h,p).tz(this.$x.$timezone,!0)},a.tz=function(h,p,m){var g=m&&p,b=m||p||s,w=u(+a(),b);if(typeof h!="string")return a(h).tz(b);var S=function(A,E,k){var F=A-60*E*1e3,Y=u(F,k);if(E===Y)return[F,E];var O=u(F-=60*(Y-E)*1e3,k);return Y===O?[F,Y]:[A-60*Math.min(Y,O)*1e3,Math.max(Y,O)]}(a.utc(h,g).valueOf(),w,b),C=S[0],I=S[1],y=a(C).utcOffset(I);return y.$x.$timezone=b,y},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(h){s=h}}})})(gg);var LP=gg.exports;const MP=hn(LP);var mg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,a,s){var l=a.prototype;s.utc=function(g){var b={date:g,utc:!0,args:arguments};return new a(b)},l.utc=function(g){var b=s(this.toDate(),{locale:this.$L,utc:!0});return g?b.add(this.utcOffset(),n):b},l.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var u=l.parse;l.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),u.call(this,g)};var d=l.init;l.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else d.call(this)};var f=l.utcOffset;l.utcOffset=function(g,b){var w=this.$utils().u;if(w(g))return this.$u?0:w(this.$offset)?f.call(this):this.$offset;if(typeof g=="string"&&(g=function(y){y===void 0&&(y="");var A=y.match(r);if(!A)return null;var E=(""+A[0]).match(i)||["-",0,0],k=E[0],F=60*+E[1]+ +E[2];return F===0?0:k==="+"?F:-F}(g),g===null))return this;var S=Math.abs(g)<=16?60*g:g,C=this;if(b)return C.$offset=S,C.$u=g===0,C;if(g!==0){var I=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(C=this.local().add(S+I,n)).$offset=S,C.$x.$localOffset=I}else C=this.utc();return C};var h=l.format;l.format=function(g){var b=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,b)},l.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var p=l.toDate;l.toDate=function(g){return g==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var m=l.diff;l.diff=function(g,b,w){if(g&&this.$u===g.$u)return m.call(this,g,b,w);var S=this.local(),C=s(g).local();return m.call(S,C,b,w)}}})})(mg);var BP=mg.exports;const $P=hn(BP);kt.extend(MP),kt.extend($P);const NP=e=>{if(!kt(e).isAfter(kt(Date.now()).subtract(15,"minute")))return kt(Date.now()).add(15,"minute").toDate()},Qc=({defaultDate:e,minDate:t,maxDate:n,dateFormat:r="DD.MM.YYYY HH:mm",onChange:i})=>{const o=a=>{if(a&&a.length){const s=kt.utc(a[0]).toISOString();i(s)}else i("")};return c.jsx(v.Box,{sx:{width:"100%",".flatpickr-input":{width:"100%",paddingLeft:"0.5rem",boxSizing:"border-box",fontSize:"1rem",lineHeight:1.3,minHeight:"37px",color:"rgba(0, 0, 0, 0.87)",backgroundColor:"#fff",backgroundClip:"padding-box",border:"1px solid #ced4da",borderRadius:"0.375rem",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"}}},children:c.jsx(hg,{value:e&&kt(e).format("YYYY-MM-DD HH:mm")||void 0,onChange:o,className:"flatpickr-input",options:{enableTime:!0,dateFormat:r,position:"below",minDate:t||NP(e),maxDate:n,parseDate:(a,s)=>kt(a,s).toDate(),formatDate:(a,s)=>kt(a).format(s),time_24hr:!0,minuteIncrement:1}})})},FP=({required:e,defaultValue:t,onChangeFromDate:n,onChangeToDate:r})=>{const[i,o]=t;return c.jsxs(v.Box,{sx:{marginBottom:"16px"},children:[c.jsx(v.FormControl,{children:c.jsx(v.FormLabel,{required:e,color:"primary",children:"Duration"})}),c.jsxs(v.Grid,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",children:[c.jsx(ro,{label:"From date",defaultValue:i,required:e,onChange:n}),c.jsx(ro,{label:"To date",defaultValue:o,required:e,onChange:r})]})]})},vg=e=>{if(!e)return[];const{from:t,to:n}=e,r=[];return t&&r.push(kt(t).toDate()),n&&r.push(kt(n).toDate()),r},zP=({label:e,defaultValue:t,required:n,onChange:r})=>{const[i,o]=x.useState(vg(t)),[a,s]=x.useState(!1),l=()=>s(!a),u=d=>{if(d&&d.length>0){const f="YYYY-MM-DD",h=kt(d[0]).format(f),p=kt(d[1]).format(f);r({from:h,to:p})}else d&&d.length===0&&(r({from:"",to:""}),l());o(d)};return c.jsxs(v.FormControl,{sx:{marginBottom:"16px"},children:[c.jsx(v.FormLabel,{required:n,color:"primary",children:e}),c.jsx(v.Box,{sx:{width:"100%",".flatpickr-input":{width:"100%",padding:"0.5rem 0.75rem",boxSizing:"border-box",fontSize:"1rem",lineHeight:1.3,color:"rgba(0, 0, 0, 0.87)",backgroundColor:"#fff",backgroundClip:"padding-box",border:"1px solid #ced4da",borderRadius:"0.375rem",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"}}},children:c.jsx(hg,{value:i,onChange:u,placeholder:"Select Date...",className:"flatpickr-input",options:{mode:"range",enableTime:!1,dateFormat:"DD.MM.YYYY",altFormat:"DD.MM.YYYY",position:"below",parseDate:(d,f)=>kt(d,f).toDate(),formatDate:(d,f)=>kt(d).format(f),defaultDate:vg(t)||void 0}})}),c.jsx(nt,{showToast:a,message:"Succesfully cleared the duration time",color:"primary",hideToast:l})]})},jP=({environment:e,labels:t,setNoPermission:n})=>{const{featureDisabled:r,noPermissionMessage:i,tryAgainButton:o}=t,a=()=>{Vi(e).signOut().then(()=>n(null)).catch(s=>{console.error("There was a problem logging out the user:",s)})};return c.jsx(v.Box,{"data-testid":"no permission card",sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",bgcolor:"background.body"},children:c.jsx(v.Card,{variant:"outlined",sx:{maxWidth:300,overflow:"hidden",borderRadius:"md"},children:c.jsxs(v.CardContent,{children:[c.jsx(v.Typography,{level:"h2",textAlign:"center",mb:2,children:r}),c.jsx(v.Typography,{level:"body-md",color:"neutral",mb:2,children:i}),c.jsx(v.Box,{display:"flex",justifyContent:"center",children:c.jsx(v.Button,{variant:"solid",color:"neutral",fullWidth:!0,size:"sm",onClick:a,children:o})})]})})})},bg=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],qc=e=>e.reduce((t,n)=>(t[n.key]=n.value,t),{}),UP=({labels:e,type:t,defaultValue:n,onChange:r})=>{const[i,o]=x.useState(bg(n)),[a,s]=x.useState(null),[l,u]=x.useState(""),[d,f]=x.useState(""),[h,p]=x.useState(""),[m,g]=x.useState("");x.useEffect(()=>o(bg(n)),[n]);const b=()=>{const I=[...i];I.push({key:l,value:h}),o(I),u(""),p(""),r(qc(I))},w=I=>{const y=i.filter((A,E)=>E!==I);o(y),r(qc(y))},S=(I,y)=>{f(y.key),g(y.value),s(I)},C=I=>{const y=[...i];y[I]={key:d,value:m},o(y),s(null),f(""),g(""),r(qc(y))};return c.jsxs(v.Box,{children:[i.map((I,y)=>c.jsx(v.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:c.jsx(v.CardContent,{style:{flex:1},children:a===y?c.jsxs(v.Box,{display:"flex",alignItems:"center",children:[c.jsx(v.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:d,onChange:A=>f(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),c.jsx(v.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:m,onChange:A=>g(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),c.jsx(v.Tooltip,{title:e.save,children:d&&m?c.jsx(v.IconButton,{onClick:()=>C(y),children:c.jsx(De.Check,{})}):c.jsx("span",{children:c.jsx(v.IconButton,{disabled:!0,children:c.jsx(De.Check,{})})})})]}):c.jsxs(v.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[c.jsxs(v.Box,{children:[c.jsxs(v.Typography,{style:{fontWeight:"bold"},children:[e.keyDynamicFields,": ",c.jsx(v.Typography,{whiteSpace:"wrap",children:I.key})]}),c.jsxs(v.Typography,{style:{color:"gray"},children:[e.valueDynamicFields,": ",c.jsx(v.Typography,{whiteSpace:"wrap",children:I.value})]})]}),c.jsxs(v.Box,{children:[c.jsx(v.Tooltip,{title:e.edit,children:c.jsx(v.IconButton,{onClick:()=>S(y,I),children:c.jsx(De.Edit,{})})}),c.jsx(v.Tooltip,{title:e.delete,children:c.jsx(v.IconButton,{onClick:()=>w(y),children:c.jsx(De.Delete,{})})})]})]})})},`dynamic-fields-${t}-${y}`)),c.jsxs(v.Box,{display:"flex",alignItems:"center",style:{marginTop:i&&i.length?"20px":"0px"},children:[c.jsx(v.Input,{size:"md",variant:"outlined",color:"neutral",value:l,placeholder:e.keyDynamicFields,onChange:I=>u(I.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),c.jsx(v.Input,{size:"md",variant:"outlined",color:"neutral",value:h,onChange:I=>p(I.target.value),placeholder:e.valueDynamicFields,sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),c.jsx(v.Tooltip,{title:e.add,children:l&&h?c.jsx(v.Button,{onClick:b,children:c.jsx(De.Add,{})}):c.jsx("span",{children:c.jsx(v.Button,{disabled:!0,children:c.jsx(De.Add,{})})})})]})]})};function ao(e,t,n){return(t=tc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yg(Object(n),!0).forEach(function(r){ao(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tc(r.key),r)}}function HP(e,t,n){return t&&xg(e.prototype,t),n&&xg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jc(e,t){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Jc(e,t)}function WP(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)}function rs(e){return rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rs(e)}function Cg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Cg=function(){return!!e})()}function GP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YP(e,t){if(t&&(xr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GP(e)}function KP(e){var t=Cg();return function(){var n,r=rs(e);if(t){var i=rs(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return YP(this,n)}}function Xc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function QP(e){if(Array.isArray(e))return Xc(e)}function qP(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wg(e,t){if(e){if(typeof e=="string")return Xc(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xc(e,t):void 0}}function JP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2459
2459
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ai(e){return QP(e)||qP(e)||wg(e)||JP()}function XP(e){if(Array.isArray(e))return e}function ZP(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function eD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2460
2460
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vn(e,t){return XP(e)||ZP(e,t)||wg(e,t)||eD()}function Cn(e,t){if(e==null)return{};var n,r,i=Ae(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function tD(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Zc=x.useLayoutEffect,nD=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],is=function(){};function rD(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function iD(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&o.push("".concat(rD(e,a)));return o.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var os=function(t){return hD(t)?t.filter(Boolean):xr(t)==="object"&&t!==null?[t]:[]},Ig=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Cn(t,nD);return ve({},n)},rt=function(t,n,r){var i=t.cx,o=t.getStyles,a=t.getClassNames,s=t.className;return{css:o(n,t),className:i(r!=null?r:{},a(n,t),s)}};function as(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function oD(e){return as(e)?window.innerHeight:e.clientHeight}function Sg(e){return as(e)?window.pageYOffset:e.scrollTop}function ss(e,t){if(as(e)){window.scrollTo(0,t);return}e.scrollTop=t}function aD(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function sD(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function ls(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:is,i=Sg(e),o=t-i,a=10,s=0;function l(){s+=a;var u=sD(s,i,o,n);ss(e,u),s<n?window.requestAnimationFrame(l):r(e)}l()}function Ag(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?ss(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&ss(e,Math.max(t.offsetTop-i,0))}function lD(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function Tg(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function cD(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}var Eg=!1,uD={get passive(){return Eg=!0}},cs=typeof window!="undefined"?window:{};cs.addEventListener&&cs.removeEventListener&&(cs.addEventListener("p",is,uD),cs.removeEventListener("p",is,!1));var dD=Eg;function fD(e){return e!=null}function hD(e){return Array.isArray(e)}function so(e,t,n){return e?t:n}function GF(e){return e}function YF(e){return e}var pD=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(t).filter(function(a){var s=Vn(a,1),l=s[0];return!r.includes(l)});return o.reduce(function(a,s){var l=Vn(s,2),u=l[0],d=l[1];return a[u]=d,a},{})},gD=["children","innerProps"],mD=["children","innerProps"];function vD(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=aD(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var d=l.getBoundingClientRect(),f=d.height,h=n.getBoundingClientRect(),p=h.bottom,m=h.height,g=h.top,b=n.offsetParent.getBoundingClientRect(),w=b.top,S=a?window.innerHeight:oD(l),C=Sg(l),I=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),A=w-y,E=S-g,k=A+C,F=f-C-g,Y=p-S+C+I,O=C+g-y,T=160;switch(i){case"auto":case"bottom":if(E>=m)return{placement:"bottom",maxHeight:t};if(F>=m&&!a)return o&&ls(l,Y,T),{placement:"bottom",maxHeight:t};if(!a&&F>=r||a&&E>=r){o&&ls(l,Y,T);var N=a?E-I:F-I;return{placement:"bottom",maxHeight:N}}if(i==="auto"||a){var V=t,j=a?A:k;return j>=r&&(V=Math.min(j-I-s,t)),{placement:"top",maxHeight:V}}if(i==="bottom")return o&&ss(l,Y),{placement:"bottom",maxHeight:t};break;case"top":if(A>=m)return{placement:"top",maxHeight:t};if(k>=m&&!a)return o&&ls(l,O,T),{placement:"top",maxHeight:t};if(!a&&k>=r||a&&A>=r){var $=t;return(!a&&k>=r||a&&A>=r)&&($=a?A-y:k-y),o&&ls(l,O,T),{placement:"top",maxHeight:$}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function bD(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var kg=function(t){return t==="auto"?"bottom":t},yD=function(t,n){var r,i=t.placement,o=t.theme,a=o.borderRadius,s=o.spacing,l=o.colors;return ve((r={label:"menu"},ao(r,bD(i),"100%"),ao(r,"position","absolute"),ao(r,"width","100%"),ao(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},_g=x.createContext(null),xD=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,a=t.menuPosition,s=t.menuShouldScrollIntoView,l=t.theme,u=x.useContext(_g)||{},d=u.setPortalPlacement,f=x.useRef(null),h=x.useState(i),p=Vn(h,2),m=p[0],g=p[1],b=x.useState(null),w=Vn(b,2),S=w[0],C=w[1],I=l.spacing.controlHeight;return Zc(function(){var y=f.current;if(y){var A=a==="fixed",E=s&&!A,k=vD({maxHeight:i,menuEl:y,minHeight:r,placement:o,shouldScroll:E,isFixedPosition:A,controlHeight:I});g(k.maxHeight),C(k.placement),d==null||d(k.placement)}},[i,o,a,s,r,d,I]),n({ref:f,placerProps:ve(ve({},t),{},{placement:S||kg(o),maxHeight:m})})},CD=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return ge.jsx("div",D({},rt(t,"menu",{menu:!0}),{ref:r},i),n)},wD=CD,ID=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return ve({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},SD=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return ge.jsx("div",D({},rt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},Pg=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return ve({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},AD=Pg,TD=Pg,ED=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=Cn(t,gD);return ge.jsx("div",D({},rt(ve(ve({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},kD=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=Cn(t,mD);return ge.jsx("div",D({},rt(ve(ve({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},_D=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},PD=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,a=t.menuPlacement,s=t.menuPosition,l=x.useRef(null),u=x.useRef(null),d=x.useState(kg(a)),f=Vn(d,2),h=f[0],p=f[1],m=x.useMemo(function(){return{setPortalPlacement:p}},[]),g=x.useState(null),b=Vn(g,2),w=b[0],S=b[1],C=x.useCallback(function(){if(i){var E=lD(i),k=s==="fixed"?0:window.pageYOffset,F=E[h]+k;(F!==(w==null?void 0:w.offset)||E.left!==(w==null?void 0:w.rect.left)||E.width!==(w==null?void 0:w.rect.width))&&S({offset:F,rect:E})}},[i,s,h,w==null?void 0:w.offset,w==null?void 0:w.rect.left,w==null?void 0:w.rect.width]);Zc(function(){C()},[C]);var I=x.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&l.current&&(u.current=NS(i,l.current,C,{elementResize:"ResizeObserver"in window}))},[i,C]);Zc(function(){I()},[I]);var y=x.useCallback(function(E){l.current=E,I()},[I]);if(!n&&s!=="fixed"||!w)return null;var A=ge.jsx("div",D({ref:y},rt(ve(ve({},t),{},{offset:w.offset,position:s,rect:w.rect}),"menuPortal",{"menu-portal":!0}),o),r);return ge.jsx(_g.Provider,{value:m},n?Re.createPortal(A,n):A)},DD=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},OD=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return ge.jsx("div",D({},rt(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},RD=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,a=t.selectProps.controlShouldRenderValue;return ve({alignItems:"center",display:i&&o&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},LD=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return ge.jsx("div",D({},rt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},MD=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},BD=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",D({},rt(t,"indicatorsContainer",{indicators:!0}),r),n)},Dg,$D=["size"],ND=["innerProps","isRtl","size"],FD={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Og=function(t){var n=t.size,r=Cn(t,$D);return ge.jsx("svg",D({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:FD},r))},eu=function(t){return ge.jsx(Og,D({size:20},t),ge.jsx("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Rg=function(t){return ge.jsx(Og,D({size:20},t),ge.jsx("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Lg=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return ve({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:o*2,":hover":{color:r?a.neutral80:a.neutral40}})},zD=Lg,jD=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",D({},rt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ge.jsx(Rg,null))},UD=Lg,VD=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",D({},rt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ge.jsx(eu,null))},HD=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return ve({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:o*2,marginTop:o*2})},WD=function(t){var n=t.innerProps;return ge.jsx("span",D({},n,rt(t,"indicatorSeparator",{"indicator-separator":!0})))},GD=ge.keyframes(Dg||(Dg=tD([`
|
|
2461
2461
|
0%, 80%, 100% { opacity: 0; }
|
|
2462
2462
|
40% { opacity: 1; }
|
|
2463
|
-
`]))),YD=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,s=o.spacing.baseUnit;return ve({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2})},tu=function(t){var n=t.delay,r=t.offset;return ge.jsx("span",{css:ge.css({animation:"".concat(GD," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},KD=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=Cn(t,ND);return ge.jsx("div",D({},rt(ve(ve({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ge.jsx(tu,{delay:0,offset:r}),ge.jsx(tu,{delay:160,offset:!0}),ge.jsx(tu,{delay:320,offset:!r}))},QD=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,s=o.borderRadius,l=o.spacing;return ve({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:i?a.primary:a.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},qD=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,s=t.menuIsOpen;return ge.jsx("div",D({ref:o},rt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":s}),a,{"aria-disabled":r||void 0}),n)},JD=qD,XD=["data"],ZD=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},eO=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,s=t.headingProps,l=t.innerProps,u=t.label,d=t.theme,f=t.selectProps;return ge.jsx("div",D({},rt(t,"group",{group:!0}),l),ge.jsx(a,D({},s,{selectProps:f,theme:d,getStyles:i,getClassNames:o,cx:r}),u),ge.jsx("div",null,n))},tO=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return ve({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},nO=function(t){var n=Ig(t);n.data;var r=Cn(n,XD);return ge.jsx("div",D({},rt(t,"groupHeading",{"group-heading":!0}),r))},rO=eO,iO=["innerRef","isDisabled","isHidden","inputClassName"],oO=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,s=o.colors;return ve(ve({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},aO),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:s.neutral80})},Mg={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},aO={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ve({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Mg)},sO=function(t){return ve({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Mg)},lO=function(t){var n=t.cx,r=t.value,i=Ig(t),o=i.innerRef,a=i.isDisabled,s=i.isHidden,l=i.inputClassName,u=Cn(i,iO);return ge.jsx("div",D({},rt(t,"input",{"input-container":!0}),{"data-value":r||""}),ge.jsx("input",D({className:n({input:!0},l),ref:o,style:sO(s),disabled:a},u)))},cO=lO,uO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors;return ve({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},dO=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return ve({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},fO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,s=t.isFocused;return ve({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:s?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Bg=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",r,n)},hO=Bg,pO=Bg;function gO(e){var t=e.children,n=e.innerProps;return ge.jsx("div",D({role:"button"},n),t||ge.jsx(eu,{size:14}))}var mO=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,s=t.removeProps,l=t.selectProps,u=r.Container,d=r.Label,f=r.Remove;return ge.jsx(u,{data:i,innerProps:ve(ve({},rt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:l},ge.jsx(d,{data:i,innerProps:ve({},rt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),ge.jsx(f,{data:i,innerProps:ve(ve({},rt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},s),selectProps:l}))},vO=mO,bO=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,s=a.spacing,l=a.colors;return ve({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?l.primary:l.primary50}})},yO=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,s=t.innerProps;return ge.jsx("div",D({},rt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},s),n)},xO=yO,CO=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return ve({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},wO=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",D({},rt(t,"placeholder",{placeholder:!0}),r),n)},IO=wO,SO=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,a=i.colors;return ve({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},AO=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return ge.jsx("div",D({},rt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},TO=AO,EO={ClearIndicator:VD,Control:JD,DropdownIndicator:jD,DownChevron:Rg,CrossIcon:eu,Group:rO,GroupHeading:nO,IndicatorsContainer:BD,IndicatorSeparator:WD,Input:cO,LoadingIndicator:KD,Menu:wD,MenuList:SD,MenuPortal:PD,LoadingMessage:kD,NoOptionsMessage:ED,MultiValue:vO,MultiValueContainer:hO,MultiValueLabel:pO,MultiValueRemove:gO,Option:xO,Placeholder:IO,SelectContainer:OD,SingleValue:TO,ValueContainer:LD},kO=function(t){return ve(ve({},EO),t.components)},$g=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function _O(e,t){return!!(e===t||$g(e)&&$g(t))}function PO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!_O(e[n],t[n]))return!1;return!0}function DO(e,t){t===void 0&&(t=PO);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}for(var OO={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},RO=function(t){return ge.jsx("span",D({css:OO},t))},Ng=RO,LO={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,o=t.context,a=t.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return a?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,a=o===void 0?"":o,s=t.selectValue,l=t.isDisabled,u=t.isSelected,d=t.isAppleDevice,f=function(g,b){return g&&g.length?"".concat(g.indexOf(b)+1," of ").concat(g.length):""};if(n==="value"&&s)return"value ".concat(a," focused, ").concat(f(s,r),".");if(n==="menu"&&d){var h=l?" disabled":"",p="".concat(u?" selected":"").concat(h);return"".concat(a).concat(p,", ").concat(f(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},MO=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,s=t.selectValue,l=t.selectProps,u=t.id,d=t.isAppleDevice,f=l.ariaLiveMessages,h=l.getOptionLabel,p=l.inputValue,m=l.isMulti,g=l.isOptionDisabled,b=l.isSearchable,w=l.menuIsOpen,S=l.options,C=l.screenReaderStatus,I=l.tabSelectsValue,y=l.isLoading,A=l["aria-label"],E=l["aria-live"],k=x.useMemo(function(){return ve(ve({},LO),f||{})},[f]),F=x.useMemo(function(){var j="";if(n&&k.onChange){var $=n.option,M=n.options,H=n.removedValue,Q=n.removedValues,te=n.value,R=function(X){return Array.isArray(X)?null:X},L=H||$||R(te),U=L?h(L):"",W=M||Q||void 0,re=W?W.map(h):[],se=ve({isDisabled:L&&g(L,s),label:U,labels:re},n);j=k.onChange(se)}return j},[n,k,g,s,h]),Y=x.useMemo(function(){var j="",$=r||i,M=!!(r&&s&&s.includes(r));if($&&k.onFocus){var H={focused:$,label:h($),isDisabled:g($,s),isSelected:M,options:o,context:$===r?"menu":"value",selectValue:s,isAppleDevice:d};j=k.onFocus(H)}return j},[r,i,h,g,k,o,s,d]),O=x.useMemo(function(){var j="";if(w&&S.length&&!y&&k.onFilter){var $=C({count:o.length});j=k.onFilter({inputValue:p,resultsMessage:$})}return j},[o,p,w,k,S,C,y]),T=(n==null?void 0:n.action)==="initial-input-focus",N=x.useMemo(function(){var j="";if(k.guidance){var $=i?"value":w?"menu":"input";j=k.guidance({"aria-label":A,context:$,isDisabled:r&&g(r,s),isMulti:m,isSearchable:b,tabSelectsValue:I,isInitialFocus:T})}return j},[A,r,i,m,g,b,w,k,s,I,T]),V=ge.jsx(x.Fragment,null,ge.jsx("span",{id:"aria-selection"},F),ge.jsx("span",{id:"aria-focused"},Y),ge.jsx("span",{id:"aria-results"},O),ge.jsx("span",{id:"aria-guidance"},N));return ge.jsx(x.Fragment,null,ge.jsx(Ng,{id:u},T&&V),ge.jsx(Ng,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!T&&V))},BO=MO,nu=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],$O=new RegExp("["+nu.map(function(e){return e.letters}).join("")+"]","g"),Fg={},ru=0;ru<nu.length;ru++)for(var iu=nu[ru],ou=0;ou<iu.letters.length;ou++)Fg[iu.letters[ou]]=iu.base;var zg=function(t){return t.replace($O,function(n){return Fg[n]})},NO=DO(zg),jg=function(t){return t.replace(/^\s+|\s+$/g,"")},FO=function(t){return"".concat(t.label," ").concat(t.value)},zO=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=ve({ignoreCase:!0,ignoreAccents:!0,stringify:FO,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,a=i.ignoreAccents,s=i.stringify,l=i.trim,u=i.matchFrom,d=l?jg(r):r,f=l?jg(s(n)):s(n);return o&&(d=d.toLowerCase(),f=f.toLowerCase()),a&&(d=NO(d),f=zg(f)),u==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},jO=["innerRef"];function UO(e){var t=e.innerRef,n=Cn(e,jO),r=pD(n,"onExited","in","enter","exit","appear");return ge.jsx("input",D({ref:t},r,{css:ge.css({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var VO=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function HO(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=x.useRef(!1),s=x.useRef(!1),l=x.useRef(0),u=x.useRef(null),d=x.useCallback(function(b,w){if(u.current!==null){var S=u.current,C=S.scrollTop,I=S.scrollHeight,y=S.clientHeight,A=u.current,E=w>0,k=I-y-C,F=!1;k>w&&a.current&&(r&&r(b),a.current=!1),E&&s.current&&(o&&o(b),s.current=!1),E&&w>k?(n&&!a.current&&n(b),A.scrollTop=I,F=!0,a.current=!0):!E&&-w>C&&(i&&!s.current&&i(b),A.scrollTop=0,F=!0,s.current=!0),F&&VO(b)}},[n,r,i,o]),f=x.useCallback(function(b){d(b,b.deltaY)},[d]),h=x.useCallback(function(b){l.current=b.changedTouches[0].clientY},[]),p=x.useCallback(function(b){var w=l.current-b.changedTouches[0].clientY;d(b,w)},[d]),m=x.useCallback(function(b){if(b){var w=dD?{passive:!1}:!1;b.addEventListener("wheel",f,w),b.addEventListener("touchstart",h,w),b.addEventListener("touchmove",p,w)}},[p,h,f]),g=x.useCallback(function(b){b&&(b.removeEventListener("wheel",f,!1),b.removeEventListener("touchstart",h,!1),b.removeEventListener("touchmove",p,!1))},[p,h,f]);return x.useEffect(function(){if(t){var b=u.current;return m(b),function(){g(b)}}},[t,m,g]),function(b){u.current=b}}var Ug=["boxSizing","height","overflow","paddingRight","position"],Vg={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Hg(e){e.preventDefault()}function Wg(e){e.stopPropagation()}function Gg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Yg(){return"ontouchstart"in window||navigator.maxTouchPoints}var Kg=!!(typeof window!="undefined"&&window.document&&window.document.createElement),lo=0,si={capture:!1,passive:!1};function WO(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=x.useRef({}),o=x.useRef(null),a=x.useCallback(function(l){if(Kg){var u=document.body,d=u&&u.style;if(r&&Ug.forEach(function(m){var g=d&&d[m];i.current[m]=g}),r&&lo<1){var f=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,p=window.innerWidth-h+f||0;Object.keys(Vg).forEach(function(m){var g=Vg[m];d&&(d[m]=g)}),d&&(d.paddingRight="".concat(p,"px"))}u&&Yg()&&(u.addEventListener("touchmove",Hg,si),l&&(l.addEventListener("touchstart",Gg,si),l.addEventListener("touchmove",Wg,si))),lo+=1}},[r]),s=x.useCallback(function(l){if(Kg){var u=document.body,d=u&&u.style;lo=Math.max(lo-1,0),r&&lo<1&&Ug.forEach(function(f){var h=i.current[f];d&&(d[f]=h)}),u&&Yg()&&(u.removeEventListener("touchmove",Hg,si),l&&(l.removeEventListener("touchstart",Gg,si),l.removeEventListener("touchmove",Wg,si)))}},[r]);return x.useEffect(function(){if(t){var l=o.current;return a(l),function(){s(l)}}},[t,a,s]),function(l){o.current=l}}var GO=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},YO={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function KO(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,s=e.onTopArrive,l=e.onTopLeave,u=HO({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:l}),d=WO({isEnabled:n}),f=function(p){u(p),d(p)};return ge.jsx(x.Fragment,null,n&&ge.jsx("div",{onClick:GO,css:YO}),t(f))}var QO={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},qO=function(t){var n=t.name,r=t.onFocus;return ge.jsx("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:QO,value:"",onChange:function(){}})},JO=qO;function au(e){var t;return typeof window!="undefined"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function XO(){return au(/^iPhone/i)}function Qg(){return au(/^Mac/i)}function ZO(){return au(/^iPad/i)||Qg()&&navigator.maxTouchPoints>1}function eR(){return XO()||ZO()}function tR(){return Qg()||eR()}var nR=function(t){return t.label},qg=function(t){return t.label},Jg=function(t){return t.value},rR=function(t){return!!t.isDisabled},iR={clearIndicator:UD,container:DD,control:QD,dropdownIndicator:zD,group:ZD,groupHeading:tO,indicatorsContainer:MD,indicatorSeparator:HD,input:oO,loadingIndicator:YD,loadingMessage:TD,menu:yD,menuList:ID,menuPortal:_D,multiValue:uO,multiValueLabel:dO,multiValueRemove:fO,noOptionsMessage:AD,option:bO,placeholder:CO,singleValue:SO,valueContainer:RD},oR={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},aR=4,Xg=4,sR=38,lR=Xg*2,cR={baseUnit:Xg,controlHeight:sR,menuGutter:lR},su={borderRadius:aR,colors:oR,spacing:cR},uR={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Tg(),captureMenuScroll:!Tg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:zO(),formatGroupLabel:nR,getOptionLabel:qg,getOptionValue:Jg,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:rR,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!cD(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Zg(e,t,n,r){var i=im(e,t,n),o=om(e,t,n),a=rm(e,t),s=ds(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:s,index:r}}function us(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,s){return Zg(e,a,t,s)}).filter(function(a){return nm(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Zg(e,n,t,r);return nm(e,o)?o:void 0}).filter(fD)}function em(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,ai(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function tm(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,ai(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function dR(e,t){return em(us(e,t))}function nm(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!sm(e)||!o)&&am(e,{label:a,value:s,data:i},r)}function fR(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function hR(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var lu=function(t,n){var r,i=(r=t.find(function(o){return o.data===n}))===null||r===void 0?void 0:r.id;return i||null},rm=function(t,n){return t.getOptionLabel(n)},ds=function(t,n){return t.getOptionValue(n)};function im(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function om(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ds(e,t);return n.some(function(i){return ds(e,i)===r})}function am(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var sm=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},pR=1,lm=function(e){WP(n,e);var t=KP(n);function n(r){var i;if(VP(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=tR(),i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,u){var d=i.props,f=d.onChange,h=d.name;u.name=h,i.ariaOnChange(l,u),f(l,u)},i.setValue=function(l,u,d){var f=i.props,h=f.closeMenuOnSelect,p=f.isMulti,m=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:m}),h&&(i.setState({inputIsHiddenAfterUpdate:!p}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:u,option:d})},i.selectOption=function(l){var u=i.props,d=u.blurInputOnSelect,f=u.isMulti,h=u.name,p=i.state.selectValue,m=f&&i.isOptionSelected(l,p),g=i.isOptionDisabled(l,p);if(m){var b=i.getOptionValue(l);i.setValue(p.filter(function(w){return i.getOptionValue(w)!==b}),"deselect-option",l)}else if(!g)f?i.setValue([].concat(ai(p),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:h});return}d&&i.blurInput()},i.removeValue=function(l){var u=i.props.isMulti,d=i.state.selectValue,f=i.getOptionValue(l),h=d.filter(function(m){return i.getOptionValue(m)!==f}),p=so(u,h,h[0]||null);i.onChange(p,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(so(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,u=i.state.selectValue,d=u[u.length-1],f=u.slice(0,u.length-1),h=so(l,f,f[0]||null);i.onChange(h,{action:"pop-value",removedValue:d})},i.getFocusedOptionId=function(l){return lu(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return tm(us(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return iD.apply(void 0,[i.props.classNamePrefix].concat(u))},i.getOptionLabel=function(l){return rm(i.props,l)},i.getOptionValue=function(l){return ds(i.props,l)},i.getStyles=function(l,u){var d=i.props.unstyled,f=iR[l](u,d);f.boxSizing="border-box";var h=i.props.styles[l];return h?h(f,u):f},i.getClassNames=function(l,u){var d,f;return(d=(f=i.props.classNames)[l])===null||d===void 0?void 0:d.call(f,u)},i.getElementId=function(l){return"".concat(i.state.instancePrefix,"-").concat(l)},i.getComponents=function(){return kO(i.props)},i.buildCategorizedOptions=function(){return us(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return em(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,u){i.setState({ariaSelection:ve({value:l},u)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var u=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():u&&i.openMenu("first"):(u&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var u=i.props,d=u.isMulti,f=u.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&as(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var u=l.touches,d=u&&u.item(0);d&&(i.initialTouchX=d.clientX,i.initialTouchY=d.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var u=l.touches,d=u&&u.item(0);if(d){var f=Math.abs(d.clientX-i.initialTouchX),h=Math.abs(d.clientY-i.initialTouchY),p=5;i.userIsDragging=f>p||h>p}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var u=i.props.inputValue,d=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(d,{action:"input-change",prevInputValue:u}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var u=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:u}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){if(!(i.blockOptionHover||i.state.focusedOption===l)){var u=i.getFocusableOptions(),d=u.indexOf(l);i.setState({focusedOption:l,focusedOptionId:d>-1?i.getFocusedOptionId(l):null})}},i.shouldHideSelectedOptions=function(){return sm(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var u=i.props,d=u.isMulti,f=u.backspaceRemovesValue,h=u.escapeClearsValue,p=u.inputValue,m=u.isClearable,g=u.isDisabled,b=u.menuIsOpen,w=u.onKeyDown,S=u.tabSelectsValue,C=u.openMenuOnFocus,I=i.state,y=I.focusedOption,A=I.focusedValue,E=I.selectValue;if(!g&&!(typeof w=="function"&&(w(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!d||p)return;i.focusValue("previous");break;case"ArrowRight":if(!d||p)return;i.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(A)i.removeValue(A);else{if(!f)return;d?i.popValue():m&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!b||!S||!y||C&&i.isOptionSelected(y,E))return;i.selectOption(y);break;case"Enter":if(l.keyCode===229)break;if(b){if(!y||i.isComposing)return;i.selectOption(y);break}return;case"Escape":b?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:p}),i.onMenuClose()):m&&h&&i.clearValue();break;case" ":if(p)return;if(!b){i.openMenu("first");break}if(!y)return;i.selectOption(y);break;case"ArrowUp":b?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":b?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!b)return;i.focusOption("pageup");break;case"PageDown":if(!b)return;i.focusOption("pagedown");break;case"Home":if(!b)return;i.focusOption("first");break;case"End":if(!b)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++pR),i.state.selectValue=os(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),a=i.buildFocusableOptions(),s=a.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=a[s],i.state.focusedOptionId=lu(o,a[s])}return i}return HP(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Ag(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,s=o.menuIsOpen,l=this.state.isFocused;(l&&!a&&i.isDisabled||l&&s&&!i.menuIsOpen)&&this.focusInput(),l&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Ag(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,a=this.state,s=a.selectValue,l=a.isFocused,u=this.buildFocusableOptions(),d=i==="first"?0:u.length-1;if(!this.props.isMulti){var f=u.indexOf(s[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[d],focusedOptionId:this.getFocusedOptionId(u[d])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,s=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=a.indexOf(s);s||(l=-1);var u=a.length-1,d=-1;if(a.length){switch(i){case"previous":l===0?d=0:l===-1?d=u:d=l-1;break;case"next":l>-1&&l<u&&(d=l+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:a[d]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,s=this.getFocusableOptions();if(s.length){var l=0,u=s.indexOf(a);a||(u=-1),i==="up"?l=u>0?u-1:s.length-1:i==="down"?l=(u+1)%s.length:i==="pageup"?(l=u-o,l<0&&(l=0)):i==="pagedown"?(l=u+o,l>s.length-1&&(l=s.length-1)):i==="last"&&(l=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(s[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(su):ve(ve({},su),this.props.theme):su}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,s=this.getClassNames,l=this.getValue,u=this.selectOption,d=this.setValue,f=this.props,h=f.isMulti,p=f.isRtl,m=f.options,g=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:s,getValue:l,hasValue:g,isMulti:h,isRtl:p,options:m,selectOption:u,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,a=i.isMulti;return o===void 0?a:o}},{key:"isOptionDisabled",value:function(i,o){return im(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return om(this.props,i,o)}},{key:"filterOption",value:function(i,o){return am(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:s})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,a=i.isSearchable,s=i.inputId,l=i.inputValue,u=i.tabIndex,d=i.form,f=i.menuIsOpen,h=i.required,p=this.getComponents(),m=p.Input,g=this.state,b=g.inputIsHidden,w=g.ariaSelection,S=this.commonProps,C=s||this.getElementId("input"),I=ve(ve(ve({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":h,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(w==null?void 0:w.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?G.createElement(m,D({},S,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:C,innerRef:this.getInputRef,isDisabled:o,isHidden:b,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:d,type:"text",value:l},I)):G.createElement(UO,D({id:C,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:is,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:d,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,s=o.MultiValueContainer,l=o.MultiValueLabel,u=o.MultiValueRemove,d=o.SingleValue,f=o.Placeholder,h=this.commonProps,p=this.props,m=p.controlShouldRenderValue,g=p.isDisabled,b=p.isMulti,w=p.inputValue,S=p.placeholder,C=this.state,I=C.selectValue,y=C.focusedValue,A=C.isFocused;if(!this.hasValue()||!m)return w?null:G.createElement(f,D({},h,{key:"placeholder",isDisabled:g,isFocused:A,innerProps:{id:this.getElementId("placeholder")}}),S);if(b)return I.map(function(k,F){var Y=k===y,O="".concat(i.getOptionLabel(k),"-").concat(i.getOptionValue(k));return G.createElement(a,D({},h,{components:{Container:s,Label:l,Remove:u},isFocused:Y,isDisabled:g,key:O,index:F,removeProps:{onClick:function(){return i.removeValue(k)},onTouchEnd:function(){return i.removeValue(k)},onMouseDown:function(N){N.preventDefault()}},data:k}),i.formatOptionLabel(k,"value"))});if(w)return null;var E=I[0];return G.createElement(d,D({},h,{data:E,isDisabled:g}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,d=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return G.createElement(o,D({},a,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,d=this.state.isFocused;if(!o||!u)return null;var f={"aria-hidden":"true"};return G.createElement(o,D({},a,{innerProps:f,isDisabled:l,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var s=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return G.createElement(a,D({},s,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return G.createElement(o,D({},a,{innerProps:u,isDisabled:s,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,s=o.GroupHeading,l=o.Menu,u=o.MenuList,d=o.MenuPortal,f=o.LoadingMessage,h=o.NoOptionsMessage,p=o.Option,m=this.commonProps,g=this.state.focusedOption,b=this.props,w=b.captureMenuScroll,S=b.inputValue,C=b.isLoading,I=b.loadingMessage,y=b.minMenuHeight,A=b.maxMenuHeight,E=b.menuIsOpen,k=b.menuPlacement,F=b.menuPosition,Y=b.menuPortalTarget,O=b.menuShouldBlockScroll,T=b.menuShouldScrollIntoView,N=b.noOptionsMessage,V=b.onMenuScrollToTop,j=b.onMenuScrollToBottom;if(!E)return null;var $=function(U,W){var re=U.type,se=U.data,ae=U.isDisabled,X=U.isSelected,le=U.label,Z=U.value,he=g===se,Se=ae?void 0:function(){return i.onOptionHover(se)},He=ae?void 0:function(){return i.selectOption(se)},wt="".concat(i.getElementId("option"),"-").concat(W),ct={id:wt,onClick:He,onMouseMove:Se,onMouseOver:Se,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:X};return G.createElement(p,D({},m,{innerProps:ct,data:se,isDisabled:ae,isSelected:X,key:wt,label:le,type:re,value:Z,isFocused:he,innerRef:he?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(U.data,"menu"))},M;if(this.hasOptions())M=this.getCategorizedOptions().map(function(L){if(L.type==="group"){var U=L.data,W=L.options,re=L.index,se="".concat(i.getElementId("group"),"-").concat(re),ae="".concat(se,"-heading");return G.createElement(a,D({},m,{key:se,data:U,options:W,Heading:s,headingProps:{id:ae,data:L.data},label:i.formatGroupLabel(L.data)}),L.options.map(function(X){return $(X,"".concat(re,"-").concat(X.index))}))}else if(L.type==="option")return $(L,"".concat(L.index))});else if(C){var H=I({inputValue:S});if(H===null)return null;M=G.createElement(f,m,H)}else{var Q=N({inputValue:S});if(Q===null)return null;M=G.createElement(h,m,Q)}var te={minMenuHeight:y,maxMenuHeight:A,menuPlacement:k,menuPosition:F,menuShouldScrollIntoView:T},R=G.createElement(xD,D({},m,te),function(L){var U=L.ref,W=L.placerProps,re=W.placement,se=W.maxHeight;return G.createElement(l,D({},m,te,{innerRef:U,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:C,placement:re}),G.createElement(KO,{captureEnabled:w,onTopArrive:V,onBottomArrive:j,lockEnabled:O},function(ae){return G.createElement(u,D({},m,{innerRef:function(le){i.getMenuListRef(le),ae(le)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:i.getElementId("listbox")},isLoading:C,maxHeight:se,focusedOption:g}),M)}))});return Y||F==="fixed"?G.createElement(d,D({},m,{appendTo:Y,controlElement:this.controlRef,menuPlacement:k,menuPosition:F}),R):R}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,s=o.isDisabled,l=o.isMulti,u=o.name,d=o.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!s)return G.createElement(JO,{name:u,onFocus:this.onValueInputFocus});if(!(!u||s))if(l)if(a){var h=f.map(function(g){return i.getOptionValue(g)}).join(a);return G.createElement("input",{name:u,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(g,b){return G.createElement("input",{key:"i-".concat(b),name:u,type:"hidden",value:i.getOptionValue(g)})}):G.createElement("input",{name:u,type:"hidden",value:""});return G.createElement("div",null,p)}else{var m=f[0]?this.getOptionValue(f[0]):"";return G.createElement("input",{name:u,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,s=o.focusedOption,l=o.focusedValue,u=o.isFocused,d=o.selectValue,f=this.getFocusableOptions();return G.createElement(BO,D({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:s,focusedValue:l,isFocused:u,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,s=i.SelectContainer,l=i.ValueContainer,u=this.props,d=u.className,f=u.id,h=u.isDisabled,p=u.menuIsOpen,m=this.state.isFocused,g=this.commonProps=this.getCommonProps();return G.createElement(s,D({},g,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:m}),this.renderLiveRegion(),G.createElement(o,D({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:m,menuIsOpen:p}),G.createElement(l,D({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),G.createElement(a,D({},g,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.prevProps,s=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,d=o.isFocused,f=o.prevWasFocused,h=o.instancePrefix,p=i.options,m=i.value,g=i.menuIsOpen,b=i.inputValue,w=i.isMulti,S=os(m),C={};if(a&&(m!==a.value||p!==a.options||g!==a.menuIsOpen||b!==a.inputValue)){var I=g?dR(i,S):[],y=g?tm(us(i,S),"".concat(h,"-option")):[],A=s?fR(o,S):null,E=hR(o,I),k=lu(y,E);C={selectValue:S,focusedOption:E,focusedOptionId:k,focusableOptionsWithIds:y,focusedValue:A,clearFocusValueOnUpdate:!1}}var F=l!=null&&i!==a?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},Y=u,O=d&&f;return d&&!O&&(Y={value:so(w,S,S[0]||null),options:S,action:"initial-input-focus"},O=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(Y=null),ve(ve(ve({},C),F),{},{prevProps:i,ariaSelection:Y,prevWasFocused:O})}}]),n}(x.Component);lm.defaultProps=uR;var gR=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function mR(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,a=o===void 0?null:o,s=e.inputValue,l=e.menuIsOpen,u=e.onChange,d=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,p=e.value,m=Cn(e,gR),g=x.useState(s!==void 0?s:n),b=Vn(g,2),w=b[0],S=b[1],C=x.useState(l!==void 0?l:i),I=Vn(C,2),y=I[0],A=I[1],E=x.useState(p!==void 0?p:a),k=Vn(E,2),F=k[0],Y=k[1],O=x.useCallback(function(H,Q){typeof u=="function"&&u(H,Q),Y(H)},[u]),T=x.useCallback(function(H,Q){var te;typeof d=="function"&&(te=d(H,Q)),S(te!==void 0?te:H)},[d]),N=x.useCallback(function(){typeof h=="function"&&h(),A(!0)},[h]),V=x.useCallback(function(){typeof f=="function"&&f(),A(!1)},[f]),j=s!==void 0?s:w,$=l!==void 0?l:y,M=p!==void 0?p:F;return ve(ve({},m),{},{inputValue:j,menuIsOpen:$,onChange:O,onInputChange:T,onMenuClose:V,onMenuOpen:N,value:M})}var vR=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],cm=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(t).toLowerCase(),o=String(r.getOptionValue(n)).toLowerCase(),a=String(r.getOptionLabel(n)).toLowerCase();return o===i||a===i},cu={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return cm(t,o,i)})||r.some(function(o){return cm(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function bR(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,i=r===void 0?"last":r,o=e.formatCreateLabel,a=o===void 0?cu.formatCreateLabel:o,s=e.isValidNewOption,l=s===void 0?cu.isValidNewOption:s,u=e.getNewOptionData,d=u===void 0?cu.getNewOptionData:u,f=e.onCreateOption,h=e.options,p=h===void 0?[]:h,m=e.onChange,g=Cn(e,vR),b=g.getOptionValue,w=b===void 0?Jg:b,S=g.getOptionLabel,C=S===void 0?qg:S,I=g.inputValue,y=g.isLoading,A=g.isMulti,E=g.value,k=g.name,F=x.useMemo(function(){return l(I,os(E),p,{getOptionValue:w,getOptionLabel:C})?d(I,a(I)):void 0},[a,d,C,w,I,l,p,E]),Y=x.useMemo(function(){return(n||!y)&&F?i==="first"?[F].concat(ai(p)):[].concat(ai(p),[F]):p},[n,i,y,F,p]),O=x.useCallback(function(T,N){if(N.action!=="select-option")return m(T,N);var V=Array.isArray(T)?T:[T];if(V[V.length-1]===F){if(f)f(I);else{var j=d(I,I),$={action:"create-option",name:k,option:j};m(so(A,[].concat(ai(os(E)),[j]),j),$)}return}m(T,N)},[d,I,A,k,F,f,m,E]);return ve(ve({},g),{},{options:Y,onChange:O})}var yR=x.forwardRef(function(e,t){var n=mR(e),r=bR(n);return G.createElement(lm,D({ref:t},r))}),um=yR;const xR={control:(e,t)=>q(z({},e),{minHeight:"36px",borderColor:t.isFocused?"#0b6bcb":"#ced4da",boxShadow:t.isFocused?"0 0 0 0px 1px 2px 0px rgba(25, 118, 210, 0.25)":"none",borderRadius:"6px",fontFamily:'var(--joy-fontFamily-body, "Inter", var(--joy-fontFamily-fallback, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"));',"&:hover":{borderColor:t.isFocused?"#1976d2":"#ced4da"}}),valueContainer:e=>q(z({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>q(z({},e),{minHeight:"36px"}),menu:e=>q(z({},e),{position:"relative"}),clearIndicator:e=>q(z({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>q(z({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>q(z({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>q(z({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"14px"}),multiValueLabel:e=>q(z({},e),{color:"#333"})},CR=e=>e.map(t=>({label:t,value:t})),wR=e=>{const[t,n]=x.useState(""),[r,i]=x.useState(!1),o=e.sx||{marginBottom:"16px"},a=CR(e.flags),s=()=>i(!r),l=h=>{e.onChange(h.map(p=>p.value))},u=h=>{n(h)},d=h=>{h.persist();const{key:p}=h;if(t)switch(p){case"Enter":case"Tab":if(e.flags&&e.flags.length===0){const m=[...e.flags,t];e.onChange(m)}if(e.flags&&e.flags.length>0&&f()){const m=[...e.flags,t];e.onChange(m)}n(""),h.preventDefault()}},f=()=>{let h=!1;return e.flags.length&&e.flags.includes(t)?(s(),h):(h=!0,h)};return c.jsxs(c.Fragment,{children:[c.jsx(v.Box,{sx:o,children:c.jsx(um,{styles:xR,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:l,onInputChange:u,onKeyDown:d,placeholder:e.labels.flagsPlaceholder,value:a})}),c.jsx(nt,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:s})]})},co=e=>{const[t,n]=x.useState(!1),[r,i]=x.useState(!1),[o,a]=x.useState(!1),[s,l]=x.useState(!1),[u,d]=x.useState(""),[f,h]=x.useState("primary"),[p,m]=x.useState(""),g=x.useRef(null),b=()=>{g.current&&g.current.click()},w=new $p,S=lt(),C=()=>{d(""),i(!1)},I=N=>{let V="",j="primary";switch(N){case"copy_url":V=e.labels.urlCopiedToClipboardMessage,j="primary";break;case"image_deleted":V=e.labels.imageDeletedMessage,j="primary";break;case"image_reset":V=e.labels.imageResetMessage,j="primary";break;case"upload_success":V=e.labels.uploadingImageMessage,j="success";break;case"upload_failed":V=e.labels.uploadingImageErrorMessage,j="danger";break;case"sign_in_url_failed":V=e.labels.generateSignedInUrlErrorMessage,j="danger";break;case"encrypting_file_failed":V=e.labels.encryptingImageErrorMessage,j="danger";break}h(j),d(V),i(!0)},y=()=>a(!o),A=()=>l(!s),E=()=>{e.clearImage(),I("image_deleted")},k=N=>{navigator.clipboard.writeText(N),I("copy_url")},F=N=>_(this,null,function*(){N.persist();const V=N.target.files?N.target.files[0]:null;if(V){n(!0);try{const j=V.type.split("/")[1],$=yield w.readFileAndHash(V),M=(yield w.generateHashFileName(V))+"."+j,H={image_type:j,image_file_name:M,image_size:V.size,base64_sum:$},Q=yield S==null?void 0:S.https.generateSignedInUrl(H);if(Q!=null&&Q.ok){const te=yield Q.json(),R={"Content-Type":V.type,"Content-MD5":$};try{const L=new File([V],M,{type:V.type}),U=yield S==null?void 0:S.https.storeInBucket(te.data.signed_url,L,R);e.onChangeImages(U||""),m(U),I("upload_success")}catch(L){console.error("There was a problem with uploading the file: ",L),I("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield Q==null?void 0:Q.json()),I("sign_in_url_failed")}catch(j){console.error("There was a problem with encrypting file...",j),I("encrypting_file_failed")}n(!1)}}),Y=N=>_(this,null,function*(){if(N){n(!0);try{const V=N.type.split("/")[1],j=yield w.readFileAndHash(N),$=(yield w.generateHashFileName(N))+"."+V,M={image_type:V,image_file_name:$,image_size:N.size,base64_sum:j},H=yield S==null?void 0:S.https.generateSignedInUrl(M);if(H!=null&&H.ok){const Q=yield H.json(),te={"Content-Type":N.type,"Content-MD5":j};try{const R=new File([N],$,{type:N.type}),L=yield S==null?void 0:S.https.storeInBucket(Q.data.signed_url,R,te);e.onChangeImages(L||""),I("upload_success")}catch(R){console.error("There was a problem with uploading the file: ",R),I("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield H==null?void 0:H.json()),I("sign_in_url_failed")}catch(V){console.error("There was a problem with encrypting file...",V),I("encrypting_file_failed")}n(!1)}}),O=()=>{e.onChangeImages(p),I("image_reset")},T=N=>{e.onChangeImages(N),m(N)};return c.jsxs(c.Fragment,{children:[c.jsxs(v.Card,{sx:{marginBottom:"10px"},children:[c.jsxs(v.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[c.jsx(v.Typography,{level:"title-lg",children:e.title}),c.jsx(v.Tooltip,{title:e.labels.clearImage,children:c.jsx(v.IconButton,{variant:"plain",color:"danger",size:"sm",onClick:E,children:c.jsx(Ap,{})})})]}),c.jsxs(v.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[c.jsxs(v.Skeleton,{loading:t,animation:"wave",children:[e.image?c.jsx(v.Box,{component:"img",src:e.image,loading:"lazy",alt:e.title,sx:{width:"100%",height:"100%",position:"relative",transition:"background-color 0.3s ease","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.3)"}}}):c.jsx(Pc,{sx:{fontSize:"3rem",opacity:.2}}),e.image?c.jsx(v.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",pointerEvents:"none",opacity:0,transition:"opacity 0.3s ease","&:hover":{opacity:1}},children:c.jsx(Fp,{sx:{fontSize:"3rem",color:"#fff"}})}):c.jsx(c.Fragment,{})]}),c.jsx(v.Tooltip,{title:e.labels.copyUrl,children:c.jsx(v.Button,{onClick:()=>k(e.image),disabled:!e.image,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:c.jsx(De.ContentCopy,{})})}),c.jsx(v.Tooltip,{title:e.labels.viewImage,children:c.jsx(v.Button,{onClick:y,disabled:!e.image,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:c.jsx(jp,{})})}),c.jsx(v.Tooltip,{title:e.labels.cropImage,children:c.jsx(v.Button,{onClick:A,disabled:!e.image,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:c.jsx(og,{})})})]}),c.jsx(v.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:c.jsxs(v.Button,{sx:{width:"100%"},onClick:b,children:[c.jsx(De.Upload,{})," ",e.labels.uploadImage,c.jsx(Up,{type:"file",accept:"image/*",onChange:F,ref:g})]})}),S.https.sportal365Config?c.jsx(v.AccordionGroup,{variant:"soft",children:c.jsxs(v.Accordion,{children:[c.jsx(v.AccordionSummary,{children:c.jsx(v.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.labels.sportal365Images})}),c.jsx(v.AccordionDetails,{children:c.jsx(zp,{labels:e.labels,onChangeImages:T})})]})}):c.jsx(c.Fragment,{})]}),c.jsx(nt,{showToast:r,message:u,color:f,hideToast:C}),c.jsx(Np,{title:e.labels.viewImage,open:o,imageSrc:e.image,toggleModal:y}),c.jsx(ig,{labels:e.labels,open:s,imageSrc:e.image,toggleModal:A,uploadImage:Y,resetDefaultImageUrl:O})]})},IR=["cover","mobile"],SR=e=>new Map().set("main",e.mainImage).set("cover",e.coverImage).set("mobile",e.mobileImage),AR=e=>e?z({},e):{main:"",mobile:"",cover:""},TR=e=>{const[t,n]=x.useState(!1),r=AR(e.defaultValue),i=SR(e.labels),o=(s,l)=>{r[l]=s,e.onChange(r)},a=s=>{r[s]="",e.onChange(r)};return c.jsxs(v.Box,{sx:{marginBottom:"10px"},children:[c.jsx(co,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:s=>o(s,"main"),clearImage:()=>a("main")}),c.jsx(v.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?c.jsx(c.Fragment,{children:IR.map(s=>c.jsx(co,{labels:e.labels,title:i.get(s),image:r[s],onChangeImages:l=>o(l,s),clearImage:()=>a(s)},`images-${s}`))}):c.jsx(c.Fragment,{})]})};function ER(e){return at("MuiSheet",e)}Ze("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const kR=["className","color","component","variant","invertedColors","slots","slotProps"],_R=e=>{const{variant:t,color:n}=e,r={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`]};return dt(r,ER,{})},PR=be("div",{name:"JoySheet",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r;const i=(n=e.variants[t.variant])==null?void 0:n[t.color],{borderRadius:o,bgcolor:a,backgroundColor:s,background:l}=ac({theme:e,ownerState:t},["borderRadius","bgcolor","backgroundColor","background"]),u=tr(e,`palette.${a}`)||a||tr(e,`palette.${s}`)||s||l||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||e.vars.palette.background.surface;return[D({"--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,"--ListItem-stickyBackground":u==="transparent"?"initial":u,"--Sheet-background":u==="transparent"?"initial":u},o!==void 0&&{"--List-radius":`calc(${o} - var(--variant-borderWidth, 0px))`,"--unstable_actionRadius":`calc(${o} - var(--variant-borderWidth, 0px))`},{backgroundColor:e.vars.palette.background.surface,position:"relative"}),D({},e.typography["body-md"],t.variant==="solid"&&t.color&&t.invertedColors&&o_(t.color)(e),t.variant==="soft"&&t.color&&t.invertedColors&&a_(t.color)(e),(r=e.variants[t.variant])==null?void 0:r[t.color],i)]}),DR=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoySheet"}),{className:i,color:o="neutral",component:a="div",variant:s="plain",invertedColors:l=!1,slots:u={},slotProps:d={}}=r,f=Ae(r,kR),h=D({},r,{color:o,component:a,invertedColors:l,variant:s}),p=_R(h),m=D({},f,{component:a,slots:u,slotProps:d}),[g,b]=Ie("root",{ref:n,className:Bn(p.root,i),elementType:PR,externalForwardedProps:m,ownerState:h});return c.jsx(g,D({},b))});function OR(e){return at("MuiTypography",e)}Ze("MuiTypography",["root","h1","h2","h3","h4","title-lg","title-md","title-sm","body-lg","body-md","body-sm","body-xs","noWrap","gutterBottom","startDecorator","endDecorator","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const RR=["color","textColor"],LR=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],uu=G.createContext(!1),MR=G.createContext(!1),BR=e=>{const{gutterBottom:t,noWrap:n,level:r,color:i,variant:o}=e,a={root:["root",r,t&&"gutterBottom",n&&"noWrap",i&&`color${ye(i)}`,o&&`variant${ye(o)}`],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return dt(a,OR,{})},$R=be("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),NR=be("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),FR=be("span",{name:"JoyTypography",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const s=t.level!=="inherit"?(n=e.typography[t.level])==null?void 0:n.lineHeight:"1";return D({"--Icon-fontSize":`calc(1em * ${s})`},t.color&&{"--Icon-color":"currentColor"},{margin:"var(--Typography-margin, 0px)"},t.nesting?{display:"inline"}:D({display:"block"},t.unstable_hasSkeleton&&{position:"relative"}),(t.startDecorator||t.endDecorator)&&D({display:"flex",alignItems:"center"},t.nesting&&D({display:"inline-flex"},t.startDecorator&&{verticalAlign:"bottom"})),t.level&&t.level!=="inherit"&&e.typography[t.level],{fontSize:`var(--Typography-fontSize, ${t.level&&t.level!=="inherit"&&(r=(i=e.typography[t.level])==null?void 0:i.fontSize)!=null?r:"inherit"})`},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.color&&{color:`var(--variant-plainColor, rgba(${(o=e.vars.palette[t.color])==null?void 0:o.mainChannel} / 1))`},t.variant&&D({borderRadius:e.vars.radius.xs,paddingBlock:"min(0.1em, 4px)",paddingInline:"0.25em"},!t.nesting&&{marginInline:"-0.25em"},(a=e.variants[t.variant])==null?void 0:a[t.color]))}),dm={h1:"h1",h2:"h2",h3:"h3",h4:"h4","title-lg":"p","title-md":"p","title-sm":"p","body-lg":"p","body-md":"p","body-sm":"p","body-xs":"span",inherit:"p"},du=G.forwardRef(function(t,n){var r;const i=ft({props:t,name:"JoyTypography"}),{color:o,textColor:a}=i,s=Ae(i,RR),l=G.useContext(uu),u=G.useContext(MR),d=QA(D({},s,{color:a})),{component:f,gutterBottom:h=!1,noWrap:p=!1,level:m="body-md",levelMapping:g=dm,children:b,endDecorator:w,startDecorator:S,variant:C,slots:I={},slotProps:y={}}=d,A=Ae(d,LR),E=(r=t.color)!=null?r:C?o!=null?o:"neutral":o,k=l||u?t.level||"inherit":m,F=Jf(b,["Skeleton"]),Y=f||(l?"span":g[k]||dm[k]||"span"),O=D({},d,{level:k,component:Y,color:E,gutterBottom:h,noWrap:p,nesting:l,variant:C,unstable_hasSkeleton:F}),T=BR(O),N=D({},A,{component:Y,slots:I,slotProps:y}),[V,j]=Ie("root",{ref:n,className:T.root,elementType:FR,externalForwardedProps:N,ownerState:O}),[$,M]=Ie("startDecorator",{className:T.startDecorator,elementType:$R,externalForwardedProps:N,ownerState:O}),[H,Q]=Ie("endDecorator",{className:T.endDecorator,elementType:NR,externalForwardedProps:N,ownerState:O});return c.jsx(uu.Provider,{value:!0,children:c.jsxs(V,D({},j,{children:[S&&c.jsx($,D({},M,{children:S})),F?G.cloneElement(b,{variant:b.props.variant||"inline"}):b,w&&c.jsx(H,D({},Q,{children:w}))]}))})});du.muiName="Typography";function zR(e){return at("MuiFormControl",e)}const fm=Ze("MuiFormControl",["root","error","disabled","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),jR=Ze("MuiSwitch",["root","checked","disabled","action","input","thumb","track","focusVisible","readOnly","colorPrimary","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid","startDecorator","endDecorator"]),UR=["id","className","component","disabled","required","error","color","size","orientation","slots","slotProps"],VR=e=>{const{disabled:t,error:n,size:r,color:i,orientation:o}=e,a={root:["root",o,t&&"disabled",n&&"error",i&&`color${ye(i)}`,r&&`size${ye(r)}`]};return dt(a,zR,{})},HR=be("div",{name:"JoyFormControl",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i;return D({"--unstable_RadioGroup-margin":"0.5rem 0","--FormLabel-alignSelf":t.orientation==="horizontal"?"align-items":"flex-start","--FormLabel-asteriskColor":e.vars.palette.danger[500]},t.size==="sm"&&{"--FormLabel-fontSize":e.vars.fontSize.xs,"--FormLabel-lineHeight":e.vars.lineHeight.xl,"--FormLabel-margin":t.orientation==="horizontal"?"0 0.5rem 0 0":"0 0 0.25rem 0","--FormHelperText-fontSize":e.vars.fontSize.xs,"--FormHelperText-lineHeight":e.vars.lineHeight.xl},t.size==="md"&&{"--FormLabel-fontSize":e.vars.fontSize.sm,"--FormLabel-lineHeight":e.vars.lineHeight.sm,"--FormLabel-margin":t.orientation==="horizontal"?"0 0.75rem 0 0":"0 0 0.375rem 0","--FormHelperText-fontSize":e.vars.fontSize.sm,"--FormHelperText-lineHeight":e.vars.lineHeight.sm},t.size==="lg"&&{"--FormLabel-fontSize":e.vars.fontSize.md,"--FormLabel-lineHeight":e.vars.lineHeight.md,"--FormLabel-margin":t.orientation==="horizontal"?"0 1rem 0 0":"0 0 0.5rem 0","--FormHelperText-fontSize":e.vars.fontSize.sm,"--FormHelperText-lineHeight":e.vars.lineHeight.sm},t.color&&{"--FormHelperText-color":(n=e.vars.palette[t.color])==null?void 0:n[500]},{"--FormHelperText-margin":"0.375rem 0 0 0",[`&.${fm.error}`]:{"--FormHelperText-color":e.vars.palette.danger[500]},[`&.${fm.disabled}`]:{"--FormLabel-color":(r=e.variants.plainDisabled)==null||(r=r[t.color||"neutral"])==null?void 0:r.color,"--FormHelperText-color":(i=e.variants.plainDisabled)==null||(i=i[t.color||"neutral"])==null?void 0:i.color},display:"flex",position:"relative",flexDirection:t.orientation==="horizontal"?"row":"column"},t.orientation==="horizontal"&&{[`& > label ~ .${jR.root}`]:{"--unstable_Switch-margin":"0 0 0 auto"}})}),fu=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyFormControl"}),{id:i,className:o,component:a="div",disabled:s=!1,required:l=!1,error:u=!1,color:d,size:f="md",orientation:h="vertical",slots:p={},slotProps:m={}}=r,g=Ae(r,UR),b=Hi(i),[w,S]=G.useState(null),C=D({},r,{id:b,component:a,color:d,disabled:s,error:u,required:l,size:f,orientation:h});let I;const y=VR(C),[A,E]=Ie("root",{ref:n,className:Bn(y.root,o),elementType:HR,externalForwardedProps:D({},g,{component:a,slots:p,slotProps:m}),ownerState:C}),k=G.useMemo(()=>({disabled:s,required:l,error:u,color:d,size:f,htmlFor:b,labelId:`${b}-label`,"aria-describedby":w?`${b}-helper-text`:void 0,setHelperText:S,registerEffect:I}),[d,s,u,w,b,I,l,f]);return c.jsx(Wa.Provider,{value:k,children:c.jsx(A,D({},E))})});function WR(e){return at("MuiFormLabel",e)}Ze("MuiFormLabel",["root","asterisk"]);const GR=["children","component","htmlFor","id","slots","slotProps"],YR=()=>dt({root:["root"],asterisk:["asterisk"]},WR,{}),KR=be("label",{name:"JoyFormLabel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({"--Icon-fontSize":"calc(var(--FormLabel-lineHeight) * 1em)",WebkitTapHighlightColor:"transparent",alignSelf:"var(--FormLabel-alignSelf)",display:"flex",gap:"2px",alignItems:"center",flexWrap:"wrap",userSelect:"none",fontFamily:e.vars.fontFamily.body,fontSize:`var(--FormLabel-fontSize, ${e.vars.fontSize.sm})`,fontWeight:e.vars.fontWeight.md,lineHeight:`var(--FormLabel-lineHeight, ${e.vars.lineHeight.sm})`,color:`var(--FormLabel-color, ${e.vars.palette.text.primary})`,margin:"var(--FormLabel-margin, 0px)"})),QR=be("span",{name:"JoyFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})({color:"var(--FormLabel-asteriskColor)"}),hu=G.forwardRef(function(t,n){var r,i;const o=ft({props:t,name:"JoyFormLabel"}),{children:a,component:s="label",htmlFor:l,id:u,slots:d={},slotProps:f={}}=o,h=Ae(o,GR),p=G.useContext(Wa),m=(r=(i=t.required)!=null?i:p==null?void 0:p.required)!=null?r:!1,g=D({},o,{required:m}),b=YR(),w=D({},h,{component:s,slots:d,slotProps:f}),[S,C]=Ie("root",{additionalProps:{htmlFor:l!=null?l:p==null?void 0:p.htmlFor,id:u!=null?u:p==null?void 0:p.labelId},ref:n,className:b.root,elementType:KR,externalForwardedProps:w,ownerState:g}),[I,y]=Ie("asterisk",{additionalProps:{"aria-hidden":!0},className:b.asterisk,elementType:QR,externalForwardedProps:w,ownerState:g});return c.jsxs(S,D({},C,{children:[a,m&&c.jsxs(I,D({},y,{children:[" ","*"]}))]}))}),qR=({environment:e,userNotFound:t})=>{const[n,r]=x.useState(""),[i,o]=x.useState(""),[a,s]=x.useState(!1),l=()=>{s(!a)},u=h=>{h.persist(),r(h.target.value)},d=h=>{h.persist(),o(h.target.value)},f=()=>_(this,null,function*(){try{yield Vi(e).signInWithEmailAndPassword(n,i)}catch(h){console.error(h),l()}});return c.jsxs(c.Fragment,{children:[c.jsx(v.Box,{sx:{minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:c.jsxs(DR,{sx:{width:300,mx:"auto",py:3,px:2,display:"flex",flexDirection:"column",justifyContent:"center",gap:2,borderRadius:"sm",boxShadow:"md"},variant:"outlined",children:[c.jsxs("div",{children:[c.jsx(du,{level:"h4",component:"h1",children:c.jsx("b",{children:"Sign in"})}),c.jsx(du,{level:"body-sm",children:"Use your account in the Fans United platform."})]}),c.jsxs(fu,{children:[c.jsx(hu,{children:"Email"}),c.jsx(Ga,{name:"email",type:"email",onChange:u})]}),c.jsxs(fu,{children:[c.jsx(hu,{children:"Password"}),c.jsx(Ga,{name:"password",type:"password",onChange:d})]}),c.jsx(ni,{sx:{mt:1},onClick:f,children:"Log in"})]})}),c.jsx(nt,{showToast:a,message:t,color:"danger",hideToast:l})]})};function JR(e){return at("MuiCheckbox",e)}const li=Ze("MuiCheckbox",["root","checkbox","action","input","label","checked","disabled","focusVisible","indeterminate","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid"]),XR=cc(c.jsx("path",{d:"M9 16.17 5.53 12.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L9 16.17z"}),"Check"),ZR=cc(c.jsx("path",{d:"M19 13H5c-.55 0-1-.45-1-1s.45-1 1-1h14c.55 0 1 .45 1 1s-.45 1-1 1z"}),"HorizontalRule"),eL=["checked","uncheckedIcon","checkedIcon","label","defaultChecked","disabled","disableIcon","overlay","id","indeterminate","indeterminateIcon","name","onBlur","onChange","onFocus","onFocusVisible","readOnly","required","value","color","variant","size","component","slots","slotProps"],tL=e=>{const{checked:t,disabled:n,disableIcon:r,focusVisible:i,color:o,variant:a,size:s,indeterminate:l}=e,u={root:["root",t&&"checked",n&&"disabled",i&&"focusVisible",a&&`variant${ye(a)}`,o&&`color${ye(o)}`,s&&`size${ye(s)}`],checkbox:["checkbox",t&&"checked",l&&"indeterminate",n&&"disabled"],action:["action",t&&"checked",r&&n&&"disabled",i&&"focusVisible"],input:["input"],label:["label"]};return dt(u,JR,{})},nL=be("span",{name:"JoyCheckbox",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i;return D({"--Icon-fontSize":"var(--Checkbox-size)"},e.size==="sm"&&{"--Checkbox-size":"1rem","& ~ *":{"--FormHelperText-margin":"0 0 0 1.5rem"},fontSize:t.vars.fontSize.sm,gap:"var(--Checkbox-gap, 0.5rem)"},e.size==="md"&&{"--Checkbox-size":"1.25rem","& ~ *":{"--FormHelperText-margin":"0.25rem 0 0 1.875rem"},fontSize:t.vars.fontSize.md,gap:"var(--Checkbox-gap, 0.625rem)"},e.size==="lg"&&{"--Checkbox-size":"1.5rem","& ~ *":{"--FormHelperText-margin":"0.375rem 0 0 2.25rem"},fontSize:t.vars.fontSize.lg,gap:"var(--Checkbox-gap, 0.75rem)"},{position:e.overlay?"initial":"relative",display:"inline-flex",fontFamily:t.vars.fontFamily.body,lineHeight:"var(--Checkbox-size)",color:t.vars.palette.text.primary,[`&.${li.disabled}`]:{color:(n=t.variants.plainDisabled)==null||(n=n[e.color])==null?void 0:n.color}},e.disableIcon&&{color:(r=t.variants[e.variant])==null||(r=r[e.color])==null?void 0:r.color,[`&.${li.disabled}`]:{color:(i=t.variants[`${e.variant}Disabled`])==null||(i=i[e.color])==null?void 0:i.color}})}),rL=be("span",{name:"JoyCheckbox",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const s=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[D({"--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,boxSizing:"border-box",borderRadius:`min(${e.vars.radius.sm}, 0.25rem)`,width:"var(--Checkbox-size)",height:"var(--Checkbox-size)",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0},t.disableIcon&&{display:"contents"},{[`&.${li.checked}, &.${li.indeterminate}`]:{"--Icon-color":"currentColor"}}),...t.disableIcon?[]:[D({},s,{backgroundColor:(r=s==null?void 0:s.backgroundColor)!=null?r:e.vars.palette.background.surface}),{"&:hover":{"@media (hover: hover)":(i=e.variants[`${t.variant}Hover`])==null?void 0:i[t.color]}},{"&:active":(o=e.variants[`${t.variant}Active`])==null?void 0:o[t.color]},{[`&.${li.disabled}`]:(a=e.variants[`${t.variant}Disabled`])==null?void 0:a[t.color]}]]}),iL=be("span",{name:"JoyCheckbox",slot:"Action",overridesResolver:(e,t)=>t.action})(({theme:e,ownerState:t})=>{var n,r,i,o;return[{borderRadius:`var(--Checkbox-actionRadius, ${t.overlay?"var(--unstable_actionRadius, inherit)":"inherit"})`,textAlign:"left",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))",bottom:"calc(-1 * var(--variant-borderWidth, 0px))",right:"calc(-1 * var(--variant-borderWidth, 0px))",zIndex:1,[e.focus.selector]:e.focus.default},...t.disableIcon?[(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color]},{"&:active":(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color]},{[`&.${li.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]}]:[]]}),oL=be("input",{name:"JoyCheckbox",slot:"Input",overridesResolver:(e,t)=>t.input})(()=>({margin:0,opacity:0,position:"absolute",width:"100%",height:"100%",cursor:"pointer"})),aL=be("label",{name:"JoyCheckbox",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>D({flex:1,minWidth:0},e.disableIcon&&{zIndex:1,pointerEvents:"none"})),sL=c.jsx(XR,{}),lL=c.jsx(ZR,{}),cL=G.forwardRef(function(t,n){var r,i,o,a,s;const l=ft({props:t,name:"JoyCheckbox"}),{checked:u,uncheckedIcon:d,checkedIcon:f=sL,label:h,defaultChecked:p,disabled:m,disableIcon:g=!1,overlay:b,id:w,indeterminate:S=!1,indeterminateIcon:C=lL,name:I,onBlur:y,onChange:A,onFocus:E,onFocusVisible:k,readOnly:F,required:Y,value:O,color:T,variant:N,size:V="md",component:j,slots:$={},slotProps:M={}}=l,H=Ae(l,eL),Q=G.useContext(Wa),te=(r=(i=t.disabled)!=null?i:Q==null?void 0:Q.disabled)!=null?r:m,R=(o=(a=t.size)!=null?a:Q==null?void 0:Q.size)!=null?o:V,L=Hi(w!=null?w:Q==null?void 0:Q.htmlFor),U={checked:u,defaultChecked:p,disabled:te,onBlur:y,onChange:A,onFocus:E,onFocusVisible:k},{getInputProps:W,checked:re,disabled:se,focusVisible:ae}=FS(U),X=re||S,he=X?N||"solid":N||"outlined",Se=t.color||(Q!=null&&Q.error?"danger":(s=Q==null?void 0:Q.color)!=null?s:T),ct=D({},l,{checked:re,disabled:se,disableIcon:g,overlay:b,focusVisible:ae,color:X?Se||"primary":Se||"neutral",variant:he,size:R}),_t=tL(ct),de=D({},H,{component:j,slots:$,slotProps:M}),[pe,xe]=Ie("root",{ref:n,className:_t.root,elementType:nL,externalForwardedProps:de,ownerState:ct}),[Te,We]=Ie("checkbox",{className:_t.checkbox,elementType:rL,externalForwardedProps:de,ownerState:ct}),[Pe,Ee]=Ie("action",{className:_t.action,elementType:iL,externalForwardedProps:de,ownerState:ct}),[It,St]=Ie("input",{additionalProps:D({id:L,name:I,value:O,readOnly:F,role:void 0,required:Y!=null?Y:Q==null?void 0:Q.required,"aria-describedby":Q==null?void 0:Q["aria-describedby"]},S&&{"aria-checked":"mixed"}),className:_t.input,elementType:oL,externalForwardedProps:de,getSlotProps:W,ownerState:ct}),[jt,Lt]=Ie("label",{additionalProps:{htmlFor:L},className:_t.label,elementType:aL,externalForwardedProps:de,ownerState:ct});let Qt=d;return g?Qt=null:S?Qt=C:re&&(Qt=f),c.jsxs(pe,D({},xe,{children:[c.jsxs(Te,D({},We,{children:[c.jsx(Pe,D({},Ee,{children:c.jsx(It,D({},St))})),Qt]})),h&&c.jsx(uu.Provider,{value:!0,children:c.jsx(jt,D({},Lt,{children:h}))})]}))}),uL=Ve(c.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),Ar=({label:e,values:t,allValues:n,valuesMap:r,showAll:i,showAllLabel:o,onChange:a,toggleShowAll:s})=>{const l=(u,d)=>{u.persist();let f=[...t];if(u.target.checked){f.push(d),a(f);return}f=t.filter(h=>h!==d),a(f)};return c.jsxs(v.Box,{sx:{mb:2},children:[c.jsx(v.Typography,{level:"body-sm",mb:1,children:e}),c.jsxs(H1,{orientation:"horizontal",wrap:!0,sx:{columnGap:"12px","--List-gap":"8px","--ListItem-radius":"20px","--ListItem-minHeight":"32px","--ListItem-gap":"4px"},children:[n.map(u=>c.jsxs(zh,{children:[t.includes(u)&&c.jsx(uL,{fontSize:"medium",color:"primary",sx:{ml:-.5,zIndex:2,pointerEvents:"none"}}),c.jsx(cL,{checked:t.includes(u),variant:t.includes(u)?"soft":"outlined",overlay:!0,disableIcon:!0,label:r[u]||"N/A",onChange:d=>l(d,u),slotProps:{action:({checked:d})=>({sx:d?{border:"1px solid",borderColor:"primary.500"}:{backgroundColor:"#fff"}})}})]},`checkbox-value-${e}-${u}`)),i===!1?c.jsx(zh,{children:c.jsx(v.Link,{onClick:s,children:o})}):c.jsx(c.Fragment,{})]})]})},ci={popular:["FT_1X2","BOTH_TEAMS_SCORE","DOUBLE_CHANCE","CORRECT_SCORE","OVER_CORNERS_9_5"],playerRelated:["PLAYER_YELLOW_CARD","PLAYER_RED_CARD","PLAYER_SCORE","PLAYER_SCORE_FIRST_GOAL","PLAYER_SCORE_TWICE","PLAYER_SCORE_HATTRICK"],goals:["OVER_GOALS_0_5","OVER_GOALS_1_5","OVER_GOALS_2_5","OVER_GOALS_3_5","OVER_GOALS_4_5","OVER_GOALS_5_5","OVER_GOALS_6_5"],corners:["CORNERS_MATCH","OVER_CORNERS_6_5","OVER_CORNERS_7_5","OVER_CORNERS_8_5","OVER_CORNERS_9_5","OVER_CORNERS_10_5","OVER_CORNERS_11_5","OVER_CORNERS_12_5","OVER_CORNERS_13_5"],correctScores:["CORRECT_SCORE","CORRECT_SCORE_HT","CORRECT_SCORE_ADVANCED"],misc:["FT_1X2","HT_1X2","BOTH_TEAMS_SCORE","DOUBLE_CHANCE","HT_FT","RED_CARD_MATCH","PENALTY_MATCH"]},dL=({labels:e,values:t,valuesMap:n,onChange:r})=>{const[i,o]=x.useState(!1);return c.jsxs(v.FormControl,{sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{color:"primary",children:e.marketSelection}),c.jsx(v.FormHelperText,{sx:{mb:2},children:e.marketSelectionDescription}),c.jsx(Ar,{label:"Popular",values:t,allValues:ci.popular,valuesMap:n,showAll:i,showAllLabel:e.showAll,onChange:r,toggleShowAll:()=>o(!0)}),i?c.jsxs(c.Fragment,{children:[c.jsx(Ar,{label:e.playerRelated,values:t,allValues:ci.playerRelated,valuesMap:n,onChange:r}),c.jsx(Ar,{label:e.goals,values:t,allValues:ci.goals,valuesMap:n,onChange:r}),c.jsx(Ar,{label:e.corners,values:t,allValues:ci.corners,valuesMap:n,onChange:r}),c.jsx(Ar,{label:e.correctScores,values:t,allValues:ci.correctScores,valuesMap:n,onChange:r}),c.jsx(Ar,{label:e.misc,values:t,allValues:ci.misc,valuesMap:n,onChange:r})]}):c.jsx(c.Fragment,{})]})},ze={avatar:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMA+h6XBeOBCz4ozafvc/W9X+nD29ROsWmINjBVRxC4F3uPnhL6/TMAAAygSURBVHja7N0JkqJAEIXhAsEFEEVs9z3vf8eZmI6J3mxFZamq/L8zaC2ZrxKjTzTaLfu9xWweZ7n8FeRFmRwuq+XbZmDgs2gzPR9iuaGYpOl4yO/AQ+G0lwRSUXJ+40fgkXCaxvKgYDIeGXhgvZrLk8rVxsBp63MsLyn7rAPOCvul1GB+Cg2cE20nUpvDNjJwybpXSK2KPsuAM8J+LPULUk6EbjgF0pDD0MB2w0QaNOMnYLfhRL7iJ6DJaCEtOHAWsNO+F0g7Um4EFlpm0pq8T6/IMptEWhVPDewxWAXSthlNAltEu1I6EKyoD9sgOufSkZIrYfeOM+lQj8NgxzaxdKpcG3RonEvHgpNBV8KDWGByNOjENBMrFJwFu7BPxRbB2KBtw1gsknIbaNk4EKskHATaNLBn+f8vpjLcnn0i9skue4NWHOdipYRfwHUa/v//JBwFWzCYibUm9AebtxCLpQYN64nVVgaNGovllgYN2or13gwaM7Ss/ndNTmuoMevOu/9VZGREGrKxpP17T8bToUaMCnFEQV+gAaFV/d/bYt6O1e5YikPmtAVqNrC2AUBboA2RFfHPRywManQR5/QManMSB5EU1VQApij8k7IC4E855YBaHB0qAHwVExWuQWRxAuieiYHvCZDbzgYvmorTtgYvGTl6APwv4yD4koGlTwCqSwgKqz0AUBHUWgGiHlST0JEI0G0F1YBnOdcCpDFYq6V4grGyTwkdvwF+yEiIKd4A2AR0lgApCL5o70wIvIqCkKiCEBjloBqtxTO8FnqMYynw+2YGWk+AnAMfNnA2Bfa7mLag5zFwYuK1OXpTA/wsoymkKAXAVfAFIwcGwTwjIB7mwSRApgheQw2oGqYHVTERbx0M7tqJxxghd5/DL8F4K8YCwBLAAsAS8IqheI4lQO0VgIuA7hoAyRDVRUDKgZWMxH8BjwTUtQFpCqrOAXyXExFXFQQiGlRZ5GESkHSg7igwAWGqwLwRqGojapANU3sH5Cb4q4GKO+C7jO+JeDwQhqExPAflGEgbgGPgg1aiCp+Z/86riTD3xQaasqA/7Qw+S0WZi4HSIsC7jI6Qd2PBGSJOFpBsIDtAVTl7gOodgD1A9R2APeCLyIsvg3APoArEM0GiIHxW9AlK0sDflQYaO8EfeCT2bixKLQ08+zgQnxJ6QqSwDMhFUNNUGC6Ct/VFrZOBohdhzAy7KvJ0NjgdwT/snVlSAlEMRYO2duEADnQVIO2U/e9RLSkZbB7o5zvnbAGqX3Jzc2MJYHq0KoBZEZqBHAm7EOB6wGHOEo3jAKQbTF8Ydidwn8ugg50EOQ+yBrQKjHhJOPTYULQO6EAQlgykK2iHZtGtxlBD8Ibz8apbEGdC/Su8/Nvmfo4rBTp//h1uYPnBkGB43UGOgB0N2/uZG7VHD10FO8YFJUEYbAN2MoQ5DeU5KTsAO4FhHlPIC+O2AHCbONwCZBmIOgzxV66ietqUw4zqlwIsAeD+ELwDhO4PwTtA6NFx6FVAbeI2Afg2QCcQfE8AnAdyCjdROylFonKalCK1O8QVAuF/AL8A8D+ANQC8BrALoHcByPNA6gAbZikFZlE70xR0ejDyRKDJkRveUgrMo3Y0hBS5i9qBHonUEmY0rNGxCgHqQOwLMcd5iPqxDUB7QiPuUsBNAPhSsDWgtlBHQYrBcCFYLRBfAlgE0EsAM2LAZgCVAPgo0IgA+CTom8ZxwCD3QcGMgEHOg4JvAPoF+MS0aGpKpHHR9JxYbUGHGEFUIJOCsOlAWkMtAc2KAqdD6QsqAjsbF40TIWwP6CcA6wRwT5w+CN7mKeWHLoC4IQJKBRhiaVzQmtE4kOgMAu0DDdE6FGSdjFUQhh+N1hoENwL9plUMyBn2AfhiiT8kPYF2ACrC0CGQl2SZuyAuC5PXgcs04PDYafXXAU6hxQ4FHtANwIYW+g2Y+vuvaZB1wLXff7QkSBYA3RThpIGYGqIL1DfAF+A4XcJAugALtDB/2MQWkH1M6jlkl9tEcRuCjo+0CWRvCtF2gTUG7HEZss8iQSxDyNFhyoDwN0AjGPwN8AVgD4SIaQDGR0IjIdWCVIHMjgOeB/WclIFQ/6BHzISdBMO3hNwGgl+SgIUCKwUoAmgL0QpyKn31gRGTPqTAe1aOdvAyy6wceCIMPkCWGQrrhoiZgB/snVFOwzAQRO2QElJFhUAJClUpwve/I0h8tagobVzH3nnvColsz+7sLEoQDUhDgDbAFOo+mGVFJoR2MYgi0BQas9vlO/qA2tYwrGDT2Bs9AjgAxI8ADgDtV0DPAaAtBJAA2tuEqAGIrxGgCKgdF0EkhPhCMdqAF/IRTDE4uIzW1JCI6nJYFsuKL4edw95QW1h3OSxSEAmIPxQnqPg7UH05qHxXkC7gtdQm6oFbmgBXMxq4BPzoQDk8klBI7UtgzQUwi/fCLwFPKOhMPkPRYAPSXiZECWg+VcEO0f7gQHlgnOWA2o1hFGAc6kIzhJ9RgJGoirQG9ISCR+OhwGqAJxH0B+FRoTcHTjg/kDzAuNSF2YMeeQBG5lBUetgLgbDRaQuqCHaYwH4RlQIbBMBN2IUy8FSAj1HLkEQAniBmDsAE/AcpjyAdoJtyFzKHMdBj1P4ACoCnaP0BfP9zaPhDOP/PIPISvHfwD+abw1jAk/GUYVXYkwKRkNfsFkxuyIFLypiZTXDFCFhiqqzGRtcYQJPTDCEbBlLAJmJTDiL/FmKXxVOwo/2/GG0GD4Et9q8FaRa3i39x/X+zdyc5CMNAEEUhuQnc/46sEFMGWyJy1PX+Fept7R7bfXAXdQWAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQADofPelvQrqqd7+BPRUcX8C2qu5PwGtVd2fgLbq7k9AS5X3J2C/2vsTsFf1/QnYrv7+BGyVsD8B62XsT8BaKfsTsFzO/gQslbQ/Ab9l7U/Ad2n7E/BZ3v4EvJe4PwGvMvcn4Fnq/gQc0zT8W+D2bu5H/LtpPuGdqPWuMwLB8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8CD/buRStRKIDC8NaBRBBFzfttxvP+7zi1Wq2mxgxLC87+v1f4d6VwIPv8TMA+PxOwz88E7PMzAfv8TMA+PxOQukfr/I86xieIyW89gT75n3WKvtz0C/IbT6BfBLxhNAHyn1as5YD875uvFDvyn7ePewJr8n9olClW63lADZOtYkT++vKZYkN+6wmsyH+xfKNYrPYBn3BfKQbk/7xplajlyP816aLVE8jI/2Vp2VNLZaOAKxi3cwLkv57B79ZNgPzXNbjbqUXIf32D5UEtQf7bGP5pxQSyScCNDJt/inxL/tM8HiQg/+11jo09PEj+8yI/QrzNAz4W6xHiGfm/17xRR4jJf4nojhCT/4fsG3F+lPyXiuoIMfkvE9kENuT/eZO6EyB/rEZr/YDNfUBTFF2dR/7Inb9HQH4D70+A/Ca+aQIV+RvrG24TVdOAJnt1gZj8jm72dHlC/pa4rxLye0sXybXzpwFtMi575Pd2tceJkgX52+lhAuT3Ni4T8ntLK/Kby7PP5i/JH4eiS35vw1KX2pI/Knlfl9jxTt/YdErVt+LHP0Kjg2pa8N9cojTOVEfyKyBOtf4M9Hitb8SOyYf9ecY/avse/b1Ndjoj4f1e0cvPLYCv/wbynt5zF2BglOi0WYCFQid1BwEeSp3CFwAbnUz/KwNspDu91ecGgJNfeosrAF4yvbYJsJLrlYTnvtxU+tciwEya6EXCESA/C34BeJvqBZ8AHM30bBtgaK5nnAKz1DnoSZeLgJ5K7gJ4m+gJ73x2ddCjfoCpir8A3gruA3pL9aDHdwBfXa4CedtIWgbYWvIRwNteEofBjaVSN8BYj8eBvK25DORtpmOAsZIvAd6WnAbzVmgYYGyvAGc5A/A2ZQDexgzA25ABmGMA5hiAOQZgjgGYYwDmGIA5BmCOAZjjTKg5jQOcifeDeWMA5hiAOT4DmPvb3h2lNAxEYRT+kzo0JtNqoFpQmyCz/z2KFJFa8d2e863hvCRzZ65fAXAOhcL5IwjOAOAMAM4A4AwAzgDgDADOAOAMAM4A4AwAzgDg4lPRaN4Ohus8DmYrjoSxLVmawHY+Fcu2zdrENSeOBZNtkmyasNa4MYJsdHMs25BPL01MY86mJqT7nJ28Hob0ni9DE88h3x6baOopFgBW+1x48lgYpfT5oXd9GMjzNteGyfEwhvKW363HxQZu3uE1f7gbdtO4b1e6WudSylz3JvJ/dfPDcc2FD2jGIfoz6ZkMAAAAAElFTkSuQmCC",team:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMAcN3YbAMJ8lQsGkdh97kVyyLTsT0Q7ayEfDXD6KSLdeSclIjjiMMAAAu4SURBVHja7NjbasJAFIbRbY0S0npA641Cxc77v2OveyElYCY7nbWe4YPZ/wQAAAAAAAAAAAAAAAAAAAAAANCU7bXvVrxI11+3sSDD/Vh4sdt9iGUYHoVJPJaQwGa1K0xk120iucu+MKHzJVIbToVJnQ6R2GFd+K2pAraO/wpuee+A70IFX5HUe6GKz0hp4wCs5JjzEegLlfSRkR+AavaR0FCoJuMU/Cg818AbYAP+4b8vQSdARefIxwis6Bj5vBWqWUc+AnhOAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASCAxgmgcQJonAAaJ4DGCaBxAmicABongJfpZiaAmcXMBDCOAAQgAAEIIPIRgACWKEYSgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABLBEMZIABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQggCWKkQQgAAH8sEvHNAAAAAiA7J/aDJ5ukAEBBBBAAAEEEEAAAQQQQAABBBBAgEcZCSCAAAIIIIAAAggggAACCCCAAAIIIIAAjzISQAABBBBAAAEEEEAAAQQQQAABBBBAAAEeZSSAAAIIIIAAAggggAACCCCAAAIIIIAAAjzKSAABBBBAAAEEEEAAAQQQQAABBBBAAAEEeJSRAAIIIIAAAggggAACCCCAAAIIIIAAAgjwKCMBBBBAAAEEEEAAAQQQQAABBBBAAAEEEOBRRgIIIIAAAggggAACCCCAAAIIIIAAAgggwKOMBBBAAAEEEEAAAQQQQAABBBBAAAEEEECARxkJIIAAAggggAACCCCAAAIIIIAAAggggACPMhJAAAEEEEAAAQQQQAABBBBAAAEEEEAAAR5lJIAAAggggAACCCCAAAIIIIAAAggggAACPMpIgLJLxzQAAAAIgOyf2gyebpABAQQQQAABBBBAAAEEEEAAAQQQQAABBHiUkQACCCCAAAIIIIAAAggggAACCCCAAAII8CgjAQQQQAABBBBAAAEEEEAAAQQQQAABBBDgUUYClF07y2kgiKEoehVIAGUgE5CkRYC8/e+RNZR/7NfyWULrSl1lVwfQAXQAHUAH0AF0AB1AB9ABdAAdQAcQt+wAxswtgNV8AniSJcYUCeBIPUdZIte7QvbUs5clch0UMlHPJEvkuilkRz07WSLXWiEn6vmSJXJtFPJNPX+yRK6rQh7Uc5Elcj0UcqWeH1kiIP/k9Ew9G1ki10Ihr9SzliUC0lcBOlPPmywxosxHO1DPhywxqsR/c0VBL3JEqrtCPqnIcxtEqmk+uyA4yRGZltv5DALhLkdkuinmQkWegwCGFRiebajoLEeMS58D6kZFnvdAEq22c7oFwq8MMS59eLqgJssnIYzKXwX+k3cvOgnEUBBAx0ddXbMqJkAUMJj5/38UwsMA4rZsdjtTzieIudveO20l4yC2A2Ekyz4JkhwGrz3SEFLlHwTwGZpqGkK67I2TV4ia0w+yCcvC1oCeuVCkUeibaDaCXVNhSCSQolXMg2180g9yGTe80BNUBcNIANIIjE4mAbIMJ8JIohCfmELXDe0gnsYSUHgJYBkMRTSVYqkYCDWeByGPEVlcF8DzgCCiCP2hFI8FOp8OQRZ1w9IGAfuIgxlk8cVLVcKbQMuNICKpFADlTaBlMhQJsidBRI+FWgcDEUljC8BGNA7o+w1ABgsW+wXwiwUhnsLMTP0L4LcPQIrsF+pV8l8AYEEriKJSI7+hz6wXhKE9LLlS0M0gx4LXteGIpRCe154D7HzQCeJoDExVDwQ4p8MxrDBjBzUsWLUCEEGlU6rfBDBcBmJQdUWy0EGg6TIQ7VTOzyq+E+N/PgCtVD4A0mHAQ2OjbiAGNKrYQTWGDaNkGFrI7ADEs2C26WC00GmQSKeBfS8LQQuFkwDS14K47wQxlNclycLHAI6PyGEg4YVb5TwUV0QuBP/S2RrrJ0FMm0E4T+mb+C6eBveNB2MQowm3iroctoQSgCE8vLGbW7sCYFMCcJ5QTM6vANiUAJyj0wHyLAAuJQBnSO2IHAuASwlA754adnRnWQBMegHo22hOXlkPYCc4PCOFno3f+aukJ6JKmQjglFIH2CkJ5jkURK/ClJ29wJdBLgB/y38RgMHFoEVEg3BCqQFgFgQ6VctfHose3bO7SvZxgEICwjgm1gm7gbdwR204pNYG8RsDu20Fsaf4+7sFwQyfEcGe4j++7uMgxawDsaH5+7uvADfuqQy9eG64cqVTwGNhRmHYEvz+c2a/AjToB2JN8/dvrHuAP+zd62KiMBAF4CkWUBTFG6JSLz3v/45bbbu77noBm8AknO8F/EFMJpPJxJWmMfJN2f7/w158ESq+JiJnGmOezJMF4GSg9764iOic7vxZAHRnhOWTgpcAnG0HUUWotjJAjAqPMGTs0QJwkuTQSUyK5jAkd6QjnPsVomLQZItPnS4Du+UdKok50x7OOl8Fcl2ks0ZYjNmUAHeAd0xVngqJKf0UpsROtQNyPAzQlv7xNAD4tIM+YkT4DnMK8ZXGbICYsBwDYAbgsYm+x6XFgOkM5gQONQStb6PuUEB+bpHjA48A3GwaoCv8c/cmsLOBoKrwz+cA8Fuo7D0RPdnfk5XHAaDSjKD8yOYAkzIH3oVU0TJDywAYpTDp4N0RoANbAXledIRRsecbAJ05YXnaNMMJM8Ct75zaGQDDHL/xFoi7m0F5TljghBvAJ4Vq3hiXpyRjXOP5u+AiHp4LyTOGJQybdyABcClScllExfSPbScSAJcmOhJCUluyhWkzr08Ab0lU9BKWuvo5TAs6kgBSmRKUeqJ3GHfwtATwsYGC2yJSy6AH48rOfn+RQfuFwlJDuId5eWcSwNdsWh8BUt10iw/8/kYtYrRLKhvFMC/eSMe1PQKkoskcJ/z+vo2Aeps/fn8Rz0aAVDF5wxm//5lXkaBU0C/xB+O/M2/yAfLQZAUrSn7/3wYl2tLS6g8c+P3/Mg3QErkvmcOOoMP5v2uSHtoh94SvMeyYdfT8R9/psNwxyGBJ5kUbcLOWW7RBbop2sGXcwfoPwz3W7A+AYYCreAHsXwq7LP58ACQrWPPO739LgcbdOPdNYc1aSFH7ALli2MP/eP/jAXXN1qppdvZH2qH7Xwr6rTwxAKJ1CntKHv88NAjQJLnUD2BRj+m/CiYZGnQ5+Mawacv0j76EgPwxOcKqFdM/FYU7NEa+RfsYVu24/dfYQOD+4s/tX1uGMZohZ4sMdsXc/tU0OKAR59+aw7KA1R+1JRmaIJIccRPD/xZFb2jAskhh25Hhn94nZ3M8xCdgW9OP4TyGfw7lhb8w/NNjqaWZ1JPGnWz+IuJmVtC8guGfgyUCxsTev/5wCwOBkx6Xf0OWyh6Z4OGfCa0357HsRcighYaWcjWUC6EbtLRntmnM5P9tahq027Pm7u8BJT267Thw+rdk4sQyMOf0b034oj4plL4KWTTQ0WT+phmTP3UpaNcNVv66ZKjvDfovAaO/RizVvDh16Y1Hv0/S8GrHj5U8+mtQou54aMXNX7NGqsoFY977qcTXw4E5u/5V4eskkPPvX5mPkcCKf/9aPNsOMPi3xt5TDtz7+2QYoDUBb/0oEO3Qkh3LPnXYZGhBxoM/NcKXGA2LX3nwp0myQqPeuPfT5n4wyODPf9E6RSNSFv0qNZ2jAXP2e9XL/jrQ4+yvmuV1IN5z9tcuecMFxv6dY6vtZ8Zm/44IRyWMO4w4+7sjKlIYlRbM+7tlugJY9NFp5kKBjBc+nBSOSi7+3WYgFEjXXPxd9tOswJGLv+sGYzxtzJoPHwxneMqMaX9PhKMDagsY+3kk2ueoJX9h7OeXZRGjsnjNcn//THYpKokLXvX206SI+fm7bbnOcVfOyd9z0b7ETQeGfh0QjQJc1ePGryPCfob/bPv8/B2yWOHCiuVeXTMtZvgyK1jq30nLRf/1tb9g3P+rPTgkAAAAABD0/7U3DAAAAAAAAAAAAAAAAAAAAAAAALATZ09HWAi+hXYAAAAASUVORK5CYII=",competition:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACjCAYAAABotuf8AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALiQAAC4kBN8nLrQAAEnpJREFUeJztXQmQXFUVpaBCzCIIghAooCBRIZDp7r93/+5Ze++GYrNEooALUux7sYmAqIAUQgWpArRKBBHKsMgiawhhEWIpi4AssoY9rAGUBEgGz+2ewDDTPfPf//3+7f79TtUtqMnMe/+de9599/3/lnXWUVBQUFBQUFBQUFBQUFBghe7k5unJ/FlWurzMSBVXGcnCMOxTZQ1tGBx9DK6W4/8vBG+D3P5rSxipQtl0S4/Ymepqp3fnT5V5N+IMAnuWOITApnH7sm3Qo/dtBWJWcDuo04041JxchdufgaHZ2el6srCfZudOQbS5xM5UrvFjIORlbqdExcDna4hg1/r0w58S1tBpdZ9mNwxdUAkrux7G953NVGkhGvGula6sxn/ZSVUW3ODLYfIpAsWt8PE+8PX6oQmLwi0e4G1uEpTJNQjsE93JHxWWqBIImyu5G60sNHF9DJ+XpIoK4+80zDx+xd1YZeEahsSb4+bgTGnCQpI+23LLz3E3VFm4RjkXhsSYNGHpyXwKSd0n3A1VFrawKmswU5T3GgMhcX/uRirjMfj+TGnCQo51DHcDlfEYfL9AmrB6jP4TuRuojMfg+wulCQuqPYO7gcp4LGFlr5YmLCtduZG7gcp4DL5/UZqwTLd8G3cDlfEYfL9cmrAwM1js56HsTHUVbGUzc3qra7iJi5CtmYTvVfQ7ouXC929LE5aZKi0SfqBkYdhKlx0ovqnpyfxF6iN2cCMOzVRx4UR8079BJA+Ilg3fvyVNWJZbul30gdAQsm0mFa1buoPbMZ1uxCE66XYT+hC+QL70kI+y32idksY/1K1+Gqw7hZ7JyrYzlQ00J38BGv0yhsaxPRHhu6o+fPfWhrIPxv4cnC3Xk8U/O+BwMp7JFyjjcdG64fvXWqOiBoBqr/BDSI/eZ3gpn9b+xIyBr2P4/IFmZ09O2NlTIbZjEbrzqPsqfsfyGni5xEgVMnqycEyNGzt3On52UMIeioG7GV44Jl+gEz8lWjeGwgeDqWcCwOm+XpBuPy+ZClp33Bz8KbdjuS1uDZ0UlEfyBaLPM6J1w/cXBa27KdBLjvJDiOZkvxO07rg51PVv/RGhjgvKI/kCEest0brh+3OD1t0U9BHaz+wNofskO11eN0jdGBqP43Yst+lIC4L6sOaLTEV4hQp8f3LQupsC+Y6vZTO00QKkfCVI3bqTO5bbsdwGDo8J6kPyhSMYHGrLZpx8NWjdTQHV7oQZyLs+1H7HvERm0lcOEwGh+Hhux3JbK4ZC8oVovfRiFX/nBK27KZDAbQHF3yv6YJZbfgeKTwepO4HEldux3Ibk/cQgHMIHU034QlxYlWWYPE34fiwQMK3dGMK6xofikWflfxikbkyzz+d2LLchYp0RhMMevc/ykyNjlHoCHXuzIHVPCs3J+UqijWTht0HqxRT5L9yO5TY4+NogHEIcZ/kStJO7Pki9nhA3B4Z8kvIIprqb+q0XY/wtXutCr/yQti1xC6HVZqaKN/nlj7hHSvIvP/XC5/v7rdczoPqvYTgUPrgD4/R7mNlpfupEtJuOOpd6dgB+F9PqF7iF0GpD57rLSOan++EQUUcjH4jWiYCwBj7f1k+dwkAS6Gv5DIT1Bz/17Rh3t0QDn/ZcT7JwPm0R5xZCq40+xczTej19Hhvns2T+ND91mqnSY37q8wXKszDUDAs/pFt6GxOArUXrw2xoLkhd7l1Y+aPxjGdyC0GCsF7X7OzuovwR5+D+bj91IkpeJlqfb6Bxup2uvO/nQeH0wy23NEWkPtrPCFI/8loHkZ+wsidwC6H1wqrSYXTCZykQ5/hbX/4Cl/Lzq7VAMjfDdMv3+3lQzO5eQUMzIvXRpwyv02T6vbg5OBs9zdd3zba22kK+klA6QUdNEed+6oOPP4Kv5b5mGAv0nAX+CKoOm27xAiNV8Hw8DoY1z8t1MPNZiQR3Csg8jF0IEgxD2j2efQSO0YnnE+d+6kKuers/dQQAKt0dCfUqPw9Mh4Ohwdt7rQvR53XPwkqXX6C/QR2HcItAhqF973j3UX57/P6D/nxU/QQ+/p4PaQQDpqD0Fv7SAD3vaTR80jAbM/rn0GFgAuXWXiKCmAO5RSDDaNKUMAcnnRliBr4ZuLghgIAfJB+3QitCQERYF7nPbqJfykcbItE5k9WDxu0hQPpqlHk6/Z1m58rIR9iFIMOQN034zdDJVKZAVOc2WsbszWqf4I4hH7dKL0KIG5TElzy/BhgnhHRlZcwc6G1WPs0ekSf8TEBYKyD279PfxoyBPtohxC0CGYY2TviJJWFnDXDheRY91uDT1zEBCv8M0tFAYn0UlO2zZ9TyrQ8ggEMblR23BrdFI+/yWhZ9LAUhtXOcSLAQZSSP9sYwRS9Kt2jEmZ4szgcPrwUpX3PyR8rUjCfUX76VPTu/iSDeQqI4f2zZCMcuSPR81ilEuBhDYe2TBwQGYRUjKSx0xvfRoe3xfBVIVE8EFO2biHjCL7GlwHSL+wU9+B+EfBAzBg/E8Dd1bbkg6jCRHM5MFT87EQX51T4ok10EsgzcHLy2rcQZOtKuxGEwwVbXoDPyR6u1wMPQDPHi4IRV10CkV6G8OVQuyrxO5O/xd4evfSaI7Ehu58s0DPOXUzvj5sBMiGxBK1ZzQJhLyZdcOmoIPNA3EaKFly036DXD1ECIam/890nvpJQ/pP2Ha5+H9iNyO1+m0ZBnuWVE5fLN4P2/gXlPV+hs9305NdQURqr085FDJwITNzK0iry/uhfJ/mfLZzE0RH0pM7hp3b1D5Dt0zPa8hwcheSYe7iIOolHveWsTdwJ68u/bwPkdYXSKkO7k5R233Qogt+nhOEeL7n8Z/RxqKbM3oyEV+ZrJJBcxYBja1PK5rMYnObR8dqvRz4BeGLmFfhJ4e19P5nfh0okvIILsgajxfBgEIb/6wjGGCSvbg4RW+ESVbjL45iPyEbgL7xKmVgHj9gB6xZsyCaJZJKLTJaPr3THu9ocl6k602gtpJ19mkkVw4OHXQ68oIXq0ZKbYRFgfjv0khDoPws8DT8GjaOQLdMTDyDdcumgZ0JDdEEH+I6f3lR9O2ENzRtenOflf0HkD3E5sN6OcinwB67zhrxlGFvTf6WcTxkQ2dhgkYFZ6PbcT28nqL51LS/1sZOkIJOzBjSGEK2l1YqsIM5L5cR+v0TOFDxaLsoHzKzQ7O6eRTyIDDFHTMFTNR/R6Nbiwatuhdhhdvu7kpiNiRW4XtB9DmvA68s3TiXMuf4cOJNybGqnCwiAfT9ETb7PT5amjy+3R+9LcDuW2+krawkJ0ukkPFY4kNCc3E7YLSBBO7GmbF4gb99EU0fBgbsdyGi3yQ4c7WrNz7f2JJgwg6myAsP2iCIEYSl8ZW07cGtzIdIu+N3h0uhGHGAkCHyQcGcTNQcsW2IlD67YstzTuWKSENdQDwXVt4o5capiOMufwYdtBs4doQ8ZNgj3zyYSdHffh1Ki/GO3q91fgZpHmZMPdvdyOSNQP/HhDhDzkEH9sVJaZKl7G7Vhuo8NT0On2DNuPbQeI5HdixFVXNzrBV0/mDSSuwjcuRNEQte7g8GXbgN4E05JiEdJMt/wohDVrbFkQ6An03ZDbqe1gdDKP1i47bThgpArCB3doTu74RmXR1i9uh7aT6U7uR2H7s20AMfxNhCz8/rJG5dBOFUQ+9bZ9lCGC300bfsP2KTswg6uKfDOkg94QrY4eW07M6F8PQ+MB3I5sNyNu0RGP4PAtGzAEzrDSYhdfgqT75unjt5WjV85C71SrGRqJK11Zgk7n+6TqjoOeLGTqd0F77n1rmr34M1PFvZGsRnIrfQuE9W7CGuyOXEuzh6ZAJOeJEISItERP5jcZWxYi2Pr4N+GbMrrJEOkfwAxR6MzXjkTCHtKQaHs+uIKuQNOcbMP12RgG59K1tdzOa2erHdQGzsP2c+igE/e8nolJCaiRLJ7XqBwnU5mGIfVObsd1gtH9R8i1Ng/b16EBSftckdsRLLd8HwgZd1apVt+ksVvQE266xcD5CojrWxw+DwXIrQRu8Kp+2uxIHfx8W9MtL+F2WCcZnRcbtr9DQT0fKnvOh5A7rUbS2fA8eAh0P7ULR8woF01YQzs04rOjgSFNaElLfaNE4fhGt1jg599AD/R8G5iy+isbzcmdyuB6uTBT4is7EeH+DTL0RuUhApq0TZzbYZ1kyHEfDdvv0uFHWCPiWtaj9321UZkg6tv+j5zuPkNu+kjYfpcODIU/9rcjp3Y2w5X4+y3HlonZ4fT6eVzdvWrUk4F73cmdxOF7qcDQtYXp84bPkUNXz9YaHA6Gn8+DCV+A3m2G5P0xJO8Nj/DueCDh3qj+mkA8wpC4MJzejzLGrXWfp/V+GT9/jNt57WrEuZkqRXuPIaJLDA290RE4X/Rzqw7b6cqDKGOXmNH/hYMtUOaudqaixPVFG0aO+lyN81Sp80+XmQwY0rZGYx/ySxidzozZ4qWa/cXdKCjTQEKvVpKOGKL4I+Da4vIzC+Lm4MZ+r5Nda+iN7xnJwkUoa08kppuOlDuT8glup3IbcYvOF+f2MwsQXWIj9+n5PtqIci8Mj8tB5N9R3i2IWjchokk9RbDNjc7Jf4a41exc9Ie/ZoCwtqHe5fVqXmXNjTgEn0thDV8qdyWQCyygD8/czulkIw57jP7uWYrsBQlraBNErgsRxgNfm9JtNrIs5krikNuPbYkeva92GK7pltVnGs+iqn5ipkqHgrupkzPc5YiZA3Mhrsf93r7eHUbnipZfSljZLF3Vy+2zjgEiVwLEXauO1W4oqo+IG93JN732WGEC6Mn8hkaysBfyB89bxaJutFTISBWOIG64/dPxMN3iTiB0cZeffUVD32LDLQ5y+yNSQOSaqtnZXTADeq7bBIY2v4YZ3wHEAbcfIgsMAdvQwWvdsPt55J6guxvtVFKQANrZGzcHdSOZvwzDQ+ReTdB5rMijbsDseKgrdjG3IxDBXCtdWuS04LJtdkMb6JMM2pTl5lVhnfrpNWaqOB85yKJO3BZGQ56eLPyj1oZUYSNuPhXGAI6Zgt4eR15yvuWWl7X1h+36B+MV9KwGfW3As3Pzp+ABCWvwS/P0XldzcjfTKsp2iGQ0m7XSlZc0J38z8qfv0jNy86TgE3FzYErM6N8GM6u9gtzb0wJRfYzo9JMeo38OPRM3LwotBGZbK/iEVXnXdEsONwcKEgDnBr7KLoCwXoWw1AK8KAIJ8m1cwjJTpdswDG7FzYGCBCBinMd1phbyq19j9jeDmwMFCdCT+V4I61kGYQ33GH0x7vYrSIKdLk9B1Do1zNkh1UVHLtlqMV60UTtDIu3vDAk/ZqXLj9GRS9ztVggBiCCz4PCHnV65kYvqQF1qlWc3QbOzW5hu8RQZyTyVabml6xKoA0PgutxtVQgZmKk5EMEqCcJaaaaK3XWPjcLnwFBlYziUcMdh9UOUfRh3+xSYQMISudNHJGKh7MO526fABLM+FEoRlhoKuxi6k3eRXLd8ZkhlouxjudunwAQ4v2inW79Oi8pE2b/kbp8CE0y3dEjrE/e6Ice6irt9CkxI2NnjZQnLSBZu4W6fAhOMlMilUWKGaBi9WyAUvMFyy9fJEhbyrPe426fAALqEG1FlqcQca01XXfStUEfM6E8hqjwjS1hkVAd3OxVChpEsHij77C2qg7udCiFDTxZ+QzuQZQqL6oibg2o5cjfBTJXukSkqMqojZg5sx91WhRCBxF3CqoYxwkIdmp1zuduqEBLi5sB+skU1ajg8lbu9CiFAd/JT4OyrwxIWotZfUafKs6KOhJ2dbWcqL4YlLKoLdea5260gGUaysGeYZ5iO3A67gLvdCh5hpArT49bQ5pjOz/JqCWtoFoR1cViiGjUcPkp1izwrGdr4FW6euwa6k9sIOdK5iAL3IRo8KWhPwf4XtrBqN8PW6xZ6XgjyAbT1crR5NjfvkQXtJAbRVcstvxC+MHjNSpffQNsPVLupJUBzci4Ifp7byVw2cl2xeifWakBUoedG7WbEAbcfIgU6zAM51RJux3IbcQAupnH7IzIwksXNnEz1cW7Hshs4ABc93P6IDIxkQQnrM2EVlLBaBSUsJSwpUMJSwpICJSwlLClQwlLCkgIlLCUsKVDCUsKSAiUsJSwpUMJSwpICJSwlLCmoCatXCYs4UMJqIZxMZWoY+wDb3WocZCobcPsjUkBPPRs9lt25nEYccPshctCcbMZ0S69wO5fLrHTlfeKA2w+RRMwY6LPS5Te5ncwgqvfQ9n25+Y80NCcXN1KFc3Qnf0/CHvpnlI3aSG2lNnPzrqCgoKCgoKCg0D74PybY2tE87U6rAAAAAElFTkSuQmCC",bin:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAA8klEQVR4nOWUvQ3CMBCFX5MGloAJwgQwAUwAYoAwATSUMAGZACYgA/CzQSaAjgGgQTIyegU6WfbZioQET3Lxonf+4uR8wL9oCcCItUrZyDS0vgewqhnK306nnDW2NqiK4WEEYMSavSZcMlx8PJNHl35Gv9EAFo4uMQHAmn6uAUwY3kYAdvRjDWDA8CkCcKbvawBdhi8RgCt9RwPIADy5MgXAlQ9KvpHxAFwnDkp+U+MBuP5ZULIrjAfg6rqgZF8bD8B1b4IqWFTSHx2Ag+fmNzpbqoTZhV7EdKwTpi/aAB4R8/8OoIVITQHcFJvbjO2kH9UL+0+m+SiE/A0AAAAASUVORK5CYII=",checkMark:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAE10lEQVR4nO2ZXVBUdRjGdzS78BLqSmqyIKducjKZuvKqNMMpMgQW17IENEIFEWhVViYEJlm+dmG/JAFFZFcQ+QqlRKAQiNUWli/5EJYFgd0FUWI/gJ7mv+ZkAp497GG3Znhmzv3vec/7f//veQ6LtaIVrchuySFfLbY0vpc528DNtDQUCi31bemm+vE0Y50lZbrWkmysGedP31AnTVUXJk1d5yZOVr/LA28Vy9n6AU0vSeaaEiUzTVrRbCMyZxogtNyEwFyPdNMvSDXWIcVYi+TpGiT9cQOnp6rx/cPrSHz4E+Inrw3GTV5N4Okr3BwOnoVbL8rmlBLJbJNZMtsEuvAJD6pwavIa4u5fxXfjleaTExUi3oOSFxwCL8MttnROaZDO/Qa74ScqETvxI06OV4CnL9MfHyv1WzZwCZrXnIFSJvtTCcbhDWU4oS/FcV0JuKNXxEGQrGEafu0ZKCuWG/7Y2BV8O1aMqJGict5QyVomK+8w+OjRy8QAjg4rqnhq+fN2G3BE2xx7Gv7eJUQMKxA+JBfZCX87wGnww3KEDRXgkDbfd0nwOWh0lc0pdc6EP6y9iNDBC4bwoTz6I5bMeWfDHxzMR6gmDyH95zNowUuhcmPkkmIA/puB8/h6INcc1Jvzss0GrOuBg+CPaC/CuywWIT25i8Cfw4H+XAT3ZSfYBM8DVolnmgYdAR+uLcDGU/5wYb+D9Yc+QHB71oLw++/mILD3rNYH8tWUBshW6ajKvxXnB9fdm60GXPw3wT1s24LwQX3ZxAC+6pV5UhqwrsSOgud4zjOwOHwW9vbKoikNZFhuFi1728SzH8Fz/jHwysH3sU8tXRT+y54z+KJbpqA0ILDUq22BjxkpAefn04jVly+t8k8YeDVsKwLbnw2/t1uGPXekLdQGTL8aKOGHi7EheocV4O14NmJ0pfQr//ezPmwrZeUJ/Od3pNjTJdFRGkg31pmp2uZN7if/gtgUH4ATo8X0Ks/xxGsRHyKwXWYrPHZ3ik2UBlKna81UPf/GUwYevwnuSNGywXO6xAjoEFEbSDHWGKgOLHewEBuivOZBbYzzQ+TwJRvaZhv2tUnpwXeKwG4XUreQNT2wYdpEaRR4fQETpNoRWgXz8B0Z8GsTUh/ipKnqIltHZUR/ATwiFzbBWNt0PoL3bxdiV5uAeoyS3IbOnD9y9wI8Ij+aB8tk5f3bhfBtE8BHnRZFaYCETnQvqcN9ec80wQT8LnU6vFtTN1MaIIlZwmSVhu4NG9qTC/fI7csGv7M1bcDmNI8kZkvZ50O6s+F+dDvj8J+p07CzNTXeJnjrW9BXuJHEbCkfI/s7z8Ijeof1sefA+j4J35Ji8rnNX8eiIxL32f8lxUjl4a1KFtCCt76F+5UuMfoynbPhP1Xx9V7NSUvLTUlW6VT4lmR4t/B9WPaIZJXOgv/4d76QZa/Id2jUaNFlh8Or+GVbqnnPsZgQCVoj7inKHQhf6tUsYSbcfSwSeZOs0hFts4Wpyi8kklWGavJ1jI/KFv6Y3QfWVoVoc1xJ3Hdg4JyJiUvKW5Us8FHzXViOVrAmex1JzAL7sjW0dxt1moasB7Rv2OUQWbJI6ERyGxJ9kPSA0yU2cLpE5oDOTDO7Q2jwbxOoyD5PVmKyVf4nfrOuaEWs/7/+Atqs1blaLwVcAAAAAElFTkSuQmCC",upload:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC+ElEQVR4nO2aO2gUURSGP8T1AaImIGjUIkIMooj4KgRBbFJZiYVY2agIVj5WsDC9VklIsLNQwS2yhZVmN4KotYVPWERFLBbER1Y0aBy5cAaGZXZm7nhn92bmfnBg2T1n98x/z5z7mAWHw+FwOBwOh8MheDm3WLycmxMgDi/n5gSIw8u5OQHi8BLaPHAJGBAry3uFqYBySGy5SAJsCIldXyQBBkJiNxb9FricUdK3gDu2CTAvImTdBN8Ca4C1wAebBPC6YL+BA4HcDgJ/iiTA1ZD8rhdFgMfA0pD8lgPP8i7AV2AwIsftwM88C3AiQZ7n8yTAJ6ACnAK2JEkSWALU8yDAbdKjFl6fF7MAH4F+/o+jNgrQBI4BR6S8w3wWgMOY4Z1NAlSAdYHv6wNuhPhdwxw3bRCgKaMexqE23+fACoMCnOy1AJW2UW/nYcD3F7ATswz2SoBmxKh3Gn01f2fBMmAlsAnYD5wD7gKtrASoxIx62OjXZf7uJquBM7KrNCbAC40ERiXmC7AZcwzLFrwGvJKRbsnrmnymfHxUz7liSoBRzWSV/3HMsA+Y1ahUVXV7dX7AS2BqM9JtSsAk8DdFk1YxE/IdsXgGy98U/W29JK3NyrokEi/FIUWWlDRLPs4eyYzREdvKf9Lgxfs2HvWDXo/tvZz6+A0vyT0/F8i/lbAn7LFVgNOBXJKWfiMQ00gYM2OjAD+AVZLHNs3zQ58nGnHDtgmglq5pnjNOB+KmNeIu2ibA2UAeNY24qUDclEbcA9sEUJsYnzcdfFpyn6tSr8osMRKIG5H3quLTiGiMr20TQD1d9pnr4JOWuNnDCgGChyTfuyDAt6SO3TJ//u/pLWALM11ogvexmLTTYFUj7gIWM6RxIarUfZ5qxG3Fcuq9WArbxC55gBJ3MarJGdsM2cZEBrPNGIuIUsqnwKkPRGykz9CpUD3JkZjNlTCe8lB0Qco+7C83i44dwD2Ni1fdfjc5ZEj282pLqx6GqI2NspeywlOfKZ9I/gGPNfEFBL9FwQAAAABJRU5ErkJggg==",upArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAz0lEQVR4nO3YywrCMBBG4fOE1oWDC/vsCiq+RAuVQLpzvDVtJvAfCJSki/nIqgWllFJKKaUqtwfuwDU/N5kBAzDlNQI9jSOmFjHmIJrCHF8gBmcvvdvMTYzACTg4Z31LiLnwGPsCER5jPyDCYuwPRDiMLUCEwVgBRHWMFURUw9gKiM0xtiJiM4xtgFgdYxsi5opjaiCKY2oiimEiIBZjuoDfDkdnpjSr2y0Y4h0m/dBwewREeJg0q1uXpedPV1epDrjkGXe1h1FKKaWUUrTVE5bz7NyN3sYLAAAAAElFTkSuQmCC",downArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAgklEQVR4nO2UOwrAIBAF5xKReP+bJFV+TSxynATBQiSI0TXVDggW7htesYKiKIogE7ADRiDLZxzAXPJ4BW7ANcpNyPBZS8nAAJxh4AJshTTNGGsH7R/SFnmztEYuJv0iF5eWyLtJc/Lu0rfddMld4sPJErfs3jTFt9vC6d5UURSFmAePTDtnrV72/QAAAABJRU5ErkJggg==",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAABvUlEQVR4nO2XTUrDQBSAPwXBn7ps0TO4EFfd24obEfQQHqOt4qIewAt4BkFci+610IIW7MpFXQtWxJGRNxBK02k0qTPpfDCUvDbJ+/LezDQQCARmBpWTQe5EfEUFEcdQoSKOoUJFMmIZOAG6wEA+G8CSTxXRyd7F7A+3FhmnRI4lh2egAqwAVaAn8bovIl3JYXsoXpX4ky8iA8mhMBRflfh7miIlYJNsK1IZiu9I/DEtES3RAtrAIunTkBx60k4FkTBzpJaGiJEwvztL3+NnVdKr06hV68by8CYSiUroCfcpo5yBjE62LvcZyGdtgg6wihSBB/muA6xJNcyxbaOaFmqcSLQSLTlGnk5b4s2YCy/giEgpRsJQjrTYHnAAnAJXQD/mnKmLFEe00yialtdOfe76f4mULJWIYlqsL5XQFTmUfWbSa2Qm0kqYQNxqkuSBZCKiLO2UhGiLjmu/rSxEOilJJJH5kF19Pu05Mi30HnQOfMm9r/+wOCgX/v3uAi9y/1dg31cRpBMuI3lcyIuVdyKaOeAIeLPMqXHDCRHDBnCfB5HfEERcQ4XWcgwVKuIYKrcVUZ4PciMSCARmgG9mLvK/OR2iiQAAAABJRU5ErkJggg==",flag:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIUAAACBCAYAAADuS3kqAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAACfRJREFUeJztnXuIXNUdx913shutjfVBqtGFupuZ3Xnd9zz3Ne/dYKEo/isSEGqFSlslSFBi2kStSqkiCEGl1D/ECP4hKLYmTUziZjfRjUl8FzU0pbJLtIlJ1t2N37PZQHBM9t67d845d+b3hS8z9+59nfP73N/5nZnZmcsuI5FIJJJE0pOlpqg+2NwbTbUEQlZLd4/ecnNAbT3vrqDWuqbXbA1GEq0RbaBFSxSbRF8zySOF1b5G1cqtDCl93Xhcq1r530X1gYeMVHlUTxSPYnkqZgydBCDTCP4cfJY9YnkG608pVu44gDiGbXdFtP6N2P4+xcwWw2p/AH/vwHYEi+xC8BoQrOUI1q3wk1jeA39ppIZPm+nhOSuz9uxSjePMmjgeYPlIjeffCGt9vwcoAZyvRXT7SQvCUHAFAjIIGNYjUP/A8gkzPbLk4DsxzjmtJQrjgGNzVBtI4FpaRfdL3QkdvwypPaPFC5uMZGkcmQAgDHMF4cezyMickSxPApLtuL518C8AS6Po/qppYShYjbtwHdL2q3qyfEo0BIsMM3OoXY4iez0AeDvNVLlBdP/VjHC3tQGComLmtgGE06KD7caA42u0YyOK3JVL7hAccAW8DR5d8L6LeAze6kEMpBIq/lvUeGEn7rrvRAd26ZljZE5PFg+j7uhH1nA/pOBgP4E/sXni3R7GQ5gwdbwaIGzAuPwpagVPZgwyGVnjjBYvbsEweLmrDqonKBQru0q18vdjDJ4UHbhqm9UbGBJfQpHc5bijcIArah0KFI8rAMPdyAzHWIoVHTCOnsFM5UHHHVbLUKDwuhLTtQ1Ip/+TIEAiPAsoNjruOIdQ7KlC7DwXIOjQ4vlfYZjYgTQ6I0FwfAnFx7UCRdQY7EIR+SJgmJYgKKJd31AoZu46DTAgSxAMHkBxuZ+hAAjNmHr9AUPFvyUIgmyuLygw1boKReSv8fhxnc0onELxsOPO9RsUmHtfjaxwJ4aJccBwRoKOl9lcoNhbhTjbEoaIFTEzu05Plj63MpQZ6hYKI1VqiZlD3agb/gYYpmiYkBiKrqDeGlIyN1jpYc8/6ME+PBLVB8PICvdgmHgbU8uTEnSuX+0aihVOoQAQIRR5n8HPhrW+jGrl25YCgmJmGwFCGhlhA471MrLCccoKnkGxiQsUCGAMQZv/AAoeZ1D8/Ze9RqBYubvwPN8TSXZim9W406/HRf0cvhLPVyELrAZQnRGtP6InSndgm3uxfif2+8pIDc9K0Im1ZjFQ/MBz7GVlzAxO4vFrKz0yhXWTWP4cy5PY5zj7WBt7a5dtK0Gn1bqXBMVHNk/yDtsHd3z0IlCQ5TJBQfYOig6CombNEQozGwEU30rQaPLiUPyRCxSYQoYJCl+YCxSj56DIERT+MEcorFyIoPCF+UGhnoOCXn6W366haHcORb6XoPCFZ40ULyjiBIVPzBOKAkHhD7N/QP6TWyg+tHmSfWwfLVHoISh8YZ5QFINWeuSEBI0mywKFTlD4xa6hWO4YimQpYGUICh+YoCCLgWLsHBRlQLGWoJDfDIrNvKBYg+f/l6DRZFmgMAgKv5gjFKlyN0HhCwOKYVdQLHMKhZkaJij8YY5QpEe68PwbCRpNXhyKLW6h+MDmScYXMsWNOFnNf5lYDZgfFOynCmJm1m52IdcDFDcHVPZFIXb3IfsQijbnUGiAIntEgkaTZYGiKwgoTILCB2ZQPFJtKPZfAMVhCRpNlgiKJoWg8IN5QqE3IVMckqDRZFmg6O4hKHxi11C0uoECw8f7EjSaLA8UBqDIERTym0HxaLWhOHABFAclaDS5ilDYfc2BoPCXOULROw/FhASNJlcJihanUKzpNQkKf5g7FO9J0Gjy4lA8xguKRoLCF+YCxbvzUISsRsXKvStBo8kEBVlaKAKAQrVyByRoNLlKUDQ7hyIOKPIEhfzmCEV4Hor9EjSavDgUfyYoyJ5BYfcDM++xfYLhBINiXIJGkwkKMi8omhxDEQEU8fyYBI0mywJFTyRJUPjDXKFo0OKFfRI0mrw4FI9XG4qJeSiiBIVfzBuKUdENJksFRapBJSh8YbdQNDqFovccFO+IbjBZJihiKTZ8EBQ+MEco0gyKvaIbLKPN9MhZLVE4ZaTKX+nJ0ljUGHpBtfLPaoni01j+q5Es/0WHsfwUsu0zMTO7VbVyryF4x7DuhNe/3IzjPuEWCrv/7XWQ7RMiKM4DwKZ8JxHcCS1ReiOiDdyvxvO3OQ7Cgsz0MIbl/K1hrf8+gPU6IPoC677zBxRKpgFU7xEdFEEgnEWwvgEIb8aM7DoEsFNPFJrdgnAp4cb7Kc5T1uL5vyPzTFkZ51mENxS7RQeIlwHBDIJzULFyW5ANBsJqX4PnBCwiPVFcFlb7h5BJngcgtr+Z0C0UDQRFpdnQABjYOP9yVB8soc3XeB5pF0L2aAYYA7i25wDHot9QyBGKvpqFYr5QjBcOozjcHDUGA4qZ5Z4V7ArXVgQcE+yaLwHFk44P7BCK98/vByjeFh1Aj2GYBQzjipn7ZUTrlxaEHxMyx1Zc/4wMUOwSHUgvjDttFiBsQ7V/i5EstnsaLU7SE6V2tOMx+LRQKHSfQ4Gp3oyRLO/AMJEVUThWQ6h9CgDjuDgoksWdogPrEoZpdNx+DBVr0YZGT6MigZDBkyhA/4Ppq3somNxBUfIdFADhQxRntxvJUodnUZBQMTO7CnXGAQYGbyj+JTrI9jLD/ItNX6jxwnpkiZWe9bzkwrD4M7T7Jdj5ex9MLNg2O/nQ+X38AAXS6CSKyMdjxuBNyBI1UTc4EWJ0LWo/xdXOLqHYITrol4BhFrOJ15BCcyi+6g4GT1QrUACGM0ibb0b1gSxqh5orIrnKHRTl7aIhuACGGWSFVzBMpCNaP8HghdxAgTn+WyJBWCggj0aNwU3ICgZlBo/lEop/CgCB/XreFIqn7Sgcf6tauWBYyRAM1RA63O7XH7Kp63zhhuBwgWIhI5zA8LBLsXL3KOZQJ7JCk+g+q3m5gQKB+Q3u1DH23r6RWtqngy4EAMeaRhaaBAB7o8bQw3AhrPa1ITMQCDzlBgoA0RhSMq0IXjceFUwB740ZQw/GzOwzAGU3UvwYZgIT+PshAHQE6z9gZs+x/qAaLxxABhiF34poA6wuWI9tb++NpsL4+40hta8Z56DppCi5geJiYu8nIMDLAUp7IBxvX9NrdHQFdVhbsI51ZnswkliODLAMw0Ibr3aSHMhLKEg1IgdQHCYo6kQItN2vVCYo6kUEBalCBAWpQgQFqUIEBalCDqGg9xrqQQi03Z9pICjqRQQFqUIEBalCBAWpQgQFqUIItN1f+TlCUNSJCApShQgKUoUIClKFCApShRxCQR+grQch0HZ/OZCgqBcRFKQKERSkChEUJBKJRCKRHOh7LktbCRuu/n0AAAAASUVORK5CYII="},fL=({match:e,timeFormat:t})=>{var n,r,i,o;return c.jsxs(v.Box,{display:"flex",alignItems:"center",gap:.5,fontSize:"xs",children:[c.jsxs(v.Typography,{mr:1,children:["[",kt(e.kickoffAt).format(t),"]"]}),e.homeTeam.code?c.jsx(v.Tooltip,{title:e.homeTeam.name,children:c.jsxs(v.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[c.jsx(v.Typography,{children:e.homeTeam.code||e.homeTeam.name}),c.jsx(v.Avatar,{src:((n=e.homeTeam.assets)==null?void 0:n.logo)||ze.team,sx:{width:"20px",height:"20px"}})]})}):c.jsxs(c.Fragment,{children:[c.jsx(v.Typography,{children:e.homeTeam.code||e.homeTeam.name}),c.jsx(v.Avatar,{src:((r=e.homeTeam.assets)==null?void 0:r.logo)||ze.team,sx:{width:"20px",height:"20px"}})]}),"-",e.awayTeam.code?c.jsx(v.Tooltip,{title:e.awayTeam.name,children:c.jsxs(v.Box,{display:"flex",gap:.5,alignItems:"center",children:[c.jsx(v.Avatar,{src:((i=e.awayTeam.assets)==null?void 0:i.logo)||ze.team,sx:{width:"20px",height:"20px"}})," ",c.jsx(v.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})}):c.jsxs(c.Fragment,{children:[c.jsx(v.Avatar,{src:((o=e.awayTeam.assets)==null?void 0:o.logo)||ze.team,sx:{width:"20px",height:"20px"}}),c.jsx(v.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})]})},hm=Ve(c.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),hL=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),{sdk:s}=lt(),l=()=>_(this,null,function*(){try{const h=yield s.topX.getGames({limit:50},!0),p=yield s.matchQuiz.getGames({limit:50},!0),m=[...h.data,...p.data];if(e.related&&e.related.length>0){const g=m.filter(b=>{var w;return(w=e.related)==null?void 0:w.some(S=>S.entity_id===b.id)}).map(b=>b.id);n(g)}i(m)}catch(f){console.error(f),d()}}),u=(f,h)=>{const p=h.map(m=>({entity_id:m,entity_type:"GAME",entity_relationship:"relatedTo"}));e.onChange(p)},d=()=>a(!o);return x.useEffect(()=>{l()},[]),c.jsxs(c.Fragment,{children:[r.length>0?c.jsxs(v.FormControl,{sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{color:"primary",children:e.label}),c.jsx(v.Select,{multiple:!0,indicator:c.jsx(hm,{}),defaultValue:t,renderValue:f=>c.jsx(v.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>c.jsx(v.Chip,{variant:"soft",color:"primary",children:h.label},`related-game-${h.label}-${p}`))}),onChange:u,sx:{minWidth:"15rem",[`& .${v.selectClasses.indicator}`]:{transition:"0.2s",[`&.${v.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>c.jsx(v.Option,{value:f.id,children:f.title?f.title+` (${f.type})`:`Game with no title (${f.type}). ID: ${f.id}`},`related-game-title-${f.id}`))})]}):c.jsx(c.Fragment,{}),c.jsx(nt,{showToast:o,message:"There was a problem witch fetching games for related options",color:"danger",hideToast:d})]})},pL=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),{sdk:s}=lt(),l=()=>_(this,null,function*(){try{const h=yield s.loyalty.getTemplates(void 0,!0);if(e.related&&e.related.length>0){const p=h.data.filter(m=>{var g;return(g=e.related)==null?void 0:g.some(b=>b.entity_id===m.id)}).map(m=>m.id);n(p)}i(h.data)}catch(f){console.error(f),d()}}),u=(f,h)=>{const p=h.map(m=>({entity_id:m,entity_type:"TEMPLATE",entity_relationship:"relatedTo"}));e.onChange(p)},d=()=>a(!o);return x.useEffect(()=>{l()},[]),c.jsxs(c.Fragment,{children:[r.length>0?c.jsxs(v.FormControl,{sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{color:"primary",children:e.label}),c.jsx(v.Select,{multiple:!0,indicator:c.jsx(hm,{}),defaultValue:t,renderValue:f=>c.jsx(v.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>c.jsx(v.Chip,{variant:"soft",color:"primary",children:h.label},`related-template-${h.label}-${p}`))}),onChange:u,sx:{minWidth:"15rem",[`& .${v.selectClasses.indicator}`]:{transition:"0.2s",[`&.${v.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>c.jsx(v.Option,{value:f.id,children:f.name||`Template with no name. ID: ${f.id}`},`related-template-name-${f.id}`))})]}):c.jsx(c.Fragment,{}),c.jsx(nt,{showToast:o,message:"There was a problem witch fetching templates for related options",color:"danger",hideToast:d})]})},pm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="game"),gm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="template"),gL=e=>{const t=(n,r)=>{if(r==="games"){const i=gm(e.related);e.onChange([...n,...i])}if(r==="templates"){const i=pm(e.related);e.onChange([...n,...i])}};return c.jsxs(c.Fragment,{children:[c.jsx(hL,{label:e.labels.games,related:pm(e.related),onChange:n=>t(n,"games")}),c.jsx(pL,{label:e.labels.templates,related:gm(e.related),onChange:n=>t(n,"templates")})]})},mL=(e,t)=>{const[n,r]=x.useState(null),{https:i}=lt(),o=()=>_(this,null,function*(){const a=yield i.getSchedulersByEntityId(e);if(a.ok){const s=yield a.json();r(s.data);return}r([])});return x.useEffect(()=>(o(),()=>r(null)),[e,t]),n},fs=({my:e})=>c.jsx(v.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",my:e},children:c.jsx(v.CircularProgress,{variant:"solid",color:"neutral"})}),vL=["PENDING","LIVE","SETTLED"],bL=["OPEN"],yL=["ACTIVE","INACTIVE","EXPIRED"],xL=new Map().set("PENDING","Pending").set("LIVE","Live").set("SETTLED","Settled").set("CANCELED","Canceled").set("OPEN","Open").set("ACTIVE","Active").set("INACTIVE","Inactive").set("PENDING","Pending").set("EXPIRED","Expired"),mm=e=>{let t=[];return e.entityType==="CLASSIC_QUIZ"||e.entityType==="PERSONALITY_QUIZ"||e.entityType==="EITHER_OR"||e.entityType==="POLL"?t=Array.from(yL):e.entityType==="TEMPLATE"?t=Array.from(vL):t=Array.from(bL),c.jsx(c.Fragment,{children:t.map(n=>c.jsx(v.Option,{value:n,children:xL.get(n)},`${e.entityType}-${n}-status`))})};class CL{constructor(){ne(this,"name","");ne(this,"scheduled_task_config",{entity_id:"",entity_type:"",change:{status:""}});ne(this,"trigger",{trigger_type:"DATETIME",date:""})}}const wL=Ve(c.jsx("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3M12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1m1 4h-2v-2h2z"}),"WarningRounded"),IL=e=>{const[t,n]=x.useState(!1),{https:r}=lt(),i=o=>_(this,null,function*(){if(o.stopPropagation(),n(!0),(yield r.deleteScheduledTask(e.taskId)).ok){n(!1),e.toggleToast("success",e.labels.deleteScheduledTaskMessage),e.refetchTasks(),e.toggleModal();return}n(!1),e.toggleToast("danger",e.labels.deleteScheduledTaskErrorMessage)});return c.jsx(c.Fragment,{children:c.jsx(v.Modal,{open:e.isOpen,onClose:e.toggleModal,children:c.jsxs(v.ModalDialog,{children:[c.jsxs(v.DialogTitle,{children:[c.jsx(wL,{}),e.labels.deleteScheduledTaskModalTitle]}),c.jsx(v.Divider,{}),c.jsx(v.DialogContent,{children:c.jsxs(v.Typography,{children:[e.labels.deleteScheduledTaskModalParagraph,c.jsx(v.Typography,{fontWeight:"bold",children:e.taskName}),"?"]})}),c.jsxs(v.DialogActions,{children:[c.jsx(v.Button,{loading:t,variant:"solid",color:"danger",onClick:o=>i(o),children:e.labels.delete}),c.jsx(v.Button,{variant:"plain",color:"neutral",onClick:o=>{o.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]})})})},SL=e=>{const[t,n]=x.useState(null),[r,i]=x.useState(""),[o,a]=x.useState(""),[s,l]=x.useState(""),[u,d]=x.useState(""),[f,h]=x.useState(!1),[p,m]=x.useState(!1),[g,b]=x.useState(!1),[w,S]=x.useState("success"),[C,I]=x.useState(""),[y,A]=x.useState(!1),E=x.useRef(!1),k=mL(e.entityId,E.current),{https:F}=lt();if(!k)return c.jsx(fs,{my:10});const Y=()=>A(!y),O=(M,H)=>{b(!0),S(M),I(H)},T=(M,H)=>{i(H.scheduled_task_config.change.status),l(H.trigger.date),n(M)},N=()=>_(this,null,function*(){h(!0);const M=$("CREATE","");if((yield F.setSchedulers(M,"CREATE",null)).ok){h(!1),a(""),d(""),E.current=!E.current,O("success",e.labels.createScheduledTaskMessage);return}h(!1),a(""),d(""),O("danger",e.labels.createScheduledTaskErrorMessage)}),V=(M,H)=>_(this,null,function*(){m(!0);const Q=$("UPDATE",H);if((yield F.setSchedulers(Q,"UPDATE",M)).ok){m(!1),n(null),i(""),l(""),E.current=!E.current,O("success",e.labels.updateScheduledTaskMessage);return}m(!1),O("danger",e.labels.updateScheduledTaskErrorMessage),n(null),i(""),l("")}),j=()=>{E.current=!E.current},$=(M,H)=>{const Q=new CL,te=M==="CREATE"?o:r,R=M==="CREATE"?null:H,L=M==="CREATE"?u:s;return Q.scheduled_task_config.entity_id=e.entityId,Q.scheduled_task_config.entity_type=e.entityType,Q.scheduled_task_config.change.status=te,Q.trigger.date=L,Q.name=R,Q};return c.jsxs(c.Fragment,{children:[k.map((M,H)=>c.jsx(v.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:c.jsx(v.CardContent,{children:t===H?c.jsxs(v.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%"},children:[c.jsxs(v.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[c.jsx(v.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),c.jsx(v.Select,{value:r,size:"sm",name:"status",onChange:(Q,te)=>i(te),sx:{minHeight:"36px"},children:c.jsx(mm,{entityType:e.entityType})})]}),c.jsxs(v.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[c.jsx(v.FormLabel,{required:!0,color:"primary",children:e.labels.at}),c.jsx(Qc,{defaultDate:s,onChange:Q=>l(Q)})]}),r&&s?c.jsx(v.Button,{onClick:()=>V(M.id,M.name),loading:p,sx:{mt:"auto"},children:e.labels.save}):c.jsx(v.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.save})]}):c.jsxs(v.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"}},children:[c.jsxs(v.Box,{children:[c.jsxs(v.Typography,{style:{fontWeight:"bold"},children:[e.labels.name,": ",c.jsx(v.Typography,{whiteSpace:"wrap",children:M.name})]}),c.jsxs(v.Typography,{style:{color:"gray"},children:[e.labels.status,": ",c.jsx(v.Typography,{whiteSpace:"wrap",children:M.status})]})]}),!e.readOnly&&c.jsxs(v.Box,{children:[c.jsx(v.Tooltip,{title:e.labels.edit,children:c.jsx(v.IconButton,{onClick:()=>T(H,M),children:c.jsx(De.Edit,{})})}),c.jsx(v.Tooltip,{title:e.labels.delete,children:c.jsx(v.IconButton,{onClick:Y,children:c.jsx(De.Delete,{})})})]}),c.jsx(IL,{labels:e.labels,isOpen:y,taskId:M.id,taskName:M.name,toggleModal:Y,refetchTasks:j,toggleToast:O})]})})},`scheduled-task-${e.entityId}-${e.entityType}-${M.id}`)),!e.readOnly&&c.jsxs(v.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%",mt:k&&k.length?2:0},children:[c.jsxs(v.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[c.jsx(v.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),c.jsx(v.Select,{value:o,size:"sm",name:"status",onChange:(M,H)=>a(H),sx:{minHeight:"37px"},children:c.jsx(mm,{entityType:e.entityType})})]}),c.jsxs(v.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[c.jsx(v.FormLabel,{required:!0,color:"primary",children:e.labels.at}),c.jsx(Qc,{defaultDate:u,onChange:M=>d(M)})]}),o&&u?c.jsx(v.Button,{onClick:N,loading:f,sx:{mt:"auto"},children:e.labels.create}):c.jsx(v.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.create})]}),c.jsx(nt,{showToast:g,message:C,color:w,hideToast:()=>b(!1)})]})};function AL(e){return at("MuiIconButton",e)}Ze("MuiIconButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","loading","loadingIndicator"]);const TL=["children","action","component","color","disabled","variant","loading","loadingIndicator","size","slots","slotProps"],EL=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,size:o,variant:a,loading:s}=e,l={root:["root",n&&"disabled",r&&"focusVisible",a&&`variant${ye(a)}`,t&&`color${ye(t)}`,o&&`size${ye(o)}`,s&&"loading"],loadingIndicator:["loadingIndicator"]},u=dt(l,AL,{});return r&&i&&(u.root+=` ${i}`),u},kL=be("button")(({theme:e,ownerState:t})=>{var n,r,i,o;return[D({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon},t.instanceSize&&{"--IconButton-size":{sm:"2rem",md:"2.25rem",lg:"2.75rem"}[t.instanceSize]},t.size==="sm"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2rem) / 1.6)","--CircularProgress-size":"20px","--CircularProgress-thickness":"2px",minWidth:"var(--IconButton-size, 2rem)",minHeight:"var(--IconButton-size, 2rem)",fontSize:e.vars.fontSize.sm,paddingInline:"2px"},t.size==="md"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2.25rem) / 1.5)","--CircularProgress-size":"20px","--CircularProgress-thickness":"2px",minWidth:"var(--IconButton-size, 2.25rem)",minHeight:"var(--IconButton-size, 2.25rem)",fontSize:e.vars.fontSize.md,paddingInline:"0.25rem"},t.size==="lg"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2.75rem) / 1.571)","--CircularProgress-size":"28px","--CircularProgress-thickness":"4px",minWidth:"var(--IconButton-size, 2.75rem)",minHeight:"var(--IconButton-size, 2.75rem)",fontSize:e.vars.fontSize.lg,paddingInline:"0.375rem"},{WebkitTapHighlightColor:"transparent",paddingBlock:0,fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.md,margin:"var(--IconButton-margin)",borderRadius:`var(--IconButton-radius, ${e.vars.radius.sm})`,border:"none",boxSizing:"border-box",backgroundColor:"transparent",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",[e.focus.selector]:D({"--Icon-color":"currentColor"},e.focus.default)}),D({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":D({"--Icon-color":"currentColor"},(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color])},'&:active, &[aria-pressed="true"]':D({"--Icon-color":"currentColor"},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color]),"&:disabled":(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]})]}),_L=be(kL,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),PL=be("span",{name:"JoyIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e,ownerState:t})=>{var n,r;return D({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:(n=e.variants[t.variant])==null||(n=n[t.color])==null?void 0:n.color},t.disabled&&{color:(r=e.variants[`${t.variant}Disabled`])==null||(r=r[t.color])==null?void 0:r.color})}),vm=G.forwardRef(function(t,n){var r;const i=ft({props:t,name:"JoyIconButton"}),{children:o,action:a,component:s="button",color:l="neutral",disabled:u,variant:d="plain",loading:f=!1,loadingIndicator:h,size:p="md",slots:m={},slotProps:g={}}=i,b=Ae(i,TL),w=G.useContext(_p),S=G.useContext(Pp),C=t.variant||w.variant||d,I=t.size||w.size||p,y=t.color||w.color||l,A=(r=t.loading||t.disabled)!=null?r:w.disabled||f||u,E=G.useRef(null),k=sn(E,n),{focusVisible:F,setFocusVisible:Y,getRootProps:O}=zl(D({},i,{disabled:A,rootRef:k})),T=h!=null?h:c.jsx(Ep,{color:y,thickness:{sm:2,md:3,lg:4}[I]||3});G.useImperativeHandle(a,()=>({focusVisible:()=>{var L;Y(!0),(L=E.current)==null||L.focus()}}),[Y]);const N=D({},i,{component:s,color:y,disabled:A,variant:C,loading:f,size:I,focusVisible:F,instanceSize:t.size}),V=EL(N),j=L=>{var U;let W=i.onClick;if(typeof g.root=="function"?W=g.root(N).onClick:g.root&&(W=g.root.onClick),(U=W)==null||U(L),S){var re;(re=S.onClick)==null||re.call(S,L,i.value)}};let $=i["aria-pressed"];typeof g.root=="function"?$=g.root(N)["aria-pressed"]:g.root&&($=g.root["aria-pressed"]),S!=null&&S.value&&(Array.isArray(S.value)?$=S.value.indexOf(i.value)!==-1:$=S.value===i.value);const M=D({},b,{component:s,slots:m,slotProps:g}),[H,Q]=Ie("root",{ref:n,className:V.root,elementType:_L,getSlotProps:O,externalForwardedProps:M,ownerState:N,additionalProps:{onClick:j,"aria-pressed":$}}),[te,R]=Ie("loadingIndicator",{className:V.loadingIndicator,elementType:PL,externalForwardedProps:M,ownerState:N});return c.jsx(H,D({},Q,{children:f?c.jsx(te,D({},R,{children:T})):o}))});vm.muiName="IconButton";const bm=Ve(c.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),DL=({label:e,defaultValue:t,options:n,required:r,onChange:i})=>{function o(l){var u,d;return l?c.jsxs(c.Fragment,{children:[c.jsx(v.ListItemDecorator,{children:c.jsx(v.Avatar,{size:"sm",src:((d=(u=n.find(f=>f.id===l.value))==null?void 0:u.assets)==null?void 0:d.logo)||ze.competition})}),l.label]}):null}const a=x.useRef(null),s=(l,u)=>{i(u)};return c.jsxs(v.FormControl,{sx:{mb:1},children:[c.jsx(v.FormLabel,{required:r,color:"primary",children:e}),c.jsx(v.Select,q(z({slotProps:{button:{sx:{whiteSpace:"nowrap"}}},sx:{"--ListItemDecorator-size":"44px",minHeight:"37px"},renderValue:o,value:t,onChange:s},t&&{endDecorator:c.jsx(vm,{variant:"plain",color:"neutral",onMouseDown:l=>{l.stopPropagation()},onClick:()=>{var l;i(""),(l=a.current)==null||l.focusVisible()},sx:{width:"18px",height:"18px"},children:c.jsx(bm,{})}),indicator:null}),{children:n.map((l,u)=>{var d;return c.jsxs(x.Fragment,{children:[u!==0?c.jsx(v.ListDivider,{role:"none"}):null,c.jsxs(v.Option,{value:l.id,label:l.name,children:[c.jsx(v.ListItemDecorator,{children:c.jsx(v.Avatar,{size:"sm",src:((d=l.assets)==null?void 0:d.logo)||ze.competition})}),l.name]})]},`${l.id}-${u}`)})}))]})};function OL(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ym=OL,RL=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,LL=RL,ML=LL,BL=typeof self=="object"&&self&&self.Object===Object&&self,$L=ML||BL||Function("return this")(),xm=$L,NL=xm,FL=function(){return NL.Date.now()},zL=FL,jL=/\s/;function UL(e){for(var t=e.length;t--&&jL.test(e.charAt(t)););return t}var VL=UL,HL=VL,WL=/^\s+/;function GL(e){return e&&e.slice(0,HL(e)+1).replace(WL,"")}var YL=GL,KL=xm,QL=KL.Symbol,pu=QL,Cm=pu,wm=Object.prototype,qL=wm.hasOwnProperty,JL=wm.toString,uo=Cm?Cm.toStringTag:void 0;function XL(e){var t=qL.call(e,uo),n=e[uo];try{e[uo]=void 0;var r=!0}catch(o){}var i=JL.call(e);return r&&(t?e[uo]=n:delete e[uo]),i}var ZL=XL,eM=Object.prototype,tM=eM.toString;function nM(e){return tM.call(e)}var rM=nM,Im=pu,iM=ZL,oM=rM,aM="[object Null]",sM="[object Undefined]",Sm=Im?Im.toStringTag:void 0;function lM(e){return e==null?e===void 0?sM:aM:Sm&&Sm in Object(e)?iM(e):oM(e)}var cM=lM;function uM(e){return e!=null&&typeof e=="object"}var dM=uM,fM=cM,hM=dM,pM="[object Symbol]";function gM(e){return typeof e=="symbol"||hM(e)&&fM(e)==pM}var Am=gM,mM=YL,Tm=ym,vM=Am,Em=NaN,bM=/^[-+]0x[0-9a-f]+$/i,yM=/^0b[01]+$/i,xM=/^0o[0-7]+$/i,CM=parseInt;function wM(e){if(typeof e=="number")return e;if(vM(e))return Em;if(Tm(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Tm(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=mM(e);var n=yM.test(e);return n||xM.test(e)?CM(e.slice(2),n?2:8):bM.test(e)?Em:+e}var IM=wM,SM=ym,gu=zL,km=IM,AM="Expected a function",TM=Math.max,EM=Math.min;function kM(e,t,n){var r,i,o,a,s,l,u=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(AM);t=km(t)||0,SM(n)&&(d=!!n.leading,f="maxWait"in n,o=f?TM(km(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(A){var E=r,k=i;return r=i=void 0,u=A,a=e.apply(k,E),a}function m(A){return u=A,s=setTimeout(w,t),d?p(A):a}function g(A){var E=A-l,k=A-u,F=t-E;return f?EM(F,o-k):F}function b(A){var E=A-l,k=A-u;return l===void 0||E>=t||E<0||f&&k>=o}function w(){var A=gu();if(b(A))return S(A);s=setTimeout(w,g(A))}function S(A){return s=void 0,h&&r?p(A):(r=i=void 0,a)}function C(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function I(){return s===void 0?a:S(gu())}function y(){var A=gu(),E=b(A);if(r=arguments,i=this,l=A,E){if(s===void 0)return m(l);if(f)return clearTimeout(s),s=setTimeout(w,t),p(l)}return s===void 0&&(s=setTimeout(w,t)),a}return y.cancel=C,y.flush=I,y}var _M=kM;const or=fn(_M),wn=({option:e})=>c.jsxs(v.Box,{display:"flex",alignItems:"center",mr:1,children:[c.jsx(v.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:e.logo}),c.jsx(v.Typography,{children:e.label}),c.jsx(v.Typography,{ml:.5,level:"body-xs",children:`(${e.countryName})`})]}),_m=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Competition with no name",label:t.name?t.name:"Competition with no name",logo:((n=t.assets)==null?void 0:n.logo)||ze.competition,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||ze.flag}}))||[],PM=({labels:e,label:t,ids:n,required:r,onChange:i})=>{const[o,a]=x.useState([]),[s,l]=x.useState([]),[u,d]=x.useState(!1),[f,h]=x.useState(""),[p,m]=x.useState(!1),{sdk:g}=lt(),b=()=>m(!p),w=(y,A)=>{a(A),i(A[0]?[A[0].id]:[])},S=3;x.useEffect(()=>{!f&&n&&n.length&&g.football.getCompetitions({competitionIds:n}).then(y=>{a(_m(y))}).catch(y=>{console.error(y),b(),a([])})},[]);const C=x.useMemo(()=>or(y=>{d(!0),g.football.getCompetitions({name:y}).then(A=>{l([..._m(A)]),d(!1)}).catch(A=>{console.error(A),b(),l([]),d(!1)})},300),[]);x.useEffect(()=>{if(!f||f.length<S){l([]);return}return C(f),()=>C.cancel()},[f,C]);const I=(y,A)=>y.map((E,k)=>c.jsx(v.Chip,{variant:"solid",endDecorator:c.jsx(v.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:F=>A({index:k}).onClick(F),children:c.jsx(De.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:c.jsx(wn,{option:E},`option_${E.id}`)},E.id));return c.jsxs(v.FormControl,{sx:{marginBottom:"16px"},children:[c.jsx(v.FormLabel,{required:r,color:"primary",children:t}),c.jsx(v.Box,{children:c.jsx(v.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:u,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(y,A)=>y.id===A.id,endDecorator:u?c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.competitionsSelectionPlaceholder,options:s,disabled:o.length===1,filterOptions:y=>y.filter(A=>!o.some(E=>E.value===A.value)),onInputChange:(y,A)=>{h(A)},onChange:w,getOptionKey:y=>y.id,value:o,renderTags:I,renderOption:(y,A)=>c.jsx(v.AutocompleteOption,q(z({},y),{children:c.jsx(wn,{option:A})}))})}),c.jsx(nt,{showToast:p,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:b})]})},Pm=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Competition with no name",label:t.name?t.name:"Competition with no name",logo:((n=t.assets)==null?void 0:n.logo)||ze.competition,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||ze.flag}}))||[],DM=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=x.useState([]),[a,s]=x.useState([]),[l,u]=x.useState(!1),[d,f]=x.useState(""),[h,p]=x.useState(!1),{sdk:m}=lt(),g=()=>p(!h),b=(I,y)=>{o(y);const A=y.map(E=>E.id);r(A&&A.length?A:null)},w=3;x.useEffect(()=>{!d&&t&&t.length&&m.football.getCompetitions({competitionIds:t}).then(I=>{o(Pm(I))}).catch(I=>{console.error(I),g(),o([])})},[]);const S=x.useMemo(()=>or(I=>{u(!0);const y={name:I,competitionIds:[""]};n&&Array.isArray(n)&&n.length>0?y.competitionIds=Array.from(n):delete y.competitionIds,m.football.getCompetitions(y).then(A=>{s([...Pm(A)]),u(!1)}).catch(A=>{console.error(A),g(),s([]),u(!1)})},300),[]);x.useEffect(()=>{if(!d||d.length<w){s([]);return}return S(d),()=>S.cancel()},[d,S]);const C=(I,y)=>I.map((A,E)=>c.jsx(v.Chip,{variant:"solid",endDecorator:c.jsx(v.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>y({index:E}).onClick(k),children:c.jsx(De.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:c.jsx(wn,{option:A},`option_${A.id}`)},A.id));return c.jsxs(c.Fragment,{children:[c.jsx(v.Box,{sx:{marginBottom:"16px"},children:c.jsx(v.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:l,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(I,y)=>I.id===y.id,endDecorator:l?c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.competitionsSelectionPlaceholder,options:a,filterOptions:I=>I.filter(y=>!i.some(A=>A.value===y.value)),onInputChange:(I,y)=>{f(y)},onChange:b,getOptionKey:I=>I.id,value:i,renderTags:C,renderOption:(I,y)=>c.jsx(v.AutocompleteOption,q(z({},I),{children:c.jsx(wn,{option:y})}))})}),c.jsx(nt,{showToast:h,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:g})]})},Dm=e=>(e==null?void 0:e.map(t=>({id:t.id,value:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,label:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,avatar:t.avatar})))||[],OM=({labels:e,ids:t,onChange:n})=>{const[r,i]=x.useState([]),[o,a]=x.useState([]),[s,l]=x.useState(!1),[u,d]=x.useState(""),[f,h]=x.useState(!1),{sdk:p}=lt(),m=()=>h(!f),g=(C,I)=>{i(I);const y=I.map(A=>A.id);n(y&&y.length?y:null)},b=3;x.useEffect(()=>{!u&&t&&t.length&&p.profile.getByIds(t).then(C=>{i(Dm(C))}).catch(C=>{m(),console.error(C),i([])})},[]);const w=x.useMemo(()=>or(C=>{l(!0),p.profile.getByIds([],C).then(I=>{a([...Dm(I)]),l(!1)}).catch(I=>{console.error(I),m(),a([]),l(!1)})},300),[]);x.useEffect(()=>{if(!u||u.length<b){a([]);return}return w(u),()=>w.cancel()},[u,w]);const S=(C,I)=>C.map((y,A)=>{var E;return c.jsx(v.Chip,{variant:"solid",endDecorator:c.jsx(v.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>I({index:A}).onClick(k),children:c.jsx(De.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:c.jsxs(v.Box,{display:"flex",alignItems:"center",mr:1,children:[c.jsx(v.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(E=y.avatar)!=null?E:ze.avatar}),c.jsx(v.Typography,{children:y.label})]})},y.id)});return c.jsxs(c.Fragment,{children:[c.jsx(v.Box,{sx:{marginBottom:"16px"},children:c.jsx(v.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:s,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(C,I)=>C.id===I.id,endDecorator:s?c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:C=>C.filter(I=>!r.some(y=>y.value===I.value)),onInputChange:(C,I)=>{d(I)},onChange:g,getOptionKey:C=>C.id,value:r,renderTags:S,renderOption:(C,I)=>{var y;return c.jsx(v.AutocompleteOption,q(z({},C),{children:c.jsxs(v.Box,{display:"flex",alignItems:"center",mr:1,children:[c.jsx(v.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(y=I.avatar)!=null?y:ze.avatar}),c.jsx(v.Typography,{children:I.label})]})}))}})}),c.jsx(nt,{showToast:f,message:e.searchProfilesErrorMessage,color:"danger",hideToast:m})]})},Om=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Team with no name",label:t.name?t.name:"Team with no name",logo:((n=t.assets)==null?void 0:n.logo)||ze.team,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||ze.flag}}))||[],RM=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=x.useState([]),[a,s]=x.useState([]),[l,u]=x.useState(!1),[d,f]=x.useState(""),[h,p]=x.useState(!1),{sdk:m}=lt(),g=()=>p(!h),b=(I,y)=>{o(y);const A=y.map(E=>E.id);r(A&&A.length?A:null)},w=3;x.useEffect(()=>{!d&&t&&t.length&&m.football.getTeams({teamIds:t,scope:n}).then(I=>{const y=I.data.filter(A=>!A.name.includes("/"));o(Om(y))}).catch(I=>{console.error(I),g(),o([])})},[]);const S=x.useMemo(()=>or((I,y)=>{u(!0),m.football.getTeams({name:I,scope:y}).then(A=>{const E=A.data.filter(k=>!k.name.includes("/"));s([...Om(E)]),u(!1)}).catch(A=>{console.error(A),g(),s([]),u(!1)})},300),[]);x.useEffect(()=>{if(!d||d.length<w){s([]);return}return S(d,n),()=>S.cancel()},[d,S]);const C=(I,y)=>I.map((A,E)=>c.jsx(v.Chip,{variant:"solid",endDecorator:c.jsx(v.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>y({index:E}).onClick(k),children:c.jsx(De.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:c.jsx(wn,{option:A},`option_${A.id}`)},A.id));return c.jsxs(c.Fragment,{children:[c.jsx(v.Box,{sx:{marginBottom:"16px"},children:c.jsx(v.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:l,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(I,y)=>I.id===y.id,endDecorator:l?c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.teamsSelectionPlaceholder,options:a,filterOptions:I=>I.filter(y=>!i.some(A=>A.value===y.value)),onInputChange:(I,y)=>{f(y)},onChange:b,getOptionKey:I=>I.id,value:i,renderTags:C,renderOption:(I,y)=>c.jsx(v.AutocompleteOption,q(z({},I),{children:c.jsx(wn,{option:y})}))})}),c.jsx(nt,{showToast:h,message:e.searchTeamsErrorMessage,color:"danger",hideToast:g})]})},LM=({checked:e,disabled:t,sx:n,onChange:r})=>{const i=n?z({},n):{ml:1};return c.jsx(v.Switch,{color:e?"success":"danger",checked:e,disabled:t,onChange:o=>r(o.target.checked),sx:q(z({},i),{"--Switch-thumbSize":"16px","--Switch-trackWidth":"40px","--Switch-trackHeight":"24px","--Switch-trackBackground":"#EE5E52","&:hover":{"--Switch-trackBackground":"#EE5E52"},[`&.${v.switchClasses.checked}`]:{"--Switch-trackBackground":"#5CB176","&:hover":{"--Switch-trackBackground":"#5CB176"}}})})},ui=({label:e,labelPosition:t="start",defaultValue:n,description:r,disabled:i,descriptionColor:o,sx:a,onChange:s})=>{const l=c.jsx(LM,{checked:n,disabled:i,onChange:s,sx:a==null?void 0:a.switch}),u=a!=null&&a.container?z({},a.container):{mb:2},d=a!=null&&a.label?z({},a.label):{};return r?c.jsxs(v.Box,{sx:z({},u),children:[c.jsx(v.Typography,{component:"label",startDecorator:t=="start"?void 0:l,endDecorator:t=="start"?l:void 0,sx:d,children:e}),c.jsx(v.Typography,{level:"body-sm",color:o||"neutral",children:r})]}):c.jsx(v.Typography,{sx:Object.keys(d)?z({},d):{mb:2},component:"label",startDecorator:t=="start"?void 0:l,endDecorator:t=="start"?l:void 0,children:e})},MM={control:(e,t)=>q(z({},e),{minHeight:"36px",borderColor:t.isFocused?"#0b6bcb":"#ced4da",boxShadow:t.isFocused?"0 0 0 0px 1px 2px 0px rgba(25, 118, 210, 0.25)":"none",borderRadius:"6px","&:hover":{borderColor:t.isFocused?"#1976d2":"#ced4da"}}),valueContainer:e=>q(z({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>q(z({},e),{minHeight:"36px"}),menu:e=>q(z({},e),{position:"relative"}),clearIndicator:e=>q(z({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>q(z({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>q(z({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>q(z({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"13px"}),multiValueLabel:e=>q(z({},e),{color:"#333"})},BM=e=>e.map(t=>({label:t,value:t})),Rm=e=>{const[t,n]=x.useState(""),[r,i]=x.useState(!1),o=BM(e.tags),a=()=>i(!r),s=f=>{e.onChange(f.map(h=>h.value))},l=f=>{n(f)},u=f=>{f.persist();const{key:h}=f;if(t)switch(h){case"Enter":case"Tab":if(e.tags&&e.tags.length===0){const p=[...e.tags,t];e.onChange(p)}if(e.tags&&e.tags.length>0&&d()){const p=[...e.tags,t];e.onChange(p)}n(""),f.preventDefault()}},d=()=>{let f=!1;return e.tags&&e.tags.length&&e.tags.includes(t)?(a(),f):(f=!0,f)};return c.jsxs(c.Fragment,{children:[c.jsx(um,{styles:MM,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:s,onInputChange:l,onKeyDown:u,placeholder:e.labels.tagsPlaceholder,value:o}),c.jsx(nt,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},$M=Ve(c.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");class Lm{constructor(){ne(this,"contestId","");ne(this,"contestType","");ne(this,"description","");ne(this,"userList",[])}}const NM=(e,t,n)=>{const[r,i]=x.useState(null),{sdk:o}=lt(),a=()=>_(this,null,function*(){try{let s;switch(t){case"top_x":s=yield o.topX.getGameWinners(e,!0);break;case"match_quiz":s=yield o.matchQuiz.getGameWinners(e,!0);break;default:s=yield o.loyalty.getTemplateWinners(e,!0)}s.userList&&s.userList.forEach(l=>{l.tags||(l.tags=[])}),i(s)}catch(s){const l=o.helpers.getSDKConfiguration();let u=null;l.errorHandlingMode==="standard"?u=s.error:u=s.data.error,u.code!==404&&u.status!=="code_unknown_contest"&&n(),i(new Lm)}});return x.useEffect(()=>{a()},[]),r};class FM{constructor(){ne(this,"position","");ne(this,"profileId","");ne(this,"note","");ne(this,"tags",[])}}function zM(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var jM=zM,UM=Array.isArray,VM=UM,Mm=pu,HM=jM,WM=VM,GM=Am,YM=1/0,Bm=Mm?Mm.prototype:void 0,$m=Bm?Bm.toString:void 0;function Nm(e){if(typeof e=="string")return e;if(WM(e))return HM(e,Nm)+"";if(GM(e))return $m?$m.call(e):"";var t=e+"";return t=="0"&&1/e==-YM?"-0":t}var KM=Nm,QM=KM;function qM(e){return e==null?"":QM(e)}var Fm=qM;function JM(e,t,n,r){var i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}var XM=JM;function ZM(e){return function(t){return e==null?void 0:e[t]}}var e2=ZM,t2=e2,n2={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},r2=t2(n2),i2=r2,o2=i2,a2=Fm,s2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,l2="\\u0300-\\u036f",c2="\\ufe20-\\ufe2f",u2="\\u20d0-\\u20ff",d2=l2+c2+u2,f2="["+d2+"]",h2=RegExp(f2,"g");function p2(e){return e=a2(e),e&&e.replace(s2,o2).replace(h2,"")}var g2=p2,m2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function v2(e){return e.match(m2)||[]}var b2=v2,y2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function x2(e){return y2.test(e)}var C2=x2,zm="\\ud800-\\udfff",w2="\\u0300-\\u036f",I2="\\ufe20-\\ufe2f",S2="\\u20d0-\\u20ff",A2=w2+I2+S2,jm="\\u2700-\\u27bf",Um="a-z\\xdf-\\xf6\\xf8-\\xff",T2="\\xac\\xb1\\xd7\\xf7",E2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",k2="\\u2000-\\u206f",_2=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Vm="A-Z\\xc0-\\xd6\\xd8-\\xde",P2="\\ufe0e\\ufe0f",Hm=T2+E2+k2+_2,Wm="['’]",Gm="["+Hm+"]",D2="["+A2+"]",Ym="\\d+",O2="["+jm+"]",Km="["+Um+"]",Qm="[^"+zm+Hm+Ym+jm+Um+Vm+"]",R2="\\ud83c[\\udffb-\\udfff]",L2="(?:"+D2+"|"+R2+")",M2="[^"+zm+"]",qm="(?:\\ud83c[\\udde6-\\uddff]){2}",Jm="[\\ud800-\\udbff][\\udc00-\\udfff]",di="["+Vm+"]",B2="\\u200d",Xm="(?:"+Km+"|"+Qm+")",$2="(?:"+di+"|"+Qm+")",Zm="(?:"+Wm+"(?:d|ll|m|re|s|t|ve))?",ev="(?:"+Wm+"(?:D|LL|M|RE|S|T|VE))?",tv=L2+"?",nv="["+P2+"]?",N2="(?:"+B2+"(?:"+[M2,qm,Jm].join("|")+")"+nv+tv+")*",F2="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",z2="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",j2=nv+tv+N2,U2="(?:"+[O2,qm,Jm].join("|")+")"+j2,V2=RegExp([di+"?"+Km+"+"+Zm+"(?="+[Gm,di,"$"].join("|")+")",$2+"+"+ev+"(?="+[Gm,di+Xm,"$"].join("|")+")",di+"?"+Xm+"+"+Zm,di+"+"+ev,z2,F2,Ym,U2].join("|"),"g");function H2(e){return e.match(V2)||[]}var W2=H2,G2=b2,Y2=C2,K2=Fm,Q2=W2;function q2(e,t,n){return e=K2(e),t=n?void 0:t,t===void 0?Y2(e)?Q2(e):G2(e):e.match(t)||[]}var J2=q2,X2=XM,Z2=g2,eB=J2,tB="['’]",nB=RegExp(tB,"g");function rB(e){return function(t){return X2(eB(Z2(t).replace(nB,"")),e,"")}}var iB=rB,oB=iB,aB=oB(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),sB=aB;const lB=fn(sB);class cB{constructor(){ne(this,"id","");ne(this,"value","");ne(this,"label","")}}class uB extends cB{constructor(){super(...arguments);ne(this,"logo","");ne(this,"countryFlag","");ne(this,"countryName","")}}class rv extends uB{constructor(){super(...arguments);ne(this,"group","")}}const dB=(e,t)=>t||e||"-------------",mu=(e,t)=>Array.isArray(e)?e.map(n=>mu(n)):e!=null&&e.constructor===Object?Object.keys(e).reduce((n,r)=>q(z({},n),{[lB(r)]:mu(e[r])}),{}):e,iv=e=>{const t=[];return e.competitions.forEach(n=>{t.push(vu(n,"competition"))}),e.teams.forEach(n=>{t.push(vu(n,"team"))}),e.players.forEach(n=>{t.push(vu(n,"player"))}),t},vu=(e,t)=>{var r,i,o,a,s;const n=new rv;return n.label=e.name,n.value=e.id,n.id=e.id,n.group=t,t==="player"?n.logo=((r=e.assets)==null?void 0:r.headshot)||ze.avatar:t==="team"?n.logo=((i=e.assets)==null?void 0:i.logo)||ze.team:n.logo=((o=e.assets)==null?void 0:o.logo)||ze.competition,n.countryName=e.country.name,n.countryFlag=((s=(a=e.country)==null?void 0:a.assets)==null?void 0:s.flag)||ze.country,n},fB=e=>{switch(e){case"CLASSIC_QUIZ":return"success";case"EITHER_OR":return"success";case"POLL":return"warning";case"TOP_X":return"primary";case"MATCH_QUIZ":return"primary";case"LEADERBOARD_TEMPLATES":return"neutral";default:return"neutral"}},hB=e=>{switch(e){case"CLASSIC_QUIZ":return"CLASSIC QUIZ";case"EITHER_OR":return"EITHER/OR";case"POLL":return"POLL";case"TOP_X":return"TOP X";case"MATCH_QUIZ":return"MATCH QUIZ";case"LEADERBOARD_TEMPLATES":return"LEADERBOARD TEMPLATES"}},pB=({profile:e,winner:t,labels:n,onChange:r,onRemove:i})=>{var b,w,S,C,I,y;const[o,a]=x.useState(t.position),[s,l]=x.useState(t.note),[u,d]=x.useState(t.tags),f=o||s||u.length>0,h=A=>{A.persist();const{value:E}=A.target;a(E),r("position",E)},p=A=>{A.persist();const{value:E}=A.target;l(E),r("note",E)},m=A=>{d(A),r("tags",A)},g=()=>{a(""),l(""),d([]),i()};return c.jsxs("tr",{style:{backgroundColor:f?"rgb(255 237 213)":""},children:[c.jsx("td",{children:c.jsx(v.Input,{name:"position",placeholder:"#",value:o,onChange:h,sx:{backgroundColor:"#fff"}})}),c.jsx("td",{children:c.jsxs(v.Box,{display:"flex",alignItems:"center",children:[c.jsx(v.Avatar,{src:((b=e.profileModel)==null?void 0:b.avatar)||"",alt:((w=e.profileModel)==null?void 0:w.name)||"Unknown",sx:{mr:1}}),c.jsxs(v.Box,{children:[c.jsxs(v.Typography,{fontWeight:"md",children:[dB((S=e.profileModel)==null?void 0:S.name,(C=e.profileModel)==null?void 0:C.nickname)," ",(I=e.profileModel)!=null&&I.name?c.jsxs(v.Typography,{children:["(",(y=e.profileModel)==null?void 0:y.name,")"]}):c.jsx(c.Fragment,{})]}),c.jsx(v.Typography,{fontSize:"sm",sx:{opacity:"0.5"},children:e.profileModel&&e.profileModel.country?e.profileModel.country.name:""})]})]})}),c.jsx("td",{style:{textAlign:"center"},children:e.points}),c.jsx("td",{style:{textAlign:"center"},children:e.predictionsMade}),c.jsx("td",{children:c.jsx(v.Input,{name:"note",value:s,placeholder:"This user has...",onChange:p,sx:{backgroundColor:"#fff"}})}),c.jsx("td",{children:c.jsx(Rm,{labels:n,tags:u,onChange:m})}),c.jsx("td",{children:c.jsx(v.Tooltip,{title:n.clearWinner,children:c.jsx(v.IconButton,{onClick:g,variant:"outlined",color:"danger",disabled:!f,children:c.jsx(De.Remove,{})})})})]})},gB=e=>{const t=(i,o,a)=>{if(e.winners.find(d=>d.profileId===i)){const d=e.winners.map(f=>f.profileId===i?q(z({},f),{[o]:a}):f);r(d);return}const l=new FM;l.profileId=i,l[o]=a;const u=[...e.winners,l];r(u)},n=i=>{const o=e.winners.filter(a=>a.profileId!==i);r(o)},r=i=>{e.setWinnersRequestBody(o=>q(z({},o),{userList:i}))};return e.leaderboard?c.jsxs(c.Fragment,{children:[c.jsx(v.Typography,{level:"h4",children:e.labels.configureWinners}),e.leaderboard.length===0?c.jsx(v.Typography,{level:"body-lg",textAlign:"center",fontWeight:"bold",children:e.labels.noStandingsAvailable}):c.jsx(c.Fragment,{}),c.jsxs(v.Table,{variant:"outlined",hoverRow:!1,borderAxis:"bothBetween",size:"sm",sx:{backgroundColor:"#fff","& > thead > tr > th:last-child, & > tbody > tr > td:last-child":{textAlign:"center",width:"50px"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"}},children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{style:{width:"70px"},children:e.labels.position}),c.jsx("th",{children:e.labels.nicknameAndName}),c.jsx("th",{style:{width:"70px",textAlign:"center"},children:e.labels.points}),c.jsx("th",{style:{width:"100px",textAlign:"center"},children:e.labels.predictions}),c.jsx("th",{children:e.labels.note}),c.jsx("th",{children:e.labels.tags}),c.jsx("th",{children:e.labels.actions})]})}),c.jsxs("tbody",{children:[e.leaderboard.length>0?e.leaderboard.map(i=>c.jsx(pB,{winner:e.winners.find(o=>o.profileId===i.profileId)||{position:"",profileId:"",note:"",tags:[]},profile:i,labels:e.labels,onChange:(o,a)=>t(i.profileId,o,a),onRemove:()=>n(i.profileId)},`winner-profile-${i.profileId}`)):c.jsx(c.Fragment,{}),c.jsx("tr",{children:c.jsx("td",{colSpan:7,children:e.hasMoreParticipants?c.jsx(v.Box,{textAlign:"center",my:1,children:c.jsx(v.Button,{variant:"plain",sx:{width:"100%"},onClick:()=>e.setPage(i=>i+1),loading:e.isLoading,children:e.labels.loadMore})}):c.jsx(c.Fragment,{})})})]})]})]}):c.jsx(fs,{my:40})},mB=(e,t,n,r,i)=>{const[o,a]=x.useState(null),[s,l]=x.useState(!1),[u,d]=x.useState(!1),{sdk:f}=lt(),h=()=>_(this,null,function*(){d(!0);const p={limit:10,page:r},m=!0;try{let g;t==="template"?g=yield f.loyalty.getLeaderboard(e,p,m):g=yield f.loyalty.getLeaderboardForGame(e,p,m),g.meta.pagination.numberOfPages>r?l(!0):l(!1),o&&o.length?a(b=>[...b,...g.data]):a(g.data)}catch(g){console.error(g),i("danger",n),a([])}d(!1)});return x.useEffect(()=>{h()},[r]),{leaderboard:o,hasMoreParticipants:s,isLeaderboardLoading:u}};class vB{constructor(){ne(this,"isValid",!0);ne(this,"message","");ne(this,"validate",(t,n,r)=>(this.validateField(t,n),this.validateWinnerIds(t,r),this));ne(this,"validateField",(t,n)=>{const r=t.every(i=>i.position&&i.profileId);r||(this.isValid=r,this.message=n)});ne(this,"validateWinnerIds",(t,n)=>{const r=t.map(o=>o.profileId),i=new Set(r);r.length!==i.size&&(this.isValid=!1,this.message=n)})}}const bB=e=>{const t=e.winners.userList.length>0&&(e.winners.userList[0].position||e.winners.userList[0].profileId||e.winners.userList[0].note||e.winners.userList[0].tags.length);return c.jsx(v.Card,{variant:"plain",children:t?c.jsxs(c.Fragment,{children:[c.jsx(v.Typography,{level:"body-lg",mb:2,fontWeight:"bold",children:e.labels.preview}),c.jsx(v.Sheet,{children:c.jsxs(v.Table,{sx:{"& > thead > tr > th:nth-of-type(n + 3), & > tbody > tr > td:nth-of-type(n + 3)":{textAlign:"right"},"& > thead > tr > th:nth-of-type(3), & > thead > tr > th:nth-of-type(4), & > tbody > tr > td:nth-of-type(3), & > tbody > tr > td:nth-of-type(4)":{fontSize:"sm",display:{xs:"none",md:"table-cell"}}},children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{style:{width:"3%"},children:"#"}),c.jsx("th",{children:e.labels.name}),c.jsx("th",{children:e.labels.note}),c.jsx("th",{children:e.labels.tags})]})}),c.jsx("tbody",{children:e.winners.userList.map(n=>{var i;const r=e.profiles.find(o=>o.id===n.profileId);return c.jsxs("tr",{children:[c.jsx("td",{children:n.position}),c.jsx("td",{children:c.jsxs(v.Box,{display:"flex",alignItems:"center",justifyContent:{xs:"center",md:"flex-start"},gap:2,children:[c.jsx(v.Avatar,{src:(r==null?void 0:r.avatar)||"",alt:(r==null?void 0:r.name)||"Unknown"}),c.jsxs(v.Box,{textAlign:"left",children:[c.jsxs(v.Typography,{fontWeight:"bold",children:[(r==null?void 0:r.nickname)||"-------------"," ",c.jsxs(v.Typography,{children:["(",(r==null?void 0:r.name)||"-------------",")"]})]}),c.jsx(v.Typography,{fontSize:"sm",color:"neutral",children:(i=r==null?void 0:r.country)==null?void 0:i.name})]})]})}),c.jsx("td",{children:n.note}),c.jsx("td",{children:n.tags.map(o=>c.jsx(v.Chip,{variant:"soft",color:"neutral",size:"sm",sx:{mr:1},children:o},`preview-winner-${n.profileId}-tag-${o}`))})]},`preview-winner-${n.profileId}`)})})]})})]}):c.jsx(v.Typography,{textAlign:"center",fontWeight:"bold",children:e.labels.noSetWinnersMessage})})},yB=e=>Object.keys(e).length?(e.userList||(e.userList=[]),e):new Lm,xB=e=>{var y;const[t,n]=x.useState(yB(e.winners)),[r,i]=x.useState(((y=e.winners)==null?void 0:y.description)||""),[o,a]=x.useState(!1),[s,l]=x.useState(1),[u,d]=x.useState(!1),[f,h]=x.useState("danger"),[p,m]=x.useState(""),g=(A,E)=>{h(A),m(E),d(!0)},{leaderboard:b,hasMoreParticipants:w,isLeaderboardLoading:S}=mB(e.entityId,e.entityType,e.labels.leaderboardErrorMessage,s,g),{https:C}=lt(),I=()=>_(this,null,function*(){a(!0);const A=JSON.parse(JSON.stringify(t));if(A.contestId=e.entityId,A.contestType=e.entityType==="template"?"TEMPLATE":"GAME",A.description=r,delete A.contestModel,A.userList.length>0){const k=new vB().validate(A.userList,e.labels.positionAndWinnerRequiredMessage,e.labels.sameChosenWinnerMessage);if(!k.isValid){g("danger",k.message),a(!1);return}}else delete A.userList;const E=mu(A);try{yield C.setWinners(E),g("success",Object.keys(e.winners).length?e.labels.editWinnersMessage:e.labels.createWinnersMessage)}catch(k){console.error(k),g("danger",Object.keys(e.winners).length?e.labels.editWinnersErrorMessage:e.labels.createWinnersErrorMessage)}a(!1)});return c.jsxs(c.Fragment,{children:[c.jsx("section",{style:{marginRight:"auto",marginLeft:"auto"},children:c.jsx(v.Box,{width:"100%",overflow:"hidden",borderRadius:"4px",bgcolor:"#fff",children:c.jsxs(v.Box,{width:"100%",sx:{overflowX:"auto"},children:[c.jsxs(v.Card,{variant:"plain",children:[c.jsx(dc,{property:"description",label:e.labels.description,defaultValue:r,placeholder:e.labels.winnersDescription,onChange:A=>{i(A)}}),c.jsx(gB,{winners:t.userList,leaderboard:b,hasMoreParticipants:w,isLoading:S,setPage:l,setWinnersRequestBody:n,labels:e.labels}),c.jsx(v.Box,{textAlign:"center",my:3,children:c.jsx(v.Button,{variant:"solid",color:"primary",onClick:I,loading:o,children:e.labels.save})}),c.jsx(v.Divider,{sx:{my:4}})]}),b?c.jsx(bB,{winners:t,profiles:b.map(A=>A.profileModel),labels:e.labels}):c.jsx(c.Fragment,{})]})})}),c.jsx(nt,{showToast:u,color:f,message:p,hideToast:()=>d(!1)})]})},CB=e=>{const[t,n]=x.useState(!1),r=()=>n(!0),i=NM(e.entityId,e.entityType,r);return i?c.jsxs(c.Fragment,{children:[c.jsxs(v.Box,{p:2,children:[c.jsx(v.Typography,{fontSize:"12px",sx:{cursor:"pointer"},startDecorator:c.jsx($M,{fontSize:"inherit"}),onClick:e.onClickBack,children:e.labels.back}),c.jsxs(v.Typography,{level:"h3",children:[e.labels.manageWinners,":"," ",c.jsx(v.Typography,{level:"title-lg",fontWeight:"italic",children:e.entityName})]})]}),c.jsx(xB,{labels:e.labels,winners:i,entityId:e.entityId,entityType:e.entityType}),c.jsx(nt,{showToast:t,color:"danger",message:e.labels.winnersErrorMessage,hideToast:()=>n(!1)})]}):c.jsx(fs,{my:50})},wB=10,IB=e=>{var f;const[t,n]=x.useState([]),[r,i]=x.useState(!1),[o,a]=x.useState(""),{sdk:s}=lt(),l=x.useMemo(()=>or(h=>{if(!h){n([]),i(!1);return}i(!0),s.football.search({query:h}).then(p=>{n([...iv(p)]),i(!1)}).catch(p=>{console.error(p),n([]),i(!1)})},300),[]);x.useEffect(()=>(l(o),()=>l.cancel()),[o,l]);const u=(h,p)=>{const m=p.map(g=>g.id);e.setOptions(p),e.handleResetData(),e.setFilters(g=>q(z({},g),{entityIds:m}))},d=(h,p)=>h.map((m,g)=>c.jsx(v.Chip,{variant:"solid",endDecorator:c.jsx(v.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:b=>p({index:g}).onClick(b),children:c.jsx(De.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:c.jsx(wn,{option:m},`option_${m.id}`)},m.id));return c.jsxs(v.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[c.jsx(v.FormLabel,{sx:{fontSize:12},color:"primary",children:e.labels.contextEntityTag}),c.jsx(v.Autocomplete,{getOptionDisabled:()=>e.options.length===wB,forcePopupIcon:!1,multiple:!0,loading:r,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(h,p)=>h.id===p.id,endDecorator:r?c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.options.length>0?"":e.labels.typeContextTagNamePlaceholder,options:t,filterOptions:h=>h.filter(p=>!e.options.some(m=>m.value===p.value)),onInputChange:(h,p)=>{a(p)},onChange:u,getOptionKey:h=>h.id,groupBy:h=>h.group+"s",value:(f=e.options)!=null?f:[],renderTags:d,renderOption:(h,p)=>c.jsx(v.AutocompleteOption,q(z({},h),{children:c.jsx(wn,{option:p})}))})]})};function ov(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var fo;(function(e){e.event="event",e.props="prop"})(fo||(fo={}));function ar(){}function SB(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(o,a){return o===t[a]})||(t=r,n=e.apply(void 0,r)),n}}function ho(e){return!!(e||"").match(/\d/)}function fi(e){return e==null}function AB(e){return typeof e=="number"&&isNaN(e)}function av(e){return fi(e)||AB(e)||typeof e=="number"&&!isFinite(e)}function sv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function TB(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function EB(e,t,n){var r=TB(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,"$1"+t)}function kB(e){var t=x.useRef(e);t.current=e;var n=x.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t.current.apply(t,r)});return n.current}function bu(e,t){t===void 0&&(t=!0);var n=e[0]==="-",r=n&&t;e=e.replace("-","");var i=e.split("."),o=i[0],a=i[1]||"";return{beforeDecimal:o,afterDecimal:a,hasNegation:n,addNegation:r}}function _B(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(t?"-":"")+r+(i?"."+i:"")}function lv(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function cv(e,t){return Array(t+1).join(e)}function uv(e){var t=e+"",n=t[0]==="-"?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],o=r[1];if(o=Number(o),!o)return n+i;i=i.replace(".","");var a=1+o,s=i.length;return a<0?i="0."+cv("0",Math.abs(a))+i:a>=s?i=i+cv("0",a-s):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function dv(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=bu(e),o=i.beforeDecimal,a=i.afterDecimal,s=i.hasNegation,l=parseFloat("0."+(a||"0")),u=a.length<=t?"0."+a:l.toFixed(t),d=u.split("."),f=o;o&&Number(d[0])&&(f=o.split("").reverse().reduce(function(g,b,w){return g.length>w?(Number(g[0])+Number(b)).toString()+g.substring(1,g.length):b+g},d[0]));var h=lv(d[1]||"",t,n),p=s?"-":"",m=r?".":"";return""+p+f+m+h}function Tr(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var fv=SB(function(e,t){for(var n=0,r=0,i=e.length,o=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[o-1-r]&&o-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:o-r}}}),PB=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function DB(e,t,n){return Math.min(Math.max(e,t),n)}function yu(e){return Math.max(e.selectionStart,e.selectionEnd)}function OB(){return typeof navigator!="undefined"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function RB(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function LB(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function MB(e,t,n,r,i,o,a){a===void 0&&(a=LB);var s=i.findIndex(function(I){return I}),l=e.slice(0,s);!t&&!n.startsWith(l)&&(t=l,n=l+n,r=r+l.length);for(var u=n.length,d=e.length,f={},h=new Array(u),p=0;p<u;p++){h[p]=-1;for(var m=0,g=d;m<g;m++){var b=a({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m});if(b&&f[m]!==!0){h[p]=m,f[m]=!0;break}}}for(var w=r;w<u&&(h[w]===-1||!o(n[w]));)w++;var S=w===u||h[w]===-1?d:h[w];for(w=r-1;w>0&&h[w]===-1;)w--;var C=w===-1||h[w]===-1?0:h[w]+1;return C>S?S:r-C<S-r?C:S}function hv(e,t,n,r){var i=e.length;if(t=DB(t,0,i),r==="left"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function BB(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(ho(e[n])||ho(e[n-1]));return t}function pv(e,t,n,r,i,o){o===void 0&&(o=ar);var a=kB(function(m,g){var b,w;return av(m)?(w="",b=""):typeof m=="number"||g?(w=typeof m=="number"?uv(m):m,b=r(w)):(w=i(m,void 0),b=r(w)),{formattedValue:b,numAsString:w}}),s=x.useState(function(){return a(fi(e)?t:e,n)}),l=s[0],u=s[1],d=function(m,g){m.formattedValue!==l.formattedValue&&u({formattedValue:m.formattedValue,numAsString:m.value}),o(m,g)},f=e,h=n;fi(e)&&(f=l.numAsString,h=!0);var p=a(f,h);return x.useMemo(function(){u(p)},[p.formattedValue]),[l,d]}function $B(e){return e.replace(/[^0-9]/g,"")}function NB(e){return e}function FB(e){var t=e.type;t===void 0&&(t="text");var n=e.displayType;n===void 0&&(n="input");var r=e.customInput,i=e.renderText,o=e.getInputRef,a=e.format;a===void 0&&(a=NB);var s=e.removeFormatting;s===void 0&&(s=$B);var l=e.defaultValue,u=e.valueIsNumericString,d=e.onValueChange,f=e.isAllowed,h=e.onChange;h===void 0&&(h=ar);var p=e.onKeyDown;p===void 0&&(p=ar);var m=e.onMouseUp;m===void 0&&(m=ar);var g=e.onFocus;g===void 0&&(g=ar);var b=e.onBlur;b===void 0&&(b=ar);var w=e.value,S=e.getCaretBoundary;S===void 0&&(S=BB);var C=e.isValidInputCharacter;C===void 0&&(C=ho);var I=e.isCharacterSame,y=ov(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),A=pv(w,l,!!u,a,s,d),E=A[0],k=E.formattedValue,F=E.numAsString,Y=A[1],O=x.useRef(),T=x.useRef({formattedValue:k,numAsString:F}),N=function(de,pe){T.current={formattedValue:de.formattedValue,numAsString:de.value},Y(de,pe)},V=x.useState(!1),j=V[0],$=V[1],M=x.useRef(null),H=x.useRef({setCaretTimeout:null,focusTimeout:null});x.useEffect(function(){return $(!0),function(){clearTimeout(H.current.setCaretTimeout),clearTimeout(H.current.focusTimeout)}},[]);var Q=a,te=function(de,pe){var xe=parseFloat(pe);return{formattedValue:de,value:pe,floatValue:isNaN(xe)?void 0:xe}},R=function(de,pe,xe){de.selectionStart===0&&de.selectionEnd===de.value.length||(Tr(de,pe),H.current.setCaretTimeout=setTimeout(function(){de.value===xe&&de.selectionStart!==pe&&Tr(de,pe)},0))},L=function(de,pe,xe){return hv(de,pe,S(de),xe)},U=function(de,pe,xe){var Te=S(pe),We=MB(pe,k,de,xe,Te,C,I);return We=hv(pe,We,Te),We},W=function(de){var pe=de.formattedValue;pe===void 0&&(pe="");var xe=de.input,Te=de.source,We=de.event,Pe=de.numAsString,Ee;if(xe){var It=de.inputValue||xe.value,St=yu(xe);xe.value=pe,Ee=U(It,pe,St),Ee!==void 0&&R(xe,Ee,pe)}pe!==k&&N(te(pe,Pe),{event:We,source:Te})};x.useEffect(function(){var de=T.current,pe=de.formattedValue,xe=de.numAsString;(k!==pe||F!==xe)&&N(te(k,F),{event:void 0,source:fo.props})},[k,F]);var re=M.current?yu(M.current):void 0,se=typeof window!="undefined"?x.useLayoutEffect:x.useEffect;se(function(){var de=M.current;if(k!==T.current.formattedValue&&de){var pe=U(T.current.formattedValue,k,re);de.value=k,R(de,pe,k)}},[k]);var ae=function(de,pe,xe){var Te=pe.target,We=O.current?PB(O.current,Te.selectionEnd):fv(k,de),Pe=Object.assign(Object.assign({},We),{lastValue:k}),Ee=s(de,Pe),It=Q(Ee);if(Ee=s(It,void 0),f&&!f(te(It,Ee))){var St=pe.target,jt=yu(St),Lt=U(de,k,jt);return St.value=k,R(St,Lt,k),!1}return W({formattedValue:It,numAsString:Ee,inputValue:de,event:pe,source:xe,input:pe.target}),!0},X=function(de,pe){pe===void 0&&(pe=0);var xe=de.selectionStart,Te=de.selectionEnd;O.current={selectionStart:xe,selectionEnd:Te+pe}},le=function(de){var pe=de.target,xe=pe.value,Te=ae(xe,de,fo.event);Te&&h(de),O.current=void 0},Z=function(de){var pe=de.target,xe=de.key,Te=pe.selectionStart,We=pe.selectionEnd,Pe=pe.value;Pe===void 0&&(Pe="");var Ee;xe==="ArrowLeft"||xe==="Backspace"?Ee=Math.max(Te-1,0):xe==="ArrowRight"?Ee=Math.min(Te+1,Pe.length):xe==="Delete"&&(Ee=Te);var It=0;xe==="Delete"&&Te===We&&(It=1);var St=xe==="ArrowLeft"||xe==="ArrowRight";if(Ee===void 0||Te!==We&&!St){p(de),X(pe,It);return}var jt=Ee;if(St){var Lt=xe==="ArrowLeft"?"left":"right";jt=L(Pe,Ee,Lt),jt!==Ee&&de.preventDefault()}else xe==="Delete"&&!C(Pe[Ee])?jt=L(Pe,Ee,"right"):xe==="Backspace"&&!C(Pe[Ee])&&(jt=L(Pe,Ee,"left"));jt!==Ee&&R(pe,jt,Pe),p(de),X(pe,It)},he=function(de){var pe=de.target,xe=function(){var Te=pe.selectionStart,We=pe.selectionEnd,Pe=pe.value;if(Pe===void 0&&(Pe=""),Te===We){var Ee=L(Pe,Te);Ee!==Te&&R(pe,Ee,Pe)}};xe(),requestAnimationFrame(function(){xe()}),m(de),X(pe)},Se=function(de){de.persist&&de.persist();var pe=de.target,xe=de.currentTarget;M.current=pe,H.current.focusTimeout=setTimeout(function(){var Te=pe.selectionStart,We=pe.selectionEnd,Pe=pe.value;Pe===void 0&&(Pe="");var Ee=L(Pe,Te);Ee!==Te&&!(Te===0&&We===Pe.length)&&R(pe,Ee,Pe),g(Object.assign(Object.assign({},de),{currentTarget:xe}))},0)},He=function(de){M.current=null,clearTimeout(H.current.focusTimeout),clearTimeout(H.current.setCaretTimeout),b(de)},wt=j&&OB()?"numeric":void 0,ct=Object.assign({inputMode:wt},y,{type:t,value:k,onChange:le,onKeyDown:Z,onMouseUp:he,onFocus:Se,onBlur:He});if(n==="text")return i?x.createElement(x.Fragment,null,i(k,y)||null):x.createElement("span",Object.assign({},y,{ref:o}),k);if(r){var _t=r;return x.createElement(_t,Object.assign({},ct,{ref:o}))}return x.createElement("input",Object.assign({},ct,{ref:o}))}function gv(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i="");var o=t.suffix;o===void 0&&(o="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var l=hs(t),u=l.thousandSeparator,d=l.decimalSeparator,f=n!==0&&e.indexOf(".")!==-1||n&&r,h=bu(e,a),p=h.beforeDecimal,m=h.afterDecimal,g=h.addNegation;return n!==void 0&&(m=lv(m,n,!!r)),u&&(p=EB(p,u,s)),i&&(p=i+p),o&&(m=m+o),g&&(p="-"+p),e=p+(f&&d||"")+m,e}function hs(e){var t=e.decimalSeparator;t===void 0&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function zB(e,t){e===void 0&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(e),o=r.test(e);return e=e.replace(/-/g,""),i&&!o&&t&&(e="-"+e),e}function jB(e,t){return new RegExp("(^-)|[0-9]|"+sv(e),"g")}function UB(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function VB(e,t,n){var r;t===void 0&&(t=RB(e));var i=n.allowNegative,o=n.prefix;o===void 0&&(o="");var a=n.suffix;a===void 0&&(a="");var s=n.decimalScale,l=t.from,u=t.to,d=u.start,f=u.end,h=hs(n),p=h.allowedDecimalSeparators,m=h.decimalSeparator,g=e[f]===m;if(ho(e)&&(e===o||e===a)&&t.lastValue==="")return e;if(f-d===1&&p.indexOf(e[d])!==-1){var b=s===0?"":m;e=e.substring(0,d)+b+e.substring(d+1,e.length)}var w=function(M,H,Q){var te=!1,R=!1;o.startsWith("-")?te=!1:M.startsWith("--")?(te=!1,R=!0):a.startsWith("-")&&M.length===a.length?te=!1:M[0]==="-"&&(te=!0);var L=te?1:0;return R&&(L=2),L&&(M=M.substring(L),H-=L,Q-=L),{value:M,start:H,end:Q,hasNegation:te}},S=w(e,d,f),C=S.hasNegation;r=S,e=r.value,d=r.start,f=r.end;var I=w(t.lastValue,l.start,l.end),y=I.start,A=I.end,E=I.value,k=e.substring(d,f);e.length&&E.length&&(y>E.length-a.length||A<o.length)&&!(k&&a.startsWith(k))&&(e=E);var F=0;e.startsWith(o)?F+=o.length:d<o.length&&(F=d),e=e.substring(F),f-=F;var Y=e.length,O=e.length-a.length;e.endsWith(a)?Y=O:(f>O||f>e.length-a.length)&&(Y=f),e=e.substring(0,Y),e=zB(C?"-"+e:e,i),e=(e.match(jB(m))||[]).join("");var T=e.indexOf(m);e=e.replace(new RegExp(sv(m),"g"),function(M,H){return H===T?".":""});var N=bu(e,i),V=N.beforeDecimal,j=N.afterDecimal,$=N.addNegation;return u.end-u.start<l.end-l.start&&V===""&&g&&!parseFloat(j)&&(e=$?"-":""),e}function HB(e,t){var n=t.prefix;n===void 0&&(n="");var r=t.suffix;r===void 0&&(r="");var i=Array.from({length:e.length+1}).map(function(){return!0}),o=e[0]==="-";i.fill(!1,0,n.length+(o?1:0));var a=e.length;return i.fill(!1,a-r.length+1,a+1),i}function WB(e){var t=hs(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i="");var o=e.allowNegative;if(o===void 0&&(o=!0),n===r)throw new Error(`
|
|
2463
|
+
`]))),YD=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,s=o.spacing.baseUnit;return ve({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2})},tu=function(t){var n=t.delay,r=t.offset;return ge.jsx("span",{css:ge.css({animation:"".concat(GD," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},KD=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=Cn(t,ND);return ge.jsx("div",D({},rt(ve(ve({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ge.jsx(tu,{delay:0,offset:r}),ge.jsx(tu,{delay:160,offset:!0}),ge.jsx(tu,{delay:320,offset:!r}))},QD=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,s=o.borderRadius,l=o.spacing;return ve({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:i?a.primary:a.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},qD=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,s=t.menuIsOpen;return ge.jsx("div",D({ref:o},rt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":s}),a,{"aria-disabled":r||void 0}),n)},JD=qD,XD=["data"],ZD=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},eO=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,s=t.headingProps,l=t.innerProps,u=t.label,d=t.theme,f=t.selectProps;return ge.jsx("div",D({},rt(t,"group",{group:!0}),l),ge.jsx(a,D({},s,{selectProps:f,theme:d,getStyles:i,getClassNames:o,cx:r}),u),ge.jsx("div",null,n))},tO=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return ve({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},nO=function(t){var n=Ig(t);n.data;var r=Cn(n,XD);return ge.jsx("div",D({},rt(t,"groupHeading",{"group-heading":!0}),r))},rO=eO,iO=["innerRef","isDisabled","isHidden","inputClassName"],oO=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,s=o.colors;return ve(ve({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},aO),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:s.neutral80})},Mg={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},aO={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ve({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Mg)},sO=function(t){return ve({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Mg)},lO=function(t){var n=t.cx,r=t.value,i=Ig(t),o=i.innerRef,a=i.isDisabled,s=i.isHidden,l=i.inputClassName,u=Cn(i,iO);return ge.jsx("div",D({},rt(t,"input",{"input-container":!0}),{"data-value":r||""}),ge.jsx("input",D({className:n({input:!0},l),ref:o,style:sO(s),disabled:a},u)))},cO=lO,uO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors;return ve({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},dO=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return ve({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},fO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,s=t.isFocused;return ve({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:s?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Bg=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",r,n)},hO=Bg,pO=Bg;function gO(e){var t=e.children,n=e.innerProps;return ge.jsx("div",D({role:"button"},n),t||ge.jsx(eu,{size:14}))}var mO=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,s=t.removeProps,l=t.selectProps,u=r.Container,d=r.Label,f=r.Remove;return ge.jsx(u,{data:i,innerProps:ve(ve({},rt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:l},ge.jsx(d,{data:i,innerProps:ve({},rt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),ge.jsx(f,{data:i,innerProps:ve(ve({},rt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},s),selectProps:l}))},vO=mO,bO=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,s=a.spacing,l=a.colors;return ve({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?l.primary:l.primary50}})},yO=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,s=t.innerProps;return ge.jsx("div",D({},rt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},s),n)},xO=yO,CO=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return ve({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},wO=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",D({},rt(t,"placeholder",{placeholder:!0}),r),n)},IO=wO,SO=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,a=i.colors;return ve({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},AO=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return ge.jsx("div",D({},rt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},TO=AO,EO={ClearIndicator:VD,Control:JD,DropdownIndicator:jD,DownChevron:Rg,CrossIcon:eu,Group:rO,GroupHeading:nO,IndicatorsContainer:BD,IndicatorSeparator:WD,Input:cO,LoadingIndicator:KD,Menu:wD,MenuList:SD,MenuPortal:PD,LoadingMessage:kD,NoOptionsMessage:ED,MultiValue:vO,MultiValueContainer:hO,MultiValueLabel:pO,MultiValueRemove:gO,Option:xO,Placeholder:IO,SelectContainer:OD,SingleValue:TO,ValueContainer:LD},kO=function(t){return ve(ve({},EO),t.components)},$g=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function _O(e,t){return!!(e===t||$g(e)&&$g(t))}function PO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!_O(e[n],t[n]))return!1;return!0}function DO(e,t){t===void 0&&(t=PO);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}for(var OO={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},RO=function(t){return ge.jsx("span",D({css:OO},t))},Ng=RO,LO={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,o=t.context,a=t.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return a?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,a=o===void 0?"":o,s=t.selectValue,l=t.isDisabled,u=t.isSelected,d=t.isAppleDevice,f=function(g,b){return g&&g.length?"".concat(g.indexOf(b)+1," of ").concat(g.length):""};if(n==="value"&&s)return"value ".concat(a," focused, ").concat(f(s,r),".");if(n==="menu"&&d){var h=l?" disabled":"",p="".concat(u?" selected":"").concat(h);return"".concat(a).concat(p,", ").concat(f(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},MO=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,s=t.selectValue,l=t.selectProps,u=t.id,d=t.isAppleDevice,f=l.ariaLiveMessages,h=l.getOptionLabel,p=l.inputValue,m=l.isMulti,g=l.isOptionDisabled,b=l.isSearchable,w=l.menuIsOpen,S=l.options,C=l.screenReaderStatus,I=l.tabSelectsValue,y=l.isLoading,A=l["aria-label"],E=l["aria-live"],k=x.useMemo(function(){return ve(ve({},LO),f||{})},[f]),F=x.useMemo(function(){var j="";if(n&&k.onChange){var $=n.option,M=n.options,H=n.removedValue,Q=n.removedValues,te=n.value,R=function(X){return Array.isArray(X)?null:X},L=H||$||R(te),U=L?h(L):"",W=M||Q||void 0,re=W?W.map(h):[],se=ve({isDisabled:L&&g(L,s),label:U,labels:re},n);j=k.onChange(se)}return j},[n,k,g,s,h]),Y=x.useMemo(function(){var j="",$=r||i,M=!!(r&&s&&s.includes(r));if($&&k.onFocus){var H={focused:$,label:h($),isDisabled:g($,s),isSelected:M,options:o,context:$===r?"menu":"value",selectValue:s,isAppleDevice:d};j=k.onFocus(H)}return j},[r,i,h,g,k,o,s,d]),O=x.useMemo(function(){var j="";if(w&&S.length&&!y&&k.onFilter){var $=C({count:o.length});j=k.onFilter({inputValue:p,resultsMessage:$})}return j},[o,p,w,k,S,C,y]),T=(n==null?void 0:n.action)==="initial-input-focus",N=x.useMemo(function(){var j="";if(k.guidance){var $=i?"value":w?"menu":"input";j=k.guidance({"aria-label":A,context:$,isDisabled:r&&g(r,s),isMulti:m,isSearchable:b,tabSelectsValue:I,isInitialFocus:T})}return j},[A,r,i,m,g,b,w,k,s,I,T]),V=ge.jsx(x.Fragment,null,ge.jsx("span",{id:"aria-selection"},F),ge.jsx("span",{id:"aria-focused"},Y),ge.jsx("span",{id:"aria-results"},O),ge.jsx("span",{id:"aria-guidance"},N));return ge.jsx(x.Fragment,null,ge.jsx(Ng,{id:u},T&&V),ge.jsx(Ng,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!T&&V))},BO=MO,nu=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],$O=new RegExp("["+nu.map(function(e){return e.letters}).join("")+"]","g"),Fg={},ru=0;ru<nu.length;ru++)for(var iu=nu[ru],ou=0;ou<iu.letters.length;ou++)Fg[iu.letters[ou]]=iu.base;var zg=function(t){return t.replace($O,function(n){return Fg[n]})},NO=DO(zg),jg=function(t){return t.replace(/^\s+|\s+$/g,"")},FO=function(t){return"".concat(t.label," ").concat(t.value)},zO=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=ve({ignoreCase:!0,ignoreAccents:!0,stringify:FO,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,a=i.ignoreAccents,s=i.stringify,l=i.trim,u=i.matchFrom,d=l?jg(r):r,f=l?jg(s(n)):s(n);return o&&(d=d.toLowerCase(),f=f.toLowerCase()),a&&(d=NO(d),f=zg(f)),u==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},jO=["innerRef"];function UO(e){var t=e.innerRef,n=Cn(e,jO),r=pD(n,"onExited","in","enter","exit","appear");return ge.jsx("input",D({ref:t},r,{css:ge.css({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var VO=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function HO(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=x.useRef(!1),s=x.useRef(!1),l=x.useRef(0),u=x.useRef(null),d=x.useCallback(function(b,w){if(u.current!==null){var S=u.current,C=S.scrollTop,I=S.scrollHeight,y=S.clientHeight,A=u.current,E=w>0,k=I-y-C,F=!1;k>w&&a.current&&(r&&r(b),a.current=!1),E&&s.current&&(o&&o(b),s.current=!1),E&&w>k?(n&&!a.current&&n(b),A.scrollTop=I,F=!0,a.current=!0):!E&&-w>C&&(i&&!s.current&&i(b),A.scrollTop=0,F=!0,s.current=!0),F&&VO(b)}},[n,r,i,o]),f=x.useCallback(function(b){d(b,b.deltaY)},[d]),h=x.useCallback(function(b){l.current=b.changedTouches[0].clientY},[]),p=x.useCallback(function(b){var w=l.current-b.changedTouches[0].clientY;d(b,w)},[d]),m=x.useCallback(function(b){if(b){var w=dD?{passive:!1}:!1;b.addEventListener("wheel",f,w),b.addEventListener("touchstart",h,w),b.addEventListener("touchmove",p,w)}},[p,h,f]),g=x.useCallback(function(b){b&&(b.removeEventListener("wheel",f,!1),b.removeEventListener("touchstart",h,!1),b.removeEventListener("touchmove",p,!1))},[p,h,f]);return x.useEffect(function(){if(t){var b=u.current;return m(b),function(){g(b)}}},[t,m,g]),function(b){u.current=b}}var Ug=["boxSizing","height","overflow","paddingRight","position"],Vg={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Hg(e){e.preventDefault()}function Wg(e){e.stopPropagation()}function Gg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Yg(){return"ontouchstart"in window||navigator.maxTouchPoints}var Kg=!!(typeof window!="undefined"&&window.document&&window.document.createElement),lo=0,si={capture:!1,passive:!1};function WO(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=x.useRef({}),o=x.useRef(null),a=x.useCallback(function(l){if(Kg){var u=document.body,d=u&&u.style;if(r&&Ug.forEach(function(m){var g=d&&d[m];i.current[m]=g}),r&&lo<1){var f=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,p=window.innerWidth-h+f||0;Object.keys(Vg).forEach(function(m){var g=Vg[m];d&&(d[m]=g)}),d&&(d.paddingRight="".concat(p,"px"))}u&&Yg()&&(u.addEventListener("touchmove",Hg,si),l&&(l.addEventListener("touchstart",Gg,si),l.addEventListener("touchmove",Wg,si))),lo+=1}},[r]),s=x.useCallback(function(l){if(Kg){var u=document.body,d=u&&u.style;lo=Math.max(lo-1,0),r&&lo<1&&Ug.forEach(function(f){var h=i.current[f];d&&(d[f]=h)}),u&&Yg()&&(u.removeEventListener("touchmove",Hg,si),l&&(l.removeEventListener("touchstart",Gg,si),l.removeEventListener("touchmove",Wg,si)))}},[r]);return x.useEffect(function(){if(t){var l=o.current;return a(l),function(){s(l)}}},[t,a,s]),function(l){o.current=l}}var GO=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},YO={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function KO(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,s=e.onTopArrive,l=e.onTopLeave,u=HO({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:l}),d=WO({isEnabled:n}),f=function(p){u(p),d(p)};return ge.jsx(x.Fragment,null,n&&ge.jsx("div",{onClick:GO,css:YO}),t(f))}var QO={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},qO=function(t){var n=t.name,r=t.onFocus;return ge.jsx("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:QO,value:"",onChange:function(){}})},JO=qO;function au(e){var t;return typeof window!="undefined"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function XO(){return au(/^iPhone/i)}function Qg(){return au(/^Mac/i)}function ZO(){return au(/^iPad/i)||Qg()&&navigator.maxTouchPoints>1}function eR(){return XO()||ZO()}function tR(){return Qg()||eR()}var nR=function(t){return t.label},qg=function(t){return t.label},Jg=function(t){return t.value},rR=function(t){return!!t.isDisabled},iR={clearIndicator:UD,container:DD,control:QD,dropdownIndicator:zD,group:ZD,groupHeading:tO,indicatorsContainer:MD,indicatorSeparator:HD,input:oO,loadingIndicator:YD,loadingMessage:TD,menu:yD,menuList:ID,menuPortal:_D,multiValue:uO,multiValueLabel:dO,multiValueRemove:fO,noOptionsMessage:AD,option:bO,placeholder:CO,singleValue:SO,valueContainer:RD},oR={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},aR=4,Xg=4,sR=38,lR=Xg*2,cR={baseUnit:Xg,controlHeight:sR,menuGutter:lR},su={borderRadius:aR,colors:oR,spacing:cR},uR={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Tg(),captureMenuScroll:!Tg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:zO(),formatGroupLabel:nR,getOptionLabel:qg,getOptionValue:Jg,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:rR,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!cD(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Zg(e,t,n,r){var i=im(e,t,n),o=om(e,t,n),a=rm(e,t),s=ds(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:s,index:r}}function us(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,s){return Zg(e,a,t,s)}).filter(function(a){return nm(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Zg(e,n,t,r);return nm(e,o)?o:void 0}).filter(fD)}function em(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,ai(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function tm(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,ai(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function dR(e,t){return em(us(e,t))}function nm(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!sm(e)||!o)&&am(e,{label:a,value:s,data:i},r)}function fR(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function hR(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var lu=function(t,n){var r,i=(r=t.find(function(o){return o.data===n}))===null||r===void 0?void 0:r.id;return i||null},rm=function(t,n){return t.getOptionLabel(n)},ds=function(t,n){return t.getOptionValue(n)};function im(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function om(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ds(e,t);return n.some(function(i){return ds(e,i)===r})}function am(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var sm=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},pR=1,lm=function(e){WP(n,e);var t=KP(n);function n(r){var i;if(VP(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=tR(),i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,u){var d=i.props,f=d.onChange,h=d.name;u.name=h,i.ariaOnChange(l,u),f(l,u)},i.setValue=function(l,u,d){var f=i.props,h=f.closeMenuOnSelect,p=f.isMulti,m=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:m}),h&&(i.setState({inputIsHiddenAfterUpdate:!p}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:u,option:d})},i.selectOption=function(l){var u=i.props,d=u.blurInputOnSelect,f=u.isMulti,h=u.name,p=i.state.selectValue,m=f&&i.isOptionSelected(l,p),g=i.isOptionDisabled(l,p);if(m){var b=i.getOptionValue(l);i.setValue(p.filter(function(w){return i.getOptionValue(w)!==b}),"deselect-option",l)}else if(!g)f?i.setValue([].concat(ai(p),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:h});return}d&&i.blurInput()},i.removeValue=function(l){var u=i.props.isMulti,d=i.state.selectValue,f=i.getOptionValue(l),h=d.filter(function(m){return i.getOptionValue(m)!==f}),p=so(u,h,h[0]||null);i.onChange(p,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(so(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,u=i.state.selectValue,d=u[u.length-1],f=u.slice(0,u.length-1),h=so(l,f,f[0]||null);i.onChange(h,{action:"pop-value",removedValue:d})},i.getFocusedOptionId=function(l){return lu(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return tm(us(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return iD.apply(void 0,[i.props.classNamePrefix].concat(u))},i.getOptionLabel=function(l){return rm(i.props,l)},i.getOptionValue=function(l){return ds(i.props,l)},i.getStyles=function(l,u){var d=i.props.unstyled,f=iR[l](u,d);f.boxSizing="border-box";var h=i.props.styles[l];return h?h(f,u):f},i.getClassNames=function(l,u){var d,f;return(d=(f=i.props.classNames)[l])===null||d===void 0?void 0:d.call(f,u)},i.getElementId=function(l){return"".concat(i.state.instancePrefix,"-").concat(l)},i.getComponents=function(){return kO(i.props)},i.buildCategorizedOptions=function(){return us(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return em(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,u){i.setState({ariaSelection:ve({value:l},u)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var u=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():u&&i.openMenu("first"):(u&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var u=i.props,d=u.isMulti,f=u.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&as(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var u=l.touches,d=u&&u.item(0);d&&(i.initialTouchX=d.clientX,i.initialTouchY=d.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var u=l.touches,d=u&&u.item(0);if(d){var f=Math.abs(d.clientX-i.initialTouchX),h=Math.abs(d.clientY-i.initialTouchY),p=5;i.userIsDragging=f>p||h>p}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var u=i.props.inputValue,d=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(d,{action:"input-change",prevInputValue:u}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var u=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:u}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){if(!(i.blockOptionHover||i.state.focusedOption===l)){var u=i.getFocusableOptions(),d=u.indexOf(l);i.setState({focusedOption:l,focusedOptionId:d>-1?i.getFocusedOptionId(l):null})}},i.shouldHideSelectedOptions=function(){return sm(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var u=i.props,d=u.isMulti,f=u.backspaceRemovesValue,h=u.escapeClearsValue,p=u.inputValue,m=u.isClearable,g=u.isDisabled,b=u.menuIsOpen,w=u.onKeyDown,S=u.tabSelectsValue,C=u.openMenuOnFocus,I=i.state,y=I.focusedOption,A=I.focusedValue,E=I.selectValue;if(!g&&!(typeof w=="function"&&(w(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!d||p)return;i.focusValue("previous");break;case"ArrowRight":if(!d||p)return;i.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(A)i.removeValue(A);else{if(!f)return;d?i.popValue():m&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!b||!S||!y||C&&i.isOptionSelected(y,E))return;i.selectOption(y);break;case"Enter":if(l.keyCode===229)break;if(b){if(!y||i.isComposing)return;i.selectOption(y);break}return;case"Escape":b?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:p}),i.onMenuClose()):m&&h&&i.clearValue();break;case" ":if(p)return;if(!b){i.openMenu("first");break}if(!y)return;i.selectOption(y);break;case"ArrowUp":b?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":b?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!b)return;i.focusOption("pageup");break;case"PageDown":if(!b)return;i.focusOption("pagedown");break;case"Home":if(!b)return;i.focusOption("first");break;case"End":if(!b)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++pR),i.state.selectValue=os(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),a=i.buildFocusableOptions(),s=a.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=a[s],i.state.focusedOptionId=lu(o,a[s])}return i}return HP(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Ag(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,s=o.menuIsOpen,l=this.state.isFocused;(l&&!a&&i.isDisabled||l&&s&&!i.menuIsOpen)&&this.focusInput(),l&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Ag(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,a=this.state,s=a.selectValue,l=a.isFocused,u=this.buildFocusableOptions(),d=i==="first"?0:u.length-1;if(!this.props.isMulti){var f=u.indexOf(s[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[d],focusedOptionId:this.getFocusedOptionId(u[d])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,s=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=a.indexOf(s);s||(l=-1);var u=a.length-1,d=-1;if(a.length){switch(i){case"previous":l===0?d=0:l===-1?d=u:d=l-1;break;case"next":l>-1&&l<u&&(d=l+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:a[d]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,s=this.getFocusableOptions();if(s.length){var l=0,u=s.indexOf(a);a||(u=-1),i==="up"?l=u>0?u-1:s.length-1:i==="down"?l=(u+1)%s.length:i==="pageup"?(l=u-o,l<0&&(l=0)):i==="pagedown"?(l=u+o,l>s.length-1&&(l=s.length-1)):i==="last"&&(l=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(s[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(su):ve(ve({},su),this.props.theme):su}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,s=this.getClassNames,l=this.getValue,u=this.selectOption,d=this.setValue,f=this.props,h=f.isMulti,p=f.isRtl,m=f.options,g=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:s,getValue:l,hasValue:g,isMulti:h,isRtl:p,options:m,selectOption:u,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,a=i.isMulti;return o===void 0?a:o}},{key:"isOptionDisabled",value:function(i,o){return im(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return om(this.props,i,o)}},{key:"filterOption",value:function(i,o){return am(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:s})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,a=i.isSearchable,s=i.inputId,l=i.inputValue,u=i.tabIndex,d=i.form,f=i.menuIsOpen,h=i.required,p=this.getComponents(),m=p.Input,g=this.state,b=g.inputIsHidden,w=g.ariaSelection,S=this.commonProps,C=s||this.getElementId("input"),I=ve(ve(ve({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":h,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(w==null?void 0:w.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?G.createElement(m,D({},S,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:C,innerRef:this.getInputRef,isDisabled:o,isHidden:b,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:d,type:"text",value:l},I)):G.createElement(UO,D({id:C,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:is,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:d,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,s=o.MultiValueContainer,l=o.MultiValueLabel,u=o.MultiValueRemove,d=o.SingleValue,f=o.Placeholder,h=this.commonProps,p=this.props,m=p.controlShouldRenderValue,g=p.isDisabled,b=p.isMulti,w=p.inputValue,S=p.placeholder,C=this.state,I=C.selectValue,y=C.focusedValue,A=C.isFocused;if(!this.hasValue()||!m)return w?null:G.createElement(f,D({},h,{key:"placeholder",isDisabled:g,isFocused:A,innerProps:{id:this.getElementId("placeholder")}}),S);if(b)return I.map(function(k,F){var Y=k===y,O="".concat(i.getOptionLabel(k),"-").concat(i.getOptionValue(k));return G.createElement(a,D({},h,{components:{Container:s,Label:l,Remove:u},isFocused:Y,isDisabled:g,key:O,index:F,removeProps:{onClick:function(){return i.removeValue(k)},onTouchEnd:function(){return i.removeValue(k)},onMouseDown:function(N){N.preventDefault()}},data:k}),i.formatOptionLabel(k,"value"))});if(w)return null;var E=I[0];return G.createElement(d,D({},h,{data:E,isDisabled:g}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,d=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return G.createElement(o,D({},a,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,d=this.state.isFocused;if(!o||!u)return null;var f={"aria-hidden":"true"};return G.createElement(o,D({},a,{innerProps:f,isDisabled:l,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var s=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return G.createElement(a,D({},s,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return G.createElement(o,D({},a,{innerProps:u,isDisabled:s,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,s=o.GroupHeading,l=o.Menu,u=o.MenuList,d=o.MenuPortal,f=o.LoadingMessage,h=o.NoOptionsMessage,p=o.Option,m=this.commonProps,g=this.state.focusedOption,b=this.props,w=b.captureMenuScroll,S=b.inputValue,C=b.isLoading,I=b.loadingMessage,y=b.minMenuHeight,A=b.maxMenuHeight,E=b.menuIsOpen,k=b.menuPlacement,F=b.menuPosition,Y=b.menuPortalTarget,O=b.menuShouldBlockScroll,T=b.menuShouldScrollIntoView,N=b.noOptionsMessage,V=b.onMenuScrollToTop,j=b.onMenuScrollToBottom;if(!E)return null;var $=function(U,W){var re=U.type,se=U.data,ae=U.isDisabled,X=U.isSelected,le=U.label,Z=U.value,he=g===se,Se=ae?void 0:function(){return i.onOptionHover(se)},He=ae?void 0:function(){return i.selectOption(se)},wt="".concat(i.getElementId("option"),"-").concat(W),ct={id:wt,onClick:He,onMouseMove:Se,onMouseOver:Se,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:X};return G.createElement(p,D({},m,{innerProps:ct,data:se,isDisabled:ae,isSelected:X,key:wt,label:le,type:re,value:Z,isFocused:he,innerRef:he?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(U.data,"menu"))},M;if(this.hasOptions())M=this.getCategorizedOptions().map(function(L){if(L.type==="group"){var U=L.data,W=L.options,re=L.index,se="".concat(i.getElementId("group"),"-").concat(re),ae="".concat(se,"-heading");return G.createElement(a,D({},m,{key:se,data:U,options:W,Heading:s,headingProps:{id:ae,data:L.data},label:i.formatGroupLabel(L.data)}),L.options.map(function(X){return $(X,"".concat(re,"-").concat(X.index))}))}else if(L.type==="option")return $(L,"".concat(L.index))});else if(C){var H=I({inputValue:S});if(H===null)return null;M=G.createElement(f,m,H)}else{var Q=N({inputValue:S});if(Q===null)return null;M=G.createElement(h,m,Q)}var te={minMenuHeight:y,maxMenuHeight:A,menuPlacement:k,menuPosition:F,menuShouldScrollIntoView:T},R=G.createElement(xD,D({},m,te),function(L){var U=L.ref,W=L.placerProps,re=W.placement,se=W.maxHeight;return G.createElement(l,D({},m,te,{innerRef:U,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:C,placement:re}),G.createElement(KO,{captureEnabled:w,onTopArrive:V,onBottomArrive:j,lockEnabled:O},function(ae){return G.createElement(u,D({},m,{innerRef:function(le){i.getMenuListRef(le),ae(le)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:i.getElementId("listbox")},isLoading:C,maxHeight:se,focusedOption:g}),M)}))});return Y||F==="fixed"?G.createElement(d,D({},m,{appendTo:Y,controlElement:this.controlRef,menuPlacement:k,menuPosition:F}),R):R}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,s=o.isDisabled,l=o.isMulti,u=o.name,d=o.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!s)return G.createElement(JO,{name:u,onFocus:this.onValueInputFocus});if(!(!u||s))if(l)if(a){var h=f.map(function(g){return i.getOptionValue(g)}).join(a);return G.createElement("input",{name:u,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(g,b){return G.createElement("input",{key:"i-".concat(b),name:u,type:"hidden",value:i.getOptionValue(g)})}):G.createElement("input",{name:u,type:"hidden",value:""});return G.createElement("div",null,p)}else{var m=f[0]?this.getOptionValue(f[0]):"";return G.createElement("input",{name:u,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,s=o.focusedOption,l=o.focusedValue,u=o.isFocused,d=o.selectValue,f=this.getFocusableOptions();return G.createElement(BO,D({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:s,focusedValue:l,isFocused:u,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,s=i.SelectContainer,l=i.ValueContainer,u=this.props,d=u.className,f=u.id,h=u.isDisabled,p=u.menuIsOpen,m=this.state.isFocused,g=this.commonProps=this.getCommonProps();return G.createElement(s,D({},g,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:m}),this.renderLiveRegion(),G.createElement(o,D({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:m,menuIsOpen:p}),G.createElement(l,D({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),G.createElement(a,D({},g,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.prevProps,s=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,d=o.isFocused,f=o.prevWasFocused,h=o.instancePrefix,p=i.options,m=i.value,g=i.menuIsOpen,b=i.inputValue,w=i.isMulti,S=os(m),C={};if(a&&(m!==a.value||p!==a.options||g!==a.menuIsOpen||b!==a.inputValue)){var I=g?dR(i,S):[],y=g?tm(us(i,S),"".concat(h,"-option")):[],A=s?fR(o,S):null,E=hR(o,I),k=lu(y,E);C={selectValue:S,focusedOption:E,focusedOptionId:k,focusableOptionsWithIds:y,focusedValue:A,clearFocusValueOnUpdate:!1}}var F=l!=null&&i!==a?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},Y=u,O=d&&f;return d&&!O&&(Y={value:so(w,S,S[0]||null),options:S,action:"initial-input-focus"},O=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(Y=null),ve(ve(ve({},C),F),{},{prevProps:i,ariaSelection:Y,prevWasFocused:O})}}]),n}(x.Component);lm.defaultProps=uR;var gR=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function mR(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,a=o===void 0?null:o,s=e.inputValue,l=e.menuIsOpen,u=e.onChange,d=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,p=e.value,m=Cn(e,gR),g=x.useState(s!==void 0?s:n),b=Vn(g,2),w=b[0],S=b[1],C=x.useState(l!==void 0?l:i),I=Vn(C,2),y=I[0],A=I[1],E=x.useState(p!==void 0?p:a),k=Vn(E,2),F=k[0],Y=k[1],O=x.useCallback(function(H,Q){typeof u=="function"&&u(H,Q),Y(H)},[u]),T=x.useCallback(function(H,Q){var te;typeof d=="function"&&(te=d(H,Q)),S(te!==void 0?te:H)},[d]),N=x.useCallback(function(){typeof h=="function"&&h(),A(!0)},[h]),V=x.useCallback(function(){typeof f=="function"&&f(),A(!1)},[f]),j=s!==void 0?s:w,$=l!==void 0?l:y,M=p!==void 0?p:F;return ve(ve({},m),{},{inputValue:j,menuIsOpen:$,onChange:O,onInputChange:T,onMenuClose:V,onMenuOpen:N,value:M})}var vR=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],cm=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(t).toLowerCase(),o=String(r.getOptionValue(n)).toLowerCase(),a=String(r.getOptionLabel(n)).toLowerCase();return o===i||a===i},cu={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return cm(t,o,i)})||r.some(function(o){return cm(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function bR(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,i=r===void 0?"last":r,o=e.formatCreateLabel,a=o===void 0?cu.formatCreateLabel:o,s=e.isValidNewOption,l=s===void 0?cu.isValidNewOption:s,u=e.getNewOptionData,d=u===void 0?cu.getNewOptionData:u,f=e.onCreateOption,h=e.options,p=h===void 0?[]:h,m=e.onChange,g=Cn(e,vR),b=g.getOptionValue,w=b===void 0?Jg:b,S=g.getOptionLabel,C=S===void 0?qg:S,I=g.inputValue,y=g.isLoading,A=g.isMulti,E=g.value,k=g.name,F=x.useMemo(function(){return l(I,os(E),p,{getOptionValue:w,getOptionLabel:C})?d(I,a(I)):void 0},[a,d,C,w,I,l,p,E]),Y=x.useMemo(function(){return(n||!y)&&F?i==="first"?[F].concat(ai(p)):[].concat(ai(p),[F]):p},[n,i,y,F,p]),O=x.useCallback(function(T,N){if(N.action!=="select-option")return m(T,N);var V=Array.isArray(T)?T:[T];if(V[V.length-1]===F){if(f)f(I);else{var j=d(I,I),$={action:"create-option",name:k,option:j};m(so(A,[].concat(ai(os(E)),[j]),j),$)}return}m(T,N)},[d,I,A,k,F,f,m,E]);return ve(ve({},g),{},{options:Y,onChange:O})}var yR=x.forwardRef(function(e,t){var n=mR(e),r=bR(n);return G.createElement(lm,D({ref:t},r))}),um=yR;const xR={control:(e,t)=>q(z({},e),{minHeight:"36px",borderColor:t.isFocused?"#0b6bcb":"#ced4da",boxShadow:t.isFocused?"0 0 0 0px 1px 2px 0px rgba(25, 118, 210, 0.25)":"none",borderRadius:"6px",fontFamily:'var(--joy-fontFamily-body, "Inter", var(--joy-fontFamily-fallback, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"));',"&:hover":{borderColor:t.isFocused?"#1976d2":"#ced4da"}}),valueContainer:e=>q(z({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>q(z({},e),{minHeight:"36px"}),menu:e=>q(z({},e),{position:"relative"}),clearIndicator:e=>q(z({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>q(z({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>q(z({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>q(z({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"14px"}),multiValueLabel:e=>q(z({},e),{color:"#333"})},CR=e=>e.map(t=>({label:t,value:t})),wR=e=>{const[t,n]=x.useState(""),[r,i]=x.useState(!1),o=e.sx||{marginBottom:"16px"},a=CR(e.flags),s=()=>i(!r),l=h=>{e.onChange(h.map(p=>p.value))},u=h=>{n(h)},d=h=>{h.persist();const{key:p}=h;if(t)switch(p){case"Enter":case"Tab":if(e.flags&&e.flags.length===0){const m=[...e.flags,t];e.onChange(m)}if(e.flags&&e.flags.length>0&&f()){const m=[...e.flags,t];e.onChange(m)}n(""),h.preventDefault()}},f=()=>{let h=!1;return e.flags.length&&e.flags.includes(t)?(s(),h):(h=!0,h)};return c.jsxs(c.Fragment,{children:[c.jsx(v.Box,{sx:o,children:c.jsx(um,{styles:xR,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:l,onInputChange:u,onKeyDown:d,placeholder:e.labels.flagsPlaceholder,value:a})}),c.jsx(nt,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:s})]})},co=e=>{const[t,n]=x.useState(!1),[r,i]=x.useState(!1),[o,a]=x.useState(!1),[s,l]=x.useState(!1),[u,d]=x.useState(""),[f,h]=x.useState("primary"),[p,m]=x.useState(""),g=x.useRef(null),b=()=>{g.current&&g.current.click()},w=new $p,S=lt(),C=()=>{d(""),i(!1)},I=N=>{let V="",j="primary";switch(N){case"copy_url":V=e.labels.urlCopiedToClipboardMessage,j="primary";break;case"image_deleted":V=e.labels.imageDeletedMessage,j="primary";break;case"image_reset":V=e.labels.imageResetMessage,j="primary";break;case"upload_success":V=e.labels.uploadingImageMessage,j="success";break;case"upload_failed":V=e.labels.uploadingImageErrorMessage,j="danger";break;case"sign_in_url_failed":V=e.labels.generateSignedInUrlErrorMessage,j="danger";break;case"encrypting_file_failed":V=e.labels.encryptingImageErrorMessage,j="danger";break}h(j),d(V),i(!0)},y=()=>a(!o),A=()=>l(!s),E=()=>{e.clearImage(),I("image_deleted")},k=N=>{navigator.clipboard.writeText(N),I("copy_url")},F=N=>_(this,null,function*(){N.persist();const V=N.target.files?N.target.files[0]:null;if(V){n(!0);try{const j=V.type.split("/")[1],$=yield w.readFileAndHash(V),M=(yield w.generateHashFileName(V))+"."+j,H={image_type:j,image_file_name:M,image_size:V.size,base64_sum:$},Q=yield S==null?void 0:S.https.generateSignedInUrl(H);if(Q!=null&&Q.ok){const te=yield Q.json(),R={"Content-Type":V.type,"Content-MD5":$};try{const L=new File([V],M,{type:V.type}),U=yield S==null?void 0:S.https.storeInBucket(te.data.signed_url,L,R);e.onChangeImages(U||""),m(U),I("upload_success")}catch(L){console.error("There was a problem with uploading the file: ",L),I("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield Q==null?void 0:Q.json()),I("sign_in_url_failed")}catch(j){console.error("There was a problem with encrypting file...",j),I("encrypting_file_failed")}n(!1)}}),Y=N=>_(this,null,function*(){if(N){n(!0);try{const V=N.type.split("/")[1],j=yield w.readFileAndHash(N),$=(yield w.generateHashFileName(N))+"."+V,M={image_type:V,image_file_name:$,image_size:N.size,base64_sum:j},H=yield S==null?void 0:S.https.generateSignedInUrl(M);if(H!=null&&H.ok){const Q=yield H.json(),te={"Content-Type":N.type,"Content-MD5":j};try{const R=new File([N],$,{type:N.type}),L=yield S==null?void 0:S.https.storeInBucket(Q.data.signed_url,R,te);e.onChangeImages(L||""),I("upload_success")}catch(R){console.error("There was a problem with uploading the file: ",R),I("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield H==null?void 0:H.json()),I("sign_in_url_failed")}catch(V){console.error("There was a problem with encrypting file...",V),I("encrypting_file_failed")}n(!1)}}),O=()=>{e.onChangeImages(p),I("image_reset")},T=N=>{e.onChangeImages(N),m(N)};return c.jsxs(c.Fragment,{children:[c.jsxs(v.Card,{sx:{marginBottom:"10px"},children:[c.jsxs(v.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[c.jsx(v.Typography,{level:"title-lg",children:e.title}),c.jsx(v.Tooltip,{title:e.labels.clearImage,children:c.jsx(v.IconButton,{variant:"plain",color:"danger",size:"sm",onClick:E,children:c.jsx(Ap,{})})})]}),c.jsxs(v.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[c.jsxs(v.Skeleton,{loading:t,animation:"wave",children:[e.image?c.jsx(v.Box,{component:"img",src:e.image,loading:"lazy",alt:e.title,sx:{width:"100%",height:"100%",position:"relative",transition:"background-color 0.3s ease","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.3)"}}}):c.jsx(Pc,{sx:{fontSize:"3rem",opacity:.2}}),e.image?c.jsx(v.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",pointerEvents:"none",opacity:0,transition:"opacity 0.3s ease","&:hover":{opacity:1}},children:c.jsx(Fp,{sx:{fontSize:"3rem",color:"#fff"}})}):c.jsx(c.Fragment,{})]}),c.jsx(v.Tooltip,{title:e.labels.copyUrl,children:c.jsx(v.Button,{onClick:()=>k(e.image),disabled:!e.image,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:c.jsx(De.ContentCopy,{})})}),c.jsx(v.Tooltip,{title:e.labels.viewImage,children:c.jsx(v.Button,{onClick:y,disabled:!e.image,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:c.jsx(jp,{})})}),c.jsx(v.Tooltip,{title:e.labels.cropImage,children:c.jsx(v.Button,{onClick:A,disabled:!e.image,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:c.jsx(og,{})})})]}),c.jsx(v.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:c.jsxs(v.Button,{sx:{width:"100%"},onClick:b,children:[c.jsx(De.Upload,{})," ",e.labels.uploadImage,c.jsx(Up,{type:"file",accept:"image/*",onChange:F,ref:g})]})}),S.https.sportal365Config?c.jsx(v.AccordionGroup,{variant:"soft",children:c.jsxs(v.Accordion,{children:[c.jsx(v.AccordionSummary,{children:c.jsx(v.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.labels.sportal365Images})}),c.jsx(v.AccordionDetails,{children:c.jsx(zp,{labels:e.labels,onChangeImages:T})})]})}):c.jsx(c.Fragment,{})]}),c.jsx(nt,{showToast:r,message:u,color:f,hideToast:C}),c.jsx(Np,{title:e.labels.viewImage,open:o,imageSrc:e.image,toggleModal:y}),c.jsx(ig,{labels:e.labels,open:s,imageSrc:e.image,toggleModal:A,uploadImage:Y,resetDefaultImageUrl:O})]})},IR=["cover","mobile"],SR=e=>new Map().set("main",e.mainImage).set("cover",e.coverImage).set("mobile",e.mobileImage),AR=e=>e?z({},e):{main:"",mobile:"",cover:""},TR=e=>{const[t,n]=x.useState(!1),r=AR(e.defaultValue),i=SR(e.labels),o=(s,l)=>{r[l]=s,e.onChange(r)},a=s=>{r[s]="",e.onChange(r)};return c.jsxs(v.Box,{sx:{marginBottom:"10px"},children:[c.jsx(co,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:s=>o(s,"main"),clearImage:()=>a("main")}),c.jsx(v.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?c.jsx(c.Fragment,{children:IR.map(s=>c.jsx(co,{labels:e.labels,title:i.get(s),image:r[s],onChangeImages:l=>o(l,s),clearImage:()=>a(s)},`images-${s}`))}):c.jsx(c.Fragment,{})]})};function ER(e){return at("MuiSheet",e)}Ze("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const kR=["className","color","component","variant","invertedColors","slots","slotProps"],_R=e=>{const{variant:t,color:n}=e,r={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`]};return dt(r,ER,{})},PR=be("div",{name:"JoySheet",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r;const i=(n=e.variants[t.variant])==null?void 0:n[t.color],{borderRadius:o,bgcolor:a,backgroundColor:s,background:l}=ac({theme:e,ownerState:t},["borderRadius","bgcolor","backgroundColor","background"]),u=tr(e,`palette.${a}`)||a||tr(e,`palette.${s}`)||s||l||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||e.vars.palette.background.surface;return[D({"--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,"--ListItem-stickyBackground":u==="transparent"?"initial":u,"--Sheet-background":u==="transparent"?"initial":u},o!==void 0&&{"--List-radius":`calc(${o} - var(--variant-borderWidth, 0px))`,"--unstable_actionRadius":`calc(${o} - var(--variant-borderWidth, 0px))`},{backgroundColor:e.vars.palette.background.surface,position:"relative"}),D({},e.typography["body-md"],t.variant==="solid"&&t.color&&t.invertedColors&&o_(t.color)(e),t.variant==="soft"&&t.color&&t.invertedColors&&a_(t.color)(e),(r=e.variants[t.variant])==null?void 0:r[t.color],i)]}),DR=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoySheet"}),{className:i,color:o="neutral",component:a="div",variant:s="plain",invertedColors:l=!1,slots:u={},slotProps:d={}}=r,f=Ae(r,kR),h=D({},r,{color:o,component:a,invertedColors:l,variant:s}),p=_R(h),m=D({},f,{component:a,slots:u,slotProps:d}),[g,b]=Ie("root",{ref:n,className:Bn(p.root,i),elementType:PR,externalForwardedProps:m,ownerState:h});return c.jsx(g,D({},b))});function OR(e){return at("MuiTypography",e)}Ze("MuiTypography",["root","h1","h2","h3","h4","title-lg","title-md","title-sm","body-lg","body-md","body-sm","body-xs","noWrap","gutterBottom","startDecorator","endDecorator","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const RR=["color","textColor"],LR=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],uu=G.createContext(!1),MR=G.createContext(!1),BR=e=>{const{gutterBottom:t,noWrap:n,level:r,color:i,variant:o}=e,a={root:["root",r,t&&"gutterBottom",n&&"noWrap",i&&`color${ye(i)}`,o&&`variant${ye(o)}`],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return dt(a,OR,{})},$R=be("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),NR=be("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),FR=be("span",{name:"JoyTypography",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const s=t.level!=="inherit"?(n=e.typography[t.level])==null?void 0:n.lineHeight:"1";return D({"--Icon-fontSize":`calc(1em * ${s})`},t.color&&{"--Icon-color":"currentColor"},{margin:"var(--Typography-margin, 0px)"},t.nesting?{display:"inline"}:D({display:"block"},t.unstable_hasSkeleton&&{position:"relative"}),(t.startDecorator||t.endDecorator)&&D({display:"flex",alignItems:"center"},t.nesting&&D({display:"inline-flex"},t.startDecorator&&{verticalAlign:"bottom"})),t.level&&t.level!=="inherit"&&e.typography[t.level],{fontSize:`var(--Typography-fontSize, ${t.level&&t.level!=="inherit"&&(r=(i=e.typography[t.level])==null?void 0:i.fontSize)!=null?r:"inherit"})`},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.color&&{color:`var(--variant-plainColor, rgba(${(o=e.vars.palette[t.color])==null?void 0:o.mainChannel} / 1))`},t.variant&&D({borderRadius:e.vars.radius.xs,paddingBlock:"min(0.1em, 4px)",paddingInline:"0.25em"},!t.nesting&&{marginInline:"-0.25em"},(a=e.variants[t.variant])==null?void 0:a[t.color]))}),dm={h1:"h1",h2:"h2",h3:"h3",h4:"h4","title-lg":"p","title-md":"p","title-sm":"p","body-lg":"p","body-md":"p","body-sm":"p","body-xs":"span",inherit:"p"},du=G.forwardRef(function(t,n){var r;const i=ft({props:t,name:"JoyTypography"}),{color:o,textColor:a}=i,s=Ae(i,RR),l=G.useContext(uu),u=G.useContext(MR),d=QA(D({},s,{color:a})),{component:f,gutterBottom:h=!1,noWrap:p=!1,level:m="body-md",levelMapping:g=dm,children:b,endDecorator:w,startDecorator:S,variant:C,slots:I={},slotProps:y={}}=d,A=Ae(d,LR),E=(r=t.color)!=null?r:C?o!=null?o:"neutral":o,k=l||u?t.level||"inherit":m,F=Jf(b,["Skeleton"]),Y=f||(l?"span":g[k]||dm[k]||"span"),O=D({},d,{level:k,component:Y,color:E,gutterBottom:h,noWrap:p,nesting:l,variant:C,unstable_hasSkeleton:F}),T=BR(O),N=D({},A,{component:Y,slots:I,slotProps:y}),[V,j]=Ie("root",{ref:n,className:T.root,elementType:FR,externalForwardedProps:N,ownerState:O}),[$,M]=Ie("startDecorator",{className:T.startDecorator,elementType:$R,externalForwardedProps:N,ownerState:O}),[H,Q]=Ie("endDecorator",{className:T.endDecorator,elementType:NR,externalForwardedProps:N,ownerState:O});return c.jsx(uu.Provider,{value:!0,children:c.jsxs(V,D({},j,{children:[S&&c.jsx($,D({},M,{children:S})),F?G.cloneElement(b,{variant:b.props.variant||"inline"}):b,w&&c.jsx(H,D({},Q,{children:w}))]}))})});du.muiName="Typography";function zR(e){return at("MuiFormControl",e)}const fm=Ze("MuiFormControl",["root","error","disabled","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),jR=Ze("MuiSwitch",["root","checked","disabled","action","input","thumb","track","focusVisible","readOnly","colorPrimary","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid","startDecorator","endDecorator"]),UR=["id","className","component","disabled","required","error","color","size","orientation","slots","slotProps"],VR=e=>{const{disabled:t,error:n,size:r,color:i,orientation:o}=e,a={root:["root",o,t&&"disabled",n&&"error",i&&`color${ye(i)}`,r&&`size${ye(r)}`]};return dt(a,zR,{})},HR=be("div",{name:"JoyFormControl",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i;return D({"--unstable_RadioGroup-margin":"0.5rem 0","--FormLabel-alignSelf":t.orientation==="horizontal"?"align-items":"flex-start","--FormLabel-asteriskColor":e.vars.palette.danger[500]},t.size==="sm"&&{"--FormLabel-fontSize":e.vars.fontSize.xs,"--FormLabel-lineHeight":e.vars.lineHeight.xl,"--FormLabel-margin":t.orientation==="horizontal"?"0 0.5rem 0 0":"0 0 0.25rem 0","--FormHelperText-fontSize":e.vars.fontSize.xs,"--FormHelperText-lineHeight":e.vars.lineHeight.xl},t.size==="md"&&{"--FormLabel-fontSize":e.vars.fontSize.sm,"--FormLabel-lineHeight":e.vars.lineHeight.sm,"--FormLabel-margin":t.orientation==="horizontal"?"0 0.75rem 0 0":"0 0 0.375rem 0","--FormHelperText-fontSize":e.vars.fontSize.sm,"--FormHelperText-lineHeight":e.vars.lineHeight.sm},t.size==="lg"&&{"--FormLabel-fontSize":e.vars.fontSize.md,"--FormLabel-lineHeight":e.vars.lineHeight.md,"--FormLabel-margin":t.orientation==="horizontal"?"0 1rem 0 0":"0 0 0.5rem 0","--FormHelperText-fontSize":e.vars.fontSize.sm,"--FormHelperText-lineHeight":e.vars.lineHeight.sm},t.color&&{"--FormHelperText-color":(n=e.vars.palette[t.color])==null?void 0:n[500]},{"--FormHelperText-margin":"0.375rem 0 0 0",[`&.${fm.error}`]:{"--FormHelperText-color":e.vars.palette.danger[500]},[`&.${fm.disabled}`]:{"--FormLabel-color":(r=e.variants.plainDisabled)==null||(r=r[t.color||"neutral"])==null?void 0:r.color,"--FormHelperText-color":(i=e.variants.plainDisabled)==null||(i=i[t.color||"neutral"])==null?void 0:i.color},display:"flex",position:"relative",flexDirection:t.orientation==="horizontal"?"row":"column"},t.orientation==="horizontal"&&{[`& > label ~ .${jR.root}`]:{"--unstable_Switch-margin":"0 0 0 auto"}})}),fu=G.forwardRef(function(t,n){const r=ft({props:t,name:"JoyFormControl"}),{id:i,className:o,component:a="div",disabled:s=!1,required:l=!1,error:u=!1,color:d,size:f="md",orientation:h="vertical",slots:p={},slotProps:m={}}=r,g=Ae(r,UR),b=Hi(i),[w,S]=G.useState(null),C=D({},r,{id:b,component:a,color:d,disabled:s,error:u,required:l,size:f,orientation:h});let I;const y=VR(C),[A,E]=Ie("root",{ref:n,className:Bn(y.root,o),elementType:HR,externalForwardedProps:D({},g,{component:a,slots:p,slotProps:m}),ownerState:C}),k=G.useMemo(()=>({disabled:s,required:l,error:u,color:d,size:f,htmlFor:b,labelId:`${b}-label`,"aria-describedby":w?`${b}-helper-text`:void 0,setHelperText:S,registerEffect:I}),[d,s,u,w,b,I,l,f]);return c.jsx(Wa.Provider,{value:k,children:c.jsx(A,D({},E))})});function WR(e){return at("MuiFormLabel",e)}Ze("MuiFormLabel",["root","asterisk"]);const GR=["children","component","htmlFor","id","slots","slotProps"],YR=()=>dt({root:["root"],asterisk:["asterisk"]},WR,{}),KR=be("label",{name:"JoyFormLabel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({"--Icon-fontSize":"calc(var(--FormLabel-lineHeight) * 1em)",WebkitTapHighlightColor:"transparent",alignSelf:"var(--FormLabel-alignSelf)",display:"flex",gap:"2px",alignItems:"center",flexWrap:"wrap",userSelect:"none",fontFamily:e.vars.fontFamily.body,fontSize:`var(--FormLabel-fontSize, ${e.vars.fontSize.sm})`,fontWeight:e.vars.fontWeight.md,lineHeight:`var(--FormLabel-lineHeight, ${e.vars.lineHeight.sm})`,color:`var(--FormLabel-color, ${e.vars.palette.text.primary})`,margin:"var(--FormLabel-margin, 0px)"})),QR=be("span",{name:"JoyFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})({color:"var(--FormLabel-asteriskColor)"}),hu=G.forwardRef(function(t,n){var r,i;const o=ft({props:t,name:"JoyFormLabel"}),{children:a,component:s="label",htmlFor:l,id:u,slots:d={},slotProps:f={}}=o,h=Ae(o,GR),p=G.useContext(Wa),m=(r=(i=t.required)!=null?i:p==null?void 0:p.required)!=null?r:!1,g=D({},o,{required:m}),b=YR(),w=D({},h,{component:s,slots:d,slotProps:f}),[S,C]=Ie("root",{additionalProps:{htmlFor:l!=null?l:p==null?void 0:p.htmlFor,id:u!=null?u:p==null?void 0:p.labelId},ref:n,className:b.root,elementType:KR,externalForwardedProps:w,ownerState:g}),[I,y]=Ie("asterisk",{additionalProps:{"aria-hidden":!0},className:b.asterisk,elementType:QR,externalForwardedProps:w,ownerState:g});return c.jsxs(S,D({},C,{children:[a,m&&c.jsxs(I,D({},y,{children:[" ","*"]}))]}))}),qR=({environment:e,userNotFound:t})=>{const[n,r]=x.useState(""),[i,o]=x.useState(""),[a,s]=x.useState(!1),l=()=>{s(!a)},u=h=>{h.persist(),r(h.target.value)},d=h=>{h.persist(),o(h.target.value)},f=()=>_(this,null,function*(){try{yield Vi(e).signInWithEmailAndPassword(n,i)}catch(h){console.error(h),l()}});return c.jsxs(c.Fragment,{children:[c.jsx(v.Box,{sx:{minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:c.jsxs(DR,{sx:{width:300,mx:"auto",py:3,px:2,display:"flex",flexDirection:"column",justifyContent:"center",gap:2,borderRadius:"sm",boxShadow:"md"},variant:"outlined",children:[c.jsxs("div",{children:[c.jsx(du,{level:"h4",component:"h1",children:c.jsx("b",{children:"Sign in"})}),c.jsx(du,{level:"body-sm",children:"Use your account in the Fans United platform."})]}),c.jsxs(fu,{children:[c.jsx(hu,{children:"Email"}),c.jsx(Ga,{name:"email",type:"email",onChange:u})]}),c.jsxs(fu,{children:[c.jsx(hu,{children:"Password"}),c.jsx(Ga,{name:"password",type:"password",onChange:d})]}),c.jsx(ni,{sx:{mt:1},onClick:f,children:"Log in"})]})}),c.jsx(nt,{showToast:a,message:t,color:"danger",hideToast:l})]})};function JR(e){return at("MuiCheckbox",e)}const li=Ze("MuiCheckbox",["root","checkbox","action","input","label","checked","disabled","focusVisible","indeterminate","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid"]),XR=cc(c.jsx("path",{d:"M9 16.17 5.53 12.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L9 16.17z"}),"Check"),ZR=cc(c.jsx("path",{d:"M19 13H5c-.55 0-1-.45-1-1s.45-1 1-1h14c.55 0 1 .45 1 1s-.45 1-1 1z"}),"HorizontalRule"),eL=["checked","uncheckedIcon","checkedIcon","label","defaultChecked","disabled","disableIcon","overlay","id","indeterminate","indeterminateIcon","name","onBlur","onChange","onFocus","onFocusVisible","readOnly","required","value","color","variant","size","component","slots","slotProps"],tL=e=>{const{checked:t,disabled:n,disableIcon:r,focusVisible:i,color:o,variant:a,size:s,indeterminate:l}=e,u={root:["root",t&&"checked",n&&"disabled",i&&"focusVisible",a&&`variant${ye(a)}`,o&&`color${ye(o)}`,s&&`size${ye(s)}`],checkbox:["checkbox",t&&"checked",l&&"indeterminate",n&&"disabled"],action:["action",t&&"checked",r&&n&&"disabled",i&&"focusVisible"],input:["input"],label:["label"]};return dt(u,JR,{})},nL=be("span",{name:"JoyCheckbox",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i;return D({"--Icon-fontSize":"var(--Checkbox-size)"},e.size==="sm"&&{"--Checkbox-size":"1rem","& ~ *":{"--FormHelperText-margin":"0 0 0 1.5rem"},fontSize:t.vars.fontSize.sm,gap:"var(--Checkbox-gap, 0.5rem)"},e.size==="md"&&{"--Checkbox-size":"1.25rem","& ~ *":{"--FormHelperText-margin":"0.25rem 0 0 1.875rem"},fontSize:t.vars.fontSize.md,gap:"var(--Checkbox-gap, 0.625rem)"},e.size==="lg"&&{"--Checkbox-size":"1.5rem","& ~ *":{"--FormHelperText-margin":"0.375rem 0 0 2.25rem"},fontSize:t.vars.fontSize.lg,gap:"var(--Checkbox-gap, 0.75rem)"},{position:e.overlay?"initial":"relative",display:"inline-flex",fontFamily:t.vars.fontFamily.body,lineHeight:"var(--Checkbox-size)",color:t.vars.palette.text.primary,[`&.${li.disabled}`]:{color:(n=t.variants.plainDisabled)==null||(n=n[e.color])==null?void 0:n.color}},e.disableIcon&&{color:(r=t.variants[e.variant])==null||(r=r[e.color])==null?void 0:r.color,[`&.${li.disabled}`]:{color:(i=t.variants[`${e.variant}Disabled`])==null||(i=i[e.color])==null?void 0:i.color}})}),rL=be("span",{name:"JoyCheckbox",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const s=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[D({"--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,boxSizing:"border-box",borderRadius:`min(${e.vars.radius.sm}, 0.25rem)`,width:"var(--Checkbox-size)",height:"var(--Checkbox-size)",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0},t.disableIcon&&{display:"contents"},{[`&.${li.checked}, &.${li.indeterminate}`]:{"--Icon-color":"currentColor"}}),...t.disableIcon?[]:[D({},s,{backgroundColor:(r=s==null?void 0:s.backgroundColor)!=null?r:e.vars.palette.background.surface}),{"&:hover":{"@media (hover: hover)":(i=e.variants[`${t.variant}Hover`])==null?void 0:i[t.color]}},{"&:active":(o=e.variants[`${t.variant}Active`])==null?void 0:o[t.color]},{[`&.${li.disabled}`]:(a=e.variants[`${t.variant}Disabled`])==null?void 0:a[t.color]}]]}),iL=be("span",{name:"JoyCheckbox",slot:"Action",overridesResolver:(e,t)=>t.action})(({theme:e,ownerState:t})=>{var n,r,i,o;return[{borderRadius:`var(--Checkbox-actionRadius, ${t.overlay?"var(--unstable_actionRadius, inherit)":"inherit"})`,textAlign:"left",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))",bottom:"calc(-1 * var(--variant-borderWidth, 0px))",right:"calc(-1 * var(--variant-borderWidth, 0px))",zIndex:1,[e.focus.selector]:e.focus.default},...t.disableIcon?[(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color]},{"&:active":(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color]},{[`&.${li.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]}]:[]]}),oL=be("input",{name:"JoyCheckbox",slot:"Input",overridesResolver:(e,t)=>t.input})(()=>({margin:0,opacity:0,position:"absolute",width:"100%",height:"100%",cursor:"pointer"})),aL=be("label",{name:"JoyCheckbox",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>D({flex:1,minWidth:0},e.disableIcon&&{zIndex:1,pointerEvents:"none"})),sL=c.jsx(XR,{}),lL=c.jsx(ZR,{}),cL=G.forwardRef(function(t,n){var r,i,o,a,s;const l=ft({props:t,name:"JoyCheckbox"}),{checked:u,uncheckedIcon:d,checkedIcon:f=sL,label:h,defaultChecked:p,disabled:m,disableIcon:g=!1,overlay:b,id:w,indeterminate:S=!1,indeterminateIcon:C=lL,name:I,onBlur:y,onChange:A,onFocus:E,onFocusVisible:k,readOnly:F,required:Y,value:O,color:T,variant:N,size:V="md",component:j,slots:$={},slotProps:M={}}=l,H=Ae(l,eL),Q=G.useContext(Wa),te=(r=(i=t.disabled)!=null?i:Q==null?void 0:Q.disabled)!=null?r:m,R=(o=(a=t.size)!=null?a:Q==null?void 0:Q.size)!=null?o:V,L=Hi(w!=null?w:Q==null?void 0:Q.htmlFor),U={checked:u,defaultChecked:p,disabled:te,onBlur:y,onChange:A,onFocus:E,onFocusVisible:k},{getInputProps:W,checked:re,disabled:se,focusVisible:ae}=FS(U),X=re||S,he=X?N||"solid":N||"outlined",Se=t.color||(Q!=null&&Q.error?"danger":(s=Q==null?void 0:Q.color)!=null?s:T),ct=D({},l,{checked:re,disabled:se,disableIcon:g,overlay:b,focusVisible:ae,color:X?Se||"primary":Se||"neutral",variant:he,size:R}),_t=tL(ct),de=D({},H,{component:j,slots:$,slotProps:M}),[pe,xe]=Ie("root",{ref:n,className:_t.root,elementType:nL,externalForwardedProps:de,ownerState:ct}),[Te,We]=Ie("checkbox",{className:_t.checkbox,elementType:rL,externalForwardedProps:de,ownerState:ct}),[Pe,Ee]=Ie("action",{className:_t.action,elementType:iL,externalForwardedProps:de,ownerState:ct}),[It,St]=Ie("input",{additionalProps:D({id:L,name:I,value:O,readOnly:F,role:void 0,required:Y!=null?Y:Q==null?void 0:Q.required,"aria-describedby":Q==null?void 0:Q["aria-describedby"]},S&&{"aria-checked":"mixed"}),className:_t.input,elementType:oL,externalForwardedProps:de,getSlotProps:W,ownerState:ct}),[jt,Lt]=Ie("label",{additionalProps:{htmlFor:L},className:_t.label,elementType:aL,externalForwardedProps:de,ownerState:ct});let Qt=d;return g?Qt=null:S?Qt=C:re&&(Qt=f),c.jsxs(pe,D({},xe,{children:[c.jsxs(Te,D({},We,{children:[c.jsx(Pe,D({},Ee,{children:c.jsx(It,D({},St))})),Qt]})),h&&c.jsx(uu.Provider,{value:!0,children:c.jsx(jt,D({},Lt,{children:h}))})]}))}),uL=Ve(c.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),Ar=({label:e,values:t,allValues:n,valuesMap:r,showAll:i,showAllLabel:o,onChange:a,toggleShowAll:s})=>{const l=(u,d)=>{u.persist();let f=[...t];if(u.target.checked){f.push(d),a(f);return}f=t.filter(h=>h!==d),a(f)};return c.jsxs(v.Box,{sx:{mb:2},children:[c.jsx(v.Typography,{level:"body-sm",mb:1,children:e}),c.jsxs(H1,{orientation:"horizontal",wrap:!0,sx:{columnGap:"12px","--List-gap":"8px","--ListItem-radius":"20px","--ListItem-minHeight":"32px","--ListItem-gap":"4px"},children:[n.map(u=>c.jsxs(zh,{children:[t.includes(u)&&c.jsx(uL,{fontSize:"medium",color:"primary",sx:{ml:-.5,zIndex:2,pointerEvents:"none"}}),c.jsx(cL,{checked:t.includes(u),variant:t.includes(u)?"soft":"outlined",overlay:!0,disableIcon:!0,label:r[u]||"N/A",onChange:d=>l(d,u),slotProps:{action:({checked:d})=>({sx:d?{border:"1px solid",borderColor:"primary.500"}:{backgroundColor:"#fff"}})}})]},`checkbox-value-${e}-${u}`)),i===!1?c.jsx(zh,{children:c.jsx(v.Link,{onClick:s,children:o})}):c.jsx(c.Fragment,{})]})]})},ci={popular:["FT_1X2","BOTH_TEAMS_SCORE","DOUBLE_CHANCE","CORRECT_SCORE","OVER_CORNERS_9_5"],playerRelated:["PLAYER_YELLOW_CARD","PLAYER_RED_CARD","PLAYER_SCORE","PLAYER_SCORE_FIRST_GOAL","PLAYER_SCORE_TWICE","PLAYER_SCORE_HATTRICK"],goals:["OVER_GOALS_0_5","OVER_GOALS_1_5","OVER_GOALS_2_5","OVER_GOALS_3_5","OVER_GOALS_4_5","OVER_GOALS_5_5","OVER_GOALS_6_5"],corners:["CORNERS_MATCH","OVER_CORNERS_6_5","OVER_CORNERS_7_5","OVER_CORNERS_8_5","OVER_CORNERS_9_5","OVER_CORNERS_10_5","OVER_CORNERS_11_5","OVER_CORNERS_12_5","OVER_CORNERS_13_5"],correctScores:["CORRECT_SCORE","CORRECT_SCORE_HT","CORRECT_SCORE_ADVANCED"],misc:["FT_1X2","HT_1X2","BOTH_TEAMS_SCORE","DOUBLE_CHANCE","HT_FT","RED_CARD_MATCH","PENALTY_MATCH"]},dL=({labels:e,values:t,valuesMap:n,onChange:r})=>{const[i,o]=x.useState(!1);return c.jsxs(v.FormControl,{sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{color:"primary",children:e.marketSelection}),c.jsx(v.FormHelperText,{sx:{mb:2},children:e.marketSelectionDescription}),c.jsx(Ar,{label:"Popular",values:t,allValues:ci.popular,valuesMap:n,showAll:i,showAllLabel:e.showAll,onChange:r,toggleShowAll:()=>o(!0)}),i?c.jsxs(c.Fragment,{children:[c.jsx(Ar,{label:e.playerRelated,values:t,allValues:ci.playerRelated,valuesMap:n,onChange:r}),c.jsx(Ar,{label:e.goals,values:t,allValues:ci.goals,valuesMap:n,onChange:r}),c.jsx(Ar,{label:e.corners,values:t,allValues:ci.corners,valuesMap:n,onChange:r}),c.jsx(Ar,{label:e.correctScores,values:t,allValues:ci.correctScores,valuesMap:n,onChange:r}),c.jsx(Ar,{label:e.misc,values:t,allValues:ci.misc,valuesMap:n,onChange:r})]}):c.jsx(c.Fragment,{})]})},ze={avatar:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMA+h6XBeOBCz4ozafvc/W9X+nD29ROsWmINjBVRxC4F3uPnhL6/TMAAAygSURBVHja7N0JkqJAEIXhAsEFEEVs9z3vf8eZmI6J3mxFZamq/L8zaC2ZrxKjTzTaLfu9xWweZ7n8FeRFmRwuq+XbZmDgs2gzPR9iuaGYpOl4yO/AQ+G0lwRSUXJ+40fgkXCaxvKgYDIeGXhgvZrLk8rVxsBp63MsLyn7rAPOCvul1GB+Cg2cE20nUpvDNjJwybpXSK2KPsuAM8J+LPULUk6EbjgF0pDD0MB2w0QaNOMnYLfhRL7iJ6DJaCEtOHAWsNO+F0g7Um4EFlpm0pq8T6/IMptEWhVPDewxWAXSthlNAltEu1I6EKyoD9sgOufSkZIrYfeOM+lQj8NgxzaxdKpcG3RonEvHgpNBV8KDWGByNOjENBMrFJwFu7BPxRbB2KBtw1gsknIbaNk4EKskHATaNLBn+f8vpjLcnn0i9skue4NWHOdipYRfwHUa/v//JBwFWzCYibUm9AebtxCLpQYN64nVVgaNGovllgYN2or13gwaM7Ss/ndNTmuoMevOu/9VZGREGrKxpP17T8bToUaMCnFEQV+gAaFV/d/bYt6O1e5YikPmtAVqNrC2AUBboA2RFfHPRywManQR5/QManMSB5EU1VQApij8k7IC4E855YBaHB0qAHwVExWuQWRxAuieiYHvCZDbzgYvmorTtgYvGTl6APwv4yD4koGlTwCqSwgKqz0AUBHUWgGiHlST0JEI0G0F1YBnOdcCpDFYq6V4grGyTwkdvwF+yEiIKd4A2AR0lgApCL5o70wIvIqCkKiCEBjloBqtxTO8FnqMYynw+2YGWk+AnAMfNnA2Bfa7mLag5zFwYuK1OXpTA/wsoymkKAXAVfAFIwcGwTwjIB7mwSRApgheQw2oGqYHVTERbx0M7tqJxxghd5/DL8F4K8YCwBLAAsAS8IqheI4lQO0VgIuA7hoAyRDVRUDKgZWMxH8BjwTUtQFpCqrOAXyXExFXFQQiGlRZ5GESkHSg7igwAWGqwLwRqGojapANU3sH5Cb4q4GKO+C7jO+JeDwQhqExPAflGEgbgGPgg1aiCp+Z/86riTD3xQaasqA/7Qw+S0WZi4HSIsC7jI6Qd2PBGSJOFpBsIDtAVTl7gOodgD1A9R2APeCLyIsvg3APoArEM0GiIHxW9AlK0sDflQYaO8EfeCT2bixKLQ08+zgQnxJ6QqSwDMhFUNNUGC6Ct/VFrZOBohdhzAy7KvJ0NjgdwT/snVlSAlEMRYO2duEADnQVIO2U/e9RLSkZbB7o5zvnbAGqX3Jzc2MJYHq0KoBZEZqBHAm7EOB6wGHOEo3jAKQbTF8Ydidwn8ugg50EOQ+yBrQKjHhJOPTYULQO6EAQlgykK2iHZtGtxlBD8Ibz8apbEGdC/Su8/Nvmfo4rBTp//h1uYPnBkGB43UGOgB0N2/uZG7VHD10FO8YFJUEYbAN2MoQ5DeU5KTsAO4FhHlPIC+O2AHCbONwCZBmIOgzxV66ietqUw4zqlwIsAeD+ELwDhO4PwTtA6NFx6FVAbeI2Afg2QCcQfE8AnAdyCjdROylFonKalCK1O8QVAuF/AL8A8D+ANQC8BrALoHcByPNA6gAbZikFZlE70xR0ejDyRKDJkRveUgrMo3Y0hBS5i9qBHonUEmY0rNGxCgHqQOwLMcd5iPqxDUB7QiPuUsBNAPhSsDWgtlBHQYrBcCFYLRBfAlgE0EsAM2LAZgCVAPgo0IgA+CTom8ZxwCD3QcGMgEHOg4JvAPoF+MS0aGpKpHHR9JxYbUGHGEFUIJOCsOlAWkMtAc2KAqdD6QsqAjsbF40TIWwP6CcA6wRwT5w+CN7mKeWHLoC4IQJKBRhiaVzQmtE4kOgMAu0DDdE6FGSdjFUQhh+N1hoENwL9plUMyBn2AfhiiT8kPYF2ACrC0CGQl2SZuyAuC5PXgcs04PDYafXXAU6hxQ4FHtANwIYW+g2Y+vuvaZB1wLXff7QkSBYA3RThpIGYGqIL1DfAF+A4XcJAugALtDB/2MQWkH1M6jlkl9tEcRuCjo+0CWRvCtF2gTUG7HEZss8iQSxDyNFhyoDwN0AjGPwN8AVgD4SIaQDGR0IjIdWCVIHMjgOeB/WclIFQ/6BHzISdBMO3hNwGgl+SgIUCKwUoAmgL0QpyKn31gRGTPqTAe1aOdvAyy6wceCIMPkCWGQrrhoiZgB/snVFOwzAQRO2QElJFhUAJClUpwve/I0h8tagobVzH3nnvColsz+7sLEoQDUhDgDbAFOo+mGVFJoR2MYgi0BQas9vlO/qA2tYwrGDT2Bs9AjgAxI8ADgDtV0DPAaAtBJAA2tuEqAGIrxGgCKgdF0EkhPhCMdqAF/IRTDE4uIzW1JCI6nJYFsuKL4edw95QW1h3OSxSEAmIPxQnqPg7UH05qHxXkC7gtdQm6oFbmgBXMxq4BPzoQDk8klBI7UtgzQUwi/fCLwFPKOhMPkPRYAPSXiZECWg+VcEO0f7gQHlgnOWA2o1hFGAc6kIzhJ9RgJGoirQG9ISCR+OhwGqAJxH0B+FRoTcHTjg/kDzAuNSF2YMeeQBG5lBUetgLgbDRaQuqCHaYwH4RlQIbBMBN2IUy8FSAj1HLkEQAniBmDsAE/AcpjyAdoJtyFzKHMdBj1P4ACoCnaP0BfP9zaPhDOP/PIPISvHfwD+abw1jAk/GUYVXYkwKRkNfsFkxuyIFLypiZTXDFCFhiqqzGRtcYQJPTDCEbBlLAJmJTDiL/FmKXxVOwo/2/GG0GD4Et9q8FaRa3i39x/X+zdyc5CMNAEEUhuQnc/46sEFMGWyJy1PX+Fept7R7bfXAXdQWAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQADofPelvQrqqd7+BPRUcX8C2qu5PwGtVd2fgLbq7k9AS5X3J2C/2vsTsFf1/QnYrv7+BGyVsD8B62XsT8BaKfsTsFzO/gQslbQ/Ab9l7U/Ad2n7E/BZ3v4EvJe4PwGvMvcn4Fnq/gQc0zT8W+D2bu5H/LtpPuGdqPWuMwLB8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8CD/buRStRKIDC8NaBRBBFzfttxvP+7zi1Wq2mxgxLC87+v1f4d6VwIPv8TMA+PxOwz88E7PMzAfv8TMA+PxOQukfr/I86xieIyW89gT75n3WKvtz0C/IbT6BfBLxhNAHyn1as5YD875uvFDvyn7ePewJr8n9olClW63lADZOtYkT++vKZYkN+6wmsyH+xfKNYrPYBn3BfKQbk/7xplajlyP816aLVE8jI/2Vp2VNLZaOAKxi3cwLkv57B79ZNgPzXNbjbqUXIf32D5UEtQf7bGP5pxQSyScCNDJt/inxL/tM8HiQg/+11jo09PEj+8yI/QrzNAz4W6xHiGfm/17xRR4jJf4nojhCT/4fsG3F+lPyXiuoIMfkvE9kENuT/eZO6EyB/rEZr/YDNfUBTFF2dR/7Inb9HQH4D70+A/Ca+aQIV+RvrG24TVdOAJnt1gZj8jm72dHlC/pa4rxLye0sXybXzpwFtMi575Pd2tceJkgX52+lhAuT3Ni4T8ntLK/Kby7PP5i/JH4eiS35vw1KX2pI/Knlfl9jxTt/YdErVt+LHP0Kjg2pa8N9cojTOVEfyKyBOtf4M9Hitb8SOyYf9ecY/avse/b1Ndjoj4f1e0cvPLYCv/wbynt5zF2BglOi0WYCFQid1BwEeSp3CFwAbnUz/KwNspDu91ecGgJNfeosrAF4yvbYJsJLrlYTnvtxU+tciwEya6EXCESA/C34BeJvqBZ8AHM30bBtgaK5nnAKz1DnoSZeLgJ5K7gJ4m+gJ73x2ddCjfoCpir8A3gruA3pL9aDHdwBfXa4CedtIWgbYWvIRwNteEofBjaVSN8BYj8eBvK25DORtpmOAsZIvAd6WnAbzVmgYYGyvAGc5A/A2ZQDexgzA25ABmGMA5hiAOQZgjgGYYwDmGIA5BmCOAZjjTKg5jQOcifeDeWMA5hiAOT4DmPvb3h2lNAxEYRT+kzo0JtNqoFpQmyCz/z2KFJFa8d2e863hvCRzZ65fAXAOhcL5IwjOAOAMAM4A4AwAzgDgDADOAOAMAM4A4AwAzgDg4lPRaN4Ohus8DmYrjoSxLVmawHY+Fcu2zdrENSeOBZNtkmyasNa4MYJsdHMs25BPL01MY86mJqT7nJ28Hob0ni9DE88h3x6baOopFgBW+1x48lgYpfT5oXd9GMjzNteGyfEwhvKW363HxQZu3uE1f7gbdtO4b1e6WudSylz3JvJ/dfPDcc2FD2jGIfoz6ZkMAAAAAElFTkSuQmCC",team:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMAcN3YbAMJ8lQsGkdh97kVyyLTsT0Q7ayEfDXD6KSLdeSclIjjiMMAAAu4SURBVHja7NjbasJAFIbRbY0S0npA641Cxc77v2OveyElYCY7nbWe4YPZ/wQAAAAAAAAAAAAAAAAAAAAAANCU7bXvVrxI11+3sSDD/Vh4sdt9iGUYHoVJPJaQwGa1K0xk120iucu+MKHzJVIbToVJnQ6R2GFd+K2pAraO/wpuee+A70IFX5HUe6GKz0hp4wCs5JjzEegLlfSRkR+AavaR0FCoJuMU/Cg818AbYAP+4b8vQSdARefIxwis6Bj5vBWqWUc+AnhOAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASCAxgmgcQJonAAaJ4DGCaBxAmicABongJfpZiaAmcXMBDCOAAQgAAEIIPIRgACWKEYSgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABLBEMZIABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQggCWKkQQgAAH8sEvHNAAAAAiA7J/aDJ5ukAEBBBBAAAEEEEAAAQQQQAABBBBAgEcZCSCAAAIIIIAAAggggAACCCCAAAIIIIAAjzISQAABBBBAAAEEEEAAAQQQQAABBBBAAAEeZSSAAAIIIIAAAggggAACCCCAAAIIIIAAAjzKSAABBBBAAAEEEEAAAQQQQAABBBBAAAEEeJSRAAIIIIAAAggggAACCCCAAAIIIIAAAgjwKCMBBBBAAAEEEEAAAQQQQAABBBBAAAEEEOBRRgIIIIAAAggggAACCCCAAAIIIIAAAgggwKOMBBBAAAEEEEAAAQQQQAABBBBAAAEEEECARxkJIIAAAggggAACCCCAAAIIIIAAAggggACPMhJAAAEEEEAAAQQQQAABBBBAAAEEEEAAAR5lJIAAAggggAACCCCAAAIIIIAAAggggAACPMpIgLJLxzQAAAAIgOyf2gyebpABAQQQQAABBBBAAAEEEEAAAQQQQAABBHiUkQACCCCAAAIIIIAAAggggAACCCCAAAII8CgjAQQQQAABBBBAAAEEEEAAAQQQQAABBBDgUUYClF07y2kgiKEoehVIAGUgE5CkRYC8/e+RNZR/7NfyWULrSl1lVwfQAXQAHUAH0AF0AB1AB9ABdAAdQAcQt+wAxswtgNV8AniSJcYUCeBIPUdZIte7QvbUs5clch0UMlHPJEvkuilkRz07WSLXWiEn6vmSJXJtFPJNPX+yRK6rQh7Uc5Elcj0UcqWeH1kiIP/k9Ew9G1ki10Ihr9SzliUC0lcBOlPPmywxosxHO1DPhywxqsR/c0VBL3JEqrtCPqnIcxtEqmk+uyA4yRGZltv5DALhLkdkuinmQkWegwCGFRiebajoLEeMS58D6kZFnvdAEq22c7oFwq8MMS59eLqgJssnIYzKXwX+k3cvOgnEUBBAx0ddXbMqJkAUMJj5/38UwsMA4rZsdjtTzieIudveO20l4yC2A2Ekyz4JkhwGrz3SEFLlHwTwGZpqGkK67I2TV4ia0w+yCcvC1oCeuVCkUeibaDaCXVNhSCSQolXMg2180g9yGTe80BNUBcNIANIIjE4mAbIMJ8JIohCfmELXDe0gnsYSUHgJYBkMRTSVYqkYCDWeByGPEVlcF8DzgCCiCP2hFI8FOp8OQRZ1w9IGAfuIgxlk8cVLVcKbQMuNICKpFADlTaBlMhQJsidBRI+FWgcDEUljC8BGNA7o+w1ABgsW+wXwiwUhnsLMTP0L4LcPQIrsF+pV8l8AYEEriKJSI7+hz6wXhKE9LLlS0M0gx4LXteGIpRCe154D7HzQCeJoDExVDwQ4p8MxrDBjBzUsWLUCEEGlU6rfBDBcBmJQdUWy0EGg6TIQ7VTOzyq+E+N/PgCtVD4A0mHAQ2OjbiAGNKrYQTWGDaNkGFrI7ADEs2C26WC00GmQSKeBfS8LQQuFkwDS14K47wQxlNclycLHAI6PyGEg4YVb5TwUV0QuBP/S2RrrJ0FMm0E4T+mb+C6eBveNB2MQowm3iroctoQSgCE8vLGbW7sCYFMCcJ5QTM6vANiUAJyj0wHyLAAuJQBnSO2IHAuASwlA754adnRnWQBMegHo22hOXlkPYCc4PCOFno3f+aukJ6JKmQjglFIH2CkJ5jkURK/ClJ29wJdBLgB/y38RgMHFoEVEg3BCqQFgFgQ6VctfHose3bO7SvZxgEICwjgm1gm7gbdwR204pNYG8RsDu20Fsaf4+7sFwQyfEcGe4j++7uMgxawDsaH5+7uvADfuqQy9eG64cqVTwGNhRmHYEvz+c2a/AjToB2JN8/dvrHuAP+zd62KiMBAF4CkWUBTFG6JSLz3v/45bbbu77noBm8AknO8F/EFMJpPJxJWmMfJN2f7/w158ESq+JiJnGmOezJMF4GSg9764iOic7vxZAHRnhOWTgpcAnG0HUUWotjJAjAqPMGTs0QJwkuTQSUyK5jAkd6QjnPsVomLQZItPnS4Du+UdKok50x7OOl8Fcl2ks0ZYjNmUAHeAd0xVngqJKf0UpsROtQNyPAzQlv7xNAD4tIM+YkT4DnMK8ZXGbICYsBwDYAbgsYm+x6XFgOkM5gQONQStb6PuUEB+bpHjA48A3GwaoCv8c/cmsLOBoKrwz+cA8Fuo7D0RPdnfk5XHAaDSjKD8yOYAkzIH3oVU0TJDywAYpTDp4N0RoANbAXledIRRsecbAJ05YXnaNMMJM8Ct75zaGQDDHL/xFoi7m0F5TljghBvAJ4Vq3hiXpyRjXOP5u+AiHp4LyTOGJQybdyABcClScllExfSPbScSAJcmOhJCUluyhWkzr08Ab0lU9BKWuvo5TAs6kgBSmRKUeqJ3GHfwtATwsYGC2yJSy6AH48rOfn+RQfuFwlJDuId5eWcSwNdsWh8BUt10iw/8/kYtYrRLKhvFMC/eSMe1PQKkoskcJ/z+vo2Aeps/fn8Rz0aAVDF5wxm//5lXkaBU0C/xB+O/M2/yAfLQZAUrSn7/3wYl2tLS6g8c+P3/Mg3QErkvmcOOoMP5v2uSHtoh94SvMeyYdfT8R9/psNwxyGBJ5kUbcLOWW7RBbop2sGXcwfoPwz3W7A+AYYCreAHsXwq7LP58ACQrWPPO739LgcbdOPdNYc1aSFH7ALli2MP/eP/jAXXN1qppdvZH2qH7Xwr6rTwxAKJ1CntKHv88NAjQJLnUD2BRj+m/CiYZGnQ5+Mawacv0j76EgPwxOcKqFdM/FYU7NEa+RfsYVu24/dfYQOD+4s/tX1uGMZohZ4sMdsXc/tU0OKAR59+aw7KA1R+1JRmaIJIccRPD/xZFb2jAskhh25Hhn94nZ3M8xCdgW9OP4TyGfw7lhb8w/NNjqaWZ1JPGnWz+IuJmVtC8guGfgyUCxsTev/5wCwOBkx6Xf0OWyh6Z4OGfCa0357HsRcighYaWcjWUC6EbtLRntmnM5P9tahq027Pm7u8BJT267Thw+rdk4sQyMOf0b034oj4plL4KWTTQ0WT+phmTP3UpaNcNVv66ZKjvDfovAaO/RizVvDh16Y1Hv0/S8GrHj5U8+mtQou54aMXNX7NGqsoFY977qcTXw4E5u/5V4eskkPPvX5mPkcCKf/9aPNsOMPi3xt5TDtz7+2QYoDUBb/0oEO3Qkh3LPnXYZGhBxoM/NcKXGA2LX3nwp0myQqPeuPfT5n4wyODPf9E6RSNSFv0qNZ2jAXP2e9XL/jrQ4+yvmuV1IN5z9tcuecMFxv6dY6vtZ8Zm/44IRyWMO4w4+7sjKlIYlRbM+7tlugJY9NFp5kKBjBc+nBSOSi7+3WYgFEjXXPxd9tOswJGLv+sGYzxtzJoPHwxneMqMaX9PhKMDagsY+3kk2ueoJX9h7OeXZRGjsnjNcn//THYpKokLXvX206SI+fm7bbnOcVfOyd9z0b7ETQeGfh0QjQJc1ePGryPCfob/bPv8/B2yWOHCiuVeXTMtZvgyK1jq30nLRf/1tb9g3P+rPTgkAAAAABD0/7U3DAAAAAAAAAAAAAAAAAAAAAAAALATZ09HWAi+hXYAAAAASUVORK5CYII=",competition:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACjCAYAAABotuf8AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALiQAAC4kBN8nLrQAAEnpJREFUeJztXQmQXFUVpaBCzCIIghAooCBRIZDp7r93/+5Ze++GYrNEooALUux7sYmAqIAUQgWpArRKBBHKsMgiawhhEWIpi4AssoY9rAGUBEgGz+2ewDDTPfPf//3+7f79TtUtqMnMe/+de9599/3/lnXWUVBQUFBQUFBQUFBQUFBghe7k5unJ/FlWurzMSBVXGcnCMOxTZQ1tGBx9DK6W4/8vBG+D3P5rSxipQtl0S4/Ymepqp3fnT5V5N+IMAnuWOITApnH7sm3Qo/dtBWJWcDuo04041JxchdufgaHZ2el6srCfZudOQbS5xM5UrvFjIORlbqdExcDna4hg1/r0w58S1tBpdZ9mNwxdUAkrux7G953NVGkhGvGula6sxn/ZSVUW3ODLYfIpAsWt8PE+8PX6oQmLwi0e4G1uEpTJNQjsE93JHxWWqBIImyu5G60sNHF9DJ+XpIoK4+80zDx+xd1YZeEahsSb4+bgTGnCQpI+23LLz3E3VFm4RjkXhsSYNGHpyXwKSd0n3A1VFrawKmswU5T3GgMhcX/uRirjMfj+TGnCQo51DHcDlfEYfL9AmrB6jP4TuRuojMfg+wulCQuqPYO7gcp4LGFlr5YmLCtduZG7gcp4DL5/UZqwTLd8G3cDlfEYfL9cmrAwM1js56HsTHUVbGUzc3qra7iJi5CtmYTvVfQ7ouXC929LE5aZKi0SfqBkYdhKlx0ovqnpyfxF6iN2cCMOzVRx4UR8079BJA+Ilg3fvyVNWJZbul30gdAQsm0mFa1buoPbMZ1uxCE66XYT+hC+QL70kI+y32idksY/1K1+Gqw7hZ7JyrYzlQ00J38BGv0yhsaxPRHhu6o+fPfWhrIPxv4cnC3Xk8U/O+BwMp7JFyjjcdG64fvXWqOiBoBqr/BDSI/eZ3gpn9b+xIyBr2P4/IFmZ09O2NlTIbZjEbrzqPsqfsfyGni5xEgVMnqycEyNGzt3On52UMIeioG7GV44Jl+gEz8lWjeGwgeDqWcCwOm+XpBuPy+ZClp33Bz8KbdjuS1uDZ0UlEfyBaLPM6J1w/cXBa27KdBLjvJDiOZkvxO07rg51PVv/RGhjgvKI/kCEest0brh+3OD1t0U9BHaz+wNofskO11eN0jdGBqP43Yst+lIC4L6sOaLTEV4hQp8f3LQupsC+Y6vZTO00QKkfCVI3bqTO5bbsdwGDo8J6kPyhSMYHGrLZpx8NWjdTQHV7oQZyLs+1H7HvERm0lcOEwGh+Hhux3JbK4ZC8oVovfRiFX/nBK27KZDAbQHF3yv6YJZbfgeKTwepO4HEldux3Ibk/cQgHMIHU034QlxYlWWYPE34fiwQMK3dGMK6xofikWflfxikbkyzz+d2LLchYp0RhMMevc/ykyNjlHoCHXuzIHVPCs3J+UqijWTht0HqxRT5L9yO5TY4+NogHEIcZ/kStJO7Pki9nhA3B4Z8kvIIprqb+q0XY/wtXutCr/yQti1xC6HVZqaKN/nlj7hHSvIvP/XC5/v7rdczoPqvYTgUPrgD4/R7mNlpfupEtJuOOpd6dgB+F9PqF7iF0GpD57rLSOan++EQUUcjH4jWiYCwBj7f1k+dwkAS6Gv5DIT1Bz/17Rh3t0QDn/ZcT7JwPm0R5xZCq40+xczTej19Hhvns2T+ND91mqnSY37q8wXKszDUDAs/pFt6GxOArUXrw2xoLkhd7l1Y+aPxjGdyC0GCsF7X7OzuovwR5+D+bj91IkpeJlqfb6Bxup2uvO/nQeH0wy23NEWkPtrPCFI/8loHkZ+wsidwC6H1wqrSYXTCZykQ5/hbX/4Cl/Lzq7VAMjfDdMv3+3lQzO5eQUMzIvXRpwyv02T6vbg5OBs9zdd3zba22kK+klA6QUdNEed+6oOPP4Kv5b5mGAv0nAX+CKoOm27xAiNV8Hw8DoY1z8t1MPNZiQR3Csg8jF0IEgxD2j2efQSO0YnnE+d+6kKuers/dQQAKt0dCfUqPw9Mh4Ohwdt7rQvR53XPwkqXX6C/QR2HcItAhqF973j3UX57/P6D/nxU/QQ+/p4PaQQDpqD0Fv7SAD3vaTR80jAbM/rn0GFgAuXWXiKCmAO5RSDDaNKUMAcnnRliBr4ZuLghgIAfJB+3QitCQERYF7nPbqJfykcbItE5k9WDxu0hQPpqlHk6/Z1m58rIR9iFIMOQN034zdDJVKZAVOc2WsbszWqf4I4hH7dKL0KIG5TElzy/BhgnhHRlZcwc6G1WPs0ekSf8TEBYKyD279PfxoyBPtohxC0CGYY2TviJJWFnDXDheRY91uDT1zEBCv8M0tFAYn0UlO2zZ9TyrQ8ggEMblR23BrdFI+/yWhZ9LAUhtXOcSLAQZSSP9sYwRS9Kt2jEmZ4szgcPrwUpX3PyR8rUjCfUX76VPTu/iSDeQqI4f2zZCMcuSPR81ilEuBhDYe2TBwQGYRUjKSx0xvfRoe3xfBVIVE8EFO2biHjCL7GlwHSL+wU9+B+EfBAzBg/E8Dd1bbkg6jCRHM5MFT87EQX51T4ok10EsgzcHLy2rcQZOtKuxGEwwVbXoDPyR6u1wMPQDPHi4IRV10CkV6G8OVQuyrxO5O/xd4evfSaI7Ehu58s0DPOXUzvj5sBMiGxBK1ZzQJhLyZdcOmoIPNA3EaKFly036DXD1ECIam/890nvpJQ/pP2Ha5+H9iNyO1+m0ZBnuWVE5fLN4P2/gXlPV+hs9305NdQURqr085FDJwITNzK0iry/uhfJ/mfLZzE0RH0pM7hp3b1D5Dt0zPa8hwcheSYe7iIOolHveWsTdwJ68u/bwPkdYXSKkO7k5R233Qogt+nhOEeL7n8Z/RxqKbM3oyEV+ZrJJBcxYBja1PK5rMYnObR8dqvRz4BeGLmFfhJ4e19P5nfh0okvIILsgajxfBgEIb/6wjGGCSvbg4RW+ESVbjL45iPyEbgL7xKmVgHj9gB6xZsyCaJZJKLTJaPr3THu9ocl6k602gtpJ19mkkVw4OHXQ68oIXq0ZKbYRFgfjv0khDoPws8DT8GjaOQLdMTDyDdcumgZ0JDdEEH+I6f3lR9O2ENzRtenOflf0HkD3E5sN6OcinwB67zhrxlGFvTf6WcTxkQ2dhgkYFZ6PbcT28nqL51LS/1sZOkIJOzBjSGEK2l1YqsIM5L5cR+v0TOFDxaLsoHzKzQ7O6eRTyIDDFHTMFTNR/R6Nbiwatuhdhhdvu7kpiNiRW4XtB9DmvA68s3TiXMuf4cOJNybGqnCwiAfT9ETb7PT5amjy+3R+9LcDuW2+krawkJ0ukkPFY4kNCc3E7YLSBBO7GmbF4gb99EU0fBgbsdyGi3yQ4c7WrNz7f2JJgwg6myAsP2iCIEYSl8ZW07cGtzIdIu+N3h0uhGHGAkCHyQcGcTNQcsW2IlD67YstzTuWKSENdQDwXVt4o5capiOMufwYdtBs4doQ8ZNgj3zyYSdHffh1Ki/GO3q91fgZpHmZMPdvdyOSNQP/HhDhDzkEH9sVJaZKl7G7Vhuo8NT0On2DNuPbQeI5HdixFVXNzrBV0/mDSSuwjcuRNEQte7g8GXbgN4E05JiEdJMt/wohDVrbFkQ6An03ZDbqe1gdDKP1i47bThgpArCB3doTu74RmXR1i9uh7aT6U7uR2H7s20AMfxNhCz8/rJG5dBOFUQ+9bZ9lCGC300bfsP2KTswg6uKfDOkg94QrY4eW07M6F8PQ+MB3I5sNyNu0RGP4PAtGzAEzrDSYhdfgqT75unjt5WjV85C71SrGRqJK11Zgk7n+6TqjoOeLGTqd0F77n1rmr34M1PFvZGsRnIrfQuE9W7CGuyOXEuzh6ZAJOeJEISItERP5jcZWxYi2Pr4N+GbMrrJEOkfwAxR6MzXjkTCHtKQaHs+uIKuQNOcbMP12RgG59K1tdzOa2erHdQGzsP2c+igE/e8nolJCaiRLJ7XqBwnU5mGIfVObsd1gtH9R8i1Ng/b16EBSftckdsRLLd8HwgZd1apVt+ksVvQE266xcD5CojrWxw+DwXIrQRu8Kp+2uxIHfx8W9MtL+F2WCcZnRcbtr9DQT0fKnvOh5A7rUbS2fA8eAh0P7ULR8woF01YQzs04rOjgSFNaElLfaNE4fhGt1jg599AD/R8G5iy+isbzcmdyuB6uTBT4is7EeH+DTL0RuUhApq0TZzbYZ1kyHEfDdvv0uFHWCPiWtaj9321UZkg6tv+j5zuPkNu+kjYfpcODIU/9rcjp3Y2w5X4+y3HlonZ4fT6eVzdvWrUk4F73cmdxOF7qcDQtYXp84bPkUNXz9YaHA6Gn8+DCV+A3m2G5P0xJO8Nj/DueCDh3qj+mkA8wpC4MJzejzLGrXWfp/V+GT9/jNt57WrEuZkqRXuPIaJLDA290RE4X/Rzqw7b6cqDKGOXmNH/hYMtUOaudqaixPVFG0aO+lyN81Sp80+XmQwY0rZGYx/ySxidzozZ4qWa/cXdKCjTQEKvVpKOGKL4I+Da4vIzC+Lm4MZ+r5Nda+iN7xnJwkUoa08kppuOlDuT8glup3IbcYvOF+f2MwsQXWIj9+n5PtqIci8Mj8tB5N9R3i2IWjchokk9RbDNjc7Jf4a41exc9Ie/ZoCwtqHe5fVqXmXNjTgEn0thDV8qdyWQCyygD8/czulkIw57jP7uWYrsBQlraBNErgsRxgNfm9JtNrIs5krikNuPbYkeva92GK7pltVnGs+iqn5ipkqHgrupkzPc5YiZA3Mhrsf93r7eHUbnipZfSljZLF3Vy+2zjgEiVwLEXauO1W4oqo+IG93JN732WGEC6Mn8hkaysBfyB89bxaJutFTISBWOIG64/dPxMN3iTiB0cZeffUVD32LDLQ5y+yNSQOSaqtnZXTADeq7bBIY2v4YZ3wHEAbcfIgsMAdvQwWvdsPt55J6guxvtVFKQANrZGzcHdSOZvwzDQ+ReTdB5rMijbsDseKgrdjG3IxDBXCtdWuS04LJtdkMb6JMM2pTl5lVhnfrpNWaqOB85yKJO3BZGQ56eLPyj1oZUYSNuPhXGAI6Zgt4eR15yvuWWl7X1h+36B+MV9KwGfW3As3Pzp+ABCWvwS/P0XldzcjfTKsp2iGQ0m7XSlZc0J38z8qfv0jNy86TgE3FzYErM6N8GM6u9gtzb0wJRfYzo9JMeo38OPRM3LwotBGZbK/iEVXnXdEsONwcKEgDnBr7KLoCwXoWw1AK8KAIJ8m1cwjJTpdswDG7FzYGCBCBinMd1phbyq19j9jeDmwMFCdCT+V4I61kGYQ33GH0x7vYrSIKdLk9B1Do1zNkh1UVHLtlqMV60UTtDIu3vDAk/ZqXLj9GRS9ztVggBiCCz4PCHnV65kYvqQF1qlWc3QbOzW5hu8RQZyTyVabml6xKoA0PgutxtVQgZmKk5EMEqCcJaaaaK3XWPjcLnwFBlYziUcMdh9UOUfRh3+xSYQMISudNHJGKh7MO526fABLM+FEoRlhoKuxi6k3eRXLd8ZkhlouxjudunwAQ4v2inW79Oi8pE2b/kbp8CE0y3dEjrE/e6Ice6irt9CkxI2NnjZQnLSBZu4W6fAhOMlMilUWKGaBi9WyAUvMFyy9fJEhbyrPe426fAALqEG1FlqcQca01XXfStUEfM6E8hqjwjS1hkVAd3OxVChpEsHij77C2qg7udCiFDTxZ+QzuQZQqL6oibg2o5cjfBTJXukSkqMqojZg5sx91WhRCBxF3CqoYxwkIdmp1zuduqEBLi5sB+skU1ajg8lbu9CiFAd/JT4OyrwxIWotZfUafKs6KOhJ2dbWcqL4YlLKoLdea5260gGUaysGeYZ5iO3A67gLvdCh5hpArT49bQ5pjOz/JqCWtoFoR1cViiGjUcPkp1izwrGdr4FW6euwa6k9sIOdK5iAL3IRo8KWhPwf4XtrBqN8PW6xZ6XgjyAbT1crR5NjfvkQXtJAbRVcstvxC+MHjNSpffQNsPVLupJUBzci4Ifp7byVw2cl2xeifWakBUoedG7WbEAbcfIgU6zAM51RJux3IbcQAupnH7IzIwksXNnEz1cW7Hshs4ABc93P6IDIxkQQnrM2EVlLBaBSUsJSwpUMJSwpICJSwlLClQwlLCkgIlLCUsKVDCUsKSAiUsJSwpUMJSwpICJSwlLCmoCatXCYs4UMJqIZxMZWoY+wDb3WocZCobcPsjUkBPPRs9lt25nEYccPshctCcbMZ0S69wO5fLrHTlfeKA2w+RRMwY6LPS5Te5ncwgqvfQ9n25+Y80NCcXN1KFc3Qnf0/CHvpnlI3aSG2lNnPzrqCgoKCgoKCg0D74PybY2tE87U6rAAAAAElFTkSuQmCC",bin:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAA8klEQVR4nOWUvQ3CMBCFX5MGloAJwgQwAUwAYoAwATSUMAGZACYgA/CzQSaAjgGgQTIyegU6WfbZioQET3Lxonf+4uR8wL9oCcCItUrZyDS0vgewqhnK306nnDW2NqiK4WEEYMSavSZcMlx8PJNHl35Gv9EAFo4uMQHAmn6uAUwY3kYAdvRjDWDA8CkCcKbvawBdhi8RgCt9RwPIADy5MgXAlQ9KvpHxAFwnDkp+U+MBuP5ZULIrjAfg6rqgZF8bD8B1b4IqWFTSHx2Ag+fmNzpbqoTZhV7EdKwTpi/aAB4R8/8OoIVITQHcFJvbjO2kH9UL+0+m+SiE/A0AAAAASUVORK5CYII=",checkMark:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAE10lEQVR4nO2ZXVBUdRjGdzS78BLqSmqyIKducjKZuvKqNMMpMgQW17IENEIFEWhVViYEJlm+dmG/JAFFZFcQ+QqlRKAQiNUWli/5EJYFgd0FUWI/gJ7mv+ZkAp497GG3Znhmzv3vec/7f//veQ6LtaIVrchuySFfLbY0vpc528DNtDQUCi31bemm+vE0Y50lZbrWkmysGedP31AnTVUXJk1d5yZOVr/LA28Vy9n6AU0vSeaaEiUzTVrRbCMyZxogtNyEwFyPdNMvSDXWIcVYi+TpGiT9cQOnp6rx/cPrSHz4E+Inrw3GTV5N4Okr3BwOnoVbL8rmlBLJbJNZMtsEuvAJD6pwavIa4u5fxXfjleaTExUi3oOSFxwCL8MttnROaZDO/Qa74ScqETvxI06OV4CnL9MfHyv1WzZwCZrXnIFSJvtTCcbhDWU4oS/FcV0JuKNXxEGQrGEafu0ZKCuWG/7Y2BV8O1aMqJGict5QyVomK+8w+OjRy8QAjg4rqnhq+fN2G3BE2xx7Gv7eJUQMKxA+JBfZCX87wGnww3KEDRXgkDbfd0nwOWh0lc0pdc6EP6y9iNDBC4bwoTz6I5bMeWfDHxzMR6gmDyH95zNowUuhcmPkkmIA/puB8/h6INcc1Jvzss0GrOuBg+CPaC/CuywWIT25i8Cfw4H+XAT3ZSfYBM8DVolnmgYdAR+uLcDGU/5wYb+D9Yc+QHB71oLw++/mILD3rNYH8tWUBshW6ajKvxXnB9fdm60GXPw3wT1s24LwQX3ZxAC+6pV5UhqwrsSOgud4zjOwOHwW9vbKoikNZFhuFi1728SzH8Fz/jHwysH3sU8tXRT+y54z+KJbpqA0ILDUq22BjxkpAefn04jVly+t8k8YeDVsKwLbnw2/t1uGPXekLdQGTL8aKOGHi7EheocV4O14NmJ0pfQr//ezPmwrZeUJ/Od3pNjTJdFRGkg31pmp2uZN7if/gtgUH4ATo8X0Ks/xxGsRHyKwXWYrPHZ3ik2UBlKna81UPf/GUwYevwnuSNGywXO6xAjoEFEbSDHWGKgOLHewEBuivOZBbYzzQ+TwJRvaZhv2tUnpwXeKwG4XUreQNT2wYdpEaRR4fQETpNoRWgXz8B0Z8GsTUh/ipKnqIltHZUR/ATwiFzbBWNt0PoL3bxdiV5uAeoyS3IbOnD9y9wI8Ij+aB8tk5f3bhfBtE8BHnRZFaYCETnQvqcN9ec80wQT8LnU6vFtTN1MaIIlZwmSVhu4NG9qTC/fI7csGv7M1bcDmNI8kZkvZ50O6s+F+dDvj8J+p07CzNTXeJnjrW9BXuJHEbCkfI/s7z8Ijeof1sefA+j4J35Ji8rnNX8eiIxL32f8lxUjl4a1KFtCCt76F+5UuMfoynbPhP1Xx9V7NSUvLTUlW6VT4lmR4t/B9WPaIZJXOgv/4d76QZa/Id2jUaNFlh8Or+GVbqnnPsZgQCVoj7inKHQhf6tUsYSbcfSwSeZOs0hFts4Wpyi8kklWGavJ1jI/KFv6Y3QfWVoVoc1xJ3Hdg4JyJiUvKW5Us8FHzXViOVrAmex1JzAL7sjW0dxt1moasB7Rv2OUQWbJI6ERyGxJ9kPSA0yU2cLpE5oDOTDO7Q2jwbxOoyD5PVmKyVf4nfrOuaEWs/7/+Atqs1blaLwVcAAAAAElFTkSuQmCC",upload:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC+ElEQVR4nO2aO2gUURSGP8T1AaImIGjUIkIMooj4KgRBbFJZiYVY2agIVj5WsDC9VklIsLNQwS2yhZVmN4KotYVPWERFLBbER1Y0aBy5cAaGZXZm7nhn92bmfnBg2T1n98x/z5z7mAWHw+FwOBwOh8MheDm3WLycmxMgDi/n5gSIw8u5OQHi8BLaPHAJGBAry3uFqYBySGy5SAJsCIldXyQBBkJiNxb9FricUdK3gDu2CTAvImTdBN8Ca4C1wAebBPC6YL+BA4HcDgJ/iiTA1ZD8rhdFgMfA0pD8lgPP8i7AV2AwIsftwM88C3AiQZ7n8yTAJ6ACnAK2JEkSWALU8yDAbdKjFl6fF7MAH4F+/o+jNgrQBI4BR6S8w3wWgMOY4Z1NAlSAdYHv6wNuhPhdwxw3bRCgKaMexqE23+fACoMCnOy1AJW2UW/nYcD3F7ATswz2SoBmxKh3Gn01f2fBMmAlsAnYD5wD7gKtrASoxIx62OjXZf7uJquBM7KrNCbAC40ERiXmC7AZcwzLFrwGvJKRbsnrmnymfHxUz7liSoBRzWSV/3HMsA+Y1ahUVXV7dX7AS2BqM9JtSsAk8DdFk1YxE/IdsXgGy98U/W29JK3NyrokEi/FIUWWlDRLPs4eyYzREdvKf9Lgxfs2HvWDXo/tvZz6+A0vyT0/F8i/lbAn7LFVgNOBXJKWfiMQ00gYM2OjAD+AVZLHNs3zQ58nGnHDtgmglq5pnjNOB+KmNeIu2ibA2UAeNY24qUDclEbcA9sEUJsYnzcdfFpyn6tSr8osMRKIG5H3quLTiGiMr20TQD1d9pnr4JOWuNnDCgGChyTfuyDAt6SO3TJ//u/pLWALM11ogvexmLTTYFUj7gIWM6RxIarUfZ5qxG3Fcuq9WArbxC55gBJ3MarJGdsM2cZEBrPNGIuIUsqnwKkPRGykz9CpUD3JkZjNlTCe8lB0Qco+7C83i44dwD2Ni1fdfjc5ZEj282pLqx6GqI2NspeywlOfKZ9I/gGPNfEFBL9FwQAAAABJRU5ErkJggg==",upArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAz0lEQVR4nO3YywrCMBBG4fOE1oWDC/vsCiq+RAuVQLpzvDVtJvAfCJSki/nIqgWllFJKKaUqtwfuwDU/N5kBAzDlNQI9jSOmFjHmIJrCHF8gBmcvvdvMTYzACTg4Z31LiLnwGPsCER5jPyDCYuwPRDiMLUCEwVgBRHWMFURUw9gKiM0xtiJiM4xtgFgdYxsi5opjaiCKY2oiimEiIBZjuoDfDkdnpjSr2y0Y4h0m/dBwewREeJg0q1uXpedPV1epDrjkGXe1h1FKKaWUUrTVE5bz7NyN3sYLAAAAAElFTkSuQmCC",downArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAgklEQVR4nO2UOwrAIBAF5xKReP+bJFV+TSxynATBQiSI0TXVDggW7htesYKiKIogE7ADRiDLZxzAXPJ4BW7ANcpNyPBZS8nAAJxh4AJshTTNGGsH7R/SFnmztEYuJv0iF5eWyLtJc/Lu0rfddMld4sPJErfs3jTFt9vC6d5UURSFmAePTDtnrV72/QAAAABJRU5ErkJggg==",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAABvUlEQVR4nO2XTUrDQBSAPwXBn7ps0TO4EFfd24obEfQQHqOt4qIewAt4BkFci+610IIW7MpFXQtWxJGRNxBK02k0qTPpfDCUvDbJ+/LezDQQCARmBpWTQe5EfEUFEcdQoSKOoUJFMmIZOAG6wEA+G8CSTxXRyd7F7A+3FhmnRI4lh2egAqwAVaAn8bovIl3JYXsoXpX4ky8iA8mhMBRflfh7miIlYJNsK1IZiu9I/DEtES3RAtrAIunTkBx60k4FkTBzpJaGiJEwvztL3+NnVdKr06hV68by8CYSiUroCfcpo5yBjE62LvcZyGdtgg6wihSBB/muA6xJNcyxbaOaFmqcSLQSLTlGnk5b4s2YCy/giEgpRsJQjrTYHnAAnAJXQD/mnKmLFEe00yialtdOfe76f4mULJWIYlqsL5XQFTmUfWbSa2Qm0kqYQNxqkuSBZCKiLO2UhGiLjmu/rSxEOilJJJH5kF19Pu05Mi30HnQOfMm9r/+wOCgX/v3uAi9y/1dg31cRpBMuI3lcyIuVdyKaOeAIeLPMqXHDCRHDBnCfB5HfEERcQ4XWcgwVKuIYKrcVUZ4PciMSCARmgG9mLvK/OR2iiQAAAABJRU5ErkJggg==",flag:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIUAAACBCAYAAADuS3kqAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAACfRJREFUeJztnXuIXNUdx913shutjfVBqtGFupuZ3Xnd9zz3Ne/dYKEo/isSEGqFSlslSFBi2kStSqkiCEGl1D/ECP4hKLYmTUziZjfRjUl8FzU0pbJLtIlJ1t2N37PZQHBM9t67d845d+b3hS8z9+59nfP73N/5nZnZmcsuI5FIJJJE0pOlpqg+2NwbTbUEQlZLd4/ecnNAbT3vrqDWuqbXbA1GEq0RbaBFSxSbRF8zySOF1b5G1cqtDCl93Xhcq1r530X1gYeMVHlUTxSPYnkqZgydBCDTCP4cfJY9YnkG608pVu44gDiGbXdFtP6N2P4+xcwWw2p/AH/vwHYEi+xC8BoQrOUI1q3wk1jeA39ppIZPm+nhOSuz9uxSjePMmjgeYPlIjeffCGt9vwcoAZyvRXT7SQvCUHAFAjIIGNYjUP/A8gkzPbLk4DsxzjmtJQrjgGNzVBtI4FpaRfdL3QkdvwypPaPFC5uMZGkcmQAgDHMF4cezyMickSxPApLtuL518C8AS6Po/qppYShYjbtwHdL2q3qyfEo0BIsMM3OoXY4iez0AeDvNVLlBdP/VjHC3tQGComLmtgGE06KD7caA42u0YyOK3JVL7hAccAW8DR5d8L6LeAze6kEMpBIq/lvUeGEn7rrvRAd26ZljZE5PFg+j7uhH1nA/pOBgP4E/sXni3R7GQ5gwdbwaIGzAuPwpagVPZgwyGVnjjBYvbsEweLmrDqonKBQru0q18vdjDJ4UHbhqm9UbGBJfQpHc5bijcIArah0KFI8rAMPdyAzHWIoVHTCOnsFM5UHHHVbLUKDwuhLTtQ1Ip/+TIEAiPAsoNjruOIdQ7KlC7DwXIOjQ4vlfYZjYgTQ6I0FwfAnFx7UCRdQY7EIR+SJgmJYgKKJd31AoZu46DTAgSxAMHkBxuZ+hAAjNmHr9AUPFvyUIgmyuLygw1boKReSv8fhxnc0onELxsOPO9RsUmHtfjaxwJ4aJccBwRoKOl9lcoNhbhTjbEoaIFTEzu05Plj63MpQZ6hYKI1VqiZlD3agb/gYYpmiYkBiKrqDeGlIyN1jpYc8/6ME+PBLVB8PICvdgmHgbU8uTEnSuX+0aihVOoQAQIRR5n8HPhrW+jGrl25YCgmJmGwFCGhlhA471MrLCccoKnkGxiQsUCGAMQZv/AAoeZ1D8/Ze9RqBYubvwPN8TSXZim9W406/HRf0cvhLPVyELrAZQnRGtP6InSndgm3uxfif2+8pIDc9K0Im1ZjFQ/MBz7GVlzAxO4vFrKz0yhXWTWP4cy5PY5zj7WBt7a5dtK0Gn1bqXBMVHNk/yDtsHd3z0IlCQ5TJBQfYOig6CombNEQozGwEU30rQaPLiUPyRCxSYQoYJCl+YCxSj56DIERT+MEcorFyIoPCF+UGhnoOCXn6W366haHcORb6XoPCFZ40ULyjiBIVPzBOKAkHhD7N/QP6TWyg+tHmSfWwfLVHoISh8YZ5QFINWeuSEBI0mywKFTlD4xa6hWO4YimQpYGUICh+YoCCLgWLsHBRlQLGWoJDfDIrNvKBYg+f/l6DRZFmgMAgKv5gjFKlyN0HhCwOKYVdQLHMKhZkaJij8YY5QpEe68PwbCRpNXhyKLW6h+MDmScYXMsWNOFnNf5lYDZgfFOynCmJm1m52IdcDFDcHVPZFIXb3IfsQijbnUGiAIntEgkaTZYGiKwgoTILCB2ZQPFJtKPZfAMVhCRpNlgiKJoWg8IN5QqE3IVMckqDRZFmg6O4hKHxi11C0uoECw8f7EjSaLA8UBqDIERTym0HxaLWhOHABFAclaDS5ilDYfc2BoPCXOULROw/FhASNJlcJihanUKzpNQkKf5g7FO9J0Gjy4lA8xguKRoLCF+YCxbvzUISsRsXKvStBo8kEBVlaKAKAQrVyByRoNLlKUDQ7hyIOKPIEhfzmCEV4Hor9EjSavDgUfyYoyJ5BYfcDM++xfYLhBINiXIJGkwkKMi8omhxDEQEU8fyYBI0mywJFTyRJUPjDXKFo0OKFfRI0mrw4FI9XG4qJeSiiBIVfzBuKUdENJksFRapBJSh8YbdQNDqFovccFO+IbjBZJihiKTZ8EBQ+MEco0gyKvaIbLKPN9MhZLVE4ZaTKX+nJ0ljUGHpBtfLPaoni01j+q5Es/0WHsfwUsu0zMTO7VbVyryF4x7DuhNe/3IzjPuEWCrv/7XWQ7RMiKM4DwKZ8JxHcCS1ReiOiDdyvxvO3OQ7Cgsz0MIbl/K1hrf8+gPU6IPoC677zBxRKpgFU7xEdFEEgnEWwvgEIb8aM7DoEsFNPFJrdgnAp4cb7Kc5T1uL5vyPzTFkZ51mENxS7RQeIlwHBDIJzULFyW5ANBsJqX4PnBCwiPVFcFlb7h5BJngcgtr+Z0C0UDQRFpdnQABjYOP9yVB8soc3XeB5pF0L2aAYYA7i25wDHot9QyBGKvpqFYr5QjBcOozjcHDUGA4qZ5Z4V7ArXVgQcE+yaLwHFk44P7BCK98/vByjeFh1Aj2GYBQzjipn7ZUTrlxaEHxMyx1Zc/4wMUOwSHUgvjDttFiBsQ7V/i5EstnsaLU7SE6V2tOMx+LRQKHSfQ4Gp3oyRLO/AMJEVUThWQ6h9CgDjuDgoksWdogPrEoZpdNx+DBVr0YZGT6MigZDBkyhA/4Ppq3somNxBUfIdFADhQxRntxvJUodnUZBQMTO7CnXGAQYGbyj+JTrI9jLD/ItNX6jxwnpkiZWe9bzkwrD4M7T7Jdj5ex9MLNg2O/nQ+X38AAXS6CSKyMdjxuBNyBI1UTc4EWJ0LWo/xdXOLqHYITrol4BhFrOJ15BCcyi+6g4GT1QrUACGM0ibb0b1gSxqh5orIrnKHRTl7aIhuACGGWSFVzBMpCNaP8HghdxAgTn+WyJBWCggj0aNwU3ICgZlBo/lEop/CgCB/XreFIqn7Sgcf6tauWBYyRAM1RA63O7XH7Kp63zhhuBwgWIhI5zA8LBLsXL3KOZQJ7JCk+g+q3m5gQKB+Q3u1DH23r6RWtqngy4EAMeaRhaaBAB7o8bQw3AhrPa1ITMQCDzlBgoA0RhSMq0IXjceFUwB740ZQw/GzOwzAGU3UvwYZgIT+PshAHQE6z9gZs+x/qAaLxxABhiF34poA6wuWI9tb++NpsL4+40hta8Z56DppCi5geJiYu8nIMDLAUp7IBxvX9NrdHQFdVhbsI51ZnswkliODLAMw0Ibr3aSHMhLKEg1IgdQHCYo6kQItN2vVCYo6kUEBalCBAWpQgQFqUIEBalCDqGg9xrqQQi03Z9pICjqRQQFqUIEBalCBAWpQgQFqUIItN1f+TlCUNSJCApShQgKUoUIClKFCApShRxCQR+grQch0HZ/OZCgqBcRFKQKERSkChEUJBKJRCKRHOh7LktbCRuu/n0AAAAASUVORK5CYII="},fL=({match:e,timeFormat:t})=>{var n,r,i,o;return c.jsxs(v.Box,{display:"flex",alignItems:"center",gap:.5,fontSize:"xs",children:[c.jsxs(v.Typography,{mr:1,children:["[",kt(e.kickoffAt).format(t),"]"]}),e.homeTeam.code?c.jsx(v.Tooltip,{title:e.homeTeam.name,children:c.jsxs(v.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[c.jsx(v.Typography,{children:e.homeTeam.code||e.homeTeam.name}),c.jsx(v.Avatar,{src:((n=e.homeTeam.assets)==null?void 0:n.logo)||ze.team,sx:{width:"20px",height:"20px"}})]})}):c.jsxs(c.Fragment,{children:[c.jsx(v.Typography,{children:e.homeTeam.code||e.homeTeam.name}),c.jsx(v.Avatar,{src:((r=e.homeTeam.assets)==null?void 0:r.logo)||ze.team,sx:{width:"20px",height:"20px"}})]}),"-",e.awayTeam.code?c.jsx(v.Tooltip,{title:e.awayTeam.name,children:c.jsxs(v.Box,{display:"flex",gap:.5,alignItems:"center",children:[c.jsx(v.Avatar,{src:((i=e.awayTeam.assets)==null?void 0:i.logo)||ze.team,sx:{width:"20px",height:"20px"}})," ",c.jsx(v.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})}):c.jsxs(c.Fragment,{children:[c.jsx(v.Avatar,{src:((o=e.awayTeam.assets)==null?void 0:o.logo)||ze.team,sx:{width:"20px",height:"20px"}}),c.jsx(v.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})]})},hm=Ve(c.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),hL=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),{sdk:s}=lt(),l=()=>_(this,null,function*(){try{const h=yield s.topX.getGames({limit:50},!0),p=yield s.matchQuiz.getGames({limit:50},!0),m=[...h.data,...p.data];if(e.related&&e.related.length>0){const g=m.filter(b=>{var w;return(w=e.related)==null?void 0:w.some(S=>S.entity_id===b.id)}).map(b=>b.id);n(g)}i(m)}catch(f){console.error(f),d()}}),u=(f,h)=>{const p=h.map(m=>({entity_id:m,entity_type:"GAME",entity_relationship:"relatedTo"}));e.onChange(p)},d=()=>a(!o);return x.useEffect(()=>{l()},[]),c.jsxs(c.Fragment,{children:[r.length>0?c.jsxs(v.FormControl,{sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{color:"primary",children:e.label}),c.jsx(v.Select,{multiple:!0,indicator:c.jsx(hm,{}),defaultValue:t,renderValue:f=>c.jsx(v.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>c.jsx(v.Chip,{variant:"soft",color:"primary",children:h.label},`related-game-${h.label}-${p}`))}),onChange:u,sx:{minWidth:"15rem",[`& .${v.selectClasses.indicator}`]:{transition:"0.2s",[`&.${v.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>c.jsx(v.Option,{value:f.id,children:f.title?f.title+` (${f.type})`:`Game with no title (${f.type}). ID: ${f.id}`},`related-game-title-${f.id}`))})]}):c.jsx(c.Fragment,{}),c.jsx(nt,{showToast:o,message:"There was a problem witch fetching games for related options",color:"danger",hideToast:d})]})},pL=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),{sdk:s}=lt(),l=()=>_(this,null,function*(){try{const h=yield s.loyalty.getTemplates(void 0,!0);if(e.related&&e.related.length>0){const p=h.data.filter(m=>{var g;return(g=e.related)==null?void 0:g.some(b=>b.entity_id===m.id)}).map(m=>m.id);n(p)}i(h.data)}catch(f){console.error(f),d()}}),u=(f,h)=>{const p=h.map(m=>({entity_id:m,entity_type:"TEMPLATE",entity_relationship:"relatedTo"}));e.onChange(p)},d=()=>a(!o);return x.useEffect(()=>{l()},[]),c.jsxs(c.Fragment,{children:[r.length>0?c.jsxs(v.FormControl,{sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{color:"primary",children:e.label}),c.jsx(v.Select,{multiple:!0,indicator:c.jsx(hm,{}),defaultValue:t,renderValue:f=>c.jsx(v.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>c.jsx(v.Chip,{variant:"soft",color:"primary",children:h.label},`related-template-${h.label}-${p}`))}),onChange:u,sx:{minWidth:"15rem",[`& .${v.selectClasses.indicator}`]:{transition:"0.2s",[`&.${v.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>c.jsx(v.Option,{value:f.id,children:f.name||`Template with no name. ID: ${f.id}`},`related-template-name-${f.id}`))})]}):c.jsx(c.Fragment,{}),c.jsx(nt,{showToast:o,message:"There was a problem witch fetching templates for related options",color:"danger",hideToast:d})]})},pm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="game"),gm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="template"),gL=e=>{const t=(n,r)=>{if(r==="games"){const i=gm(e.related);e.onChange([...n,...i])}if(r==="templates"){const i=pm(e.related);e.onChange([...n,...i])}};return c.jsxs(c.Fragment,{children:[c.jsx(hL,{label:e.labels.games,related:pm(e.related),onChange:n=>t(n,"games")}),c.jsx(pL,{label:e.labels.templates,related:gm(e.related),onChange:n=>t(n,"templates")})]})},mL=(e,t)=>{const[n,r]=x.useState(null),{https:i}=lt(),o=()=>_(this,null,function*(){const a=yield i.getSchedulersByEntityId(e);if(a.ok){const s=yield a.json();r(s.data);return}r([])});return x.useEffect(()=>(o(),()=>r(null)),[e,t]),n},fs=({my:e})=>c.jsx(v.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",my:e},children:c.jsx(v.CircularProgress,{variant:"solid",color:"neutral"})}),vL=["PENDING","LIVE","SETTLED"],bL=["OPEN"],yL=["ACTIVE","INACTIVE","EXPIRED"],xL=new Map().set("PENDING","Pending").set("LIVE","Live").set("SETTLED","Settled").set("CANCELED","Canceled").set("OPEN","Open").set("ACTIVE","Active").set("INACTIVE","Inactive").set("PENDING","Pending").set("EXPIRED","Expired"),mm=e=>{let t=[];return e.entityType==="CLASSIC_QUIZ"||e.entityType==="PERSONALITY_QUIZ"||e.entityType==="EITHER_OR"||e.entityType==="POLL"?t=Array.from(yL):e.entityType==="TEMPLATE"?t=Array.from(vL):t=Array.from(bL),c.jsx(c.Fragment,{children:t.map(n=>c.jsx(v.Option,{value:n,children:xL.get(n)},`${e.entityType}-${n}-status`))})};class CL{constructor(){ne(this,"name","");ne(this,"scheduled_task_config",{entity_id:"",entity_type:"",change:{status:""}});ne(this,"trigger",{trigger_type:"DATETIME",date:""})}}const wL=Ve(c.jsx("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3M12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1m1 4h-2v-2h2z"}),"WarningRounded"),IL=e=>{const[t,n]=x.useState(!1),{https:r}=lt(),i=o=>_(this,null,function*(){if(o.stopPropagation(),n(!0),(yield r.deleteScheduledTask(e.taskId)).ok){n(!1),e.toggleToast("success",e.labels.deleteScheduledTaskMessage),e.refetchTasks(),e.toggleModal();return}n(!1),e.toggleToast("danger",e.labels.deleteScheduledTaskErrorMessage)});return c.jsx(c.Fragment,{children:c.jsx(v.Modal,{open:e.isOpen,onClose:e.toggleModal,children:c.jsxs(v.ModalDialog,{children:[c.jsxs(v.DialogTitle,{children:[c.jsx(wL,{}),e.labels.deleteScheduledTaskModalTitle]}),c.jsx(v.Divider,{}),c.jsx(v.DialogContent,{children:c.jsxs(v.Typography,{children:[e.labels.deleteScheduledTaskModalParagraph,c.jsx(v.Typography,{fontWeight:"bold",children:e.taskName}),"?"]})}),c.jsxs(v.DialogActions,{children:[c.jsx(v.Button,{loading:t,variant:"solid",color:"danger",onClick:o=>i(o),children:e.labels.delete}),c.jsx(v.Button,{variant:"plain",color:"neutral",onClick:o=>{o.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]})})})},SL=e=>{const[t,n]=x.useState(null),[r,i]=x.useState(""),[o,a]=x.useState(""),[s,l]=x.useState(""),[u,d]=x.useState(""),[f,h]=x.useState(!1),[p,m]=x.useState(!1),[g,b]=x.useState(!1),[w,S]=x.useState("success"),[C,I]=x.useState(""),[y,A]=x.useState(!1),E=x.useRef(!1),k=mL(e.entityId,E.current),{https:F}=lt();if(!k)return c.jsx(fs,{my:10});const Y=()=>A(!y),O=(M,H)=>{b(!0),S(M),I(H)},T=(M,H)=>{i(H.scheduled_task_config.change.status),l(H.trigger.date),n(M)},N=()=>_(this,null,function*(){h(!0);const M=$("CREATE","");if((yield F.setSchedulers(M,"CREATE",null)).ok){h(!1),a(""),d(""),E.current=!E.current,O("success",e.labels.createScheduledTaskMessage);return}h(!1),a(""),d(""),O("danger",e.labels.createScheduledTaskErrorMessage)}),V=(M,H)=>_(this,null,function*(){m(!0);const Q=$("UPDATE",H);if((yield F.setSchedulers(Q,"UPDATE",M)).ok){m(!1),n(null),i(""),l(""),E.current=!E.current,O("success",e.labels.updateScheduledTaskMessage);return}m(!1),O("danger",e.labels.updateScheduledTaskErrorMessage),n(null),i(""),l("")}),j=()=>{E.current=!E.current},$=(M,H)=>{const Q=new CL,te=M==="CREATE"?o:r,R=M==="CREATE"?null:H,L=M==="CREATE"?u:s;return Q.scheduled_task_config.entity_id=e.entityId,Q.scheduled_task_config.entity_type=e.entityType,Q.scheduled_task_config.change.status=te,Q.trigger.date=L,Q.name=R,Q};return c.jsxs(c.Fragment,{children:[k.map((M,H)=>c.jsx(v.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:c.jsx(v.CardContent,{children:t===H?c.jsxs(v.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%"},children:[c.jsxs(v.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[c.jsx(v.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),c.jsx(v.Select,{value:r,size:"sm",name:"status",onChange:(Q,te)=>i(te),sx:{minHeight:"36px"},children:c.jsx(mm,{entityType:e.entityType})})]}),c.jsxs(v.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[c.jsx(v.FormLabel,{required:!0,color:"primary",children:e.labels.at}),c.jsx(Qc,{defaultDate:s,onChange:Q=>l(Q)})]}),r&&s?c.jsx(v.Button,{onClick:()=>V(M.id,M.name),loading:p,sx:{mt:"auto"},children:e.labels.save}):c.jsx(v.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.save})]}):c.jsxs(v.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"}},children:[c.jsxs(v.Box,{children:[c.jsxs(v.Typography,{style:{fontWeight:"bold"},children:[e.labels.name,": ",c.jsx(v.Typography,{whiteSpace:"wrap",children:M.name})]}),c.jsxs(v.Typography,{style:{color:"gray"},children:[e.labels.status,": ",c.jsx(v.Typography,{whiteSpace:"wrap",children:M.status})]})]}),!e.readOnly&&c.jsxs(v.Box,{children:[c.jsx(v.Tooltip,{title:e.labels.edit,children:c.jsx(v.IconButton,{onClick:()=>T(H,M),children:c.jsx(De.Edit,{})})}),c.jsx(v.Tooltip,{title:e.labels.delete,children:c.jsx(v.IconButton,{onClick:Y,children:c.jsx(De.Delete,{})})})]}),c.jsx(IL,{labels:e.labels,isOpen:y,taskId:M.id,taskName:M.name,toggleModal:Y,refetchTasks:j,toggleToast:O})]})})},`scheduled-task-${e.entityId}-${e.entityType}-${M.id}`)),!e.readOnly&&c.jsxs(v.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%",mt:k&&k.length?2:0},children:[c.jsxs(v.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[c.jsx(v.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),c.jsx(v.Select,{value:o,size:"sm",name:"status",onChange:(M,H)=>a(H),sx:{minHeight:"37px"},children:c.jsx(mm,{entityType:e.entityType})})]}),c.jsxs(v.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[c.jsx(v.FormLabel,{required:!0,color:"primary",children:e.labels.at}),c.jsx(Qc,{defaultDate:u,onChange:M=>d(M)})]}),o&&u?c.jsx(v.Button,{onClick:N,loading:f,sx:{mt:"auto"},children:e.labels.create}):c.jsx(v.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.create})]}),c.jsx(nt,{showToast:g,message:C,color:w,hideToast:()=>b(!1)})]})};function AL(e){return at("MuiIconButton",e)}Ze("MuiIconButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","loading","loadingIndicator"]);const TL=["children","action","component","color","disabled","variant","loading","loadingIndicator","size","slots","slotProps"],EL=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,size:o,variant:a,loading:s}=e,l={root:["root",n&&"disabled",r&&"focusVisible",a&&`variant${ye(a)}`,t&&`color${ye(t)}`,o&&`size${ye(o)}`,s&&"loading"],loadingIndicator:["loadingIndicator"]},u=dt(l,AL,{});return r&&i&&(u.root+=` ${i}`),u},kL=be("button")(({theme:e,ownerState:t})=>{var n,r,i,o;return[D({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon},t.instanceSize&&{"--IconButton-size":{sm:"2rem",md:"2.25rem",lg:"2.75rem"}[t.instanceSize]},t.size==="sm"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2rem) / 1.6)","--CircularProgress-size":"20px","--CircularProgress-thickness":"2px",minWidth:"var(--IconButton-size, 2rem)",minHeight:"var(--IconButton-size, 2rem)",fontSize:e.vars.fontSize.sm,paddingInline:"2px"},t.size==="md"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2.25rem) / 1.5)","--CircularProgress-size":"20px","--CircularProgress-thickness":"2px",minWidth:"var(--IconButton-size, 2.25rem)",minHeight:"var(--IconButton-size, 2.25rem)",fontSize:e.vars.fontSize.md,paddingInline:"0.25rem"},t.size==="lg"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2.75rem) / 1.571)","--CircularProgress-size":"28px","--CircularProgress-thickness":"4px",minWidth:"var(--IconButton-size, 2.75rem)",minHeight:"var(--IconButton-size, 2.75rem)",fontSize:e.vars.fontSize.lg,paddingInline:"0.375rem"},{WebkitTapHighlightColor:"transparent",paddingBlock:0,fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.md,margin:"var(--IconButton-margin)",borderRadius:`var(--IconButton-radius, ${e.vars.radius.sm})`,border:"none",boxSizing:"border-box",backgroundColor:"transparent",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",[e.focus.selector]:D({"--Icon-color":"currentColor"},e.focus.default)}),D({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":D({"--Icon-color":"currentColor"},(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color])},'&:active, &[aria-pressed="true"]':D({"--Icon-color":"currentColor"},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color]),"&:disabled":(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]})]}),_L=be(kL,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),PL=be("span",{name:"JoyIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e,ownerState:t})=>{var n,r;return D({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:(n=e.variants[t.variant])==null||(n=n[t.color])==null?void 0:n.color},t.disabled&&{color:(r=e.variants[`${t.variant}Disabled`])==null||(r=r[t.color])==null?void 0:r.color})}),vm=G.forwardRef(function(t,n){var r;const i=ft({props:t,name:"JoyIconButton"}),{children:o,action:a,component:s="button",color:l="neutral",disabled:u,variant:d="plain",loading:f=!1,loadingIndicator:h,size:p="md",slots:m={},slotProps:g={}}=i,b=Ae(i,TL),w=G.useContext(_p),S=G.useContext(Pp),C=t.variant||w.variant||d,I=t.size||w.size||p,y=t.color||w.color||l,A=(r=t.loading||t.disabled)!=null?r:w.disabled||f||u,E=G.useRef(null),k=ln(E,n),{focusVisible:F,setFocusVisible:Y,getRootProps:O}=zl(D({},i,{disabled:A,rootRef:k})),T=h!=null?h:c.jsx(Ep,{color:y,thickness:{sm:2,md:3,lg:4}[I]||3});G.useImperativeHandle(a,()=>({focusVisible:()=>{var L;Y(!0),(L=E.current)==null||L.focus()}}),[Y]);const N=D({},i,{component:s,color:y,disabled:A,variant:C,loading:f,size:I,focusVisible:F,instanceSize:t.size}),V=EL(N),j=L=>{var U;let W=i.onClick;if(typeof g.root=="function"?W=g.root(N).onClick:g.root&&(W=g.root.onClick),(U=W)==null||U(L),S){var re;(re=S.onClick)==null||re.call(S,L,i.value)}};let $=i["aria-pressed"];typeof g.root=="function"?$=g.root(N)["aria-pressed"]:g.root&&($=g.root["aria-pressed"]),S!=null&&S.value&&(Array.isArray(S.value)?$=S.value.indexOf(i.value)!==-1:$=S.value===i.value);const M=D({},b,{component:s,slots:m,slotProps:g}),[H,Q]=Ie("root",{ref:n,className:V.root,elementType:_L,getSlotProps:O,externalForwardedProps:M,ownerState:N,additionalProps:{onClick:j,"aria-pressed":$}}),[te,R]=Ie("loadingIndicator",{className:V.loadingIndicator,elementType:PL,externalForwardedProps:M,ownerState:N});return c.jsx(H,D({},Q,{children:f?c.jsx(te,D({},R,{children:T})):o}))});vm.muiName="IconButton";const bm=Ve(c.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),DL=({label:e,defaultValue:t,options:n,required:r,onChange:i})=>{function o(l){var u,d;return l?c.jsxs(c.Fragment,{children:[c.jsx(v.ListItemDecorator,{children:c.jsx(v.Avatar,{size:"sm",src:((d=(u=n.find(f=>f.id===l.value))==null?void 0:u.assets)==null?void 0:d.logo)||ze.competition})}),l.label]}):null}const a=x.useRef(null),s=(l,u)=>{i(u)};return c.jsxs(v.FormControl,{sx:{mb:1},children:[c.jsx(v.FormLabel,{required:r,color:"primary",children:e}),c.jsx(v.Select,q(z({slotProps:{button:{sx:{whiteSpace:"nowrap"}}},sx:{"--ListItemDecorator-size":"44px",minHeight:"37px"},renderValue:o,value:t,onChange:s},t&&{endDecorator:c.jsx(vm,{variant:"plain",color:"neutral",onMouseDown:l=>{l.stopPropagation()},onClick:()=>{var l;i(""),(l=a.current)==null||l.focusVisible()},sx:{width:"18px",height:"18px"},children:c.jsx(bm,{})}),indicator:null}),{children:n.map((l,u)=>{var d;return c.jsxs(x.Fragment,{children:[u!==0?c.jsx(v.ListDivider,{role:"none"}):null,c.jsxs(v.Option,{value:l.id,label:l.name,children:[c.jsx(v.ListItemDecorator,{children:c.jsx(v.Avatar,{size:"sm",src:((d=l.assets)==null?void 0:d.logo)||ze.competition})}),l.name]})]},`${l.id}-${u}`)})}))]})};function OL(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ym=OL,RL=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,LL=RL,ML=LL,BL=typeof self=="object"&&self&&self.Object===Object&&self,$L=ML||BL||Function("return this")(),xm=$L,NL=xm,FL=function(){return NL.Date.now()},zL=FL,jL=/\s/;function UL(e){for(var t=e.length;t--&&jL.test(e.charAt(t)););return t}var VL=UL,HL=VL,WL=/^\s+/;function GL(e){return e&&e.slice(0,HL(e)+1).replace(WL,"")}var YL=GL,KL=xm,QL=KL.Symbol,pu=QL,Cm=pu,wm=Object.prototype,qL=wm.hasOwnProperty,JL=wm.toString,uo=Cm?Cm.toStringTag:void 0;function XL(e){var t=qL.call(e,uo),n=e[uo];try{e[uo]=void 0;var r=!0}catch(o){}var i=JL.call(e);return r&&(t?e[uo]=n:delete e[uo]),i}var ZL=XL,eM=Object.prototype,tM=eM.toString;function nM(e){return tM.call(e)}var rM=nM,Im=pu,iM=ZL,oM=rM,aM="[object Null]",sM="[object Undefined]",Sm=Im?Im.toStringTag:void 0;function lM(e){return e==null?e===void 0?sM:aM:Sm&&Sm in Object(e)?iM(e):oM(e)}var cM=lM;function uM(e){return e!=null&&typeof e=="object"}var dM=uM,fM=cM,hM=dM,pM="[object Symbol]";function gM(e){return typeof e=="symbol"||hM(e)&&fM(e)==pM}var Am=gM,mM=YL,Tm=ym,vM=Am,Em=NaN,bM=/^[-+]0x[0-9a-f]+$/i,yM=/^0b[01]+$/i,xM=/^0o[0-7]+$/i,CM=parseInt;function wM(e){if(typeof e=="number")return e;if(vM(e))return Em;if(Tm(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Tm(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=mM(e);var n=yM.test(e);return n||xM.test(e)?CM(e.slice(2),n?2:8):bM.test(e)?Em:+e}var IM=wM,SM=ym,gu=zL,km=IM,AM="Expected a function",TM=Math.max,EM=Math.min;function kM(e,t,n){var r,i,o,a,s,l,u=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(AM);t=km(t)||0,SM(n)&&(d=!!n.leading,f="maxWait"in n,o=f?TM(km(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(A){var E=r,k=i;return r=i=void 0,u=A,a=e.apply(k,E),a}function m(A){return u=A,s=setTimeout(w,t),d?p(A):a}function g(A){var E=A-l,k=A-u,F=t-E;return f?EM(F,o-k):F}function b(A){var E=A-l,k=A-u;return l===void 0||E>=t||E<0||f&&k>=o}function w(){var A=gu();if(b(A))return S(A);s=setTimeout(w,g(A))}function S(A){return s=void 0,h&&r?p(A):(r=i=void 0,a)}function C(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function I(){return s===void 0?a:S(gu())}function y(){var A=gu(),E=b(A);if(r=arguments,i=this,l=A,E){if(s===void 0)return m(l);if(f)return clearTimeout(s),s=setTimeout(w,t),p(l)}return s===void 0&&(s=setTimeout(w,t)),a}return y.cancel=C,y.flush=I,y}var _M=kM;const or=hn(_M),wn=({option:e})=>c.jsxs(v.Box,{display:"flex",alignItems:"center",mr:1,children:[c.jsx(v.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:e.logo}),c.jsx(v.Typography,{children:e.label}),c.jsx(v.Typography,{ml:.5,level:"body-xs",children:`(${e.countryName})`})]}),_m=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Competition with no name",label:t.name?t.name:"Competition with no name",logo:((n=t.assets)==null?void 0:n.logo)||ze.competition,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||ze.flag}}))||[],PM=({labels:e,label:t,ids:n,required:r,onChange:i})=>{const[o,a]=x.useState([]),[s,l]=x.useState([]),[u,d]=x.useState(!1),[f,h]=x.useState(""),[p,m]=x.useState(!1),{sdk:g}=lt(),b=()=>m(!p),w=(y,A)=>{a(A),i(A[0]?[A[0].id]:[])},S=3;x.useEffect(()=>{!f&&n&&n.length&&g.football.getCompetitions({competitionIds:n}).then(y=>{a(_m(y))}).catch(y=>{console.error(y),b(),a([])})},[]);const C=x.useMemo(()=>or(y=>{d(!0),g.football.getCompetitions({name:y}).then(A=>{l([..._m(A)]),d(!1)}).catch(A=>{console.error(A),b(),l([]),d(!1)})},300),[]);x.useEffect(()=>{if(!f||f.length<S){l([]);return}return C(f),()=>C.cancel()},[f,C]);const I=(y,A)=>y.map((E,k)=>c.jsx(v.Chip,{variant:"solid",endDecorator:c.jsx(v.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:F=>A({index:k}).onClick(F),children:c.jsx(De.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:c.jsx(wn,{option:E},`option_${E.id}`)},E.id));return c.jsxs(v.FormControl,{sx:{marginBottom:"16px"},children:[c.jsx(v.FormLabel,{required:r,color:"primary",children:t}),c.jsx(v.Box,{children:c.jsx(v.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:u,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(y,A)=>y.id===A.id,endDecorator:u?c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.competitionsSelectionPlaceholder,options:s,disabled:o.length===1,filterOptions:y=>y.filter(A=>!o.some(E=>E.value===A.value)),onInputChange:(y,A)=>{h(A)},onChange:w,getOptionKey:y=>y.id,value:o,renderTags:I,renderOption:(y,A)=>c.jsx(v.AutocompleteOption,q(z({},y),{children:c.jsx(wn,{option:A})}))})}),c.jsx(nt,{showToast:p,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:b})]})},Pm=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Competition with no name",label:t.name?t.name:"Competition with no name",logo:((n=t.assets)==null?void 0:n.logo)||ze.competition,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||ze.flag}}))||[],DM=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=x.useState([]),[a,s]=x.useState([]),[l,u]=x.useState(!1),[d,f]=x.useState(""),[h,p]=x.useState(!1),{sdk:m}=lt(),g=()=>p(!h),b=(I,y)=>{o(y);const A=y.map(E=>E.id);r(A&&A.length?A:null)},w=3;x.useEffect(()=>{!d&&t&&t.length&&m.football.getCompetitions({competitionIds:t}).then(I=>{o(Pm(I))}).catch(I=>{console.error(I),g(),o([])})},[]);const S=x.useMemo(()=>or(I=>{u(!0);const y={name:I,competitionIds:[""]};n&&Array.isArray(n)&&n.length>0?y.competitionIds=Array.from(n):delete y.competitionIds,m.football.getCompetitions(y).then(A=>{s([...Pm(A)]),u(!1)}).catch(A=>{console.error(A),g(),s([]),u(!1)})},300),[]);x.useEffect(()=>{if(!d||d.length<w){s([]);return}return S(d),()=>S.cancel()},[d,S]);const C=(I,y)=>I.map((A,E)=>c.jsx(v.Chip,{variant:"solid",endDecorator:c.jsx(v.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>y({index:E}).onClick(k),children:c.jsx(De.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:c.jsx(wn,{option:A},`option_${A.id}`)},A.id));return c.jsxs(c.Fragment,{children:[c.jsx(v.Box,{sx:{marginBottom:"16px"},children:c.jsx(v.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:l,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(I,y)=>I.id===y.id,endDecorator:l?c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.competitionsSelectionPlaceholder,options:a,filterOptions:I=>I.filter(y=>!i.some(A=>A.value===y.value)),onInputChange:(I,y)=>{f(y)},onChange:b,getOptionKey:I=>I.id,value:i,renderTags:C,renderOption:(I,y)=>c.jsx(v.AutocompleteOption,q(z({},I),{children:c.jsx(wn,{option:y})}))})}),c.jsx(nt,{showToast:h,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:g})]})},Dm=e=>(e==null?void 0:e.map(t=>({id:t.id,value:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,label:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,avatar:t.avatar})))||[],OM=({labels:e,ids:t,onChange:n})=>{const[r,i]=x.useState([]),[o,a]=x.useState([]),[s,l]=x.useState(!1),[u,d]=x.useState(""),[f,h]=x.useState(!1),{sdk:p}=lt(),m=()=>h(!f),g=(C,I)=>{i(I);const y=I.map(A=>A.id);n(y&&y.length?y:null)},b=3;x.useEffect(()=>{!u&&t&&t.length&&p.profile.getByIds(t).then(C=>{i(Dm(C))}).catch(C=>{m(),console.error(C),i([])})},[]);const w=x.useMemo(()=>or(C=>{l(!0),p.profile.getByIds([],C).then(I=>{a([...Dm(I)]),l(!1)}).catch(I=>{console.error(I),m(),a([]),l(!1)})},300),[]);x.useEffect(()=>{if(!u||u.length<b){a([]);return}return w(u),()=>w.cancel()},[u,w]);const S=(C,I)=>C.map((y,A)=>{var E;return c.jsx(v.Chip,{variant:"solid",endDecorator:c.jsx(v.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>I({index:A}).onClick(k),children:c.jsx(De.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:c.jsxs(v.Box,{display:"flex",alignItems:"center",mr:1,children:[c.jsx(v.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(E=y.avatar)!=null?E:ze.avatar}),c.jsx(v.Typography,{children:y.label})]})},y.id)});return c.jsxs(c.Fragment,{children:[c.jsx(v.Box,{sx:{marginBottom:"16px"},children:c.jsx(v.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:s,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(C,I)=>C.id===I.id,endDecorator:s?c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:C=>C.filter(I=>!r.some(y=>y.value===I.value)),onInputChange:(C,I)=>{d(I)},onChange:g,getOptionKey:C=>C.id,value:r,renderTags:S,renderOption:(C,I)=>{var y;return c.jsx(v.AutocompleteOption,q(z({},C),{children:c.jsxs(v.Box,{display:"flex",alignItems:"center",mr:1,children:[c.jsx(v.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(y=I.avatar)!=null?y:ze.avatar}),c.jsx(v.Typography,{children:I.label})]})}))}})}),c.jsx(nt,{showToast:f,message:e.searchProfilesErrorMessage,color:"danger",hideToast:m})]})},Om=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Team with no name",label:t.name?t.name:"Team with no name",logo:((n=t.assets)==null?void 0:n.logo)||ze.team,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||ze.flag}}))||[],RM=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=x.useState([]),[a,s]=x.useState([]),[l,u]=x.useState(!1),[d,f]=x.useState(""),[h,p]=x.useState(!1),{sdk:m}=lt(),g=()=>p(!h),b=(I,y)=>{o(y);const A=y.map(E=>E.id);r(A&&A.length?A:null)},w=3;x.useEffect(()=>{!d&&t&&t.length&&m.football.getTeams({teamIds:t,scope:n}).then(I=>{const y=I.data.filter(A=>!A.name.includes("/"));o(Om(y))}).catch(I=>{console.error(I),g(),o([])})},[]);const S=x.useMemo(()=>or((I,y)=>{u(!0),m.football.getTeams({name:I,scope:y}).then(A=>{const E=A.data.filter(k=>!k.name.includes("/"));s([...Om(E)]),u(!1)}).catch(A=>{console.error(A),g(),s([]),u(!1)})},300),[]);x.useEffect(()=>{if(!d||d.length<w){s([]);return}return S(d,n),()=>S.cancel()},[d,S]);const C=(I,y)=>I.map((A,E)=>c.jsx(v.Chip,{variant:"solid",endDecorator:c.jsx(v.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>y({index:E}).onClick(k),children:c.jsx(De.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:c.jsx(wn,{option:A},`option_${A.id}`)},A.id));return c.jsxs(c.Fragment,{children:[c.jsx(v.Box,{sx:{marginBottom:"16px"},children:c.jsx(v.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:l,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(I,y)=>I.id===y.id,endDecorator:l?c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.teamsSelectionPlaceholder,options:a,filterOptions:I=>I.filter(y=>!i.some(A=>A.value===y.value)),onInputChange:(I,y)=>{f(y)},onChange:b,getOptionKey:I=>I.id,value:i,renderTags:C,renderOption:(I,y)=>c.jsx(v.AutocompleteOption,q(z({},I),{children:c.jsx(wn,{option:y})}))})}),c.jsx(nt,{showToast:h,message:e.searchTeamsErrorMessage,color:"danger",hideToast:g})]})},LM=({checked:e,disabled:t,sx:n,onChange:r})=>{const i=n?z({},n):{ml:1};return c.jsx(v.Switch,{color:e?"success":"danger",checked:e,disabled:t,onChange:o=>r(o.target.checked),sx:q(z({},i),{"--Switch-thumbSize":"16px","--Switch-trackWidth":"40px","--Switch-trackHeight":"24px","--Switch-trackBackground":"#EE5E52","&:hover":{"--Switch-trackBackground":"#EE5E52"},[`&.${v.switchClasses.checked}`]:{"--Switch-trackBackground":"#5CB176","&:hover":{"--Switch-trackBackground":"#5CB176"}}})})},ui=({label:e,labelPosition:t="start",defaultValue:n,description:r,disabled:i,descriptionColor:o,sx:a,onChange:s})=>{const l=c.jsx(LM,{checked:n,disabled:i,onChange:s,sx:a==null?void 0:a.switch}),u=a!=null&&a.container?z({},a.container):{mb:2},d=a!=null&&a.label?z({},a.label):{};return r?c.jsxs(v.Box,{sx:z({},u),children:[c.jsx(v.Typography,{component:"label",startDecorator:t=="start"?void 0:l,endDecorator:t=="start"?l:void 0,sx:d,children:e}),c.jsx(v.Typography,{level:"body-sm",color:o||"neutral",children:r})]}):c.jsx(v.Typography,{sx:Object.keys(d)?z({},d):{mb:2},component:"label",startDecorator:t=="start"?void 0:l,endDecorator:t=="start"?l:void 0,children:e})},MM={control:(e,t)=>q(z({},e),{minHeight:"36px",borderColor:t.isFocused?"#0b6bcb":"#ced4da",boxShadow:t.isFocused?"0 0 0 0px 1px 2px 0px rgba(25, 118, 210, 0.25)":"none",borderRadius:"6px","&:hover":{borderColor:t.isFocused?"#1976d2":"#ced4da"}}),valueContainer:e=>q(z({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>q(z({},e),{minHeight:"36px"}),menu:e=>q(z({},e),{position:"relative"}),clearIndicator:e=>q(z({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>q(z({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>q(z({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>q(z({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"13px"}),multiValueLabel:e=>q(z({},e),{color:"#333"})},BM=e=>e.map(t=>({label:t,value:t})),Rm=e=>{const[t,n]=x.useState(""),[r,i]=x.useState(!1),o=BM(e.tags),a=()=>i(!r),s=f=>{e.onChange(f.map(h=>h.value))},l=f=>{n(f)},u=f=>{f.persist();const{key:h}=f;if(t)switch(h){case"Enter":case"Tab":if(e.tags&&e.tags.length===0){const p=[...e.tags,t];e.onChange(p)}if(e.tags&&e.tags.length>0&&d()){const p=[...e.tags,t];e.onChange(p)}n(""),f.preventDefault()}},d=()=>{let f=!1;return e.tags&&e.tags.length&&e.tags.includes(t)?(a(),f):(f=!0,f)};return c.jsxs(c.Fragment,{children:[c.jsx(um,{styles:MM,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:s,onInputChange:l,onKeyDown:u,placeholder:e.labels.tagsPlaceholder,value:o}),c.jsx(nt,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},$M=Ve(c.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");class Lm{constructor(){ne(this,"contestId","");ne(this,"contestType","");ne(this,"description","");ne(this,"userList",[])}}const NM=(e,t,n)=>{const[r,i]=x.useState(null),{sdk:o}=lt(),a=()=>_(this,null,function*(){try{let s;switch(t){case"top_x":s=yield o.topX.getGameWinners(e,!0);break;case"match_quiz":s=yield o.matchQuiz.getGameWinners(e,!0);break;default:s=yield o.loyalty.getTemplateWinners(e,!0)}s.userList&&s.userList.forEach(l=>{l.tags||(l.tags=[])}),i(s)}catch(s){const l=o.helpers.getSDKConfiguration();let u=null;l.errorHandlingMode==="standard"?u=s.error:u=s.data.error,u.code!==404&&u.status!=="code_unknown_contest"&&n(),i(new Lm)}});return x.useEffect(()=>{a()},[]),r};class FM{constructor(){ne(this,"position","");ne(this,"profileId","");ne(this,"note","");ne(this,"tags",[])}}function zM(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var jM=zM,UM=Array.isArray,VM=UM,Mm=pu,HM=jM,WM=VM,GM=Am,YM=1/0,Bm=Mm?Mm.prototype:void 0,$m=Bm?Bm.toString:void 0;function Nm(e){if(typeof e=="string")return e;if(WM(e))return HM(e,Nm)+"";if(GM(e))return $m?$m.call(e):"";var t=e+"";return t=="0"&&1/e==-YM?"-0":t}var KM=Nm,QM=KM;function qM(e){return e==null?"":QM(e)}var Fm=qM;function JM(e,t,n,r){var i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}var XM=JM;function ZM(e){return function(t){return e==null?void 0:e[t]}}var e2=ZM,t2=e2,n2={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},r2=t2(n2),i2=r2,o2=i2,a2=Fm,s2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,l2="\\u0300-\\u036f",c2="\\ufe20-\\ufe2f",u2="\\u20d0-\\u20ff",d2=l2+c2+u2,f2="["+d2+"]",h2=RegExp(f2,"g");function p2(e){return e=a2(e),e&&e.replace(s2,o2).replace(h2,"")}var g2=p2,m2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function v2(e){return e.match(m2)||[]}var b2=v2,y2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function x2(e){return y2.test(e)}var C2=x2,zm="\\ud800-\\udfff",w2="\\u0300-\\u036f",I2="\\ufe20-\\ufe2f",S2="\\u20d0-\\u20ff",A2=w2+I2+S2,jm="\\u2700-\\u27bf",Um="a-z\\xdf-\\xf6\\xf8-\\xff",T2="\\xac\\xb1\\xd7\\xf7",E2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",k2="\\u2000-\\u206f",_2=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Vm="A-Z\\xc0-\\xd6\\xd8-\\xde",P2="\\ufe0e\\ufe0f",Hm=T2+E2+k2+_2,Wm="['’]",Gm="["+Hm+"]",D2="["+A2+"]",Ym="\\d+",O2="["+jm+"]",Km="["+Um+"]",Qm="[^"+zm+Hm+Ym+jm+Um+Vm+"]",R2="\\ud83c[\\udffb-\\udfff]",L2="(?:"+D2+"|"+R2+")",M2="[^"+zm+"]",qm="(?:\\ud83c[\\udde6-\\uddff]){2}",Jm="[\\ud800-\\udbff][\\udc00-\\udfff]",di="["+Vm+"]",B2="\\u200d",Xm="(?:"+Km+"|"+Qm+")",$2="(?:"+di+"|"+Qm+")",Zm="(?:"+Wm+"(?:d|ll|m|re|s|t|ve))?",ev="(?:"+Wm+"(?:D|LL|M|RE|S|T|VE))?",tv=L2+"?",nv="["+P2+"]?",N2="(?:"+B2+"(?:"+[M2,qm,Jm].join("|")+")"+nv+tv+")*",F2="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",z2="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",j2=nv+tv+N2,U2="(?:"+[O2,qm,Jm].join("|")+")"+j2,V2=RegExp([di+"?"+Km+"+"+Zm+"(?="+[Gm,di,"$"].join("|")+")",$2+"+"+ev+"(?="+[Gm,di+Xm,"$"].join("|")+")",di+"?"+Xm+"+"+Zm,di+"+"+ev,z2,F2,Ym,U2].join("|"),"g");function H2(e){return e.match(V2)||[]}var W2=H2,G2=b2,Y2=C2,K2=Fm,Q2=W2;function q2(e,t,n){return e=K2(e),t=n?void 0:t,t===void 0?Y2(e)?Q2(e):G2(e):e.match(t)||[]}var J2=q2,X2=XM,Z2=g2,eB=J2,tB="['’]",nB=RegExp(tB,"g");function rB(e){return function(t){return X2(eB(Z2(t).replace(nB,"")),e,"")}}var iB=rB,oB=iB,aB=oB(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),sB=aB;const lB=hn(sB);class cB{constructor(){ne(this,"id","");ne(this,"value","");ne(this,"label","")}}class uB extends cB{constructor(){super(...arguments);ne(this,"logo","");ne(this,"countryFlag","");ne(this,"countryName","")}}class rv extends uB{constructor(){super(...arguments);ne(this,"group","")}}const dB=(e,t)=>t||e||"-------------",mu=(e,t)=>Array.isArray(e)?e.map(n=>mu(n)):e!=null&&e.constructor===Object?Object.keys(e).reduce((n,r)=>q(z({},n),{[lB(r)]:mu(e[r])}),{}):e,iv=e=>{const t=[];return e.competitions.forEach(n=>{t.push(vu(n,"competition"))}),e.teams.forEach(n=>{t.push(vu(n,"team"))}),e.players.forEach(n=>{t.push(vu(n,"player"))}),t},vu=(e,t)=>{var r,i,o,a,s;const n=new rv;return n.label=e.name,n.value=e.id,n.id=e.id,n.group=t,t==="player"?n.logo=((r=e.assets)==null?void 0:r.headshot)||ze.avatar:t==="team"?n.logo=((i=e.assets)==null?void 0:i.logo)||ze.team:n.logo=((o=e.assets)==null?void 0:o.logo)||ze.competition,n.countryName=e.country.name,n.countryFlag=((s=(a=e.country)==null?void 0:a.assets)==null?void 0:s.flag)||ze.country,n},fB=e=>{switch(e){case"CLASSIC_QUIZ":return"success";case"EITHER_OR":return"success";case"POLL":return"warning";case"TOP_X":return"primary";case"MATCH_QUIZ":return"primary";case"LEADERBOARD_TEMPLATES":return"neutral";default:return"neutral"}},hB=e=>{switch(e){case"CLASSIC_QUIZ":return"CLASSIC QUIZ";case"EITHER_OR":return"EITHER/OR";case"POLL":return"POLL";case"TOP_X":return"TOP X";case"MATCH_QUIZ":return"MATCH QUIZ";case"LEADERBOARD_TEMPLATES":return"LEADERBOARD TEMPLATES"}},pB=({profile:e,winner:t,labels:n,onChange:r,onRemove:i})=>{var b,w,S,C,I,y;const[o,a]=x.useState(t.position),[s,l]=x.useState(t.note),[u,d]=x.useState(t.tags),f=o||s||u.length>0,h=A=>{A.persist();const{value:E}=A.target;a(E),r("position",E)},p=A=>{A.persist();const{value:E}=A.target;l(E),r("note",E)},m=A=>{d(A),r("tags",A)},g=()=>{a(""),l(""),d([]),i()};return c.jsxs("tr",{style:{backgroundColor:f?"rgb(255 237 213)":""},children:[c.jsx("td",{children:c.jsx(v.Input,{name:"position",placeholder:"#",value:o,onChange:h,sx:{backgroundColor:"#fff"}})}),c.jsx("td",{children:c.jsxs(v.Box,{display:"flex",alignItems:"center",children:[c.jsx(v.Avatar,{src:((b=e.profileModel)==null?void 0:b.avatar)||"",alt:((w=e.profileModel)==null?void 0:w.name)||"Unknown",sx:{mr:1}}),c.jsxs(v.Box,{children:[c.jsxs(v.Typography,{fontWeight:"md",children:[dB((S=e.profileModel)==null?void 0:S.name,(C=e.profileModel)==null?void 0:C.nickname)," ",(I=e.profileModel)!=null&&I.name?c.jsxs(v.Typography,{children:["(",(y=e.profileModel)==null?void 0:y.name,")"]}):c.jsx(c.Fragment,{})]}),c.jsx(v.Typography,{fontSize:"sm",sx:{opacity:"0.5"},children:e.profileModel&&e.profileModel.country?e.profileModel.country.name:""})]})]})}),c.jsx("td",{style:{textAlign:"center"},children:e.points}),c.jsx("td",{style:{textAlign:"center"},children:e.predictionsMade}),c.jsx("td",{children:c.jsx(v.Input,{name:"note",value:s,placeholder:"This user has...",onChange:p,sx:{backgroundColor:"#fff"}})}),c.jsx("td",{children:c.jsx(Rm,{labels:n,tags:u,onChange:m})}),c.jsx("td",{children:c.jsx(v.Tooltip,{title:n.clearWinner,children:c.jsx(v.IconButton,{onClick:g,variant:"outlined",color:"danger",disabled:!f,children:c.jsx(De.Remove,{})})})})]})},gB=e=>{const t=(i,o,a)=>{if(e.winners.find(d=>d.profileId===i)){const d=e.winners.map(f=>f.profileId===i?q(z({},f),{[o]:a}):f);r(d);return}const l=new FM;l.profileId=i,l[o]=a;const u=[...e.winners,l];r(u)},n=i=>{const o=e.winners.filter(a=>a.profileId!==i);r(o)},r=i=>{e.setWinnersRequestBody(o=>q(z({},o),{userList:i}))};return e.leaderboard?c.jsxs(c.Fragment,{children:[c.jsx(v.Typography,{level:"h4",children:e.labels.configureWinners}),e.leaderboard.length===0?c.jsx(v.Typography,{level:"body-lg",textAlign:"center",fontWeight:"bold",children:e.labels.noStandingsAvailable}):c.jsx(c.Fragment,{}),c.jsxs(v.Table,{variant:"outlined",hoverRow:!1,borderAxis:"bothBetween",size:"sm",sx:{backgroundColor:"#fff","& > thead > tr > th:last-child, & > tbody > tr > td:last-child":{textAlign:"center",width:"50px"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"}},children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{style:{width:"70px"},children:e.labels.position}),c.jsx("th",{children:e.labels.nicknameAndName}),c.jsx("th",{style:{width:"70px",textAlign:"center"},children:e.labels.points}),c.jsx("th",{style:{width:"100px",textAlign:"center"},children:e.labels.predictions}),c.jsx("th",{children:e.labels.note}),c.jsx("th",{children:e.labels.tags}),c.jsx("th",{children:e.labels.actions})]})}),c.jsxs("tbody",{children:[e.leaderboard.length>0?e.leaderboard.map(i=>c.jsx(pB,{winner:e.winners.find(o=>o.profileId===i.profileId)||{position:"",profileId:"",note:"",tags:[]},profile:i,labels:e.labels,onChange:(o,a)=>t(i.profileId,o,a),onRemove:()=>n(i.profileId)},`winner-profile-${i.profileId}`)):c.jsx(c.Fragment,{}),c.jsx("tr",{children:c.jsx("td",{colSpan:7,children:e.hasMoreParticipants?c.jsx(v.Box,{textAlign:"center",my:1,children:c.jsx(v.Button,{variant:"plain",sx:{width:"100%"},onClick:()=>e.setPage(i=>i+1),loading:e.isLoading,children:e.labels.loadMore})}):c.jsx(c.Fragment,{})})})]})]})]}):c.jsx(fs,{my:40})},mB=(e,t,n,r,i)=>{const[o,a]=x.useState(null),[s,l]=x.useState(!1),[u,d]=x.useState(!1),{sdk:f}=lt(),h=()=>_(this,null,function*(){d(!0);const p={limit:10,page:r},m=!0;try{let g;t==="template"?g=yield f.loyalty.getLeaderboard(e,p,m):g=yield f.loyalty.getLeaderboardForGame(e,p,m),g.meta.pagination.numberOfPages>r?l(!0):l(!1),o&&o.length?a(b=>[...b,...g.data]):a(g.data)}catch(g){console.error(g),i("danger",n),a([])}d(!1)});return x.useEffect(()=>{h()},[r]),{leaderboard:o,hasMoreParticipants:s,isLeaderboardLoading:u}};class vB{constructor(){ne(this,"isValid",!0);ne(this,"message","");ne(this,"validate",(t,n,r)=>(this.validateField(t,n),this.validateWinnerIds(t,r),this));ne(this,"validateField",(t,n)=>{const r=t.every(i=>i.position&&i.profileId);r||(this.isValid=r,this.message=n)});ne(this,"validateWinnerIds",(t,n)=>{const r=t.map(o=>o.profileId),i=new Set(r);r.length!==i.size&&(this.isValid=!1,this.message=n)})}}const bB=e=>{const t=e.winners.userList.length>0&&(e.winners.userList[0].position||e.winners.userList[0].profileId||e.winners.userList[0].note||e.winners.userList[0].tags.length);return c.jsx(v.Card,{variant:"plain",children:t?c.jsxs(c.Fragment,{children:[c.jsx(v.Typography,{level:"body-lg",mb:2,fontWeight:"bold",children:e.labels.preview}),c.jsx(v.Sheet,{children:c.jsxs(v.Table,{sx:{"& > thead > tr > th:nth-of-type(n + 3), & > tbody > tr > td:nth-of-type(n + 3)":{textAlign:"right"},"& > thead > tr > th:nth-of-type(3), & > thead > tr > th:nth-of-type(4), & > tbody > tr > td:nth-of-type(3), & > tbody > tr > td:nth-of-type(4)":{fontSize:"sm",display:{xs:"none",md:"table-cell"}}},children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{style:{width:"3%"},children:"#"}),c.jsx("th",{children:e.labels.name}),c.jsx("th",{children:e.labels.note}),c.jsx("th",{children:e.labels.tags})]})}),c.jsx("tbody",{children:e.winners.userList.map(n=>{var i;const r=e.profiles.find(o=>o.id===n.profileId);return c.jsxs("tr",{children:[c.jsx("td",{children:n.position}),c.jsx("td",{children:c.jsxs(v.Box,{display:"flex",alignItems:"center",justifyContent:{xs:"center",md:"flex-start"},gap:2,children:[c.jsx(v.Avatar,{src:(r==null?void 0:r.avatar)||"",alt:(r==null?void 0:r.name)||"Unknown"}),c.jsxs(v.Box,{textAlign:"left",children:[c.jsxs(v.Typography,{fontWeight:"bold",children:[(r==null?void 0:r.nickname)||"-------------"," ",c.jsxs(v.Typography,{children:["(",(r==null?void 0:r.name)||"-------------",")"]})]}),c.jsx(v.Typography,{fontSize:"sm",color:"neutral",children:(i=r==null?void 0:r.country)==null?void 0:i.name})]})]})}),c.jsx("td",{children:n.note}),c.jsx("td",{children:n.tags.map(o=>c.jsx(v.Chip,{variant:"soft",color:"neutral",size:"sm",sx:{mr:1},children:o},`preview-winner-${n.profileId}-tag-${o}`))})]},`preview-winner-${n.profileId}`)})})]})})]}):c.jsx(v.Typography,{textAlign:"center",fontWeight:"bold",children:e.labels.noSetWinnersMessage})})},yB=e=>Object.keys(e).length?(e.userList||(e.userList=[]),e):new Lm,xB=e=>{var y;const[t,n]=x.useState(yB(e.winners)),[r,i]=x.useState(((y=e.winners)==null?void 0:y.description)||""),[o,a]=x.useState(!1),[s,l]=x.useState(1),[u,d]=x.useState(!1),[f,h]=x.useState("danger"),[p,m]=x.useState(""),g=(A,E)=>{h(A),m(E),d(!0)},{leaderboard:b,hasMoreParticipants:w,isLeaderboardLoading:S}=mB(e.entityId,e.entityType,e.labels.leaderboardErrorMessage,s,g),{https:C}=lt(),I=()=>_(this,null,function*(){a(!0);const A=JSON.parse(JSON.stringify(t));if(A.contestId=e.entityId,A.contestType=e.entityType==="template"?"TEMPLATE":"GAME",A.description=r,delete A.contestModel,A.userList.length>0){const k=new vB().validate(A.userList,e.labels.positionAndWinnerRequiredMessage,e.labels.sameChosenWinnerMessage);if(!k.isValid){g("danger",k.message),a(!1);return}}else delete A.userList;const E=mu(A);try{yield C.setWinners(E),g("success",Object.keys(e.winners).length?e.labels.editWinnersMessage:e.labels.createWinnersMessage)}catch(k){console.error(k),g("danger",Object.keys(e.winners).length?e.labels.editWinnersErrorMessage:e.labels.createWinnersErrorMessage)}a(!1)});return c.jsxs(c.Fragment,{children:[c.jsx("section",{style:{marginRight:"auto",marginLeft:"auto"},children:c.jsx(v.Box,{width:"100%",overflow:"hidden",borderRadius:"4px",bgcolor:"#fff",children:c.jsxs(v.Box,{width:"100%",sx:{overflowX:"auto"},children:[c.jsxs(v.Card,{variant:"plain",children:[c.jsx(dc,{property:"description",label:e.labels.description,defaultValue:r,placeholder:e.labels.winnersDescription,onChange:A=>{i(A)}}),c.jsx(gB,{winners:t.userList,leaderboard:b,hasMoreParticipants:w,isLoading:S,setPage:l,setWinnersRequestBody:n,labels:e.labels}),c.jsx(v.Box,{textAlign:"center",my:3,children:c.jsx(v.Button,{variant:"solid",color:"primary",onClick:I,loading:o,children:e.labels.save})}),c.jsx(v.Divider,{sx:{my:4}})]}),b?c.jsx(bB,{winners:t,profiles:b.map(A=>A.profileModel),labels:e.labels}):c.jsx(c.Fragment,{})]})})}),c.jsx(nt,{showToast:u,color:f,message:p,hideToast:()=>d(!1)})]})},CB=e=>{const[t,n]=x.useState(!1),r=()=>n(!0),i=NM(e.entityId,e.entityType,r);return i?c.jsxs(c.Fragment,{children:[c.jsxs(v.Box,{p:2,children:[c.jsx(v.Typography,{fontSize:"12px",sx:{cursor:"pointer"},startDecorator:c.jsx($M,{fontSize:"inherit"}),onClick:e.onClickBack,children:e.labels.back}),c.jsxs(v.Typography,{level:"h3",children:[e.labels.manageWinners,":"," ",c.jsx(v.Typography,{level:"title-lg",fontWeight:"italic",children:e.entityName})]})]}),c.jsx(xB,{labels:e.labels,winners:i,entityId:e.entityId,entityType:e.entityType}),c.jsx(nt,{showToast:t,color:"danger",message:e.labels.winnersErrorMessage,hideToast:()=>n(!1)})]}):c.jsx(fs,{my:50})},wB=10,IB=e=>{var f;const[t,n]=x.useState([]),[r,i]=x.useState(!1),[o,a]=x.useState(""),{sdk:s}=lt(),l=x.useMemo(()=>or(h=>{if(!h){n([]),i(!1);return}i(!0),s.football.search({query:h}).then(p=>{n([...iv(p)]),i(!1)}).catch(p=>{console.error(p),n([]),i(!1)})},300),[]);x.useEffect(()=>(l(o),()=>l.cancel()),[o,l]);const u=(h,p)=>{const m=p.map(g=>g.id);e.setOptions(p),e.handleResetData(),e.setFilters(g=>q(z({},g),{entityIds:m}))},d=(h,p)=>h.map((m,g)=>c.jsx(v.Chip,{variant:"solid",endDecorator:c.jsx(v.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:b=>p({index:g}).onClick(b),children:c.jsx(De.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:c.jsx(wn,{option:m},`option_${m.id}`)},m.id));return c.jsxs(v.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[c.jsx(v.FormLabel,{sx:{fontSize:12},color:"primary",children:e.labels.contextEntityTag}),c.jsx(v.Autocomplete,{getOptionDisabled:()=>e.options.length===wB,forcePopupIcon:!1,multiple:!0,loading:r,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(h,p)=>h.id===p.id,endDecorator:r?c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.options.length>0?"":e.labels.typeContextTagNamePlaceholder,options:t,filterOptions:h=>h.filter(p=>!e.options.some(m=>m.value===p.value)),onInputChange:(h,p)=>{a(p)},onChange:u,getOptionKey:h=>h.id,groupBy:h=>h.group+"s",value:(f=e.options)!=null?f:[],renderTags:d,renderOption:(h,p)=>c.jsx(v.AutocompleteOption,q(z({},h),{children:c.jsx(wn,{option:p})}))})]})};function ov(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var fo;(function(e){e.event="event",e.props="prop"})(fo||(fo={}));function ar(){}function SB(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(o,a){return o===t[a]})||(t=r,n=e.apply(void 0,r)),n}}function ho(e){return!!(e||"").match(/\d/)}function fi(e){return e==null}function AB(e){return typeof e=="number"&&isNaN(e)}function av(e){return fi(e)||AB(e)||typeof e=="number"&&!isFinite(e)}function sv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function TB(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function EB(e,t,n){var r=TB(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,"$1"+t)}function kB(e){var t=x.useRef(e);t.current=e;var n=x.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t.current.apply(t,r)});return n.current}function bu(e,t){t===void 0&&(t=!0);var n=e[0]==="-",r=n&&t;e=e.replace("-","");var i=e.split("."),o=i[0],a=i[1]||"";return{beforeDecimal:o,afterDecimal:a,hasNegation:n,addNegation:r}}function _B(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(t?"-":"")+r+(i?"."+i:"")}function lv(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function cv(e,t){return Array(t+1).join(e)}function uv(e){var t=e+"",n=t[0]==="-"?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],o=r[1];if(o=Number(o),!o)return n+i;i=i.replace(".","");var a=1+o,s=i.length;return a<0?i="0."+cv("0",Math.abs(a))+i:a>=s?i=i+cv("0",a-s):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function dv(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=bu(e),o=i.beforeDecimal,a=i.afterDecimal,s=i.hasNegation,l=parseFloat("0."+(a||"0")),u=a.length<=t?"0."+a:l.toFixed(t),d=u.split("."),f=o;o&&Number(d[0])&&(f=o.split("").reverse().reduce(function(g,b,w){return g.length>w?(Number(g[0])+Number(b)).toString()+g.substring(1,g.length):b+g},d[0]));var h=lv(d[1]||"",t,n),p=s?"-":"",m=r?".":"";return""+p+f+m+h}function Tr(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var fv=SB(function(e,t){for(var n=0,r=0,i=e.length,o=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[o-1-r]&&o-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:o-r}}}),PB=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function DB(e,t,n){return Math.min(Math.max(e,t),n)}function yu(e){return Math.max(e.selectionStart,e.selectionEnd)}function OB(){return typeof navigator!="undefined"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function RB(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function LB(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function MB(e,t,n,r,i,o,a){a===void 0&&(a=LB);var s=i.findIndex(function(I){return I}),l=e.slice(0,s);!t&&!n.startsWith(l)&&(t=l,n=l+n,r=r+l.length);for(var u=n.length,d=e.length,f={},h=new Array(u),p=0;p<u;p++){h[p]=-1;for(var m=0,g=d;m<g;m++){var b=a({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m});if(b&&f[m]!==!0){h[p]=m,f[m]=!0;break}}}for(var w=r;w<u&&(h[w]===-1||!o(n[w]));)w++;var S=w===u||h[w]===-1?d:h[w];for(w=r-1;w>0&&h[w]===-1;)w--;var C=w===-1||h[w]===-1?0:h[w]+1;return C>S?S:r-C<S-r?C:S}function hv(e,t,n,r){var i=e.length;if(t=DB(t,0,i),r==="left"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function BB(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(ho(e[n])||ho(e[n-1]));return t}function pv(e,t,n,r,i,o){o===void 0&&(o=ar);var a=kB(function(m,g){var b,w;return av(m)?(w="",b=""):typeof m=="number"||g?(w=typeof m=="number"?uv(m):m,b=r(w)):(w=i(m,void 0),b=r(w)),{formattedValue:b,numAsString:w}}),s=x.useState(function(){return a(fi(e)?t:e,n)}),l=s[0],u=s[1],d=function(m,g){m.formattedValue!==l.formattedValue&&u({formattedValue:m.formattedValue,numAsString:m.value}),o(m,g)},f=e,h=n;fi(e)&&(f=l.numAsString,h=!0);var p=a(f,h);return x.useMemo(function(){u(p)},[p.formattedValue]),[l,d]}function $B(e){return e.replace(/[^0-9]/g,"")}function NB(e){return e}function FB(e){var t=e.type;t===void 0&&(t="text");var n=e.displayType;n===void 0&&(n="input");var r=e.customInput,i=e.renderText,o=e.getInputRef,a=e.format;a===void 0&&(a=NB);var s=e.removeFormatting;s===void 0&&(s=$B);var l=e.defaultValue,u=e.valueIsNumericString,d=e.onValueChange,f=e.isAllowed,h=e.onChange;h===void 0&&(h=ar);var p=e.onKeyDown;p===void 0&&(p=ar);var m=e.onMouseUp;m===void 0&&(m=ar);var g=e.onFocus;g===void 0&&(g=ar);var b=e.onBlur;b===void 0&&(b=ar);var w=e.value,S=e.getCaretBoundary;S===void 0&&(S=BB);var C=e.isValidInputCharacter;C===void 0&&(C=ho);var I=e.isCharacterSame,y=ov(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),A=pv(w,l,!!u,a,s,d),E=A[0],k=E.formattedValue,F=E.numAsString,Y=A[1],O=x.useRef(),T=x.useRef({formattedValue:k,numAsString:F}),N=function(de,pe){T.current={formattedValue:de.formattedValue,numAsString:de.value},Y(de,pe)},V=x.useState(!1),j=V[0],$=V[1],M=x.useRef(null),H=x.useRef({setCaretTimeout:null,focusTimeout:null});x.useEffect(function(){return $(!0),function(){clearTimeout(H.current.setCaretTimeout),clearTimeout(H.current.focusTimeout)}},[]);var Q=a,te=function(de,pe){var xe=parseFloat(pe);return{formattedValue:de,value:pe,floatValue:isNaN(xe)?void 0:xe}},R=function(de,pe,xe){de.selectionStart===0&&de.selectionEnd===de.value.length||(Tr(de,pe),H.current.setCaretTimeout=setTimeout(function(){de.value===xe&&de.selectionStart!==pe&&Tr(de,pe)},0))},L=function(de,pe,xe){return hv(de,pe,S(de),xe)},U=function(de,pe,xe){var Te=S(pe),We=MB(pe,k,de,xe,Te,C,I);return We=hv(pe,We,Te),We},W=function(de){var pe=de.formattedValue;pe===void 0&&(pe="");var xe=de.input,Te=de.source,We=de.event,Pe=de.numAsString,Ee;if(xe){var It=de.inputValue||xe.value,St=yu(xe);xe.value=pe,Ee=U(It,pe,St),Ee!==void 0&&R(xe,Ee,pe)}pe!==k&&N(te(pe,Pe),{event:We,source:Te})};x.useEffect(function(){var de=T.current,pe=de.formattedValue,xe=de.numAsString;(k!==pe||F!==xe)&&N(te(k,F),{event:void 0,source:fo.props})},[k,F]);var re=M.current?yu(M.current):void 0,se=typeof window!="undefined"?x.useLayoutEffect:x.useEffect;se(function(){var de=M.current;if(k!==T.current.formattedValue&&de){var pe=U(T.current.formattedValue,k,re);de.value=k,R(de,pe,k)}},[k]);var ae=function(de,pe,xe){var Te=pe.target,We=O.current?PB(O.current,Te.selectionEnd):fv(k,de),Pe=Object.assign(Object.assign({},We),{lastValue:k}),Ee=s(de,Pe),It=Q(Ee);if(Ee=s(It,void 0),f&&!f(te(It,Ee))){var St=pe.target,jt=yu(St),Lt=U(de,k,jt);return St.value=k,R(St,Lt,k),!1}return W({formattedValue:It,numAsString:Ee,inputValue:de,event:pe,source:xe,input:pe.target}),!0},X=function(de,pe){pe===void 0&&(pe=0);var xe=de.selectionStart,Te=de.selectionEnd;O.current={selectionStart:xe,selectionEnd:Te+pe}},le=function(de){var pe=de.target,xe=pe.value,Te=ae(xe,de,fo.event);Te&&h(de),O.current=void 0},Z=function(de){var pe=de.target,xe=de.key,Te=pe.selectionStart,We=pe.selectionEnd,Pe=pe.value;Pe===void 0&&(Pe="");var Ee;xe==="ArrowLeft"||xe==="Backspace"?Ee=Math.max(Te-1,0):xe==="ArrowRight"?Ee=Math.min(Te+1,Pe.length):xe==="Delete"&&(Ee=Te);var It=0;xe==="Delete"&&Te===We&&(It=1);var St=xe==="ArrowLeft"||xe==="ArrowRight";if(Ee===void 0||Te!==We&&!St){p(de),X(pe,It);return}var jt=Ee;if(St){var Lt=xe==="ArrowLeft"?"left":"right";jt=L(Pe,Ee,Lt),jt!==Ee&&de.preventDefault()}else xe==="Delete"&&!C(Pe[Ee])?jt=L(Pe,Ee,"right"):xe==="Backspace"&&!C(Pe[Ee])&&(jt=L(Pe,Ee,"left"));jt!==Ee&&R(pe,jt,Pe),p(de),X(pe,It)},he=function(de){var pe=de.target,xe=function(){var Te=pe.selectionStart,We=pe.selectionEnd,Pe=pe.value;if(Pe===void 0&&(Pe=""),Te===We){var Ee=L(Pe,Te);Ee!==Te&&R(pe,Ee,Pe)}};xe(),requestAnimationFrame(function(){xe()}),m(de),X(pe)},Se=function(de){de.persist&&de.persist();var pe=de.target,xe=de.currentTarget;M.current=pe,H.current.focusTimeout=setTimeout(function(){var Te=pe.selectionStart,We=pe.selectionEnd,Pe=pe.value;Pe===void 0&&(Pe="");var Ee=L(Pe,Te);Ee!==Te&&!(Te===0&&We===Pe.length)&&R(pe,Ee,Pe),g(Object.assign(Object.assign({},de),{currentTarget:xe}))},0)},He=function(de){M.current=null,clearTimeout(H.current.focusTimeout),clearTimeout(H.current.setCaretTimeout),b(de)},wt=j&&OB()?"numeric":void 0,ct=Object.assign({inputMode:wt},y,{type:t,value:k,onChange:le,onKeyDown:Z,onMouseUp:he,onFocus:Se,onBlur:He});if(n==="text")return i?x.createElement(x.Fragment,null,i(k,y)||null):x.createElement("span",Object.assign({},y,{ref:o}),k);if(r){var _t=r;return x.createElement(_t,Object.assign({},ct,{ref:o}))}return x.createElement("input",Object.assign({},ct,{ref:o}))}function gv(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i="");var o=t.suffix;o===void 0&&(o="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var l=hs(t),u=l.thousandSeparator,d=l.decimalSeparator,f=n!==0&&e.indexOf(".")!==-1||n&&r,h=bu(e,a),p=h.beforeDecimal,m=h.afterDecimal,g=h.addNegation;return n!==void 0&&(m=lv(m,n,!!r)),u&&(p=EB(p,u,s)),i&&(p=i+p),o&&(m=m+o),g&&(p="-"+p),e=p+(f&&d||"")+m,e}function hs(e){var t=e.decimalSeparator;t===void 0&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function zB(e,t){e===void 0&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(e),o=r.test(e);return e=e.replace(/-/g,""),i&&!o&&t&&(e="-"+e),e}function jB(e,t){return new RegExp("(^-)|[0-9]|"+sv(e),"g")}function UB(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function VB(e,t,n){var r;t===void 0&&(t=RB(e));var i=n.allowNegative,o=n.prefix;o===void 0&&(o="");var a=n.suffix;a===void 0&&(a="");var s=n.decimalScale,l=t.from,u=t.to,d=u.start,f=u.end,h=hs(n),p=h.allowedDecimalSeparators,m=h.decimalSeparator,g=e[f]===m;if(ho(e)&&(e===o||e===a)&&t.lastValue==="")return e;if(f-d===1&&p.indexOf(e[d])!==-1){var b=s===0?"":m;e=e.substring(0,d)+b+e.substring(d+1,e.length)}var w=function(M,H,Q){var te=!1,R=!1;o.startsWith("-")?te=!1:M.startsWith("--")?(te=!1,R=!0):a.startsWith("-")&&M.length===a.length?te=!1:M[0]==="-"&&(te=!0);var L=te?1:0;return R&&(L=2),L&&(M=M.substring(L),H-=L,Q-=L),{value:M,start:H,end:Q,hasNegation:te}},S=w(e,d,f),C=S.hasNegation;r=S,e=r.value,d=r.start,f=r.end;var I=w(t.lastValue,l.start,l.end),y=I.start,A=I.end,E=I.value,k=e.substring(d,f);e.length&&E.length&&(y>E.length-a.length||A<o.length)&&!(k&&a.startsWith(k))&&(e=E);var F=0;e.startsWith(o)?F+=o.length:d<o.length&&(F=d),e=e.substring(F),f-=F;var Y=e.length,O=e.length-a.length;e.endsWith(a)?Y=O:(f>O||f>e.length-a.length)&&(Y=f),e=e.substring(0,Y),e=zB(C?"-"+e:e,i),e=(e.match(jB(m))||[]).join("");var T=e.indexOf(m);e=e.replace(new RegExp(sv(m),"g"),function(M,H){return H===T?".":""});var N=bu(e,i),V=N.beforeDecimal,j=N.afterDecimal,$=N.addNegation;return u.end-u.start<l.end-l.start&&V===""&&g&&!parseFloat(j)&&(e=$?"-":""),e}function HB(e,t){var n=t.prefix;n===void 0&&(n="");var r=t.suffix;r===void 0&&(r="");var i=Array.from({length:e.length+1}).map(function(){return!0}),o=e[0]==="-";i.fill(!1,0,n.length+(o?1:0));var a=e.length;return i.fill(!1,a-r.length+1,a+1),i}function WB(e){var t=hs(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i="");var o=e.allowNegative;if(o===void 0&&(o=!0),n===r)throw new Error(`
|
|
2464
2464
|
Decimal separator can't be same as thousand separator.
|
|
2465
2465
|
thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
2466
2466
|
decimalSeparator: `+r+` (default value for decimalSeparator is .)
|
|
@@ -2468,11 +2468,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2468
2468
|
Prefix can't start with '-' when allowNegative is true.
|
|
2469
2469
|
prefix: `+i+`
|
|
2470
2470
|
allowNegative: `+o+`
|
|
2471
|
-
`),o=!1),Object.assign(Object.assign({},e),{allowNegative:o})}function GB(e){e=WB(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=ar);var o=e.onBlur;o===void 0&&(o=ar);var a=e.thousandSeparator,s=e.decimalScale,l=e.fixedDecimalScale,u=e.prefix;u===void 0&&(u="");var d=e.defaultValue,f=e.value,h=e.valueIsNumericString,p=e.onValueChange,m=ov(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=hs(e),b=g.decimalSeparator,w=g.allowedDecimalSeparators,S=function($){return gv($,e)},C=function($,M){return VB($,M,e)},I=fi(f)?d:f,y=h!=null?h:UB(I,u,t);fi(f)?fi(d)||(y=y||typeof d=="number"):y=y||typeof f=="number";var A=function($){return av($)?$:(typeof $=="number"&&($=uv($)),y&&typeof s=="number"?dv($,s,!!l):$)},E=pv(A(f),A(d),!!y,S,C,p),k=E[0],F=k.numAsString,Y=k.formattedValue,O=E[1],T=function($){var M=$.target,H=$.key,Q=M.selectionStart,te=M.selectionEnd,R=M.value;if(R===void 0&&(R=""),(H==="Backspace"||H==="Delete")&&te<u.length){$.preventDefault();return}if(Q!==te){i($);return}H==="Backspace"&&R[0]==="-"&&Q===u.length+1&&n&&Tr(M,1),s&&l&&(H==="Backspace"&&R[Q-1]===b?(Tr(M,Q-1),$.preventDefault()):H==="Delete"&&R[Q]===b&&$.preventDefault()),w!=null&&w.includes(H)&&R[Q]===b&&Tr(M,Q+1);var L=a===!0?",":a;H==="Backspace"&&R[Q-1]===L&&Tr(M,Q-1),H==="Delete"&&R[Q]===L&&Tr(M,Q+1),i($)},N=function($){var M=F;if(M.match(/\d/g)||(M=""),r||(M=_B(M)),l&&s&&(M=dv(M,s,l)),M!==F){var H=gv(M,e);O({formattedValue:H,value:M,floatValue:parseFloat(M)},{event:$,source:fo.event})}o($)},V=function($){return $===b?!0:ho($)},j=function($){var M=$.currentValue,H=$.lastValue,Q=$.formattedValue,te=$.currentValueIndex,R=$.formattedValueIndex,L=M[te],U=Q[R],W=fv(H,M),re=W.to,se=function(ae){return C(ae).indexOf(".")+u.length};return f===0&&l&&s&&M[re.start]===b&&se(M)<te&&se(Q)>R?!1:te>=re.start&&te<re.end&&w&&w.includes(L)&&U===b?!0:L===U};return Object.assign(Object.assign({},m),{value:Y,valueIsNumericString:!1,isValidInputCharacter:V,isCharacterSame:j,onValueChange:O,format:S,removeFormatting:C,getCaretBoundary:function($){return HB($,e)},onKeyDown:T,onBlur:N})}function YB(e){var t=GB(e);return x.createElement(FB,Object.assign({},t))}const KB=G.forwardRef(function(t,n){const a=t,{onChange:r,isAllowed:i}=a,o=Ge(a,["onChange","isAllowed"]);return c.jsx(YB,q(z({},o),{getInputRef:n,onValueChange:s=>{r({target:{name:t.name,value:s.value}})},thousandSeparator:!0,valueIsNumericString:!0,isAllowed:i}))}),xu=e=>{const t=n=>{e.onChange(Number(n.target.value))};return c.jsxs(fu,{size:e.size||"sm",children:[c.jsx(hu,{children:e.label}),c.jsx(Ga,{sx:e.sx,value:e.defaultValue,onChange:t,disabled:e.disabled||!1,slotProps:{input:{component:KB,isAllowed:e.isAllowed?e.isAllowed:()=>!0}}}),e.description?c.jsx(v.FormHelperText,{children:e.description}):c.jsx(c.Fragment,{})]})},QB=e=>e.startsWith("fb:c:")?"competition":e.startsWith("fb:t:")?"team":"player",qB=(e,t,n,r)=>{const i=e.filter(u=>u.type.toLocaleLowerCase()==="competition").map(u=>u.id),o=e.filter(u=>u.type.toLocaleLowerCase()==="team").map(u=>u.id),a=e.filter(u=>u.type.toLocaleLowerCase()==="player").map(u=>u.id),s=[],l=[];if(i.length>0){const u=t.football.getCompetitions({competitionIds:i}).then(d=>{l.push(d)}).catch(d=>{console.error(d),r()});s.push(u)}if(o.length>0){const u=t.football.getTeams({teamIds:o}).then(d=>{l.push(d.data)}).catch(d=>{console.error(d),r()});s.push(u)}if(a.length>0){const u=t.football.getPlayers({playerIds:a}).then(d=>{l.push(d.data)}).catch(d=>{console.error(d),r()});s.push(u)}Promise.all(s).then(()=>{const d=Array.prototype.concat.apply([],l).map(f=>JB(f));n(d)})},JB=e=>{const t=new rv;return t.label=e.name,t.value=e.name,t.id=e.id,t.group=QB(e.id),e.birthDate?t.logo=e.assets&&e.assets.headshot&&e.assets.headshot:t.logo=e.assets&&e.assets.logo&&e.assets.logo,t.countryName=e.country.name,t.countryFlag=e.country.assets&&e.country.assets.flag?e.country.assets.flag:ze.country,t},XB=10,ZB=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),[s,l]=x.useState(""),[u,d]=x.useState(!1),{sdk:f}=lt(),h=()=>d(!u),p=(b,w)=>{n(w),e.onChangeTags(w)};x.useEffect(()=>{qB(e.tags,f,n,h)},[e.tags]);const m=x.useMemo(()=>or(b=>{if(!b){i([]),a(!1);return}a(!0),f.football.search({query:b}).then(w=>{i([...iv(w)]),a(!1)}).catch(w=>{console.error(w),i([]),a(!1)})},300),[]);x.useEffect(()=>(m(s),()=>m.cancel()),[s,m]);const g=(b,w)=>b.map((S,C)=>c.jsx(v.Chip,{variant:"solid",endDecorator:c.jsx(v.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:I=>w({index:C}).onClick(I),children:c.jsx(De.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:c.jsx(wn,{option:S},`option_${S.id}`)},S.id));return c.jsxs(v.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[c.jsx(v.FormLabel,{color:"primary",children:e.labels.contextEntityTag}),c.jsx(v.Autocomplete,{getOptionDisabled:()=>t.length===XB,forcePopupIcon:!1,multiple:!0,loading:o,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(b,w)=>b.id===w.id,endDecorator:o?c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:t.length>0?"":e.labels.typeContextTagNamePlaceholder,options:r,filterOptions:b=>b.filter(w=>!t.some(S=>S.value===w.value)),onInputChange:(b,w)=>{l(w)},onChange:p,getOptionKey:b=>b.id,groupBy:b=>b.group+"s",value:t!=null?t:[],renderTags:g,renderOption:(b,w)=>c.jsx(v.AutocompleteOption,q(z({},b),{children:c.jsx(wn,{option:w})}))}),c.jsx(nt,{showToast:u,message:e.labels.getFootballEntitiesErrorMessage,color:"danger",hideToast:h})]})},e$=e=>new Map().set("id",e.id).set("type",e.type).set("label",e.label),t$=e=>{const t=JSON.parse(JSON.stringify(e.context)),n=e.context.content,r=e.context.campaign,i=e$(e.labels),o=(l,u)=>{const d=l.target.value;t.content[u]=d,e.onChange(t)},a=(l,u)=>{const d=l.target.value;t.campaign[u]=d,e.onChange(t)},s=l=>{l.length?t.tags=l.map(u=>({id:u.id,type:u.group,source:"football"})):t.tags=[],e.onChange(t)};return c.jsx(c.Fragment,{children:c.jsxs(Hh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[c.jsxs(Wh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${hc.root}`]:{'&[aria-selected="true"]':{bgcolor:"transparent",py:1,borderColor:"transparent","&::before":{content:'""',display:"block",position:"absolute",height:2,bottom:-2,left:0,right:0},"&::after":{bgcolor:"primary.500"}}}},tabFlex:"auto",children:[c.jsx(Wr,{children:e.labels.tags}),c.jsx(Wr,{children:e.labels.content}),c.jsx(Wr,{children:e.labels.campaign})]}),c.jsx(ei,{value:0,sx:{px:0},children:c.jsx(ZB,{labels:e.labels,tags:e.context.tags,onChangeTags:s})}),c.jsx(ei,{value:1,sx:{px:0},children:Object.keys(n).map(l=>c.jsx(v.Box,{mb:2,children:c.jsx(xn,{label:i.get(l),placeholder:"",defaultValue:n[l],required:!1,size:"sm",onChange:u=>o(u,l)})},`context-content-${l}`))}),c.jsx(ei,{value:2,sx:{px:0},children:Object.keys(r).map(l=>c.jsx(v.Box,{mb:2,children:c.jsx(xn,{label:i.get(l),placeholder:"",defaultValue:r[l],required:!1,size:"sm",onChange:u=>a(u,l)})},`context-campaign-${l}`))})]})})},n$=e=>e?z({},e):{main:"",mobile:""},r$=e=>{const[t,n]=x.useState(!1),r=n$(e.defaultValue),i=(a,s)=>{r[s]=a,e.onChange(r)},o=a=>{r[a]="",e.onChange(r)};return c.jsxs(v.Box,{sx:{marginBottom:"10px"},children:[c.jsx(co,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:a=>i(a,"main"),clearImage:()=>o("main")}),c.jsx(v.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?c.jsx(co,{labels:e.labels,title:e.labels.mobileImage,image:r.mobile,onChangeImages:a=>i(a,"mobile"),clearImage:()=>o("mobile")}):c.jsx(c.Fragment,{})]})},i$=({defaultValue:e,isClearable:t=!0,labels:n,onChange:r})=>{const i=x.useRef(null),o=[{id:"FREE",label:n.free},{id:"LEAD",label:n.lead},{id:"REGISTERED",label:n.registered},{id:"PAID",label:n.paid}];return c.jsxs(v.FormControl,{size:"sm",sx:{mb:2},children:[c.jsx(v.FormLabel,{children:n.authRequirement}),c.jsx(v.Select,q(z({value:e,size:"sm",slotProps:{button:{sx:{whiteSpace:"nowrap"}}},onChange:(a,s)=>r(s),sx:{minHeight:"37px"}},e&&t&&{endDecorator:c.jsx(v.IconButton,{variant:"plain",color:"neutral",onMouseDown:a=>{a.stopPropagation()},onClick:()=>{var a;r(null),(a=i.current)==null||a.focusVisible()},sx:{width:"18px",height:"18px"},children:c.jsx(bm,{})}),indicator:null}),{children:o.map(a=>c.jsx(v.Option,{value:a.id,children:a.label},a.id))})),c.jsx(v.FormHelperText,{children:n.authRequirementDescription})]})};function o$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return x.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const ps=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function hi(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Cu(e){return"nodeType"in e}function Rt(e){var t,n;return e?hi(e)?e:Cu(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function wu(e){const{Document:t}=Rt(e);return e instanceof t}function po(e){return hi(e)?!1:e instanceof Rt(e).HTMLElement}function mv(e){return e instanceof Rt(e).SVGElement}function pi(e){return e?hi(e)?e.document:Cu(e)?wu(e)?e:po(e)||mv(e)?e.ownerDocument:document:document:document}const ln=ps?x.useLayoutEffect:x.useEffect;function gs(e){const t=x.useRef(e);return ln(()=>{t.current=e}),x.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function a$(){const e=x.useRef(null),t=x.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=x.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function go(e,t){t===void 0&&(t=[e]);const n=x.useRef(e);return ln(()=>{n.current!==e&&(n.current=e)},t),n}function mo(e,t){const n=x.useRef();return x.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ms(e){const t=gs(e),n=x.useRef(null),r=x.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function vs(e){const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current}let Iu={};function vo(e,t){return x.useMemo(()=>{if(t)return t;const n=Iu[e]==null?0:Iu[e]+1;return Iu[e]=n,e+"-"+n},[e,t])}function vv(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((o,a)=>{const s=Object.entries(a);for(const[l,u]of s){const d=o[l];d!=null&&(o[l]=d+e*u)}return o},z({},t))}}const gi=vv(1),bo=vv(-1);function s$(e){return"clientX"in e&&"clientY"in e}function bs(e){if(!e)return!1;const{KeyboardEvent:t}=Rt(e.target);return t&&e instanceof t}function l$(e){if(!e)return!1;const{TouchEvent:t}=Rt(e.target);return t&&e instanceof t}function ys(e){if(l$(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return s$(e)?{x:e.clientX,y:e.clientY}:null}const Hn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Hn.Translate.toString(e),Hn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),bv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function c$(e){return e.matches(bv)?e:e.querySelector(bv)}const u$={display:"none"};function d$(e){let{id:t,value:n}=e;return x.createElement("div",{id:t,style:u$},n)}function f$(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return x.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function h$(){const[e,t]=x.useState("");return{announce:x.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const yv=x.createContext(null);function p$(e){const t=x.useContext(yv);x.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function g$(){const[e]=x.useState(()=>new Set),t=x.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[x.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const m$={draggable:`
|
|
2471
|
+
`),o=!1),Object.assign(Object.assign({},e),{allowNegative:o})}function GB(e){e=WB(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=ar);var o=e.onBlur;o===void 0&&(o=ar);var a=e.thousandSeparator,s=e.decimalScale,l=e.fixedDecimalScale,u=e.prefix;u===void 0&&(u="");var d=e.defaultValue,f=e.value,h=e.valueIsNumericString,p=e.onValueChange,m=ov(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=hs(e),b=g.decimalSeparator,w=g.allowedDecimalSeparators,S=function($){return gv($,e)},C=function($,M){return VB($,M,e)},I=fi(f)?d:f,y=h!=null?h:UB(I,u,t);fi(f)?fi(d)||(y=y||typeof d=="number"):y=y||typeof f=="number";var A=function($){return av($)?$:(typeof $=="number"&&($=uv($)),y&&typeof s=="number"?dv($,s,!!l):$)},E=pv(A(f),A(d),!!y,S,C,p),k=E[0],F=k.numAsString,Y=k.formattedValue,O=E[1],T=function($){var M=$.target,H=$.key,Q=M.selectionStart,te=M.selectionEnd,R=M.value;if(R===void 0&&(R=""),(H==="Backspace"||H==="Delete")&&te<u.length){$.preventDefault();return}if(Q!==te){i($);return}H==="Backspace"&&R[0]==="-"&&Q===u.length+1&&n&&Tr(M,1),s&&l&&(H==="Backspace"&&R[Q-1]===b?(Tr(M,Q-1),$.preventDefault()):H==="Delete"&&R[Q]===b&&$.preventDefault()),w!=null&&w.includes(H)&&R[Q]===b&&Tr(M,Q+1);var L=a===!0?",":a;H==="Backspace"&&R[Q-1]===L&&Tr(M,Q-1),H==="Delete"&&R[Q]===L&&Tr(M,Q+1),i($)},N=function($){var M=F;if(M.match(/\d/g)||(M=""),r||(M=_B(M)),l&&s&&(M=dv(M,s,l)),M!==F){var H=gv(M,e);O({formattedValue:H,value:M,floatValue:parseFloat(M)},{event:$,source:fo.event})}o($)},V=function($){return $===b?!0:ho($)},j=function($){var M=$.currentValue,H=$.lastValue,Q=$.formattedValue,te=$.currentValueIndex,R=$.formattedValueIndex,L=M[te],U=Q[R],W=fv(H,M),re=W.to,se=function(ae){return C(ae).indexOf(".")+u.length};return f===0&&l&&s&&M[re.start]===b&&se(M)<te&&se(Q)>R?!1:te>=re.start&&te<re.end&&w&&w.includes(L)&&U===b?!0:L===U};return Object.assign(Object.assign({},m),{value:Y,valueIsNumericString:!1,isValidInputCharacter:V,isCharacterSame:j,onValueChange:O,format:S,removeFormatting:C,getCaretBoundary:function($){return HB($,e)},onKeyDown:T,onBlur:N})}function YB(e){var t=GB(e);return x.createElement(FB,Object.assign({},t))}const KB=G.forwardRef(function(t,n){const a=t,{onChange:r,isAllowed:i}=a,o=Ge(a,["onChange","isAllowed"]);return c.jsx(YB,q(z({},o),{getInputRef:n,onValueChange:s=>{r({target:{name:t.name,value:s.value}})},thousandSeparator:!0,valueIsNumericString:!0,isAllowed:i}))}),xu=e=>{const t=n=>{e.onChange(Number(n.target.value))};return c.jsxs(fu,{size:e.size||"sm",children:[c.jsx(hu,{children:e.label}),c.jsx(Ga,{sx:e.sx,value:e.defaultValue,onChange:t,disabled:e.disabled||!1,slotProps:{input:{component:KB,isAllowed:e.isAllowed?e.isAllowed:()=>!0}}}),e.description?c.jsx(v.FormHelperText,{children:e.description}):c.jsx(c.Fragment,{})]})},QB=e=>e.startsWith("fb:c:")?"competition":e.startsWith("fb:t:")?"team":"player",qB=(e,t,n,r)=>{const i=e.filter(u=>u.type.toLocaleLowerCase()==="competition").map(u=>u.id),o=e.filter(u=>u.type.toLocaleLowerCase()==="team").map(u=>u.id),a=e.filter(u=>u.type.toLocaleLowerCase()==="player").map(u=>u.id),s=[],l=[];if(i.length>0){const u=t.football.getCompetitions({competitionIds:i}).then(d=>{l.push(d)}).catch(d=>{console.error(d),r()});s.push(u)}if(o.length>0){const u=t.football.getTeams({teamIds:o}).then(d=>{l.push(d.data)}).catch(d=>{console.error(d),r()});s.push(u)}if(a.length>0){const u=t.football.getPlayers({playerIds:a}).then(d=>{l.push(d.data)}).catch(d=>{console.error(d),r()});s.push(u)}Promise.all(s).then(()=>{const d=Array.prototype.concat.apply([],l).map(f=>JB(f));n(d)})},JB=e=>{const t=new rv;return t.label=e.name,t.value=e.name,t.id=e.id,t.group=QB(e.id),e.birthDate?t.logo=e.assets&&e.assets.headshot&&e.assets.headshot:t.logo=e.assets&&e.assets.logo&&e.assets.logo,t.countryName=e.country.name,t.countryFlag=e.country.assets&&e.country.assets.flag?e.country.assets.flag:ze.country,t},XB=10,ZB=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),[s,l]=x.useState(""),[u,d]=x.useState(!1),{sdk:f}=lt(),h=()=>d(!u),p=(b,w)=>{n(w),e.onChangeTags(w)};x.useEffect(()=>{qB(e.tags,f,n,h)},[e.tags]);const m=x.useMemo(()=>or(b=>{if(!b){i([]),a(!1);return}a(!0),f.football.search({query:b}).then(w=>{i([...iv(w)]),a(!1)}).catch(w=>{console.error(w),i([]),a(!1)})},300),[]);x.useEffect(()=>(m(s),()=>m.cancel()),[s,m]);const g=(b,w)=>b.map((S,C)=>c.jsx(v.Chip,{variant:"solid",endDecorator:c.jsx(v.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:I=>w({index:C}).onClick(I),children:c.jsx(De.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:c.jsx(wn,{option:S},`option_${S.id}`)},S.id));return c.jsxs(v.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[c.jsx(v.FormLabel,{color:"primary",children:e.labels.contextEntityTag}),c.jsx(v.Autocomplete,{getOptionDisabled:()=>t.length===XB,forcePopupIcon:!1,multiple:!0,loading:o,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(b,w)=>b.id===w.id,endDecorator:o?c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:t.length>0?"":e.labels.typeContextTagNamePlaceholder,options:r,filterOptions:b=>b.filter(w=>!t.some(S=>S.value===w.value)),onInputChange:(b,w)=>{l(w)},onChange:p,getOptionKey:b=>b.id,groupBy:b=>b.group+"s",value:t!=null?t:[],renderTags:g,renderOption:(b,w)=>c.jsx(v.AutocompleteOption,q(z({},b),{children:c.jsx(wn,{option:w})}))}),c.jsx(nt,{showToast:u,message:e.labels.getFootballEntitiesErrorMessage,color:"danger",hideToast:h})]})},e$=e=>new Map().set("id",e.id).set("type",e.type).set("label",e.label),t$=e=>{const t=JSON.parse(JSON.stringify(e.context)),n=e.context.content,r=e.context.campaign,i=e$(e.labels),o=(l,u)=>{const d=l.target.value;t.content[u]=d,e.onChange(t)},a=(l,u)=>{const d=l.target.value;t.campaign[u]=d,e.onChange(t)},s=l=>{l.length?t.tags=l.map(u=>({id:u.id,type:u.group,source:"football"})):t.tags=[],e.onChange(t)};return c.jsx(c.Fragment,{children:c.jsxs(Hh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[c.jsxs(Wh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${hc.root}`]:{'&[aria-selected="true"]':{bgcolor:"transparent",py:1,borderColor:"transparent","&::before":{content:'""',display:"block",position:"absolute",height:2,bottom:-2,left:0,right:0},"&::after":{bgcolor:"primary.500"}}}},tabFlex:"auto",children:[c.jsx(Wr,{children:e.labels.tags}),c.jsx(Wr,{children:e.labels.content}),c.jsx(Wr,{children:e.labels.campaign})]}),c.jsx(ei,{value:0,sx:{px:0},children:c.jsx(ZB,{labels:e.labels,tags:e.context.tags,onChangeTags:s})}),c.jsx(ei,{value:1,sx:{px:0},children:Object.keys(n).map(l=>c.jsx(v.Box,{mb:2,children:c.jsx(rn,{label:i.get(l),placeholder:"",defaultValue:n[l],required:!1,size:"sm",onChange:u=>o(u,l)})},`context-content-${l}`))}),c.jsx(ei,{value:2,sx:{px:0},children:Object.keys(r).map(l=>c.jsx(v.Box,{mb:2,children:c.jsx(rn,{label:i.get(l),placeholder:"",defaultValue:r[l],required:!1,size:"sm",onChange:u=>a(u,l)})},`context-campaign-${l}`))})]})})},n$=e=>e?z({},e):{main:"",mobile:""},r$=e=>{const[t,n]=x.useState(!1),r=n$(e.defaultValue),i=(a,s)=>{r[s]=a,e.onChange(r)},o=a=>{r[a]="",e.onChange(r)};return c.jsxs(v.Box,{sx:{marginBottom:"10px"},children:[c.jsx(co,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:a=>i(a,"main"),clearImage:()=>o("main")}),c.jsx(v.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?c.jsx(co,{labels:e.labels,title:e.labels.mobileImage,image:r.mobile,onChangeImages:a=>i(a,"mobile"),clearImage:()=>o("mobile")}):c.jsx(c.Fragment,{})]})},i$=({defaultValue:e,isClearable:t=!0,labels:n,onChange:r})=>{const i=x.useRef(null),o=[{id:"FREE",label:n.free},{id:"LEAD",label:n.lead},{id:"REGISTERED",label:n.registered},{id:"PAID",label:n.paid}];return c.jsxs(v.FormControl,{size:"sm",sx:{mb:2},children:[c.jsx(v.FormLabel,{children:n.authRequirement}),c.jsx(v.Select,q(z({value:e,size:"sm",slotProps:{button:{sx:{whiteSpace:"nowrap"}}},onChange:(a,s)=>r(s),sx:{minHeight:"37px"}},e&&t&&{endDecorator:c.jsx(v.IconButton,{variant:"plain",color:"neutral",onMouseDown:a=>{a.stopPropagation()},onClick:()=>{var a;r(null),(a=i.current)==null||a.focusVisible()},sx:{width:"18px",height:"18px"},children:c.jsx(bm,{})}),indicator:null}),{children:o.map(a=>c.jsx(v.Option,{value:a.id,children:a.label},a.id))})),c.jsx(v.FormHelperText,{children:n.authRequirementDescription})]})};function o$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return x.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const ps=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function hi(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Cu(e){return"nodeType"in e}function Rt(e){var t,n;return e?hi(e)?e:Cu(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function wu(e){const{Document:t}=Rt(e);return e instanceof t}function po(e){return hi(e)?!1:e instanceof Rt(e).HTMLElement}function mv(e){return e instanceof Rt(e).SVGElement}function pi(e){return e?hi(e)?e.document:Cu(e)?wu(e)?e:po(e)||mv(e)?e.ownerDocument:document:document:document}const cn=ps?x.useLayoutEffect:x.useEffect;function gs(e){const t=x.useRef(e);return cn(()=>{t.current=e}),x.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function a$(){const e=x.useRef(null),t=x.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=x.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function go(e,t){t===void 0&&(t=[e]);const n=x.useRef(e);return cn(()=>{n.current!==e&&(n.current=e)},t),n}function mo(e,t){const n=x.useRef();return x.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ms(e){const t=gs(e),n=x.useRef(null),r=x.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function vs(e){const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current}let Iu={};function vo(e,t){return x.useMemo(()=>{if(t)return t;const n=Iu[e]==null?0:Iu[e]+1;return Iu[e]=n,e+"-"+n},[e,t])}function vv(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((o,a)=>{const s=Object.entries(a);for(const[l,u]of s){const d=o[l];d!=null&&(o[l]=d+e*u)}return o},z({},t))}}const gi=vv(1),bo=vv(-1);function s$(e){return"clientX"in e&&"clientY"in e}function bs(e){if(!e)return!1;const{KeyboardEvent:t}=Rt(e.target);return t&&e instanceof t}function l$(e){if(!e)return!1;const{TouchEvent:t}=Rt(e.target);return t&&e instanceof t}function ys(e){if(l$(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return s$(e)?{x:e.clientX,y:e.clientY}:null}const Hn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Hn.Translate.toString(e),Hn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),bv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function c$(e){return e.matches(bv)?e:e.querySelector(bv)}const u$={display:"none"};function d$(e){let{id:t,value:n}=e;return x.createElement("div",{id:t,style:u$},n)}function f$(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return x.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function h$(){const[e,t]=x.useState("");return{announce:x.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const yv=x.createContext(null);function p$(e){const t=x.useContext(yv);x.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function g$(){const[e]=x.useState(()=>new Set),t=x.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[x.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const m$={draggable:`
|
|
2472
2472
|
To pick up a draggable item, press the space bar.
|
|
2473
2473
|
While dragging, use the arrow keys to move the item.
|
|
2474
2474
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
2475
|
-
`},v$={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function b$(e){let{announcements:t=v$,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=m$}=e;const{announce:o,announcement:a}=h$(),s=vo("DndLiveRegion"),[l,u]=x.useState(!1);if(x.useEffect(()=>{u(!0)},[]),p$(x.useMemo(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:p}=f;t.onDragMove&&o(t.onDragMove({active:h,over:p}))},onDragOver(f){let{active:h,over:p}=f;o(t.onDragOver({active:h,over:p}))},onDragEnd(f){let{active:h,over:p}=f;o(t.onDragEnd({active:h,over:p}))},onDragCancel(f){let{active:h,over:p}=f;o(t.onDragCancel({active:h,over:p}))}}),[o,t])),!l)return null;const d=x.createElement(x.Fragment,null,x.createElement(d$,{id:r,value:i.draggable}),x.createElement(f$,{id:s,announcement:a}));return n?Re.createPortal(d,n):d}var mt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(mt||(mt={}));function xs(){}function Cs(e,t){return x.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function xv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return x.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const cn=Object.freeze({x:0,y:0});function y$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function x$(e,t){const n=ys(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function C$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function w$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Cv(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function wv(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const I$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=Cv(t),o=[];for(const a of r){const{id:s}=a,l=n.get(s);if(l){const u=Cv(l),d=i.reduce((h,p,m)=>h+y$(u[m],p),0),f=Number((d/4).toFixed(4));o.push({id:s,data:{droppableContainer:a,value:f}})}}return o.sort(C$)};function S$(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){const l=t.width*t.height,u=e.width*e.height,d=a*s,f=d/(l+u-d);return Number(f.toFixed(4))}return 0}const A$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:a}=o,s=n.get(a);if(s){const l=S$(s,t);l>0&&i.push({id:a,data:{droppableContainer:o,value:l}})}}return i.sort(w$)};function T$(e,t,n){return q(z({},e),{scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1})}function Iv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:cn}function E$(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((a,s)=>q(z({},a),{top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),z({},n))}}const k$=E$(1);function Sv(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function _$(e,t,n){const r=Sv(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=e.left-a-(1-i)*parseFloat(n),u=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l}}const P$={ignoreTransform:!1};function mi(e,t){t===void 0&&(t=P$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=Rt(e).getComputedStyle(e);u&&(n=_$(n,u,d))}const{top:r,left:i,width:o,height:a,bottom:s,right:l}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:l}}function Av(e){return mi(e,{ignoreTransform:!0})}function D$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function O$(e,t){return t===void 0&&(t=Rt(e).getComputedStyle(e)),t.position==="fixed"}function R$(e,t){t===void 0&&(t=Rt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function ws(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(wu(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!po(i)||mv(i)||n.includes(i))return n;const o=Rt(e).getComputedStyle(i);return i!==e&&R$(i,o)&&n.push(i),O$(i,o)?n:r(i.parentNode)}return e?r(e):n}function Tv(e){const[t]=ws(e,1);return t!=null?t:null}function Su(e){return!ps||!e?null:hi(e)?e:Cu(e)?wu(e)||e===pi(e).scrollingElement?window:po(e)?e:null:null}function Ev(e){return hi(e)?e.scrollX:e.scrollLeft}function kv(e){return hi(e)?e.scrollY:e.scrollTop}function Au(e){return{x:Ev(e),y:kv(e)}}var xt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(xt||(xt={}));function _v(e){return!ps||!e?!1:e===document.scrollingElement}function Pv(e){const t={x:0,y:0},n=_v(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const L$={x:.2,y:.2};function M$(e,t,n,r,i){let{top:o,left:a,right:s,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=L$);const{isTop:u,isBottom:d,isLeft:f,isRight:h}=Pv(e),p={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+g.height?(p.y=xt.Backward,m.y=r*Math.abs((t.top+g.height-o)/g.height)):!d&&l>=t.bottom-g.height&&(p.y=xt.Forward,m.y=r*Math.abs((t.bottom-g.height-l)/g.height)),!h&&s>=t.right-g.width?(p.x=xt.Forward,m.x=r*Math.abs((t.right-g.width-s)/g.width)):!f&&a<=t.left+g.width&&(p.x=xt.Backward,m.x=r*Math.abs((t.left+g.width-a)/g.width)),{direction:p,speed:m}}function B$(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Dv(e){return e.reduce((t,n)=>gi(t,Au(n)),cn)}function $$(e){return e.reduce((t,n)=>t+Ev(n),0)}function N$(e){return e.reduce((t,n)=>t+kv(n),0)}function Ov(e,t){if(t===void 0&&(t=mi),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);Tv(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const F$=[["x",["left","right"],$$],["y",["top","bottom"],N$]];class Tu{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=ws(n),i=Dv(r);this.rect=z({},t),this.width=t.width,this.height=t.height;for(const[o,a,s]of F$)for(const l of a)Object.defineProperty(this,l,{get:()=>{const u=s(r),d=i[o]-u;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class yo{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function z$(e){const{EventTarget:t}=Rt(e);return e instanceof t?e:pi(e)}function Eu(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(yi(n,2)+yi(r,2))>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var on;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(on||(on={}));function Rv(e){e.preventDefault()}function j$(e){e.stopPropagation()}var ke;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ke||(ke={}));const Lv={start:[ke.Space,ke.Enter],cancel:[ke.Esc],end:[ke.Space,ke.Enter,ke.Tab]},U$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ke.Right:return q(z({},n),{x:n.x+25});case ke.Left:return q(z({},n),{x:n.x-25});case ke.Down:return q(z({},n),{y:n.y+25});case ke.Up:return q(z({},n),{y:n.y-25})}};class Is{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new yo(pi(n)),this.windowListeners=new yo(Rt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(on.Resize,this.handleCancel),this.windowListeners.add(on.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(on.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Ov(r),n(cn)}handleKeyDown(t){if(bs(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=Lv,coordinateGetter:a=U$,scrollBehavior:s="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:cn;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:n,context:r.current,currentCoordinates:d});if(f){const h=bo(f,d),p={x:0,y:0},{scrollableAncestors:m}=r.current;for(const g of m){const b=t.code,{isTop:w,isRight:S,isLeft:C,isBottom:I,maxScroll:y,minScroll:A}=Pv(g),E=B$(g),k={x:Math.min(b===ke.Right?E.right-E.width/2:E.right,Math.max(b===ke.Right?E.left:E.left+E.width/2,f.x)),y:Math.min(b===ke.Down?E.bottom-E.height/2:E.bottom,Math.max(b===ke.Down?E.top:E.top+E.height/2,f.y))},F=b===ke.Right&&!S||b===ke.Left&&!C,Y=b===ke.Down&&!I||b===ke.Up&&!w;if(F&&k.x!==f.x){const O=g.scrollLeft+h.x,T=b===ke.Right&&O<=y.x||b===ke.Left&&O>=A.x;if(T&&!h.y){g.scrollTo({left:O,behavior:s});return}T?p.x=g.scrollLeft-O:p.x=b===ke.Right?g.scrollLeft-y.x:g.scrollLeft-A.x,p.x&&g.scrollBy({left:-p.x,behavior:s});break}else if(Y&&k.y!==f.y){const O=g.scrollTop+h.y,T=b===ke.Down&&O<=y.y||b===ke.Up&&O>=A.y;if(T&&!h.x){g.scrollTo({top:O,behavior:s});return}T?p.y=g.scrollTop-O:p.y=b===ke.Down?g.scrollTop-y.y:g.scrollTop-A.y,p.y&&g.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,gi(bo(f,this.referenceCoordinates),p))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Is.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Lv,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Mv(e){return!!(e&&"distance"in e)}function Bv(e){return!!(e&&"delay"in e)}class ku{constructor(t,n,r){var i;r===void 0&&(r=z$(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:a}=o;this.props=t,this.events=n,this.document=pi(a),this.documentListeners=new yo(this.document),this.listeners=new yo(r),this.windowListeners=new yo(Rt(a)),this.initialCoordinates=(i=ys(o))!=null?i:cn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(on.Resize,this.handleCancel),this.windowListeners.add(on.DragStart,Rv),this.windowListeners.add(on.VisibilityChange,this.handleCancel),this.windowListeners.add(on.ContextMenu,Rv),this.documentListeners.add(on.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Bv(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Mv(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(on.Click,j$,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(on.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const l=(n=ys(t))!=null?n:cn,u=bo(i,l);if(!r&&s){if(Mv(s)){if(s.tolerance!=null&&Eu(u,s.tolerance))return this.handleCancel();if(Eu(u,s.distance))return this.handleStart()}if(Bv(s)&&Eu(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),a(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===ke.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const V$={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Ss extends ku{constructor(t){const{event:n}=t,r=pi(n.target);super(t,V$,r)}}Ss.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const H$={move:{name:"mousemove"},end:{name:"mouseup"}};var _u;(function(e){e[e.RightClick=2]="RightClick"})(_u||(_u={}));class W$ extends ku{constructor(t){super(t,H$,pi(t.event.target))}}W$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===_u.RightClick?!1:(r==null||r({event:n}),!0)}}];const Pu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class G$ extends ku{constructor(t){super(t,Pu)}static setup(){return window.addEventListener(Pu.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Pu.move.name,t)};function t(){}}}G$.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var xo;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(xo||(xo={}));var As;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(As||(As={}));function Y$(e){let{acceleration:t,activator:n=xo.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:s=As.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=Q$({delta:f,disabled:!o}),[m,g]=a$(),b=x.useRef({x:0,y:0}),w=x.useRef({x:0,y:0}),S=x.useMemo(()=>{switch(n){case xo.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case xo.DraggableRect:return i}},[n,i,l]),C=x.useRef(null),I=x.useCallback(()=>{const A=C.current;if(!A)return;const E=b.current.x*w.current.x,k=b.current.y*w.current.y;A.scrollBy(E,k)},[]),y=x.useMemo(()=>s===As.TreeOrder?[...u].reverse():u,[s,u]);x.useEffect(()=>{if(!o||!u.length||!S){g();return}for(const A of y){if((r==null?void 0:r(A))===!1)continue;const E=u.indexOf(A),k=d[E];if(!k)continue;const{direction:F,speed:Y}=M$(A,k,S,t,h);for(const O of["x","y"])p[O][F[O]]||(Y[O]=0,F[O]=0);if(Y.x>0||Y.y>0){g(),C.current=A,m(I,a),b.current=Y,w.current=F;return}}b.current={x:0,y:0},w.current={x:0,y:0},g()},[t,I,r,g,o,a,JSON.stringify(S),JSON.stringify(p),m,u,y,d,JSON.stringify(h)])}const K$={x:{[xt.Backward]:!1,[xt.Forward]:!1},y:{[xt.Backward]:!1,[xt.Forward]:!1}};function Q$(e){let{delta:t,disabled:n}=e;const r=vs(t);return mo(i=>{if(n||!r||!i)return K$;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[xt.Backward]:i.x[xt.Backward]||o.x===-1,[xt.Forward]:i.x[xt.Forward]||o.x===1},y:{[xt.Backward]:i.y[xt.Backward]||o.y===-1,[xt.Forward]:i.y[xt.Forward]||o.y===1}}},[n,t,r])}function q$(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return mo(i=>{var o;return t==null?null:(o=r!=null?r:i)!=null?o:null},[r,t])}function J$(e,t){return x.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...o]},[]),[e,t])}var Co;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Co||(Co={}));var Du;(function(e){e.Optimized="optimized"})(Du||(Du={}));const $v=new Map;function X$(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=x.useState(null),{frequency:s,measure:l,strategy:u}=i,d=x.useRef(e),f=b(),h=go(f),p=x.useCallback(function(w){w===void 0&&(w=[]),!h.current&&a(S=>S===null?w:S.concat(w.filter(C=>!S.includes(C))))},[h]),m=x.useRef(null),g=mo(w=>{if(f&&!n)return $v;if(!w||w===$v||d.current!==e||o!=null){const S=new Map;for(let C of e){if(!C)continue;if(o&&o.length>0&&!o.includes(C.id)&&C.rect.current){S.set(C.id,C.rect.current);continue}const I=C.node.current,y=I?new Tu(l(I),I):null;C.rect.current=y,y&&S.set(C.id,y)}return S}return w},[e,o,n,f,l]);return x.useEffect(()=>{d.current=e},[e]),x.useEffect(()=>{f||p()},[n,f]),x.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),x.useEffect(()=>{f||typeof s!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,f,p,...r]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:o!=null};function b(){switch(u){case Co.Always:return!1;case Co.BeforeDragging:return n;default:return!n}}}function Ou(e,t){return mo(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Z$(e,t){return Ou(e,t)}function eN(e){let{callback:t,disabled:n}=e;const r=gs(t),i=x.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.MutationObserver=="undefined")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return x.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Ts(e){let{callback:t,disabled:n}=e;const r=gs(t),i=x.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.ResizeObserver=="undefined")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return x.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function tN(e){return new Tu(mi(e),e)}function Nv(e,t,n){t===void 0&&(t=tN);const[r,i]=x.useState(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l!=null?l:n)!=null?u:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const a=eN({callback(l){if(e)for(const u of l){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),s=Ts({callback:o});return ln(()=>{o(),e?(s==null||s.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),a==null||a.disconnect())},[e]),r}function nN(e){const t=Ou(e);return Iv(e,t)}const Fv=[];function rN(e){const t=x.useRef(e),n=mo(r=>e?r&&r!==Fv&&e&&t.current&&e.parentNode===t.current.parentNode?r:ws(e):Fv,[e]);return x.useEffect(()=>{t.current=e},[e]),n}function iN(e){const[t,n]=x.useState(null),r=x.useRef(e),i=x.useCallback(o=>{const a=Su(o.target);a&&n(s=>s?(s.set(a,Au(a)),new Map(s)):null)},[]);return x.useEffect(()=>{const o=r.current;if(e!==o){a(o);const s=e.map(l=>{const u=Su(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,Au(u)]):null}).filter(l=>l!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(l=>{const u=Su(l);u==null||u.removeEventListener("scroll",i)})}},[i,e]),x.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>gi(o,a),cn):Dv(e):cn,[e,t])}function zv(e,t){t===void 0&&(t=[]);const n=x.useRef(null);return x.useEffect(()=>{n.current=null},t),x.useEffect(()=>{const r=e!==cn;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?bo(e,n.current):cn}function oN(e){x.useEffect(()=>{if(!ps)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function aN(e,t){return x.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=a=>{o(a,t)},n},{}),[e,t])}function jv(e){return x.useMemo(()=>e?D$(e):null,[e])}const Uv=[];function sN(e,t){t===void 0&&(t=mi);const[n]=e,r=jv(n?Rt(n):null),[i,o]=x.useState(Uv);function a(){o(()=>e.length?e.map(l=>_v(l)?r:new Tu(t(l),l)):Uv)}const s=Ts({callback:a});return ln(()=>{s==null||s.disconnect(),a(),e.forEach(l=>s==null?void 0:s.observe(l))},[e]),i}function Vv(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return po(t)?t:e}function lN(e){let{measure:t}=e;const[n,r]=x.useState(null),i=x.useCallback(u=>{for(const{target:d}of u)if(po(d)){r(f=>{const h=t(d);return f?q(z({},f),{width:h.width,height:h.height}):h});break}},[t]),o=Ts({callback:i}),a=x.useCallback(u=>{const d=Vv(u);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[s,l]=ms(a);return x.useMemo(()=>({nodeRef:s,rect:n,setRef:l}),[n,s,l])}const cN=[{sensor:Ss,options:{}},{sensor:Is,options:{}}],uN={current:{}},Es={draggable:{measure:Av},droppable:{measure:Av,strategy:Co.WhileDragging,frequency:Du.Optimized},dragOverlay:{measure:mi}};class wo extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const dN={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new wo,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:xs},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Es,measureDroppableContainers:xs,windowRect:null,measuringScheduled:!1},Hv={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:xs,draggableNodes:new Map,over:null,measureDroppableContainers:xs},Io=x.createContext(Hv),Wv=x.createContext(dN);function fN(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new wo}}}function hN(e,t){switch(t.type){case mt.DragStart:return q(z({},e),{draggable:q(z({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case mt.DragMove:return e.draggable.active==null?e:q(z({},e),{draggable:q(z({},e.draggable),{translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}})});case mt.DragEnd:case mt.DragCancel:return q(z({},e),{draggable:q(z({},e.draggable),{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}})});case mt.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new wo(e.droppable.containers);return i.set(r,n),q(z({},e),{droppable:q(z({},e.droppable),{containers:i})})}case mt.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new wo(e.droppable.containers);return a.set(n,q(z({},o),{disabled:i})),q(z({},e),{droppable:q(z({},e.droppable),{containers:a})})}case mt.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new wo(e.droppable.containers);return o.delete(n),q(z({},e),{droppable:q(z({},e.droppable),{containers:o})})}default:return e}}function pN(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=x.useContext(Io),o=vs(r),a=vs(n==null?void 0:n.id);return x.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!bs(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:l,node:u}=s;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[l.current,u.current]){if(!d)continue;const f=c$(d);if(f){f.focus();break}}})}},[r,t,i,a,o]),null}function Gv(e,t){let i=t,{transform:n}=i,r=Ge(i,["transform"]);return e!=null&&e.length?e.reduce((o,a)=>a(z({transform:o},r)),n):n}function gN(e){return x.useMemo(()=>({draggable:z(z({},Es.draggable),e==null?void 0:e.draggable),droppable:z(z({},Es.droppable),e==null?void 0:e.droppable),dragOverlay:z(z({},Es.dragOverlay),e==null?void 0:e.dragOverlay)}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function mN(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=x.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;ln(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),f=Iv(d,r);if(a||(f.x=0),s||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=Tv(u);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,s,r,n])}const ks=x.createContext(q(z({},cn),{scaleX:1,scaleY:1}));var sr;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(sr||(sr={}));const Yv=x.memo(function(t){var n,r,i,o;let Ms=t,{id:a,accessibility:s,autoScroll:l=!0,children:u,sensors:d=cN,collisionDetection:f=A$,measuring:h,modifiers:p}=Ms,m=Ge(Ms,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const g=x.useReducer(hN,void 0,fN),[b,w]=g,[S,C]=g$(),[I,y]=x.useState(sr.Uninitialized),A=I===sr.Initialized,{draggable:{active:E,nodes:k,translate:F},droppable:{containers:Y}}=b,O=E!=null?k.get(E):null,T=x.useRef({initial:null,translated:null}),N=x.useMemo(()=>{var Ct;return E!=null?{id:E,data:(Ct=O==null?void 0:O.data)!=null?Ct:uN,rect:T}:null},[E,O]),V=x.useRef(null),[j,$]=x.useState(null),[M,H]=x.useState(null),Q=go(m,Object.values(m)),te=vo("DndDescribedBy",a),R=x.useMemo(()=>Y.getEnabled(),[Y]),L=gN(h),{droppableRects:U,measureDroppableContainers:W,measuringScheduled:re}=X$(R,{dragging:A,dependencies:[F.x,F.y],config:L.droppable}),se=q$(k,E),ae=x.useMemo(()=>M?ys(M):null,[M]),X=un(),le=Z$(se,L.draggable.measure);mN({activeNode:E!=null?k.get(E):null,config:X.layoutShiftCompensation,initialRect:le,measure:L.draggable.measure});const Z=Nv(se,L.draggable.measure,le),he=Nv(se?se.parentElement:null),Se=x.useRef({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:Y,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),He=Y.getNodeFor((n=Se.current.over)==null?void 0:n.id),wt=lN({measure:L.dragOverlay.measure}),ct=(r=wt.nodeRef.current)!=null?r:se,_t=A?(i=wt.rect)!=null?i:Z:null,de=!!(wt.nodeRef.current&&wt.rect),pe=nN(de?null:Z),xe=jv(ct?Rt(ct):null),Te=rN(A?He!=null?He:se:null),We=sN(Te),Pe=Gv(p,{transform:{x:F.x-pe.x,y:F.y-pe.y,scaleX:1,scaleY:1},activatorEvent:M,active:N,activeNodeRect:Z,containerNodeRect:he,draggingNodeRect:_t,over:Se.current.over,overlayNodeRect:wt.rect,scrollableAncestors:Te,scrollableAncestorRects:We,windowRect:xe}),Ee=ae?gi(ae,F):null,It=iN(Te),St=zv(It),jt=zv(It,[Z]),Lt=gi(Pe,St),Qt=_t?k$(_t,Pe):null,lr=N&&Qt?f({active:N,collisionRect:Qt,droppableRects:U,droppableContainers:R,pointerCoordinates:Ee}):null,Rs=wv(lr,"id"),[In,So]=x.useState(null),Ru=de?Pe:gi(Pe,jt),Lu=T$(Ru,(o=In==null?void 0:In.rect)!=null?o:null,Z),je=x.useRef(null),vi=x.useCallback((Ct,P)=>{let{sensor:B,options:K}=P;if(V.current==null)return;const J=k.get(V.current);if(!J)return;const ie=Ct.nativeEvent,ce=new B({active:V.current,activeNode:J,event:ie,options:K,context:Se,onAbort(ue){if(!k.get(ue))return;const{onDragAbort:fe}=Q.current,me={id:ue};fe==null||fe(me),S({type:"onDragAbort",event:me})},onPending(ue,we,fe,me){if(!k.get(ue))return;const{onDragPending:Pt}=Q.current,it={id:ue,constraint:we,initialCoordinates:fe,offset:me};Pt==null||Pt(it),S({type:"onDragPending",event:it})},onStart(ue){const we=V.current;if(we==null)return;const fe=k.get(we);if(!fe)return;const{onDragStart:me}=Q.current,Oe={activatorEvent:ie,active:{id:we,data:fe.data,rect:T}};Re.unstable_batchedUpdates(()=>{me==null||me(Oe),y(sr.Initializing),w({type:mt.DragStart,initialCoordinates:ue,active:we}),S({type:"onDragStart",event:Oe}),$(je.current),H(ie)})},onMove(ue){w({type:mt.DragMove,coordinates:ue})},onEnd:Ce(mt.DragEnd),onCancel:Ce(mt.DragCancel)});je.current=ce;function Ce(ue){return function(){return _(this,null,function*(){const{active:fe,collisions:me,over:Oe,scrollAdjustedTranslate:Pt}=Se.current;let it=null;if(fe&&Pt){const{cancelDrop:dn}=Q.current;it={activatorEvent:ie,active:fe,collisions:me,delta:Pt,over:Oe},ue===mt.DragEnd&&typeof dn=="function"&&(yield Promise.resolve(dn(it)))&&(ue=mt.DragCancel)}V.current=null,Re.unstable_batchedUpdates(()=>{w({type:ue}),y(sr.Uninitialized),So(null),$(null),H(null),je.current=null;const dn=ue===mt.DragEnd?"onDragEnd":"onDragCancel";if(it){const Sn=Q.current[dn];Sn==null||Sn(it),S({type:dn,event:it})}})})}}},[k]),Ao=x.useCallback((Ct,P)=>(B,K)=>{const J=B.nativeEvent,ie=k.get(K);if(V.current!==null||!ie||J.dndKit||J.defaultPrevented)return;const ce={active:ie};Ct(B,P.options,ce)===!0&&(J.dndKit={capturedBy:P.sensor},V.current=K,vi(B,P))},[k,vi]),Ls=J$(d,Ao);oN(d),ln(()=>{Z&&I===sr.Initializing&&y(sr.Initialized)},[Z,I]),x.useEffect(()=>{const{onDragMove:Ct}=Q.current,{active:P,activatorEvent:B,collisions:K,over:J}=Se.current;if(!P||!B)return;const ie={active:P,activatorEvent:B,collisions:K,delta:{x:Lt.x,y:Lt.y},over:J};Re.unstable_batchedUpdates(()=>{Ct==null||Ct(ie),S({type:"onDragMove",event:ie})})},[Lt.x,Lt.y]),x.useEffect(()=>{const{active:Ct,activatorEvent:P,collisions:B,droppableContainers:K,scrollAdjustedTranslate:J}=Se.current;if(!Ct||V.current==null||!P||!J)return;const{onDragOver:ie}=Q.current,ce=K.get(Rs),Ce=ce&&ce.rect.current?{id:ce.id,rect:ce.rect.current,data:ce.data,disabled:ce.disabled}:null,ue={active:Ct,activatorEvent:P,collisions:B,delta:{x:J.x,y:J.y},over:Ce};Re.unstable_batchedUpdates(()=>{So(Ce),ie==null||ie(ue),S({type:"onDragOver",event:ue})})},[Rs]),ln(()=>{Se.current={activatorEvent:M,active:N,activeNode:se,collisionRect:Qt,collisions:lr,droppableRects:U,draggableNodes:k,draggingNode:ct,draggingNodeRect:_t,droppableContainers:Y,over:In,scrollableAncestors:Te,scrollAdjustedTranslate:Lt},T.current={initial:_t,translated:Qt}},[N,se,lr,Qt,k,ct,_t,U,Y,In,Te,Lt]),Y$(q(z({},X),{delta:F,draggingRect:Qt,pointerCoordinates:Ee,scrollableAncestors:Te,scrollableAncestorRects:We}));const bi=x.useMemo(()=>({active:N,activeNode:se,activeNodeRect:Z,activatorEvent:M,collisions:lr,containerNodeRect:he,dragOverlay:wt,draggableNodes:k,droppableContainers:Y,droppableRects:U,over:In,measureDroppableContainers:W,scrollableAncestors:Te,scrollableAncestorRects:We,measuringConfiguration:L,measuringScheduled:re,windowRect:xe}),[N,se,Z,M,lr,he,wt,k,Y,U,In,W,Te,We,L,re,xe]),To=x.useMemo(()=>({activatorEvent:M,activators:Ls,active:N,activeNodeRect:Z,ariaDescribedById:{draggable:te},dispatch:w,draggableNodes:k,over:In,measureDroppableContainers:W}),[M,Ls,N,Z,w,te,k,In,W]);return x.createElement(yv.Provider,{value:C},x.createElement(Io.Provider,{value:To},x.createElement(Wv.Provider,{value:bi},x.createElement(ks.Provider,{value:Lu},u)),x.createElement(pN,{disabled:(s==null?void 0:s.restoreFocus)===!1})),x.createElement(b$,q(z({},s),{hiddenTextDescribedById:te})));function un(){const Ct=(j==null?void 0:j.autoScrollEnabled)===!1,P=typeof l=="object"?l.enabled===!1:l===!1,B=A&&!Ct&&!P;return typeof l=="object"?q(z({},l),{enabled:B}):{enabled:B}}}),vN=x.createContext(null),Kv="button",bN="Draggable";function yN(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=vo(bN),{activators:a,activatorEvent:s,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:h}=x.useContext(Io),{role:p=Kv,roleDescription:m="draggable",tabIndex:g=0}=i!=null?i:{},b=(l==null?void 0:l.id)===t,w=x.useContext(b?ks:vN),[S,C]=ms(),[I,y]=ms(),A=aN(a,t),E=go(n);ln(()=>(f.set(t,{id:t,key:o,node:S,activatorNode:I,data:E}),()=>{const F=f.get(t);F&&F.key===o&&f.delete(t)}),[f,t]);const k=x.useMemo(()=>({role:p,tabIndex:g,"aria-disabled":r,"aria-pressed":b&&p===Kv?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[r,p,g,b,m,d.draggable]);return{active:l,activatorEvent:s,activeNodeRect:u,attributes:k,isDragging:b,listeners:r?void 0:A,node:S,over:h,setNodeRef:C,setActivatorNodeRef:y,transform:w}}function Qv(){return x.useContext(Wv)}const xN="Droppable",CN={timeout:25};function wN(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=vo(xN),{active:a,dispatch:s,over:l,measureDroppableContainers:u}=x.useContext(Io),d=x.useRef({disabled:n}),f=x.useRef(!1),h=x.useRef(null),p=x.useRef(null),{disabled:m,updateMeasurementsFor:g,timeout:b}=z(z({},CN),i),w=go(g!=null?g:r),S=x.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{u(Array.isArray(w.current)?w.current:[w.current]),p.current=null},b)},[b]),C=Ts({callback:S,disabled:m||!a}),I=x.useCallback((k,F)=>{C&&(F&&(C.unobserve(F),f.current=!1),k&&C.observe(k))},[C]),[y,A]=ms(I),E=go(t);return x.useEffect(()=>{!C||!y.current||(C.disconnect(),f.current=!1,C.observe(y.current))},[y,C]),x.useEffect(()=>(s({type:mt.RegisterDroppable,element:{id:r,key:o,disabled:n,node:y,rect:h,data:E}}),()=>s({type:mt.UnregisterDroppable,key:o,id:r})),[r]),x.useEffect(()=>{n!==d.current.disabled&&(s({type:mt.SetDroppableDisabled,id:r,key:o,disabled:n}),d.current.disabled=n)},[r,o,n,s]),{active:a,rect:h,isOver:(l==null?void 0:l.id)===r,node:y,over:l,setNodeRef:A}}function IN(e){let{animation:t,children:n}=e;const[r,i]=x.useState(null),[o,a]=x.useState(null),s=vs(n);return!n&&!r&&s&&i(s),ln(()=>{if(!o)return;const l=r==null?void 0:r.key,u=r==null?void 0:r.props.id;if(l==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,r,o]),x.createElement(x.Fragment,null,n,r?x.cloneElement(r,{ref:a}):null)}const SN={x:0,y:0,scaleX:1,scaleY:1};function AN(e){let{children:t}=e;return x.createElement(Io.Provider,{value:Hv},x.createElement(ks.Provider,{value:SN},t))}const TN={position:"fixed",touchAction:"none"},EN=e=>bs(e)?"transform 250ms ease":void 0,kN=x.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:s,style:l,transform:u,transition:d=EN}=e;if(!s)return null;const f=i?u:q(z({},u),{scaleX:1,scaleY:1}),h=z(q(z({},TN),{width:s.width,height:s.height,top:s.top,left:s.left,transform:Hn.Transform.toString(f),transformOrigin:i&&r?x$(r,s):void 0,transition:typeof d=="function"?d(r):d}),l);return x.createElement(n,{className:a,style:h,ref:t},o)}),qv=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[s,l]of Object.entries(o.active))l!==void 0&&(i[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,l));if(o!=null&&o.dragOverlay)for(const[s,l]of Object.entries(o.dragOverlay))l!==void 0&&r.node.style.setProperty(s,l);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[l,u]of Object.entries(i))n.node.style.setProperty(l,u);a!=null&&a.active&&n.node.classList.remove(a.active)}},_N={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Hn.Transform.toString(t)},{transform:Hn.Transform.toString(n)}]},sideEffects:qv({styles:{active:{opacity:"0"}}})};function PN(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return gs((o,a)=>{if(t===null)return;const s=n.get(o);if(!s)return;const l=s.node.current;if(!l)return;const u=Vv(a);if(!u)return;const{transform:d}=Rt(a).getComputedStyle(a),f=Sv(d);if(!f)return;const h=typeof t=="function"?t:DN(t);return Ov(l,i.draggable.measure),h({active:{id:o,data:s.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:f})})}function DN(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}=z(z({},_N),e);return o=>{let S=o,{active:a,dragOverlay:s,transform:l}=S,u=Ge(S,["active","dragOverlay","transform"]);if(!t)return;const d={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},f={scaleX:l.scaleX!==1?a.rect.width*l.scaleX/s.rect.width:1,scaleY:l.scaleY!==1?a.rect.height*l.scaleY/s.rect.height:1},h=z({x:l.x-d.x,y:l.y-d.y},f),p=i(q(z({},u),{active:a,dragOverlay:s,transform:{initial:l,final:h}})),[m]=p,g=p[p.length-1];if(JSON.stringify(m)===JSON.stringify(g))return;const b=r==null?void 0:r(z({active:a,dragOverlay:s},u)),w=s.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise(C=>{w.onfinish=()=>{b==null||b(),C()}})}}let Jv=0;function ON(e){return x.useMemo(()=>{if(e!=null)return Jv++,Jv},[e])}const RN=x.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:l,zIndex:u=999}=e;const{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggableNodes:m,droppableContainers:g,dragOverlay:b,over:w,measuringConfiguration:S,scrollableAncestors:C,scrollableAncestorRects:I,windowRect:y}=Qv(),A=x.useContext(ks),E=ON(f==null?void 0:f.id),k=Gv(a,{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggingNodeRect:b.rect,over:w,overlayNodeRect:b.rect,scrollableAncestors:C,scrollableAncestorRects:I,transform:A,windowRect:y}),F=Ou(h),Y=PN({config:r,draggableNodes:m,droppableContainers:g,measuringConfiguration:S}),O=F?b.setRef:void 0;return x.createElement(AN,null,x.createElement(IN,{animation:Y},f&&E?x.createElement(kN,{key:E,id:f.id,ref:O,as:s,activatorEvent:d,adjustScale:t,className:l,transition:o,rect:F,style:z({zIndex:u},i),transform:k},n):null))});function _s(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function LN(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Ps(e){return e!==null&&e>=0}function MN(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function BN(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Xv=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=_s(t,r,n),a=t[i],s=o[i];return!s||!a?null:{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}},Zv="Sortable",eb=x.createContext({activeIndex:-1,containerId:Zv,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Xv,disabled:{draggable:!1,droppable:!1}});function tb(e){let{children:t,id:n,items:r,strategy:i=Xv,disabled:o=!1}=e;const{active:a,dragOverlay:s,droppableRects:l,over:u,measureDroppableContainers:d}=Qv(),f=vo(Zv,n),h=s.rect!==null,p=x.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),m=a!=null,g=a?p.indexOf(a.id):-1,b=u?p.indexOf(u.id):-1,w=x.useRef(p),S=!MN(p,w.current),C=b!==-1&&g===-1||S,I=BN(o);ln(()=>{S&&m&&d(p)},[S,p,m,d]),x.useEffect(()=>{w.current=p},[p]);const y=x.useMemo(()=>({activeIndex:g,containerId:f,disabled:I,disableTransforms:C,items:p,overIndex:b,useDragOverlay:h,sortedRects:LN(p,l),strategy:i}),[g,f,I.draggable,I.droppable,C,p,b,l,h,i]);return x.createElement(eb.Provider,{value:y},t)}const $N=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return _s(n,r,i).indexOf(t)},NN=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:l,transition:u}=e;return!u||!r||s!==o&&i===a?!1:n?!0:a!==i&&t===l},FN={duration:200,easing:"ease"},nb="transform",zN=Hn.Transition.toString({property:nb,duration:0,easing:"linear"}),jN={roleDescription:"sortable"};function UN(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,a]=x.useState(null),s=x.useRef(n);return ln(()=>{if(!t&&n!==s.current&&r.current){const l=i.current;if(l){const u=mi(r.current,{ignoreTransform:!0}),d={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(d.x||d.y)&&a(d)}}n!==s.current&&(s.current=n)},[t,n,r,i]),x.useEffect(()=>{o&&a(null)},[o]),o}function rb(e){let{animateLayoutChanges:t=NN,attributes:n,disabled:r,data:i,getNewIndex:o=$N,id:a,strategy:s,resizeObserverConfig:l,transition:u=FN}=e;const{items:d,containerId:f,activeIndex:h,disabled:p,disableTransforms:m,sortedRects:g,overIndex:b,useDragOverlay:w,strategy:S}=x.useContext(eb),C=VN(r,p),I=d.indexOf(a),y=x.useMemo(()=>z({sortable:{containerId:f,index:I,items:d}},i),[f,i,I,d]),A=x.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:E,node:k,isOver:F,setNodeRef:Y}=wN({id:a,data:y,disabled:C.droppable,resizeObserverConfig:z({updateMeasurementsFor:A},l)}),{active:O,activatorEvent:T,activeNodeRect:N,attributes:V,setNodeRef:j,listeners:$,isDragging:M,over:H,setActivatorNodeRef:Q,transform:te}=yN({id:a,data:y,attributes:z(z({},jN),n),disabled:C.draggable}),R=o$(Y,j),L=!!O,U=L&&!m&&Ps(h)&&Ps(b),W=!w&&M,re=W&&U?te:null,se=s!=null?s:S,ae=U?re!=null?re:se({rects:g,activeNodeRect:N,activeIndex:h,overIndex:b,index:I}):null,X=Ps(h)&&Ps(b)?o({id:a,items:d,activeIndex:h,overIndex:b}):I,le=O==null?void 0:O.id,Z=x.useRef({activeId:le,items:d,newIndex:X,containerId:f}),he=d!==Z.current.items,Se=t({active:O,containerId:f,isDragging:M,isSorting:L,id:a,index:I,items:d,newIndex:Z.current.newIndex,previousItems:Z.current.items,previousContainerId:Z.current.containerId,transition:u,wasDragging:Z.current.activeId!=null}),He=UN({disabled:!Se,index:I,node:k,rect:E});return x.useEffect(()=>{L&&Z.current.newIndex!==X&&(Z.current.newIndex=X),f!==Z.current.containerId&&(Z.current.containerId=f),d!==Z.current.items&&(Z.current.items=d)},[L,X,f,d]),x.useEffect(()=>{if(le===Z.current.activeId)return;if(le!=null&&Z.current.activeId==null){Z.current.activeId=le;return}const ct=setTimeout(()=>{Z.current.activeId=le},50);return()=>clearTimeout(ct)},[le]),{active:O,activeIndex:h,attributes:V,data:y,rect:E,index:I,newIndex:X,items:d,isOver:F,isSorting:L,isDragging:M,listeners:$,node:k,overIndex:b,over:H,setNodeRef:R,setActivatorNodeRef:Q,setDroppableNodeRef:Y,setDraggableNodeRef:j,transform:He!=null?He:ae,transition:wt()};function wt(){if(He||he&&Z.current.newIndex===I)return zN;if(!(W&&!bs(T)||!u)&&(L||Se))return Hn.Transition.toString(q(z({},u),{property:nb}))}}function VN(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function Ds(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const HN=[ke.Down,ke.Right,ke.Up,ke.Left],ib=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:s}}=t;if(HN.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=i.get(f.id);if(h)switch(e.code){case ke.Down:r.top<h.top&&l.push(f);break;case ke.Up:r.top>h.top&&l.push(f);break;case ke.Left:r.left>h.left&&l.push(f);break;case ke.Right:r.left<h.left&&l.push(f);break}});const u=I$({active:n,collisionRect:r,droppableRects:i,droppableContainers:l,pointerCoordinates:null});let d=wv(u,"id");if(d===(a==null?void 0:a.id)&&u.length>1&&(d=u[1].id),d!=null){const f=o.get(n.id),h=o.get(d),p=h?i.get(h.id):null,m=h==null?void 0:h.node.current;if(m&&p&&f&&h){const b=ws(m).some((A,E)=>s[E]!==A),w=ob(f,h),S=WN(f,h),C=b||!w?{x:0,y:0}:{x:S?r.width-p.width:0,y:S?r.height-p.height:0},I={x:p.left,y:p.top};return C.x&&C.y?I:bo(I,C)}}}};function ob(e,t){return!Ds(e)||!Ds(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function WN(e,t){return!Ds(e)||!Ds(t)||!ob(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const ab=Ve(c.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-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-2m6 4c1.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"}),"DragIndicator"),Os=x.createContext({attributes:{},listeners:void 0,ref(){}}),GN=()=>{const{attributes:e,listeners:t,ref:n}=x.useContext(Os);return c.jsx(v.Button,q(z(z({sx:{backgroundColor:"transparent",color:"#919eab",width:"10px",":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}},e),t),{ref:n,children:c.jsx(ab,{})}))},sb=({children:e,id:t,tooltipTitle:n,removeItem:r,useDraggable:i=!0,variant:o="plain"})=>{const{attributes:a,isDragging:s,listeners:l,setNodeRef:u,setActivatorNodeRef:d,transform:f,transition:h}=rb({id:t}),p=x.useMemo(()=>({attributes:a,listeners:l,ref:d}),[a,l,d]),m={opacity:s?.6:void 0,transform:Hn.Translate.toString(f),transition:h};return c.jsx(Os.Provider,{value:p,children:c.jsx(v.ListItem,{variant:o,ref:u,style:m,startAction:i?c.jsx(GN,{}):c.jsx(c.Fragment,{}),endAction:i?c.jsx(v.Tooltip,{title:n,children:c.jsx(v.Button,{variant:"outlined",color:"danger",onClick:r,sx:{ml:"auto",p:.5},size:"sm",children:c.jsx(De.Remove,{})})}):c.jsx(c.Fragment,{}),sx:{p:2,borderRadius:"sm"},children:e})})},YN={sideEffects:qv({styles:{active:{opacity:"0.6"}}})},lb=({children:e})=>c.jsx(RN,{dropAnimation:YN,children:e}),KN=({entities:e=[],labels:t,disabled:n,setEntities:r,removeItem:i})=>{const[o,a]=x.useState(null),s=x.useMemo(()=>e.find(u=>u.id===(o==null?void 0:o.id)),[o,e]),l=xv(Cs(Ss),Cs(Is,{coordinateGetter:ib}));return c.jsxs(Yv,{sensors:l,onDragStart:({active:u})=>{a(u)},onDragEnd:({active:u,over:d})=>{if(d&&u.id!==(d==null?void 0:d.id)){const f=e.findIndex(({id:p})=>p===u.id),h=e.findIndex(({id:p})=>p===d.id);r(_s(e,f,h))}a(null)},onDragCancel:()=>{a(null)},children:[c.jsx(tb,{items:e,children:c.jsx(v.List,{sx:{gap:"10px",padding:0},children:e.map(u=>c.jsxs(sb,{id:u.id,variant:"outlined",removeItem:()=>i(u.id),tooltipTitle:t.removeEntity,useDraggable:!n,children:[c.jsx(v.Typography,{ml:n?0:2.5,children:u.title||u.name}),u.type&&c.jsx(v.Chip,{color:fB(u.type),sx:{marginLeft:2,marginRight:4},children:hB(u.type)})]},`sortable-item-${u.id}`))})}),c.jsx(lb,{children:s?c.jsx(c.Fragment,{children:e.map(u=>c.jsx(sb,{id:u.id,useDraggable:!1,removeItem:()=>{},tooltipTitle:t.removeEntity},`sortable-overlay-item-${u.id}`))}):c.jsx(c.Fragment,{})})]})},QN=({labels:e,value:t,options:n,size:r="sm",disabled:i=!1,sx:o={},onChange:a})=>c.jsxs(v.FormControl,{size:r,disabled:i,children:[c.jsx(v.FormLabel,{children:e.itemsPerPage}),c.jsx(v.Select,{value:t,size:r,onChange:a,sx:q(z({},o),{minHeight:"37px"}),children:n.map((s,l)=>c.jsx(v.Option,{value:s,children:s},`items-per-page-${s}-${l}`))})]}),qN=(e,t)=>{const[n,r]=x.useState(null),{sdk:i}=lt(),o=()=>_(this,null,function*(){let s=[];if(!e){r(s);return}try{switch(e){case"top_x":s=(yield i.topX.getGames({limit:50},!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break;case"match_quiz":s=(yield i.matchQuiz.getGames({limit:50},!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break;case"template":s=(yield i.loyalty.getTemplates(void 0,!0)).data.map(w=>({id:w.id,name:w.name,status:w.status,type:e,relationship:"relatedTo"}));break;case"classic_quiz":s=(yield i.miniGames.getClassicQuizzes({limit:50},!1,!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break;case"personality_quiz":s=(yield i.miniGames.getPersonalityQuizzes({limit:50},!1,!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break;case"either_or":s=(yield i.miniGames.getEitherOrs({limit:50},!1,!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break;case"poll":s=(yield i.voting.getPolls({limit:50},!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break;case"bracket":s=(yield i.bracketGame.getGames({limit:50},!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break;case"standing":s=(yield i.standingGame.getGames({limit:50},!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break}}catch(l){console.error(l),r(s),t();return}r(s)});return x.useEffect(()=>(o(),()=>r(null)),[e]),n},JN=({status:e})=>{let t="neutral";switch(e){case"DYNAMIC":t="primary";break;case"CUSTOM":t="success";break;case"OPEN":t="primary";break;case"LIVE":t="primary";break;case"CANCELED":t="warning";break;case"SETTLED":t="success";break;case"INACTIVE":t="danger";break;case"ACTIVE":t="success";break;case"EXPIRED":t="neutral";break}return c.jsx(v.Chip,{color:t,variant:"solid",size:"sm",children:e})},XN=Ve(c.jsx("path",{d:"M12.16 3h-.32L9.21 8.25h5.58zm4.3 5.25h5.16L19 3h-5.16zm4.92 1.5h-8.63V20.1zM11.25 20.1V9.75H2.62zM7.54 8.25 10.16 3H5L2.38 8.25z"}),"Diamond"),ZN=Ve(c.jsx("path",{d:"m21.58 16.09-1.09-7.66C20.21 6.46 18.52 5 16.53 5H7.47C5.48 5 3.79 6.46 3.51 8.43l-1.09 7.66C2.2 17.63 3.39 19 4.94 19c.68 0 1.32-.27 1.8-.75L9 16h6l2.25 2.25c.48.48 1.13.75 1.8.75 1.56 0 2.75-1.37 2.53-2.91M11 11H9v2H8v-2H6v-1h2V8h1v2h2zm4-1c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m2 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}),"SportsEsports"),eF=Ve(c.jsx("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMark"),tF=Ve(c.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),nF=Ve(c.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-7h2zm4 0h-2V7h2zm4 0h-2v-4h2z"}),"Poll"),rF=e=>{switch(e.entityType){case"top_x":return c.jsx(v.Tooltip,{title:"Top X",children:c.jsx(XN,{})});case"match_quiz":return c.jsx(v.Tooltip,{title:"Match Quiz",children:c.jsx(ZN,{})});case"template":return c.jsx(v.Tooltip,{title:"Leaderboard Templates",children:c.jsx(De.EmojiEvents,{})});case"classic_quiz":return c.jsx(v.Tooltip,{title:"Classic Quiz",children:c.jsx(eF,{})});case"either_or":return c.jsx(v.Tooltip,{title:"Either/Or",children:c.jsx(tF,{})});case"poll":return c.jsx(v.Tooltip,{title:"Poll",children:c.jsx(nF,{})});case"bracket":return c.jsx(v.Tooltip,{title:"Custom Bracket Game",children:c.jsx(De.EmojiEvents,{})});case"standing":return c.jsx(v.Tooltip,{title:"Custom Standings Game",children:c.jsx(De.EmojiEvents,{})});default:return null}},iF=({entity:e,deleteLabel:t,onDelete:n})=>c.jsx(c.Fragment,{children:c.jsx(v.Card,{sx:{p:2,mb:2},children:c.jsx(v.CardContent,{children:c.jsxs(v.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"space-between"},children:[c.jsx(v.Typography,{fontSize:"sm",startDecorator:c.jsx(rF,{entityType:e.type}),children:e.name}),c.jsx(v.Box,{display:{xs:"none",md:"block"},children:c.jsx(JN,{status:e.status})}),c.jsx(v.Box,{children:c.jsx(v.Tooltip,{title:t,children:c.jsx(v.IconButton,{onClick:()=>n(e.id,e.relationship),color:"danger",size:"sm",children:c.jsx(De.Delete,{})})})})]})})})}),oF=(e,t,n,r)=>_(this,null,function*(){let o=[];const a=new Map;t.forEach(s=>{if(a.has(s.entity_type)){const l=a.get(s.entity_type);a.set(s.entity_type,[...l,[s.entity_id,s.entity_relationship]])}else a.set(s.entity_type,[[s.entity_id,s.entity_relationship]])});try{for(const[s,l]of a)switch(s){case"top_x":const u=l.map(([O])=>O),d=yield e.topX.getGames({limit:u.length,gameIds:u},!0);o=[...o,...d.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"match_quiz":const f=l.map(([O])=>O),h=yield e.matchQuiz.getGames({limit:f.length,gameIds:f},!0);o=[...o,...h.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"template":const p=l.map(([O])=>O),m=yield e.loyalty.getTemplates(void 0,!0);o=[...o,...m.data.filter(O=>p.includes(O.id)).map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"classic_quiz":const g=l.map(([O])=>O),b=yield e.miniGames.getClassicQuizzes({limit:g.length,classicQuizIds:g},!1,!0);o=[...o,...b.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"personality_quiz":const w=l.map(([O])=>O),S=yield e.miniGames.getPersonalityQuizzes({limit:w.length,personalityQuizIds:w},!1,!0);o=[...o,...S.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"either_or":const C=l.map(([O])=>O),I=yield e.miniGames.getEitherOrs({limit:C.length,eitherOrIds:C},!1,!0);o=[...o,...I.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"poll":const y=l.map(([O])=>O),A=yield e.voting.getPolls({limit:y.length,pollIds:y},!0);o=[...o,...A.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"bracket":const E=l.map(([O])=>O),k=yield e.bracketGame.getGames({limit:E.length,gameIds:E},!0);o=[...o,...k.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"standing":const F=l.map(([O])=>O),Y=yield e.standingGame.getGames({limit:F.length,gameIds:F},!0);o=[...o,...Y.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;default:}}catch(s){console.error("Error loading related entities",s),n(o),r()}n(o)}),aF=["top_x","match_quiz","template","classic_quiz","personality_quiz","poll","either_or","bracket","standing"],sF=["relatedTo","blocks","blockedBy","bonusPointsGame","nextInSeries","previousInSeries"],lF=new Map().set("template","Leaderboard Templates").set("classic_quiz","Classic Quiz").set("personality_quiz","Personality Quiz").set("either_or","Either/Or").set("match_quiz","Match Quiz").set("top_x","Top X").set("bracket","Custom Bracket Game").set("standing","Custom Standing Game").set("poll","Poll"),cb=new Map().set("relatedTo","Related to").set("blocks","Blocks").set("blockedBy","Blocked by").set("nextInSeries","Next in series").set("previousInSeries","Previous in series").set("bonusPointsGame","Bonus points game"),cF=({defaultValue:e=[],onChange:t,labels:n})=>{const[r,i]=x.useState([]),[o,a]=x.useState(""),[s,l]=x.useState(null),[u,d]=x.useState("relatedTo"),[f,h]=x.useState(!1),p=()=>h(!f),m=qN(s,p),{sdk:g}=lt();x.useEffect(()=>(e.length>0&&oF(g,e,i,p),()=>{i([]),a(""),l(null),d("relatedTo")}),[]);const b=()=>{if(e.some(E=>E.entity_id===o&&E.entity_relationship===u)){a("");return}const y=[...e,{entity_id:o,entity_type:s,entity_relationship:u}],A=(m==null?void 0:m.filter(E=>E.id===o).map(E=>({id:E.id,name:E.name,type:s,status:E.status,relationship:u})))||[];i([...r,...A]),t(y),a("")},w=(I,y)=>{const A=e.filter(k=>!(k.entity_id===I&&k.entity_relationship===y)),E=r.filter(k=>!(k.id===I&&k.relationship===y));i(E),t(A)},S=r.reduce((I,y)=>{const A=y.relationship;return I[A]||(I[A]=[]),I[A].push(y),I},{}),C=Object.keys(S).sort();return c.jsxs(c.Fragment,{children:[C.map(I=>c.jsxs(v.Box,{sx:{mb:2},children:[c.jsx(v.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:c.jsx(v.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:cb.get(I)||"Unknown relationship"})}),S[I].map((y,A)=>c.jsx(iF,{entity:y,deleteLabel:n.delete,onDelete:w},`related-entity-relationship-${y.id}-${A}`))]},`relationship-group-${I}`)),c.jsxs(v.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:1},children:[c.jsxs(v.FormControl,{children:[c.jsx(v.FormLabel,{required:!0,color:"primary",children:n.type}),c.jsx(v.Select,{value:s,size:"sm",name:"entity_type",onChange:(I,y)=>l(y),sx:{minHeight:"37px"},children:aF.map(I=>c.jsx(v.Option,{value:I,children:lF.get(I)},`entity-type-option-${I}`))})]}),c.jsxs(v.FormControl,{children:[c.jsx(v.FormLabel,{required:!0,color:"primary",children:n.relationship}),c.jsx(v.Select,{value:u,size:"sm",name:"entity_relationship",onChange:(I,y)=>d(y),sx:{minHeight:"37px"},children:sF.map(I=>c.jsx(v.Option,{value:I,children:cb.get(I)},`entity-relationship-option-${I}`))})]}),c.jsxs(v.FormControl,{children:[c.jsx(v.FormLabel,{required:!0,color:"primary",children:n.entity}),c.jsx(v.Select,{value:o,size:"sm",name:"entity_id",onChange:(I,y)=>a(y),sx:{width:"100%",mr:{xs:0,md:1},mb:{xs:1,md:0},minHeight:"37px"},endDecorator:!m&&c.jsx(v.CircularProgress,{size:"sm"}),children:m&&m.map(I=>c.jsx(v.Option,{value:I.id,children:I.name},`entity--${I.id}`))})]}),c.jsx(v.Button,{startDecorator:c.jsx(De.Add,{}),disabled:!o||!s,onClick:b,sx:{mb:1},children:n.add})]}),c.jsx(nt,{showToast:f,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:p})]})},uF=e=>{const[t,n]=x.useState(!1),[r,i]=x.useState(!1),[o,a]=x.useState("success"),[s,l]=x.useState(""),u=x.useContext(ea),d=(h,p)=>{a(h),l(p),i(!0)},f=()=>_(this,null,function*(){n(!0);const h=yield u==null?void 0:u.https.exportLeadsPerEntity(e.entityId);if(h!=null&&h.ok){const p=yield h.blob(),m=URL.createObjectURL(p),g=document.createElement("a");g.href=m,g.download=`${e.entityType}_${e.entityName}_exported_users_leads.csv`,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(m),n(!1),d("success",e.labels.usersLeadsExportMessage)}else console.error("Failed to export all users leads: ",yield h==null?void 0:h.json()),n(!1),d("danger",e.labels.usersLeadsExportErrorMessage)});return c.jsxs(c.Fragment,{children:[c.jsxs(v.Box,{mb:2,children:[c.jsx(v.Box,{display:"flex",alignItems:"center",mb:1,children:c.jsx(v.Typography,{level:"body-lg",sx:{mx:"auto"},children:e.labels.exportUsersLeads})}),c.jsx(v.Sheet,{sx:{overflowX:"auto",minWidth:"700px"},children:c.jsxs(v.Table,{variant:"outlined",hoverRow:!1,borderAxis:"bothBetween",size:"sm",sx:{backgroundColor:"#fff","& > thead > tr > th:first-child, & > tbody > tr > td:first-child":{textAlign:"left",width:"50%"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"},"& > thead > tr > th, & > tbody > tr > td":{textAlign:"right"}},children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:e.labels.category}),c.jsx("th",{children:e.labels.action})]})}),c.jsx("tbody",{children:c.jsxs("tr",{children:[c.jsxs("td",{children:[c.jsx(v.Typography,{level:"body-sm",fontWeight:"600",children:e.labels.exportAllUsersLeads}),c.jsx(v.Typography,{level:"body-xs",color:"neutral",children:e.labels.exportAllUsersLeadsDescription})]}),c.jsx("td",{children:c.jsx(v.Button,{loading:t,onClick:f,children:e.labels.exportAllUsersLeads})})]})})]})})]}),c.jsx(nt,{showToast:r,color:o,message:s,hideToast:()=>i(!1)})]})},dF=({tooltipContent:e="Drag to reorder"})=>{const{attributes:t,listeners:n,ref:r}=x.useContext(Os);return c.jsx(v.Tooltip,{title:e,placement:"left",arrow:!0,children:c.jsx(v.IconButton,q(z(z({variant:"plain",color:"neutral",size:"sm",sx:{color:"text.tertiary",my:"auto",mr:1,":hover":{bgcolor:"action.hover"},":active":{bgcolor:"action.selected"},transition:"all 0.2s",cursor:"grab","&:active":{cursor:"grabbing"}}},t),n),{ref:r,children:c.jsx(ab,{})}))})},ub=({id:e,useDraggable:t=!0,variant:n="outlined",item:r,tooltipContent:i})=>{const{attributes:o,isDragging:a,listeners:s,setNodeRef:l,setActivatorNodeRef:u,transform:d,transition:f}=rb({id:e}),h=x.useMemo(()=>({attributes:o,listeners:s,ref:u}),[o,s,u]),p={opacity:a?.6:void 0,transform:Hn.Translate.toString(d),transition:f},m=b=>b.split(" ").map(w=>w[0]).join("").toUpperCase().substring(0,2),g=b=>r!=null&&r.color?r.color:`hsl(${b.split("").reduce((C,I)=>I.charCodeAt(0)+((C<<5)-C),0)%360}, 70%, 80%)`;return c.jsx(Os.Provider,{value:h,children:c.jsx(v.ListItem,{variant:n,ref:l,style:p,endAction:t?c.jsx(dF,{tooltipContent:i}):null,sx:{p:0,borderRadius:"md",overflow:"hidden",transition:"all 0.2s",boxShadow:a?"md":"sm",transform:`scale(${a?1.02:1})`,border:"1px solid",borderColor:"divider"},children:c.jsxs(v.Box,{sx:{display:"flex",width:"100%",alignItems:"center",gap:2,p:0},children:[c.jsx(v.Sheet,{sx:{width:"8px",alignSelf:"stretch",bgcolor:g(r.name)}}),c.jsx(v.Avatar,{src:r.image,alt:r.name,sx:{bgcolor:g(r.name),my:2,ml:1},children:m(r.name)}),c.jsxs(v.Box,{sx:{py:2,pr:2,flexGrow:1,display:"flex",flexDirection:"column",gap:.5},children:[c.jsx(v.Typography,{level:"title-md",children:r.name}),r.description&&c.jsx(v.Typography,{level:"body-sm",sx:{color:"text.secondary",textOverflow:"ellipsis"},children:r.description}),c.jsx(v.Box,{sx:{mt:.5},children:r.type&&c.jsx(v.Chip,{variant:"soft",color:"primary",size:"sm",sx:{px:1,bgcolor:`${g(r.type)}40`},children:r.type})})]})]})})})},fF=({items:e=[],labels:t,setItems:n})=>{const[r,i]=x.useState(null),o=x.useMemo(()=>e.find(s=>s.id===(r==null?void 0:r.id)),[r,e]),a=xv(Cs(Ss,{activationConstraint:{distance:8}}),Cs(Is,{coordinateGetter:ib}));return e.length===0?c.jsx(v.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",border:"1px dashed",borderColor:"divider",borderRadius:"md"},children:c.jsx(v.Typography,{level:"body-lg",color:"neutral",children:(t==null?void 0:t.noItemsToDisplay)||"No items to display"})}):c.jsxs(Yv,{sensors:a,onDragStart:({active:s})=>{i(s)},onDragEnd:({active:s,over:l})=>{if(l&&s.id!==(l==null?void 0:l.id)){const u=e.findIndex(({id:f})=>f===s.id),d=e.findIndex(({id:f})=>f===l.id);n(_s(e,u,d))}i(null)},onDragCancel:()=>{i(null)},children:[c.jsx(tb,{items:e,children:c.jsx(v.List,{sx:{gap:2,maxHeight:"70vh",overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"action.focus",borderRadius:"4px"}},children:e.map(s=>c.jsx(ub,{id:s.id,variant:"outlined",item:s,tooltipContent:t==null?void 0:t.dragToReorder},`sortable-item-${s.id}`))})}),c.jsx(lb,{children:o?c.jsx(ub,{id:o.id,useDraggable:!1,item:o,tooltipContent:t.dragToReorder},`sortable-overlay-item-${o.id}`):null})]})},hF=({entityType:e,entityId:t,authRequirement:n,labels:r})=>{const[i,o]=x.useState(!1),[a,s]=x.useState(!1),[l,u]=x.useState(""),[d,f]=x.useState(""),[h,p]=x.useState([]),[m,g]=x.useState("before"),[b,w]=x.useState(!1),[S,C]=x.useState(""),[I,y]=x.useState(""),[A,E]=x.useState("STANDARD"),[k,F]=x.useState("left"),[Y,O]=x.useState(!0);x.useEffect(()=>{n!=="LEAD"&&o(!1),n!=="REGISTERED"&&s(!1)},[n]);const T=`
|
|
2475
|
+
`},v$={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function b$(e){let{announcements:t=v$,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=m$}=e;const{announce:o,announcement:a}=h$(),s=vo("DndLiveRegion"),[l,u]=x.useState(!1);if(x.useEffect(()=>{u(!0)},[]),p$(x.useMemo(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:p}=f;t.onDragMove&&o(t.onDragMove({active:h,over:p}))},onDragOver(f){let{active:h,over:p}=f;o(t.onDragOver({active:h,over:p}))},onDragEnd(f){let{active:h,over:p}=f;o(t.onDragEnd({active:h,over:p}))},onDragCancel(f){let{active:h,over:p}=f;o(t.onDragCancel({active:h,over:p}))}}),[o,t])),!l)return null;const d=x.createElement(x.Fragment,null,x.createElement(d$,{id:r,value:i.draggable}),x.createElement(f$,{id:s,announcement:a}));return n?Re.createPortal(d,n):d}var mt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(mt||(mt={}));function xs(){}function Cs(e,t){return x.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function xv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return x.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const un=Object.freeze({x:0,y:0});function y$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function x$(e,t){const n=ys(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function C$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function w$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Cv(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function wv(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const I$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=Cv(t),o=[];for(const a of r){const{id:s}=a,l=n.get(s);if(l){const u=Cv(l),d=i.reduce((h,p,m)=>h+y$(u[m],p),0),f=Number((d/4).toFixed(4));o.push({id:s,data:{droppableContainer:a,value:f}})}}return o.sort(C$)};function S$(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){const l=t.width*t.height,u=e.width*e.height,d=a*s,f=d/(l+u-d);return Number(f.toFixed(4))}return 0}const A$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:a}=o,s=n.get(a);if(s){const l=S$(s,t);l>0&&i.push({id:a,data:{droppableContainer:o,value:l}})}}return i.sort(w$)};function T$(e,t,n){return q(z({},e),{scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1})}function Iv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:un}function E$(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((a,s)=>q(z({},a),{top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),z({},n))}}const k$=E$(1);function Sv(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function _$(e,t,n){const r=Sv(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=e.left-a-(1-i)*parseFloat(n),u=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l}}const P$={ignoreTransform:!1};function mi(e,t){t===void 0&&(t=P$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=Rt(e).getComputedStyle(e);u&&(n=_$(n,u,d))}const{top:r,left:i,width:o,height:a,bottom:s,right:l}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:l}}function Av(e){return mi(e,{ignoreTransform:!0})}function D$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function O$(e,t){return t===void 0&&(t=Rt(e).getComputedStyle(e)),t.position==="fixed"}function R$(e,t){t===void 0&&(t=Rt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function ws(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(wu(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!po(i)||mv(i)||n.includes(i))return n;const o=Rt(e).getComputedStyle(i);return i!==e&&R$(i,o)&&n.push(i),O$(i,o)?n:r(i.parentNode)}return e?r(e):n}function Tv(e){const[t]=ws(e,1);return t!=null?t:null}function Su(e){return!ps||!e?null:hi(e)?e:Cu(e)?wu(e)||e===pi(e).scrollingElement?window:po(e)?e:null:null}function Ev(e){return hi(e)?e.scrollX:e.scrollLeft}function kv(e){return hi(e)?e.scrollY:e.scrollTop}function Au(e){return{x:Ev(e),y:kv(e)}}var xt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(xt||(xt={}));function _v(e){return!ps||!e?!1:e===document.scrollingElement}function Pv(e){const t={x:0,y:0},n=_v(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const L$={x:.2,y:.2};function M$(e,t,n,r,i){let{top:o,left:a,right:s,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=L$);const{isTop:u,isBottom:d,isLeft:f,isRight:h}=Pv(e),p={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+g.height?(p.y=xt.Backward,m.y=r*Math.abs((t.top+g.height-o)/g.height)):!d&&l>=t.bottom-g.height&&(p.y=xt.Forward,m.y=r*Math.abs((t.bottom-g.height-l)/g.height)),!h&&s>=t.right-g.width?(p.x=xt.Forward,m.x=r*Math.abs((t.right-g.width-s)/g.width)):!f&&a<=t.left+g.width&&(p.x=xt.Backward,m.x=r*Math.abs((t.left+g.width-a)/g.width)),{direction:p,speed:m}}function B$(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Dv(e){return e.reduce((t,n)=>gi(t,Au(n)),un)}function $$(e){return e.reduce((t,n)=>t+Ev(n),0)}function N$(e){return e.reduce((t,n)=>t+kv(n),0)}function Ov(e,t){if(t===void 0&&(t=mi),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);Tv(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const F$=[["x",["left","right"],$$],["y",["top","bottom"],N$]];class Tu{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=ws(n),i=Dv(r);this.rect=z({},t),this.width=t.width,this.height=t.height;for(const[o,a,s]of F$)for(const l of a)Object.defineProperty(this,l,{get:()=>{const u=s(r),d=i[o]-u;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class yo{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function z$(e){const{EventTarget:t}=Rt(e);return e instanceof t?e:pi(e)}function Eu(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(yi(n,2)+yi(r,2))>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var an;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(an||(an={}));function Rv(e){e.preventDefault()}function j$(e){e.stopPropagation()}var ke;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ke||(ke={}));const Lv={start:[ke.Space,ke.Enter],cancel:[ke.Esc],end:[ke.Space,ke.Enter,ke.Tab]},U$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ke.Right:return q(z({},n),{x:n.x+25});case ke.Left:return q(z({},n),{x:n.x-25});case ke.Down:return q(z({},n),{y:n.y+25});case ke.Up:return q(z({},n),{y:n.y-25})}};class Is{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new yo(pi(n)),this.windowListeners=new yo(Rt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(an.Resize,this.handleCancel),this.windowListeners.add(an.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(an.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Ov(r),n(un)}handleKeyDown(t){if(bs(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=Lv,coordinateGetter:a=U$,scrollBehavior:s="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:un;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:n,context:r.current,currentCoordinates:d});if(f){const h=bo(f,d),p={x:0,y:0},{scrollableAncestors:m}=r.current;for(const g of m){const b=t.code,{isTop:w,isRight:S,isLeft:C,isBottom:I,maxScroll:y,minScroll:A}=Pv(g),E=B$(g),k={x:Math.min(b===ke.Right?E.right-E.width/2:E.right,Math.max(b===ke.Right?E.left:E.left+E.width/2,f.x)),y:Math.min(b===ke.Down?E.bottom-E.height/2:E.bottom,Math.max(b===ke.Down?E.top:E.top+E.height/2,f.y))},F=b===ke.Right&&!S||b===ke.Left&&!C,Y=b===ke.Down&&!I||b===ke.Up&&!w;if(F&&k.x!==f.x){const O=g.scrollLeft+h.x,T=b===ke.Right&&O<=y.x||b===ke.Left&&O>=A.x;if(T&&!h.y){g.scrollTo({left:O,behavior:s});return}T?p.x=g.scrollLeft-O:p.x=b===ke.Right?g.scrollLeft-y.x:g.scrollLeft-A.x,p.x&&g.scrollBy({left:-p.x,behavior:s});break}else if(Y&&k.y!==f.y){const O=g.scrollTop+h.y,T=b===ke.Down&&O<=y.y||b===ke.Up&&O>=A.y;if(T&&!h.x){g.scrollTo({top:O,behavior:s});return}T?p.y=g.scrollTop-O:p.y=b===ke.Down?g.scrollTop-y.y:g.scrollTop-A.y,p.y&&g.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,gi(bo(f,this.referenceCoordinates),p))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Is.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Lv,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Mv(e){return!!(e&&"distance"in e)}function Bv(e){return!!(e&&"delay"in e)}class ku{constructor(t,n,r){var i;r===void 0&&(r=z$(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:a}=o;this.props=t,this.events=n,this.document=pi(a),this.documentListeners=new yo(this.document),this.listeners=new yo(r),this.windowListeners=new yo(Rt(a)),this.initialCoordinates=(i=ys(o))!=null?i:un,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(an.Resize,this.handleCancel),this.windowListeners.add(an.DragStart,Rv),this.windowListeners.add(an.VisibilityChange,this.handleCancel),this.windowListeners.add(an.ContextMenu,Rv),this.documentListeners.add(an.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Bv(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Mv(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(an.Click,j$,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(an.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const l=(n=ys(t))!=null?n:un,u=bo(i,l);if(!r&&s){if(Mv(s)){if(s.tolerance!=null&&Eu(u,s.tolerance))return this.handleCancel();if(Eu(u,s.distance))return this.handleStart()}if(Bv(s)&&Eu(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),a(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===ke.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const V$={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Ss extends ku{constructor(t){const{event:n}=t,r=pi(n.target);super(t,V$,r)}}Ss.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const H$={move:{name:"mousemove"},end:{name:"mouseup"}};var _u;(function(e){e[e.RightClick=2]="RightClick"})(_u||(_u={}));class W$ extends ku{constructor(t){super(t,H$,pi(t.event.target))}}W$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===_u.RightClick?!1:(r==null||r({event:n}),!0)}}];const Pu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class G$ extends ku{constructor(t){super(t,Pu)}static setup(){return window.addEventListener(Pu.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Pu.move.name,t)};function t(){}}}G$.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var xo;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(xo||(xo={}));var As;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(As||(As={}));function Y$(e){let{acceleration:t,activator:n=xo.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:s=As.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=Q$({delta:f,disabled:!o}),[m,g]=a$(),b=x.useRef({x:0,y:0}),w=x.useRef({x:0,y:0}),S=x.useMemo(()=>{switch(n){case xo.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case xo.DraggableRect:return i}},[n,i,l]),C=x.useRef(null),I=x.useCallback(()=>{const A=C.current;if(!A)return;const E=b.current.x*w.current.x,k=b.current.y*w.current.y;A.scrollBy(E,k)},[]),y=x.useMemo(()=>s===As.TreeOrder?[...u].reverse():u,[s,u]);x.useEffect(()=>{if(!o||!u.length||!S){g();return}for(const A of y){if((r==null?void 0:r(A))===!1)continue;const E=u.indexOf(A),k=d[E];if(!k)continue;const{direction:F,speed:Y}=M$(A,k,S,t,h);for(const O of["x","y"])p[O][F[O]]||(Y[O]=0,F[O]=0);if(Y.x>0||Y.y>0){g(),C.current=A,m(I,a),b.current=Y,w.current=F;return}}b.current={x:0,y:0},w.current={x:0,y:0},g()},[t,I,r,g,o,a,JSON.stringify(S),JSON.stringify(p),m,u,y,d,JSON.stringify(h)])}const K$={x:{[xt.Backward]:!1,[xt.Forward]:!1},y:{[xt.Backward]:!1,[xt.Forward]:!1}};function Q$(e){let{delta:t,disabled:n}=e;const r=vs(t);return mo(i=>{if(n||!r||!i)return K$;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[xt.Backward]:i.x[xt.Backward]||o.x===-1,[xt.Forward]:i.x[xt.Forward]||o.x===1},y:{[xt.Backward]:i.y[xt.Backward]||o.y===-1,[xt.Forward]:i.y[xt.Forward]||o.y===1}}},[n,t,r])}function q$(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return mo(i=>{var o;return t==null?null:(o=r!=null?r:i)!=null?o:null},[r,t])}function J$(e,t){return x.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...o]},[]),[e,t])}var Co;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Co||(Co={}));var Du;(function(e){e.Optimized="optimized"})(Du||(Du={}));const $v=new Map;function X$(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=x.useState(null),{frequency:s,measure:l,strategy:u}=i,d=x.useRef(e),f=b(),h=go(f),p=x.useCallback(function(w){w===void 0&&(w=[]),!h.current&&a(S=>S===null?w:S.concat(w.filter(C=>!S.includes(C))))},[h]),m=x.useRef(null),g=mo(w=>{if(f&&!n)return $v;if(!w||w===$v||d.current!==e||o!=null){const S=new Map;for(let C of e){if(!C)continue;if(o&&o.length>0&&!o.includes(C.id)&&C.rect.current){S.set(C.id,C.rect.current);continue}const I=C.node.current,y=I?new Tu(l(I),I):null;C.rect.current=y,y&&S.set(C.id,y)}return S}return w},[e,o,n,f,l]);return x.useEffect(()=>{d.current=e},[e]),x.useEffect(()=>{f||p()},[n,f]),x.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),x.useEffect(()=>{f||typeof s!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,f,p,...r]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:o!=null};function b(){switch(u){case Co.Always:return!1;case Co.BeforeDragging:return n;default:return!n}}}function Ou(e,t){return mo(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Z$(e,t){return Ou(e,t)}function eN(e){let{callback:t,disabled:n}=e;const r=gs(t),i=x.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.MutationObserver=="undefined")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return x.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Ts(e){let{callback:t,disabled:n}=e;const r=gs(t),i=x.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.ResizeObserver=="undefined")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return x.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function tN(e){return new Tu(mi(e),e)}function Nv(e,t,n){t===void 0&&(t=tN);const[r,i]=x.useState(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l!=null?l:n)!=null?u:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const a=eN({callback(l){if(e)for(const u of l){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),s=Ts({callback:o});return cn(()=>{o(),e?(s==null||s.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),a==null||a.disconnect())},[e]),r}function nN(e){const t=Ou(e);return Iv(e,t)}const Fv=[];function rN(e){const t=x.useRef(e),n=mo(r=>e?r&&r!==Fv&&e&&t.current&&e.parentNode===t.current.parentNode?r:ws(e):Fv,[e]);return x.useEffect(()=>{t.current=e},[e]),n}function iN(e){const[t,n]=x.useState(null),r=x.useRef(e),i=x.useCallback(o=>{const a=Su(o.target);a&&n(s=>s?(s.set(a,Au(a)),new Map(s)):null)},[]);return x.useEffect(()=>{const o=r.current;if(e!==o){a(o);const s=e.map(l=>{const u=Su(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,Au(u)]):null}).filter(l=>l!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(l=>{const u=Su(l);u==null||u.removeEventListener("scroll",i)})}},[i,e]),x.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>gi(o,a),un):Dv(e):un,[e,t])}function zv(e,t){t===void 0&&(t=[]);const n=x.useRef(null);return x.useEffect(()=>{n.current=null},t),x.useEffect(()=>{const r=e!==un;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?bo(e,n.current):un}function oN(e){x.useEffect(()=>{if(!ps)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function aN(e,t){return x.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=a=>{o(a,t)},n},{}),[e,t])}function jv(e){return x.useMemo(()=>e?D$(e):null,[e])}const Uv=[];function sN(e,t){t===void 0&&(t=mi);const[n]=e,r=jv(n?Rt(n):null),[i,o]=x.useState(Uv);function a(){o(()=>e.length?e.map(l=>_v(l)?r:new Tu(t(l),l)):Uv)}const s=Ts({callback:a});return cn(()=>{s==null||s.disconnect(),a(),e.forEach(l=>s==null?void 0:s.observe(l))},[e]),i}function Vv(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return po(t)?t:e}function lN(e){let{measure:t}=e;const[n,r]=x.useState(null),i=x.useCallback(u=>{for(const{target:d}of u)if(po(d)){r(f=>{const h=t(d);return f?q(z({},f),{width:h.width,height:h.height}):h});break}},[t]),o=Ts({callback:i}),a=x.useCallback(u=>{const d=Vv(u);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[s,l]=ms(a);return x.useMemo(()=>({nodeRef:s,rect:n,setRef:l}),[n,s,l])}const cN=[{sensor:Ss,options:{}},{sensor:Is,options:{}}],uN={current:{}},Es={draggable:{measure:Av},droppable:{measure:Av,strategy:Co.WhileDragging,frequency:Du.Optimized},dragOverlay:{measure:mi}};class wo extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const dN={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new wo,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:xs},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Es,measureDroppableContainers:xs,windowRect:null,measuringScheduled:!1},Hv={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:xs,draggableNodes:new Map,over:null,measureDroppableContainers:xs},Io=x.createContext(Hv),Wv=x.createContext(dN);function fN(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new wo}}}function hN(e,t){switch(t.type){case mt.DragStart:return q(z({},e),{draggable:q(z({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case mt.DragMove:return e.draggable.active==null?e:q(z({},e),{draggable:q(z({},e.draggable),{translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}})});case mt.DragEnd:case mt.DragCancel:return q(z({},e),{draggable:q(z({},e.draggable),{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}})});case mt.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new wo(e.droppable.containers);return i.set(r,n),q(z({},e),{droppable:q(z({},e.droppable),{containers:i})})}case mt.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new wo(e.droppable.containers);return a.set(n,q(z({},o),{disabled:i})),q(z({},e),{droppable:q(z({},e.droppable),{containers:a})})}case mt.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new wo(e.droppable.containers);return o.delete(n),q(z({},e),{droppable:q(z({},e.droppable),{containers:o})})}default:return e}}function pN(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=x.useContext(Io),o=vs(r),a=vs(n==null?void 0:n.id);return x.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!bs(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:l,node:u}=s;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[l.current,u.current]){if(!d)continue;const f=c$(d);if(f){f.focus();break}}})}},[r,t,i,a,o]),null}function Gv(e,t){let i=t,{transform:n}=i,r=Ge(i,["transform"]);return e!=null&&e.length?e.reduce((o,a)=>a(z({transform:o},r)),n):n}function gN(e){return x.useMemo(()=>({draggable:z(z({},Es.draggable),e==null?void 0:e.draggable),droppable:z(z({},Es.droppable),e==null?void 0:e.droppable),dragOverlay:z(z({},Es.dragOverlay),e==null?void 0:e.dragOverlay)}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function mN(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=x.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;cn(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),f=Iv(d,r);if(a||(f.x=0),s||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=Tv(u);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,s,r,n])}const ks=x.createContext(q(z({},un),{scaleX:1,scaleY:1}));var sr;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(sr||(sr={}));const Yv=x.memo(function(t){var n,r,i,o;let Ms=t,{id:a,accessibility:s,autoScroll:l=!0,children:u,sensors:d=cN,collisionDetection:f=A$,measuring:h,modifiers:p}=Ms,m=Ge(Ms,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const g=x.useReducer(hN,void 0,fN),[b,w]=g,[S,C]=g$(),[I,y]=x.useState(sr.Uninitialized),A=I===sr.Initialized,{draggable:{active:E,nodes:k,translate:F},droppable:{containers:Y}}=b,O=E!=null?k.get(E):null,T=x.useRef({initial:null,translated:null}),N=x.useMemo(()=>{var Ct;return E!=null?{id:E,data:(Ct=O==null?void 0:O.data)!=null?Ct:uN,rect:T}:null},[E,O]),V=x.useRef(null),[j,$]=x.useState(null),[M,H]=x.useState(null),Q=go(m,Object.values(m)),te=vo("DndDescribedBy",a),R=x.useMemo(()=>Y.getEnabled(),[Y]),L=gN(h),{droppableRects:U,measureDroppableContainers:W,measuringScheduled:re}=X$(R,{dragging:A,dependencies:[F.x,F.y],config:L.droppable}),se=q$(k,E),ae=x.useMemo(()=>M?ys(M):null,[M]),X=dn(),le=Z$(se,L.draggable.measure);mN({activeNode:E!=null?k.get(E):null,config:X.layoutShiftCompensation,initialRect:le,measure:L.draggable.measure});const Z=Nv(se,L.draggable.measure,le),he=Nv(se?se.parentElement:null),Se=x.useRef({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:Y,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),He=Y.getNodeFor((n=Se.current.over)==null?void 0:n.id),wt=lN({measure:L.dragOverlay.measure}),ct=(r=wt.nodeRef.current)!=null?r:se,_t=A?(i=wt.rect)!=null?i:Z:null,de=!!(wt.nodeRef.current&&wt.rect),pe=nN(de?null:Z),xe=jv(ct?Rt(ct):null),Te=rN(A?He!=null?He:se:null),We=sN(Te),Pe=Gv(p,{transform:{x:F.x-pe.x,y:F.y-pe.y,scaleX:1,scaleY:1},activatorEvent:M,active:N,activeNodeRect:Z,containerNodeRect:he,draggingNodeRect:_t,over:Se.current.over,overlayNodeRect:wt.rect,scrollableAncestors:Te,scrollableAncestorRects:We,windowRect:xe}),Ee=ae?gi(ae,F):null,It=iN(Te),St=zv(It),jt=zv(It,[Z]),Lt=gi(Pe,St),Qt=_t?k$(_t,Pe):null,lr=N&&Qt?f({active:N,collisionRect:Qt,droppableRects:U,droppableContainers:R,pointerCoordinates:Ee}):null,Rs=wv(lr,"id"),[In,So]=x.useState(null),Ru=de?Pe:gi(Pe,jt),Lu=T$(Ru,(o=In==null?void 0:In.rect)!=null?o:null,Z),je=x.useRef(null),vi=x.useCallback((Ct,P)=>{let{sensor:B,options:K}=P;if(V.current==null)return;const J=k.get(V.current);if(!J)return;const ie=Ct.nativeEvent,ce=new B({active:V.current,activeNode:J,event:ie,options:K,context:Se,onAbort(ue){if(!k.get(ue))return;const{onDragAbort:fe}=Q.current,me={id:ue};fe==null||fe(me),S({type:"onDragAbort",event:me})},onPending(ue,we,fe,me){if(!k.get(ue))return;const{onDragPending:Pt}=Q.current,it={id:ue,constraint:we,initialCoordinates:fe,offset:me};Pt==null||Pt(it),S({type:"onDragPending",event:it})},onStart(ue){const we=V.current;if(we==null)return;const fe=k.get(we);if(!fe)return;const{onDragStart:me}=Q.current,Oe={activatorEvent:ie,active:{id:we,data:fe.data,rect:T}};Re.unstable_batchedUpdates(()=>{me==null||me(Oe),y(sr.Initializing),w({type:mt.DragStart,initialCoordinates:ue,active:we}),S({type:"onDragStart",event:Oe}),$(je.current),H(ie)})},onMove(ue){w({type:mt.DragMove,coordinates:ue})},onEnd:Ce(mt.DragEnd),onCancel:Ce(mt.DragCancel)});je.current=ce;function Ce(ue){return function(){return _(this,null,function*(){const{active:fe,collisions:me,over:Oe,scrollAdjustedTranslate:Pt}=Se.current;let it=null;if(fe&&Pt){const{cancelDrop:fn}=Q.current;it={activatorEvent:ie,active:fe,collisions:me,delta:Pt,over:Oe},ue===mt.DragEnd&&typeof fn=="function"&&(yield Promise.resolve(fn(it)))&&(ue=mt.DragCancel)}V.current=null,Re.unstable_batchedUpdates(()=>{w({type:ue}),y(sr.Uninitialized),So(null),$(null),H(null),je.current=null;const fn=ue===mt.DragEnd?"onDragEnd":"onDragCancel";if(it){const Sn=Q.current[fn];Sn==null||Sn(it),S({type:fn,event:it})}})})}}},[k]),Ao=x.useCallback((Ct,P)=>(B,K)=>{const J=B.nativeEvent,ie=k.get(K);if(V.current!==null||!ie||J.dndKit||J.defaultPrevented)return;const ce={active:ie};Ct(B,P.options,ce)===!0&&(J.dndKit={capturedBy:P.sensor},V.current=K,vi(B,P))},[k,vi]),Ls=J$(d,Ao);oN(d),cn(()=>{Z&&I===sr.Initializing&&y(sr.Initialized)},[Z,I]),x.useEffect(()=>{const{onDragMove:Ct}=Q.current,{active:P,activatorEvent:B,collisions:K,over:J}=Se.current;if(!P||!B)return;const ie={active:P,activatorEvent:B,collisions:K,delta:{x:Lt.x,y:Lt.y},over:J};Re.unstable_batchedUpdates(()=>{Ct==null||Ct(ie),S({type:"onDragMove",event:ie})})},[Lt.x,Lt.y]),x.useEffect(()=>{const{active:Ct,activatorEvent:P,collisions:B,droppableContainers:K,scrollAdjustedTranslate:J}=Se.current;if(!Ct||V.current==null||!P||!J)return;const{onDragOver:ie}=Q.current,ce=K.get(Rs),Ce=ce&&ce.rect.current?{id:ce.id,rect:ce.rect.current,data:ce.data,disabled:ce.disabled}:null,ue={active:Ct,activatorEvent:P,collisions:B,delta:{x:J.x,y:J.y},over:Ce};Re.unstable_batchedUpdates(()=>{So(Ce),ie==null||ie(ue),S({type:"onDragOver",event:ue})})},[Rs]),cn(()=>{Se.current={activatorEvent:M,active:N,activeNode:se,collisionRect:Qt,collisions:lr,droppableRects:U,draggableNodes:k,draggingNode:ct,draggingNodeRect:_t,droppableContainers:Y,over:In,scrollableAncestors:Te,scrollAdjustedTranslate:Lt},T.current={initial:_t,translated:Qt}},[N,se,lr,Qt,k,ct,_t,U,Y,In,Te,Lt]),Y$(q(z({},X),{delta:F,draggingRect:Qt,pointerCoordinates:Ee,scrollableAncestors:Te,scrollableAncestorRects:We}));const bi=x.useMemo(()=>({active:N,activeNode:se,activeNodeRect:Z,activatorEvent:M,collisions:lr,containerNodeRect:he,dragOverlay:wt,draggableNodes:k,droppableContainers:Y,droppableRects:U,over:In,measureDroppableContainers:W,scrollableAncestors:Te,scrollableAncestorRects:We,measuringConfiguration:L,measuringScheduled:re,windowRect:xe}),[N,se,Z,M,lr,he,wt,k,Y,U,In,W,Te,We,L,re,xe]),To=x.useMemo(()=>({activatorEvent:M,activators:Ls,active:N,activeNodeRect:Z,ariaDescribedById:{draggable:te},dispatch:w,draggableNodes:k,over:In,measureDroppableContainers:W}),[M,Ls,N,Z,w,te,k,In,W]);return x.createElement(yv.Provider,{value:C},x.createElement(Io.Provider,{value:To},x.createElement(Wv.Provider,{value:bi},x.createElement(ks.Provider,{value:Lu},u)),x.createElement(pN,{disabled:(s==null?void 0:s.restoreFocus)===!1})),x.createElement(b$,q(z({},s),{hiddenTextDescribedById:te})));function dn(){const Ct=(j==null?void 0:j.autoScrollEnabled)===!1,P=typeof l=="object"?l.enabled===!1:l===!1,B=A&&!Ct&&!P;return typeof l=="object"?q(z({},l),{enabled:B}):{enabled:B}}}),vN=x.createContext(null),Kv="button",bN="Draggable";function yN(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=vo(bN),{activators:a,activatorEvent:s,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:h}=x.useContext(Io),{role:p=Kv,roleDescription:m="draggable",tabIndex:g=0}=i!=null?i:{},b=(l==null?void 0:l.id)===t,w=x.useContext(b?ks:vN),[S,C]=ms(),[I,y]=ms(),A=aN(a,t),E=go(n);cn(()=>(f.set(t,{id:t,key:o,node:S,activatorNode:I,data:E}),()=>{const F=f.get(t);F&&F.key===o&&f.delete(t)}),[f,t]);const k=x.useMemo(()=>({role:p,tabIndex:g,"aria-disabled":r,"aria-pressed":b&&p===Kv?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[r,p,g,b,m,d.draggable]);return{active:l,activatorEvent:s,activeNodeRect:u,attributes:k,isDragging:b,listeners:r?void 0:A,node:S,over:h,setNodeRef:C,setActivatorNodeRef:y,transform:w}}function Qv(){return x.useContext(Wv)}const xN="Droppable",CN={timeout:25};function wN(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=vo(xN),{active:a,dispatch:s,over:l,measureDroppableContainers:u}=x.useContext(Io),d=x.useRef({disabled:n}),f=x.useRef(!1),h=x.useRef(null),p=x.useRef(null),{disabled:m,updateMeasurementsFor:g,timeout:b}=z(z({},CN),i),w=go(g!=null?g:r),S=x.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{u(Array.isArray(w.current)?w.current:[w.current]),p.current=null},b)},[b]),C=Ts({callback:S,disabled:m||!a}),I=x.useCallback((k,F)=>{C&&(F&&(C.unobserve(F),f.current=!1),k&&C.observe(k))},[C]),[y,A]=ms(I),E=go(t);return x.useEffect(()=>{!C||!y.current||(C.disconnect(),f.current=!1,C.observe(y.current))},[y,C]),x.useEffect(()=>(s({type:mt.RegisterDroppable,element:{id:r,key:o,disabled:n,node:y,rect:h,data:E}}),()=>s({type:mt.UnregisterDroppable,key:o,id:r})),[r]),x.useEffect(()=>{n!==d.current.disabled&&(s({type:mt.SetDroppableDisabled,id:r,key:o,disabled:n}),d.current.disabled=n)},[r,o,n,s]),{active:a,rect:h,isOver:(l==null?void 0:l.id)===r,node:y,over:l,setNodeRef:A}}function IN(e){let{animation:t,children:n}=e;const[r,i]=x.useState(null),[o,a]=x.useState(null),s=vs(n);return!n&&!r&&s&&i(s),cn(()=>{if(!o)return;const l=r==null?void 0:r.key,u=r==null?void 0:r.props.id;if(l==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,r,o]),x.createElement(x.Fragment,null,n,r?x.cloneElement(r,{ref:a}):null)}const SN={x:0,y:0,scaleX:1,scaleY:1};function AN(e){let{children:t}=e;return x.createElement(Io.Provider,{value:Hv},x.createElement(ks.Provider,{value:SN},t))}const TN={position:"fixed",touchAction:"none"},EN=e=>bs(e)?"transform 250ms ease":void 0,kN=x.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:s,style:l,transform:u,transition:d=EN}=e;if(!s)return null;const f=i?u:q(z({},u),{scaleX:1,scaleY:1}),h=z(q(z({},TN),{width:s.width,height:s.height,top:s.top,left:s.left,transform:Hn.Transform.toString(f),transformOrigin:i&&r?x$(r,s):void 0,transition:typeof d=="function"?d(r):d}),l);return x.createElement(n,{className:a,style:h,ref:t},o)}),qv=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[s,l]of Object.entries(o.active))l!==void 0&&(i[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,l));if(o!=null&&o.dragOverlay)for(const[s,l]of Object.entries(o.dragOverlay))l!==void 0&&r.node.style.setProperty(s,l);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[l,u]of Object.entries(i))n.node.style.setProperty(l,u);a!=null&&a.active&&n.node.classList.remove(a.active)}},_N={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Hn.Transform.toString(t)},{transform:Hn.Transform.toString(n)}]},sideEffects:qv({styles:{active:{opacity:"0"}}})};function PN(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return gs((o,a)=>{if(t===null)return;const s=n.get(o);if(!s)return;const l=s.node.current;if(!l)return;const u=Vv(a);if(!u)return;const{transform:d}=Rt(a).getComputedStyle(a),f=Sv(d);if(!f)return;const h=typeof t=="function"?t:DN(t);return Ov(l,i.draggable.measure),h({active:{id:o,data:s.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:f})})}function DN(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}=z(z({},_N),e);return o=>{let S=o,{active:a,dragOverlay:s,transform:l}=S,u=Ge(S,["active","dragOverlay","transform"]);if(!t)return;const d={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},f={scaleX:l.scaleX!==1?a.rect.width*l.scaleX/s.rect.width:1,scaleY:l.scaleY!==1?a.rect.height*l.scaleY/s.rect.height:1},h=z({x:l.x-d.x,y:l.y-d.y},f),p=i(q(z({},u),{active:a,dragOverlay:s,transform:{initial:l,final:h}})),[m]=p,g=p[p.length-1];if(JSON.stringify(m)===JSON.stringify(g))return;const b=r==null?void 0:r(z({active:a,dragOverlay:s},u)),w=s.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise(C=>{w.onfinish=()=>{b==null||b(),C()}})}}let Jv=0;function ON(e){return x.useMemo(()=>{if(e!=null)return Jv++,Jv},[e])}const RN=x.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:l,zIndex:u=999}=e;const{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggableNodes:m,droppableContainers:g,dragOverlay:b,over:w,measuringConfiguration:S,scrollableAncestors:C,scrollableAncestorRects:I,windowRect:y}=Qv(),A=x.useContext(ks),E=ON(f==null?void 0:f.id),k=Gv(a,{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggingNodeRect:b.rect,over:w,overlayNodeRect:b.rect,scrollableAncestors:C,scrollableAncestorRects:I,transform:A,windowRect:y}),F=Ou(h),Y=PN({config:r,draggableNodes:m,droppableContainers:g,measuringConfiguration:S}),O=F?b.setRef:void 0;return x.createElement(AN,null,x.createElement(IN,{animation:Y},f&&E?x.createElement(kN,{key:E,id:f.id,ref:O,as:s,activatorEvent:d,adjustScale:t,className:l,transition:o,rect:F,style:z({zIndex:u},i),transform:k},n):null))});function _s(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function LN(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Ps(e){return e!==null&&e>=0}function MN(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function BN(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Xv=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=_s(t,r,n),a=t[i],s=o[i];return!s||!a?null:{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}},Zv="Sortable",eb=x.createContext({activeIndex:-1,containerId:Zv,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Xv,disabled:{draggable:!1,droppable:!1}});function tb(e){let{children:t,id:n,items:r,strategy:i=Xv,disabled:o=!1}=e;const{active:a,dragOverlay:s,droppableRects:l,over:u,measureDroppableContainers:d}=Qv(),f=vo(Zv,n),h=s.rect!==null,p=x.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),m=a!=null,g=a?p.indexOf(a.id):-1,b=u?p.indexOf(u.id):-1,w=x.useRef(p),S=!MN(p,w.current),C=b!==-1&&g===-1||S,I=BN(o);cn(()=>{S&&m&&d(p)},[S,p,m,d]),x.useEffect(()=>{w.current=p},[p]);const y=x.useMemo(()=>({activeIndex:g,containerId:f,disabled:I,disableTransforms:C,items:p,overIndex:b,useDragOverlay:h,sortedRects:LN(p,l),strategy:i}),[g,f,I.draggable,I.droppable,C,p,b,l,h,i]);return x.createElement(eb.Provider,{value:y},t)}const $N=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return _s(n,r,i).indexOf(t)},NN=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:l,transition:u}=e;return!u||!r||s!==o&&i===a?!1:n?!0:a!==i&&t===l},FN={duration:200,easing:"ease"},nb="transform",zN=Hn.Transition.toString({property:nb,duration:0,easing:"linear"}),jN={roleDescription:"sortable"};function UN(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,a]=x.useState(null),s=x.useRef(n);return cn(()=>{if(!t&&n!==s.current&&r.current){const l=i.current;if(l){const u=mi(r.current,{ignoreTransform:!0}),d={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(d.x||d.y)&&a(d)}}n!==s.current&&(s.current=n)},[t,n,r,i]),x.useEffect(()=>{o&&a(null)},[o]),o}function rb(e){let{animateLayoutChanges:t=NN,attributes:n,disabled:r,data:i,getNewIndex:o=$N,id:a,strategy:s,resizeObserverConfig:l,transition:u=FN}=e;const{items:d,containerId:f,activeIndex:h,disabled:p,disableTransforms:m,sortedRects:g,overIndex:b,useDragOverlay:w,strategy:S}=x.useContext(eb),C=VN(r,p),I=d.indexOf(a),y=x.useMemo(()=>z({sortable:{containerId:f,index:I,items:d}},i),[f,i,I,d]),A=x.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:E,node:k,isOver:F,setNodeRef:Y}=wN({id:a,data:y,disabled:C.droppable,resizeObserverConfig:z({updateMeasurementsFor:A},l)}),{active:O,activatorEvent:T,activeNodeRect:N,attributes:V,setNodeRef:j,listeners:$,isDragging:M,over:H,setActivatorNodeRef:Q,transform:te}=yN({id:a,data:y,attributes:z(z({},jN),n),disabled:C.draggable}),R=o$(Y,j),L=!!O,U=L&&!m&&Ps(h)&&Ps(b),W=!w&&M,re=W&&U?te:null,se=s!=null?s:S,ae=U?re!=null?re:se({rects:g,activeNodeRect:N,activeIndex:h,overIndex:b,index:I}):null,X=Ps(h)&&Ps(b)?o({id:a,items:d,activeIndex:h,overIndex:b}):I,le=O==null?void 0:O.id,Z=x.useRef({activeId:le,items:d,newIndex:X,containerId:f}),he=d!==Z.current.items,Se=t({active:O,containerId:f,isDragging:M,isSorting:L,id:a,index:I,items:d,newIndex:Z.current.newIndex,previousItems:Z.current.items,previousContainerId:Z.current.containerId,transition:u,wasDragging:Z.current.activeId!=null}),He=UN({disabled:!Se,index:I,node:k,rect:E});return x.useEffect(()=>{L&&Z.current.newIndex!==X&&(Z.current.newIndex=X),f!==Z.current.containerId&&(Z.current.containerId=f),d!==Z.current.items&&(Z.current.items=d)},[L,X,f,d]),x.useEffect(()=>{if(le===Z.current.activeId)return;if(le!=null&&Z.current.activeId==null){Z.current.activeId=le;return}const ct=setTimeout(()=>{Z.current.activeId=le},50);return()=>clearTimeout(ct)},[le]),{active:O,activeIndex:h,attributes:V,data:y,rect:E,index:I,newIndex:X,items:d,isOver:F,isSorting:L,isDragging:M,listeners:$,node:k,overIndex:b,over:H,setNodeRef:R,setActivatorNodeRef:Q,setDroppableNodeRef:Y,setDraggableNodeRef:j,transform:He!=null?He:ae,transition:wt()};function wt(){if(He||he&&Z.current.newIndex===I)return zN;if(!(W&&!bs(T)||!u)&&(L||Se))return Hn.Transition.toString(q(z({},u),{property:nb}))}}function VN(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function Ds(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const HN=[ke.Down,ke.Right,ke.Up,ke.Left],ib=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:s}}=t;if(HN.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=i.get(f.id);if(h)switch(e.code){case ke.Down:r.top<h.top&&l.push(f);break;case ke.Up:r.top>h.top&&l.push(f);break;case ke.Left:r.left>h.left&&l.push(f);break;case ke.Right:r.left<h.left&&l.push(f);break}});const u=I$({active:n,collisionRect:r,droppableRects:i,droppableContainers:l,pointerCoordinates:null});let d=wv(u,"id");if(d===(a==null?void 0:a.id)&&u.length>1&&(d=u[1].id),d!=null){const f=o.get(n.id),h=o.get(d),p=h?i.get(h.id):null,m=h==null?void 0:h.node.current;if(m&&p&&f&&h){const b=ws(m).some((A,E)=>s[E]!==A),w=ob(f,h),S=WN(f,h),C=b||!w?{x:0,y:0}:{x:S?r.width-p.width:0,y:S?r.height-p.height:0},I={x:p.left,y:p.top};return C.x&&C.y?I:bo(I,C)}}}};function ob(e,t){return!Ds(e)||!Ds(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function WN(e,t){return!Ds(e)||!Ds(t)||!ob(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const ab=Ve(c.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-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-2m6 4c1.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"}),"DragIndicator"),Os=x.createContext({attributes:{},listeners:void 0,ref(){}}),GN=()=>{const{attributes:e,listeners:t,ref:n}=x.useContext(Os);return c.jsx(v.Button,q(z(z({sx:{backgroundColor:"transparent",color:"#919eab",width:"10px",":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}},e),t),{ref:n,children:c.jsx(ab,{})}))},sb=({children:e,id:t,tooltipTitle:n,removeItem:r,useDraggable:i=!0,variant:o="plain"})=>{const{attributes:a,isDragging:s,listeners:l,setNodeRef:u,setActivatorNodeRef:d,transform:f,transition:h}=rb({id:t}),p=x.useMemo(()=>({attributes:a,listeners:l,ref:d}),[a,l,d]),m={opacity:s?.6:void 0,transform:Hn.Translate.toString(f),transition:h};return c.jsx(Os.Provider,{value:p,children:c.jsx(v.ListItem,{variant:o,ref:u,style:m,startAction:i?c.jsx(GN,{}):c.jsx(c.Fragment,{}),endAction:i?c.jsx(v.Tooltip,{title:n,children:c.jsx(v.Button,{variant:"outlined",color:"danger",onClick:r,sx:{ml:"auto",p:.5},size:"sm",children:c.jsx(De.Remove,{})})}):c.jsx(c.Fragment,{}),sx:{p:2,borderRadius:"sm"},children:e})})},YN={sideEffects:qv({styles:{active:{opacity:"0.6"}}})},lb=({children:e})=>c.jsx(RN,{dropAnimation:YN,children:e}),KN=({entities:e=[],labels:t,disabled:n,setEntities:r,removeItem:i})=>{const[o,a]=x.useState(null),s=x.useMemo(()=>e.find(u=>u.id===(o==null?void 0:o.id)),[o,e]),l=xv(Cs(Ss),Cs(Is,{coordinateGetter:ib}));return c.jsxs(Yv,{sensors:l,onDragStart:({active:u})=>{a(u)},onDragEnd:({active:u,over:d})=>{if(d&&u.id!==(d==null?void 0:d.id)){const f=e.findIndex(({id:p})=>p===u.id),h=e.findIndex(({id:p})=>p===d.id);r(_s(e,f,h))}a(null)},onDragCancel:()=>{a(null)},children:[c.jsx(tb,{items:e,children:c.jsx(v.List,{sx:{gap:"10px",padding:0},children:e.map(u=>c.jsxs(sb,{id:u.id,variant:"outlined",removeItem:()=>i(u.id),tooltipTitle:t.removeEntity,useDraggable:!n,children:[c.jsx(v.Typography,{ml:n?0:2.5,children:u.title||u.name}),u.type&&c.jsx(v.Chip,{color:fB(u.type),sx:{marginLeft:2,marginRight:4},children:hB(u.type)})]},`sortable-item-${u.id}`))})}),c.jsx(lb,{children:s?c.jsx(c.Fragment,{children:e.map(u=>c.jsx(sb,{id:u.id,useDraggable:!1,removeItem:()=>{},tooltipTitle:t.removeEntity},`sortable-overlay-item-${u.id}`))}):c.jsx(c.Fragment,{})})]})},QN=({labels:e,value:t,options:n,size:r="sm",disabled:i=!1,sx:o={},onChange:a})=>c.jsxs(v.FormControl,{size:r,disabled:i,children:[c.jsx(v.FormLabel,{children:e.itemsPerPage}),c.jsx(v.Select,{value:t,size:r,onChange:a,sx:q(z({},o),{minHeight:"37px"}),children:n.map((s,l)=>c.jsx(v.Option,{value:s,children:s},`items-per-page-${s}-${l}`))})]}),qN=(e,t)=>{const[n,r]=x.useState(null),{sdk:i}=lt(),o=()=>_(this,null,function*(){let s=[];if(!e){r(s);return}try{switch(e){case"top_x":s=(yield i.topX.getGames({limit:50},!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break;case"match_quiz":s=(yield i.matchQuiz.getGames({limit:50},!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break;case"template":s=(yield i.loyalty.getTemplates(void 0,!0)).data.map(w=>({id:w.id,name:w.name,status:w.status,type:e,relationship:"relatedTo"}));break;case"classic_quiz":s=(yield i.miniGames.getClassicQuizzes({limit:50},!1,!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break;case"personality_quiz":s=(yield i.miniGames.getPersonalityQuizzes({limit:50},!1,!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break;case"either_or":s=(yield i.miniGames.getEitherOrs({limit:50},!1,!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break;case"poll":s=(yield i.voting.getPolls({limit:50},!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break;case"bracket":s=(yield i.bracketGame.getGames({limit:50},!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break;case"standing":s=(yield i.standingGame.getGames({limit:50},!0)).data.map(w=>({id:w.id,name:w.title,status:w.status,type:e,relationship:"relatedTo"}));break}}catch(l){console.error(l),r(s),t();return}r(s)});return x.useEffect(()=>(o(),()=>r(null)),[e]),n},JN=({status:e})=>{let t="neutral";switch(e){case"DYNAMIC":t="primary";break;case"CUSTOM":t="success";break;case"OPEN":t="primary";break;case"LIVE":t="primary";break;case"CANCELED":t="warning";break;case"SETTLED":t="success";break;case"INACTIVE":t="danger";break;case"ACTIVE":t="success";break;case"EXPIRED":t="neutral";break}return c.jsx(v.Chip,{color:t,variant:"solid",size:"sm",children:e})},XN=Ve(c.jsx("path",{d:"M12.16 3h-.32L9.21 8.25h5.58zm4.3 5.25h5.16L19 3h-5.16zm4.92 1.5h-8.63V20.1zM11.25 20.1V9.75H2.62zM7.54 8.25 10.16 3H5L2.38 8.25z"}),"Diamond"),ZN=Ve(c.jsx("path",{d:"m21.58 16.09-1.09-7.66C20.21 6.46 18.52 5 16.53 5H7.47C5.48 5 3.79 6.46 3.51 8.43l-1.09 7.66C2.2 17.63 3.39 19 4.94 19c.68 0 1.32-.27 1.8-.75L9 16h6l2.25 2.25c.48.48 1.13.75 1.8.75 1.56 0 2.75-1.37 2.53-2.91M11 11H9v2H8v-2H6v-1h2V8h1v2h2zm4-1c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m2 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}),"SportsEsports"),eF=Ve(c.jsx("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMark"),tF=Ve(c.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),nF=Ve(c.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-7h2zm4 0h-2V7h2zm4 0h-2v-4h2z"}),"Poll"),rF=e=>{switch(e.entityType){case"top_x":return c.jsx(v.Tooltip,{title:"Top X",children:c.jsx(XN,{})});case"match_quiz":return c.jsx(v.Tooltip,{title:"Match Quiz",children:c.jsx(ZN,{})});case"template":return c.jsx(v.Tooltip,{title:"Leaderboard Templates",children:c.jsx(De.EmojiEvents,{})});case"classic_quiz":return c.jsx(v.Tooltip,{title:"Classic Quiz",children:c.jsx(eF,{})});case"either_or":return c.jsx(v.Tooltip,{title:"Either/Or",children:c.jsx(tF,{})});case"poll":return c.jsx(v.Tooltip,{title:"Poll",children:c.jsx(nF,{})});case"bracket":return c.jsx(v.Tooltip,{title:"Custom Bracket Game",children:c.jsx(De.EmojiEvents,{})});case"standing":return c.jsx(v.Tooltip,{title:"Custom Standings Game",children:c.jsx(De.EmojiEvents,{})});default:return null}},iF=({entity:e,deleteLabel:t,onDelete:n})=>c.jsx(c.Fragment,{children:c.jsx(v.Card,{sx:{p:2,mb:2},children:c.jsx(v.CardContent,{children:c.jsxs(v.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"space-between"},children:[c.jsx(v.Typography,{fontSize:"sm",startDecorator:c.jsx(rF,{entityType:e.type}),children:e.name}),c.jsx(v.Box,{display:{xs:"none",md:"block"},children:c.jsx(JN,{status:e.status})}),c.jsx(v.Box,{children:c.jsx(v.Tooltip,{title:t,children:c.jsx(v.IconButton,{onClick:()=>n(e.id,e.relationship),color:"danger",size:"sm",children:c.jsx(De.Delete,{})})})})]})})})}),oF=(e,t,n,r)=>_(this,null,function*(){let o=[];const a=new Map;t.forEach(s=>{if(a.has(s.entity_type)){const l=a.get(s.entity_type);a.set(s.entity_type,[...l,[s.entity_id,s.entity_relationship]])}else a.set(s.entity_type,[[s.entity_id,s.entity_relationship]])});try{for(const[s,l]of a)switch(s){case"top_x":const u=l.map(([O])=>O),d=yield e.topX.getGames({limit:u.length,gameIds:u},!0);o=[...o,...d.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"match_quiz":const f=l.map(([O])=>O),h=yield e.matchQuiz.getGames({limit:f.length,gameIds:f},!0);o=[...o,...h.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"template":const p=l.map(([O])=>O),m=yield e.loyalty.getTemplates(void 0,!0);o=[...o,...m.data.filter(O=>p.includes(O.id)).map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"classic_quiz":const g=l.map(([O])=>O),b=yield e.miniGames.getClassicQuizzes({limit:g.length,classicQuizIds:g},!1,!0);o=[...o,...b.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"personality_quiz":const w=l.map(([O])=>O),S=yield e.miniGames.getPersonalityQuizzes({limit:w.length,personalityQuizIds:w},!1,!0);o=[...o,...S.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"either_or":const C=l.map(([O])=>O),I=yield e.miniGames.getEitherOrs({limit:C.length,eitherOrIds:C},!1,!0);o=[...o,...I.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"poll":const y=l.map(([O])=>O),A=yield e.voting.getPolls({limit:y.length,pollIds:y},!0);o=[...o,...A.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"bracket":const E=l.map(([O])=>O),k=yield e.bracketGame.getGames({limit:E.length,gameIds:E},!0);o=[...o,...k.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"standing":const F=l.map(([O])=>O),Y=yield e.standingGame.getGames({limit:F.length,gameIds:F},!0);o=[...o,...Y.data.map(O=>{var N;const T=((N=l.find(([V])=>V===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;default:}}catch(s){console.error("Error loading related entities",s),n(o),r()}n(o)}),aF=["top_x","match_quiz","template","classic_quiz","personality_quiz","poll","either_or","bracket","standing"],sF=["relatedTo","blocks","blockedBy","bonusPointsGame","nextInSeries","previousInSeries"],lF=new Map().set("template","Leaderboard Templates").set("classic_quiz","Classic Quiz").set("personality_quiz","Personality Quiz").set("either_or","Either/Or").set("match_quiz","Match Quiz").set("top_x","Top X").set("bracket","Custom Bracket Game").set("standing","Custom Standing Game").set("poll","Poll"),cb=new Map().set("relatedTo","Related to").set("blocks","Blocks").set("blockedBy","Blocked by").set("nextInSeries","Next in series").set("previousInSeries","Previous in series").set("bonusPointsGame","Bonus points game"),cF=({defaultValue:e=[],onChange:t,labels:n})=>{const[r,i]=x.useState([]),[o,a]=x.useState(""),[s,l]=x.useState(null),[u,d]=x.useState("relatedTo"),[f,h]=x.useState(!1),p=()=>h(!f),m=qN(s,p),{sdk:g}=lt();x.useEffect(()=>(e.length>0&&oF(g,e,i,p),()=>{i([]),a(""),l(null),d("relatedTo")}),[]);const b=()=>{if(e.some(E=>E.entity_id===o&&E.entity_relationship===u)){a("");return}const y=[...e,{entity_id:o,entity_type:s,entity_relationship:u}],A=(m==null?void 0:m.filter(E=>E.id===o).map(E=>({id:E.id,name:E.name,type:s,status:E.status,relationship:u})))||[];i([...r,...A]),t(y),a("")},w=(I,y)=>{const A=e.filter(k=>!(k.entity_id===I&&k.entity_relationship===y)),E=r.filter(k=>!(k.id===I&&k.relationship===y));i(E),t(A)},S=r.reduce((I,y)=>{const A=y.relationship;return I[A]||(I[A]=[]),I[A].push(y),I},{}),C=Object.keys(S).sort();return c.jsxs(c.Fragment,{children:[C.map(I=>c.jsxs(v.Box,{sx:{mb:2},children:[c.jsx(v.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:c.jsx(v.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:cb.get(I)||"Unknown relationship"})}),S[I].map((y,A)=>c.jsx(iF,{entity:y,deleteLabel:n.delete,onDelete:w},`related-entity-relationship-${y.id}-${A}`))]},`relationship-group-${I}`)),c.jsxs(v.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:1},children:[c.jsxs(v.FormControl,{children:[c.jsx(v.FormLabel,{required:!0,color:"primary",children:n.type}),c.jsx(v.Select,{value:s,size:"sm",name:"entity_type",onChange:(I,y)=>l(y),sx:{minHeight:"37px"},children:aF.map(I=>c.jsx(v.Option,{value:I,children:lF.get(I)},`entity-type-option-${I}`))})]}),c.jsxs(v.FormControl,{children:[c.jsx(v.FormLabel,{required:!0,color:"primary",children:n.relationship}),c.jsx(v.Select,{value:u,size:"sm",name:"entity_relationship",onChange:(I,y)=>d(y),sx:{minHeight:"37px"},children:sF.map(I=>c.jsx(v.Option,{value:I,children:cb.get(I)},`entity-relationship-option-${I}`))})]}),c.jsxs(v.FormControl,{children:[c.jsx(v.FormLabel,{required:!0,color:"primary",children:n.entity}),c.jsx(v.Select,{value:o,size:"sm",name:"entity_id",onChange:(I,y)=>a(y),sx:{width:"100%",mr:{xs:0,md:1},mb:{xs:1,md:0},minHeight:"37px"},endDecorator:!m&&c.jsx(v.CircularProgress,{size:"sm"}),children:m&&m.map(I=>c.jsx(v.Option,{value:I.id,children:I.name},`entity--${I.id}`))})]}),c.jsx(v.Button,{startDecorator:c.jsx(De.Add,{}),disabled:!o||!s,onClick:b,sx:{mb:1},children:n.add})]}),c.jsx(nt,{showToast:f,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:p})]})},uF=e=>{const[t,n]=x.useState(!1),[r,i]=x.useState(!1),[o,a]=x.useState("success"),[s,l]=x.useState(""),u=x.useContext(ea),d=(h,p)=>{a(h),l(p),i(!0)},f=()=>_(this,null,function*(){n(!0);const h=yield u==null?void 0:u.https.exportLeadsPerEntity(e.entityId);if(h!=null&&h.ok){const p=yield h.blob(),m=URL.createObjectURL(p),g=document.createElement("a");g.href=m,g.download=`${e.entityType}_${e.entityName}_exported_users_leads.csv`,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(m),n(!1),d("success",e.labels.usersLeadsExportMessage)}else console.error("Failed to export all users leads: ",yield h==null?void 0:h.json()),n(!1),d("danger",e.labels.usersLeadsExportErrorMessage)});return c.jsxs(c.Fragment,{children:[c.jsxs(v.Box,{mb:2,children:[c.jsx(v.Box,{display:"flex",alignItems:"center",mb:1,children:c.jsx(v.Typography,{level:"body-lg",sx:{mx:"auto"},children:e.labels.exportUsersLeads})}),c.jsx(v.Sheet,{sx:{overflowX:"auto",minWidth:"700px"},children:c.jsxs(v.Table,{variant:"outlined",hoverRow:!1,borderAxis:"bothBetween",size:"sm",sx:{backgroundColor:"#fff","& > thead > tr > th:first-child, & > tbody > tr > td:first-child":{textAlign:"left",width:"50%"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"},"& > thead > tr > th, & > tbody > tr > td":{textAlign:"right"}},children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:e.labels.category}),c.jsx("th",{children:e.labels.action})]})}),c.jsx("tbody",{children:c.jsxs("tr",{children:[c.jsxs("td",{children:[c.jsx(v.Typography,{level:"body-sm",fontWeight:"600",children:e.labels.exportAllUsersLeads}),c.jsx(v.Typography,{level:"body-xs",color:"neutral",children:e.labels.exportAllUsersLeadsDescription})]}),c.jsx("td",{children:c.jsx(v.Button,{loading:t,onClick:f,children:e.labels.exportAllUsersLeads})})]})})]})})]}),c.jsx(nt,{showToast:r,color:o,message:s,hideToast:()=>i(!1)})]})},dF=({tooltipContent:e="Drag to reorder"})=>{const{attributes:t,listeners:n,ref:r}=x.useContext(Os);return c.jsx(v.Tooltip,{title:e,placement:"left",arrow:!0,children:c.jsx(v.IconButton,q(z(z({variant:"plain",color:"neutral",size:"sm",sx:{color:"text.tertiary",my:"auto",mr:1,":hover":{bgcolor:"action.hover"},":active":{bgcolor:"action.selected"},transition:"all 0.2s",cursor:"grab","&:active":{cursor:"grabbing"}}},t),n),{ref:r,children:c.jsx(ab,{})}))})},ub=({id:e,useDraggable:t=!0,variant:n="outlined",item:r,tooltipContent:i})=>{const{attributes:o,isDragging:a,listeners:s,setNodeRef:l,setActivatorNodeRef:u,transform:d,transition:f}=rb({id:e}),h=x.useMemo(()=>({attributes:o,listeners:s,ref:u}),[o,s,u]),p={opacity:a?.6:void 0,transform:Hn.Translate.toString(d),transition:f},m=b=>b.split(" ").map(w=>w[0]).join("").toUpperCase().substring(0,2),g=b=>r!=null&&r.color?r.color:`hsl(${b.split("").reduce((C,I)=>I.charCodeAt(0)+((C<<5)-C),0)%360}, 70%, 80%)`;return c.jsx(Os.Provider,{value:h,children:c.jsx(v.ListItem,{variant:n,ref:l,style:p,endAction:t?c.jsx(dF,{tooltipContent:i}):null,sx:{p:0,borderRadius:"md",overflow:"hidden",transition:"all 0.2s",boxShadow:a?"md":"sm",transform:`scale(${a?1.02:1})`,border:"1px solid",borderColor:"divider"},children:c.jsxs(v.Box,{sx:{display:"flex",width:"100%",alignItems:"center",gap:2,p:0},children:[c.jsx(v.Sheet,{sx:{width:"8px",alignSelf:"stretch",bgcolor:g(r.name)}}),c.jsx(v.Avatar,{src:r.image,alt:r.name,sx:{bgcolor:g(r.name),my:2,ml:1},children:m(r.name)}),c.jsxs(v.Box,{sx:{py:2,pr:2,flexGrow:1,display:"flex",flexDirection:"column",gap:.5},children:[c.jsx(v.Typography,{level:"title-md",children:r.name}),r.description&&c.jsx(v.Typography,{level:"body-sm",sx:{color:"text.secondary",textOverflow:"ellipsis"},children:r.description}),c.jsx(v.Box,{sx:{mt:.5},children:r.type&&c.jsx(v.Chip,{variant:"soft",color:"primary",size:"sm",sx:{px:1,bgcolor:`${g(r.type)}40`},children:r.type})})]})]})})})},fF=({items:e=[],labels:t,setItems:n})=>{const[r,i]=x.useState(null),o=x.useMemo(()=>e.find(s=>s.id===(r==null?void 0:r.id)),[r,e]),a=xv(Cs(Ss,{activationConstraint:{distance:8}}),Cs(Is,{coordinateGetter:ib}));return e.length===0?c.jsx(v.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",border:"1px dashed",borderColor:"divider",borderRadius:"md"},children:c.jsx(v.Typography,{level:"body-lg",color:"neutral",children:(t==null?void 0:t.noItemsToDisplay)||"No items to display"})}):c.jsxs(Yv,{sensors:a,onDragStart:({active:s})=>{i(s)},onDragEnd:({active:s,over:l})=>{if(l&&s.id!==(l==null?void 0:l.id)){const u=e.findIndex(({id:f})=>f===s.id),d=e.findIndex(({id:f})=>f===l.id);n(_s(e,u,d))}i(null)},onDragCancel:()=>{i(null)},children:[c.jsx(tb,{items:e,children:c.jsx(v.List,{sx:{gap:2,maxHeight:"70vh",overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"action.focus",borderRadius:"4px"}},children:e.map(s=>c.jsx(ub,{id:s.id,variant:"outlined",item:s,tooltipContent:t==null?void 0:t.dragToReorder},`sortable-item-${s.id}`))})}),c.jsx(lb,{children:o?c.jsx(ub,{id:o.id,useDraggable:!1,item:o,tooltipContent:t.dragToReorder},`sortable-overlay-item-${o.id}`):null})]})},hF=({entityType:e,entityId:t,authRequirement:n,labels:r})=>{const[i,o]=x.useState(!1),[a,s]=x.useState(!1),[l,u]=x.useState(""),[d,f]=x.useState(""),[h,p]=x.useState([]),[m,g]=x.useState("before"),[b,w]=x.useState(!1),[S,C]=x.useState(""),[I,y]=x.useState(""),[A,E]=x.useState("STANDARD"),[k,F]=x.useState("left"),[Y,O]=x.useState(!0);x.useEffect(()=>{n!=="LEAD"&&o(!1),n!=="REGISTERED"&&s(!1)},[n]);const T=`
|
|
2476
2476
|
data-content-type="${e}"`,N=`
|
|
2477
2477
|
data-content-id="${t}"`,V=h.length>0?`
|
|
2478
2478
|
data-lead-fields="${h.join(", ")}"`:"",j=i?`
|
|
@@ -2485,7 +2485,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2485
2485
|
data-image-position="${k}"`:"",L=`
|
|
2486
2486
|
data-show-answer-explanations="${Y}"`,U=`<div
|
|
2487
2487
|
data-component="fu-widget"${T}${N}${te}${R}${L}${V}${j}${$}${M}${H}${Q}
|
|
2488
|
-
></div>`,W={fullName:"Full name",firstName:"First name",lastName:"Last name",email:"Email",gender:"Gender",country:"Country",phoneCountryCode:"Phone country code",phoneNumber:"Phone number"},re=({title:Z})=>c.jsx(v.Tooltip,{title:Z,sx:{maxWidth:300},children:c.jsx(ir,{color:"primary"})}),se=()=>c.jsxs(v.Card,{sx:{mb:
|
|
2488
|
+
></div>`,W={fullName:"Full name",firstName:"First name",lastName:"Last name",email:"Email",gender:"Gender",country:"Country",phoneCountryCode:"Phone country code",phoneNumber:"Phone number"},re=({title:Z})=>c.jsx(v.Tooltip,{title:Z,sx:{maxWidth:300},children:c.jsx(ir,{color:"primary"})}),se=()=>c.jsxs(v.Card,{sx:{mb:1.5},children:[c.jsx(Ar,{label:"",values:h,allValues:Object.keys(W),valuesMap:W,onChange:Z=>p(Z)}),c.jsxs(v.FormControl,{sx:{mb:2},children:[c.jsx(v.FormLabel,{color:"primary",children:r.leadPosition}),c.jsxs(v.Select,{value:m,size:"md",name:"lead_position",onChange:(Z,he)=>g(he==="before"?"before":"after"),children:[c.jsx(v.Option,{value:"before",children:"Before"}),c.jsx(v.Option,{value:"after",children:"After"})]})]})]}),ae=()=>c.jsxs(v.Card,{sx:{mb:1.5},children:[c.jsx(rn,{label:r.signInLabel,placeholder:"",defaultValue:"",value:l,required:!1,size:"md",endDecorator:c.jsx(re,{title:r.signInLabelInfoMessage}),onChange:Z=>u(Z.target.value)}),c.jsx(rn,{label:r.authenticationHandler,placeholder:"",defaultValue:d,value:"",required:!1,size:"md",endDecorator:c.jsx(re,{title:r.authenticationHandlerInfoMessage}),onChange:Z=>f(Z.target.value)})]}),X=()=>c.jsxs(v.Card,{sx:{mb:1.5},children:[c.jsx(rn,{label:r.id,placeholder:"",defaultValue:S,required:!1,size:"md",endDecorator:c.jsx(re,{title:r.campaignIdInfoMessage}),onChange:Z=>C(Z.target.value)}),c.jsx(rn,{label:r.name,placeholder:"",defaultValue:I,required:!1,size:"md",endDecorator:c.jsx(re,{title:r.campaignNameInfoMessage}),onChange:Z=>y(Z.target.value)})]}),le=(Z,he)=>{E(he),F(he!=="STANDARD"?null:"left")};return c.jsxs(v.Box,{mt:1,children:[e==="classic-quiz"||e==="poll"?c.jsxs(v.Box,{mb:1.5,children:[c.jsxs(v.FormControl,{sx:{mb:1.5},children:[c.jsx(v.FormLabel,{color:"primary",children:r.layoutTemplate}),c.jsxs(v.Select,{value:A,size:"md",name:"layout_template",onChange:le,children:[c.jsx(v.Option,{value:"STANDARD",children:"Standard"}),c.jsx(v.Option,{value:"SPLIT",children:"Split"}),c.jsx(v.Option,{value:"OVERLAY",children:"Overlay"})]}),c.jsx(v.FormHelperText,{children:r.layoutTemplateDescription})]}),c.jsxs(v.FormControl,{sx:{mb:1.5},children:[c.jsx(v.FormLabel,{color:"primary",children:r.imagePosition}),c.jsxs(v.Select,{value:k,size:"md",name:"image_position",disabled:A!=="STANDARD",onChange:(Z,he)=>F(he),children:[c.jsx(v.Option,{value:"left",children:"Left"}),c.jsx(v.Option,{value:"right",children:"Right"})]}),c.jsx(v.FormHelperText,{children:r.imagePositionDescription})]})]}):c.jsx(c.Fragment,{}),e==="classic-quiz"?c.jsxs(v.Box,{display:"flex",alignItems:"center",mb:1.5,children:[c.jsx(ui,{defaultValue:Y,label:r.showAnswerExplanations,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:Z=>{O(Z)}}),c.jsx(v.Tooltip,{title:r.showAnswerExplanationsTooltip,sx:{ml:2,maxWidth:300},children:c.jsx(ir,{color:"primary"})})]}):c.jsx(c.Fragment,{}),c.jsxs(v.Box,{display:"flex",mb:1.5,children:[c.jsx(ui,{defaultValue:i,label:r.configureLeads,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:n!=="LEAD",onChange:Z=>{Z===!1&&(p([]),g("before")),o(Z)}}),n!=="LEAD"&&c.jsx(v.Tooltip,{title:r.configureLeadsDisabledMessage,sx:{ml:2,maxWidth:300},children:c.jsx(ir,{color:"primary",fontSize:"small"})})]}),i&&se(),c.jsxs(v.Box,{display:"flex",mb:1.5,children:[c.jsx(ui,{defaultValue:a,label:r.configureSignIn,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:n!=="REGISTERED",onChange:Z=>{Z===!1&&(u(""),f("")),s(Z)}}),n!=="REGISTERED"&&c.jsx(v.Tooltip,{title:r.configureSignInDisabledMessage,sx:{ml:2,maxWidth:300},children:c.jsx(ir,{color:"primary",fontSize:"small"})})]}),a&&ae(),c.jsx(ui,{sx:{label:{mb:1.5}},defaultValue:b,label:r.addCampaignInfo,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:Z=>{Z===!1&&(C(""),y("")),w(Z)}}),b&&X(),c.jsxs(v.Box,{position:"relative",mb:1.5,children:[c.jsx(v.Textarea,{value:U,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:Z=>Z.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),c.jsx(v.Tooltip,{title:r.copyToClipboard,children:c.jsx(v.Button,{onClick:()=>{navigator.clipboard.writeText(U)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:c.jsx(De.ContentCopy,{})})})]}),c.jsx(v.Alert,{variant:"outlined",color:"primary",startDecorator:c.jsx(ir,{}),sx:{mb:1.5,width:"fit-content"},children:c.jsxs(v.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[r.divElementTextInfo,c.jsx(v.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},pF=["load-more","limited"],gF={"load-more":"Load more",limited:"Limited"},mF=({entityId:e,labels:t})=>{const[n,r]=x.useState(!1),[i,o]=x.useState(""),[a,s]=x.useState(""),[l,u]=x.useState(""),[d,f]=x.useState(10),[h,p]=x.useState(2),[m,g]=x.useState("load-more"),b=`
|
|
2489
2489
|
data-content-id="${e}"`,w=i?`
|
|
2490
2490
|
data-classic-quiz-url="${i}"`:"",S=a?`
|
|
2491
2491
|
data-either-or-url="${a}"`:"",C=l?`
|
|
@@ -2495,4 +2495,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2495
2495
|
data-widget-mode="${m}"`,F=`<div
|
|
2496
2496
|
data-component="fu-widget"
|
|
2497
2497
|
data-content-type="list"${b}${w}${S}${C}${A}${E}${k}
|
|
2498
|
-
></div>`,Y=({title:N})=>c.jsx(v.Tooltip,{title:N,sx:{maxWidth:300},children:c.jsx(ir,{color:"primary"})}),O=()=>c.jsxs(v.Card,{sx:{pb:1,mb:3},children:[c.jsx(xn,{label:t.classicQuizURL,placeholder:"",defaultValue:i,required:!1,size:"md",endDecorator:c.jsx(Y,{title:t.quizzesInfoMessage}),onChange:N=>o(N.target.value)}),c.jsx(xn,{label:t.eitherOrURL,placeholder:"",defaultValue:a,required:!1,size:"md",endDecorator:c.jsx(Y,{title:t.eitherOrsInfoMessage}),onChange:N=>s(N.target.value)}),c.jsx(xn,{label:t.pollURL,placeholder:"",defaultValue:l,required:!1,size:"md",endDecorator:c.jsx(Y,{title:t.pollsInfoMessage}),onChange:N=>u(N.target.value)})]}),T=()=>c.jsxs(v.Card,{sx:{pb:1,mb:3},children:[c.jsx(xu,{label:t.itemsPerPage,description:t.itemsPerPageDescription,defaultValue:d,onChange:N=>f(N||null),size:"md"}),c.jsx(xu,{label:t.itemsPerRow,description:t.itemsPerRowDescription,defaultValue:h,onChange:N=>p(N||null),size:"md"}),c.jsxs(v.FormControl,{sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{color:"primary",children:t.mode}),c.jsx(v.Select,{defaultValue:m,onChange:(N,V)=>g(V),children:pF.map((N,V)=>c.jsx(v.Option,{value:N,children:gF[N]},`basic-select-${N}-${V}`))}),c.jsx(v.FormHelperText,{children:t.modeDescription})]})]});return c.jsxs(v.Box,{mt:1,children:[T(),c.jsx(ui,{defaultValue:n,label:t.configureURLs,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:N=>{N===!1&&(o(""),s(""),u("")),r(N)}}),n&&O(),c.jsxs(v.Box,{position:"relative",mb:1,children:[c.jsx(v.Textarea,{value:F,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:N=>N.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),c.jsx(v.Tooltip,{title:t.copyToClipboard,children:c.jsx(v.Button,{onClick:()=>{navigator.clipboard.writeText(F)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:c.jsx(De.ContentCopy,{})})})]}),c.jsx(v.Alert,{variant:"outlined",color:"primary",startDecorator:c.jsx(ir,{}),sx:{mb:1,width:"fit-content"},children:c.jsxs(v.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[t.divElementTextInfo,c.jsx(v.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},db=e=>(e==null?void 0:e.map(t=>({id:t.id,value:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,label:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,avatar:t.avatar})))||[],vF=({labels:e,ids:t,onChange:n})=>{const[r,i]=x.useState([]),[o,a]=x.useState([]),[s,l]=x.useState(""),[u,d]=x.useState("name"),[f,h]=x.useState(!1),[p,m]=x.useState(!1),{sdk:g}=lt(),b=!0,w=()=>m(!p),S=(A,E)=>{i(E);const k=E.map(F=>F.id);n(k&&k.length?k:null)},C=3;x.useEffect(()=>{!s&&t&&t.length&&g.profile.getByIds(t,void 0,b).then(A=>{i(db(A))}).catch(A=>{w(),console.error(A),i([])})},[]);const I=x.useMemo(()=>or((A,E)=>{h(!0),g.profile.getByIds(E==="id"?[A]:[],E==="name"?A:void 0,b).then(k=>{a([...db(k)]),h(!1)}).catch(k=>{console.error(k),w(),a([]),h(!1)})},300),[]);x.useEffect(()=>{if(!s||s.length<C){a([]);return}return I(s,u),()=>I.cancel()},[s,I,u]);const y=(A,E)=>A.map((k,F)=>{var Y;return c.jsx(v.Chip,{variant:"solid",endDecorator:c.jsx(v.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:O=>E({index:F}).onClick(O),children:c.jsx(De.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:c.jsxs(v.Box,{display:"flex",alignItems:"center",mr:1,children:[c.jsx(v.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(Y=k.avatar)!=null?Y:ze.avatar}),c.jsx(v.Typography,{children:k.label})]})},k.id)});return c.jsxs(c.Fragment,{children:[c.jsx(v.Box,{sx:{marginBottom:"16px"},children:c.jsx(v.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:f,disableClearable:!0,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(A,E)=>A.id===E.id,endDecorator:c.jsxs(c.Fragment,{children:[f&&c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary",marginRight:2}}),c.jsx(v.Divider,{orientation:"vertical"}),c.jsxs(v.Select,{variant:"plain",value:u,onChange:(A,E)=>d(E),slotProps:{listbox:{variant:"outlined"}},sx:{mr:-1.5,"&:hover":{bgcolor:"transparent"}},children:[c.jsx(v.Option,{value:"name",children:e.searchByName}),c.jsx(v.Option,{value:"id",children:e.searchById})]})]}),placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:A=>A.filter(E=>!r.some(k=>k.value===E.value)),onInputChange:(A,E)=>{l(E)},onChange:S,getOptionKey:A=>A.id,value:r,renderTags:y,renderOption:(A,E)=>{var k;return c.jsx(v.AutocompleteOption,q(z({},A),{children:c.jsxs(v.Box,{display:"flex",alignItems:"center",mr:1,children:[c.jsx(v.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(k=E.avatar)!=null?k:ze.avatar}),c.jsx(v.Typography,{children:E.label})]})}))}})}),c.jsx(nt,{showToast:p,message:e.searchProfilesErrorMessage,color:"danger",hideToast:w})]})},bF=({value:e,sx:t,tooltipPlacement:n})=>{const r=l=>{const u=Math.abs(l);return u>=1e9?(l/1e9).toFixed(1)+"b":u>=1e6?(l/1e6).toFixed(1)+"m":u>=1e3?(l/1e3).toFixed(1)+"k":l.toString()},i=l=>new Intl.NumberFormat("en-US").format(l),o=Math.abs(e)>=1e3,a=r(e),s=i(e);return o?c.jsx(v.Tooltip,{title:s,placement:n,arrow:!0,children:c.jsx(v.Typography,{sx:t,children:a})}):c.jsx(v.Typography,{sx:t,children:a})},yF=(e,t,n,r)=>{if(e&&e.length===0){n([]);return}t.football.getPlayers({playerIds:e}).then(i=>{const o=i.data.map(a=>fb(a));n(o)}).catch(i=>{console.error("Error fetching players by ID:",i),r()})},fb=e=>{var t,n,r,i,o;return{id:e.id,name:e.name,avatar:((t=e.assets)==null?void 0:t.headshot)||ze.avatar,countryName:((n=e.country)==null?void 0:n.name)||"Unknown",countryFlag:((i=(r=e.country)==null?void 0:r.assets)==null?void 0:i.flag)||ze.flag,teams:((o=e.teams)==null?void 0:o.map(a=>{var s;return{id:a.id,name:a.name,logo:((s=a.assets)==null?void 0:s.logo)||ze.team}}))||[]}},xF=({player:e,onRemove:t})=>c.jsx(v.Tooltip,{title:c.jsxs(v.Box,{sx:{p:1},children:[c.jsx(v.Typography,{level:"body-sm",fontWeight:"bold",children:e.name}),c.jsxs(v.Typography,{level:"body-xs",sx:{display:"flex",alignItems:"center",gap:.5,mt:.5},children:[c.jsx("img",{src:e.countryFlag,alt:e.countryName,width:16,height:12,loading:"lazy"}),e.countryName]}),e.teams&&e.teams.length>0&&c.jsxs(v.Box,{sx:{mt:.5},children:[c.jsx(v.Typography,{level:"body-xs",sx:{mb:.5},children:"Teams:"}),c.jsx(v.Box,{sx:{display:"flex",flexDirection:"column",gap:.25},children:e.teams.map((n,r)=>c.jsxs(v.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[c.jsx("img",{src:n.logo,alt:n.name,width:16,height:16,style:{borderRadius:"2px"},loading:"lazy"}),c.jsx(v.Typography,{level:"body-xs",children:n.name})]},r))})]})]}),placement:"left",variant:"solid",sx:{"--Tooltip-radius":"8px",maxWidth:300,bgcolor:"background.level1"},children:c.jsxs(v.Box,{sx:{display:"inline-flex",alignItems:"center",gap:.5,backgroundColor:"#e0f3ff",borderRadius:"50px",padding:"2px 8px 2px 2px",margin:"2px",position:"relative","&:hover":{backgroundColor:"#d0e8ff",cursor:"default"}},children:[c.jsx(v.Avatar,{src:e.avatar,alt:e.name,size:"sm",sx:{width:24,height:24,border:"1px solid #fff"}}),c.jsx(v.Typography,{level:"body-sm",sx:{fontSize:"12px",maxWidth:80,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),c.jsx(v.IconButton,{size:"sm",variant:"plain",color:"danger",onClick:t,sx:{minHeight:16,minWidth:16,padding:0,ml:.5,"&:hover":{backgroundColor:"rgba(255, 0, 0, 0.1)"}},children:c.jsx(De.Close,{sx:{fontSize:12}})})]})}),CF={Login:qR,InformationInput:xn,RichText:dc,HeaderButtons:AP,MarketSelection:dL,Accordion:hT,DynamicFields:UP,BasicSelect:gT,BooleanSwitch:ui,Branding:SP,ProfileSearchSelect:OM,RangeCalendar:zP,CompetitionSearchSelect:PM,Related:gL,Images:TR,Duration:FP,DatePickerComponent:ro,Flags:wR,Spinner:fs,Tags:Rm,Toast:nt,AdContent:pT,Match:fL,Winners:CB,CompetitionsSearchSelect:DM,TeamsSearchSelect:RM,CustomSelect:DL,Schedule:SL,NoPermissionCard:jP,CustomFlatpickrCalendar:Qc,ContextSelectFilter:IB,NumberInput:xu,EntityContext:t$,MiniGamesImages:r$,AuthRequirement:i$,SortableList:KN,ItemsPerPageFilter:QN,ImageCard:co,RelatedRelationship:cF,ExportUsersLeads:uF,SignOutButton:sg,BasicSortableList:fF,WidgetEmbedCode:hF,WidgetListEmbedCode:mF,AdvancedProfileSearchSelect:vF,FormatNumber:bF,PlayersSearchSelect:({labels:e,teamIds:t,selectedPlayers:n,onChangePlayers:r})=>{const[i,o]=x.useState([]),[a,s]=x.useState([]),[l,u]=x.useState([]),[d,f]=x.useState(!1),[h,p]=x.useState(""),[m,g]=x.useState(!1),{sdk:b}=lt(),w=()=>g(!m),S=t&&t.length>0,C=(k,F)=>{o(F),r(F)},I=()=>_(this,null,function*(){if(S){f(!0);try{const k=t.map(O=>b.football.getTeamById(O)),F=yield Promise.all(k),Y=[];F.forEach(O=>{if(O.squad&&O.squad.length>0){const T=O.squad.map(N=>{var V,j,$,M,H;return{id:N.id,name:N.name,avatar:((V=N.assets)==null?void 0:V.headshot)||ze.avatar,countryName:((j=N.country)==null?void 0:j.name)||"Unknown",countryFlag:((M=($=N.country)==null?void 0:$.assets)==null?void 0:M.flag)||ze.flag,teams:[{id:O.id,name:O.name,logo:((H=O.assets)==null?void 0:H.logo)||ze.team}]}}).sort((N,V)=>N.name.localeCompare(V.name));Y.push(...T)}}),u(Y),s(Y)}catch(k){console.error("Error fetching team players:",k),w()}finally{f(!1)}}}),y=k=>{if(!k){s(l);return}const F=l.filter(Y=>Y.name.toLowerCase().includes(k.toLowerCase()));s(F)};x.useEffect(()=>{yF(n,b,o,w)},[n]),x.useEffect(()=>{S&&I()},[t]);const A=x.useMemo(()=>or(k=>{if(!S){if(!k||k.length<2){s([]),f(!1);return}f(!0),b.football.getPlayers({name:k,sortField:"name",sortOrder:"asc"}).then(F=>{const Y=F.data.map(O=>fb(O));s(Y),f(!1)}).catch(F=>{console.error("Error searching players:",F),s([]),f(!1),w()})}},300),[b,S]);x.useEffect(()=>(S?y(h):A(h),()=>{S||A.cancel()}),[h,S]);const E=(k,F)=>k.map((Y,O)=>c.jsx(xF,{player:Y,onRemove:()=>{const T=F({index:O});T.onClick&&T.onClick({})}},Y.id));return c.jsxs(c.Fragment,{children:[c.jsx(v.Autocomplete,{forcePopupIcon:S,multiple:!0,loading:d,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38,flexWrap:"wrap"}},noOptions:{sx:{}}},isOptionEqualToValue:(k,F)=>k.id===F.id,endDecorator:d?c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e==null?void 0:e.searchPlayersPlaceholder,options:a,filterSelectedOptions:!0,onInputChange:(k,F)=>{p(F)},onChange:C,getOptionKey:k=>typeof k=="string"?k:k.id,getOptionLabel:k=>typeof k=="string"?k:k.name,value:i,renderTags:E,limitTags:1,renderOption:(k,F)=>{const Y={props:k};return c.jsxs(v.AutocompleteOption,q(z({},k),{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(v.Avatar,{src:F.avatar,alt:F.name,size:"sm",sx:{width:32,height:32}}),c.jsxs(v.Box,{sx:{flexGrow:1},children:[c.jsx(v.Typography,{level:"body-sm",fontWeight:"bold",children:F.name}),c.jsxs(v.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[c.jsx("img",{src:F.countryFlag,alt:F.countryName,width:16,height:12,loading:"lazy"}),c.jsx(v.Typography,{level:"body-xs",color:"neutral",children:F.countryName})]})]})]}),`player-option-${F.id}-${Y}`)}}),c.jsx(nt,{showToast:m,message:e.getPlayersErrorMessage,color:"danger",hideToast:w})]})}},hb=x.createContext(null),wF=({children:e})=>c.jsx(hb.Provider,{value:CF,children:e}),IF=()=>{const e=x.useContext(hb);if(!e)throw new Error("useComponentContext must be used within a ComponentProvider");return e},pb=425,gb=1024;return{APIProvider:TI,AuthProvider:EI,AuthContext:jf,ComponentProvider:wF,useComponentContext:IF,useAPIContext:lt,useIsMobile:()=>{const[e,t]=x.useState(window.innerWidth<=gb),[n,r]=x.useState(window.innerWidth<=pb);return x.useLayoutEffect(()=>{const i=()=>{t(window.innerWidth<=gb),r(window.innerWidth<=pb)};return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),{isMobile:e,isPhone:n}}}});
|
|
2498
|
+
></div>`,Y=({title:N})=>c.jsx(v.Tooltip,{title:N,sx:{maxWidth:300},children:c.jsx(ir,{color:"primary"})}),O=()=>c.jsxs(v.Card,{sx:{pb:1,mb:3},children:[c.jsx(rn,{label:t.classicQuizURL,placeholder:"",defaultValue:i,required:!1,size:"md",endDecorator:c.jsx(Y,{title:t.quizzesInfoMessage}),onChange:N=>o(N.target.value)}),c.jsx(rn,{label:t.eitherOrURL,placeholder:"",defaultValue:a,required:!1,size:"md",endDecorator:c.jsx(Y,{title:t.eitherOrsInfoMessage}),onChange:N=>s(N.target.value)}),c.jsx(rn,{label:t.pollURL,placeholder:"",defaultValue:l,required:!1,size:"md",endDecorator:c.jsx(Y,{title:t.pollsInfoMessage}),onChange:N=>u(N.target.value)})]}),T=()=>c.jsxs(v.Card,{sx:{pb:1,mb:3},children:[c.jsx(xu,{label:t.itemsPerPage,description:t.itemsPerPageDescription,defaultValue:d,onChange:N=>f(N||null),size:"md"}),c.jsx(xu,{label:t.itemsPerRow,description:t.itemsPerRowDescription,defaultValue:h,onChange:N=>p(N||null),size:"md"}),c.jsxs(v.FormControl,{sx:()=>({marginBottom:"16px"}),children:[c.jsx(v.FormLabel,{color:"primary",children:t.mode}),c.jsx(v.Select,{defaultValue:m,onChange:(N,V)=>g(V),children:pF.map((N,V)=>c.jsx(v.Option,{value:N,children:gF[N]},`basic-select-${N}-${V}`))}),c.jsx(v.FormHelperText,{children:t.modeDescription})]})]});return c.jsxs(v.Box,{mt:1,children:[T(),c.jsx(ui,{defaultValue:n,label:t.configureURLs,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:N=>{N===!1&&(o(""),s(""),u("")),r(N)}}),n&&O(),c.jsxs(v.Box,{position:"relative",mb:1,children:[c.jsx(v.Textarea,{value:F,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:N=>N.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),c.jsx(v.Tooltip,{title:t.copyToClipboard,children:c.jsx(v.Button,{onClick:()=>{navigator.clipboard.writeText(F)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:c.jsx(De.ContentCopy,{})})})]}),c.jsx(v.Alert,{variant:"outlined",color:"primary",startDecorator:c.jsx(ir,{}),sx:{mb:1,width:"fit-content"},children:c.jsxs(v.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[t.divElementTextInfo,c.jsx(v.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},db=e=>(e==null?void 0:e.map(t=>({id:t.id,value:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,label:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,avatar:t.avatar})))||[],vF=({labels:e,ids:t,onChange:n})=>{const[r,i]=x.useState([]),[o,a]=x.useState([]),[s,l]=x.useState(""),[u,d]=x.useState("name"),[f,h]=x.useState(!1),[p,m]=x.useState(!1),{sdk:g}=lt(),b=!0,w=()=>m(!p),S=(A,E)=>{i(E);const k=E.map(F=>F.id);n(k&&k.length?k:null)},C=3;x.useEffect(()=>{!s&&t&&t.length&&g.profile.getByIds(t,void 0,b).then(A=>{i(db(A))}).catch(A=>{w(),console.error(A),i([])})},[]);const I=x.useMemo(()=>or((A,E)=>{h(!0),g.profile.getByIds(E==="id"?[A]:[],E==="name"?A:void 0,b).then(k=>{a([...db(k)]),h(!1)}).catch(k=>{console.error(k),w(),a([]),h(!1)})},300),[]);x.useEffect(()=>{if(!s||s.length<C){a([]);return}return I(s,u),()=>I.cancel()},[s,I,u]);const y=(A,E)=>A.map((k,F)=>{var Y;return c.jsx(v.Chip,{variant:"solid",endDecorator:c.jsx(v.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:O=>E({index:F}).onClick(O),children:c.jsx(De.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:c.jsxs(v.Box,{display:"flex",alignItems:"center",mr:1,children:[c.jsx(v.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(Y=k.avatar)!=null?Y:ze.avatar}),c.jsx(v.Typography,{children:k.label})]})},k.id)});return c.jsxs(c.Fragment,{children:[c.jsx(v.Box,{sx:{marginBottom:"16px"},children:c.jsx(v.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:f,disableClearable:!0,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(A,E)=>A.id===E.id,endDecorator:c.jsxs(c.Fragment,{children:[f&&c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary",marginRight:2}}),c.jsx(v.Divider,{orientation:"vertical"}),c.jsxs(v.Select,{variant:"plain",value:u,onChange:(A,E)=>d(E),slotProps:{listbox:{variant:"outlined"}},sx:{mr:-1.5,"&:hover":{bgcolor:"transparent"}},children:[c.jsx(v.Option,{value:"name",children:e.searchByName}),c.jsx(v.Option,{value:"id",children:e.searchById})]})]}),placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:A=>A.filter(E=>!r.some(k=>k.value===E.value)),onInputChange:(A,E)=>{l(E)},onChange:S,getOptionKey:A=>A.id,value:r,renderTags:y,renderOption:(A,E)=>{var k;return c.jsx(v.AutocompleteOption,q(z({},A),{children:c.jsxs(v.Box,{display:"flex",alignItems:"center",mr:1,children:[c.jsx(v.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(k=E.avatar)!=null?k:ze.avatar}),c.jsx(v.Typography,{children:E.label})]})}))}})}),c.jsx(nt,{showToast:p,message:e.searchProfilesErrorMessage,color:"danger",hideToast:w})]})},bF=({value:e,sx:t,tooltipPlacement:n})=>{const r=l=>{const u=Math.abs(l);return u>=1e9?(l/1e9).toFixed(1)+"b":u>=1e6?(l/1e6).toFixed(1)+"m":u>=1e3?(l/1e3).toFixed(1)+"k":l.toString()},i=l=>new Intl.NumberFormat("en-US").format(l),o=Math.abs(e)>=1e3,a=r(e),s=i(e);return o?c.jsx(v.Tooltip,{title:s,placement:n,arrow:!0,children:c.jsx(v.Typography,{sx:t,children:a})}):c.jsx(v.Typography,{sx:t,children:a})},yF=(e,t,n,r)=>{if(e&&e.length===0){n([]);return}t.football.getPlayers({playerIds:e}).then(i=>{const o=i.data.map(a=>fb(a));n(o)}).catch(i=>{console.error("Error fetching players by ID:",i),r()})},fb=e=>{var t,n,r,i,o;return{id:e.id,name:e.name,avatar:((t=e.assets)==null?void 0:t.headshot)||ze.avatar,countryName:((n=e.country)==null?void 0:n.name)||"Unknown",countryFlag:((i=(r=e.country)==null?void 0:r.assets)==null?void 0:i.flag)||ze.flag,teams:((o=e.teams)==null?void 0:o.map(a=>{var s;return{id:a.id,name:a.name,logo:((s=a.assets)==null?void 0:s.logo)||ze.team}}))||[]}},xF=({player:e,onRemove:t})=>c.jsx(v.Tooltip,{title:c.jsxs(v.Box,{sx:{p:1},children:[c.jsx(v.Typography,{level:"body-sm",fontWeight:"bold",children:e.name}),c.jsxs(v.Typography,{level:"body-xs",sx:{display:"flex",alignItems:"center",gap:.5,mt:.5},children:[c.jsx("img",{src:e.countryFlag,alt:e.countryName,width:16,height:12,loading:"lazy"}),e.countryName]}),e.teams&&e.teams.length>0&&c.jsxs(v.Box,{sx:{mt:.5},children:[c.jsx(v.Typography,{level:"body-xs",sx:{mb:.5},children:"Teams:"}),c.jsx(v.Box,{sx:{display:"flex",flexDirection:"column",gap:.25},children:e.teams.map((n,r)=>c.jsxs(v.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[c.jsx("img",{src:n.logo,alt:n.name,width:16,height:16,style:{borderRadius:"2px"},loading:"lazy"}),c.jsx(v.Typography,{level:"body-xs",children:n.name})]},r))})]})]}),placement:"left",variant:"solid",sx:{"--Tooltip-radius":"8px",maxWidth:300,bgcolor:"background.level1"},children:c.jsxs(v.Box,{sx:{display:"inline-flex",alignItems:"center",gap:.5,backgroundColor:"#e0f3ff",borderRadius:"50px",padding:"2px 8px 2px 2px",margin:"2px",position:"relative","&:hover":{backgroundColor:"#d0e8ff",cursor:"default"}},children:[c.jsx(v.Avatar,{src:e.avatar,alt:e.name,size:"sm",sx:{width:24,height:24,border:"1px solid #fff"}}),c.jsx(v.Typography,{level:"body-sm",sx:{fontSize:"12px",maxWidth:80,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),c.jsx(v.IconButton,{size:"sm",variant:"plain",color:"danger",onClick:t,sx:{minHeight:16,minWidth:16,padding:0,ml:.5,"&:hover":{backgroundColor:"rgba(255, 0, 0, 0.1)"}},children:c.jsx(De.Close,{sx:{fontSize:12}})})]})}),CF={Login:qR,InformationInput:rn,RichText:dc,HeaderButtons:AP,MarketSelection:dL,Accordion:hT,DynamicFields:UP,BasicSelect:gT,BooleanSwitch:ui,Branding:SP,ProfileSearchSelect:OM,RangeCalendar:zP,CompetitionSearchSelect:PM,Related:gL,Images:TR,Duration:FP,DatePickerComponent:ro,Flags:wR,Spinner:fs,Tags:Rm,Toast:nt,AdContent:pT,Match:fL,Winners:CB,CompetitionsSearchSelect:DM,TeamsSearchSelect:RM,CustomSelect:DL,Schedule:SL,NoPermissionCard:jP,CustomFlatpickrCalendar:Qc,ContextSelectFilter:IB,NumberInput:xu,EntityContext:t$,MiniGamesImages:r$,AuthRequirement:i$,SortableList:KN,ItemsPerPageFilter:QN,ImageCard:co,RelatedRelationship:cF,ExportUsersLeads:uF,SignOutButton:sg,BasicSortableList:fF,WidgetEmbedCode:hF,WidgetListEmbedCode:mF,AdvancedProfileSearchSelect:vF,FormatNumber:bF,PlayersSearchSelect:({labels:e,teamIds:t,selectedPlayers:n,onChangePlayers:r})=>{const[i,o]=x.useState([]),[a,s]=x.useState([]),[l,u]=x.useState([]),[d,f]=x.useState(!1),[h,p]=x.useState(""),[m,g]=x.useState(!1),{sdk:b}=lt(),w=()=>g(!m),S=t&&t.length>0,C=(k,F)=>{o(F),r(F)},I=()=>_(this,null,function*(){if(S){f(!0);try{const k=t.map(O=>b.football.getTeamById(O)),F=yield Promise.all(k),Y=[];F.forEach(O=>{if(O.squad&&O.squad.length>0){const T=O.squad.map(N=>{var V,j,$,M,H;return{id:N.id,name:N.name,avatar:((V=N.assets)==null?void 0:V.headshot)||ze.avatar,countryName:((j=N.country)==null?void 0:j.name)||"Unknown",countryFlag:((M=($=N.country)==null?void 0:$.assets)==null?void 0:M.flag)||ze.flag,teams:[{id:O.id,name:O.name,logo:((H=O.assets)==null?void 0:H.logo)||ze.team}]}}).sort((N,V)=>N.name.localeCompare(V.name));Y.push(...T)}}),u(Y),s(Y)}catch(k){console.error("Error fetching team players:",k),w()}finally{f(!1)}}}),y=k=>{if(!k){s(l);return}const F=l.filter(Y=>Y.name.toLowerCase().includes(k.toLowerCase()));s(F)};x.useEffect(()=>{yF(n,b,o,w)},[n]),x.useEffect(()=>{S&&I()},[t]);const A=x.useMemo(()=>or(k=>{if(!S){if(!k||k.length<2){s([]),f(!1);return}f(!0),b.football.getPlayers({name:k,sortField:"name",sortOrder:"asc"}).then(F=>{const Y=F.data.map(O=>fb(O));s(Y),f(!1)}).catch(F=>{console.error("Error searching players:",F),s([]),f(!1),w()})}},300),[b,S]);x.useEffect(()=>(S?y(h):A(h),()=>{S||A.cancel()}),[h,S]);const E=(k,F)=>k.map((Y,O)=>c.jsx(xF,{player:Y,onRemove:()=>{const T=F({index:O});T.onClick&&T.onClick({})}},Y.id));return c.jsxs(c.Fragment,{children:[c.jsx(v.Autocomplete,{forcePopupIcon:S,multiple:!0,loading:d,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38,flexWrap:"wrap"}},noOptions:{sx:{}}},isOptionEqualToValue:(k,F)=>k.id===F.id,endDecorator:d?c.jsx(v.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e==null?void 0:e.searchPlayersPlaceholder,options:a,filterSelectedOptions:!0,onInputChange:(k,F)=>{p(F)},onChange:C,getOptionKey:k=>typeof k=="string"?k:k.id,getOptionLabel:k=>typeof k=="string"?k:k.name,value:i,renderTags:E,limitTags:1,renderOption:(k,F)=>{const Y={props:k};return c.jsxs(v.AutocompleteOption,q(z({},k),{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(v.Avatar,{src:F.avatar,alt:F.name,size:"sm",sx:{width:32,height:32}}),c.jsxs(v.Box,{sx:{flexGrow:1},children:[c.jsx(v.Typography,{level:"body-sm",fontWeight:"bold",children:F.name}),c.jsxs(v.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[c.jsx("img",{src:F.countryFlag,alt:F.countryName,width:16,height:12,loading:"lazy"}),c.jsx(v.Typography,{level:"body-xs",color:"neutral",children:F.countryName})]})]})]}),`player-option-${F.id}-${Y}`)}}),c.jsx(nt,{showToast:m,message:e.getPlayersErrorMessage,color:"danger",hideToast:w})]})}},hb=x.createContext(null),wF=({children:e})=>c.jsx(hb.Provider,{value:CF,children:e}),IF=()=>{const e=x.useContext(hb);if(!e)throw new Error("useComponentContext must be used within a ComponentProvider");return e},pb=425,gb=1024;return{APIProvider:TI,AuthProvider:EI,AuthContext:jf,ComponentProvider:wF,useComponentContext:IF,useAPIContext:lt,useIsMobile:()=>{const[e,t]=x.useState(window.innerWidth<=gb),[n,r]=x.useState(window.innerWidth<=pb);return x.useLayoutEffect(()=>{const i=()=>{t(window.innerWidth<=gb),r(window.innerWidth<=pb)};return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),{isMobile:e,isPhone:n}}}});
|