fansunited-management-components 1.29.0-RC3 → 1.30.0-RC1
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.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,Oe,Lt,pe,vi,I,Le){"use strict";var vF=Object.defineProperty,bF=Object.defineProperties;var yF=Object.getOwnPropertyDescriptors;var ks=Object.getOwnPropertySymbols,CF=Object.getPrototypeOf,ib=Object.prototype.hasOwnProperty,ob=Object.prototype.propertyIsEnumerable,xF=Reflect.get;var mi=Math.pow,Du=(x,Me,Oe)=>Me in x?vF(x,Me,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):x[Me]=Oe,
|
|
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,Oe,Lt,pe,vi,I,Le){"use strict";var vF=Object.defineProperty,bF=Object.defineProperties;var yF=Object.getOwnPropertyDescriptors;var ks=Object.getOwnPropertySymbols,CF=Object.getPrototypeOf,ib=Object.prototype.hasOwnProperty,ob=Object.prototype.propertyIsEnumerable,xF=Reflect.get;var mi=Math.pow,Du=(x,Me,Oe)=>Me in x?vF(x,Me,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):x[Me]=Oe,j=(x,Me)=>{for(var Oe in Me||(Me={}))ib.call(Me,Oe)&&Du(x,Oe,Me[Oe]);if(ks)for(var Oe of ks(Me))ob.call(Me,Oe)&&Du(x,Oe,Me[Oe]);return x},X=(x,Me)=>bF(x,yF(Me));var Ps=x=>typeof x=="symbol"?x:x+"",We=(x,Me)=>{var Oe={};for(var Lt in x)ib.call(x,Lt)&&Me.indexOf(Lt)<0&&(Oe[Lt]=x[Lt]);if(x!=null&&ks)for(var Lt of ks(x))Me.indexOf(Lt)<0&&ob.call(x,Lt)&&(Oe[Lt]=x[Lt]);return Oe};var ie=(x,Me,Oe)=>Du(x,typeof Me!="symbol"?Me+"":Me,Oe);var Ir=(x,Me,Oe)=>xF(CF(x),Oe,Me);var k=(x,Me,Oe)=>new Promise((Lt,pe)=>{var vi=Sn=>{try{Le(Oe.next(Sn))}catch(V){pe(V)}},I=Sn=>{try{Le(Oe.throw(Sn))}catch(V){pe(V)}},Le=Sn=>Sn.done?Lt(Sn.value):Promise.resolve(Sn.value).then(vi,I);Le((Oe=Oe.apply(x,Me)).next())});function Sn(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 V=Sn(x);var Bt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function fn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ou(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 Ru={exports:{}},Ao={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
217
217
|
* See the License for the specific language governing permissions and
|
|
218
218
|
* limitations under the License.
|
|
219
|
-
*/const Ms=[];var Be;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(Be||(Be={}));const Qu={debug:Be.DEBUG,verbose:Be.VERBOSE,info:Be.INFO,warn:Be.WARN,error:Be.ERROR,silent:Be.SILENT},Rb=Be.INFO,Mb={[Be.DEBUG]:"log",[Be.VERBOSE]:"log",[Be.INFO]:"info",[Be.WARN]:"warn",[Be.ERROR]:"error"},Lb=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),i=Mb[t];if(i)console[i](`[${r}] ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class Ls{constructor(t){this.name=t,this._logLevel=Rb,this._logHandler=Lb,this._userLogHandler=null,Ms.push(this)}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in Be))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?Qu[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,Be.DEBUG,...t),this._logHandler(this,Be.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,Be.VERBOSE,...t),this._logHandler(this,Be.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,Be.INFO,...t),this._logHandler(this,Be.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,Be.WARN,...t),this._logHandler(this,Be.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,Be.ERROR,...t),this._logHandler(this,Be.ERROR,...t)}}function Bb(e){Ms.forEach(t=>{t.setLogLevel(e)})}function $b(e,t){for(const n of Ms){let r=null;t&&t.level&&(r=Qu[t.level]),e===null?n.userLogHandler=null:n.userLogHandler=(i,o,...a)=>{const l=a.map(s=>{if(s==null)return null;if(typeof s=="string")return s;if(typeof s=="number"||typeof s=="boolean")return s.toString();if(s instanceof Error)return s.message;try{return JSON.stringify(s)}catch(c){return null}}).filter(s=>s).join(" ");o>=(r!=null?r:i.logLevel)&&e({level:Be[o].toLowerCase(),message:l,args:a,type:i.name})}}}const Nb=(e,t)=>t.some(n=>e instanceof n);let Ju,Xu;function Fb(){return Ju||(Ju=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function zb(){return Xu||(Xu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Zu=new WeakMap,Bs=new WeakMap,ed=new WeakMap,$s=new WeakMap,Ns=new WeakMap;function jb(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",a)},o=()=>{n(Hn(e.result)),i()},a=()=>{r(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",a)});return t.then(n=>{n instanceof IDBCursor&&Zu.set(n,e)}).catch(()=>{}),Ns.set(t,e),t}function Vb(e){if(Bs.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",a),e.removeEventListener("abort",a)},o=()=>{n(),i()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",a),e.addEventListener("abort",a)});Bs.set(e,t)}let Fs={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Bs.get(e);if(t==="objectStoreNames")return e.objectStoreNames||ed.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Hn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Ub(e){Fs=e(Fs)}function Hb(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(zs(this),t,...n);return ed.set(r,t.sort?t.sort():[t]),Hn(r)}:zb().includes(e)?function(...t){return e.apply(zs(this),t),Hn(Zu.get(this))}:function(...t){return Hn(e.apply(zs(this),t))}}function Wb(e){return typeof e=="function"?Hb(e):(e instanceof IDBTransaction&&Vb(e),Nb(e,Fb())?new Proxy(e,Fs):e)}function Hn(e){if(e instanceof IDBRequest)return jb(e);if($s.has(e))return $s.get(e);const t=Wb(e);return t!==e&&($s.set(e,t),Ns.set(t,e)),t}const zs=e=>Ns.get(e);function Gb(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const a=indexedDB.open(e,t),l=Hn(a);return r&&a.addEventListener("upgradeneeded",s=>{r(Hn(a.result),s.oldVersion,s.newVersion,Hn(a.transaction),s)}),n&&a.addEventListener("blocked",s=>n(s.oldVersion,s.newVersion,s)),l.then(s=>{o&&s.addEventListener("close",()=>o()),i&&s.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),l}const Yb=["get","getKey","getAll","getAllKeys","count"],Kb=["put","add","delete","clear"],js=new Map;function td(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(js.get(t))return js.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Kb.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Yb.includes(n)))return;const o=function(a,...l){return k(this,null,function*(){const s=this.transaction(a,i?"readwrite":"readonly");let c=s.store;return r&&(c=c.index(l.shift())),(yield Promise.all([c[n](...l),i&&s.done]))[0]})};return js.set(t,o),o}Ub(e=>X(
|
|
219
|
+
*/const Ms=[];var Be;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(Be||(Be={}));const Qu={debug:Be.DEBUG,verbose:Be.VERBOSE,info:Be.INFO,warn:Be.WARN,error:Be.ERROR,silent:Be.SILENT},Rb=Be.INFO,Mb={[Be.DEBUG]:"log",[Be.VERBOSE]:"log",[Be.INFO]:"info",[Be.WARN]:"warn",[Be.ERROR]:"error"},Lb=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),i=Mb[t];if(i)console[i](`[${r}] ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class Ls{constructor(t){this.name=t,this._logLevel=Rb,this._logHandler=Lb,this._userLogHandler=null,Ms.push(this)}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in Be))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?Qu[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,Be.DEBUG,...t),this._logHandler(this,Be.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,Be.VERBOSE,...t),this._logHandler(this,Be.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,Be.INFO,...t),this._logHandler(this,Be.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,Be.WARN,...t),this._logHandler(this,Be.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,Be.ERROR,...t),this._logHandler(this,Be.ERROR,...t)}}function Bb(e){Ms.forEach(t=>{t.setLogLevel(e)})}function $b(e,t){for(const n of Ms){let r=null;t&&t.level&&(r=Qu[t.level]),e===null?n.userLogHandler=null:n.userLogHandler=(i,o,...a)=>{const l=a.map(s=>{if(s==null)return null;if(typeof s=="string")return s;if(typeof s=="number"||typeof s=="boolean")return s.toString();if(s instanceof Error)return s.message;try{return JSON.stringify(s)}catch(c){return null}}).filter(s=>s).join(" ");o>=(r!=null?r:i.logLevel)&&e({level:Be[o].toLowerCase(),message:l,args:a,type:i.name})}}}const Nb=(e,t)=>t.some(n=>e instanceof n);let Ju,Xu;function Fb(){return Ju||(Ju=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function zb(){return Xu||(Xu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Zu=new WeakMap,Bs=new WeakMap,ed=new WeakMap,$s=new WeakMap,Ns=new WeakMap;function jb(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",a)},o=()=>{n(Hn(e.result)),i()},a=()=>{r(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",a)});return t.then(n=>{n instanceof IDBCursor&&Zu.set(n,e)}).catch(()=>{}),Ns.set(t,e),t}function Vb(e){if(Bs.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",a),e.removeEventListener("abort",a)},o=()=>{n(),i()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",a),e.addEventListener("abort",a)});Bs.set(e,t)}let Fs={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Bs.get(e);if(t==="objectStoreNames")return e.objectStoreNames||ed.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Hn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Ub(e){Fs=e(Fs)}function Hb(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(zs(this),t,...n);return ed.set(r,t.sort?t.sort():[t]),Hn(r)}:zb().includes(e)?function(...t){return e.apply(zs(this),t),Hn(Zu.get(this))}:function(...t){return Hn(e.apply(zs(this),t))}}function Wb(e){return typeof e=="function"?Hb(e):(e instanceof IDBTransaction&&Vb(e),Nb(e,Fb())?new Proxy(e,Fs):e)}function Hn(e){if(e instanceof IDBRequest)return jb(e);if($s.has(e))return $s.get(e);const t=Wb(e);return t!==e&&($s.set(e,t),Ns.set(t,e)),t}const zs=e=>Ns.get(e);function Gb(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const a=indexedDB.open(e,t),l=Hn(a);return r&&a.addEventListener("upgradeneeded",s=>{r(Hn(a.result),s.oldVersion,s.newVersion,Hn(a.transaction),s)}),n&&a.addEventListener("blocked",s=>n(s.oldVersion,s.newVersion,s)),l.then(s=>{o&&s.addEventListener("close",()=>o()),i&&s.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),l}const Yb=["get","getKey","getAll","getAllKeys","count"],Kb=["put","add","delete","clear"],js=new Map;function td(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(js.get(t))return js.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Kb.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Yb.includes(n)))return;const o=function(a,...l){return k(this,null,function*(){const s=this.transaction(a,i?"readwrite":"readonly");let c=s.store;return r&&(c=c.index(l.shift())),(yield Promise.all([c[n](...l),i&&s.done]))[0]})};return js.set(t,o),o}Ub(e=>X(j({},e),{get:(t,n,r)=>td(t,n)||e.get(t,n,r),has:(t,n)=>!!td(t,n)||e.has(t,n)}));/**
|
|
220
220
|
* @license
|
|
221
221
|
* Copyright 2019 Google LLC
|
|
222
222
|
*
|
|
@@ -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 qs(e,...t)}function ht(e,...t){return qs(e,...t)}function Ks(e,t,n){const r=Object.assign(Object.assign({},X0()),{[t]:n});return new ar("auth","Firebase",r).create(t,{appName:e.name})}function bt(e){return Ks(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function kr(e,t,n){const r=n;if(!(t instanceof r))throw r.name!==t.constructor.name&&vt(e,"argument-error"),Ks(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function qs(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 vd.create(e,...t)}function
|
|
555
|
+
*/function vt(e,...t){throw qs(e,...t)}function ht(e,...t){return qs(e,...t)}function Ks(e,t,n){const r=Object.assign(Object.assign({},X0()),{[t]:n});return new ar("auth","Firebase",r).create(t,{appName:e.name})}function bt(e){return Ks(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function kr(e,t,n){const r=n;if(!(t instanceof r))throw r.name!==t.constructor.name&&vt(e,"argument-error"),Ks(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function qs(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 vd.create(e,...t)}function oe(e,t,...n){if(!e)throw qs(t,...n)}function hn(e){const t="INTERNAL ASSERTION FAILED: "+e;throw Ro(t),new Error(t)}function an(e,t){e||hn(t)}/**
|
|
556
556
|
* @license
|
|
557
557
|
* Copyright 2020 Google LLC
|
|
558
558
|
*
|
|
@@ -717,7 +717,7 @@
|
|
|
717
717
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
718
718
|
* See the License for the specific language governing permissions and
|
|
719
719
|
* limitations under the License.
|
|
720
|
-
*/function Ai(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(t){}}function dy(e,t=!1){return k(this,null,function*(){const n=ke(e),r=yield n.getIdToken(t),i=Mo(r);
|
|
720
|
+
*/function Ai(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(t){}}function dy(e,t=!1){return k(this,null,function*(){const n=ke(e),r=yield n.getIdToken(t),i=Mo(r);oe(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const o=typeof i.firebase=="object"?i.firebase:void 0,a=o==null?void 0:o.sign_in_provider;return{claims:i,token:r,authTime:Ai(Xs(i.auth_time)),issuedAtTime:Ai(Xs(i.iat)),expirationTime:Ai(Xs(i.exp)),signInProvider:a||null,signInSecondFactor:(o==null?void 0:o.sign_in_second_factor)||null}})}function Xs(e){return Number(e)*1e3}function Mo(e){const[t,n,r]=e.split(".");if(t===void 0||n===void 0||r===void 0)return Ro("JWT malformed, contained fewer than 3 sections"),null;try{const i=Nu(n);return i?JSON.parse(i):(Ro("Failed to decode base64 JWT payload"),null)}catch(i){return Ro("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function Ad(e){const t=Mo(e);return oe(t,"internal-error"),oe(typeof t.exp!="undefined","internal-error"),oe(typeof t.iat!="undefined","internal-error"),Number(t.exp)-Number(t.iat)}/**
|
|
721
721
|
* @license
|
|
722
722
|
* Copyright 2020 Google LLC
|
|
723
723
|
*
|
|
@@ -777,7 +777,7 @@
|
|
|
777
777
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
778
778
|
* See the License for the specific language governing permissions and
|
|
779
779
|
* limitations under the License.
|
|
780
|
-
*/function Ti(e){return k(this,null,function*(){var t;const n=e.auth,r=yield e.getIdToken(),i=yield _n(e,Sd(n,{idToken:r}));
|
|
780
|
+
*/function Ti(e){return k(this,null,function*(){var t;const n=e.auth,r=yield e.getIdToken(),i=yield _n(e,Sd(n,{idToken:r}));oe(i==null?void 0:i.users.length,n,"internal-error");const o=i.users[0];e._notifyReloadListener(o);const a=!((t=o.providerUserInfo)===null||t===void 0)&&t.length?Td(o.providerUserInfo):[],l=gy(e.providerData,a),s=e.isAnonymous,c=!(e.email&&o.passwordHash)&&!(l!=null&&l.length),d=s?c:!1,f={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:l,metadata:new Zs(o.createdAt,o.lastLoginAt),isAnonymous:d};Object.assign(e,f)})}function py(e){return k(this,null,function*(){const t=ke(e);yield Ti(t),yield t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)})}function gy(e,t){return[...e.filter(r=>!t.some(i=>i.providerId===r.providerId)),...t]}function Td(e){return e.map(t=>{var{providerId:n}=t,r=Ys(t,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/**
|
|
781
781
|
* @license
|
|
782
782
|
* Copyright 2020 Google LLC
|
|
783
783
|
*
|
|
@@ -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 Pr{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){
|
|
810
|
+
*/class Pr{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):Ad(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,n)}updateFromIdToken(t){oe(t.length!==0,"internal-error");const n=Ad(t);this.updateTokensAndExpiration(t,null,n)}getToken(t,n=!1){return k(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 k(this,null,function*(){const{accessToken:r,refreshToken:i,expiresIn:o}=yield my(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 Pr;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 Pr,this.toJSON())}_performRefresh(){return hn("not implemented")}}/**
|
|
811
811
|
* @license
|
|
812
812
|
* Copyright 2020 Google LLC
|
|
813
813
|
*
|
|
@@ -822,7 +822,7 @@
|
|
|
822
822
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
823
823
|
* See the License for the specific language governing permissions and
|
|
824
824
|
* limitations under the License.
|
|
825
|
-
*/function Kn(e,t){
|
|
825
|
+
*/function Kn(e,t){oe(typeof e=="string"||typeof e=="undefined","internal-error",{appName:t})}class kn{constructor(t){var{uid:n,auth:r,stsTokenManager:i}=t,o=Ys(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new hy(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new Zs(o.createdAt||void 0,o.lastLoginAt||void 0)}getIdToken(t){return k(this,null,function*(){const n=yield _n(this,this.stsTokenManager.getToken(this.auth,t));return oe(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n})}getIdTokenResult(t){return dy(this,t)}reload(){return py(this)}_assign(t){this!==t&&(oe(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(n=>Object.assign({},n)),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){const n=new kn(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(t){oe(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(t,n=!1){return k(this,null,function*(){let r=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),r=!0),n&&(yield Ti(this)),yield this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)})}delete(){return k(this,null,function*(){if(Ge(this.auth.app))return Promise.reject(bt(this.auth));const t=yield this.getIdToken();return yield _n(this,cy(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()})}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>Object.assign({},t)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(t,n){var r,i,o,a,l,s,c,d;const f=(r=n.displayName)!==null&&r!==void 0?r:void 0,h=(i=n.email)!==null&&i!==void 0?i:void 0,p=(o=n.phoneNumber)!==null&&o!==void 0?o:void 0,m=(a=n.photoURL)!==null&&a!==void 0?a:void 0,g=(l=n.tenantId)!==null&&l!==void 0?l:void 0,v=(s=n._redirectEventId)!==null&&s!==void 0?s:void 0,S=(c=n.createdAt)!==null&&c!==void 0?c:void 0,w=(d=n.lastLoginAt)!==null&&d!==void 0?d:void 0,{uid:y,emailVerified:C,isAnonymous:b,providerData:T,stsTokenManager:E}=n;oe(y&&E,t,"internal-error");const P=Pr.fromJSON(this.name,E);oe(typeof y=="string",t,"internal-error"),Kn(f,t.name),Kn(h,t.name),oe(typeof C=="boolean",t,"internal-error"),oe(typeof b=="boolean",t,"internal-error"),Kn(p,t.name),Kn(m,t.name),Kn(g,t.name),Kn(v,t.name),Kn(S,t.name),Kn(w,t.name);const O=new kn({uid:y,auth:t,email:h,emailVerified:C,displayName:f,isAnonymous:b,photoURL:m,phoneNumber:p,tenantId:g,stsTokenManager:P,createdAt:S,lastLoginAt:w});return T&&Array.isArray(T)&&(O.providerData=T.map(G=>Object.assign({},G))),v&&(O._redirectEventId=v),O}static _fromIdTokenResponse(t,n,r=!1){return k(this,null,function*(){const i=new Pr;i.updateFromServerResponse(n);const o=new kn({uid:n.localId,auth:t,stsTokenManager:i,isAnonymous:r});return yield Ti(o),o})}static _fromGetAccountInfoResponse(t,n,r){return k(this,null,function*(){const i=n.users[0];oe(i.localId!==void 0,"internal-error");const o=i.providerUserInfo!==void 0?Td(i.providerUserInfo):[],a=!(i.email&&i.passwordHash)&&!(o!=null&&o.length),l=new Pr;l.updateFromIdToken(r);const s=new kn({uid:i.localId,auth:t,stsTokenManager:l,isAnonymous:a}),c={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:o,metadata:new Zs(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!(o!=null&&o.length)};return Object.assign(s,c),s})}}/**
|
|
826
826
|
* @license
|
|
827
827
|
* Copyright 2020 Google LLC
|
|
828
828
|
*
|
|
@@ -957,7 +957,7 @@
|
|
|
957
957
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
958
958
|
* See the License for the specific language governing permissions and
|
|
959
959
|
* limitations under the License.
|
|
960
|
-
*/class Ay{constructor(t,n,r,i){this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Nd(this),this.idTokenSubscription=new Nd(this),this.beforeStateQueue=new xy(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=vd,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=i.sdkClientVersion}_initializeWithPersistence(t,n){return n&&(this._popupRedirectResolver=Vt(n)),this._initializationPromise=this.queue(()=>k(this,null,function*(){var r,i;if(!this._deleted&&(this.persistenceManager=yield Or.create(this,t),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch(o){}yield this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return k(this,null,function*(){if(this._deleted)return;const t=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(t,!0)}})}initializeCurrentUserFromIdToken(t){return k(this,null,function*(){try{const n=yield Sd(this,{idToken:t}),r=yield kn._fromGetAccountInfoResponse(this,n,t);yield this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(t){return k(this,null,function*(){var n;if(Ge(this.app)){const a=this.app.settings.authIdToken;return a?new Promise(l=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(a).then(l,l))}):this.directlySetCurrentUser(null)}const r=yield this.assertedPersistence.getCurrentUser();let i=r,o=!1;if(t&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();const a=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,l=i==null?void 0:i._redirectEventId,s=yield this.tryRedirectSignIn(t);(!a||a===l)&&(s!=null&&s.user)&&(i=s.user,o=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(o)try{yield this.beforeStateQueue.runMiddleware(i)}catch(a){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(a))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return ie(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)})}tryRedirectSignIn(t){return k(this,null,function*(){let n=null;try{n=yield this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch(r){yield this._setRedirectUser(null)}return n})}reloadAndSetCurrentUserOrClear(t){return k(this,null,function*(){try{yield Ti(t)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)})}useDeviceLanguage(){this.languageCode=ty()}_delete(){return k(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return k(this,null,function*(){if(Ge(this.app))return Promise.reject(bt(this));const n=t?ke(t):null;return n&&ie(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))})}_updateCurrentUser(t,n=!1){return k(this,null,function*(){if(!this._deleted)return t&&ie(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>k(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return k(this,null,function*(){return Ge(this.app)?Promise.reject(bt(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(t){return Ge(this.app)?Promise.reject(bt(this)):this.queue(()=>k(this,null,function*(){yield this.assertedPersistence.setPersistence(Vt(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return k(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(t)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return k(this,null,function*(){const t=yield wy(this),n=new Sy(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new ar("auth","Firebase",t())}onAuthStateChanged(t,n,r){return this.registerStateListener(this.authStateSubscription,t,n,r)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,r){return this.registerStateListener(this.idTokenSubscription,t,n,r)}authStateReady(){return new Promise((t,n)=>{if(this.currentUser)t();else{const r=this.onAuthStateChanged(()=>{r(),t()},n)}})}revokeAccessToken(t){return k(this,null,function*(){if(this.currentUser){const n=yield this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),yield vy(this,r)}})}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}_setRedirectUser(t,n){return k(this,null,function*(){const r=yield this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return k(this,null,function*(){if(!this.redirectPersistenceManager){const n=t&&Vt(t)||this._popupRedirectResolver;ie(n,this,"argument-error"),this.redirectPersistenceManager=yield Or.create(this,[Vt(n._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return k(this,null,function*(){var n,r;return this._isInitialized&&(yield this.queue(()=>k(this,null,function*(){}))),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===t?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===t?this.redirectUser:null})}_persistUserIfCurrent(t){return k(this,null,function*(){if(t===this.currentUser)return this.queue(()=>k(this,null,function*(){return this.directlySetCurrentUser(t)}))})}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var t,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,n,r,i){if(this._deleted)return()=>{};const o=typeof n=="function"?n:n.next.bind(n);let a=!1;const l=this._isInitialized?Promise.resolve():this._initializationPromise;if(ie(l,this,"internal-error"),l.then(()=>{a||o(this.currentUser)}),typeof n=="function"){const s=t.addObserver(n,r,i);return()=>{a=!0,s()}}else{const s=t.addObserver(n);return()=>{a=!0,s()}}}directlySetCurrentUser(t){return k(this,null,function*(){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?yield this.assertedPersistence.setCurrentUser(t):yield this.assertedPersistence.removeCurrentUser()})}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return ie(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=$d(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return k(this,null,function*(){var t;const n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=yield(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader();r&&(n["X-Firebase-Client"]=r);const i=yield this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n})}_getAppCheckToken(){return k(this,null,function*(){var t;const n=yield(t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken();return n!=null&&n.error&&Z0(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token})}}function qe(e){return ke(e)}class Nd{constructor(t){this.auth=t,this.observer=null,this.addObserver=Ku(n=>this.observer=n)}get next(){return ie(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
|
|
960
|
+
*/class Ay{constructor(t,n,r,i){this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Nd(this),this.idTokenSubscription=new Nd(this),this.beforeStateQueue=new xy(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=vd,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=i.sdkClientVersion}_initializeWithPersistence(t,n){return n&&(this._popupRedirectResolver=Vt(n)),this._initializationPromise=this.queue(()=>k(this,null,function*(){var r,i;if(!this._deleted&&(this.persistenceManager=yield Or.create(this,t),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch(o){}yield this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return k(this,null,function*(){if(this._deleted)return;const t=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(t,!0)}})}initializeCurrentUserFromIdToken(t){return k(this,null,function*(){try{const n=yield Sd(this,{idToken:t}),r=yield kn._fromGetAccountInfoResponse(this,n,t);yield this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(t){return k(this,null,function*(){var n;if(Ge(this.app)){const a=this.app.settings.authIdToken;return a?new Promise(l=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(a).then(l,l))}):this.directlySetCurrentUser(null)}const r=yield this.assertedPersistence.getCurrentUser();let i=r,o=!1;if(t&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();const a=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,l=i==null?void 0:i._redirectEventId,s=yield this.tryRedirectSignIn(t);(!a||a===l)&&(s!=null&&s.user)&&(i=s.user,o=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(o)try{yield this.beforeStateQueue.runMiddleware(i)}catch(a){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(a))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return oe(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)})}tryRedirectSignIn(t){return k(this,null,function*(){let n=null;try{n=yield this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch(r){yield this._setRedirectUser(null)}return n})}reloadAndSetCurrentUserOrClear(t){return k(this,null,function*(){try{yield Ti(t)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)})}useDeviceLanguage(){this.languageCode=ty()}_delete(){return k(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return k(this,null,function*(){if(Ge(this.app))return Promise.reject(bt(this));const n=t?ke(t):null;return n&&oe(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))})}_updateCurrentUser(t,n=!1){return k(this,null,function*(){if(!this._deleted)return t&&oe(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>k(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return k(this,null,function*(){return Ge(this.app)?Promise.reject(bt(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(t){return Ge(this.app)?Promise.reject(bt(this)):this.queue(()=>k(this,null,function*(){yield this.assertedPersistence.setPersistence(Vt(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return k(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(t)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return k(this,null,function*(){const t=yield wy(this),n=new Sy(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new ar("auth","Firebase",t())}onAuthStateChanged(t,n,r){return this.registerStateListener(this.authStateSubscription,t,n,r)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,r){return this.registerStateListener(this.idTokenSubscription,t,n,r)}authStateReady(){return new Promise((t,n)=>{if(this.currentUser)t();else{const r=this.onAuthStateChanged(()=>{r(),t()},n)}})}revokeAccessToken(t){return k(this,null,function*(){if(this.currentUser){const n=yield this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),yield vy(this,r)}})}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}_setRedirectUser(t,n){return k(this,null,function*(){const r=yield this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return k(this,null,function*(){if(!this.redirectPersistenceManager){const n=t&&Vt(t)||this._popupRedirectResolver;oe(n,this,"argument-error"),this.redirectPersistenceManager=yield Or.create(this,[Vt(n._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return k(this,null,function*(){var n,r;return this._isInitialized&&(yield this.queue(()=>k(this,null,function*(){}))),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===t?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===t?this.redirectUser:null})}_persistUserIfCurrent(t){return k(this,null,function*(){if(t===this.currentUser)return this.queue(()=>k(this,null,function*(){return this.directlySetCurrentUser(t)}))})}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var t,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,n,r,i){if(this._deleted)return()=>{};const o=typeof n=="function"?n:n.next.bind(n);let a=!1;const l=this._isInitialized?Promise.resolve():this._initializationPromise;if(oe(l,this,"internal-error"),l.then(()=>{a||o(this.currentUser)}),typeof n=="function"){const s=t.addObserver(n,r,i);return()=>{a=!0,s()}}else{const s=t.addObserver(n);return()=>{a=!0,s()}}}directlySetCurrentUser(t){return k(this,null,function*(){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?yield this.assertedPersistence.setCurrentUser(t):yield this.assertedPersistence.removeCurrentUser()})}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return oe(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=$d(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return k(this,null,function*(){var t;const n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=yield(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader();r&&(n["X-Firebase-Client"]=r);const i=yield this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n})}_getAppCheckToken(){return k(this,null,function*(){var t;const n=yield(t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken();return n!=null&&n.error&&Z0(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token})}}function qe(e){return ke(e)}class Nd{constructor(t){this.auth=t,this.observer=null,this.addObserver=Ku(n=>this.observer=n)}get next(){return oe(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
|
|
961
961
|
* @license
|
|
962
962
|
* Copyright 2020 Google LLC
|
|
963
963
|
*
|
|
@@ -987,7 +987,7 @@
|
|
|
987
987
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
988
988
|
* See the License for the specific language governing permissions and
|
|
989
989
|
* limitations under the License.
|
|
990
|
-
*/function Ry(e,t){const n=Do(e,"auth");if(n.isInitialized()){const i=n.getImmediate(),o=n.getOptions();if(ko(o,t!=null?t:{}))return i;vt(i,"already-initialized")}return n.initialize({options:t})}function My(e,t){const n=(t==null?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Vt);t!=null&&t.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,t==null?void 0:t.popupRedirectResolver)}function tl(e,t,n){const r=qe(e);
|
|
990
|
+
*/function Ry(e,t){const n=Do(e,"auth");if(n.isInitialized()){const i=n.getImmediate(),o=n.getOptions();if(ko(o,t!=null?t:{}))return i;vt(i,"already-initialized")}return n.initialize({options:t})}function My(e,t){const n=(t==null?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Vt);t!=null&&t.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,t==null?void 0:t.popupRedirectResolver)}function tl(e,t,n){const r=qe(e);oe(r._canInitEmulator,r,"emulator-config-failed"),oe(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const i=!!(n!=null&&n.disableWarnings),o=jd(t),{host:a,port:l}=Ly(t),s=l===null?"":`:${l}`;r.config.emulator={url:`${o}//${a}${s}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:a,port:l,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||By()}function jd(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function Ly(e){const t=jd(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const o=i[1];return{host:o,port:Vd(r.substr(o.length+1))}}else{const[o,a]=r.split(":");return{host:o,port:Vd(a)}}}function Vd(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}function By(){function e(){const t=document.createElement("p"),n=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}typeof console!="undefined"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window!="undefined"&&typeof document!="undefined"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",e):e())}/**
|
|
991
991
|
* @license
|
|
992
992
|
* Copyright 2020 Google LLC
|
|
993
993
|
*
|
|
@@ -1137,7 +1137,7 @@
|
|
|
1137
1137
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1138
1138
|
* See the License for the specific language governing permissions and
|
|
1139
1139
|
* limitations under the License.
|
|
1140
|
-
*/function Zy(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function eC(e){const t=Ar(bi(e)).link,n=t?Ar(bi(t)).deep_link_id:null,r=Ar(bi(e)).deep_link_id;return(r?Ar(bi(r)).link:null)||r||n||t||e}class Bo{constructor(t){var n,r,i,o,a,l;const s=Ar(bi(t)),c=(n=s.apiKey)!==null&&n!==void 0?n:null,d=(r=s.oobCode)!==null&&r!==void 0?r:null,f=Zy((i=s.mode)!==null&&i!==void 0?i:null);
|
|
1140
|
+
*/function Zy(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function eC(e){const t=Ar(bi(e)).link,n=t?Ar(bi(t)).deep_link_id:null,r=Ar(bi(e)).deep_link_id;return(r?Ar(bi(r)).link:null)||r||n||t||e}class Bo{constructor(t){var n,r,i,o,a,l;const s=Ar(bi(t)),c=(n=s.apiKey)!==null&&n!==void 0?n:null,d=(r=s.oobCode)!==null&&r!==void 0?r:null,f=Zy((i=s.mode)!==null&&i!==void 0?i:null);oe(c&&d&&f,"argument-error"),this.apiKey=c,this.operation=f,this.code=d,this.continueUrl=(o=s.continueUrl)!==null&&o!==void 0?o:null,this.languageCode=(a=s.languageCode)!==null&&a!==void 0?a:null,this.tenantId=(l=s.tenantId)!==null&&l!==void 0?l:null}static parseLink(t){const n=eC(t);try{return new Bo(n)}catch(r){return null}}}/**
|
|
1141
1141
|
* @license
|
|
1142
1142
|
* Copyright 2020 Google LLC
|
|
1143
1143
|
*
|
|
@@ -1152,7 +1152,7 @@
|
|
|
1152
1152
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1153
1153
|
* See the License for the specific language governing permissions and
|
|
1154
1154
|
* limitations under the License.
|
|
1155
|
-
*/class qn{constructor(){this.providerId=qn.PROVIDER_ID}static credential(t,n){return Di._fromEmailAndPassword(t,n)}static credentialWithLink(t,n){const r=Bo.parseLink(n);return
|
|
1155
|
+
*/class qn{constructor(){this.providerId=qn.PROVIDER_ID}static credential(t,n){return Di._fromEmailAndPassword(t,n)}static credentialWithLink(t,n){const r=Bo.parseLink(n);return oe(r,"argument-error"),Di._fromEmailAndCode(t,r.code,r.tenantId)}}qn.PROVIDER_ID="password",qn.EMAIL_PASSWORD_SIGN_IN_METHOD="password",qn.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/**
|
|
1156
1156
|
* @license
|
|
1157
1157
|
* Copyright 2020 Google LLC
|
|
1158
1158
|
*
|
|
@@ -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 Mr extends Dn{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}}class Lr extends Mr{static credentialFromJSON(t){const n=typeof t=="string"?JSON.parse(t):t;return
|
|
1185
|
+
*/class Mr extends Dn{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}}class Lr extends Mr{static credentialFromJSON(t){const n=typeof t=="string"?JSON.parse(t):t;return oe("providerId"in n&&"signInMethod"in n,"argument-error"),pn._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"),pn._fromParams(Object.assign(Object.assign({},t),{providerId:this.providerId,signInMethod:this.providerId}))}static credentialFromResult(t){return Lr.oauthCredentialFromTaggedObject(t)}static credentialFromError(t){return Lr.oauthCredentialFromTaggedObject(t.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthIdToken:n,oauthAccessToken:r,oauthTokenSecret:i,pendingToken:o,nonce:a,providerId:l}=t;if(!r&&!i&&!n&&!o||!l)return null;try{return new Lr(l)._credential({idToken:n,accessToken:r,nonce:a,pendingToken:o})}catch(s){return null}}}/**
|
|
1186
1186
|
* @license
|
|
1187
1187
|
* Copyright 2020 Google LLC
|
|
1188
1188
|
*
|
|
@@ -1257,7 +1257,7 @@
|
|
|
1257
1257
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1258
1258
|
* See the License for the specific language governing permissions and
|
|
1259
1259
|
* limitations under the License.
|
|
1260
|
-
*/const nC="saml.";class $o extends Dn{constructor(t){
|
|
1260
|
+
*/const nC="saml.";class $o extends Dn{constructor(t){oe(t.startsWith(nC),"argument-error"),super(t)}static credentialFromResult(t){return $o.samlCredentialFromTaggedObject(t)}static credentialFromError(t){return $o.samlCredentialFromTaggedObject(t.customData||{})}static credentialFromJSON(t){const n=Br.fromJSON(t);return oe(n,"argument-error"),n}static samlCredentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{pendingToken:n,providerId:r}=t;if(!n||!r)return null;try{return Br._create(r,n)}catch(i){return null}}}/**
|
|
1261
1261
|
* @license
|
|
1262
1262
|
* Copyright 2020 Google LLC
|
|
1263
1263
|
*
|
|
@@ -1362,7 +1362,7 @@
|
|
|
1362
1362
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1363
1363
|
* See the License for the specific language governing permissions and
|
|
1364
1364
|
* limitations under the License.
|
|
1365
|
-
*/function iC(e,t){return k(this,null,function*(){const n=ke(e);yield Fo(!0,n,t);const{providerUserInfo:r}=yield uy(n.auth,{idToken:yield n.getIdToken(),deleteProvider:[t]}),i=Yd(r||[]);return n.providerData=n.providerData.filter(o=>i.has(o.providerId)),i.has("phone")||(n.phoneNumber=null),yield n.auth._persistUserIfCurrent(n),n})}function nl(e,t,n=!1){return k(this,null,function*(){const r=yield _n(e,t._linkToIdToken(e.auth,yield e.getIdToken()),n);return Jt._forOperation(e,"link",r)})}function Fo(e,t,n){return k(this,null,function*(){yield Ti(t);const r=Yd(t.providerData),i=e===!1?"provider-already-linked":"no-such-provider";
|
|
1365
|
+
*/function iC(e,t){return k(this,null,function*(){const n=ke(e);yield Fo(!0,n,t);const{providerUserInfo:r}=yield uy(n.auth,{idToken:yield n.getIdToken(),deleteProvider:[t]}),i=Yd(r||[]);return n.providerData=n.providerData.filter(o=>i.has(o.providerId)),i.has("phone")||(n.phoneNumber=null),yield n.auth._persistUserIfCurrent(n),n})}function nl(e,t,n=!1){return k(this,null,function*(){const r=yield _n(e,t._linkToIdToken(e.auth,yield e.getIdToken()),n);return Jt._forOperation(e,"link",r)})}function Fo(e,t,n){return k(this,null,function*(){yield Ti(t);const r=Yd(t.providerData),i=e===!1?"provider-already-linked":"no-such-provider";oe(r.has(n)===e,t.auth,i)})}/**
|
|
1366
1366
|
* @license
|
|
1367
1367
|
* Copyright 2019 Google LLC
|
|
1368
1368
|
*
|
|
@@ -1377,7 +1377,7 @@
|
|
|
1377
1377
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1378
1378
|
* See the License for the specific language governing permissions and
|
|
1379
1379
|
* limitations under the License.
|
|
1380
|
-
*/function Kd(e,t,n=!1){return k(this,null,function*(){const{auth:r}=e;if(Ge(r.app))return Promise.reject(bt(r));const i="reauthenticate";try{const o=yield _n(e,Gd(r,i,t,e),n);
|
|
1380
|
+
*/function Kd(e,t,n=!1){return k(this,null,function*(){const{auth:r}=e;if(Ge(r.app))return Promise.reject(bt(r));const i="reauthenticate";try{const o=yield _n(e,Gd(r,i,t,e),n);oe(o.idToken,r,"internal-error");const a=Mo(o.idToken);oe(a,r,"internal-error");const{sub:l}=a;return oe(e.uid===l,r,"user-mismatch"),Jt._forOperation(e,i,o)}catch(o){throw(o==null?void 0:o.code)==="auth/user-not-found"&&vt(r,"user-mismatch"),o}})}/**
|
|
1381
1381
|
* @license
|
|
1382
1382
|
* Copyright 2020 Google LLC
|
|
1383
1383
|
*
|
|
@@ -1452,7 +1452,7 @@
|
|
|
1452
1452
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1453
1453
|
* See the License for the specific language governing permissions and
|
|
1454
1454
|
* limitations under the License.
|
|
1455
|
-
*/function jo(e,t,n){var r;
|
|
1455
|
+
*/function jo(e,t,n){var r;oe(((r=n.url)===null||r===void 0?void 0:r.length)>0,e,"invalid-continue-uri"),oe(typeof n.dynamicLinkDomain=="undefined"||n.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),t.continueUrl=n.url,t.dynamicLinkDomain=n.dynamicLinkDomain,t.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(oe(n.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=n.iOS.bundleId),n.android&&(oe(n.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=n.android.installApp,t.androidMinimumVersionCode=n.android.minimumVersion,t.androidPackageName=n.android.packageName)}/**
|
|
1456
1456
|
* @license
|
|
1457
1457
|
* Copyright 2020 Google LLC
|
|
1458
1458
|
*
|
|
@@ -1467,7 +1467,7 @@
|
|
|
1467
1467
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1468
1468
|
* See the License for the specific language governing permissions and
|
|
1469
1469
|
* limitations under the License.
|
|
1470
|
-
*/function ol(e){return k(this,null,function*(){const t=qe(e);t._getPasswordPolicyInternal()&&(yield t._updatePasswordPolicy())})}function sC(e,t,n){return k(this,null,function*(){const r=qe(e),i={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};n&&jo(r,i,n),yield Pi(r,i,"getOobCode",Vy)})}function lC(e,t,n){return k(this,null,function*(){yield Ud(ke(e),{oobCode:t,newPassword:n}).catch(r=>k(this,null,function*(){throw r.code==="auth/password-does-not-meet-requirements"&&ol(e),r}))})}function cC(e,t){return k(this,null,function*(){yield Fy(ke(e),{oobCode:t})})}function Xd(e,t){return k(this,null,function*(){const n=ke(e),r=yield Ud(n,{oobCode:t}),i=r.requestType;switch(
|
|
1470
|
+
*/function ol(e){return k(this,null,function*(){const t=qe(e);t._getPasswordPolicyInternal()&&(yield t._updatePasswordPolicy())})}function sC(e,t,n){return k(this,null,function*(){const r=qe(e),i={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};n&&jo(r,i,n),yield Pi(r,i,"getOobCode",Vy)})}function lC(e,t,n){return k(this,null,function*(){yield Ud(ke(e),{oobCode:t,newPassword:n}).catch(r=>k(this,null,function*(){throw r.code==="auth/password-does-not-meet-requirements"&&ol(e),r}))})}function cC(e,t){return k(this,null,function*(){yield Fy(ke(e),{oobCode:t})})}function Xd(e,t){return k(this,null,function*(){const n=ke(e),r=yield Ud(n,{oobCode:t}),i=r.requestType;switch(oe(i,n,"internal-error"),i){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":oe(r.newEmail,n,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":oe(r.mfaInfo,n,"internal-error");default:oe(r.email,n,"internal-error")}let o=null;return r.mfaInfo&&(o=Oi._fromServerResponse(qe(n),r.mfaInfo)),{data:{email:(r.requestType==="VERIFY_AND_CHANGE_EMAIL"?r.newEmail:r.email)||null,previousEmail:(r.requestType==="VERIFY_AND_CHANGE_EMAIL"?r.email:r.newEmail)||null,multiFactorInfo:o},operation:i}})}function uC(e,t){return k(this,null,function*(){const{data:n}=yield Xd(ke(e),t);return n.email})}function dC(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=qe(e),a=yield Pi(r,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",Hd).catch(s=>{throw s.code==="auth/password-does-not-meet-requirements"&&ol(e),s}),l=yield Jt._fromIdTokenResponse(r,"signIn",a);return yield r._updateCurrentUser(l.user),l})}function fC(e,t,n){return Ge(e.app)?Promise.reject(bt(e)):zo(ke(e),qn.credential(t,n)).catch(r=>k(this,null,function*(){throw r.code==="auth/password-does-not-meet-requirements"&&ol(e),r}))}/**
|
|
1471
1471
|
* @license
|
|
1472
1472
|
* Copyright 2020 Google LLC
|
|
1473
1473
|
*
|
|
@@ -1482,7 +1482,7 @@
|
|
|
1482
1482
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1483
1483
|
* See the License for the specific language governing permissions and
|
|
1484
1484
|
* limitations under the License.
|
|
1485
|
-
*/function hC(e,t,n){return k(this,null,function*(){const r=qe(e),i={requestType:"EMAIL_SIGNIN",email:t,clientType:"CLIENT_TYPE_WEB"};function o(a,l){
|
|
1485
|
+
*/function hC(e,t,n){return k(this,null,function*(){const r=qe(e),i={requestType:"EMAIL_SIGNIN",email:t,clientType:"CLIENT_TYPE_WEB"};function o(a,l){oe(l.handleCodeInApp,r,"argument-error"),l&&jo(r,a,l)}o(i,n),yield Pi(r,i,"getOobCode",Uy)})}function pC(e,t){const n=Bo.parseLink(t);return(n==null?void 0:n.operation)==="EMAIL_SIGNIN"}function gC(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=ke(e),i=qn.credentialWithLink(t,n||wi());return oe(i._tenantId===(r.tenantId||null),r,"tenant-id-mismatch"),zo(r,i)})}/**
|
|
1486
1486
|
* @license
|
|
1487
1487
|
* Copyright 2020 Google LLC
|
|
1488
1488
|
*
|
|
@@ -1587,7 +1587,7 @@
|
|
|
1587
1587
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1588
1588
|
* See the License for the specific language governing permissions and
|
|
1589
1589
|
* limitations under the License.
|
|
1590
|
-
*/class al{constructor(t,n,r){this.session=t,this.hints=n,this.signInResolver=r}static _fromError(t,n){const r=qe(t),i=n.customData._serverResponse,o=(i.mfaInfo||[]).map(l=>Oi._fromServerResponse(r,l));
|
|
1590
|
+
*/class al{constructor(t,n,r){this.session=t,this.hints=n,this.signInResolver=r}static _fromError(t,n){const r=qe(t),i=n.customData._serverResponse,o=(i.mfaInfo||[]).map(l=>Oi._fromServerResponse(r,l));oe(i.mfaPendingCredential,r,"internal-error");const a=fr._fromMfaPendingCredential(i.mfaPendingCredential);return new al(a,o,l=>k(this,null,function*(){const s=yield l._process(r,a);delete i.mfaInfo,delete i.mfaPendingCredential;const c=Object.assign(Object.assign({},i),{idToken:s.idToken,refreshToken:s.refreshToken});switch(n.operationType){case"signIn":const d=yield Jt._fromIdTokenResponse(r,n.operationType,c);return yield r._updateCurrentUser(d.user),d;case"reauthenticate":return oe(n.user,r,"internal-error"),Jt._forOperation(n.user,n.operationType,c);default:vt(r,"internal-error")}}))}resolveSignIn(t){return k(this,null,function*(){const n=t;return this.signInResolver(n)})}}function OC(e,t){var n;const r=ke(e),i=t;return oe(t.customData.operationType,r,"argument-error"),oe((n=i.customData._serverResponse)===null||n===void 0?void 0:n.mfaPendingCredential,r,"argument-error"),al._fromError(r,i)}/**
|
|
1591
1591
|
* @license
|
|
1592
1592
|
* Copyright 2020 Google LLC
|
|
1593
1593
|
*
|
|
@@ -1782,7 +1782,7 @@
|
|
|
1782
1782
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1783
1783
|
* See the License for the specific language governing permissions and
|
|
1784
1784
|
* limitations under the License.
|
|
1785
|
-
*/const XC=500,ZC=6e4,Yo=1e12;class ex{constructor(t){this.auth=t,this.counter=Yo,this._widgets=new Map}render(t,n){const r=this.counter;return this._widgets.set(r,new tx(t,this.auth.name,n||{})),this.counter++,r}reset(t){var n;const r=t||Yo;(n=this._widgets.get(r))===null||n===void 0||n.delete(),this._widgets.delete(r)}getResponse(t){var n;const r=t||Yo;return((n=this._widgets.get(r))===null||n===void 0?void 0:n.getResponse())||""}execute(t){return k(this,null,function*(){var n;const r=t||Yo;return(n=this._widgets.get(r))===null||n===void 0||n.execute(),""})}}class tx{constructor(t,n,r){this.params=r,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const i=typeof t=="string"?document.getElementById(t):t;
|
|
1785
|
+
*/const XC=500,ZC=6e4,Yo=1e12;class ex{constructor(t){this.auth=t,this.counter=Yo,this._widgets=new Map}render(t,n){const r=this.counter;return this._widgets.set(r,new tx(t,this.auth.name,n||{})),this.counter++,r}reset(t){var n;const r=t||Yo;(n=this._widgets.get(r))===null||n===void 0||n.delete(),this._widgets.delete(r)}getResponse(t){var n;const r=t||Yo;return((n=this._widgets.get(r))===null||n===void 0?void 0:n.getResponse())||""}execute(t){return k(this,null,function*(){var n;const r=t||Yo;return(n=this._widgets.get(r))===null||n===void 0||n.execute(),""})}}class tx{constructor(t,n,r){this.params=r,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const i=typeof t=="string"?document.getElementById(t):t;oe(i,"argument-error",{appName:n}),this.container=i,this.isVisible=this.params.size!=="invisible",this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),!this.timerId&&(this.timerId=window.setTimeout(()=>{this.responseToken=nx(50);const{callback:t,"expired-callback":n}=this.params;if(t)try{t(this.responseToken)}catch(r){}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,n)try{n()}catch(r){}this.isVisible&&this.execute()},ZC)},XC))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}function nx(e){const t=[],n="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let r=0;r<e;r++)t.push(n.charAt(Math.floor(Math.random()*n.length)));return t.join("")}/**
|
|
1786
1786
|
* @license
|
|
1787
1787
|
* Copyright 2020 Google LLC
|
|
1788
1788
|
*
|
|
@@ -1797,7 +1797,7 @@
|
|
|
1797
1797
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1798
1798
|
* See the License for the specific language governing permissions and
|
|
1799
1799
|
* limitations under the License.
|
|
1800
|
-
*/const dl=Fd("rcb"),rx=new Ii(3e4,6e4);class ix{constructor(){var t;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(!((t=st().grecaptcha)===null||t===void 0)&&t.render)}load(t,n=""){return
|
|
1800
|
+
*/const dl=Fd("rcb"),rx=new Ii(3e4,6e4);class ix{constructor(){var t;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(!((t=st().grecaptcha)===null||t===void 0)&&t.render)}load(t,n=""){return oe(ox(n),t,"argument-error"),this.shouldResolveImmediately(n)&&wd(st().grecaptcha)?Promise.resolve(st().grecaptcha):new Promise((r,i)=>{const o=st().setTimeout(()=>{i(ht(t,"network-request-failed"))},rx.get());st()[dl]=()=>{st().clearTimeout(o),delete st()[dl];const l=st().grecaptcha;if(!l||!wd(l)){i(ht(t,"internal-error"));return}const s=l.render;l.render=(c,d)=>{const f=s(c,d);return this.counter++,f},this.hostLanguage=n,r(l)};const a=`${Ey()}?${Sr({onload:dl,render:"explicit",hl:n})}`;el(a).catch(()=>{clearTimeout(o),i(ht(t,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(t){var n;return!!(!((n=st().grecaptcha)===null||n===void 0)&&n.render)&&(t===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}function ox(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}class ax{load(t){return k(this,null,function*(){return new ex(t)})}clearedOneInstance(){}}/**
|
|
1801
1801
|
* @license
|
|
1802
1802
|
* Copyright 2020 Google LLC
|
|
1803
1803
|
*
|
|
@@ -1812,7 +1812,7 @@
|
|
|
1812
1812
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1813
1813
|
* See the License for the specific language governing permissions and
|
|
1814
1814
|
* limitations under the License.
|
|
1815
|
-
*/const cf="recaptcha",sx={theme:"light",type:"image"};let lx=class{constructor(t,n,r=Object.assign({},sx)){this.parameters=r,this.type=cf,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=qe(t),this.isInvisible=this.parameters.size==="invisible",
|
|
1815
|
+
*/const cf="recaptcha",sx={theme:"light",type:"image"};let lx=class{constructor(t,n,r=Object.assign({},sx)){this.parameters=r,this.type=cf,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=qe(t),this.isInvisible=this.parameters.size==="invisible",oe(typeof document!="undefined",this.auth,"operation-not-supported-in-this-environment");const i=typeof n=="string"?document.getElementById(n):n;oe(i,this.auth,"argument-error"),this.container=i,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new ax:new ix,this.validateStartingState()}verify(){return k(this,null,function*(){this.assertNotDestroyed();const t=yield this.render(),n=this.getAssertedRecaptcha(),r=n.getResponse(t);return r||new Promise(i=>{const o=a=>{a&&(this.tokenChangeListeners.delete(o),i(a))};this.tokenChangeListeners.add(o),this.isInvisible&&n.execute(t)})})}render(){try{this.assertNotDestroyed()}catch(t){return Promise.reject(t)}return this.renderPromise?this.renderPromise:(this.renderPromise=this.makeRenderPromise().catch(t=>{throw this.renderPromise=null,t}),this.renderPromise)}_reset(){this.assertNotDestroyed(),this.widgetId!==null&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(t=>{this.container.removeChild(t)})}validateStartingState(){oe(!this.parameters.sitekey,this.auth,"argument-error"),oe(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),oe(typeof document!="undefined",this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(t){return n=>{if(this.tokenChangeListeners.forEach(r=>r(n)),typeof t=="function")t(n);else if(typeof t=="string"){const r=st()[t];typeof r=="function"&&r(n)}}}assertNotDestroyed(){oe(!this.destroyed,this.auth,"internal-error")}makeRenderPromise(){return k(this,null,function*(){if(yield this.init(),!this.widgetId){let t=this.container;if(!this.isInvisible){const n=document.createElement("div");t.appendChild(n),t=n}this.widgetId=this.getAssertedRecaptcha().render(t,this.parameters)}return this.widgetId})}init(){return k(this,null,function*(){oe(Qs()&&!cl(),this.auth,"internal-error"),yield cx(),this.recaptcha=yield this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);const t=yield sy(this.auth);oe(t,this.auth,"internal-error"),this.parameters.sitekey=t})}getAssertedRecaptcha(){return oe(this.recaptcha,this.auth,"internal-error"),this.recaptcha}};function cx(){let e=null;return new Promise(t=>{if(document.readyState==="complete"){t();return}e=()=>t(),window.addEventListener("load",e)}).catch(t=>{throw e&&window.removeEventListener("load",e),t})}/**
|
|
1816
1816
|
* @license
|
|
1817
1817
|
* Copyright 2020 Google LLC
|
|
1818
1818
|
*
|
|
@@ -1827,7 +1827,7 @@
|
|
|
1827
1827
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1828
1828
|
* See the License for the specific language governing permissions and
|
|
1829
1829
|
* limitations under the License.
|
|
1830
|
-
*/class fl{constructor(t,n){this.verificationId=t,this.onConfirmation=n}confirm(t){const n=dr._fromVerification(this.verificationId,t);return this.onConfirmation(n)}}function ux(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=qe(e),i=yield Ko(r,t,ke(n));return new fl(i,o=>zo(r,o))})}function dx(e,t,n){return k(this,null,function*(){const r=ke(e);yield Fo(!1,r,"phone");const i=yield Ko(r.auth,t,ke(n));return new fl(i,o=>Qd(r,o))})}function fx(e,t,n){return k(this,null,function*(){const r=ke(e);if(Ge(r.auth.app))return Promise.reject(bt(r.auth));const i=yield Ko(r.auth,t,ke(n));return new fl(i,o=>Jd(r,o))})}function Ko(e,t,n){return k(this,null,function*(){var r;const i=yield n.verify();try{
|
|
1830
|
+
*/class fl{constructor(t,n){this.verificationId=t,this.onConfirmation=n}confirm(t){const n=dr._fromVerification(this.verificationId,t);return this.onConfirmation(n)}}function ux(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=qe(e),i=yield Ko(r,t,ke(n));return new fl(i,o=>zo(r,o))})}function dx(e,t,n){return k(this,null,function*(){const r=ke(e);yield Fo(!1,r,"phone");const i=yield Ko(r.auth,t,ke(n));return new fl(i,o=>Qd(r,o))})}function fx(e,t,n){return k(this,null,function*(){const r=ke(e);if(Ge(r.auth.app))return Promise.reject(bt(r.auth));const i=yield Ko(r.auth,t,ke(n));return new fl(i,o=>Jd(r,o))})}function Ko(e,t,n){return k(this,null,function*(){var r;const i=yield n.verify();try{oe(typeof i=="string",e,"argument-error"),oe(n.type===cf,e,"argument-error");let o;if(typeof t=="string"?o={phoneNumber:t}:o=t,"session"in o){const a=o.session;if("phoneNumber"in o)return oe(a.type==="enroll",e,"internal-error"),(yield RC(e,{idToken:a.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:i}})).phoneSessionInfo.sessionInfo;{oe(a.type==="signin",e,"internal-error");const l=((r=o.multiFactorHint)===null||r===void 0?void 0:r.uid)||o.multiFactorUid;return oe(l,e,"missing-multi-factor-info"),(yield QC(e,{mfaPendingCredential:a.credential,mfaEnrollmentId:l,phoneSignInInfo:{recaptchaToken:i}})).phoneResponseInfo.sessionInfo}}else{const{sessionInfo:a}=yield Ky(e,{phoneNumber:o.phoneNumber,recaptchaToken:i});return a}}finally{n._reset()}})}function hx(e,t){return k(this,null,function*(){const n=ke(e);if(Ge(n.auth.app))return Promise.reject(bt(n.auth));yield nl(n,t)})}/**
|
|
1831
1831
|
* @license
|
|
1832
1832
|
* Copyright 2020 Google LLC
|
|
1833
1833
|
*
|
|
@@ -1857,7 +1857,7 @@
|
|
|
1857
1857
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1858
1858
|
* See the License for the specific language governing permissions and
|
|
1859
1859
|
* limitations under the License.
|
|
1860
|
-
*/function pr(e,t){return t?Vt(t):(
|
|
1860
|
+
*/function pr(e,t){return t?Vt(t):(oe(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}/**
|
|
1861
1861
|
* @license
|
|
1862
1862
|
* Copyright 2019 Google LLC
|
|
1863
1863
|
*
|
|
@@ -1872,7 +1872,7 @@
|
|
|
1872
1872
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1873
1873
|
* See the License for the specific language governing permissions and
|
|
1874
1874
|
* limitations under the License.
|
|
1875
|
-
*/class hl extends Rr{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return Pn(t,this._buildIdpRequest())}_linkToIdToken(t,n){return Pn(t,this._buildIdpRequest(n))}_getReauthenticationResolver(t){return Pn(t,this._buildIdpRequest())}_buildIdpRequest(t){const n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return t&&(n.idToken=t),n}}function px(e){return qd(e.auth,new hl(e),e.bypassAuthState)}function gx(e){const{auth:t,user:n}=e;return
|
|
1875
|
+
*/class hl extends Rr{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return Pn(t,this._buildIdpRequest())}_linkToIdToken(t,n){return Pn(t,this._buildIdpRequest(n))}_getReauthenticationResolver(t){return Pn(t,this._buildIdpRequest())}_buildIdpRequest(t){const n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return t&&(n.idToken=t),n}}function px(e){return qd(e.auth,new hl(e),e.bypassAuthState)}function gx(e){const{auth:t,user:n}=e;return oe(n,t,"internal-error"),Kd(n,new hl(e),e.bypassAuthState)}function mx(e){return k(this,null,function*(){const{auth:t,user:n}=e;return oe(n,t,"internal-error"),nl(n,new hl(e),e.bypassAuthState)})}/**
|
|
1876
1876
|
* @license
|
|
1877
1877
|
* Copyright 2020 Google LLC
|
|
1878
1878
|
*
|
|
@@ -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 vx=new Ii(2e3,1e4);function bx(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(ht(e,"operation-not-supported-in-this-environment"));const r=qe(e);kr(e,t,Dn);const i=pr(r,n);return new On(r,"signInViaPopup",t,i).executeNotNull()})}function yx(e,t,n){return k(this,null,function*(){const r=ke(e);if(Ge(r.auth.app))return Promise.reject(ht(r.auth,"operation-not-supported-in-this-environment"));kr(r.auth,t,Dn);const i=pr(r.auth,n);return new On(r.auth,"reauthViaPopup",t,i,r).executeNotNull()})}function Cx(e,t,n){return k(this,null,function*(){const r=ke(e);kr(r.auth,t,Dn);const i=pr(r.auth,n);return new On(r.auth,"linkViaPopup",t,i,r).executeNotNull()})}class On extends uf{constructor(t,n,r,i,o){super(t,n,i,o),this.provider=r,this.authWindow=null,this.pollId=null,On.currentPopupAction&&On.currentPopupAction.cancel(),On.currentPopupAction=this}executeNotNull(){return k(this,null,function*(){const t=yield this.execute();return
|
|
1905
|
+
*/const vx=new Ii(2e3,1e4);function bx(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(ht(e,"operation-not-supported-in-this-environment"));const r=qe(e);kr(e,t,Dn);const i=pr(r,n);return new On(r,"signInViaPopup",t,i).executeNotNull()})}function yx(e,t,n){return k(this,null,function*(){const r=ke(e);if(Ge(r.auth.app))return Promise.reject(ht(r.auth,"operation-not-supported-in-this-environment"));kr(r.auth,t,Dn);const i=pr(r.auth,n);return new On(r.auth,"reauthViaPopup",t,i,r).executeNotNull()})}function Cx(e,t,n){return k(this,null,function*(){const r=ke(e);kr(r.auth,t,Dn);const i=pr(r.auth,n);return new On(r.auth,"linkViaPopup",t,i,r).executeNotNull()})}class On extends uf{constructor(t,n,r,i,o){super(t,n,i,o),this.provider=r,this.authWindow=null,this.pollId=null,On.currentPopupAction&&On.currentPopupAction.cancel(),On.currentPopupAction=this}executeNotNull(){return k(this,null,function*(){const t=yield this.execute();return oe(t,this.auth,"internal-error"),t})}onExecution(){return k(this,null,function*(){an(this.filter.length===1,"Popup operations only handle one event");const t=Ri();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(ht(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(ht(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,On.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(ht(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,vx.get())};t()}}On.currentPopupAction=null;/**
|
|
1906
1906
|
* @license
|
|
1907
1907
|
* Copyright 2020 Google LLC
|
|
1908
1908
|
*
|
|
@@ -2007,7 +2007,7 @@
|
|
|
2007
2007
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2008
2008
|
* See the License for the specific language governing permissions and
|
|
2009
2009
|
* limitations under the License.
|
|
2010
|
-
*/const zx=new Ii(5e3,15e3),jx="__/auth/iframe",Vx="emulator/auth/iframe",Ux={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Hx=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Wx(e){const t=e.config;
|
|
2010
|
+
*/const zx=new Ii(5e3,15e3),jx="__/auth/iframe",Vx="emulator/auth/iframe",Ux={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Hx=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Wx(e){const t=e.config;oe(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?Js(t,Vx):`https://${e.config.authDomain}/${jx}`,r={apiKey:t.apiKey,appName:e.name,v:cr},i=Hx.get(e.config.apiHost);i&&(r.eid=i);const o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${Sr(r).slice(1)}`}function Gx(e){return k(this,null,function*(){const t=yield Fx(e),n=st().gapi;return oe(n,e,"internal-error"),t.open({where:document.body,url:Wx(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Ux,dontclear:!0},r=>new Promise((i,o)=>k(this,null,function*(){yield r.restyle({setHideOnLeave:!1});const a=ht(e,"network-request-failed"),l=st().setTimeout(()=>{o(a)},zx.get());function s(){st().clearTimeout(l),i(r)}r.ping(s).then(s,()=>{o(a)})})))})}/**
|
|
2011
2011
|
* @license
|
|
2012
2012
|
* Copyright 2020 Google LLC.
|
|
2013
2013
|
*
|
|
@@ -2022,7 +2022,7 @@
|
|
|
2022
2022
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2023
2023
|
* See the License for the specific language governing permissions and
|
|
2024
2024
|
* limitations under the License.
|
|
2025
|
-
*/const Yx={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},Kx=500,qx=600,Qx="_blank",Jx="http://localhost";class yf{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(t){}}}function Xx(e,t,n,r=Kx,i=qx){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),a=Math.max((window.screen.availWidth-r)/2,0).toString();let l="";const s=Object.assign(Object.assign({},Yx),{width:r.toString(),height:i.toString(),top:o,left:a}),c=ft().toLowerCase();n&&(l=Od(c)?Qx:n),Pd(c)&&(t=t||Jx,s.scrollbars="yes");const d=Object.entries(s).reduce((h,[p,m])=>`${h}${p}=${m},`,"");if(yy(c)&&l!=="_self")return Zx(t||"",l),new yf(null);const f=window.open(t||"",l,d);
|
|
2025
|
+
*/const Yx={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},Kx=500,qx=600,Qx="_blank",Jx="http://localhost";class yf{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(t){}}}function Xx(e,t,n,r=Kx,i=qx){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),a=Math.max((window.screen.availWidth-r)/2,0).toString();let l="";const s=Object.assign(Object.assign({},Yx),{width:r.toString(),height:i.toString(),top:o,left:a}),c=ft().toLowerCase();n&&(l=Od(c)?Qx:n),Pd(c)&&(t=t||Jx,s.scrollbars="yes");const d=Object.entries(s).reduce((h,[p,m])=>`${h}${p}=${m},`,"");if(yy(c)&&l!=="_self")return Zx(t||"",l),new yf(null);const f=window.open(t||"",l,d);oe(f,e,"popup-blocked");try{f.focus()}catch(h){}return new yf(f)}function Zx(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/**
|
|
2026
2026
|
* @license
|
|
2027
2027
|
* Copyright 2021 Google LLC
|
|
2028
2028
|
*
|
|
@@ -2037,7 +2037,7 @@
|
|
|
2037
2037
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2038
2038
|
* See the License for the specific language governing permissions and
|
|
2039
2039
|
* limitations under the License.
|
|
2040
|
-
*/const ew="__/auth/handler",tw="emulator/auth/handler",nw=encodeURIComponent("fac");function ml(e,t,n,r,i,o){return k(this,null,function*(){
|
|
2040
|
+
*/const ew="__/auth/handler",tw="emulator/auth/handler",nw=encodeURIComponent("fac");function ml(e,t,n,r,i,o){return k(this,null,function*(){oe(e.config.authDomain,e,"auth-domain-config-required"),oe(e.config.apiKey,e,"invalid-api-key");const a={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:cr,eventId:i};if(t instanceof Dn){t.setDefaultLanguage(e.languageCode),a.providerId=t.providerId||"",Eb(t.getCustomParameters())||(a.customParameters=JSON.stringify(t.getCustomParameters()));for(const[d,f]of Object.entries(o||{}))a[d]=f}if(t instanceof Mr){const d=t.getScopes().filter(f=>f!=="");d.length>0&&(a.scopes=d.join(","))}e.tenantId&&(a.tid=e.tenantId);const l=a;for(const d of Object.keys(l))l[d]===void 0&&delete l[d];const s=yield e._getAppCheckToken(),c=s?`#${nw}=${encodeURIComponent(s)}`:"";return`${rw(e)}?${Sr(l).slice(1)}${c}`})}function rw({config:e}){return e.emulator?Js(e,tw):`https://${e.authDomain}/${ew}`}/**
|
|
2041
2041
|
* @license
|
|
2042
2042
|
* Copyright 2020 Google LLC
|
|
2043
2043
|
*
|
|
@@ -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 vl="webStorageSupport";class iw{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Qn,this._completeRedirectFn=qo,this._overrideRedirectResult=gl}_openPopup(t,n,r,i){return k(this,null,function*(){var o;an((o=this.eventManagers[t._key()])===null||o===void 0?void 0:o.manager,"_initialize() not called before _openPopup()");const a=yield ml(t,n,r,wi(),i);return Xx(t,a,Ri())})}_openRedirect(t,n,r,i){return k(this,null,function*(){yield this._originValidation(t);const o=yield ml(t,n,r,wi(),i);return jC(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):(an(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 k(this,null,function*(){const n=yield Gx(t),r=new pf(t);return n.register("authEvent",i=>(
|
|
2055
|
+
*/const vl="webStorageSupport";class iw{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Qn,this._completeRedirectFn=qo,this._overrideRedirectResult=gl}_openPopup(t,n,r,i){return k(this,null,function*(){var o;an((o=this.eventManagers[t._key()])===null||o===void 0?void 0:o.manager,"_initialize() not called before _openPopup()");const a=yield ml(t,n,r,wi(),i);return Xx(t,a,Ri())})}_openRedirect(t,n,r,i){return k(this,null,function*(){yield this._originValidation(t);const o=yield ml(t,n,r,wi(),i);return jC(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):(an(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 k(this,null,function*(){const n=yield Gx(t),r=new pf(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(vl,{type:vl},i=>{var o;const a=(o=i==null?void 0:i[0])===null||o===void 0?void 0:o[vl];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]=Lx(t)),this.originValidationPromises[n]}get _shouldInitProactively(){return Bd()||Dd()||_i()}}const Cf=iw;class ow{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 hn("unexpected MultiFactorSessionType")}}}class bl extends ow{constructor(t){super("phone"),this.credential=t}static _fromCredential(t){return new bl(t)}_finalizeEnroll(t,n,r){return MC(t,{idToken:n,displayName:r,phoneVerificationInfo:this.credential._makeVerificationRequest()})}_finalizeSignIn(t,n){return JC(t,{mfaPendingCredential:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}class xf{constructor(){}static assertion(t){return bl._fromCredential(t)}}xf.FACTOR_ID="phone";var wf="@firebase/auth",If="1.7.7";/**
|
|
2056
2056
|
* @license
|
|
2057
2057
|
* Copyright 2020 Google LLC
|
|
2058
2058
|
*
|
|
@@ -2067,7 +2067,7 @@
|
|
|
2067
2067
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2068
2068
|
* See the License for the specific language governing permissions and
|
|
2069
2069
|
* limitations under the License.
|
|
2070
|
-
*/class aw{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)===null||t===void 0?void 0:t.uid)||null}getToken(t){return k(this,null,function*(){return this.assertAuthConfigured(),yield this.auth._initializationPromise,this.auth.currentUser?{accessToken:yield this.auth.currentUser.getIdToken(t)}:null})}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;const n=this.auth.onIdTokenChanged(r=>{t((r==null?void 0:r.stsTokenManager.accessToken)||null)});this.internalListeners.set(t,n),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();const n=this.internalListeners.get(t);n&&(this.internalListeners.delete(t),n(),this.updateProactiveRefresh())}assertAuthConfigured(){
|
|
2070
|
+
*/class aw{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)===null||t===void 0?void 0:t.uid)||null}getToken(t){return k(this,null,function*(){return this.assertAuthConfigured(),yield this.auth._initializationPromise,this.auth.currentUser?{accessToken:yield this.auth.currentUser.getIdToken(t)}:null})}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;const n=this.auth.onIdTokenChanged(r=>{t((r==null?void 0:r.stsTokenManager.accessToken)||null)});this.internalListeners.set(t,n),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();const n=this.internalListeners.get(t);n&&(this.internalListeners.delete(t),n(),this.updateProactiveRefresh())}assertAuthConfigured(){oe(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
|
|
2071
2071
|
* @license
|
|
2072
2072
|
* Copyright 2020 Google LLC
|
|
2073
2073
|
*
|
|
@@ -2082,7 +2082,7 @@
|
|
|
2082
2082
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2083
2083
|
* See the License for the specific language governing permissions and
|
|
2084
2084
|
* limitations under the License.
|
|
2085
|
-
*/function sw(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function lw(e){lr(new Un("auth",(t,{options:n})=>{const r=t.getProvider("app").getImmediate(),i=t.getProvider("heartbeat"),o=t.getProvider("app-check-internal"),{apiKey:a,authDomain:l}=r.options;
|
|
2085
|
+
*/function sw(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function lw(e){lr(new Un("auth",(t,{options:n})=>{const r=t.getProvider("app").getImmediate(),i=t.getProvider("heartbeat"),o=t.getProvider("app-check-internal"),{apiKey:a,authDomain:l}=r.options;oe(a&&!a.includes(":"),"invalid-api-key",{appName:r.name});const s={apiKey:a,authDomain:l,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:$d(e)},c=new Ay(r,i,o,s);return My(c,n),c},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,n,r)=>{t.getProvider("auth-internal").initialize()})),lr(new Un("auth-internal",t=>{const n=qe(t.getProvider("auth").getImmediate());return(r=>new aw(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),Tn(wf,If,sw(e)),Tn(wf,If,"esm2017")}/**
|
|
2086
2086
|
* @license
|
|
2087
2087
|
* Copyright 2021 Google LLC
|
|
2088
2088
|
*
|
|
@@ -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 pw=2e3;function gw(e,t,n){return k(this,null,function*(){var r;const{BuildInfo:i}=gr();an(t.sessionId,"AuthEvent did not contain a session ID");const o=yield Cw(t.sessionId),a={};return _i()?a.ibi=i.packageName:Ei()?a.apn=i.packageName:vt(e,"operation-not-supported-in-this-environment"),i.displayName&&(a.appDisplayName=i.displayName),a.sessionId=o,ml(e,n,t.type,void 0,(r=t.eventId)!==null&&r!==void 0?r:void 0,a)})}function mw(e){return k(this,null,function*(){const{BuildInfo:t}=gr(),n={};_i()?n.iosBundleId=t.packageName:Ei()?n.androidPackageName=t.packageName:vt(e,"operation-not-supported-in-this-environment"),yield vf(e,n)})}function vw(e){const{cordova:t}=gr();return new Promise(n=>{t.plugins.browsertab.isAvailable(r=>{let i=null;r?t.plugins.browsertab.openUrl(e):i=t.InAppBrowser.open(e,by()?"_blank":"_system","location=yes"),n(i)})})}function bw(e,t,n){return k(this,null,function*(){const{cordova:r}=gr();let i=()=>{};try{yield new Promise((o,a)=>{let l=null;function s(){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 c(){l||(l=window.setTimeout(()=>{a(ht(e,"redirect-cancelled-by-user"))},pw))}function d(){(document==null?void 0:document.visibilityState)==="visible"&&c()}t.addPassiveListener(s),document.addEventListener("resume",c,!1),Ei()&&document.addEventListener("visibilitychange",d,!1),i=()=>{t.removePassiveListener(s),document.removeEventListener("resume",c,!1),document.removeEventListener("visibilitychange",d,!1),l&&window.clearTimeout(l)}})}finally{i()}})}function yw(e){var t,n,r,i,o,a,l,s,c,d;const f=gr();
|
|
2130
|
+
*/const pw=2e3;function gw(e,t,n){return k(this,null,function*(){var r;const{BuildInfo:i}=gr();an(t.sessionId,"AuthEvent did not contain a session ID");const o=yield Cw(t.sessionId),a={};return _i()?a.ibi=i.packageName:Ei()?a.apn=i.packageName:vt(e,"operation-not-supported-in-this-environment"),i.displayName&&(a.appDisplayName=i.displayName),a.sessionId=o,ml(e,n,t.type,void 0,(r=t.eventId)!==null&&r!==void 0?r:void 0,a)})}function mw(e){return k(this,null,function*(){const{BuildInfo:t}=gr(),n={};_i()?n.iosBundleId=t.packageName:Ei()?n.androidPackageName=t.packageName:vt(e,"operation-not-supported-in-this-environment"),yield vf(e,n)})}function vw(e){const{cordova:t}=gr();return new Promise(n=>{t.plugins.browsertab.isAvailable(r=>{let i=null;r?t.plugins.browsertab.openUrl(e):i=t.InAppBrowser.open(e,by()?"_blank":"_system","location=yes"),n(i)})})}function bw(e,t,n){return k(this,null,function*(){const{cordova:r}=gr();let i=()=>{};try{yield new Promise((o,a)=>{let l=null;function s(){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 c(){l||(l=window.setTimeout(()=>{a(ht(e,"redirect-cancelled-by-user"))},pw))}function d(){(document==null?void 0:document.visibilityState)==="visible"&&c()}t.addPassiveListener(s),document.addEventListener("resume",c,!1),Ei()&&document.addEventListener("visibilitychange",d,!1),i=()=>{t.removePassiveListener(s),document.removeEventListener("resume",c,!1),document.removeEventListener("visibilitychange",d,!1),l&&window.clearTimeout(l)}})}finally{i()}})}function yw(e){var t,n,r,i,o,a,l,s,c,d;const f=gr();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((s=(l=(a=f==null?void 0:f.cordova)===null||a===void 0?void 0:a.plugins)===null||l===void 0?void 0:l.browsertab)===null||s===void 0?void 0:s.isAvailable)=="function",e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),oe(typeof((d=(c=f==null?void 0:f.cordova)===null||c===void 0?void 0:c.InAppBrowser)===null||d===void 0?void 0:d.open)=="function",e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-inappbrowser"})}function Cw(e){return k(this,null,function*(){const t=xw(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 xw(e){if(an(/[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
|
*
|
|
@@ -2202,7 +2202,7 @@
|
|
|
2202
2202
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2203
2203
|
* See the License for the specific language governing permissions and
|
|
2204
2204
|
* limitations under the License.
|
|
2205
|
-
*/const Ut={LOCAL:"local",NONE:"none",SESSION:"session"},Ni=
|
|
2205
|
+
*/const Ut={LOCAL:"local",NONE:"none",SESSION:"session"},Ni=oe,Pf="persistence";function Hw(e,t){if(Ni(Object.values(Ut).includes(t),e,"invalid-persistence-type"),Os()){Ni(t!==Ut.SESSION,e,"unsupported-persistence-type");return}if(Vu()){Ni(t===Ut.NONE,e,"unsupported-persistence-type");return}if(xl()){Ni(t===Ut.NONE||t===Ut.LOCAL&&_o(),e,"unsupported-persistence-type");return}Ni(t===Ut.NONE||_f(),e,"unsupported-persistence-type")}function Il(e){return k(this,null,function*(){yield e._initializationPromise;const t=Df(),n=ur(Pf,e.config.apiKey,e.name);t&&t.setItem(n,e._getPersistence())})}function Ww(e,t){const n=Df();if(!n)return[];const r=ur(Pf,e,t);switch(n.getItem(r)){case Ut.NONE:return[Dr];case Ut.LOCAL:return[Fr,Qn];case Ut.SESSION:return[Qn];default:return[]}}function Df(){var e;try{return((e=Uw())===null||e===void 0?void 0:e.sessionStorage)||null}catch(t){return null}}/**
|
|
2206
2206
|
* @license
|
|
2207
2207
|
* Copyright 2020 Google LLC
|
|
2208
2208
|
*
|
|
@@ -2217,7 +2217,7 @@
|
|
|
2217
2217
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2218
2218
|
* See the License for the specific language governing permissions and
|
|
2219
2219
|
* limitations under the License.
|
|
2220
|
-
*/const Gw=
|
|
2220
|
+
*/const Gw=oe;class Jn{constructor(){this.browserResolver=Vt(Cf),this.cordovaResolver=Vt(Ow),this.underlyingResolver=null,this._redirectPersistence=Qn,this._completeRedirectFn=qo,this._overrideRedirectResult=gl}_initialize(t){return k(this,null,function*(){return yield this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._initialize(t)})}_openPopup(t,n,r,i){return k(this,null,function*(){return yield this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._openPopup(t,n,r,i)})}_openRedirect(t,n,r,i){return k(this,null,function*(){return yield this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._openRedirect(t,n,r,i)})}_isIframeWebStorageSupported(t,n){this.assertedUnderlyingResolver._isIframeWebStorageSupported(t,n)}_originValidation(t){return this.assertedUnderlyingResolver._originValidation(t)}get _shouldInitProactively(){return kf()||this.browserResolver._shouldInitProactively}get assertedUnderlyingResolver(){return Gw(this.underlyingResolver,"internal-error"),this.underlyingResolver}selectUnderlyingResolver(){return k(this,null,function*(){if(this.underlyingResolver)return;const t=yield Vw();this.underlyingResolver=t?this.cordovaResolver:this.browserResolver})}}/**
|
|
2221
2221
|
* @license
|
|
2222
2222
|
* Copyright 2020 Google LLC
|
|
2223
2223
|
*
|
|
@@ -2277,7 +2277,7 @@
|
|
|
2277
2277
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2278
2278
|
* See the License for the specific language governing permissions and
|
|
2279
2279
|
* limitations under the License.
|
|
2280
|
-
*/const Fi=
|
|
2280
|
+
*/const Fi=oe;class Al{constructor(t,n){if(this.app=t,n.isInitialized()){this._delegate=n.getImmediate(),this.linkUnderlyingAuth();return}const{apiKey:r}=t.options;Fi(r,"invalid-api-key",{appName:t.name}),Fi(r,"invalid-api-key",{appName:t.name});const i=typeof window!="undefined"?Jn:void 0;this._delegate=n.initialize({options:{persistence:Jw(r,t.name),popupRedirectResolver:i}}),this._delegate._updateErrorMap(J0),this.linkUnderlyingAuth()}get emulatorConfig(){return this._delegate.emulatorConfig}get currentUser(){return this._delegate.currentUser?Rn.getOrCreate(this._delegate.currentUser):null}get languageCode(){return this._delegate.languageCode}set languageCode(t){this._delegate.languageCode=t}get settings(){return this._delegate.settings}get tenantId(){return this._delegate.tenantId}set tenantId(t){this._delegate.tenantId=t}useDeviceLanguage(){this._delegate.useDeviceLanguage()}signOut(){return this._delegate.signOut()}useEmulator(t,n){tl(this._delegate,t,n)}applyActionCode(t){return cC(this._delegate,t)}checkActionCode(t){return Xd(this._delegate,t)}confirmPasswordReset(t,n){return lC(this._delegate,t,n)}createUserWithEmailAndPassword(t,n){return k(this,null,function*(){return Nt(this._delegate,dC(this._delegate,t,n))})}fetchProvidersForEmail(t){return this.fetchSignInMethodsForEmail(t)}fetchSignInMethodsForEmail(t){return vC(this._delegate,t)}isSignInWithEmailLink(t){return pC(this._delegate,t)}getRedirectResult(){return k(this,null,function*(){Fi(wl(),this._delegate,"operation-not-supported-in-this-environment");const t=yield Px(this._delegate,Jn);return t?Nt(this._delegate,Promise.resolve(t)):{credential:null,user:null}})}addFrameworkForLogging(t){Rw(this._delegate,t)}onAuthStateChanged(t,n,r){const{next:i,error:o,complete:a}=Mf(t,n,r);return this._delegate.onAuthStateChanged(i,o,a)}onIdTokenChanged(t,n,r){const{next:i,error:o,complete:a}=Mf(t,n,r);return this._delegate.onIdTokenChanged(i,o,a)}sendSignInLinkToEmail(t,n){return hC(this._delegate,t,n)}sendPasswordResetEmail(t,n){return sC(this._delegate,t,n||void 0)}setPersistence(t){return k(this,null,function*(){Hw(this._delegate,t);let n;switch(t){case Ut.SESSION:n=Qn;break;case Ut.LOCAL:n=(yield Vt(Fr)._isAvailable())?Fr:Uo;break;case Ut.NONE:n=Dr;break;default:return vt("argument-error",{appName:this._delegate.name})}return this._delegate.setPersistence(n)})}signInAndRetrieveDataWithCredential(t){return this.signInWithCredential(t)}signInAnonymously(){return Nt(this._delegate,rC(this._delegate))}signInWithCredential(t){return Nt(this._delegate,zo(this._delegate,t))}signInWithCustomToken(t){return Nt(this._delegate,aC(this._delegate,t))}signInWithEmailAndPassword(t,n){return Nt(this._delegate,fC(this._delegate,t,n))}signInWithEmailLink(t,n){return Nt(this._delegate,gC(this._delegate,t,n))}signInWithPhoneNumber(t,n){return Sl(this._delegate,ux(this._delegate,t,n))}signInWithPopup(t){return k(this,null,function*(){return Fi(wl(),this._delegate,"operation-not-supported-in-this-environment"),Nt(this._delegate,bx(this._delegate,t,Jn))})}signInWithRedirect(t){return k(this,null,function*(){return Fi(wl(),this._delegate,"operation-not-supported-in-this-environment"),yield Il(this._delegate),Sx(this._delegate,t,Jn)})}updateCurrentUser(t){return this._delegate.updateCurrentUser(t)}verifyPasswordResetCode(t){return uC(this._delegate,t)}unwrap(){return this._delegate}_delete(){return this._delegate._delete()}linkUnderlyingAuth(){this._delegate.wrapped=()=>this}}Al.Persistence=Ut;function Mf(e,t,n){let r=e;typeof e!="function"&&({next:r,error:t,complete:n}=e);const i=r;return{next:a=>i(a&&Rn.getOrCreate(a)),error:t,complete:n}}function Jw(e,t){const n=Ww(e,t);if(typeof self!="undefined"&&!n.includes(Fr)&&n.push(Fr),typeof window!="undefined")for(const r of[Uo,Qn])n.includes(r)||n.push(r);return n.includes(Dr)||n.push(Dr),n}/**
|
|
2281
2281
|
* @license
|
|
2282
2282
|
* Copyright 2020 Google LLC
|
|
2283
2283
|
*
|
|
@@ -2307,7 +2307,7 @@
|
|
|
2307
2307
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2308
2308
|
* See the License for the specific language governing permissions and
|
|
2309
2309
|
* limitations under the License.
|
|
2310
|
-
*/const Xw=
|
|
2310
|
+
*/const Xw=oe;class Zw{constructor(t,n,r=Yn.app()){var i;Xw((i=r.options)===null||i===void 0?void 0:i.apiKey,"invalid-api-key",{appName:r.name}),this._delegate=new lx(r.auth(),t,n),this.type=this._delegate.type}clear(){this._delegate.clear()}render(){return this._delegate.render()}verify(){return this._delegate.verify()}}/**
|
|
2311
2311
|
* @license
|
|
2312
2312
|
* Copyright 2020 Google LLC
|
|
2313
2313
|
*
|
|
@@ -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 eI="auth-compat";function tI(e){e.INTERNAL.registerComponent(new Un(eI,t=>{const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("auth");return new Al(n,r)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:_r.EMAIL_SIGNIN,PASSWORD_RESET:_r.PASSWORD_RESET,RECOVER_EMAIL:_r.RECOVER_EMAIL,REVERT_SECOND_FACTOR_ADDITION:_r.REVERT_SECOND_FACTOR_ADDITION,VERIFY_AND_CHANGE_EMAIL:_r.VERIFY_AND_CHANGE_EMAIL,VERIFY_EMAIL:_r.VERIFY_EMAIL}},EmailAuthProvider:qn,FacebookAuthProvider:gn,GithubAuthProvider:vn,GoogleAuthProvider:mn,OAuthProvider:Lr,SAMLAuthProvider:$o,PhoneAuthProvider:Tl,PhoneMultiFactorGenerator:xf,RecaptchaVerifier:Zw,TwitterAuthProvider:bn,Auth:Al,AuthCredential:Rr,Error:$t}).setInstantiationMode("LAZY").setMultipleInstances(!1)),e.registerVersion(Mw,Lw)}tI(Yn);let Lf=!1;const zi=e=>{if(Lf)return Yn.auth();if(e&&e==="dev"){Yn.initializeApp({apiKey:"api_key"});const n=fw();tl(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"};Yn.initializeApp(n)}return Lf=!0,Yn.auth()},nI=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":"https://client.fansunitedapi.com/v1";class rI{constructor(t,n){oe(this,"apiKey","");oe(this,"clientId","");oe(this,"environment","");oe(this,"mainQueryParams",{key:"",client_id:""});oe(this,"headers",{"Content-Type":"application/json"});oe(this,"clientApiBaseUrl","");oe(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");oe(this,"sportal365Config",null);oe(this,"generateSignedInUrl",t=>k(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:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(t)})}));oe(this,"storeInBucket",(t,n,r)=>k(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)}));oe(this,"fetchImagesFromSportal365",(t,n,r)=>k(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=X(U({},o),{from:n.from})),n.to&&(o=X(U({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));oe(this,"getSchedulersByEntityId",t=>k(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:X(U({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"setSchedulers",(t,n,r)=>k(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},l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(a),{headers:X(U({},this.headers),{Authorization:"Bearer "+l}),body:JSON.stringify(t),method:o})}));oe(this,"deleteScheduledTask",t=>k(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:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(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}`);oe(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)});oe(this,"getToken",()=>k(this,null,function*(){const t=zi(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=nI(this.environment)}}const iI=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":"https://loyalty.fansunitedapi.com/v1",oI=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":"https://prediction.fansunitedapi.com/v1",aI=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":"https://mini-games.fansunitedapi.com/v1",sI=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":"https://reporting.fansunitedapi.com/v1",lI=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":"https://voting.fansunitedapi.com/v1",cI=e=>e==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1/custom/bracket/resolve?":e==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1/custom/bracket/resolve?":e==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1/custom/bracket/resolve?":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1/custom/bracket/resolve?",uI=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":"https://profile.fansunitedapi.com/v1";class dI extends rI{constructor(n,r){super(n,r);oe(this,"loyaltyBaseUrl","");oe(this,"predictionBaseUrl","");oe(this,"miniGamesApiBaseUrl","");oe(this,"reportingApiBaseUrl","");oe(this,"votingApiBaseUrl","");oe(this,"profileApiBaseUrl","");oe(this,"customResolverUrl","");oe(this,"getClientById",()=>k(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:X(U({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"createTemplate",n=>k(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"editTemplate",(n,r)=>k(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"deleteTemplate",n=>k(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(this,"setWinners",n=>k(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"exportDetailedLeaderboard",(n,r)=>k(this,null,function*(){const i=`/leaderboard/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(X(U({},this.mainQueryParams),{limit:r.toString()})),{headers:X(U({},this.headers),{Authorization:"Bearer "+o})})}));oe(this,"exportDetailedGameLeaderboard",(n,r)=>k(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(X(U({},this.mainQueryParams),{limit:r.toString()})),{headers:X(U({},this.headers),{Authorization:"Bearer "+o})})}));oe(this,"createGame",n=>k(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"editGame",(n,r)=>k(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));oe(this,"getClassicQuizFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));oe(this,"getEitherOrFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));oe(this,"getPollFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));oe(this,"createClassicQuiz",n=>k(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updateClassicQuiz",(n,r)=>k(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"getClassicQuizById",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"deleteClassicQuiz",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(this,"calculateQuestionsReport",n=>k(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:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));oe(this,"exportUsers",n=>k(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"getClassicQuizParticipations",(n,r,i,o)=>k(this,null,function*(){const a="/classic-quizzes/participations?",l=X(U({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(l),{headers:X(U({},this.headers),{Authorization:"Bearer "+s})})}));oe(this,"getEntityParticipations",(n,r,i)=>k(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=X(U({},this.mainQueryParams),{from_date:r,to_date:i}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:X(U({},this.headers),{Authorization:"Bearer "+l})})}));oe(this,"createPoll",n=>k(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updatePoll",(n,r)=>k(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"deletePoll",n=>k(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(this,"getEitherOrById",n=>k(this,null,function*(){const r=`/either-or/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"createEitherOr",n=>k(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updateEitherOr",(n,r)=>k(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"deleteEitherOr",n=>k(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(this,"getLists",(n,r,i="DESC")=>k(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 l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:X(U({},this.headers),{Authorization:"Bearer "+l})})}));oe(this,"getListById",n=>k(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:X(U({},this.headers),{Authorization:"Bearer "+o})})}));oe(this,"getListContent",(n,r,i="DESC",o)=>k(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,l={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(l.page=o.toString());const s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(l),{headers:X(U({},this.headers),{Authorization:"Bearer "+s})})}));oe(this,"createList",n=>k(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:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updateList",(n,r)=>k(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:X(U({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"deleteList",n=>k(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:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));oe(this,"getLanguageConfig",()=>k(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:X(U({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"updateLanguageConfig",n=>k(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:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));oe(this,"createBracketGame",n=>k(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updateBracketGame",(n,r)=>k(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"resolvePredictions",n=>k(this,null,function*(){const i=yield this.getToken();return yield fetch(this.customResolverUrl+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),signal:AbortSignal.timeout(6e5)})}));oe(this,"exportLeadsPerEntity",n=>k(this,null,function*(){const r="/leads/export?",i=X(U({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:X(U({},this.headers),{Authorization:"Bearer "+o})})}));oe(this,"getLeadStatistics",n=>k(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(U(U({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:X(U({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"exportLeads",n=>k(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(U(U({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:X(U({},this.headers),{Authorization:"Bearer "+i})})}));this.loyaltyBaseUrl=iI(n.environment),this.predictionBaseUrl=oI(n.environment),this.miniGamesApiBaseUrl=aI(n.environment),this.reportingApiBaseUrl=sI(n.environment),this.votingApiBaseUrl=lI(n.environment),this.profileApiBaseUrl=uI(n.environment),this.customResolverUrl=cI(n.environment)}}const fI=(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"}`},Xo=x.createContext(null),hI=({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=fI(e.sportal365Project,e.sportal365Infrastructure),i=Me.FansUnitedSDK(n),o=new dI(n,r);return u.jsx(Xo.Provider,{value:{sdk:i,https:o},children:t})},Bf=x.createContext(null),pI=({children:e,environment:t})=>{const[n,r]=x.useState(null),[i,o]=x.useState(!0);return x.useEffect(()=>zi(t).onAuthStateChanged(l=>{Oe.unstable_batchedUpdates(()=>{o(!1),r(l)})}),[t]),u.jsx(Bf.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 $f={exports:{}},gI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mI=gI,vI=mI;function Nf(){}function Ff(){}Ff.resetWarningCache=Nf;var bI=function(){function e(r,i,o,a,l,s){if(s!==vI){var c=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 c.name="Invariant Violation",c}}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:Ff,resetWarningCache:Nf};return n.PropTypes=n,n};$f.exports=bI();var yI=$f.exports;function CI(e){return typeof e=="string"}function xI(e,t,n){return e===void 0||CI(e)?t:D({},t,{ownerState:D({},t.ownerState,n)})}function zf(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 wI(e,t,n){return typeof e=="function"?e(t,n):e}function II(e){const{rootElementName:t="",componentName:n}=e,[r,i]=j.useState(t.toUpperCase()),o=j.useCallback(a=>{var l;i((l=a==null?void 0:a.tagName)!=null?l:"")},[]);return[r,o]}function SI(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function sn(...e){return j.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{SI(n,t)})},e)}function jf(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=jf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ln(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=jf(e))&&(r&&(r+=" "),r+=t);return r}function Vf(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 AI(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const p=Ln(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)),l=Vf(r),s=Vf(i),c=t(a),d=Ln(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=D({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=D({},c,n,s,l);return d.length>0&&(h.className=d),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}function Xn(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 Uf(e){if(j.isValidElement(e)||!Xn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Uf(e[n])}),t}function Bn(e,t,n={clone:!0}){const r=n.clone?D({},e):e;return Xn(e)&&Xn(t)&&Object.keys(t).forEach(i=>{j.isValidElement(t[i])?r[i]=t[i]:Xn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Xn(e[i])?r[i]=Bn(e[i],t[i],n):n.clone?r[i]=Xn(t[i])?Uf(t[i]):t[i]:r[i]=t[i]}),r}function Zo(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 Hf={exports:{}},$e={};/**
|
|
2325
|
+
*/const eI="auth-compat";function tI(e){e.INTERNAL.registerComponent(new Un(eI,t=>{const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("auth");return new Al(n,r)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:_r.EMAIL_SIGNIN,PASSWORD_RESET:_r.PASSWORD_RESET,RECOVER_EMAIL:_r.RECOVER_EMAIL,REVERT_SECOND_FACTOR_ADDITION:_r.REVERT_SECOND_FACTOR_ADDITION,VERIFY_AND_CHANGE_EMAIL:_r.VERIFY_AND_CHANGE_EMAIL,VERIFY_EMAIL:_r.VERIFY_EMAIL}},EmailAuthProvider:qn,FacebookAuthProvider:gn,GithubAuthProvider:vn,GoogleAuthProvider:mn,OAuthProvider:Lr,SAMLAuthProvider:$o,PhoneAuthProvider:Tl,PhoneMultiFactorGenerator:xf,RecaptchaVerifier:Zw,TwitterAuthProvider:bn,Auth:Al,AuthCredential:Rr,Error:$t}).setInstantiationMode("LAZY").setMultipleInstances(!1)),e.registerVersion(Mw,Lw)}tI(Yn);let Lf=!1;const zi=e=>{if(Lf)return Yn.auth();if(e&&e==="dev"){Yn.initializeApp({apiKey:"api_key"});const n=fw();tl(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"};Yn.initializeApp(n)}return Lf=!0,Yn.auth()},nI=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":"https://client.fansunitedapi.com/v1";class rI{constructor(t,n){ie(this,"apiKey","");ie(this,"clientId","");ie(this,"environment","");ie(this,"mainQueryParams",{key:"",client_id:""});ie(this,"headers",{"Content-Type":"application/json"});ie(this,"clientApiBaseUrl","");ie(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");ie(this,"sportal365Config",null);ie(this,"generateSignedInUrl",t=>k(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:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(t)})}));ie(this,"storeInBucket",(t,n,r)=>k(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)}));ie(this,"fetchImagesFromSportal365",(t,n,r)=>k(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=X(j({},o),{from:n.from})),n.to&&(o=X(j({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));ie(this,"getSchedulersByEntityId",t=>k(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:X(j({},this.headers),{Authorization:"Bearer "+i})})}));ie(this,"setSchedulers",(t,n,r)=>k(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},l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(a),{headers:X(j({},this.headers),{Authorization:"Bearer "+l}),body:JSON.stringify(t),method:o})}));ie(this,"deleteScheduledTask",t=>k(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:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ie(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}`);ie(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)});ie(this,"getToken",()=>k(this,null,function*(){const t=zi(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=nI(this.environment)}}const iI=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":"https://loyalty.fansunitedapi.com/v1",oI=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":"https://prediction.fansunitedapi.com/v1",aI=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":"https://mini-games.fansunitedapi.com/v1",sI=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":"https://reporting.fansunitedapi.com/v1",lI=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":"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":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1",uI=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":"https://profile.fansunitedapi.com/v1";class dI extends rI{constructor(n,r){super(n,r);ie(this,"loyaltyBaseUrl","");ie(this,"predictionBaseUrl","");ie(this,"miniGamesApiBaseUrl","");ie(this,"reportingApiBaseUrl","");ie(this,"votingApiBaseUrl","");ie(this,"profileApiBaseUrl","");ie(this,"customResolverUrl","");ie(this,"getClientById",()=>k(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:X(j({},this.headers),{Authorization:"Bearer "+i})})}));ie(this,"createTemplate",n=>k(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ie(this,"editTemplate",(n,r)=>k(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ie(this,"deleteTemplate",n=>k(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ie(this,"setWinners",n=>k(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ie(this,"exportDetailedLeaderboard",(n,r)=>k(this,null,function*(){const i=`/leaderboard/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(X(j({},this.mainQueryParams),{limit:r.toString()})),{headers:X(j({},this.headers),{Authorization:"Bearer "+o})})}));ie(this,"exportDetailedGameLeaderboard",(n,r)=>k(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(X(j({},this.mainQueryParams),{limit:r.toString()})),{headers:X(j({},this.headers),{Authorization:"Bearer "+o})})}));ie(this,"createGame",n=>k(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ie(this,"editGame",(n,r)=>k(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));ie(this,"getClassicQuizFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));ie(this,"getEitherOrFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));ie(this,"getPollFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));ie(this,"createClassicQuiz",n=>k(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ie(this,"updateClassicQuiz",(n,r)=>k(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ie(this,"getClassicQuizById",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i})})}));ie(this,"deleteClassicQuiz",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ie(this,"calculateQuestionsReport",n=>k(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:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));ie(this,"exportUsers",n=>k(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ie(this,"getClassicQuizParticipations",(n,r,i,o)=>k(this,null,function*(){const a="/classic-quizzes/participations?",l=X(j({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(l),{headers:X(j({},this.headers),{Authorization:"Bearer "+s})})}));ie(this,"getEntityParticipations",(n,r,i)=>k(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=X(j({},this.mainQueryParams),{from_date:r,to_date:i}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:X(j({},this.headers),{Authorization:"Bearer "+l})})}));ie(this,"createPoll",n=>k(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ie(this,"updatePoll",(n,r)=>k(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ie(this,"deletePoll",n=>k(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ie(this,"getEitherOrById",n=>k(this,null,function*(){const r=`/either-or/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i})})}));ie(this,"createEitherOr",n=>k(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ie(this,"updateEitherOr",(n,r)=>k(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ie(this,"deleteEitherOr",n=>k(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ie(this,"getLists",(n,r,i="DESC")=>k(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 l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:X(j({},this.headers),{Authorization:"Bearer "+l})})}));ie(this,"getListById",n=>k(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:X(j({},this.headers),{Authorization:"Bearer "+o})})}));ie(this,"getListContent",(n,r,i="DESC",o)=>k(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,l={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(l.page=o.toString());const s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(l),{headers:X(j({},this.headers),{Authorization:"Bearer "+s})})}));ie(this,"createList",n=>k(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:X(j({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));ie(this,"updateList",(n,r)=>k(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:X(j({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));ie(this,"deleteList",n=>k(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:X(j({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));ie(this,"getLanguageConfig",()=>k(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:X(j({},this.headers),{Authorization:"Bearer "+i})})}));ie(this,"updateLanguageConfig",n=>k(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:X(j({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));ie(this,"createBracketGame",n=>k(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ie(this,"updateBracketGame",(n,r)=>k(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ie(this,"resolvePredictions",n=>k(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:X(j({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));ie(this,"exportLeadsPerEntity",n=>k(this,null,function*(){const r="/leads/export?",i=X(j({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:X(j({},this.headers),{Authorization:"Bearer "+o})})}));ie(this,"getLeadStatistics",n=>k(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(j(j({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:X(j({},this.headers),{Authorization:"Bearer "+i})})}));ie(this,"exportLeads",n=>k(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(j(j({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:X(j({},this.headers),{Authorization:"Bearer "+i})})}));ie(this,"createStandingGame",n=>k(this,null,function*(){const r="/custom/standing?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ie(this,"updateStandingGame",(n,r)=>k(this,null,function*(){const i=`/custom/standing/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(j({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ie(this,"resolveStandingPredictions",n=>k(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:X(j({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));this.loyaltyBaseUrl=iI(n.environment),this.predictionBaseUrl=oI(n.environment),this.miniGamesApiBaseUrl=aI(n.environment),this.reportingApiBaseUrl=sI(n.environment),this.votingApiBaseUrl=lI(n.environment),this.profileApiBaseUrl=uI(n.environment),this.customResolverUrl=cI(n.environment)}}const fI=(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"}`},Xo=x.createContext(null),hI=({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=fI(e.sportal365Project,e.sportal365Infrastructure),i=Me.FansUnitedSDK(n),o=new dI(n,r);return u.jsx(Xo.Provider,{value:{sdk:i,https:o},children:t})},Bf=x.createContext(null),pI=({children:e,environment:t})=>{const[n,r]=x.useState(null),[i,o]=x.useState(!0);return x.useEffect(()=>zi(t).onAuthStateChanged(l=>{Oe.unstable_batchedUpdates(()=>{o(!1),r(l)})}),[t]),u.jsx(Bf.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 $f={exports:{}},gI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mI=gI,vI=mI;function Nf(){}function Ff(){}Ff.resetWarningCache=Nf;var bI=function(){function e(r,i,o,a,l,s){if(s!==vI){var c=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 c.name="Invariant Violation",c}}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:Ff,resetWarningCache:Nf};return n.PropTypes=n,n};$f.exports=bI();var yI=$f.exports;function CI(e){return typeof e=="string"}function xI(e,t,n){return e===void 0||CI(e)?t:D({},t,{ownerState:D({},t.ownerState,n)})}function zf(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 wI(e,t,n){return typeof e=="function"?e(t,n):e}function II(e){const{rootElementName:t="",componentName:n}=e,[r,i]=V.useState(t.toUpperCase()),o=V.useCallback(a=>{var l;i((l=a==null?void 0:a.tagName)!=null?l:"")},[]);return[r,o]}function SI(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function sn(...e){return V.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{SI(n,t)})},e)}function jf(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=jf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ln(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=jf(e))&&(r&&(r+=" "),r+=t);return r}function Vf(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 AI(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const p=Ln(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)),l=Vf(r),s=Vf(i),c=t(a),d=Ln(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=D({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=D({},c,n,s,l);return d.length>0&&(h.className=d),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}function Xn(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 Uf(e){if(V.isValidElement(e)||!Xn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Uf(e[n])}),t}function Bn(e,t,n={clone:!0}){const r=n.clone?D({},e):e;return Xn(e)&&Xn(t)&&Object.keys(t).forEach(i=>{V.isValidElement(t[i])?r[i]=t[i]:Xn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Xn(e[i])?r[i]=Bn(e[i],t[i],n):n.clone?r[i]=Xn(t[i])?Uf(t[i]):t[i]:r[i]=t[i]}),r}function Zo(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 Hf={exports:{}},$e={};/**
|
|
2326
2326
|
* @license React
|
|
2327
2327
|
* react-is.production.js
|
|
2328
2328
|
*
|
|
@@ -2330,24 +2330,24 @@
|
|
|
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 El=Symbol.for("react.transitional.element"),_l=Symbol.for("react.portal"),ea=Symbol.for("react.fragment"),ta=Symbol.for("react.strict_mode"),na=Symbol.for("react.profiler"),ra=Symbol.for("react.consumer"),ia=Symbol.for("react.context"),oa=Symbol.for("react.forward_ref"),aa=Symbol.for("react.suspense"),sa=Symbol.for("react.suspense_list"),la=Symbol.for("react.memo"),ca=Symbol.for("react.lazy"),TI=Symbol.for("react.offscreen"),EI=Symbol.for("react.client.reference");function Xt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case El:switch(e=e.type,e){case ea:case na:case ta:case aa:case sa:return e;default:switch(e=e&&e.$$typeof,e){case ia:case oa:case ca:case la:return e;case ra:return e;default:return t}}case _l:return t}}}$e.ContextConsumer=ra,$e.ContextProvider=ia,$e.Element=El,$e.ForwardRef=oa,$e.Fragment=ea,$e.Lazy=ca,$e.Memo=la,$e.Portal=_l,$e.Profiler=na,$e.StrictMode=ta,$e.Suspense=aa,$e.SuspenseList=sa,$e.isContextConsumer=function(e){return Xt(e)===ra},$e.isContextProvider=function(e){return Xt(e)===ia},$e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===El},$e.isForwardRef=function(e){return Xt(e)===oa},$e.isFragment=function(e){return Xt(e)===ea},$e.isLazy=function(e){return Xt(e)===ca},$e.isMemo=function(e){return Xt(e)===la},$e.isPortal=function(e){return Xt(e)===_l},$e.isProfiler=function(e){return Xt(e)===na},$e.isStrictMode=function(e){return Xt(e)===ta},$e.isSuspense=function(e){return Xt(e)===aa},$e.isSuspenseList=function(e){return Xt(e)===sa},$e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ea||e===na||e===ta||e===aa||e===sa||e===TI||typeof e=="object"&&e!==null&&(e.$$typeof===ca||e.$$typeof===la||e.$$typeof===ia||e.$$typeof===ra||e.$$typeof===oa||e.$$typeof===EI||e.getModuleId!==void 0)},$e.typeOf=Xt,Hf.exports=$e;var Wf=Hf.exports;function ye(e){if(typeof e!="string")throw new Error(Zo(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Gf(e,t){var n,r;return j.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 _I=typeof window!="undefined"?j.useLayoutEffect:j.useEffect;let Yf=0;function kI(e){const[t,n]=j.useState(e),r=e||t;return j.useEffect(()=>{t==null&&(Yf+=1,n(`mui-${Yf}`))},[t]),r}const Kf=j.useId;function ji(e){if(Kf!==void 0){const t=Kf();return e!=null?e:t}return kI(e)}function kl({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=j.useRef(e!==void 0),[o,a]=j.useState(t),l=i?e:o,s=j.useCallback(c=>{i||a(c)},[]);return[l,s]}class Pl{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Pl}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let ua=!0,Dl=!1;const PI=new Pl,DI={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 OI(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&DI[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function RI(e){e.metaKey||e.altKey||e.ctrlKey||(ua=!0)}function Ol(){ua=!1}function MI(){this.visibilityState==="hidden"&&Dl&&(ua=!0)}function LI(e){e.addEventListener("keydown",RI,!0),e.addEventListener("mousedown",Ol,!0),e.addEventListener("pointerdown",Ol,!0),e.addEventListener("touchstart",Ol,!0),e.addEventListener("visibilitychange",MI,!0)}function BI(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return ua||OI(t)}function qf(){const e=j.useCallback(i=>{i!=null&&LI(i.ownerDocument)},[]),t=j.useRef(!1);function n(){return t.current?(Dl=!0,PI.start(100,()=>{Dl=!1}),t.current=!1,!0):!1}function r(i){return BI(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Qf(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]=Qf(i[a],o[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function lt(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,a)=>{if(a){const l=t(a);l!==""&&o.push(l),n&&n[a]&&o.push(n[a])}return o},[]).join(" ")}),r}const Jf=e=>e,$I=(()=>{let e=Jf;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Jf}}})(),NI={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 Xf(e,t,n="Mui"){const r=NI[t];return r?`${n}-${r}`:`${$I.generate(e)}-${t}`}function FI(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Xf(e,i,n)}),r}function Rl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,href:r,rootRef:i,tabIndex:o,to:a,type:l,rootElementName:s}=e,c=j.useRef(null),[d,f]=j.useState(!1),{isFocusVisibleRef:h,onFocus:p,onBlur:m,ref:g}=qf(),[v,S]=j.useState(!1);t&&!n&&v&&S(!1),j.useEffect(()=>{h.current=v},[v,h]);const[w,y]=II({rootElementName:s!=null?s:r||a?"a":void 0,componentName:"Button"}),C=N=>$=>{var B;v&&$.preventDefault(),(B=N.onMouseLeave)==null||B.call(N,$)},b=N=>$=>{var B;m($),h.current===!1&&S(!1),(B=N.onBlur)==null||B.call(N,$)},T=N=>$=>{var B;if(c.current||(c.current=$.currentTarget),p($),h.current===!0){var H;S(!0),(H=N.onFocusVisible)==null||H.call(N,$)}(B=N.onFocus)==null||B.call(N,$)},E=()=>{const N=c.current;return w==="BUTTON"||w==="INPUT"&&["button","submit","reset"].includes(N==null?void 0:N.type)||w==="A"&&(N==null?void 0:N.href)},P=N=>$=>{if(!t){var B;(B=N.onClick)==null||B.call(N,$)}},O=N=>$=>{var B;t||(f(!0),document.addEventListener("mouseup",()=>{f(!1)},{once:!0})),(B=N.onMouseDown)==null||B.call(N,$)},G=N=>$=>{var B;if((B=N.onKeyDown)==null||B.call(N,$),!$.defaultMuiPrevented&&($.target===$.currentTarget&&!E()&&$.key===" "&&$.preventDefault(),$.target===$.currentTarget&&$.key===" "&&!t&&f(!0),$.target===$.currentTarget&&!E()&&$.key==="Enter"&&!t)){var H;(H=N.onClick)==null||H.call(N,$),$.preventDefault()}},z=N=>$=>{var B;if($.target===$.currentTarget&&f(!1),(B=N.onKeyUp)==null||B.call(N,$),$.target===$.currentTarget&&!E()&&!t&&$.key===" "&&!$.defaultMuiPrevented){var H;(H=N.onClick)==null||H.call(N,$)}},A=sn(y,i,g,c),W={};return o!==void 0&&(W.tabIndex=o),w==="BUTTON"?(W.type=l!=null?l:"button",n?W["aria-disabled"]=t:W.disabled=t):w==="INPUT"?l&&["button","submit","reset"].includes(l)&&(n?W["aria-disabled"]=t:W.disabled=t):w!==""&&(!r&&!a&&(W.role="button",W.tabIndex=o!=null?o:0),t&&(W["aria-disabled"]=t,W.tabIndex=n?o!=null?o:0:-1)),{getRootProps:(N={})=>{const $=D({},Mn(e),Mn(N)),B=D({type:l},$,W,N,{onBlur:b($),onClick:P($),onFocus:T($),onKeyDown:G($),onKeyUp:z($),onMouseDown:O($),onMouseLeave:C($),ref:A});return delete B.onFocusVisible,B},focusVisible:v,setFocusVisible:S,active:d,rootRef:A}}function zI(e,t){return e===t}const Ml={},Zf=()=>{};function Ll(e,t){const n=D({},e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n}function jI(e){const{nextState:t,initialState:n,stateComparers:r,onStateChange:i,controlledProps:o,lastActionRef:a}=e,l=j.useRef(n);j.useEffect(()=>{if(a.current===null)return;const s=Ll(l.current,o);Object.keys(t).forEach(c=>{var d;const f=(d=r[c])!=null?d:zI,h=t[c],p=s[c];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,c,h,(g=a.current.type)!=null?g:"",t)}}),l.current=t,a.current=null},[l,t,a,i,r,o])}function VI(e){const t=j.useRef(null),{reducer:n,initialState:r,controlledProps:i=Ml,stateComparers:o=Ml,onStateChange:a=Zf,actionContext:l,componentName:s=""}=e;j.useRef(i);const c=j.useCallback((p,m)=>{t.current=m;const g=Ll(p,i);return n(g,m)},[i,n]),[d,f]=j.useReducer(c,r),h=j.useCallback(p=>{f(D({},p,{context:l}))},[l]);return jI({nextState:d,initialState:r,stateComparers:o!=null?o:Ml,onStateChange:a!=null?a:Zf,controlledProps:i,lastActionRef:t}),[Ll(d,i),h]}const UI=j.createContext(void 0);function HI(){return j.useContext(UI)}function WI(e={}){const{defaultValue:t,disabled:n=!1,error:r=!1,onBlur:i,onChange:o,onFocus:a,required:l=!1,value:s,inputRef:c}=e,d=HI();let f,h,p,m,g;if(d){var v,S,w;f=void 0,h=(v=d.disabled)!=null?v:!1,p=(S=d.error)!=null?S:!1,m=(w=d.required)!=null?w:!1,g=d.value}else f=t,h=n,p=r,m=l,g=s;const{current:y}=j.useRef(g!=null),C=j.useCallback(N=>{},[]),b=j.useRef(null),T=sn(b,c,C),[E,P]=j.useState(!1);j.useEffect(()=>{!d&&h&&E&&(P(!1),i==null||i())},[d,h,E,i]);const O=N=>$=>{var B;if(d!=null&&d.disabled){$.stopPropagation();return}if((B=N.onFocus)==null||B.call(N,$),d&&d.onFocus){var H;d==null||(H=d.onFocus)==null||H.call(d)}else P(!0)},G=N=>$=>{var B;(B=N.onBlur)==null||B.call(N,$),d&&d.onBlur?d.onBlur():P(!1)},z=N=>($,...B)=>{var H,q;if(!y&&($.target||b.current)==null)throw new Error(Zo(17));d==null||(H=d.onChange)==null||H.call(d,$),(q=N.onChange)==null||q.call(N,$,...B)},A=N=>$=>{var B;b.current&&$.currentTarget===$.target&&b.current.focus(),(B=N.onClick)==null||B.call(N,$)};return{disabled:h,error:p,focused:E,formControlContext:d,getInputProps:(N={})=>{const B=D({},{onBlur:i,onChange:o,onFocus:a},Mn(N)),H=D({},B,{onBlur:G(B),onChange:z(B),onFocus:O(B)});return D({},H,{"aria-invalid":p||void 0,defaultValue:f,value:g,required:m,disabled:h},N,{ref:T},H)},getRootProps:(N={})=>{const $=Mn(e,["onBlur","onChange","onFocus"]),B=D({},$,Mn(N));return D({},N,B,{onClick:A(B)})},inputRef:T,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 GI(e,t,n,r,i,o){if(n.length===0||!r&&n.every((l,s)=>i(l,s)))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:l,itemComparer:s,focusManagement:c}=n,d=c==="DOM"?0:-1,f=i.length-1,h=e==null?-1:i.findIndex(S=>s(S,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 S=h+t;S<0?!g&&h!==-1||Math.abs(t)>1?(p=0,m="next"):(p=f,m="previous"):S>f?!g||Math.abs(t)>1?(p=f,m="previous"):(p=0,m="next"):(p=S,m=t>=0?"next":"previous")}}const v=GI(p,m,i,l,o,g);return v===-1&&e!==null&&!o(e,h)?e:(r=i[v])!=null?r:null}function YI(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 eh(e,t,n){const{itemComparer:r,isItemDisabled:i,selectionMode:o,items:a}=n,{selectedValues:l}=t,s=a.findIndex(d=>r(e,d));if(i(e,s))return t;const c=YI(e,l,o,r);return D({},t,{selectedValues:c,highlightedValue:e})}function KI(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:eh(t.highlightedValue,t,n)}return t}function qI(e,t){return t.focusManagement==="DOM"?e:D({},e,{highlightedValue:null})}function QI(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 JI(e,t,n){const{items:r,isItemDisabled:i,disabledItemsFocusable:o,getItemAsString:a}=n,l=t.length>1;let s=l?e.highlightedValue:Dt(e.highlightedValue,1,n);for(let c=0;c<r.length;c+=1){if(!s||!l&&e.highlightedValue===s)return e;if(QI(s,t,a)&&(!i(s,r.indexOf(s))||o))return D({},e,{highlightedValue:s});s=Dt(s,1,n)}return e}function XI(e,t,n,r){var i;const{itemComparer:o,focusManagement:a}=r;let l=null;if(n.highlightedValue!=null){var s;l=(s=e.find(f=>o(f,n.highlightedValue)))!=null?s:null}else a==="DOM"&&t.length===0&&(l=Dt(null,"reset",r));const d=((i=n.selectedValues)!=null?i:[]).filter(f=>e.some(h=>o(h,f)));return D({},n,{highlightedValue:l,selectedValues:d})}function ZI(e,t){return D({},e,{highlightedValue:Dt(null,"reset",t)})}function eS(e,t){return D({},e,{highlightedValue:Dt(null,"end",t)})}function tS(e,t){return D({},e,{selectedValues:[],highlightedValue:Dt(null,"reset",t)})}function th(e,t){const{type:n,context:r}=t;switch(n){case yt.keyDown:return KI(t.key,e,r);case yt.itemClick:return eh(t.item,e,r);case yt.blur:return qI(e,r);case yt.textNavigation:return JI(e,t.searchString,r);case yt.itemsChange:return XI(t.items,t.previousItems,e,r);case yt.resetHighlight:return ZI(e,r);case yt.highlightLast:return eS(e,r);case yt.clearSelection:return tS(e,r);default:return e}}const nS=500;function rS(e){const t=j.useRef({searchString:"",lastTime:null});return j.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>nS?r.searchString=i:(r.searchString.length!==1||i!==r.searchString)&&(r.searchString+=i),r.lastTime=o,e(r.searchString,n)}},[e])}const nh={},iS=()=>{},oS=(e,t)=>e===t,aS=()=>!1,sS=e=>typeof e=="string"?e:String(e),lS=()=>({highlightedValue:null,selectedValues:[]});function cS(e){const{controlledProps:t=nh,disabledItemsFocusable:n=!1,disableListWrap:r=!1,focusManagement:i="activeDescendant",getInitialState:o=lS,getItemDomElement:a,getItemId:l,isItemDisabled:s=aS,rootRef:c,onStateChange:d=iS,items:f,itemComparer:h=oS,getItemAsString:p=sS,onChange:m,onHighlightChange:g,onItemsChange:v,orientation:S="vertical",pageSize:w=5,reducerActionContext:y=nh,selectionMode:C="single",stateReducer:b,componentName:T="useList"}=e,E=j.useRef(null),P=sn(c,E),O=j.useCallback((ae,J,le)=>{if(g==null||g(ae,J,le),i==="DOM"&&J!=null&&(le===yt.itemClick||le===yt.keyDown||le===yt.textNavigation)){var ne;a==null||(ne=a(J))==null||ne.focus()}},[a,g,i]),G=j.useMemo(()=>({highlightedValue:h,selectedValues:(ae,J)=>zf(ae,J,h)}),[h]),z=j.useCallback((ae,J,le,ne,ge)=>{switch(d==null||d(ae,J,le,ne,ge),J){case"highlightedValue":O(ae,le,ne);break;case"selectedValues":m==null||m(ae,le,ne);break}},[O,m,d]),A=j.useMemo(()=>({disabledItemsFocusable:n,disableListWrap:r,focusManagement:i,isItemDisabled:s,itemComparer:h,items:f,getItemAsString:p,onHighlightChange:O,orientation:S,pageSize:w,selectionMode:C,stateComparers:G}),[n,r,i,s,h,f,p,O,S,w,C,G]),W=o(),Y=b!=null?b:th,N=j.useMemo(()=>D({},y,A),[y,A]),[$,B]=VI({reducer:Y,actionContext:N,initialState:W,controlledProps:t,stateComparers:G,onStateChange:z,componentName:T}),{highlightedValue:H,selectedValues:q}=$,ee=rS((ae,J)=>B({type:yt.textNavigation,event:J,searchString:ae})),R=j.useRef([]);j.useEffect(()=>{zf(R.current,f,h)||(B({type:yt.itemsChange,event:null,items:f,previousItems:R.current}),R.current=f,v==null||v(f))},[f,h,B,v]);const L=ae=>J=>{var le;if((le=ae.onKeyDown)==null||le.call(ae,J),J.defaultMuiPrevented)return;const ne=["Home","End","PageUp","PageDown"];S==="vertical"?ne.push("ArrowUp","ArrowDown"):ne.push("ArrowLeft","ArrowRight"),i==="activeDescendant"&&ne.push(" ","Enter"),ne.includes(J.key)&&J.preventDefault(),B({type:yt.keyDown,key:J.key,event:J}),ee(J)},F=ae=>J=>{var le,ne;(le=ae.onBlur)==null||le.call(ae,J),!J.defaultMuiPrevented&&((ne=E.current)!=null&&ne.contains(J.relatedTarget)||B({type:yt.blur,event:J}))},V=(ae={})=>{const J=Mn(ae);return D({},ae,{"aria-activedescendant":i==="activeDescendant"&&H!=null?l(H):void 0,tabIndex:i==="DOM"?-1:0,ref:P},J,{onBlur:F(J),onKeyDown:L(J)})},te=j.useCallback(ae=>{const J=(q!=null?q:[]).some(ge=>ge!=null&&h(ae,ge)),le=H!=null&&h(ae,H);return{focusable:i==="DOM",highlighted:le,selected:J}},[h,q,H,i]),se=j.useMemo(()=>({dispatch:B,getItemState:te}),[B,te]);return j.useDebugValue({state:$}),{contextValue:se,dispatch:B,getRootProps:V,rootRef:P,state:$}}const rh=j.createContext(null);function uS(e){const{handlePointerOverEvents:t=!1,item:n}=e,r=j.useContext(rh);if(!r)throw new Error("useListItem must be used within a ListProvider");const{dispatch:i,getItemState:o}=r,{highlighted:a,selected:l,focusable:s}=o(n),c=j.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=j.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 s&&(f=a?0:-1),{getRootProps:(p={})=>{const m=Mn(p);return D({},p,{onClick:c(m),onPointerOver:t?d(m):void 0,tabIndex:f})},highlighted:a,selected:l}}const Bl=j.createContext(null);function dS(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 ih(){const[e,t]=j.useState(new Map),n=j.useRef(new Set),r=j.useCallback(function(c){n.current.delete(c),t(d=>{const f=new Map(d);return f.delete(c),f})},[]),i=j.useCallback(function(c,d){let f;return typeof c=="function"?f=c(n.current):f=c,n.current.add(f),t(h=>{const p=new Map(h);return p.set(f,d),p}),{id:f,deregister:()=>r(f)}},[r]),o=j.useMemo(()=>dS(e),[e]),a=j.useCallback(function(c){return Array.from(o.keys()).indexOf(c)},[o]);return{contextValue:j.useMemo(()=>({getItemIndex:a,registerItem:i,totalSubitemCount:e.size}),[a,i,e.size]),subitems:o}}function oh(e,t){const n=j.useContext(Bl);if(n===null)throw new Error("useCompoundItem must be used within a useCompoundParent");const{registerItem:r}=n,[i,o]=j.useState(typeof e=="function"?void 0:e);return _I(()=>{const{id:a,deregister:l}=r(e,t);return o(a),l},[r,t,e]),{id:i,index:i!==void 0?n.getItemIndex(i):-1,totalItemCount:n.totalSubitemCount}}function fS(e,t){return function(r={}){const i=D({},r,e(r));return D({},i,t(i))}}const hS=Math.min,pS=Math.max,da=Math.round,fa=Math.floor,ha=e=>({x:e,y:e});function gS(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 ah(e){return lh(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sh(e){var t;return(t=(lh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function lh(e){return e instanceof Node||e instanceof $n(e).Node}function mS(e){return e instanceof Element||e instanceof $n(e).Element}function $l(e){return e instanceof HTMLElement||e instanceof $n(e).HTMLElement}function ch(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function uh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Nl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function vS(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bS(e){return["html","body","#document"].includes(ah(e))}function Nl(e){return $n(e).getComputedStyle(e)}function yS(e){if(ah(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ch(e)&&e.host||sh(e);return ch(t)?t.host:t}function dh(e){const t=yS(e);return bS(t)?e.ownerDocument?e.ownerDocument.body:e.body:$l(t)&&uh(t)?t:dh(t)}function pa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=dh(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=$n(i);if(o){const l=Fl(a);return t.concat(a,a.visualViewport||[],uh(i)?i:[],l&&n?pa(l):[])}return t.concat(i,pa(i,[],n))}function Fl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function CS(e){const t=Nl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=$l(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=da(n)!==o||da(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function zl(e){return mS(e)?e:e.contextElement}function fh(e){const t=zl(e);if(!$l(t))return ha(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=CS(t);let a=(o?da(n.width):n.width)/r,l=(o?da(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const xS=ha(0);function wS(e){const t=$n(e);return!vS()||!t.visualViewport?xS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function IS(e,t,n){return!1}function hh(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=zl(e);let a=ha(1);t&&(a=fh(e));const l=IS()?wS(o):ha(0);let s=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(o){const h=$n(o),p=r;let m=h,g=Fl(m);for(;g&&r&&p!==m;){const v=fh(g),S=g.getBoundingClientRect(),w=Nl(g),y=S.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,C=S.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;s*=v.x,c*=v.y,d*=v.x,f*=v.y,s+=y,c+=C,m=$n(g),g=Fl(m)}}return gS({width:d,height:f,x:s,y:c})}function SS(e,t){let n=null,r;const i=sh(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),o();const{left:c,top:d,width:f,height:h}=e.getBoundingClientRect();if(l||t(),!f||!h)return;const p=fa(d),m=fa(i.clientWidth-(c+f)),g=fa(i.clientHeight-(d+h)),v=fa(c),w={rootMargin:-p+"px "+-m+"px "+-g+"px "+-v+"px",threshold:pS(0,hS(1,s))||1};let y=!0;function C(b){const T=b[0].intersectionRatio;if(T!==s){if(!y)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(C,X(U({},w),{root:i.ownerDocument}))}catch(b){n=new IntersectionObserver(C,w)}n.observe(e)}return a(!0),o}function AS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,c=zl(e),d=i||o?[...c?pa(c):[],...pa(t)]:[];d.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),o&&S.addEventListener("resize",n)});const f=c&&l?SS(c,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(S=>{let[w]=S;w&&w.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),n()}),c&&!s&&p.observe(c),p.observe(t));let m,g=s?hh(e):null;s&&v();function v(){const S=hh(e);g&&(S.x!==g.x||S.y!==g.y||S.width!==g.width||S.height!==g.height)&&n(),g=S,m=requestAnimationFrame(v)}return n(),()=>{var S;d.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),f==null||f(),(S=p)==null||S.disconnect(),p=null,s&&cancelAnimationFrame(m)}}function TS(e){const{checked:t,defaultChecked:n,disabled:r,onBlur:i,onChange:o,onFocus:a,onFocusVisible:l,readOnly:s,required:c}=e,[d,f]=kl({controlled:t,default:!!n,name:"Switch",state:"checked"}),h=P=>O=>{var G;O.nativeEvent.defaultPrevented||(f(O.target.checked),o==null||o(O),(G=P.onChange)==null||G.call(P,O))},{isFocusVisibleRef:p,onBlur:m,onFocus:g,ref:v}=qf(),[S,w]=j.useState(!1);r&&S&&w(!1),j.useEffect(()=>{p.current=S},[S,p]);const y=j.useRef(null),C=P=>O=>{var G;y.current||(y.current=O.currentTarget),g(O),p.current===!0&&(w(!0),l==null||l(O)),a==null||a(O),(G=P.onFocus)==null||G.call(P,O)},b=P=>O=>{var G;m(O),p.current===!1&&w(!1),i==null||i(O),(G=P.onBlur)==null||G.call(P,O)},T=sn(v,y);return{checked:d,disabled:!!r,focusVisible:S,getInputProps:(P={})=>D({checked:t,defaultChecked:n,disabled:r,readOnly:s,ref:T,required:c,type:"checkbox",role:"switch","aria-checked":t},P,{onChange:h(P),onFocus:C(P),onBlur:b(P)}),inputRef:T,readOnly:!!s}}function ES(e){const{value:t,defaultValue:n,onChange:r,orientation:i="horizontal",direction:o="ltr",selectionFollowsFocus:a=!1}=e,[l,s]=kl({controlled:t,default:n,name:"Tabs",state:"value"}),c=j.useCallback((v,S)=>{s(S),r==null||r(v,S)},[r,s]),{subitems:d,contextValue:f}=ih(),h=j.useRef(()=>{}),p=j.useCallback(v=>{var S;return(S=d.get(v))==null?void 0:S.id},[d]),m=j.useCallback(v=>h.current(v),[]),g=j.useCallback(v=>{h.current=v},[]);return{contextValue:D({direction:o,getTabId:m,getTabPanelId:p,onSelected:c,orientation:i,registerTabIdLookup:g,selectionFollowsFocus:a,value:l},f)}}const ph=j.createContext(null);function ga(){const e=j.useContext(ph);if(e==null)throw new Error("No TabsContext provided");return e}function _S(e){const{value:t,children:n}=e,{direction:r,getItemIndex:i,onSelected:o,orientation:a,registerItem:l,registerTabIdLookup:s,selectionFollowsFocus:c,totalSubitemCount:d,value:f,getTabId:h,getTabPanelId:p}=t,m=j.useMemo(()=>({getItemIndex:i,registerItem:l,totalSubitemCount:d}),[l,i,d]),g=j.useMemo(()=>({direction:r,getTabId:h,getTabPanelId:p,onSelected:o,orientation:a,registerTabIdLookup:s,selectionFollowsFocus:c,value:f}),[r,h,p,o,a,s,c,f]);return u.jsx(Bl.Provider,{value:m,children:u.jsx(ph.Provider,{value:g,children:n})})}function kS(e){return e.size}function PS(e){const{value:t,id:n,rootRef:r}=e,i=ga();if(i===null)throw new Error("No TabContext provided");const{value:o,getTabId:a}=i,l=ji(n),s=j.useRef(null),c=sn(s,r),d=j.useMemo(()=>({id:l,ref:s}),[l]),{id:f}=oh(t!=null?t:kS,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:l!=null?l:void 0},g,{ref:c}),rootRef:c}}const gh={valueChange:"valueChange"};function DS(e,t){if(t.type===gh.valueChange)return D({},e,{highlightedValue:t.value});const n=th(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 OS(e){var t;const{rootRef:n}=e,{direction:r="ltr",onSelected:i,orientation:o="horizontal",value:a,registerTabIdLookup:l,selectionFollowsFocus:s}=ga(),{subitems:c,contextValue:d}=ih(),f=j.useCallback(z=>{var A;return(A=c.get(z))==null?void 0:A.id},[c]);l(f);const h=j.useMemo(()=>Array.from(c.keys()),[c]),p=j.useCallback(z=>{var A,W;return z==null?null:(A=(W=c.get(z))==null?void 0:W.ref.current)!=null?A:null},[c]),m=r==="rtl";let g;o==="vertical"?g="vertical":g=m?"horizontal-rtl":"horizontal-ltr";const v=j.useCallback((z,A)=>{var W;i(z,(W=A[0])!=null?W:null)},[i]),S=j.useMemo(()=>a===void 0?{}:a!=null?{selectedValues:[a]}:{selectedValues:[]},[a]),w=j.useCallback(z=>{var A,W;return(A=(W=c.get(z))==null?void 0:W.disabled)!=null?A:!1},[c]),{contextValue:y,dispatch:C,getRootProps:b,state:{highlightedValue:T,selectedValues:E},rootRef:P}=cS({controlledProps:S,disabledItemsFocusable:!s,focusManagement:"DOM",getItemDomElement:p,isItemDisabled:w,items:h,rootRef:n,onChange:v,orientation:g,reducerActionContext:j.useMemo(()=>({selectionFollowsFocus:s||!1}),[s]),selectionMode:"single",stateReducer:DS});j.useEffect(()=>{a!==void 0&&a!=null&&C({type:gh.valueChange,value:a})},[C,a]);const O=(z={})=>D({},z,b(z),{"aria-orientation":o==="vertical"?"vertical":void 0,role:"tablist"});return{contextValue:j.useMemo(()=>D({},d,y),[d,y]),dispatch:C,getRootProps:O,highlightedValue:T,isRtl:m,orientation:o,rootRef:P,selectedValue:(t=E[0])!=null?t:null}}function RS(e){const{value:t,children:n}=e,{dispatch:r,getItemIndex:i,getItemState:o,registerItem:a,totalSubitemCount:l}=t,s=j.useMemo(()=>({dispatch:r,getItemState:o,getItemIndex:i}),[r,i,o]),c=j.useMemo(()=>({getItemIndex:i,registerItem:a,totalSubitemCount:l}),[a,i,l]);return u.jsx(Bl.Provider,{value:c,children:u.jsx(rh.Provider,{value:s,children:n})})}function MS(e){return e.size}function LS(e){const{value:t,rootRef:n,disabled:r=!1,id:i}=e,o=j.useRef(null),a=ji(i),{value:l,selectionFollowsFocus:s,getTabPanelId:c}=ga(),d=j.useMemo(()=>({disabled:r,ref:o,id:a}),[r,o,a]),{id:f,index:h,totalItemCount:p}=oh(t!=null?t:MS,d),{getRootProps:m,highlighted:g,selected:v}=uS({item:f}),{getRootProps:S,rootRef:w,active:y,focusVisible:C,setFocusVisible:b}=Rl({disabled:r,focusableWhenDisabled:!s,type:"button"}),T=sn(o,n,w),E=f!==void 0?c(f):void 0;return{getRootProps:(O={})=>{const G=Mn(O),z=fS(m,S);return D({},O,z(G),{role:"tab","aria-controls":E,"aria-selected":v,id:a,ref:T})},active:y,focusVisible:C,highlighted:g,index:h,rootRef:T,selected:v||f===l,setFocusVisible:b,totalTabsCount:p}}const mh="$$joy";function BS(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}function $S(e,t){return Lt(e,t)}const NS=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},FS=["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 vh(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ae(e,FS),o=zS(t),a=Object.keys(o);function l(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function s(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function c(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?c(h,a[a.indexOf(h)+1]):l(h)}function f(h){const p=a.indexOf(h);return p===0?l(a[1]):p===a.length-1?s(a[p]):c(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return D({keys:a,values:o,up:l,down:s,between:c,only:d,not:f,unit:n},i)}const jS={borderRadius:4};function Vi(e,t){return t?Bn(e,t,{clone:!1}):e}const jl={xs:0,sm:600,md:900,lg:1200,xl:1536},bh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${jl[e]}px)`};function Nn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||bh;return t.reduce((a,l,s)=>(a[o.up(o.keys[s])]=n(t[s]),a),{})}if(typeof t=="object"){const o=r.breakpoints||bh;return Object.keys(t).reduce((a,l)=>{if(Object.keys(o.values||jl).indexOf(l)!==-1){const s=o.up(l);a[s]=n(t[l],l)}else{const s=l;a[s]=t[s]}return a},{})}return n(t)}function VS(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function US(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Zn(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 ma(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Zn(e,n)||r,t&&(i=t(i,r,e)),i}function rt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const l=a[t],s=a.theme,c=Zn(s,r)||{};return Nn(a,l,f=>{let h=ma(c,i,f);return f===h&&typeof f=="string"&&(h=ma(c,i,`${t}${f==="default"?"":ye(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function HS(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const WS={m:"margin",p:"padding"},GS={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},yh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},YS=HS(e=>{if(e.length>2)if(yh[e])e=yh[e];else return[e];const[t,n]=e.split(""),r=WS[t],i=GS[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Vl=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ul=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Vl,...Ul];function Ui(e,t,n,r){var i;const o=(i=Zn(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 Ch(e){return Ui(e,"spacing",8)}function Hi(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 KS(e,t){return n=>e.reduce((r,i)=>(r[i]=Hi(t,n),r),{})}function qS(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=YS(n),o=KS(i,r),a=e[n];return Nn(e,a,o)}function xh(e,t){const n=Ch(e.theme);return Object.keys(e).map(r=>qS(e,t,r,n)).reduce(Vi,{})}function Qe(e){return xh(e,Vl)}Qe.propTypes={},Qe.filterProps=Vl;function Je(e){return xh(e,Ul)}Je.propTypes={},Je.filterProps=Ul;function wh(e=8){if(e.mui)return e;const t=Ch({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 va(...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]?Vi(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 rt({prop:e,themeKey:"borders",transform:t})}const QS=en("border",Zt),JS=en("borderTop",Zt),XS=en("borderRight",Zt),ZS=en("borderBottom",Zt),eA=en("borderLeft",Zt),tA=en("borderColor"),nA=en("borderTopColor"),rA=en("borderRightColor"),iA=en("borderBottomColor"),oA=en("borderLeftColor"),aA=en("outline",Zt),sA=en("outlineColor"),ba=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ui(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Hi(t,r)});return Nn(e,e.borderRadius,n)}return null};ba.propTypes={},ba.filterProps=["borderRadius"],va(QS,JS,XS,ZS,eA,tA,nA,rA,iA,oA,ba,aA,sA);const ya=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({gap:Hi(t,r)});return Nn(e,e.gap,n)}return null};ya.propTypes={},ya.filterProps=["gap"];const Ca=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({columnGap:Hi(t,r)});return Nn(e,e.columnGap,n)}return null};Ca.propTypes={},Ca.filterProps=["columnGap"];const xa=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({rowGap:Hi(t,r)});return Nn(e,e.rowGap,n)}return null};xa.propTypes={},xa.filterProps=["rowGap"];const lA=rt({prop:"gridColumn"}),cA=rt({prop:"gridRow"}),uA=rt({prop:"gridAutoFlow"}),dA=rt({prop:"gridAutoColumns"}),fA=rt({prop:"gridAutoRows"}),hA=rt({prop:"gridTemplateColumns"}),pA=rt({prop:"gridTemplateRows"}),gA=rt({prop:"gridTemplateAreas"}),mA=rt({prop:"gridArea"});va(ya,Ca,xa,lA,cA,uA,dA,fA,hA,pA,gA,mA);function zr(e,t){return t==="grey"?t:e}const vA=rt({prop:"color",themeKey:"palette",transform:zr}),bA=rt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:zr}),yA=rt({prop:"backgroundColor",themeKey:"palette",transform:zr});va(vA,bA,yA);function Ht(e){return e<=1&&e!==0?`${e*100}%`:e}const CA=rt({prop:"width",transform:Ht}),Hl=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])||jl[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 Nn(e,e.maxWidth,t)}return null};Hl.filterProps=["maxWidth"];const xA=rt({prop:"minWidth",transform:Ht}),wA=rt({prop:"height",transform:Ht}),IA=rt({prop:"maxHeight",transform:Ht}),SA=rt({prop:"minHeight",transform:Ht});rt({prop:"size",cssProperty:"width",transform:Ht}),rt({prop:"size",cssProperty:"height",transform:Ht});const AA=rt({prop:"boxSizing"});va(CA,Hl,xA,wA,IA,SA,AA);const wa={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:ba},color:{themeKey:"palette",transform:zr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:zr},backgroundColor:{themeKey:"palette",transform:zr},p:{style:Je},pt:{style:Je},pr:{style:Je},pb:{style:Je},pl:{style:Je},px:{style:Je},py:{style:Je},padding:{style:Je},paddingTop:{style:Je},paddingRight:{style:Je},paddingBottom:{style:Je},paddingLeft:{style:Je},paddingX:{style:Je},paddingY:{style:Je},paddingInline:{style:Je},paddingInlineStart:{style:Je},paddingInlineEnd:{style:Je},paddingBlock:{style:Je},paddingBlockStart:{style:Je},paddingBlockEnd:{style:Je},m:{style:Qe},mt:{style:Qe},mr:{style:Qe},mb:{style:Qe},ml:{style:Qe},mx:{style:Qe},my:{style:Qe},margin:{style:Qe},marginTop:{style:Qe},marginRight:{style:Qe},marginBottom:{style:Qe},marginLeft:{style:Qe},marginX:{style:Qe},marginY:{style:Qe},marginInline:{style:Qe},marginInlineStart:{style:Qe},marginInlineEnd:{style:Qe},marginBlock:{style:Qe},marginBlockStart:{style:Qe},marginBlockEnd:{style:Qe},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:ya},rowGap:{style:xa},columnGap:{style:Ca},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:Hl},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 TA(...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 EA(e,t){return typeof e=="function"?e(t):e}function _A(){function e(n,r,i,o){const a={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:s=n,themeKey:c,transform:d,style:f}=l;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Zn(i,c)||{};return f?f(a):Nn(a,r,m=>{let g=ma(h,d,m);return m===g&&typeof m=="string"&&(g=ma(h,d,`${n}${m==="default"?"":ye(m)}`,m)),s===!1?g:{[s]:g}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:wa;function l(s){let c=s;if(typeof s=="function")c=s(o);else if(typeof s!="object")return s;if(!c)return null;const d=VS(o.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const m=EA(c[p],o);if(m!=null)if(typeof m=="object")if(a[p])h=Vi(h,e(p,m,o,a));else{const g=Nn({theme:o},m,v=>({[p]:v}));TA(g,m)?h[p]=t({sx:m,theme:o}):h=Vi(h,g)}else h=Vi(h,e(p,m,o,a))}),US(f,h)}return Array.isArray(i)?i.map(l):l(i)}return t}const Ia=_A();Ia.filterProps=["sx"];function Ih(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 kA=["breakpoints","palette","spacing","shape"];function Sh(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=Ae(e,kA),l=vh(n),s=wh(i);let c=Bn({breakpoints:l,direction:"ltr",components:{},palette:D({mode:"light"},r),spacing:s,shape:D({},jS,o)},a);return c.applyStyles=Ih,c=t.reduce((d,f)=>Bn(d,f),c),c.unstable_sxConfig=D({},wa,a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(f){return Ia({sx:f,theme:this})},c}function PA(e){return Object.keys(e).length===0}function DA(e=null){const t=j.useContext(pe.ThemeContext);return!t||PA(t)?e:t}const OA=Sh();function RA(e=OA){return DA(e)}const MA=["sx"],LA=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:wa;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function BA(e){const{sx:t}=e,n=Ae(e,MA),{systemProps:r,otherProps:i}=LA(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...a)=>{const l=t(...a);return Xn(l)?D({},r,l):r}:o=D({},r,t),D({},i,{sx:o})}const $A=["ownerState"],NA=["variants"],FA=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function zA(e){return Object.keys(e).length===0}function jA(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const VA=Sh(),UA=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Sa({defaultTheme:e,theme:t,themeId:n}){return zA(t)?e:t[n]||t}function HA(e){return e?(t,n)=>n[e]:null}function Aa(e,t){let{ownerState:n}=t,r=Ae(t,$A);const i=typeof e=="function"?e(D({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Aa(o,D({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let l=Ae(i,NA);return o.forEach(s=>{let c=!0;typeof s.props=="function"?c=s.props(D({ownerState:n},r,n)):Object.keys(s.props).forEach(d=>{(n==null?void 0:n[d])!==s.props[d]&&r[d]!==s.props[d]&&(c=!1)}),c&&(Array.isArray(l)||(l=[l]),l.push(typeof s.style=="function"?s.style(D({ownerState:n},r,n)):s.style))}),l}return i}function WA(e={}){const{themeId:t,defaultTheme:n=VA,rootShouldForwardProp:r=Wl,slotShouldForwardProp:i=Wl}=e,o=a=>Ia(D({},a,{theme:Sa(D({},a,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(a,l={})=>{NS(a,b=>b.filter(T=>!(T!=null&&T.__mui_systemSx)));const{name:s,slot:c,skipVariantsResolver:d,skipSx:f,overridesResolver:h=HA(UA(c))}=l,p=Ae(l,FA),m=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,g=f||!1;let v,S=Wl;c==="Root"||c==="root"?S=r:c?S=i:jA(a)&&(S=void 0);const w=$S(a,D({shouldForwardProp:S,label:v},p)),y=b=>typeof b=="function"&&b.__emotion_real!==b||Xn(b)?T=>Aa(b,D({},T,{theme:Sa({theme:T.theme,defaultTheme:n,themeId:t})})):b,C=(b,...T)=>{let E=y(b);const P=T?T.map(y):[];s&&h&&P.push(z=>{const A=Sa(D({},z,{defaultTheme:n,themeId:t}));if(!A.components||!A.components[s]||!A.components[s].styleOverrides)return null;const W=A.components[s].styleOverrides,Y={};return Object.entries(W).forEach(([N,$])=>{Y[N]=Aa($,D({},z,{theme:A}))}),h(z,Y)}),s&&!m&&P.push(z=>{var A;const W=Sa(D({},z,{defaultTheme:n,themeId:t})),Y=W==null||(A=W.components)==null||(A=A[s])==null?void 0:A.variants;return Aa({variants:Y},D({},z,{theme:W}))}),g||P.push(o);const O=P.length-T.length;if(Array.isArray(b)&&O>0){const z=new Array(O).fill("");E=[...b,...z],E.raw=[...b.raw,...z]}const G=w(E,...P);return a.muiName&&(G.muiName=a.muiName),G};return w.withConfig&&(C.withConfig=w.withConfig),C}}function GA(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Qf(t.components[n].defaultProps,r)}function YA({props:e,name:t,defaultTheme:n,themeId:r}){let i=RA(n);return r&&(i=i[r]||i),GA({theme:i,name:t,props:e})}function KA(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 Ah(e){if(e.type)return e;if(e.charAt(0)==="#")return Ah(KA(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Zo(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(Zo(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const mr=e=>{const t=Ah(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};function Gl(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 Th=(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])})},qA=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([l,s])=>{(!n||n&&!n([...o,l]))&&s!=null&&(typeof s=="object"&&Object.keys(s).length>0?r(s,[...o,l],Array.isArray(s)?[...a,l]:a):t([...o,l],s,a))})}r(e)},QA=(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 Yl(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return qA(e,(l,s,c)=>{if((typeof s=="string"||typeof s=="number")&&(!r||!r(l,s))){const d=`--${n?`${n}-`:""}${l.join("-")}`;Object.assign(i,{[d]:QA(l,s)}),Th(o,l,`var(${d})`,c),Th(a,l,`var(${d}, ${s})`,c)}},l=>l[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function vr(e){"@babel/helpers - typeof";return vr=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},vr(e)}function JA(e,t){if(vr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Kl(e){var t=JA(e,"string");return vr(t)=="symbol"?t:t+""}const XA=["colorSchemes","components","defaultColorScheme"];function ZA(e,t){const{colorSchemes:n={},defaultColorScheme:r="light"}=e,i=Ae(e,XA),{vars:o,css:a,varsWithDefaults:l}=Yl(i,t);let s=l;const c={},{[r]:d}=n,f=Ae(n,[r].map(Kl));if(Object.entries(f||{}).forEach(([p,m])=>{const{vars:g,css:v,varsWithDefaults:S}=Yl(m,t);s=Bn(s,S),c[p]={css:v,vars:g}}),d){const{css:p,vars:m,varsWithDefaults:g}=Yl(d,t);s=Bn(s,g),c[r]={css:p,vars:m}}return{vars:s,generateCssVars:p=>{var m;if(!p){var g;const S=D({},a);return{css:S,vars:o,selector:(t==null||(g=t.getSelector)==null?void 0:g.call(t,p,S))||":root"}}const v=D({},c[p].css);return{css:v,vars:c[p].vars,selector:(t==null||(m=t.getSelector)==null?void 0:m.call(t,p,v))||":root"}}}}const e1=D({},wa,{borderRadius:{themeKey:"radius"},boxShadow:{themeKey:"shadow"},fontFamily:{themeKey:"fontFamily"},fontSize:{themeKey:"fontSize"},fontWeight:{themeKey:"fontWeight"},letterSpacing:{themeKey:"letterSpacing"},lineHeight:{themeKey:"lineHeight"}}),Wi={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 t1(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 it=(e,t)=>Xf(e,t,"Mui"),Xe=(e,t)=>FI(e,t,"Mui"),n1=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))$/)}),Eh=(e,t,n)=>{t.includes("Color")&&(e.color=n),t.includes("Bg")&&(e.backgroundColor=n),t.includes("Border")&&(e.borderColor=n)},_h=(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")),Eh(r,i,a)}}),r},Tt=(e,t)=>{let n={};if(t){const{getCssVar:r,palette:i}=t;Object.entries(i).forEach(o=>{const[a,l]=o;n1(l)&&typeof l=="object"&&(n=D({},n,{[a]:_h(e,l,s=>`var(--variant-${s}, ${r(`palette-${a}-${s}`,i[a][s])})`)}))})}return n.context=_h(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},r1=["cssVarPrefix","breakpoints","spacing","components","variants","shouldSkipGeneratingVar"],i1=["colorSchemes"],o1=(e="joy")=>Gl(e);function a1(e){var t,n,r,i,o,a,l,s,c,d;const f={},{cssVarPrefix:h="joy",breakpoints:p,spacing:m,components:g,variants:v,shouldSkipGeneratingVar:S=t1}=f,w=Ae(f,r1),y=o1(h),C={primary:Wi.blue,neutral:Wi.grey,danger:Wi.red,success:Wi.green,warning:Wi.yellow,common:{white:"#FFF",black:"#000"}},b=J=>{var le;const ne=J.split("-"),ge=ne[1],Se=ne[2];return y(J,(le=C[ge])==null?void 0:le[Se])},T=J=>({plainColor:b(`palette-${J}-500`),plainHoverBg:b(`palette-${J}-100`),plainActiveBg:b(`palette-${J}-200`),plainDisabledColor:b("palette-neutral-400"),outlinedColor:b(`palette-${J}-500`),outlinedBorder:b(`palette-${J}-300`),outlinedHoverBg:b(`palette-${J}-100`),outlinedActiveBg:b(`palette-${J}-200`),outlinedDisabledColor:b("palette-neutral-400"),outlinedDisabledBorder:b("palette-neutral-200"),softColor:b(`palette-${J}-700`),softBg:b(`palette-${J}-100`),softHoverBg:b(`palette-${J}-200`),softActiveColor:b(`palette-${J}-800`),softActiveBg:b(`palette-${J}-300`),softDisabledColor:b("palette-neutral-400"),softDisabledBg:b("palette-neutral-50"),solidColor:b("palette-common-white"),solidBg:b(`palette-${J}-500`),solidHoverBg:b(`palette-${J}-600`),solidActiveBg:b(`palette-${J}-700`),solidDisabledColor:b("palette-neutral-400"),solidDisabledBg:b("palette-neutral-100")}),E=J=>({plainColor:b(`palette-${J}-300`),plainHoverBg:b(`palette-${J}-800`),plainActiveBg:b(`palette-${J}-700`),plainDisabledColor:b("palette-neutral-500"),outlinedColor:b(`palette-${J}-200`),outlinedBorder:b(`palette-${J}-700`),outlinedHoverBg:b(`palette-${J}-800`),outlinedActiveBg:b(`palette-${J}-700`),outlinedDisabledColor:b("palette-neutral-500"),outlinedDisabledBorder:b("palette-neutral-800"),softColor:b(`palette-${J}-200`),softBg:b(`palette-${J}-800`),softHoverBg:b(`palette-${J}-700`),softActiveColor:b(`palette-${J}-100`),softActiveBg:b(`palette-${J}-600`),softDisabledColor:b("palette-neutral-500"),softDisabledBg:b("palette-neutral-800"),solidColor:b("palette-common-white"),solidBg:b(`palette-${J}-500`),solidHoverBg:b(`palette-${J}-600`),solidActiveBg:b(`palette-${J}-700`),solidDisabledColor:b("palette-neutral-500"),solidDisabledBg:b("palette-neutral-800")}),P={palette:{mode:"light",primary:D({},C.primary,T("primary")),neutral:D({},C.neutral,T("neutral"),{plainColor:b("palette-neutral-700"),plainHoverColor:b("palette-neutral-900"),outlinedColor:b("palette-neutral-700")}),danger:D({},C.danger,T("danger")),success:D({},C.success,T("success")),warning:D({},C.warning,T("warning")),common:{white:"#FFF",black:"#000"},text:{primary:b("palette-neutral-800"),secondary:b("palette-neutral-700"),tertiary:b("palette-neutral-600"),icon:b("palette-neutral-500")},background:{body:b("palette-common-white"),surface:b("palette-neutral-50"),popup:b("palette-common-white"),level1:b("palette-neutral-100"),level2:b("palette-neutral-200"),level3:b("palette-neutral-300"),tooltip:b("palette-neutral-500"),backdrop:`rgba(${y("palette-neutral-darkChannel",mr(C.neutral[900]))} / 0.25)`},divider:`rgba(${y("palette-neutral-mainChannel",mr(C.neutral[500]))} / 0.2)`,focusVisible:b("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"21 21 21",shadowOpacity:"0.08"},O={palette:{mode:"dark",primary:D({},C.primary,E("primary")),neutral:D({},C.neutral,E("neutral"),{plainColor:b("palette-neutral-300"),plainHoverColor:b("palette-neutral-300")}),danger:D({},C.danger,E("danger")),success:D({},C.success,E("success")),warning:D({},C.warning,E("warning")),common:{white:"#FFF",black:"#000"},text:{primary:b("palette-neutral-100"),secondary:b("palette-neutral-300"),tertiary:b("palette-neutral-400"),icon:b("palette-neutral-400")},background:{body:b("palette-common-black"),surface:b("palette-neutral-900"),popup:b("palette-common-black"),level1:b("palette-neutral-800"),level2:b("palette-neutral-700"),level3:b("palette-neutral-600"),tooltip:b("palette-neutral-600"),backdrop:`rgba(${y("palette-neutral-darkChannel",mr(C.neutral[50]))} / 0.25)`},divider:`rgba(${y("palette-neutral-mainChannel",mr(C.neutral[500]))} / 0.16)`,focusVisible:b("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"0 0 0",shadowOpacity:"0.6"},G='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',z=D({body:`"Inter", ${y(`fontFamily-fallback, ${G}`)}`,display:`"Inter", ${y(`fontFamily-fallback, ${G}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:G},w.fontFamily),A=D({sm:300,md:500,lg:600,xl:700},w.fontWeight),W=D({xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem"},w.fontSize),Y=D({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},w.lineHeight),N=(t=(n=w.colorSchemes)==null||(n=n.light)==null?void 0:n.shadowRing)!=null?t:P.shadowRing,$=(r=(i=w.colorSchemes)==null||(i=i.light)==null?void 0:i.shadowChannel)!=null?r:P.shadowChannel,B=(o=(a=w.colorSchemes)==null||(a=a.light)==null?void 0:a.shadowOpacity)!=null?o:P.shadowOpacity,H={colorSchemes:{light:P,dark:O},fontSize:W,fontFamily:z,fontWeight:A,focus:{thickness:"2px",selector:`&.${it("","focusVisible")}, &:focus-visible`,default:{outlineOffset:`var(--focus-outline-offset, ${y("focus-thickness",(l=(s=w.focus)==null?void 0:s.thickness)!=null?l:"2px")})`,outline:`${y("focus-thickness",(c=(d=w.focus)==null?void 0:d.thickness)!=null?c:"2px")} solid ${y("palette-focusVisible",C.primary[500])}`}},lineHeight:Y,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${y("shadowRing",N)}, 0px 1px 2px 0px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`,sm:`${y("shadowRing",N)}, 0px 1px 2px 0px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)}), 0px 2px 4px 0px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`,md:`${y("shadowRing",N)}, 0px 2px 8px -2px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)}), 0px 6px 12px -2px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`,lg:`${y("shadowRing",N)}, 0px 2px 8px -2px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)}), 0px 12px 16px -4px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`,xl:`${y("shadowRing",N)}, 0px 2px 8px -2px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)}), 0px 20px 24px -4px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,snackbar:1400,tooltip:1500},typography:{h1:{fontFamily:y(`fontFamily-display, ${z.display}`),fontWeight:y(`fontWeight-xl, ${A.xl}`),fontSize:y(`fontSize-xl4, ${W.xl4}`),lineHeight:y(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${P.palette.text.primary}`)},h2:{fontFamily:y(`fontFamily-display, ${z.display}`),fontWeight:y(`fontWeight-xl, ${A.xl}`),fontSize:y(`fontSize-xl3, ${W.xl3}`),lineHeight:y(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${P.palette.text.primary}`)},h3:{fontFamily:y(`fontFamily-display, ${z.display}`),fontWeight:y(`fontWeight-lg, ${A.lg}`),fontSize:y(`fontSize-xl2, ${W.xl2}`),lineHeight:y(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${P.palette.text.primary}`)},h4:{fontFamily:y(`fontFamily-display, ${z.display}`),fontWeight:y(`fontWeight-lg, ${A.lg}`),fontSize:y(`fontSize-xl, ${W.xl}`),lineHeight:y(`lineHeight-md, ${Y.md}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${P.palette.text.primary}`)},"title-lg":{fontFamily:y(`fontFamily-body, ${z.body}`),fontWeight:y(`fontWeight-lg, ${A.lg}`),fontSize:y(`fontSize-lg, ${W.lg}`),lineHeight:y(`lineHeight-xs, ${Y.xs}`),color:y(`palette-text-primary, ${P.palette.text.primary}`)},"title-md":{fontFamily:y(`fontFamily-body, ${z.body}`),fontWeight:y(`fontWeight-md, ${A.md}`),fontSize:y(`fontSize-md, ${W.md}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-primary, ${P.palette.text.primary}`)},"title-sm":{fontFamily:y(`fontFamily-body, ${z.body}`),fontWeight:y(`fontWeight-md, ${A.md}`),fontSize:y(`fontSize-sm, ${W.sm}`),lineHeight:y(`lineHeight-sm, ${Y.sm}`),color:y(`palette-text-primary, ${P.palette.text.primary}`)},"body-lg":{fontFamily:y(`fontFamily-body, ${z.body}`),fontSize:y(`fontSize-lg, ${W.lg}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-secondary, ${P.palette.text.secondary}`)},"body-md":{fontFamily:y(`fontFamily-body, ${z.body}`),fontSize:y(`fontSize-md, ${W.md}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-secondary, ${P.palette.text.secondary}`)},"body-sm":{fontFamily:y(`fontFamily-body, ${z.body}`),fontSize:y(`fontSize-sm, ${W.sm}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-tertiary, ${P.palette.text.tertiary}`)},"body-xs":{fontFamily:y(`fontFamily-body, ${z.body}`),fontWeight:y(`fontWeight-md, ${A.md}`),fontSize:y(`fontSize-xs, ${W.xs}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-tertiary, ${P.palette.text.tertiary}`)}}},q=w?Bn(H,w):H,{colorSchemes:ee}=q,R=Ae(q,i1),L=D({colorSchemes:ee},R,{breakpoints:vh(p!=null?p:{}),components:Bn({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:J,theme:le})=>{var ne;const ge=J.instanceFontSize;return D({margin:"var(--Icon-margin)"},J.fontSize&&J.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${le.vars.fontSize[J.fontSize]})`},!J.htmlColor&&D({color:`var(--Icon-color, ${L.vars.palette.text.icon})`},J.color&&J.color!=="inherit"&&le.vars.palette[J.color]&&{color:`rgba(${(ne=le.vars.palette[J.color])==null?void 0:ne.mainChannel} / 1)`}),ge&&ge!=="inherit"&&{"--Icon-fontSize":le.vars.fontSize[ge]})}}}},g),cssVarPrefix:h,getCssVar:y,spacing:wh(m)});function F(J,le){Object.keys(le).forEach(ne=>{const ge={main:"500",light:"200",dark:"700"};J==="dark"&&(ge.main=400),!le[ne].mainChannel&&le[ne][ge.main]&&(le[ne].mainChannel=mr(le[ne][ge.main])),!le[ne].lightChannel&&le[ne][ge.light]&&(le[ne].lightChannel=mr(le[ne][ge.light])),!le[ne].darkChannel&&le[ne][ge.dark]&&(le[ne].darkChannel=mr(le[ne][ge.dark]))})}Object.entries(L.colorSchemes).forEach(([J,le])=>{F(J,le.palette)});const V={prefix:h,shouldSkipGeneratingVar:S},{vars:te,generateCssVars:se}=ZA(D({colorSchemes:ee},R),V);L.vars=te,L.generateCssVars=se,L.unstable_sxConfig=D({},e1,void 0),L.unstable_sx=function(le){return Ia({sx:le,theme:this})},L.getColorSchemeSelector=J=>J==="light"?"&":`&[data-joy-color-scheme="${J}"], [data-joy-color-scheme="${J}"] &`;const ae={getCssVar:y,palette:L.colorSchemes.light.palette};return L.variants=Bn({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)},v),L.palette=D({},L.colorSchemes.light.palette,{colorScheme:"light"}),L.shouldSkipGeneratingVar=S,L.applyStyles=Ih,L}const kh=a1(),be=WA({defaultTheme:kh,themeId:mh});function ct({props:e,name:t}){return YA({props:e,name:t,defaultTheme:D({},kh,{components:{}}),themeId:mh})}function s1(e){return it("MuiAccordion",e)}const l1=Xe("MuiAccordion",["root","expanded","disabled"]),c1=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],u1=["component","slots","slotProps"],d1=["component"];function Ie(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:l}=t,s=Ae(t,c1),{component:c,slots:d={[e]:void 0},slotProps:f={[e]:void 0}}=o,h=Ae(o,u1),p=d[e]||r,m=wI(f[e],i),g=AI(D({className:n},s,{externalForwardedProps:e==="root"?h:void 0,externalSlotProps:m})),{props:{component:v},internalRef:S}=g,w=Ae(g.props,d1),y=sn(S,m==null?void 0:m.ref,t.ref),C=a?a(w):{},b=D({},i,C),T=e==="root"?v||c:v,E=xI(p,D({},e==="root"&&!c&&!d[e]&&l,e!=="root"&&!d[e]&&l,w,T&&{as:T},{ref:y}),b);return Object.keys(C).forEach(P=>{delete E[P]}),[p,E]}const ql=j.createContext({});function f1(e){return it("MuiListItem",e)}const Ph=Xe("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),Ta=j.createContext(!1),Ql=j.createContext(!1),Dh=j.createContext(!1),Oh=j.createContext(void 0),h1=j.createContext(void 0),Rh=j.createContext(void 0),p1=["component","className","children","nested","sticky","variant","color","startAction","endAction","role","slots","slotProps"],g1=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 lt(a,f1,{})},Jl=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})`},{[`.${Ph.nested} > &`]:{"--_ListItem-display":"flex"}}),(n=e.variants[t.variant])==null?void 0:n[t.color]]}),m1=be(Jl,{name:"JoyListItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),v1=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})),b1=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%)"})),Mh=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyListItem"}),i=j.useContext(Rh),o=j.useContext(Oh),a=j.useContext(Ql),l=j.useContext(Dh),s=j.useContext(Ta),{component:c,className:d,children:f,nested:h=!1,sticky:p=!1,variant:m="plain",color:g="neutral",startAction:v,endAction:S,role:w,slots:y={},slotProps:C={}}=r,b=Ae(r,p1),[T,E]=j.useState(""),[P,O]=(o==null?void 0:o.split(":"))||["",""],G=c||(P&&!P.match(/^(ul|ol|menu)$/)?"div":void 0);let z=i==="menu"?"none":void 0;o&&(z={menu:"none",menubar:"none",group:"presentation"}[O]),w&&(z=w);const A=D({},r,{sticky:p,startAction:v,endAction:S,row:a,wrap:l,variant:m,color:g,nesting:s,nested:h,component:G,role:z}),W=g1(A),Y=D({},b,{component:G,slots:y,slotProps:C}),[N,$]=Ie("root",{additionalProps:{role:z},ref:n,className:Ln(W.root,d),elementType:m1,externalForwardedProps:Y,ownerState:A}),[B,H]=Ie("startAction",{className:W.startAction,elementType:v1,externalForwardedProps:Y,ownerState:A}),[q,ee]=Ie("endAction",{className:W.endAction,elementType:b1,externalForwardedProps:Y,ownerState:A});return u.jsx(h1.Provider,{value:E,children:u.jsx(Ta.Provider,{value:h?T||!0:!1,children:u.jsxs(N,D({},$,{children:[v&&u.jsx(B,D({},H,{children:v})),j.Children.map(f,(R,L)=>{var F;return j.isValidElement(R)?j.cloneElement(R,D({},L===0&&{"data-first-child":""},Gf(R,["ListItem"])&&{component:((F=R.props)==null?void 0:F.component)||"div"})):R}),S&&u.jsx(q,D({},ee,{children:S}))]}))})})});Mh.muiName="ListItem";const Lh=Mh;function y1(e){return it("MuiAccordionDetails",e)}const br=Xe("MuiAccordionDetails",["root","content","expanded"]),C1=["accordionId","component","color","children","defaultExpanded","disabled","expanded","onChange","variant","slots","slotProps"],x1=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 lt(o,s1,{})},w1=be(Jl,{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"},[`& .${br.root}`]:{"--AccordionDetails-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)"}},"&:not([data-first-child]):not([data-last-child])":{"--ListItem-radius":"0"}}),I1=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordion"}),{accordionId:i,component:o="div",color:a="neutral",children:l,defaultExpanded:s=!1,disabled:c=!1,expanded:d,onChange:f,variant:h="plain",slots:p={},slotProps:m={}}=r,g=Ae(r,C1),v=ji(i),[S,w]=kl({controlled:d,default:s,name:"Accordion",state:"expanded"}),y=j.useCallback(G=>{w(!S),f&&f(G,!S)},[S,f,w]),C=j.useMemo(()=>({accordionId:v,expanded:S,disabled:c,toggle:y}),[v,S,c,y]),b=D({},g,{component:o,slots:p,slotProps:m}),T=D({},r,{component:o,color:a,variant:h,expanded:S,disabled:c,nested:!0}),E=x1(T),[P,O]=Ie("root",{ref:n,className:E.root,elementType:w1,externalForwardedProps:b,ownerState:T});return u.jsx(ql.Provider,{value:C,children:u.jsx(P,D({},O,{children:j.Children.map(l,(G,z)=>j.isValidElement(G)&&z===0?j.cloneElement(G,{"data-first-child":""}):G)}))})});function S1(e){return it("MuiAccordionGroup",e)}Xe("MuiAccordionGroup",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const A1={"--NestedList-marginRight":"0px","--NestedList-marginLeft":"0px","--NestedListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px"};function Xl(e){const{children:t,nested:n,row:r=!1,wrap:i=!1}=e,o=u.jsx(Ql.Provider,{value:r,children:u.jsx(Dh.Provider,{value:i,children:j.Children.map(t,(a,l)=>j.isValidElement(a)?j.cloneElement(a,D({},l===0&&{"data-first-child":""},l===j.Children.count(t)-1&&{"data-last-child":""})):a)})});return n===void 0?o:u.jsx(Ta.Provider,{value:n,children:o})}const Zl=({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 l;r[o]=((l=e.vars)==null?void 0:l.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 T1(e){return it("MuiList",e)}Xe("MuiList",["root","nesting","scoped","sizeSm","sizeMd","sizeLg","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]);const E1=j.createContext(void 0),_1=["component","className","children","size","orientation","wrap","variant","color","role","slots","slotProps"],k1=e=>{const{variant:t,color:n,size:r,nesting:i,orientation:o,instanceSize:a}=e,l={root:["root",o,t&&`variant${ye(t)}`,n&&`color${ye(n)}`,!a&&!i&&r&&`size${ye(r)}`,a&&`size${ye(a)}`,i&&"nesting"]};return lt(l,T1,{})},ec=be("ul")(({theme:e,ownerState:t})=>{var n;const{p:r,padding:i,borderRadius:o}=Zl({theme:e,ownerState:t},["p","padding","borderRadius"]);function a(l){return l==="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}:l==="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}:l==="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})]}),P1=be(ec,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({}),D1=j.forwardRef(function(t,n){var r;const i=j.useContext(Ta),o=j.useContext(Rh),a=j.useContext(E1),l=ct({props:t,name:"JoyList"}),{component:s,className:c,children:d,size:f,orientation:h="vertical",wrap:p=!1,variant:m="plain",color:g="neutral",role:v,slots:S={},slotProps:w={}}=l,y=Ae(l,_1),C=f||((r=t.size)!=null?r:"md");let b;o&&(b="group"),a&&(b="presentation"),v&&(b=v);const T=D({},l,{instanceSize:t.size,size:C,nesting:i,orientation:h,wrap:p,variant:m,color:g,role:b}),E=k1(T),P=D({},y,{component:s,slots:S,slotProps:w}),[O,G]=Ie("root",{ref:n,className:Ln(E.root,c),elementType:P1,externalForwardedProps:P,ownerState:T,additionalProps:{as:s,role:b,"aria-labelledby":typeof i=="string"?i:void 0}});return u.jsx(O,D({},G,{children:u.jsx(Oh.Provider,{value:`${typeof s=="string"?s:""}:${b||""}`,children:u.jsx(Xl,{row:h==="horizontal",wrap:p,children:d})})}))}),O1=["component","color","children","disableDivider","variant","transition","size","slots","slotProps"],R1=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 lt(i,S1,{})},M1=be(ec,{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}`,[`& .${br.root}.${br.expanded}`]:{"--AccordionDetails-transition":`grid-template-rows ${t.transition.expanded}, padding-block ${t.transition.expanded}`}})),D({"--List-padding":"0px","--ListDivider-gap":"0px"},n,!t.disableDivider&&{[`& .${l1.root}:not([data-last-child])`]:{"--Accordion-borderBottom":`1px solid ${e.vars.palette.divider}`}})}),L1=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordionGroup"}),{component:i="div",color:o="neutral",children:a,disableDivider:l=!1,variant:s="plain",transition:c="0.2s ease",size:d="md",slots:f={},slotProps:h={}}=r,p=Ae(r,O1),m=D({},p,{component:i,slots:f,slotProps:h}),g=D({},r,{component:i,color:o,disableDivider:l,variant:s,transition:c,size:d}),v=R1(g),[S,w]=Ie("root",{ref:n,className:v.root,elementType:M1,externalForwardedProps:m,ownerState:g});return u.jsx(S,D({},w,{children:u.jsx(Xl,{children:a})}))}),B1=["component","children","color","variant","slots","slotProps"],$1=e=>{const{expanded:t}=e;return lt({root:["root",t&&"expanded"],content:["content",t&&"expanded"]},y1,{})},N1=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(.${br.expanded})`]:{gridTemplateRows:"0fr"}})}),F1=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(.${br.expanded})`]:{paddingBlock:0}}),z1=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordionDetails"}),{component:i="div",children:o,color:a="neutral",variant:l="plain",slots:s={},slotProps:c={}}=r,d=Ae(r,B1),{accordionId:f,expanded:h=!1}=j.useContext(ql),p=j.useRef(null),m=sn(p,n);j.useEffect(()=>{p.current&&p.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])').forEach(E=>{if(h){const P=E.getAttribute("data-prev-tabindex"),O=E.getAttribute("tabindex");O&&P&&(E.setAttribute("tabindex",P),E.removeAttribute("data-prev-tabindex")),!P&&!O&&E.removeAttribute("tabindex")}else E.setAttribute("data-prev-tabindex",E.getAttribute("tabindex")||""),E.setAttribute("tabindex","-1")})},[h]);const g=D({},d,{component:i,slots:s,slotProps:c}),v=D({},r,{component:i,color:a,variant:l,expanded:h,nesting:!0}),S=$1(v),[w,y]=Ie("root",{ref:m,className:S.root,elementType:N1,externalForwardedProps:g,additionalProps:{id:`${f}-details`,"aria-labelledby":`${f}-summary`,role:"region",hidden:h?void 0:!0},ownerState:v}),[C,b]=Ie("content",{className:S.content,elementType:F1,externalForwardedProps:g,ownerState:v});return u.jsx(w,D({},y,{children:u.jsx(C,D({},b,{children:o}))}))});function j1(e){return it("MuiAccordionSummary",e)}const Ea=Xe("MuiAccordionSummary",["root","button","indicator","disabled","expanded"]),_a=Xe("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]),V1=j.createContext("horizontal"),tc=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,l;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],[`.${Ph.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${_a.selected}`]:D({},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${_a.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]},[`&.${_a.disabled}`]:D({},(l=e.variants[`${t.variant}Disabled`])==null?void 0:l[t.color])})});be(tc,{name:"JoyListItemButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>D({},!e.row&&{[`&.${_a.selected}`]:{fontWeight:t.vars.fontWeight.md}}));function U1(e){return it("MuiSvgIcon",e)}Xe("MuiSvgIcon",["root","colorInherit","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","fontSizeInherit","fontSizeXs","fontSizeSm","fontSizeMd","fontSizeLg","fontSizeXl","fontSizeXl2","fontSizeXl3","fontSizeXl4","sizeSm","sizeMd","sizeLg"]);const H1=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],W1=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 lt(i,U1,{})},Bh={sm:"xl",md:"xl2",lg:"xl3"},G1=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[Bh[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[Bh[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)`}))}),$h=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoySvgIcon"}),{children:i,className:o,color:a,component:l="svg",fontSize:s,htmlColor:c,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24",size:p="md",slots:m={},slotProps:g={}}=r,v=Ae(r,H1),S=j.isValidElement(i)&&i.type==="svg",w=D({},r,{color:a,component:l,size:p,instanceSize:t.size,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:S}),y=W1(w),C=D({},v,{component:l,slots:m,slotProps:g}),[b,T]=Ie("root",{ref:n,className:Ln(y.root,o),elementType:G1,externalForwardedProps:C,ownerState:w,additionalProps:D({color:c,focusable:!1},f&&{role:"img"},!f&&{"aria-hidden":!0},!d&&{viewBox:h},S&&i.props)});return u.jsxs(b,D({},T,{children:[S?i.props.children:i,f?u.jsx("title",{children:f}):null]}))});function nc(e,t){function n(r,i){return u.jsx($h,D({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=$h.muiName,j.memo(j.forwardRef(n))}const Y1=nc(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");var Nh;const K1=["component","color","children","indicator","variant","slots","slotProps"],q1=e=>{const{disabled:t,expanded:n}=e;return lt({root:["root",t&&"disabled",n&&"expanded"],button:["button",t&&"disabled",n&&"expanded"],indicator:["indicator",t&&"disabled",n&&"expanded"]},j1,{})},Q1=be(Jl,{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)",[`&.${Ea.expanded}`]:{"--Icon-color":"currentColor"}})),J1=be(tc,{name:"JoyAccordionSummary",slot:"Button",overridesResolver:(e,t)=>t.button})({gap:"inherit",fontWeight:"inherit",justifyContent:"space-between",font:"inherit","&:focus-visible":{zIndex:1},[`.${Ea.root} &`]:{"--unstable_ListItem-flex":"1 0 0%"}}),X1=be("span",{name:"JoyAccordionSummary",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})({display:"inline-flex",[`&.${Ea.expanded}`]:{transform:"rotate(180deg)"}}),Z1=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordionSummary"}),{component:i="div",color:o="neutral",children:a,indicator:l=Nh||(Nh=u.jsx(Y1,{})),variant:s="plain",slots:c={},slotProps:d={}}=r,f=Ae(r,K1),{accordionId:h,disabled:p=!1,expanded:m=!1,toggle:g}=j.useContext(ql),v=D({},f,{component:i,slots:c,slotProps:d}),S=D({},r,{component:i,color:o,disabled:p,expanded:m,variant:s}),w=G=>{if(g&&g(G),typeof d.button=="function"){var z,A;(z=d.button(S))==null||(A=z.onClick)==null||A.call(z,G)}else{var W,Y;(W=d.button)==null||(Y=W.onClick)==null||Y.call(W,G)}},y=q1(S),[C,b]=Ie("root",{ref:n,className:y.root,elementType:Q1,externalForwardedProps:v,ownerState:S}),[T,E]=Ie("button",{ref:n,className:y.button,elementType:J1,externalForwardedProps:v,additionalProps:{component:"button",id:`${h}-summary`,"aria-expanded":m?"true":"false","aria-controls":`${h}-details`,disabled:p,type:"button",onClick:w},ownerState:S}),[P,O]=Ie("indicator",{ref:n,className:y.indicator,elementType:X1,externalForwardedProps:v,ownerState:S});return u.jsx(C,D({},b,{children:u.jsxs(T,D({},E,{children:[a,l&&u.jsx(P,D({},O,{children:l}))]}))}))}),eT=({label:e,disabled:t,children:n})=>(t=t||!1,u.jsx(L1,{variant:"outlined",transition:"0.2s",sx:{borderRadius:"md",overflow:"hidden",[`& .${Ea.button}:hover`]:{backgroundColor:"#fff"},[`& .${br.content}`]:{boxShadow:r=>`inset 0 1px ${r.vars.palette.divider}`,[`&.${br.expanded}`]:{paddingBlock:"0.75rem"}},marginBottom:"8px",backgroundColor:"#fff"},children:u.jsxs(I1,{disabled:t,children:[u.jsx(Z1,{children:e}),u.jsx(z1,{variant:"soft",children:n})]})})),rc={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"]]},ic=({label:e,property:t,value:n,defaultValue:r,placeholder:i,description:o,onChange:a})=>{const l=(s,c,d,f)=>{d!=="api"&&(f.getText().trim()===""?a(""):a(s))};return t==="description"?u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e}),u.jsx(vi,{value:n||r,defaultValue:r,onChange:l,modules:rc,placeholder:i,className:"ql-container ql-toolbar"})]}):t==="mini_games_explanation"?u.jsxs(I.FormControl,{children:[u.jsx(I.FormLabel,{color:"primary",children:e}),u.jsx(vi,{value:n||r,defaultValue:r,onChange:l,modules:rc,placeholder:i,className:"ql-container ql-toolbar"}),u.jsx(I.FormHelperText,{children:o})]}):u.jsx(I.Box,{sx:()=>({marginBottom:"16px"}),children:u.jsx(vi,{value:n||r,defaultValue:r,onChange:l,modules:rc,placeholder:i})})},tT=e=>{const t=n=>{n.persist(),e.onChange(n.target.value)};return u.jsxs(I.Tabs,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(I.TabList,{sx:{borderRadius:0},tabFlex:"auto",children:[u.jsx(I.Tab,{children:e.labels.richText}),u.jsx(I.Tab,{children:e.labels.plainText})]}),u.jsx(I.TabPanel,{value:0,sx:{px:0},children:u.jsx(ic,{label:"",placeholder:"",defaultValue:e.defaultValue,property:"ad_content",onChange:e.onChange})}),u.jsx(I.TabPanel,{value:1,sx:{px:0},children:u.jsx(I.Textarea,{defaultValue:e.defaultValue,minRows:"7",onChange:t,sx:{marginBottom:"16px",overflow:"auto",resize:"vertical"}})})]})},nT=({label:e,defaultValue:t,values:n,description:r,onChange:i})=>{const o=(a,l)=>{i(l||"")};return u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e}),u.jsx(I.Select,{defaultValue:t,onChange:o,children:n.map((a,l)=>u.jsx(I.Option,{value:a,children:a},`basic-select-${a}-${l}`))}),r?u.jsx(I.FormHelperText,{children:r}):u.jsx(u.Fragment,{})]})},oc=j.createContext("md");function rT(e){return it("MuiTabs",e)}Xe("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const iT=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],oT=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 lt(o,rT,{})},aT=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:l,p:s,padding:c}=Zl({theme:t,ownerState:e},["bgcolor","backgroundColor","background","p","padding"]),d=Zn(t,`palette.${o}`)||o||Zn(t,`palette.${a}`)||a||l||(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],s!==void 0&&{"--Tabs-padding":s},c!==void 0&&{"--Tabs-padding":c})}),Fh=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabs"}),{children:i,value:o,defaultValue:a,orientation:l="horizontal",direction:s="ltr",component:c,variant:d="plain",color:f="neutral",size:h="md",slots:p={},slotProps:m={}}=r,g=Ae(r,iT),v=a||(o===void 0?0:void 0),{contextValue:S}=ES(D({},r,{orientation:l,defaultValue:v})),w=D({},r,{orientation:l,direction:s,variant:d,color:f,size:h}),y=oT(w),C=D({},g,{component:c,slots:p,slotProps:m}),[b,T]=Ie("root",{ref:n,elementType:aT,externalForwardedProps:C,additionalProps:{ref:n,as:c},ownerState:w,className:y.root});return u.jsx(b,D({},T,{children:u.jsx(_S,{value:S,children:u.jsx(oc.Provider,{value:h,children:i})})}))});function sT(e){return it("MuiTabList",e)}Xe("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);function lT(e){return it("MuiTab",e)}const ac=Xe("MuiTab",["root","disabled","focusVisible","selected","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]),cT=["component","children","variant","color","size","disableUnderline","underlinePlacement","tabFlex","sticky","slots","slotProps"],uT=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 lt(o,sT,{})},dT=be(ec,{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"},A1,{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&&{[`& .${ac.root}`]:{flex:t.tabFlex}})}),zh=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabList"}),i=j.useContext(oc),{isRtl:o,orientation:a,getRootProps:l,contextValue:s}=OS({rootRef:n}),{component:c="div",children:d,variant:f="plain",color:h="neutral",size:p,disableUnderline:m=!1,underlinePlacement:g=a==="horizontal"?"bottom":"right",tabFlex:v,sticky:S,slots:w={},slotProps:y={}}=r,C=Ae(r,cT),b=p!=null?p:i,T=D({},r,{isRtl:o,orientation:a,variant:f,color:h,size:b,sticky:S,tabFlex:v,nesting:!1,disableUnderline:m,underlinePlacement:g}),E=uT(T),P=D({},C,{component:c,slots:w,slotProps:y}),[O,G]=Ie("root",{ref:n,elementType:dT,getSlotProps:l,externalForwardedProps:P,ownerState:T,className:E.root});return u.jsx(O,D({},G,{children:u.jsx(RS,{value:s,children:u.jsx(Xl,{row:a==="horizontal",nested:!0,children:d})})}))}),fT=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],hT=e=>{const{selected:t,disabled:n,focusVisible:r,variant:i,color:o,orientation:a}=e,l={root:["root",a,n&&"disabled",r&&"focusVisible",t&&"selected",i&&`variant${ye(i)}`,o&&`color${ye(o)}`]};return lt(l,lT,{})},pT=be(tc,{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))"}}]),jr=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTab"}),i=j.useContext(Ql),{action:o,children:a,disabled:l=!1,component:s="button",orientation:c="horizontal",variant:d="plain",color:f="neutral",disableIndicator:h=!1,indicatorPlacement:p=i?"bottom":"right",indicatorInset:m=!1,slots:g={},slotProps:v={}}=r,S=Ae(r,fT),w=j.useRef(null),y=sn(w,n),{active:C,focusVisible:b,setFocusVisible:T,selected:E,getRootProps:P}=LS(D({},r,{rootRef:y}));j.useImperativeHandle(o,()=>({focusVisible:()=>{T(!0),w.current.focus()}}),[T]);const O=D({},r,{disableIndicator:h,indicatorPlacement:p,indicatorInset:m,orientation:c,row:i,active:C,focusVisible:b,disabled:l,selected:E,variant:d,color:f}),G=hT(O),z=D({},S,{component:s,slots:g,slotProps:v}),[A,W]=Ie("root",{ref:n,elementType:pT,getSlotProps:P,externalForwardedProps:z,ownerState:O,className:G.root});return u.jsx(V1.Provider,{value:c,children:u.jsx(A,D({},W,{children:a}))})});function Fn(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 jh(e){if(j.isValidElement(e)||Wf.isValidElementType(e)||!Fn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=jh(e[n])}),t}function Wt(e,t,n={clone:!0}){const r=n.clone?U({},e):e;return Fn(e)&&Fn(t)&&Object.keys(t).forEach(i=>{j.isValidElement(t[i])||Wf.isValidElementType(t[i])?r[i]=t[i]:Fn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Fn(e[i])?r[i]=Wt(e[i],t[i],n):n.clone?r[i]=Fn(t[i])?jh(t[i]):t[i]:r[i]=t[i]}),r}function yr(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 Vr(e){if(typeof e!="string")throw new Error(yr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function sc(e,t){const n=U({},t);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]=U(U({},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]=U({},a);for(const l in o)if(Object.prototype.hasOwnProperty.call(o,l)){const s=l;n[i][s]=sc(o[s],a[s])}}}else n[i]===void 0&&(n[i]=e[i])}return n}function gT(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",l=!0;for(let s=0;s<o.length;s+=1){const c=o[s];c&&(a+=(l===!0?"":" ")+t(c),l=!1,n&&n[c]&&(a+=" "+n[c]))}r[i]=a}return r}const Vh=e=>e,mT=(()=>{let e=Vh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Vh}}})(),vT={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 Uh(e,t,n="Mui"){const r=vT[t];return r?`${n}-${r}`:`${mT.generate(e)}-${t}`}function bT(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Uh(e,i,n)}),r}function yT(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Gi(e,t){return t?Wt(e,t,{clone:!1}):e}function CT(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var a,l;const o=/min-width:\s*([0-9.]+)/;return+(((a=r.match(o))==null?void 0:a[1])||0)-+(((l=i.match(o))==null?void 0:l[1])||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},U({},t)):t}function xT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function wT(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 IT(e){const t=(o,a)=>o.replace("@media",a?`@container ${a}`:"@container");function n(o,a){o.up=(...l)=>t(e.breakpoints.up(...l),a),o.down=(...l)=>t(e.breakpoints.down(...l),a),o.between=(...l)=>t(e.breakpoints.between(...l),a),o.only=(...l)=>t(e.breakpoints.only(...l),a),o.not=(...l)=>{const s=t(e.breakpoints.not(...l),a);return s.includes("not all and")?s.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):s}}const r={},i=o=>(n(r,o),r);return n(i),X(U({},e),{containerQueries:i})}const ka={xs:0,sm:600,md:900,lg:1200,xl:1536},Hh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ka[e]}px)`},ST={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:ka[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function zn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Hh;return t.reduce((a,l,s)=>(a[o.up(o.keys[s])]=n(t[s]),a),{})}if(typeof t=="object"){const o=r.breakpoints||Hh;return Object.keys(t).reduce((a,l)=>{if(xT(o.keys,l)){const s=wT(r.containerQueries?r:ST,l);s&&(a[s]=n(t[l],l))}else if(Object.keys(o.values||ka).includes(l)){const s=o.up(l);a[s]=n(t[l],l)}else{const s=l;a[s]=t[s]}return a},{})}return n(t)}function AT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function TT(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Pa(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 Da(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Pa(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 l=a[t],s=a.theme,c=Pa(s,r)||{};return zn(a,l,f=>{let h=Da(c,i,f);return f===h&&typeof f=="string"&&(h=Da(c,i,`${t}${f==="default"?"":Vr(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function ET(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const _T={m:"margin",p:"padding"},kT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Wh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},PT=ET(e=>{if(e.length>2)if(Wh[e])e=Wh[e];else return[e];const[t,n]=e.split(""),r=_T[t],i=kT[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),lc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],cc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...lc,...cc];function Yi(e,t,n,r){var o;const i=(o=Pa(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 l=Math.abs(a),s=i[l];return a>=0?s:typeof s=="number"?-s:`-${s}`}:typeof i=="function"?i:()=>{}}function uc(e){return Yi(e,"spacing",8)}function Ki(e,t){return typeof t=="string"||t==null?t:e(t)}function DT(e,t){return n=>e.reduce((r,i)=>(r[i]=Ki(t,n),r),{})}function OT(e,t,n,r){if(!t.includes(n))return null;const i=PT(n),o=DT(i,r),a=e[n];return zn(e,a,o)}function Gh(e,t){const n=uc(e.theme);return Object.keys(e).map(r=>OT(e,t,r,n)).reduce(Gi,{})}function Ze(e){return Gh(e,lc)}Ze.propTypes={},Ze.filterProps=lc;function et(e){return Gh(e,cc)}et.propTypes={},et.filterProps=cc;function Oa(...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]?Gi(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 ot({prop:e,themeKey:"borders",transform:t})}const RT=nn("border",tn),MT=nn("borderTop",tn),LT=nn("borderRight",tn),BT=nn("borderBottom",tn),$T=nn("borderLeft",tn),NT=nn("borderColor"),FT=nn("borderTopColor"),zT=nn("borderRightColor"),jT=nn("borderBottomColor"),VT=nn("borderLeftColor"),UT=nn("outline",tn),HT=nn("outlineColor"),Ra=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Yi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Ki(t,r)});return zn(e,e.borderRadius,n)}return null};Ra.propTypes={},Ra.filterProps=["borderRadius"],Oa(RT,MT,LT,BT,$T,NT,FT,zT,jT,VT,Ra,UT,HT);const Ma=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Yi(e.theme,"spacing",8),n=r=>({gap:Ki(t,r)});return zn(e,e.gap,n)}return null};Ma.propTypes={},Ma.filterProps=["gap"];const La=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Yi(e.theme,"spacing",8),n=r=>({columnGap:Ki(t,r)});return zn(e,e.columnGap,n)}return null};La.propTypes={},La.filterProps=["columnGap"];const Ba=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Yi(e.theme,"spacing",8),n=r=>({rowGap:Ki(t,r)});return zn(e,e.rowGap,n)}return null};Ba.propTypes={},Ba.filterProps=["rowGap"];const WT=ot({prop:"gridColumn"}),GT=ot({prop:"gridRow"}),YT=ot({prop:"gridAutoFlow"}),KT=ot({prop:"gridAutoColumns"}),qT=ot({prop:"gridAutoRows"}),QT=ot({prop:"gridTemplateColumns"}),JT=ot({prop:"gridTemplateRows"}),XT=ot({prop:"gridTemplateAreas"}),ZT=ot({prop:"gridArea"});Oa(Ma,La,Ba,WT,GT,YT,KT,qT,QT,JT,XT,ZT);function Ur(e,t){return t==="grey"?t:e}const eE=ot({prop:"color",themeKey:"palette",transform:Ur}),tE=ot({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ur}),nE=ot({prop:"backgroundColor",themeKey:"palette",transform:Ur});Oa(eE,tE,nE);function Gt(e){return e<=1&&e!==0?`${e*100}%`:e}const rE=ot({prop:"width",transform:Gt}),dc=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,o,a,l,s;const r=((a=(o=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:o.values)==null?void 0:a[n])||ka[n];return r?((s=(l=e.theme)==null?void 0:l.breakpoints)==null?void 0:s.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Gt(n)}};return zn(e,e.maxWidth,t)}return null};dc.filterProps=["maxWidth"];const iE=ot({prop:"minWidth",transform:Gt}),oE=ot({prop:"height",transform:Gt}),aE=ot({prop:"maxHeight",transform:Gt}),sE=ot({prop:"minHeight",transform:Gt});ot({prop:"size",cssProperty:"width",transform:Gt}),ot({prop:"size",cssProperty:"height",transform:Gt});const lE=ot({prop:"boxSizing"});Oa(rE,dc,iE,oE,aE,sE,lE);const $a={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:Ra},color:{themeKey:"palette",transform:Ur},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ur},backgroundColor:{themeKey:"palette",transform:Ur},p:{style:et},pt:{style:et},pr:{style:et},pb:{style:et},pl:{style:et},px:{style:et},py:{style:et},padding:{style:et},paddingTop:{style:et},paddingRight:{style:et},paddingBottom:{style:et},paddingLeft:{style:et},paddingX:{style:et},paddingY:{style:et},paddingInline:{style:et},paddingInlineStart:{style:et},paddingInlineEnd:{style:et},paddingBlock:{style:et},paddingBlockStart:{style:et},paddingBlockEnd:{style:et},m:{style:Ze},mt:{style:Ze},mr:{style:Ze},mb:{style:Ze},ml:{style:Ze},mx:{style:Ze},my:{style:Ze},margin:{style:Ze},marginTop:{style:Ze},marginRight:{style:Ze},marginBottom:{style:Ze},marginLeft:{style:Ze},marginX:{style:Ze},marginY:{style:Ze},marginInline:{style:Ze},marginInlineStart:{style:Ze},marginInlineEnd:{style:Ze},marginBlock:{style:Ze},marginBlockStart:{style:Ze},marginBlockEnd:{style:Ze},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:Ma},rowGap:{style:Ba},columnGap:{style:La},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:dc},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 cE(...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 uE(e,t){return typeof e=="function"?e(t):e}function dE(){function e(n,r,i,o){const a={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:s=n,themeKey:c,transform:d,style:f}=l;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Pa(i,c)||{};return f?f(a):zn(a,r,m=>{let g=Da(h,d,m);return m===g&&typeof m=="string"&&(g=Da(h,d,`${n}${m==="default"?"":Vr(m)}`,m)),s===!1?g:{[s]:g}})}function t(n){var l;const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=(l=i.unstable_sxConfig)!=null?l:$a;function a(s){let c=s;if(typeof s=="function")c=s(i);else if(typeof s!="object")return s;if(!c)return null;const d=AT(i.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const m=uE(c[p],i);if(m!=null)if(typeof m=="object")if(o[p])h=Gi(h,e(p,m,i,o));else{const g=zn({theme:i},m,v=>({[p]:v}));cE(g,m)?h[p]=t({sx:m,theme:i}):h=Gi(h,g)}else h=Gi(h,e(p,m,i,o))}),CT(i,TT(f,h))}return Array.isArray(r)?r.map(a):a(r)}return t}const Hr=dE();Hr.filterProps=["sx"];function fE(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 hE={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},pE=!1,gE=/[A-Z]|^ms/g,mE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Yh=function(t){return t.charCodeAt(1)===45},Kh=function(t){return t!=null&&typeof t!="boolean"},fc=BS(function(e){return Yh(e)?e:e.replace(gE,"-$&").toLowerCase()}),qh=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(mE,function(r,i,o){return er={name:i,styles:o,next:er},i})}return hE[t]!==1&&!Yh(t)&&typeof n=="number"&&n!==0?n+"px":n},vE="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Na(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 er={name:i.name,styles:i.styles,next:er},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)er={name:a.name,styles:a.styles,next:er},a=a.next;var l=o.styles+";";return l}return bE(e,t,n)}}var s=n;return s}function bE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Na(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var l=a;Kh(l)&&(r+=fc(o)+":"+qh(o,l)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&pE)throw new Error(vE);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var s=0;s<a.length;s++)Kh(a[s])&&(r+=fc(o)+":"+qh(o,a[s])+";");else{var c=Na(e,t,a);switch(o){case"animation":case"animationName":{r+=fc(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}}return r}var Qh=/label:\s*([^\s;{]+)\s*(;|$)/g,er;function yE(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="";er=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Na(n,t,o);else{var a=o;i+=a[0]}for(var l=1;l<e.length;l++)if(i+=Na(n,t,e[l]),r){var s=o;i+=s[l]}Qh.lastIndex=0;for(var c="",d;(d=Qh.exec(i))!==null;)c+="-"+d[1];var f=fE(i)+c;return{name:f,styles:i,next:er}}/**
|
|
2333
|
+
*/var El=Symbol.for("react.transitional.element"),_l=Symbol.for("react.portal"),ea=Symbol.for("react.fragment"),ta=Symbol.for("react.strict_mode"),na=Symbol.for("react.profiler"),ra=Symbol.for("react.consumer"),ia=Symbol.for("react.context"),oa=Symbol.for("react.forward_ref"),aa=Symbol.for("react.suspense"),sa=Symbol.for("react.suspense_list"),la=Symbol.for("react.memo"),ca=Symbol.for("react.lazy"),TI=Symbol.for("react.offscreen"),EI=Symbol.for("react.client.reference");function Xt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case El:switch(e=e.type,e){case ea:case na:case ta:case aa:case sa:return e;default:switch(e=e&&e.$$typeof,e){case ia:case oa:case ca:case la:return e;case ra:return e;default:return t}}case _l:return t}}}$e.ContextConsumer=ra,$e.ContextProvider=ia,$e.Element=El,$e.ForwardRef=oa,$e.Fragment=ea,$e.Lazy=ca,$e.Memo=la,$e.Portal=_l,$e.Profiler=na,$e.StrictMode=ta,$e.Suspense=aa,$e.SuspenseList=sa,$e.isContextConsumer=function(e){return Xt(e)===ra},$e.isContextProvider=function(e){return Xt(e)===ia},$e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===El},$e.isForwardRef=function(e){return Xt(e)===oa},$e.isFragment=function(e){return Xt(e)===ea},$e.isLazy=function(e){return Xt(e)===ca},$e.isMemo=function(e){return Xt(e)===la},$e.isPortal=function(e){return Xt(e)===_l},$e.isProfiler=function(e){return Xt(e)===na},$e.isStrictMode=function(e){return Xt(e)===ta},$e.isSuspense=function(e){return Xt(e)===aa},$e.isSuspenseList=function(e){return Xt(e)===sa},$e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ea||e===na||e===ta||e===aa||e===sa||e===TI||typeof e=="object"&&e!==null&&(e.$$typeof===ca||e.$$typeof===la||e.$$typeof===ia||e.$$typeof===ra||e.$$typeof===oa||e.$$typeof===EI||e.getModuleId!==void 0)},$e.typeOf=Xt,Hf.exports=$e;var Wf=Hf.exports;function ye(e){if(typeof e!="string")throw new Error(Zo(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Gf(e,t){var n,r;return V.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 _I=typeof window!="undefined"?V.useLayoutEffect:V.useEffect;let Yf=0;function kI(e){const[t,n]=V.useState(e),r=e||t;return V.useEffect(()=>{t==null&&(Yf+=1,n(`mui-${Yf}`))},[t]),r}const Kf=V.useId;function ji(e){if(Kf!==void 0){const t=Kf();return e!=null?e:t}return kI(e)}function kl({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=V.useRef(e!==void 0),[o,a]=V.useState(t),l=i?e:o,s=V.useCallback(c=>{i||a(c)},[]);return[l,s]}class Pl{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Pl}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let ua=!0,Dl=!1;const PI=new Pl,DI={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 OI(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&DI[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function RI(e){e.metaKey||e.altKey||e.ctrlKey||(ua=!0)}function Ol(){ua=!1}function MI(){this.visibilityState==="hidden"&&Dl&&(ua=!0)}function LI(e){e.addEventListener("keydown",RI,!0),e.addEventListener("mousedown",Ol,!0),e.addEventListener("pointerdown",Ol,!0),e.addEventListener("touchstart",Ol,!0),e.addEventListener("visibilitychange",MI,!0)}function BI(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return ua||OI(t)}function qf(){const e=V.useCallback(i=>{i!=null&&LI(i.ownerDocument)},[]),t=V.useRef(!1);function n(){return t.current?(Dl=!0,PI.start(100,()=>{Dl=!1}),t.current=!1,!0):!1}function r(i){return BI(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Qf(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]=Qf(i[a],o[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function lt(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,a)=>{if(a){const l=t(a);l!==""&&o.push(l),n&&n[a]&&o.push(n[a])}return o},[]).join(" ")}),r}const Jf=e=>e,$I=(()=>{let e=Jf;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Jf}}})(),NI={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 Xf(e,t,n="Mui"){const r=NI[t];return r?`${n}-${r}`:`${$I.generate(e)}-${t}`}function FI(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Xf(e,i,n)}),r}function Rl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,href:r,rootRef:i,tabIndex:o,to:a,type:l,rootElementName:s}=e,c=V.useRef(null),[d,f]=V.useState(!1),{isFocusVisibleRef:h,onFocus:p,onBlur:m,ref:g}=qf(),[v,S]=V.useState(!1);t&&!n&&v&&S(!1),V.useEffect(()=>{h.current=v},[v,h]);const[w,y]=II({rootElementName:s!=null?s:r||a?"a":void 0,componentName:"Button"}),C=N=>$=>{var B;v&&$.preventDefault(),(B=N.onMouseLeave)==null||B.call(N,$)},b=N=>$=>{var B;m($),h.current===!1&&S(!1),(B=N.onBlur)==null||B.call(N,$)},T=N=>$=>{var B;if(c.current||(c.current=$.currentTarget),p($),h.current===!0){var H;S(!0),(H=N.onFocusVisible)==null||H.call(N,$)}(B=N.onFocus)==null||B.call(N,$)},E=()=>{const N=c.current;return w==="BUTTON"||w==="INPUT"&&["button","submit","reset"].includes(N==null?void 0:N.type)||w==="A"&&(N==null?void 0:N.href)},P=N=>$=>{if(!t){var B;(B=N.onClick)==null||B.call(N,$)}},O=N=>$=>{var B;t||(f(!0),document.addEventListener("mouseup",()=>{f(!1)},{once:!0})),(B=N.onMouseDown)==null||B.call(N,$)},G=N=>$=>{var B;if((B=N.onKeyDown)==null||B.call(N,$),!$.defaultMuiPrevented&&($.target===$.currentTarget&&!E()&&$.key===" "&&$.preventDefault(),$.target===$.currentTarget&&$.key===" "&&!t&&f(!0),$.target===$.currentTarget&&!E()&&$.key==="Enter"&&!t)){var H;(H=N.onClick)==null||H.call(N,$),$.preventDefault()}},z=N=>$=>{var B;if($.target===$.currentTarget&&f(!1),(B=N.onKeyUp)==null||B.call(N,$),$.target===$.currentTarget&&!E()&&!t&&$.key===" "&&!$.defaultMuiPrevented){var H;(H=N.onClick)==null||H.call(N,$)}},A=sn(y,i,g,c),W={};return o!==void 0&&(W.tabIndex=o),w==="BUTTON"?(W.type=l!=null?l:"button",n?W["aria-disabled"]=t:W.disabled=t):w==="INPUT"?l&&["button","submit","reset"].includes(l)&&(n?W["aria-disabled"]=t:W.disabled=t):w!==""&&(!r&&!a&&(W.role="button",W.tabIndex=o!=null?o:0),t&&(W["aria-disabled"]=t,W.tabIndex=n?o!=null?o:0:-1)),{getRootProps:(N={})=>{const $=D({},Mn(e),Mn(N)),B=D({type:l},$,W,N,{onBlur:b($),onClick:P($),onFocus:T($),onKeyDown:G($),onKeyUp:z($),onMouseDown:O($),onMouseLeave:C($),ref:A});return delete B.onFocusVisible,B},focusVisible:v,setFocusVisible:S,active:d,rootRef:A}}function zI(e,t){return e===t}const Ml={},Zf=()=>{};function Ll(e,t){const n=D({},e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n}function jI(e){const{nextState:t,initialState:n,stateComparers:r,onStateChange:i,controlledProps:o,lastActionRef:a}=e,l=V.useRef(n);V.useEffect(()=>{if(a.current===null)return;const s=Ll(l.current,o);Object.keys(t).forEach(c=>{var d;const f=(d=r[c])!=null?d:zI,h=t[c],p=s[c];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,c,h,(g=a.current.type)!=null?g:"",t)}}),l.current=t,a.current=null},[l,t,a,i,r,o])}function VI(e){const t=V.useRef(null),{reducer:n,initialState:r,controlledProps:i=Ml,stateComparers:o=Ml,onStateChange:a=Zf,actionContext:l,componentName:s=""}=e;V.useRef(i);const c=V.useCallback((p,m)=>{t.current=m;const g=Ll(p,i);return n(g,m)},[i,n]),[d,f]=V.useReducer(c,r),h=V.useCallback(p=>{f(D({},p,{context:l}))},[l]);return jI({nextState:d,initialState:r,stateComparers:o!=null?o:Ml,onStateChange:a!=null?a:Zf,controlledProps:i,lastActionRef:t}),[Ll(d,i),h]}const UI=V.createContext(void 0);function HI(){return V.useContext(UI)}function WI(e={}){const{defaultValue:t,disabled:n=!1,error:r=!1,onBlur:i,onChange:o,onFocus:a,required:l=!1,value:s,inputRef:c}=e,d=HI();let f,h,p,m,g;if(d){var v,S,w;f=void 0,h=(v=d.disabled)!=null?v:!1,p=(S=d.error)!=null?S:!1,m=(w=d.required)!=null?w:!1,g=d.value}else f=t,h=n,p=r,m=l,g=s;const{current:y}=V.useRef(g!=null),C=V.useCallback(N=>{},[]),b=V.useRef(null),T=sn(b,c,C),[E,P]=V.useState(!1);V.useEffect(()=>{!d&&h&&E&&(P(!1),i==null||i())},[d,h,E,i]);const O=N=>$=>{var B;if(d!=null&&d.disabled){$.stopPropagation();return}if((B=N.onFocus)==null||B.call(N,$),d&&d.onFocus){var H;d==null||(H=d.onFocus)==null||H.call(d)}else P(!0)},G=N=>$=>{var B;(B=N.onBlur)==null||B.call(N,$),d&&d.onBlur?d.onBlur():P(!1)},z=N=>($,...B)=>{var H,q;if(!y&&($.target||b.current)==null)throw new Error(Zo(17));d==null||(H=d.onChange)==null||H.call(d,$),(q=N.onChange)==null||q.call(N,$,...B)},A=N=>$=>{var B;b.current&&$.currentTarget===$.target&&b.current.focus(),(B=N.onClick)==null||B.call(N,$)};return{disabled:h,error:p,focused:E,formControlContext:d,getInputProps:(N={})=>{const B=D({},{onBlur:i,onChange:o,onFocus:a},Mn(N)),H=D({},B,{onBlur:G(B),onChange:z(B),onFocus:O(B)});return D({},H,{"aria-invalid":p||void 0,defaultValue:f,value:g,required:m,disabled:h},N,{ref:T},H)},getRootProps:(N={})=>{const $=Mn(e,["onBlur","onChange","onFocus"]),B=D({},$,Mn(N));return D({},N,B,{onClick:A(B)})},inputRef:T,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 GI(e,t,n,r,i,o){if(n.length===0||!r&&n.every((l,s)=>i(l,s)))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:l,itemComparer:s,focusManagement:c}=n,d=c==="DOM"?0:-1,f=i.length-1,h=e==null?-1:i.findIndex(S=>s(S,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 S=h+t;S<0?!g&&h!==-1||Math.abs(t)>1?(p=0,m="next"):(p=f,m="previous"):S>f?!g||Math.abs(t)>1?(p=f,m="previous"):(p=0,m="next"):(p=S,m=t>=0?"next":"previous")}}const v=GI(p,m,i,l,o,g);return v===-1&&e!==null&&!o(e,h)?e:(r=i[v])!=null?r:null}function YI(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 eh(e,t,n){const{itemComparer:r,isItemDisabled:i,selectionMode:o,items:a}=n,{selectedValues:l}=t,s=a.findIndex(d=>r(e,d));if(i(e,s))return t;const c=YI(e,l,o,r);return D({},t,{selectedValues:c,highlightedValue:e})}function KI(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:eh(t.highlightedValue,t,n)}return t}function qI(e,t){return t.focusManagement==="DOM"?e:D({},e,{highlightedValue:null})}function QI(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 JI(e,t,n){const{items:r,isItemDisabled:i,disabledItemsFocusable:o,getItemAsString:a}=n,l=t.length>1;let s=l?e.highlightedValue:Dt(e.highlightedValue,1,n);for(let c=0;c<r.length;c+=1){if(!s||!l&&e.highlightedValue===s)return e;if(QI(s,t,a)&&(!i(s,r.indexOf(s))||o))return D({},e,{highlightedValue:s});s=Dt(s,1,n)}return e}function XI(e,t,n,r){var i;const{itemComparer:o,focusManagement:a}=r;let l=null;if(n.highlightedValue!=null){var s;l=(s=e.find(f=>o(f,n.highlightedValue)))!=null?s:null}else a==="DOM"&&t.length===0&&(l=Dt(null,"reset",r));const d=((i=n.selectedValues)!=null?i:[]).filter(f=>e.some(h=>o(h,f)));return D({},n,{highlightedValue:l,selectedValues:d})}function ZI(e,t){return D({},e,{highlightedValue:Dt(null,"reset",t)})}function eS(e,t){return D({},e,{highlightedValue:Dt(null,"end",t)})}function tS(e,t){return D({},e,{selectedValues:[],highlightedValue:Dt(null,"reset",t)})}function th(e,t){const{type:n,context:r}=t;switch(n){case yt.keyDown:return KI(t.key,e,r);case yt.itemClick:return eh(t.item,e,r);case yt.blur:return qI(e,r);case yt.textNavigation:return JI(e,t.searchString,r);case yt.itemsChange:return XI(t.items,t.previousItems,e,r);case yt.resetHighlight:return ZI(e,r);case yt.highlightLast:return eS(e,r);case yt.clearSelection:return tS(e,r);default:return e}}const nS=500;function rS(e){const t=V.useRef({searchString:"",lastTime:null});return V.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>nS?r.searchString=i:(r.searchString.length!==1||i!==r.searchString)&&(r.searchString+=i),r.lastTime=o,e(r.searchString,n)}},[e])}const nh={},iS=()=>{},oS=(e,t)=>e===t,aS=()=>!1,sS=e=>typeof e=="string"?e:String(e),lS=()=>({highlightedValue:null,selectedValues:[]});function cS(e){const{controlledProps:t=nh,disabledItemsFocusable:n=!1,disableListWrap:r=!1,focusManagement:i="activeDescendant",getInitialState:o=lS,getItemDomElement:a,getItemId:l,isItemDisabled:s=aS,rootRef:c,onStateChange:d=iS,items:f,itemComparer:h=oS,getItemAsString:p=sS,onChange:m,onHighlightChange:g,onItemsChange:v,orientation:S="vertical",pageSize:w=5,reducerActionContext:y=nh,selectionMode:C="single",stateReducer:b,componentName:T="useList"}=e,E=V.useRef(null),P=sn(c,E),O=V.useCallback((ae,J,le)=>{if(g==null||g(ae,J,le),i==="DOM"&&J!=null&&(le===yt.itemClick||le===yt.keyDown||le===yt.textNavigation)){var ne;a==null||(ne=a(J))==null||ne.focus()}},[a,g,i]),G=V.useMemo(()=>({highlightedValue:h,selectedValues:(ae,J)=>zf(ae,J,h)}),[h]),z=V.useCallback((ae,J,le,ne,ge)=>{switch(d==null||d(ae,J,le,ne,ge),J){case"highlightedValue":O(ae,le,ne);break;case"selectedValues":m==null||m(ae,le,ne);break}},[O,m,d]),A=V.useMemo(()=>({disabledItemsFocusable:n,disableListWrap:r,focusManagement:i,isItemDisabled:s,itemComparer:h,items:f,getItemAsString:p,onHighlightChange:O,orientation:S,pageSize:w,selectionMode:C,stateComparers:G}),[n,r,i,s,h,f,p,O,S,w,C,G]),W=o(),Y=b!=null?b:th,N=V.useMemo(()=>D({},y,A),[y,A]),[$,B]=VI({reducer:Y,actionContext:N,initialState:W,controlledProps:t,stateComparers:G,onStateChange:z,componentName:T}),{highlightedValue:H,selectedValues:q}=$,ee=rS((ae,J)=>B({type:yt.textNavigation,event:J,searchString:ae})),R=V.useRef([]);V.useEffect(()=>{zf(R.current,f,h)||(B({type:yt.itemsChange,event:null,items:f,previousItems:R.current}),R.current=f,v==null||v(f))},[f,h,B,v]);const L=ae=>J=>{var le;if((le=ae.onKeyDown)==null||le.call(ae,J),J.defaultMuiPrevented)return;const ne=["Home","End","PageUp","PageDown"];S==="vertical"?ne.push("ArrowUp","ArrowDown"):ne.push("ArrowLeft","ArrowRight"),i==="activeDescendant"&&ne.push(" ","Enter"),ne.includes(J.key)&&J.preventDefault(),B({type:yt.keyDown,key:J.key,event:J}),ee(J)},F=ae=>J=>{var le,ne;(le=ae.onBlur)==null||le.call(ae,J),!J.defaultMuiPrevented&&((ne=E.current)!=null&&ne.contains(J.relatedTarget)||B({type:yt.blur,event:J}))},U=(ae={})=>{const J=Mn(ae);return D({},ae,{"aria-activedescendant":i==="activeDescendant"&&H!=null?l(H):void 0,tabIndex:i==="DOM"?-1:0,ref:P},J,{onBlur:F(J),onKeyDown:L(J)})},te=V.useCallback(ae=>{const J=(q!=null?q:[]).some(ge=>ge!=null&&h(ae,ge)),le=H!=null&&h(ae,H);return{focusable:i==="DOM",highlighted:le,selected:J}},[h,q,H,i]),se=V.useMemo(()=>({dispatch:B,getItemState:te}),[B,te]);return V.useDebugValue({state:$}),{contextValue:se,dispatch:B,getRootProps:U,rootRef:P,state:$}}const rh=V.createContext(null);function uS(e){const{handlePointerOverEvents:t=!1,item:n}=e,r=V.useContext(rh);if(!r)throw new Error("useListItem must be used within a ListProvider");const{dispatch:i,getItemState:o}=r,{highlighted:a,selected:l,focusable:s}=o(n),c=V.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=V.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 s&&(f=a?0:-1),{getRootProps:(p={})=>{const m=Mn(p);return D({},p,{onClick:c(m),onPointerOver:t?d(m):void 0,tabIndex:f})},highlighted:a,selected:l}}const Bl=V.createContext(null);function dS(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 ih(){const[e,t]=V.useState(new Map),n=V.useRef(new Set),r=V.useCallback(function(c){n.current.delete(c),t(d=>{const f=new Map(d);return f.delete(c),f})},[]),i=V.useCallback(function(c,d){let f;return typeof c=="function"?f=c(n.current):f=c,n.current.add(f),t(h=>{const p=new Map(h);return p.set(f,d),p}),{id:f,deregister:()=>r(f)}},[r]),o=V.useMemo(()=>dS(e),[e]),a=V.useCallback(function(c){return Array.from(o.keys()).indexOf(c)},[o]);return{contextValue:V.useMemo(()=>({getItemIndex:a,registerItem:i,totalSubitemCount:e.size}),[a,i,e.size]),subitems:o}}function oh(e,t){const n=V.useContext(Bl);if(n===null)throw new Error("useCompoundItem must be used within a useCompoundParent");const{registerItem:r}=n,[i,o]=V.useState(typeof e=="function"?void 0:e);return _I(()=>{const{id:a,deregister:l}=r(e,t);return o(a),l},[r,t,e]),{id:i,index:i!==void 0?n.getItemIndex(i):-1,totalItemCount:n.totalSubitemCount}}function fS(e,t){return function(r={}){const i=D({},r,e(r));return D({},i,t(i))}}const hS=Math.min,pS=Math.max,da=Math.round,fa=Math.floor,ha=e=>({x:e,y:e});function gS(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 ah(e){return lh(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sh(e){var t;return(t=(lh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function lh(e){return e instanceof Node||e instanceof $n(e).Node}function mS(e){return e instanceof Element||e instanceof $n(e).Element}function $l(e){return e instanceof HTMLElement||e instanceof $n(e).HTMLElement}function ch(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function uh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Nl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function vS(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bS(e){return["html","body","#document"].includes(ah(e))}function Nl(e){return $n(e).getComputedStyle(e)}function yS(e){if(ah(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ch(e)&&e.host||sh(e);return ch(t)?t.host:t}function dh(e){const t=yS(e);return bS(t)?e.ownerDocument?e.ownerDocument.body:e.body:$l(t)&&uh(t)?t:dh(t)}function pa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=dh(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=$n(i);if(o){const l=Fl(a);return t.concat(a,a.visualViewport||[],uh(i)?i:[],l&&n?pa(l):[])}return t.concat(i,pa(i,[],n))}function Fl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function CS(e){const t=Nl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=$l(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=da(n)!==o||da(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function zl(e){return mS(e)?e:e.contextElement}function fh(e){const t=zl(e);if(!$l(t))return ha(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=CS(t);let a=(o?da(n.width):n.width)/r,l=(o?da(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const xS=ha(0);function wS(e){const t=$n(e);return!vS()||!t.visualViewport?xS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function IS(e,t,n){return!1}function hh(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=zl(e);let a=ha(1);t&&(a=fh(e));const l=IS()?wS(o):ha(0);let s=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(o){const h=$n(o),p=r;let m=h,g=Fl(m);for(;g&&r&&p!==m;){const v=fh(g),S=g.getBoundingClientRect(),w=Nl(g),y=S.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,C=S.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;s*=v.x,c*=v.y,d*=v.x,f*=v.y,s+=y,c+=C,m=$n(g),g=Fl(m)}}return gS({width:d,height:f,x:s,y:c})}function SS(e,t){let n=null,r;const i=sh(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),o();const{left:c,top:d,width:f,height:h}=e.getBoundingClientRect();if(l||t(),!f||!h)return;const p=fa(d),m=fa(i.clientWidth-(c+f)),g=fa(i.clientHeight-(d+h)),v=fa(c),w={rootMargin:-p+"px "+-m+"px "+-g+"px "+-v+"px",threshold:pS(0,hS(1,s))||1};let y=!0;function C(b){const T=b[0].intersectionRatio;if(T!==s){if(!y)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(C,X(j({},w),{root:i.ownerDocument}))}catch(b){n=new IntersectionObserver(C,w)}n.observe(e)}return a(!0),o}function AS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,c=zl(e),d=i||o?[...c?pa(c):[],...pa(t)]:[];d.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),o&&S.addEventListener("resize",n)});const f=c&&l?SS(c,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(S=>{let[w]=S;w&&w.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),n()}),c&&!s&&p.observe(c),p.observe(t));let m,g=s?hh(e):null;s&&v();function v(){const S=hh(e);g&&(S.x!==g.x||S.y!==g.y||S.width!==g.width||S.height!==g.height)&&n(),g=S,m=requestAnimationFrame(v)}return n(),()=>{var S;d.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),f==null||f(),(S=p)==null||S.disconnect(),p=null,s&&cancelAnimationFrame(m)}}function TS(e){const{checked:t,defaultChecked:n,disabled:r,onBlur:i,onChange:o,onFocus:a,onFocusVisible:l,readOnly:s,required:c}=e,[d,f]=kl({controlled:t,default:!!n,name:"Switch",state:"checked"}),h=P=>O=>{var G;O.nativeEvent.defaultPrevented||(f(O.target.checked),o==null||o(O),(G=P.onChange)==null||G.call(P,O))},{isFocusVisibleRef:p,onBlur:m,onFocus:g,ref:v}=qf(),[S,w]=V.useState(!1);r&&S&&w(!1),V.useEffect(()=>{p.current=S},[S,p]);const y=V.useRef(null),C=P=>O=>{var G;y.current||(y.current=O.currentTarget),g(O),p.current===!0&&(w(!0),l==null||l(O)),a==null||a(O),(G=P.onFocus)==null||G.call(P,O)},b=P=>O=>{var G;m(O),p.current===!1&&w(!1),i==null||i(O),(G=P.onBlur)==null||G.call(P,O)},T=sn(v,y);return{checked:d,disabled:!!r,focusVisible:S,getInputProps:(P={})=>D({checked:t,defaultChecked:n,disabled:r,readOnly:s,ref:T,required:c,type:"checkbox",role:"switch","aria-checked":t},P,{onChange:h(P),onFocus:C(P),onBlur:b(P)}),inputRef:T,readOnly:!!s}}function ES(e){const{value:t,defaultValue:n,onChange:r,orientation:i="horizontal",direction:o="ltr",selectionFollowsFocus:a=!1}=e,[l,s]=kl({controlled:t,default:n,name:"Tabs",state:"value"}),c=V.useCallback((v,S)=>{s(S),r==null||r(v,S)},[r,s]),{subitems:d,contextValue:f}=ih(),h=V.useRef(()=>{}),p=V.useCallback(v=>{var S;return(S=d.get(v))==null?void 0:S.id},[d]),m=V.useCallback(v=>h.current(v),[]),g=V.useCallback(v=>{h.current=v},[]);return{contextValue:D({direction:o,getTabId:m,getTabPanelId:p,onSelected:c,orientation:i,registerTabIdLookup:g,selectionFollowsFocus:a,value:l},f)}}const ph=V.createContext(null);function ga(){const e=V.useContext(ph);if(e==null)throw new Error("No TabsContext provided");return e}function _S(e){const{value:t,children:n}=e,{direction:r,getItemIndex:i,onSelected:o,orientation:a,registerItem:l,registerTabIdLookup:s,selectionFollowsFocus:c,totalSubitemCount:d,value:f,getTabId:h,getTabPanelId:p}=t,m=V.useMemo(()=>({getItemIndex:i,registerItem:l,totalSubitemCount:d}),[l,i,d]),g=V.useMemo(()=>({direction:r,getTabId:h,getTabPanelId:p,onSelected:o,orientation:a,registerTabIdLookup:s,selectionFollowsFocus:c,value:f}),[r,h,p,o,a,s,c,f]);return u.jsx(Bl.Provider,{value:m,children:u.jsx(ph.Provider,{value:g,children:n})})}function kS(e){return e.size}function PS(e){const{value:t,id:n,rootRef:r}=e,i=ga();if(i===null)throw new Error("No TabContext provided");const{value:o,getTabId:a}=i,l=ji(n),s=V.useRef(null),c=sn(s,r),d=V.useMemo(()=>({id:l,ref:s}),[l]),{id:f}=oh(t!=null?t:kS,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:l!=null?l:void 0},g,{ref:c}),rootRef:c}}const gh={valueChange:"valueChange"};function DS(e,t){if(t.type===gh.valueChange)return D({},e,{highlightedValue:t.value});const n=th(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 OS(e){var t;const{rootRef:n}=e,{direction:r="ltr",onSelected:i,orientation:o="horizontal",value:a,registerTabIdLookup:l,selectionFollowsFocus:s}=ga(),{subitems:c,contextValue:d}=ih(),f=V.useCallback(z=>{var A;return(A=c.get(z))==null?void 0:A.id},[c]);l(f);const h=V.useMemo(()=>Array.from(c.keys()),[c]),p=V.useCallback(z=>{var A,W;return z==null?null:(A=(W=c.get(z))==null?void 0:W.ref.current)!=null?A:null},[c]),m=r==="rtl";let g;o==="vertical"?g="vertical":g=m?"horizontal-rtl":"horizontal-ltr";const v=V.useCallback((z,A)=>{var W;i(z,(W=A[0])!=null?W:null)},[i]),S=V.useMemo(()=>a===void 0?{}:a!=null?{selectedValues:[a]}:{selectedValues:[]},[a]),w=V.useCallback(z=>{var A,W;return(A=(W=c.get(z))==null?void 0:W.disabled)!=null?A:!1},[c]),{contextValue:y,dispatch:C,getRootProps:b,state:{highlightedValue:T,selectedValues:E},rootRef:P}=cS({controlledProps:S,disabledItemsFocusable:!s,focusManagement:"DOM",getItemDomElement:p,isItemDisabled:w,items:h,rootRef:n,onChange:v,orientation:g,reducerActionContext:V.useMemo(()=>({selectionFollowsFocus:s||!1}),[s]),selectionMode:"single",stateReducer:DS});V.useEffect(()=>{a!==void 0&&a!=null&&C({type:gh.valueChange,value:a})},[C,a]);const O=(z={})=>D({},z,b(z),{"aria-orientation":o==="vertical"?"vertical":void 0,role:"tablist"});return{contextValue:V.useMemo(()=>D({},d,y),[d,y]),dispatch:C,getRootProps:O,highlightedValue:T,isRtl:m,orientation:o,rootRef:P,selectedValue:(t=E[0])!=null?t:null}}function RS(e){const{value:t,children:n}=e,{dispatch:r,getItemIndex:i,getItemState:o,registerItem:a,totalSubitemCount:l}=t,s=V.useMemo(()=>({dispatch:r,getItemState:o,getItemIndex:i}),[r,i,o]),c=V.useMemo(()=>({getItemIndex:i,registerItem:a,totalSubitemCount:l}),[a,i,l]);return u.jsx(Bl.Provider,{value:c,children:u.jsx(rh.Provider,{value:s,children:n})})}function MS(e){return e.size}function LS(e){const{value:t,rootRef:n,disabled:r=!1,id:i}=e,o=V.useRef(null),a=ji(i),{value:l,selectionFollowsFocus:s,getTabPanelId:c}=ga(),d=V.useMemo(()=>({disabled:r,ref:o,id:a}),[r,o,a]),{id:f,index:h,totalItemCount:p}=oh(t!=null?t:MS,d),{getRootProps:m,highlighted:g,selected:v}=uS({item:f}),{getRootProps:S,rootRef:w,active:y,focusVisible:C,setFocusVisible:b}=Rl({disabled:r,focusableWhenDisabled:!s,type:"button"}),T=sn(o,n,w),E=f!==void 0?c(f):void 0;return{getRootProps:(O={})=>{const G=Mn(O),z=fS(m,S);return D({},O,z(G),{role:"tab","aria-controls":E,"aria-selected":v,id:a,ref:T})},active:y,focusVisible:C,highlighted:g,index:h,rootRef:T,selected:v||f===l,setFocusVisible:b,totalTabsCount:p}}const mh="$$joy";function BS(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}function $S(e,t){return Lt(e,t)}const NS=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},FS=["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 vh(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ae(e,FS),o=zS(t),a=Object.keys(o);function l(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function s(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function c(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?c(h,a[a.indexOf(h)+1]):l(h)}function f(h){const p=a.indexOf(h);return p===0?l(a[1]):p===a.length-1?s(a[p]):c(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return D({keys:a,values:o,up:l,down:s,between:c,only:d,not:f,unit:n},i)}const jS={borderRadius:4};function Vi(e,t){return t?Bn(e,t,{clone:!1}):e}const jl={xs:0,sm:600,md:900,lg:1200,xl:1536},bh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${jl[e]}px)`};function Nn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||bh;return t.reduce((a,l,s)=>(a[o.up(o.keys[s])]=n(t[s]),a),{})}if(typeof t=="object"){const o=r.breakpoints||bh;return Object.keys(t).reduce((a,l)=>{if(Object.keys(o.values||jl).indexOf(l)!==-1){const s=o.up(l);a[s]=n(t[l],l)}else{const s=l;a[s]=t[s]}return a},{})}return n(t)}function VS(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function US(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Zn(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 ma(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Zn(e,n)||r,t&&(i=t(i,r,e)),i}function rt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const l=a[t],s=a.theme,c=Zn(s,r)||{};return Nn(a,l,f=>{let h=ma(c,i,f);return f===h&&typeof f=="string"&&(h=ma(c,i,`${t}${f==="default"?"":ye(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function HS(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const WS={m:"margin",p:"padding"},GS={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},yh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},YS=HS(e=>{if(e.length>2)if(yh[e])e=yh[e];else return[e];const[t,n]=e.split(""),r=WS[t],i=GS[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Vl=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ul=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Vl,...Ul];function Ui(e,t,n,r){var i;const o=(i=Zn(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 Ch(e){return Ui(e,"spacing",8)}function Hi(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 KS(e,t){return n=>e.reduce((r,i)=>(r[i]=Hi(t,n),r),{})}function qS(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=YS(n),o=KS(i,r),a=e[n];return Nn(e,a,o)}function xh(e,t){const n=Ch(e.theme);return Object.keys(e).map(r=>qS(e,t,r,n)).reduce(Vi,{})}function Qe(e){return xh(e,Vl)}Qe.propTypes={},Qe.filterProps=Vl;function Je(e){return xh(e,Ul)}Je.propTypes={},Je.filterProps=Ul;function wh(e=8){if(e.mui)return e;const t=Ch({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 va(...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]?Vi(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 rt({prop:e,themeKey:"borders",transform:t})}const QS=en("border",Zt),JS=en("borderTop",Zt),XS=en("borderRight",Zt),ZS=en("borderBottom",Zt),eA=en("borderLeft",Zt),tA=en("borderColor"),nA=en("borderTopColor"),rA=en("borderRightColor"),iA=en("borderBottomColor"),oA=en("borderLeftColor"),aA=en("outline",Zt),sA=en("outlineColor"),ba=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ui(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Hi(t,r)});return Nn(e,e.borderRadius,n)}return null};ba.propTypes={},ba.filterProps=["borderRadius"],va(QS,JS,XS,ZS,eA,tA,nA,rA,iA,oA,ba,aA,sA);const ya=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({gap:Hi(t,r)});return Nn(e,e.gap,n)}return null};ya.propTypes={},ya.filterProps=["gap"];const Ca=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({columnGap:Hi(t,r)});return Nn(e,e.columnGap,n)}return null};Ca.propTypes={},Ca.filterProps=["columnGap"];const xa=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({rowGap:Hi(t,r)});return Nn(e,e.rowGap,n)}return null};xa.propTypes={},xa.filterProps=["rowGap"];const lA=rt({prop:"gridColumn"}),cA=rt({prop:"gridRow"}),uA=rt({prop:"gridAutoFlow"}),dA=rt({prop:"gridAutoColumns"}),fA=rt({prop:"gridAutoRows"}),hA=rt({prop:"gridTemplateColumns"}),pA=rt({prop:"gridTemplateRows"}),gA=rt({prop:"gridTemplateAreas"}),mA=rt({prop:"gridArea"});va(ya,Ca,xa,lA,cA,uA,dA,fA,hA,pA,gA,mA);function zr(e,t){return t==="grey"?t:e}const vA=rt({prop:"color",themeKey:"palette",transform:zr}),bA=rt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:zr}),yA=rt({prop:"backgroundColor",themeKey:"palette",transform:zr});va(vA,bA,yA);function Ht(e){return e<=1&&e!==0?`${e*100}%`:e}const CA=rt({prop:"width",transform:Ht}),Hl=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])||jl[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 Nn(e,e.maxWidth,t)}return null};Hl.filterProps=["maxWidth"];const xA=rt({prop:"minWidth",transform:Ht}),wA=rt({prop:"height",transform:Ht}),IA=rt({prop:"maxHeight",transform:Ht}),SA=rt({prop:"minHeight",transform:Ht});rt({prop:"size",cssProperty:"width",transform:Ht}),rt({prop:"size",cssProperty:"height",transform:Ht});const AA=rt({prop:"boxSizing"});va(CA,Hl,xA,wA,IA,SA,AA);const wa={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:ba},color:{themeKey:"palette",transform:zr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:zr},backgroundColor:{themeKey:"palette",transform:zr},p:{style:Je},pt:{style:Je},pr:{style:Je},pb:{style:Je},pl:{style:Je},px:{style:Je},py:{style:Je},padding:{style:Je},paddingTop:{style:Je},paddingRight:{style:Je},paddingBottom:{style:Je},paddingLeft:{style:Je},paddingX:{style:Je},paddingY:{style:Je},paddingInline:{style:Je},paddingInlineStart:{style:Je},paddingInlineEnd:{style:Je},paddingBlock:{style:Je},paddingBlockStart:{style:Je},paddingBlockEnd:{style:Je},m:{style:Qe},mt:{style:Qe},mr:{style:Qe},mb:{style:Qe},ml:{style:Qe},mx:{style:Qe},my:{style:Qe},margin:{style:Qe},marginTop:{style:Qe},marginRight:{style:Qe},marginBottom:{style:Qe},marginLeft:{style:Qe},marginX:{style:Qe},marginY:{style:Qe},marginInline:{style:Qe},marginInlineStart:{style:Qe},marginInlineEnd:{style:Qe},marginBlock:{style:Qe},marginBlockStart:{style:Qe},marginBlockEnd:{style:Qe},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:ya},rowGap:{style:xa},columnGap:{style:Ca},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:Hl},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 TA(...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 EA(e,t){return typeof e=="function"?e(t):e}function _A(){function e(n,r,i,o){const a={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:s=n,themeKey:c,transform:d,style:f}=l;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Zn(i,c)||{};return f?f(a):Nn(a,r,m=>{let g=ma(h,d,m);return m===g&&typeof m=="string"&&(g=ma(h,d,`${n}${m==="default"?"":ye(m)}`,m)),s===!1?g:{[s]:g}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:wa;function l(s){let c=s;if(typeof s=="function")c=s(o);else if(typeof s!="object")return s;if(!c)return null;const d=VS(o.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const m=EA(c[p],o);if(m!=null)if(typeof m=="object")if(a[p])h=Vi(h,e(p,m,o,a));else{const g=Nn({theme:o},m,v=>({[p]:v}));TA(g,m)?h[p]=t({sx:m,theme:o}):h=Vi(h,g)}else h=Vi(h,e(p,m,o,a))}),US(f,h)}return Array.isArray(i)?i.map(l):l(i)}return t}const Ia=_A();Ia.filterProps=["sx"];function Ih(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 kA=["breakpoints","palette","spacing","shape"];function Sh(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=Ae(e,kA),l=vh(n),s=wh(i);let c=Bn({breakpoints:l,direction:"ltr",components:{},palette:D({mode:"light"},r),spacing:s,shape:D({},jS,o)},a);return c.applyStyles=Ih,c=t.reduce((d,f)=>Bn(d,f),c),c.unstable_sxConfig=D({},wa,a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(f){return Ia({sx:f,theme:this})},c}function PA(e){return Object.keys(e).length===0}function DA(e=null){const t=V.useContext(pe.ThemeContext);return!t||PA(t)?e:t}const OA=Sh();function RA(e=OA){return DA(e)}const MA=["sx"],LA=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:wa;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function BA(e){const{sx:t}=e,n=Ae(e,MA),{systemProps:r,otherProps:i}=LA(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...a)=>{const l=t(...a);return Xn(l)?D({},r,l):r}:o=D({},r,t),D({},i,{sx:o})}const $A=["ownerState"],NA=["variants"],FA=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function zA(e){return Object.keys(e).length===0}function jA(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const VA=Sh(),UA=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Sa({defaultTheme:e,theme:t,themeId:n}){return zA(t)?e:t[n]||t}function HA(e){return e?(t,n)=>n[e]:null}function Aa(e,t){let{ownerState:n}=t,r=Ae(t,$A);const i=typeof e=="function"?e(D({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Aa(o,D({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let l=Ae(i,NA);return o.forEach(s=>{let c=!0;typeof s.props=="function"?c=s.props(D({ownerState:n},r,n)):Object.keys(s.props).forEach(d=>{(n==null?void 0:n[d])!==s.props[d]&&r[d]!==s.props[d]&&(c=!1)}),c&&(Array.isArray(l)||(l=[l]),l.push(typeof s.style=="function"?s.style(D({ownerState:n},r,n)):s.style))}),l}return i}function WA(e={}){const{themeId:t,defaultTheme:n=VA,rootShouldForwardProp:r=Wl,slotShouldForwardProp:i=Wl}=e,o=a=>Ia(D({},a,{theme:Sa(D({},a,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(a,l={})=>{NS(a,b=>b.filter(T=>!(T!=null&&T.__mui_systemSx)));const{name:s,slot:c,skipVariantsResolver:d,skipSx:f,overridesResolver:h=HA(UA(c))}=l,p=Ae(l,FA),m=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,g=f||!1;let v,S=Wl;c==="Root"||c==="root"?S=r:c?S=i:jA(a)&&(S=void 0);const w=$S(a,D({shouldForwardProp:S,label:v},p)),y=b=>typeof b=="function"&&b.__emotion_real!==b||Xn(b)?T=>Aa(b,D({},T,{theme:Sa({theme:T.theme,defaultTheme:n,themeId:t})})):b,C=(b,...T)=>{let E=y(b);const P=T?T.map(y):[];s&&h&&P.push(z=>{const A=Sa(D({},z,{defaultTheme:n,themeId:t}));if(!A.components||!A.components[s]||!A.components[s].styleOverrides)return null;const W=A.components[s].styleOverrides,Y={};return Object.entries(W).forEach(([N,$])=>{Y[N]=Aa($,D({},z,{theme:A}))}),h(z,Y)}),s&&!m&&P.push(z=>{var A;const W=Sa(D({},z,{defaultTheme:n,themeId:t})),Y=W==null||(A=W.components)==null||(A=A[s])==null?void 0:A.variants;return Aa({variants:Y},D({},z,{theme:W}))}),g||P.push(o);const O=P.length-T.length;if(Array.isArray(b)&&O>0){const z=new Array(O).fill("");E=[...b,...z],E.raw=[...b.raw,...z]}const G=w(E,...P);return a.muiName&&(G.muiName=a.muiName),G};return w.withConfig&&(C.withConfig=w.withConfig),C}}function GA(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Qf(t.components[n].defaultProps,r)}function YA({props:e,name:t,defaultTheme:n,themeId:r}){let i=RA(n);return r&&(i=i[r]||i),GA({theme:i,name:t,props:e})}function KA(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 Ah(e){if(e.type)return e;if(e.charAt(0)==="#")return Ah(KA(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Zo(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(Zo(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const mr=e=>{const t=Ah(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};function Gl(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 Th=(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])})},qA=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([l,s])=>{(!n||n&&!n([...o,l]))&&s!=null&&(typeof s=="object"&&Object.keys(s).length>0?r(s,[...o,l],Array.isArray(s)?[...a,l]:a):t([...o,l],s,a))})}r(e)},QA=(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 Yl(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return qA(e,(l,s,c)=>{if((typeof s=="string"||typeof s=="number")&&(!r||!r(l,s))){const d=`--${n?`${n}-`:""}${l.join("-")}`;Object.assign(i,{[d]:QA(l,s)}),Th(o,l,`var(${d})`,c),Th(a,l,`var(${d}, ${s})`,c)}},l=>l[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function vr(e){"@babel/helpers - typeof";return vr=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},vr(e)}function JA(e,t){if(vr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Kl(e){var t=JA(e,"string");return vr(t)=="symbol"?t:t+""}const XA=["colorSchemes","components","defaultColorScheme"];function ZA(e,t){const{colorSchemes:n={},defaultColorScheme:r="light"}=e,i=Ae(e,XA),{vars:o,css:a,varsWithDefaults:l}=Yl(i,t);let s=l;const c={},{[r]:d}=n,f=Ae(n,[r].map(Kl));if(Object.entries(f||{}).forEach(([p,m])=>{const{vars:g,css:v,varsWithDefaults:S}=Yl(m,t);s=Bn(s,S),c[p]={css:v,vars:g}}),d){const{css:p,vars:m,varsWithDefaults:g}=Yl(d,t);s=Bn(s,g),c[r]={css:p,vars:m}}return{vars:s,generateCssVars:p=>{var m;if(!p){var g;const S=D({},a);return{css:S,vars:o,selector:(t==null||(g=t.getSelector)==null?void 0:g.call(t,p,S))||":root"}}const v=D({},c[p].css);return{css:v,vars:c[p].vars,selector:(t==null||(m=t.getSelector)==null?void 0:m.call(t,p,v))||":root"}}}}const e1=D({},wa,{borderRadius:{themeKey:"radius"},boxShadow:{themeKey:"shadow"},fontFamily:{themeKey:"fontFamily"},fontSize:{themeKey:"fontSize"},fontWeight:{themeKey:"fontWeight"},letterSpacing:{themeKey:"letterSpacing"},lineHeight:{themeKey:"lineHeight"}}),Wi={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 t1(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 it=(e,t)=>Xf(e,t,"Mui"),Xe=(e,t)=>FI(e,t,"Mui"),n1=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))$/)}),Eh=(e,t,n)=>{t.includes("Color")&&(e.color=n),t.includes("Bg")&&(e.backgroundColor=n),t.includes("Border")&&(e.borderColor=n)},_h=(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")),Eh(r,i,a)}}),r},Tt=(e,t)=>{let n={};if(t){const{getCssVar:r,palette:i}=t;Object.entries(i).forEach(o=>{const[a,l]=o;n1(l)&&typeof l=="object"&&(n=D({},n,{[a]:_h(e,l,s=>`var(--variant-${s}, ${r(`palette-${a}-${s}`,i[a][s])})`)}))})}return n.context=_h(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},r1=["cssVarPrefix","breakpoints","spacing","components","variants","shouldSkipGeneratingVar"],i1=["colorSchemes"],o1=(e="joy")=>Gl(e);function a1(e){var t,n,r,i,o,a,l,s,c,d;const f={},{cssVarPrefix:h="joy",breakpoints:p,spacing:m,components:g,variants:v,shouldSkipGeneratingVar:S=t1}=f,w=Ae(f,r1),y=o1(h),C={primary:Wi.blue,neutral:Wi.grey,danger:Wi.red,success:Wi.green,warning:Wi.yellow,common:{white:"#FFF",black:"#000"}},b=J=>{var le;const ne=J.split("-"),ge=ne[1],Se=ne[2];return y(J,(le=C[ge])==null?void 0:le[Se])},T=J=>({plainColor:b(`palette-${J}-500`),plainHoverBg:b(`palette-${J}-100`),plainActiveBg:b(`palette-${J}-200`),plainDisabledColor:b("palette-neutral-400"),outlinedColor:b(`palette-${J}-500`),outlinedBorder:b(`palette-${J}-300`),outlinedHoverBg:b(`palette-${J}-100`),outlinedActiveBg:b(`palette-${J}-200`),outlinedDisabledColor:b("palette-neutral-400"),outlinedDisabledBorder:b("palette-neutral-200"),softColor:b(`palette-${J}-700`),softBg:b(`palette-${J}-100`),softHoverBg:b(`palette-${J}-200`),softActiveColor:b(`palette-${J}-800`),softActiveBg:b(`palette-${J}-300`),softDisabledColor:b("palette-neutral-400"),softDisabledBg:b("palette-neutral-50"),solidColor:b("palette-common-white"),solidBg:b(`palette-${J}-500`),solidHoverBg:b(`palette-${J}-600`),solidActiveBg:b(`palette-${J}-700`),solidDisabledColor:b("palette-neutral-400"),solidDisabledBg:b("palette-neutral-100")}),E=J=>({plainColor:b(`palette-${J}-300`),plainHoverBg:b(`palette-${J}-800`),plainActiveBg:b(`palette-${J}-700`),plainDisabledColor:b("palette-neutral-500"),outlinedColor:b(`palette-${J}-200`),outlinedBorder:b(`palette-${J}-700`),outlinedHoverBg:b(`palette-${J}-800`),outlinedActiveBg:b(`palette-${J}-700`),outlinedDisabledColor:b("palette-neutral-500"),outlinedDisabledBorder:b("palette-neutral-800"),softColor:b(`palette-${J}-200`),softBg:b(`palette-${J}-800`),softHoverBg:b(`palette-${J}-700`),softActiveColor:b(`palette-${J}-100`),softActiveBg:b(`palette-${J}-600`),softDisabledColor:b("palette-neutral-500"),softDisabledBg:b("palette-neutral-800"),solidColor:b("palette-common-white"),solidBg:b(`palette-${J}-500`),solidHoverBg:b(`palette-${J}-600`),solidActiveBg:b(`palette-${J}-700`),solidDisabledColor:b("palette-neutral-500"),solidDisabledBg:b("palette-neutral-800")}),P={palette:{mode:"light",primary:D({},C.primary,T("primary")),neutral:D({},C.neutral,T("neutral"),{plainColor:b("palette-neutral-700"),plainHoverColor:b("palette-neutral-900"),outlinedColor:b("palette-neutral-700")}),danger:D({},C.danger,T("danger")),success:D({},C.success,T("success")),warning:D({},C.warning,T("warning")),common:{white:"#FFF",black:"#000"},text:{primary:b("palette-neutral-800"),secondary:b("palette-neutral-700"),tertiary:b("palette-neutral-600"),icon:b("palette-neutral-500")},background:{body:b("palette-common-white"),surface:b("palette-neutral-50"),popup:b("palette-common-white"),level1:b("palette-neutral-100"),level2:b("palette-neutral-200"),level3:b("palette-neutral-300"),tooltip:b("palette-neutral-500"),backdrop:`rgba(${y("palette-neutral-darkChannel",mr(C.neutral[900]))} / 0.25)`},divider:`rgba(${y("palette-neutral-mainChannel",mr(C.neutral[500]))} / 0.2)`,focusVisible:b("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"21 21 21",shadowOpacity:"0.08"},O={palette:{mode:"dark",primary:D({},C.primary,E("primary")),neutral:D({},C.neutral,E("neutral"),{plainColor:b("palette-neutral-300"),plainHoverColor:b("palette-neutral-300")}),danger:D({},C.danger,E("danger")),success:D({},C.success,E("success")),warning:D({},C.warning,E("warning")),common:{white:"#FFF",black:"#000"},text:{primary:b("palette-neutral-100"),secondary:b("palette-neutral-300"),tertiary:b("palette-neutral-400"),icon:b("palette-neutral-400")},background:{body:b("palette-common-black"),surface:b("palette-neutral-900"),popup:b("palette-common-black"),level1:b("palette-neutral-800"),level2:b("palette-neutral-700"),level3:b("palette-neutral-600"),tooltip:b("palette-neutral-600"),backdrop:`rgba(${y("palette-neutral-darkChannel",mr(C.neutral[50]))} / 0.25)`},divider:`rgba(${y("palette-neutral-mainChannel",mr(C.neutral[500]))} / 0.16)`,focusVisible:b("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"0 0 0",shadowOpacity:"0.6"},G='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',z=D({body:`"Inter", ${y(`fontFamily-fallback, ${G}`)}`,display:`"Inter", ${y(`fontFamily-fallback, ${G}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:G},w.fontFamily),A=D({sm:300,md:500,lg:600,xl:700},w.fontWeight),W=D({xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem"},w.fontSize),Y=D({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},w.lineHeight),N=(t=(n=w.colorSchemes)==null||(n=n.light)==null?void 0:n.shadowRing)!=null?t:P.shadowRing,$=(r=(i=w.colorSchemes)==null||(i=i.light)==null?void 0:i.shadowChannel)!=null?r:P.shadowChannel,B=(o=(a=w.colorSchemes)==null||(a=a.light)==null?void 0:a.shadowOpacity)!=null?o:P.shadowOpacity,H={colorSchemes:{light:P,dark:O},fontSize:W,fontFamily:z,fontWeight:A,focus:{thickness:"2px",selector:`&.${it("","focusVisible")}, &:focus-visible`,default:{outlineOffset:`var(--focus-outline-offset, ${y("focus-thickness",(l=(s=w.focus)==null?void 0:s.thickness)!=null?l:"2px")})`,outline:`${y("focus-thickness",(c=(d=w.focus)==null?void 0:d.thickness)!=null?c:"2px")} solid ${y("palette-focusVisible",C.primary[500])}`}},lineHeight:Y,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${y("shadowRing",N)}, 0px 1px 2px 0px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`,sm:`${y("shadowRing",N)}, 0px 1px 2px 0px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)}), 0px 2px 4px 0px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`,md:`${y("shadowRing",N)}, 0px 2px 8px -2px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)}), 0px 6px 12px -2px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`,lg:`${y("shadowRing",N)}, 0px 2px 8px -2px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)}), 0px 12px 16px -4px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`,xl:`${y("shadowRing",N)}, 0px 2px 8px -2px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)}), 0px 20px 24px -4px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,snackbar:1400,tooltip:1500},typography:{h1:{fontFamily:y(`fontFamily-display, ${z.display}`),fontWeight:y(`fontWeight-xl, ${A.xl}`),fontSize:y(`fontSize-xl4, ${W.xl4}`),lineHeight:y(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${P.palette.text.primary}`)},h2:{fontFamily:y(`fontFamily-display, ${z.display}`),fontWeight:y(`fontWeight-xl, ${A.xl}`),fontSize:y(`fontSize-xl3, ${W.xl3}`),lineHeight:y(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${P.palette.text.primary}`)},h3:{fontFamily:y(`fontFamily-display, ${z.display}`),fontWeight:y(`fontWeight-lg, ${A.lg}`),fontSize:y(`fontSize-xl2, ${W.xl2}`),lineHeight:y(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${P.palette.text.primary}`)},h4:{fontFamily:y(`fontFamily-display, ${z.display}`),fontWeight:y(`fontWeight-lg, ${A.lg}`),fontSize:y(`fontSize-xl, ${W.xl}`),lineHeight:y(`lineHeight-md, ${Y.md}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${P.palette.text.primary}`)},"title-lg":{fontFamily:y(`fontFamily-body, ${z.body}`),fontWeight:y(`fontWeight-lg, ${A.lg}`),fontSize:y(`fontSize-lg, ${W.lg}`),lineHeight:y(`lineHeight-xs, ${Y.xs}`),color:y(`palette-text-primary, ${P.palette.text.primary}`)},"title-md":{fontFamily:y(`fontFamily-body, ${z.body}`),fontWeight:y(`fontWeight-md, ${A.md}`),fontSize:y(`fontSize-md, ${W.md}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-primary, ${P.palette.text.primary}`)},"title-sm":{fontFamily:y(`fontFamily-body, ${z.body}`),fontWeight:y(`fontWeight-md, ${A.md}`),fontSize:y(`fontSize-sm, ${W.sm}`),lineHeight:y(`lineHeight-sm, ${Y.sm}`),color:y(`palette-text-primary, ${P.palette.text.primary}`)},"body-lg":{fontFamily:y(`fontFamily-body, ${z.body}`),fontSize:y(`fontSize-lg, ${W.lg}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-secondary, ${P.palette.text.secondary}`)},"body-md":{fontFamily:y(`fontFamily-body, ${z.body}`),fontSize:y(`fontSize-md, ${W.md}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-secondary, ${P.palette.text.secondary}`)},"body-sm":{fontFamily:y(`fontFamily-body, ${z.body}`),fontSize:y(`fontSize-sm, ${W.sm}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-tertiary, ${P.palette.text.tertiary}`)},"body-xs":{fontFamily:y(`fontFamily-body, ${z.body}`),fontWeight:y(`fontWeight-md, ${A.md}`),fontSize:y(`fontSize-xs, ${W.xs}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-tertiary, ${P.palette.text.tertiary}`)}}},q=w?Bn(H,w):H,{colorSchemes:ee}=q,R=Ae(q,i1),L=D({colorSchemes:ee},R,{breakpoints:vh(p!=null?p:{}),components:Bn({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:J,theme:le})=>{var ne;const ge=J.instanceFontSize;return D({margin:"var(--Icon-margin)"},J.fontSize&&J.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${le.vars.fontSize[J.fontSize]})`},!J.htmlColor&&D({color:`var(--Icon-color, ${L.vars.palette.text.icon})`},J.color&&J.color!=="inherit"&&le.vars.palette[J.color]&&{color:`rgba(${(ne=le.vars.palette[J.color])==null?void 0:ne.mainChannel} / 1)`}),ge&&ge!=="inherit"&&{"--Icon-fontSize":le.vars.fontSize[ge]})}}}},g),cssVarPrefix:h,getCssVar:y,spacing:wh(m)});function F(J,le){Object.keys(le).forEach(ne=>{const ge={main:"500",light:"200",dark:"700"};J==="dark"&&(ge.main=400),!le[ne].mainChannel&&le[ne][ge.main]&&(le[ne].mainChannel=mr(le[ne][ge.main])),!le[ne].lightChannel&&le[ne][ge.light]&&(le[ne].lightChannel=mr(le[ne][ge.light])),!le[ne].darkChannel&&le[ne][ge.dark]&&(le[ne].darkChannel=mr(le[ne][ge.dark]))})}Object.entries(L.colorSchemes).forEach(([J,le])=>{F(J,le.palette)});const U={prefix:h,shouldSkipGeneratingVar:S},{vars:te,generateCssVars:se}=ZA(D({colorSchemes:ee},R),U);L.vars=te,L.generateCssVars=se,L.unstable_sxConfig=D({},e1,void 0),L.unstable_sx=function(le){return Ia({sx:le,theme:this})},L.getColorSchemeSelector=J=>J==="light"?"&":`&[data-joy-color-scheme="${J}"], [data-joy-color-scheme="${J}"] &`;const ae={getCssVar:y,palette:L.colorSchemes.light.palette};return L.variants=Bn({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)},v),L.palette=D({},L.colorSchemes.light.palette,{colorScheme:"light"}),L.shouldSkipGeneratingVar=S,L.applyStyles=Ih,L}const kh=a1(),be=WA({defaultTheme:kh,themeId:mh});function ct({props:e,name:t}){return YA({props:e,name:t,defaultTheme:D({},kh,{components:{}}),themeId:mh})}function s1(e){return it("MuiAccordion",e)}const l1=Xe("MuiAccordion",["root","expanded","disabled"]),c1=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],u1=["component","slots","slotProps"],d1=["component"];function Ie(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:l}=t,s=Ae(t,c1),{component:c,slots:d={[e]:void 0},slotProps:f={[e]:void 0}}=o,h=Ae(o,u1),p=d[e]||r,m=wI(f[e],i),g=AI(D({className:n},s,{externalForwardedProps:e==="root"?h:void 0,externalSlotProps:m})),{props:{component:v},internalRef:S}=g,w=Ae(g.props,d1),y=sn(S,m==null?void 0:m.ref,t.ref),C=a?a(w):{},b=D({},i,C),T=e==="root"?v||c:v,E=xI(p,D({},e==="root"&&!c&&!d[e]&&l,e!=="root"&&!d[e]&&l,w,T&&{as:T},{ref:y}),b);return Object.keys(C).forEach(P=>{delete E[P]}),[p,E]}const ql=V.createContext({});function f1(e){return it("MuiListItem",e)}const Ph=Xe("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),Ta=V.createContext(!1),Ql=V.createContext(!1),Dh=V.createContext(!1),Oh=V.createContext(void 0),h1=V.createContext(void 0),Rh=V.createContext(void 0),p1=["component","className","children","nested","sticky","variant","color","startAction","endAction","role","slots","slotProps"],g1=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 lt(a,f1,{})},Jl=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})`},{[`.${Ph.nested} > &`]:{"--_ListItem-display":"flex"}}),(n=e.variants[t.variant])==null?void 0:n[t.color]]}),m1=be(Jl,{name:"JoyListItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),v1=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})),b1=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%)"})),Mh=V.forwardRef(function(t,n){const r=ct({props:t,name:"JoyListItem"}),i=V.useContext(Rh),o=V.useContext(Oh),a=V.useContext(Ql),l=V.useContext(Dh),s=V.useContext(Ta),{component:c,className:d,children:f,nested:h=!1,sticky:p=!1,variant:m="plain",color:g="neutral",startAction:v,endAction:S,role:w,slots:y={},slotProps:C={}}=r,b=Ae(r,p1),[T,E]=V.useState(""),[P,O]=(o==null?void 0:o.split(":"))||["",""],G=c||(P&&!P.match(/^(ul|ol|menu)$/)?"div":void 0);let z=i==="menu"?"none":void 0;o&&(z={menu:"none",menubar:"none",group:"presentation"}[O]),w&&(z=w);const A=D({},r,{sticky:p,startAction:v,endAction:S,row:a,wrap:l,variant:m,color:g,nesting:s,nested:h,component:G,role:z}),W=g1(A),Y=D({},b,{component:G,slots:y,slotProps:C}),[N,$]=Ie("root",{additionalProps:{role:z},ref:n,className:Ln(W.root,d),elementType:m1,externalForwardedProps:Y,ownerState:A}),[B,H]=Ie("startAction",{className:W.startAction,elementType:v1,externalForwardedProps:Y,ownerState:A}),[q,ee]=Ie("endAction",{className:W.endAction,elementType:b1,externalForwardedProps:Y,ownerState:A});return u.jsx(h1.Provider,{value:E,children:u.jsx(Ta.Provider,{value:h?T||!0:!1,children:u.jsxs(N,D({},$,{children:[v&&u.jsx(B,D({},H,{children:v})),V.Children.map(f,(R,L)=>{var F;return V.isValidElement(R)?V.cloneElement(R,D({},L===0&&{"data-first-child":""},Gf(R,["ListItem"])&&{component:((F=R.props)==null?void 0:F.component)||"div"})):R}),S&&u.jsx(q,D({},ee,{children:S}))]}))})})});Mh.muiName="ListItem";const Lh=Mh;function y1(e){return it("MuiAccordionDetails",e)}const br=Xe("MuiAccordionDetails",["root","content","expanded"]),C1=["accordionId","component","color","children","defaultExpanded","disabled","expanded","onChange","variant","slots","slotProps"],x1=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 lt(o,s1,{})},w1=be(Jl,{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"},[`& .${br.root}`]:{"--AccordionDetails-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)"}},"&:not([data-first-child]):not([data-last-child])":{"--ListItem-radius":"0"}}),I1=V.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordion"}),{accordionId:i,component:o="div",color:a="neutral",children:l,defaultExpanded:s=!1,disabled:c=!1,expanded:d,onChange:f,variant:h="plain",slots:p={},slotProps:m={}}=r,g=Ae(r,C1),v=ji(i),[S,w]=kl({controlled:d,default:s,name:"Accordion",state:"expanded"}),y=V.useCallback(G=>{w(!S),f&&f(G,!S)},[S,f,w]),C=V.useMemo(()=>({accordionId:v,expanded:S,disabled:c,toggle:y}),[v,S,c,y]),b=D({},g,{component:o,slots:p,slotProps:m}),T=D({},r,{component:o,color:a,variant:h,expanded:S,disabled:c,nested:!0}),E=x1(T),[P,O]=Ie("root",{ref:n,className:E.root,elementType:w1,externalForwardedProps:b,ownerState:T});return u.jsx(ql.Provider,{value:C,children:u.jsx(P,D({},O,{children:V.Children.map(l,(G,z)=>V.isValidElement(G)&&z===0?V.cloneElement(G,{"data-first-child":""}):G)}))})});function S1(e){return it("MuiAccordionGroup",e)}Xe("MuiAccordionGroup",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const A1={"--NestedList-marginRight":"0px","--NestedList-marginLeft":"0px","--NestedListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px"};function Xl(e){const{children:t,nested:n,row:r=!1,wrap:i=!1}=e,o=u.jsx(Ql.Provider,{value:r,children:u.jsx(Dh.Provider,{value:i,children:V.Children.map(t,(a,l)=>V.isValidElement(a)?V.cloneElement(a,D({},l===0&&{"data-first-child":""},l===V.Children.count(t)-1&&{"data-last-child":""})):a)})});return n===void 0?o:u.jsx(Ta.Provider,{value:n,children:o})}const Zl=({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 l;r[o]=((l=e.vars)==null?void 0:l.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 T1(e){return it("MuiList",e)}Xe("MuiList",["root","nesting","scoped","sizeSm","sizeMd","sizeLg","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]);const E1=V.createContext(void 0),_1=["component","className","children","size","orientation","wrap","variant","color","role","slots","slotProps"],k1=e=>{const{variant:t,color:n,size:r,nesting:i,orientation:o,instanceSize:a}=e,l={root:["root",o,t&&`variant${ye(t)}`,n&&`color${ye(n)}`,!a&&!i&&r&&`size${ye(r)}`,a&&`size${ye(a)}`,i&&"nesting"]};return lt(l,T1,{})},ec=be("ul")(({theme:e,ownerState:t})=>{var n;const{p:r,padding:i,borderRadius:o}=Zl({theme:e,ownerState:t},["p","padding","borderRadius"]);function a(l){return l==="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}:l==="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}:l==="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})]}),P1=be(ec,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({}),D1=V.forwardRef(function(t,n){var r;const i=V.useContext(Ta),o=V.useContext(Rh),a=V.useContext(E1),l=ct({props:t,name:"JoyList"}),{component:s,className:c,children:d,size:f,orientation:h="vertical",wrap:p=!1,variant:m="plain",color:g="neutral",role:v,slots:S={},slotProps:w={}}=l,y=Ae(l,_1),C=f||((r=t.size)!=null?r:"md");let b;o&&(b="group"),a&&(b="presentation"),v&&(b=v);const T=D({},l,{instanceSize:t.size,size:C,nesting:i,orientation:h,wrap:p,variant:m,color:g,role:b}),E=k1(T),P=D({},y,{component:s,slots:S,slotProps:w}),[O,G]=Ie("root",{ref:n,className:Ln(E.root,c),elementType:P1,externalForwardedProps:P,ownerState:T,additionalProps:{as:s,role:b,"aria-labelledby":typeof i=="string"?i:void 0}});return u.jsx(O,D({},G,{children:u.jsx(Oh.Provider,{value:`${typeof s=="string"?s:""}:${b||""}`,children:u.jsx(Xl,{row:h==="horizontal",wrap:p,children:d})})}))}),O1=["component","color","children","disableDivider","variant","transition","size","slots","slotProps"],R1=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 lt(i,S1,{})},M1=be(ec,{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}`,[`& .${br.root}.${br.expanded}`]:{"--AccordionDetails-transition":`grid-template-rows ${t.transition.expanded}, padding-block ${t.transition.expanded}`}})),D({"--List-padding":"0px","--ListDivider-gap":"0px"},n,!t.disableDivider&&{[`& .${l1.root}:not([data-last-child])`]:{"--Accordion-borderBottom":`1px solid ${e.vars.palette.divider}`}})}),L1=V.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordionGroup"}),{component:i="div",color:o="neutral",children:a,disableDivider:l=!1,variant:s="plain",transition:c="0.2s ease",size:d="md",slots:f={},slotProps:h={}}=r,p=Ae(r,O1),m=D({},p,{component:i,slots:f,slotProps:h}),g=D({},r,{component:i,color:o,disableDivider:l,variant:s,transition:c,size:d}),v=R1(g),[S,w]=Ie("root",{ref:n,className:v.root,elementType:M1,externalForwardedProps:m,ownerState:g});return u.jsx(S,D({},w,{children:u.jsx(Xl,{children:a})}))}),B1=["component","children","color","variant","slots","slotProps"],$1=e=>{const{expanded:t}=e;return lt({root:["root",t&&"expanded"],content:["content",t&&"expanded"]},y1,{})},N1=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(.${br.expanded})`]:{gridTemplateRows:"0fr"}})}),F1=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(.${br.expanded})`]:{paddingBlock:0}}),z1=V.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordionDetails"}),{component:i="div",children:o,color:a="neutral",variant:l="plain",slots:s={},slotProps:c={}}=r,d=Ae(r,B1),{accordionId:f,expanded:h=!1}=V.useContext(ql),p=V.useRef(null),m=sn(p,n);V.useEffect(()=>{p.current&&p.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])').forEach(E=>{if(h){const P=E.getAttribute("data-prev-tabindex"),O=E.getAttribute("tabindex");O&&P&&(E.setAttribute("tabindex",P),E.removeAttribute("data-prev-tabindex")),!P&&!O&&E.removeAttribute("tabindex")}else E.setAttribute("data-prev-tabindex",E.getAttribute("tabindex")||""),E.setAttribute("tabindex","-1")})},[h]);const g=D({},d,{component:i,slots:s,slotProps:c}),v=D({},r,{component:i,color:a,variant:l,expanded:h,nesting:!0}),S=$1(v),[w,y]=Ie("root",{ref:m,className:S.root,elementType:N1,externalForwardedProps:g,additionalProps:{id:`${f}-details`,"aria-labelledby":`${f}-summary`,role:"region",hidden:h?void 0:!0},ownerState:v}),[C,b]=Ie("content",{className:S.content,elementType:F1,externalForwardedProps:g,ownerState:v});return u.jsx(w,D({},y,{children:u.jsx(C,D({},b,{children:o}))}))});function j1(e){return it("MuiAccordionSummary",e)}const Ea=Xe("MuiAccordionSummary",["root","button","indicator","disabled","expanded"]),_a=Xe("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]),V1=V.createContext("horizontal"),tc=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,l;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],[`.${Ph.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${_a.selected}`]:D({},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${_a.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]},[`&.${_a.disabled}`]:D({},(l=e.variants[`${t.variant}Disabled`])==null?void 0:l[t.color])})});be(tc,{name:"JoyListItemButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>D({},!e.row&&{[`&.${_a.selected}`]:{fontWeight:t.vars.fontWeight.md}}));function U1(e){return it("MuiSvgIcon",e)}Xe("MuiSvgIcon",["root","colorInherit","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","fontSizeInherit","fontSizeXs","fontSizeSm","fontSizeMd","fontSizeLg","fontSizeXl","fontSizeXl2","fontSizeXl3","fontSizeXl4","sizeSm","sizeMd","sizeLg"]);const H1=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],W1=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 lt(i,U1,{})},Bh={sm:"xl",md:"xl2",lg:"xl3"},G1=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[Bh[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[Bh[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)`}))}),$h=V.forwardRef(function(t,n){const r=ct({props:t,name:"JoySvgIcon"}),{children:i,className:o,color:a,component:l="svg",fontSize:s,htmlColor:c,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24",size:p="md",slots:m={},slotProps:g={}}=r,v=Ae(r,H1),S=V.isValidElement(i)&&i.type==="svg",w=D({},r,{color:a,component:l,size:p,instanceSize:t.size,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:S}),y=W1(w),C=D({},v,{component:l,slots:m,slotProps:g}),[b,T]=Ie("root",{ref:n,className:Ln(y.root,o),elementType:G1,externalForwardedProps:C,ownerState:w,additionalProps:D({color:c,focusable:!1},f&&{role:"img"},!f&&{"aria-hidden":!0},!d&&{viewBox:h},S&&i.props)});return u.jsxs(b,D({},T,{children:[S?i.props.children:i,f?u.jsx("title",{children:f}):null]}))});function nc(e,t){function n(r,i){return u.jsx($h,D({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=$h.muiName,V.memo(V.forwardRef(n))}const Y1=nc(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");var Nh;const K1=["component","color","children","indicator","variant","slots","slotProps"],q1=e=>{const{disabled:t,expanded:n}=e;return lt({root:["root",t&&"disabled",n&&"expanded"],button:["button",t&&"disabled",n&&"expanded"],indicator:["indicator",t&&"disabled",n&&"expanded"]},j1,{})},Q1=be(Jl,{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)",[`&.${Ea.expanded}`]:{"--Icon-color":"currentColor"}})),J1=be(tc,{name:"JoyAccordionSummary",slot:"Button",overridesResolver:(e,t)=>t.button})({gap:"inherit",fontWeight:"inherit",justifyContent:"space-between",font:"inherit","&:focus-visible":{zIndex:1},[`.${Ea.root} &`]:{"--unstable_ListItem-flex":"1 0 0%"}}),X1=be("span",{name:"JoyAccordionSummary",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})({display:"inline-flex",[`&.${Ea.expanded}`]:{transform:"rotate(180deg)"}}),Z1=V.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordionSummary"}),{component:i="div",color:o="neutral",children:a,indicator:l=Nh||(Nh=u.jsx(Y1,{})),variant:s="plain",slots:c={},slotProps:d={}}=r,f=Ae(r,K1),{accordionId:h,disabled:p=!1,expanded:m=!1,toggle:g}=V.useContext(ql),v=D({},f,{component:i,slots:c,slotProps:d}),S=D({},r,{component:i,color:o,disabled:p,expanded:m,variant:s}),w=G=>{if(g&&g(G),typeof d.button=="function"){var z,A;(z=d.button(S))==null||(A=z.onClick)==null||A.call(z,G)}else{var W,Y;(W=d.button)==null||(Y=W.onClick)==null||Y.call(W,G)}},y=q1(S),[C,b]=Ie("root",{ref:n,className:y.root,elementType:Q1,externalForwardedProps:v,ownerState:S}),[T,E]=Ie("button",{ref:n,className:y.button,elementType:J1,externalForwardedProps:v,additionalProps:{component:"button",id:`${h}-summary`,"aria-expanded":m?"true":"false","aria-controls":`${h}-details`,disabled:p,type:"button",onClick:w},ownerState:S}),[P,O]=Ie("indicator",{ref:n,className:y.indicator,elementType:X1,externalForwardedProps:v,ownerState:S});return u.jsx(C,D({},b,{children:u.jsxs(T,D({},E,{children:[a,l&&u.jsx(P,D({},O,{children:l}))]}))}))}),eT=({label:e,disabled:t,children:n})=>(t=t||!1,u.jsx(L1,{variant:"outlined",transition:"0.2s",sx:{borderRadius:"md",overflow:"hidden",[`& .${Ea.button}:hover`]:{backgroundColor:"#fff"},[`& .${br.content}`]:{boxShadow:r=>`inset 0 1px ${r.vars.palette.divider}`,[`&.${br.expanded}`]:{paddingBlock:"0.75rem"}},marginBottom:"8px",backgroundColor:"#fff"},children:u.jsxs(I1,{disabled:t,children:[u.jsx(Z1,{children:e}),u.jsx(z1,{variant:"soft",children:n})]})})),rc={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"]]},ic=({label:e,property:t,value:n,defaultValue:r,placeholder:i,description:o,onChange:a})=>{const l=(s,c,d,f)=>{d!=="api"&&(f.getText().trim()===""?a(""):a(s))};return t==="description"?u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e}),u.jsx(vi,{value:n||r,defaultValue:r,onChange:l,modules:rc,placeholder:i,className:"ql-container ql-toolbar"})]}):t==="mini_games_explanation"?u.jsxs(I.FormControl,{children:[u.jsx(I.FormLabel,{color:"primary",children:e}),u.jsx(vi,{value:n||r,defaultValue:r,onChange:l,modules:rc,placeholder:i,className:"ql-container ql-toolbar"}),u.jsx(I.FormHelperText,{children:o})]}):u.jsx(I.Box,{sx:()=>({marginBottom:"16px"}),children:u.jsx(vi,{value:n||r,defaultValue:r,onChange:l,modules:rc,placeholder:i})})},tT=e=>{const t=n=>{n.persist(),e.onChange(n.target.value)};return u.jsxs(I.Tabs,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(I.TabList,{sx:{borderRadius:0},tabFlex:"auto",children:[u.jsx(I.Tab,{children:e.labels.richText}),u.jsx(I.Tab,{children:e.labels.plainText})]}),u.jsx(I.TabPanel,{value:0,sx:{px:0},children:u.jsx(ic,{label:"",placeholder:"",defaultValue:e.defaultValue,property:"ad_content",onChange:e.onChange})}),u.jsx(I.TabPanel,{value:1,sx:{px:0},children:u.jsx(I.Textarea,{defaultValue:e.defaultValue,minRows:"7",onChange:t,sx:{marginBottom:"16px",overflow:"auto",resize:"vertical"}})})]})},nT=({label:e,defaultValue:t,values:n,description:r,onChange:i})=>{const o=(a,l)=>{i(l||"")};return u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e}),u.jsx(I.Select,{defaultValue:t,onChange:o,children:n.map((a,l)=>u.jsx(I.Option,{value:a,children:a},`basic-select-${a}-${l}`))}),r?u.jsx(I.FormHelperText,{children:r}):u.jsx(u.Fragment,{})]})},oc=V.createContext("md");function rT(e){return it("MuiTabs",e)}Xe("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const iT=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],oT=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 lt(o,rT,{})},aT=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:l,p:s,padding:c}=Zl({theme:t,ownerState:e},["bgcolor","backgroundColor","background","p","padding"]),d=Zn(t,`palette.${o}`)||o||Zn(t,`palette.${a}`)||a||l||(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],s!==void 0&&{"--Tabs-padding":s},c!==void 0&&{"--Tabs-padding":c})}),Fh=V.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabs"}),{children:i,value:o,defaultValue:a,orientation:l="horizontal",direction:s="ltr",component:c,variant:d="plain",color:f="neutral",size:h="md",slots:p={},slotProps:m={}}=r,g=Ae(r,iT),v=a||(o===void 0?0:void 0),{contextValue:S}=ES(D({},r,{orientation:l,defaultValue:v})),w=D({},r,{orientation:l,direction:s,variant:d,color:f,size:h}),y=oT(w),C=D({},g,{component:c,slots:p,slotProps:m}),[b,T]=Ie("root",{ref:n,elementType:aT,externalForwardedProps:C,additionalProps:{ref:n,as:c},ownerState:w,className:y.root});return u.jsx(b,D({},T,{children:u.jsx(_S,{value:S,children:u.jsx(oc.Provider,{value:h,children:i})})}))});function sT(e){return it("MuiTabList",e)}Xe("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);function lT(e){return it("MuiTab",e)}const ac=Xe("MuiTab",["root","disabled","focusVisible","selected","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]),cT=["component","children","variant","color","size","disableUnderline","underlinePlacement","tabFlex","sticky","slots","slotProps"],uT=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 lt(o,sT,{})},dT=be(ec,{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"},A1,{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&&{[`& .${ac.root}`]:{flex:t.tabFlex}})}),zh=V.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabList"}),i=V.useContext(oc),{isRtl:o,orientation:a,getRootProps:l,contextValue:s}=OS({rootRef:n}),{component:c="div",children:d,variant:f="plain",color:h="neutral",size:p,disableUnderline:m=!1,underlinePlacement:g=a==="horizontal"?"bottom":"right",tabFlex:v,sticky:S,slots:w={},slotProps:y={}}=r,C=Ae(r,cT),b=p!=null?p:i,T=D({},r,{isRtl:o,orientation:a,variant:f,color:h,size:b,sticky:S,tabFlex:v,nesting:!1,disableUnderline:m,underlinePlacement:g}),E=uT(T),P=D({},C,{component:c,slots:w,slotProps:y}),[O,G]=Ie("root",{ref:n,elementType:dT,getSlotProps:l,externalForwardedProps:P,ownerState:T,className:E.root});return u.jsx(O,D({},G,{children:u.jsx(RS,{value:s,children:u.jsx(Xl,{row:a==="horizontal",nested:!0,children:d})})}))}),fT=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],hT=e=>{const{selected:t,disabled:n,focusVisible:r,variant:i,color:o,orientation:a}=e,l={root:["root",a,n&&"disabled",r&&"focusVisible",t&&"selected",i&&`variant${ye(i)}`,o&&`color${ye(o)}`]};return lt(l,lT,{})},pT=be(tc,{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))"}}]),jr=V.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTab"}),i=V.useContext(Ql),{action:o,children:a,disabled:l=!1,component:s="button",orientation:c="horizontal",variant:d="plain",color:f="neutral",disableIndicator:h=!1,indicatorPlacement:p=i?"bottom":"right",indicatorInset:m=!1,slots:g={},slotProps:v={}}=r,S=Ae(r,fT),w=V.useRef(null),y=sn(w,n),{active:C,focusVisible:b,setFocusVisible:T,selected:E,getRootProps:P}=LS(D({},r,{rootRef:y}));V.useImperativeHandle(o,()=>({focusVisible:()=>{T(!0),w.current.focus()}}),[T]);const O=D({},r,{disableIndicator:h,indicatorPlacement:p,indicatorInset:m,orientation:c,row:i,active:C,focusVisible:b,disabled:l,selected:E,variant:d,color:f}),G=hT(O),z=D({},S,{component:s,slots:g,slotProps:v}),[A,W]=Ie("root",{ref:n,elementType:pT,getSlotProps:P,externalForwardedProps:z,ownerState:O,className:G.root});return u.jsx(V1.Provider,{value:c,children:u.jsx(A,D({},W,{children:a}))})});function Fn(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 jh(e){if(V.isValidElement(e)||Wf.isValidElementType(e)||!Fn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=jh(e[n])}),t}function Wt(e,t,n={clone:!0}){const r=n.clone?j({},e):e;return Fn(e)&&Fn(t)&&Object.keys(t).forEach(i=>{V.isValidElement(t[i])||Wf.isValidElementType(t[i])?r[i]=t[i]:Fn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Fn(e[i])?r[i]=Wt(e[i],t[i],n):n.clone?r[i]=Fn(t[i])?jh(t[i]):t[i]:r[i]=t[i]}),r}function yr(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 Vr(e){if(typeof e!="string")throw new Error(yr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function sc(e,t){const n=j({},t);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]=j(j({},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]=j({},a);for(const l in o)if(Object.prototype.hasOwnProperty.call(o,l)){const s=l;n[i][s]=sc(o[s],a[s])}}}else n[i]===void 0&&(n[i]=e[i])}return n}function gT(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",l=!0;for(let s=0;s<o.length;s+=1){const c=o[s];c&&(a+=(l===!0?"":" ")+t(c),l=!1,n&&n[c]&&(a+=" "+n[c]))}r[i]=a}return r}const Vh=e=>e,mT=(()=>{let e=Vh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Vh}}})(),vT={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 Uh(e,t,n="Mui"){const r=vT[t];return r?`${n}-${r}`:`${mT.generate(e)}-${t}`}function bT(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Uh(e,i,n)}),r}function yT(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Gi(e,t){return t?Wt(e,t,{clone:!1}):e}function CT(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var a,l;const o=/min-width:\s*([0-9.]+)/;return+(((a=r.match(o))==null?void 0:a[1])||0)-+(((l=i.match(o))==null?void 0:l[1])||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},j({},t)):t}function xT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function wT(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 IT(e){const t=(o,a)=>o.replace("@media",a?`@container ${a}`:"@container");function n(o,a){o.up=(...l)=>t(e.breakpoints.up(...l),a),o.down=(...l)=>t(e.breakpoints.down(...l),a),o.between=(...l)=>t(e.breakpoints.between(...l),a),o.only=(...l)=>t(e.breakpoints.only(...l),a),o.not=(...l)=>{const s=t(e.breakpoints.not(...l),a);return s.includes("not all and")?s.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):s}}const r={},i=o=>(n(r,o),r);return n(i),X(j({},e),{containerQueries:i})}const ka={xs:0,sm:600,md:900,lg:1200,xl:1536},Hh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ka[e]}px)`},ST={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:ka[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function zn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Hh;return t.reduce((a,l,s)=>(a[o.up(o.keys[s])]=n(t[s]),a),{})}if(typeof t=="object"){const o=r.breakpoints||Hh;return Object.keys(t).reduce((a,l)=>{if(xT(o.keys,l)){const s=wT(r.containerQueries?r:ST,l);s&&(a[s]=n(t[l],l))}else if(Object.keys(o.values||ka).includes(l)){const s=o.up(l);a[s]=n(t[l],l)}else{const s=l;a[s]=t[s]}return a},{})}return n(t)}function AT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function TT(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Pa(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 Da(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Pa(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 l=a[t],s=a.theme,c=Pa(s,r)||{};return zn(a,l,f=>{let h=Da(c,i,f);return f===h&&typeof f=="string"&&(h=Da(c,i,`${t}${f==="default"?"":Vr(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function ET(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const _T={m:"margin",p:"padding"},kT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Wh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},PT=ET(e=>{if(e.length>2)if(Wh[e])e=Wh[e];else return[e];const[t,n]=e.split(""),r=_T[t],i=kT[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),lc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],cc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...lc,...cc];function Yi(e,t,n,r){var o;const i=(o=Pa(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 l=Math.abs(a),s=i[l];return a>=0?s:typeof s=="number"?-s:`-${s}`}:typeof i=="function"?i:()=>{}}function uc(e){return Yi(e,"spacing",8)}function Ki(e,t){return typeof t=="string"||t==null?t:e(t)}function DT(e,t){return n=>e.reduce((r,i)=>(r[i]=Ki(t,n),r),{})}function OT(e,t,n,r){if(!t.includes(n))return null;const i=PT(n),o=DT(i,r),a=e[n];return zn(e,a,o)}function Gh(e,t){const n=uc(e.theme);return Object.keys(e).map(r=>OT(e,t,r,n)).reduce(Gi,{})}function Ze(e){return Gh(e,lc)}Ze.propTypes={},Ze.filterProps=lc;function et(e){return Gh(e,cc)}et.propTypes={},et.filterProps=cc;function Oa(...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]?Gi(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 ot({prop:e,themeKey:"borders",transform:t})}const RT=nn("border",tn),MT=nn("borderTop",tn),LT=nn("borderRight",tn),BT=nn("borderBottom",tn),$T=nn("borderLeft",tn),NT=nn("borderColor"),FT=nn("borderTopColor"),zT=nn("borderRightColor"),jT=nn("borderBottomColor"),VT=nn("borderLeftColor"),UT=nn("outline",tn),HT=nn("outlineColor"),Ra=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Yi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Ki(t,r)});return zn(e,e.borderRadius,n)}return null};Ra.propTypes={},Ra.filterProps=["borderRadius"],Oa(RT,MT,LT,BT,$T,NT,FT,zT,jT,VT,Ra,UT,HT);const Ma=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Yi(e.theme,"spacing",8),n=r=>({gap:Ki(t,r)});return zn(e,e.gap,n)}return null};Ma.propTypes={},Ma.filterProps=["gap"];const La=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Yi(e.theme,"spacing",8),n=r=>({columnGap:Ki(t,r)});return zn(e,e.columnGap,n)}return null};La.propTypes={},La.filterProps=["columnGap"];const Ba=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Yi(e.theme,"spacing",8),n=r=>({rowGap:Ki(t,r)});return zn(e,e.rowGap,n)}return null};Ba.propTypes={},Ba.filterProps=["rowGap"];const WT=ot({prop:"gridColumn"}),GT=ot({prop:"gridRow"}),YT=ot({prop:"gridAutoFlow"}),KT=ot({prop:"gridAutoColumns"}),qT=ot({prop:"gridAutoRows"}),QT=ot({prop:"gridTemplateColumns"}),JT=ot({prop:"gridTemplateRows"}),XT=ot({prop:"gridTemplateAreas"}),ZT=ot({prop:"gridArea"});Oa(Ma,La,Ba,WT,GT,YT,KT,qT,QT,JT,XT,ZT);function Ur(e,t){return t==="grey"?t:e}const eE=ot({prop:"color",themeKey:"palette",transform:Ur}),tE=ot({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ur}),nE=ot({prop:"backgroundColor",themeKey:"palette",transform:Ur});Oa(eE,tE,nE);function Gt(e){return e<=1&&e!==0?`${e*100}%`:e}const rE=ot({prop:"width",transform:Gt}),dc=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,o,a,l,s;const r=((a=(o=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:o.values)==null?void 0:a[n])||ka[n];return r?((s=(l=e.theme)==null?void 0:l.breakpoints)==null?void 0:s.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Gt(n)}};return zn(e,e.maxWidth,t)}return null};dc.filterProps=["maxWidth"];const iE=ot({prop:"minWidth",transform:Gt}),oE=ot({prop:"height",transform:Gt}),aE=ot({prop:"maxHeight",transform:Gt}),sE=ot({prop:"minHeight",transform:Gt});ot({prop:"size",cssProperty:"width",transform:Gt}),ot({prop:"size",cssProperty:"height",transform:Gt});const lE=ot({prop:"boxSizing"});Oa(rE,dc,iE,oE,aE,sE,lE);const $a={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:Ra},color:{themeKey:"palette",transform:Ur},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ur},backgroundColor:{themeKey:"palette",transform:Ur},p:{style:et},pt:{style:et},pr:{style:et},pb:{style:et},pl:{style:et},px:{style:et},py:{style:et},padding:{style:et},paddingTop:{style:et},paddingRight:{style:et},paddingBottom:{style:et},paddingLeft:{style:et},paddingX:{style:et},paddingY:{style:et},paddingInline:{style:et},paddingInlineStart:{style:et},paddingInlineEnd:{style:et},paddingBlock:{style:et},paddingBlockStart:{style:et},paddingBlockEnd:{style:et},m:{style:Ze},mt:{style:Ze},mr:{style:Ze},mb:{style:Ze},ml:{style:Ze},mx:{style:Ze},my:{style:Ze},margin:{style:Ze},marginTop:{style:Ze},marginRight:{style:Ze},marginBottom:{style:Ze},marginLeft:{style:Ze},marginX:{style:Ze},marginY:{style:Ze},marginInline:{style:Ze},marginInlineStart:{style:Ze},marginInlineEnd:{style:Ze},marginBlock:{style:Ze},marginBlockStart:{style:Ze},marginBlockEnd:{style:Ze},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:Ma},rowGap:{style:Ba},columnGap:{style:La},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:dc},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 cE(...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 uE(e,t){return typeof e=="function"?e(t):e}function dE(){function e(n,r,i,o){const a={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:s=n,themeKey:c,transform:d,style:f}=l;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Pa(i,c)||{};return f?f(a):zn(a,r,m=>{let g=Da(h,d,m);return m===g&&typeof m=="string"&&(g=Da(h,d,`${n}${m==="default"?"":Vr(m)}`,m)),s===!1?g:{[s]:g}})}function t(n){var l;const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=(l=i.unstable_sxConfig)!=null?l:$a;function a(s){let c=s;if(typeof s=="function")c=s(i);else if(typeof s!="object")return s;if(!c)return null;const d=AT(i.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const m=uE(c[p],i);if(m!=null)if(typeof m=="object")if(o[p])h=Gi(h,e(p,m,i,o));else{const g=zn({theme:i},m,v=>({[p]:v}));cE(g,m)?h[p]=t({sx:m,theme:i}):h=Gi(h,g)}else h=Gi(h,e(p,m,i,o))}),CT(i,TT(f,h))}return Array.isArray(r)?r.map(a):a(r)}return t}const Hr=dE();Hr.filterProps=["sx"];function fE(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 hE={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},pE=!1,gE=/[A-Z]|^ms/g,mE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Yh=function(t){return t.charCodeAt(1)===45},Kh=function(t){return t!=null&&typeof t!="boolean"},fc=BS(function(e){return Yh(e)?e:e.replace(gE,"-$&").toLowerCase()}),qh=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(mE,function(r,i,o){return er={name:i,styles:o,next:er},i})}return hE[t]!==1&&!Yh(t)&&typeof n=="number"&&n!==0?n+"px":n},vE="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Na(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 er={name:i.name,styles:i.styles,next:er},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)er={name:a.name,styles:a.styles,next:er},a=a.next;var l=o.styles+";";return l}return bE(e,t,n)}}var s=n;return s}function bE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Na(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var l=a;Kh(l)&&(r+=fc(o)+":"+qh(o,l)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&pE)throw new Error(vE);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var s=0;s<a.length;s++)Kh(a[s])&&(r+=fc(o)+":"+qh(o,a[s])+";");else{var c=Na(e,t,a);switch(o){case"animation":case"animationName":{r+=fc(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}}return r}var Qh=/label:\s*([^\s;{]+)\s*(;|$)/g,er;function yE(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="";er=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Na(n,t,o);else{var a=o;i+=a[0]}for(var l=1;l<e.length;l++)if(i+=Na(n,t,e[l]),r){var s=o;i+=s[l]}Qh.lastIndex=0;for(var c="",d;(d=Qh.exec(i))!==null;)c+="-"+d[1];var f=fE(i)+c;return{name:f,styles:i,next:er}}/**
|
|
2334
2334
|
* @mui/styled-engine v6.4.0
|
|
2335
2335
|
*
|
|
2336
2336
|
* @license MIT
|
|
2337
2337
|
* This source code is licensed under the MIT license found in the
|
|
2338
2338
|
* LICENSE file in the root directory of this source tree.
|
|
2339
|
-
*/function CE(e,t){return Lt(e,t)}function xE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Jh=[];function Xh(e){return Jh[0]=e,yE(Jh)}const wE=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>X(U({},n),{[r.key]:r.val}),{})};function IE(e){const h=e,{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=h,i=We(h,["values","unit","step"]),o=wE(t),a=Object.keys(o);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function s(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function c(p,m){const g=a.indexOf(m);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:m)-r/100}${n})`}function d(p){return a.indexOf(p)+1<a.length?c(p,a[a.indexOf(p)+1]):l(p)}function f(p){const m=a.indexOf(p);return m===0?l(a[1]):m===a.length-1?s(a[m]):c(p,a[a.indexOf(p)+1]).replace("@media","@media not all and")}return U({keys:a,values:o,up:l,down:s,between:c,only:d,not:f,unit:n},i)}const SE={borderRadius:4};function Zh(e=8,t=uc({spacing:e})){if(e.mui)return e;const 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 AE(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let i=n.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return n.palette.mode===e?t:{}}function ep(e={},...t){const d=e,{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=d,a=We(d,["breakpoints","palette","spacing","shape"]),l=IE(n),s=Zh(i);let c=Wt({breakpoints:l,direction:"ltr",components:{},palette:U({mode:"light"},r),spacing:s,shape:U(U({},SE),o)},a);return c=IT(c),c.applyStyles=AE,c=t.reduce((f,h)=>Wt(f,h),c),c.unstable_sxConfig=U(U({},$a),a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(h){return Hr({sx:h,theme:this})},c}function tp(e){const i=e,{variants:t}=i,n=We(i,["variants"]),r={variants:t,style:Xh(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=Xh(o.style))}),r}const TE=ep();function hc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function EE(e){return e?(t,n)=>n[e]:null}function _E(e,t,n){e.theme=DE(e.theme)?n:e.theme[t]||e.theme}function Fa(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>Fa(e,i));if(Array.isArray(n==null?void 0:n.variants)){let i;if(n.isProcessed)i=n.style;else{const r=n,{variants:o}=r;i=We(r,["variants"])}return np(e,n.variants,[i])}return n!=null&&n.isProcessed?n.style:n}function np(e,t,n=[]){var i;let r;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(r!=null||(r=X(U(U({},e),e.ownerState),{ownerState:e.ownerState})),!a.props(r))continue}else for(const l in a.props)if(e[l]!==a.props[l]&&((i=e.ownerState)==null?void 0:i[l])!==a.props[l])continue e;typeof a.style=="function"?(r!=null||(r=X(U(U({},e),e.ownerState),{ownerState:e.ownerState})),n.push(a.style(r))):n.push(a.style)}return n}function kE(e={}){const{themeId:t,defaultTheme:n=TE,rootShouldForwardProp:r=hc,slotShouldForwardProp:i=hc}=e;function o(l){_E(l,t,n)}return(l,s={})=>{xE(l,T=>T.filter(E=>E!==Hr));const b=s,{name:c,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=EE(RE(d))}=b,m=We(b,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),g=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,v=h||!1;let S=hc;d==="Root"||d==="root"?S=r:d?S=i:OE(l)&&(S=void 0);const w=CE(l,U({shouldForwardProp:S,label:PE()},m)),y=T=>{if(typeof T=="function"&&T.__emotion_real!==T)return function(P){return Fa(P,T)};if(Fn(T)){const E=tp(T);return E.variants?function(O){return Fa(O,E)}:E.style}return T},C=(...T)=>{const E=[],P=T.map(y),O=[];if(E.push(o),c&&p&&O.push(function(W){var B,H;const N=(H=(B=W.theme.components)==null?void 0:B[c])==null?void 0:H.styleOverrides;if(!N)return null;const $={};for(const q in N)$[q]=Fa(W,N[q]);return p(W,$)}),c&&!g&&O.push(function(W){var $,B;const Y=W.theme,N=(B=($=Y==null?void 0:Y.components)==null?void 0:$[c])==null?void 0:B.variants;return N?np(W,N):null}),v||O.push(Hr),Array.isArray(P[0])){const A=P.shift(),W=new Array(E.length).fill(""),Y=new Array(O.length).fill("");let N;N=[...W,...A,...Y],N.raw=[...W,...A.raw,...Y],E.unshift(N)}const G=[...E,...P,...O],z=w(...G);return l.muiName&&(z.muiName=l.muiName),z};return w.withConfig&&(C.withConfig=w.withConfig),C}}function PE(e,t){return void 0}function DE(e){for(const t in e)return!1;return!0}function OE(e){return typeof e=="string"&&e.charCodeAt(0)>96}function RE(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function pc(e,t=0,n=1){return yT(e,t,n)}function ME(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 tr(e){if(e.type)return e;if(e.charAt(0)==="#")return tr(ME(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(yr(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"].includes(i))throw new Error(yr(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const LE=e=>{const t=tr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},qi=(e,t)=>{try{return LE(e)}catch(n){return e}};function za(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function rp(e){e=tr(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(c,d=(c+n/30)%12)=>i-o*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const s=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",s.push(t[3])),za({type:l,values:s})}function gc(e){e=tr(e);let t=e.type==="hsl"||e.type==="hsla"?tr(rp(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:mi((n+.055)/1.055,2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function BE(e,t){const n=gc(e),r=gc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function $E(e,t){return e=tr(e),t=pc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,za(e)}function ja(e,t,n){try{return $E(e,t)}catch(r){return e}}function mc(e,t){if(e=tr(e),t=pc(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return za(e)}function Ne(e,t,n){try{return mc(e,t)}catch(r){return e}}function vc(e,t){if(e=tr(e),t=pc(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return za(e)}function Fe(e,t,n){try{return vc(e,t)}catch(r){return e}}function NE(e,t=.15){return gc(e)>.5?mc(e,t):vc(e,t)}function Va(e,t,n){try{return NE(e,t)}catch(r){return e}}const FE=j.createContext(void 0);function zE(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?sc(i.defaultProps,r):!i.styleOverrides&&!i.variants?sc(i,r):r}function jE({props:e,name:t}){const n=j.useContext(FE);return zE({props:e,name:t,theme:{components:n}})}const ip={theme:void 0};function VE(e){let t,n;return function(i){let o=t;return(o===void 0||i.theme!==n)&&(ip.theme=i.theme,o=tp(e(ip)),t=o,n=i.theme),o}}function UE(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 op=(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])})},HE=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([l,s])=>{(!n||n&&!n([...o,l]))&&s!=null&&(typeof s=="object"&&Object.keys(s).length>0?r(s,[...o,l],Array.isArray(s)?[...a,l]:a):t([...o,l],s,a))})}r(e)},WE=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function bc(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return HE(e,(l,s,c)=>{if((typeof s=="string"||typeof s=="number")&&(!r||!r(l,s))){const d=`--${n?`${n}-`:""}${l.join("-")}`,f=WE(l,s);Object.assign(i,{[d]:f}),op(o,l,`var(${d})`,c),op(a,l,`var(${d}, ${f})`,c)}},l=>l[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function GE(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:i}=t,y=e,{colorSchemes:o={},components:a,defaultColorScheme:l="light"}=y,s=We(y,["colorSchemes","components","defaultColorScheme"]),{vars:c,css:d,varsWithDefaults:f}=bc(s,t);let h=f;const p={},C=o,{[l]:m}=C,g=We(C,[Ps(l)]);if(Object.entries(g||{}).forEach(([b,T])=>{const{vars:E,css:P,varsWithDefaults:O}=bc(T,t);h=Wt(h,O),p[b]={css:P,vars:E}}),m){const{css:b,vars:T,varsWithDefaults:E}=bc(m,t);h=Wt(h,E),p[l]={css:b,vars:T}}function v(b,T){var P,O;let E=i;if(i==="class"&&(E=".%s"),i==="data"&&(E="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(E=`[${i}="%s"]`),b){if(E==="media")return e.defaultColorScheme===b?":root":{[`@media (prefers-color-scheme: ${((O=(P=o[b])==null?void 0:P.palette)==null?void 0:O.mode)||b})`]:{":root":T}};if(E)return e.defaultColorScheme===b?`:root, ${E.replace("%s",String(b))}`:E.replace("%s",String(b))}return":root"}return{vars:h,generateThemeVars:()=>{let b=U({},c);return Object.entries(p).forEach(([,{vars:T}])=>{b=Wt(b,T)}),b},generateStyleSheets:()=>{var z,A;const b=[],T=e.defaultColorScheme||"light";function E(W,Y){Object.keys(Y).length&&b.push(typeof W=="string"?{[W]:U({},Y)}:W)}E(n(void 0,U({},d)),d);const G=p,{[T]:P}=G,O=We(G,[Ps(T)]);if(P){const{css:W}=P,Y=(A=(z=o[T])==null?void 0:z.palette)==null?void 0:A.mode,N=U(!r&&Y?{colorScheme:Y}:{},W);E(n(T,U({},N)),N)}return Object.entries(O).forEach(([W,{css:Y}])=>{var B,H;const N=(H=(B=o[W])==null?void 0:B.palette)==null?void 0:H.mode,$=U(!r&&N?{colorScheme:N}:{},Y);E(n(W,U({},$)),$)}),b}}}function YE(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Qi={black:"#000",white:"#fff"},KE={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Wr={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Gr={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ji={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Yr={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Kr={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},qr={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function ap(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Qi.white,default:Qi.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const qE=ap();function sp(){return{text:{primary:Qi.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Qi.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const lp=sp();function cp(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=vc(e.main,i):t==="dark"&&(e.dark=mc(e.main,o)))}function QE(e="light"){return e==="dark"?{main:Yr[200],light:Yr[50],dark:Yr[400]}:{main:Yr[700],light:Yr[400],dark:Yr[800]}}function JE(e="light"){return e==="dark"?{main:Wr[200],light:Wr[50],dark:Wr[400]}:{main:Wr[500],light:Wr[300],dark:Wr[700]}}function XE(e="light"){return e==="dark"?{main:Gr[500],light:Gr[300],dark:Gr[700]}:{main:Gr[700],light:Gr[400],dark:Gr[800]}}function ZE(e="light"){return e==="dark"?{main:Kr[400],light:Kr[300],dark:Kr[700]}:{main:Kr[700],light:Kr[500],dark:Kr[900]}}function e_(e="light"){return e==="dark"?{main:qr[400],light:qr[300],dark:qr[700]}:{main:qr[800],light:qr[500],dark:qr[900]}}function t_(e="light"){return e==="dark"?{main:Ji[400],light:Ji[300],dark:Ji[700]}:{main:"#ed6c02",light:Ji[500],dark:Ji[900]}}function yc(e){const g=e,{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=g,i=We(g,["mode","contrastThreshold","tonalOffset"]),o=e.primary||QE(t),a=e.secondary||JE(t),l=e.error||XE(t),s=e.info||ZE(t),c=e.success||e_(t),d=e.warning||t_(t);function f(v){return BE(v,lp.text.primary)>=n?lp.text.primary:qE.text.primary}const h=({color:v,name:S,mainShade:w=500,lightShade:y=300,darkShade:C=700})=>{if(v=U({},v),!v.main&&v[w]&&(v.main=v[w]),!v.hasOwnProperty("main"))throw new Error(yr(11,S?` (${S})`:"",w));if(typeof v.main!="string")throw new Error(yr(12,S?` (${S})`:"",JSON.stringify(v.main)));return cp(v,"light",y,r),cp(v,"dark",C,r),v.contrastText||(v.contrastText=f(v.main)),v};let p;return t==="light"?p=ap():t==="dark"&&(p=sp()),Wt(U({common:U({},Qi),mode:t,primary:h({color:o,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:l,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:s,name:"info"}),success:h({color:c,name:"success"}),grey:KE,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},p),i)}function n_(e){const t={};return Object.entries(e).forEach(r=>{const[i,o]=r;typeof o=="object"&&(t[i]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function r_(e,t){return U({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}function i_(e){return Math.round(e*1e5)/1e5}const up={textTransform:"uppercase"},dp='"Roboto", "Helvetica", "Arial", sans-serif';function o_(e,t){const v=typeof t=="function"?t(e):t,{fontFamily:n=dp,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:s=16,allVariants:c,pxToRem:d}=v,f=We(v,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),h=r/14,p=d||(S=>`${S/s*h}rem`),m=(S,w,y,C,b)=>U(U(U({fontFamily:n,fontWeight:S,fontSize:p(w),lineHeight:y},n===dp?{letterSpacing:`${i_(C/w)}em`}:{}),b),c),g={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(o,48,1.167,0),h4:m(o,34,1.235,.25),h5:m(o,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(o,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(o,16,1.5,.15),body2:m(o,14,1.43,.15),button:m(a,14,1.75,.4,up),caption:m(o,12,1.66,.4),overline:m(o,12,2.66,1,up),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Wt(U({htmlFontSize:s,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},g),f,{clone:!1})}const a_=.2,s_=.14,l_=.12;function je(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${a_})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${s_})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${l_})`].join(",")}const c_=["none",je(0,2,1,-1,0,1,1,0,0,1,3,0),je(0,3,1,-2,0,2,2,0,0,1,5,0),je(0,3,3,-2,0,3,4,0,0,1,8,0),je(0,2,4,-1,0,4,5,0,0,1,10,0),je(0,3,5,-1,0,5,8,0,0,1,14,0),je(0,3,5,-1,0,6,10,0,0,1,18,0),je(0,4,5,-2,0,7,10,1,0,2,16,1),je(0,5,5,-3,0,8,10,1,0,3,14,2),je(0,5,6,-3,0,9,12,1,0,3,16,2),je(0,6,6,-3,0,10,14,1,0,4,18,3),je(0,6,7,-4,0,11,15,1,0,4,20,3),je(0,7,8,-4,0,12,17,2,0,5,22,4),je(0,7,8,-4,0,13,19,2,0,5,24,4),je(0,7,9,-4,0,14,21,2,0,5,26,4),je(0,8,9,-5,0,15,22,2,0,6,28,5),je(0,8,10,-5,0,16,24,2,0,6,30,5),je(0,8,11,-5,0,17,26,2,0,6,32,5),je(0,9,11,-5,0,18,28,2,0,7,34,6),je(0,9,12,-6,0,19,29,2,0,7,36,6),je(0,10,13,-6,0,20,31,3,0,8,38,7),je(0,10,13,-6,0,21,33,3,0,8,40,7),je(0,10,14,-6,0,22,35,3,0,8,42,7),je(0,11,14,-7,0,23,36,3,0,9,44,8),je(0,11,15,-7,0,24,38,3,0,9,46,8)],u_={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},d_={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function fp(e){return`${Math.round(e)}ms`}function f_(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*mi(t,.25)+t/5)*10),3e3)}function h_(e){const t=U(U({},u_),e.easing),n=U(U({},d_),e.duration);return X(U({getAutoHeightDuration:f_,create:(i=["all"],o={})=>{const d=o,{duration:a=n.standard,easing:l=t.easeInOut,delay:s=0}=d,c=We(d,["duration","easing","delay"]);return(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof a=="string"?a:fp(a)} ${l} ${typeof s=="string"?s:fp(s)}`).join(",")}},e),{easing:t,duration:n})}const p_={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function g_(e){return Fn(e)||typeof e=="undefined"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function hp(e={}){const t=U({},e);function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[a,l]=i[o];!g_(l)||a.startsWith("unstable_")?delete r[a]:Fn(l)&&(r[a]=U({},l),n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
2339
|
+
*/function CE(e,t){return Lt(e,t)}function xE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Jh=[];function Xh(e){return Jh[0]=e,yE(Jh)}const wE=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>X(j({},n),{[r.key]:r.val}),{})};function IE(e){const h=e,{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=h,i=We(h,["values","unit","step"]),o=wE(t),a=Object.keys(o);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function s(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function c(p,m){const g=a.indexOf(m);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:m)-r/100}${n})`}function d(p){return a.indexOf(p)+1<a.length?c(p,a[a.indexOf(p)+1]):l(p)}function f(p){const m=a.indexOf(p);return m===0?l(a[1]):m===a.length-1?s(a[m]):c(p,a[a.indexOf(p)+1]).replace("@media","@media not all and")}return j({keys:a,values:o,up:l,down:s,between:c,only:d,not:f,unit:n},i)}const SE={borderRadius:4};function Zh(e=8,t=uc({spacing:e})){if(e.mui)return e;const 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 AE(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let i=n.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return n.palette.mode===e?t:{}}function ep(e={},...t){const d=e,{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=d,a=We(d,["breakpoints","palette","spacing","shape"]),l=IE(n),s=Zh(i);let c=Wt({breakpoints:l,direction:"ltr",components:{},palette:j({mode:"light"},r),spacing:s,shape:j(j({},SE),o)},a);return c=IT(c),c.applyStyles=AE,c=t.reduce((f,h)=>Wt(f,h),c),c.unstable_sxConfig=j(j({},$a),a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(h){return Hr({sx:h,theme:this})},c}function tp(e){const i=e,{variants:t}=i,n=We(i,["variants"]),r={variants:t,style:Xh(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=Xh(o.style))}),r}const TE=ep();function hc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function EE(e){return e?(t,n)=>n[e]:null}function _E(e,t,n){e.theme=DE(e.theme)?n:e.theme[t]||e.theme}function Fa(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>Fa(e,i));if(Array.isArray(n==null?void 0:n.variants)){let i;if(n.isProcessed)i=n.style;else{const r=n,{variants:o}=r;i=We(r,["variants"])}return np(e,n.variants,[i])}return n!=null&&n.isProcessed?n.style:n}function np(e,t,n=[]){var i;let r;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(r!=null||(r=X(j(j({},e),e.ownerState),{ownerState:e.ownerState})),!a.props(r))continue}else for(const l in a.props)if(e[l]!==a.props[l]&&((i=e.ownerState)==null?void 0:i[l])!==a.props[l])continue e;typeof a.style=="function"?(r!=null||(r=X(j(j({},e),e.ownerState),{ownerState:e.ownerState})),n.push(a.style(r))):n.push(a.style)}return n}function kE(e={}){const{themeId:t,defaultTheme:n=TE,rootShouldForwardProp:r=hc,slotShouldForwardProp:i=hc}=e;function o(l){_E(l,t,n)}return(l,s={})=>{xE(l,T=>T.filter(E=>E!==Hr));const b=s,{name:c,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=EE(RE(d))}=b,m=We(b,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),g=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,v=h||!1;let S=hc;d==="Root"||d==="root"?S=r:d?S=i:OE(l)&&(S=void 0);const w=CE(l,j({shouldForwardProp:S,label:PE()},m)),y=T=>{if(typeof T=="function"&&T.__emotion_real!==T)return function(P){return Fa(P,T)};if(Fn(T)){const E=tp(T);return E.variants?function(O){return Fa(O,E)}:E.style}return T},C=(...T)=>{const E=[],P=T.map(y),O=[];if(E.push(o),c&&p&&O.push(function(W){var B,H;const N=(H=(B=W.theme.components)==null?void 0:B[c])==null?void 0:H.styleOverrides;if(!N)return null;const $={};for(const q in N)$[q]=Fa(W,N[q]);return p(W,$)}),c&&!g&&O.push(function(W){var $,B;const Y=W.theme,N=(B=($=Y==null?void 0:Y.components)==null?void 0:$[c])==null?void 0:B.variants;return N?np(W,N):null}),v||O.push(Hr),Array.isArray(P[0])){const A=P.shift(),W=new Array(E.length).fill(""),Y=new Array(O.length).fill("");let N;N=[...W,...A,...Y],N.raw=[...W,...A.raw,...Y],E.unshift(N)}const G=[...E,...P,...O],z=w(...G);return l.muiName&&(z.muiName=l.muiName),z};return w.withConfig&&(C.withConfig=w.withConfig),C}}function PE(e,t){return void 0}function DE(e){for(const t in e)return!1;return!0}function OE(e){return typeof e=="string"&&e.charCodeAt(0)>96}function RE(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function pc(e,t=0,n=1){return yT(e,t,n)}function ME(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 tr(e){if(e.type)return e;if(e.charAt(0)==="#")return tr(ME(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(yr(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"].includes(i))throw new Error(yr(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const LE=e=>{const t=tr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},qi=(e,t)=>{try{return LE(e)}catch(n){return e}};function za(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function rp(e){e=tr(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(c,d=(c+n/30)%12)=>i-o*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const s=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",s.push(t[3])),za({type:l,values:s})}function gc(e){e=tr(e);let t=e.type==="hsl"||e.type==="hsla"?tr(rp(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:mi((n+.055)/1.055,2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function BE(e,t){const n=gc(e),r=gc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function $E(e,t){return e=tr(e),t=pc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,za(e)}function ja(e,t,n){try{return $E(e,t)}catch(r){return e}}function mc(e,t){if(e=tr(e),t=pc(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return za(e)}function Ne(e,t,n){try{return mc(e,t)}catch(r){return e}}function vc(e,t){if(e=tr(e),t=pc(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return za(e)}function Fe(e,t,n){try{return vc(e,t)}catch(r){return e}}function NE(e,t=.15){return gc(e)>.5?mc(e,t):vc(e,t)}function Va(e,t,n){try{return NE(e,t)}catch(r){return e}}const FE=V.createContext(void 0);function zE(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?sc(i.defaultProps,r):!i.styleOverrides&&!i.variants?sc(i,r):r}function jE({props:e,name:t}){const n=V.useContext(FE);return zE({props:e,name:t,theme:{components:n}})}const ip={theme:void 0};function VE(e){let t,n;return function(i){let o=t;return(o===void 0||i.theme!==n)&&(ip.theme=i.theme,o=tp(e(ip)),t=o,n=i.theme),o}}function UE(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 op=(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])})},HE=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([l,s])=>{(!n||n&&!n([...o,l]))&&s!=null&&(typeof s=="object"&&Object.keys(s).length>0?r(s,[...o,l],Array.isArray(s)?[...a,l]:a):t([...o,l],s,a))})}r(e)},WE=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function bc(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return HE(e,(l,s,c)=>{if((typeof s=="string"||typeof s=="number")&&(!r||!r(l,s))){const d=`--${n?`${n}-`:""}${l.join("-")}`,f=WE(l,s);Object.assign(i,{[d]:f}),op(o,l,`var(${d})`,c),op(a,l,`var(${d}, ${f})`,c)}},l=>l[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function GE(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:i}=t,y=e,{colorSchemes:o={},components:a,defaultColorScheme:l="light"}=y,s=We(y,["colorSchemes","components","defaultColorScheme"]),{vars:c,css:d,varsWithDefaults:f}=bc(s,t);let h=f;const p={},C=o,{[l]:m}=C,g=We(C,[Ps(l)]);if(Object.entries(g||{}).forEach(([b,T])=>{const{vars:E,css:P,varsWithDefaults:O}=bc(T,t);h=Wt(h,O),p[b]={css:P,vars:E}}),m){const{css:b,vars:T,varsWithDefaults:E}=bc(m,t);h=Wt(h,E),p[l]={css:b,vars:T}}function v(b,T){var P,O;let E=i;if(i==="class"&&(E=".%s"),i==="data"&&(E="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(E=`[${i}="%s"]`),b){if(E==="media")return e.defaultColorScheme===b?":root":{[`@media (prefers-color-scheme: ${((O=(P=o[b])==null?void 0:P.palette)==null?void 0:O.mode)||b})`]:{":root":T}};if(E)return e.defaultColorScheme===b?`:root, ${E.replace("%s",String(b))}`:E.replace("%s",String(b))}return":root"}return{vars:h,generateThemeVars:()=>{let b=j({},c);return Object.entries(p).forEach(([,{vars:T}])=>{b=Wt(b,T)}),b},generateStyleSheets:()=>{var z,A;const b=[],T=e.defaultColorScheme||"light";function E(W,Y){Object.keys(Y).length&&b.push(typeof W=="string"?{[W]:j({},Y)}:W)}E(n(void 0,j({},d)),d);const G=p,{[T]:P}=G,O=We(G,[Ps(T)]);if(P){const{css:W}=P,Y=(A=(z=o[T])==null?void 0:z.palette)==null?void 0:A.mode,N=j(!r&&Y?{colorScheme:Y}:{},W);E(n(T,j({},N)),N)}return Object.entries(O).forEach(([W,{css:Y}])=>{var B,H;const N=(H=(B=o[W])==null?void 0:B.palette)==null?void 0:H.mode,$=j(!r&&N?{colorScheme:N}:{},Y);E(n(W,j({},$)),$)}),b}}}function YE(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Qi={black:"#000",white:"#fff"},KE={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Wr={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Gr={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ji={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Yr={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Kr={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},qr={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function ap(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Qi.white,default:Qi.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const qE=ap();function sp(){return{text:{primary:Qi.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Qi.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const lp=sp();function cp(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=vc(e.main,i):t==="dark"&&(e.dark=mc(e.main,o)))}function QE(e="light"){return e==="dark"?{main:Yr[200],light:Yr[50],dark:Yr[400]}:{main:Yr[700],light:Yr[400],dark:Yr[800]}}function JE(e="light"){return e==="dark"?{main:Wr[200],light:Wr[50],dark:Wr[400]}:{main:Wr[500],light:Wr[300],dark:Wr[700]}}function XE(e="light"){return e==="dark"?{main:Gr[500],light:Gr[300],dark:Gr[700]}:{main:Gr[700],light:Gr[400],dark:Gr[800]}}function ZE(e="light"){return e==="dark"?{main:Kr[400],light:Kr[300],dark:Kr[700]}:{main:Kr[700],light:Kr[500],dark:Kr[900]}}function e_(e="light"){return e==="dark"?{main:qr[400],light:qr[300],dark:qr[700]}:{main:qr[800],light:qr[500],dark:qr[900]}}function t_(e="light"){return e==="dark"?{main:Ji[400],light:Ji[300],dark:Ji[700]}:{main:"#ed6c02",light:Ji[500],dark:Ji[900]}}function yc(e){const g=e,{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=g,i=We(g,["mode","contrastThreshold","tonalOffset"]),o=e.primary||QE(t),a=e.secondary||JE(t),l=e.error||XE(t),s=e.info||ZE(t),c=e.success||e_(t),d=e.warning||t_(t);function f(v){return BE(v,lp.text.primary)>=n?lp.text.primary:qE.text.primary}const h=({color:v,name:S,mainShade:w=500,lightShade:y=300,darkShade:C=700})=>{if(v=j({},v),!v.main&&v[w]&&(v.main=v[w]),!v.hasOwnProperty("main"))throw new Error(yr(11,S?` (${S})`:"",w));if(typeof v.main!="string")throw new Error(yr(12,S?` (${S})`:"",JSON.stringify(v.main)));return cp(v,"light",y,r),cp(v,"dark",C,r),v.contrastText||(v.contrastText=f(v.main)),v};let p;return t==="light"?p=ap():t==="dark"&&(p=sp()),Wt(j({common:j({},Qi),mode:t,primary:h({color:o,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:l,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:s,name:"info"}),success:h({color:c,name:"success"}),grey:KE,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},p),i)}function n_(e){const t={};return Object.entries(e).forEach(r=>{const[i,o]=r;typeof o=="object"&&(t[i]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function r_(e,t){return j({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}function i_(e){return Math.round(e*1e5)/1e5}const up={textTransform:"uppercase"},dp='"Roboto", "Helvetica", "Arial", sans-serif';function o_(e,t){const v=typeof t=="function"?t(e):t,{fontFamily:n=dp,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:s=16,allVariants:c,pxToRem:d}=v,f=We(v,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),h=r/14,p=d||(S=>`${S/s*h}rem`),m=(S,w,y,C,b)=>j(j(j({fontFamily:n,fontWeight:S,fontSize:p(w),lineHeight:y},n===dp?{letterSpacing:`${i_(C/w)}em`}:{}),b),c),g={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(o,48,1.167,0),h4:m(o,34,1.235,.25),h5:m(o,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(o,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(o,16,1.5,.15),body2:m(o,14,1.43,.15),button:m(a,14,1.75,.4,up),caption:m(o,12,1.66,.4),overline:m(o,12,2.66,1,up),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Wt(j({htmlFontSize:s,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},g),f,{clone:!1})}const a_=.2,s_=.14,l_=.12;function je(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${a_})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${s_})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${l_})`].join(",")}const c_=["none",je(0,2,1,-1,0,1,1,0,0,1,3,0),je(0,3,1,-2,0,2,2,0,0,1,5,0),je(0,3,3,-2,0,3,4,0,0,1,8,0),je(0,2,4,-1,0,4,5,0,0,1,10,0),je(0,3,5,-1,0,5,8,0,0,1,14,0),je(0,3,5,-1,0,6,10,0,0,1,18,0),je(0,4,5,-2,0,7,10,1,0,2,16,1),je(0,5,5,-3,0,8,10,1,0,3,14,2),je(0,5,6,-3,0,9,12,1,0,3,16,2),je(0,6,6,-3,0,10,14,1,0,4,18,3),je(0,6,7,-4,0,11,15,1,0,4,20,3),je(0,7,8,-4,0,12,17,2,0,5,22,4),je(0,7,8,-4,0,13,19,2,0,5,24,4),je(0,7,9,-4,0,14,21,2,0,5,26,4),je(0,8,9,-5,0,15,22,2,0,6,28,5),je(0,8,10,-5,0,16,24,2,0,6,30,5),je(0,8,11,-5,0,17,26,2,0,6,32,5),je(0,9,11,-5,0,18,28,2,0,7,34,6),je(0,9,12,-6,0,19,29,2,0,7,36,6),je(0,10,13,-6,0,20,31,3,0,8,38,7),je(0,10,13,-6,0,21,33,3,0,8,40,7),je(0,10,14,-6,0,22,35,3,0,8,42,7),je(0,11,14,-7,0,23,36,3,0,9,44,8),je(0,11,15,-7,0,24,38,3,0,9,46,8)],u_={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},d_={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function fp(e){return`${Math.round(e)}ms`}function f_(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*mi(t,.25)+t/5)*10),3e3)}function h_(e){const t=j(j({},u_),e.easing),n=j(j({},d_),e.duration);return X(j({getAutoHeightDuration:f_,create:(i=["all"],o={})=>{const d=o,{duration:a=n.standard,easing:l=t.easeInOut,delay:s=0}=d,c=We(d,["duration","easing","delay"]);return(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof a=="string"?a:fp(a)} ${l} ${typeof s=="string"?s:fp(s)}`).join(",")}},e),{easing:t,duration:n})}const p_={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function g_(e){return Fn(e)||typeof e=="undefined"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function hp(e={}){const t=j({},e);function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[a,l]=i[o];!g_(l)||a.startsWith("unstable_")?delete r[a]:Fn(l)&&(r[a]=j({},l),n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
2340
2340
|
|
|
2341
2341
|
const theme = ${JSON.stringify(t,null,2)};
|
|
2342
2342
|
|
|
2343
2343
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
2344
2344
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
2345
2345
|
|
|
2346
|
-
export default theme;`}function Cc(e={},...t){const p=e,{breakpoints:n,mixins:r={},spacing:i,palette:o={},transitions:a={},typography:l={},shape:s}=p,c=We(p,["breakpoints","mixins","spacing","palette","transitions","typography","shape"]);if(e.vars)throw new Error(yr(20));const d=yc(o),f=ep(e);let h=Wt(f,{mixins:r_(f.breakpoints,r),palette:d,shadows:c_.slice(),typography:o_(d,l),transitions:h_(a),zIndex:
|
|
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 I_(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){}},S_=(e="mui")=>UE(e);function xc(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=b_(X(U({},t),{palette:U({mode:i},t==null?void 0:t.palette)}));return}const l=Cc(X(U({},n),{palette:U({mode:i},t==null?void 0:t.palette)})),{palette:o}=l,a=We(l,["palette"]);return e[r]=X(U({},t),{palette:o,opacity:U(U({},pp(i)),t==null?void 0:t.opacity),overlays:(t==null?void 0:t.overlays)||gp(i)}),a}function A_(e={},...t){const O=e,{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=y_,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:s=":root"}=O,c=We(O,["colorSchemes","defaultColorScheme","disableCssColorScheme","cssVarPrefix","shouldSkipGeneratingVar","colorSchemeSelector","rootSelector"]),d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),h=S_(o),G=n,{[f]:p,light:m,dark:g}=G,v=We(G,[Ps(f),"light","dark"]),S=U({},v);let w=p;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(w=!0),!w)throw new Error(yr(21,f));const y=xc(S,w,c,f);m&&!S.light&&xc(S,m,void 0,"light"),g&&!S.dark&&xc(S,g,void 0,"dark");let C=X(U({defaultColorScheme:f},y),{cssVarPrefix:o,colorSchemeSelector:l,rootSelector:s,getCssVar:h,colorSchemes:S,font:U(U({},n_(y.typography)),y.font),spacing:I_(c.spacing)});Object.keys(C.colorSchemes).forEach(z=>{const A=C.colorSchemes[z].palette,W=Y=>{const N=Y.split("-"),$=N[1],B=N[2];return h(Y,A[$][B])};if(A.mode==="light"&&(Z(A.common,"background","#fff"),Z(A.common,"onBackground","#000")),A.mode==="dark"&&(Z(A.common,"background","#000"),Z(A.common,"onBackground","#fff")),w_(A,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),A.mode==="light"){Z(A.Alert,"errorColor",Ne(A.error.light,.6)),Z(A.Alert,"infoColor",Ne(A.info.light,.6)),Z(A.Alert,"successColor",Ne(A.success.light,.6)),Z(A.Alert,"warningColor",Ne(A.warning.light,.6)),Z(A.Alert,"errorFilledBg",W("palette-error-main")),Z(A.Alert,"infoFilledBg",W("palette-info-main")),Z(A.Alert,"successFilledBg",W("palette-success-main")),Z(A.Alert,"warningFilledBg",W("palette-warning-main")),Z(A.Alert,"errorFilledColor",yn(()=>A.getContrastText(A.error.main))),Z(A.Alert,"infoFilledColor",yn(()=>A.getContrastText(A.info.main))),Z(A.Alert,"successFilledColor",yn(()=>A.getContrastText(A.success.main))),Z(A.Alert,"warningFilledColor",yn(()=>A.getContrastText(A.warning.main))),Z(A.Alert,"errorStandardBg",Fe(A.error.light,.9)),Z(A.Alert,"infoStandardBg",Fe(A.info.light,.9)),Z(A.Alert,"successStandardBg",Fe(A.success.light,.9)),Z(A.Alert,"warningStandardBg",Fe(A.warning.light,.9)),Z(A.Alert,"errorIconColor",W("palette-error-main")),Z(A.Alert,"infoIconColor",W("palette-info-main")),Z(A.Alert,"successIconColor",W("palette-success-main")),Z(A.Alert,"warningIconColor",W("palette-warning-main")),Z(A.AppBar,"defaultBg",W("palette-grey-100")),Z(A.Avatar,"defaultBg",W("palette-grey-400")),Z(A.Button,"inheritContainedBg",W("palette-grey-300")),Z(A.Button,"inheritContainedHoverBg",W("palette-grey-A100")),Z(A.Chip,"defaultBorder",W("palette-grey-400")),Z(A.Chip,"defaultAvatarColor",W("palette-grey-700")),Z(A.Chip,"defaultIconColor",W("palette-grey-700")),Z(A.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Z(A.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Z(A.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Z(A.LinearProgress,"primaryBg",Fe(A.primary.main,.62)),Z(A.LinearProgress,"secondaryBg",Fe(A.secondary.main,.62)),Z(A.LinearProgress,"errorBg",Fe(A.error.main,.62)),Z(A.LinearProgress,"infoBg",Fe(A.info.main,.62)),Z(A.LinearProgress,"successBg",Fe(A.success.main,.62)),Z(A.LinearProgress,"warningBg",Fe(A.warning.main,.62)),Z(A.Skeleton,"bg",`rgba(${W("palette-text-primaryChannel")} / 0.11)`),Z(A.Slider,"primaryTrack",Fe(A.primary.main,.62)),Z(A.Slider,"secondaryTrack",Fe(A.secondary.main,.62)),Z(A.Slider,"errorTrack",Fe(A.error.main,.62)),Z(A.Slider,"infoTrack",Fe(A.info.main,.62)),Z(A.Slider,"successTrack",Fe(A.success.main,.62)),Z(A.Slider,"warningTrack",Fe(A.warning.main,.62));const Y=Va(A.background.default,.8);Z(A.SnackbarContent,"bg",Y),Z(A.SnackbarContent,"color",yn(()=>A.getContrastText(Y))),Z(A.SpeedDialAction,"fabHoverBg",Va(A.background.paper,.15)),Z(A.StepConnector,"border",W("palette-grey-400")),Z(A.StepContent,"border",W("palette-grey-400")),Z(A.Switch,"defaultColor",W("palette-common-white")),Z(A.Switch,"defaultDisabledColor",W("palette-grey-100")),Z(A.Switch,"primaryDisabledColor",Fe(A.primary.main,.62)),Z(A.Switch,"secondaryDisabledColor",Fe(A.secondary.main,.62)),Z(A.Switch,"errorDisabledColor",Fe(A.error.main,.62)),Z(A.Switch,"infoDisabledColor",Fe(A.info.main,.62)),Z(A.Switch,"successDisabledColor",Fe(A.success.main,.62)),Z(A.Switch,"warningDisabledColor",Fe(A.warning.main,.62)),Z(A.TableCell,"border",Fe(ja(A.divider,1),.88)),Z(A.Tooltip,"bg",ja(A.grey[700],.92))}if(A.mode==="dark"){Z(A.Alert,"errorColor",Fe(A.error.light,.6)),Z(A.Alert,"infoColor",Fe(A.info.light,.6)),Z(A.Alert,"successColor",Fe(A.success.light,.6)),Z(A.Alert,"warningColor",Fe(A.warning.light,.6)),Z(A.Alert,"errorFilledBg",W("palette-error-dark")),Z(A.Alert,"infoFilledBg",W("palette-info-dark")),Z(A.Alert,"successFilledBg",W("palette-success-dark")),Z(A.Alert,"warningFilledBg",W("palette-warning-dark")),Z(A.Alert,"errorFilledColor",yn(()=>A.getContrastText(A.error.dark))),Z(A.Alert,"infoFilledColor",yn(()=>A.getContrastText(A.info.dark))),Z(A.Alert,"successFilledColor",yn(()=>A.getContrastText(A.success.dark))),Z(A.Alert,"warningFilledColor",yn(()=>A.getContrastText(A.warning.dark))),Z(A.Alert,"errorStandardBg",Ne(A.error.light,.9)),Z(A.Alert,"infoStandardBg",Ne(A.info.light,.9)),Z(A.Alert,"successStandardBg",Ne(A.success.light,.9)),Z(A.Alert,"warningStandardBg",Ne(A.warning.light,.9)),Z(A.Alert,"errorIconColor",W("palette-error-main")),Z(A.Alert,"infoIconColor",W("palette-info-main")),Z(A.Alert,"successIconColor",W("palette-success-main")),Z(A.Alert,"warningIconColor",W("palette-warning-main")),Z(A.AppBar,"defaultBg",W("palette-grey-900")),Z(A.AppBar,"darkBg",W("palette-background-paper")),Z(A.AppBar,"darkColor",W("palette-text-primary")),Z(A.Avatar,"defaultBg",W("palette-grey-600")),Z(A.Button,"inheritContainedBg",W("palette-grey-800")),Z(A.Button,"inheritContainedHoverBg",W("palette-grey-700")),Z(A.Chip,"defaultBorder",W("palette-grey-700")),Z(A.Chip,"defaultAvatarColor",W("palette-grey-300")),Z(A.Chip,"defaultIconColor",W("palette-grey-300")),Z(A.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Z(A.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Z(A.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Z(A.LinearProgress,"primaryBg",Ne(A.primary.main,.5)),Z(A.LinearProgress,"secondaryBg",Ne(A.secondary.main,.5)),Z(A.LinearProgress,"errorBg",Ne(A.error.main,.5)),Z(A.LinearProgress,"infoBg",Ne(A.info.main,.5)),Z(A.LinearProgress,"successBg",Ne(A.success.main,.5)),Z(A.LinearProgress,"warningBg",Ne(A.warning.main,.5)),Z(A.Skeleton,"bg",`rgba(${W("palette-text-primaryChannel")} / 0.13)`),Z(A.Slider,"primaryTrack",Ne(A.primary.main,.5)),Z(A.Slider,"secondaryTrack",Ne(A.secondary.main,.5)),Z(A.Slider,"errorTrack",Ne(A.error.main,.5)),Z(A.Slider,"infoTrack",Ne(A.info.main,.5)),Z(A.Slider,"successTrack",Ne(A.success.main,.5)),Z(A.Slider,"warningTrack",Ne(A.warning.main,.5));const Y=Va(A.background.default,.98);Z(A.SnackbarContent,"bg",Y),Z(A.SnackbarContent,"color",yn(()=>A.getContrastText(Y))),Z(A.SpeedDialAction,"fabHoverBg",Va(A.background.paper,.15)),Z(A.StepConnector,"border",W("palette-grey-600")),Z(A.StepContent,"border",W("palette-grey-600")),Z(A.Switch,"defaultColor",W("palette-grey-300")),Z(A.Switch,"defaultDisabledColor",W("palette-grey-600")),Z(A.Switch,"primaryDisabledColor",Ne(A.primary.main,.55)),Z(A.Switch,"secondaryDisabledColor",Ne(A.secondary.main,.55)),Z(A.Switch,"errorDisabledColor",Ne(A.error.main,.55)),Z(A.Switch,"infoDisabledColor",Ne(A.info.main,.55)),Z(A.Switch,"successDisabledColor",Ne(A.success.main,.55)),Z(A.Switch,"warningDisabledColor",Ne(A.warning.main,.55)),Z(A.TableCell,"border",Ne(ja(A.divider,1),.68)),Z(A.Tooltip,"bg",ja(A.grey[700],.92))}jn(A.background,"default"),jn(A.background,"paper"),jn(A.common,"background"),jn(A.common,"onBackground"),jn(A,"divider"),Object.keys(A).forEach(Y=>{const N=A[Y];Y!=="tonalOffset"&&N&&typeof N=="object"&&(N.main&&Z(A[Y],"mainChannel",qi(Xi(N.main))),N.light&&Z(A[Y],"lightChannel",qi(Xi(N.light))),N.dark&&Z(A[Y],"darkChannel",qi(Xi(N.dark))),N.contrastText&&Z(A[Y],"contrastTextChannel",qi(Xi(N.contrastText))),Y==="text"&&(jn(A[Y],"primary"),jn(A[Y],"secondary")),Y==="action"&&(N.active&&jn(A[Y],"active"),N.selected&&jn(A[Y],"selected")))})}),C=t.reduce((z,A)=>Wt(z,A),C);const b={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:x_(C)},{vars:T,generateThemeVars:E,generateStyleSheets:P}=GE(C,b);return C.vars=T,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([z,A])=>{C[z]=A}),C.generateThemeVars=E,C.generateStyleSheets=P,C.generateSpacing=function(){return Zh(c.spacing,uc(this))},C.getColorSchemeSelector=YE(l),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=a,C.unstable_sxConfig=U(U({},$a),c==null?void 0:c.unstable_sxConfig),C.unstable_sx=function(A){return Hr({sx:A,theme:this})},C.toRuntimeSource=hp,C}function mp(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]=X(U({},n!==!0&&n),{palette:yc(X(U({},n===!0?{}:n.palette),{mode:t}))}))}function T_(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=We(d,["palette","cssVariables","colorSchemes","defaultColorScheme"]),l=o||"light",s=i==null?void 0:i[l],c=U(U({},i),n?{[l]:X(U({},typeof s!="boolean"&&s),{palette:n})}:void 0);if(r===!1){if(!("colorSchemes"in e))return Cc(e,...t);let f=n;"palette"in e||c[l]&&(c[l]!==!0?f=c[l].palette:l==="dark"&&(f={mode:"dark"}));const h=Cc(X(U({},e),{palette:f}),...t);return h.defaultColorScheme=l,h.colorSchemes=c,h.palette.mode==="light"&&(h.colorSchemes.light=X(U({},c.light!==!0&&c.light),{palette:h.palette}),mp(h,"dark",c.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark=X(U({},c.dark!==!0&&c.dark),{palette:h.palette}),mp(h,"light",c.light)),h}return!n&&!("light"in c)&&l==="light"&&(c.light=!0),A_(U(X(U({},a),{colorSchemes:c,defaultColorScheme:l}),typeof r!="boolean"&&r),...t)}const E_=T_(),__="$$material";function k_(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const P_=kE({themeId:__,defaultTheme:E_,rootShouldForwardProp:e=>k_(e)&&e!=="classes"}),D_=VE;function O_(e){return jE(e)}function R_(e){return Uh("MuiSvgIcon",e)}bT("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const M_=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Vr(t)}`,`fontSize${Vr(n)}`]};return gT(i,R_,r)},L_=P_("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Vr(n.color)}`],t[`fontSize${Vr(n.fontSize)}`]]}})(D_(({theme:e})=>{var t,n,r,i,o,a,l,s,c,d,f,h,p,m,g,v,S,w;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:y=>!y.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((l=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:l.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:c.call(s,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(([,y])=>y&&y.main).map(([y])=>{var C,b,T;return{props:{color:y},style:{color:(T=(b=((C=e.vars)!=null?C:e).palette)==null?void 0:b[y])==null?void 0:T.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:(w=(S=((v=e.vars)!=null?v:e).palette)==null?void 0:S.action)==null?void 0:w.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),wc=j.forwardRef(function(t,n){const r=O_({props:t,name:"MuiSvgIcon"}),w=r,{children:i,className:o,color:a="inherit",component:l="svg",fontSize:s="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24"}=w,p=We(w,["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"]),m=j.isValidElement(i)&&i.type==="svg",g=X(U({},r),{color:a,component:l,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:m}),v={};d||(v.viewBox=h);const S=M_(g);return u.jsxs(L_,X(U(U(U({as:l,className:Ln(S.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},v),p),m&&i.props),{ownerState:g,children:[m?i.props.children:i,f?u.jsx("title",{children:f}):null]}))});wc.muiName="SvgIcon";function Ve(e,t){function n(r,i){return u.jsx(wc,X(U({"data-testid":`${t}Icon`,ref:i},r),{children:e}))}return n.muiName=wc.muiName,j.memo(j.forwardRef(n))}const Ic=Ve(u.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"),B_=Ve(u.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"),$_=Ve(u.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 N_(e){return it("MuiTabPanel",e)}Xe("MuiTabPanel",["root","hidden","sizeSm","sizeMd","sizeLg","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const F_=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],z_=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 lt(a,N_,{})},j_=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])}),Qr=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabPanel"}),{orientation:i}=ga()||{orientation:"horizontal"},o=j.useContext(oc),{children:a,value:l=0,component:s,color:c="neutral",variant:d="plain",size:f,slots:h={},slotProps:p={},keepMounted:m=!1}=r,g=Ae(r,F_),{hidden:v,getRootProps:S}=PS(D({},r,{value:l})),w=f!=null?f:o,y=D({},r,{orientation:i,hidden:v,size:w,color:c,variant:d}),C=z_(y),b=D({},g,{component:s,slots:h,slotProps:p}),[T,E]=Ie("root",{ref:n,elementType:j_,getSlotProps:S,externalForwardedProps:b,additionalProps:{role:"tabpanel",ref:n,as:s},ownerState:y,className:C.root});return m?u.jsx(T,D({},E,{children:a})):u.jsx(T,D({},E,{children:!v&&a}))});function V_(e){return it("MuiInput",e)}const vp=Xe("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"]),Ua=j.createContext(void 0),U_=["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 H_(e,t){var n;const r=j.useContext(Ua),{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:s,className:c,defaultValue:d,disabled:f,disabledInProp:h,error:p,id:m,name:g,onClick:v,onChange:S,onKeyDown:w,onKeyUp:y,onFocus:C,onBlur:b,placeholder:T,readOnly:E,required:P,type:O,value:G}=e,z=Ae(e,U_),{getRootProps:A,getInputProps:W,focused:Y,error:N,disabled:$}=WI({disabled:(n=h!=null?h:r==null?void 0:r.disabled)!=null?n:f,defaultValue:d,error:p,onBlur:b,onClick:v,onChange:S,onFocus:C,required:P!=null?P:r==null?void 0:r.required,value:G}),B={[t.disabled]:$,[t.error]:N,[t.focused]:Y,[t.formControl]:!!r,[c]:c},H={[t.disabled]:$};return D({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:s,disabled:$,id:m,onKeyDown:w,onKeyUp:y,name:g,placeholder:T,readOnly:E,type:O},rootStateClasses:B,inputStateClasses:H,getRootProps:A,getInputProps:W,focused:Y,error:N,disabled:$},z)}const Sc=e=>t=>`--${e?`${e}-`:""}${t.replace(/^--/,"")}`,Zi="data-skip-inverted-colors",bp=`& :not([${Zi}], [${Zi}] *)`,yp=e=>{var t,n,r,i,o,a,l,s,c,d,f,h,p,m,g,v,S,w,y,C,b,T;const E=Sc(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")]:`${(l=e.colorSchemes.light)==null?void 0:l.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(s=e.colorSchemes.light)==null?void 0:s.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(c=e.colorSchemes.light)==null?void 0:c.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")]:`${(v=e.colorSchemes.dark)==null?void 0:v.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(S=e.colorSchemes.dark)==null?void 0:S.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(w=e.colorSchemes.dark)==null?void 0:w.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(y=e.colorSchemes.dark)==null?void 0:y.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(C=e.colorSchemes.dark)==null?void 0:C.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(b=e.colorSchemes.dark)==null?void 0:b.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(T=e.colorSchemes.dark)==null?void 0:T.palette.divider} !important`}}};function W_(e){return e.theme!==void 0}const G_=e=>t=>{const n=W_(t)?t.theme:t,r=Gl(n.cssVarPrefix),i=Sc(n.cssVarPrefix),o=a=>{const l=a.split("-");return r(a,n.palette[l[1]][l[2]])};return{[bp]:{"--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)`}},[`&, & [${Zi}]`]:yp(n)}},Y_=e=>t=>{const{theme:n=t}=t,r=Gl(n.cssVarPrefix),i=Sc(n.cssVarPrefix),o=a=>{const l=a.split("-");return r(a,n.palette[l[1]][l[2]])};return{[bp]:{"--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)`}},[`&, & [${Zi}]`]:yp(n)}},K_=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","fullWidth","size","color","variant","startDecorator","endDecorator","component","slots","slotProps"],q_=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 lt(a,V_,{})},Q_=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,l;const s=(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([${Zi}])`]: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}`],s,{backgroundColor:(o=s==null?void 0:s.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}),[`&.${vp.disabled}`]:(l=e.variants[`${t.variant}Disabled`])==null?void 0:l[t.color],"&:focus-within::before":{"--Input-focused":"1"}}]}),J_=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)"}})),X_=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"}),Z_=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"}),ek=be(Q_,{name:"JoyInput",slot:"Root",overridesResolver:(e,t)=>t.root})({}),tk=be(J_,{name:"JoyInput",slot:"Input",overridesResolver:(e,t)=>t.input})({}),nk=be(X_,{name:"JoyInput",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({}),rk=be(Z_,{name:"JoyInput",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({}),Ha=j.forwardRef(function(t,n){var r,i,o,a,l,s;const c=ct({props:t,name:"JoyInput"}),d=H_(D({},c,{disabledInProp:t.disabled}),vp),{propsToForward:f,rootStateClasses:h,inputStateClasses:p,getRootProps:m,getInputProps:g,formControl:v,focused:S,error:w=!1,disabled:y,fullWidth:C=!1,size:b="md",color:T="neutral",variant:E="outlined",startDecorator:P,endDecorator:O,component:G,slots:z={},slotProps:A={}}=d,W=Ae(d,K_),Y=(r=(i=t.error)!=null?i:v==null?void 0:v.error)!=null?r:w,N=(o=(a=t.size)!=null?a:v==null?void 0:v.size)!=null?o:b,$=(l=t.color)!=null?l:Y?"danger":(s=v==null?void 0:v.color)!=null?s:T,B=D({instanceColor:Y?"danger":t.color},c,{fullWidth:C,color:$,disabled:y,error:Y,focused:S,size:N,variant:E}),H=q_(B),q=D({},W,{component:G,slots:z,slotProps:A}),[ee,R]=Ie("root",{ref:n,className:[H.root,h],elementType:ek,getSlotProps:m,externalForwardedProps:q,ownerState:B}),[L,F]=Ie("input",D({},v&&{additionalProps:{id:v.htmlFor,"aria-describedby":v["aria-describedby"]}},{className:[H.input,p],elementType:tk,getSlotProps:g,internalForwardedProps:f,externalForwardedProps:q,ownerState:B})),[V,te]=Ie("startDecorator",{className:H.startDecorator,elementType:nk,externalForwardedProps:q,ownerState:B}),[se,ae]=Ie("endDecorator",{className:H.endDecorator,elementType:rk,externalForwardedProps:q,ownerState:B});return u.jsxs(ee,D({},R,{children:[P&&u.jsx(V,D({},te,{children:P})),u.jsx(L,D({},F)),O&&u.jsx(se,D({},ae,{children:O}))]}))}),eo=({label:e,placeholder:t,value:n,defaultValue:r,required:i,size:o,readOnly:a=!1,onChange:l})=>u.jsxs(I.FormControl,{size:o||"md",sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{required:i,color:"primary",children:e}),u.jsx(Ha,{placeholder:t,size:"md",variant:"outlined",color:"neutral",value:n||r,defaultValue:r,readOnly:a,onChange:l,sx:{backgroundColor:"#fff",borderRadius:"md"}})]}),Cp=Ve(u.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 ik(e){return it("MuiCircularProgress",e)}Xe("MuiCircularProgress",["root","determinate","svg","track","progress","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);let ok=e=>e,xp;const ak=["color","backgroundColor"],sk=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],lk=pe.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),ck=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 lt(o,ik,{})};function Jr(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}const uk=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:l,backgroundColor:s}=a,c=Ae(a,ak);return D({"--Icon-fontSize":"calc(0.4 * var(--_root-size))","--CircularProgress-trackColor":s,"--CircularProgress-progressColor":l,"--CircularProgress-percent":e.value,"--CircularProgress-linecap":"round"},e.size==="sm"&&{"--_root-size":"var(--CircularProgress-size, 24px)","--_track-thickness":Jr("track","3px"),"--_progress-thickness":Jr("progress","3px")},e.instanceSize==="sm"&&{"--CircularProgress-size":"24px"},e.size==="md"&&{"--_track-thickness":Jr("track","6px"),"--_progress-thickness":Jr("progress","6px"),"--_root-size":"var(--CircularProgress-size, 40px)"},e.instanceSize==="md"&&{"--CircularProgress-size":"40px"},e.size==="lg"&&{"--_track-thickness":Jr("track","8px"),"--_progress-thickness":Jr("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:l},e.children&&{fontFamily:t.vars.fontFamily.body,fontWeight:t.vars.fontWeight.md,fontSize:"calc(0.2 * var(--_root-size))"},c,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)"},c)},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})}),dk=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))"}),fk=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)"}),hk=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&&pe.css(xp||(xp=ok`
|
|
2346
|
+
export default theme;`}function Cc(e={},...t){const p=e,{breakpoints:n,mixins:r={},spacing:i,palette:o={},transitions:a={},typography:l={},shape:s}=p,c=We(p,["breakpoints","mixins","spacing","palette","transitions","typography","shape"]);if(e.vars)throw new Error(yr(20));const d=yc(o),f=ep(e);let h=Wt(f,{mixins:r_(f.breakpoints,r),palette:d,shadows:c_.slice(),typography:o_(d,l),transitions:h_(a),zIndex:j({},p_)});return h=Wt(h,c),h=t.reduce((m,g)=>Wt(m,g),h),h.unstable_sxConfig=j(j({},$a),c==null?void 0:c.unstable_sxConfig),h.unstable_sx=function(g){return Hr({sx:g,theme:this})},h.toRuntimeSource=hp,h}function m_(e){let t;return e<1?t=5.11916*mi(e,2):t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const v_=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=m_(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function pp(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function gp(e){return e==="dark"?v_:[]}function b_(e){const a=e,{palette:t={mode:"light"},opacity:n,overlays:r}=a,i=We(a,["palette","opacity","overlays"]),o=yc(t);return j({palette:o,opacity:j(j({},pp(o.mode)),n),overlays:r||gp(o.mode)},i)}function y_(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 C_=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],x_=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 C_(e.cssVarPrefix).forEach(l=>{a[l]=n[l],delete n[l]}),o==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:o?{[o.replace("%s",t)]:a,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:j(j({},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 w_(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function Z(e,t,n){!e[t]&&n&&(e[t]=n)}function Xi(e){return typeof e!="string"||!e.startsWith("hsl")?e:rp(e)}function jn(e,t){`${t}Channel`in e||(e[`${t}Channel`]=qi(Xi(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 I_(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){}},S_=(e="mui")=>UE(e);function xc(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=b_(X(j({},t),{palette:j({mode:i},t==null?void 0:t.palette)}));return}const l=Cc(X(j({},n),{palette:j({mode:i},t==null?void 0:t.palette)})),{palette:o}=l,a=We(l,["palette"]);return e[r]=X(j({},t),{palette:o,opacity:j(j({},pp(i)),t==null?void 0:t.opacity),overlays:(t==null?void 0:t.overlays)||gp(i)}),a}function A_(e={},...t){const O=e,{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=y_,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:s=":root"}=O,c=We(O,["colorSchemes","defaultColorScheme","disableCssColorScheme","cssVarPrefix","shouldSkipGeneratingVar","colorSchemeSelector","rootSelector"]),d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),h=S_(o),G=n,{[f]:p,light:m,dark:g}=G,v=We(G,[Ps(f),"light","dark"]),S=j({},v);let w=p;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(w=!0),!w)throw new Error(yr(21,f));const y=xc(S,w,c,f);m&&!S.light&&xc(S,m,void 0,"light"),g&&!S.dark&&xc(S,g,void 0,"dark");let C=X(j({defaultColorScheme:f},y),{cssVarPrefix:o,colorSchemeSelector:l,rootSelector:s,getCssVar:h,colorSchemes:S,font:j(j({},n_(y.typography)),y.font),spacing:I_(c.spacing)});Object.keys(C.colorSchemes).forEach(z=>{const A=C.colorSchemes[z].palette,W=Y=>{const N=Y.split("-"),$=N[1],B=N[2];return h(Y,A[$][B])};if(A.mode==="light"&&(Z(A.common,"background","#fff"),Z(A.common,"onBackground","#000")),A.mode==="dark"&&(Z(A.common,"background","#000"),Z(A.common,"onBackground","#fff")),w_(A,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),A.mode==="light"){Z(A.Alert,"errorColor",Ne(A.error.light,.6)),Z(A.Alert,"infoColor",Ne(A.info.light,.6)),Z(A.Alert,"successColor",Ne(A.success.light,.6)),Z(A.Alert,"warningColor",Ne(A.warning.light,.6)),Z(A.Alert,"errorFilledBg",W("palette-error-main")),Z(A.Alert,"infoFilledBg",W("palette-info-main")),Z(A.Alert,"successFilledBg",W("palette-success-main")),Z(A.Alert,"warningFilledBg",W("palette-warning-main")),Z(A.Alert,"errorFilledColor",yn(()=>A.getContrastText(A.error.main))),Z(A.Alert,"infoFilledColor",yn(()=>A.getContrastText(A.info.main))),Z(A.Alert,"successFilledColor",yn(()=>A.getContrastText(A.success.main))),Z(A.Alert,"warningFilledColor",yn(()=>A.getContrastText(A.warning.main))),Z(A.Alert,"errorStandardBg",Fe(A.error.light,.9)),Z(A.Alert,"infoStandardBg",Fe(A.info.light,.9)),Z(A.Alert,"successStandardBg",Fe(A.success.light,.9)),Z(A.Alert,"warningStandardBg",Fe(A.warning.light,.9)),Z(A.Alert,"errorIconColor",W("palette-error-main")),Z(A.Alert,"infoIconColor",W("palette-info-main")),Z(A.Alert,"successIconColor",W("palette-success-main")),Z(A.Alert,"warningIconColor",W("palette-warning-main")),Z(A.AppBar,"defaultBg",W("palette-grey-100")),Z(A.Avatar,"defaultBg",W("palette-grey-400")),Z(A.Button,"inheritContainedBg",W("palette-grey-300")),Z(A.Button,"inheritContainedHoverBg",W("palette-grey-A100")),Z(A.Chip,"defaultBorder",W("palette-grey-400")),Z(A.Chip,"defaultAvatarColor",W("palette-grey-700")),Z(A.Chip,"defaultIconColor",W("palette-grey-700")),Z(A.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Z(A.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Z(A.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Z(A.LinearProgress,"primaryBg",Fe(A.primary.main,.62)),Z(A.LinearProgress,"secondaryBg",Fe(A.secondary.main,.62)),Z(A.LinearProgress,"errorBg",Fe(A.error.main,.62)),Z(A.LinearProgress,"infoBg",Fe(A.info.main,.62)),Z(A.LinearProgress,"successBg",Fe(A.success.main,.62)),Z(A.LinearProgress,"warningBg",Fe(A.warning.main,.62)),Z(A.Skeleton,"bg",`rgba(${W("palette-text-primaryChannel")} / 0.11)`),Z(A.Slider,"primaryTrack",Fe(A.primary.main,.62)),Z(A.Slider,"secondaryTrack",Fe(A.secondary.main,.62)),Z(A.Slider,"errorTrack",Fe(A.error.main,.62)),Z(A.Slider,"infoTrack",Fe(A.info.main,.62)),Z(A.Slider,"successTrack",Fe(A.success.main,.62)),Z(A.Slider,"warningTrack",Fe(A.warning.main,.62));const Y=Va(A.background.default,.8);Z(A.SnackbarContent,"bg",Y),Z(A.SnackbarContent,"color",yn(()=>A.getContrastText(Y))),Z(A.SpeedDialAction,"fabHoverBg",Va(A.background.paper,.15)),Z(A.StepConnector,"border",W("palette-grey-400")),Z(A.StepContent,"border",W("palette-grey-400")),Z(A.Switch,"defaultColor",W("palette-common-white")),Z(A.Switch,"defaultDisabledColor",W("palette-grey-100")),Z(A.Switch,"primaryDisabledColor",Fe(A.primary.main,.62)),Z(A.Switch,"secondaryDisabledColor",Fe(A.secondary.main,.62)),Z(A.Switch,"errorDisabledColor",Fe(A.error.main,.62)),Z(A.Switch,"infoDisabledColor",Fe(A.info.main,.62)),Z(A.Switch,"successDisabledColor",Fe(A.success.main,.62)),Z(A.Switch,"warningDisabledColor",Fe(A.warning.main,.62)),Z(A.TableCell,"border",Fe(ja(A.divider,1),.88)),Z(A.Tooltip,"bg",ja(A.grey[700],.92))}if(A.mode==="dark"){Z(A.Alert,"errorColor",Fe(A.error.light,.6)),Z(A.Alert,"infoColor",Fe(A.info.light,.6)),Z(A.Alert,"successColor",Fe(A.success.light,.6)),Z(A.Alert,"warningColor",Fe(A.warning.light,.6)),Z(A.Alert,"errorFilledBg",W("palette-error-dark")),Z(A.Alert,"infoFilledBg",W("palette-info-dark")),Z(A.Alert,"successFilledBg",W("palette-success-dark")),Z(A.Alert,"warningFilledBg",W("palette-warning-dark")),Z(A.Alert,"errorFilledColor",yn(()=>A.getContrastText(A.error.dark))),Z(A.Alert,"infoFilledColor",yn(()=>A.getContrastText(A.info.dark))),Z(A.Alert,"successFilledColor",yn(()=>A.getContrastText(A.success.dark))),Z(A.Alert,"warningFilledColor",yn(()=>A.getContrastText(A.warning.dark))),Z(A.Alert,"errorStandardBg",Ne(A.error.light,.9)),Z(A.Alert,"infoStandardBg",Ne(A.info.light,.9)),Z(A.Alert,"successStandardBg",Ne(A.success.light,.9)),Z(A.Alert,"warningStandardBg",Ne(A.warning.light,.9)),Z(A.Alert,"errorIconColor",W("palette-error-main")),Z(A.Alert,"infoIconColor",W("palette-info-main")),Z(A.Alert,"successIconColor",W("palette-success-main")),Z(A.Alert,"warningIconColor",W("palette-warning-main")),Z(A.AppBar,"defaultBg",W("palette-grey-900")),Z(A.AppBar,"darkBg",W("palette-background-paper")),Z(A.AppBar,"darkColor",W("palette-text-primary")),Z(A.Avatar,"defaultBg",W("palette-grey-600")),Z(A.Button,"inheritContainedBg",W("palette-grey-800")),Z(A.Button,"inheritContainedHoverBg",W("palette-grey-700")),Z(A.Chip,"defaultBorder",W("palette-grey-700")),Z(A.Chip,"defaultAvatarColor",W("palette-grey-300")),Z(A.Chip,"defaultIconColor",W("palette-grey-300")),Z(A.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Z(A.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Z(A.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Z(A.LinearProgress,"primaryBg",Ne(A.primary.main,.5)),Z(A.LinearProgress,"secondaryBg",Ne(A.secondary.main,.5)),Z(A.LinearProgress,"errorBg",Ne(A.error.main,.5)),Z(A.LinearProgress,"infoBg",Ne(A.info.main,.5)),Z(A.LinearProgress,"successBg",Ne(A.success.main,.5)),Z(A.LinearProgress,"warningBg",Ne(A.warning.main,.5)),Z(A.Skeleton,"bg",`rgba(${W("palette-text-primaryChannel")} / 0.13)`),Z(A.Slider,"primaryTrack",Ne(A.primary.main,.5)),Z(A.Slider,"secondaryTrack",Ne(A.secondary.main,.5)),Z(A.Slider,"errorTrack",Ne(A.error.main,.5)),Z(A.Slider,"infoTrack",Ne(A.info.main,.5)),Z(A.Slider,"successTrack",Ne(A.success.main,.5)),Z(A.Slider,"warningTrack",Ne(A.warning.main,.5));const Y=Va(A.background.default,.98);Z(A.SnackbarContent,"bg",Y),Z(A.SnackbarContent,"color",yn(()=>A.getContrastText(Y))),Z(A.SpeedDialAction,"fabHoverBg",Va(A.background.paper,.15)),Z(A.StepConnector,"border",W("palette-grey-600")),Z(A.StepContent,"border",W("palette-grey-600")),Z(A.Switch,"defaultColor",W("palette-grey-300")),Z(A.Switch,"defaultDisabledColor",W("palette-grey-600")),Z(A.Switch,"primaryDisabledColor",Ne(A.primary.main,.55)),Z(A.Switch,"secondaryDisabledColor",Ne(A.secondary.main,.55)),Z(A.Switch,"errorDisabledColor",Ne(A.error.main,.55)),Z(A.Switch,"infoDisabledColor",Ne(A.info.main,.55)),Z(A.Switch,"successDisabledColor",Ne(A.success.main,.55)),Z(A.Switch,"warningDisabledColor",Ne(A.warning.main,.55)),Z(A.TableCell,"border",Ne(ja(A.divider,1),.68)),Z(A.Tooltip,"bg",ja(A.grey[700],.92))}jn(A.background,"default"),jn(A.background,"paper"),jn(A.common,"background"),jn(A.common,"onBackground"),jn(A,"divider"),Object.keys(A).forEach(Y=>{const N=A[Y];Y!=="tonalOffset"&&N&&typeof N=="object"&&(N.main&&Z(A[Y],"mainChannel",qi(Xi(N.main))),N.light&&Z(A[Y],"lightChannel",qi(Xi(N.light))),N.dark&&Z(A[Y],"darkChannel",qi(Xi(N.dark))),N.contrastText&&Z(A[Y],"contrastTextChannel",qi(Xi(N.contrastText))),Y==="text"&&(jn(A[Y],"primary"),jn(A[Y],"secondary")),Y==="action"&&(N.active&&jn(A[Y],"active"),N.selected&&jn(A[Y],"selected")))})}),C=t.reduce((z,A)=>Wt(z,A),C);const b={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:x_(C)},{vars:T,generateThemeVars:E,generateStyleSheets:P}=GE(C,b);return C.vars=T,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([z,A])=>{C[z]=A}),C.generateThemeVars=E,C.generateStyleSheets=P,C.generateSpacing=function(){return Zh(c.spacing,uc(this))},C.getColorSchemeSelector=YE(l),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=a,C.unstable_sxConfig=j(j({},$a),c==null?void 0:c.unstable_sxConfig),C.unstable_sx=function(A){return Hr({sx:A,theme:this})},C.toRuntimeSource=hp,C}function mp(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]=X(j({},n!==!0&&n),{palette:yc(X(j({},n===!0?{}:n.palette),{mode:t}))}))}function T_(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=We(d,["palette","cssVariables","colorSchemes","defaultColorScheme"]),l=o||"light",s=i==null?void 0:i[l],c=j(j({},i),n?{[l]:X(j({},typeof s!="boolean"&&s),{palette:n})}:void 0);if(r===!1){if(!("colorSchemes"in e))return Cc(e,...t);let f=n;"palette"in e||c[l]&&(c[l]!==!0?f=c[l].palette:l==="dark"&&(f={mode:"dark"}));const h=Cc(X(j({},e),{palette:f}),...t);return h.defaultColorScheme=l,h.colorSchemes=c,h.palette.mode==="light"&&(h.colorSchemes.light=X(j({},c.light!==!0&&c.light),{palette:h.palette}),mp(h,"dark",c.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark=X(j({},c.dark!==!0&&c.dark),{palette:h.palette}),mp(h,"light",c.light)),h}return!n&&!("light"in c)&&l==="light"&&(c.light=!0),A_(j(X(j({},a),{colorSchemes:c,defaultColorScheme:l}),typeof r!="boolean"&&r),...t)}const E_=T_(),__="$$material";function k_(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const P_=kE({themeId:__,defaultTheme:E_,rootShouldForwardProp:e=>k_(e)&&e!=="classes"}),D_=VE;function O_(e){return jE(e)}function R_(e){return Uh("MuiSvgIcon",e)}bT("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const M_=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Vr(t)}`,`fontSize${Vr(n)}`]};return gT(i,R_,r)},L_=P_("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Vr(n.color)}`],t[`fontSize${Vr(n.fontSize)}`]]}})(D_(({theme:e})=>{var t,n,r,i,o,a,l,s,c,d,f,h,p,m,g,v,S,w;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:y=>!y.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((l=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:l.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:c.call(s,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(([,y])=>y&&y.main).map(([y])=>{var C,b,T;return{props:{color:y},style:{color:(T=(b=((C=e.vars)!=null?C:e).palette)==null?void 0:b[y])==null?void 0:T.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:(w=(S=((v=e.vars)!=null?v:e).palette)==null?void 0:S.action)==null?void 0:w.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),wc=V.forwardRef(function(t,n){const r=O_({props:t,name:"MuiSvgIcon"}),w=r,{children:i,className:o,color:a="inherit",component:l="svg",fontSize:s="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24"}=w,p=We(w,["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"]),m=V.isValidElement(i)&&i.type==="svg",g=X(j({},r),{color:a,component:l,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:m}),v={};d||(v.viewBox=h);const S=M_(g);return u.jsxs(L_,X(j(j(j({as:l,className:Ln(S.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},v),p),m&&i.props),{ownerState:g,children:[m?i.props.children:i,f?u.jsx("title",{children:f}):null]}))});wc.muiName="SvgIcon";function Ve(e,t){function n(r,i){return u.jsx(wc,X(j({"data-testid":`${t}Icon`,ref:i},r),{children:e}))}return n.muiName=wc.muiName,V.memo(V.forwardRef(n))}const Ic=Ve(u.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"),B_=Ve(u.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"),$_=Ve(u.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 N_(e){return it("MuiTabPanel",e)}Xe("MuiTabPanel",["root","hidden","sizeSm","sizeMd","sizeLg","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const F_=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],z_=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 lt(a,N_,{})},j_=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])}),Qr=V.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabPanel"}),{orientation:i}=ga()||{orientation:"horizontal"},o=V.useContext(oc),{children:a,value:l=0,component:s,color:c="neutral",variant:d="plain",size:f,slots:h={},slotProps:p={},keepMounted:m=!1}=r,g=Ae(r,F_),{hidden:v,getRootProps:S}=PS(D({},r,{value:l})),w=f!=null?f:o,y=D({},r,{orientation:i,hidden:v,size:w,color:c,variant:d}),C=z_(y),b=D({},g,{component:s,slots:h,slotProps:p}),[T,E]=Ie("root",{ref:n,elementType:j_,getSlotProps:S,externalForwardedProps:b,additionalProps:{role:"tabpanel",ref:n,as:s},ownerState:y,className:C.root});return m?u.jsx(T,D({},E,{children:a})):u.jsx(T,D({},E,{children:!v&&a}))});function V_(e){return it("MuiInput",e)}const vp=Xe("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"]),Ua=V.createContext(void 0),U_=["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 H_(e,t){var n;const r=V.useContext(Ua),{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:s,className:c,defaultValue:d,disabled:f,disabledInProp:h,error:p,id:m,name:g,onClick:v,onChange:S,onKeyDown:w,onKeyUp:y,onFocus:C,onBlur:b,placeholder:T,readOnly:E,required:P,type:O,value:G}=e,z=Ae(e,U_),{getRootProps:A,getInputProps:W,focused:Y,error:N,disabled:$}=WI({disabled:(n=h!=null?h:r==null?void 0:r.disabled)!=null?n:f,defaultValue:d,error:p,onBlur:b,onClick:v,onChange:S,onFocus:C,required:P!=null?P:r==null?void 0:r.required,value:G}),B={[t.disabled]:$,[t.error]:N,[t.focused]:Y,[t.formControl]:!!r,[c]:c},H={[t.disabled]:$};return D({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:s,disabled:$,id:m,onKeyDown:w,onKeyUp:y,name:g,placeholder:T,readOnly:E,type:O},rootStateClasses:B,inputStateClasses:H,getRootProps:A,getInputProps:W,focused:Y,error:N,disabled:$},z)}const Sc=e=>t=>`--${e?`${e}-`:""}${t.replace(/^--/,"")}`,Zi="data-skip-inverted-colors",bp=`& :not([${Zi}], [${Zi}] *)`,yp=e=>{var t,n,r,i,o,a,l,s,c,d,f,h,p,m,g,v,S,w,y,C,b,T;const E=Sc(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")]:`${(l=e.colorSchemes.light)==null?void 0:l.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(s=e.colorSchemes.light)==null?void 0:s.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(c=e.colorSchemes.light)==null?void 0:c.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")]:`${(v=e.colorSchemes.dark)==null?void 0:v.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(S=e.colorSchemes.dark)==null?void 0:S.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(w=e.colorSchemes.dark)==null?void 0:w.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(y=e.colorSchemes.dark)==null?void 0:y.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(C=e.colorSchemes.dark)==null?void 0:C.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(b=e.colorSchemes.dark)==null?void 0:b.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(T=e.colorSchemes.dark)==null?void 0:T.palette.divider} !important`}}};function W_(e){return e.theme!==void 0}const G_=e=>t=>{const n=W_(t)?t.theme:t,r=Gl(n.cssVarPrefix),i=Sc(n.cssVarPrefix),o=a=>{const l=a.split("-");return r(a,n.palette[l[1]][l[2]])};return{[bp]:{"--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)`}},[`&, & [${Zi}]`]:yp(n)}},Y_=e=>t=>{const{theme:n=t}=t,r=Gl(n.cssVarPrefix),i=Sc(n.cssVarPrefix),o=a=>{const l=a.split("-");return r(a,n.palette[l[1]][l[2]])};return{[bp]:{"--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)`}},[`&, & [${Zi}]`]:yp(n)}},K_=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","fullWidth","size","color","variant","startDecorator","endDecorator","component","slots","slotProps"],q_=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 lt(a,V_,{})},Q_=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,l;const s=(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([${Zi}])`]: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}`],s,{backgroundColor:(o=s==null?void 0:s.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}),[`&.${vp.disabled}`]:(l=e.variants[`${t.variant}Disabled`])==null?void 0:l[t.color],"&:focus-within::before":{"--Input-focused":"1"}}]}),J_=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)"}})),X_=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"}),Z_=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"}),ek=be(Q_,{name:"JoyInput",slot:"Root",overridesResolver:(e,t)=>t.root})({}),tk=be(J_,{name:"JoyInput",slot:"Input",overridesResolver:(e,t)=>t.input})({}),nk=be(X_,{name:"JoyInput",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({}),rk=be(Z_,{name:"JoyInput",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({}),Ha=V.forwardRef(function(t,n){var r,i,o,a,l,s;const c=ct({props:t,name:"JoyInput"}),d=H_(D({},c,{disabledInProp:t.disabled}),vp),{propsToForward:f,rootStateClasses:h,inputStateClasses:p,getRootProps:m,getInputProps:g,formControl:v,focused:S,error:w=!1,disabled:y,fullWidth:C=!1,size:b="md",color:T="neutral",variant:E="outlined",startDecorator:P,endDecorator:O,component:G,slots:z={},slotProps:A={}}=d,W=Ae(d,K_),Y=(r=(i=t.error)!=null?i:v==null?void 0:v.error)!=null?r:w,N=(o=(a=t.size)!=null?a:v==null?void 0:v.size)!=null?o:b,$=(l=t.color)!=null?l:Y?"danger":(s=v==null?void 0:v.color)!=null?s:T,B=D({instanceColor:Y?"danger":t.color},c,{fullWidth:C,color:$,disabled:y,error:Y,focused:S,size:N,variant:E}),H=q_(B),q=D({},W,{component:G,slots:z,slotProps:A}),[ee,R]=Ie("root",{ref:n,className:[H.root,h],elementType:ek,getSlotProps:m,externalForwardedProps:q,ownerState:B}),[L,F]=Ie("input",D({},v&&{additionalProps:{id:v.htmlFor,"aria-describedby":v["aria-describedby"]}},{className:[H.input,p],elementType:tk,getSlotProps:g,internalForwardedProps:f,externalForwardedProps:q,ownerState:B})),[U,te]=Ie("startDecorator",{className:H.startDecorator,elementType:nk,externalForwardedProps:q,ownerState:B}),[se,ae]=Ie("endDecorator",{className:H.endDecorator,elementType:rk,externalForwardedProps:q,ownerState:B});return u.jsxs(ee,D({},R,{children:[P&&u.jsx(U,D({},te,{children:P})),u.jsx(L,D({},F)),O&&u.jsx(se,D({},ae,{children:O}))]}))}),eo=({label:e,placeholder:t,value:n,defaultValue:r,required:i,size:o,readOnly:a=!1,onChange:l})=>u.jsxs(I.FormControl,{size:o||"md",sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{required:i,color:"primary",children:e}),u.jsx(Ha,{placeholder:t,size:"md",variant:"outlined",color:"neutral",value:n||r,defaultValue:r,readOnly:a,onChange:l,sx:{backgroundColor:"#fff",borderRadius:"md"}})]}),Cp=Ve(u.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 ik(e){return it("MuiCircularProgress",e)}Xe("MuiCircularProgress",["root","determinate","svg","track","progress","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);let ok=e=>e,xp;const ak=["color","backgroundColor"],sk=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],lk=pe.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),ck=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 lt(o,ik,{})};function Jr(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}const uk=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:l,backgroundColor:s}=a,c=Ae(a,ak);return D({"--Icon-fontSize":"calc(0.4 * var(--_root-size))","--CircularProgress-trackColor":s,"--CircularProgress-progressColor":l,"--CircularProgress-percent":e.value,"--CircularProgress-linecap":"round"},e.size==="sm"&&{"--_root-size":"var(--CircularProgress-size, 24px)","--_track-thickness":Jr("track","3px"),"--_progress-thickness":Jr("progress","3px")},e.instanceSize==="sm"&&{"--CircularProgress-size":"24px"},e.size==="md"&&{"--_track-thickness":Jr("track","6px"),"--_progress-thickness":Jr("progress","6px"),"--_root-size":"var(--CircularProgress-size, 40px)"},e.instanceSize==="md"&&{"--CircularProgress-size":"40px"},e.size==="lg"&&{"--_track-thickness":Jr("track","8px"),"--_progress-thickness":Jr("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:l},e.children&&{fontFamily:t.vars.fontFamily.body,fontWeight:t.vars.fontWeight.md,fontSize:"calc(0.2 * var(--_root-size))"},c,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)"},c)},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})}),dk=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))"}),fk=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)"}),hk=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&&pe.css(xp||(xp=ok`
|
|
2348
2348
|
animation: var(--CircularProgress-circulation, 0.8s linear 0s infinite normal none running)
|
|
2349
2349
|
${0};
|
|
2350
|
-
`),lk)),wp=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyCircularProgress"}),{children:i,className:o,color:a="primary",size:l="md",variant:s="soft",thickness:c,determinate:d=!1,value:f=d?0:25,component:h,slots:p={},slotProps:m={}}=r,g=Ae(r,sk),v=D({},r,{color:a,size:l,variant:s,thickness:c,value:f,determinate:d,instanceSize:t.size}),S=ck(v),w=D({},g,{component:h,slots:p,slotProps:m}),[y,C]=Ie("root",{ref:n,className:Ln(S.root,o),elementType:uk,externalForwardedProps:w,ownerState:v,additionalProps:D({role:"progressbar",style:{"--CircularProgress-percent":f}},f&&d&&{"aria-valuenow":Math.round(typeof f=="number"?f:Number(f||0))})}),[b,T]=Ie("svg",{className:S.svg,elementType:dk,externalForwardedProps:w,ownerState:v}),[E,P]=Ie("track",{className:S.track,elementType:fk,externalForwardedProps:w,ownerState:v}),[O,G]=Ie("progress",{className:S.progress,elementType:hk,externalForwardedProps:w,ownerState:v});return u.jsxs(y,D({},C,{children:[u.jsxs(b,D({},T,{children:[u.jsx(E,D({},P)),u.jsx(O,D({},G))]})),i]}))});function pk(e){return it("MuiButton",e)}const Ip=Xe("MuiButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]),Sp=j.createContext({}),Ap=j.createContext(void 0),gk=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],mk=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,fullWidth:o,size:a,variant:l,loading:s}=e,c={root:["root",n&&"disabled",r&&"focusVisible",o&&"fullWidth",l&&`variant${ye(l)}`,t&&`color${ye(t)}`,a&&`size${ye(a)}`,s&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]},d=lt(c,pk,{});return r&&i&&(d.root+=` ${i}`),d},vk=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)"}),bk=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)"}),yk=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})}),Ck=({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],[`&.${Ip.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]},t.loadingPosition==="center"&&{[`&.${Ip.loading}`]:{color:"transparent"}})]},xk=be("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(Ck),Xr=j.forwardRef(function(t,n){var r;const i=ct({props:t,name:"JoyButton"}),{children:o,action:a,color:l="primary",variant:s="solid",size:c="md",fullWidth:d=!1,startDecorator:f,endDecorator:h,loading:p=!1,loadingPosition:m="center",loadingIndicator:g,disabled:v,component:S,slots:w={},slotProps:y={}}=i,C=Ae(i,gk),b=j.useContext(Sp),T=j.useContext(Ap),E=t.variant||b.variant||s,P=t.size||b.size||c,O=t.color||b.color||l,G=(r=t.loading||t.disabled)!=null?r:b.disabled||p||v,z=j.useRef(null),A=sn(z,n),{focusVisible:W,setFocusVisible:Y,getRootProps:N}=Rl(D({},i,{disabled:G,rootRef:A})),$=g!=null?g:u.jsx(wp,{color:O,thickness:{sm:2,md:3,lg:4}[P]||3});j.useImperativeHandle(a,()=>({focusVisible:()=>{var ne;Y(!0),(ne=z.current)==null||ne.focus()}}),[Y]);const B=D({},i,{color:O,fullWidth:d,variant:E,size:P,focusVisible:W,loading:p,loadingPosition:m,disabled:G}),H=mk(B),q=ne=>{var ge;let Se=i.onClick;if(typeof y.root=="function"?Se=y.root(B).onClick:y.root&&(Se=y.root.onClick),(ge=Se)==null||ge(ne),T){var Ue;(Ue=T.onClick)==null||Ue.call(T,ne,i.value)}};let ee=i["aria-pressed"];typeof y.root=="function"?ee=y.root(B)["aria-pressed"]:y.root&&(ee=y.root["aria-pressed"]),T!=null&&T.value&&(Array.isArray(T.value)?ee=T.value.indexOf(i.value)!==-1:ee=T.value===i.value);const R=D({},C,{component:S,slots:w,slotProps:y}),[L,F]=Ie("root",{ref:n,className:H.root,elementType:xk,externalForwardedProps:R,getSlotProps:N,ownerState:B,additionalProps:{onClick:q,"aria-pressed":ee}}),[V,te]=Ie("startDecorator",{className:H.startDecorator,elementType:vk,externalForwardedProps:R,ownerState:B}),[se,ae]=Ie("endDecorator",{className:H.endDecorator,elementType:bk,externalForwardedProps:R,ownerState:B}),[J,le]=Ie("loadingIndicatorCenter",{className:H.loadingIndicatorCenter,elementType:yk,externalForwardedProps:R,ownerState:B});return u.jsxs(L,D({},F,{children:[(f||p&&m==="start")&&u.jsx(V,D({},te,{children:p&&m==="start"?$:f})),o,p&&m==="center"&&u.jsx(J,D({},le,{children:$})),(h||p&&m==="end")&&u.jsx(se,D({},ae,{children:p&&m==="end"?$:h}))]}))});Xr.muiName="Button";var Tp={exports:{}};function wk(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 Ac={exports:{}};const Ik=Ou(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ep;function Tc(){return Ep||(Ep=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 wk=="function")try{o=Ik}catch(w){}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch(w){}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch(w){}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function w(){}return function(y){var C;return w.prototype=y,C=new w,w.prototype=null,C}}(),s={},c=s.lib={},d=c.Base=function(){return{extend:function(w){var y=l(this);return w&&y.mixIn(w),(!y.hasOwnProperty("init")||this.init===y.init)&&(y.init=function(){y.$super.init.apply(this,arguments)}),y.init.prototype=y,y.$super=this,y},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var y in w)w.hasOwnProperty(y)&&(this[y]=w[y]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=c.WordArray=d.extend({init:function(w,y){w=this.words=w||[],y!=i?this.sigBytes=y:this.sigBytes=w.length*4},toString:function(w){return(w||p).stringify(this)},concat:function(w){var y=this.words,C=w.words,b=this.sigBytes,T=w.sigBytes;if(this.clamp(),b%4)for(var E=0;E<T;E++){var P=C[E>>>2]>>>24-E%4*8&255;y[b+E>>>2]|=P<<24-(b+E)%4*8}else for(var O=0;O<T;O+=4)y[b+O>>>2]=C[O>>>2];return this.sigBytes+=T,this},clamp:function(){var w=this.words,y=this.sigBytes;w[y>>>2]&=4294967295<<32-y%4*8,w.length=r.ceil(y/4)},clone:function(){var w=d.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var y=[],C=0;C<w;C+=4)y.push(a());return new f.init(y,w)}}),h=s.enc={},p=h.Hex={stringify:function(w){for(var y=w.words,C=w.sigBytes,b=[],T=0;T<C;T++){var E=y[T>>>2]>>>24-T%4*8&255;b.push((E>>>4).toString(16)),b.push((E&15).toString(16))}return b.join("")},parse:function(w){for(var y=w.length,C=[],b=0;b<y;b+=2)C[b>>>3]|=parseInt(w.substr(b,2),16)<<24-b%8*4;return new f.init(C,y/2)}},m=h.Latin1={stringify:function(w){for(var y=w.words,C=w.sigBytes,b=[],T=0;T<C;T++){var E=y[T>>>2]>>>24-T%4*8&255;b.push(String.fromCharCode(E))}return b.join("")},parse:function(w){for(var y=w.length,C=[],b=0;b<y;b++)C[b>>>2]|=(w.charCodeAt(b)&255)<<24-b%4*8;return new f.init(C,y)}},g=h.Utf8={stringify:function(w){try{return decodeURIComponent(escape(m.stringify(w)))}catch(y){throw new Error("Malformed UTF-8 data")}},parse:function(w){return m.parse(unescape(encodeURIComponent(w)))}},v=c.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=g.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var y,C=this._data,b=C.words,T=C.sigBytes,E=this.blockSize,P=E*4,O=T/P;w?O=r.ceil(O):O=r.max((O|0)-this._minBufferSize,0);var G=O*E,z=r.min(G*4,T);if(G){for(var A=0;A<G;A+=E)this._doProcessBlock(b,A);y=b.splice(0,G),C.sigBytes-=z}return new f.init(y,z)},clone:function(){var w=d.clone.call(this);return w._data=this._data.clone(),w},_minBufferSize:0});c.Hasher=v.extend({cfg:d.extend(),init:function(w){this.cfg=this.cfg.extend(w),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(w){return this._append(w),this._process(),this},finalize:function(w){w&&this._append(w);var y=this._doFinalize();return y},blockSize:16,_createHelper:function(w){return function(y,C){return new w.init(C).finalize(y)}},_createHmacHelper:function(w){return function(y,C){return new S.HMAC.init(w,C).finalize(y)}}});var S=s.algo={};return s}(Math);return n})}(Ac)),Ac.exports}(function(e,t){(function(n,r){e.exports=r(Tc())})(Bt,function(n){return function(r){var i=n,o=i.lib,a=o.WordArray,l=o.Hasher,s=i.algo,c=[];(function(){for(var g=0;g<64;g++)c[g]=r.abs(r.sin(g+1))*4294967296|0})();var d=s.MD5=l.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,v){for(var S=0;S<16;S++){var w=v+S,y=g[w];g[w]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var C=this._hash.words,b=g[v+0],T=g[v+1],E=g[v+2],P=g[v+3],O=g[v+4],G=g[v+5],z=g[v+6],A=g[v+7],W=g[v+8],Y=g[v+9],N=g[v+10],$=g[v+11],B=g[v+12],H=g[v+13],q=g[v+14],ee=g[v+15],R=C[0],L=C[1],F=C[2],V=C[3];R=f(R,L,F,V,b,7,c[0]),V=f(V,R,L,F,T,12,c[1]),F=f(F,V,R,L,E,17,c[2]),L=f(L,F,V,R,P,22,c[3]),R=f(R,L,F,V,O,7,c[4]),V=f(V,R,L,F,G,12,c[5]),F=f(F,V,R,L,z,17,c[6]),L=f(L,F,V,R,A,22,c[7]),R=f(R,L,F,V,W,7,c[8]),V=f(V,R,L,F,Y,12,c[9]),F=f(F,V,R,L,N,17,c[10]),L=f(L,F,V,R,$,22,c[11]),R=f(R,L,F,V,B,7,c[12]),V=f(V,R,L,F,H,12,c[13]),F=f(F,V,R,L,q,17,c[14]),L=f(L,F,V,R,ee,22,c[15]),R=h(R,L,F,V,T,5,c[16]),V=h(V,R,L,F,z,9,c[17]),F=h(F,V,R,L,$,14,c[18]),L=h(L,F,V,R,b,20,c[19]),R=h(R,L,F,V,G,5,c[20]),V=h(V,R,L,F,N,9,c[21]),F=h(F,V,R,L,ee,14,c[22]),L=h(L,F,V,R,O,20,c[23]),R=h(R,L,F,V,Y,5,c[24]),V=h(V,R,L,F,q,9,c[25]),F=h(F,V,R,L,P,14,c[26]),L=h(L,F,V,R,W,20,c[27]),R=h(R,L,F,V,H,5,c[28]),V=h(V,R,L,F,E,9,c[29]),F=h(F,V,R,L,A,14,c[30]),L=h(L,F,V,R,B,20,c[31]),R=p(R,L,F,V,G,4,c[32]),V=p(V,R,L,F,W,11,c[33]),F=p(F,V,R,L,$,16,c[34]),L=p(L,F,V,R,q,23,c[35]),R=p(R,L,F,V,T,4,c[36]),V=p(V,R,L,F,O,11,c[37]),F=p(F,V,R,L,A,16,c[38]),L=p(L,F,V,R,N,23,c[39]),R=p(R,L,F,V,H,4,c[40]),V=p(V,R,L,F,b,11,c[41]),F=p(F,V,R,L,P,16,c[42]),L=p(L,F,V,R,z,23,c[43]),R=p(R,L,F,V,Y,4,c[44]),V=p(V,R,L,F,B,11,c[45]),F=p(F,V,R,L,ee,16,c[46]),L=p(L,F,V,R,E,23,c[47]),R=m(R,L,F,V,b,6,c[48]),V=m(V,R,L,F,A,10,c[49]),F=m(F,V,R,L,q,15,c[50]),L=m(L,F,V,R,G,21,c[51]),R=m(R,L,F,V,B,6,c[52]),V=m(V,R,L,F,P,10,c[53]),F=m(F,V,R,L,N,15,c[54]),L=m(L,F,V,R,T,21,c[55]),R=m(R,L,F,V,W,6,c[56]),V=m(V,R,L,F,ee,10,c[57]),F=m(F,V,R,L,z,15,c[58]),L=m(L,F,V,R,H,21,c[59]),R=m(R,L,F,V,O,6,c[60]),V=m(V,R,L,F,$,10,c[61]),F=m(F,V,R,L,E,15,c[62]),L=m(L,F,V,R,Y,21,c[63]),C[0]=C[0]+R|0,C[1]=C[1]+L|0,C[2]=C[2]+F|0,C[3]=C[3]+V|0},_doFinalize:function(){var g=this._data,v=g.words,S=this._nDataBytes*8,w=g.sigBytes*8;v[w>>>5]|=128<<24-w%32;var y=r.floor(S/4294967296),C=S;v[(w+64>>>9<<4)+15]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,v[(w+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,g.sigBytes=(v.length+1)*4,this._process();for(var b=this._hash,T=b.words,E=0;E<4;E++){var P=T[E];T[E]=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360}return b},clone:function(){var g=l.clone.call(this);return g._hash=this._hash.clone(),g}});function f(g,v,S,w,y,C,b){var T=g+(v&S|~v&w)+y+b;return(T<<C|T>>>32-C)+v}function h(g,v,S,w,y,C,b){var T=g+(v&w|S&~w)+y+b;return(T<<C|T>>>32-C)+v}function p(g,v,S,w,y,C,b){var T=g+(v^S^w)+y+b;return(T<<C|T>>>32-C)+v}function m(g,v,S,w,y,C,b){var T=g+(S^(v|~w))+y+b;return(T<<C|T>>>32-C)+v}i.MD5=l._createHelper(d),i.HmacMD5=l._createHmacHelper(d)}(Math),n.MD5})})(Tp);var Sk=Tp.exports;const _p=fn(Sk);var kp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Tc())})(Bt,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,a=o.init,l=o.init=function(s){if(s instanceof ArrayBuffer&&(s=new Uint8Array(s)),(s instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&s instanceof Uint8ClampedArray||s instanceof Int16Array||s instanceof Uint16Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Float32Array||s instanceof Float64Array)&&(s=new Uint8Array(s.buffer,s.byteOffset,s.byteLength)),s instanceof Uint8Array){for(var c=s.byteLength,d=[],f=0;f<c;f++)d[f>>>2]|=s[f]<<24-f%4*8;a.call(this,d,c)}else a.apply(this,arguments)};l.prototype=o}}(),n.lib.WordArray})})(kp);var Ak=kp.exports;const Pp=fn(Ak);var Dp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Tc())})(Bt,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(s){var c=s.words,d=s.sigBytes,f=this._map;s.clamp();for(var h=[],p=0;p<d;p+=3)for(var m=c[p>>>2]>>>24-p%4*8&255,g=c[p+1>>>2]>>>24-(p+1)%4*8&255,v=c[p+2>>>2]>>>24-(p+2)%4*8&255,S=m<<16|g<<8|v,w=0;w<4&&p+w*.75<d;w++)h.push(f.charAt(S>>>6*(3-w)&63));var y=f.charAt(64);if(y)for(;h.length%4;)h.push(y);return h.join("")},parse:function(s){var c=s.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=s.indexOf(p);m!==-1&&(c=m)}return l(s,c,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(s,c,d){for(var f=[],h=0,p=0;p<c;p++)if(p%4){var m=d[s.charCodeAt(p-1)]<<p%4*2,g=d[s.charCodeAt(p)]>>>6-p%4*2,v=m|g;f[h>>>2]|=v<<24-h%4*8,h++}return o.create(f,h)}}(),n.enc.Base64})})(Dp);var Tk=Dp.exports;const Ek=fn(Tk);class Op{constructor(){oe(this,"readFileAndHash",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Pp.create(new Uint8Array(a)),c=_p(l).toString(Ek);n(c)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}));oe(this,"generateHashFileName",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Pp.create(new Uint8Array(a)),s=_p(l).toString();n(s)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}))}}const Rp=({title:e,open:t,imageSrc:n,toggleModal:r})=>u.jsx(I.Modal,{open:t,onClose:r,children:u.jsxs(I.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(I.ModalClose,{}),u.jsx(I.DialogTitle,{sx:{marginBottom:"10px"},children:e}),u.jsx(I.DialogContent,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:u.jsx("img",{src:n,alt:"Image modal",style:{maxWidth:"100%",maxHeight:"100%"}})})]})}),Mp=Ve(u.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),pt=()=>{const e=x.useContext(Xo);if(!e)throw new Error("useAPIContext must be used within a APIProvider");return e},_k=Ve(u.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),kk=({isLoading:e,images:t,onClick:n})=>u.jsxs(u.Fragment,{children:[u.jsx(I.Grid,{container:!0,spacing:2,children:t.map(r=>{var i,o;return u.jsx(I.Grid,{xs:5,sm:4,md:3,children:u.jsxs(I.Box,{sx:{position:"relative",width:"100%","&:hover .overlay":{backgroundColor:"rgba(0, 0, 0, 0.5)",opacity:1},"&:hover .plusSign":{opacity:1}},onClick:()=>{var a,l;return n(((l=(a=r.urls)==null?void 0:a.uploaded)==null?void 0:l.embed)||"")},children:[u.jsx(I.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"}}),u.jsx(I.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:u.jsx(I.Typography,{className:"plusSign",level:"h2",sx:{color:"white",opacity:0,transition:"opacity 0.3s ease"},children:"+"})})]})},`sportal-image-${r.id}`)})}),e?u.jsx(I.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:u.jsx(I.CircularProgress,{variant:"solid",color:"neutral"})}):u.jsx(u.Fragment,{})]}),Pk=Ve(u.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),Dk=Ve(u.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),Ok=e=>u.jsx(I.Box,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:u.jsxs(I.Box,{display:"flex",children:[e.pageCount&&e.pageCount!==1&&u.jsx(I.Button,{variant:"outlined",color:"neutral",startDecorator:u.jsx(Pk,{}),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&&u.jsx(I.Button,{variant:"outlined",color:"neutral",endDecorator:u.jsx(Dk,{}),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})]})}),Rk=Ve(u.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"),Mk=Ve(u.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),Lk=({color:e})=>e==="warning"?u.jsx(Mk,{}):u.jsx(Rk,{}),ut=e=>u.jsx(I.Snackbar,{anchorOrigin:{vertical:"top",horizontal:"right"},open:e.showToast,onClose:e.hideToast,autoHideDuration:3e3,color:e.color,startDecorator:u.jsx(Lk,{color:e.color}),children:e.message},e.message),to=({label:e,defaultValue:t,required:n,onChange:r})=>{const i=o=>{r(o.target.value)};return u.jsxs(I.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{required:n,color:"primary",children:e}),u.jsx(I.Input,{type:"date",defaultValue:t,onChange:i,sx:{backgroundColor:"#fff",borderRadius:"md"}})]})},Bk=({labels:e,showFilters:t,onClick:n})=>u.jsx(I.Tooltip,{title:t?e.hideFilters:e.showFilters,children:u.jsx(I.IconButton,{"aria-label":"Filters",onClick:n,children:u.jsx(_k,{})})}),Lp=({labels:e,onChangeImages:t})=>{const[n,r]=x.useState(!1),[i,o]=x.useState(!1),[a,l]=x.useState(!1),[s,c]=x.useState(!1),[d,f]=x.useState(1),[h,p]=x.useState(""),[m,g]=x.useState(null),[v,S]=x.useState([]),{https:w}=pt();x.useEffect(()=>{E()},[d]);const y=()=>c(!s),C=()=>f(O=>O-1),b=()=>f(O=>O+1),T=()=>k(this,null,function*(){if(h){o(!0);const O=m?U({},m):null,G=yield w.fetchImagesFromSportal365(h,O,d);if(G){const z=yield G.json();G.ok?(S(z.data),f(z.meta.pagination.current_page)):(console.error(z),y())}o(!1)}else S([])}),E=()=>k(this,null,function*(){if(h){l(!0),S([]);const O=m&&m.from&&m.to?U({},m):null,G=yield w.fetchImagesFromSportal365(h,O,d);if(G){const z=yield G.json();G.ok?(S(z.data),f(z.meta.pagination.current_page)):(console.error(z),y())}l(!1)}}),P=(O,G)=>{g(z=>z?X(U({},z),{[G]:O}):{[G]:O})};return u.jsxs(u.Fragment,{children:[u.jsxs(I.Box,{sx:{marginBottom:"10px"},children:[u.jsx(I.Input,{value:h,onChange:O=>p(O.target.value),sx:{mb:2,width:"100%"},placeholder:e.searchImage,endDecorator:u.jsx(Bk,{labels:e,showFilters:n,onClick:()=>r(!n)})}),n?u.jsxs(I.Grid,{container:!0,spacing:2,children:[u.jsx(I.Grid,{xs:6,children:u.jsx(to,{label:e.fromDate,defaultValue:m==null?void 0:m.from,required:!1,onChange:O=>P(O,"from")})}),u.jsx(I.Grid,{xs:6,children:u.jsx(to,{label:e.toDate,defaultValue:m==null?void 0:m.to,required:!1,onChange:O=>P(O,"to")})})]}):u.jsx(u.Fragment,{}),u.jsx(I.Button,{onClick:T,sx:{mb:2,backgroundColor:"#ef8b34","&:hover":{backgroundColor:"#d7772e"},"&:active":{backgroundColor:"#c06c29"}},loading:i,children:e.search}),u.jsx(kk,{images:v,isLoading:a,onClick:t}),u.jsx(Ok,{labels:e,pageCount:d,images:v,getPreviousPage:C,getNextPage:b})]}),u.jsx(ut,{showToast:s,message:e.searchSportal365ImagesErrorMessage,color:"danger",hideToast:y})]})},Bp=Ve(u.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"),$p=I.styled("input")`
|
|
2350
|
+
`),lk)),wp=V.forwardRef(function(t,n){const r=ct({props:t,name:"JoyCircularProgress"}),{children:i,className:o,color:a="primary",size:l="md",variant:s="soft",thickness:c,determinate:d=!1,value:f=d?0:25,component:h,slots:p={},slotProps:m={}}=r,g=Ae(r,sk),v=D({},r,{color:a,size:l,variant:s,thickness:c,value:f,determinate:d,instanceSize:t.size}),S=ck(v),w=D({},g,{component:h,slots:p,slotProps:m}),[y,C]=Ie("root",{ref:n,className:Ln(S.root,o),elementType:uk,externalForwardedProps:w,ownerState:v,additionalProps:D({role:"progressbar",style:{"--CircularProgress-percent":f}},f&&d&&{"aria-valuenow":Math.round(typeof f=="number"?f:Number(f||0))})}),[b,T]=Ie("svg",{className:S.svg,elementType:dk,externalForwardedProps:w,ownerState:v}),[E,P]=Ie("track",{className:S.track,elementType:fk,externalForwardedProps:w,ownerState:v}),[O,G]=Ie("progress",{className:S.progress,elementType:hk,externalForwardedProps:w,ownerState:v});return u.jsxs(y,D({},C,{children:[u.jsxs(b,D({},T,{children:[u.jsx(E,D({},P)),u.jsx(O,D({},G))]})),i]}))});function pk(e){return it("MuiButton",e)}const Ip=Xe("MuiButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]),Sp=V.createContext({}),Ap=V.createContext(void 0),gk=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],mk=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,fullWidth:o,size:a,variant:l,loading:s}=e,c={root:["root",n&&"disabled",r&&"focusVisible",o&&"fullWidth",l&&`variant${ye(l)}`,t&&`color${ye(t)}`,a&&`size${ye(a)}`,s&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]},d=lt(c,pk,{});return r&&i&&(d.root+=` ${i}`),d},vk=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)"}),bk=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)"}),yk=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})}),Ck=({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],[`&.${Ip.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]},t.loadingPosition==="center"&&{[`&.${Ip.loading}`]:{color:"transparent"}})]},xk=be("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(Ck),Xr=V.forwardRef(function(t,n){var r;const i=ct({props:t,name:"JoyButton"}),{children:o,action:a,color:l="primary",variant:s="solid",size:c="md",fullWidth:d=!1,startDecorator:f,endDecorator:h,loading:p=!1,loadingPosition:m="center",loadingIndicator:g,disabled:v,component:S,slots:w={},slotProps:y={}}=i,C=Ae(i,gk),b=V.useContext(Sp),T=V.useContext(Ap),E=t.variant||b.variant||s,P=t.size||b.size||c,O=t.color||b.color||l,G=(r=t.loading||t.disabled)!=null?r:b.disabled||p||v,z=V.useRef(null),A=sn(z,n),{focusVisible:W,setFocusVisible:Y,getRootProps:N}=Rl(D({},i,{disabled:G,rootRef:A})),$=g!=null?g:u.jsx(wp,{color:O,thickness:{sm:2,md:3,lg:4}[P]||3});V.useImperativeHandle(a,()=>({focusVisible:()=>{var ne;Y(!0),(ne=z.current)==null||ne.focus()}}),[Y]);const B=D({},i,{color:O,fullWidth:d,variant:E,size:P,focusVisible:W,loading:p,loadingPosition:m,disabled:G}),H=mk(B),q=ne=>{var ge;let Se=i.onClick;if(typeof y.root=="function"?Se=y.root(B).onClick:y.root&&(Se=y.root.onClick),(ge=Se)==null||ge(ne),T){var Ue;(Ue=T.onClick)==null||Ue.call(T,ne,i.value)}};let ee=i["aria-pressed"];typeof y.root=="function"?ee=y.root(B)["aria-pressed"]:y.root&&(ee=y.root["aria-pressed"]),T!=null&&T.value&&(Array.isArray(T.value)?ee=T.value.indexOf(i.value)!==-1:ee=T.value===i.value);const R=D({},C,{component:S,slots:w,slotProps:y}),[L,F]=Ie("root",{ref:n,className:H.root,elementType:xk,externalForwardedProps:R,getSlotProps:N,ownerState:B,additionalProps:{onClick:q,"aria-pressed":ee}}),[U,te]=Ie("startDecorator",{className:H.startDecorator,elementType:vk,externalForwardedProps:R,ownerState:B}),[se,ae]=Ie("endDecorator",{className:H.endDecorator,elementType:bk,externalForwardedProps:R,ownerState:B}),[J,le]=Ie("loadingIndicatorCenter",{className:H.loadingIndicatorCenter,elementType:yk,externalForwardedProps:R,ownerState:B});return u.jsxs(L,D({},F,{children:[(f||p&&m==="start")&&u.jsx(U,D({},te,{children:p&&m==="start"?$:f})),o,p&&m==="center"&&u.jsx(J,D({},le,{children:$})),(h||p&&m==="end")&&u.jsx(se,D({},ae,{children:p&&m==="end"?$:h}))]}))});Xr.muiName="Button";var Tp={exports:{}};function wk(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 Ac={exports:{}};const Ik=Ou(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ep;function Tc(){return Ep||(Ep=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 wk=="function")try{o=Ik}catch(w){}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch(w){}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch(w){}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function w(){}return function(y){var C;return w.prototype=y,C=new w,w.prototype=null,C}}(),s={},c=s.lib={},d=c.Base=function(){return{extend:function(w){var y=l(this);return w&&y.mixIn(w),(!y.hasOwnProperty("init")||this.init===y.init)&&(y.init=function(){y.$super.init.apply(this,arguments)}),y.init.prototype=y,y.$super=this,y},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var y in w)w.hasOwnProperty(y)&&(this[y]=w[y]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=c.WordArray=d.extend({init:function(w,y){w=this.words=w||[],y!=i?this.sigBytes=y:this.sigBytes=w.length*4},toString:function(w){return(w||p).stringify(this)},concat:function(w){var y=this.words,C=w.words,b=this.sigBytes,T=w.sigBytes;if(this.clamp(),b%4)for(var E=0;E<T;E++){var P=C[E>>>2]>>>24-E%4*8&255;y[b+E>>>2]|=P<<24-(b+E)%4*8}else for(var O=0;O<T;O+=4)y[b+O>>>2]=C[O>>>2];return this.sigBytes+=T,this},clamp:function(){var w=this.words,y=this.sigBytes;w[y>>>2]&=4294967295<<32-y%4*8,w.length=r.ceil(y/4)},clone:function(){var w=d.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var y=[],C=0;C<w;C+=4)y.push(a());return new f.init(y,w)}}),h=s.enc={},p=h.Hex={stringify:function(w){for(var y=w.words,C=w.sigBytes,b=[],T=0;T<C;T++){var E=y[T>>>2]>>>24-T%4*8&255;b.push((E>>>4).toString(16)),b.push((E&15).toString(16))}return b.join("")},parse:function(w){for(var y=w.length,C=[],b=0;b<y;b+=2)C[b>>>3]|=parseInt(w.substr(b,2),16)<<24-b%8*4;return new f.init(C,y/2)}},m=h.Latin1={stringify:function(w){for(var y=w.words,C=w.sigBytes,b=[],T=0;T<C;T++){var E=y[T>>>2]>>>24-T%4*8&255;b.push(String.fromCharCode(E))}return b.join("")},parse:function(w){for(var y=w.length,C=[],b=0;b<y;b++)C[b>>>2]|=(w.charCodeAt(b)&255)<<24-b%4*8;return new f.init(C,y)}},g=h.Utf8={stringify:function(w){try{return decodeURIComponent(escape(m.stringify(w)))}catch(y){throw new Error("Malformed UTF-8 data")}},parse:function(w){return m.parse(unescape(encodeURIComponent(w)))}},v=c.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=g.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var y,C=this._data,b=C.words,T=C.sigBytes,E=this.blockSize,P=E*4,O=T/P;w?O=r.ceil(O):O=r.max((O|0)-this._minBufferSize,0);var G=O*E,z=r.min(G*4,T);if(G){for(var A=0;A<G;A+=E)this._doProcessBlock(b,A);y=b.splice(0,G),C.sigBytes-=z}return new f.init(y,z)},clone:function(){var w=d.clone.call(this);return w._data=this._data.clone(),w},_minBufferSize:0});c.Hasher=v.extend({cfg:d.extend(),init:function(w){this.cfg=this.cfg.extend(w),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(w){return this._append(w),this._process(),this},finalize:function(w){w&&this._append(w);var y=this._doFinalize();return y},blockSize:16,_createHelper:function(w){return function(y,C){return new w.init(C).finalize(y)}},_createHmacHelper:function(w){return function(y,C){return new S.HMAC.init(w,C).finalize(y)}}});var S=s.algo={};return s}(Math);return n})}(Ac)),Ac.exports}(function(e,t){(function(n,r){e.exports=r(Tc())})(Bt,function(n){return function(r){var i=n,o=i.lib,a=o.WordArray,l=o.Hasher,s=i.algo,c=[];(function(){for(var g=0;g<64;g++)c[g]=r.abs(r.sin(g+1))*4294967296|0})();var d=s.MD5=l.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,v){for(var S=0;S<16;S++){var w=v+S,y=g[w];g[w]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var C=this._hash.words,b=g[v+0],T=g[v+1],E=g[v+2],P=g[v+3],O=g[v+4],G=g[v+5],z=g[v+6],A=g[v+7],W=g[v+8],Y=g[v+9],N=g[v+10],$=g[v+11],B=g[v+12],H=g[v+13],q=g[v+14],ee=g[v+15],R=C[0],L=C[1],F=C[2],U=C[3];R=f(R,L,F,U,b,7,c[0]),U=f(U,R,L,F,T,12,c[1]),F=f(F,U,R,L,E,17,c[2]),L=f(L,F,U,R,P,22,c[3]),R=f(R,L,F,U,O,7,c[4]),U=f(U,R,L,F,G,12,c[5]),F=f(F,U,R,L,z,17,c[6]),L=f(L,F,U,R,A,22,c[7]),R=f(R,L,F,U,W,7,c[8]),U=f(U,R,L,F,Y,12,c[9]),F=f(F,U,R,L,N,17,c[10]),L=f(L,F,U,R,$,22,c[11]),R=f(R,L,F,U,B,7,c[12]),U=f(U,R,L,F,H,12,c[13]),F=f(F,U,R,L,q,17,c[14]),L=f(L,F,U,R,ee,22,c[15]),R=h(R,L,F,U,T,5,c[16]),U=h(U,R,L,F,z,9,c[17]),F=h(F,U,R,L,$,14,c[18]),L=h(L,F,U,R,b,20,c[19]),R=h(R,L,F,U,G,5,c[20]),U=h(U,R,L,F,N,9,c[21]),F=h(F,U,R,L,ee,14,c[22]),L=h(L,F,U,R,O,20,c[23]),R=h(R,L,F,U,Y,5,c[24]),U=h(U,R,L,F,q,9,c[25]),F=h(F,U,R,L,P,14,c[26]),L=h(L,F,U,R,W,20,c[27]),R=h(R,L,F,U,H,5,c[28]),U=h(U,R,L,F,E,9,c[29]),F=h(F,U,R,L,A,14,c[30]),L=h(L,F,U,R,B,20,c[31]),R=p(R,L,F,U,G,4,c[32]),U=p(U,R,L,F,W,11,c[33]),F=p(F,U,R,L,$,16,c[34]),L=p(L,F,U,R,q,23,c[35]),R=p(R,L,F,U,T,4,c[36]),U=p(U,R,L,F,O,11,c[37]),F=p(F,U,R,L,A,16,c[38]),L=p(L,F,U,R,N,23,c[39]),R=p(R,L,F,U,H,4,c[40]),U=p(U,R,L,F,b,11,c[41]),F=p(F,U,R,L,P,16,c[42]),L=p(L,F,U,R,z,23,c[43]),R=p(R,L,F,U,Y,4,c[44]),U=p(U,R,L,F,B,11,c[45]),F=p(F,U,R,L,ee,16,c[46]),L=p(L,F,U,R,E,23,c[47]),R=m(R,L,F,U,b,6,c[48]),U=m(U,R,L,F,A,10,c[49]),F=m(F,U,R,L,q,15,c[50]),L=m(L,F,U,R,G,21,c[51]),R=m(R,L,F,U,B,6,c[52]),U=m(U,R,L,F,P,10,c[53]),F=m(F,U,R,L,N,15,c[54]),L=m(L,F,U,R,T,21,c[55]),R=m(R,L,F,U,W,6,c[56]),U=m(U,R,L,F,ee,10,c[57]),F=m(F,U,R,L,z,15,c[58]),L=m(L,F,U,R,H,21,c[59]),R=m(R,L,F,U,O,6,c[60]),U=m(U,R,L,F,$,10,c[61]),F=m(F,U,R,L,E,15,c[62]),L=m(L,F,U,R,Y,21,c[63]),C[0]=C[0]+R|0,C[1]=C[1]+L|0,C[2]=C[2]+F|0,C[3]=C[3]+U|0},_doFinalize:function(){var g=this._data,v=g.words,S=this._nDataBytes*8,w=g.sigBytes*8;v[w>>>5]|=128<<24-w%32;var y=r.floor(S/4294967296),C=S;v[(w+64>>>9<<4)+15]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,v[(w+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,g.sigBytes=(v.length+1)*4,this._process();for(var b=this._hash,T=b.words,E=0;E<4;E++){var P=T[E];T[E]=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360}return b},clone:function(){var g=l.clone.call(this);return g._hash=this._hash.clone(),g}});function f(g,v,S,w,y,C,b){var T=g+(v&S|~v&w)+y+b;return(T<<C|T>>>32-C)+v}function h(g,v,S,w,y,C,b){var T=g+(v&w|S&~w)+y+b;return(T<<C|T>>>32-C)+v}function p(g,v,S,w,y,C,b){var T=g+(v^S^w)+y+b;return(T<<C|T>>>32-C)+v}function m(g,v,S,w,y,C,b){var T=g+(S^(v|~w))+y+b;return(T<<C|T>>>32-C)+v}i.MD5=l._createHelper(d),i.HmacMD5=l._createHmacHelper(d)}(Math),n.MD5})})(Tp);var Sk=Tp.exports;const _p=fn(Sk);var kp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Tc())})(Bt,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,a=o.init,l=o.init=function(s){if(s instanceof ArrayBuffer&&(s=new Uint8Array(s)),(s instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&s instanceof Uint8ClampedArray||s instanceof Int16Array||s instanceof Uint16Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Float32Array||s instanceof Float64Array)&&(s=new Uint8Array(s.buffer,s.byteOffset,s.byteLength)),s instanceof Uint8Array){for(var c=s.byteLength,d=[],f=0;f<c;f++)d[f>>>2]|=s[f]<<24-f%4*8;a.call(this,d,c)}else a.apply(this,arguments)};l.prototype=o}}(),n.lib.WordArray})})(kp);var Ak=kp.exports;const Pp=fn(Ak);var Dp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Tc())})(Bt,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(s){var c=s.words,d=s.sigBytes,f=this._map;s.clamp();for(var h=[],p=0;p<d;p+=3)for(var m=c[p>>>2]>>>24-p%4*8&255,g=c[p+1>>>2]>>>24-(p+1)%4*8&255,v=c[p+2>>>2]>>>24-(p+2)%4*8&255,S=m<<16|g<<8|v,w=0;w<4&&p+w*.75<d;w++)h.push(f.charAt(S>>>6*(3-w)&63));var y=f.charAt(64);if(y)for(;h.length%4;)h.push(y);return h.join("")},parse:function(s){var c=s.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=s.indexOf(p);m!==-1&&(c=m)}return l(s,c,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(s,c,d){for(var f=[],h=0,p=0;p<c;p++)if(p%4){var m=d[s.charCodeAt(p-1)]<<p%4*2,g=d[s.charCodeAt(p)]>>>6-p%4*2,v=m|g;f[h>>>2]|=v<<24-h%4*8,h++}return o.create(f,h)}}(),n.enc.Base64})})(Dp);var Tk=Dp.exports;const Ek=fn(Tk);class Op{constructor(){ie(this,"readFileAndHash",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Pp.create(new Uint8Array(a)),c=_p(l).toString(Ek);n(c)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}));ie(this,"generateHashFileName",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Pp.create(new Uint8Array(a)),s=_p(l).toString();n(s)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}))}}const Rp=({title:e,open:t,imageSrc:n,toggleModal:r})=>u.jsx(I.Modal,{open:t,onClose:r,children:u.jsxs(I.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(I.ModalClose,{}),u.jsx(I.DialogTitle,{sx:{marginBottom:"10px"},children:e}),u.jsx(I.DialogContent,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:u.jsx("img",{src:n,alt:"Image modal",style:{maxWidth:"100%",maxHeight:"100%"}})})]})}),Mp=Ve(u.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),pt=()=>{const e=x.useContext(Xo);if(!e)throw new Error("useAPIContext must be used within a APIProvider");return e},_k=Ve(u.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),kk=({isLoading:e,images:t,onClick:n})=>u.jsxs(u.Fragment,{children:[u.jsx(I.Grid,{container:!0,spacing:2,children:t.map(r=>{var i,o;return u.jsx(I.Grid,{xs:5,sm:4,md:3,children:u.jsxs(I.Box,{sx:{position:"relative",width:"100%","&:hover .overlay":{backgroundColor:"rgba(0, 0, 0, 0.5)",opacity:1},"&:hover .plusSign":{opacity:1}},onClick:()=>{var a,l;return n(((l=(a=r.urls)==null?void 0:a.uploaded)==null?void 0:l.embed)||"")},children:[u.jsx(I.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"}}),u.jsx(I.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:u.jsx(I.Typography,{className:"plusSign",level:"h2",sx:{color:"white",opacity:0,transition:"opacity 0.3s ease"},children:"+"})})]})},`sportal-image-${r.id}`)})}),e?u.jsx(I.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:u.jsx(I.CircularProgress,{variant:"solid",color:"neutral"})}):u.jsx(u.Fragment,{})]}),Pk=Ve(u.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),Dk=Ve(u.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),Ok=e=>u.jsx(I.Box,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:u.jsxs(I.Box,{display:"flex",children:[e.pageCount&&e.pageCount!==1&&u.jsx(I.Button,{variant:"outlined",color:"neutral",startDecorator:u.jsx(Pk,{}),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&&u.jsx(I.Button,{variant:"outlined",color:"neutral",endDecorator:u.jsx(Dk,{}),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})]})}),Rk=Ve(u.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"),Mk=Ve(u.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),Lk=({color:e})=>e==="warning"?u.jsx(Mk,{}):u.jsx(Rk,{}),ut=e=>u.jsx(I.Snackbar,{anchorOrigin:{vertical:"top",horizontal:"right"},open:e.showToast,onClose:e.hideToast,autoHideDuration:3e3,color:e.color,startDecorator:u.jsx(Lk,{color:e.color}),children:e.message},e.message),to=({label:e,defaultValue:t,required:n,onChange:r})=>{const i=o=>{r(o.target.value)};return u.jsxs(I.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{required:n,color:"primary",children:e}),u.jsx(I.Input,{type:"date",defaultValue:t,onChange:i,sx:{backgroundColor:"#fff",borderRadius:"md"}})]})},Bk=({labels:e,showFilters:t,onClick:n})=>u.jsx(I.Tooltip,{title:t?e.hideFilters:e.showFilters,children:u.jsx(I.IconButton,{"aria-label":"Filters",onClick:n,children:u.jsx(_k,{})})}),Lp=({labels:e,onChangeImages:t})=>{const[n,r]=x.useState(!1),[i,o]=x.useState(!1),[a,l]=x.useState(!1),[s,c]=x.useState(!1),[d,f]=x.useState(1),[h,p]=x.useState(""),[m,g]=x.useState(null),[v,S]=x.useState([]),{https:w}=pt();x.useEffect(()=>{E()},[d]);const y=()=>c(!s),C=()=>f(O=>O-1),b=()=>f(O=>O+1),T=()=>k(this,null,function*(){if(h){o(!0);const O=m?j({},m):null,G=yield w.fetchImagesFromSportal365(h,O,d);if(G){const z=yield G.json();G.ok?(S(z.data),f(z.meta.pagination.current_page)):(console.error(z),y())}o(!1)}else S([])}),E=()=>k(this,null,function*(){if(h){l(!0),S([]);const O=m&&m.from&&m.to?j({},m):null,G=yield w.fetchImagesFromSportal365(h,O,d);if(G){const z=yield G.json();G.ok?(S(z.data),f(z.meta.pagination.current_page)):(console.error(z),y())}l(!1)}}),P=(O,G)=>{g(z=>z?X(j({},z),{[G]:O}):{[G]:O})};return u.jsxs(u.Fragment,{children:[u.jsxs(I.Box,{sx:{marginBottom:"10px"},children:[u.jsx(I.Input,{value:h,onChange:O=>p(O.target.value),sx:{mb:2,width:"100%"},placeholder:e.searchImage,endDecorator:u.jsx(Bk,{labels:e,showFilters:n,onClick:()=>r(!n)})}),n?u.jsxs(I.Grid,{container:!0,spacing:2,children:[u.jsx(I.Grid,{xs:6,children:u.jsx(to,{label:e.fromDate,defaultValue:m==null?void 0:m.from,required:!1,onChange:O=>P(O,"from")})}),u.jsx(I.Grid,{xs:6,children:u.jsx(to,{label:e.toDate,defaultValue:m==null?void 0:m.to,required:!1,onChange:O=>P(O,"to")})})]}):u.jsx(u.Fragment,{}),u.jsx(I.Button,{onClick:T,sx:{mb:2,backgroundColor:"#ef8b34","&:hover":{backgroundColor:"#d7772e"},"&:active":{backgroundColor:"#c06c29"}},loading:i,children:e.search}),u.jsx(kk,{images:v,isLoading:a,onClick:t}),u.jsx(Ok,{labels:e,pageCount:d,images:v,getPreviousPage:C,getNextPage:b})]}),u.jsx(ut,{showToast:s,message:e.searchSportal365ImagesErrorMessage,color:"danger",hideToast:y})]})},Bp=Ve(u.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"),$p=I.styled("input")`
|
|
2351
2351
|
clip: rect(0 0 0 0);
|
|
2352
2352
|
clip-path: inset(50%);
|
|
2353
2353
|
height: 1px;
|
|
@@ -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
|
-
`,rP=1,iP=3,oP=function(e){q0(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=j.createRef(),n.videoRef=j.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=Xk(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 l=eP(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=l.crop,a=l.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}},n.computeSizes=function(){var r,i,o,a,l,s,c=n.imageRef.current||n.videoRef.current;if(c&&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=c.offsetWidth<f||c.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:c.offsetWidth,height:c.offsetHeight};n.mediaSize=At(At({},g),{naturalWidth:f,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var v=n.props.cropSize?n.props.cropSize:Yk(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((l=n.state.cropSize)===null||l===void 0?void 0:l.height)!==v.height||((s=n.state.cropSize)===null||s===void 0?void 0:s.width)!==v.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(v),n.setState({cropSize:v},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(v),v}},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,l=r.y;n.dragStartPosition={x:a,y:l},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,l=o-n.dragStartPosition.y,s={x:n.dragStartCrop.x+a,y:n.dragStartCrop.y+l},c=n.props.restrictPosition?qa(s,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):s;n.props.onCropChange(c)}}))},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=Gk(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 l,s;return(s=(l=n.props).onInteractionStart)===null||s===void 0?void 0:s.call(l)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var l,s;return(s=(l=n.props).onInteractionEnd)===null||s===void 0?void 0:s.call(l)})},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,l=a.crop,s=a.zoom;return{x:(i+l.x)/s,y:(o+l.y)/s}},n.setNewZoom=function(r,i,o){var a=o===void 0?{}:o,l=a.shouldUpdatePosition,s=l===void 0?!0:l;if(!(!n.state.cropSize||!n.props.onZoomChange)){var c=Qa(r,n.props.minZoom,n.props.maxZoom);if(s){var d=n.getPointOnContainer(i,n.containerPosition),f=n.getPointOnMedia(d),h={x:f.x*c-d.x,y:f.y*c-d.y},p=n.props.restrictPosition?qa(h,n.mediaSize,n.state.cropSize,c,n.props.rotation):h;n.props.onCropChange(p)}n.props.onZoomChange(c)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?qa(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return qk(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?qa(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=nP,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,l,s,c,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():(((l=n.crop)===null||l===void 0?void 0:l.x)!==((s=this.props.crop)===null||s===void 0?void 0:s.x)||((c=n.crop)===null||c===void 0?void 0:c.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 l=this.containerRect.width/this.containerRect.height,s=((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,c=((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=s/c;return d<l?"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=Qp(r,i),this.lastPinchRotation=Jp(r,i),this.onDragStart(Xp(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=Xp(i,o);this.onDrag(a),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var l=Qp(i,o),s=r.props.zoom*(l/r.lastPinchDistance);r.setNewZoom(s,a,{shouldUpdatePosition:!1}),r.lastPinchDistance=l;var c=Jp(i,o),d=r.props.rotation+(c-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=c})}},t.prototype.render=function(){var n=this,r,i=this.props,o=i.image,a=i.video,l=i.mediaProps,s=i.transform,c=i.crop,d=c.x,f=c.y,h=i.rotation,p=i.zoom,m=i.cropShape,g=i.showGrid,v=i.style,S=v.containerStyle,w=v.cropAreaStyle,y=v.mediaStyle,C=i.classes,b=C.containerClassName,T=C.cropAreaClassName,E=C.mediaClassName,P=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return j.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(G){return n.containerRef=G},"data-testid":"container",style:S,className:Ja("reactEasyCrop_Container",b)},o?j.createElement("img",At({alt:"",className:Ja("reactEasyCrop_Image",P==="contain"&&"reactEasyCrop_Contain",P==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",P==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},l,{src:o,ref:this.imageRef,style:At(At({},y),{transform:s||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):a&&j.createElement("video",At({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:Ja("reactEasyCrop_Video",P==="contain"&&"reactEasyCrop_Contain",P==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",P==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},l,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:At(At({},y),{transform:s||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(O){return j.createElement("source",At({key:O.src},O))})),this.state.cropSize&&j.createElement("div",{style:At(At({},w),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Ja("reactEasyCrop_CropArea",m==="round"&&"reactEasyCrop_CropAreaRound",g&&"reactEasyCrop_CropAreaGrid",T)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:iP,minZoom:rP,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}(j.Component);const aP=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 sP(e){return e*Math.PI/180}function lP(e,t,n=0){return k(this,null,function*(){const r=yield aP(e),i=document.createElement("canvas"),o=i.getContext("2d"),l=2*(Math.max(r.width,r.height)/2*Math.sqrt(2));i.width=l,i.height=l,o.translate(l/2,l/2),o.rotate(sP(n)),o.translate(-l/2,-l/2),o.drawImage(r,l/2-r.width*.5,l/2-r.height*.5);const s=o.getImageData(0,0,l,l);return i.width=t.width,i.height=t.height,o.putImageData(s,Math.round(0-l/2+r.width*.5-t.x),Math.round(0-l/2+r.height*.5-t.y)),new Promise(c=>i.toBlob(d=>{const f=new File([d],`cropped_image_${Date.now()}.jpeg`,{type:"image/jpeg"});c(f)},"image/jpeg"))})}const Zp=({labels:e,open:t,imageSrc:n,resetDefaultImageUrl:r,toggleModal:i,uploadImage:o})=>{const[a,l]=x.useState({x:0,y:0}),[s,c]=x.useState(1),[d,f]=x.useState(16/9),[h,p]=x.useState(null),m=(y,C)=>{p(C)},g=(y,C)=>f(C),v=()=>k(this,null,function*(){const y=yield lP(n,h);w(),o(y)}),S=()=>{w(),r()},w=()=>{l({x:0,y:0}),c(1),f(16/9),p(null)};return u.jsx(I.Modal,{open:t,onClose:i,children:u.jsxs(I.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(I.ModalClose,{}),u.jsx(I.DialogTitle,{children:e.cropImage}),u.jsxs(I.DialogContent,{sx:{width:"100%"},children:[u.jsx(I.Box,{position:"relative",height:"100%",width:"100%",mb:2,children:u.jsx(oP,{image:n,crop:a,zoom:s,aspect:d,onCropChange:l,onCropComplete:m,onZoomChange:c})}),u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.aspectRatio}),u.jsxs(I.Select,{value:d,onChange:g,children:[u.jsx(I.Option,{value:4/3,children:"4 / 3"}),u.jsx(I.Option,{value:16/9,children:"16 / 9"}),u.jsx(I.Option,{value:1,children:"1"})]})]}),u.jsx(I.Box,{mb:1,mx:2,children:u.jsx(I.Slider,{value:s,min:1,max:3,step:.1,onChange:(y,C)=>c(C)})}),u.jsxs(I.DialogActions,{children:[u.jsx(I.Button,{color:"primary",onClick:v,loading:!1,children:e.crop}),u.jsx(I.Button,{color:"primary",variant:"outlined",onClick:S,loading:!1,children:e.reset})]})]})]})})},eg=Ve(u.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"CropOutlined"),tg=({labels:e,title:t,image:n,onChangeImages:r,clearImage:i})=>{const[o,a]=x.useState(!1),[l,s]=x.useState(!1),[c,d]=x.useState(!1),[f,h]=x.useState(!1),[p,m]=x.useState(""),[g,v]=x.useState("primary"),[S,w]=x.useState(""),y=x.useRef(null),C=()=>h(!f),b=()=>{y.current&&y.current.click()},T=new Op,E=x.useContext(Xo),P=()=>{m(""),s(!1)},O=B=>{let H="",q="primary";switch(B){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}v(q),m(H),s(!0)},G=()=>d(!c),z=()=>{i(),O("image_deleted")},A=B=>{navigator.clipboard.writeText(B),O("copy_url")},W=B=>k(this,null,function*(){B.persist();const H=B.target.files?B.target.files[0]:null;if(H){a(!0);try{const q=H.type.split("/")[1],ee=yield T.readFileAndHash(H),R=(yield T.generateHashFileName(H))+"."+q,L={image_type:q,image_file_name:R,image_size:H.size,base64_sum:ee},F=yield E==null?void 0:E.https.generateSignedInUrl(L);if(F!=null&&F.ok){const V=yield F.json(),te={"Content-Type":H.type,"Content-MD5":ee};try{const se=new File([H],R,{type:H.type}),ae=yield E==null?void 0:E.https.storeInBucket(V.data.signed_url,se,te);r(ae||""),w(ae),O("upload_success")}catch(se){console.error("There was a problem with uploading the file: ",se),O("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield F==null?void 0:F.json()),O("sign_in_url_failed")}catch(q){console.error("There was a problem with encrypting file...",q),O("encrypting_file_failed")}a(!1)}}),Y=B=>k(this,null,function*(){if(B){a(!0);try{const H=B.type.split("/")[1],q=yield T.readFileAndHash(B),ee=(yield T.generateHashFileName(B))+"."+H,R={image_type:H,image_file_name:ee,image_size:B.size,base64_sum:q},L=yield E==null?void 0:E.https.generateSignedInUrl(R);if(L!=null&&L.ok){const F=yield L.json(),V={"Content-Type":B.type,"Content-MD5":q};try{const te=new File([B],ee,{type:B.type}),se=yield E==null?void 0:E.https.storeInBucket(F.data.signed_url,te,V);r(se||""),O("upload_success")}catch(te){console.error("There was a problem with uploading the file: ",te),O("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield L==null?void 0:L.json()),O("sign_in_url_failed")}catch(H){console.error("There was a problem with encrypting file...",H),O("encrypting_file_failed")}a(!1)}}),N=()=>{r(S),O("image_reset")},$=B=>{r(B),w(B)};return u.jsxs(u.Fragment,{children:[u.jsxs(I.Card,{sx:{marginBottom:"10px"},children:[u.jsxs(I.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsx(I.Typography,{level:"title-lg",children:t}),u.jsx(I.Tooltip,{title:e.clearImage,children:u.jsx(I.IconButton,{"aria-label":e.clearImage,variant:"plain",color:"danger",size:"sm",onClick:z,children:u.jsx(Cp,{})})})]}),u.jsxs(I.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(I.Skeleton,{loading:o,animation:"wave",children:[n?u.jsx(I.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)"}}}):u.jsx(Ic,{sx:{fontSize:"3rem",opacity:.2}}),n?u.jsx(I.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:u.jsx(Mp,{sx:{fontSize:"3rem",color:"#fff"}})}):u.jsx(u.Fragment,{})]}),u.jsx(I.Tooltip,{title:e.copyUrl,children:u.jsx(Xr,{onClick:()=>A(n),disabled:!n,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Le.ContentCopy,{})})}),u.jsx(I.Tooltip,{title:e.viewImage,children:u.jsx(Xr,{onClick:G,disabled:!n,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(Bp,{})})}),u.jsx(I.Tooltip,{title:e.cropImage,children:u.jsx(Xr,{onClick:C,disabled:!n,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(eg,{})})})]}),u.jsx(I.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:u.jsxs(Xr,{sx:{width:"100%"},onClick:b,children:[u.jsx(Le.Upload,{})," ",e.uploadImage,u.jsx($p,{type:"file",accept:"image/*",onChange:W,ref:y})]})}),E!=null&&E.https.sportal365Config?u.jsx(I.AccordionGroup,{variant:"soft",children:u.jsxs(I.Accordion,{children:[u.jsx(I.AccordionSummary,{children:u.jsx(I.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.sportal365Images})}),u.jsx(I.AccordionDetails,{children:u.jsx(Lp,{labels:e,onChangeImages:$})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(ut,{showToast:l,message:p,color:g,hideToast:P}),u.jsx(Rp,{title:e.viewImage,open:c,imageSrc:n,toggleModal:G}),u.jsx(Zp,{labels:e,open:f,imageSrc:n,toggleModal:C,uploadImage:Y,resetDefaultImageUrl:N})]})},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),uP=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),dP=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),fP=({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"],l=cP(e),s=uP(e),c=dP(e),d=(m,g)=>{const v=m.target.value;o.colors[g]=v,n(o)},f=(m,g)=>{const v=m.target.value;o.urls[g]=v,n(o)},h=(m,g)=>{o.images[g]=m,n(o)},p=m=>{o.images[m]="",n(o)};return u.jsx(I.Box,{children:u.jsxs(Fh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(zh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${ac.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:[u.jsxs(jr,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx(Ic,{sx:{width:"20px"}})}),e.images]}),u.jsxs(jr,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx(B_,{sx:{width:"20px"}})}),e.colors]}),u.jsxs(jr,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx($_,{sx:{width:"20px"}})}),e.urls]})]}),u.jsxs(Qr,{value:0,sx:{px:0},children:[u.jsx(tg,{labels:e,title:e.mainLogo,image:o.images.main_logo,onChangeImages:m=>h(m,"main_logo"),clearImage:()=>p("main_logo")}),u.jsx(I.Link,{underline:"hover",onClick:()=>i(!r),sx:{marginBottom:"10px"},children:r?e.hideMoreImages:e.showMoreImages}),r?u.jsx(u.Fragment,{children:a.map(m=>u.jsx(tg,{labels:e,title:l.get(m),image:o.images[m],onChangeImages:g=>h(g,m),clearImage:()=>p(m)},`branding-image-${m}`))}):u.jsx(u.Fragment,{})]}),u.jsx(Qr,{value:1,sx:{px:0},children:u.jsx(I.Box,{children:Object.keys(o.colors).map(m=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{size:"sm",label:s.get(m),placeholder:"",defaultValue:o.colors[m],required:!1,onChange:g=>d(g,m)})},`branding-color-${m}`))})}),u.jsx(Qr,{value:2,sx:{px:0},children:u.jsx(I.Box,{children:Object.keys(o.urls).map(m=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{size:"sm",label:c.get(m),placeholder:"",defaultValue:o.urls[m],required:!1,onChange:g=>f(g,m)})},`branding-url-${m}`))})})]})})},Lc=Ve(u.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"),ng=e=>{const t=()=>k(this,null,function*(){yield zi(e.environment).signOut()});return u.jsx(I.Button,{variant:"outlined",color:"danger",onClick:t,children:e.signOutLabel})},hP=({createLabel:e,createFromTemplateLabel:t,signOutLabel:n,environment:r,onClickCreate:i,onClickCreateFromTemplate:o})=>u.jsx(u.Fragment,{children:u.jsxs(I.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",p:1,sx:()=>({marginBottom:"16px"}),children:[t?u.jsxs(I.Stack,{direction:"row",alignItems:"center",spacing:2,children:[u.jsx(I.Button,{startDecorator:u.jsx(Lc,{}),variant:"solid",color:"primary",onClick:i,children:e}),u.jsx(I.Button,{startDecorator:u.jsx(Lc,{}),variant:"outlined",color:"primary",onClick:o,children:t})]}):u.jsx(I.Button,{startDecorator:u.jsx(Lc,{}),variant:"solid",color:"primary",onClick:i,children:e}),n?u.jsx(ng,{signOutLabel:n,environment:r}):u.jsx(u.Fragment,{})]})});var rg={},Bc=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ei={_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},no={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 ig(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var $c=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 Re(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 Xa(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function og(e,t){if(t(e))return e;if(e.parentNode)return og(e.parentNode,t)}function Za(e,t){var n=Re("div","numInputWrapper"),r=Re("input","numInput "+e),i=Re("span","arrowUp"),o=Re("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 Nc=function(){},es=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},pP={D:Nc,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:Nc,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:Nc,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},xr={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})"},ro={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[ro.w(e,t,n)]},F:function(e,t,n){return es(ro.n(e,t,n)-1,!1,t)},G:function(e,t,n){return zt(ro.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 es(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)}},ag=function(e){var t=e.config,n=t===void 0?ei:t,r=e.l10n,i=r===void 0?no:r,o=e.isMobile,a=o===void 0?!1:o;return function(l,s,c){var d=c||i;return n.formatDate!==void 0&&!a?n.formatDate(l,s,d):s.split("").map(function(f,h,p){return ro[f]&&p[h-1]!=="\\"?ro[f](l,d,n):f!=="\\"?f:""}).join("")}},Fc=function(e){var t=e.config,n=t===void 0?ei:t,r=e.l10n,i=r===void 0?no:r;return function(o,a,l,s){if(!(o!==0&&!o)){var c=s||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||ei).dateFormat,p=String(o).trim();if(p==="today")d=new Date,l=!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=[],v=0,S=0,w="";v<h.length;v++){var y=h[v],C=y==="\\",b=h[v-1]==="\\"||C;if(xr[y]&&!b){w+=xr[y];var T=new RegExp(w).exec(o);T&&(m=!0)&&g[y!=="Y"?"push":"unshift"]({fn:pP[y],val:T[++S]})}else C||(w+=".")}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 P=E.fn,O=E.val;return d=P(d,O,c)||d}),d=m?d:void 0}}if(!(d instanceof Date&&!isNaN(d.getTime()))){n.errorHandler(new Error("Invalid date provided: "+f));return}return l===!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 gP=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},zc=function(e,t,n){return e*3600+t*60+n},mP=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},vP={DAY:864e5};function jc(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 l=e.maxDate.getHours(),s=e.maxDate.getMinutes();t=Math.min(t,l),t===l&&(n=Math.min(s,n)),t===l&&n===s&&(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(l){l&&Object.keys(l).forEach(function(s){return e[s]=l[s]})},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)},sg=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,l=o.length;a<l;a++,i++)r[i]=o[a];return r},bP=300;function yP(e,t){var n={config:Et(Et({},ei),dt.defaultConfig),l10n:no};n.parseDate=Fc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=g,n._setHoursFromDate=h,n._positionCalendar=Ce,n.changeMonth=R,n.changeYear=ae,n.clear=L,n.close=F,n.onMouseOver=Se,n._createElement=Re,n.createDay=T,n.destroy=V,n.isEnabled=J,n.jumpToDate=w,n.updateValue=un,n.open=wt,n.redraw=Pe,n.set=jt,n.setDate=qt,n.toggle=ku;function r(){n.utils={getDaysInMonth:function(_,M){return _===void 0&&(_=n.currentMonth),M===void 0&&(M=n.currentYear),_===1&&(M%4===0&&M%100!==0||M%400===0)?29:n.l10n.daysInMonth[_]}}}function i(){n.element=n.input=e,n.isOpen=!1,kt(),he(),wn(),Ts(),r(),n.isMobile||b(),S(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&h(n.config.noCalendar?n.latestSelectedDateObj:void 0),un(!1)),l();var _=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&_&&Ce(),ze("onReady")}function o(){var _;return((_=n.calendarContainer)===null||_===void 0?void 0:_.getRootNode()).activeElement||document.activeElement}function a(_){return _.bind(n)}function l(){var _=n.config;_.weekNumbers===!1&&_.showMonths===1||_.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 M=(n.days.offsetWidth+1)*_.showMonths;n.daysContainer.style.width=M+"px",n.calendarContainer.style.width=M+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}})}function s(_){if(n.selectedDates.length===0){var M=n.config.minDate===void 0||Kt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),K=jc(n.config);M.setHours(K.hours,K.minutes,K.seconds,M.getMilliseconds()),n.selectedDates=[M],n.latestSelectedDateObj=M}_!==void 0&&_.type!=="blur"&&xt(_);var Q=n._input.value;f(),un(),n._input.value!==Q&&n._debouncedChange()}function c(_,M){return _%12+12*rn(M===n.l10n.amPM[1])}function d(_){switch(_%24){case 0:case 12:return 12;default:return _%12}}function f(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var _=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,M=(parseInt(n.minuteElement.value,10)||0)%60,K=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(_=c(_,n.amPM.textContent));var Q=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&Kt(n.latestSelectedDateObj,n.config.minDate,!0)===0,re=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=zc(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),xe=zc(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),ue=zc(_,M,K);if(ue>xe&&ue<ce){var we=mP(ce);_=we[0],M=we[1],K=we[2]}}else{if(re){var fe=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;_=Math.min(_,fe.getHours()),_===fe.getHours()&&(M=Math.min(M,fe.getMinutes())),M===fe.getMinutes()&&(K=Math.min(K,fe.getSeconds()))}if(Q){var me=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;_=Math.max(_,me.getHours()),_===me.getHours()&&M<me.getMinutes()&&(M=me.getMinutes()),M===me.getMinutes()&&(K=Math.max(K,me.getSeconds()))}}p(_,M,K)}}function h(_){var M=_||n.latestSelectedDateObj;M&&M instanceof Date&&p(M.getHours(),M.getMinutes(),M.getSeconds())}function p(_,M,K){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(_%24,M,K||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=zt(n.config.time_24hr?_:(12+_)%12+12*rn(_%12===0)),n.minuteElement.value=zt(M),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[rn(_>=12)]),n.secondElement!==void 0&&(n.secondElement.value=zt(K)))}function m(_){var M=Yt(_),K=parseInt(M.value)+(_.delta||0);(K/1e3>1||_.key==="Enter"&&!/[^\d]/.test(K.toString()))&&ae(K)}function g(_,M,K,Q){if(M instanceof Array)return M.forEach(function(re){return g(_,re,K,Q)});if(_ instanceof Array)return _.forEach(function(re){return g(re,M,K,Q)});_.addEventListener(M,K,Q),n._handlers.push({remove:function(){return _.removeEventListener(M,K,Q)}})}function v(){ze("onChange")}function S(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(K){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+K+"]"),function(Q){return g(Q,"click",n[K])})}),n.isMobile){_u();return}var _=ig(Ue,50);if(n._debouncedChange=ig(v,bP),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",ge),n.calendarContainer!==void 0&&g(n.calendarContainer,"keydown",ge),!n.config.inline&&!n.config.static&&g(window,"resize",_),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",_s),g(n.monthNav,["keyup","increment"],m),g(n.daysContainer,"click",It)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var M=function(K){return Yt(K).select()};g(n.timeContainer,["increment"],s),g(n.timeContainer,"blur",s,{capture:!0}),g(n.timeContainer,"click",y),g([n.hourElement,n.minuteElement],["focus","click"],M),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){s(K)})}n.config.allowInput&&g(n._input,"blur",ne)}function w(_,M){var K=_!==void 0?n.parseDate(_):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),Q=n.currentYear,re=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)}M&&n.currentYear!==Q&&(ze("onYearChange"),W()),M&&(n.currentYear!==Q||n.currentMonth!==re)&&ze("onMonthChange"),n.redraw()}function y(_){var M=Yt(_);~M.className.indexOf("arrow")&&C(_,M.classList.contains("arrowUp")?1:-1)}function C(_,M,K){var Q=_&&Yt(_),re=K||Q&&Q.parentNode&&Q.parentNode.firstChild,ce=pi("increment");ce.delta=M,re&&re.dispatchEvent(ce)}function b(){var _=window.document.createDocumentFragment();if(n.calendarContainer=Re("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(_.appendChild($()),n.innerContainer=Re("div","flatpickr-innerContainer"),n.config.weekNumbers){var M=ee(),K=M.weekWrapper,Q=M.weekNumbers;n.innerContainer.appendChild(K),n.weekNumbers=Q,n.weekWrapper=K}n.rContainer=Re("div","flatpickr-rContainer"),n.rContainer.appendChild(H()),n.daysContainer||(n.daysContainer=Re("div","flatpickr-days"),n.daysContainer.tabIndex=-1),A(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),_.appendChild(n.innerContainer)}n.config.enableTime&&_.appendChild(B()),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(_);var re=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&&(!re&&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=Re("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 T(_,M,K,Q){var re=J(M,!0),ce=Re("span",_,M.getDate().toString());return ce.dateObj=M,ce.$i=Q,ce.setAttribute("aria-label",n.formatDate(M,n.config.ariaDateFormat)),_.indexOf("hidden")===-1&&Kt(M,n.now)===0&&(n.todayDateElem=ce,ce.classList.add("today"),ce.setAttribute("aria-current","date")),re?(ce.tabIndex=-1,Io(M)&&(ce.classList.add("selected"),n.selectedDateElem=ce,n.config.mode==="range"&&(Ot(ce,"startRange",n.selectedDates[0]&&Kt(M,n.selectedDates[0],!0)===0),Ot(ce,"endRange",n.selectedDates[1]&&Kt(M,n.selectedDates[1],!0)===0),_==="nextMonthDay"&&ce.classList.add("inRange")))):ce.classList.add("flatpickr-disabled"),n.config.mode==="range"&&Es(M)&&!Io(M)&&ce.classList.add("inRange"),n.weekNumbers&&n.config.showMonths===1&&_!=="prevMonthDay"&&Q%7===6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(M)+"</span>"),ze("onDayCreate",ce),ce}function E(_){_.focus(),n.config.mode==="range"&&Se(_)}function P(_){for(var M=_>0?0:n.config.showMonths-1,K=_>0?n.config.showMonths:-1,Q=M;Q!=K;Q+=_)for(var re=n.daysContainer.children[Q],ce=_>0?0:re.children.length-1,xe=_>0?re.children.length:-1,ue=ce;ue!=xe;ue+=_){var we=re.children[ue];if(we.className.indexOf("hidden")===-1&&J(we.dateObj))return we}}function O(_,M){for(var K=_.className.indexOf("Month")===-1?_.dateObj.getMonth():n.currentMonth,Q=M>0?n.config.showMonths:-1,re=M>0?1:-1,ce=K-n.currentMonth;ce!=Q;ce+=re)for(var xe=n.daysContainer.children[ce],ue=K-n.currentMonth===ce?_.$i+M:M<0?xe.children.length-1:0,we=xe.children.length,fe=ue;fe>=0&&fe<we&&fe!=(M>0?we:-1);fe+=re){var me=xe.children[fe];if(me.className.indexOf("hidden")===-1&&J(me.dateObj)&&Math.abs(_.$i-fe)>=Math.abs(M))return E(me)}n.changeMonth(re),G(P(re),0)}function G(_,M){var K=o(),Q=le(K||document.body),re=_!==void 0?_:Q?K:n.selectedDateElem!==void 0&&le(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&le(n.todayDateElem)?n.todayDateElem:P(M>0?1:-1);re===void 0?n._input.focus():Q?O(re,M):E(re)}function z(_,M){for(var K=(new Date(_,M,1).getDay()-n.l10n.firstDayOfWeek+7)%7,Q=n.utils.getDaysInMonth((M-1+12)%12,_),re=n.utils.getDaysInMonth(M,_),ce=window.document.createDocumentFragment(),xe=n.config.showMonths>1,ue=xe?"prevMonthDay hidden":"prevMonthDay",we=xe?"nextMonthDay hidden":"nextMonthDay",fe=Q+1-K,me=0;fe<=Q;fe++,me++)ce.appendChild(T("flatpickr-day "+ue,new Date(_,M-1,fe),fe,me));for(fe=1;fe<=re;fe++,me++)ce.appendChild(T("flatpickr-day",new Date(_,M,fe),fe,me));for(var De=re+1;De<=42-K&&(n.config.showMonths===1||me%7!==0);De++,me++)ce.appendChild(T("flatpickr-day "+we,new Date(_,M+1,De%re),De,me));var Pt=Re("div","dayContainer");return Pt.appendChild(ce),Pt}function A(){if(n.daysContainer!==void 0){Xa(n.daysContainer),n.weekNumbers&&Xa(n.weekNumbers);for(var _=document.createDocumentFragment(),M=0;M<n.config.showMonths;M++){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+M),_.appendChild(z(K.getFullYear(),K.getMonth()))}n.daysContainer.appendChild(_),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&Se()}}function W(){if(!(n.config.showMonths>1||n.config.monthSelectorType!=="dropdown")){var _=function(Q){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&Q<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&Q>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var M=0;M<12;M++)if(_(M)){var K=Re("option","flatpickr-monthDropdown-month");K.value=new Date(n.currentYear,M).getMonth().toString(),K.textContent=es(M,n.config.shorthandCurrentMonth,n.l10n),K.tabIndex=-1,n.currentMonth===M&&(K.selected=!0),n.monthsDropdownContainer.appendChild(K)}}}function Y(){var _=Re("div","flatpickr-month"),M=window.document.createDocumentFragment(),K;n.config.showMonths>1||n.config.monthSelectorType==="static"?K=Re("span","cur-month"):(n.monthsDropdownContainer=Re("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),g(n.monthsDropdownContainer,"change",function(xe){var ue=Yt(xe),we=parseInt(ue.value,10);n.changeMonth(we-n.currentMonth),ze("onMonthChange")}),W(),K=n.monthsDropdownContainer);var Q=Za("cur-year",{tabindex:"-1"}),re=Q.getElementsByTagName("input")[0];re.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&re.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(re.setAttribute("max",n.config.maxDate.getFullYear().toString()),re.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var ce=Re("div","flatpickr-current-month");return ce.appendChild(K),ce.appendChild(Q),M.appendChild(ce),_.appendChild(M),{container:_,yearElement:re,monthElement:K}}function N(){Xa(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var _=n.config.showMonths;_--;){var M=Y();n.yearElements.push(M.yearElement),n.monthElements.push(M.monthElement),n.monthNav.appendChild(M.container)}n.monthNav.appendChild(n.nextMonthNav)}function $(){return n.monthNav=Re("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=Re("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=Re("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,N(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(_){n.__hidePrevMonthArrow!==_&&(Ot(n.prevMonthNav,"flatpickr-disabled",_),n.__hidePrevMonthArrow=_)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(_){n.__hideNextMonthArrow!==_&&(Ot(n.nextMonthNav,"flatpickr-disabled",_),n.__hideNextMonthArrow=_)}}),n.currentYearElement=n.yearElements[0],gi(),n.monthNav}function B(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var _=jc(n.config);n.timeContainer=Re("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var M=Re("span","flatpickr-time-separator",":"),K=Za("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=K.getElementsByTagName("input")[0];var Q=Za("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=Q.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?_.hours:d(_.hours)),n.minuteElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():_.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(M),n.timeContainer.appendChild(Q),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var re=Za("flatpickr-second");n.secondElement=re.getElementsByTagName("input")[0],n.secondElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():_.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(Re("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(re)}return n.config.time_24hr||(n.amPM=Re("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?Xa(n.weekdayContainer):n.weekdayContainer=Re("div","flatpickr-weekdays");for(var _=n.config.showMonths;_--;){var M=Re("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(M)}return q(),n.weekdayContainer}function q(){if(n.weekdayContainer){var _=n.l10n.firstDayOfWeek,M=sg(n.l10n.weekdays.shorthand);_>0&&_<M.length&&(M=sg(M.splice(_,M.length),M.splice(0,_)));for(var K=n.config.showMonths;K--;)n.weekdayContainer.children[K].innerHTML=`
|
|
2453
|
+
`,rP=1,iP=3,oP=function(e){q0(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=V.createRef(),n.videoRef=V.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=Xk(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 l=eP(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=l.crop,a=l.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}},n.computeSizes=function(){var r,i,o,a,l,s,c=n.imageRef.current||n.videoRef.current;if(c&&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=c.offsetWidth<f||c.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:c.offsetWidth,height:c.offsetHeight};n.mediaSize=At(At({},g),{naturalWidth:f,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var v=n.props.cropSize?n.props.cropSize:Yk(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((l=n.state.cropSize)===null||l===void 0?void 0:l.height)!==v.height||((s=n.state.cropSize)===null||s===void 0?void 0:s.width)!==v.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(v),n.setState({cropSize:v},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(v),v}},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,l=r.y;n.dragStartPosition={x:a,y:l},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,l=o-n.dragStartPosition.y,s={x:n.dragStartCrop.x+a,y:n.dragStartCrop.y+l},c=n.props.restrictPosition?qa(s,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):s;n.props.onCropChange(c)}}))},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=Gk(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 l,s;return(s=(l=n.props).onInteractionStart)===null||s===void 0?void 0:s.call(l)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var l,s;return(s=(l=n.props).onInteractionEnd)===null||s===void 0?void 0:s.call(l)})},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,l=a.crop,s=a.zoom;return{x:(i+l.x)/s,y:(o+l.y)/s}},n.setNewZoom=function(r,i,o){var a=o===void 0?{}:o,l=a.shouldUpdatePosition,s=l===void 0?!0:l;if(!(!n.state.cropSize||!n.props.onZoomChange)){var c=Qa(r,n.props.minZoom,n.props.maxZoom);if(s){var d=n.getPointOnContainer(i,n.containerPosition),f=n.getPointOnMedia(d),h={x:f.x*c-d.x,y:f.y*c-d.y},p=n.props.restrictPosition?qa(h,n.mediaSize,n.state.cropSize,c,n.props.rotation):h;n.props.onCropChange(p)}n.props.onZoomChange(c)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?qa(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return qk(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?qa(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=nP,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,l,s,c,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():(((l=n.crop)===null||l===void 0?void 0:l.x)!==((s=this.props.crop)===null||s===void 0?void 0:s.x)||((c=n.crop)===null||c===void 0?void 0:c.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 l=this.containerRect.width/this.containerRect.height,s=((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,c=((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=s/c;return d<l?"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=Qp(r,i),this.lastPinchRotation=Jp(r,i),this.onDragStart(Xp(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=Xp(i,o);this.onDrag(a),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var l=Qp(i,o),s=r.props.zoom*(l/r.lastPinchDistance);r.setNewZoom(s,a,{shouldUpdatePosition:!1}),r.lastPinchDistance=l;var c=Jp(i,o),d=r.props.rotation+(c-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=c})}},t.prototype.render=function(){var n=this,r,i=this.props,o=i.image,a=i.video,l=i.mediaProps,s=i.transform,c=i.crop,d=c.x,f=c.y,h=i.rotation,p=i.zoom,m=i.cropShape,g=i.showGrid,v=i.style,S=v.containerStyle,w=v.cropAreaStyle,y=v.mediaStyle,C=i.classes,b=C.containerClassName,T=C.cropAreaClassName,E=C.mediaClassName,P=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return V.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(G){return n.containerRef=G},"data-testid":"container",style:S,className:Ja("reactEasyCrop_Container",b)},o?V.createElement("img",At({alt:"",className:Ja("reactEasyCrop_Image",P==="contain"&&"reactEasyCrop_Contain",P==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",P==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},l,{src:o,ref:this.imageRef,style:At(At({},y),{transform:s||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):a&&V.createElement("video",At({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:Ja("reactEasyCrop_Video",P==="contain"&&"reactEasyCrop_Contain",P==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",P==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},l,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:At(At({},y),{transform:s||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(O){return V.createElement("source",At({key:O.src},O))})),this.state.cropSize&&V.createElement("div",{style:At(At({},w),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Ja("reactEasyCrop_CropArea",m==="round"&&"reactEasyCrop_CropAreaRound",g&&"reactEasyCrop_CropAreaGrid",T)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:iP,minZoom:rP,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}(V.Component);const aP=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 sP(e){return e*Math.PI/180}function lP(e,t,n=0){return k(this,null,function*(){const r=yield aP(e),i=document.createElement("canvas"),o=i.getContext("2d"),l=2*(Math.max(r.width,r.height)/2*Math.sqrt(2));i.width=l,i.height=l,o.translate(l/2,l/2),o.rotate(sP(n)),o.translate(-l/2,-l/2),o.drawImage(r,l/2-r.width*.5,l/2-r.height*.5);const s=o.getImageData(0,0,l,l);return i.width=t.width,i.height=t.height,o.putImageData(s,Math.round(0-l/2+r.width*.5-t.x),Math.round(0-l/2+r.height*.5-t.y)),new Promise(c=>i.toBlob(d=>{const f=new File([d],`cropped_image_${Date.now()}.jpeg`,{type:"image/jpeg"});c(f)},"image/jpeg"))})}const Zp=({labels:e,open:t,imageSrc:n,resetDefaultImageUrl:r,toggleModal:i,uploadImage:o})=>{const[a,l]=x.useState({x:0,y:0}),[s,c]=x.useState(1),[d,f]=x.useState(16/9),[h,p]=x.useState(null),m=(y,C)=>{p(C)},g=(y,C)=>f(C),v=()=>k(this,null,function*(){const y=yield lP(n,h);w(),o(y)}),S=()=>{w(),r()},w=()=>{l({x:0,y:0}),c(1),f(16/9),p(null)};return u.jsx(I.Modal,{open:t,onClose:i,children:u.jsxs(I.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(I.ModalClose,{}),u.jsx(I.DialogTitle,{children:e.cropImage}),u.jsxs(I.DialogContent,{sx:{width:"100%"},children:[u.jsx(I.Box,{position:"relative",height:"100%",width:"100%",mb:2,children:u.jsx(oP,{image:n,crop:a,zoom:s,aspect:d,onCropChange:l,onCropComplete:m,onZoomChange:c})}),u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.aspectRatio}),u.jsxs(I.Select,{value:d,onChange:g,children:[u.jsx(I.Option,{value:4/3,children:"4 / 3"}),u.jsx(I.Option,{value:16/9,children:"16 / 9"}),u.jsx(I.Option,{value:1,children:"1"})]})]}),u.jsx(I.Box,{mb:1,mx:2,children:u.jsx(I.Slider,{value:s,min:1,max:3,step:.1,onChange:(y,C)=>c(C)})}),u.jsxs(I.DialogActions,{children:[u.jsx(I.Button,{color:"primary",onClick:v,loading:!1,children:e.crop}),u.jsx(I.Button,{color:"primary",variant:"outlined",onClick:S,loading:!1,children:e.reset})]})]})]})})},eg=Ve(u.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"CropOutlined"),tg=({labels:e,title:t,image:n,onChangeImages:r,clearImage:i})=>{const[o,a]=x.useState(!1),[l,s]=x.useState(!1),[c,d]=x.useState(!1),[f,h]=x.useState(!1),[p,m]=x.useState(""),[g,v]=x.useState("primary"),[S,w]=x.useState(""),y=x.useRef(null),C=()=>h(!f),b=()=>{y.current&&y.current.click()},T=new Op,E=x.useContext(Xo),P=()=>{m(""),s(!1)},O=B=>{let H="",q="primary";switch(B){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}v(q),m(H),s(!0)},G=()=>d(!c),z=()=>{i(),O("image_deleted")},A=B=>{navigator.clipboard.writeText(B),O("copy_url")},W=B=>k(this,null,function*(){B.persist();const H=B.target.files?B.target.files[0]:null;if(H){a(!0);try{const q=H.type.split("/")[1],ee=yield T.readFileAndHash(H),R=(yield T.generateHashFileName(H))+"."+q,L={image_type:q,image_file_name:R,image_size:H.size,base64_sum:ee},F=yield E==null?void 0:E.https.generateSignedInUrl(L);if(F!=null&&F.ok){const U=yield F.json(),te={"Content-Type":H.type,"Content-MD5":ee};try{const se=new File([H],R,{type:H.type}),ae=yield E==null?void 0:E.https.storeInBucket(U.data.signed_url,se,te);r(ae||""),w(ae),O("upload_success")}catch(se){console.error("There was a problem with uploading the file: ",se),O("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield F==null?void 0:F.json()),O("sign_in_url_failed")}catch(q){console.error("There was a problem with encrypting file...",q),O("encrypting_file_failed")}a(!1)}}),Y=B=>k(this,null,function*(){if(B){a(!0);try{const H=B.type.split("/")[1],q=yield T.readFileAndHash(B),ee=(yield T.generateHashFileName(B))+"."+H,R={image_type:H,image_file_name:ee,image_size:B.size,base64_sum:q},L=yield E==null?void 0:E.https.generateSignedInUrl(R);if(L!=null&&L.ok){const F=yield L.json(),U={"Content-Type":B.type,"Content-MD5":q};try{const te=new File([B],ee,{type:B.type}),se=yield E==null?void 0:E.https.storeInBucket(F.data.signed_url,te,U);r(se||""),O("upload_success")}catch(te){console.error("There was a problem with uploading the file: ",te),O("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield L==null?void 0:L.json()),O("sign_in_url_failed")}catch(H){console.error("There was a problem with encrypting file...",H),O("encrypting_file_failed")}a(!1)}}),N=()=>{r(S),O("image_reset")},$=B=>{r(B),w(B)};return u.jsxs(u.Fragment,{children:[u.jsxs(I.Card,{sx:{marginBottom:"10px"},children:[u.jsxs(I.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsx(I.Typography,{level:"title-lg",children:t}),u.jsx(I.Tooltip,{title:e.clearImage,children:u.jsx(I.IconButton,{"aria-label":e.clearImage,variant:"plain",color:"danger",size:"sm",onClick:z,children:u.jsx(Cp,{})})})]}),u.jsxs(I.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(I.Skeleton,{loading:o,animation:"wave",children:[n?u.jsx(I.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)"}}}):u.jsx(Ic,{sx:{fontSize:"3rem",opacity:.2}}),n?u.jsx(I.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:u.jsx(Mp,{sx:{fontSize:"3rem",color:"#fff"}})}):u.jsx(u.Fragment,{})]}),u.jsx(I.Tooltip,{title:e.copyUrl,children:u.jsx(Xr,{onClick:()=>A(n),disabled:!n,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Le.ContentCopy,{})})}),u.jsx(I.Tooltip,{title:e.viewImage,children:u.jsx(Xr,{onClick:G,disabled:!n,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(Bp,{})})}),u.jsx(I.Tooltip,{title:e.cropImage,children:u.jsx(Xr,{onClick:C,disabled:!n,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(eg,{})})})]}),u.jsx(I.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:u.jsxs(Xr,{sx:{width:"100%"},onClick:b,children:[u.jsx(Le.Upload,{})," ",e.uploadImage,u.jsx($p,{type:"file",accept:"image/*",onChange:W,ref:y})]})}),E!=null&&E.https.sportal365Config?u.jsx(I.AccordionGroup,{variant:"soft",children:u.jsxs(I.Accordion,{children:[u.jsx(I.AccordionSummary,{children:u.jsx(I.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.sportal365Images})}),u.jsx(I.AccordionDetails,{children:u.jsx(Lp,{labels:e,onChangeImages:$})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(ut,{showToast:l,message:p,color:g,hideToast:P}),u.jsx(Rp,{title:e.viewImage,open:c,imageSrc:n,toggleModal:G}),u.jsx(Zp,{labels:e,open:f,imageSrc:n,toggleModal:C,uploadImage:Y,resetDefaultImageUrl:N})]})},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),uP=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),dP=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),fP=({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"],l=cP(e),s=uP(e),c=dP(e),d=(m,g)=>{const v=m.target.value;o.colors[g]=v,n(o)},f=(m,g)=>{const v=m.target.value;o.urls[g]=v,n(o)},h=(m,g)=>{o.images[g]=m,n(o)},p=m=>{o.images[m]="",n(o)};return u.jsx(I.Box,{children:u.jsxs(Fh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(zh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${ac.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:[u.jsxs(jr,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx(Ic,{sx:{width:"20px"}})}),e.images]}),u.jsxs(jr,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx(B_,{sx:{width:"20px"}})}),e.colors]}),u.jsxs(jr,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx($_,{sx:{width:"20px"}})}),e.urls]})]}),u.jsxs(Qr,{value:0,sx:{px:0},children:[u.jsx(tg,{labels:e,title:e.mainLogo,image:o.images.main_logo,onChangeImages:m=>h(m,"main_logo"),clearImage:()=>p("main_logo")}),u.jsx(I.Link,{underline:"hover",onClick:()=>i(!r),sx:{marginBottom:"10px"},children:r?e.hideMoreImages:e.showMoreImages}),r?u.jsx(u.Fragment,{children:a.map(m=>u.jsx(tg,{labels:e,title:l.get(m),image:o.images[m],onChangeImages:g=>h(g,m),clearImage:()=>p(m)},`branding-image-${m}`))}):u.jsx(u.Fragment,{})]}),u.jsx(Qr,{value:1,sx:{px:0},children:u.jsx(I.Box,{children:Object.keys(o.colors).map(m=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{size:"sm",label:s.get(m),placeholder:"",defaultValue:o.colors[m],required:!1,onChange:g=>d(g,m)})},`branding-color-${m}`))})}),u.jsx(Qr,{value:2,sx:{px:0},children:u.jsx(I.Box,{children:Object.keys(o.urls).map(m=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{size:"sm",label:c.get(m),placeholder:"",defaultValue:o.urls[m],required:!1,onChange:g=>f(g,m)})},`branding-url-${m}`))})})]})})},Lc=Ve(u.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"),ng=e=>{const t=()=>k(this,null,function*(){yield zi(e.environment).signOut()});return u.jsx(I.Button,{variant:"outlined",color:"danger",onClick:t,children:e.signOutLabel})},hP=({createLabel:e,createFromTemplateLabel:t,signOutLabel:n,environment:r,onClickCreate:i,onClickCreateFromTemplate:o})=>u.jsx(u.Fragment,{children:u.jsxs(I.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",p:1,sx:()=>({marginBottom:"16px"}),children:[t?u.jsxs(I.Stack,{direction:"row",alignItems:"center",spacing:2,children:[u.jsx(I.Button,{startDecorator:u.jsx(Lc,{}),variant:"solid",color:"primary",onClick:i,children:e}),u.jsx(I.Button,{startDecorator:u.jsx(Lc,{}),variant:"outlined",color:"primary",onClick:o,children:t})]}):u.jsx(I.Button,{startDecorator:u.jsx(Lc,{}),variant:"solid",color:"primary",onClick:i,children:e}),n?u.jsx(ng,{signOutLabel:n,environment:r}):u.jsx(u.Fragment,{})]})});var rg={},Bc=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ei={_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},no={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 ig(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var $c=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 Re(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 Xa(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function og(e,t){if(t(e))return e;if(e.parentNode)return og(e.parentNode,t)}function Za(e,t){var n=Re("div","numInputWrapper"),r=Re("input","numInput "+e),i=Re("span","arrowUp"),o=Re("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 Nc=function(){},es=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},pP={D:Nc,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:Nc,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:Nc,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},xr={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})"},ro={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[ro.w(e,t,n)]},F:function(e,t,n){return es(ro.n(e,t,n)-1,!1,t)},G:function(e,t,n){return zt(ro.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 es(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)}},ag=function(e){var t=e.config,n=t===void 0?ei:t,r=e.l10n,i=r===void 0?no:r,o=e.isMobile,a=o===void 0?!1:o;return function(l,s,c){var d=c||i;return n.formatDate!==void 0&&!a?n.formatDate(l,s,d):s.split("").map(function(f,h,p){return ro[f]&&p[h-1]!=="\\"?ro[f](l,d,n):f!=="\\"?f:""}).join("")}},Fc=function(e){var t=e.config,n=t===void 0?ei:t,r=e.l10n,i=r===void 0?no:r;return function(o,a,l,s){if(!(o!==0&&!o)){var c=s||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||ei).dateFormat,p=String(o).trim();if(p==="today")d=new Date,l=!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=[],v=0,S=0,w="";v<h.length;v++){var y=h[v],C=y==="\\",b=h[v-1]==="\\"||C;if(xr[y]&&!b){w+=xr[y];var T=new RegExp(w).exec(o);T&&(m=!0)&&g[y!=="Y"?"push":"unshift"]({fn:pP[y],val:T[++S]})}else C||(w+=".")}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 P=E.fn,O=E.val;return d=P(d,O,c)||d}),d=m?d:void 0}}if(!(d instanceof Date&&!isNaN(d.getTime()))){n.errorHandler(new Error("Invalid date provided: "+f));return}return l===!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 gP=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},zc=function(e,t,n){return e*3600+t*60+n},mP=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},vP={DAY:864e5};function jc(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 l=e.maxDate.getHours(),s=e.maxDate.getMinutes();t=Math.min(t,l),t===l&&(n=Math.min(s,n)),t===l&&n===s&&(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(l){l&&Object.keys(l).forEach(function(s){return e[s]=l[s]})},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)},sg=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,l=o.length;a<l;a++,i++)r[i]=o[a];return r},bP=300;function yP(e,t){var n={config:Et(Et({},ei),dt.defaultConfig),l10n:no};n.parseDate=Fc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=g,n._setHoursFromDate=h,n._positionCalendar=Ce,n.changeMonth=R,n.changeYear=ae,n.clear=L,n.close=F,n.onMouseOver=Se,n._createElement=Re,n.createDay=T,n.destroy=U,n.isEnabled=J,n.jumpToDate=w,n.updateValue=un,n.open=wt,n.redraw=Pe,n.set=jt,n.setDate=qt,n.toggle=ku;function r(){n.utils={getDaysInMonth:function(_,M){return _===void 0&&(_=n.currentMonth),M===void 0&&(M=n.currentYear),_===1&&(M%4===0&&M%100!==0||M%400===0)?29:n.l10n.daysInMonth[_]}}}function i(){n.element=n.input=e,n.isOpen=!1,kt(),he(),wn(),Ts(),r(),n.isMobile||b(),S(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&h(n.config.noCalendar?n.latestSelectedDateObj:void 0),un(!1)),l();var _=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&_&&Ce(),ze("onReady")}function o(){var _;return((_=n.calendarContainer)===null||_===void 0?void 0:_.getRootNode()).activeElement||document.activeElement}function a(_){return _.bind(n)}function l(){var _=n.config;_.weekNumbers===!1&&_.showMonths===1||_.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 M=(n.days.offsetWidth+1)*_.showMonths;n.daysContainer.style.width=M+"px",n.calendarContainer.style.width=M+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}})}function s(_){if(n.selectedDates.length===0){var M=n.config.minDate===void 0||Kt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),K=jc(n.config);M.setHours(K.hours,K.minutes,K.seconds,M.getMilliseconds()),n.selectedDates=[M],n.latestSelectedDateObj=M}_!==void 0&&_.type!=="blur"&&xt(_);var Q=n._input.value;f(),un(),n._input.value!==Q&&n._debouncedChange()}function c(_,M){return _%12+12*rn(M===n.l10n.amPM[1])}function d(_){switch(_%24){case 0:case 12:return 12;default:return _%12}}function f(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var _=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,M=(parseInt(n.minuteElement.value,10)||0)%60,K=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(_=c(_,n.amPM.textContent));var Q=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&Kt(n.latestSelectedDateObj,n.config.minDate,!0)===0,re=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=zc(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),xe=zc(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),ue=zc(_,M,K);if(ue>xe&&ue<ce){var we=mP(ce);_=we[0],M=we[1],K=we[2]}}else{if(re){var fe=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;_=Math.min(_,fe.getHours()),_===fe.getHours()&&(M=Math.min(M,fe.getMinutes())),M===fe.getMinutes()&&(K=Math.min(K,fe.getSeconds()))}if(Q){var me=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;_=Math.max(_,me.getHours()),_===me.getHours()&&M<me.getMinutes()&&(M=me.getMinutes()),M===me.getMinutes()&&(K=Math.max(K,me.getSeconds()))}}p(_,M,K)}}function h(_){var M=_||n.latestSelectedDateObj;M&&M instanceof Date&&p(M.getHours(),M.getMinutes(),M.getSeconds())}function p(_,M,K){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(_%24,M,K||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=zt(n.config.time_24hr?_:(12+_)%12+12*rn(_%12===0)),n.minuteElement.value=zt(M),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[rn(_>=12)]),n.secondElement!==void 0&&(n.secondElement.value=zt(K)))}function m(_){var M=Yt(_),K=parseInt(M.value)+(_.delta||0);(K/1e3>1||_.key==="Enter"&&!/[^\d]/.test(K.toString()))&&ae(K)}function g(_,M,K,Q){if(M instanceof Array)return M.forEach(function(re){return g(_,re,K,Q)});if(_ instanceof Array)return _.forEach(function(re){return g(re,M,K,Q)});_.addEventListener(M,K,Q),n._handlers.push({remove:function(){return _.removeEventListener(M,K,Q)}})}function v(){ze("onChange")}function S(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(K){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+K+"]"),function(Q){return g(Q,"click",n[K])})}),n.isMobile){_u();return}var _=ig(Ue,50);if(n._debouncedChange=ig(v,bP),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",ge),n.calendarContainer!==void 0&&g(n.calendarContainer,"keydown",ge),!n.config.inline&&!n.config.static&&g(window,"resize",_),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",_s),g(n.monthNav,["keyup","increment"],m),g(n.daysContainer,"click",It)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var M=function(K){return Yt(K).select()};g(n.timeContainer,["increment"],s),g(n.timeContainer,"blur",s,{capture:!0}),g(n.timeContainer,"click",y),g([n.hourElement,n.minuteElement],["focus","click"],M),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){s(K)})}n.config.allowInput&&g(n._input,"blur",ne)}function w(_,M){var K=_!==void 0?n.parseDate(_):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),Q=n.currentYear,re=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)}M&&n.currentYear!==Q&&(ze("onYearChange"),W()),M&&(n.currentYear!==Q||n.currentMonth!==re)&&ze("onMonthChange"),n.redraw()}function y(_){var M=Yt(_);~M.className.indexOf("arrow")&&C(_,M.classList.contains("arrowUp")?1:-1)}function C(_,M,K){var Q=_&&Yt(_),re=K||Q&&Q.parentNode&&Q.parentNode.firstChild,ce=pi("increment");ce.delta=M,re&&re.dispatchEvent(ce)}function b(){var _=window.document.createDocumentFragment();if(n.calendarContainer=Re("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(_.appendChild($()),n.innerContainer=Re("div","flatpickr-innerContainer"),n.config.weekNumbers){var M=ee(),K=M.weekWrapper,Q=M.weekNumbers;n.innerContainer.appendChild(K),n.weekNumbers=Q,n.weekWrapper=K}n.rContainer=Re("div","flatpickr-rContainer"),n.rContainer.appendChild(H()),n.daysContainer||(n.daysContainer=Re("div","flatpickr-days"),n.daysContainer.tabIndex=-1),A(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),_.appendChild(n.innerContainer)}n.config.enableTime&&_.appendChild(B()),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(_);var re=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&&(!re&&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=Re("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 T(_,M,K,Q){var re=J(M,!0),ce=Re("span",_,M.getDate().toString());return ce.dateObj=M,ce.$i=Q,ce.setAttribute("aria-label",n.formatDate(M,n.config.ariaDateFormat)),_.indexOf("hidden")===-1&&Kt(M,n.now)===0&&(n.todayDateElem=ce,ce.classList.add("today"),ce.setAttribute("aria-current","date")),re?(ce.tabIndex=-1,Io(M)&&(ce.classList.add("selected"),n.selectedDateElem=ce,n.config.mode==="range"&&(Ot(ce,"startRange",n.selectedDates[0]&&Kt(M,n.selectedDates[0],!0)===0),Ot(ce,"endRange",n.selectedDates[1]&&Kt(M,n.selectedDates[1],!0)===0),_==="nextMonthDay"&&ce.classList.add("inRange")))):ce.classList.add("flatpickr-disabled"),n.config.mode==="range"&&Es(M)&&!Io(M)&&ce.classList.add("inRange"),n.weekNumbers&&n.config.showMonths===1&&_!=="prevMonthDay"&&Q%7===6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(M)+"</span>"),ze("onDayCreate",ce),ce}function E(_){_.focus(),n.config.mode==="range"&&Se(_)}function P(_){for(var M=_>0?0:n.config.showMonths-1,K=_>0?n.config.showMonths:-1,Q=M;Q!=K;Q+=_)for(var re=n.daysContainer.children[Q],ce=_>0?0:re.children.length-1,xe=_>0?re.children.length:-1,ue=ce;ue!=xe;ue+=_){var we=re.children[ue];if(we.className.indexOf("hidden")===-1&&J(we.dateObj))return we}}function O(_,M){for(var K=_.className.indexOf("Month")===-1?_.dateObj.getMonth():n.currentMonth,Q=M>0?n.config.showMonths:-1,re=M>0?1:-1,ce=K-n.currentMonth;ce!=Q;ce+=re)for(var xe=n.daysContainer.children[ce],ue=K-n.currentMonth===ce?_.$i+M:M<0?xe.children.length-1:0,we=xe.children.length,fe=ue;fe>=0&&fe<we&&fe!=(M>0?we:-1);fe+=re){var me=xe.children[fe];if(me.className.indexOf("hidden")===-1&&J(me.dateObj)&&Math.abs(_.$i-fe)>=Math.abs(M))return E(me)}n.changeMonth(re),G(P(re),0)}function G(_,M){var K=o(),Q=le(K||document.body),re=_!==void 0?_:Q?K:n.selectedDateElem!==void 0&&le(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&le(n.todayDateElem)?n.todayDateElem:P(M>0?1:-1);re===void 0?n._input.focus():Q?O(re,M):E(re)}function z(_,M){for(var K=(new Date(_,M,1).getDay()-n.l10n.firstDayOfWeek+7)%7,Q=n.utils.getDaysInMonth((M-1+12)%12,_),re=n.utils.getDaysInMonth(M,_),ce=window.document.createDocumentFragment(),xe=n.config.showMonths>1,ue=xe?"prevMonthDay hidden":"prevMonthDay",we=xe?"nextMonthDay hidden":"nextMonthDay",fe=Q+1-K,me=0;fe<=Q;fe++,me++)ce.appendChild(T("flatpickr-day "+ue,new Date(_,M-1,fe),fe,me));for(fe=1;fe<=re;fe++,me++)ce.appendChild(T("flatpickr-day",new Date(_,M,fe),fe,me));for(var De=re+1;De<=42-K&&(n.config.showMonths===1||me%7!==0);De++,me++)ce.appendChild(T("flatpickr-day "+we,new Date(_,M+1,De%re),De,me));var Pt=Re("div","dayContainer");return Pt.appendChild(ce),Pt}function A(){if(n.daysContainer!==void 0){Xa(n.daysContainer),n.weekNumbers&&Xa(n.weekNumbers);for(var _=document.createDocumentFragment(),M=0;M<n.config.showMonths;M++){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+M),_.appendChild(z(K.getFullYear(),K.getMonth()))}n.daysContainer.appendChild(_),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&Se()}}function W(){if(!(n.config.showMonths>1||n.config.monthSelectorType!=="dropdown")){var _=function(Q){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&Q<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&Q>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var M=0;M<12;M++)if(_(M)){var K=Re("option","flatpickr-monthDropdown-month");K.value=new Date(n.currentYear,M).getMonth().toString(),K.textContent=es(M,n.config.shorthandCurrentMonth,n.l10n),K.tabIndex=-1,n.currentMonth===M&&(K.selected=!0),n.monthsDropdownContainer.appendChild(K)}}}function Y(){var _=Re("div","flatpickr-month"),M=window.document.createDocumentFragment(),K;n.config.showMonths>1||n.config.monthSelectorType==="static"?K=Re("span","cur-month"):(n.monthsDropdownContainer=Re("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),g(n.monthsDropdownContainer,"change",function(xe){var ue=Yt(xe),we=parseInt(ue.value,10);n.changeMonth(we-n.currentMonth),ze("onMonthChange")}),W(),K=n.monthsDropdownContainer);var Q=Za("cur-year",{tabindex:"-1"}),re=Q.getElementsByTagName("input")[0];re.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&re.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(re.setAttribute("max",n.config.maxDate.getFullYear().toString()),re.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var ce=Re("div","flatpickr-current-month");return ce.appendChild(K),ce.appendChild(Q),M.appendChild(ce),_.appendChild(M),{container:_,yearElement:re,monthElement:K}}function N(){Xa(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var _=n.config.showMonths;_--;){var M=Y();n.yearElements.push(M.yearElement),n.monthElements.push(M.monthElement),n.monthNav.appendChild(M.container)}n.monthNav.appendChild(n.nextMonthNav)}function $(){return n.monthNav=Re("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=Re("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=Re("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,N(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(_){n.__hidePrevMonthArrow!==_&&(Ot(n.prevMonthNav,"flatpickr-disabled",_),n.__hidePrevMonthArrow=_)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(_){n.__hideNextMonthArrow!==_&&(Ot(n.nextMonthNav,"flatpickr-disabled",_),n.__hideNextMonthArrow=_)}}),n.currentYearElement=n.yearElements[0],gi(),n.monthNav}function B(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var _=jc(n.config);n.timeContainer=Re("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var M=Re("span","flatpickr-time-separator",":"),K=Za("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=K.getElementsByTagName("input")[0];var Q=Za("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=Q.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?_.hours:d(_.hours)),n.minuteElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():_.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(M),n.timeContainer.appendChild(Q),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var re=Za("flatpickr-second");n.secondElement=re.getElementsByTagName("input")[0],n.secondElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():_.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(Re("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(re)}return n.config.time_24hr||(n.amPM=Re("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?Xa(n.weekdayContainer):n.weekdayContainer=Re("div","flatpickr-weekdays");for(var _=n.config.showMonths;_--;){var M=Re("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(M)}return q(),n.weekdayContainer}function q(){if(n.weekdayContainer){var _=n.l10n.firstDayOfWeek,M=sg(n.l10n.weekdays.shorthand);_>0&&_<M.length&&(M=sg(M.splice(_,M.length),M.splice(0,_)));for(var K=n.config.showMonths;K--;)n.weekdayContainer.children[K].innerHTML=`
|
|
2454
2454
|
<span class='flatpickr-weekday'>
|
|
2455
2455
|
`+M.join("</span><span class='flatpickr-weekday'>")+`
|
|
2456
2456
|
</span>
|
|
2457
|
-
`}}function ee(){n.calendarContainer.classList.add("hasWeeks");var _=Re("div","flatpickr-weekwrapper");_.appendChild(Re("span","flatpickr-weekday",n.l10n.weekAbbreviation));var M=Re("div","flatpickr-weeks");return _.appendChild(M),{weekWrapper:_,weekNumbers:M}}function R(_,M){M===void 0&&(M=!0);var K=M?_:_-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,ze("onYearChange"),W()),A(),ze("onMonthChange"),gi())}function L(_,M){if(_===void 0&&(_=!0),M===void 0&&(M=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,M===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var K=jc(n.config),Q=K.hours,re=K.minutes,ce=K.seconds;p(Q,re,ce)}n.redraw(),_&&ze("onChange")}function F(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),ze("onClose")}function V(){n.config!==void 0&&ze("onDestroy");for(var _=n._handlers.length;_--;)n._handlers[_].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 M=n.calendarContainer.parentNode;if(M.lastChild&&M.removeChild(M.lastChild),M.parentNode){for(;M.firstChild;)M.parentNode.insertBefore(M.firstChild,M);M.parentNode.removeChild(M)}}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(Q){}})}function te(_){return n.calendarContainer.contains(_)}function se(_){if(n.isOpen&&!n.config.inline){var M=Yt(_),K=te(M),Q=M===n.input||M===n.altInput||n.element.contains(M)||_.path&&_.path.indexOf&&(~_.path.indexOf(n.input)||~_.path.indexOf(n.altInput)),re=!Q&&!K&&!te(_.relatedTarget),ce=!n.config.ignoredFocusElements.some(function(xe){return xe.contains(M)});re&&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&&s(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function ae(_){if(!(!_||n.config.minDate&&_<n.config.minDate.getFullYear()||n.config.maxDate&&_>n.config.maxDate.getFullYear())){var M=_,K=n.currentYear!==M;n.currentYear=M||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(),ze("onYearChange"),W())}}function J(_,M){var K;M===void 0&&(M=!0);var Q=n.parseDate(_,void 0,M);if(n.config.minDate&&Q&&Kt(Q,n.config.minDate,M!==void 0?M:!n.minDateHasTime)<0||n.config.maxDate&&Q&&Kt(Q,n.config.maxDate,M!==void 0?M:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(Q===void 0)return!1;for(var re=!!n.config.enable,ce=(K=n.config.enable)!==null&&K!==void 0?K:n.config.disable,xe=0,ue=void 0;xe<ce.length;xe++){if(ue=ce[xe],typeof ue=="function"&&ue(Q))return re;if(ue instanceof Date&&Q!==void 0&&ue.getTime()===Q.getTime())return re;if(typeof ue=="string"){var we=n.parseDate(ue,void 0,!0);return we&&we.getTime()===Q.getTime()?re:!re}else if(typeof ue=="object"&&Q!==void 0&&ue.from&&ue.to&&Q.getTime()>=ue.from.getTime()&&Q.getTime()<=ue.to.getTime())return re}return!re}function le(_){return n.daysContainer!==void 0?_.className.indexOf("hidden")===-1&&_.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(_):!1}function ne(_){var M=_.target===n._input,K=n._input.value.trimEnd()!==So();M&&K&&!(_.relatedTarget&&te(_.relatedTarget))&&n.setDate(n._input.value,!0,_.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function ge(_){var M=Yt(_),K=n.config.wrap?e.contains(M):M===n._input,Q=n.config.allowInput,re=n.isOpen&&(!Q||!K),ce=n.config.inline&&K&&!Q;if(_.keyCode===13&&K){if(Q)return n.setDate(n._input.value,!0,M===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),M.blur();n.open()}else if(te(M)||re||ce){var xe=!!n.timeContainer&&n.timeContainer.contains(M);switch(_.keyCode){case 13:xe?(_.preventDefault(),s(),Ee()):It(_);break;case 27:_.preventDefault(),Ee();break;case 8:case 46:K&&!n.config.allowInput&&(_.preventDefault(),n.clear());break;case 37:case 39:if(!xe&&!K){_.preventDefault();var ue=o();if(n.daysContainer!==void 0&&(Q===!1||ue&&le(ue))){var we=_.keyCode===39?1:-1;_.ctrlKey?(_.stopPropagation(),R(we),G(P(1),0)):G(void 0,we)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:_.preventDefault();var fe=_.keyCode===40?1:-1;n.daysContainer&&M.$i!==void 0||M===n.input||M===n.altInput?_.ctrlKey?(_.stopPropagation(),ae(n.currentYear-fe),G(P(1),0)):xe||G(void 0,fe*7):M===n.currentYearElement?ae(n.currentYear-fe):n.config.enableTime&&(!xe&&n.hourElement&&n.hourElement.focus(),s(_),n._debouncedChange());break;case 9:if(xe){var me=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(nt){return nt}),De=me.indexOf(M);if(De!==-1){var Pt=me[De+(_.shiftKey?-1:1)];_.preventDefault(),(Pt||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(M)&&_.shiftKey&&(_.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&M===n.amPM)switch(_.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||te(M))&&ze("onKeyDown",_)}function Se(_,M){if(M===void 0&&(M="flatpickr-day"),!(n.selectedDates.length!==1||_&&(!_.classList.contains(M)||_.classList.contains("flatpickr-disabled")))){for(var K=_?_.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),Q=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),re=Math.min(K,n.selectedDates[0].getTime()),ce=Math.max(K,n.selectedDates[0].getTime()),xe=!1,ue=0,we=0,fe=re;fe<ce;fe+=vP.DAY)J(new Date(fe),!0)||(xe=xe||fe>re&&fe<ce,fe<Q&&(!ue||fe>ue)?ue=fe:fe>Q&&(!we||fe<we)&&(we=fe));var me=Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+M));me.forEach(function(De){var Pt=De.dateObj,nt=Pt.getTime(),dn=ue>0&&nt<ue||we>0&&nt>we;if(dn){De.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(In){De.classList.remove(In)});return}else if(xe&&!dn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(In){De.classList.remove(In)}),_!==void 0&&(_.classList.add(K<=n.selectedDates[0].getTime()?"startRange":"endRange"),Q<K&&nt===Q?De.classList.add("startRange"):Q>K&&nt===Q&&De.classList.add("endRange"),nt>=ue&&(we===0||nt<=we)&&gP(nt,Q,K)&&De.classList.add("inRange"))})}}function Ue(){n.isOpen&&!n.config.static&&!n.config.inline&&Ce()}function wt(_,M){if(M===void 0&&(M=n._positionElement),n.isMobile===!0){if(_){_.preventDefault();var K=Yt(_);K&&K.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),ze("onOpen");return}else if(n._input.disabled||n.config.inline)return;var Q=n.isOpen;n.isOpen=!0,Q||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),ze("onOpen"),Ce(M)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(_===void 0||!n.timeContainer.contains(_.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}function at(_){return function(M){var K=n.config["_"+_+"Date"]=n.parseDate(M,n.config.dateFormat),Q=n.config["_"+(_==="min"?"max":"min")+"Date"];K!==void 0&&(n[_==="min"?"minDateHasTime":"maxDateHasTime"]=K.getHours()>0||K.getMinutes()>0||K.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(re){return J(re)}),!n.selectedDates.length&&_==="min"&&h(K),un()),n.daysContainer&&(Pe(),K!==void 0?n.currentYearElement[_]=K.getFullYear().toString():n.currentYearElement.removeAttribute(_),n.currentYearElement.disabled=!!Q&&K!==void 0&&Q.getFullYear()===K.getFullYear())}}function kt(){var _=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],M=Et(Et({},JSON.parse(JSON.stringify(e.dataset||{}))),t),K={};n.config.parseDate=M.parseDate,n.config.formatDate=M.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(me){n.config._enable=or(me)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(me){n.config._disable=or(me)}});var Q=M.mode==="time";if(!M.dateFormat&&(M.enableTime||Q)){var re=dt.defaultConfig.dateFormat||ei.dateFormat;K.dateFormat=M.noCalendar||Q?"H:i"+(M.enableSeconds?":S":""):re+" H:i"+(M.enableSeconds?":S":"")}if(M.altInput&&(M.enableTime||Q)&&!M.altFormat){var ce=dt.defaultConfig.altFormat||ei.altFormat;K.altFormat=M.noCalendar||Q?"h:i"+(M.enableSeconds?":S K":" K"):ce+(" h:i"+(M.enableSeconds?":S":"")+" K")}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:at("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:at("max")});var xe=function(me){return function(De){n.config[me==="min"?"_minTime":"_maxTime"]=n.parseDate(De,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:xe("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:xe("max")}),M.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,K,M);for(var ue=0;ue<_.length;ue++)n.config[_[ue]]=n.config[_[ue]]===!0||n.config[_[ue]]==="true";Bc.filter(function(me){return n.config[me]!==void 0}).forEach(function(me){n.config[me]=$c(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)Bc.indexOf(fe)>-1?n.config[fe]=$c(we[fe]).map(a).concat(n.config[fe]):typeof M[fe]=="undefined"&&(n.config[fe]=we[fe])}M.altInputClass||(n.config.altInputClass=de().className+" "+n.config.altInputClass),ze("onParseConfig")}function de(){return n.config.wrap?e.querySelector("[data-input]"):e}function he(){typeof n.config.locale!="object"&&typeof dt.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Et(Et({},dt.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?dt.l10ns[n.config.locale]:void 0),xr.D="("+n.l10n.weekdays.shorthand.join("|")+")",xr.l="("+n.l10n.weekdays.longhand.join("|")+")",xr.M="("+n.l10n.months.shorthand.join("|")+")",xr.F="("+n.l10n.months.longhand.join("|")+")",xr.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")";var _=Et(Et({},t),JSON.parse(JSON.stringify(e.dataset||{})));_.time_24hr===void 0&&dt.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=ag(n),n.parseDate=Fc({config:n.config,l10n:n.l10n})}function Ce(_){if(typeof n.config.position=="function")return void n.config.position(n,_);if(n.calendarContainer!==void 0){ze("onPreCalendarPosition");var M=_||n._positionElement,K=Array.prototype.reduce.call(n.calendarContainer.children,function(gF,mF){return gF+mF.offsetHeight},0),Q=n.calendarContainer.offsetWidth,re=n.config.position.split(" "),ce=re[0],xe=re.length>1?re[1]:null,ue=M.getBoundingClientRect(),we=window.innerHeight-ue.bottom,fe=ce==="above"||ce!=="below"&&we<K&&ue.top>K,me=window.pageYOffset+ue.top+(fe?-K-2:M.offsetHeight+2);if(Ot(n.calendarContainer,"arrowTop",!fe),Ot(n.calendarContainer,"arrowBottom",fe),!n.config.inline){var De=window.pageXOffset+ue.left,Pt=!1,nt=!1;xe==="center"?(De-=(Q-ue.width)/2,Pt=!0):xe==="right"&&(De-=Q-ue.width,nt=!0),Ot(n.calendarContainer,"arrowLeft",!Pt&&!nt),Ot(n.calendarContainer,"arrowCenter",Pt),Ot(n.calendarContainer,"arrowRight",nt);var dn=window.document.body.offsetWidth-(window.pageXOffset+ue.right),In=De+Q>window.document.body.offsetWidth,lF=dn+Q>window.document.body.offsetWidth;if(Ot(n.calendarContainer,"rightMost",In),!n.config.static)if(n.calendarContainer.style.top=me+"px",!In)n.calendarContainer.style.left=De+"px",n.calendarContainer.style.right="auto";else if(!lF)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=dn+"px";else{var Pu=Te();if(Pu===void 0)return;var cF=window.document.body.offsetWidth,uF=Math.max(0,cF/2-Q/2),dF=".flatpickr-calendar.centerMost:before",fF=".flatpickr-calendar.centerMost:after",hF=Pu.cssRules.length,pF="{left:"+ue.left+"px;right:auto;}";Ot(n.calendarContainer,"rightMost",!1),Ot(n.calendarContainer,"centerMost",!0),Pu.insertRule(dF+","+fF+pF,hF),n.calendarContainer.style.left=uF+"px",n.calendarContainer.style.right="auto"}}}}function Te(){for(var _=null,M=0;M<document.styleSheets.length;M++){var K=document.styleSheets[M];if(K.cssRules){try{K.cssRules}catch(Q){continue}_=K;break}}return _!=null?_:He()}function He(){var _=document.createElement("style");return document.head.appendChild(_),_.sheet}function Pe(){n.config.noCalendar||n.isMobile||(W(),gi(),A())}function Ee(){n._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function It(_){_.preventDefault(),_.stopPropagation();var M=function(me){return me.classList&&me.classList.contains("flatpickr-day")&&!me.classList.contains("flatpickr-disabled")&&!me.classList.contains("notAllowed")},K=og(Yt(_),M);if(K!==void 0){var Q=K,re=n.latestSelectedDateObj=new Date(Q.dateObj.getTime()),ce=(re.getMonth()<n.currentMonth||re.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!=="range";if(n.selectedDateElem=Q,n.config.mode==="single")n.selectedDates=[re];else if(n.config.mode==="multiple"){var xe=Io(re);xe?n.selectedDates.splice(parseInt(xe),1):n.selectedDates.push(re)}else n.config.mode==="range"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=re,n.selectedDates.push(re),Kt(re,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(me,De){return me.getTime()-De.getTime()}));if(f(),ce){var ue=n.currentYear!==re.getFullYear();n.currentYear=re.getFullYear(),n.currentMonth=re.getMonth(),ue&&(ze("onYearChange"),W()),ze("onMonthChange")}if(gi(),A(),un(),!ce&&n.config.mode!=="range"&&n.config.showMonths===1?E(Q):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()}v()}}var St={locale:[he,q],showMonths:[N,l,H],minDate:[w],maxDate:[w],positionElement:[wo],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(_,M){if(_!==null&&typeof _=="object"){Object.assign(n.config,_);for(var K in _)St[K]!==void 0&&St[K].forEach(function(Q){return Q()})}else n.config[_]=M,St[_]!==void 0?St[_].forEach(function(Q){return Q()}):Bc.indexOf(_)>-1&&(n.config[_]=$c(M));n.redraw(),un(!0)}function Mt(_,M){var K=[];if(_ instanceof Array)K=_.map(function(Q){return n.parseDate(Q,M)});else if(_ instanceof Date||typeof _=="number")K=[n.parseDate(_,M)];else if(typeof _=="string")switch(n.config.mode){case"single":case"time":K=[n.parseDate(_,M)];break;case"multiple":K=_.split(n.config.conjunction).map(function(Q){return n.parseDate(Q,M)});break;case"range":K=_.split(n.l10n.rangeSeparator).map(function(Q){return n.parseDate(Q,M)});break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(_)));n.selectedDates=n.config.allowInvalidPreload?K:K.filter(function(Q){return Q instanceof Date&&J(Q,!1)}),n.config.mode==="range"&&n.selectedDates.sort(function(Q,re){return Q.getTime()-re.getTime()})}function qt(_,M,K){if(M===void 0&&(M=!1),K===void 0&&(K=n.config.dateFormat),_!==0&&!_||_ instanceof Array&&_.length===0)return n.clear(M);Mt(_,K),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),w(void 0,M),h(),n.selectedDates.length===0&&n.clear(!1),un(M),M&&ze("onChange")}function or(_){return _.slice().map(function(M){return typeof M=="string"||typeof M=="number"||M instanceof Date?n.parseDate(M,void 0,!0):M&&typeof M=="object"&&M.from&&M.to?{from:n.parseDate(M.from,void 0),to:n.parseDate(M.to,void 0)}:M}).filter(function(M){return M})}function Ts(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var _=n.config.defaultDate||((n.input.nodeName==="INPUT"||n.input.nodeName==="TEXTAREA")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);_&&Mt(_,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 wn(){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=Re(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"),wo()}function wo(){n._positionElement=n.config.positionElement||n._input}function _u(){var _=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=Re("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=_,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=_==="datetime-local"?"Y-m-d\\TH:i:S":_==="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(M){}g(n.mobileInput,"change",function(M){n.setDate(Yt(M).value,!1,n.mobileFormatStr),ze("onChange"),ze("onClose")})}function ku(_){if(n.isOpen===!0)return n.close();n.open(_)}function ze(_,M){if(n.config!==void 0){var K=n.config[_];if(K!==void 0&&K.length>0)for(var Q=0;K[Q]&&Q<K.length;Q++)K[Q](n.selectedDates,n.input.value,n,M);_==="onChange"&&(n.input.dispatchEvent(pi("change")),n.input.dispatchEvent(pi("input")))}}function pi(_){var M=document.createEvent("Event");return M.initEvent(_,!0,!0),M}function Io(_){for(var M=0;M<n.selectedDates.length;M++){var K=n.selectedDates[M];if(K instanceof Date&&Kt(K,_)===0)return""+M}return!1}function Es(_){return n.config.mode!=="range"||n.selectedDates.length<2?!1:Kt(_,n.selectedDates[0])>=0&&Kt(_,n.selectedDates[1])<=0}function gi(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(_,M){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+M),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[M].textContent=es(K.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=K.getMonth().toString(),_.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 So(_){var M=_||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(K){return n.formatDate(K,M)}).filter(function(K,Q,re){return n.config.mode!=="range"||n.config.enableTime||re.indexOf(K)===Q}).join(n.config.mode!=="range"?n.config.conjunction:n.l10n.rangeSeparator)}function un(_){_===void 0&&(_=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=So(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=So(n.config.altFormat)),_!==!1&&ze("onValueUpdate")}function _s(_){var M=Yt(_),K=n.prevMonthNav.contains(M),Q=n.nextMonthNav.contains(M);K||Q?R(K?-1:1):n.yearElements.indexOf(M)>=0?M.select():M.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):M.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function xt(_){_.preventDefault();var M=_.type==="keydown",K=Yt(_),Q=K;n.amPM!==void 0&&K===n.amPM&&(n.amPM.textContent=n.l10n.amPM[rn(n.amPM.textContent===n.l10n.amPM[0])]);var re=parseFloat(Q.getAttribute("min")),ce=parseFloat(Q.getAttribute("max")),xe=parseFloat(Q.getAttribute("step")),ue=parseInt(Q.value,10),we=_.delta||(M?_.which===38?1:-1:0),fe=ue+xe*we;if(typeof Q.value!="undefined"&&Q.value.length===2){var me=Q===n.hourElement,De=Q===n.minuteElement;fe<re?(fe=ce+fe+rn(!me)+(rn(me)&&rn(!n.amPM)),De&&C(void 0,-1,n.hourElement)):fe>ce&&(fe=Q===n.hourElement?fe-ce-rn(!n.amPM):re,De&&C(void 0,1,n.hourElement)),n.amPM&&me&&(xe===1?fe+ue===23:Math.abs(fe-ue)>xe)&&(n.amPM.textContent=n.l10n.amPM[rn(n.amPM.textContent===n.l10n.amPM[0])]),Q.value=zt(fe)}}return i(),n}function ti(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=yP(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 ti(this,e)},HTMLElement.prototype.flatpickr=function(e){return ti([this],e)});var dt=function(e,t){return typeof e=="string"?ti(window.document.querySelectorAll(e),t):e instanceof Node?ti([e],t):ti(e,t)};dt.defaultConfig={},dt.l10ns={en:Et({},no),default:Et({},no)},dt.localize=function(e){dt.l10ns.default=Et(Et({},dt.l10ns.default),e)},dt.setDefaults=function(e){dt.defaultConfig=Et(Et({},dt.defaultConfig),e)},dt.parseDate=Fc({}),dt.formatDate=ag({}),dt.compareDates=Kt,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(e){return ti(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=dt);const CP=Ou(Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"})));(function(e){function t(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(F){return typeof F}:t=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},t(R)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(x),r=o(yI),i=o(CP);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 l(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 F={},V=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var te in R)if(Object.prototype.hasOwnProperty.call(R,te)){var se=V?Object.getOwnPropertyDescriptor(R,te):null;se&&(se.get||se.set)?Object.defineProperty(F,te,se):F[te]=R[te]}return F.default=R,L&&L.set(R,F),F}function s(R){return h(R)||f(R)||d(R)||c()}function c(){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 F=Object.prototype.toString.call(R).slice(8,-1);if(F==="Object"&&R.constructor&&(F=R.constructor.name),F==="Map"||F==="Set")return Array.from(R);if(F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))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 F=0,V=new Array(L);F<L;F++)V[F]=R[F];return V}function m(){return m=Object.assign||function(R){for(var L=1;L<arguments.length;L++){var F=arguments[L];for(var V in F)Object.prototype.hasOwnProperty.call(F,V)&&(R[V]=F[V])}return R},m.apply(this,arguments)}function g(R,L){if(R==null)return{};var F=v(R,L),V,te;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(R);for(te=0;te<se.length;te++)V=se[te],!(L.indexOf(V)>=0)&&Object.prototype.propertyIsEnumerable.call(R,V)&&(F[V]=R[V])}return F}function v(R,L){if(R==null)return{};var F={},V=Object.keys(R),te,se;for(se=0;se<V.length;se++)te=V[se],!(L.indexOf(te)>=0)&&(F[te]=R[te]);return F}function S(R,L){var F=Object.keys(R);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(R);L&&(V=V.filter(function(te){return Object.getOwnPropertyDescriptor(R,te).enumerable})),F.push.apply(F,V)}return F}function w(R){for(var L=1;L<arguments.length;L++){var F=arguments[L]!=null?arguments[L]:{};L%2?S(Object(F),!0).forEach(function(V){W(R,V,F[V])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(F)):S(Object(F)).forEach(function(V){Object.defineProperty(R,V,Object.getOwnPropertyDescriptor(F,V))})}return R}function y(R,L){if(!(R instanceof L))throw new TypeError("Cannot call a class as a function")}function C(R,L){for(var F=0;F<L.length;F++){var V=L[F];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(R,V.key,V)}}function b(R,L,F){return L&&C(R.prototype,L),R}function T(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(V,te){return V.__proto__=te,V},E(R,L)}function P(R){var L=z();return function(){var V=A(R),te;if(L){var se=A(this).constructor;te=Reflect.construct(V,arguments,se)}else te=V.apply(this,arguments);return O(this,te)}}function O(R,L){return L&&(t(L)==="object"||typeof L=="function")?L:G(R)}function G(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function z(){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 A(R){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(F){return F.__proto__||Object.getPrototypeOf(F)},A(R)}function W(R,L,F){return L in R?Object.defineProperty(R,L,{value:F,enumerable:!0,configurable:!0,writable:!0}):R[L]=F,R}var Y=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],N=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),$=["onCreate","onDestroy"],B=r.default.func,H=function(R){T(F,R);var L=P(F);function F(){var V;y(this,F);for(var te=arguments.length,se=new Array(te),ae=0;ae<te;ae++)se[ae]=arguments[ae];return V=L.call.apply(L,[this].concat(se)),W(G(V),"createFlatpickrInstance",function(){var J=w({onClose:function(){V.node.blur&&V.node.blur()}},V.props.options);J=q(J,V.props),V.flatpickr=(0,i.default)(V.node,J),V.props.hasOwnProperty("value")&&V.flatpickr.setDate(V.props.value,!1);var le=V.props.onCreate;le&&le(V.flatpickr)}),W(G(V),"destroyFlatpickrInstance",function(){var J=V.props.onDestroy;J&&J(V.flatpickr),V.flatpickr.destroy(),V.flatpickr=null}),W(G(V),"handleNodeChange",function(J){V.node=J,V.flatpickr&&(V.destroyFlatpickrInstance(),V.createFlatpickrInstance())}),V}return b(F,[{key:"componentDidUpdate",value:function(te){var se=this.props.options,ae=te.options;se=q(se,this.props),ae=q(ae,te);for(var J=Object.getOwnPropertyNames(se),le=J.length-1;le>=0;le--){var ne=J[le],ge=se[ne];ge!==ae[ne]&&(Y.indexOf(ne)!==-1&&!Array.isArray(ge)&&(ge=[ge]),this.flatpickr.set(ne,ge))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&te.value&&Array.isArray(te.value)&&this.props.value.every(function(Se,Ue){te[Ue]}))&&this.props.value!==te.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 te=this.props,se=te.options,ae=te.defaultValue,J=te.value,le=te.children,ne=te.render,ge=g(te,["options","defaultValue","value","children","render"]);return Y.forEach(function(Se){delete ge[Se]}),$.forEach(function(Se){delete ge[Se]}),ne?ne(w(w({},ge),{},{defaultValue:ae,value:J}),this.handleNodeChange):se.wrap?n.default.createElement("div",m({},ge,{ref:this.handleNodeChange}),le):n.default.createElement("input",m({},ge,{defaultValue:ae,ref:this.handleNodeChange}))}}]),F}(n.Component);W(H,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:N,onOpen:N,onClose:N,onMonthChange:N,onYearChange:N,onReady:N,onValueUpdate:N,onDayCreate:N,onCreate:B,onDestroy:B,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}),W(H,"defaultProps",{options:{}});function q(R,L){var F=w({},R);return Y.forEach(function(V){if(L.hasOwnProperty(V)){var te;F[V]&&!Array.isArray(F[V])?F[V]=[F[V]]:F[V]||(F[V]=[]);var se=Array.isArray(L[V])?L[V]:[L[V]];(te=F[V]).push.apply(te,s(se))}}),F}var ee=H;e.default=ee})(rg);const lg=fn(rg);var cg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",l="minute",s="hour",c="day",d="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|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,w={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(Y){var N=["th","st","nd","rd"],$=Y%100;return"["+Y+(N[($-20)%10]||N[$]||N[0])+"]"}},y=function(Y,N,$){var B=String(Y);return!B||B.length>=N?Y:""+Array(N+1-B.length).join($)+Y},C={s:y,z:function(Y){var N=-Y.utcOffset(),$=Math.abs(N),B=Math.floor($/60),H=$%60;return(N<=0?"+":"-")+y(B,2,"0")+":"+y(H,2,"0")},m:function Y(N,$){if(N.date()<$.date())return-Y($,N);var B=12*($.year()-N.year())+($.month()-N.month()),H=N.clone().add(B,f),q=$-H<0,ee=N.clone().add(B+(q?-1:1),f);return+(-(B+($-H)/(q?H-ee:ee-H))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:f,y:p,w:d,d:c,D:m,h:s,m:l,s:a,ms:o,Q:h}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},b="en",T={};T[b]=w;var E="$isDayjsObject",P=function(Y){return Y instanceof A||!(!Y||!Y[E])},O=function Y(N,$,B){var H;if(!N)return b;if(typeof N=="string"){var q=N.toLowerCase();T[q]&&(H=q),$&&(T[q]=$,H=q);var ee=N.split("-");if(!H&&ee.length>1)return Y(ee[0])}else{var R=N.name;T[R]=N,H=R}return!B&&H&&(b=H),H||!B&&b},G=function(Y,N){if(P(Y))return Y.clone();var $=typeof N=="object"?N:{};return $.date=Y,$.args=arguments,new A($)},z=C;z.l=O,z.i=P,z.w=function(Y,N){return G(Y,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var A=function(){function Y($){this.$L=O($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[E]=!0}var N=Y.prototype;return N.parse=function($){this.$d=function(B){var H=B.date,q=B.utc;if(H===null)return new Date(NaN);if(z.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var ee=H.match(v);if(ee){var R=ee[2]-1||0,L=(ee[7]||"0").substring(0,3);return q?new Date(Date.UTC(ee[1],R,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,L)):new Date(ee[1],R,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,L)}}return new Date(H)}($),this.init()},N.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()},N.$utils=function(){return z},N.isValid=function(){return this.$d.toString()!==g},N.isSame=function($,B){var H=G($);return this.startOf(B)<=H&&H<=this.endOf(B)},N.isAfter=function($,B){return G($)<this.startOf(B)},N.isBefore=function($,B){return this.endOf(B)<G($)},N.$g=function($,B,H){return z.u($)?this[B]:this.set(H,$)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function($,B){var H=this,q=!!z.u(B)||B,ee=z.p($),R=function(le,ne){var ge=z.w(H.$u?Date.UTC(H.$y,ne,le):new Date(H.$y,ne,le),H);return q?ge:ge.endOf(c)},L=function(le,ne){return z.w(H.toDate()[le].apply(H.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(ne)),H)},F=this.$W,V=this.$M,te=this.$D,se="set"+(this.$u?"UTC":"");switch(ee){case p:return q?R(1,0):R(31,11);case f:return q?R(1,V):R(0,V+1);case d:var ae=this.$locale().weekStart||0,J=(F<ae?F+7:F)-ae;return R(q?te-J:te+(6-J),V);case c:case m:return L(se+"Hours",0);case s:return L(se+"Minutes",1);case l:return L(se+"Seconds",2);case a:return L(se+"Milliseconds",3);default:return this.clone()}},N.endOf=function($){return this.startOf($,!1)},N.$set=function($,B){var H,q=z.p($),ee="set"+(this.$u?"UTC":""),R=(H={},H[c]=ee+"Date",H[m]=ee+"Date",H[f]=ee+"Month",H[p]=ee+"FullYear",H[s]=ee+"Hours",H[l]=ee+"Minutes",H[a]=ee+"Seconds",H[o]=ee+"Milliseconds",H)[q],L=q===c?this.$D+(B-this.$W):B;if(q===f||q===p){var F=this.clone().set(m,1);F.$d[R](L),F.init(),this.$d=F.set(m,Math.min(this.$D,F.daysInMonth())).$d}else R&&this.$d[R](L);return this.init(),this},N.set=function($,B){return this.clone().$set($,B)},N.get=function($){return this[z.p($)]()},N.add=function($,B){var H,q=this;$=Number($);var ee=z.p(B),R=function(V){var te=G(q);return z.w(te.date(te.date()+Math.round(V*$)),q)};if(ee===f)return this.set(f,this.$M+$);if(ee===p)return this.set(p,this.$y+$);if(ee===c)return R(1);if(ee===d)return R(7);var L=(H={},H[l]=r,H[s]=i,H[a]=n,H)[ee]||1,F=this.$d.getTime()+$*L;return z.w(F,this)},N.subtract=function($,B){return this.add(-1*$,B)},N.format=function($){var B=this,H=this.$locale();if(!this.isValid())return H.invalidDate||g;var q=$||"YYYY-MM-DDTHH:mm:ssZ",ee=z.z(this),R=this.$H,L=this.$m,F=this.$M,V=H.weekdays,te=H.months,se=H.meridiem,ae=function(ne,ge,Se,Ue){return ne&&(ne[ge]||ne(B,q))||Se[ge].slice(0,Ue)},J=function(ne){return z.s(R%12||12,ne,"0")},le=se||function(ne,ge,Se){var Ue=ne<12?"AM":"PM";return Se?Ue.toLowerCase():Ue};return q.replace(S,function(ne,ge){return ge||function(Se){switch(Se){case"YY":return String(B.$y).slice(-2);case"YYYY":return z.s(B.$y,4,"0");case"M":return F+1;case"MM":return z.s(F+1,2,"0");case"MMM":return ae(H.monthsShort,F,te,3);case"MMMM":return ae(te,F);case"D":return B.$D;case"DD":return z.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return ae(H.weekdaysMin,B.$W,V,2);case"ddd":return ae(H.weekdaysShort,B.$W,V,3);case"dddd":return V[B.$W];case"H":return String(R);case"HH":return z.s(R,2,"0");case"h":return J(1);case"hh":return J(2);case"a":return le(R,L,!0);case"A":return le(R,L,!1);case"m":return String(L);case"mm":return z.s(L,2,"0");case"s":return String(B.$s);case"ss":return z.s(B.$s,2,"0");case"SSS":return z.s(B.$ms,3,"0");case"Z":return ee}return null}(ne)||ee.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function($,B,H){var q,ee=this,R=z.p(B),L=G($),F=(L.utcOffset()-this.utcOffset())*r,V=this-L,te=function(){return z.m(ee,L)};switch(R){case p:q=te()/12;break;case f:q=te();break;case h:q=te()/3;break;case d:q=(V-F)/6048e5;break;case c:q=(V-F)/864e5;break;case s:q=V/i;break;case l:q=V/r;break;case a:q=V/n;break;default:q=V}return H?q:z.a(q)},N.daysInMonth=function(){return this.endOf(f).$D},N.$locale=function(){return T[this.$L]},N.locale=function($,B){if(!$)return this.$L;var H=this.clone(),q=O($,B,!0);return q&&(H.$L=q),H},N.clone=function(){return z.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},Y}(),W=A.prototype;return G.prototype=W,[["$ms",o],["$s",a],["$m",l],["$H",s],["$W",c],["$M",f],["$y",p],["$D",m]].forEach(function(Y){W[Y[1]]=function(N){return this.$g(N,Y[0],Y[1])}}),G.extend=function(Y,N){return Y.$i||(Y(N,A,G),Y.$i=!0),G},G.locale=O,G.isDayjs=P,G.unix=function(Y){return G(1e3*Y)},G.en=T[b],G.Ls=T,G.p={},G})})(cg);var xP=cg.exports;const _t=fn(xP);var ug={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 l,s=function(h,p,m){m===void 0&&(m={});var g=new Date(h),v=function(S,w){w===void 0&&(w={});var y=w.timeZoneName||"short",C=S+"|"+y,b=r[C];return b||(b=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:S,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:y}),r[C]=b),b}(p,m);return v.formatToParts(g)},c=function(h,p){for(var m=s(h,p),g=[],v=0;v<m.length;v+=1){var S=m[v],w=S.type,y=S.value,C=n[w];C>=0&&(g[C]=parseInt(y,10))}var b=g[3],T=b===24?0:b,E=g[0]+"-"+g[1]+"-"+g[2]+" "+T+":"+g[4]+":"+g[5]+":000",P=+h;return(a.utc(E).valueOf()-(P-=P%1e3))/6e4},d=o.prototype;d.tz=function(h,p){h===void 0&&(h=l);var m,g=this.utcOffset(),v=this.toDate(),S=v.toLocaleString("en-US",{timeZone:h}),w=Math.round((v-new Date(S))/1e3/60),y=15*-Math.round(v.getTimezoneOffset()/15)-w;if(!Number(y))m=this.utcOffset(0,p);else if(m=a(S,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(y,!0),p){var C=m.utcOffset();m=m.add(g-C,"minute")}return m.$x.$timezone=h,m},d.offsetName=function(h){var p=this.$x.$timezone||a.tz.guess(),m=s(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,v=m||p||l,S=c(+a(),v);if(typeof h!="string")return a(h).tz(v);var w=function(T,E,P){var O=T-60*E*1e3,G=c(O,P);if(E===G)return[O,E];var z=c(O-=60*(G-E)*1e3,P);return G===z?[O,G]:[T-60*Math.min(G,z)*1e3,Math.max(G,z)]}(a.utc(h,g).valueOf(),S,v),y=w[0],C=w[1],b=a(y).utcOffset(C);return b.$x.$timezone=v,b},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(h){l=h}}})})(ug);var wP=ug.exports;const IP=fn(wP);var dg={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,l){var s=a.prototype;l.utc=function(g){var v={date:g,utc:!0,args:arguments};return new a(v)},s.utc=function(g){var v=l(this.toDate(),{locale:this.$L,utc:!0});return g?v.add(this.utcOffset(),n):v},s.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var c=s.parse;s.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),c.call(this,g)};var d=s.init;s.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=s.utcOffset;s.utcOffset=function(g,v){var S=this.$utils().u;if(S(g))return this.$u?0:S(this.$offset)?f.call(this):this.$offset;if(typeof g=="string"&&(g=function(b){b===void 0&&(b="");var T=b.match(r);if(!T)return null;var E=(""+T[0]).match(i)||["-",0,0],P=E[0],O=60*+E[1]+ +E[2];return O===0?0:P==="+"?O:-O}(g),g===null))return this;var w=Math.abs(g)<=16?60*g:g,y=this;if(v)return y.$offset=w,y.$u=g===0,y;if(g!==0){var C=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(y=this.local().add(w+C,n)).$offset=w,y.$x.$localOffset=C}else y=this.utc();return y};var h=s.format;s.format=function(g){var v=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},s.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var p=s.toDate;s.toDate=function(g){return g==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var m=s.diff;s.diff=function(g,v,S){if(g&&this.$u===g.$u)return m.call(this,g,v,S);var w=this.local(),y=l(g).local();return m.call(w,y,v,S)}}})})(dg);var SP=dg.exports;const AP=fn(SP);_t.extend(IP),_t.extend(AP);const TP=e=>{if(!_t(e).isAfter(_t(Date.now()).subtract(15,"minute")))return _t(Date.now()).add(15,"minute").toDate()},Vc=({defaultDate:e,minDate:t,maxDate:n,dateFormat:r="DD.MM.YYYY HH:mm",onChange:i})=>{const o=a=>{if(a&&a.length){const l=_t.utc(a[0]).toISOString();i(l)}else i("")};return u.jsx(I.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:u.jsx(lg,{value:e&&_t(e).format("YYYY-MM-DD HH:mm")||void 0,onChange:o,className:"flatpickr-input",options:{enableTime:!0,dateFormat:r,position:"below",minDate:t||TP(e),maxDate:n,parseDate:(a,l)=>_t(a,l).toDate(),formatDate:(a,l)=>_t(a).format(l),time_24hr:!0,minuteIncrement:1}})})},EP=({required:e,defaultValue:t,onChangeFromDate:n,onChangeToDate:r})=>{const[i,o]=t;return u.jsxs(I.Box,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormControl,{children:u.jsx(I.FormLabel,{required:e,color:"primary",children:"Duration"})}),u.jsxs(I.Grid,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",children:[u.jsx(to,{label:"From date",defaultValue:i,required:e,onChange:n}),u.jsx(to,{label:"To date",defaultValue:o,required:e,onChange:r})]})]})},fg=e=>{if(!e)return[];const{from:t,to:n}=e,r=[];return t&&r.push(_t(t).toDate()),n&&r.push(_t(n).toDate()),r},_P=({label:e,defaultValue:t,required:n,onChange:r})=>{const[i,o]=x.useState(fg(t)),[a,l]=x.useState(!1),s=()=>l(!a),c=d=>{if(d&&d.length>0){const f="YYYY-MM-DD",h=_t(d[0]).format(f),p=_t(d[1]).format(f);r({from:h,to:p})}else d&&d.length===0&&(r({from:"",to:""}),s());o(d)};return u.jsxs(I.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{required:n,color:"primary",children:e}),u.jsx(I.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:u.jsx(lg,{value:i,onChange:c,placeholder:"Select Date...",className:"flatpickr-input",options:{mode:"range",enableTime:!1,dateFormat:"DD.MM.YYYY",altFormat:"DD.MM.YYYY",position:"below",parseDate:(d,f)=>_t(d,f).toDate(),formatDate:(d,f)=>_t(d).format(f),defaultDate:fg(t)||void 0}})}),u.jsx(ut,{showToast:a,message:"Succesfully cleared the duration time",color:"primary",hideToast:s})]})},kP=({environment:e,labels:t,setNoPermission:n})=>{const{featureDisabled:r,noPermissionMessage:i,tryAgainButton:o}=t,a=()=>{zi(e).signOut().then(()=>n(null)).catch(l=>{console.error("There was a problem logging out the user:",l)})};return u.jsx(I.Box,{"data-testid":"no permission card",sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",bgcolor:"background.body"},children:u.jsx(I.Card,{variant:"outlined",sx:{maxWidth:300,overflow:"hidden",borderRadius:"md"},children:u.jsxs(I.CardContent,{children:[u.jsx(I.Typography,{level:"h2",textAlign:"center",mb:2,children:r}),u.jsx(I.Typography,{level:"body-md",color:"neutral",mb:2,children:i}),u.jsx(I.Box,{display:"flex",justifyContent:"center",children:u.jsx(I.Button,{variant:"solid",color:"neutral",fullWidth:!0,size:"sm",onClick:a,children:o})})]})})})},hg=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],Uc=e=>e.reduce((t,n)=>(t[n.key]=n.value,t),{}),PP=({labels:e,type:t,defaultValue:n,onChange:r})=>{const[i,o]=x.useState(hg(n)),[a,l]=x.useState(null),[s,c]=x.useState(""),[d,f]=x.useState(""),[h,p]=x.useState(""),[m,g]=x.useState("");x.useEffect(()=>o(hg(n)),[n]);const v=()=>{const C=[...i];C.push({key:s,value:h}),o(C),c(""),p(""),r(Uc(C))},S=C=>{const b=i.filter((T,E)=>E!==C);o(b),r(Uc(b))},w=(C,b)=>{f(b.key),g(b.value),l(C)},y=C=>{const b=[...i];b[C]={key:d,value:m},o(b),l(null),f(""),g(""),r(Uc(b))};return u.jsxs(I.Box,{children:[i.map((C,b)=>u.jsx(I.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(I.CardContent,{style:{flex:1},children:a===b?u.jsxs(I.Box,{display:"flex",alignItems:"center",children:[u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:d,onChange:T=>f(T.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:m,onChange:T=>g(T.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Tooltip,{title:e.save,children:d&&m?u.jsx(I.IconButton,{onClick:()=>y(b),children:u.jsx(Le.Check,{})}):u.jsx("span",{children:u.jsx(I.IconButton,{disabled:!0,children:u.jsx(Le.Check,{})})})})]}):u.jsxs(I.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[u.jsxs(I.Box,{children:[u.jsxs(I.Typography,{style:{fontWeight:"bold"},children:[e.keyDynamicFields,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:C.key})]}),u.jsxs(I.Typography,{style:{color:"gray"},children:[e.valueDynamicFields,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:C.value})]})]}),u.jsxs(I.Box,{children:[u.jsx(I.Tooltip,{title:e.edit,children:u.jsx(I.IconButton,{onClick:()=>w(b,C),children:u.jsx(Le.Edit,{})})}),u.jsx(I.Tooltip,{title:e.delete,children:u.jsx(I.IconButton,{onClick:()=>S(b),children:u.jsx(Le.Delete,{})})})]})]})})},`dynamic-fields-${t}-${b}`)),u.jsxs(I.Box,{display:"flex",alignItems:"center",style:{marginTop:i&&i.length?"20px":"0px"},children:[u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",value:s,placeholder:e.keyDynamicFields,onChange:C=>c(C.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",value:h,onChange:C=>p(C.target.value),placeholder:e.valueDynamicFields,sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Tooltip,{title:e.add,children:s&&h?u.jsx(I.Button,{onClick:v,children:u.jsx(Le.Add,{})}):u.jsx("span",{children:u.jsx(I.Button,{disabled:!0,children:u.jsx(Le.Add,{})})})})]})]})};function io(e,t,n){return(t=Kl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pg(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?pg(Object(n),!0).forEach(function(r){io(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gg(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,Kl(r.key),r)}}function OP(e,t,n){return t&&gg(e.prototype,t),n&&gg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hc(e,t){return Hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Hc(e,t)}function RP(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&&Hc(e,t)}function ts(e){return ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ts(e)}function mg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(mg=function(){return!!e})()}function MP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LP(e,t){if(t&&(vr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MP(e)}function BP(e){var t=mg();return function(){var n,r=ts(e);if(t){var i=ts(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return LP(this,n)}}function Wc(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 $P(e){if(Array.isArray(e))return Wc(e)}function NP(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vg(e,t){if(e){if(typeof e=="string")return Wc(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)?Wc(e,t):void 0}}function FP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2457
|
+
`}}function ee(){n.calendarContainer.classList.add("hasWeeks");var _=Re("div","flatpickr-weekwrapper");_.appendChild(Re("span","flatpickr-weekday",n.l10n.weekAbbreviation));var M=Re("div","flatpickr-weeks");return _.appendChild(M),{weekWrapper:_,weekNumbers:M}}function R(_,M){M===void 0&&(M=!0);var K=M?_:_-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,ze("onYearChange"),W()),A(),ze("onMonthChange"),gi())}function L(_,M){if(_===void 0&&(_=!0),M===void 0&&(M=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,M===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var K=jc(n.config),Q=K.hours,re=K.minutes,ce=K.seconds;p(Q,re,ce)}n.redraw(),_&&ze("onChange")}function F(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),ze("onClose")}function U(){n.config!==void 0&&ze("onDestroy");for(var _=n._handlers.length;_--;)n._handlers[_].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 M=n.calendarContainer.parentNode;if(M.lastChild&&M.removeChild(M.lastChild),M.parentNode){for(;M.firstChild;)M.parentNode.insertBefore(M.firstChild,M);M.parentNode.removeChild(M)}}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(Q){}})}function te(_){return n.calendarContainer.contains(_)}function se(_){if(n.isOpen&&!n.config.inline){var M=Yt(_),K=te(M),Q=M===n.input||M===n.altInput||n.element.contains(M)||_.path&&_.path.indexOf&&(~_.path.indexOf(n.input)||~_.path.indexOf(n.altInput)),re=!Q&&!K&&!te(_.relatedTarget),ce=!n.config.ignoredFocusElements.some(function(xe){return xe.contains(M)});re&&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&&s(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function ae(_){if(!(!_||n.config.minDate&&_<n.config.minDate.getFullYear()||n.config.maxDate&&_>n.config.maxDate.getFullYear())){var M=_,K=n.currentYear!==M;n.currentYear=M||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(),ze("onYearChange"),W())}}function J(_,M){var K;M===void 0&&(M=!0);var Q=n.parseDate(_,void 0,M);if(n.config.minDate&&Q&&Kt(Q,n.config.minDate,M!==void 0?M:!n.minDateHasTime)<0||n.config.maxDate&&Q&&Kt(Q,n.config.maxDate,M!==void 0?M:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(Q===void 0)return!1;for(var re=!!n.config.enable,ce=(K=n.config.enable)!==null&&K!==void 0?K:n.config.disable,xe=0,ue=void 0;xe<ce.length;xe++){if(ue=ce[xe],typeof ue=="function"&&ue(Q))return re;if(ue instanceof Date&&Q!==void 0&&ue.getTime()===Q.getTime())return re;if(typeof ue=="string"){var we=n.parseDate(ue,void 0,!0);return we&&we.getTime()===Q.getTime()?re:!re}else if(typeof ue=="object"&&Q!==void 0&&ue.from&&ue.to&&Q.getTime()>=ue.from.getTime()&&Q.getTime()<=ue.to.getTime())return re}return!re}function le(_){return n.daysContainer!==void 0?_.className.indexOf("hidden")===-1&&_.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(_):!1}function ne(_){var M=_.target===n._input,K=n._input.value.trimEnd()!==So();M&&K&&!(_.relatedTarget&&te(_.relatedTarget))&&n.setDate(n._input.value,!0,_.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function ge(_){var M=Yt(_),K=n.config.wrap?e.contains(M):M===n._input,Q=n.config.allowInput,re=n.isOpen&&(!Q||!K),ce=n.config.inline&&K&&!Q;if(_.keyCode===13&&K){if(Q)return n.setDate(n._input.value,!0,M===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),M.blur();n.open()}else if(te(M)||re||ce){var xe=!!n.timeContainer&&n.timeContainer.contains(M);switch(_.keyCode){case 13:xe?(_.preventDefault(),s(),Ee()):It(_);break;case 27:_.preventDefault(),Ee();break;case 8:case 46:K&&!n.config.allowInput&&(_.preventDefault(),n.clear());break;case 37:case 39:if(!xe&&!K){_.preventDefault();var ue=o();if(n.daysContainer!==void 0&&(Q===!1||ue&&le(ue))){var we=_.keyCode===39?1:-1;_.ctrlKey?(_.stopPropagation(),R(we),G(P(1),0)):G(void 0,we)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:_.preventDefault();var fe=_.keyCode===40?1:-1;n.daysContainer&&M.$i!==void 0||M===n.input||M===n.altInput?_.ctrlKey?(_.stopPropagation(),ae(n.currentYear-fe),G(P(1),0)):xe||G(void 0,fe*7):M===n.currentYearElement?ae(n.currentYear-fe):n.config.enableTime&&(!xe&&n.hourElement&&n.hourElement.focus(),s(_),n._debouncedChange());break;case 9:if(xe){var me=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(nt){return nt}),De=me.indexOf(M);if(De!==-1){var Pt=me[De+(_.shiftKey?-1:1)];_.preventDefault(),(Pt||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(M)&&_.shiftKey&&(_.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&M===n.amPM)switch(_.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||te(M))&&ze("onKeyDown",_)}function Se(_,M){if(M===void 0&&(M="flatpickr-day"),!(n.selectedDates.length!==1||_&&(!_.classList.contains(M)||_.classList.contains("flatpickr-disabled")))){for(var K=_?_.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),Q=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),re=Math.min(K,n.selectedDates[0].getTime()),ce=Math.max(K,n.selectedDates[0].getTime()),xe=!1,ue=0,we=0,fe=re;fe<ce;fe+=vP.DAY)J(new Date(fe),!0)||(xe=xe||fe>re&&fe<ce,fe<Q&&(!ue||fe>ue)?ue=fe:fe>Q&&(!we||fe<we)&&(we=fe));var me=Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+M));me.forEach(function(De){var Pt=De.dateObj,nt=Pt.getTime(),dn=ue>0&&nt<ue||we>0&&nt>we;if(dn){De.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(In){De.classList.remove(In)});return}else if(xe&&!dn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(In){De.classList.remove(In)}),_!==void 0&&(_.classList.add(K<=n.selectedDates[0].getTime()?"startRange":"endRange"),Q<K&&nt===Q?De.classList.add("startRange"):Q>K&&nt===Q&&De.classList.add("endRange"),nt>=ue&&(we===0||nt<=we)&&gP(nt,Q,K)&&De.classList.add("inRange"))})}}function Ue(){n.isOpen&&!n.config.static&&!n.config.inline&&Ce()}function wt(_,M){if(M===void 0&&(M=n._positionElement),n.isMobile===!0){if(_){_.preventDefault();var K=Yt(_);K&&K.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),ze("onOpen");return}else if(n._input.disabled||n.config.inline)return;var Q=n.isOpen;n.isOpen=!0,Q||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),ze("onOpen"),Ce(M)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(_===void 0||!n.timeContainer.contains(_.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}function at(_){return function(M){var K=n.config["_"+_+"Date"]=n.parseDate(M,n.config.dateFormat),Q=n.config["_"+(_==="min"?"max":"min")+"Date"];K!==void 0&&(n[_==="min"?"minDateHasTime":"maxDateHasTime"]=K.getHours()>0||K.getMinutes()>0||K.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(re){return J(re)}),!n.selectedDates.length&&_==="min"&&h(K),un()),n.daysContainer&&(Pe(),K!==void 0?n.currentYearElement[_]=K.getFullYear().toString():n.currentYearElement.removeAttribute(_),n.currentYearElement.disabled=!!Q&&K!==void 0&&Q.getFullYear()===K.getFullYear())}}function kt(){var _=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],M=Et(Et({},JSON.parse(JSON.stringify(e.dataset||{}))),t),K={};n.config.parseDate=M.parseDate,n.config.formatDate=M.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(me){n.config._enable=or(me)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(me){n.config._disable=or(me)}});var Q=M.mode==="time";if(!M.dateFormat&&(M.enableTime||Q)){var re=dt.defaultConfig.dateFormat||ei.dateFormat;K.dateFormat=M.noCalendar||Q?"H:i"+(M.enableSeconds?":S":""):re+" H:i"+(M.enableSeconds?":S":"")}if(M.altInput&&(M.enableTime||Q)&&!M.altFormat){var ce=dt.defaultConfig.altFormat||ei.altFormat;K.altFormat=M.noCalendar||Q?"h:i"+(M.enableSeconds?":S K":" K"):ce+(" h:i"+(M.enableSeconds?":S":"")+" K")}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:at("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:at("max")});var xe=function(me){return function(De){n.config[me==="min"?"_minTime":"_maxTime"]=n.parseDate(De,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:xe("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:xe("max")}),M.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,K,M);for(var ue=0;ue<_.length;ue++)n.config[_[ue]]=n.config[_[ue]]===!0||n.config[_[ue]]==="true";Bc.filter(function(me){return n.config[me]!==void 0}).forEach(function(me){n.config[me]=$c(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)Bc.indexOf(fe)>-1?n.config[fe]=$c(we[fe]).map(a).concat(n.config[fe]):typeof M[fe]=="undefined"&&(n.config[fe]=we[fe])}M.altInputClass||(n.config.altInputClass=de().className+" "+n.config.altInputClass),ze("onParseConfig")}function de(){return n.config.wrap?e.querySelector("[data-input]"):e}function he(){typeof n.config.locale!="object"&&typeof dt.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Et(Et({},dt.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?dt.l10ns[n.config.locale]:void 0),xr.D="("+n.l10n.weekdays.shorthand.join("|")+")",xr.l="("+n.l10n.weekdays.longhand.join("|")+")",xr.M="("+n.l10n.months.shorthand.join("|")+")",xr.F="("+n.l10n.months.longhand.join("|")+")",xr.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")";var _=Et(Et({},t),JSON.parse(JSON.stringify(e.dataset||{})));_.time_24hr===void 0&&dt.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=ag(n),n.parseDate=Fc({config:n.config,l10n:n.l10n})}function Ce(_){if(typeof n.config.position=="function")return void n.config.position(n,_);if(n.calendarContainer!==void 0){ze("onPreCalendarPosition");var M=_||n._positionElement,K=Array.prototype.reduce.call(n.calendarContainer.children,function(gF,mF){return gF+mF.offsetHeight},0),Q=n.calendarContainer.offsetWidth,re=n.config.position.split(" "),ce=re[0],xe=re.length>1?re[1]:null,ue=M.getBoundingClientRect(),we=window.innerHeight-ue.bottom,fe=ce==="above"||ce!=="below"&&we<K&&ue.top>K,me=window.pageYOffset+ue.top+(fe?-K-2:M.offsetHeight+2);if(Ot(n.calendarContainer,"arrowTop",!fe),Ot(n.calendarContainer,"arrowBottom",fe),!n.config.inline){var De=window.pageXOffset+ue.left,Pt=!1,nt=!1;xe==="center"?(De-=(Q-ue.width)/2,Pt=!0):xe==="right"&&(De-=Q-ue.width,nt=!0),Ot(n.calendarContainer,"arrowLeft",!Pt&&!nt),Ot(n.calendarContainer,"arrowCenter",Pt),Ot(n.calendarContainer,"arrowRight",nt);var dn=window.document.body.offsetWidth-(window.pageXOffset+ue.right),In=De+Q>window.document.body.offsetWidth,lF=dn+Q>window.document.body.offsetWidth;if(Ot(n.calendarContainer,"rightMost",In),!n.config.static)if(n.calendarContainer.style.top=me+"px",!In)n.calendarContainer.style.left=De+"px",n.calendarContainer.style.right="auto";else if(!lF)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=dn+"px";else{var Pu=Te();if(Pu===void 0)return;var cF=window.document.body.offsetWidth,uF=Math.max(0,cF/2-Q/2),dF=".flatpickr-calendar.centerMost:before",fF=".flatpickr-calendar.centerMost:after",hF=Pu.cssRules.length,pF="{left:"+ue.left+"px;right:auto;}";Ot(n.calendarContainer,"rightMost",!1),Ot(n.calendarContainer,"centerMost",!0),Pu.insertRule(dF+","+fF+pF,hF),n.calendarContainer.style.left=uF+"px",n.calendarContainer.style.right="auto"}}}}function Te(){for(var _=null,M=0;M<document.styleSheets.length;M++){var K=document.styleSheets[M];if(K.cssRules){try{K.cssRules}catch(Q){continue}_=K;break}}return _!=null?_:He()}function He(){var _=document.createElement("style");return document.head.appendChild(_),_.sheet}function Pe(){n.config.noCalendar||n.isMobile||(W(),gi(),A())}function Ee(){n._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function It(_){_.preventDefault(),_.stopPropagation();var M=function(me){return me.classList&&me.classList.contains("flatpickr-day")&&!me.classList.contains("flatpickr-disabled")&&!me.classList.contains("notAllowed")},K=og(Yt(_),M);if(K!==void 0){var Q=K,re=n.latestSelectedDateObj=new Date(Q.dateObj.getTime()),ce=(re.getMonth()<n.currentMonth||re.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!=="range";if(n.selectedDateElem=Q,n.config.mode==="single")n.selectedDates=[re];else if(n.config.mode==="multiple"){var xe=Io(re);xe?n.selectedDates.splice(parseInt(xe),1):n.selectedDates.push(re)}else n.config.mode==="range"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=re,n.selectedDates.push(re),Kt(re,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(me,De){return me.getTime()-De.getTime()}));if(f(),ce){var ue=n.currentYear!==re.getFullYear();n.currentYear=re.getFullYear(),n.currentMonth=re.getMonth(),ue&&(ze("onYearChange"),W()),ze("onMonthChange")}if(gi(),A(),un(),!ce&&n.config.mode!=="range"&&n.config.showMonths===1?E(Q):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()}v()}}var St={locale:[he,q],showMonths:[N,l,H],minDate:[w],maxDate:[w],positionElement:[wo],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(_,M){if(_!==null&&typeof _=="object"){Object.assign(n.config,_);for(var K in _)St[K]!==void 0&&St[K].forEach(function(Q){return Q()})}else n.config[_]=M,St[_]!==void 0?St[_].forEach(function(Q){return Q()}):Bc.indexOf(_)>-1&&(n.config[_]=$c(M));n.redraw(),un(!0)}function Mt(_,M){var K=[];if(_ instanceof Array)K=_.map(function(Q){return n.parseDate(Q,M)});else if(_ instanceof Date||typeof _=="number")K=[n.parseDate(_,M)];else if(typeof _=="string")switch(n.config.mode){case"single":case"time":K=[n.parseDate(_,M)];break;case"multiple":K=_.split(n.config.conjunction).map(function(Q){return n.parseDate(Q,M)});break;case"range":K=_.split(n.l10n.rangeSeparator).map(function(Q){return n.parseDate(Q,M)});break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(_)));n.selectedDates=n.config.allowInvalidPreload?K:K.filter(function(Q){return Q instanceof Date&&J(Q,!1)}),n.config.mode==="range"&&n.selectedDates.sort(function(Q,re){return Q.getTime()-re.getTime()})}function qt(_,M,K){if(M===void 0&&(M=!1),K===void 0&&(K=n.config.dateFormat),_!==0&&!_||_ instanceof Array&&_.length===0)return n.clear(M);Mt(_,K),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),w(void 0,M),h(),n.selectedDates.length===0&&n.clear(!1),un(M),M&&ze("onChange")}function or(_){return _.slice().map(function(M){return typeof M=="string"||typeof M=="number"||M instanceof Date?n.parseDate(M,void 0,!0):M&&typeof M=="object"&&M.from&&M.to?{from:n.parseDate(M.from,void 0),to:n.parseDate(M.to,void 0)}:M}).filter(function(M){return M})}function Ts(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var _=n.config.defaultDate||((n.input.nodeName==="INPUT"||n.input.nodeName==="TEXTAREA")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);_&&Mt(_,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 wn(){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=Re(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"),wo()}function wo(){n._positionElement=n.config.positionElement||n._input}function _u(){var _=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=Re("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=_,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=_==="datetime-local"?"Y-m-d\\TH:i:S":_==="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(M){}g(n.mobileInput,"change",function(M){n.setDate(Yt(M).value,!1,n.mobileFormatStr),ze("onChange"),ze("onClose")})}function ku(_){if(n.isOpen===!0)return n.close();n.open(_)}function ze(_,M){if(n.config!==void 0){var K=n.config[_];if(K!==void 0&&K.length>0)for(var Q=0;K[Q]&&Q<K.length;Q++)K[Q](n.selectedDates,n.input.value,n,M);_==="onChange"&&(n.input.dispatchEvent(pi("change")),n.input.dispatchEvent(pi("input")))}}function pi(_){var M=document.createEvent("Event");return M.initEvent(_,!0,!0),M}function Io(_){for(var M=0;M<n.selectedDates.length;M++){var K=n.selectedDates[M];if(K instanceof Date&&Kt(K,_)===0)return""+M}return!1}function Es(_){return n.config.mode!=="range"||n.selectedDates.length<2?!1:Kt(_,n.selectedDates[0])>=0&&Kt(_,n.selectedDates[1])<=0}function gi(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(_,M){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+M),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[M].textContent=es(K.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=K.getMonth().toString(),_.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 So(_){var M=_||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(K){return n.formatDate(K,M)}).filter(function(K,Q,re){return n.config.mode!=="range"||n.config.enableTime||re.indexOf(K)===Q}).join(n.config.mode!=="range"?n.config.conjunction:n.l10n.rangeSeparator)}function un(_){_===void 0&&(_=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=So(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=So(n.config.altFormat)),_!==!1&&ze("onValueUpdate")}function _s(_){var M=Yt(_),K=n.prevMonthNav.contains(M),Q=n.nextMonthNav.contains(M);K||Q?R(K?-1:1):n.yearElements.indexOf(M)>=0?M.select():M.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):M.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function xt(_){_.preventDefault();var M=_.type==="keydown",K=Yt(_),Q=K;n.amPM!==void 0&&K===n.amPM&&(n.amPM.textContent=n.l10n.amPM[rn(n.amPM.textContent===n.l10n.amPM[0])]);var re=parseFloat(Q.getAttribute("min")),ce=parseFloat(Q.getAttribute("max")),xe=parseFloat(Q.getAttribute("step")),ue=parseInt(Q.value,10),we=_.delta||(M?_.which===38?1:-1:0),fe=ue+xe*we;if(typeof Q.value!="undefined"&&Q.value.length===2){var me=Q===n.hourElement,De=Q===n.minuteElement;fe<re?(fe=ce+fe+rn(!me)+(rn(me)&&rn(!n.amPM)),De&&C(void 0,-1,n.hourElement)):fe>ce&&(fe=Q===n.hourElement?fe-ce-rn(!n.amPM):re,De&&C(void 0,1,n.hourElement)),n.amPM&&me&&(xe===1?fe+ue===23:Math.abs(fe-ue)>xe)&&(n.amPM.textContent=n.l10n.amPM[rn(n.amPM.textContent===n.l10n.amPM[0])]),Q.value=zt(fe)}}return i(),n}function ti(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=yP(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 ti(this,e)},HTMLElement.prototype.flatpickr=function(e){return ti([this],e)});var dt=function(e,t){return typeof e=="string"?ti(window.document.querySelectorAll(e),t):e instanceof Node?ti([e],t):ti(e,t)};dt.defaultConfig={},dt.l10ns={en:Et({},no),default:Et({},no)},dt.localize=function(e){dt.l10ns.default=Et(Et({},dt.l10ns.default),e)},dt.setDefaults=function(e){dt.defaultConfig=Et(Et({},dt.defaultConfig),e)},dt.parseDate=Fc({}),dt.formatDate=ag({}),dt.compareDates=Kt,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(e){return ti(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=dt);const CP=Ou(Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"})));(function(e){function t(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(F){return typeof F}:t=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},t(R)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(x),r=o(yI),i=o(CP);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 l(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 F={},U=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var te in R)if(Object.prototype.hasOwnProperty.call(R,te)){var se=U?Object.getOwnPropertyDescriptor(R,te):null;se&&(se.get||se.set)?Object.defineProperty(F,te,se):F[te]=R[te]}return F.default=R,L&&L.set(R,F),F}function s(R){return h(R)||f(R)||d(R)||c()}function c(){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 F=Object.prototype.toString.call(R).slice(8,-1);if(F==="Object"&&R.constructor&&(F=R.constructor.name),F==="Map"||F==="Set")return Array.from(R);if(F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))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 F=0,U=new Array(L);F<L;F++)U[F]=R[F];return U}function m(){return m=Object.assign||function(R){for(var L=1;L<arguments.length;L++){var F=arguments[L];for(var U in F)Object.prototype.hasOwnProperty.call(F,U)&&(R[U]=F[U])}return R},m.apply(this,arguments)}function g(R,L){if(R==null)return{};var F=v(R,L),U,te;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(R);for(te=0;te<se.length;te++)U=se[te],!(L.indexOf(U)>=0)&&Object.prototype.propertyIsEnumerable.call(R,U)&&(F[U]=R[U])}return F}function v(R,L){if(R==null)return{};var F={},U=Object.keys(R),te,se;for(se=0;se<U.length;se++)te=U[se],!(L.indexOf(te)>=0)&&(F[te]=R[te]);return F}function S(R,L){var F=Object.keys(R);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols(R);L&&(U=U.filter(function(te){return Object.getOwnPropertyDescriptor(R,te).enumerable})),F.push.apply(F,U)}return F}function w(R){for(var L=1;L<arguments.length;L++){var F=arguments[L]!=null?arguments[L]:{};L%2?S(Object(F),!0).forEach(function(U){W(R,U,F[U])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(F)):S(Object(F)).forEach(function(U){Object.defineProperty(R,U,Object.getOwnPropertyDescriptor(F,U))})}return R}function y(R,L){if(!(R instanceof L))throw new TypeError("Cannot call a class as a function")}function C(R,L){for(var F=0;F<L.length;F++){var U=L[F];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(R,U.key,U)}}function b(R,L,F){return L&&C(R.prototype,L),R}function T(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(U,te){return U.__proto__=te,U},E(R,L)}function P(R){var L=z();return function(){var U=A(R),te;if(L){var se=A(this).constructor;te=Reflect.construct(U,arguments,se)}else te=U.apply(this,arguments);return O(this,te)}}function O(R,L){return L&&(t(L)==="object"||typeof L=="function")?L:G(R)}function G(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function z(){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 A(R){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(F){return F.__proto__||Object.getPrototypeOf(F)},A(R)}function W(R,L,F){return L in R?Object.defineProperty(R,L,{value:F,enumerable:!0,configurable:!0,writable:!0}):R[L]=F,R}var Y=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],N=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),$=["onCreate","onDestroy"],B=r.default.func,H=function(R){T(F,R);var L=P(F);function F(){var U;y(this,F);for(var te=arguments.length,se=new Array(te),ae=0;ae<te;ae++)se[ae]=arguments[ae];return U=L.call.apply(L,[this].concat(se)),W(G(U),"createFlatpickrInstance",function(){var J=w({onClose:function(){U.node.blur&&U.node.blur()}},U.props.options);J=q(J,U.props),U.flatpickr=(0,i.default)(U.node,J),U.props.hasOwnProperty("value")&&U.flatpickr.setDate(U.props.value,!1);var le=U.props.onCreate;le&&le(U.flatpickr)}),W(G(U),"destroyFlatpickrInstance",function(){var J=U.props.onDestroy;J&&J(U.flatpickr),U.flatpickr.destroy(),U.flatpickr=null}),W(G(U),"handleNodeChange",function(J){U.node=J,U.flatpickr&&(U.destroyFlatpickrInstance(),U.createFlatpickrInstance())}),U}return b(F,[{key:"componentDidUpdate",value:function(te){var se=this.props.options,ae=te.options;se=q(se,this.props),ae=q(ae,te);for(var J=Object.getOwnPropertyNames(se),le=J.length-1;le>=0;le--){var ne=J[le],ge=se[ne];ge!==ae[ne]&&(Y.indexOf(ne)!==-1&&!Array.isArray(ge)&&(ge=[ge]),this.flatpickr.set(ne,ge))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&te.value&&Array.isArray(te.value)&&this.props.value.every(function(Se,Ue){te[Ue]}))&&this.props.value!==te.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 te=this.props,se=te.options,ae=te.defaultValue,J=te.value,le=te.children,ne=te.render,ge=g(te,["options","defaultValue","value","children","render"]);return Y.forEach(function(Se){delete ge[Se]}),$.forEach(function(Se){delete ge[Se]}),ne?ne(w(w({},ge),{},{defaultValue:ae,value:J}),this.handleNodeChange):se.wrap?n.default.createElement("div",m({},ge,{ref:this.handleNodeChange}),le):n.default.createElement("input",m({},ge,{defaultValue:ae,ref:this.handleNodeChange}))}}]),F}(n.Component);W(H,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:N,onOpen:N,onClose:N,onMonthChange:N,onYearChange:N,onReady:N,onValueUpdate:N,onDayCreate:N,onCreate:B,onDestroy:B,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}),W(H,"defaultProps",{options:{}});function q(R,L){var F=w({},R);return Y.forEach(function(U){if(L.hasOwnProperty(U)){var te;F[U]&&!Array.isArray(F[U])?F[U]=[F[U]]:F[U]||(F[U]=[]);var se=Array.isArray(L[U])?L[U]:[L[U]];(te=F[U]).push.apply(te,s(se))}}),F}var ee=H;e.default=ee})(rg);const lg=fn(rg);var cg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",l="minute",s="hour",c="day",d="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|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,w={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(Y){var N=["th","st","nd","rd"],$=Y%100;return"["+Y+(N[($-20)%10]||N[$]||N[0])+"]"}},y=function(Y,N,$){var B=String(Y);return!B||B.length>=N?Y:""+Array(N+1-B.length).join($)+Y},C={s:y,z:function(Y){var N=-Y.utcOffset(),$=Math.abs(N),B=Math.floor($/60),H=$%60;return(N<=0?"+":"-")+y(B,2,"0")+":"+y(H,2,"0")},m:function Y(N,$){if(N.date()<$.date())return-Y($,N);var B=12*($.year()-N.year())+($.month()-N.month()),H=N.clone().add(B,f),q=$-H<0,ee=N.clone().add(B+(q?-1:1),f);return+(-(B+($-H)/(q?H-ee:ee-H))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:f,y:p,w:d,d:c,D:m,h:s,m:l,s:a,ms:o,Q:h}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},b="en",T={};T[b]=w;var E="$isDayjsObject",P=function(Y){return Y instanceof A||!(!Y||!Y[E])},O=function Y(N,$,B){var H;if(!N)return b;if(typeof N=="string"){var q=N.toLowerCase();T[q]&&(H=q),$&&(T[q]=$,H=q);var ee=N.split("-");if(!H&&ee.length>1)return Y(ee[0])}else{var R=N.name;T[R]=N,H=R}return!B&&H&&(b=H),H||!B&&b},G=function(Y,N){if(P(Y))return Y.clone();var $=typeof N=="object"?N:{};return $.date=Y,$.args=arguments,new A($)},z=C;z.l=O,z.i=P,z.w=function(Y,N){return G(Y,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var A=function(){function Y($){this.$L=O($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[E]=!0}var N=Y.prototype;return N.parse=function($){this.$d=function(B){var H=B.date,q=B.utc;if(H===null)return new Date(NaN);if(z.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var ee=H.match(v);if(ee){var R=ee[2]-1||0,L=(ee[7]||"0").substring(0,3);return q?new Date(Date.UTC(ee[1],R,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,L)):new Date(ee[1],R,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,L)}}return new Date(H)}($),this.init()},N.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()},N.$utils=function(){return z},N.isValid=function(){return this.$d.toString()!==g},N.isSame=function($,B){var H=G($);return this.startOf(B)<=H&&H<=this.endOf(B)},N.isAfter=function($,B){return G($)<this.startOf(B)},N.isBefore=function($,B){return this.endOf(B)<G($)},N.$g=function($,B,H){return z.u($)?this[B]:this.set(H,$)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function($,B){var H=this,q=!!z.u(B)||B,ee=z.p($),R=function(le,ne){var ge=z.w(H.$u?Date.UTC(H.$y,ne,le):new Date(H.$y,ne,le),H);return q?ge:ge.endOf(c)},L=function(le,ne){return z.w(H.toDate()[le].apply(H.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(ne)),H)},F=this.$W,U=this.$M,te=this.$D,se="set"+(this.$u?"UTC":"");switch(ee){case p:return q?R(1,0):R(31,11);case f:return q?R(1,U):R(0,U+1);case d:var ae=this.$locale().weekStart||0,J=(F<ae?F+7:F)-ae;return R(q?te-J:te+(6-J),U);case c:case m:return L(se+"Hours",0);case s:return L(se+"Minutes",1);case l:return L(se+"Seconds",2);case a:return L(se+"Milliseconds",3);default:return this.clone()}},N.endOf=function($){return this.startOf($,!1)},N.$set=function($,B){var H,q=z.p($),ee="set"+(this.$u?"UTC":""),R=(H={},H[c]=ee+"Date",H[m]=ee+"Date",H[f]=ee+"Month",H[p]=ee+"FullYear",H[s]=ee+"Hours",H[l]=ee+"Minutes",H[a]=ee+"Seconds",H[o]=ee+"Milliseconds",H)[q],L=q===c?this.$D+(B-this.$W):B;if(q===f||q===p){var F=this.clone().set(m,1);F.$d[R](L),F.init(),this.$d=F.set(m,Math.min(this.$D,F.daysInMonth())).$d}else R&&this.$d[R](L);return this.init(),this},N.set=function($,B){return this.clone().$set($,B)},N.get=function($){return this[z.p($)]()},N.add=function($,B){var H,q=this;$=Number($);var ee=z.p(B),R=function(U){var te=G(q);return z.w(te.date(te.date()+Math.round(U*$)),q)};if(ee===f)return this.set(f,this.$M+$);if(ee===p)return this.set(p,this.$y+$);if(ee===c)return R(1);if(ee===d)return R(7);var L=(H={},H[l]=r,H[s]=i,H[a]=n,H)[ee]||1,F=this.$d.getTime()+$*L;return z.w(F,this)},N.subtract=function($,B){return this.add(-1*$,B)},N.format=function($){var B=this,H=this.$locale();if(!this.isValid())return H.invalidDate||g;var q=$||"YYYY-MM-DDTHH:mm:ssZ",ee=z.z(this),R=this.$H,L=this.$m,F=this.$M,U=H.weekdays,te=H.months,se=H.meridiem,ae=function(ne,ge,Se,Ue){return ne&&(ne[ge]||ne(B,q))||Se[ge].slice(0,Ue)},J=function(ne){return z.s(R%12||12,ne,"0")},le=se||function(ne,ge,Se){var Ue=ne<12?"AM":"PM";return Se?Ue.toLowerCase():Ue};return q.replace(S,function(ne,ge){return ge||function(Se){switch(Se){case"YY":return String(B.$y).slice(-2);case"YYYY":return z.s(B.$y,4,"0");case"M":return F+1;case"MM":return z.s(F+1,2,"0");case"MMM":return ae(H.monthsShort,F,te,3);case"MMMM":return ae(te,F);case"D":return B.$D;case"DD":return z.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return ae(H.weekdaysMin,B.$W,U,2);case"ddd":return ae(H.weekdaysShort,B.$W,U,3);case"dddd":return U[B.$W];case"H":return String(R);case"HH":return z.s(R,2,"0");case"h":return J(1);case"hh":return J(2);case"a":return le(R,L,!0);case"A":return le(R,L,!1);case"m":return String(L);case"mm":return z.s(L,2,"0");case"s":return String(B.$s);case"ss":return z.s(B.$s,2,"0");case"SSS":return z.s(B.$ms,3,"0");case"Z":return ee}return null}(ne)||ee.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function($,B,H){var q,ee=this,R=z.p(B),L=G($),F=(L.utcOffset()-this.utcOffset())*r,U=this-L,te=function(){return z.m(ee,L)};switch(R){case p:q=te()/12;break;case f:q=te();break;case h:q=te()/3;break;case d:q=(U-F)/6048e5;break;case c:q=(U-F)/864e5;break;case s:q=U/i;break;case l:q=U/r;break;case a:q=U/n;break;default:q=U}return H?q:z.a(q)},N.daysInMonth=function(){return this.endOf(f).$D},N.$locale=function(){return T[this.$L]},N.locale=function($,B){if(!$)return this.$L;var H=this.clone(),q=O($,B,!0);return q&&(H.$L=q),H},N.clone=function(){return z.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},Y}(),W=A.prototype;return G.prototype=W,[["$ms",o],["$s",a],["$m",l],["$H",s],["$W",c],["$M",f],["$y",p],["$D",m]].forEach(function(Y){W[Y[1]]=function(N){return this.$g(N,Y[0],Y[1])}}),G.extend=function(Y,N){return Y.$i||(Y(N,A,G),Y.$i=!0),G},G.locale=O,G.isDayjs=P,G.unix=function(Y){return G(1e3*Y)},G.en=T[b],G.Ls=T,G.p={},G})})(cg);var xP=cg.exports;const _t=fn(xP);var ug={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 l,s=function(h,p,m){m===void 0&&(m={});var g=new Date(h),v=function(S,w){w===void 0&&(w={});var y=w.timeZoneName||"short",C=S+"|"+y,b=r[C];return b||(b=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:S,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:y}),r[C]=b),b}(p,m);return v.formatToParts(g)},c=function(h,p){for(var m=s(h,p),g=[],v=0;v<m.length;v+=1){var S=m[v],w=S.type,y=S.value,C=n[w];C>=0&&(g[C]=parseInt(y,10))}var b=g[3],T=b===24?0:b,E=g[0]+"-"+g[1]+"-"+g[2]+" "+T+":"+g[4]+":"+g[5]+":000",P=+h;return(a.utc(E).valueOf()-(P-=P%1e3))/6e4},d=o.prototype;d.tz=function(h,p){h===void 0&&(h=l);var m,g=this.utcOffset(),v=this.toDate(),S=v.toLocaleString("en-US",{timeZone:h}),w=Math.round((v-new Date(S))/1e3/60),y=15*-Math.round(v.getTimezoneOffset()/15)-w;if(!Number(y))m=this.utcOffset(0,p);else if(m=a(S,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(y,!0),p){var C=m.utcOffset();m=m.add(g-C,"minute")}return m.$x.$timezone=h,m},d.offsetName=function(h){var p=this.$x.$timezone||a.tz.guess(),m=s(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,v=m||p||l,S=c(+a(),v);if(typeof h!="string")return a(h).tz(v);var w=function(T,E,P){var O=T-60*E*1e3,G=c(O,P);if(E===G)return[O,E];var z=c(O-=60*(G-E)*1e3,P);return G===z?[O,G]:[T-60*Math.min(G,z)*1e3,Math.max(G,z)]}(a.utc(h,g).valueOf(),S,v),y=w[0],C=w[1],b=a(y).utcOffset(C);return b.$x.$timezone=v,b},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(h){l=h}}})})(ug);var wP=ug.exports;const IP=fn(wP);var dg={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,l){var s=a.prototype;l.utc=function(g){var v={date:g,utc:!0,args:arguments};return new a(v)},s.utc=function(g){var v=l(this.toDate(),{locale:this.$L,utc:!0});return g?v.add(this.utcOffset(),n):v},s.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var c=s.parse;s.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),c.call(this,g)};var d=s.init;s.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=s.utcOffset;s.utcOffset=function(g,v){var S=this.$utils().u;if(S(g))return this.$u?0:S(this.$offset)?f.call(this):this.$offset;if(typeof g=="string"&&(g=function(b){b===void 0&&(b="");var T=b.match(r);if(!T)return null;var E=(""+T[0]).match(i)||["-",0,0],P=E[0],O=60*+E[1]+ +E[2];return O===0?0:P==="+"?O:-O}(g),g===null))return this;var w=Math.abs(g)<=16?60*g:g,y=this;if(v)return y.$offset=w,y.$u=g===0,y;if(g!==0){var C=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(y=this.local().add(w+C,n)).$offset=w,y.$x.$localOffset=C}else y=this.utc();return y};var h=s.format;s.format=function(g){var v=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},s.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var p=s.toDate;s.toDate=function(g){return g==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var m=s.diff;s.diff=function(g,v,S){if(g&&this.$u===g.$u)return m.call(this,g,v,S);var w=this.local(),y=l(g).local();return m.call(w,y,v,S)}}})})(dg);var SP=dg.exports;const AP=fn(SP);_t.extend(IP),_t.extend(AP);const TP=e=>{if(!_t(e).isAfter(_t(Date.now()).subtract(15,"minute")))return _t(Date.now()).add(15,"minute").toDate()},Vc=({defaultDate:e,minDate:t,maxDate:n,dateFormat:r="DD.MM.YYYY HH:mm",onChange:i})=>{const o=a=>{if(a&&a.length){const l=_t.utc(a[0]).toISOString();i(l)}else i("")};return u.jsx(I.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:u.jsx(lg,{value:e&&_t(e).format("YYYY-MM-DD HH:mm")||void 0,onChange:o,className:"flatpickr-input",options:{enableTime:!0,dateFormat:r,position:"below",minDate:t||TP(e),maxDate:n,parseDate:(a,l)=>_t(a,l).toDate(),formatDate:(a,l)=>_t(a).format(l),time_24hr:!0,minuteIncrement:1}})})},EP=({required:e,defaultValue:t,onChangeFromDate:n,onChangeToDate:r})=>{const[i,o]=t;return u.jsxs(I.Box,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormControl,{children:u.jsx(I.FormLabel,{required:e,color:"primary",children:"Duration"})}),u.jsxs(I.Grid,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",children:[u.jsx(to,{label:"From date",defaultValue:i,required:e,onChange:n}),u.jsx(to,{label:"To date",defaultValue:o,required:e,onChange:r})]})]})},fg=e=>{if(!e)return[];const{from:t,to:n}=e,r=[];return t&&r.push(_t(t).toDate()),n&&r.push(_t(n).toDate()),r},_P=({label:e,defaultValue:t,required:n,onChange:r})=>{const[i,o]=x.useState(fg(t)),[a,l]=x.useState(!1),s=()=>l(!a),c=d=>{if(d&&d.length>0){const f="YYYY-MM-DD",h=_t(d[0]).format(f),p=_t(d[1]).format(f);r({from:h,to:p})}else d&&d.length===0&&(r({from:"",to:""}),s());o(d)};return u.jsxs(I.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{required:n,color:"primary",children:e}),u.jsx(I.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:u.jsx(lg,{value:i,onChange:c,placeholder:"Select Date...",className:"flatpickr-input",options:{mode:"range",enableTime:!1,dateFormat:"DD.MM.YYYY",altFormat:"DD.MM.YYYY",position:"below",parseDate:(d,f)=>_t(d,f).toDate(),formatDate:(d,f)=>_t(d).format(f),defaultDate:fg(t)||void 0}})}),u.jsx(ut,{showToast:a,message:"Succesfully cleared the duration time",color:"primary",hideToast:s})]})},kP=({environment:e,labels:t,setNoPermission:n})=>{const{featureDisabled:r,noPermissionMessage:i,tryAgainButton:o}=t,a=()=>{zi(e).signOut().then(()=>n(null)).catch(l=>{console.error("There was a problem logging out the user:",l)})};return u.jsx(I.Box,{"data-testid":"no permission card",sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",bgcolor:"background.body"},children:u.jsx(I.Card,{variant:"outlined",sx:{maxWidth:300,overflow:"hidden",borderRadius:"md"},children:u.jsxs(I.CardContent,{children:[u.jsx(I.Typography,{level:"h2",textAlign:"center",mb:2,children:r}),u.jsx(I.Typography,{level:"body-md",color:"neutral",mb:2,children:i}),u.jsx(I.Box,{display:"flex",justifyContent:"center",children:u.jsx(I.Button,{variant:"solid",color:"neutral",fullWidth:!0,size:"sm",onClick:a,children:o})})]})})})},hg=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],Uc=e=>e.reduce((t,n)=>(t[n.key]=n.value,t),{}),PP=({labels:e,type:t,defaultValue:n,onChange:r})=>{const[i,o]=x.useState(hg(n)),[a,l]=x.useState(null),[s,c]=x.useState(""),[d,f]=x.useState(""),[h,p]=x.useState(""),[m,g]=x.useState("");x.useEffect(()=>o(hg(n)),[n]);const v=()=>{const C=[...i];C.push({key:s,value:h}),o(C),c(""),p(""),r(Uc(C))},S=C=>{const b=i.filter((T,E)=>E!==C);o(b),r(Uc(b))},w=(C,b)=>{f(b.key),g(b.value),l(C)},y=C=>{const b=[...i];b[C]={key:d,value:m},o(b),l(null),f(""),g(""),r(Uc(b))};return u.jsxs(I.Box,{children:[i.map((C,b)=>u.jsx(I.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(I.CardContent,{style:{flex:1},children:a===b?u.jsxs(I.Box,{display:"flex",alignItems:"center",children:[u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:d,onChange:T=>f(T.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:m,onChange:T=>g(T.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Tooltip,{title:e.save,children:d&&m?u.jsx(I.IconButton,{onClick:()=>y(b),children:u.jsx(Le.Check,{})}):u.jsx("span",{children:u.jsx(I.IconButton,{disabled:!0,children:u.jsx(Le.Check,{})})})})]}):u.jsxs(I.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[u.jsxs(I.Box,{children:[u.jsxs(I.Typography,{style:{fontWeight:"bold"},children:[e.keyDynamicFields,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:C.key})]}),u.jsxs(I.Typography,{style:{color:"gray"},children:[e.valueDynamicFields,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:C.value})]})]}),u.jsxs(I.Box,{children:[u.jsx(I.Tooltip,{title:e.edit,children:u.jsx(I.IconButton,{onClick:()=>w(b,C),children:u.jsx(Le.Edit,{})})}),u.jsx(I.Tooltip,{title:e.delete,children:u.jsx(I.IconButton,{onClick:()=>S(b),children:u.jsx(Le.Delete,{})})})]})]})})},`dynamic-fields-${t}-${b}`)),u.jsxs(I.Box,{display:"flex",alignItems:"center",style:{marginTop:i&&i.length?"20px":"0px"},children:[u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",value:s,placeholder:e.keyDynamicFields,onChange:C=>c(C.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",value:h,onChange:C=>p(C.target.value),placeholder:e.valueDynamicFields,sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Tooltip,{title:e.add,children:s&&h?u.jsx(I.Button,{onClick:v,children:u.jsx(Le.Add,{})}):u.jsx("span",{children:u.jsx(I.Button,{disabled:!0,children:u.jsx(Le.Add,{})})})})]})]})};function io(e,t,n){return(t=Kl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pg(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?pg(Object(n),!0).forEach(function(r){io(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gg(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,Kl(r.key),r)}}function OP(e,t,n){return t&&gg(e.prototype,t),n&&gg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hc(e,t){return Hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Hc(e,t)}function RP(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&&Hc(e,t)}function ts(e){return ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ts(e)}function mg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(mg=function(){return!!e})()}function MP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LP(e,t){if(t&&(vr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MP(e)}function BP(e){var t=mg();return function(){var n,r=ts(e);if(t){var i=ts(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return LP(this,n)}}function Wc(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 $P(e){if(Array.isArray(e))return Wc(e)}function NP(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vg(e,t){if(e){if(typeof e=="string")return Wc(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)?Wc(e,t):void 0}}function FP(){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 ni(e){return $P(e)||NP(e)||vg(e)||FP()}function zP(e){if(Array.isArray(e))return e}function jP(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(d){c=!0,i=d}finally{try{if(!s&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}function VP(){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 zP(e)||jP(e,t)||vg(e,t)||VP()}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 UP(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Gc=x.useLayoutEffect,HP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ns=function(){};function WP(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function GP(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(WP(e,a)));return o.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var rs=function(t){return tD(t)?t.filter(Boolean):vr(t)==="object"&&t!==null?[t]:[]},bg=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,HP);return ve({},n)},tt=function(t,n,r){var i=t.cx,o=t.getStyles,a=t.getClassNames,l=t.className;return{css:o(n,t),className:i(r!=null?r:{},a(n,t),l)}};function is(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function YP(e){return is(e)?window.innerHeight:e.clientHeight}function yg(e){return is(e)?window.pageYOffset:e.scrollTop}function os(e,t){if(is(e)){window.scrollTo(0,t);return}e.scrollTop=t}function KP(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 qP(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function as(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ns,i=yg(e),o=t-i,a=10,l=0;function s(){l+=a;var c=qP(l,i,o,n);os(e,c),l<n?window.requestAnimationFrame(s):r(e)}s()}function Cg(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?os(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&os(e,Math.max(t.offsetTop-i,0))}function QP(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 xg(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function JP(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}var wg=!1,XP={get passive(){return wg=!0}},ss=typeof window!="undefined"?window:{};ss.addEventListener&&ss.removeEventListener&&(ss.addEventListener("p",ns,XP),ss.removeEventListener("p",ns,!1));var ZP=wg;function eD(e){return e!=null}function tD(e){return Array.isArray(e)}function oo(e,t,n){return e?t:n}function PF(e){return e}function DF(e){return e}var nD=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 l=Vn(a,1),s=l[0];return!r.includes(s)});return o.reduce(function(a,l){var s=Vn(l,2),c=s[0],d=s[1];return a[c]=d,a},{})},rD=["children","innerProps"],iD=["children","innerProps"];function oD(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,s=KP(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var d=s.getBoundingClientRect(),f=d.height,h=n.getBoundingClientRect(),p=h.bottom,m=h.height,g=h.top,v=n.offsetParent.getBoundingClientRect(),S=v.top,w=a?window.innerHeight:YP(s),y=yg(s),C=parseInt(getComputedStyle(n).marginBottom,10),b=parseInt(getComputedStyle(n).marginTop,10),T=S-b,E=w-g,P=T+y,O=f-y-g,G=p-w+y+C,z=y+g-b,A=160;switch(i){case"auto":case"bottom":if(E>=m)return{placement:"bottom",maxHeight:t};if(O>=m&&!a)return o&&as(s,G,A),{placement:"bottom",maxHeight:t};if(!a&&O>=r||a&&E>=r){o&&as(s,G,A);var W=a?E-C:O-C;return{placement:"bottom",maxHeight:W}}if(i==="auto"||a){var Y=t,N=a?T:P;return N>=r&&(Y=Math.min(N-C-l,t)),{placement:"top",maxHeight:Y}}if(i==="bottom")return o&&os(s,G),{placement:"bottom",maxHeight:t};break;case"top":if(T>=m)return{placement:"top",maxHeight:t};if(P>=m&&!a)return o&&as(s,z,A),{placement:"top",maxHeight:t};if(!a&&P>=r||a&&T>=r){var $=t;return(!a&&P>=r||a&&T>=r)&&($=a?T-b:P-b),o&&as(s,z,A),{placement:"top",maxHeight:$}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function aD(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Ig=function(t){return t==="auto"?"bottom":t},sD=function(t,n){var r,i=t.placement,o=t.theme,a=o.borderRadius,l=o.spacing,s=o.colors;return ve((r={label:"menu"},io(r,aD(i),"100%"),io(r,"position","absolute"),io(r,"width","100%"),io(r,"zIndex",1),r),n?{}:{backgroundColor:s.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},Sg=x.createContext(null),lD=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,a=t.menuPosition,l=t.menuShouldScrollIntoView,s=t.theme,c=x.useContext(Sg)||{},d=c.setPortalPlacement,f=x.useRef(null),h=x.useState(i),p=Vn(h,2),m=p[0],g=p[1],v=x.useState(null),S=Vn(v,2),w=S[0],y=S[1],C=s.spacing.controlHeight;return Gc(function(){var b=f.current;if(b){var T=a==="fixed",E=l&&!T,P=oD({maxHeight:i,menuEl:b,minHeight:r,placement:o,shouldScroll:E,isFixedPosition:T,controlHeight:C});g(P.maxHeight),y(P.placement),d==null||d(P.placement)}},[i,o,a,l,r,d,C]),n({ref:f,placerProps:ve(ve({},t),{},{placement:w||Ig(o),maxHeight:m})})},cD=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return pe.jsx("div",D({},tt(t,"menu",{menu:!0}),{ref:r},i),n)},uD=cD,dD=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})},fD=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return pe.jsx("div",D({},tt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},Ag=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")})},hD=Ag,pD=Ag,gD=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=Cn(t,rD);return pe.jsx("div",D({},tt(ve(ve({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},mD=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=Cn(t,iD);return pe.jsx("div",D({},tt(ve(ve({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},vD=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}},bD=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,a=t.menuPlacement,l=t.menuPosition,s=x.useRef(null),c=x.useRef(null),d=x.useState(Ig(a)),f=Vn(d,2),h=f[0],p=f[1],m=x.useMemo(function(){return{setPortalPlacement:p}},[]),g=x.useState(null),v=Vn(g,2),S=v[0],w=v[1],y=x.useCallback(function(){if(i){var E=QP(i),P=l==="fixed"?0:window.pageYOffset,O=E[h]+P;(O!==(S==null?void 0:S.offset)||E.left!==(S==null?void 0:S.rect.left)||E.width!==(S==null?void 0:S.rect.width))&&w({offset:O,rect:E})}},[i,l,h,S==null?void 0:S.offset,S==null?void 0:S.rect.left,S==null?void 0:S.rect.width]);Gc(function(){y()},[y]);var C=x.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&s.current&&(c.current=AS(i,s.current,y,{elementResize:"ResizeObserver"in window}))},[i,y]);Gc(function(){C()},[C]);var b=x.useCallback(function(E){s.current=E,C()},[C]);if(!n&&l!=="fixed"||!S)return null;var T=pe.jsx("div",D({ref:b},tt(ve(ve({},t),{},{offset:S.offset,position:l,rect:S.rect}),"menuPortal",{"menu-portal":!0}),o),r);return pe.jsx(Sg.Provider,{value:m},n?Oe.createPortal(T,n):T)},yD=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},CD=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return pe.jsx("div",D({},tt(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},xD=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")})},wD=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return pe.jsx("div",D({},tt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},ID=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},SD=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",D({},tt(t,"indicatorsContainer",{indicators:!0}),r),n)},Tg,AD=["size"],TD=["innerProps","isRtl","size"],ED={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Eg=function(t){var n=t.size,r=Cn(t,AD);return pe.jsx("svg",D({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ED},r))},Yc=function(t){return pe.jsx(Eg,D({size:20},t),pe.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"}))},_g=function(t){return pe.jsx(Eg,D({size:20},t),pe.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"}))},kg=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}})},_D=kg,kD=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",D({},tt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||pe.jsx(_g,null))},PD=kg,DD=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",D({},tt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||pe.jsx(Yc,null))},OD=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})},RD=function(t){var n=t.innerProps;return pe.jsx("span",D({},n,tt(t,"indicatorSeparator",{"indicator-separator":!0})))},MD=pe.keyframes(Tg||(Tg=UP([`
|
|
2461
2461
|
0%, 80%, 100% { opacity: 0; }
|
|
2462
2462
|
40% { opacity: 1; }
|
|
2463
|
-
`]))),LD=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,l=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:l*2})},Kc=function(t){var n=t.delay,r=t.offset;return pe.jsx("span",{css:pe.css({animation:"".concat(MD," 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"},"","")})},BD=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=Cn(t,TD);return pe.jsx("div",D({},tt(ve(ve({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),pe.jsx(Kc,{delay:0,offset:r}),pe.jsx(Kc,{delay:160,offset:!0}),pe.jsx(Kc,{delay:320,offset:!r}))},$D=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,l=o.borderRadius,s=o.spacing;return ve({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.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:l,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},ND=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,l=t.menuIsOpen;return pe.jsx("div",D({ref:o},tt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":l}),a,{"aria-disabled":r||void 0}),n)},FD=ND,zD=["data"],jD=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},VD=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,l=t.headingProps,s=t.innerProps,c=t.label,d=t.theme,f=t.selectProps;return pe.jsx("div",D({},tt(t,"group",{group:!0}),s),pe.jsx(a,D({},l,{selectProps:f,theme:d,getStyles:i,getClassNames:o,cx:r}),c),pe.jsx("div",null,n))},UD=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"})},HD=function(t){var n=bg(t);n.data;var r=Cn(n,zD);return pe.jsx("div",D({},tt(t,"groupHeading",{"group-heading":!0}),r))},WD=VD,GD=["innerRef","isDisabled","isHidden","inputClassName"],YD=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,l=o.colors;return ve(ve({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},KD),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:l.neutral80})},Pg={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},KD={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"},Pg)},qD=function(t){return ve({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Pg)},QD=function(t){var n=t.cx,r=t.value,i=bg(t),o=i.innerRef,a=i.isDisabled,l=i.isHidden,s=i.inputClassName,c=Cn(i,GD);return pe.jsx("div",D({},tt(t,"input",{"input-container":!0}),{"data-value":r||""}),pe.jsx("input",D({className:n({input:!0},s),ref:o,style:qD(l),disabled:a},c)))},JD=QD,XD=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})},ZD=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})},eO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,l=t.isFocused;return ve({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:l?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Dg=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",r,n)},tO=Dg,nO=Dg;function rO(e){var t=e.children,n=e.innerProps;return pe.jsx("div",D({role:"button"},n),t||pe.jsx(Yc,{size:14}))}var iO=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,l=t.removeProps,s=t.selectProps,c=r.Container,d=r.Label,f=r.Remove;return pe.jsx(c,{data:i,innerProps:ve(ve({},tt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:s},pe.jsx(d,{data:i,innerProps:ve({},tt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},n),pe.jsx(f,{data:i,innerProps:ve(ve({},tt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:s}))},oO=iO,aO=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,l=a.spacing,s=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?s.primary:i?s.primary25:"transparent",color:r?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?s.primary:s.primary50}})},sO=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,l=t.innerProps;return pe.jsx("div",D({},tt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},l),n)},lO=sO,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})},uO=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",D({},tt(t,"placeholder",{placeholder:!0}),r),n)},dO=uO,fO=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})},hO=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return pe.jsx("div",D({},tt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},pO=hO,gO={ClearIndicator:DD,Control:FD,DropdownIndicator:kD,DownChevron:_g,CrossIcon:Yc,Group:WD,GroupHeading:HD,IndicatorsContainer:SD,IndicatorSeparator:RD,Input:JD,LoadingIndicator:BD,Menu:uD,MenuList:fD,MenuPortal:bD,LoadingMessage:mD,NoOptionsMessage:gD,MultiValue:oO,MultiValueContainer:tO,MultiValueLabel:nO,MultiValueRemove:rO,Option:lO,Placeholder:dO,SelectContainer:CD,SingleValue:pO,ValueContainer:wD},mO=function(t){return ve(ve({},gO),t.components)},Og=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function vO(e,t){return!!(e===t||Og(e)&&Og(t))}function bO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!vO(e[n],t[n]))return!1;return!0}function yO(e,t){t===void 0&&(t=bO);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 CO={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"},xO=function(t){return pe.jsx("span",D({css:CO},t))},Rg=xO,wO={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,l=t.selectValue,s=t.isDisabled,c=t.isSelected,d=t.isAppleDevice,f=function(g,v){return g&&g.length?"".concat(g.indexOf(v)+1," of ").concat(g.length):""};if(n==="value"&&l)return"value ".concat(a," focused, ").concat(f(l,r),".");if(n==="menu"&&d){var h=s?" disabled":"",p="".concat(c?" 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:"",".")}},IO=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,l=t.selectValue,s=t.selectProps,c=t.id,d=t.isAppleDevice,f=s.ariaLiveMessages,h=s.getOptionLabel,p=s.inputValue,m=s.isMulti,g=s.isOptionDisabled,v=s.isSearchable,S=s.menuIsOpen,w=s.options,y=s.screenReaderStatus,C=s.tabSelectsValue,b=s.isLoading,T=s["aria-label"],E=s["aria-live"],P=x.useMemo(function(){return ve(ve({},wO),f||{})},[f]),O=x.useMemo(function(){var N="";if(n&&P.onChange){var $=n.option,B=n.options,H=n.removedValue,q=n.removedValues,ee=n.value,R=function(J){return Array.isArray(J)?null:J},L=H||$||R(ee),F=L?h(L):"",V=B||q||void 0,te=V?V.map(h):[],se=ve({isDisabled:L&&g(L,l),label:F,labels:te},n);N=P.onChange(se)}return N},[n,P,g,l,h]),G=x.useMemo(function(){var N="",$=r||i,B=!!(r&&l&&l.includes(r));if($&&P.onFocus){var H={focused:$,label:h($),isDisabled:g($,l),isSelected:B,options:o,context:$===r?"menu":"value",selectValue:l,isAppleDevice:d};N=P.onFocus(H)}return N},[r,i,h,g,P,o,l,d]),z=x.useMemo(function(){var N="";if(S&&w.length&&!b&&P.onFilter){var $=y({count:o.length});N=P.onFilter({inputValue:p,resultsMessage:$})}return N},[o,p,S,P,w,y,b]),A=(n==null?void 0:n.action)==="initial-input-focus",W=x.useMemo(function(){var N="";if(P.guidance){var $=i?"value":S?"menu":"input";N=P.guidance({"aria-label":T,context:$,isDisabled:r&&g(r,l),isMulti:m,isSearchable:v,tabSelectsValue:C,isInitialFocus:A})}return N},[T,r,i,m,g,v,S,P,l,C,A]),Y=pe.jsx(x.Fragment,null,pe.jsx("span",{id:"aria-selection"},O),pe.jsx("span",{id:"aria-focused"},G),pe.jsx("span",{id:"aria-results"},z),pe.jsx("span",{id:"aria-guidance"},W));return pe.jsx(x.Fragment,null,pe.jsx(Rg,{id:c},A&&Y),pe.jsx(Rg,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!A&&Y))},SO=IO,qc=[{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źẑżžẓẕƶȥɀⱬꝣ"}],AO=new RegExp("["+qc.map(function(e){return e.letters}).join("")+"]","g"),Mg={},Qc=0;Qc<qc.length;Qc++)for(var Jc=qc[Qc],Xc=0;Xc<Jc.letters.length;Xc++)Mg[Jc.letters[Xc]]=Jc.base;var Lg=function(t){return t.replace(AO,function(n){return Mg[n]})},TO=yO(Lg),Bg=function(t){return t.replace(/^\s+|\s+$/g,"")},EO=function(t){return"".concat(t.label," ").concat(t.value)},_O=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=ve({ignoreCase:!0,ignoreAccents:!0,stringify:EO,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,a=i.ignoreAccents,l=i.stringify,s=i.trim,c=i.matchFrom,d=s?Bg(r):r,f=s?Bg(l(n)):l(n);return o&&(d=d.toLowerCase(),f=f.toLowerCase()),a&&(d=TO(d),f=Lg(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},kO=["innerRef"];function PO(e){var t=e.innerRef,n=Cn(e,kO),r=nD(n,"onExited","in","enter","exit","appear");return pe.jsx("input",D({ref:t},r,{css:pe.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 DO=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function OO(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=x.useRef(!1),l=x.useRef(!1),s=x.useRef(0),c=x.useRef(null),d=x.useCallback(function(v,S){if(c.current!==null){var w=c.current,y=w.scrollTop,C=w.scrollHeight,b=w.clientHeight,T=c.current,E=S>0,P=C-b-y,O=!1;P>S&&a.current&&(r&&r(v),a.current=!1),E&&l.current&&(o&&o(v),l.current=!1),E&&S>P?(n&&!a.current&&n(v),T.scrollTop=C,O=!0,a.current=!0):!E&&-S>y&&(i&&!l.current&&i(v),T.scrollTop=0,O=!0,l.current=!0),O&&DO(v)}},[n,r,i,o]),f=x.useCallback(function(v){d(v,v.deltaY)},[d]),h=x.useCallback(function(v){s.current=v.changedTouches[0].clientY},[]),p=x.useCallback(function(v){var S=s.current-v.changedTouches[0].clientY;d(v,S)},[d]),m=x.useCallback(function(v){if(v){var S=ZP?{passive:!1}:!1;v.addEventListener("wheel",f,S),v.addEventListener("touchstart",h,S),v.addEventListener("touchmove",p,S)}},[p,h,f]),g=x.useCallback(function(v){v&&(v.removeEventListener("wheel",f,!1),v.removeEventListener("touchstart",h,!1),v.removeEventListener("touchmove",p,!1))},[p,h,f]);return x.useEffect(function(){if(t){var v=c.current;return m(v),function(){g(v)}}},[t,m,g]),function(v){c.current=v}}var $g=["boxSizing","height","overflow","paddingRight","position"],Ng={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Fg(e){e.preventDefault()}function zg(e){e.stopPropagation()}function jg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Vg(){return"ontouchstart"in window||navigator.maxTouchPoints}var Ug=!!(typeof window!="undefined"&&window.document&&window.document.createElement),ao=0,ri={capture:!1,passive:!1};function RO(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(s){if(Ug){var c=document.body,d=c&&c.style;if(r&&$g.forEach(function(m){var g=d&&d[m];i.current[m]=g}),r&&ao<1){var f=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,p=window.innerWidth-h+f||0;Object.keys(Ng).forEach(function(m){var g=Ng[m];d&&(d[m]=g)}),d&&(d.paddingRight="".concat(p,"px"))}c&&Vg()&&(c.addEventListener("touchmove",Fg,ri),s&&(s.addEventListener("touchstart",jg,ri),s.addEventListener("touchmove",zg,ri))),ao+=1}},[r]),l=x.useCallback(function(s){if(Ug){var c=document.body,d=c&&c.style;ao=Math.max(ao-1,0),r&&ao<1&&$g.forEach(function(f){var h=i.current[f];d&&(d[f]=h)}),c&&Vg()&&(c.removeEventListener("touchmove",Fg,ri),s&&(s.removeEventListener("touchstart",jg,ri),s.removeEventListener("touchmove",zg,ri)))}},[r]);return x.useEffect(function(){if(t){var s=o.current;return a(s),function(){l(s)}}},[t,a,l]),function(s){o.current=s}}var MO=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},LO={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function BO(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,l=e.onTopArrive,s=e.onTopLeave,c=OO({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:l,onTopLeave:s}),d=RO({isEnabled:n}),f=function(p){c(p),d(p)};return pe.jsx(x.Fragment,null,n&&pe.jsx("div",{onClick:MO,css:LO}),t(f))}var $O={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},NO=function(t){var n=t.name,r=t.onFocus;return pe.jsx("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:$O,value:"",onChange:function(){}})},FO=NO;function Zc(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 zO(){return Zc(/^iPhone/i)}function Hg(){return Zc(/^Mac/i)}function jO(){return Zc(/^iPad/i)||Hg()&&navigator.maxTouchPoints>1}function VO(){return zO()||jO()}function UO(){return Hg()||VO()}var HO=function(t){return t.label},Wg=function(t){return t.label},Gg=function(t){return t.value},WO=function(t){return!!t.isDisabled},GO={clearIndicator:PD,container:yD,control:$D,dropdownIndicator:_D,group:jD,groupHeading:UD,indicatorsContainer:ID,indicatorSeparator:OD,input:YD,loadingIndicator:LD,loadingMessage:pD,menu:sD,menuList:dD,menuPortal:vD,multiValue:XD,multiValueLabel:ZD,multiValueRemove:eO,noOptionsMessage:hD,option:aO,placeholder:cO,singleValue:fO,valueContainer:xD},YO={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%)"},KO=4,Yg=4,qO=38,QO=Yg*2,JO={baseUnit:Yg,controlHeight:qO,menuGutter:QO},eu={borderRadius:KO,colors:YO,spacing:JO},XO={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:xg(),captureMenuScroll:!xg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:_O(),formatGroupLabel:HO,getOptionLabel:Wg,getOptionValue:Gg,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:WO,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!JP(),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 Kg(e,t,n,r){var i=Zg(e,t,n),o=em(e,t,n),a=Xg(e,t),l=cs(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:l,index:r}}function ls(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,l){return Kg(e,a,t,l)}).filter(function(a){return Jg(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Kg(e,n,t,r);return Jg(e,o)?o:void 0}).filter(eD)}function qg(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,ni(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Qg(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,ni(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 ZO(e,t){return qg(ls(e,t))}function Jg(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,l=t.value;return(!nm(e)||!o)&&tm(e,{label:a,value:l,data:i},r)}function eR(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 tR(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var tu=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},Xg=function(t,n){return t.getOptionLabel(n)},cs=function(t,n){return t.getOptionValue(n)};function Zg(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function em(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=cs(e,t);return n.some(function(i){return cs(e,i)===r})}function tm(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var nm=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},nR=1,rm=function(e){RP(n,e);var t=BP(n);function n(r){var i;if(DP(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=UO(),i.controlRef=null,i.getControlRef=function(s){i.controlRef=s},i.focusedOptionRef=null,i.getFocusedOptionRef=function(s){i.focusedOptionRef=s},i.menuListRef=null,i.getMenuListRef=function(s){i.menuListRef=s},i.inputRef=null,i.getInputRef=function(s){i.inputRef=s},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(s,c){var d=i.props,f=d.onChange,h=d.name;c.name=h,i.ariaOnChange(s,c),f(s,c)},i.setValue=function(s,c,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(s,{action:c,option:d})},i.selectOption=function(s){var c=i.props,d=c.blurInputOnSelect,f=c.isMulti,h=c.name,p=i.state.selectValue,m=f&&i.isOptionSelected(s,p),g=i.isOptionDisabled(s,p);if(m){var v=i.getOptionValue(s);i.setValue(p.filter(function(S){return i.getOptionValue(S)!==v}),"deselect-option",s)}else if(!g)f?i.setValue([].concat(ni(p),[s]),"select-option",s):i.setValue(s,"select-option");else{i.ariaOnChange(s,{action:"select-option",option:s,name:h});return}d&&i.blurInput()},i.removeValue=function(s){var c=i.props.isMulti,d=i.state.selectValue,f=i.getOptionValue(s),h=d.filter(function(m){return i.getOptionValue(m)!==f}),p=oo(c,h,h[0]||null);i.onChange(p,{action:"remove-value",removedValue:s}),i.focusInput()},i.clearValue=function(){var s=i.state.selectValue;i.onChange(oo(i.props.isMulti,[],null),{action:"clear",removedValues:s})},i.popValue=function(){var s=i.props.isMulti,c=i.state.selectValue,d=c[c.length-1],f=c.slice(0,c.length-1),h=oo(s,f,f[0]||null);i.onChange(h,{action:"pop-value",removedValue:d})},i.getFocusedOptionId=function(s){return tu(i.state.focusableOptionsWithIds,s)},i.getFocusableOptionsWithIds=function(){return Qg(ls(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var s=arguments.length,c=new Array(s),d=0;d<s;d++)c[d]=arguments[d];return GP.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(s){return Xg(i.props,s)},i.getOptionValue=function(s){return cs(i.props,s)},i.getStyles=function(s,c){var d=i.props.unstyled,f=GO[s](c,d);f.boxSizing="border-box";var h=i.props.styles[s];return h?h(f,c):f},i.getClassNames=function(s,c){var d,f;return(d=(f=i.props.classNames)[s])===null||d===void 0?void 0:d.call(f,c)},i.getElementId=function(s){return"".concat(i.state.instancePrefix,"-").concat(s)},i.getComponents=function(){return mO(i.props)},i.buildCategorizedOptions=function(){return ls(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return qg(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(s,c){i.setState({ariaSelection:ve({value:s},c)})},i.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(s){i.blockOptionHover=!1},i.onControlMouseDown=function(s){if(!s.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},i.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0)&&!i.props.isDisabled){var c=i.props,d=c.isMulti,f=c.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()):i.openMenu("first"),s.preventDefault()}},i.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(i.clearValue(),s.preventDefault(),i.openAfterFocus=!1,s.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(s){typeof i.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&is(s.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(s)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(s){var c=s.touches,d=c&&c.item(0);d&&(i.initialTouchX=d.clientX,i.initialTouchY=d.clientY,i.userIsDragging=!1)},i.onTouchMove=function(s){var c=s.touches,d=c&&c.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(s){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(s.target)&&i.menuListRef&&!i.menuListRef.contains(s.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(s){i.userIsDragging||i.onControlMouseDown(s)},i.onClearIndicatorTouchEnd=function(s){i.userIsDragging||i.onClearIndicatorMouseDown(s)},i.onDropdownIndicatorTouchEnd=function(s){i.userIsDragging||i.onDropdownIndicatorMouseDown(s)},i.handleInputChange=function(s){var c=i.props.inputValue,d=s.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(d,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(s){i.props.onFocus&&i.props.onFocus(s),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(s){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(s),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(s){if(!(i.blockOptionHover||i.state.focusedOption===s)){var c=i.getFocusableOptions(),d=c.indexOf(s);i.setState({focusedOption:s,focusedOptionId:d>-1?i.getFocusedOptionId(s):null})}},i.shouldHideSelectedOptions=function(){return nm(i.props)},i.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),i.focus()},i.onKeyDown=function(s){var c=i.props,d=c.isMulti,f=c.backspaceRemovesValue,h=c.escapeClearsValue,p=c.inputValue,m=c.isClearable,g=c.isDisabled,v=c.menuIsOpen,S=c.onKeyDown,w=c.tabSelectsValue,y=c.openMenuOnFocus,C=i.state,b=C.focusedOption,T=C.focusedValue,E=C.selectValue;if(!g&&!(typeof S=="function"&&(S(s),s.defaultPrevented))){switch(i.blockOptionHover=!0,s.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(T)i.removeValue(T);else{if(!f)return;d?i.popValue():m&&i.clearValue()}break;case"Tab":if(i.isComposing||s.shiftKey||!v||!w||!b||y&&i.isOptionSelected(b,E))return;i.selectOption(b);break;case"Enter":if(s.keyCode===229)break;if(v){if(!b||i.isComposing)return;i.selectOption(b);break}return;case"Escape":v?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:p}),i.onMenuClose()):m&&h&&i.clearValue();break;case" ":if(p)return;if(!v){i.openMenu("first");break}if(!b)return;i.selectOption(b);break;case"ArrowUp":v?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":v?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!v)return;i.focusOption("pageup");break;case"PageDown":if(!v)return;i.focusOption("pagedown");break;case"Home":if(!v)return;i.focusOption("first");break;case"End":if(!v)return;i.focusOption("last");break;default:return}s.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++nR),i.state.selectValue=rs(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),a=i.buildFocusableOptions(),l=a.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=a[l],i.state.focusedOptionId=tu(o,a[l])}return i}return OP(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&&Cg(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,l=o.menuIsOpen,s=this.state.isFocused;(s&&!a&&i.isDisabled||s&&l&&!i.menuIsOpen)&&this.focusInput(),s&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!s&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Cg(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,l=a.selectValue,s=a.isFocused,c=this.buildFocusableOptions(),d=i==="first"?0:c.length-1;if(!this.props.isMulti){var f=c.indexOf(l[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(s&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[d],focusedOptionId:this.getFocusedOptionId(c[d])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,l=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var s=a.indexOf(l);l||(s=-1);var c=a.length-1,d=-1;if(a.length){switch(i){case"previous":s===0?d=0:s===-1?d=c:d=s-1;break;case"next":s>-1&&s<c&&(d=s+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,l=this.getFocusableOptions();if(l.length){var s=0,c=l.indexOf(a);a||(c=-1),i==="up"?s=c>0?c-1:l.length-1:i==="down"?s=(c+1)%l.length:i==="pageup"?(s=c-o,s<0&&(s=0)):i==="pagedown"?(s=c+o,s>l.length-1&&(s=l.length-1)):i==="last"&&(s=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[s],focusedValue:null,focusedOptionId:this.getFocusedOptionId(l[s])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(eu):ve(ve({},eu),this.props.theme):eu}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,l=this.getClassNames,s=this.getValue,c=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:l,getValue:s,hasValue:g,isMulti:h,isRtl:p,options:m,selectOption:c,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 Zg(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return em(this.props,i,o)}},{key:"filterOption",value:function(i,o){return tm(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:l})}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,l=i.inputId,s=i.inputValue,c=i.tabIndex,d=i.form,f=i.menuIsOpen,h=i.required,p=this.getComponents(),m=p.Input,g=this.state,v=g.inputIsHidden,S=g.ariaSelection,w=this.commonProps,y=l||this.getElementId("input"),C=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()?(S==null?void 0:S.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?j.createElement(m,D({},w,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:y,innerRef:this.getInputRef,isDisabled:o,isHidden:v,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:d,type:"text",value:s},C)):j.createElement(PO,D({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ns,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:d,value:""},C))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,l=o.MultiValueContainer,s=o.MultiValueLabel,c=o.MultiValueRemove,d=o.SingleValue,f=o.Placeholder,h=this.commonProps,p=this.props,m=p.controlShouldRenderValue,g=p.isDisabled,v=p.isMulti,S=p.inputValue,w=p.placeholder,y=this.state,C=y.selectValue,b=y.focusedValue,T=y.isFocused;if(!this.hasValue()||!m)return S?null:j.createElement(f,D({},h,{key:"placeholder",isDisabled:g,isFocused:T,innerProps:{id:this.getElementId("placeholder")}}),w);if(v)return C.map(function(P,O){var G=P===b,z="".concat(i.getOptionLabel(P),"-").concat(i.getOptionValue(P));return j.createElement(a,D({},h,{components:{Container:l,Label:s,Remove:c},isFocused:G,isDisabled:g,key:z,index:O,removeProps:{onClick:function(){return i.removeValue(P)},onTouchEnd:function(){return i.removeValue(P)},onMouseDown:function(W){W.preventDefault()}},data:P}),i.formatOptionLabel(P,"value"))});if(S)return null;var E=C[0];return j.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,l=this.props,s=l.isDisabled,c=l.isLoading,d=this.state.isFocused;if(!this.isClearable()||!o||s||!this.hasValue()||c)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return j.createElement(o,D({},a,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,l=this.props,s=l.isDisabled,c=l.isLoading,d=this.state.isFocused;if(!o||!c)return null;var f={"aria-hidden":"true"};return j.createElement(o,D({},a,{innerProps:f,isDisabled:s,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var l=this.commonProps,s=this.props.isDisabled,c=this.state.isFocused;return j.createElement(a,D({},l,{isDisabled:s,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,l=this.props.isDisabled,s=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return j.createElement(o,D({},a,{innerProps:c,isDisabled:l,isFocused:s}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,l=o.GroupHeading,s=o.Menu,c=o.MenuList,d=o.MenuPortal,f=o.LoadingMessage,h=o.NoOptionsMessage,p=o.Option,m=this.commonProps,g=this.state.focusedOption,v=this.props,S=v.captureMenuScroll,w=v.inputValue,y=v.isLoading,C=v.loadingMessage,b=v.minMenuHeight,T=v.maxMenuHeight,E=v.menuIsOpen,P=v.menuPlacement,O=v.menuPosition,G=v.menuPortalTarget,z=v.menuShouldBlockScroll,A=v.menuShouldScrollIntoView,W=v.noOptionsMessage,Y=v.onMenuScrollToTop,N=v.onMenuScrollToBottom;if(!E)return null;var $=function(F,V){var te=F.type,se=F.data,ae=F.isDisabled,J=F.isSelected,le=F.label,ne=F.value,ge=g===se,Se=ae?void 0:function(){return i.onOptionHover(se)},Ue=ae?void 0:function(){return i.selectOption(se)},wt="".concat(i.getElementId("option"),"-").concat(V),at={id:wt,onClick:Ue,onMouseMove:Se,onMouseOver:Se,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:J};return j.createElement(p,D({},m,{innerProps:at,data:se,isDisabled:ae,isSelected:J,key:wt,label:le,type:te,value:ne,isFocused:ge,innerRef:ge?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(F.data,"menu"))},B;if(this.hasOptions())B=this.getCategorizedOptions().map(function(L){if(L.type==="group"){var F=L.data,V=L.options,te=L.index,se="".concat(i.getElementId("group"),"-").concat(te),ae="".concat(se,"-heading");return j.createElement(a,D({},m,{key:se,data:F,options:V,Heading:l,headingProps:{id:ae,data:L.data},label:i.formatGroupLabel(L.data)}),L.options.map(function(J){return $(J,"".concat(te,"-").concat(J.index))}))}else if(L.type==="option")return $(L,"".concat(L.index))});else if(y){var H=C({inputValue:w});if(H===null)return null;B=j.createElement(f,m,H)}else{var q=W({inputValue:w});if(q===null)return null;B=j.createElement(h,m,q)}var ee={minMenuHeight:b,maxMenuHeight:T,menuPlacement:P,menuPosition:O,menuShouldScrollIntoView:A},R=j.createElement(lD,D({},m,ee),function(L){var F=L.ref,V=L.placerProps,te=V.placement,se=V.maxHeight;return j.createElement(s,D({},m,ee,{innerRef:F,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:y,placement:te}),j.createElement(BO,{captureEnabled:S,onTopArrive:Y,onBottomArrive:N,lockEnabled:z},function(ae){return j.createElement(c,D({},m,{innerRef:function(le){i.getMenuListRef(le),ae(le)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:i.getElementId("listbox")},isLoading:y,maxHeight:se,focusedOption:g}),B)}))});return G||O==="fixed"?j.createElement(d,D({},m,{appendTo:G,controlElement:this.controlRef,menuPlacement:P,menuPosition:O}),R):R}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,l=o.isDisabled,s=o.isMulti,c=o.name,d=o.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!l)return j.createElement(FO,{name:c,onFocus:this.onValueInputFocus});if(!(!c||l))if(s)if(a){var h=f.map(function(g){return i.getOptionValue(g)}).join(a);return j.createElement("input",{name:c,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(g,v){return j.createElement("input",{key:"i-".concat(v),name:c,type:"hidden",value:i.getOptionValue(g)})}):j.createElement("input",{name:c,type:"hidden",value:""});return j.createElement("div",null,p)}else{var m=f[0]?this.getOptionValue(f[0]):"";return j.createElement("input",{name:c,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,l=o.focusedOption,s=o.focusedValue,c=o.isFocused,d=o.selectValue,f=this.getFocusableOptions();return j.createElement(SO,D({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:l,focusedValue:s,isFocused:c,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,l=i.SelectContainer,s=i.ValueContainer,c=this.props,d=c.className,f=c.id,h=c.isDisabled,p=c.menuIsOpen,m=this.state.isFocused,g=this.commonProps=this.getCommonProps();return j.createElement(l,D({},g,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:m}),this.renderLiveRegion(),j.createElement(o,D({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:m,menuIsOpen:p}),j.createElement(s,D({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),j.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,l=o.clearFocusValueOnUpdate,s=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,d=o.isFocused,f=o.prevWasFocused,h=o.instancePrefix,p=i.options,m=i.value,g=i.menuIsOpen,v=i.inputValue,S=i.isMulti,w=rs(m),y={};if(a&&(m!==a.value||p!==a.options||g!==a.menuIsOpen||v!==a.inputValue)){var C=g?ZO(i,w):[],b=g?Qg(ls(i,w),"".concat(h,"-option")):[],T=l?eR(o,w):null,E=tR(o,C),P=tu(b,E);y={selectValue:w,focusedOption:E,focusedOptionId:P,focusableOptionsWithIds:b,focusedValue:T,clearFocusValueOnUpdate:!1}}var O=s!=null&&i!==a?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},G=c,z=d&&f;return d&&!z&&(G={value:oo(S,w,w[0]||null),options:w,action:"initial-input-focus"},z=!f),(c==null?void 0:c.action)==="initial-input-focus"&&(G=null),ve(ve(ve({},y),O),{},{prevProps:i,ariaSelection:G,prevWasFocused:z})}}]),n}(x.Component);rm.defaultProps=XO;var rR=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function iR(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,l=e.inputValue,s=e.menuIsOpen,c=e.onChange,d=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,p=e.value,m=Cn(e,rR),g=x.useState(l!==void 0?l:n),v=Vn(g,2),S=v[0],w=v[1],y=x.useState(s!==void 0?s:i),C=Vn(y,2),b=C[0],T=C[1],E=x.useState(p!==void 0?p:a),P=Vn(E,2),O=P[0],G=P[1],z=x.useCallback(function(H,q){typeof c=="function"&&c(H,q),G(H)},[c]),A=x.useCallback(function(H,q){var ee;typeof d=="function"&&(ee=d(H,q)),w(ee!==void 0?ee:H)},[d]),W=x.useCallback(function(){typeof h=="function"&&h(),T(!0)},[h]),Y=x.useCallback(function(){typeof f=="function"&&f(),T(!1)},[f]),N=l!==void 0?l:S,$=s!==void 0?s:b,B=p!==void 0?p:O;return ve(ve({},m),{},{inputValue:N,menuIsOpen:$,onChange:z,onInputChange:A,onMenuClose:Y,onMenuOpen:W,value:B})}var oR=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],im=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},nu={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return im(t,o,i)})||r.some(function(o){return im(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function aR(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?nu.formatCreateLabel:o,l=e.isValidNewOption,s=l===void 0?nu.isValidNewOption:l,c=e.getNewOptionData,d=c===void 0?nu.getNewOptionData:c,f=e.onCreateOption,h=e.options,p=h===void 0?[]:h,m=e.onChange,g=Cn(e,oR),v=g.getOptionValue,S=v===void 0?Gg:v,w=g.getOptionLabel,y=w===void 0?Wg:w,C=g.inputValue,b=g.isLoading,T=g.isMulti,E=g.value,P=g.name,O=x.useMemo(function(){return s(C,rs(E),p,{getOptionValue:S,getOptionLabel:y})?d(C,a(C)):void 0},[a,d,y,S,C,s,p,E]),G=x.useMemo(function(){return(n||!b)&&O?i==="first"?[O].concat(ni(p)):[].concat(ni(p),[O]):p},[n,i,b,O,p]),z=x.useCallback(function(A,W){if(W.action!=="select-option")return m(A,W);var Y=Array.isArray(A)?A:[A];if(Y[Y.length-1]===O){if(f)f(C);else{var N=d(C,C),$={action:"create-option",name:P,option:N};m(oo(T,[].concat(ni(rs(E)),[N]),N),$)}return}m(A,W)},[d,C,T,P,O,f,m,E]);return ve(ve({},g),{},{options:G,onChange:z})}var sR=x.forwardRef(function(e,t){var n=iR(e),r=aR(n);return j.createElement(rm,D({ref:t},r))}),om=sR;const lR={control:(e,t)=>X(U({},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=>X(U({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>X(U({},e),{minHeight:"36px"}),menu:e=>X(U({},e),{position:"relative"}),clearIndicator:e=>X(U({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>X(U({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>X(U({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>X(U({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"14px"}),multiValueLabel:e=>X(U({},e),{color:"#333"})},cR=e=>e.map(t=>({label:t,value:t})),uR=e=>{const[t,n]=x.useState(""),[r,i]=x.useState(!1),o=cR(e.flags),a=()=>i(!r),l=f=>{e.onChange(f.map(h=>h.value))},s=f=>{n(f)},c=f=>{f.persist();const{key:h}=f;if(t)switch(h){case"Enter":case"Tab":if(e.flags&&e.flags.length===0){const p=[...e.flags,t];e.onChange(p)}if(e.flags&&e.flags.length>0&&d()){const p=[...e.flags,t];e.onChange(p)}n(""),f.preventDefault()}},d=()=>{let f=!1;return e.flags.length&&e.flags.includes(t)?(a(),f):(f=!0,f)};return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(om,{styles:lR,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:l,onInputChange:s,onKeyDown:c,placeholder:e.labels.flagsPlaceholder,value:o})}),u.jsx(ut,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},so=e=>{const[t,n]=x.useState(!1),[r,i]=x.useState(!1),[o,a]=x.useState(!1),[l,s]=x.useState(!1),[c,d]=x.useState(""),[f,h]=x.useState("primary"),[p,m]=x.useState(""),g=x.useRef(null),v=()=>{g.current&&g.current.click()},S=new Op,w=pt(),y=()=>{d(""),i(!1)},C=W=>{let Y="",N="primary";switch(W){case"copy_url":Y=e.labels.urlCopiedToClipboardMessage,N="primary";break;case"image_deleted":Y=e.labels.imageDeletedMessage,N="primary";break;case"image_reset":Y=e.labels.imageResetMessage,N="primary";break;case"upload_success":Y=e.labels.uploadingImageMessage,N="success";break;case"upload_failed":Y=e.labels.uploadingImageErrorMessage,N="danger";break;case"sign_in_url_failed":Y=e.labels.generateSignedInUrlErrorMessage,N="danger";break;case"encrypting_file_failed":Y=e.labels.encryptingImageErrorMessage,N="danger";break}h(N),d(Y),i(!0)},b=()=>a(!o),T=()=>s(!l),E=()=>{e.clearImage(),C("image_deleted")},P=W=>{navigator.clipboard.writeText(W),C("copy_url")},O=W=>k(this,null,function*(){W.persist();const Y=W.target.files?W.target.files[0]:null;if(Y){n(!0);try{const N=Y.type.split("/")[1],$=yield S.readFileAndHash(Y),B=(yield S.generateHashFileName(Y))+"."+N,H={image_type:N,image_file_name:B,image_size:Y.size,base64_sum:$},q=yield w==null?void 0:w.https.generateSignedInUrl(H);if(q!=null&&q.ok){const ee=yield q.json(),R={"Content-Type":Y.type,"Content-MD5":$};try{const L=new File([Y],B,{type:Y.type}),F=yield w==null?void 0:w.https.storeInBucket(ee.data.signed_url,L,R);e.onChangeImages(F||""),m(F),C("upload_success")}catch(L){console.error("There was a problem with uploading the file: ",L),C("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield q==null?void 0:q.json()),C("sign_in_url_failed")}catch(N){console.error("There was a problem with encrypting file...",N),C("encrypting_file_failed")}n(!1)}}),G=W=>k(this,null,function*(){if(W){n(!0);try{const Y=W.type.split("/")[1],N=yield S.readFileAndHash(W),$=(yield S.generateHashFileName(W))+"."+Y,B={image_type:Y,image_file_name:$,image_size:W.size,base64_sum:N},H=yield w==null?void 0:w.https.generateSignedInUrl(B);if(H!=null&&H.ok){const q=yield H.json(),ee={"Content-Type":W.type,"Content-MD5":N};try{const R=new File([W],$,{type:W.type}),L=yield w==null?void 0:w.https.storeInBucket(q.data.signed_url,R,ee);e.onChangeImages(L||""),C("upload_success")}catch(R){console.error("There was a problem with uploading the file: ",R),C("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield H==null?void 0:H.json()),C("sign_in_url_failed")}catch(Y){console.error("There was a problem with encrypting file...",Y),C("encrypting_file_failed")}n(!1)}}),z=()=>{e.onChangeImages(p),C("image_reset")},A=W=>{e.onChangeImages(W),m(W)};return u.jsxs(u.Fragment,{children:[u.jsxs(I.Card,{sx:{marginBottom:"10px"},children:[u.jsxs(I.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsx(I.Typography,{level:"title-lg",children:e.title}),u.jsx(I.Tooltip,{title:e.labels.clearImage,children:u.jsx(I.IconButton,{variant:"plain",color:"danger",size:"sm",onClick:E,children:u.jsx(Cp,{})})})]}),u.jsxs(I.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(I.Skeleton,{loading:t,animation:"wave",children:[e.image?u.jsx(I.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)"}}}):u.jsx(Ic,{sx:{fontSize:"3rem",opacity:.2}}),e.image?u.jsx(I.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:u.jsx(Mp,{sx:{fontSize:"3rem",color:"#fff"}})}):u.jsx(u.Fragment,{})]}),u.jsx(I.Tooltip,{title:e.labels.copyUrl,children:u.jsx(I.Button,{onClick:()=>P(e.image),disabled:!e.image,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Le.ContentCopy,{})})}),u.jsx(I.Tooltip,{title:e.labels.viewImage,children:u.jsx(I.Button,{onClick:b,disabled:!e.image,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(Bp,{})})}),u.jsx(I.Tooltip,{title:e.labels.cropImage,children:u.jsx(I.Button,{onClick:T,disabled:!e.image,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(eg,{})})})]}),u.jsx(I.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:u.jsxs(I.Button,{sx:{width:"100%"},onClick:v,children:[u.jsx(Le.Upload,{})," ",e.labels.uploadImage,u.jsx($p,{type:"file",accept:"image/*",onChange:O,ref:g})]})}),w.https.sportal365Config?u.jsx(I.AccordionGroup,{variant:"soft",children:u.jsxs(I.Accordion,{children:[u.jsx(I.AccordionSummary,{children:u.jsx(I.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.labels.sportal365Images})}),u.jsx(I.AccordionDetails,{children:u.jsx(Lp,{labels:e.labels,onChangeImages:A})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(ut,{showToast:r,message:c,color:f,hideToast:y}),u.jsx(Rp,{title:e.labels.viewImage,open:o,imageSrc:e.image,toggleModal:b}),u.jsx(Zp,{labels:e.labels,open:l,imageSrc:e.image,toggleModal:T,uploadImage:G,resetDefaultImageUrl:z})]})},dR=["cover","mobile"],fR=e=>new Map().set("main",e.mainImage).set("cover",e.coverImage).set("mobile",e.mobileImage),hR=e=>e?U({},e):{main:"",mobile:"",cover:""},pR=e=>{const[t,n]=x.useState(!1),r=hR(e.defaultValue),i=fR(e.labels),o=(l,s)=>{r[s]=l,e.onChange(r)},a=l=>{r[l]="",e.onChange(r)};return u.jsxs(I.Box,{sx:{marginBottom:"10px"},children:[u.jsx(so,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:l=>o(l,"main"),clearImage:()=>a("main")}),u.jsx(I.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?u.jsx(u.Fragment,{children:dR.map(l=>u.jsx(so,{labels:e.labels,title:i.get(l),image:r[l],onChangeImages:s=>o(s,l),clearImage:()=>a(l)},`images-${l}`))}):u.jsx(u.Fragment,{})]})};function gR(e){return it("MuiSheet",e)}Xe("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const mR=["className","color","component","variant","invertedColors","slots","slotProps"],vR=e=>{const{variant:t,color:n}=e,r={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`]};return lt(r,gR,{})},bR=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:l,background:s}=Zl({theme:e,ownerState:t},["borderRadius","bgcolor","backgroundColor","background"]),c=Zn(e,`palette.${a}`)||a||Zn(e,`palette.${l}`)||l||s||(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":c==="transparent"?"initial":c,"--Sheet-background":c==="transparent"?"initial":c},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&&G_(t.color)(e),t.variant==="soft"&&t.color&&t.invertedColors&&Y_(t.color)(e),(r=e.variants[t.variant])==null?void 0:r[t.color],i)]}),yR=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoySheet"}),{className:i,color:o="neutral",component:a="div",variant:l="plain",invertedColors:s=!1,slots:c={},slotProps:d={}}=r,f=Ae(r,mR),h=D({},r,{color:o,component:a,invertedColors:s,variant:l}),p=vR(h),m=D({},f,{component:a,slots:c,slotProps:d}),[g,v]=Ie("root",{ref:n,className:Ln(p.root,i),elementType:bR,externalForwardedProps:m,ownerState:h});return u.jsx(g,D({},v))});function CR(e){return it("MuiTypography",e)}Xe("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 xR=["color","textColor"],wR=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],ru=j.createContext(!1),IR=j.createContext(!1),SR=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 lt(a,CR,{})},AR=be("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),TR=be("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),ER=be("span",{name:"JoyTypography",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const l=t.level!=="inherit"?(n=e.typography[t.level])==null?void 0:n.lineHeight:"1";return D({"--Icon-fontSize":`calc(1em * ${l})`},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]))}),am={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"},iu=j.forwardRef(function(t,n){var r;const i=ct({props:t,name:"JoyTypography"}),{color:o,textColor:a}=i,l=Ae(i,xR),s=j.useContext(ru),c=j.useContext(IR),d=BA(D({},l,{color:a})),{component:f,gutterBottom:h=!1,noWrap:p=!1,level:m="body-md",levelMapping:g=am,children:v,endDecorator:S,startDecorator:w,variant:y,slots:C={},slotProps:b={}}=d,T=Ae(d,wR),E=(r=t.color)!=null?r:y?o!=null?o:"neutral":o,P=s||c?t.level||"inherit":m,O=Gf(v,["Skeleton"]),G=f||(s?"span":g[P]||am[P]||"span"),z=D({},d,{level:P,component:G,color:E,gutterBottom:h,noWrap:p,nesting:s,variant:y,unstable_hasSkeleton:O}),A=SR(z),W=D({},T,{component:G,slots:C,slotProps:b}),[Y,N]=Ie("root",{ref:n,className:A.root,elementType:ER,externalForwardedProps:W,ownerState:z}),[$,B]=Ie("startDecorator",{className:A.startDecorator,elementType:AR,externalForwardedProps:W,ownerState:z}),[H,q]=Ie("endDecorator",{className:A.endDecorator,elementType:TR,externalForwardedProps:W,ownerState:z});return u.jsx(ru.Provider,{value:!0,children:u.jsxs(Y,D({},N,{children:[w&&u.jsx($,D({},B,{children:w})),O?j.cloneElement(v,{variant:v.props.variant||"inline"}):v,S&&u.jsx(H,D({},q,{children:S}))]}))})});iu.muiName="Typography";function _R(e){return it("MuiFormControl",e)}const sm=Xe("MuiFormControl",["root","error","disabled","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),kR=Xe("MuiSwitch",["root","checked","disabled","action","input","thumb","track","focusVisible","readOnly","colorPrimary","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid","startDecorator","endDecorator"]),PR=["id","className","component","disabled","required","error","color","size","orientation","slots","slotProps"],DR=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 lt(a,_R,{})},OR=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",[`&.${sm.error}`]:{"--FormHelperText-color":e.vars.palette.danger[500]},[`&.${sm.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 ~ .${kR.root}`]:{"--unstable_Switch-margin":"0 0 0 auto"}})}),ou=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyFormControl"}),{id:i,className:o,component:a="div",disabled:l=!1,required:s=!1,error:c=!1,color:d,size:f="md",orientation:h="vertical",slots:p={},slotProps:m={}}=r,g=Ae(r,PR),v=ji(i),[S,w]=j.useState(null),y=D({},r,{id:v,component:a,color:d,disabled:l,error:c,required:s,size:f,orientation:h});let C;const b=DR(y),[T,E]=Ie("root",{ref:n,className:Ln(b.root,o),elementType:OR,externalForwardedProps:D({},g,{component:a,slots:p,slotProps:m}),ownerState:y}),P=j.useMemo(()=>({disabled:l,required:s,error:c,color:d,size:f,htmlFor:v,labelId:`${v}-label`,"aria-describedby":S?`${v}-helper-text`:void 0,setHelperText:w,registerEffect:C}),[d,l,c,S,v,C,s,f]);return u.jsx(Ua.Provider,{value:P,children:u.jsx(T,D({},E))})});function RR(e){return it("MuiFormLabel",e)}Xe("MuiFormLabel",["root","asterisk"]);const MR=["children","component","htmlFor","id","slots","slotProps"],LR=()=>lt({root:["root"],asterisk:["asterisk"]},RR,{}),BR=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)"})),$R=be("span",{name:"JoyFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})({color:"var(--FormLabel-asteriskColor)"}),au=j.forwardRef(function(t,n){var r,i;const o=ct({props:t,name:"JoyFormLabel"}),{children:a,component:l="label",htmlFor:s,id:c,slots:d={},slotProps:f={}}=o,h=Ae(o,MR),p=j.useContext(Ua),m=(r=(i=t.required)!=null?i:p==null?void 0:p.required)!=null?r:!1,g=D({},o,{required:m}),v=LR(),S=D({},h,{component:l,slots:d,slotProps:f}),[w,y]=Ie("root",{additionalProps:{htmlFor:s!=null?s:p==null?void 0:p.htmlFor,id:c!=null?c:p==null?void 0:p.labelId},ref:n,className:v.root,elementType:BR,externalForwardedProps:S,ownerState:g}),[C,b]=Ie("asterisk",{additionalProps:{"aria-hidden":!0},className:v.asterisk,elementType:$R,externalForwardedProps:S,ownerState:g});return u.jsxs(w,D({},y,{children:[a,m&&u.jsxs(C,D({},b,{children:[" ","*"]}))]}))}),NR=({environment:e,userNotFound:t})=>{const[n,r]=x.useState(""),[i,o]=x.useState(""),[a,l]=x.useState(!1),s=()=>{l(!a)},c=h=>{h.persist(),r(h.target.value)},d=h=>{h.persist(),o(h.target.value)},f=()=>k(this,null,function*(){try{yield zi(e).signInWithEmailAndPassword(n,i)}catch(h){console.error(h),s()}});return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:u.jsxs(yR,{sx:{width:300,mx:"auto",py:3,px:2,display:"flex",flexDirection:"column",justifyContent:"center",gap:2,borderRadius:"sm",boxShadow:"md"},variant:"outlined",children:[u.jsxs("div",{children:[u.jsx(iu,{level:"h4",component:"h1",children:u.jsx("b",{children:"Sign in"})}),u.jsx(iu,{level:"body-sm",children:"Use your account in the Fans United platform."})]}),u.jsxs(ou,{children:[u.jsx(au,{children:"Email"}),u.jsx(Ha,{name:"email",type:"email",onChange:c})]}),u.jsxs(ou,{children:[u.jsx(au,{children:"Password"}),u.jsx(Ha,{name:"password",type:"password",onChange:d})]}),u.jsx(Xr,{sx:{mt:1},onClick:f,children:"Log in"})]})}),u.jsx(ut,{showToast:a,message:t,color:"danger",hideToast:s})]})};function FR(e){return it("MuiCheckbox",e)}const ii=Xe("MuiCheckbox",["root","checkbox","action","input","label","checked","disabled","focusVisible","indeterminate","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid"]),zR=nc(u.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"),jR=nc(u.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"),VR=["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"],UR=e=>{const{checked:t,disabled:n,disableIcon:r,focusVisible:i,color:o,variant:a,size:l,indeterminate:s}=e,c={root:["root",t&&"checked",n&&"disabled",i&&"focusVisible",a&&`variant${ye(a)}`,o&&`color${ye(o)}`,l&&`size${ye(l)}`],checkbox:["checkbox",t&&"checked",s&&"indeterminate",n&&"disabled"],action:["action",t&&"checked",r&&n&&"disabled",i&&"focusVisible"],input:["input"],label:["label"]};return lt(c,FR,{})},HR=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,[`&.${ii.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,[`&.${ii.disabled}`]:{color:(i=t.variants[`${e.variant}Disabled`])==null||(i=i[e.color])==null?void 0:i.color}})}),WR=be("span",{name:"JoyCheckbox",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const l=(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"},{[`&.${ii.checked}, &.${ii.indeterminate}`]:{"--Icon-color":"currentColor"}}),...t.disableIcon?[]:[D({},l,{backgroundColor:(r=l==null?void 0:l.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]},{[`&.${ii.disabled}`]:(a=e.variants[`${t.variant}Disabled`])==null?void 0:a[t.color]}]]}),GR=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]},{[`&.${ii.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]}]:[]]}),YR=be("input",{name:"JoyCheckbox",slot:"Input",overridesResolver:(e,t)=>t.input})(()=>({margin:0,opacity:0,position:"absolute",width:"100%",height:"100%",cursor:"pointer"})),KR=be("label",{name:"JoyCheckbox",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>D({flex:1,minWidth:0},e.disableIcon&&{zIndex:1,pointerEvents:"none"})),qR=u.jsx(zR,{}),QR=u.jsx(jR,{}),JR=j.forwardRef(function(t,n){var r,i,o,a,l;const s=ct({props:t,name:"JoyCheckbox"}),{checked:c,uncheckedIcon:d,checkedIcon:f=qR,label:h,defaultChecked:p,disabled:m,disableIcon:g=!1,overlay:v,id:S,indeterminate:w=!1,indeterminateIcon:y=QR,name:C,onBlur:b,onChange:T,onFocus:E,onFocusVisible:P,readOnly:O,required:G,value:z,color:A,variant:W,size:Y="md",component:N,slots:$={},slotProps:B={}}=s,H=Ae(s,VR),q=j.useContext(Ua),ee=(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:Y,L=ji(S!=null?S:q==null?void 0:q.htmlFor),F={checked:c,defaultChecked:p,disabled:ee,onBlur:b,onChange:T,onFocus:E,onFocusVisible:P},{getInputProps:V,checked:te,disabled:se,focusVisible:ae}=TS(F),J=te||w,ge=J?W||"solid":W||"outlined",Se=t.color||(q!=null&&q.error?"danger":(l=q==null?void 0:q.color)!=null?l:A),at=D({},s,{checked:te,disabled:se,disableIcon:g,overlay:v,focusVisible:ae,color:J?Se||"primary":Se||"neutral",variant:ge,size:R}),kt=UR(at),de=D({},H,{component:N,slots:$,slotProps:B}),[he,Ce]=Ie("root",{ref:n,className:kt.root,elementType:HR,externalForwardedProps:de,ownerState:at}),[Te,He]=Ie("checkbox",{className:kt.checkbox,elementType:WR,externalForwardedProps:de,ownerState:at}),[Pe,Ee]=Ie("action",{className:kt.action,elementType:GR,externalForwardedProps:de,ownerState:at}),[It,St]=Ie("input",{additionalProps:D({id:L,name:C,value:z,readOnly:O,role:void 0,required:G!=null?G:q==null?void 0:q.required,"aria-describedby":q==null?void 0:q["aria-describedby"]},w&&{"aria-checked":"mixed"}),className:kt.input,elementType:YR,externalForwardedProps:de,getSlotProps:V,ownerState:at}),[jt,Mt]=Ie("label",{additionalProps:{htmlFor:L},className:kt.label,elementType:KR,externalForwardedProps:de,ownerState:at});let qt=d;return g?qt=null:w?qt=y:te&&(qt=f),u.jsxs(he,D({},Ce,{children:[u.jsxs(Te,D({},He,{children:[u.jsx(Pe,D({},Ee,{children:u.jsx(It,D({},St))})),qt]})),h&&u.jsx(ru.Provider,{value:!0,children:u.jsx(jt,D({},Mt,{children:h}))})]}))}),XR=Ve(u.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),oi=({label:e,values:t,allValues:n,valuesMap:r,showAll:i,showAllLabel:o,onChange:a,toggleShowAll:l})=>{const s=(c,d)=>{c.persist();let f=[...t];if(c.target.checked){f.push(d),a(f);return}f=t.filter(h=>h!==d),a(f)};return u.jsxs(I.Box,{sx:{mb:2},children:[u.jsx(I.Typography,{level:"body-sm",mb:1,children:e}),u.jsxs(D1,{orientation:"horizontal",wrap:!0,sx:{"--List-gap":"8px","--ListItem-radius":"20px","--ListItem-minHeight":"32px","--ListItem-gap":"4px"},children:[n.map(c=>u.jsxs(Lh,{children:[t.includes(c)&&u.jsx(XR,{fontSize:"medium",color:"primary",sx:{ml:-.5,zIndex:2,pointerEvents:"none"}}),u.jsx(JR,{checked:t.includes(c),variant:t.includes(c)?"soft":"outlined",overlay:!0,disableIcon:!0,label:r[c]||"N/A",onChange:d=>s(d,c),slotProps:{action:({checked:d})=>({sx:d?{border:"1px solid",borderColor:"primary.500"}:{backgroundColor:"#fff"}})}})]},`checkbox-value-${e}-${c}`)),i===!1?u.jsx(Lh,{children:u.jsx(I.Link,{onClick:l,children:o})}):u.jsx(u.Fragment,{})]})]})},ai={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"]},ZR=({labels:e,values:t,valuesMap:n,onChange:r})=>{const[i,o]=x.useState(!1);return u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.marketSelection}),u.jsx(I.FormHelperText,{sx:{mb:2},children:e.marketSelectionDescription}),u.jsx(oi,{label:"Popular",values:t,allValues:ai.popular,valuesMap:n,showAll:i,showAllLabel:e.showAll,onChange:r,toggleShowAll:()=>o(!0)}),i?u.jsxs(u.Fragment,{children:[u.jsx(oi,{label:e.playerRelated,values:t,allValues:ai.playerRelated,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.goals,values:t,allValues:ai.goals,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.corners,values:t,allValues:ai.corners,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.correctScores,values:t,allValues:ai.correctScores,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.misc,values:t,allValues:ai.misc,valuesMap:n,onChange:r})]}):u.jsx(u.Fragment,{})]})},gt={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="},eM=({match:e,timeFormat:t})=>{var n,r,i,o;return u.jsxs(I.Box,{display:"flex",alignItems:"center",gap:.5,fontSize:"xs",children:[u.jsxs(I.Typography,{mr:1,children:["[",_t(e.kickoffAt).format(t),"]"]}),e.homeTeam.code?u.jsx(I.Tooltip,{title:e.homeTeam.name,children:u.jsxs(I.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[u.jsx(I.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(I.Avatar,{src:((n=e.homeTeam.assets)==null?void 0:n.logo)||gt.team,sx:{width:"20px",height:"20px"}})]})}):u.jsxs(u.Fragment,{children:[u.jsx(I.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(I.Avatar,{src:((r=e.homeTeam.assets)==null?void 0:r.logo)||gt.team,sx:{width:"20px",height:"20px"}})]}),"-",e.awayTeam.code?u.jsx(I.Tooltip,{title:e.awayTeam.name,children:u.jsxs(I.Box,{display:"flex",gap:.5,alignItems:"center",children:[u.jsx(I.Avatar,{src:((i=e.awayTeam.assets)==null?void 0:i.logo)||gt.team,sx:{width:"20px",height:"20px"}})," ",u.jsx(I.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})}):u.jsxs(u.Fragment,{children:[u.jsx(I.Avatar,{src:((o=e.awayTeam.assets)==null?void 0:o.logo)||gt.team,sx:{width:"20px",height:"20px"}}),u.jsx(I.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})]})},lm=Ve(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),tM=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),{sdk:l}=pt(),s=()=>k(this,null,function*(){try{const h=yield l.topX.getGames({limit:50},!0),p=yield l.matchQuiz.getGames({limit:50},!0),m=[...h.data,...p.data];if(e.related&&e.related.length>0){const g=m.filter(v=>{var S;return(S=e.related)==null?void 0:S.some(w=>w.entity_id===v.id)}).map(v=>v.id);n(g)}i(m)}catch(f){console.error(f),d()}}),c=(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(()=>{s()},[]),u.jsxs(u.Fragment,{children:[r.length>0?u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.label}),u.jsx(I.Select,{multiple:!0,indicator:u.jsx(lm,{}),defaultValue:t,renderValue:f=>u.jsx(I.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(I.Chip,{variant:"soft",color:"primary",children:h.label},`related-game-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${I.selectClasses.indicator}`]:{transition:"0.2s",[`&.${I.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(I.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}`))})]}):u.jsx(u.Fragment,{}),u.jsx(ut,{showToast:o,message:"There was a problem witch fetching games for related options",color:"danger",hideToast:d})]})},nM=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),{sdk:l}=pt(),s=()=>k(this,null,function*(){try{const h=yield l.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(v=>v.entity_id===m.id)}).map(m=>m.id);n(p)}i(h.data)}catch(f){console.error(f),d()}}),c=(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(()=>{s()},[]),u.jsxs(u.Fragment,{children:[r.length>0?u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.label}),u.jsx(I.Select,{multiple:!0,indicator:u.jsx(lm,{}),defaultValue:t,renderValue:f=>u.jsx(I.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(I.Chip,{variant:"soft",color:"primary",children:h.label},`related-template-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${I.selectClasses.indicator}`]:{transition:"0.2s",[`&.${I.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(I.Option,{value:f.id,children:f.name||`Template with no name. ID: ${f.id}`},`related-template-name-${f.id}`))})]}):u.jsx(u.Fragment,{}),u.jsx(ut,{showToast:o,message:"There was a problem witch fetching templates for related options",color:"danger",hideToast:d})]})},cm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="game"),um=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="template"),rM=e=>{const t=(n,r)=>{if(r==="games"){const i=um(e.related);e.onChange([...n,...i])}if(r==="templates"){const i=cm(e.related);e.onChange([...n,...i])}};return u.jsxs(u.Fragment,{children:[u.jsx(tM,{label:e.labels.games,related:cm(e.related),onChange:n=>t(n,"games")}),u.jsx(nM,{label:e.labels.templates,related:um(e.related),onChange:n=>t(n,"templates")})]})},iM=(e,t)=>{const[n,r]=x.useState(null),{https:i}=pt(),o=()=>k(this,null,function*(){const a=yield i.getSchedulersByEntityId(e);if(a.ok){const l=yield a.json();r(l.data);return}r([])});return x.useEffect(()=>(o(),()=>r(null)),[e,t]),n},us=({my:e})=>u.jsx(I.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",my:e},children:u.jsx(I.CircularProgress,{variant:"solid",color:"neutral"})}),oM=["PENDING","LIVE","SETTLED"],aM=["CANCELED","LIVE","OPEN","PENDING"],sM=["ACTIVE","INACTIVE","EXPIRED"],lM=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"),dm=e=>{let t=[];return e.entityType==="CLASSIC_QUIZ"||e.entityType==="EITHER_OR"||e.entityType==="POLL"?t=Array.from(sM):e.entityType==="TEMPLATE"?t=Array.from(oM):t=Array.from(aM),u.jsx(u.Fragment,{children:t.map(n=>u.jsx(I.Option,{value:n,children:lM.get(n)},`${e.entityType}-${n}-status`))})};class cM{constructor(){oe(this,"name","");oe(this,"scheduled_task_config",{entity_id:"",entity_type:"",change:{status:""}});oe(this,"trigger",{trigger_type:"DATETIME",date:""})}}const uM=Ve(u.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"),dM=e=>{const[t,n]=x.useState(!1),{https:r}=pt(),i=o=>k(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 u.jsx(u.Fragment,{children:u.jsx(I.Modal,{open:e.isOpen,onClose:e.toggleModal,children:u.jsxs(I.ModalDialog,{children:[u.jsxs(I.DialogTitle,{children:[u.jsx(uM,{}),e.labels.deleteScheduledTaskModalTitle]}),u.jsx(I.Divider,{}),u.jsx(I.DialogContent,{children:u.jsxs(I.Typography,{children:[e.labels.deleteScheduledTaskModalParagraph,u.jsx(I.Typography,{fontWeight:"bold",children:e.taskName}),"?"]})}),u.jsxs(I.DialogActions,{children:[u.jsx(I.Button,{loading:t,variant:"solid",color:"danger",onClick:o=>i(o),children:e.labels.delete}),u.jsx(I.Button,{variant:"plain",color:"neutral",onClick:o=>{o.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]})})})},fM=e=>{const[t,n]=x.useState(null),[r,i]=x.useState(""),[o,a]=x.useState(""),[l,s]=x.useState(""),[c,d]=x.useState(""),[f,h]=x.useState(!1),[p,m]=x.useState(!1),[g,v]=x.useState(!1),[S,w]=x.useState("success"),[y,C]=x.useState(""),[b,T]=x.useState(!1),E=x.useRef(!1),P=iM(e.entityId,E.current),{https:O}=pt();if(!P)return u.jsx(us,{my:10});const G=()=>T(!b),z=(B,H)=>{v(!0),w(B),C(H)},A=(B,H)=>{i(H.scheduled_task_config.change.status),s(H.trigger.date),n(B)},W=()=>k(this,null,function*(){h(!0);const B=$("CREATE","");if((yield O.setSchedulers(B,"CREATE",null)).ok){h(!1),a(""),d(""),E.current=!E.current,z("success",e.labels.createScheduledTaskMessage);return}h(!1),a(""),d(""),z("danger",e.labels.createScheduledTaskErrorMessage)}),Y=(B,H)=>k(this,null,function*(){m(!0);const q=$("UPDATE",H);if((yield O.setSchedulers(q,"UPDATE",B)).ok){m(!1),n(null),i(""),s(""),E.current=!E.current,z("success",e.labels.updateScheduledTaskMessage);return}m(!1),z("danger",e.labels.updateScheduledTaskErrorMessage),n(null),i(""),s("")}),N=()=>{E.current=!E.current},$=(B,H)=>{const q=new cM,ee=B==="CREATE"?o:r,R=B==="CREATE"?null:H,L=B==="CREATE"?c:l;return q.scheduled_task_config.entity_id=e.entityId,q.scheduled_task_config.entity_type=e.entityType,q.scheduled_task_config.change.status=ee,q.trigger.date=L,q.name=R,q};return u.jsxs(u.Fragment,{children:[P.map((B,H)=>u.jsx(I.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(I.CardContent,{children:t===H?u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%"},children:[u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(I.Select,{value:r,size:"sm",name:"status",onChange:(q,ee)=>i(ee),sx:{minHeight:"36px"},children:u.jsx(dm,{entityType:e.entityType})})]}),u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Vc,{defaultDate:l,onChange:q=>s(q)})]}),r&&l?u.jsx(I.Button,{onClick:()=>Y(B.id,B.name),loading:p,sx:{mt:"auto"},children:e.labels.save}):u.jsx(I.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.save})]}):u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"}},children:[u.jsxs(I.Box,{children:[u.jsxs(I.Typography,{style:{fontWeight:"bold"},children:[e.labels.name,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:B.name})]}),u.jsxs(I.Typography,{style:{color:"gray"},children:[e.labels.status,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:B.status})]})]}),u.jsxs(I.Box,{children:[u.jsx(I.Tooltip,{title:e.labels.edit,children:u.jsx(I.IconButton,{onClick:()=>A(H,B),children:u.jsx(Le.Edit,{})})}),u.jsx(I.Tooltip,{title:e.labels.delete,children:u.jsx(I.IconButton,{onClick:G,children:u.jsx(Le.Delete,{})})})]}),u.jsx(dM,{labels:e.labels,isOpen:b,taskId:B.id,taskName:B.name,toggleModal:G,refetchTasks:N,toggleToast:z})]})})},`scheduled-task-${e.entityId}-${e.entityType}-${B.id}`)),u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%",mt:P&&P.length?2:0},children:[u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(I.Select,{value:o,size:"sm",name:"status",onChange:(B,H)=>a(H),sx:{minHeight:"37px"},children:u.jsx(dm,{entityType:e.entityType})})]}),u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Vc,{defaultDate:c,onChange:B=>d(B)})]}),o&&c?u.jsx(I.Button,{onClick:W,loading:f,sx:{mt:"auto"},children:e.labels.create}):u.jsx(I.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.create})]}),u.jsx(ut,{showToast:g,message:y,color:S,hideToast:()=>v(!1)})]})};function hM(e){return it("MuiIconButton",e)}Xe("MuiIconButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","loading","loadingIndicator"]);const pM=["children","action","component","color","disabled","variant","loading","loadingIndicator","size","slots","slotProps"],gM=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,size:o,variant:a,loading:l}=e,s={root:["root",n&&"disabled",r&&"focusVisible",a&&`variant${ye(a)}`,t&&`color${ye(t)}`,o&&`size${ye(o)}`,l&&"loading"],loadingIndicator:["loadingIndicator"]},c=lt(s,hM,{});return r&&i&&(c.root+=` ${i}`),c},mM=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]})]}),vM=be(mM,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),bM=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})}),fm=j.forwardRef(function(t,n){var r;const i=ct({props:t,name:"JoyIconButton"}),{children:o,action:a,component:l="button",color:s="neutral",disabled:c,variant:d="plain",loading:f=!1,loadingIndicator:h,size:p="md",slots:m={},slotProps:g={}}=i,v=Ae(i,pM),S=j.useContext(Sp),w=j.useContext(Ap),y=t.variant||S.variant||d,C=t.size||S.size||p,b=t.color||S.color||s,T=(r=t.loading||t.disabled)!=null?r:S.disabled||f||c,E=j.useRef(null),P=sn(E,n),{focusVisible:O,setFocusVisible:G,getRootProps:z}=Rl(D({},i,{disabled:T,rootRef:P})),A=h!=null?h:u.jsx(wp,{color:b,thickness:{sm:2,md:3,lg:4}[C]||3});j.useImperativeHandle(a,()=>({focusVisible:()=>{var L;G(!0),(L=E.current)==null||L.focus()}}),[G]);const W=D({},i,{component:l,color:b,disabled:T,variant:y,loading:f,size:C,focusVisible:O,instanceSize:t.size}),Y=gM(W),N=L=>{var F;let V=i.onClick;if(typeof g.root=="function"?V=g.root(W).onClick:g.root&&(V=g.root.onClick),(F=V)==null||F(L),w){var te;(te=w.onClick)==null||te.call(w,L,i.value)}};let $=i["aria-pressed"];typeof g.root=="function"?$=g.root(W)["aria-pressed"]:g.root&&($=g.root["aria-pressed"]),w!=null&&w.value&&(Array.isArray(w.value)?$=w.value.indexOf(i.value)!==-1:$=w.value===i.value);const B=D({},v,{component:l,slots:m,slotProps:g}),[H,q]=Ie("root",{ref:n,className:Y.root,elementType:vM,getSlotProps:z,externalForwardedProps:B,ownerState:W,additionalProps:{onClick:N,"aria-pressed":$}}),[ee,R]=Ie("loadingIndicator",{className:Y.loadingIndicator,elementType:bM,externalForwardedProps:B,ownerState:W});return u.jsx(H,D({},q,{children:f?u.jsx(ee,D({},R,{children:A})):o}))});fm.muiName="IconButton";const hm=Ve(u.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"),yM=({label:e,defaultValue:t,options:n,required:r,onChange:i})=>{function o(s){var c,d;return s?u.jsxs(u.Fragment,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx(I.Avatar,{size:"sm",src:((d=(c=n.find(f=>f.id===s.value))==null?void 0:c.assets)==null?void 0:d.logo)||gt.competition})}),s.label]}):null}const a=x.useRef(null),l=(s,c)=>{i(c)};return u.jsxs(I.FormControl,{sx:{mb:1},children:[u.jsx(I.FormLabel,{required:r,color:"primary",children:e}),u.jsx(I.Select,X(U({slotProps:{button:{sx:{whiteSpace:"nowrap"}}},sx:{"--ListItemDecorator-size":"44px",minHeight:"37px"},renderValue:o,value:t,onChange:l},t&&{endDecorator:u.jsx(fm,{variant:"plain",color:"neutral",onMouseDown:s=>{s.stopPropagation()},onClick:()=>{var s;i(""),(s=a.current)==null||s.focusVisible()},sx:{width:"18px",height:"18px"},children:u.jsx(hm,{})}),indicator:null}),{children:n.map((s,c)=>{var d;return u.jsxs(x.Fragment,{children:[c!==0?u.jsx(I.ListDivider,{role:"none"}):null,u.jsxs(I.Option,{value:s.id,label:s.name,children:[u.jsx(I.ListItemDecorator,{children:u.jsx(I.Avatar,{size:"sm",src:((d=s.assets)==null?void 0:d.logo)||gt.competition})}),s.name]})]},`${s.id}-${c}`)})}))]})};function CM(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var pm=CM,xM=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,wM=xM,IM=wM,SM=typeof self=="object"&&self&&self.Object===Object&&self,AM=IM||SM||Function("return this")(),gm=AM,TM=gm,EM=function(){return TM.Date.now()},_M=EM,kM=/\s/;function PM(e){for(var t=e.length;t--&&kM.test(e.charAt(t)););return t}var DM=PM,OM=DM,RM=/^\s+/;function MM(e){return e&&e.slice(0,OM(e)+1).replace(RM,"")}var LM=MM,BM=gm,$M=BM.Symbol,su=$M,mm=su,vm=Object.prototype,NM=vm.hasOwnProperty,FM=vm.toString,lo=mm?mm.toStringTag:void 0;function zM(e){var t=NM.call(e,lo),n=e[lo];try{e[lo]=void 0;var r=!0}catch(o){}var i=FM.call(e);return r&&(t?e[lo]=n:delete e[lo]),i}var jM=zM,VM=Object.prototype,UM=VM.toString;function HM(e){return UM.call(e)}var WM=HM,bm=su,GM=jM,YM=WM,KM="[object Null]",qM="[object Undefined]",ym=bm?bm.toStringTag:void 0;function QM(e){return e==null?e===void 0?qM:KM:ym&&ym in Object(e)?GM(e):YM(e)}var JM=QM;function XM(e){return e!=null&&typeof e=="object"}var ZM=XM,eL=JM,tL=ZM,nL="[object Symbol]";function rL(e){return typeof e=="symbol"||tL(e)&&eL(e)==nL}var Cm=rL,iL=LM,xm=pm,oL=Cm,wm=NaN,aL=/^[-+]0x[0-9a-f]+$/i,sL=/^0b[01]+$/i,lL=/^0o[0-7]+$/i,cL=parseInt;function uL(e){if(typeof e=="number")return e;if(oL(e))return wm;if(xm(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=xm(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=iL(e);var n=sL.test(e);return n||lL.test(e)?cL(e.slice(2),n?2:8):aL.test(e)?wm:+e}var dL=uL,fL=pm,lu=_M,Im=dL,hL="Expected a function",pL=Math.max,gL=Math.min;function mL(e,t,n){var r,i,o,a,l,s,c=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(hL);t=Im(t)||0,fL(n)&&(d=!!n.leading,f="maxWait"in n,o=f?pL(Im(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(T){var E=r,P=i;return r=i=void 0,c=T,a=e.apply(P,E),a}function m(T){return c=T,l=setTimeout(S,t),d?p(T):a}function g(T){var E=T-s,P=T-c,O=t-E;return f?gL(O,o-P):O}function v(T){var E=T-s,P=T-c;return s===void 0||E>=t||E<0||f&&P>=o}function S(){var T=lu();if(v(T))return w(T);l=setTimeout(S,g(T))}function w(T){return l=void 0,h&&r?p(T):(r=i=void 0,a)}function y(){l!==void 0&&clearTimeout(l),c=0,r=s=i=l=void 0}function C(){return l===void 0?a:w(lu())}function b(){var T=lu(),E=v(T);if(r=arguments,i=this,s=T,E){if(l===void 0)return m(s);if(f)return clearTimeout(l),l=setTimeout(S,t),p(s)}return l===void 0&&(l=setTimeout(S,t)),a}return b.cancel=y,b.flush=C,b}var vL=mL;const si=fn(vL),xn=({option:e})=>u.jsxs(I.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(I.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:e.logo}),u.jsx(I.Typography,{children:e.label}),u.jsx(I.Typography,{ml:.5,level:"body-xs",children:`(${e.countryName})`})]}),Sm=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)||gt.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)||gt.flag}}))||[],bL=({labels:e,label:t,ids:n,required:r,onChange:i})=>{const[o,a]=x.useState([]),[l,s]=x.useState([]),[c,d]=x.useState(!1),[f,h]=x.useState(""),[p,m]=x.useState(!1),{sdk:g}=pt(),v=()=>m(!p),S=(b,T)=>{a(T),i(T[0]?[T[0].id]:[])},w=3;x.useEffect(()=>{!f&&n&&n.length&&g.football.getCompetitions({competitionIds:n}).then(b=>{a(Sm(b))}).catch(b=>{console.error(b),v(),a([])})},[]);const y=x.useMemo(()=>si(b=>{d(!0),g.football.getCompetitions({name:b}).then(T=>{s([...Sm(T)]),d(!1)}).catch(T=>{console.error(T),v(),s([]),d(!1)})},300),[]);x.useEffect(()=>{if(!f||f.length<w){s([]);return}return y(f),()=>y.cancel()},[f,y]);const C=(b,T)=>b.map((E,P)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:O=>T({index:P}).onClick(O),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(xn,{option:E},`option_${E.id}`)},E.id));return u.jsxs(I.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{required:r,color:"primary",children:t}),u.jsx(I.Box,{children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:c,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(b,T)=>b.id===T.id,endDecorator:c?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.competitionsSelectionPlaceholder,options:l,disabled:o.length===1,filterOptions:b=>b.filter(T=>!o.some(E=>E.value===T.value)),onInputChange:(b,T)=>{h(T)},onChange:S,getOptionKey:b=>b.id,value:o,renderTags:C,renderOption:(b,T)=>u.jsx(I.AutocompleteOption,X(U({},b),{children:u.jsx(xn,{option:T})}))})}),u.jsx(ut,{showToast:p,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:v})]})},Am=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)||gt.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)||gt.flag}}))||[],yL=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=x.useState([]),[a,l]=x.useState([]),[s,c]=x.useState(!1),[d,f]=x.useState(""),[h,p]=x.useState(!1),{sdk:m}=pt(),g=()=>p(!h),v=(C,b)=>{o(b);const T=b.map(E=>E.id);r(T&&T.length?T:null)},S=3;x.useEffect(()=>{!d&&t&&t.length&&m.football.getCompetitions({competitionIds:t}).then(C=>{o(Am(C))}).catch(C=>{console.error(C),g(),o([])})},[]);const w=x.useMemo(()=>si(C=>{c(!0);const b={name:C,competitionIds:[""]};n&&Array.isArray(n)&&n.length>0?b.competitionIds=Array.from(n):delete b.competitionIds,m.football.getCompetitions(b).then(T=>{l([...Am(T)]),c(!1)}).catch(T=>{console.error(T),g(),l([]),c(!1)})},300),[]);x.useEffect(()=>{if(!d||d.length<S){l([]);return}return w(d),()=>w.cancel()},[d,w]);const y=(C,b)=>C.map((T,E)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:P=>b({index:E}).onClick(P),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(xn,{option:T},`option_${T.id}`)},T.id));return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:s,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(C,b)=>C.id===b.id,endDecorator:s?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.competitionsSelectionPlaceholder,options:a,filterOptions:C=>C.filter(b=>!i.some(T=>T.value===b.value)),onInputChange:(C,b)=>{f(b)},onChange:v,getOptionKey:C=>C.id,value:i,renderTags:y,renderOption:(C,b)=>u.jsx(I.AutocompleteOption,X(U({},C),{children:u.jsx(xn,{option:b})}))})}),u.jsx(ut,{showToast:h,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:g})]})},Tm=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})))||[],CL=({labels:e,ids:t,onChange:n})=>{const[r,i]=x.useState([]),[o,a]=x.useState([]),[l,s]=x.useState(!1),[c,d]=x.useState(""),[f,h]=x.useState(!1),{sdk:p}=pt(),m=()=>h(!f),g=(y,C)=>{i(C);const b=C.map(T=>T.id);n(b&&b.length?b:null)},v=3;x.useEffect(()=>{!c&&t&&t.length&&p.profile.getByIds(t).then(y=>{i(Tm(y))}).catch(y=>{m(),console.error(y),i([])})},[]);const S=x.useMemo(()=>si(y=>{s(!0),p.profile.getByIds([],y).then(C=>{a([...Tm(C)]),s(!1)}).catch(C=>{console.error(C),m(),a([]),s(!1)})},300),[]);x.useEffect(()=>{if(!c||c.length<v){a([]);return}return S(c),()=>S.cancel()},[c,S]);const w=(y,C)=>y.map((b,T)=>{var E;return u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:P=>C({index:T}).onClick(P),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsxs(I.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(I.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(E=b.avatar)!=null?E:gt.avatar}),u.jsx(I.Typography,{children:b.label})]})},b.id)});return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:l,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(y,C)=>y.id===C.id,endDecorator:l?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:y=>y.filter(C=>!r.some(b=>b.value===C.value)),onInputChange:(y,C)=>{d(C)},onChange:g,getOptionKey:y=>y.id,value:r,renderTags:w,renderOption:(y,C)=>{var b;return u.jsx(I.AutocompleteOption,X(U({},y),{children:u.jsxs(I.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(I.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(b=C.avatar)!=null?b:gt.avatar}),u.jsx(I.Typography,{children:C.label})]})}))}})}),u.jsx(ut,{showToast:f,message:e.searchProfilesErrorMessage,color:"danger",hideToast:m})]})},Em=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)||gt.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)||gt.flag}}))||[],xL=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=x.useState([]),[a,l]=x.useState([]),[s,c]=x.useState(!1),[d,f]=x.useState(""),[h,p]=x.useState(!1),{sdk:m}=pt(),g=()=>p(!h),v=(C,b)=>{o(b);const T=b.map(E=>E.id);r(T&&T.length?T:null)},S=3;x.useEffect(()=>{!d&&t&&t.length&&m.football.getTeams({teamIds:t,scope:n}).then(C=>{const b=C.data.filter(T=>!T.name.includes("/"));o(Em(b))}).catch(C=>{console.error(C),g(),o([])})},[]);const w=x.useMemo(()=>si(C=>{c(!0),m.football.getTeams({name:C,scope:n}).then(b=>{const T=b.data.filter(E=>!E.name.includes("/"));l([...Em(T)]),c(!1)}).catch(b=>{console.error(b),g(),l([]),c(!1)})},300),[]);x.useEffect(()=>{if(!d||d.length<S){l([]);return}return w(d),()=>w.cancel()},[d,w]);const y=(C,b)=>C.map((T,E)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:P=>b({index:E}).onClick(P),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(xn,{option:T},`option_${T.id}`)},T.id));return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:s,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(C,b)=>C.id===b.id,endDecorator:s?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.teamsSelectionPlaceholder,options:a,filterOptions:C=>C.filter(b=>!i.some(T=>T.value===b.value)),onInputChange:(C,b)=>{f(b)},onChange:v,getOptionKey:C=>C.id,value:i,renderTags:y,renderOption:(C,b)=>u.jsx(I.AutocompleteOption,X(U({},C),{children:u.jsx(xn,{option:b})}))})}),u.jsx(ut,{showToast:h,message:e.searchTeamsErrorMessage,color:"danger",hideToast:g})]})},_m=({checked:e,disabled:t,onChange:n})=>u.jsx(I.Switch,{color:e?"success":"danger",checked:e,disabled:t,onChange:r=>n(r.target.checked),sx:{ml:1,"--Switch-thumbSize":"16px","--Switch-trackWidth":"40px","--Switch-trackHeight":"24px","--Switch-trackBackground":"#EE5E52","&:hover":{"--Switch-trackBackground":"#EE5E52"},[`&.${I.switchClasses.checked}`]:{"--Switch-trackBackground":"#5CB176","&:hover":{"--Switch-trackBackground":"#5CB176"}}}}),wL=({label:e,defaultValue:t,description:n,disabled:r,descriptionColor:i,onChange:o})=>n?u.jsxs(I.Box,{mb:2,children:[u.jsx(I.Typography,{component:"label",endDecorator:u.jsx(_m,{checked:t,disabled:r,onChange:o}),children:e}),u.jsx(I.Typography,{level:"body-sm",color:i||"neutral",children:n})]}):u.jsx(I.Typography,{sx:()=>({marginBottom:"16px"}),component:"label",endDecorator:u.jsx(_m,{checked:t,disabled:r,onChange:o}),children:e}),IL={control:(e,t)=>X(U({},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=>X(U({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>X(U({},e),{minHeight:"36px"}),menu:e=>X(U({},e),{position:"relative"}),clearIndicator:e=>X(U({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>X(U({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>X(U({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>X(U({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"13px"}),multiValueLabel:e=>X(U({},e),{color:"#333"})},SL=e=>e.map(t=>({label:t,value:t})),km=e=>{const[t,n]=x.useState(""),[r,i]=x.useState(!1),o=SL(e.tags),a=()=>i(!r),l=f=>{e.onChange(f.map(h=>h.value))},s=f=>{n(f)},c=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 u.jsxs(u.Fragment,{children:[u.jsx(om,{styles:IL,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:l,onInputChange:s,onKeyDown:c,placeholder:e.labels.tagsPlaceholder,value:o}),u.jsx(ut,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},AL=Ve(u.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");class Pm{constructor(){oe(this,"contestId","");oe(this,"contestType","");oe(this,"description","");oe(this,"userList",[])}}const TL=(e,t,n)=>{const[r,i]=x.useState(null),{sdk:o}=pt(),a=()=>k(this,null,function*(){try{let l;switch(t){case"top_x":l=yield o.topX.getGameWinners(e,!0);break;case"match_quiz":l=yield o.matchQuiz.getGameWinners(e,!0);break;default:l=yield o.loyalty.getTemplateWinners(e,!0)}l.userList&&l.userList.forEach(s=>{s.tags||(s.tags=[])}),i(l)}catch(l){const s=l;console.error(l),s.error.code!==404&&s.error.status!=="code_unknown_contest"&&n(),i(new Pm)}});return x.useEffect(()=>{a()},[]),r};class EL{constructor(){oe(this,"position","");oe(this,"profileId","");oe(this,"note","");oe(this,"tags",[])}}function _L(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 kL=_L,PL=Array.isArray,DL=PL,Dm=su,OL=kL,RL=DL,ML=Cm,LL=1/0,Om=Dm?Dm.prototype:void 0,Rm=Om?Om.toString:void 0;function Mm(e){if(typeof e=="string")return e;if(RL(e))return OL(e,Mm)+"";if(ML(e))return Rm?Rm.call(e):"";var t=e+"";return t=="0"&&1/e==-LL?"-0":t}var BL=Mm,$L=BL;function NL(e){return e==null?"":$L(e)}var Lm=NL;function FL(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 zL=FL;function jL(e){return function(t){return e==null?void 0:e[t]}}var VL=jL,UL=VL,HL={À:"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"},WL=UL(HL),GL=WL,YL=GL,KL=Lm,qL=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,QL="\\u0300-\\u036f",JL="\\ufe20-\\ufe2f",XL="\\u20d0-\\u20ff",ZL=QL+JL+XL,e2="["+ZL+"]",t2=RegExp(e2,"g");function n2(e){return e=KL(e),e&&e.replace(qL,YL).replace(t2,"")}var r2=n2,i2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function o2(e){return e.match(i2)||[]}var a2=o2,s2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function l2(e){return s2.test(e)}var c2=l2,Bm="\\ud800-\\udfff",u2="\\u0300-\\u036f",d2="\\ufe20-\\ufe2f",f2="\\u20d0-\\u20ff",h2=u2+d2+f2,$m="\\u2700-\\u27bf",Nm="a-z\\xdf-\\xf6\\xf8-\\xff",p2="\\xac\\xb1\\xd7\\xf7",g2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",m2="\\u2000-\\u206f",v2=" \\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",Fm="A-Z\\xc0-\\xd6\\xd8-\\xde",b2="\\ufe0e\\ufe0f",zm=p2+g2+m2+v2,jm="['’]",Vm="["+zm+"]",y2="["+h2+"]",Um="\\d+",C2="["+$m+"]",Hm="["+Nm+"]",Wm="[^"+Bm+zm+Um+$m+Nm+Fm+"]",x2="\\ud83c[\\udffb-\\udfff]",w2="(?:"+y2+"|"+x2+")",I2="[^"+Bm+"]",Gm="(?:\\ud83c[\\udde6-\\uddff]){2}",Ym="[\\ud800-\\udbff][\\udc00-\\udfff]",li="["+Fm+"]",S2="\\u200d",Km="(?:"+Hm+"|"+Wm+")",A2="(?:"+li+"|"+Wm+")",qm="(?:"+jm+"(?:d|ll|m|re|s|t|ve))?",Qm="(?:"+jm+"(?:D|LL|M|RE|S|T|VE))?",Jm=w2+"?",Xm="["+b2+"]?",T2="(?:"+S2+"(?:"+[I2,Gm,Ym].join("|")+")"+Xm+Jm+")*",E2="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_2="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",k2=Xm+Jm+T2,P2="(?:"+[C2,Gm,Ym].join("|")+")"+k2,D2=RegExp([li+"?"+Hm+"+"+qm+"(?="+[Vm,li,"$"].join("|")+")",A2+"+"+Qm+"(?="+[Vm,li+Km,"$"].join("|")+")",li+"?"+Km+"+"+qm,li+"+"+Qm,_2,E2,Um,P2].join("|"),"g");function O2(e){return e.match(D2)||[]}var R2=O2,M2=a2,L2=c2,B2=Lm,$2=R2;function N2(e,t,n){return e=B2(e),t=n?void 0:t,t===void 0?L2(e)?$2(e):M2(e):e.match(t)||[]}var F2=N2,z2=zL,j2=r2,V2=F2,U2="['’]",H2=RegExp(U2,"g");function W2(e){return function(t){return z2(V2(j2(t).replace(H2,"")),e,"")}}var G2=W2,Y2=G2,K2=Y2(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),q2=K2;const Q2=fn(q2);class J2{constructor(){oe(this,"id","");oe(this,"value","");oe(this,"label","")}}class X2 extends J2{constructor(){super(...arguments);oe(this,"logo","");oe(this,"countryFlag","");oe(this,"countryName","")}}class Zm extends X2{constructor(){super(...arguments);oe(this,"group","")}}const Z2=(e,t)=>t||e||"-------------",cu=(e,t)=>Array.isArray(e)?e.map(n=>cu(n)):e!=null&&e.constructor===Object?Object.keys(e).reduce((n,r)=>X(U({},n),{[Q2(r)]:cu(e[r])}),{}):e,ev=e=>{const t=[];return e.competitions.forEach(n=>{t.push(uu(n,"competition"))}),e.teams.forEach(n=>{t.push(uu(n,"team"))}),e.players.forEach(n=>{t.push(uu(n,"player"))}),t},uu=(e,t)=>{var r,i,o,a,l;const n=new Zm;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)||gt.avatar:t==="team"?n.logo=((i=e.assets)==null?void 0:i.logo)||gt.team:n.logo=((o=e.assets)==null?void 0:o.logo)||gt.competition,n.countryName=e.country.name,n.countryFlag=((l=(a=e.country)==null?void 0:a.assets)==null?void 0:l.flag)||gt.country,n},eB=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"}},tB=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"}},nB=({profile:e,winner:t,labels:n,onChange:r,onRemove:i})=>{var v,S,w,y,C,b;const[o,a]=x.useState(t.position),[l,s]=x.useState(t.note),[c,d]=x.useState(t.tags),f=o||l||c.length>0,h=T=>{T.persist();const{value:E}=T.target;a(E),r("position",E)},p=T=>{T.persist();const{value:E}=T.target;s(E),r("note",E)},m=T=>{d(T),r("tags",T)},g=()=>{a(""),s(""),d([]),i()};return u.jsxs("tr",{style:{backgroundColor:f?"rgb(255 237 213)":""},children:[u.jsx("td",{children:u.jsxs(I.Box,{display:"flex",alignItems:"center",children:[u.jsx(I.Avatar,{src:((v=e.profileModel)==null?void 0:v.avatar)||"",alt:((S=e.profileModel)==null?void 0:S.name)||"Unknown",sx:{mr:1}}),u.jsxs(I.Box,{children:[u.jsxs(I.Typography,{fontWeight:"md",children:[Z2((w=e.profileModel)==null?void 0:w.name,(y=e.profileModel)==null?void 0:y.nickname)," ",(C=e.profileModel)!=null&&C.name?u.jsxs(I.Typography,{children:["(",(b=e.profileModel)==null?void 0:b.name,")"]}):u.jsx(u.Fragment,{})]}),u.jsx(I.Typography,{fontSize:"sm",sx:{opacity:"0.5"},children:e.profileModel&&e.profileModel.country?e.profileModel.country.name:""})]})]})}),u.jsx("td",{style:{textAlign:"center"},children:e.points}),u.jsx("td",{style:{textAlign:"center"},children:e.predictionsMade}),u.jsx("td",{children:u.jsx(I.Input,{name:"position",placeholder:"#",value:o,onChange:h,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(I.Input,{name:"note",value:l,placeholder:"This user has...",onChange:p,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(km,{labels:n,tags:c,onChange:m})}),u.jsx("td",{children:u.jsx(I.Tooltip,{title:n.clearWinner,children:u.jsx(I.IconButton,{onClick:g,variant:"outlined",color:"danger",disabled:!f,children:u.jsx(Le.Remove,{})})})})]})},rB=e=>{const t=(i,o,a)=>{if(e.winners.find(d=>d.profileId===i)){const d=e.winners.map(f=>f.profileId===i?X(U({},f),{[o]:a}):f);r(d);return}const s=new EL;s.profileId=i,s[o]=a;const c=[...e.winners,s];r(c)},n=i=>{const o=e.winners.filter(a=>a.profileId!==i);r(o)},r=i=>{e.setWinnersRequestBody(o=>X(U({},o),{userList:i}))};return e.leaderboard?u.jsxs(u.Fragment,{children:[u.jsx(I.Typography,{level:"h4",children:e.labels.configureWinners}),e.leaderboard.length===0?u.jsx(I.Typography,{level:"body-lg",textAlign:"center",fontWeight:"bold",children:e.labels.noStandingsAvailable}):u.jsx(u.Fragment,{}),u.jsxs(I.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:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e.labels.nicknameAndName}),u.jsx("th",{style:{width:"70px",textAlign:"center"},children:e.labels.points}),u.jsx("th",{style:{width:"100px",textAlign:"center"},children:e.labels.predictions}),u.jsx("th",{style:{width:"100px"},children:e.labels.position}),u.jsx("th",{children:e.labels.note}),u.jsx("th",{children:e.labels.tags}),u.jsx("th",{children:e.labels.actions})]})}),u.jsxs("tbody",{children:[e.leaderboard.length>0?e.leaderboard.map(i=>u.jsx(nB,{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}`)):u.jsx(u.Fragment,{}),u.jsx("tr",{children:u.jsx("td",{colSpan:7,children:e.hasMoreParticipants?u.jsx(I.Box,{textAlign:"center",my:1,children:u.jsx(I.Button,{variant:"plain",sx:{width:"100%"},onClick:()=>e.setPage(i=>i+1),loading:e.isLoading,children:e.labels.loadMore})}):u.jsx(u.Fragment,{})})})]})]})]}):u.jsx(us,{my:40})},iB=(e,t,n,r,i)=>{const[o,a]=x.useState(null),[l,s]=x.useState(!1),[c,d]=x.useState(!1),{sdk:f}=pt(),h=()=>k(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?s(!0):s(!1),o&&o.length?a(v=>[...v,...g.data]):a(g.data)}catch(g){console.error(g),i("danger",n),a([])}d(!1)});return x.useEffect(()=>{h()},[r]),{leaderboard:o,hasMoreParticipants:l,isLeaderboardLoading:c}};class oB{constructor(){oe(this,"isValid",!0);oe(this,"message","");oe(this,"validate",(t,n,r)=>(this.validateField(t,n),this.validateWinnerIds(t,r),this));oe(this,"validateField",(t,n)=>{const r=t.every(i=>i.position&&i.profileId);r||(this.isValid=r,this.message=n)});oe(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 aB=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 u.jsx(I.Card,{variant:"plain",children:t?u.jsxs(u.Fragment,{children:[u.jsx(I.Typography,{level:"body-lg",mb:2,fontWeight:"bold",children:e.labels.preview}),u.jsx(I.Sheet,{children:u.jsxs(I.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:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{style:{width:"3%"},children:"#"}),u.jsx("th",{children:e.labels.name}),u.jsx("th",{children:e.labels.note}),u.jsx("th",{children:e.labels.tags})]})}),u.jsx("tbody",{children:e.winners.userList.map(n=>{var i;const r=e.profiles.find(o=>o.id===n.profileId);return u.jsxs("tr",{children:[u.jsx("td",{children:n.position}),u.jsx("td",{children:u.jsxs(I.Box,{display:"flex",alignItems:"center",justifyContent:{xs:"center",md:"flex-start"},gap:2,children:[u.jsx(I.Avatar,{src:(r==null?void 0:r.avatar)||"",alt:(r==null?void 0:r.name)||"Unknown"}),u.jsxs(I.Box,{textAlign:"left",children:[u.jsxs(I.Typography,{fontWeight:"bold",children:[(r==null?void 0:r.nickname)||"-------------"," ",u.jsxs(I.Typography,{children:["(",(r==null?void 0:r.name)||"-------------",")"]})]}),u.jsx(I.Typography,{fontSize:"sm",color:"neutral",children:(i=r==null?void 0:r.country)==null?void 0:i.name})]})]})}),u.jsx("td",{children:n.note}),u.jsx("td",{children:n.tags.map(o=>u.jsx(I.Chip,{variant:"soft",color:"neutral",size:"sm",sx:{mr:1},children:o},`preview-winner-${n.profileId}-tag-${o}`))})]},`preview-winner-${n.profileId}`)})})]})})]}):u.jsx(I.Typography,{textAlign:"center",fontWeight:"bold",children:e.labels.noSetWinnersMessage})})},sB=e=>Object.keys(e).length?(e.userList||(e.userList=[]),e):new Pm,lB=e=>{var b;const[t,n]=x.useState(sB(e.winners)),[r,i]=x.useState(((b=e.winners)==null?void 0:b.description)||""),[o,a]=x.useState(!1),[l,s]=x.useState(1),[c,d]=x.useState(!1),[f,h]=x.useState("danger"),[p,m]=x.useState(""),g=(T,E)=>{h(T),m(E),d(!0)},{leaderboard:v,hasMoreParticipants:S,isLeaderboardLoading:w}=iB(e.entityId,e.entityType,e.labels.leaderboardErrorMessage,l,g),{https:y}=pt(),C=()=>k(this,null,function*(){a(!0);const T=JSON.parse(JSON.stringify(t));if(T.contestId=e.entityId,T.contestType=e.entityType==="template"?"TEMPLATE":"GAME",T.description=r,delete T.contestModel,T.userList.length>0){const P=new oB().validate(T.userList,e.labels.positionAndWinnerRequiredMessage,e.labels.sameChosenWinnerMessage);if(!P.isValid){g("danger",P.message),a(!1);return}}else delete T.userList;const E=cu(T);try{yield y.setWinners(E),g("success",Object.keys(e.winners).length?e.labels.editWinnersMessage:e.labels.createWinnersMessage)}catch(P){console.error(P),g("danger",Object.keys(e.winners).length?e.labels.editWinnersErrorMessage:e.labels.createWinnersErrorMessage)}a(!1)});return u.jsxs(u.Fragment,{children:[u.jsx("section",{style:{marginRight:"auto",marginLeft:"auto"},children:u.jsx(I.Box,{width:"100%",overflow:"hidden",borderRadius:"4px",bgcolor:"#fff",children:u.jsxs(I.Box,{width:"100%",sx:{overflowX:"auto"},children:[u.jsxs(I.Card,{variant:"plain",children:[u.jsx(ic,{property:"description",label:e.labels.description,defaultValue:r,placeholder:e.labels.winnersDescription,onChange:T=>{i(T)}}),u.jsx(rB,{winners:t.userList,leaderboard:v,hasMoreParticipants:S,isLoading:w,setPage:s,setWinnersRequestBody:n,labels:e.labels}),u.jsx(I.Box,{textAlign:"center",my:3,children:u.jsx(I.Button,{variant:"solid",color:"primary",onClick:C,loading:o,children:e.labels.save})}),u.jsx(I.Divider,{sx:{my:4}})]}),v?u.jsx(aB,{winners:t,profiles:v.map(T=>T.profileModel),labels:e.labels}):u.jsx(u.Fragment,{})]})})}),u.jsx(ut,{showToast:c,color:f,message:p,hideToast:()=>d(!1)})]})},cB=e=>{const[t,n]=x.useState(!1),r=()=>n(!0),i=TL(e.entityId,e.entityType,r);return i?u.jsxs(u.Fragment,{children:[u.jsxs(I.Box,{p:2,children:[u.jsx(I.Typography,{fontSize:"12px",sx:{cursor:"pointer"},startDecorator:u.jsx(AL,{fontSize:"inherit"}),onClick:e.onClickBack,children:e.labels.back}),u.jsxs(I.Typography,{level:"h3",children:[e.labels.manageWinners,":"," ",u.jsx(I.Typography,{level:"title-lg",fontWeight:"italic",children:e.entityName})]})]}),u.jsx(lB,{labels:e.labels,winners:i,entityId:e.entityId,entityType:e.entityType}),u.jsx(ut,{showToast:t,color:"danger",message:e.labels.winnersErrorMessage,hideToast:()=>n(!1)})]}):u.jsx(us,{my:50})},uB=10,dB=e=>{var f;const[t,n]=x.useState([]),[r,i]=x.useState(!1),[o,a]=x.useState(""),{sdk:l}=pt(),s=x.useMemo(()=>si(h=>{if(!h){n([]),i(!1);return}i(!0),l.football.search({query:h}).then(p=>{n([...ev(p)]),i(!1)}).catch(p=>{console.error(p),n([]),i(!1)})},300),[]);x.useEffect(()=>(s(o),()=>s.cancel()),[o,s]);const c=(h,p)=>{const m=p.map(g=>g.id);e.setOptions(p),e.handleResetData(),e.setFilters(g=>X(U({},g),{entityIds:m}))},d=(h,p)=>h.map((m,g)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:v=>p({index:g}).onClick(v),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(xn,{option:m},`option_${m.id}`)},m.id));return u.jsxs(I.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{sx:{fontSize:12},color:"primary",children:e.labels.contextEntityTag}),u.jsx(I.Autocomplete,{getOptionDisabled:()=>e.options.length===uB,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?u.jsx(I.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:c,getOptionKey:h=>h.id,groupBy:h=>h.group+"s",value:(f=e.options)!=null?f:[],renderTags:d,renderOption:(h,p)=>u.jsx(I.AutocompleteOption,X(U({},h),{children:u.jsx(xn,{option:p})}))})]})};function tv(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 co;(function(e){e.event="event",e.props="prop"})(co||(co={}));function nr(){}function fB(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 uo(e){return!!(e||"").match(/\d/)}function ci(e){return e==null}function hB(e){return typeof e=="number"&&isNaN(e)}function nv(e){return ci(e)||hB(e)||typeof e=="number"&&!isFinite(e)}function rv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function pB(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 gB(e,t,n){var r=pB(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 mB(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 du(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 vB(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 iv(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function ov(e,t){return Array(t+1).join(e)}function av(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,l=i.length;return a<0?i="0."+ov("0",Math.abs(a))+i:a>=l?i=i+ov("0",a-l):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function sv(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=du(e),o=i.beforeDecimal,a=i.afterDecimal,l=i.hasNegation,s=parseFloat("0."+(a||"0")),c=a.length<=t?"0."+a:s.toFixed(t),d=c.split("."),f=o;o&&Number(d[0])&&(f=o.split("").reverse().reduce(function(g,v,S){return g.length>S?(Number(g[0])+Number(v)).toString()+g.substring(1,g.length):v+g},d[0]));var h=iv(d[1]||"",t,n),p=l?"-":"",m=r?".":"";return""+p+f+m+h}function wr(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 lv=fB(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}}}),bB=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function yB(e,t,n){return Math.min(Math.max(e,t),n)}function fu(e){return Math.max(e.selectionStart,e.selectionEnd)}function CB(){return typeof navigator!="undefined"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function xB(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function wB(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function IB(e,t,n,r,i,o,a){a===void 0&&(a=wB);var l=i.findIndex(function(C){return C}),s=e.slice(0,l);!t&&!n.startsWith(s)&&(t=s,n=s+n,r=r+s.length);for(var c=n.length,d=e.length,f={},h=new Array(c),p=0;p<c;p++){h[p]=-1;for(var m=0,g=d;m<g;m++){var v=a({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m});if(v&&f[m]!==!0){h[p]=m,f[m]=!0;break}}}for(var S=r;S<c&&(h[S]===-1||!o(n[S]));)S++;var w=S===c||h[S]===-1?d:h[S];for(S=r-1;S>0&&h[S]===-1;)S--;var y=S===-1||h[S]===-1?0:h[S]+1;return y>w?w:r-y<w-r?y:w}function cv(e,t,n,r){var i=e.length;if(t=yB(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 SB(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(uo(e[n])||uo(e[n-1]));return t}function uv(e,t,n,r,i,o){o===void 0&&(o=nr);var a=mB(function(m,g){var v,S;return nv(m)?(S="",v=""):typeof m=="number"||g?(S=typeof m=="number"?av(m):m,v=r(S)):(S=i(m,void 0),v=r(S)),{formattedValue:v,numAsString:S}}),l=x.useState(function(){return a(ci(e)?t:e,n)}),s=l[0],c=l[1],d=function(m,g){m.formattedValue!==s.formattedValue&&c({formattedValue:m.formattedValue,numAsString:m.value}),o(m,g)},f=e,h=n;ci(e)&&(f=s.numAsString,h=!0);var p=a(f,h);return x.useMemo(function(){c(p)},[p.formattedValue]),[s,d]}function AB(e){return e.replace(/[^0-9]/g,"")}function TB(e){return e}function EB(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=TB);var l=e.removeFormatting;l===void 0&&(l=AB);var s=e.defaultValue,c=e.valueIsNumericString,d=e.onValueChange,f=e.isAllowed,h=e.onChange;h===void 0&&(h=nr);var p=e.onKeyDown;p===void 0&&(p=nr);var m=e.onMouseUp;m===void 0&&(m=nr);var g=e.onFocus;g===void 0&&(g=nr);var v=e.onBlur;v===void 0&&(v=nr);var S=e.value,w=e.getCaretBoundary;w===void 0&&(w=SB);var y=e.isValidInputCharacter;y===void 0&&(y=uo);var C=e.isCharacterSame,b=tv(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),T=uv(S,s,!!c,a,l,d),E=T[0],P=E.formattedValue,O=E.numAsString,G=T[1],z=x.useRef(),A=x.useRef({formattedValue:P,numAsString:O}),W=function(de,he){A.current={formattedValue:de.formattedValue,numAsString:de.value},G(de,he)},Y=x.useState(!1),N=Y[0],$=Y[1],B=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,ee=function(de,he){var Ce=parseFloat(he);return{formattedValue:de,value:he,floatValue:isNaN(Ce)?void 0:Ce}},R=function(de,he,Ce){de.selectionStart===0&&de.selectionEnd===de.value.length||(wr(de,he),H.current.setCaretTimeout=setTimeout(function(){de.value===Ce&&de.selectionStart!==he&&wr(de,he)},0))},L=function(de,he,Ce){return cv(de,he,w(de),Ce)},F=function(de,he,Ce){var Te=w(he),He=IB(he,P,de,Ce,Te,y,C);return He=cv(he,He,Te),He},V=function(de){var he=de.formattedValue;he===void 0&&(he="");var Ce=de.input,Te=de.source,He=de.event,Pe=de.numAsString,Ee;if(Ce){var It=de.inputValue||Ce.value,St=fu(Ce);Ce.value=he,Ee=F(It,he,St),Ee!==void 0&&R(Ce,Ee,he)}he!==P&&W(ee(he,Pe),{event:He,source:Te})};x.useEffect(function(){var de=A.current,he=de.formattedValue,Ce=de.numAsString;(P!==he||O!==Ce)&&W(ee(P,O),{event:void 0,source:co.props})},[P,O]);var te=B.current?fu(B.current):void 0,se=typeof window!="undefined"?x.useLayoutEffect:x.useEffect;se(function(){var de=B.current;if(P!==A.current.formattedValue&&de){var he=F(A.current.formattedValue,P,te);de.value=P,R(de,he,P)}},[P]);var ae=function(de,he,Ce){var Te=he.target,He=z.current?bB(z.current,Te.selectionEnd):lv(P,de),Pe=Object.assign(Object.assign({},He),{lastValue:P}),Ee=l(de,Pe),It=q(Ee);if(Ee=l(It,void 0),f&&!f(ee(It,Ee))){var St=he.target,jt=fu(St),Mt=F(de,P,jt);return St.value=P,R(St,Mt,P),!1}return V({formattedValue:It,numAsString:Ee,inputValue:de,event:he,source:Ce,input:he.target}),!0},J=function(de,he){he===void 0&&(he=0);var Ce=de.selectionStart,Te=de.selectionEnd;z.current={selectionStart:Ce,selectionEnd:Te+he}},le=function(de){var he=de.target,Ce=he.value,Te=ae(Ce,de,co.event);Te&&h(de),z.current=void 0},ne=function(de){var he=de.target,Ce=de.key,Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;Pe===void 0&&(Pe="");var Ee;Ce==="ArrowLeft"||Ce==="Backspace"?Ee=Math.max(Te-1,0):Ce==="ArrowRight"?Ee=Math.min(Te+1,Pe.length):Ce==="Delete"&&(Ee=Te);var It=0;Ce==="Delete"&&Te===He&&(It=1);var St=Ce==="ArrowLeft"||Ce==="ArrowRight";if(Ee===void 0||Te!==He&&!St){p(de),J(he,It);return}var jt=Ee;if(St){var Mt=Ce==="ArrowLeft"?"left":"right";jt=L(Pe,Ee,Mt),jt!==Ee&&de.preventDefault()}else Ce==="Delete"&&!y(Pe[Ee])?jt=L(Pe,Ee,"right"):Ce==="Backspace"&&!y(Pe[Ee])&&(jt=L(Pe,Ee,"left"));jt!==Ee&&R(he,jt,Pe),p(de),J(he,It)},ge=function(de){var he=de.target,Ce=function(){var Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;if(Pe===void 0&&(Pe=""),Te===He){var Ee=L(Pe,Te);Ee!==Te&&R(he,Ee,Pe)}};Ce(),requestAnimationFrame(function(){Ce()}),m(de),J(he)},Se=function(de){de.persist&&de.persist();var he=de.target,Ce=de.currentTarget;B.current=he,H.current.focusTimeout=setTimeout(function(){var Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;Pe===void 0&&(Pe="");var Ee=L(Pe,Te);Ee!==Te&&!(Te===0&&He===Pe.length)&&R(he,Ee,Pe),g(Object.assign(Object.assign({},de),{currentTarget:Ce}))},0)},Ue=function(de){B.current=null,clearTimeout(H.current.focusTimeout),clearTimeout(H.current.setCaretTimeout),v(de)},wt=N&&CB()?"numeric":void 0,at=Object.assign({inputMode:wt},b,{type:t,value:P,onChange:le,onKeyDown:ne,onMouseUp:ge,onFocus:Se,onBlur:Ue});if(n==="text")return i?x.createElement(x.Fragment,null,i(P,b)||null):x.createElement("span",Object.assign({},b,{ref:o}),P);if(r){var kt=r;return x.createElement(kt,Object.assign({},at,{ref:o}))}return x.createElement("input",Object.assign({},at,{ref:o}))}function dv(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,l=t.thousandsGroupStyle;if(l===void 0&&(l="thousand"),e===""||e==="-")return e;var s=ds(t),c=s.thousandSeparator,d=s.decimalSeparator,f=n!==0&&e.indexOf(".")!==-1||n&&r,h=du(e,a),p=h.beforeDecimal,m=h.afterDecimal,g=h.addNegation;return n!==void 0&&(m=iv(m,n,!!r)),c&&(p=gB(p,c,l)),i&&(p=i+p),o&&(m=m+o),g&&(p="-"+p),e=p+(f&&d||"")+m,e}function ds(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 _B(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 kB(e,t){return new RegExp("(^-)|[0-9]|"+rv(e),"g")}function PB(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function DB(e,t,n){var r;t===void 0&&(t=xB(e));var i=n.allowNegative,o=n.prefix;o===void 0&&(o="");var a=n.suffix;a===void 0&&(a="");var l=n.decimalScale,s=t.from,c=t.to,d=c.start,f=c.end,h=ds(n),p=h.allowedDecimalSeparators,m=h.decimalSeparator,g=e[f]===m;if(uo(e)&&(e===o||e===a)&&t.lastValue==="")return e;if(f-d===1&&p.indexOf(e[d])!==-1){var v=l===0?"":m;e=e.substring(0,d)+v+e.substring(d+1,e.length)}var S=function(B,H,q){var ee=!1,R=!1;o.startsWith("-")?ee=!1:B.startsWith("--")?(ee=!1,R=!0):a.startsWith("-")&&B.length===a.length?ee=!1:B[0]==="-"&&(ee=!0);var L=ee?1:0;return R&&(L=2),L&&(B=B.substring(L),H-=L,q-=L),{value:B,start:H,end:q,hasNegation:ee}},w=S(e,d,f),y=w.hasNegation;r=w,e=r.value,d=r.start,f=r.end;var C=S(t.lastValue,s.start,s.end),b=C.start,T=C.end,E=C.value,P=e.substring(d,f);e.length&&E.length&&(b>E.length-a.length||T<o.length)&&!(P&&a.startsWith(P))&&(e=E);var O=0;e.startsWith(o)?O+=o.length:d<o.length&&(O=d),e=e.substring(O),f-=O;var G=e.length,z=e.length-a.length;e.endsWith(a)?G=z:(f>z||f>e.length-a.length)&&(G=f),e=e.substring(0,G),e=_B(y?"-"+e:e,i),e=(e.match(kB(m))||[]).join("");var A=e.indexOf(m);e=e.replace(new RegExp(rv(m),"g"),function(B,H){return H===A?".":""});var W=du(e,i),Y=W.beforeDecimal,N=W.afterDecimal,$=W.addNegation;return c.end-c.start<s.end-s.start&&Y===""&&g&&!parseFloat(N)&&(e=$?"-":""),e}function OB(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 RB(e){var t=ds(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
|
+
`]))),LD=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,l=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:l*2})},Kc=function(t){var n=t.delay,r=t.offset;return pe.jsx("span",{css:pe.css({animation:"".concat(MD," 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"},"","")})},BD=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=Cn(t,TD);return pe.jsx("div",D({},tt(ve(ve({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),pe.jsx(Kc,{delay:0,offset:r}),pe.jsx(Kc,{delay:160,offset:!0}),pe.jsx(Kc,{delay:320,offset:!r}))},$D=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,l=o.borderRadius,s=o.spacing;return ve({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.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:l,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},ND=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,l=t.menuIsOpen;return pe.jsx("div",D({ref:o},tt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":l}),a,{"aria-disabled":r||void 0}),n)},FD=ND,zD=["data"],jD=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},VD=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,l=t.headingProps,s=t.innerProps,c=t.label,d=t.theme,f=t.selectProps;return pe.jsx("div",D({},tt(t,"group",{group:!0}),s),pe.jsx(a,D({},l,{selectProps:f,theme:d,getStyles:i,getClassNames:o,cx:r}),c),pe.jsx("div",null,n))},UD=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"})},HD=function(t){var n=bg(t);n.data;var r=Cn(n,zD);return pe.jsx("div",D({},tt(t,"groupHeading",{"group-heading":!0}),r))},WD=VD,GD=["innerRef","isDisabled","isHidden","inputClassName"],YD=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,l=o.colors;return ve(ve({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},KD),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:l.neutral80})},Pg={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},KD={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"},Pg)},qD=function(t){return ve({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Pg)},QD=function(t){var n=t.cx,r=t.value,i=bg(t),o=i.innerRef,a=i.isDisabled,l=i.isHidden,s=i.inputClassName,c=Cn(i,GD);return pe.jsx("div",D({},tt(t,"input",{"input-container":!0}),{"data-value":r||""}),pe.jsx("input",D({className:n({input:!0},s),ref:o,style:qD(l),disabled:a},c)))},JD=QD,XD=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})},ZD=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})},eO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,l=t.isFocused;return ve({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:l?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Dg=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",r,n)},tO=Dg,nO=Dg;function rO(e){var t=e.children,n=e.innerProps;return pe.jsx("div",D({role:"button"},n),t||pe.jsx(Yc,{size:14}))}var iO=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,l=t.removeProps,s=t.selectProps,c=r.Container,d=r.Label,f=r.Remove;return pe.jsx(c,{data:i,innerProps:ve(ve({},tt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:s},pe.jsx(d,{data:i,innerProps:ve({},tt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},n),pe.jsx(f,{data:i,innerProps:ve(ve({},tt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:s}))},oO=iO,aO=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,l=a.spacing,s=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?s.primary:i?s.primary25:"transparent",color:r?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?s.primary:s.primary50}})},sO=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,l=t.innerProps;return pe.jsx("div",D({},tt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},l),n)},lO=sO,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})},uO=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",D({},tt(t,"placeholder",{placeholder:!0}),r),n)},dO=uO,fO=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})},hO=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return pe.jsx("div",D({},tt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},pO=hO,gO={ClearIndicator:DD,Control:FD,DropdownIndicator:kD,DownChevron:_g,CrossIcon:Yc,Group:WD,GroupHeading:HD,IndicatorsContainer:SD,IndicatorSeparator:RD,Input:JD,LoadingIndicator:BD,Menu:uD,MenuList:fD,MenuPortal:bD,LoadingMessage:mD,NoOptionsMessage:gD,MultiValue:oO,MultiValueContainer:tO,MultiValueLabel:nO,MultiValueRemove:rO,Option:lO,Placeholder:dO,SelectContainer:CD,SingleValue:pO,ValueContainer:wD},mO=function(t){return ve(ve({},gO),t.components)},Og=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function vO(e,t){return!!(e===t||Og(e)&&Og(t))}function bO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!vO(e[n],t[n]))return!1;return!0}function yO(e,t){t===void 0&&(t=bO);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 CO={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"},xO=function(t){return pe.jsx("span",D({css:CO},t))},Rg=xO,wO={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,l=t.selectValue,s=t.isDisabled,c=t.isSelected,d=t.isAppleDevice,f=function(g,v){return g&&g.length?"".concat(g.indexOf(v)+1," of ").concat(g.length):""};if(n==="value"&&l)return"value ".concat(a," focused, ").concat(f(l,r),".");if(n==="menu"&&d){var h=s?" disabled":"",p="".concat(c?" 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:"",".")}},IO=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,l=t.selectValue,s=t.selectProps,c=t.id,d=t.isAppleDevice,f=s.ariaLiveMessages,h=s.getOptionLabel,p=s.inputValue,m=s.isMulti,g=s.isOptionDisabled,v=s.isSearchable,S=s.menuIsOpen,w=s.options,y=s.screenReaderStatus,C=s.tabSelectsValue,b=s.isLoading,T=s["aria-label"],E=s["aria-live"],P=x.useMemo(function(){return ve(ve({},wO),f||{})},[f]),O=x.useMemo(function(){var N="";if(n&&P.onChange){var $=n.option,B=n.options,H=n.removedValue,q=n.removedValues,ee=n.value,R=function(J){return Array.isArray(J)?null:J},L=H||$||R(ee),F=L?h(L):"",U=B||q||void 0,te=U?U.map(h):[],se=ve({isDisabled:L&&g(L,l),label:F,labels:te},n);N=P.onChange(se)}return N},[n,P,g,l,h]),G=x.useMemo(function(){var N="",$=r||i,B=!!(r&&l&&l.includes(r));if($&&P.onFocus){var H={focused:$,label:h($),isDisabled:g($,l),isSelected:B,options:o,context:$===r?"menu":"value",selectValue:l,isAppleDevice:d};N=P.onFocus(H)}return N},[r,i,h,g,P,o,l,d]),z=x.useMemo(function(){var N="";if(S&&w.length&&!b&&P.onFilter){var $=y({count:o.length});N=P.onFilter({inputValue:p,resultsMessage:$})}return N},[o,p,S,P,w,y,b]),A=(n==null?void 0:n.action)==="initial-input-focus",W=x.useMemo(function(){var N="";if(P.guidance){var $=i?"value":S?"menu":"input";N=P.guidance({"aria-label":T,context:$,isDisabled:r&&g(r,l),isMulti:m,isSearchable:v,tabSelectsValue:C,isInitialFocus:A})}return N},[T,r,i,m,g,v,S,P,l,C,A]),Y=pe.jsx(x.Fragment,null,pe.jsx("span",{id:"aria-selection"},O),pe.jsx("span",{id:"aria-focused"},G),pe.jsx("span",{id:"aria-results"},z),pe.jsx("span",{id:"aria-guidance"},W));return pe.jsx(x.Fragment,null,pe.jsx(Rg,{id:c},A&&Y),pe.jsx(Rg,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!A&&Y))},SO=IO,qc=[{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źẑżžẓẕƶȥɀⱬꝣ"}],AO=new RegExp("["+qc.map(function(e){return e.letters}).join("")+"]","g"),Mg={},Qc=0;Qc<qc.length;Qc++)for(var Jc=qc[Qc],Xc=0;Xc<Jc.letters.length;Xc++)Mg[Jc.letters[Xc]]=Jc.base;var Lg=function(t){return t.replace(AO,function(n){return Mg[n]})},TO=yO(Lg),Bg=function(t){return t.replace(/^\s+|\s+$/g,"")},EO=function(t){return"".concat(t.label," ").concat(t.value)},_O=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=ve({ignoreCase:!0,ignoreAccents:!0,stringify:EO,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,a=i.ignoreAccents,l=i.stringify,s=i.trim,c=i.matchFrom,d=s?Bg(r):r,f=s?Bg(l(n)):l(n);return o&&(d=d.toLowerCase(),f=f.toLowerCase()),a&&(d=TO(d),f=Lg(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},kO=["innerRef"];function PO(e){var t=e.innerRef,n=Cn(e,kO),r=nD(n,"onExited","in","enter","exit","appear");return pe.jsx("input",D({ref:t},r,{css:pe.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 DO=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function OO(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=x.useRef(!1),l=x.useRef(!1),s=x.useRef(0),c=x.useRef(null),d=x.useCallback(function(v,S){if(c.current!==null){var w=c.current,y=w.scrollTop,C=w.scrollHeight,b=w.clientHeight,T=c.current,E=S>0,P=C-b-y,O=!1;P>S&&a.current&&(r&&r(v),a.current=!1),E&&l.current&&(o&&o(v),l.current=!1),E&&S>P?(n&&!a.current&&n(v),T.scrollTop=C,O=!0,a.current=!0):!E&&-S>y&&(i&&!l.current&&i(v),T.scrollTop=0,O=!0,l.current=!0),O&&DO(v)}},[n,r,i,o]),f=x.useCallback(function(v){d(v,v.deltaY)},[d]),h=x.useCallback(function(v){s.current=v.changedTouches[0].clientY},[]),p=x.useCallback(function(v){var S=s.current-v.changedTouches[0].clientY;d(v,S)},[d]),m=x.useCallback(function(v){if(v){var S=ZP?{passive:!1}:!1;v.addEventListener("wheel",f,S),v.addEventListener("touchstart",h,S),v.addEventListener("touchmove",p,S)}},[p,h,f]),g=x.useCallback(function(v){v&&(v.removeEventListener("wheel",f,!1),v.removeEventListener("touchstart",h,!1),v.removeEventListener("touchmove",p,!1))},[p,h,f]);return x.useEffect(function(){if(t){var v=c.current;return m(v),function(){g(v)}}},[t,m,g]),function(v){c.current=v}}var $g=["boxSizing","height","overflow","paddingRight","position"],Ng={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Fg(e){e.preventDefault()}function zg(e){e.stopPropagation()}function jg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Vg(){return"ontouchstart"in window||navigator.maxTouchPoints}var Ug=!!(typeof window!="undefined"&&window.document&&window.document.createElement),ao=0,ri={capture:!1,passive:!1};function RO(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(s){if(Ug){var c=document.body,d=c&&c.style;if(r&&$g.forEach(function(m){var g=d&&d[m];i.current[m]=g}),r&&ao<1){var f=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,p=window.innerWidth-h+f||0;Object.keys(Ng).forEach(function(m){var g=Ng[m];d&&(d[m]=g)}),d&&(d.paddingRight="".concat(p,"px"))}c&&Vg()&&(c.addEventListener("touchmove",Fg,ri),s&&(s.addEventListener("touchstart",jg,ri),s.addEventListener("touchmove",zg,ri))),ao+=1}},[r]),l=x.useCallback(function(s){if(Ug){var c=document.body,d=c&&c.style;ao=Math.max(ao-1,0),r&&ao<1&&$g.forEach(function(f){var h=i.current[f];d&&(d[f]=h)}),c&&Vg()&&(c.removeEventListener("touchmove",Fg,ri),s&&(s.removeEventListener("touchstart",jg,ri),s.removeEventListener("touchmove",zg,ri)))}},[r]);return x.useEffect(function(){if(t){var s=o.current;return a(s),function(){l(s)}}},[t,a,l]),function(s){o.current=s}}var MO=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},LO={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function BO(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,l=e.onTopArrive,s=e.onTopLeave,c=OO({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:l,onTopLeave:s}),d=RO({isEnabled:n}),f=function(p){c(p),d(p)};return pe.jsx(x.Fragment,null,n&&pe.jsx("div",{onClick:MO,css:LO}),t(f))}var $O={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},NO=function(t){var n=t.name,r=t.onFocus;return pe.jsx("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:$O,value:"",onChange:function(){}})},FO=NO;function Zc(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 zO(){return Zc(/^iPhone/i)}function Hg(){return Zc(/^Mac/i)}function jO(){return Zc(/^iPad/i)||Hg()&&navigator.maxTouchPoints>1}function VO(){return zO()||jO()}function UO(){return Hg()||VO()}var HO=function(t){return t.label},Wg=function(t){return t.label},Gg=function(t){return t.value},WO=function(t){return!!t.isDisabled},GO={clearIndicator:PD,container:yD,control:$D,dropdownIndicator:_D,group:jD,groupHeading:UD,indicatorsContainer:ID,indicatorSeparator:OD,input:YD,loadingIndicator:LD,loadingMessage:pD,menu:sD,menuList:dD,menuPortal:vD,multiValue:XD,multiValueLabel:ZD,multiValueRemove:eO,noOptionsMessage:hD,option:aO,placeholder:cO,singleValue:fO,valueContainer:xD},YO={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%)"},KO=4,Yg=4,qO=38,QO=Yg*2,JO={baseUnit:Yg,controlHeight:qO,menuGutter:QO},eu={borderRadius:KO,colors:YO,spacing:JO},XO={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:xg(),captureMenuScroll:!xg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:_O(),formatGroupLabel:HO,getOptionLabel:Wg,getOptionValue:Gg,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:WO,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!JP(),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 Kg(e,t,n,r){var i=Zg(e,t,n),o=em(e,t,n),a=Xg(e,t),l=cs(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:l,index:r}}function ls(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,l){return Kg(e,a,t,l)}).filter(function(a){return Jg(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Kg(e,n,t,r);return Jg(e,o)?o:void 0}).filter(eD)}function qg(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,ni(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Qg(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,ni(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 ZO(e,t){return qg(ls(e,t))}function Jg(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,l=t.value;return(!nm(e)||!o)&&tm(e,{label:a,value:l,data:i},r)}function eR(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 tR(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var tu=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},Xg=function(t,n){return t.getOptionLabel(n)},cs=function(t,n){return t.getOptionValue(n)};function Zg(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function em(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=cs(e,t);return n.some(function(i){return cs(e,i)===r})}function tm(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var nm=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},nR=1,rm=function(e){RP(n,e);var t=BP(n);function n(r){var i;if(DP(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=UO(),i.controlRef=null,i.getControlRef=function(s){i.controlRef=s},i.focusedOptionRef=null,i.getFocusedOptionRef=function(s){i.focusedOptionRef=s},i.menuListRef=null,i.getMenuListRef=function(s){i.menuListRef=s},i.inputRef=null,i.getInputRef=function(s){i.inputRef=s},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(s,c){var d=i.props,f=d.onChange,h=d.name;c.name=h,i.ariaOnChange(s,c),f(s,c)},i.setValue=function(s,c,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(s,{action:c,option:d})},i.selectOption=function(s){var c=i.props,d=c.blurInputOnSelect,f=c.isMulti,h=c.name,p=i.state.selectValue,m=f&&i.isOptionSelected(s,p),g=i.isOptionDisabled(s,p);if(m){var v=i.getOptionValue(s);i.setValue(p.filter(function(S){return i.getOptionValue(S)!==v}),"deselect-option",s)}else if(!g)f?i.setValue([].concat(ni(p),[s]),"select-option",s):i.setValue(s,"select-option");else{i.ariaOnChange(s,{action:"select-option",option:s,name:h});return}d&&i.blurInput()},i.removeValue=function(s){var c=i.props.isMulti,d=i.state.selectValue,f=i.getOptionValue(s),h=d.filter(function(m){return i.getOptionValue(m)!==f}),p=oo(c,h,h[0]||null);i.onChange(p,{action:"remove-value",removedValue:s}),i.focusInput()},i.clearValue=function(){var s=i.state.selectValue;i.onChange(oo(i.props.isMulti,[],null),{action:"clear",removedValues:s})},i.popValue=function(){var s=i.props.isMulti,c=i.state.selectValue,d=c[c.length-1],f=c.slice(0,c.length-1),h=oo(s,f,f[0]||null);i.onChange(h,{action:"pop-value",removedValue:d})},i.getFocusedOptionId=function(s){return tu(i.state.focusableOptionsWithIds,s)},i.getFocusableOptionsWithIds=function(){return Qg(ls(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var s=arguments.length,c=new Array(s),d=0;d<s;d++)c[d]=arguments[d];return GP.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(s){return Xg(i.props,s)},i.getOptionValue=function(s){return cs(i.props,s)},i.getStyles=function(s,c){var d=i.props.unstyled,f=GO[s](c,d);f.boxSizing="border-box";var h=i.props.styles[s];return h?h(f,c):f},i.getClassNames=function(s,c){var d,f;return(d=(f=i.props.classNames)[s])===null||d===void 0?void 0:d.call(f,c)},i.getElementId=function(s){return"".concat(i.state.instancePrefix,"-").concat(s)},i.getComponents=function(){return mO(i.props)},i.buildCategorizedOptions=function(){return ls(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return qg(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(s,c){i.setState({ariaSelection:ve({value:s},c)})},i.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(s){i.blockOptionHover=!1},i.onControlMouseDown=function(s){if(!s.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},i.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0)&&!i.props.isDisabled){var c=i.props,d=c.isMulti,f=c.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()):i.openMenu("first"),s.preventDefault()}},i.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(i.clearValue(),s.preventDefault(),i.openAfterFocus=!1,s.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(s){typeof i.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&is(s.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(s)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(s){var c=s.touches,d=c&&c.item(0);d&&(i.initialTouchX=d.clientX,i.initialTouchY=d.clientY,i.userIsDragging=!1)},i.onTouchMove=function(s){var c=s.touches,d=c&&c.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(s){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(s.target)&&i.menuListRef&&!i.menuListRef.contains(s.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(s){i.userIsDragging||i.onControlMouseDown(s)},i.onClearIndicatorTouchEnd=function(s){i.userIsDragging||i.onClearIndicatorMouseDown(s)},i.onDropdownIndicatorTouchEnd=function(s){i.userIsDragging||i.onDropdownIndicatorMouseDown(s)},i.handleInputChange=function(s){var c=i.props.inputValue,d=s.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(d,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(s){i.props.onFocus&&i.props.onFocus(s),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(s){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(s),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(s){if(!(i.blockOptionHover||i.state.focusedOption===s)){var c=i.getFocusableOptions(),d=c.indexOf(s);i.setState({focusedOption:s,focusedOptionId:d>-1?i.getFocusedOptionId(s):null})}},i.shouldHideSelectedOptions=function(){return nm(i.props)},i.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),i.focus()},i.onKeyDown=function(s){var c=i.props,d=c.isMulti,f=c.backspaceRemovesValue,h=c.escapeClearsValue,p=c.inputValue,m=c.isClearable,g=c.isDisabled,v=c.menuIsOpen,S=c.onKeyDown,w=c.tabSelectsValue,y=c.openMenuOnFocus,C=i.state,b=C.focusedOption,T=C.focusedValue,E=C.selectValue;if(!g&&!(typeof S=="function"&&(S(s),s.defaultPrevented))){switch(i.blockOptionHover=!0,s.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(T)i.removeValue(T);else{if(!f)return;d?i.popValue():m&&i.clearValue()}break;case"Tab":if(i.isComposing||s.shiftKey||!v||!w||!b||y&&i.isOptionSelected(b,E))return;i.selectOption(b);break;case"Enter":if(s.keyCode===229)break;if(v){if(!b||i.isComposing)return;i.selectOption(b);break}return;case"Escape":v?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:p}),i.onMenuClose()):m&&h&&i.clearValue();break;case" ":if(p)return;if(!v){i.openMenu("first");break}if(!b)return;i.selectOption(b);break;case"ArrowUp":v?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":v?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!v)return;i.focusOption("pageup");break;case"PageDown":if(!v)return;i.focusOption("pagedown");break;case"Home":if(!v)return;i.focusOption("first");break;case"End":if(!v)return;i.focusOption("last");break;default:return}s.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++nR),i.state.selectValue=rs(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),a=i.buildFocusableOptions(),l=a.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=a[l],i.state.focusedOptionId=tu(o,a[l])}return i}return OP(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&&Cg(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,l=o.menuIsOpen,s=this.state.isFocused;(s&&!a&&i.isDisabled||s&&l&&!i.menuIsOpen)&&this.focusInput(),s&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!s&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Cg(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,l=a.selectValue,s=a.isFocused,c=this.buildFocusableOptions(),d=i==="first"?0:c.length-1;if(!this.props.isMulti){var f=c.indexOf(l[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(s&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[d],focusedOptionId:this.getFocusedOptionId(c[d])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,l=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var s=a.indexOf(l);l||(s=-1);var c=a.length-1,d=-1;if(a.length){switch(i){case"previous":s===0?d=0:s===-1?d=c:d=s-1;break;case"next":s>-1&&s<c&&(d=s+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,l=this.getFocusableOptions();if(l.length){var s=0,c=l.indexOf(a);a||(c=-1),i==="up"?s=c>0?c-1:l.length-1:i==="down"?s=(c+1)%l.length:i==="pageup"?(s=c-o,s<0&&(s=0)):i==="pagedown"?(s=c+o,s>l.length-1&&(s=l.length-1)):i==="last"&&(s=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[s],focusedValue:null,focusedOptionId:this.getFocusedOptionId(l[s])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(eu):ve(ve({},eu),this.props.theme):eu}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,l=this.getClassNames,s=this.getValue,c=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:l,getValue:s,hasValue:g,isMulti:h,isRtl:p,options:m,selectOption:c,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 Zg(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return em(this.props,i,o)}},{key:"filterOption",value:function(i,o){return tm(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:l})}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,l=i.inputId,s=i.inputValue,c=i.tabIndex,d=i.form,f=i.menuIsOpen,h=i.required,p=this.getComponents(),m=p.Input,g=this.state,v=g.inputIsHidden,S=g.ariaSelection,w=this.commonProps,y=l||this.getElementId("input"),C=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()?(S==null?void 0:S.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?V.createElement(m,D({},w,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:y,innerRef:this.getInputRef,isDisabled:o,isHidden:v,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:d,type:"text",value:s},C)):V.createElement(PO,D({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ns,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:d,value:""},C))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,l=o.MultiValueContainer,s=o.MultiValueLabel,c=o.MultiValueRemove,d=o.SingleValue,f=o.Placeholder,h=this.commonProps,p=this.props,m=p.controlShouldRenderValue,g=p.isDisabled,v=p.isMulti,S=p.inputValue,w=p.placeholder,y=this.state,C=y.selectValue,b=y.focusedValue,T=y.isFocused;if(!this.hasValue()||!m)return S?null:V.createElement(f,D({},h,{key:"placeholder",isDisabled:g,isFocused:T,innerProps:{id:this.getElementId("placeholder")}}),w);if(v)return C.map(function(P,O){var G=P===b,z="".concat(i.getOptionLabel(P),"-").concat(i.getOptionValue(P));return V.createElement(a,D({},h,{components:{Container:l,Label:s,Remove:c},isFocused:G,isDisabled:g,key:z,index:O,removeProps:{onClick:function(){return i.removeValue(P)},onTouchEnd:function(){return i.removeValue(P)},onMouseDown:function(W){W.preventDefault()}},data:P}),i.formatOptionLabel(P,"value"))});if(S)return null;var E=C[0];return V.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,l=this.props,s=l.isDisabled,c=l.isLoading,d=this.state.isFocused;if(!this.isClearable()||!o||s||!this.hasValue()||c)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return V.createElement(o,D({},a,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,l=this.props,s=l.isDisabled,c=l.isLoading,d=this.state.isFocused;if(!o||!c)return null;var f={"aria-hidden":"true"};return V.createElement(o,D({},a,{innerProps:f,isDisabled:s,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var l=this.commonProps,s=this.props.isDisabled,c=this.state.isFocused;return V.createElement(a,D({},l,{isDisabled:s,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,l=this.props.isDisabled,s=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return V.createElement(o,D({},a,{innerProps:c,isDisabled:l,isFocused:s}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,l=o.GroupHeading,s=o.Menu,c=o.MenuList,d=o.MenuPortal,f=o.LoadingMessage,h=o.NoOptionsMessage,p=o.Option,m=this.commonProps,g=this.state.focusedOption,v=this.props,S=v.captureMenuScroll,w=v.inputValue,y=v.isLoading,C=v.loadingMessage,b=v.minMenuHeight,T=v.maxMenuHeight,E=v.menuIsOpen,P=v.menuPlacement,O=v.menuPosition,G=v.menuPortalTarget,z=v.menuShouldBlockScroll,A=v.menuShouldScrollIntoView,W=v.noOptionsMessage,Y=v.onMenuScrollToTop,N=v.onMenuScrollToBottom;if(!E)return null;var $=function(F,U){var te=F.type,se=F.data,ae=F.isDisabled,J=F.isSelected,le=F.label,ne=F.value,ge=g===se,Se=ae?void 0:function(){return i.onOptionHover(se)},Ue=ae?void 0:function(){return i.selectOption(se)},wt="".concat(i.getElementId("option"),"-").concat(U),at={id:wt,onClick:Ue,onMouseMove:Se,onMouseOver:Se,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:J};return V.createElement(p,D({},m,{innerProps:at,data:se,isDisabled:ae,isSelected:J,key:wt,label:le,type:te,value:ne,isFocused:ge,innerRef:ge?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(F.data,"menu"))},B;if(this.hasOptions())B=this.getCategorizedOptions().map(function(L){if(L.type==="group"){var F=L.data,U=L.options,te=L.index,se="".concat(i.getElementId("group"),"-").concat(te),ae="".concat(se,"-heading");return V.createElement(a,D({},m,{key:se,data:F,options:U,Heading:l,headingProps:{id:ae,data:L.data},label:i.formatGroupLabel(L.data)}),L.options.map(function(J){return $(J,"".concat(te,"-").concat(J.index))}))}else if(L.type==="option")return $(L,"".concat(L.index))});else if(y){var H=C({inputValue:w});if(H===null)return null;B=V.createElement(f,m,H)}else{var q=W({inputValue:w});if(q===null)return null;B=V.createElement(h,m,q)}var ee={minMenuHeight:b,maxMenuHeight:T,menuPlacement:P,menuPosition:O,menuShouldScrollIntoView:A},R=V.createElement(lD,D({},m,ee),function(L){var F=L.ref,U=L.placerProps,te=U.placement,se=U.maxHeight;return V.createElement(s,D({},m,ee,{innerRef:F,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:y,placement:te}),V.createElement(BO,{captureEnabled:S,onTopArrive:Y,onBottomArrive:N,lockEnabled:z},function(ae){return V.createElement(c,D({},m,{innerRef:function(le){i.getMenuListRef(le),ae(le)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:i.getElementId("listbox")},isLoading:y,maxHeight:se,focusedOption:g}),B)}))});return G||O==="fixed"?V.createElement(d,D({},m,{appendTo:G,controlElement:this.controlRef,menuPlacement:P,menuPosition:O}),R):R}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,l=o.isDisabled,s=o.isMulti,c=o.name,d=o.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!l)return V.createElement(FO,{name:c,onFocus:this.onValueInputFocus});if(!(!c||l))if(s)if(a){var h=f.map(function(g){return i.getOptionValue(g)}).join(a);return V.createElement("input",{name:c,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(g,v){return V.createElement("input",{key:"i-".concat(v),name:c,type:"hidden",value:i.getOptionValue(g)})}):V.createElement("input",{name:c,type:"hidden",value:""});return V.createElement("div",null,p)}else{var m=f[0]?this.getOptionValue(f[0]):"";return V.createElement("input",{name:c,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,l=o.focusedOption,s=o.focusedValue,c=o.isFocused,d=o.selectValue,f=this.getFocusableOptions();return V.createElement(SO,D({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:l,focusedValue:s,isFocused:c,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,l=i.SelectContainer,s=i.ValueContainer,c=this.props,d=c.className,f=c.id,h=c.isDisabled,p=c.menuIsOpen,m=this.state.isFocused,g=this.commonProps=this.getCommonProps();return V.createElement(l,D({},g,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:m}),this.renderLiveRegion(),V.createElement(o,D({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:m,menuIsOpen:p}),V.createElement(s,D({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),V.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,l=o.clearFocusValueOnUpdate,s=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,d=o.isFocused,f=o.prevWasFocused,h=o.instancePrefix,p=i.options,m=i.value,g=i.menuIsOpen,v=i.inputValue,S=i.isMulti,w=rs(m),y={};if(a&&(m!==a.value||p!==a.options||g!==a.menuIsOpen||v!==a.inputValue)){var C=g?ZO(i,w):[],b=g?Qg(ls(i,w),"".concat(h,"-option")):[],T=l?eR(o,w):null,E=tR(o,C),P=tu(b,E);y={selectValue:w,focusedOption:E,focusedOptionId:P,focusableOptionsWithIds:b,focusedValue:T,clearFocusValueOnUpdate:!1}}var O=s!=null&&i!==a?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},G=c,z=d&&f;return d&&!z&&(G={value:oo(S,w,w[0]||null),options:w,action:"initial-input-focus"},z=!f),(c==null?void 0:c.action)==="initial-input-focus"&&(G=null),ve(ve(ve({},y),O),{},{prevProps:i,ariaSelection:G,prevWasFocused:z})}}]),n}(x.Component);rm.defaultProps=XO;var rR=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function iR(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,l=e.inputValue,s=e.menuIsOpen,c=e.onChange,d=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,p=e.value,m=Cn(e,rR),g=x.useState(l!==void 0?l:n),v=Vn(g,2),S=v[0],w=v[1],y=x.useState(s!==void 0?s:i),C=Vn(y,2),b=C[0],T=C[1],E=x.useState(p!==void 0?p:a),P=Vn(E,2),O=P[0],G=P[1],z=x.useCallback(function(H,q){typeof c=="function"&&c(H,q),G(H)},[c]),A=x.useCallback(function(H,q){var ee;typeof d=="function"&&(ee=d(H,q)),w(ee!==void 0?ee:H)},[d]),W=x.useCallback(function(){typeof h=="function"&&h(),T(!0)},[h]),Y=x.useCallback(function(){typeof f=="function"&&f(),T(!1)},[f]),N=l!==void 0?l:S,$=s!==void 0?s:b,B=p!==void 0?p:O;return ve(ve({},m),{},{inputValue:N,menuIsOpen:$,onChange:z,onInputChange:A,onMenuClose:Y,onMenuOpen:W,value:B})}var oR=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],im=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},nu={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return im(t,o,i)})||r.some(function(o){return im(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function aR(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?nu.formatCreateLabel:o,l=e.isValidNewOption,s=l===void 0?nu.isValidNewOption:l,c=e.getNewOptionData,d=c===void 0?nu.getNewOptionData:c,f=e.onCreateOption,h=e.options,p=h===void 0?[]:h,m=e.onChange,g=Cn(e,oR),v=g.getOptionValue,S=v===void 0?Gg:v,w=g.getOptionLabel,y=w===void 0?Wg:w,C=g.inputValue,b=g.isLoading,T=g.isMulti,E=g.value,P=g.name,O=x.useMemo(function(){return s(C,rs(E),p,{getOptionValue:S,getOptionLabel:y})?d(C,a(C)):void 0},[a,d,y,S,C,s,p,E]),G=x.useMemo(function(){return(n||!b)&&O?i==="first"?[O].concat(ni(p)):[].concat(ni(p),[O]):p},[n,i,b,O,p]),z=x.useCallback(function(A,W){if(W.action!=="select-option")return m(A,W);var Y=Array.isArray(A)?A:[A];if(Y[Y.length-1]===O){if(f)f(C);else{var N=d(C,C),$={action:"create-option",name:P,option:N};m(oo(T,[].concat(ni(rs(E)),[N]),N),$)}return}m(A,W)},[d,C,T,P,O,f,m,E]);return ve(ve({},g),{},{options:G,onChange:z})}var sR=x.forwardRef(function(e,t){var n=iR(e),r=aR(n);return V.createElement(rm,D({ref:t},r))}),om=sR;const lR={control:(e,t)=>X(j({},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=>X(j({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>X(j({},e),{minHeight:"36px"}),menu:e=>X(j({},e),{position:"relative"}),clearIndicator:e=>X(j({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>X(j({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>X(j({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>X(j({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"14px"}),multiValueLabel:e=>X(j({},e),{color:"#333"})},cR=e=>e.map(t=>({label:t,value:t})),uR=e=>{const[t,n]=x.useState(""),[r,i]=x.useState(!1),o=cR(e.flags),a=()=>i(!r),l=f=>{e.onChange(f.map(h=>h.value))},s=f=>{n(f)},c=f=>{f.persist();const{key:h}=f;if(t)switch(h){case"Enter":case"Tab":if(e.flags&&e.flags.length===0){const p=[...e.flags,t];e.onChange(p)}if(e.flags&&e.flags.length>0&&d()){const p=[...e.flags,t];e.onChange(p)}n(""),f.preventDefault()}},d=()=>{let f=!1;return e.flags.length&&e.flags.includes(t)?(a(),f):(f=!0,f)};return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(om,{styles:lR,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:l,onInputChange:s,onKeyDown:c,placeholder:e.labels.flagsPlaceholder,value:o})}),u.jsx(ut,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},so=e=>{const[t,n]=x.useState(!1),[r,i]=x.useState(!1),[o,a]=x.useState(!1),[l,s]=x.useState(!1),[c,d]=x.useState(""),[f,h]=x.useState("primary"),[p,m]=x.useState(""),g=x.useRef(null),v=()=>{g.current&&g.current.click()},S=new Op,w=pt(),y=()=>{d(""),i(!1)},C=W=>{let Y="",N="primary";switch(W){case"copy_url":Y=e.labels.urlCopiedToClipboardMessage,N="primary";break;case"image_deleted":Y=e.labels.imageDeletedMessage,N="primary";break;case"image_reset":Y=e.labels.imageResetMessage,N="primary";break;case"upload_success":Y=e.labels.uploadingImageMessage,N="success";break;case"upload_failed":Y=e.labels.uploadingImageErrorMessage,N="danger";break;case"sign_in_url_failed":Y=e.labels.generateSignedInUrlErrorMessage,N="danger";break;case"encrypting_file_failed":Y=e.labels.encryptingImageErrorMessage,N="danger";break}h(N),d(Y),i(!0)},b=()=>a(!o),T=()=>s(!l),E=()=>{e.clearImage(),C("image_deleted")},P=W=>{navigator.clipboard.writeText(W),C("copy_url")},O=W=>k(this,null,function*(){W.persist();const Y=W.target.files?W.target.files[0]:null;if(Y){n(!0);try{const N=Y.type.split("/")[1],$=yield S.readFileAndHash(Y),B=(yield S.generateHashFileName(Y))+"."+N,H={image_type:N,image_file_name:B,image_size:Y.size,base64_sum:$},q=yield w==null?void 0:w.https.generateSignedInUrl(H);if(q!=null&&q.ok){const ee=yield q.json(),R={"Content-Type":Y.type,"Content-MD5":$};try{const L=new File([Y],B,{type:Y.type}),F=yield w==null?void 0:w.https.storeInBucket(ee.data.signed_url,L,R);e.onChangeImages(F||""),m(F),C("upload_success")}catch(L){console.error("There was a problem with uploading the file: ",L),C("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield q==null?void 0:q.json()),C("sign_in_url_failed")}catch(N){console.error("There was a problem with encrypting file...",N),C("encrypting_file_failed")}n(!1)}}),G=W=>k(this,null,function*(){if(W){n(!0);try{const Y=W.type.split("/")[1],N=yield S.readFileAndHash(W),$=(yield S.generateHashFileName(W))+"."+Y,B={image_type:Y,image_file_name:$,image_size:W.size,base64_sum:N},H=yield w==null?void 0:w.https.generateSignedInUrl(B);if(H!=null&&H.ok){const q=yield H.json(),ee={"Content-Type":W.type,"Content-MD5":N};try{const R=new File([W],$,{type:W.type}),L=yield w==null?void 0:w.https.storeInBucket(q.data.signed_url,R,ee);e.onChangeImages(L||""),C("upload_success")}catch(R){console.error("There was a problem with uploading the file: ",R),C("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield H==null?void 0:H.json()),C("sign_in_url_failed")}catch(Y){console.error("There was a problem with encrypting file...",Y),C("encrypting_file_failed")}n(!1)}}),z=()=>{e.onChangeImages(p),C("image_reset")},A=W=>{e.onChangeImages(W),m(W)};return u.jsxs(u.Fragment,{children:[u.jsxs(I.Card,{sx:{marginBottom:"10px"},children:[u.jsxs(I.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsx(I.Typography,{level:"title-lg",children:e.title}),u.jsx(I.Tooltip,{title:e.labels.clearImage,children:u.jsx(I.IconButton,{variant:"plain",color:"danger",size:"sm",onClick:E,children:u.jsx(Cp,{})})})]}),u.jsxs(I.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(I.Skeleton,{loading:t,animation:"wave",children:[e.image?u.jsx(I.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)"}}}):u.jsx(Ic,{sx:{fontSize:"3rem",opacity:.2}}),e.image?u.jsx(I.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:u.jsx(Mp,{sx:{fontSize:"3rem",color:"#fff"}})}):u.jsx(u.Fragment,{})]}),u.jsx(I.Tooltip,{title:e.labels.copyUrl,children:u.jsx(I.Button,{onClick:()=>P(e.image),disabled:!e.image,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Le.ContentCopy,{})})}),u.jsx(I.Tooltip,{title:e.labels.viewImage,children:u.jsx(I.Button,{onClick:b,disabled:!e.image,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(Bp,{})})}),u.jsx(I.Tooltip,{title:e.labels.cropImage,children:u.jsx(I.Button,{onClick:T,disabled:!e.image,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(eg,{})})})]}),u.jsx(I.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:u.jsxs(I.Button,{sx:{width:"100%"},onClick:v,children:[u.jsx(Le.Upload,{})," ",e.labels.uploadImage,u.jsx($p,{type:"file",accept:"image/*",onChange:O,ref:g})]})}),w.https.sportal365Config?u.jsx(I.AccordionGroup,{variant:"soft",children:u.jsxs(I.Accordion,{children:[u.jsx(I.AccordionSummary,{children:u.jsx(I.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.labels.sportal365Images})}),u.jsx(I.AccordionDetails,{children:u.jsx(Lp,{labels:e.labels,onChangeImages:A})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(ut,{showToast:r,message:c,color:f,hideToast:y}),u.jsx(Rp,{title:e.labels.viewImage,open:o,imageSrc:e.image,toggleModal:b}),u.jsx(Zp,{labels:e.labels,open:l,imageSrc:e.image,toggleModal:T,uploadImage:G,resetDefaultImageUrl:z})]})},dR=["cover","mobile"],fR=e=>new Map().set("main",e.mainImage).set("cover",e.coverImage).set("mobile",e.mobileImage),hR=e=>e?j({},e):{main:"",mobile:"",cover:""},pR=e=>{const[t,n]=x.useState(!1),r=hR(e.defaultValue),i=fR(e.labels),o=(l,s)=>{r[s]=l,e.onChange(r)},a=l=>{r[l]="",e.onChange(r)};return u.jsxs(I.Box,{sx:{marginBottom:"10px"},children:[u.jsx(so,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:l=>o(l,"main"),clearImage:()=>a("main")}),u.jsx(I.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?u.jsx(u.Fragment,{children:dR.map(l=>u.jsx(so,{labels:e.labels,title:i.get(l),image:r[l],onChangeImages:s=>o(s,l),clearImage:()=>a(l)},`images-${l}`))}):u.jsx(u.Fragment,{})]})};function gR(e){return it("MuiSheet",e)}Xe("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const mR=["className","color","component","variant","invertedColors","slots","slotProps"],vR=e=>{const{variant:t,color:n}=e,r={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`]};return lt(r,gR,{})},bR=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:l,background:s}=Zl({theme:e,ownerState:t},["borderRadius","bgcolor","backgroundColor","background"]),c=Zn(e,`palette.${a}`)||a||Zn(e,`palette.${l}`)||l||s||(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":c==="transparent"?"initial":c,"--Sheet-background":c==="transparent"?"initial":c},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&&G_(t.color)(e),t.variant==="soft"&&t.color&&t.invertedColors&&Y_(t.color)(e),(r=e.variants[t.variant])==null?void 0:r[t.color],i)]}),yR=V.forwardRef(function(t,n){const r=ct({props:t,name:"JoySheet"}),{className:i,color:o="neutral",component:a="div",variant:l="plain",invertedColors:s=!1,slots:c={},slotProps:d={}}=r,f=Ae(r,mR),h=D({},r,{color:o,component:a,invertedColors:s,variant:l}),p=vR(h),m=D({},f,{component:a,slots:c,slotProps:d}),[g,v]=Ie("root",{ref:n,className:Ln(p.root,i),elementType:bR,externalForwardedProps:m,ownerState:h});return u.jsx(g,D({},v))});function CR(e){return it("MuiTypography",e)}Xe("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 xR=["color","textColor"],wR=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],ru=V.createContext(!1),IR=V.createContext(!1),SR=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 lt(a,CR,{})},AR=be("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),TR=be("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),ER=be("span",{name:"JoyTypography",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const l=t.level!=="inherit"?(n=e.typography[t.level])==null?void 0:n.lineHeight:"1";return D({"--Icon-fontSize":`calc(1em * ${l})`},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]))}),am={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"},iu=V.forwardRef(function(t,n){var r;const i=ct({props:t,name:"JoyTypography"}),{color:o,textColor:a}=i,l=Ae(i,xR),s=V.useContext(ru),c=V.useContext(IR),d=BA(D({},l,{color:a})),{component:f,gutterBottom:h=!1,noWrap:p=!1,level:m="body-md",levelMapping:g=am,children:v,endDecorator:S,startDecorator:w,variant:y,slots:C={},slotProps:b={}}=d,T=Ae(d,wR),E=(r=t.color)!=null?r:y?o!=null?o:"neutral":o,P=s||c?t.level||"inherit":m,O=Gf(v,["Skeleton"]),G=f||(s?"span":g[P]||am[P]||"span"),z=D({},d,{level:P,component:G,color:E,gutterBottom:h,noWrap:p,nesting:s,variant:y,unstable_hasSkeleton:O}),A=SR(z),W=D({},T,{component:G,slots:C,slotProps:b}),[Y,N]=Ie("root",{ref:n,className:A.root,elementType:ER,externalForwardedProps:W,ownerState:z}),[$,B]=Ie("startDecorator",{className:A.startDecorator,elementType:AR,externalForwardedProps:W,ownerState:z}),[H,q]=Ie("endDecorator",{className:A.endDecorator,elementType:TR,externalForwardedProps:W,ownerState:z});return u.jsx(ru.Provider,{value:!0,children:u.jsxs(Y,D({},N,{children:[w&&u.jsx($,D({},B,{children:w})),O?V.cloneElement(v,{variant:v.props.variant||"inline"}):v,S&&u.jsx(H,D({},q,{children:S}))]}))})});iu.muiName="Typography";function _R(e){return it("MuiFormControl",e)}const sm=Xe("MuiFormControl",["root","error","disabled","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),kR=Xe("MuiSwitch",["root","checked","disabled","action","input","thumb","track","focusVisible","readOnly","colorPrimary","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid","startDecorator","endDecorator"]),PR=["id","className","component","disabled","required","error","color","size","orientation","slots","slotProps"],DR=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 lt(a,_R,{})},OR=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",[`&.${sm.error}`]:{"--FormHelperText-color":e.vars.palette.danger[500]},[`&.${sm.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 ~ .${kR.root}`]:{"--unstable_Switch-margin":"0 0 0 auto"}})}),ou=V.forwardRef(function(t,n){const r=ct({props:t,name:"JoyFormControl"}),{id:i,className:o,component:a="div",disabled:l=!1,required:s=!1,error:c=!1,color:d,size:f="md",orientation:h="vertical",slots:p={},slotProps:m={}}=r,g=Ae(r,PR),v=ji(i),[S,w]=V.useState(null),y=D({},r,{id:v,component:a,color:d,disabled:l,error:c,required:s,size:f,orientation:h});let C;const b=DR(y),[T,E]=Ie("root",{ref:n,className:Ln(b.root,o),elementType:OR,externalForwardedProps:D({},g,{component:a,slots:p,slotProps:m}),ownerState:y}),P=V.useMemo(()=>({disabled:l,required:s,error:c,color:d,size:f,htmlFor:v,labelId:`${v}-label`,"aria-describedby":S?`${v}-helper-text`:void 0,setHelperText:w,registerEffect:C}),[d,l,c,S,v,C,s,f]);return u.jsx(Ua.Provider,{value:P,children:u.jsx(T,D({},E))})});function RR(e){return it("MuiFormLabel",e)}Xe("MuiFormLabel",["root","asterisk"]);const MR=["children","component","htmlFor","id","slots","slotProps"],LR=()=>lt({root:["root"],asterisk:["asterisk"]},RR,{}),BR=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)"})),$R=be("span",{name:"JoyFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})({color:"var(--FormLabel-asteriskColor)"}),au=V.forwardRef(function(t,n){var r,i;const o=ct({props:t,name:"JoyFormLabel"}),{children:a,component:l="label",htmlFor:s,id:c,slots:d={},slotProps:f={}}=o,h=Ae(o,MR),p=V.useContext(Ua),m=(r=(i=t.required)!=null?i:p==null?void 0:p.required)!=null?r:!1,g=D({},o,{required:m}),v=LR(),S=D({},h,{component:l,slots:d,slotProps:f}),[w,y]=Ie("root",{additionalProps:{htmlFor:s!=null?s:p==null?void 0:p.htmlFor,id:c!=null?c:p==null?void 0:p.labelId},ref:n,className:v.root,elementType:BR,externalForwardedProps:S,ownerState:g}),[C,b]=Ie("asterisk",{additionalProps:{"aria-hidden":!0},className:v.asterisk,elementType:$R,externalForwardedProps:S,ownerState:g});return u.jsxs(w,D({},y,{children:[a,m&&u.jsxs(C,D({},b,{children:[" ","*"]}))]}))}),NR=({environment:e,userNotFound:t})=>{const[n,r]=x.useState(""),[i,o]=x.useState(""),[a,l]=x.useState(!1),s=()=>{l(!a)},c=h=>{h.persist(),r(h.target.value)},d=h=>{h.persist(),o(h.target.value)},f=()=>k(this,null,function*(){try{yield zi(e).signInWithEmailAndPassword(n,i)}catch(h){console.error(h),s()}});return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:u.jsxs(yR,{sx:{width:300,mx:"auto",py:3,px:2,display:"flex",flexDirection:"column",justifyContent:"center",gap:2,borderRadius:"sm",boxShadow:"md"},variant:"outlined",children:[u.jsxs("div",{children:[u.jsx(iu,{level:"h4",component:"h1",children:u.jsx("b",{children:"Sign in"})}),u.jsx(iu,{level:"body-sm",children:"Use your account in the Fans United platform."})]}),u.jsxs(ou,{children:[u.jsx(au,{children:"Email"}),u.jsx(Ha,{name:"email",type:"email",onChange:c})]}),u.jsxs(ou,{children:[u.jsx(au,{children:"Password"}),u.jsx(Ha,{name:"password",type:"password",onChange:d})]}),u.jsx(Xr,{sx:{mt:1},onClick:f,children:"Log in"})]})}),u.jsx(ut,{showToast:a,message:t,color:"danger",hideToast:s})]})};function FR(e){return it("MuiCheckbox",e)}const ii=Xe("MuiCheckbox",["root","checkbox","action","input","label","checked","disabled","focusVisible","indeterminate","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid"]),zR=nc(u.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"),jR=nc(u.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"),VR=["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"],UR=e=>{const{checked:t,disabled:n,disableIcon:r,focusVisible:i,color:o,variant:a,size:l,indeterminate:s}=e,c={root:["root",t&&"checked",n&&"disabled",i&&"focusVisible",a&&`variant${ye(a)}`,o&&`color${ye(o)}`,l&&`size${ye(l)}`],checkbox:["checkbox",t&&"checked",s&&"indeterminate",n&&"disabled"],action:["action",t&&"checked",r&&n&&"disabled",i&&"focusVisible"],input:["input"],label:["label"]};return lt(c,FR,{})},HR=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,[`&.${ii.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,[`&.${ii.disabled}`]:{color:(i=t.variants[`${e.variant}Disabled`])==null||(i=i[e.color])==null?void 0:i.color}})}),WR=be("span",{name:"JoyCheckbox",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const l=(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"},{[`&.${ii.checked}, &.${ii.indeterminate}`]:{"--Icon-color":"currentColor"}}),...t.disableIcon?[]:[D({},l,{backgroundColor:(r=l==null?void 0:l.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]},{[`&.${ii.disabled}`]:(a=e.variants[`${t.variant}Disabled`])==null?void 0:a[t.color]}]]}),GR=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]},{[`&.${ii.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]}]:[]]}),YR=be("input",{name:"JoyCheckbox",slot:"Input",overridesResolver:(e,t)=>t.input})(()=>({margin:0,opacity:0,position:"absolute",width:"100%",height:"100%",cursor:"pointer"})),KR=be("label",{name:"JoyCheckbox",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>D({flex:1,minWidth:0},e.disableIcon&&{zIndex:1,pointerEvents:"none"})),qR=u.jsx(zR,{}),QR=u.jsx(jR,{}),JR=V.forwardRef(function(t,n){var r,i,o,a,l;const s=ct({props:t,name:"JoyCheckbox"}),{checked:c,uncheckedIcon:d,checkedIcon:f=qR,label:h,defaultChecked:p,disabled:m,disableIcon:g=!1,overlay:v,id:S,indeterminate:w=!1,indeterminateIcon:y=QR,name:C,onBlur:b,onChange:T,onFocus:E,onFocusVisible:P,readOnly:O,required:G,value:z,color:A,variant:W,size:Y="md",component:N,slots:$={},slotProps:B={}}=s,H=Ae(s,VR),q=V.useContext(Ua),ee=(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:Y,L=ji(S!=null?S:q==null?void 0:q.htmlFor),F={checked:c,defaultChecked:p,disabled:ee,onBlur:b,onChange:T,onFocus:E,onFocusVisible:P},{getInputProps:U,checked:te,disabled:se,focusVisible:ae}=TS(F),J=te||w,ge=J?W||"solid":W||"outlined",Se=t.color||(q!=null&&q.error?"danger":(l=q==null?void 0:q.color)!=null?l:A),at=D({},s,{checked:te,disabled:se,disableIcon:g,overlay:v,focusVisible:ae,color:J?Se||"primary":Se||"neutral",variant:ge,size:R}),kt=UR(at),de=D({},H,{component:N,slots:$,slotProps:B}),[he,Ce]=Ie("root",{ref:n,className:kt.root,elementType:HR,externalForwardedProps:de,ownerState:at}),[Te,He]=Ie("checkbox",{className:kt.checkbox,elementType:WR,externalForwardedProps:de,ownerState:at}),[Pe,Ee]=Ie("action",{className:kt.action,elementType:GR,externalForwardedProps:de,ownerState:at}),[It,St]=Ie("input",{additionalProps:D({id:L,name:C,value:z,readOnly:O,role:void 0,required:G!=null?G:q==null?void 0:q.required,"aria-describedby":q==null?void 0:q["aria-describedby"]},w&&{"aria-checked":"mixed"}),className:kt.input,elementType:YR,externalForwardedProps:de,getSlotProps:U,ownerState:at}),[jt,Mt]=Ie("label",{additionalProps:{htmlFor:L},className:kt.label,elementType:KR,externalForwardedProps:de,ownerState:at});let qt=d;return g?qt=null:w?qt=y:te&&(qt=f),u.jsxs(he,D({},Ce,{children:[u.jsxs(Te,D({},He,{children:[u.jsx(Pe,D({},Ee,{children:u.jsx(It,D({},St))})),qt]})),h&&u.jsx(ru.Provider,{value:!0,children:u.jsx(jt,D({},Mt,{children:h}))})]}))}),XR=Ve(u.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),oi=({label:e,values:t,allValues:n,valuesMap:r,showAll:i,showAllLabel:o,onChange:a,toggleShowAll:l})=>{const s=(c,d)=>{c.persist();let f=[...t];if(c.target.checked){f.push(d),a(f);return}f=t.filter(h=>h!==d),a(f)};return u.jsxs(I.Box,{sx:{mb:2},children:[u.jsx(I.Typography,{level:"body-sm",mb:1,children:e}),u.jsxs(D1,{orientation:"horizontal",wrap:!0,sx:{"--List-gap":"8px","--ListItem-radius":"20px","--ListItem-minHeight":"32px","--ListItem-gap":"4px"},children:[n.map(c=>u.jsxs(Lh,{children:[t.includes(c)&&u.jsx(XR,{fontSize:"medium",color:"primary",sx:{ml:-.5,zIndex:2,pointerEvents:"none"}}),u.jsx(JR,{checked:t.includes(c),variant:t.includes(c)?"soft":"outlined",overlay:!0,disableIcon:!0,label:r[c]||"N/A",onChange:d=>s(d,c),slotProps:{action:({checked:d})=>({sx:d?{border:"1px solid",borderColor:"primary.500"}:{backgroundColor:"#fff"}})}})]},`checkbox-value-${e}-${c}`)),i===!1?u.jsx(Lh,{children:u.jsx(I.Link,{onClick:l,children:o})}):u.jsx(u.Fragment,{})]})]})},ai={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"]},ZR=({labels:e,values:t,valuesMap:n,onChange:r})=>{const[i,o]=x.useState(!1);return u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.marketSelection}),u.jsx(I.FormHelperText,{sx:{mb:2},children:e.marketSelectionDescription}),u.jsx(oi,{label:"Popular",values:t,allValues:ai.popular,valuesMap:n,showAll:i,showAllLabel:e.showAll,onChange:r,toggleShowAll:()=>o(!0)}),i?u.jsxs(u.Fragment,{children:[u.jsx(oi,{label:e.playerRelated,values:t,allValues:ai.playerRelated,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.goals,values:t,allValues:ai.goals,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.corners,values:t,allValues:ai.corners,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.correctScores,values:t,allValues:ai.correctScores,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.misc,values:t,allValues:ai.misc,valuesMap:n,onChange:r})]}):u.jsx(u.Fragment,{})]})},gt={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="},eM=({match:e,timeFormat:t})=>{var n,r,i,o;return u.jsxs(I.Box,{display:"flex",alignItems:"center",gap:.5,fontSize:"xs",children:[u.jsxs(I.Typography,{mr:1,children:["[",_t(e.kickoffAt).format(t),"]"]}),e.homeTeam.code?u.jsx(I.Tooltip,{title:e.homeTeam.name,children:u.jsxs(I.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[u.jsx(I.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(I.Avatar,{src:((n=e.homeTeam.assets)==null?void 0:n.logo)||gt.team,sx:{width:"20px",height:"20px"}})]})}):u.jsxs(u.Fragment,{children:[u.jsx(I.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(I.Avatar,{src:((r=e.homeTeam.assets)==null?void 0:r.logo)||gt.team,sx:{width:"20px",height:"20px"}})]}),"-",e.awayTeam.code?u.jsx(I.Tooltip,{title:e.awayTeam.name,children:u.jsxs(I.Box,{display:"flex",gap:.5,alignItems:"center",children:[u.jsx(I.Avatar,{src:((i=e.awayTeam.assets)==null?void 0:i.logo)||gt.team,sx:{width:"20px",height:"20px"}})," ",u.jsx(I.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})}):u.jsxs(u.Fragment,{children:[u.jsx(I.Avatar,{src:((o=e.awayTeam.assets)==null?void 0:o.logo)||gt.team,sx:{width:"20px",height:"20px"}}),u.jsx(I.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})]})},lm=Ve(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),tM=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),{sdk:l}=pt(),s=()=>k(this,null,function*(){try{const h=yield l.topX.getGames({limit:50},!0),p=yield l.matchQuiz.getGames({limit:50},!0),m=[...h.data,...p.data];if(e.related&&e.related.length>0){const g=m.filter(v=>{var S;return(S=e.related)==null?void 0:S.some(w=>w.entity_id===v.id)}).map(v=>v.id);n(g)}i(m)}catch(f){console.error(f),d()}}),c=(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(()=>{s()},[]),u.jsxs(u.Fragment,{children:[r.length>0?u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.label}),u.jsx(I.Select,{multiple:!0,indicator:u.jsx(lm,{}),defaultValue:t,renderValue:f=>u.jsx(I.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(I.Chip,{variant:"soft",color:"primary",children:h.label},`related-game-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${I.selectClasses.indicator}`]:{transition:"0.2s",[`&.${I.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(I.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}`))})]}):u.jsx(u.Fragment,{}),u.jsx(ut,{showToast:o,message:"There was a problem witch fetching games for related options",color:"danger",hideToast:d})]})},nM=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),{sdk:l}=pt(),s=()=>k(this,null,function*(){try{const h=yield l.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(v=>v.entity_id===m.id)}).map(m=>m.id);n(p)}i(h.data)}catch(f){console.error(f),d()}}),c=(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(()=>{s()},[]),u.jsxs(u.Fragment,{children:[r.length>0?u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.label}),u.jsx(I.Select,{multiple:!0,indicator:u.jsx(lm,{}),defaultValue:t,renderValue:f=>u.jsx(I.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(I.Chip,{variant:"soft",color:"primary",children:h.label},`related-template-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${I.selectClasses.indicator}`]:{transition:"0.2s",[`&.${I.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(I.Option,{value:f.id,children:f.name||`Template with no name. ID: ${f.id}`},`related-template-name-${f.id}`))})]}):u.jsx(u.Fragment,{}),u.jsx(ut,{showToast:o,message:"There was a problem witch fetching templates for related options",color:"danger",hideToast:d})]})},cm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="game"),um=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="template"),rM=e=>{const t=(n,r)=>{if(r==="games"){const i=um(e.related);e.onChange([...n,...i])}if(r==="templates"){const i=cm(e.related);e.onChange([...n,...i])}};return u.jsxs(u.Fragment,{children:[u.jsx(tM,{label:e.labels.games,related:cm(e.related),onChange:n=>t(n,"games")}),u.jsx(nM,{label:e.labels.templates,related:um(e.related),onChange:n=>t(n,"templates")})]})},iM=(e,t)=>{const[n,r]=x.useState(null),{https:i}=pt(),o=()=>k(this,null,function*(){const a=yield i.getSchedulersByEntityId(e);if(a.ok){const l=yield a.json();r(l.data);return}r([])});return x.useEffect(()=>(o(),()=>r(null)),[e,t]),n},us=({my:e})=>u.jsx(I.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",my:e},children:u.jsx(I.CircularProgress,{variant:"solid",color:"neutral"})}),oM=["PENDING","LIVE","SETTLED"],aM=["CANCELED","LIVE","OPEN","PENDING"],sM=["ACTIVE","INACTIVE","EXPIRED"],lM=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"),dm=e=>{let t=[];return e.entityType==="CLASSIC_QUIZ"||e.entityType==="EITHER_OR"||e.entityType==="POLL"?t=Array.from(sM):e.entityType==="TEMPLATE"?t=Array.from(oM):t=Array.from(aM),u.jsx(u.Fragment,{children:t.map(n=>u.jsx(I.Option,{value:n,children:lM.get(n)},`${e.entityType}-${n}-status`))})};class cM{constructor(){ie(this,"name","");ie(this,"scheduled_task_config",{entity_id:"",entity_type:"",change:{status:""}});ie(this,"trigger",{trigger_type:"DATETIME",date:""})}}const uM=Ve(u.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"),dM=e=>{const[t,n]=x.useState(!1),{https:r}=pt(),i=o=>k(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 u.jsx(u.Fragment,{children:u.jsx(I.Modal,{open:e.isOpen,onClose:e.toggleModal,children:u.jsxs(I.ModalDialog,{children:[u.jsxs(I.DialogTitle,{children:[u.jsx(uM,{}),e.labels.deleteScheduledTaskModalTitle]}),u.jsx(I.Divider,{}),u.jsx(I.DialogContent,{children:u.jsxs(I.Typography,{children:[e.labels.deleteScheduledTaskModalParagraph,u.jsx(I.Typography,{fontWeight:"bold",children:e.taskName}),"?"]})}),u.jsxs(I.DialogActions,{children:[u.jsx(I.Button,{loading:t,variant:"solid",color:"danger",onClick:o=>i(o),children:e.labels.delete}),u.jsx(I.Button,{variant:"plain",color:"neutral",onClick:o=>{o.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]})})})},fM=e=>{const[t,n]=x.useState(null),[r,i]=x.useState(""),[o,a]=x.useState(""),[l,s]=x.useState(""),[c,d]=x.useState(""),[f,h]=x.useState(!1),[p,m]=x.useState(!1),[g,v]=x.useState(!1),[S,w]=x.useState("success"),[y,C]=x.useState(""),[b,T]=x.useState(!1),E=x.useRef(!1),P=iM(e.entityId,E.current),{https:O}=pt();if(!P)return u.jsx(us,{my:10});const G=()=>T(!b),z=(B,H)=>{v(!0),w(B),C(H)},A=(B,H)=>{i(H.scheduled_task_config.change.status),s(H.trigger.date),n(B)},W=()=>k(this,null,function*(){h(!0);const B=$("CREATE","");if((yield O.setSchedulers(B,"CREATE",null)).ok){h(!1),a(""),d(""),E.current=!E.current,z("success",e.labels.createScheduledTaskMessage);return}h(!1),a(""),d(""),z("danger",e.labels.createScheduledTaskErrorMessage)}),Y=(B,H)=>k(this,null,function*(){m(!0);const q=$("UPDATE",H);if((yield O.setSchedulers(q,"UPDATE",B)).ok){m(!1),n(null),i(""),s(""),E.current=!E.current,z("success",e.labels.updateScheduledTaskMessage);return}m(!1),z("danger",e.labels.updateScheduledTaskErrorMessage),n(null),i(""),s("")}),N=()=>{E.current=!E.current},$=(B,H)=>{const q=new cM,ee=B==="CREATE"?o:r,R=B==="CREATE"?null:H,L=B==="CREATE"?c:l;return q.scheduled_task_config.entity_id=e.entityId,q.scheduled_task_config.entity_type=e.entityType,q.scheduled_task_config.change.status=ee,q.trigger.date=L,q.name=R,q};return u.jsxs(u.Fragment,{children:[P.map((B,H)=>u.jsx(I.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(I.CardContent,{children:t===H?u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%"},children:[u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(I.Select,{value:r,size:"sm",name:"status",onChange:(q,ee)=>i(ee),sx:{minHeight:"36px"},children:u.jsx(dm,{entityType:e.entityType})})]}),u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Vc,{defaultDate:l,onChange:q=>s(q)})]}),r&&l?u.jsx(I.Button,{onClick:()=>Y(B.id,B.name),loading:p,sx:{mt:"auto"},children:e.labels.save}):u.jsx(I.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.save})]}):u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"}},children:[u.jsxs(I.Box,{children:[u.jsxs(I.Typography,{style:{fontWeight:"bold"},children:[e.labels.name,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:B.name})]}),u.jsxs(I.Typography,{style:{color:"gray"},children:[e.labels.status,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:B.status})]})]}),u.jsxs(I.Box,{children:[u.jsx(I.Tooltip,{title:e.labels.edit,children:u.jsx(I.IconButton,{onClick:()=>A(H,B),children:u.jsx(Le.Edit,{})})}),u.jsx(I.Tooltip,{title:e.labels.delete,children:u.jsx(I.IconButton,{onClick:G,children:u.jsx(Le.Delete,{})})})]}),u.jsx(dM,{labels:e.labels,isOpen:b,taskId:B.id,taskName:B.name,toggleModal:G,refetchTasks:N,toggleToast:z})]})})},`scheduled-task-${e.entityId}-${e.entityType}-${B.id}`)),u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%",mt:P&&P.length?2:0},children:[u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(I.Select,{value:o,size:"sm",name:"status",onChange:(B,H)=>a(H),sx:{minHeight:"37px"},children:u.jsx(dm,{entityType:e.entityType})})]}),u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Vc,{defaultDate:c,onChange:B=>d(B)})]}),o&&c?u.jsx(I.Button,{onClick:W,loading:f,sx:{mt:"auto"},children:e.labels.create}):u.jsx(I.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.create})]}),u.jsx(ut,{showToast:g,message:y,color:S,hideToast:()=>v(!1)})]})};function hM(e){return it("MuiIconButton",e)}Xe("MuiIconButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","loading","loadingIndicator"]);const pM=["children","action","component","color","disabled","variant","loading","loadingIndicator","size","slots","slotProps"],gM=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,size:o,variant:a,loading:l}=e,s={root:["root",n&&"disabled",r&&"focusVisible",a&&`variant${ye(a)}`,t&&`color${ye(t)}`,o&&`size${ye(o)}`,l&&"loading"],loadingIndicator:["loadingIndicator"]},c=lt(s,hM,{});return r&&i&&(c.root+=` ${i}`),c},mM=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]})]}),vM=be(mM,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),bM=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})}),fm=V.forwardRef(function(t,n){var r;const i=ct({props:t,name:"JoyIconButton"}),{children:o,action:a,component:l="button",color:s="neutral",disabled:c,variant:d="plain",loading:f=!1,loadingIndicator:h,size:p="md",slots:m={},slotProps:g={}}=i,v=Ae(i,pM),S=V.useContext(Sp),w=V.useContext(Ap),y=t.variant||S.variant||d,C=t.size||S.size||p,b=t.color||S.color||s,T=(r=t.loading||t.disabled)!=null?r:S.disabled||f||c,E=V.useRef(null),P=sn(E,n),{focusVisible:O,setFocusVisible:G,getRootProps:z}=Rl(D({},i,{disabled:T,rootRef:P})),A=h!=null?h:u.jsx(wp,{color:b,thickness:{sm:2,md:3,lg:4}[C]||3});V.useImperativeHandle(a,()=>({focusVisible:()=>{var L;G(!0),(L=E.current)==null||L.focus()}}),[G]);const W=D({},i,{component:l,color:b,disabled:T,variant:y,loading:f,size:C,focusVisible:O,instanceSize:t.size}),Y=gM(W),N=L=>{var F;let U=i.onClick;if(typeof g.root=="function"?U=g.root(W).onClick:g.root&&(U=g.root.onClick),(F=U)==null||F(L),w){var te;(te=w.onClick)==null||te.call(w,L,i.value)}};let $=i["aria-pressed"];typeof g.root=="function"?$=g.root(W)["aria-pressed"]:g.root&&($=g.root["aria-pressed"]),w!=null&&w.value&&(Array.isArray(w.value)?$=w.value.indexOf(i.value)!==-1:$=w.value===i.value);const B=D({},v,{component:l,slots:m,slotProps:g}),[H,q]=Ie("root",{ref:n,className:Y.root,elementType:vM,getSlotProps:z,externalForwardedProps:B,ownerState:W,additionalProps:{onClick:N,"aria-pressed":$}}),[ee,R]=Ie("loadingIndicator",{className:Y.loadingIndicator,elementType:bM,externalForwardedProps:B,ownerState:W});return u.jsx(H,D({},q,{children:f?u.jsx(ee,D({},R,{children:A})):o}))});fm.muiName="IconButton";const hm=Ve(u.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"),yM=({label:e,defaultValue:t,options:n,required:r,onChange:i})=>{function o(s){var c,d;return s?u.jsxs(u.Fragment,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx(I.Avatar,{size:"sm",src:((d=(c=n.find(f=>f.id===s.value))==null?void 0:c.assets)==null?void 0:d.logo)||gt.competition})}),s.label]}):null}const a=x.useRef(null),l=(s,c)=>{i(c)};return u.jsxs(I.FormControl,{sx:{mb:1},children:[u.jsx(I.FormLabel,{required:r,color:"primary",children:e}),u.jsx(I.Select,X(j({slotProps:{button:{sx:{whiteSpace:"nowrap"}}},sx:{"--ListItemDecorator-size":"44px",minHeight:"37px"},renderValue:o,value:t,onChange:l},t&&{endDecorator:u.jsx(fm,{variant:"plain",color:"neutral",onMouseDown:s=>{s.stopPropagation()},onClick:()=>{var s;i(""),(s=a.current)==null||s.focusVisible()},sx:{width:"18px",height:"18px"},children:u.jsx(hm,{})}),indicator:null}),{children:n.map((s,c)=>{var d;return u.jsxs(x.Fragment,{children:[c!==0?u.jsx(I.ListDivider,{role:"none"}):null,u.jsxs(I.Option,{value:s.id,label:s.name,children:[u.jsx(I.ListItemDecorator,{children:u.jsx(I.Avatar,{size:"sm",src:((d=s.assets)==null?void 0:d.logo)||gt.competition})}),s.name]})]},`${s.id}-${c}`)})}))]})};function CM(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var pm=CM,xM=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,wM=xM,IM=wM,SM=typeof self=="object"&&self&&self.Object===Object&&self,AM=IM||SM||Function("return this")(),gm=AM,TM=gm,EM=function(){return TM.Date.now()},_M=EM,kM=/\s/;function PM(e){for(var t=e.length;t--&&kM.test(e.charAt(t)););return t}var DM=PM,OM=DM,RM=/^\s+/;function MM(e){return e&&e.slice(0,OM(e)+1).replace(RM,"")}var LM=MM,BM=gm,$M=BM.Symbol,su=$M,mm=su,vm=Object.prototype,NM=vm.hasOwnProperty,FM=vm.toString,lo=mm?mm.toStringTag:void 0;function zM(e){var t=NM.call(e,lo),n=e[lo];try{e[lo]=void 0;var r=!0}catch(o){}var i=FM.call(e);return r&&(t?e[lo]=n:delete e[lo]),i}var jM=zM,VM=Object.prototype,UM=VM.toString;function HM(e){return UM.call(e)}var WM=HM,bm=su,GM=jM,YM=WM,KM="[object Null]",qM="[object Undefined]",ym=bm?bm.toStringTag:void 0;function QM(e){return e==null?e===void 0?qM:KM:ym&&ym in Object(e)?GM(e):YM(e)}var JM=QM;function XM(e){return e!=null&&typeof e=="object"}var ZM=XM,eL=JM,tL=ZM,nL="[object Symbol]";function rL(e){return typeof e=="symbol"||tL(e)&&eL(e)==nL}var Cm=rL,iL=LM,xm=pm,oL=Cm,wm=NaN,aL=/^[-+]0x[0-9a-f]+$/i,sL=/^0b[01]+$/i,lL=/^0o[0-7]+$/i,cL=parseInt;function uL(e){if(typeof e=="number")return e;if(oL(e))return wm;if(xm(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=xm(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=iL(e);var n=sL.test(e);return n||lL.test(e)?cL(e.slice(2),n?2:8):aL.test(e)?wm:+e}var dL=uL,fL=pm,lu=_M,Im=dL,hL="Expected a function",pL=Math.max,gL=Math.min;function mL(e,t,n){var r,i,o,a,l,s,c=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(hL);t=Im(t)||0,fL(n)&&(d=!!n.leading,f="maxWait"in n,o=f?pL(Im(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(T){var E=r,P=i;return r=i=void 0,c=T,a=e.apply(P,E),a}function m(T){return c=T,l=setTimeout(S,t),d?p(T):a}function g(T){var E=T-s,P=T-c,O=t-E;return f?gL(O,o-P):O}function v(T){var E=T-s,P=T-c;return s===void 0||E>=t||E<0||f&&P>=o}function S(){var T=lu();if(v(T))return w(T);l=setTimeout(S,g(T))}function w(T){return l=void 0,h&&r?p(T):(r=i=void 0,a)}function y(){l!==void 0&&clearTimeout(l),c=0,r=s=i=l=void 0}function C(){return l===void 0?a:w(lu())}function b(){var T=lu(),E=v(T);if(r=arguments,i=this,s=T,E){if(l===void 0)return m(s);if(f)return clearTimeout(l),l=setTimeout(S,t),p(s)}return l===void 0&&(l=setTimeout(S,t)),a}return b.cancel=y,b.flush=C,b}var vL=mL;const si=fn(vL),xn=({option:e})=>u.jsxs(I.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(I.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:e.logo}),u.jsx(I.Typography,{children:e.label}),u.jsx(I.Typography,{ml:.5,level:"body-xs",children:`(${e.countryName})`})]}),Sm=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)||gt.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)||gt.flag}}))||[],bL=({labels:e,label:t,ids:n,required:r,onChange:i})=>{const[o,a]=x.useState([]),[l,s]=x.useState([]),[c,d]=x.useState(!1),[f,h]=x.useState(""),[p,m]=x.useState(!1),{sdk:g}=pt(),v=()=>m(!p),S=(b,T)=>{a(T),i(T[0]?[T[0].id]:[])},w=3;x.useEffect(()=>{!f&&n&&n.length&&g.football.getCompetitions({competitionIds:n}).then(b=>{a(Sm(b))}).catch(b=>{console.error(b),v(),a([])})},[]);const y=x.useMemo(()=>si(b=>{d(!0),g.football.getCompetitions({name:b}).then(T=>{s([...Sm(T)]),d(!1)}).catch(T=>{console.error(T),v(),s([]),d(!1)})},300),[]);x.useEffect(()=>{if(!f||f.length<w){s([]);return}return y(f),()=>y.cancel()},[f,y]);const C=(b,T)=>b.map((E,P)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:O=>T({index:P}).onClick(O),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(xn,{option:E},`option_${E.id}`)},E.id));return u.jsxs(I.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{required:r,color:"primary",children:t}),u.jsx(I.Box,{children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:c,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(b,T)=>b.id===T.id,endDecorator:c?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.competitionsSelectionPlaceholder,options:l,disabled:o.length===1,filterOptions:b=>b.filter(T=>!o.some(E=>E.value===T.value)),onInputChange:(b,T)=>{h(T)},onChange:S,getOptionKey:b=>b.id,value:o,renderTags:C,renderOption:(b,T)=>u.jsx(I.AutocompleteOption,X(j({},b),{children:u.jsx(xn,{option:T})}))})}),u.jsx(ut,{showToast:p,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:v})]})},Am=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)||gt.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)||gt.flag}}))||[],yL=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=x.useState([]),[a,l]=x.useState([]),[s,c]=x.useState(!1),[d,f]=x.useState(""),[h,p]=x.useState(!1),{sdk:m}=pt(),g=()=>p(!h),v=(C,b)=>{o(b);const T=b.map(E=>E.id);r(T&&T.length?T:null)},S=3;x.useEffect(()=>{!d&&t&&t.length&&m.football.getCompetitions({competitionIds:t}).then(C=>{o(Am(C))}).catch(C=>{console.error(C),g(),o([])})},[]);const w=x.useMemo(()=>si(C=>{c(!0);const b={name:C,competitionIds:[""]};n&&Array.isArray(n)&&n.length>0?b.competitionIds=Array.from(n):delete b.competitionIds,m.football.getCompetitions(b).then(T=>{l([...Am(T)]),c(!1)}).catch(T=>{console.error(T),g(),l([]),c(!1)})},300),[]);x.useEffect(()=>{if(!d||d.length<S){l([]);return}return w(d),()=>w.cancel()},[d,w]);const y=(C,b)=>C.map((T,E)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:P=>b({index:E}).onClick(P),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(xn,{option:T},`option_${T.id}`)},T.id));return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:s,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(C,b)=>C.id===b.id,endDecorator:s?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.competitionsSelectionPlaceholder,options:a,filterOptions:C=>C.filter(b=>!i.some(T=>T.value===b.value)),onInputChange:(C,b)=>{f(b)},onChange:v,getOptionKey:C=>C.id,value:i,renderTags:y,renderOption:(C,b)=>u.jsx(I.AutocompleteOption,X(j({},C),{children:u.jsx(xn,{option:b})}))})}),u.jsx(ut,{showToast:h,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:g})]})},Tm=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})))||[],CL=({labels:e,ids:t,onChange:n})=>{const[r,i]=x.useState([]),[o,a]=x.useState([]),[l,s]=x.useState(!1),[c,d]=x.useState(""),[f,h]=x.useState(!1),{sdk:p}=pt(),m=()=>h(!f),g=(y,C)=>{i(C);const b=C.map(T=>T.id);n(b&&b.length?b:null)},v=3;x.useEffect(()=>{!c&&t&&t.length&&p.profile.getByIds(t).then(y=>{i(Tm(y))}).catch(y=>{m(),console.error(y),i([])})},[]);const S=x.useMemo(()=>si(y=>{s(!0),p.profile.getByIds([],y).then(C=>{a([...Tm(C)]),s(!1)}).catch(C=>{console.error(C),m(),a([]),s(!1)})},300),[]);x.useEffect(()=>{if(!c||c.length<v){a([]);return}return S(c),()=>S.cancel()},[c,S]);const w=(y,C)=>y.map((b,T)=>{var E;return u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:P=>C({index:T}).onClick(P),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsxs(I.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(I.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(E=b.avatar)!=null?E:gt.avatar}),u.jsx(I.Typography,{children:b.label})]})},b.id)});return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:l,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(y,C)=>y.id===C.id,endDecorator:l?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:y=>y.filter(C=>!r.some(b=>b.value===C.value)),onInputChange:(y,C)=>{d(C)},onChange:g,getOptionKey:y=>y.id,value:r,renderTags:w,renderOption:(y,C)=>{var b;return u.jsx(I.AutocompleteOption,X(j({},y),{children:u.jsxs(I.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(I.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(b=C.avatar)!=null?b:gt.avatar}),u.jsx(I.Typography,{children:C.label})]})}))}})}),u.jsx(ut,{showToast:f,message:e.searchProfilesErrorMessage,color:"danger",hideToast:m})]})},Em=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)||gt.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)||gt.flag}}))||[],xL=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=x.useState([]),[a,l]=x.useState([]),[s,c]=x.useState(!1),[d,f]=x.useState(""),[h,p]=x.useState(!1),{sdk:m}=pt(),g=()=>p(!h),v=(C,b)=>{o(b);const T=b.map(E=>E.id);r(T&&T.length?T:null)},S=3;x.useEffect(()=>{!d&&t&&t.length&&m.football.getTeams({teamIds:t,scope:n}).then(C=>{const b=C.data.filter(T=>!T.name.includes("/"));o(Em(b))}).catch(C=>{console.error(C),g(),o([])})},[]);const w=x.useMemo(()=>si(C=>{c(!0),m.football.getTeams({name:C,scope:n}).then(b=>{const T=b.data.filter(E=>!E.name.includes("/"));l([...Em(T)]),c(!1)}).catch(b=>{console.error(b),g(),l([]),c(!1)})},300),[]);x.useEffect(()=>{if(!d||d.length<S){l([]);return}return w(d),()=>w.cancel()},[d,w]);const y=(C,b)=>C.map((T,E)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:P=>b({index:E}).onClick(P),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(xn,{option:T},`option_${T.id}`)},T.id));return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:s,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(C,b)=>C.id===b.id,endDecorator:s?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.teamsSelectionPlaceholder,options:a,filterOptions:C=>C.filter(b=>!i.some(T=>T.value===b.value)),onInputChange:(C,b)=>{f(b)},onChange:v,getOptionKey:C=>C.id,value:i,renderTags:y,renderOption:(C,b)=>u.jsx(I.AutocompleteOption,X(j({},C),{children:u.jsx(xn,{option:b})}))})}),u.jsx(ut,{showToast:h,message:e.searchTeamsErrorMessage,color:"danger",hideToast:g})]})},_m=({checked:e,disabled:t,onChange:n})=>u.jsx(I.Switch,{color:e?"success":"danger",checked:e,disabled:t,onChange:r=>n(r.target.checked),sx:{ml:1,"--Switch-thumbSize":"16px","--Switch-trackWidth":"40px","--Switch-trackHeight":"24px","--Switch-trackBackground":"#EE5E52","&:hover":{"--Switch-trackBackground":"#EE5E52"},[`&.${I.switchClasses.checked}`]:{"--Switch-trackBackground":"#5CB176","&:hover":{"--Switch-trackBackground":"#5CB176"}}}}),wL=({label:e,defaultValue:t,description:n,disabled:r,descriptionColor:i,onChange:o})=>n?u.jsxs(I.Box,{mb:2,children:[u.jsx(I.Typography,{component:"label",endDecorator:u.jsx(_m,{checked:t,disabled:r,onChange:o}),children:e}),u.jsx(I.Typography,{level:"body-sm",color:i||"neutral",children:n})]}):u.jsx(I.Typography,{sx:()=>({marginBottom:"16px"}),component:"label",endDecorator:u.jsx(_m,{checked:t,disabled:r,onChange:o}),children:e}),IL={control:(e,t)=>X(j({},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=>X(j({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>X(j({},e),{minHeight:"36px"}),menu:e=>X(j({},e),{position:"relative"}),clearIndicator:e=>X(j({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>X(j({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>X(j({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>X(j({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"13px"}),multiValueLabel:e=>X(j({},e),{color:"#333"})},SL=e=>e.map(t=>({label:t,value:t})),km=e=>{const[t,n]=x.useState(""),[r,i]=x.useState(!1),o=SL(e.tags),a=()=>i(!r),l=f=>{e.onChange(f.map(h=>h.value))},s=f=>{n(f)},c=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 u.jsxs(u.Fragment,{children:[u.jsx(om,{styles:IL,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:l,onInputChange:s,onKeyDown:c,placeholder:e.labels.tagsPlaceholder,value:o}),u.jsx(ut,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},AL=Ve(u.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");class Pm{constructor(){ie(this,"contestId","");ie(this,"contestType","");ie(this,"description","");ie(this,"userList",[])}}const TL=(e,t,n)=>{const[r,i]=x.useState(null),{sdk:o}=pt(),a=()=>k(this,null,function*(){try{let l;switch(t){case"top_x":l=yield o.topX.getGameWinners(e,!0);break;case"match_quiz":l=yield o.matchQuiz.getGameWinners(e,!0);break;default:l=yield o.loyalty.getTemplateWinners(e,!0)}l.userList&&l.userList.forEach(s=>{s.tags||(s.tags=[])}),i(l)}catch(l){const s=l;console.error(l),s.error.code!==404&&s.error.status!=="code_unknown_contest"&&n(),i(new Pm)}});return x.useEffect(()=>{a()},[]),r};class EL{constructor(){ie(this,"position","");ie(this,"profileId","");ie(this,"note","");ie(this,"tags",[])}}function _L(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 kL=_L,PL=Array.isArray,DL=PL,Dm=su,OL=kL,RL=DL,ML=Cm,LL=1/0,Om=Dm?Dm.prototype:void 0,Rm=Om?Om.toString:void 0;function Mm(e){if(typeof e=="string")return e;if(RL(e))return OL(e,Mm)+"";if(ML(e))return Rm?Rm.call(e):"";var t=e+"";return t=="0"&&1/e==-LL?"-0":t}var BL=Mm,$L=BL;function NL(e){return e==null?"":$L(e)}var Lm=NL;function FL(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 zL=FL;function jL(e){return function(t){return e==null?void 0:e[t]}}var VL=jL,UL=VL,HL={À:"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"},WL=UL(HL),GL=WL,YL=GL,KL=Lm,qL=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,QL="\\u0300-\\u036f",JL="\\ufe20-\\ufe2f",XL="\\u20d0-\\u20ff",ZL=QL+JL+XL,e2="["+ZL+"]",t2=RegExp(e2,"g");function n2(e){return e=KL(e),e&&e.replace(qL,YL).replace(t2,"")}var r2=n2,i2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function o2(e){return e.match(i2)||[]}var a2=o2,s2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function l2(e){return s2.test(e)}var c2=l2,Bm="\\ud800-\\udfff",u2="\\u0300-\\u036f",d2="\\ufe20-\\ufe2f",f2="\\u20d0-\\u20ff",h2=u2+d2+f2,$m="\\u2700-\\u27bf",Nm="a-z\\xdf-\\xf6\\xf8-\\xff",p2="\\xac\\xb1\\xd7\\xf7",g2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",m2="\\u2000-\\u206f",v2=" \\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",Fm="A-Z\\xc0-\\xd6\\xd8-\\xde",b2="\\ufe0e\\ufe0f",zm=p2+g2+m2+v2,jm="['’]",Vm="["+zm+"]",y2="["+h2+"]",Um="\\d+",C2="["+$m+"]",Hm="["+Nm+"]",Wm="[^"+Bm+zm+Um+$m+Nm+Fm+"]",x2="\\ud83c[\\udffb-\\udfff]",w2="(?:"+y2+"|"+x2+")",I2="[^"+Bm+"]",Gm="(?:\\ud83c[\\udde6-\\uddff]){2}",Ym="[\\ud800-\\udbff][\\udc00-\\udfff]",li="["+Fm+"]",S2="\\u200d",Km="(?:"+Hm+"|"+Wm+")",A2="(?:"+li+"|"+Wm+")",qm="(?:"+jm+"(?:d|ll|m|re|s|t|ve))?",Qm="(?:"+jm+"(?:D|LL|M|RE|S|T|VE))?",Jm=w2+"?",Xm="["+b2+"]?",T2="(?:"+S2+"(?:"+[I2,Gm,Ym].join("|")+")"+Xm+Jm+")*",E2="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_2="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",k2=Xm+Jm+T2,P2="(?:"+[C2,Gm,Ym].join("|")+")"+k2,D2=RegExp([li+"?"+Hm+"+"+qm+"(?="+[Vm,li,"$"].join("|")+")",A2+"+"+Qm+"(?="+[Vm,li+Km,"$"].join("|")+")",li+"?"+Km+"+"+qm,li+"+"+Qm,_2,E2,Um,P2].join("|"),"g");function O2(e){return e.match(D2)||[]}var R2=O2,M2=a2,L2=c2,B2=Lm,$2=R2;function N2(e,t,n){return e=B2(e),t=n?void 0:t,t===void 0?L2(e)?$2(e):M2(e):e.match(t)||[]}var F2=N2,z2=zL,j2=r2,V2=F2,U2="['’]",H2=RegExp(U2,"g");function W2(e){return function(t){return z2(V2(j2(t).replace(H2,"")),e,"")}}var G2=W2,Y2=G2,K2=Y2(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),q2=K2;const Q2=fn(q2);class J2{constructor(){ie(this,"id","");ie(this,"value","");ie(this,"label","")}}class X2 extends J2{constructor(){super(...arguments);ie(this,"logo","");ie(this,"countryFlag","");ie(this,"countryName","")}}class Zm extends X2{constructor(){super(...arguments);ie(this,"group","")}}const Z2=(e,t)=>t||e||"-------------",cu=(e,t)=>Array.isArray(e)?e.map(n=>cu(n)):e!=null&&e.constructor===Object?Object.keys(e).reduce((n,r)=>X(j({},n),{[Q2(r)]:cu(e[r])}),{}):e,ev=e=>{const t=[];return e.competitions.forEach(n=>{t.push(uu(n,"competition"))}),e.teams.forEach(n=>{t.push(uu(n,"team"))}),e.players.forEach(n=>{t.push(uu(n,"player"))}),t},uu=(e,t)=>{var r,i,o,a,l;const n=new Zm;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)||gt.avatar:t==="team"?n.logo=((i=e.assets)==null?void 0:i.logo)||gt.team:n.logo=((o=e.assets)==null?void 0:o.logo)||gt.competition,n.countryName=e.country.name,n.countryFlag=((l=(a=e.country)==null?void 0:a.assets)==null?void 0:l.flag)||gt.country,n},eB=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"}},tB=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"}},nB=({profile:e,winner:t,labels:n,onChange:r,onRemove:i})=>{var v,S,w,y,C,b;const[o,a]=x.useState(t.position),[l,s]=x.useState(t.note),[c,d]=x.useState(t.tags),f=o||l||c.length>0,h=T=>{T.persist();const{value:E}=T.target;a(E),r("position",E)},p=T=>{T.persist();const{value:E}=T.target;s(E),r("note",E)},m=T=>{d(T),r("tags",T)},g=()=>{a(""),s(""),d([]),i()};return u.jsxs("tr",{style:{backgroundColor:f?"rgb(255 237 213)":""},children:[u.jsx("td",{children:u.jsxs(I.Box,{display:"flex",alignItems:"center",children:[u.jsx(I.Avatar,{src:((v=e.profileModel)==null?void 0:v.avatar)||"",alt:((S=e.profileModel)==null?void 0:S.name)||"Unknown",sx:{mr:1}}),u.jsxs(I.Box,{children:[u.jsxs(I.Typography,{fontWeight:"md",children:[Z2((w=e.profileModel)==null?void 0:w.name,(y=e.profileModel)==null?void 0:y.nickname)," ",(C=e.profileModel)!=null&&C.name?u.jsxs(I.Typography,{children:["(",(b=e.profileModel)==null?void 0:b.name,")"]}):u.jsx(u.Fragment,{})]}),u.jsx(I.Typography,{fontSize:"sm",sx:{opacity:"0.5"},children:e.profileModel&&e.profileModel.country?e.profileModel.country.name:""})]})]})}),u.jsx("td",{style:{textAlign:"center"},children:e.points}),u.jsx("td",{style:{textAlign:"center"},children:e.predictionsMade}),u.jsx("td",{children:u.jsx(I.Input,{name:"position",placeholder:"#",value:o,onChange:h,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(I.Input,{name:"note",value:l,placeholder:"This user has...",onChange:p,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(km,{labels:n,tags:c,onChange:m})}),u.jsx("td",{children:u.jsx(I.Tooltip,{title:n.clearWinner,children:u.jsx(I.IconButton,{onClick:g,variant:"outlined",color:"danger",disabled:!f,children:u.jsx(Le.Remove,{})})})})]})},rB=e=>{const t=(i,o,a)=>{if(e.winners.find(d=>d.profileId===i)){const d=e.winners.map(f=>f.profileId===i?X(j({},f),{[o]:a}):f);r(d);return}const s=new EL;s.profileId=i,s[o]=a;const c=[...e.winners,s];r(c)},n=i=>{const o=e.winners.filter(a=>a.profileId!==i);r(o)},r=i=>{e.setWinnersRequestBody(o=>X(j({},o),{userList:i}))};return e.leaderboard?u.jsxs(u.Fragment,{children:[u.jsx(I.Typography,{level:"h4",children:e.labels.configureWinners}),e.leaderboard.length===0?u.jsx(I.Typography,{level:"body-lg",textAlign:"center",fontWeight:"bold",children:e.labels.noStandingsAvailable}):u.jsx(u.Fragment,{}),u.jsxs(I.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:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e.labels.nicknameAndName}),u.jsx("th",{style:{width:"70px",textAlign:"center"},children:e.labels.points}),u.jsx("th",{style:{width:"100px",textAlign:"center"},children:e.labels.predictions}),u.jsx("th",{style:{width:"100px"},children:e.labels.position}),u.jsx("th",{children:e.labels.note}),u.jsx("th",{children:e.labels.tags}),u.jsx("th",{children:e.labels.actions})]})}),u.jsxs("tbody",{children:[e.leaderboard.length>0?e.leaderboard.map(i=>u.jsx(nB,{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}`)):u.jsx(u.Fragment,{}),u.jsx("tr",{children:u.jsx("td",{colSpan:7,children:e.hasMoreParticipants?u.jsx(I.Box,{textAlign:"center",my:1,children:u.jsx(I.Button,{variant:"plain",sx:{width:"100%"},onClick:()=>e.setPage(i=>i+1),loading:e.isLoading,children:e.labels.loadMore})}):u.jsx(u.Fragment,{})})})]})]})]}):u.jsx(us,{my:40})},iB=(e,t,n,r,i)=>{const[o,a]=x.useState(null),[l,s]=x.useState(!1),[c,d]=x.useState(!1),{sdk:f}=pt(),h=()=>k(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?s(!0):s(!1),o&&o.length?a(v=>[...v,...g.data]):a(g.data)}catch(g){console.error(g),i("danger",n),a([])}d(!1)});return x.useEffect(()=>{h()},[r]),{leaderboard:o,hasMoreParticipants:l,isLeaderboardLoading:c}};class oB{constructor(){ie(this,"isValid",!0);ie(this,"message","");ie(this,"validate",(t,n,r)=>(this.validateField(t,n),this.validateWinnerIds(t,r),this));ie(this,"validateField",(t,n)=>{const r=t.every(i=>i.position&&i.profileId);r||(this.isValid=r,this.message=n)});ie(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 aB=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 u.jsx(I.Card,{variant:"plain",children:t?u.jsxs(u.Fragment,{children:[u.jsx(I.Typography,{level:"body-lg",mb:2,fontWeight:"bold",children:e.labels.preview}),u.jsx(I.Sheet,{children:u.jsxs(I.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:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{style:{width:"3%"},children:"#"}),u.jsx("th",{children:e.labels.name}),u.jsx("th",{children:e.labels.note}),u.jsx("th",{children:e.labels.tags})]})}),u.jsx("tbody",{children:e.winners.userList.map(n=>{var i;const r=e.profiles.find(o=>o.id===n.profileId);return u.jsxs("tr",{children:[u.jsx("td",{children:n.position}),u.jsx("td",{children:u.jsxs(I.Box,{display:"flex",alignItems:"center",justifyContent:{xs:"center",md:"flex-start"},gap:2,children:[u.jsx(I.Avatar,{src:(r==null?void 0:r.avatar)||"",alt:(r==null?void 0:r.name)||"Unknown"}),u.jsxs(I.Box,{textAlign:"left",children:[u.jsxs(I.Typography,{fontWeight:"bold",children:[(r==null?void 0:r.nickname)||"-------------"," ",u.jsxs(I.Typography,{children:["(",(r==null?void 0:r.name)||"-------------",")"]})]}),u.jsx(I.Typography,{fontSize:"sm",color:"neutral",children:(i=r==null?void 0:r.country)==null?void 0:i.name})]})]})}),u.jsx("td",{children:n.note}),u.jsx("td",{children:n.tags.map(o=>u.jsx(I.Chip,{variant:"soft",color:"neutral",size:"sm",sx:{mr:1},children:o},`preview-winner-${n.profileId}-tag-${o}`))})]},`preview-winner-${n.profileId}`)})})]})})]}):u.jsx(I.Typography,{textAlign:"center",fontWeight:"bold",children:e.labels.noSetWinnersMessage})})},sB=e=>Object.keys(e).length?(e.userList||(e.userList=[]),e):new Pm,lB=e=>{var b;const[t,n]=x.useState(sB(e.winners)),[r,i]=x.useState(((b=e.winners)==null?void 0:b.description)||""),[o,a]=x.useState(!1),[l,s]=x.useState(1),[c,d]=x.useState(!1),[f,h]=x.useState("danger"),[p,m]=x.useState(""),g=(T,E)=>{h(T),m(E),d(!0)},{leaderboard:v,hasMoreParticipants:S,isLeaderboardLoading:w}=iB(e.entityId,e.entityType,e.labels.leaderboardErrorMessage,l,g),{https:y}=pt(),C=()=>k(this,null,function*(){a(!0);const T=JSON.parse(JSON.stringify(t));if(T.contestId=e.entityId,T.contestType=e.entityType==="template"?"TEMPLATE":"GAME",T.description=r,delete T.contestModel,T.userList.length>0){const P=new oB().validate(T.userList,e.labels.positionAndWinnerRequiredMessage,e.labels.sameChosenWinnerMessage);if(!P.isValid){g("danger",P.message),a(!1);return}}else delete T.userList;const E=cu(T);try{yield y.setWinners(E),g("success",Object.keys(e.winners).length?e.labels.editWinnersMessage:e.labels.createWinnersMessage)}catch(P){console.error(P),g("danger",Object.keys(e.winners).length?e.labels.editWinnersErrorMessage:e.labels.createWinnersErrorMessage)}a(!1)});return u.jsxs(u.Fragment,{children:[u.jsx("section",{style:{marginRight:"auto",marginLeft:"auto"},children:u.jsx(I.Box,{width:"100%",overflow:"hidden",borderRadius:"4px",bgcolor:"#fff",children:u.jsxs(I.Box,{width:"100%",sx:{overflowX:"auto"},children:[u.jsxs(I.Card,{variant:"plain",children:[u.jsx(ic,{property:"description",label:e.labels.description,defaultValue:r,placeholder:e.labels.winnersDescription,onChange:T=>{i(T)}}),u.jsx(rB,{winners:t.userList,leaderboard:v,hasMoreParticipants:S,isLoading:w,setPage:s,setWinnersRequestBody:n,labels:e.labels}),u.jsx(I.Box,{textAlign:"center",my:3,children:u.jsx(I.Button,{variant:"solid",color:"primary",onClick:C,loading:o,children:e.labels.save})}),u.jsx(I.Divider,{sx:{my:4}})]}),v?u.jsx(aB,{winners:t,profiles:v.map(T=>T.profileModel),labels:e.labels}):u.jsx(u.Fragment,{})]})})}),u.jsx(ut,{showToast:c,color:f,message:p,hideToast:()=>d(!1)})]})},cB=e=>{const[t,n]=x.useState(!1),r=()=>n(!0),i=TL(e.entityId,e.entityType,r);return i?u.jsxs(u.Fragment,{children:[u.jsxs(I.Box,{p:2,children:[u.jsx(I.Typography,{fontSize:"12px",sx:{cursor:"pointer"},startDecorator:u.jsx(AL,{fontSize:"inherit"}),onClick:e.onClickBack,children:e.labels.back}),u.jsxs(I.Typography,{level:"h3",children:[e.labels.manageWinners,":"," ",u.jsx(I.Typography,{level:"title-lg",fontWeight:"italic",children:e.entityName})]})]}),u.jsx(lB,{labels:e.labels,winners:i,entityId:e.entityId,entityType:e.entityType}),u.jsx(ut,{showToast:t,color:"danger",message:e.labels.winnersErrorMessage,hideToast:()=>n(!1)})]}):u.jsx(us,{my:50})},uB=10,dB=e=>{var f;const[t,n]=x.useState([]),[r,i]=x.useState(!1),[o,a]=x.useState(""),{sdk:l}=pt(),s=x.useMemo(()=>si(h=>{if(!h){n([]),i(!1);return}i(!0),l.football.search({query:h}).then(p=>{n([...ev(p)]),i(!1)}).catch(p=>{console.error(p),n([]),i(!1)})},300),[]);x.useEffect(()=>(s(o),()=>s.cancel()),[o,s]);const c=(h,p)=>{const m=p.map(g=>g.id);e.setOptions(p),e.handleResetData(),e.setFilters(g=>X(j({},g),{entityIds:m}))},d=(h,p)=>h.map((m,g)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:v=>p({index:g}).onClick(v),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(xn,{option:m},`option_${m.id}`)},m.id));return u.jsxs(I.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{sx:{fontSize:12},color:"primary",children:e.labels.contextEntityTag}),u.jsx(I.Autocomplete,{getOptionDisabled:()=>e.options.length===uB,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?u.jsx(I.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:c,getOptionKey:h=>h.id,groupBy:h=>h.group+"s",value:(f=e.options)!=null?f:[],renderTags:d,renderOption:(h,p)=>u.jsx(I.AutocompleteOption,X(j({},h),{children:u.jsx(xn,{option:p})}))})]})};function tv(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 co;(function(e){e.event="event",e.props="prop"})(co||(co={}));function nr(){}function fB(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 uo(e){return!!(e||"").match(/\d/)}function ci(e){return e==null}function hB(e){return typeof e=="number"&&isNaN(e)}function nv(e){return ci(e)||hB(e)||typeof e=="number"&&!isFinite(e)}function rv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function pB(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 gB(e,t,n){var r=pB(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 mB(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 du(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 vB(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 iv(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function ov(e,t){return Array(t+1).join(e)}function av(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,l=i.length;return a<0?i="0."+ov("0",Math.abs(a))+i:a>=l?i=i+ov("0",a-l):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function sv(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=du(e),o=i.beforeDecimal,a=i.afterDecimal,l=i.hasNegation,s=parseFloat("0."+(a||"0")),c=a.length<=t?"0."+a:s.toFixed(t),d=c.split("."),f=o;o&&Number(d[0])&&(f=o.split("").reverse().reduce(function(g,v,S){return g.length>S?(Number(g[0])+Number(v)).toString()+g.substring(1,g.length):v+g},d[0]));var h=iv(d[1]||"",t,n),p=l?"-":"",m=r?".":"";return""+p+f+m+h}function wr(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 lv=fB(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}}}),bB=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function yB(e,t,n){return Math.min(Math.max(e,t),n)}function fu(e){return Math.max(e.selectionStart,e.selectionEnd)}function CB(){return typeof navigator!="undefined"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function xB(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function wB(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function IB(e,t,n,r,i,o,a){a===void 0&&(a=wB);var l=i.findIndex(function(C){return C}),s=e.slice(0,l);!t&&!n.startsWith(s)&&(t=s,n=s+n,r=r+s.length);for(var c=n.length,d=e.length,f={},h=new Array(c),p=0;p<c;p++){h[p]=-1;for(var m=0,g=d;m<g;m++){var v=a({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m});if(v&&f[m]!==!0){h[p]=m,f[m]=!0;break}}}for(var S=r;S<c&&(h[S]===-1||!o(n[S]));)S++;var w=S===c||h[S]===-1?d:h[S];for(S=r-1;S>0&&h[S]===-1;)S--;var y=S===-1||h[S]===-1?0:h[S]+1;return y>w?w:r-y<w-r?y:w}function cv(e,t,n,r){var i=e.length;if(t=yB(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 SB(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(uo(e[n])||uo(e[n-1]));return t}function uv(e,t,n,r,i,o){o===void 0&&(o=nr);var a=mB(function(m,g){var v,S;return nv(m)?(S="",v=""):typeof m=="number"||g?(S=typeof m=="number"?av(m):m,v=r(S)):(S=i(m,void 0),v=r(S)),{formattedValue:v,numAsString:S}}),l=x.useState(function(){return a(ci(e)?t:e,n)}),s=l[0],c=l[1],d=function(m,g){m.formattedValue!==s.formattedValue&&c({formattedValue:m.formattedValue,numAsString:m.value}),o(m,g)},f=e,h=n;ci(e)&&(f=s.numAsString,h=!0);var p=a(f,h);return x.useMemo(function(){c(p)},[p.formattedValue]),[s,d]}function AB(e){return e.replace(/[^0-9]/g,"")}function TB(e){return e}function EB(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=TB);var l=e.removeFormatting;l===void 0&&(l=AB);var s=e.defaultValue,c=e.valueIsNumericString,d=e.onValueChange,f=e.isAllowed,h=e.onChange;h===void 0&&(h=nr);var p=e.onKeyDown;p===void 0&&(p=nr);var m=e.onMouseUp;m===void 0&&(m=nr);var g=e.onFocus;g===void 0&&(g=nr);var v=e.onBlur;v===void 0&&(v=nr);var S=e.value,w=e.getCaretBoundary;w===void 0&&(w=SB);var y=e.isValidInputCharacter;y===void 0&&(y=uo);var C=e.isCharacterSame,b=tv(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),T=uv(S,s,!!c,a,l,d),E=T[0],P=E.formattedValue,O=E.numAsString,G=T[1],z=x.useRef(),A=x.useRef({formattedValue:P,numAsString:O}),W=function(de,he){A.current={formattedValue:de.formattedValue,numAsString:de.value},G(de,he)},Y=x.useState(!1),N=Y[0],$=Y[1],B=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,ee=function(de,he){var Ce=parseFloat(he);return{formattedValue:de,value:he,floatValue:isNaN(Ce)?void 0:Ce}},R=function(de,he,Ce){de.selectionStart===0&&de.selectionEnd===de.value.length||(wr(de,he),H.current.setCaretTimeout=setTimeout(function(){de.value===Ce&&de.selectionStart!==he&&wr(de,he)},0))},L=function(de,he,Ce){return cv(de,he,w(de),Ce)},F=function(de,he,Ce){var Te=w(he),He=IB(he,P,de,Ce,Te,y,C);return He=cv(he,He,Te),He},U=function(de){var he=de.formattedValue;he===void 0&&(he="");var Ce=de.input,Te=de.source,He=de.event,Pe=de.numAsString,Ee;if(Ce){var It=de.inputValue||Ce.value,St=fu(Ce);Ce.value=he,Ee=F(It,he,St),Ee!==void 0&&R(Ce,Ee,he)}he!==P&&W(ee(he,Pe),{event:He,source:Te})};x.useEffect(function(){var de=A.current,he=de.formattedValue,Ce=de.numAsString;(P!==he||O!==Ce)&&W(ee(P,O),{event:void 0,source:co.props})},[P,O]);var te=B.current?fu(B.current):void 0,se=typeof window!="undefined"?x.useLayoutEffect:x.useEffect;se(function(){var de=B.current;if(P!==A.current.formattedValue&&de){var he=F(A.current.formattedValue,P,te);de.value=P,R(de,he,P)}},[P]);var ae=function(de,he,Ce){var Te=he.target,He=z.current?bB(z.current,Te.selectionEnd):lv(P,de),Pe=Object.assign(Object.assign({},He),{lastValue:P}),Ee=l(de,Pe),It=q(Ee);if(Ee=l(It,void 0),f&&!f(ee(It,Ee))){var St=he.target,jt=fu(St),Mt=F(de,P,jt);return St.value=P,R(St,Mt,P),!1}return U({formattedValue:It,numAsString:Ee,inputValue:de,event:he,source:Ce,input:he.target}),!0},J=function(de,he){he===void 0&&(he=0);var Ce=de.selectionStart,Te=de.selectionEnd;z.current={selectionStart:Ce,selectionEnd:Te+he}},le=function(de){var he=de.target,Ce=he.value,Te=ae(Ce,de,co.event);Te&&h(de),z.current=void 0},ne=function(de){var he=de.target,Ce=de.key,Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;Pe===void 0&&(Pe="");var Ee;Ce==="ArrowLeft"||Ce==="Backspace"?Ee=Math.max(Te-1,0):Ce==="ArrowRight"?Ee=Math.min(Te+1,Pe.length):Ce==="Delete"&&(Ee=Te);var It=0;Ce==="Delete"&&Te===He&&(It=1);var St=Ce==="ArrowLeft"||Ce==="ArrowRight";if(Ee===void 0||Te!==He&&!St){p(de),J(he,It);return}var jt=Ee;if(St){var Mt=Ce==="ArrowLeft"?"left":"right";jt=L(Pe,Ee,Mt),jt!==Ee&&de.preventDefault()}else Ce==="Delete"&&!y(Pe[Ee])?jt=L(Pe,Ee,"right"):Ce==="Backspace"&&!y(Pe[Ee])&&(jt=L(Pe,Ee,"left"));jt!==Ee&&R(he,jt,Pe),p(de),J(he,It)},ge=function(de){var he=de.target,Ce=function(){var Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;if(Pe===void 0&&(Pe=""),Te===He){var Ee=L(Pe,Te);Ee!==Te&&R(he,Ee,Pe)}};Ce(),requestAnimationFrame(function(){Ce()}),m(de),J(he)},Se=function(de){de.persist&&de.persist();var he=de.target,Ce=de.currentTarget;B.current=he,H.current.focusTimeout=setTimeout(function(){var Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;Pe===void 0&&(Pe="");var Ee=L(Pe,Te);Ee!==Te&&!(Te===0&&He===Pe.length)&&R(he,Ee,Pe),g(Object.assign(Object.assign({},de),{currentTarget:Ce}))},0)},Ue=function(de){B.current=null,clearTimeout(H.current.focusTimeout),clearTimeout(H.current.setCaretTimeout),v(de)},wt=N&&CB()?"numeric":void 0,at=Object.assign({inputMode:wt},b,{type:t,value:P,onChange:le,onKeyDown:ne,onMouseUp:ge,onFocus:Se,onBlur:Ue});if(n==="text")return i?x.createElement(x.Fragment,null,i(P,b)||null):x.createElement("span",Object.assign({},b,{ref:o}),P);if(r){var kt=r;return x.createElement(kt,Object.assign({},at,{ref:o}))}return x.createElement("input",Object.assign({},at,{ref:o}))}function dv(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,l=t.thousandsGroupStyle;if(l===void 0&&(l="thousand"),e===""||e==="-")return e;var s=ds(t),c=s.thousandSeparator,d=s.decimalSeparator,f=n!==0&&e.indexOf(".")!==-1||n&&r,h=du(e,a),p=h.beforeDecimal,m=h.afterDecimal,g=h.addNegation;return n!==void 0&&(m=iv(m,n,!!r)),c&&(p=gB(p,c,l)),i&&(p=i+p),o&&(m=m+o),g&&(p="-"+p),e=p+(f&&d||"")+m,e}function ds(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 _B(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 kB(e,t){return new RegExp("(^-)|[0-9]|"+rv(e),"g")}function PB(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function DB(e,t,n){var r;t===void 0&&(t=xB(e));var i=n.allowNegative,o=n.prefix;o===void 0&&(o="");var a=n.suffix;a===void 0&&(a="");var l=n.decimalScale,s=t.from,c=t.to,d=c.start,f=c.end,h=ds(n),p=h.allowedDecimalSeparators,m=h.decimalSeparator,g=e[f]===m;if(uo(e)&&(e===o||e===a)&&t.lastValue==="")return e;if(f-d===1&&p.indexOf(e[d])!==-1){var v=l===0?"":m;e=e.substring(0,d)+v+e.substring(d+1,e.length)}var S=function(B,H,q){var ee=!1,R=!1;o.startsWith("-")?ee=!1:B.startsWith("--")?(ee=!1,R=!0):a.startsWith("-")&&B.length===a.length?ee=!1:B[0]==="-"&&(ee=!0);var L=ee?1:0;return R&&(L=2),L&&(B=B.substring(L),H-=L,q-=L),{value:B,start:H,end:q,hasNegation:ee}},w=S(e,d,f),y=w.hasNegation;r=w,e=r.value,d=r.start,f=r.end;var C=S(t.lastValue,s.start,s.end),b=C.start,T=C.end,E=C.value,P=e.substring(d,f);e.length&&E.length&&(b>E.length-a.length||T<o.length)&&!(P&&a.startsWith(P))&&(e=E);var O=0;e.startsWith(o)?O+=o.length:d<o.length&&(O=d),e=e.substring(O),f-=O;var G=e.length,z=e.length-a.length;e.endsWith(a)?G=z:(f>z||f>e.length-a.length)&&(G=f),e=e.substring(0,G),e=_B(y?"-"+e:e,i),e=(e.match(kB(m))||[]).join("");var A=e.indexOf(m);e=e.replace(new RegExp(rv(m),"g"),function(B,H){return H===A?".":""});var W=du(e,i),Y=W.beforeDecimal,N=W.afterDecimal,$=W.addNegation;return c.end-c.start<s.end-s.start&&Y===""&&g&&!parseFloat(N)&&(e=$?"-":""),e}function OB(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 RB(e){var t=ds(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,8 +2468,8 @@ 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 MB(e){e=RB(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=nr);var o=e.onBlur;o===void 0&&(o=nr);var a=e.thousandSeparator,l=e.decimalScale,s=e.fixedDecimalScale,c=e.prefix;c===void 0&&(c="");var d=e.defaultValue,f=e.value,h=e.valueIsNumericString,p=e.onValueChange,m=tv(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=ds(e),v=g.decimalSeparator,S=g.allowedDecimalSeparators,w=function($){return dv($,e)},y=function($,B){return DB($,B,e)},C=ci(f)?d:f,b=h!=null?h:PB(C,c,t);ci(f)?ci(d)||(b=b||typeof d=="number"):b=b||typeof f=="number";var T=function($){return nv($)?$:(typeof $=="number"&&($=av($)),b&&typeof l=="number"?sv($,l,!!s):$)},E=uv(T(f),T(d),!!b,w,y,p),P=E[0],O=P.numAsString,G=P.formattedValue,z=E[1],A=function($){var B=$.target,H=$.key,q=B.selectionStart,ee=B.selectionEnd,R=B.value;if(R===void 0&&(R=""),(H==="Backspace"||H==="Delete")&&ee<c.length){$.preventDefault();return}if(q!==ee){i($);return}H==="Backspace"&&R[0]==="-"&&q===c.length+1&&n&&wr(B,1),l&&s&&(H==="Backspace"&&R[q-1]===v?(wr(B,q-1),$.preventDefault()):H==="Delete"&&R[q]===v&&$.preventDefault()),S!=null&&S.includes(H)&&R[q]===v&&wr(B,q+1);var L=a===!0?",":a;H==="Backspace"&&R[q-1]===L&&wr(B,q-1),H==="Delete"&&R[q]===L&&wr(B,q+1),i($)},W=function($){var B=O;if(B.match(/\d/g)||(B=""),r||(B=vB(B)),s&&l&&(B=sv(B,l,s)),B!==O){var H=dv(B,e);z({formattedValue:H,value:B,floatValue:parseFloat(B)},{event:$,source:co.event})}o($)},Y=function($){return $===v?!0:uo($)},N=function($){var B=$.currentValue,H=$.lastValue,q=$.formattedValue,ee=$.currentValueIndex,R=$.formattedValueIndex,L=B[ee],F=q[R],V=lv(H,B),te=V.to,se=function(ae){return y(ae).indexOf(".")+c.length};return f===0&&s&&l&&B[te.start]===v&&se(B)<ee&&se(q)>R?!1:ee>=te.start&&ee<te.end&&S&&S.includes(L)&&F===v?!0:L===F};return Object.assign(Object.assign({},m),{value:G,valueIsNumericString:!1,isValidInputCharacter:Y,isCharacterSame:N,onValueChange:z,format:w,removeFormatting:y,getCaretBoundary:function($){return OB($,e)},onKeyDown:A,onBlur:W})}function LB(e){var t=MB(e);return x.createElement(EB,Object.assign({},t))}const BB=j.forwardRef(function(t,n){const a=t,{onChange:r,isAllowed:i}=a,o=We(a,["onChange","isAllowed"]);return u.jsx(LB,X(U({},o),{getInputRef:n,onValueChange:l=>{r({target:{name:t.name,value:l.value}})},thousandSeparator:!0,valueIsNumericString:!0,isAllowed:i}))}),$B=e=>{const t=n=>{e.onChange(Number(n.target.value))};return u.jsxs(ou,{size:e.size||"sm",children:[u.jsx(au,{children:e.label}),u.jsx(Ha,{sx:e.sx,value:e.defaultValue,onChange:t,slotProps:{input:{component:BB,isAllowed:e.isAllowed?e.isAllowed:()=>!0}}}),e.description?u.jsx(I.FormHelperText,{children:e.description}):u.jsx(u.Fragment,{})]})},NB=e=>e.startsWith("fb:c:")?"competition":e.startsWith("fb:t:")?"team":"player",FB=(e,t,n,r)=>{const i=e.filter(c=>c.type.toLocaleLowerCase()==="competition").map(c=>c.id),o=e.filter(c=>c.type.toLocaleLowerCase()==="team").map(c=>c.id),a=e.filter(c=>c.type.toLocaleLowerCase()==="player").map(c=>c.id),l=[],s=[];if(i.length>0){const c=t.football.getCompetitions({competitionIds:i}).then(d=>{s.push(d)}).catch(d=>{console.error(d),r()});l.push(c)}if(o.length>0){const c=t.football.getTeams({teamIds:o}).then(d=>{s.push(d.data)}).catch(d=>{console.error(d),r()});l.push(c)}if(a.length>0){const c=t.football.getPlayers({playerIds:a}).then(d=>{s.push(d.data)}).catch(d=>{console.error(d),r()});l.push(c)}Promise.all(l).then(()=>{const d=Array.prototype.concat.apply([],s).map(f=>zB(f));n(d)})},zB=e=>{const t=new Zm;return t.label=e.name,t.value=e.name,t.id=e.id,t.group=NB(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:gt.country,t},jB=10,VB=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),[l,s]=x.useState(""),[c,d]=x.useState(!1),{sdk:f}=pt(),h=()=>d(!c),p=(v,S)=>{n(S),e.onChangeTags(S)};x.useEffect(()=>{FB(e.tags,f,n,h)},[e.tags]);const m=x.useMemo(()=>si(v=>{if(!v){i([]),a(!1);return}a(!0),f.football.search({query:v}).then(S=>{i([...ev(S)]),a(!1)}).catch(S=>{console.error(S),i([]),a(!1)})},300),[]);x.useEffect(()=>(m(l),()=>m.cancel()),[l,m]);const g=(v,S)=>v.map((w,y)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:C=>S({index:y}).onClick(C),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(xn,{option:w},`option_${w.id}`)},w.id));return u.jsxs(I.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{color:"primary",children:e.labels.contextEntityTag}),u.jsx(I.Autocomplete,{getOptionDisabled:()=>t.length===jB,forcePopupIcon:!1,multiple:!0,loading:o,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(v,S)=>v.id===S.id,endDecorator:o?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:t.length>0?"":e.labels.typeContextTagNamePlaceholder,options:r,filterOptions:v=>v.filter(S=>!t.some(w=>w.value===S.value)),onInputChange:(v,S)=>{s(S)},onChange:p,getOptionKey:v=>v.id,groupBy:v=>v.group+"s",value:t!=null?t:[],renderTags:g,renderOption:(v,S)=>u.jsx(I.AutocompleteOption,X(U({},v),{children:u.jsx(xn,{option:S})}))}),u.jsx(ut,{showToast:c,message:e.labels.getFootballEntitiesErrorMessage,color:"danger",hideToast:h})]})},UB=e=>new Map().set("id",e.id).set("type",e.type).set("label",e.label),HB=e=>{const t=JSON.parse(JSON.stringify(e.context)),n=e.context.content,r=e.context.campaign,i=UB(e.labels),o=(s,c)=>{const d=s.target.value;t.content[c]=d,e.onChange(t)},a=(s,c)=>{const d=s.target.value;t.campaign[c]=d,e.onChange(t)},l=s=>{s.length?t.tags=s.map(c=>({id:c.id,type:c.group,source:"football"})):t.tags=[],e.onChange(t)};return u.jsx(u.Fragment,{children:u.jsxs(Fh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(zh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${ac.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:[u.jsx(jr,{children:e.labels.tags}),u.jsx(jr,{children:e.labels.content}),u.jsx(jr,{children:e.labels.campaign})]}),u.jsx(Qr,{value:0,sx:{px:0},children:u.jsx(VB,{labels:e.labels,tags:e.context.tags,onChangeTags:l})}),u.jsx(Qr,{value:1,sx:{px:0},children:Object.keys(n).map(s=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{label:i.get(s),placeholder:"",defaultValue:n[s],required:!1,size:"sm",onChange:c=>o(c,s)})},`context-content-${s}`))}),u.jsx(Qr,{value:2,sx:{px:0},children:Object.keys(r).map(s=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{label:i.get(s),placeholder:"",defaultValue:r[s],required:!1,size:"sm",onChange:c=>a(c,s)})},`context-campaign-${s}`))})]})})},WB=e=>e?U({},e):{main:"",mobile:""},GB=e=>{const[t,n]=x.useState(!1),r=WB(e.defaultValue),i=(a,l)=>{r[l]=a,e.onChange(r)},o=a=>{r[a]="",e.onChange(r)};return u.jsxs(I.Box,{sx:{marginBottom:"10px"},children:[u.jsx(so,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:a=>i(a,"main"),clearImage:()=>o("main")}),u.jsx(I.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?u.jsx(so,{labels:e.labels,title:e.labels.mobileImage,image:r.mobile,onChangeImages:a=>i(a,"mobile"),clearImage:()=>o("mobile")}):u.jsx(u.Fragment,{})]})},YB=({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}];return u.jsxs(I.FormControl,{size:"sm",sx:{mb:2},children:[u.jsx(I.FormLabel,{children:n.authRequirement}),u.jsx(I.Select,X(U({value:e,size:"sm",slotProps:{button:{sx:{whiteSpace:"nowrap"}}},onChange:(a,l)=>r(l),sx:{minHeight:"37px"}},e&&t&&{endDecorator:u.jsx(I.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:u.jsx(hm,{})}),indicator:null}),{children:o.map(a=>u.jsx(I.Option,{value:a.id,children:a.label},a.id))})),u.jsx(I.FormHelperText,{children:n.authRequirementDescription})]})};function KB(){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 fs=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function ui(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function hu(e){return"nodeType"in e}function Rt(e){var t,n;return e?ui(e)?e:hu(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function pu(e){const{Document:t}=Rt(e);return e instanceof t}function fo(e){return ui(e)?!1:e instanceof Rt(e).HTMLElement}function fv(e){return e instanceof Rt(e).SVGElement}function di(e){return e?ui(e)?e.document:hu(e)?pu(e)?e:fo(e)||fv(e)?e.ownerDocument:document:document:document}const ln=fs?x.useLayoutEffect:x.useEffect;function hs(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 qB(){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 ho(e,t){t===void 0&&(t=[e]);const n=x.useRef(e);return ln(()=>{n.current!==e&&(n.current=e)},t),n}function po(e,t){const n=x.useRef();return x.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ps(e){const t=hs(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 gs(e){const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current}let gu={};function go(e,t){return x.useMemo(()=>{if(t)return t;const n=gu[e]==null?0:gu[e]+1;return gu[e]=n,e+"-"+n},[e,t])}function hv(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 l=Object.entries(a);for(const[s,c]of l){const d=o[s];d!=null&&(o[s]=d+e*c)}return o},U({},t))}}const fi=hv(1),mo=hv(-1);function QB(e){return"clientX"in e&&"clientY"in e}function ms(e){if(!e)return!1;const{KeyboardEvent:t}=Rt(e.target);return t&&e instanceof t}function JB(e){if(!e)return!1;const{TouchEvent:t}=Rt(e.target);return t&&e instanceof t}function vs(e){if(JB(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 QB(e)?{x:e.clientX,y:e.clientY}:null}const rr=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[rr.Translate.toString(e),rr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),pv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function XB(e){return e.matches(pv)?e:e.querySelector(pv)}const ZB={display:"none"};function e$(e){let{id:t,value:n}=e;return x.createElement("div",{id:t,style:ZB},n)}function t$(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 n$(){const[e,t]=x.useState("");return{announce:x.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const gv=x.createContext(null);function r$(e){const t=x.useContext(gv);x.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function i$(){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 l;return(l=a[i])==null?void 0:l.call(a,o)})},[e]),t]}const o$={draggable:`
|
|
2471
|
+
`),o=!1),Object.assign(Object.assign({},e),{allowNegative:o})}function MB(e){e=RB(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=nr);var o=e.onBlur;o===void 0&&(o=nr);var a=e.thousandSeparator,l=e.decimalScale,s=e.fixedDecimalScale,c=e.prefix;c===void 0&&(c="");var d=e.defaultValue,f=e.value,h=e.valueIsNumericString,p=e.onValueChange,m=tv(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=ds(e),v=g.decimalSeparator,S=g.allowedDecimalSeparators,w=function($){return dv($,e)},y=function($,B){return DB($,B,e)},C=ci(f)?d:f,b=h!=null?h:PB(C,c,t);ci(f)?ci(d)||(b=b||typeof d=="number"):b=b||typeof f=="number";var T=function($){return nv($)?$:(typeof $=="number"&&($=av($)),b&&typeof l=="number"?sv($,l,!!s):$)},E=uv(T(f),T(d),!!b,w,y,p),P=E[0],O=P.numAsString,G=P.formattedValue,z=E[1],A=function($){var B=$.target,H=$.key,q=B.selectionStart,ee=B.selectionEnd,R=B.value;if(R===void 0&&(R=""),(H==="Backspace"||H==="Delete")&&ee<c.length){$.preventDefault();return}if(q!==ee){i($);return}H==="Backspace"&&R[0]==="-"&&q===c.length+1&&n&&wr(B,1),l&&s&&(H==="Backspace"&&R[q-1]===v?(wr(B,q-1),$.preventDefault()):H==="Delete"&&R[q]===v&&$.preventDefault()),S!=null&&S.includes(H)&&R[q]===v&&wr(B,q+1);var L=a===!0?",":a;H==="Backspace"&&R[q-1]===L&&wr(B,q-1),H==="Delete"&&R[q]===L&&wr(B,q+1),i($)},W=function($){var B=O;if(B.match(/\d/g)||(B=""),r||(B=vB(B)),s&&l&&(B=sv(B,l,s)),B!==O){var H=dv(B,e);z({formattedValue:H,value:B,floatValue:parseFloat(B)},{event:$,source:co.event})}o($)},Y=function($){return $===v?!0:uo($)},N=function($){var B=$.currentValue,H=$.lastValue,q=$.formattedValue,ee=$.currentValueIndex,R=$.formattedValueIndex,L=B[ee],F=q[R],U=lv(H,B),te=U.to,se=function(ae){return y(ae).indexOf(".")+c.length};return f===0&&s&&l&&B[te.start]===v&&se(B)<ee&&se(q)>R?!1:ee>=te.start&&ee<te.end&&S&&S.includes(L)&&F===v?!0:L===F};return Object.assign(Object.assign({},m),{value:G,valueIsNumericString:!1,isValidInputCharacter:Y,isCharacterSame:N,onValueChange:z,format:w,removeFormatting:y,getCaretBoundary:function($){return OB($,e)},onKeyDown:A,onBlur:W})}function LB(e){var t=MB(e);return x.createElement(EB,Object.assign({},t))}const BB=V.forwardRef(function(t,n){const a=t,{onChange:r,isAllowed:i}=a,o=We(a,["onChange","isAllowed"]);return u.jsx(LB,X(j({},o),{getInputRef:n,onValueChange:l=>{r({target:{name:t.name,value:l.value}})},thousandSeparator:!0,valueIsNumericString:!0,isAllowed:i}))}),$B=e=>{const t=n=>{e.onChange(Number(n.target.value))};return u.jsxs(ou,{size:e.size||"sm",children:[u.jsx(au,{children:e.label}),u.jsx(Ha,{sx:e.sx,value:e.defaultValue,onChange:t,slotProps:{input:{component:BB,isAllowed:e.isAllowed?e.isAllowed:()=>!0}}}),e.description?u.jsx(I.FormHelperText,{children:e.description}):u.jsx(u.Fragment,{})]})},NB=e=>e.startsWith("fb:c:")?"competition":e.startsWith("fb:t:")?"team":"player",FB=(e,t,n,r)=>{const i=e.filter(c=>c.type.toLocaleLowerCase()==="competition").map(c=>c.id),o=e.filter(c=>c.type.toLocaleLowerCase()==="team").map(c=>c.id),a=e.filter(c=>c.type.toLocaleLowerCase()==="player").map(c=>c.id),l=[],s=[];if(i.length>0){const c=t.football.getCompetitions({competitionIds:i}).then(d=>{s.push(d)}).catch(d=>{console.error(d),r()});l.push(c)}if(o.length>0){const c=t.football.getTeams({teamIds:o}).then(d=>{s.push(d.data)}).catch(d=>{console.error(d),r()});l.push(c)}if(a.length>0){const c=t.football.getPlayers({playerIds:a}).then(d=>{s.push(d.data)}).catch(d=>{console.error(d),r()});l.push(c)}Promise.all(l).then(()=>{const d=Array.prototype.concat.apply([],s).map(f=>zB(f));n(d)})},zB=e=>{const t=new Zm;return t.label=e.name,t.value=e.name,t.id=e.id,t.group=NB(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:gt.country,t},jB=10,VB=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),[l,s]=x.useState(""),[c,d]=x.useState(!1),{sdk:f}=pt(),h=()=>d(!c),p=(v,S)=>{n(S),e.onChangeTags(S)};x.useEffect(()=>{FB(e.tags,f,n,h)},[e.tags]);const m=x.useMemo(()=>si(v=>{if(!v){i([]),a(!1);return}a(!0),f.football.search({query:v}).then(S=>{i([...ev(S)]),a(!1)}).catch(S=>{console.error(S),i([]),a(!1)})},300),[]);x.useEffect(()=>(m(l),()=>m.cancel()),[l,m]);const g=(v,S)=>v.map((w,y)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:C=>S({index:y}).onClick(C),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(xn,{option:w},`option_${w.id}`)},w.id));return u.jsxs(I.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{color:"primary",children:e.labels.contextEntityTag}),u.jsx(I.Autocomplete,{getOptionDisabled:()=>t.length===jB,forcePopupIcon:!1,multiple:!0,loading:o,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(v,S)=>v.id===S.id,endDecorator:o?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:t.length>0?"":e.labels.typeContextTagNamePlaceholder,options:r,filterOptions:v=>v.filter(S=>!t.some(w=>w.value===S.value)),onInputChange:(v,S)=>{s(S)},onChange:p,getOptionKey:v=>v.id,groupBy:v=>v.group+"s",value:t!=null?t:[],renderTags:g,renderOption:(v,S)=>u.jsx(I.AutocompleteOption,X(j({},v),{children:u.jsx(xn,{option:S})}))}),u.jsx(ut,{showToast:c,message:e.labels.getFootballEntitiesErrorMessage,color:"danger",hideToast:h})]})},UB=e=>new Map().set("id",e.id).set("type",e.type).set("label",e.label),HB=e=>{const t=JSON.parse(JSON.stringify(e.context)),n=e.context.content,r=e.context.campaign,i=UB(e.labels),o=(s,c)=>{const d=s.target.value;t.content[c]=d,e.onChange(t)},a=(s,c)=>{const d=s.target.value;t.campaign[c]=d,e.onChange(t)},l=s=>{s.length?t.tags=s.map(c=>({id:c.id,type:c.group,source:"football"})):t.tags=[],e.onChange(t)};return u.jsx(u.Fragment,{children:u.jsxs(Fh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(zh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${ac.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:[u.jsx(jr,{children:e.labels.tags}),u.jsx(jr,{children:e.labels.content}),u.jsx(jr,{children:e.labels.campaign})]}),u.jsx(Qr,{value:0,sx:{px:0},children:u.jsx(VB,{labels:e.labels,tags:e.context.tags,onChangeTags:l})}),u.jsx(Qr,{value:1,sx:{px:0},children:Object.keys(n).map(s=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{label:i.get(s),placeholder:"",defaultValue:n[s],required:!1,size:"sm",onChange:c=>o(c,s)})},`context-content-${s}`))}),u.jsx(Qr,{value:2,sx:{px:0},children:Object.keys(r).map(s=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{label:i.get(s),placeholder:"",defaultValue:r[s],required:!1,size:"sm",onChange:c=>a(c,s)})},`context-campaign-${s}`))})]})})},WB=e=>e?j({},e):{main:"",mobile:""},GB=e=>{const[t,n]=x.useState(!1),r=WB(e.defaultValue),i=(a,l)=>{r[l]=a,e.onChange(r)},o=a=>{r[a]="",e.onChange(r)};return u.jsxs(I.Box,{sx:{marginBottom:"10px"},children:[u.jsx(so,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:a=>i(a,"main"),clearImage:()=>o("main")}),u.jsx(I.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?u.jsx(so,{labels:e.labels,title:e.labels.mobileImage,image:r.mobile,onChangeImages:a=>i(a,"mobile"),clearImage:()=>o("mobile")}):u.jsx(u.Fragment,{})]})},YB=({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}];return u.jsxs(I.FormControl,{size:"sm",sx:{mb:2},children:[u.jsx(I.FormLabel,{children:n.authRequirement}),u.jsx(I.Select,X(j({value:e,size:"sm",slotProps:{button:{sx:{whiteSpace:"nowrap"}}},onChange:(a,l)=>r(l),sx:{minHeight:"37px"}},e&&t&&{endDecorator:u.jsx(I.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:u.jsx(hm,{})}),indicator:null}),{children:o.map(a=>u.jsx(I.Option,{value:a.id,children:a.label},a.id))})),u.jsx(I.FormHelperText,{children:n.authRequirementDescription})]})};function KB(){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 fs=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function ui(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function hu(e){return"nodeType"in e}function Rt(e){var t,n;return e?ui(e)?e:hu(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function pu(e){const{Document:t}=Rt(e);return e instanceof t}function fo(e){return ui(e)?!1:e instanceof Rt(e).HTMLElement}function fv(e){return e instanceof Rt(e).SVGElement}function di(e){return e?ui(e)?e.document:hu(e)?pu(e)?e:fo(e)||fv(e)?e.ownerDocument:document:document:document}const ln=fs?x.useLayoutEffect:x.useEffect;function hs(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 qB(){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 ho(e,t){t===void 0&&(t=[e]);const n=x.useRef(e);return ln(()=>{n.current!==e&&(n.current=e)},t),n}function po(e,t){const n=x.useRef();return x.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ps(e){const t=hs(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 gs(e){const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current}let gu={};function go(e,t){return x.useMemo(()=>{if(t)return t;const n=gu[e]==null?0:gu[e]+1;return gu[e]=n,e+"-"+n},[e,t])}function hv(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 l=Object.entries(a);for(const[s,c]of l){const d=o[s];d!=null&&(o[s]=d+e*c)}return o},j({},t))}}const fi=hv(1),mo=hv(-1);function QB(e){return"clientX"in e&&"clientY"in e}function ms(e){if(!e)return!1;const{KeyboardEvent:t}=Rt(e.target);return t&&e instanceof t}function JB(e){if(!e)return!1;const{TouchEvent:t}=Rt(e.target);return t&&e instanceof t}function vs(e){if(JB(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 QB(e)?{x:e.clientX,y:e.clientY}:null}const rr=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[rr.Translate.toString(e),rr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),pv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function XB(e){return e.matches(pv)?e:e.querySelector(pv)}const ZB={display:"none"};function e$(e){let{id:t,value:n}=e;return x.createElement("div",{id:t,style:ZB},n)}function t$(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 n$(){const[e,t]=x.useState("");return{announce:x.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const gv=x.createContext(null);function r$(e){const t=x.useContext(gv);x.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function i$(){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 l;return(l=a[i])==null?void 0:l.call(a,o)})},[e]),t]}const o$={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
|
-
`},a$={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 s$(e){let{announcements:t=a$,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=o$}=e;const{announce:o,announcement:a}=n$(),l=go("DndLiveRegion"),[s,c]=x.useState(!1);if(x.useEffect(()=>{c(!0)},[]),r$(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])),!s)return null;const d=x.createElement(x.Fragment,null,x.createElement(e$,{id:r,value:i.draggable}),x.createElement(t$,{id:l,announcement:a}));return n?Oe.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 bs(){}function mv(e,t){return x.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function l$(){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 c$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function u$(e,t){const n=vs(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 d$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function f$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function vv(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 bv(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const h$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=vv(t),o=[];for(const a of r){const{id:l}=a,s=n.get(l);if(s){const c=vv(s),d=i.reduce((h,p,m)=>h+c$(c[m],p),0),f=Number((d/4).toFixed(4));o.push({id:l,data:{droppableContainer:a,value:f}})}}return o.sort(d$)};function p$(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,l=o-n;if(r<i&&n<o){const s=t.width*t.height,c=e.width*e.height,d=a*l,f=d/(s+c-d);return Number(f.toFixed(4))}return 0}const g$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:a}=o,l=n.get(a);if(l){const s=p$(l,t);s>0&&i.push({id:a,data:{droppableContainer:o,value:s}})}}return i.sort(f$)};function m$(e,t,n){return X(U({},e),{scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1})}function yv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:cn}function v$(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,l)=>X(U({},a),{top:a.top+e*l.y,bottom:a.bottom+e*l.y,left:a.left+e*l.x,right:a.right+e*l.x}),U({},n))}}const b$=v$(1);function Cv(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 y$(e,t,n){const r=Cv(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:l}=r,s=e.left-a-(1-i)*parseFloat(n),c=e.top-l-(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:c,right:s+d,bottom:c+f,left:s}}const C$={ignoreTransform:!1};function hi(e,t){t===void 0&&(t=C$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Rt(e).getComputedStyle(e);c&&(n=y$(n,c,d))}const{top:r,left:i,width:o,height:a,bottom:l,right:s}=n;return{top:r,left:i,width:o,height:a,bottom:l,right:s}}function xv(e){return hi(e,{ignoreTransform:!0})}function x$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function w$(e,t){return t===void 0&&(t=Rt(e).getComputedStyle(e)),t.position==="fixed"}function I$(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 ys(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(pu(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!fo(i)||fv(i)||n.includes(i))return n;const o=Rt(e).getComputedStyle(i);return i!==e&&I$(i,o)&&n.push(i),w$(i,o)?n:r(i.parentNode)}return e?r(e):n}function wv(e){const[t]=ys(e,1);return t!=null?t:null}function mu(e){return!fs||!e?null:ui(e)?e:hu(e)?pu(e)||e===di(e).scrollingElement?window:fo(e)?e:null:null}function Iv(e){return ui(e)?e.scrollX:e.scrollLeft}function Sv(e){return ui(e)?e.scrollY:e.scrollTop}function vu(e){return{x:Iv(e),y:Sv(e)}}var Ct;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ct||(Ct={}));function Av(e){return!fs||!e?!1:e===document.scrollingElement}function Tv(e){const t={x:0,y:0},n=Av(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,l=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:a,isRight:l,maxScroll:r,minScroll:t}}const S$={x:.2,y:.2};function A$(e,t,n,r,i){let{top:o,left:a,right:l,bottom:s}=n;r===void 0&&(r=10),i===void 0&&(i=S$);const{isTop:c,isBottom:d,isLeft:f,isRight:h}=Tv(e),p={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+g.height?(p.y=Ct.Backward,m.y=r*Math.abs((t.top+g.height-o)/g.height)):!d&&s>=t.bottom-g.height&&(p.y=Ct.Forward,m.y=r*Math.abs((t.bottom-g.height-s)/g.height)),!h&&l>=t.right-g.width?(p.x=Ct.Forward,m.x=r*Math.abs((t.right-g.width-l)/g.width)):!f&&a<=t.left+g.width&&(p.x=Ct.Backward,m.x=r*Math.abs((t.left+g.width-a)/g.width)),{direction:p,speed:m}}function T$(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 Ev(e){return e.reduce((t,n)=>fi(t,vu(n)),cn)}function E$(e){return e.reduce((t,n)=>t+Iv(n),0)}function _$(e){return e.reduce((t,n)=>t+Sv(n),0)}function _v(e,t){if(t===void 0&&(t=hi),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);wv(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const k$=[["x",["left","right"],E$],["y",["top","bottom"],_$]];class bu{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=ys(n),i=Ev(r);this.rect=U({},t),this.width=t.width,this.height=t.height;for(const[o,a,l]of k$)for(const s of a)Object.defineProperty(this,s,{get:()=>{const c=l(r),d=i[o]-c;return this.rect[s]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class vo{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 P$(e){const{EventTarget:t}=Rt(e);return e instanceof t?e:di(e)}function yu(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(mi(n,2)+mi(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 kv(e){e.preventDefault()}function D$(e){e.stopPropagation()}var _e;(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"})(_e||(_e={}));const Pv={start:[_e.Space,_e.Enter],cancel:[_e.Esc],end:[_e.Space,_e.Enter,_e.Tab]},O$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case _e.Right:return X(U({},n),{x:n.x+25});case _e.Left:return X(U({},n),{x:n.x-25});case _e.Down:return X(U({},n),{y:n.y+25});case _e.Up:return X(U({},n),{y:n.y-25})}};class Cu{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 vo(di(n)),this.windowListeners=new vo(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&&_v(r),n(cn)}handleKeyDown(t){if(ms(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=Pv,coordinateGetter:a=O$,scrollBehavior:l="smooth"}=i,{code:s}=t;if(o.end.includes(s)){this.handleEnd(t);return}if(o.cancel.includes(s)){this.handleCancel(t);return}const{collisionRect:c}=r.current,d=c?{x:c.left,y:c.top}:cn;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:n,context:r.current,currentCoordinates:d});if(f){const h=mo(f,d),p={x:0,y:0},{scrollableAncestors:m}=r.current;for(const g of m){const v=t.code,{isTop:S,isRight:w,isLeft:y,isBottom:C,maxScroll:b,minScroll:T}=Tv(g),E=T$(g),P={x:Math.min(v===_e.Right?E.right-E.width/2:E.right,Math.max(v===_e.Right?E.left:E.left+E.width/2,f.x)),y:Math.min(v===_e.Down?E.bottom-E.height/2:E.bottom,Math.max(v===_e.Down?E.top:E.top+E.height/2,f.y))},O=v===_e.Right&&!w||v===_e.Left&&!y,G=v===_e.Down&&!C||v===_e.Up&&!S;if(O&&P.x!==f.x){const z=g.scrollLeft+h.x,A=v===_e.Right&&z<=b.x||v===_e.Left&&z>=T.x;if(A&&!h.y){g.scrollTo({left:z,behavior:l});return}A?p.x=g.scrollLeft-z:p.x=v===_e.Right?g.scrollLeft-b.x:g.scrollLeft-T.x,p.x&&g.scrollBy({left:-p.x,behavior:l});break}else if(G&&P.y!==f.y){const z=g.scrollTop+h.y,A=v===_e.Down&&z<=b.y||v===_e.Up&&z>=T.y;if(A&&!h.x){g.scrollTo({top:z,behavior:l});return}A?p.y=g.scrollTop-z:p.y=v===_e.Down?g.scrollTop-b.y:g.scrollTop-T.y,p.y&&g.scrollBy({top:-p.y,behavior:l});break}}this.handleMove(t,fi(mo(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()}}Cu.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Pv,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const l=o.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Dv(e){return!!(e&&"distance"in e)}function Ov(e){return!!(e&&"delay"in e)}class xu{constructor(t,n,r){var i;r===void 0&&(r=P$(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=di(a),this.documentListeners=new vo(this.document),this.listeners=new vo(r),this.windowListeners=new vo(Rt(a)),this.initialCoordinates=(i=vs(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,kv),this.windowListeners.add(on.VisibilityChange,this.handleCancel),this.windowListeners.add(on.ContextMenu,kv),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(Ov(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Dv(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,D$,{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:l}}=o;if(!i)return;const s=(n=vs(t))!=null?n:cn,c=mo(i,s);if(!r&&l){if(Dv(l)){if(l.tolerance!=null&&yu(c,l.tolerance))return this.handleCancel();if(yu(c,l.distance))return this.handleStart()}if(Ov(l)&&yu(c,l.tolerance))return this.handleCancel();this.handlePending(l,c);return}t.cancelable&&t.preventDefault(),a(s)}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===_e.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const R$={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class wu extends xu{constructor(t){const{event:n}=t,r=di(n.target);super(t,R$,r)}}wu.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 M$={move:{name:"mousemove"},end:{name:"mouseup"}};var Iu;(function(e){e[e.RightClick=2]="RightClick"})(Iu||(Iu={}));class L$ extends xu{constructor(t){super(t,M$,di(t.event.target))}}L$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Iu.RightClick?!1:(r==null||r({event:n}),!0)}}];const Su={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class B$ extends xu{constructor(t){super(t,Su)}static setup(){return window.addEventListener(Su.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Su.move.name,t)};function t(){}}}B$.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 bo;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(bo||(bo={}));var Cs;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Cs||(Cs={}));function $$(e){let{acceleration:t,activator:n=bo.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:l=Cs.TreeOrder,pointerCoordinates:s,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=F$({delta:f,disabled:!o}),[m,g]=qB(),v=x.useRef({x:0,y:0}),S=x.useRef({x:0,y:0}),w=x.useMemo(()=>{switch(n){case bo.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case bo.DraggableRect:return i}},[n,i,s]),y=x.useRef(null),C=x.useCallback(()=>{const T=y.current;if(!T)return;const E=v.current.x*S.current.x,P=v.current.y*S.current.y;T.scrollBy(E,P)},[]),b=x.useMemo(()=>l===Cs.TreeOrder?[...c].reverse():c,[l,c]);x.useEffect(()=>{if(!o||!c.length||!w){g();return}for(const T of b){if((r==null?void 0:r(T))===!1)continue;const E=c.indexOf(T),P=d[E];if(!P)continue;const{direction:O,speed:G}=A$(T,P,w,t,h);for(const z of["x","y"])p[z][O[z]]||(G[z]=0,O[z]=0);if(G.x>0||G.y>0){g(),y.current=T,m(C,a),v.current=G,S.current=O;return}}v.current={x:0,y:0},S.current={x:0,y:0},g()},[t,C,r,g,o,a,JSON.stringify(w),JSON.stringify(p),m,c,b,d,JSON.stringify(h)])}const N$={x:{[Ct.Backward]:!1,[Ct.Forward]:!1},y:{[Ct.Backward]:!1,[Ct.Forward]:!1}};function F$(e){let{delta:t,disabled:n}=e;const r=gs(t);return po(i=>{if(n||!r||!i)return N$;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Ct.Backward]:i.x[Ct.Backward]||o.x===-1,[Ct.Forward]:i.x[Ct.Forward]||o.x===1},y:{[Ct.Backward]:i.y[Ct.Backward]||o.y===-1,[Ct.Forward]:i.y[Ct.Forward]||o.y===1}}},[n,t,r])}function z$(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return po(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 yo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(yo||(yo={}));var Au;(function(e){e.Optimized="optimized"})(Au||(Au={}));const Rv=new Map;function V$(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=x.useState(null),{frequency:l,measure:s,strategy:c}=i,d=x.useRef(e),f=v(),h=ho(f),p=x.useCallback(function(S){S===void 0&&(S=[]),!h.current&&a(w=>w===null?S:w.concat(S.filter(y=>!w.includes(y))))},[h]),m=x.useRef(null),g=po(S=>{if(f&&!n)return Rv;if(!S||S===Rv||d.current!==e||o!=null){const w=new Map;for(let y of e){if(!y)continue;if(o&&o.length>0&&!o.includes(y.id)&&y.rect.current){w.set(y.id,y.rect.current);continue}const C=y.node.current,b=C?new bu(s(C),C):null;y.rect.current=b,b&&w.set(y.id,b)}return w}return S},[e,o,n,f,s]);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 l!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},l))},[l,f,p,...r]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:o!=null};function v(){switch(c){case yo.Always:return!1;case yo.BeforeDragging:return n;default:return!n}}}function Tu(e,t){return po(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function U$(e,t){return Tu(e,t)}function H$(e){let{callback:t,disabled:n}=e;const r=hs(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 xs(e){let{callback:t,disabled:n}=e;const r=hs(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 W$(e){return new bu(hi(e),e)}function Mv(e,t,n){t===void 0&&(t=W$);const[r,i]=x.useState(null);function o(){i(s=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=s!=null?s:n)!=null?c:null}const d=t(e);return JSON.stringify(s)===JSON.stringify(d)?s:d})}const a=H$({callback(s){if(e)for(const c of s){const{type:d,target:f}=c;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),l=xs({callback:o});return ln(()=>{o(),e?(l==null||l.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),a==null||a.disconnect())},[e]),r}function G$(e){const t=Tu(e);return yv(e,t)}const Lv=[];function Y$(e){const t=x.useRef(e),n=po(r=>e?r&&r!==Lv&&e&&t.current&&e.parentNode===t.current.parentNode?r:ys(e):Lv,[e]);return x.useEffect(()=>{t.current=e},[e]),n}function K$(e){const[t,n]=x.useState(null),r=x.useRef(e),i=x.useCallback(o=>{const a=mu(o.target);a&&n(l=>l?(l.set(a,vu(a)),new Map(l)):null)},[]);return x.useEffect(()=>{const o=r.current;if(e!==o){a(o);const l=e.map(s=>{const c=mu(s);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,vu(c)]):null}).filter(s=>s!=null);n(l.length?new Map(l):null),r.current=e}return()=>{a(e),a(o)};function a(l){l.forEach(s=>{const c=mu(s);c==null||c.removeEventListener("scroll",i)})}},[i,e]),x.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>fi(o,a),cn):Ev(e):cn,[e,t])}function Bv(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?mo(e,n.current):cn}function q$(e){x.useEffect(()=>{if(!fs)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 Q$(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 $v(e){return x.useMemo(()=>e?x$(e):null,[e])}const Nv=[];function J$(e,t){t===void 0&&(t=hi);const[n]=e,r=$v(n?Rt(n):null),[i,o]=x.useState(Nv);function a(){o(()=>e.length?e.map(s=>Av(s)?r:new bu(t(s),s)):Nv)}const l=xs({callback:a});return ln(()=>{l==null||l.disconnect(),a(),e.forEach(s=>l==null?void 0:l.observe(s))},[e]),i}function Fv(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return fo(t)?t:e}function X$(e){let{measure:t}=e;const[n,r]=x.useState(null),i=x.useCallback(c=>{for(const{target:d}of c)if(fo(d)){r(f=>{const h=t(d);return f?X(U({},f),{width:h.width,height:h.height}):h});break}},[t]),o=xs({callback:i}),a=x.useCallback(c=>{const d=Fv(c);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[l,s]=ps(a);return x.useMemo(()=>({nodeRef:l,rect:n,setRef:s}),[n,l,s])}const Z$=[{sensor:wu,options:{}},{sensor:Cu,options:{}}],eN={current:{}},ws={draggable:{measure:xv},droppable:{measure:xv,strategy:yo.WhileDragging,frequency:Au.Optimized},dragOverlay:{measure:hi}};class Co 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 tN={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Co,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:bs},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ws,measureDroppableContainers:bs,windowRect:null,measuringScheduled:!1},zv={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:bs,draggableNodes:new Map,over:null,measureDroppableContainers:bs},xo=x.createContext(zv),jv=x.createContext(tN);function nN(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Co}}}function rN(e,t){switch(t.type){case mt.DragStart:return X(U({},e),{draggable:X(U({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case mt.DragMove:return e.draggable.active==null?e:X(U({},e),{draggable:X(U({},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 X(U({},e),{draggable:X(U({},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 Co(e.droppable.containers);return i.set(r,n),X(U({},e),{droppable:X(U({},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 Co(e.droppable.containers);return a.set(n,X(U({},o),{disabled:i})),X(U({},e),{droppable:X(U({},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 Co(e.droppable.containers);return o.delete(n),X(U({},e),{droppable:X(U({},e.droppable),{containers:o})})}default:return e}}function iN(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=x.useContext(xo),o=gs(r),a=gs(n==null?void 0:n.id);return x.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!ms(o)||document.activeElement===o.target)return;const l=i.get(a);if(!l)return;const{activatorNode:s,node:c}=l;if(!s.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[s.current,c.current]){if(!d)continue;const f=XB(d);if(f){f.focus();break}}})}},[r,t,i,a,o]),null}function Vv(e,t){let i=t,{transform:n}=i,r=We(i,["transform"]);return e!=null&&e.length?e.reduce((o,a)=>a(U({transform:o},r)),n):n}function oN(e){return x.useMemo(()=>({draggable:U(U({},ws.draggable),e==null?void 0:e.draggable),droppable:U(U({},ws.droppable),e==null?void 0:e.droppable),dragOverlay:U(U({},ws.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 aN(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=x.useRef(!1),{x:a,y:l}=typeof i=="boolean"?{x:i,y:i}:i;ln(()=>{if(!a&&!l||!t){o.current=!1;return}if(o.current||!r)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const d=n(c),f=yv(d,r);if(a||(f.x=0),l||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=wv(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,l,r,n])}const Is=x.createContext(X(U({},cn),{scaleX:1,scaleY:1}));var ir;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ir||(ir={}));const sN=x.memo(function(t){var n,r,i,o;let _s=t,{id:a,accessibility:l,autoScroll:s=!0,children:c,sensors:d=Z$,collisionDetection:f=g$,measuring:h,modifiers:p}=_s,m=We(_s,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const g=x.useReducer(rN,void 0,nN),[v,S]=g,[w,y]=i$(),[C,b]=x.useState(ir.Uninitialized),T=C===ir.Initialized,{draggable:{active:E,nodes:P,translate:O},droppable:{containers:G}}=v,z=E!=null?P.get(E):null,A=x.useRef({initial:null,translated:null}),W=x.useMemo(()=>{var xt;return E!=null?{id:E,data:(xt=z==null?void 0:z.data)!=null?xt:eN,rect:A}:null},[E,z]),Y=x.useRef(null),[N,$]=x.useState(null),[B,H]=x.useState(null),q=ho(m,Object.values(m)),ee=go("DndDescribedBy",a),R=x.useMemo(()=>G.getEnabled(),[G]),L=oN(h),{droppableRects:F,measureDroppableContainers:V,measuringScheduled:te}=V$(R,{dragging:T,dependencies:[O.x,O.y],config:L.droppable}),se=z$(P,E),ae=x.useMemo(()=>B?vs(B):null,[B]),J=un(),le=U$(se,L.draggable.measure);aN({activeNode:E!=null?P.get(E):null,config:J.layoutShiftCompensation,initialRect:le,measure:L.draggable.measure});const ne=Mv(se,L.draggable.measure,le),ge=Mv(se?se.parentElement:null),Se=x.useRef({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:F,draggableNodes:P,draggingNode:null,draggingNodeRect:null,droppableContainers:G,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ue=G.getNodeFor((n=Se.current.over)==null?void 0:n.id),wt=X$({measure:L.dragOverlay.measure}),at=(r=wt.nodeRef.current)!=null?r:se,kt=T?(i=wt.rect)!=null?i:ne:null,de=!!(wt.nodeRef.current&&wt.rect),he=G$(de?null:ne),Ce=$v(at?Rt(at):null),Te=Y$(T?Ue!=null?Ue:se:null),He=J$(Te),Pe=Vv(p,{transform:{x:O.x-he.x,y:O.y-he.y,scaleX:1,scaleY:1},activatorEvent:B,active:W,activeNodeRect:ne,containerNodeRect:ge,draggingNodeRect:kt,over:Se.current.over,overlayNodeRect:wt.rect,scrollableAncestors:Te,scrollableAncestorRects:He,windowRect:Ce}),Ee=ae?fi(ae,O):null,It=K$(Te),St=Bv(It),jt=Bv(It,[ne]),Mt=fi(Pe,St),qt=kt?b$(kt,Pe):null,or=W&&qt?f({active:W,collisionRect:qt,droppableRects:F,droppableContainers:R,pointerCoordinates:Ee}):null,Ts=bv(or,"id"),[wn,wo]=x.useState(null),_u=de?Pe:fi(Pe,jt),ku=m$(_u,(o=wn==null?void 0:wn.rect)!=null?o:null,ne),ze=x.useRef(null),pi=x.useCallback((xt,_)=>{let{sensor:M,options:K}=_;if(Y.current==null)return;const Q=P.get(Y.current);if(!Q)return;const re=xt.nativeEvent,ce=new M({active:Y.current,activeNode:Q,event:re,options:K,context:Se,onAbort(ue){if(!P.get(ue))return;const{onDragAbort:fe}=q.current,me={id:ue};fe==null||fe(me),w({type:"onDragAbort",event:me})},onPending(ue,we,fe,me){if(!P.get(ue))return;const{onDragPending:Pt}=q.current,nt={id:ue,constraint:we,initialCoordinates:fe,offset:me};Pt==null||Pt(nt),w({type:"onDragPending",event:nt})},onStart(ue){const we=Y.current;if(we==null)return;const fe=P.get(we);if(!fe)return;const{onDragStart:me}=q.current,De={activatorEvent:re,active:{id:we,data:fe.data,rect:A}};Oe.unstable_batchedUpdates(()=>{me==null||me(De),b(ir.Initializing),S({type:mt.DragStart,initialCoordinates:ue,active:we}),w({type:"onDragStart",event:De}),$(ze.current),H(re)})},onMove(ue){S({type:mt.DragMove,coordinates:ue})},onEnd:xe(mt.DragEnd),onCancel:xe(mt.DragCancel)});ze.current=ce;function xe(ue){return function(){return k(this,null,function*(){const{active:fe,collisions:me,over:De,scrollAdjustedTranslate:Pt}=Se.current;let nt=null;if(fe&&Pt){const{cancelDrop:dn}=q.current;nt={activatorEvent:re,active:fe,collisions:me,delta:Pt,over:De},ue===mt.DragEnd&&typeof dn=="function"&&(yield Promise.resolve(dn(nt)))&&(ue=mt.DragCancel)}Y.current=null,Oe.unstable_batchedUpdates(()=>{S({type:ue}),b(ir.Uninitialized),wo(null),$(null),H(null),ze.current=null;const dn=ue===mt.DragEnd?"onDragEnd":"onDragCancel";if(nt){const In=q.current[dn];In==null||In(nt),w({type:dn,event:nt})}})})}}},[P]),Io=x.useCallback((xt,_)=>(M,K)=>{const Q=M.nativeEvent,re=P.get(K);if(Y.current!==null||!re||Q.dndKit||Q.defaultPrevented)return;const ce={active:re};xt(M,_.options,ce)===!0&&(Q.dndKit={capturedBy:_.sensor},Y.current=K,pi(M,_))},[P,pi]),Es=j$(d,Io);q$(d),ln(()=>{ne&&C===ir.Initializing&&b(ir.Initialized)},[ne,C]),x.useEffect(()=>{const{onDragMove:xt}=q.current,{active:_,activatorEvent:M,collisions:K,over:Q}=Se.current;if(!_||!M)return;const re={active:_,activatorEvent:M,collisions:K,delta:{x:Mt.x,y:Mt.y},over:Q};Oe.unstable_batchedUpdates(()=>{xt==null||xt(re),w({type:"onDragMove",event:re})})},[Mt.x,Mt.y]),x.useEffect(()=>{const{active:xt,activatorEvent:_,collisions:M,droppableContainers:K,scrollAdjustedTranslate:Q}=Se.current;if(!xt||Y.current==null||!_||!Q)return;const{onDragOver:re}=q.current,ce=K.get(Ts),xe=ce&&ce.rect.current?{id:ce.id,rect:ce.rect.current,data:ce.data,disabled:ce.disabled}:null,ue={active:xt,activatorEvent:_,collisions:M,delta:{x:Q.x,y:Q.y},over:xe};Oe.unstable_batchedUpdates(()=>{wo(xe),re==null||re(ue),w({type:"onDragOver",event:ue})})},[Ts]),ln(()=>{Se.current={activatorEvent:B,active:W,activeNode:se,collisionRect:qt,collisions:or,droppableRects:F,draggableNodes:P,draggingNode:at,draggingNodeRect:kt,droppableContainers:G,over:wn,scrollableAncestors:Te,scrollAdjustedTranslate:Mt},A.current={initial:kt,translated:qt}},[W,se,or,qt,P,at,kt,F,G,wn,Te,Mt]),$$(X(U({},J),{delta:O,draggingRect:qt,pointerCoordinates:Ee,scrollableAncestors:Te,scrollableAncestorRects:He}));const gi=x.useMemo(()=>({active:W,activeNode:se,activeNodeRect:ne,activatorEvent:B,collisions:or,containerNodeRect:ge,dragOverlay:wt,draggableNodes:P,droppableContainers:G,droppableRects:F,over:wn,measureDroppableContainers:V,scrollableAncestors:Te,scrollableAncestorRects:He,measuringConfiguration:L,measuringScheduled:te,windowRect:Ce}),[W,se,ne,B,or,ge,wt,P,G,F,wn,V,Te,He,L,te,Ce]),So=x.useMemo(()=>({activatorEvent:B,activators:Es,active:W,activeNodeRect:ne,ariaDescribedById:{draggable:ee},dispatch:S,draggableNodes:P,over:wn,measureDroppableContainers:V}),[B,Es,W,ne,S,ee,P,wn,V]);return x.createElement(gv.Provider,{value:y},x.createElement(xo.Provider,{value:So},x.createElement(jv.Provider,{value:gi},x.createElement(Is.Provider,{value:ku},c)),x.createElement(iN,{disabled:(l==null?void 0:l.restoreFocus)===!1})),x.createElement(s$,X(U({},l),{hiddenTextDescribedById:ee})));function un(){const xt=(N==null?void 0:N.autoScrollEnabled)===!1,_=typeof s=="object"?s.enabled===!1:s===!1,M=T&&!xt&&!_;return typeof s=="object"?X(U({},s),{enabled:M}):{enabled:M}}}),lN=x.createContext(null),Uv="button",cN="Draggable";function uN(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=go(cN),{activators:a,activatorEvent:l,active:s,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:h}=x.useContext(xo),{role:p=Uv,roleDescription:m="draggable",tabIndex:g=0}=i!=null?i:{},v=(s==null?void 0:s.id)===t,S=x.useContext(v?Is:lN),[w,y]=ps(),[C,b]=ps(),T=Q$(a,t),E=ho(n);ln(()=>(f.set(t,{id:t,key:o,node:w,activatorNode:C,data:E}),()=>{const O=f.get(t);O&&O.key===o&&f.delete(t)}),[f,t]);const P=x.useMemo(()=>({role:p,tabIndex:g,"aria-disabled":r,"aria-pressed":v&&p===Uv?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[r,p,g,v,m,d.draggable]);return{active:s,activatorEvent:l,activeNodeRect:c,attributes:P,isDragging:v,listeners:r?void 0:T,node:w,over:h,setNodeRef:y,setActivatorNodeRef:b,transform:S}}function Hv(){return x.useContext(jv)}const dN="Droppable",fN={timeout:25};function hN(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=go(dN),{active:a,dispatch:l,over:s,measureDroppableContainers:c}=x.useContext(xo),d=x.useRef({disabled:n}),f=x.useRef(!1),h=x.useRef(null),p=x.useRef(null),{disabled:m,updateMeasurementsFor:g,timeout:v}=U(U({},fN),i),S=ho(g!=null?g:r),w=x.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(S.current)?S.current:[S.current]),p.current=null},v)},[v]),y=xs({callback:w,disabled:m||!a}),C=x.useCallback((P,O)=>{y&&(O&&(y.unobserve(O),f.current=!1),P&&y.observe(P))},[y]),[b,T]=ps(C),E=ho(t);return x.useEffect(()=>{!y||!b.current||(y.disconnect(),f.current=!1,y.observe(b.current))},[b,y]),x.useEffect(()=>(l({type:mt.RegisterDroppable,element:{id:r,key:o,disabled:n,node:b,rect:h,data:E}}),()=>l({type:mt.UnregisterDroppable,key:o,id:r})),[r]),x.useEffect(()=>{n!==d.current.disabled&&(l({type:mt.SetDroppableDisabled,id:r,key:o,disabled:n}),d.current.disabled=n)},[r,o,n,l]),{active:a,rect:h,isOver:(s==null?void 0:s.id)===r,node:b,over:s,setNodeRef:T}}function pN(e){let{animation:t,children:n}=e;const[r,i]=x.useState(null),[o,a]=x.useState(null),l=gs(n);return!n&&!r&&l&&i(l),ln(()=>{if(!o)return;const s=r==null?void 0:r.key,c=r==null?void 0:r.props.id;if(s==null||c==null){i(null);return}Promise.resolve(t(c,o)).then(()=>{i(null)})},[t,r,o]),x.createElement(x.Fragment,null,n,r?x.cloneElement(r,{ref:a}):null)}const gN={x:0,y:0,scaleX:1,scaleY:1};function mN(e){let{children:t}=e;return x.createElement(xo.Provider,{value:zv},x.createElement(Is.Provider,{value:gN},t))}const vN={position:"fixed",touchAction:"none"},bN=e=>ms(e)?"transform 250ms ease":void 0,yN=x.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:l,style:s,transform:c,transition:d=bN}=e;if(!l)return null;const f=i?c:X(U({},c),{scaleX:1,scaleY:1}),h=U(X(U({},vN),{width:l.width,height:l.height,top:l.top,left:l.left,transform:rr.Transform.toString(f),transformOrigin:i&&r?u$(r,l):void 0,transition:typeof d=="function"?d(r):d}),s);return x.createElement(n,{className:a,style:h,ref:t},o)}),Wv=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[l,s]of Object.entries(o.active))s!==void 0&&(i[l]=n.node.style.getPropertyValue(l),n.node.style.setProperty(l,s));if(o!=null&&o.dragOverlay)for(const[l,s]of Object.entries(o.dragOverlay))s!==void 0&&r.node.style.setProperty(l,s);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[s,c]of Object.entries(i))n.node.style.setProperty(s,c);a!=null&&a.active&&n.node.classList.remove(a.active)}},CN={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:rr.Transform.toString(t)},{transform:rr.Transform.toString(n)}]},sideEffects:Wv({styles:{active:{opacity:"0"}}})};function xN(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return hs((o,a)=>{if(t===null)return;const l=n.get(o);if(!l)return;const s=l.node.current;if(!s)return;const c=Fv(a);if(!c)return;const{transform:d}=Rt(a).getComputedStyle(a),f=Cv(d);if(!f)return;const h=typeof t=="function"?t:wN(t);return _v(s,i.draggable.measure),h({active:{id:o,data:l.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:f})})}function wN(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}=U(U({},CN),e);return o=>{let w=o,{active:a,dragOverlay:l,transform:s}=w,c=We(w,["active","dragOverlay","transform"]);if(!t)return;const d={x:l.rect.left-a.rect.left,y:l.rect.top-a.rect.top},f={scaleX:s.scaleX!==1?a.rect.width*s.scaleX/l.rect.width:1,scaleY:s.scaleY!==1?a.rect.height*s.scaleY/l.rect.height:1},h=U({x:s.x-d.x,y:s.y-d.y},f),p=i(X(U({},c),{active:a,dragOverlay:l,transform:{initial:s,final:h}})),[m]=p,g=p[p.length-1];if(JSON.stringify(m)===JSON.stringify(g))return;const v=r==null?void 0:r(U({active:a,dragOverlay:l},c)),S=l.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise(y=>{S.onfinish=()=>{v==null||v(),y()}})}}let Gv=0;function IN(e){return x.useMemo(()=>{if(e!=null)return Gv++,Gv},[e])}const SN=x.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:l="div",className:s,zIndex:c=999}=e;const{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggableNodes:m,droppableContainers:g,dragOverlay:v,over:S,measuringConfiguration:w,scrollableAncestors:y,scrollableAncestorRects:C,windowRect:b}=Hv(),T=x.useContext(Is),E=IN(f==null?void 0:f.id),P=Vv(a,{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggingNodeRect:v.rect,over:S,overlayNodeRect:v.rect,scrollableAncestors:y,scrollableAncestorRects:C,transform:T,windowRect:b}),O=Tu(h),G=xN({config:r,draggableNodes:m,droppableContainers:g,measuringConfiguration:w}),z=O?v.setRef:void 0;return x.createElement(mN,null,x.createElement(pN,{animation:G},f&&E?x.createElement(yN,{key:E,id:f.id,ref:z,as:l,activatorEvent:d,adjustScale:t,className:s,transition:o,rect:O,style:U({zIndex:c},i),transform:P},n):null))});function Eu(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function AN(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Ss(e){return e!==null&&e>=0}function TN(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 EN(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Yv=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=Eu(t,r,n),a=t[i],l=o[i];return!l||!a?null:{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}},Kv="Sortable",qv=x.createContext({activeIndex:-1,containerId:Kv,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Yv,disabled:{draggable:!1,droppable:!1}});function _N(e){let{children:t,id:n,items:r,strategy:i=Yv,disabled:o=!1}=e;const{active:a,dragOverlay:l,droppableRects:s,over:c,measureDroppableContainers:d}=Hv(),f=go(Kv,n),h=l.rect!==null,p=x.useMemo(()=>r.map(T=>typeof T=="object"&&"id"in T?T.id:T),[r]),m=a!=null,g=a?p.indexOf(a.id):-1,v=c?p.indexOf(c.id):-1,S=x.useRef(p),w=!TN(p,S.current),y=v!==-1&&g===-1||w,C=EN(o);ln(()=>{w&&m&&d(p)},[w,p,m,d]),x.useEffect(()=>{S.current=p},[p]);const b=x.useMemo(()=>({activeIndex:g,containerId:f,disabled:C,disableTransforms:y,items:p,overIndex:v,useDragOverlay:h,sortedRects:AN(p,s),strategy:i}),[g,f,C.draggable,C.droppable,y,p,v,s,h,i]);return x.createElement(qv.Provider,{value:b},t)}const kN=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Eu(n,r,i).indexOf(t)},PN=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:l,previousContainerId:s,transition:c}=e;return!c||!r||l!==o&&i===a?!1:n?!0:a!==i&&t===s},DN={duration:200,easing:"ease"},Qv="transform",ON=rr.Transition.toString({property:Qv,duration:0,easing:"linear"}),RN={roleDescription:"sortable"};function MN(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,a]=x.useState(null),l=x.useRef(n);return ln(()=>{if(!t&&n!==l.current&&r.current){const s=i.current;if(s){const c=hi(r.current,{ignoreTransform:!0}),d={x:s.left-c.left,y:s.top-c.top,scaleX:s.width/c.width,scaleY:s.height/c.height};(d.x||d.y)&&a(d)}}n!==l.current&&(l.current=n)},[t,n,r,i]),x.useEffect(()=>{o&&a(null)},[o]),o}function LN(e){let{animateLayoutChanges:t=PN,attributes:n,disabled:r,data:i,getNewIndex:o=kN,id:a,strategy:l,resizeObserverConfig:s,transition:c=DN}=e;const{items:d,containerId:f,activeIndex:h,disabled:p,disableTransforms:m,sortedRects:g,overIndex:v,useDragOverlay:S,strategy:w}=x.useContext(qv),y=BN(r,p),C=d.indexOf(a),b=x.useMemo(()=>U({sortable:{containerId:f,index:C,items:d}},i),[f,i,C,d]),T=x.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:E,node:P,isOver:O,setNodeRef:G}=hN({id:a,data:b,disabled:y.droppable,resizeObserverConfig:U({updateMeasurementsFor:T},s)}),{active:z,activatorEvent:A,activeNodeRect:W,attributes:Y,setNodeRef:N,listeners:$,isDragging:B,over:H,setActivatorNodeRef:q,transform:ee}=uN({id:a,data:b,attributes:U(U({},RN),n),disabled:y.draggable}),R=KB(G,N),L=!!z,F=L&&!m&&Ss(h)&&Ss(v),V=!S&&B,te=V&&F?ee:null,se=l!=null?l:w,ae=F?te!=null?te:se({rects:g,activeNodeRect:W,activeIndex:h,overIndex:v,index:C}):null,J=Ss(h)&&Ss(v)?o({id:a,items:d,activeIndex:h,overIndex:v}):C,le=z==null?void 0:z.id,ne=x.useRef({activeId:le,items:d,newIndex:J,containerId:f}),ge=d!==ne.current.items,Se=t({active:z,containerId:f,isDragging:B,isSorting:L,id:a,index:C,items:d,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:c,wasDragging:ne.current.activeId!=null}),Ue=MN({disabled:!Se,index:C,node:P,rect:E});return x.useEffect(()=>{L&&ne.current.newIndex!==J&&(ne.current.newIndex=J),f!==ne.current.containerId&&(ne.current.containerId=f),d!==ne.current.items&&(ne.current.items=d)},[L,J,f,d]),x.useEffect(()=>{if(le===ne.current.activeId)return;if(le!=null&&ne.current.activeId==null){ne.current.activeId=le;return}const at=setTimeout(()=>{ne.current.activeId=le},50);return()=>clearTimeout(at)},[le]),{active:z,activeIndex:h,attributes:Y,data:b,rect:E,index:C,newIndex:J,items:d,isOver:O,isSorting:L,isDragging:B,listeners:$,node:P,overIndex:v,over:H,setNodeRef:R,setActivatorNodeRef:q,setDroppableNodeRef:G,setDraggableNodeRef:N,transform:Ue!=null?Ue:ae,transition:wt()};function wt(){if(Ue||ge&&ne.current.newIndex===C)return ON;if(!(V&&!ms(A)||!c)&&(L||Se))return rr.Transition.toString(X(U({},c),{property:Qv}))}}function BN(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 As(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 $N=[_e.Down,_e.Right,_e.Up,_e.Left],NN=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:l}}=t;if($N.includes(e.code)){if(e.preventDefault(),!n||!r)return;const s=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=i.get(f.id);if(h)switch(e.code){case _e.Down:r.top<h.top&&s.push(f);break;case _e.Up:r.top>h.top&&s.push(f);break;case _e.Left:r.left>h.left&&s.push(f);break;case _e.Right:r.left<h.left&&s.push(f);break}});const c=h$({active:n,collisionRect:r,droppableRects:i,droppableContainers:s,pointerCoordinates:null});let d=bv(c,"id");if(d===(a==null?void 0:a.id)&&c.length>1&&(d=c[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 v=ys(m).some((T,E)=>l[E]!==T),S=Jv(f,h),w=FN(f,h),y=v||!S?{x:0,y:0}:{x:w?r.width-p.width:0,y:w?r.height-p.height:0},C={x:p.left,y:p.top};return y.x&&y.y?C:mo(C,y)}}}};function Jv(e,t){return!As(e)||!As(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function FN(e,t){return!As(e)||!As(t)||!Jv(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const zN=Ve(u.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"),Xv=x.createContext({attributes:{},listeners:void 0,ref(){}}),jN=()=>{const{attributes:e,listeners:t,ref:n}=x.useContext(Xv);return u.jsx(I.Button,X(U(U({sx:{backgroundColor:"transparent",color:"#919eab",width:"10px",":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}},e),t),{ref:n,children:u.jsx(zN,{})}))},Zv=({children:e,id:t,tooltipTitle:n,removeItem:r,useDraggable:i=!0,variant:o="plain"})=>{const{attributes:a,isDragging:l,listeners:s,setNodeRef:c,setActivatorNodeRef:d,transform:f,transition:h}=LN({id:t}),p=x.useMemo(()=>({attributes:a,listeners:s,ref:d}),[a,s,d]),m={opacity:l?.6:void 0,transform:rr.Translate.toString(f),transition:h};return u.jsx(Xv.Provider,{value:p,children:u.jsx(I.ListItem,{variant:o,ref:c,style:m,startAction:i?u.jsx(jN,{}):u.jsx(u.Fragment,{}),endAction:i?u.jsx(I.Tooltip,{title:n,children:u.jsx(I.Button,{variant:"outlined",color:"danger",onClick:r,sx:{ml:"auto",p:.5},size:"sm",children:u.jsx(Le.Remove,{})})}):u.jsx(u.Fragment,{}),sx:{p:2,borderRadius:"sm"},children:e})})},VN={sideEffects:Wv({styles:{active:{opacity:"0.6"}}})},UN=({children:e})=>u.jsx(SN,{dropAnimation:VN,children:e}),HN=({entities:e=[],labels:t,setEntities:n,removeItem:r})=>{const[i,o]=x.useState(null),a=x.useMemo(()=>e.find(s=>s.id===(i==null?void 0:i.id)),[i,e]),l=l$(mv(wu),mv(Cu,{coordinateGetter:NN}));return u.jsxs(sN,{sensors:l,onDragStart:({active:s})=>{o(s)},onDragEnd:({active:s,over:c})=>{if(c&&s.id!==(c==null?void 0:c.id)){const d=e.findIndex(({id:h})=>h===s.id),f=e.findIndex(({id:h})=>h===c.id);n(Eu(e,d,f))}o(null)},onDragCancel:()=>{o(null)},children:[u.jsx(_N,{items:e,children:u.jsx(I.List,{sx:{gap:"10px"},children:e.map(s=>u.jsxs(Zv,{id:s.id,variant:"outlined",removeItem:()=>r(s.id),tooltipTitle:t.removeEntity,children:[u.jsx(I.Typography,{ml:2,children:s.title||s.name}),s.type&&u.jsx(I.Chip,{color:eB(s.type),sx:{marginLeft:2},children:tB(s.type)})]},`sortable-item-${s.id}`))})}),u.jsx(UN,{children:a?u.jsx(u.Fragment,{children:e.map(s=>u.jsx(Zv,{id:s.id,useDraggable:!1,removeItem:()=>{},tooltipTitle:t.removeEntity},`sortable-overlay-item-${s.id}`))}):u.jsx(u.Fragment,{})})]})},WN=e=>u.jsxs(I.FormControl,{size:"sm",children:[u.jsx(I.FormLabel,{children:e.labels.itemsPerPage}),u.jsx(I.Select,{value:e.value,size:"sm",onChange:e.onChange,sx:{minHeight:"37px"},children:e.options.map((t,n)=>u.jsx(I.Option,{value:t,children:t},`items-per-page-${t}-${n}`))})]}),GN=(e,t)=>{const[n,r]=x.useState(null),{sdk:i}=pt(),o=()=>k(this,null,function*(){let l=[];if(!e){r(l);return}try{switch(e){case"top_x":l=(yield i.topX.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"match_quiz":l=(yield i.matchQuiz.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"template":l=(yield i.loyalty.getTemplates(void 0,!0)).data.map(v=>({id:v.id,name:v.name,status:v.status,type:e,relationship:"relatedTo"}));break;case"classic_quiz":l=(yield i.miniGames.getClassicQuizzes({limit:50},!1,!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"either_or":l=(yield i.miniGames.getEitherOrs({limit:50},!1,!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"poll":l=(yield i.voting.getPolls({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"bracket":l=(yield i.bracketGame.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"standing":l=(yield i.standingGame.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break}}catch(s){console.error(s),r(l),t();return}r(l)});return x.useEffect(()=>(o(),()=>r(null)),[e]),n},YN=({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 u.jsx(I.Chip,{color:t,variant:"solid",size:"sm",children:e})},KN=Ve(u.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"),qN=Ve(u.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"),QN=Ve(u.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"),JN=Ve(u.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),XN=Ve(u.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"),ZN=e=>{switch(e.entityType){case"top_x":return u.jsx(I.Tooltip,{title:"Top X",children:u.jsx(KN,{})});case"match_quiz":return u.jsx(I.Tooltip,{title:"Match Quiz",children:u.jsx(qN,{})});case"template":return u.jsx(I.Tooltip,{title:"Leaderboard Templates",children:u.jsx(Le.EmojiEvents,{})});case"classic_quiz":return u.jsx(I.Tooltip,{title:"Classic Quiz",children:u.jsx(QN,{})});case"either_or":return u.jsx(I.Tooltip,{title:"Either/Or",children:u.jsx(JN,{})});case"poll":return u.jsx(I.Tooltip,{title:"Poll",children:u.jsx(XN,{})});case"bracket":return u.jsx(I.Tooltip,{title:"Custom Bracket Game",children:u.jsx(Le.EmojiEvents,{})});case"standing":return u.jsx(I.Tooltip,{title:"Custom Standings Game",children:u.jsx(Le.EmojiEvents,{})});default:return null}},eF=({entity:e,deleteLabel:t,onDelete:n})=>u.jsx(u.Fragment,{children:u.jsx(I.Card,{sx:{p:2,mb:2},children:u.jsx(I.CardContent,{children:u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"space-between"},children:[u.jsx(I.Typography,{fontSize:"sm",startDecorator:u.jsx(ZN,{entityType:e.type}),children:e.name}),u.jsx(I.Box,{display:{xs:"none",md:"block"},children:u.jsx(YN,{status:e.status})}),u.jsx(I.Box,{children:u.jsx(I.Tooltip,{title:t,children:u.jsx(I.IconButton,{onClick:()=>n(e.id,e.relationship),color:"danger",size:"sm",children:u.jsx(Le.Delete,{})})})})]})})})}),tF=(e,t,n,r)=>k(this,null,function*(){let o=[];const a=new Map;t.forEach(l=>{if(a.has(l.entity_type)){const s=a.get(l.entity_type);a.set(l.entity_type,[...s,[l.entity_id,l.entity_relationship]])}else a.set(l.entity_type,[[l.entity_id,l.entity_relationship]])});try{for(const[l,s]of a)switch(l){case"top_x":const c=s.map(([O])=>O),d=yield e.topX.getGames({limit:c.length,gameIds:c},!0);o=[...o,...d.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"match_quiz":const f=s.map(([O])=>O),h=yield e.matchQuiz.getGames({limit:f.length,gameIds:f},!0);o=[...o,...h.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"template":const p=s.map(([O])=>O),m=yield e.loyalty.getTemplates(void 0,!0);o=[...o,...m.data.filter(O=>p.includes(O.id)).map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"classic_quiz":const g=s.map(([O])=>O),v=yield e.miniGames.getClassicQuizzes({limit:g.length,classicQuizIds:g},!1,!0);o=[...o,...v.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"either_or":const S=s.map(([O])=>O),w=yield e.miniGames.getEitherOrs({limit:S.length,eitherOrIds:S},!1,!0);o=[...o,...w.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"poll":const y=s.map(([O])=>O),C=yield e.voting.getPolls({limit:y.length,pollIds:y},!0);o=[...o,...C.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"bracket":const b=s.map(([O])=>O),T=yield e.bracketGame.getGames({limit:b.length,gameIds:b},!0);o=[...o,...T.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"standing":const E=s.map(([O])=>O),P=yield e.standingGame.getGames({limit:E.length,gameIds:E},!0);o=[...o,...P.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;default:}}catch(l){console.error("Error loading related entities",l),n(o),r()}n(o)}),nF=["top_x","match_quiz","template","classic_quiz","poll","either_or","bracket","standing"],rF=["relatedTo","blocks","blockedBy","bonusPointsGame","nextInSeries","previousInSeries"],iF=new Map().set("template","Leaderboard Templates").set("classic_quiz","Classic 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"),eb=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"),oF={Login:NR,InformationInput:eo,RichText:ic,HeaderButtons:hP,MarketSelection:ZR,Accordion:eT,DynamicFields:PP,BasicSelect:nT,BooleanSwitch:wL,Branding:fP,ProfileSearchSelect:CL,RangeCalendar:_P,CompetitionSearchSelect:bL,Related:rM,Images:pR,Duration:EP,DatePickerComponent:to,Flags:uR,Spinner:us,Tags:km,Toast:ut,AdContent:tT,Match:eM,Winners:cB,CompetitionsSearchSelect:yL,TeamsSearchSelect:xL,CustomSelect:yM,Schedule:fM,NoPermissionCard:kP,CustomFlatpickrCalendar:Vc,ContextSelectFilter:dB,NumberInput:$B,EntityContext:HB,MiniGamesImages:GB,AuthRequirement:YB,SortableList:HN,ItemsPerPageFilter:WN,ImageCard:so,RelatedRelationship:({defaultValue:e=[],onChange:t,labels:n})=>{const[r,i]=x.useState([]),[o,a]=x.useState(""),[l,s]=x.useState(null),[c,d]=x.useState("relatedTo"),[f,h]=x.useState(!1),p=()=>h(!f),m=GN(l,p),{sdk:g}=pt();x.useEffect(()=>(e.length>0&&tF(g,e,i,p),()=>{i([]),a(""),s(null),d("relatedTo")}),[]);const v=()=>{if(e.some(E=>E.entity_id===o&&E.entity_relationship===c)){a("");return}const b=[...e,{entity_id:o,entity_type:l,entity_relationship:c}],T=(m==null?void 0:m.filter(E=>E.id===o).map(E=>({id:E.id,name:E.name,type:l,status:E.status,relationship:c})))||[];i([...r,...T]),t(b),a("")},S=(C,b)=>{const T=e.filter(P=>!(P.entity_id===C&&P.entity_relationship===b)),E=r.filter(P=>!(P.id===C&&P.relationship===b));i(E),t(T)},w=r.reduce((C,b)=>{const T=b.relationship;return C[T]||(C[T]=[]),C[T].push(b),C},{}),y=Object.keys(w).sort();return u.jsxs(u.Fragment,{children:[y.map(C=>u.jsxs(I.Box,{sx:{mb:2},children:[u.jsx(I.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:u.jsx(I.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:eb.get(C)||"Unknown relationship"})}),w[C].map((b,T)=>u.jsx(eF,{entity:b,deleteLabel:n.delete,onDelete:S},`related-entity-relationship-${b.id}-${T}`))]},`relationship-group-${C}`)),u.jsxs(I.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:1},children:[u.jsxs(I.FormControl,{children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:n.type}),u.jsx(I.Select,{value:l,size:"sm",name:"entity_type",onChange:(C,b)=>s(b),sx:{minHeight:"37px"},children:nF.map(C=>u.jsx(I.Option,{value:C,children:iF.get(C)},`entity-type-option-${C}`))})]}),u.jsxs(I.FormControl,{children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:n.relationship}),u.jsx(I.Select,{value:c,size:"sm",name:"entity_relationship",onChange:(C,b)=>d(b),sx:{minHeight:"37px"},children:rF.map(C=>u.jsx(I.Option,{value:C,children:eb.get(C)},`entity-relationship-option-${C}`))})]}),u.jsxs(I.FormControl,{children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:n.entity}),u.jsx(I.Select,{value:o,size:"sm",name:"entity_id",onChange:(C,b)=>a(b),sx:{width:"100%",mr:{xs:0,md:1},mb:{xs:1,md:0},minHeight:"37px"},endDecorator:!m&&u.jsx(I.CircularProgress,{size:"sm"}),children:m&&m.map(C=>u.jsx(I.Option,{value:C.id,children:C.name},`entity--${C.id}`))})]}),u.jsx(I.Button,{startDecorator:u.jsx(Le.Add,{}),disabled:!o||!l,onClick:v,sx:{mb:1},children:n.add})]}),u.jsx(ut,{showToast:f,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:p})]})},ExportUsersLeads:e=>{const[t,n]=x.useState(!1),[r,i]=x.useState(!1),[o,a]=x.useState("success"),[l,s]=x.useState(""),c=x.useContext(Xo),d=(h,p)=>{a(h),s(p),i(!0)},f=()=>k(this,null,function*(){n(!0);const h=yield c==null?void 0:c.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 u.jsxs(u.Fragment,{children:[u.jsxs(I.Box,{mb:2,children:[u.jsx(I.Box,{display:"flex",alignItems:"center",mb:1,children:u.jsx(I.Typography,{level:"body-lg",sx:{mx:"auto"},children:e.labels.exportUsersLeads})}),u.jsx(I.Sheet,{sx:{overflowX:"auto",minWidth:"700px"},children:u.jsxs(I.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:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e.labels.category}),u.jsx("th",{children:e.labels.action})]})}),u.jsx("tbody",{children:u.jsxs("tr",{children:[u.jsxs("td",{children:[u.jsx(I.Typography,{level:"body-sm",fontWeight:"600",children:e.labels.exportAllUsersLeads}),u.jsx(I.Typography,{level:"body-xs",color:"neutral",children:e.labels.exportAllUsersLeadsDescription})]}),u.jsx("td",{children:u.jsx(I.Button,{loading:t,onClick:f,children:e.labels.exportAllUsersLeads})})]})})]})})]}),u.jsx(ut,{showToast:r,color:o,message:l,hideToast:()=>i(!1)})]})},SignOutButton:ng},tb=x.createContext(null),aF=({children:e})=>u.jsx(tb.Provider,{value:oF,children:e}),sF=()=>{const e=x.useContext(tb);if(!e)throw new Error("useComponentContext must be used within a ComponentProvider");return e},nb=425,rb=1024;return{APIProvider:hI,AuthProvider:pI,AuthContext:Bf,ComponentProvider:aF,useComponentContext:sF,useAPIContext:pt,useIsMobile:()=>{const[e,t]=x.useState(window.innerWidth<=rb),[n,r]=x.useState(window.innerWidth<=nb);return x.useLayoutEffect(()=>{const i=()=>{t(window.innerWidth<=rb),r(window.innerWidth<=nb)};return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),{isMobile:e,isPhone:n}}}});
|
|
2475
|
+
`},a$={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 s$(e){let{announcements:t=a$,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=o$}=e;const{announce:o,announcement:a}=n$(),l=go("DndLiveRegion"),[s,c]=x.useState(!1);if(x.useEffect(()=>{c(!0)},[]),r$(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])),!s)return null;const d=x.createElement(x.Fragment,null,x.createElement(e$,{id:r,value:i.draggable}),x.createElement(t$,{id:l,announcement:a}));return n?Oe.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 bs(){}function mv(e,t){return x.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function l$(){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 c$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function u$(e,t){const n=vs(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 d$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function f$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function vv(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 bv(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const h$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=vv(t),o=[];for(const a of r){const{id:l}=a,s=n.get(l);if(s){const c=vv(s),d=i.reduce((h,p,m)=>h+c$(c[m],p),0),f=Number((d/4).toFixed(4));o.push({id:l,data:{droppableContainer:a,value:f}})}}return o.sort(d$)};function p$(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,l=o-n;if(r<i&&n<o){const s=t.width*t.height,c=e.width*e.height,d=a*l,f=d/(s+c-d);return Number(f.toFixed(4))}return 0}const g$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:a}=o,l=n.get(a);if(l){const s=p$(l,t);s>0&&i.push({id:a,data:{droppableContainer:o,value:s}})}}return i.sort(f$)};function m$(e,t,n){return X(j({},e),{scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1})}function yv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:cn}function v$(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,l)=>X(j({},a),{top:a.top+e*l.y,bottom:a.bottom+e*l.y,left:a.left+e*l.x,right:a.right+e*l.x}),j({},n))}}const b$=v$(1);function Cv(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 y$(e,t,n){const r=Cv(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:l}=r,s=e.left-a-(1-i)*parseFloat(n),c=e.top-l-(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:c,right:s+d,bottom:c+f,left:s}}const C$={ignoreTransform:!1};function hi(e,t){t===void 0&&(t=C$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Rt(e).getComputedStyle(e);c&&(n=y$(n,c,d))}const{top:r,left:i,width:o,height:a,bottom:l,right:s}=n;return{top:r,left:i,width:o,height:a,bottom:l,right:s}}function xv(e){return hi(e,{ignoreTransform:!0})}function x$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function w$(e,t){return t===void 0&&(t=Rt(e).getComputedStyle(e)),t.position==="fixed"}function I$(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 ys(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(pu(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!fo(i)||fv(i)||n.includes(i))return n;const o=Rt(e).getComputedStyle(i);return i!==e&&I$(i,o)&&n.push(i),w$(i,o)?n:r(i.parentNode)}return e?r(e):n}function wv(e){const[t]=ys(e,1);return t!=null?t:null}function mu(e){return!fs||!e?null:ui(e)?e:hu(e)?pu(e)||e===di(e).scrollingElement?window:fo(e)?e:null:null}function Iv(e){return ui(e)?e.scrollX:e.scrollLeft}function Sv(e){return ui(e)?e.scrollY:e.scrollTop}function vu(e){return{x:Iv(e),y:Sv(e)}}var Ct;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ct||(Ct={}));function Av(e){return!fs||!e?!1:e===document.scrollingElement}function Tv(e){const t={x:0,y:0},n=Av(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,l=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:a,isRight:l,maxScroll:r,minScroll:t}}const S$={x:.2,y:.2};function A$(e,t,n,r,i){let{top:o,left:a,right:l,bottom:s}=n;r===void 0&&(r=10),i===void 0&&(i=S$);const{isTop:c,isBottom:d,isLeft:f,isRight:h}=Tv(e),p={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+g.height?(p.y=Ct.Backward,m.y=r*Math.abs((t.top+g.height-o)/g.height)):!d&&s>=t.bottom-g.height&&(p.y=Ct.Forward,m.y=r*Math.abs((t.bottom-g.height-s)/g.height)),!h&&l>=t.right-g.width?(p.x=Ct.Forward,m.x=r*Math.abs((t.right-g.width-l)/g.width)):!f&&a<=t.left+g.width&&(p.x=Ct.Backward,m.x=r*Math.abs((t.left+g.width-a)/g.width)),{direction:p,speed:m}}function T$(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 Ev(e){return e.reduce((t,n)=>fi(t,vu(n)),cn)}function E$(e){return e.reduce((t,n)=>t+Iv(n),0)}function _$(e){return e.reduce((t,n)=>t+Sv(n),0)}function _v(e,t){if(t===void 0&&(t=hi),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);wv(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const k$=[["x",["left","right"],E$],["y",["top","bottom"],_$]];class bu{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=ys(n),i=Ev(r);this.rect=j({},t),this.width=t.width,this.height=t.height;for(const[o,a,l]of k$)for(const s of a)Object.defineProperty(this,s,{get:()=>{const c=l(r),d=i[o]-c;return this.rect[s]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class vo{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 P$(e){const{EventTarget:t}=Rt(e);return e instanceof t?e:di(e)}function yu(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(mi(n,2)+mi(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 kv(e){e.preventDefault()}function D$(e){e.stopPropagation()}var _e;(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"})(_e||(_e={}));const Pv={start:[_e.Space,_e.Enter],cancel:[_e.Esc],end:[_e.Space,_e.Enter,_e.Tab]},O$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case _e.Right:return X(j({},n),{x:n.x+25});case _e.Left:return X(j({},n),{x:n.x-25});case _e.Down:return X(j({},n),{y:n.y+25});case _e.Up:return X(j({},n),{y:n.y-25})}};class Cu{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 vo(di(n)),this.windowListeners=new vo(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&&_v(r),n(cn)}handleKeyDown(t){if(ms(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=Pv,coordinateGetter:a=O$,scrollBehavior:l="smooth"}=i,{code:s}=t;if(o.end.includes(s)){this.handleEnd(t);return}if(o.cancel.includes(s)){this.handleCancel(t);return}const{collisionRect:c}=r.current,d=c?{x:c.left,y:c.top}:cn;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:n,context:r.current,currentCoordinates:d});if(f){const h=mo(f,d),p={x:0,y:0},{scrollableAncestors:m}=r.current;for(const g of m){const v=t.code,{isTop:S,isRight:w,isLeft:y,isBottom:C,maxScroll:b,minScroll:T}=Tv(g),E=T$(g),P={x:Math.min(v===_e.Right?E.right-E.width/2:E.right,Math.max(v===_e.Right?E.left:E.left+E.width/2,f.x)),y:Math.min(v===_e.Down?E.bottom-E.height/2:E.bottom,Math.max(v===_e.Down?E.top:E.top+E.height/2,f.y))},O=v===_e.Right&&!w||v===_e.Left&&!y,G=v===_e.Down&&!C||v===_e.Up&&!S;if(O&&P.x!==f.x){const z=g.scrollLeft+h.x,A=v===_e.Right&&z<=b.x||v===_e.Left&&z>=T.x;if(A&&!h.y){g.scrollTo({left:z,behavior:l});return}A?p.x=g.scrollLeft-z:p.x=v===_e.Right?g.scrollLeft-b.x:g.scrollLeft-T.x,p.x&&g.scrollBy({left:-p.x,behavior:l});break}else if(G&&P.y!==f.y){const z=g.scrollTop+h.y,A=v===_e.Down&&z<=b.y||v===_e.Up&&z>=T.y;if(A&&!h.x){g.scrollTo({top:z,behavior:l});return}A?p.y=g.scrollTop-z:p.y=v===_e.Down?g.scrollTop-b.y:g.scrollTop-T.y,p.y&&g.scrollBy({top:-p.y,behavior:l});break}}this.handleMove(t,fi(mo(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()}}Cu.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Pv,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const l=o.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Dv(e){return!!(e&&"distance"in e)}function Ov(e){return!!(e&&"delay"in e)}class xu{constructor(t,n,r){var i;r===void 0&&(r=P$(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=di(a),this.documentListeners=new vo(this.document),this.listeners=new vo(r),this.windowListeners=new vo(Rt(a)),this.initialCoordinates=(i=vs(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,kv),this.windowListeners.add(on.VisibilityChange,this.handleCancel),this.windowListeners.add(on.ContextMenu,kv),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(Ov(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Dv(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,D$,{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:l}}=o;if(!i)return;const s=(n=vs(t))!=null?n:cn,c=mo(i,s);if(!r&&l){if(Dv(l)){if(l.tolerance!=null&&yu(c,l.tolerance))return this.handleCancel();if(yu(c,l.distance))return this.handleStart()}if(Ov(l)&&yu(c,l.tolerance))return this.handleCancel();this.handlePending(l,c);return}t.cancelable&&t.preventDefault(),a(s)}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===_e.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const R$={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class wu extends xu{constructor(t){const{event:n}=t,r=di(n.target);super(t,R$,r)}}wu.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 M$={move:{name:"mousemove"},end:{name:"mouseup"}};var Iu;(function(e){e[e.RightClick=2]="RightClick"})(Iu||(Iu={}));class L$ extends xu{constructor(t){super(t,M$,di(t.event.target))}}L$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Iu.RightClick?!1:(r==null||r({event:n}),!0)}}];const Su={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class B$ extends xu{constructor(t){super(t,Su)}static setup(){return window.addEventListener(Su.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Su.move.name,t)};function t(){}}}B$.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 bo;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(bo||(bo={}));var Cs;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Cs||(Cs={}));function $$(e){let{acceleration:t,activator:n=bo.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:l=Cs.TreeOrder,pointerCoordinates:s,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=F$({delta:f,disabled:!o}),[m,g]=qB(),v=x.useRef({x:0,y:0}),S=x.useRef({x:0,y:0}),w=x.useMemo(()=>{switch(n){case bo.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case bo.DraggableRect:return i}},[n,i,s]),y=x.useRef(null),C=x.useCallback(()=>{const T=y.current;if(!T)return;const E=v.current.x*S.current.x,P=v.current.y*S.current.y;T.scrollBy(E,P)},[]),b=x.useMemo(()=>l===Cs.TreeOrder?[...c].reverse():c,[l,c]);x.useEffect(()=>{if(!o||!c.length||!w){g();return}for(const T of b){if((r==null?void 0:r(T))===!1)continue;const E=c.indexOf(T),P=d[E];if(!P)continue;const{direction:O,speed:G}=A$(T,P,w,t,h);for(const z of["x","y"])p[z][O[z]]||(G[z]=0,O[z]=0);if(G.x>0||G.y>0){g(),y.current=T,m(C,a),v.current=G,S.current=O;return}}v.current={x:0,y:0},S.current={x:0,y:0},g()},[t,C,r,g,o,a,JSON.stringify(w),JSON.stringify(p),m,c,b,d,JSON.stringify(h)])}const N$={x:{[Ct.Backward]:!1,[Ct.Forward]:!1},y:{[Ct.Backward]:!1,[Ct.Forward]:!1}};function F$(e){let{delta:t,disabled:n}=e;const r=gs(t);return po(i=>{if(n||!r||!i)return N$;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Ct.Backward]:i.x[Ct.Backward]||o.x===-1,[Ct.Forward]:i.x[Ct.Forward]||o.x===1},y:{[Ct.Backward]:i.y[Ct.Backward]||o.y===-1,[Ct.Forward]:i.y[Ct.Forward]||o.y===1}}},[n,t,r])}function z$(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return po(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 yo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(yo||(yo={}));var Au;(function(e){e.Optimized="optimized"})(Au||(Au={}));const Rv=new Map;function V$(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=x.useState(null),{frequency:l,measure:s,strategy:c}=i,d=x.useRef(e),f=v(),h=ho(f),p=x.useCallback(function(S){S===void 0&&(S=[]),!h.current&&a(w=>w===null?S:w.concat(S.filter(y=>!w.includes(y))))},[h]),m=x.useRef(null),g=po(S=>{if(f&&!n)return Rv;if(!S||S===Rv||d.current!==e||o!=null){const w=new Map;for(let y of e){if(!y)continue;if(o&&o.length>0&&!o.includes(y.id)&&y.rect.current){w.set(y.id,y.rect.current);continue}const C=y.node.current,b=C?new bu(s(C),C):null;y.rect.current=b,b&&w.set(y.id,b)}return w}return S},[e,o,n,f,s]);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 l!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},l))},[l,f,p,...r]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:o!=null};function v(){switch(c){case yo.Always:return!1;case yo.BeforeDragging:return n;default:return!n}}}function Tu(e,t){return po(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function U$(e,t){return Tu(e,t)}function H$(e){let{callback:t,disabled:n}=e;const r=hs(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 xs(e){let{callback:t,disabled:n}=e;const r=hs(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 W$(e){return new bu(hi(e),e)}function Mv(e,t,n){t===void 0&&(t=W$);const[r,i]=x.useState(null);function o(){i(s=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=s!=null?s:n)!=null?c:null}const d=t(e);return JSON.stringify(s)===JSON.stringify(d)?s:d})}const a=H$({callback(s){if(e)for(const c of s){const{type:d,target:f}=c;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),l=xs({callback:o});return ln(()=>{o(),e?(l==null||l.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),a==null||a.disconnect())},[e]),r}function G$(e){const t=Tu(e);return yv(e,t)}const Lv=[];function Y$(e){const t=x.useRef(e),n=po(r=>e?r&&r!==Lv&&e&&t.current&&e.parentNode===t.current.parentNode?r:ys(e):Lv,[e]);return x.useEffect(()=>{t.current=e},[e]),n}function K$(e){const[t,n]=x.useState(null),r=x.useRef(e),i=x.useCallback(o=>{const a=mu(o.target);a&&n(l=>l?(l.set(a,vu(a)),new Map(l)):null)},[]);return x.useEffect(()=>{const o=r.current;if(e!==o){a(o);const l=e.map(s=>{const c=mu(s);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,vu(c)]):null}).filter(s=>s!=null);n(l.length?new Map(l):null),r.current=e}return()=>{a(e),a(o)};function a(l){l.forEach(s=>{const c=mu(s);c==null||c.removeEventListener("scroll",i)})}},[i,e]),x.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>fi(o,a),cn):Ev(e):cn,[e,t])}function Bv(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?mo(e,n.current):cn}function q$(e){x.useEffect(()=>{if(!fs)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 Q$(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 $v(e){return x.useMemo(()=>e?x$(e):null,[e])}const Nv=[];function J$(e,t){t===void 0&&(t=hi);const[n]=e,r=$v(n?Rt(n):null),[i,o]=x.useState(Nv);function a(){o(()=>e.length?e.map(s=>Av(s)?r:new bu(t(s),s)):Nv)}const l=xs({callback:a});return ln(()=>{l==null||l.disconnect(),a(),e.forEach(s=>l==null?void 0:l.observe(s))},[e]),i}function Fv(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return fo(t)?t:e}function X$(e){let{measure:t}=e;const[n,r]=x.useState(null),i=x.useCallback(c=>{for(const{target:d}of c)if(fo(d)){r(f=>{const h=t(d);return f?X(j({},f),{width:h.width,height:h.height}):h});break}},[t]),o=xs({callback:i}),a=x.useCallback(c=>{const d=Fv(c);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[l,s]=ps(a);return x.useMemo(()=>({nodeRef:l,rect:n,setRef:s}),[n,l,s])}const Z$=[{sensor:wu,options:{}},{sensor:Cu,options:{}}],eN={current:{}},ws={draggable:{measure:xv},droppable:{measure:xv,strategy:yo.WhileDragging,frequency:Au.Optimized},dragOverlay:{measure:hi}};class Co 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 tN={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Co,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:bs},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ws,measureDroppableContainers:bs,windowRect:null,measuringScheduled:!1},zv={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:bs,draggableNodes:new Map,over:null,measureDroppableContainers:bs},xo=x.createContext(zv),jv=x.createContext(tN);function nN(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Co}}}function rN(e,t){switch(t.type){case mt.DragStart:return X(j({},e),{draggable:X(j({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case mt.DragMove:return e.draggable.active==null?e:X(j({},e),{draggable:X(j({},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 X(j({},e),{draggable:X(j({},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 Co(e.droppable.containers);return i.set(r,n),X(j({},e),{droppable:X(j({},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 Co(e.droppable.containers);return a.set(n,X(j({},o),{disabled:i})),X(j({},e),{droppable:X(j({},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 Co(e.droppable.containers);return o.delete(n),X(j({},e),{droppable:X(j({},e.droppable),{containers:o})})}default:return e}}function iN(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=x.useContext(xo),o=gs(r),a=gs(n==null?void 0:n.id);return x.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!ms(o)||document.activeElement===o.target)return;const l=i.get(a);if(!l)return;const{activatorNode:s,node:c}=l;if(!s.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[s.current,c.current]){if(!d)continue;const f=XB(d);if(f){f.focus();break}}})}},[r,t,i,a,o]),null}function Vv(e,t){let i=t,{transform:n}=i,r=We(i,["transform"]);return e!=null&&e.length?e.reduce((o,a)=>a(j({transform:o},r)),n):n}function oN(e){return x.useMemo(()=>({draggable:j(j({},ws.draggable),e==null?void 0:e.draggable),droppable:j(j({},ws.droppable),e==null?void 0:e.droppable),dragOverlay:j(j({},ws.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 aN(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=x.useRef(!1),{x:a,y:l}=typeof i=="boolean"?{x:i,y:i}:i;ln(()=>{if(!a&&!l||!t){o.current=!1;return}if(o.current||!r)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const d=n(c),f=yv(d,r);if(a||(f.x=0),l||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=wv(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,l,r,n])}const Is=x.createContext(X(j({},cn),{scaleX:1,scaleY:1}));var ir;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ir||(ir={}));const sN=x.memo(function(t){var n,r,i,o;let _s=t,{id:a,accessibility:l,autoScroll:s=!0,children:c,sensors:d=Z$,collisionDetection:f=g$,measuring:h,modifiers:p}=_s,m=We(_s,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const g=x.useReducer(rN,void 0,nN),[v,S]=g,[w,y]=i$(),[C,b]=x.useState(ir.Uninitialized),T=C===ir.Initialized,{draggable:{active:E,nodes:P,translate:O},droppable:{containers:G}}=v,z=E!=null?P.get(E):null,A=x.useRef({initial:null,translated:null}),W=x.useMemo(()=>{var xt;return E!=null?{id:E,data:(xt=z==null?void 0:z.data)!=null?xt:eN,rect:A}:null},[E,z]),Y=x.useRef(null),[N,$]=x.useState(null),[B,H]=x.useState(null),q=ho(m,Object.values(m)),ee=go("DndDescribedBy",a),R=x.useMemo(()=>G.getEnabled(),[G]),L=oN(h),{droppableRects:F,measureDroppableContainers:U,measuringScheduled:te}=V$(R,{dragging:T,dependencies:[O.x,O.y],config:L.droppable}),se=z$(P,E),ae=x.useMemo(()=>B?vs(B):null,[B]),J=un(),le=U$(se,L.draggable.measure);aN({activeNode:E!=null?P.get(E):null,config:J.layoutShiftCompensation,initialRect:le,measure:L.draggable.measure});const ne=Mv(se,L.draggable.measure,le),ge=Mv(se?se.parentElement:null),Se=x.useRef({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:F,draggableNodes:P,draggingNode:null,draggingNodeRect:null,droppableContainers:G,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ue=G.getNodeFor((n=Se.current.over)==null?void 0:n.id),wt=X$({measure:L.dragOverlay.measure}),at=(r=wt.nodeRef.current)!=null?r:se,kt=T?(i=wt.rect)!=null?i:ne:null,de=!!(wt.nodeRef.current&&wt.rect),he=G$(de?null:ne),Ce=$v(at?Rt(at):null),Te=Y$(T?Ue!=null?Ue:se:null),He=J$(Te),Pe=Vv(p,{transform:{x:O.x-he.x,y:O.y-he.y,scaleX:1,scaleY:1},activatorEvent:B,active:W,activeNodeRect:ne,containerNodeRect:ge,draggingNodeRect:kt,over:Se.current.over,overlayNodeRect:wt.rect,scrollableAncestors:Te,scrollableAncestorRects:He,windowRect:Ce}),Ee=ae?fi(ae,O):null,It=K$(Te),St=Bv(It),jt=Bv(It,[ne]),Mt=fi(Pe,St),qt=kt?b$(kt,Pe):null,or=W&&qt?f({active:W,collisionRect:qt,droppableRects:F,droppableContainers:R,pointerCoordinates:Ee}):null,Ts=bv(or,"id"),[wn,wo]=x.useState(null),_u=de?Pe:fi(Pe,jt),ku=m$(_u,(o=wn==null?void 0:wn.rect)!=null?o:null,ne),ze=x.useRef(null),pi=x.useCallback((xt,_)=>{let{sensor:M,options:K}=_;if(Y.current==null)return;const Q=P.get(Y.current);if(!Q)return;const re=xt.nativeEvent,ce=new M({active:Y.current,activeNode:Q,event:re,options:K,context:Se,onAbort(ue){if(!P.get(ue))return;const{onDragAbort:fe}=q.current,me={id:ue};fe==null||fe(me),w({type:"onDragAbort",event:me})},onPending(ue,we,fe,me){if(!P.get(ue))return;const{onDragPending:Pt}=q.current,nt={id:ue,constraint:we,initialCoordinates:fe,offset:me};Pt==null||Pt(nt),w({type:"onDragPending",event:nt})},onStart(ue){const we=Y.current;if(we==null)return;const fe=P.get(we);if(!fe)return;const{onDragStart:me}=q.current,De={activatorEvent:re,active:{id:we,data:fe.data,rect:A}};Oe.unstable_batchedUpdates(()=>{me==null||me(De),b(ir.Initializing),S({type:mt.DragStart,initialCoordinates:ue,active:we}),w({type:"onDragStart",event:De}),$(ze.current),H(re)})},onMove(ue){S({type:mt.DragMove,coordinates:ue})},onEnd:xe(mt.DragEnd),onCancel:xe(mt.DragCancel)});ze.current=ce;function xe(ue){return function(){return k(this,null,function*(){const{active:fe,collisions:me,over:De,scrollAdjustedTranslate:Pt}=Se.current;let nt=null;if(fe&&Pt){const{cancelDrop:dn}=q.current;nt={activatorEvent:re,active:fe,collisions:me,delta:Pt,over:De},ue===mt.DragEnd&&typeof dn=="function"&&(yield Promise.resolve(dn(nt)))&&(ue=mt.DragCancel)}Y.current=null,Oe.unstable_batchedUpdates(()=>{S({type:ue}),b(ir.Uninitialized),wo(null),$(null),H(null),ze.current=null;const dn=ue===mt.DragEnd?"onDragEnd":"onDragCancel";if(nt){const In=q.current[dn];In==null||In(nt),w({type:dn,event:nt})}})})}}},[P]),Io=x.useCallback((xt,_)=>(M,K)=>{const Q=M.nativeEvent,re=P.get(K);if(Y.current!==null||!re||Q.dndKit||Q.defaultPrevented)return;const ce={active:re};xt(M,_.options,ce)===!0&&(Q.dndKit={capturedBy:_.sensor},Y.current=K,pi(M,_))},[P,pi]),Es=j$(d,Io);q$(d),ln(()=>{ne&&C===ir.Initializing&&b(ir.Initialized)},[ne,C]),x.useEffect(()=>{const{onDragMove:xt}=q.current,{active:_,activatorEvent:M,collisions:K,over:Q}=Se.current;if(!_||!M)return;const re={active:_,activatorEvent:M,collisions:K,delta:{x:Mt.x,y:Mt.y},over:Q};Oe.unstable_batchedUpdates(()=>{xt==null||xt(re),w({type:"onDragMove",event:re})})},[Mt.x,Mt.y]),x.useEffect(()=>{const{active:xt,activatorEvent:_,collisions:M,droppableContainers:K,scrollAdjustedTranslate:Q}=Se.current;if(!xt||Y.current==null||!_||!Q)return;const{onDragOver:re}=q.current,ce=K.get(Ts),xe=ce&&ce.rect.current?{id:ce.id,rect:ce.rect.current,data:ce.data,disabled:ce.disabled}:null,ue={active:xt,activatorEvent:_,collisions:M,delta:{x:Q.x,y:Q.y},over:xe};Oe.unstable_batchedUpdates(()=>{wo(xe),re==null||re(ue),w({type:"onDragOver",event:ue})})},[Ts]),ln(()=>{Se.current={activatorEvent:B,active:W,activeNode:se,collisionRect:qt,collisions:or,droppableRects:F,draggableNodes:P,draggingNode:at,draggingNodeRect:kt,droppableContainers:G,over:wn,scrollableAncestors:Te,scrollAdjustedTranslate:Mt},A.current={initial:kt,translated:qt}},[W,se,or,qt,P,at,kt,F,G,wn,Te,Mt]),$$(X(j({},J),{delta:O,draggingRect:qt,pointerCoordinates:Ee,scrollableAncestors:Te,scrollableAncestorRects:He}));const gi=x.useMemo(()=>({active:W,activeNode:se,activeNodeRect:ne,activatorEvent:B,collisions:or,containerNodeRect:ge,dragOverlay:wt,draggableNodes:P,droppableContainers:G,droppableRects:F,over:wn,measureDroppableContainers:U,scrollableAncestors:Te,scrollableAncestorRects:He,measuringConfiguration:L,measuringScheduled:te,windowRect:Ce}),[W,se,ne,B,or,ge,wt,P,G,F,wn,U,Te,He,L,te,Ce]),So=x.useMemo(()=>({activatorEvent:B,activators:Es,active:W,activeNodeRect:ne,ariaDescribedById:{draggable:ee},dispatch:S,draggableNodes:P,over:wn,measureDroppableContainers:U}),[B,Es,W,ne,S,ee,P,wn,U]);return x.createElement(gv.Provider,{value:y},x.createElement(xo.Provider,{value:So},x.createElement(jv.Provider,{value:gi},x.createElement(Is.Provider,{value:ku},c)),x.createElement(iN,{disabled:(l==null?void 0:l.restoreFocus)===!1})),x.createElement(s$,X(j({},l),{hiddenTextDescribedById:ee})));function un(){const xt=(N==null?void 0:N.autoScrollEnabled)===!1,_=typeof s=="object"?s.enabled===!1:s===!1,M=T&&!xt&&!_;return typeof s=="object"?X(j({},s),{enabled:M}):{enabled:M}}}),lN=x.createContext(null),Uv="button",cN="Draggable";function uN(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=go(cN),{activators:a,activatorEvent:l,active:s,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:h}=x.useContext(xo),{role:p=Uv,roleDescription:m="draggable",tabIndex:g=0}=i!=null?i:{},v=(s==null?void 0:s.id)===t,S=x.useContext(v?Is:lN),[w,y]=ps(),[C,b]=ps(),T=Q$(a,t),E=ho(n);ln(()=>(f.set(t,{id:t,key:o,node:w,activatorNode:C,data:E}),()=>{const O=f.get(t);O&&O.key===o&&f.delete(t)}),[f,t]);const P=x.useMemo(()=>({role:p,tabIndex:g,"aria-disabled":r,"aria-pressed":v&&p===Uv?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[r,p,g,v,m,d.draggable]);return{active:s,activatorEvent:l,activeNodeRect:c,attributes:P,isDragging:v,listeners:r?void 0:T,node:w,over:h,setNodeRef:y,setActivatorNodeRef:b,transform:S}}function Hv(){return x.useContext(jv)}const dN="Droppable",fN={timeout:25};function hN(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=go(dN),{active:a,dispatch:l,over:s,measureDroppableContainers:c}=x.useContext(xo),d=x.useRef({disabled:n}),f=x.useRef(!1),h=x.useRef(null),p=x.useRef(null),{disabled:m,updateMeasurementsFor:g,timeout:v}=j(j({},fN),i),S=ho(g!=null?g:r),w=x.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(S.current)?S.current:[S.current]),p.current=null},v)},[v]),y=xs({callback:w,disabled:m||!a}),C=x.useCallback((P,O)=>{y&&(O&&(y.unobserve(O),f.current=!1),P&&y.observe(P))},[y]),[b,T]=ps(C),E=ho(t);return x.useEffect(()=>{!y||!b.current||(y.disconnect(),f.current=!1,y.observe(b.current))},[b,y]),x.useEffect(()=>(l({type:mt.RegisterDroppable,element:{id:r,key:o,disabled:n,node:b,rect:h,data:E}}),()=>l({type:mt.UnregisterDroppable,key:o,id:r})),[r]),x.useEffect(()=>{n!==d.current.disabled&&(l({type:mt.SetDroppableDisabled,id:r,key:o,disabled:n}),d.current.disabled=n)},[r,o,n,l]),{active:a,rect:h,isOver:(s==null?void 0:s.id)===r,node:b,over:s,setNodeRef:T}}function pN(e){let{animation:t,children:n}=e;const[r,i]=x.useState(null),[o,a]=x.useState(null),l=gs(n);return!n&&!r&&l&&i(l),ln(()=>{if(!o)return;const s=r==null?void 0:r.key,c=r==null?void 0:r.props.id;if(s==null||c==null){i(null);return}Promise.resolve(t(c,o)).then(()=>{i(null)})},[t,r,o]),x.createElement(x.Fragment,null,n,r?x.cloneElement(r,{ref:a}):null)}const gN={x:0,y:0,scaleX:1,scaleY:1};function mN(e){let{children:t}=e;return x.createElement(xo.Provider,{value:zv},x.createElement(Is.Provider,{value:gN},t))}const vN={position:"fixed",touchAction:"none"},bN=e=>ms(e)?"transform 250ms ease":void 0,yN=x.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:l,style:s,transform:c,transition:d=bN}=e;if(!l)return null;const f=i?c:X(j({},c),{scaleX:1,scaleY:1}),h=j(X(j({},vN),{width:l.width,height:l.height,top:l.top,left:l.left,transform:rr.Transform.toString(f),transformOrigin:i&&r?u$(r,l):void 0,transition:typeof d=="function"?d(r):d}),s);return x.createElement(n,{className:a,style:h,ref:t},o)}),Wv=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[l,s]of Object.entries(o.active))s!==void 0&&(i[l]=n.node.style.getPropertyValue(l),n.node.style.setProperty(l,s));if(o!=null&&o.dragOverlay)for(const[l,s]of Object.entries(o.dragOverlay))s!==void 0&&r.node.style.setProperty(l,s);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[s,c]of Object.entries(i))n.node.style.setProperty(s,c);a!=null&&a.active&&n.node.classList.remove(a.active)}},CN={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:rr.Transform.toString(t)},{transform:rr.Transform.toString(n)}]},sideEffects:Wv({styles:{active:{opacity:"0"}}})};function xN(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return hs((o,a)=>{if(t===null)return;const l=n.get(o);if(!l)return;const s=l.node.current;if(!s)return;const c=Fv(a);if(!c)return;const{transform:d}=Rt(a).getComputedStyle(a),f=Cv(d);if(!f)return;const h=typeof t=="function"?t:wN(t);return _v(s,i.draggable.measure),h({active:{id:o,data:l.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:f})})}function wN(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}=j(j({},CN),e);return o=>{let w=o,{active:a,dragOverlay:l,transform:s}=w,c=We(w,["active","dragOverlay","transform"]);if(!t)return;const d={x:l.rect.left-a.rect.left,y:l.rect.top-a.rect.top},f={scaleX:s.scaleX!==1?a.rect.width*s.scaleX/l.rect.width:1,scaleY:s.scaleY!==1?a.rect.height*s.scaleY/l.rect.height:1},h=j({x:s.x-d.x,y:s.y-d.y},f),p=i(X(j({},c),{active:a,dragOverlay:l,transform:{initial:s,final:h}})),[m]=p,g=p[p.length-1];if(JSON.stringify(m)===JSON.stringify(g))return;const v=r==null?void 0:r(j({active:a,dragOverlay:l},c)),S=l.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise(y=>{S.onfinish=()=>{v==null||v(),y()}})}}let Gv=0;function IN(e){return x.useMemo(()=>{if(e!=null)return Gv++,Gv},[e])}const SN=x.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:l="div",className:s,zIndex:c=999}=e;const{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggableNodes:m,droppableContainers:g,dragOverlay:v,over:S,measuringConfiguration:w,scrollableAncestors:y,scrollableAncestorRects:C,windowRect:b}=Hv(),T=x.useContext(Is),E=IN(f==null?void 0:f.id),P=Vv(a,{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggingNodeRect:v.rect,over:S,overlayNodeRect:v.rect,scrollableAncestors:y,scrollableAncestorRects:C,transform:T,windowRect:b}),O=Tu(h),G=xN({config:r,draggableNodes:m,droppableContainers:g,measuringConfiguration:w}),z=O?v.setRef:void 0;return x.createElement(mN,null,x.createElement(pN,{animation:G},f&&E?x.createElement(yN,{key:E,id:f.id,ref:z,as:l,activatorEvent:d,adjustScale:t,className:s,transition:o,rect:O,style:j({zIndex:c},i),transform:P},n):null))});function Eu(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function AN(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Ss(e){return e!==null&&e>=0}function TN(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 EN(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Yv=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=Eu(t,r,n),a=t[i],l=o[i];return!l||!a?null:{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}},Kv="Sortable",qv=x.createContext({activeIndex:-1,containerId:Kv,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Yv,disabled:{draggable:!1,droppable:!1}});function _N(e){let{children:t,id:n,items:r,strategy:i=Yv,disabled:o=!1}=e;const{active:a,dragOverlay:l,droppableRects:s,over:c,measureDroppableContainers:d}=Hv(),f=go(Kv,n),h=l.rect!==null,p=x.useMemo(()=>r.map(T=>typeof T=="object"&&"id"in T?T.id:T),[r]),m=a!=null,g=a?p.indexOf(a.id):-1,v=c?p.indexOf(c.id):-1,S=x.useRef(p),w=!TN(p,S.current),y=v!==-1&&g===-1||w,C=EN(o);ln(()=>{w&&m&&d(p)},[w,p,m,d]),x.useEffect(()=>{S.current=p},[p]);const b=x.useMemo(()=>({activeIndex:g,containerId:f,disabled:C,disableTransforms:y,items:p,overIndex:v,useDragOverlay:h,sortedRects:AN(p,s),strategy:i}),[g,f,C.draggable,C.droppable,y,p,v,s,h,i]);return x.createElement(qv.Provider,{value:b},t)}const kN=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Eu(n,r,i).indexOf(t)},PN=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:l,previousContainerId:s,transition:c}=e;return!c||!r||l!==o&&i===a?!1:n?!0:a!==i&&t===s},DN={duration:200,easing:"ease"},Qv="transform",ON=rr.Transition.toString({property:Qv,duration:0,easing:"linear"}),RN={roleDescription:"sortable"};function MN(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,a]=x.useState(null),l=x.useRef(n);return ln(()=>{if(!t&&n!==l.current&&r.current){const s=i.current;if(s){const c=hi(r.current,{ignoreTransform:!0}),d={x:s.left-c.left,y:s.top-c.top,scaleX:s.width/c.width,scaleY:s.height/c.height};(d.x||d.y)&&a(d)}}n!==l.current&&(l.current=n)},[t,n,r,i]),x.useEffect(()=>{o&&a(null)},[o]),o}function LN(e){let{animateLayoutChanges:t=PN,attributes:n,disabled:r,data:i,getNewIndex:o=kN,id:a,strategy:l,resizeObserverConfig:s,transition:c=DN}=e;const{items:d,containerId:f,activeIndex:h,disabled:p,disableTransforms:m,sortedRects:g,overIndex:v,useDragOverlay:S,strategy:w}=x.useContext(qv),y=BN(r,p),C=d.indexOf(a),b=x.useMemo(()=>j({sortable:{containerId:f,index:C,items:d}},i),[f,i,C,d]),T=x.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:E,node:P,isOver:O,setNodeRef:G}=hN({id:a,data:b,disabled:y.droppable,resizeObserverConfig:j({updateMeasurementsFor:T},s)}),{active:z,activatorEvent:A,activeNodeRect:W,attributes:Y,setNodeRef:N,listeners:$,isDragging:B,over:H,setActivatorNodeRef:q,transform:ee}=uN({id:a,data:b,attributes:j(j({},RN),n),disabled:y.draggable}),R=KB(G,N),L=!!z,F=L&&!m&&Ss(h)&&Ss(v),U=!S&&B,te=U&&F?ee:null,se=l!=null?l:w,ae=F?te!=null?te:se({rects:g,activeNodeRect:W,activeIndex:h,overIndex:v,index:C}):null,J=Ss(h)&&Ss(v)?o({id:a,items:d,activeIndex:h,overIndex:v}):C,le=z==null?void 0:z.id,ne=x.useRef({activeId:le,items:d,newIndex:J,containerId:f}),ge=d!==ne.current.items,Se=t({active:z,containerId:f,isDragging:B,isSorting:L,id:a,index:C,items:d,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:c,wasDragging:ne.current.activeId!=null}),Ue=MN({disabled:!Se,index:C,node:P,rect:E});return x.useEffect(()=>{L&&ne.current.newIndex!==J&&(ne.current.newIndex=J),f!==ne.current.containerId&&(ne.current.containerId=f),d!==ne.current.items&&(ne.current.items=d)},[L,J,f,d]),x.useEffect(()=>{if(le===ne.current.activeId)return;if(le!=null&&ne.current.activeId==null){ne.current.activeId=le;return}const at=setTimeout(()=>{ne.current.activeId=le},50);return()=>clearTimeout(at)},[le]),{active:z,activeIndex:h,attributes:Y,data:b,rect:E,index:C,newIndex:J,items:d,isOver:O,isSorting:L,isDragging:B,listeners:$,node:P,overIndex:v,over:H,setNodeRef:R,setActivatorNodeRef:q,setDroppableNodeRef:G,setDraggableNodeRef:N,transform:Ue!=null?Ue:ae,transition:wt()};function wt(){if(Ue||ge&&ne.current.newIndex===C)return ON;if(!(U&&!ms(A)||!c)&&(L||Se))return rr.Transition.toString(X(j({},c),{property:Qv}))}}function BN(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 As(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 $N=[_e.Down,_e.Right,_e.Up,_e.Left],NN=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:l}}=t;if($N.includes(e.code)){if(e.preventDefault(),!n||!r)return;const s=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=i.get(f.id);if(h)switch(e.code){case _e.Down:r.top<h.top&&s.push(f);break;case _e.Up:r.top>h.top&&s.push(f);break;case _e.Left:r.left>h.left&&s.push(f);break;case _e.Right:r.left<h.left&&s.push(f);break}});const c=h$({active:n,collisionRect:r,droppableRects:i,droppableContainers:s,pointerCoordinates:null});let d=bv(c,"id");if(d===(a==null?void 0:a.id)&&c.length>1&&(d=c[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 v=ys(m).some((T,E)=>l[E]!==T),S=Jv(f,h),w=FN(f,h),y=v||!S?{x:0,y:0}:{x:w?r.width-p.width:0,y:w?r.height-p.height:0},C={x:p.left,y:p.top};return y.x&&y.y?C:mo(C,y)}}}};function Jv(e,t){return!As(e)||!As(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function FN(e,t){return!As(e)||!As(t)||!Jv(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const zN=Ve(u.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"),Xv=x.createContext({attributes:{},listeners:void 0,ref(){}}),jN=()=>{const{attributes:e,listeners:t,ref:n}=x.useContext(Xv);return u.jsx(I.Button,X(j(j({sx:{backgroundColor:"transparent",color:"#919eab",width:"10px",":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}},e),t),{ref:n,children:u.jsx(zN,{})}))},Zv=({children:e,id:t,tooltipTitle:n,removeItem:r,useDraggable:i=!0,variant:o="plain"})=>{const{attributes:a,isDragging:l,listeners:s,setNodeRef:c,setActivatorNodeRef:d,transform:f,transition:h}=LN({id:t}),p=x.useMemo(()=>({attributes:a,listeners:s,ref:d}),[a,s,d]),m={opacity:l?.6:void 0,transform:rr.Translate.toString(f),transition:h};return u.jsx(Xv.Provider,{value:p,children:u.jsx(I.ListItem,{variant:o,ref:c,style:m,startAction:i?u.jsx(jN,{}):u.jsx(u.Fragment,{}),endAction:i?u.jsx(I.Tooltip,{title:n,children:u.jsx(I.Button,{variant:"outlined",color:"danger",onClick:r,sx:{ml:"auto",p:.5},size:"sm",children:u.jsx(Le.Remove,{})})}):u.jsx(u.Fragment,{}),sx:{p:2,borderRadius:"sm"},children:e})})},VN={sideEffects:Wv({styles:{active:{opacity:"0.6"}}})},UN=({children:e})=>u.jsx(SN,{dropAnimation:VN,children:e}),HN=({entities:e=[],labels:t,setEntities:n,removeItem:r})=>{const[i,o]=x.useState(null),a=x.useMemo(()=>e.find(s=>s.id===(i==null?void 0:i.id)),[i,e]),l=l$(mv(wu),mv(Cu,{coordinateGetter:NN}));return u.jsxs(sN,{sensors:l,onDragStart:({active:s})=>{o(s)},onDragEnd:({active:s,over:c})=>{if(c&&s.id!==(c==null?void 0:c.id)){const d=e.findIndex(({id:h})=>h===s.id),f=e.findIndex(({id:h})=>h===c.id);n(Eu(e,d,f))}o(null)},onDragCancel:()=>{o(null)},children:[u.jsx(_N,{items:e,children:u.jsx(I.List,{sx:{gap:"10px"},children:e.map(s=>u.jsxs(Zv,{id:s.id,variant:"outlined",removeItem:()=>r(s.id),tooltipTitle:t.removeEntity,children:[u.jsx(I.Typography,{ml:2,children:s.title||s.name}),s.type&&u.jsx(I.Chip,{color:eB(s.type),sx:{marginLeft:2},children:tB(s.type)})]},`sortable-item-${s.id}`))})}),u.jsx(UN,{children:a?u.jsx(u.Fragment,{children:e.map(s=>u.jsx(Zv,{id:s.id,useDraggable:!1,removeItem:()=>{},tooltipTitle:t.removeEntity},`sortable-overlay-item-${s.id}`))}):u.jsx(u.Fragment,{})})]})},WN=e=>u.jsxs(I.FormControl,{size:"sm",children:[u.jsx(I.FormLabel,{children:e.labels.itemsPerPage}),u.jsx(I.Select,{value:e.value,size:"sm",onChange:e.onChange,sx:{minHeight:"37px"},children:e.options.map((t,n)=>u.jsx(I.Option,{value:t,children:t},`items-per-page-${t}-${n}`))})]}),GN=(e,t)=>{const[n,r]=x.useState(null),{sdk:i}=pt(),o=()=>k(this,null,function*(){let l=[];if(!e){r(l);return}try{switch(e){case"top_x":l=(yield i.topX.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"match_quiz":l=(yield i.matchQuiz.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"template":l=(yield i.loyalty.getTemplates(void 0,!0)).data.map(v=>({id:v.id,name:v.name,status:v.status,type:e,relationship:"relatedTo"}));break;case"classic_quiz":l=(yield i.miniGames.getClassicQuizzes({limit:50},!1,!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"either_or":l=(yield i.miniGames.getEitherOrs({limit:50},!1,!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"poll":l=(yield i.voting.getPolls({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"bracket":l=(yield i.bracketGame.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"standing":l=(yield i.standingGame.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break}}catch(s){console.error(s),r(l),t();return}r(l)});return x.useEffect(()=>(o(),()=>r(null)),[e]),n},YN=({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 u.jsx(I.Chip,{color:t,variant:"solid",size:"sm",children:e})},KN=Ve(u.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"),qN=Ve(u.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"),QN=Ve(u.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"),JN=Ve(u.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),XN=Ve(u.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"),ZN=e=>{switch(e.entityType){case"top_x":return u.jsx(I.Tooltip,{title:"Top X",children:u.jsx(KN,{})});case"match_quiz":return u.jsx(I.Tooltip,{title:"Match Quiz",children:u.jsx(qN,{})});case"template":return u.jsx(I.Tooltip,{title:"Leaderboard Templates",children:u.jsx(Le.EmojiEvents,{})});case"classic_quiz":return u.jsx(I.Tooltip,{title:"Classic Quiz",children:u.jsx(QN,{})});case"either_or":return u.jsx(I.Tooltip,{title:"Either/Or",children:u.jsx(JN,{})});case"poll":return u.jsx(I.Tooltip,{title:"Poll",children:u.jsx(XN,{})});case"bracket":return u.jsx(I.Tooltip,{title:"Custom Bracket Game",children:u.jsx(Le.EmojiEvents,{})});case"standing":return u.jsx(I.Tooltip,{title:"Custom Standings Game",children:u.jsx(Le.EmojiEvents,{})});default:return null}},eF=({entity:e,deleteLabel:t,onDelete:n})=>u.jsx(u.Fragment,{children:u.jsx(I.Card,{sx:{p:2,mb:2},children:u.jsx(I.CardContent,{children:u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"space-between"},children:[u.jsx(I.Typography,{fontSize:"sm",startDecorator:u.jsx(ZN,{entityType:e.type}),children:e.name}),u.jsx(I.Box,{display:{xs:"none",md:"block"},children:u.jsx(YN,{status:e.status})}),u.jsx(I.Box,{children:u.jsx(I.Tooltip,{title:t,children:u.jsx(I.IconButton,{onClick:()=>n(e.id,e.relationship),color:"danger",size:"sm",children:u.jsx(Le.Delete,{})})})})]})})})}),tF=(e,t,n,r)=>k(this,null,function*(){let o=[];const a=new Map;t.forEach(l=>{if(a.has(l.entity_type)){const s=a.get(l.entity_type);a.set(l.entity_type,[...s,[l.entity_id,l.entity_relationship]])}else a.set(l.entity_type,[[l.entity_id,l.entity_relationship]])});try{for(const[l,s]of a)switch(l){case"top_x":const c=s.map(([O])=>O),d=yield e.topX.getGames({limit:c.length,gameIds:c},!0);o=[...o,...d.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"match_quiz":const f=s.map(([O])=>O),h=yield e.matchQuiz.getGames({limit:f.length,gameIds:f},!0);o=[...o,...h.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"template":const p=s.map(([O])=>O),m=yield e.loyalty.getTemplates(void 0,!0);o=[...o,...m.data.filter(O=>p.includes(O.id)).map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"classic_quiz":const g=s.map(([O])=>O),v=yield e.miniGames.getClassicQuizzes({limit:g.length,classicQuizIds:g},!1,!0);o=[...o,...v.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"either_or":const S=s.map(([O])=>O),w=yield e.miniGames.getEitherOrs({limit:S.length,eitherOrIds:S},!1,!0);o=[...o,...w.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"poll":const y=s.map(([O])=>O),C=yield e.voting.getPolls({limit:y.length,pollIds:y},!0);o=[...o,...C.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"bracket":const b=s.map(([O])=>O),T=yield e.bracketGame.getGames({limit:b.length,gameIds:b},!0);o=[...o,...T.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"standing":const E=s.map(([O])=>O),P=yield e.standingGame.getGames({limit:E.length,gameIds:E},!0);o=[...o,...P.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;default:}}catch(l){console.error("Error loading related entities",l),n(o),r()}n(o)}),nF=["top_x","match_quiz","template","classic_quiz","poll","either_or","bracket","standing"],rF=["relatedTo","blocks","blockedBy","bonusPointsGame","nextInSeries","previousInSeries"],iF=new Map().set("template","Leaderboard Templates").set("classic_quiz","Classic 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"),eb=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"),oF={Login:NR,InformationInput:eo,RichText:ic,HeaderButtons:hP,MarketSelection:ZR,Accordion:eT,DynamicFields:PP,BasicSelect:nT,BooleanSwitch:wL,Branding:fP,ProfileSearchSelect:CL,RangeCalendar:_P,CompetitionSearchSelect:bL,Related:rM,Images:pR,Duration:EP,DatePickerComponent:to,Flags:uR,Spinner:us,Tags:km,Toast:ut,AdContent:tT,Match:eM,Winners:cB,CompetitionsSearchSelect:yL,TeamsSearchSelect:xL,CustomSelect:yM,Schedule:fM,NoPermissionCard:kP,CustomFlatpickrCalendar:Vc,ContextSelectFilter:dB,NumberInput:$B,EntityContext:HB,MiniGamesImages:GB,AuthRequirement:YB,SortableList:HN,ItemsPerPageFilter:WN,ImageCard:so,RelatedRelationship:({defaultValue:e=[],onChange:t,labels:n})=>{const[r,i]=x.useState([]),[o,a]=x.useState(""),[l,s]=x.useState(null),[c,d]=x.useState("relatedTo"),[f,h]=x.useState(!1),p=()=>h(!f),m=GN(l,p),{sdk:g}=pt();x.useEffect(()=>(e.length>0&&tF(g,e,i,p),()=>{i([]),a(""),s(null),d("relatedTo")}),[]);const v=()=>{if(e.some(E=>E.entity_id===o&&E.entity_relationship===c)){a("");return}const b=[...e,{entity_id:o,entity_type:l,entity_relationship:c}],T=(m==null?void 0:m.filter(E=>E.id===o).map(E=>({id:E.id,name:E.name,type:l,status:E.status,relationship:c})))||[];i([...r,...T]),t(b),a("")},S=(C,b)=>{const T=e.filter(P=>!(P.entity_id===C&&P.entity_relationship===b)),E=r.filter(P=>!(P.id===C&&P.relationship===b));i(E),t(T)},w=r.reduce((C,b)=>{const T=b.relationship;return C[T]||(C[T]=[]),C[T].push(b),C},{}),y=Object.keys(w).sort();return u.jsxs(u.Fragment,{children:[y.map(C=>u.jsxs(I.Box,{sx:{mb:2},children:[u.jsx(I.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:u.jsx(I.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:eb.get(C)||"Unknown relationship"})}),w[C].map((b,T)=>u.jsx(eF,{entity:b,deleteLabel:n.delete,onDelete:S},`related-entity-relationship-${b.id}-${T}`))]},`relationship-group-${C}`)),u.jsxs(I.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:1},children:[u.jsxs(I.FormControl,{children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:n.type}),u.jsx(I.Select,{value:l,size:"sm",name:"entity_type",onChange:(C,b)=>s(b),sx:{minHeight:"37px"},children:nF.map(C=>u.jsx(I.Option,{value:C,children:iF.get(C)},`entity-type-option-${C}`))})]}),u.jsxs(I.FormControl,{children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:n.relationship}),u.jsx(I.Select,{value:c,size:"sm",name:"entity_relationship",onChange:(C,b)=>d(b),sx:{minHeight:"37px"},children:rF.map(C=>u.jsx(I.Option,{value:C,children:eb.get(C)},`entity-relationship-option-${C}`))})]}),u.jsxs(I.FormControl,{children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:n.entity}),u.jsx(I.Select,{value:o,size:"sm",name:"entity_id",onChange:(C,b)=>a(b),sx:{width:"100%",mr:{xs:0,md:1},mb:{xs:1,md:0},minHeight:"37px"},endDecorator:!m&&u.jsx(I.CircularProgress,{size:"sm"}),children:m&&m.map(C=>u.jsx(I.Option,{value:C.id,children:C.name},`entity--${C.id}`))})]}),u.jsx(I.Button,{startDecorator:u.jsx(Le.Add,{}),disabled:!o||!l,onClick:v,sx:{mb:1},children:n.add})]}),u.jsx(ut,{showToast:f,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:p})]})},ExportUsersLeads:e=>{const[t,n]=x.useState(!1),[r,i]=x.useState(!1),[o,a]=x.useState("success"),[l,s]=x.useState(""),c=x.useContext(Xo),d=(h,p)=>{a(h),s(p),i(!0)},f=()=>k(this,null,function*(){n(!0);const h=yield c==null?void 0:c.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 u.jsxs(u.Fragment,{children:[u.jsxs(I.Box,{mb:2,children:[u.jsx(I.Box,{display:"flex",alignItems:"center",mb:1,children:u.jsx(I.Typography,{level:"body-lg",sx:{mx:"auto"},children:e.labels.exportUsersLeads})}),u.jsx(I.Sheet,{sx:{overflowX:"auto",minWidth:"700px"},children:u.jsxs(I.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:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e.labels.category}),u.jsx("th",{children:e.labels.action})]})}),u.jsx("tbody",{children:u.jsxs("tr",{children:[u.jsxs("td",{children:[u.jsx(I.Typography,{level:"body-sm",fontWeight:"600",children:e.labels.exportAllUsersLeads}),u.jsx(I.Typography,{level:"body-xs",color:"neutral",children:e.labels.exportAllUsersLeadsDescription})]}),u.jsx("td",{children:u.jsx(I.Button,{loading:t,onClick:f,children:e.labels.exportAllUsersLeads})})]})})]})})]}),u.jsx(ut,{showToast:r,color:o,message:l,hideToast:()=>i(!1)})]})},SignOutButton:ng},tb=x.createContext(null),aF=({children:e})=>u.jsx(tb.Provider,{value:oF,children:e}),sF=()=>{const e=x.useContext(tb);if(!e)throw new Error("useComponentContext must be used within a ComponentProvider");return e},nb=425,rb=1024;return{APIProvider:hI,AuthProvider:pI,AuthContext:Bf,ComponentProvider:aF,useComponentContext:sF,useAPIContext:pt,useIsMobile:()=>{const[e,t]=x.useState(window.innerWidth<=rb),[n,r]=x.useState(window.innerWidth<=nb);return x.useLayoutEffect(()=>{const i=()=>{t(window.innerWidth<=rb),r(window.innerWidth<=nb)};return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),{isMobile:e,isPhone:n}}}});
|