fansunited-management-components 1.25.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.es.js +1988 -1965
- package/index.umd.js +88 -88
- package/package.json +1 -1
- package/src/components/Inputs/NumberInput/NumberInput.d.ts +1 -0
- package/src/models/IBranding.d.ts +28 -0
- package/src/models/minigames/classicquizzes/ClassicQuizRequestBody.d.ts +1 -27
- package/src/models/minigames/eitherors/EitherOrRequestBody.d.ts +37 -0
- package/src/models/voting/PollRequestBody.d.ts +1 -27
- package/src/services/https/HttpsService.d.ts +5 -1
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,S,Le){"use strict";var gF=Object.defineProperty,mF=Object.defineProperties;var vF=Object.getOwnPropertyDescriptors;var _s=Object.getOwnPropertySymbols,bF=Object.getPrototypeOf,rb=Object.prototype.hasOwnProperty,ib=Object.prototype.propertyIsEnumerable,yF=Reflect.get;var mi=Math.pow,Pu=(x,Me,Oe)=>Me in x?gF(x,Me,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):x[Me]=Oe,H=(x,Me)=>{for(var Oe in Me||(Me={}))rb.call(Me,Oe)&&Pu(x,Oe,Me[Oe]);if(_s)for(var Oe of _s(Me))ib.call(Me,Oe)&&Pu(x,Oe,Me[Oe]);return x},
|
|
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,S,Le){"use strict";var gF=Object.defineProperty,mF=Object.defineProperties;var vF=Object.getOwnPropertyDescriptors;var _s=Object.getOwnPropertySymbols,bF=Object.getPrototypeOf,rb=Object.prototype.hasOwnProperty,ib=Object.prototype.propertyIsEnumerable,yF=Reflect.get;var mi=Math.pow,Pu=(x,Me,Oe)=>Me in x?gF(x,Me,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):x[Me]=Oe,H=(x,Me)=>{for(var Oe in Me||(Me={}))rb.call(Me,Oe)&&Pu(x,Oe,Me[Oe]);if(_s)for(var Oe of _s(Me))ib.call(Me,Oe)&&Pu(x,Oe,Me[Oe]);return x},X=(x,Me)=>mF(x,vF(Me));var ks=x=>typeof x=="symbol"?x:x+"",We=(x,Me)=>{var Oe={};for(var Lt in x)rb.call(x,Lt)&&Me.indexOf(Lt)<0&&(Oe[Lt]=x[Lt]);if(x!=null&&_s)for(var Lt of _s(x))Me.indexOf(Lt)<0&&ib.call(x,Lt)&&(Oe[Lt]=x[Lt]);return Oe};var ae=(x,Me,Oe)=>Pu(x,typeof Me!="symbol"?Me+"":Me,Oe);var Ir=(x,Me,Oe)=>yF(bF(x),Oe,Me);var k=(x,Me,Oe)=>new Promise((Lt,pe)=>{var vi=Sn=>{try{Le(Oe.next(Sn))}catch(z){pe(z)}},S=Sn=>{try{Le(Oe.throw(Sn))}catch(z){pe(z)}},Le=Sn=>Sn.done?Lt(Sn.value):Promise.resolve(Sn.value).then(vi,S);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 z=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
|
*
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
187
187
|
* See the License for the specific language governing permissions and
|
|
188
188
|
* limitations under the License.
|
|
189
|
-
*/class kb{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){const r=new yb;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch(i){}}return this.instancesDeferred.get(n).promise}getImmediate(t){var n;const r=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),i=(n=t==null?void 0:t.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(o){if(i)return null;throw o}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(Pb(t))try{this.getOrInitializeService({instanceIdentifier:sr})}catch(n){}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const o=this.getOrInitializeService({instanceIdentifier:i});r.resolve(o)}catch(o){}}}}clearInstance(t=sr){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}delete(){return
|
|
189
|
+
*/class kb{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){const r=new yb;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch(i){}}return this.instancesDeferred.get(n).promise}getImmediate(t){var n;const r=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),i=(n=t==null?void 0:t.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(o){if(i)return null;throw o}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(Pb(t))try{this.getOrInitializeService({instanceIdentifier:sr})}catch(n){}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const o=this.getOrInitializeService({instanceIdentifier:i});r.resolve(o)}catch(o){}}}}clearInstance(t=sr){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}delete(){return k(this,null,function*(){const t=Array.from(this.instances.values());yield Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])})}isComponentSet(){return this.component!=null}isInitialized(t=sr){return this.instances.has(t)}getOptions(t=sr){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:n={}}=t,r=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[o,a]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(o);r===l&&a.resolve(i)}return i}onInit(t,n){var r;const i=this.normalizeInstanceIdentifier(n),o=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;o.add(t),this.onInitCallbacks.set(i,o);const a=this.instances.get(i);return a&&t(a,i),()=>{o.delete(t)}}invokeOnInitCallbacks(t,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(t,n)}catch(o){}}getOrInitializeService({instanceIdentifier:t,options:n={}}){let r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:Db(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch(i){}return r||null}normalizeInstanceIdentifier(t=sr){return this.component?this.component.multipleInstances?t:sr:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function Db(e){return e===sr?void 0:e}function Pb(e){return e.instantiationMode==="EAGER"}/**
|
|
190
190
|
* @license
|
|
191
191
|
* Copyright 2019 Google LLC
|
|
192
192
|
*
|
|
@@ -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 Rs=[];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},Ob=Be.INFO,Rb={[Be.DEBUG]:"log",[Be.VERBOSE]:"log",[Be.INFO]:"info",[Be.WARN]:"warn",[Be.ERROR]:"error"},Mb=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),i=Rb[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 Ms{constructor(t){this.name=t,this._logLevel=Ob,this._logHandler=Mb,this._userLogHandler=null,Rs.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 Lb(e){Rs.forEach(t=>{t.setLogLevel(e)})}function Bb(e,t){for(const n of Rs){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 $b=(e,t)=>t.some(n=>e instanceof n);let Ju,Xu;function Nb(){return Ju||(Ju=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Fb(){return Xu||(Xu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Zu=new WeakMap,Ls=new WeakMap,ed=new WeakMap,Bs=new WeakMap,$s=new WeakMap;function zb(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(()=>{}),$s.set(t,e),t}function jb(e){if(Ls.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)});Ls.set(e,t)}let Ns={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Ls.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 Vb(e){Ns=e(Ns)}function Ub(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(Fs(this),t,...n);return ed.set(r,t.sort?t.sort():[t]),Hn(r)}:Fb().includes(e)?function(...t){return e.apply(Fs(this),t),Hn(Zu.get(this))}:function(...t){return Hn(e.apply(Fs(this),t))}}function Hb(e){return typeof e=="function"?Ub(e):(e instanceof IDBTransaction&&jb(e),$b(e,Nb())?new Proxy(e,Ns):e)}function Hn(e){if(e instanceof IDBRequest)return zb(e);if(Bs.has(e))return Bs.get(e);const t=Hb(e);return t!==e&&(Bs.set(e,t),$s.set(t,e)),t}const Fs=e=>$s.get(e);function Wb(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 Gb=["get","getKey","getAll","getAllKeys","count"],Yb=["put","add","delete","clear"],zs=new Map;function td(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(zs.get(t))return zs.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Yb.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Gb.includes(n)))return;const o=function(a,...l){return
|
|
219
|
+
*/const Rs=[];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},Ob=Be.INFO,Rb={[Be.DEBUG]:"log",[Be.VERBOSE]:"log",[Be.INFO]:"info",[Be.WARN]:"warn",[Be.ERROR]:"error"},Mb=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),i=Rb[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 Ms{constructor(t){this.name=t,this._logLevel=Ob,this._logHandler=Mb,this._userLogHandler=null,Rs.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 Lb(e){Rs.forEach(t=>{t.setLogLevel(e)})}function Bb(e,t){for(const n of Rs){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 $b=(e,t)=>t.some(n=>e instanceof n);let Ju,Xu;function Nb(){return Ju||(Ju=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Fb(){return Xu||(Xu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Zu=new WeakMap,Ls=new WeakMap,ed=new WeakMap,Bs=new WeakMap,$s=new WeakMap;function zb(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(()=>{}),$s.set(t,e),t}function jb(e){if(Ls.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)});Ls.set(e,t)}let Ns={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Ls.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 Vb(e){Ns=e(Ns)}function Ub(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(Fs(this),t,...n);return ed.set(r,t.sort?t.sort():[t]),Hn(r)}:Fb().includes(e)?function(...t){return e.apply(Fs(this),t),Hn(Zu.get(this))}:function(...t){return Hn(e.apply(Fs(this),t))}}function Hb(e){return typeof e=="function"?Ub(e):(e instanceof IDBTransaction&&jb(e),$b(e,Nb())?new Proxy(e,Ns):e)}function Hn(e){if(e instanceof IDBRequest)return zb(e);if(Bs.has(e))return Bs.get(e);const t=Hb(e);return t!==e&&(Bs.set(e,t),$s.set(t,e)),t}const Fs=e=>$s.get(e);function Wb(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 Gb=["get","getKey","getAll","getAllKeys","count"],Yb=["put","add","delete","clear"],zs=new Map;function td(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(zs.get(t))return zs.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Yb.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Gb.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 zs.set(t,o),o}Vb(e=>X(H({},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
|
*
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
337
337
|
* See the License for the specific language governing permissions and
|
|
338
338
|
* limitations under the License.
|
|
339
|
-
*/const cr=x0;function Vs(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r=Object.assign({name:Wn,automaticDataCollectionEnabled:!1},t),i=r.name;if(typeof i!="string"||!i)throw Qt.create("bad-app-name",{appName:String(i)});if(n||(n=zu()),!n)throw Qt.create("no-options");const o=Gn.get(i);if(o){if(ko(n,o.options)&&ko(r,o.config))return o;throw Qt.create("duplicate-app",{appName:i})}const a=new qu(i);for(const s of Er.values())a.addComponent(s);const l=new id(n,r,a);return Gn.set(i,l),l}function E0(e,t){if(xb()&&!Uu())throw Qt.create("invalid-server-app-environment");t.automaticDataCollectionEnabled===void 0&&(t.automaticDataCollectionEnabled=!1);let n;rd(e)?n=e.options:n=e;const r=Object.assign(Object.assign({},t),n);r.releaseOnDeref!==void 0&&delete r.releaseOnDeref;const i=c=>[...c].reduce((d,f)=>Math.imul(31,d)+f.charCodeAt(0)|0,0);if(t.releaseOnDeref!==void 0&&typeof FinalizationRegistry=="undefined")throw Qt.create("finalization-registry-not-supported",{});const o=""+i(JSON.stringify(r)),a=Tr.get(o);if(a)return a.incRefCount(t.releaseOnDeref),a;const l=new qu(o);for(const c of Er.values())l.addComponent(c);const s=new T0(n,t,o,l);return Tr.set(o,s),s}function od(e=Wn){const t=Gn.get(e);if(!t&&e===Wn&&zu())return Vs();if(!t)throw Qt.create("no-app",{appName:e});return t}function _0(){return Array.from(Gn.values())}function Us(e){return
|
|
339
|
+
*/const cr=x0;function Vs(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r=Object.assign({name:Wn,automaticDataCollectionEnabled:!1},t),i=r.name;if(typeof i!="string"||!i)throw Qt.create("bad-app-name",{appName:String(i)});if(n||(n=zu()),!n)throw Qt.create("no-options");const o=Gn.get(i);if(o){if(ko(n,o.options)&&ko(r,o.config))return o;throw Qt.create("duplicate-app",{appName:i})}const a=new qu(i);for(const s of Er.values())a.addComponent(s);const l=new id(n,r,a);return Gn.set(i,l),l}function E0(e,t){if(xb()&&!Uu())throw Qt.create("invalid-server-app-environment");t.automaticDataCollectionEnabled===void 0&&(t.automaticDataCollectionEnabled=!1);let n;rd(e)?n=e.options:n=e;const r=Object.assign(Object.assign({},t),n);r.releaseOnDeref!==void 0&&delete r.releaseOnDeref;const i=c=>[...c].reduce((d,f)=>Math.imul(31,d)+f.charCodeAt(0)|0,0);if(t.releaseOnDeref!==void 0&&typeof FinalizationRegistry=="undefined")throw Qt.create("finalization-registry-not-supported",{});const o=""+i(JSON.stringify(r)),a=Tr.get(o);if(a)return a.incRefCount(t.releaseOnDeref),a;const l=new qu(o);for(const c of Er.values())l.addComponent(c);const s=new T0(n,t,o,l);return Tr.set(o,s),s}function od(e=Wn){const t=Gn.get(e);if(!t&&e===Wn&&zu())return Vs();if(!t)throw Qt.create("no-app",{appName:e});return t}function _0(){return Array.from(Gn.values())}function Us(e){return k(this,null,function*(){let t=!1;const n=e.name;Gn.has(n)?(t=!0,Gn.delete(n)):Tr.has(n)&&e.decRefCount()<=0&&(Tr.delete(n),t=!0),t&&(yield Promise.all(e.container.getProviders().map(r=>r.delete())),e.isDeleted=!0)})}function Tn(e,t,n){var r;let i=(r=w0[e])!==null&&r!==void 0?r:e;n&&(i+=`-${n}`);const o=i.match(/\s|\//),a=t.match(/\s|\//);if(o||a){const l=[`Unable to register library "${i}" with version "${t}":`];o&&l.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&a&&l.push("and"),a&&l.push(`version name "${t}" contains illegal characters (whitespace or "/")`),An.warn(l.join(" "));return}lr(new Un(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}function ad(e,t){if(e!==null&&typeof e!="function")throw Qt.create("invalid-log-argument");Bb(e,t)}function sd(e){Lb(e)}/**
|
|
340
340
|
* @license
|
|
341
341
|
* Copyright 2021 Google LLC
|
|
342
342
|
*
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
352
352
|
* See the License for the specific language governing permissions and
|
|
353
353
|
* limitations under the License.
|
|
354
|
-
*/const k0="firebase-heartbeat-database",D0=1,Ci="firebase-heartbeat-store";let Hs=null;function ld(){return Hs||(Hs=Wb(k0,D0,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(Ci)}catch(n){console.warn(n)}}}}).catch(e=>{throw Qt.create("idb-open",{originalErrorMessage:e.message})})),Hs}function P0(e){return
|
|
354
|
+
*/const k0="firebase-heartbeat-database",D0=1,Ci="firebase-heartbeat-store";let Hs=null;function ld(){return Hs||(Hs=Wb(k0,D0,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(Ci)}catch(n){console.warn(n)}}}}).catch(e=>{throw Qt.create("idb-open",{originalErrorMessage:e.message})})),Hs}function P0(e){return k(this,null,function*(){try{const n=(yield ld()).transaction(Ci),r=yield n.objectStore(Ci).get(ud(e));return yield n.done,r}catch(t){if(t instanceof $t)An.warn(t.message);else{const n=Qt.create("idb-get",{originalErrorMessage:t==null?void 0:t.message});An.warn(n.message)}}})}function cd(e,t){return k(this,null,function*(){try{const r=(yield ld()).transaction(Ci,"readwrite");yield r.objectStore(Ci).put(t,ud(e)),yield r.done}catch(n){if(n instanceof $t)An.warn(n.message);else{const r=Qt.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});An.warn(r.message)}}})}function ud(e){return`${e.name}!${e.options.appId}`}/**
|
|
355
355
|
* @license
|
|
356
356
|
* Copyright 2021 Google LLC
|
|
357
357
|
*
|
|
@@ -366,7 +366,7 @@
|
|
|
366
366
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
367
367
|
* See the License for the specific language governing permissions and
|
|
368
368
|
* limitations under the License.
|
|
369
|
-
*/const O0=1024,R0=30*24*60*60*1e3;class M0{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new B0(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}triggerHeartbeat(){return
|
|
369
|
+
*/const O0=1024,R0=30*24*60*60*1e3;class M0{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new B0(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}triggerHeartbeat(){return k(this,null,function*(){var t,n,r;try{const o=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),a=dd();return console.log("heartbeats",(t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats),((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,((r=this._heartbeatsCache)===null||r===void 0?void 0:r.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===a||this._heartbeatsCache.heartbeats.some(l=>l.date===a)?void 0:(this._heartbeatsCache.heartbeats.push({date:a,agent:o}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(l=>{const s=new Date(l.date).valueOf();return Date.now()-s<=R0}),this._storage.overwrite(this._heartbeatsCache))}catch(i){An.warn(i)}})}getHeartbeatsHeader(){return k(this,null,function*(){var t;try{if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=dd(),{heartbeatsToSend:r,unsentEntries:i}=L0(this._heartbeatsCache.heartbeats),o=$u(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,i.length>0?(this._heartbeatsCache.heartbeats=i,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),o}catch(n){return An.warn(n),""}})}}function dd(){return new Date().toISOString().substring(0,10)}function L0(e,t=O0){const n=[];let r=e.slice();for(const i of e){const o=n.find(a=>a.agent===i.agent);if(o){if(o.dates.push(i.date),fd(n)>t){o.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),fd(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class B0{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return k(this,null,function*(){return _o()?wb().then(()=>!0).catch(()=>!1):!1})}read(){return k(this,null,function*(){if(yield this._canUseIndexedDBPromise){const n=yield P0(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(t){return k(this,null,function*(){var n;if(yield this._canUseIndexedDBPromise){const i=yield this.read();return cd(this.app,{lastSentHeartbeatDate:(n=t.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return})}add(t){return k(this,null,function*(){var n;if(yield this._canUseIndexedDBPromise){const i=yield this.read();return cd(this.app,{lastSentHeartbeatDate:(n=t.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...t.heartbeats]})}else return})}}function fd(e){return $u(JSON.stringify({version:2,heartbeats:e})).length}/**
|
|
370
370
|
* @license
|
|
371
371
|
* Copyright 2019 Google LLC
|
|
372
372
|
*
|
|
@@ -657,7 +657,7 @@
|
|
|
657
657
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
658
658
|
* See the License for the specific language governing permissions and
|
|
659
659
|
* limitations under the License.
|
|
660
|
-
*/const ny=new Ii(3e4,6e4);function Ye(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}function Ke(o,a,l,s){return
|
|
660
|
+
*/const ny=new Ii(3e4,6e4);function Ye(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}function Ke(o,a,l,s){return k(this,arguments,function*(e,t,n,r,i={}){return Cd(e,i,()=>k(this,null,function*(){let c={},d={};r&&(t==="GET"?d=r:c={body:JSON.stringify(r)});const f=Sr(Object.assign({key:e.config.apiKey},d)).slice(1),h=yield e._getAdditionalHeaders();return h["Content-Type"]="application/json",e.languageCode&&(h["X-Firebase-Locale"]=e.languageCode),yd.fetch()(xd(e,e.config.apiHost,n,f),Object.assign({method:t,headers:h,referrerPolicy:"no-referrer"},c))}))})}function Cd(e,t,n){return k(this,null,function*(){e._canInitEmulator=!1;const r=Object.assign(Object.assign({},ty),t);try{const i=new iy(e),o=yield Promise.race([n(),i.promise]);i.clearNetworkTimeout();const a=yield o.json();if("needConfirmation"in a)throw Si(e,"account-exists-with-different-credential",a);if(o.ok&&!("errorMessage"in a))return a;{const l=o.ok?a.errorMessage:a.error.message,[s,c]=l.split(" : ");if(s==="FEDERATED_USER_ID_ALREADY_LINKED")throw Si(e,"credential-already-in-use",a);if(s==="EMAIL_EXISTS")throw Si(e,"email-already-in-use",a);if(s==="USER_DISABLED")throw Si(e,"user-disabled",a);const d=r[s]||s.toLowerCase().replace(/[_\s]+/g,"-");if(c)throw Ys(e,d,c);vt(e,d)}}catch(i){if(i instanceof $t)throw i;vt(e,"network-request-failed",{message:String(i)})}})}function En(o,a,l,s){return k(this,arguments,function*(e,t,n,r,i={}){const c=yield Ke(e,t,n,r,i);return"mfaPendingCredential"in c&&vt(e,"multi-factor-auth-required",{_serverResponse:c}),c})}function xd(e,t,n,r){const i=`${t}${n}?${r}`;return e.config.emulator?Qs(e.config,i):`${e.config.apiScheme}://${i}`}function ry(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class iy{constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(ft(this.auth,"network-request-failed")),ny.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function Si(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=ft(e,t,r);return i.customData._tokenResponse=n,i}/**
|
|
661
661
|
* @license
|
|
662
662
|
* Copyright 2020 Google LLC
|
|
663
663
|
*
|
|
@@ -687,7 +687,7 @@
|
|
|
687
687
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
688
688
|
* See the License for the specific language governing permissions and
|
|
689
689
|
* limitations under the License.
|
|
690
|
-
*/function ay(e){return
|
|
690
|
+
*/function ay(e){return k(this,null,function*(){return(yield Ke(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""})}function sy(e,t){return k(this,null,function*(){return Ke(e,"GET","/v2/recaptchaConfig",Ye(e,t))})}/**
|
|
691
691
|
* @license
|
|
692
692
|
* Copyright 2020 Google LLC
|
|
693
693
|
*
|
|
@@ -702,7 +702,7 @@
|
|
|
702
702
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
703
703
|
* See the License for the specific language governing permissions and
|
|
704
704
|
* limitations under the License.
|
|
705
|
-
*/function ly(e,t){return
|
|
705
|
+
*/function ly(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:delete",t)})}function cy(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:update",t)})}function Sd(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:lookup",t)})}/**
|
|
706
706
|
* @license
|
|
707
707
|
* Copyright 2020 Google LLC
|
|
708
708
|
*
|
|
@@ -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 uy(e,t=!1){return
|
|
720
|
+
*/function Ai(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(t){}}function uy(e,t=!1){return k(this,null,function*(){const n=ke(e),r=yield n.getIdToken(t),i=Mo(r);ie(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(Js(i.auth_time)),issuedAtTime:Ai(Js(i.iat)),expirationTime:Ai(Js(i.exp)),signInProvider:a||null,signInSecondFactor:(o==null?void 0:o.sign_in_second_factor)||null}})}function Js(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 ie(t,"internal-error"),ie(typeof t.exp!="undefined","internal-error"),ie(typeof t.iat!="undefined","internal-error"),Number(t.exp)-Number(t.iat)}/**
|
|
721
721
|
* @license
|
|
722
722
|
* Copyright 2020 Google LLC
|
|
723
723
|
*
|
|
@@ -732,7 +732,7 @@
|
|
|
732
732
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
733
733
|
* See the License for the specific language governing permissions and
|
|
734
734
|
* limitations under the License.
|
|
735
|
-
*/function _n(e,t,n=!1){return
|
|
735
|
+
*/function _n(e,t,n=!1){return k(this,null,function*(){if(n)return t;try{return yield t}catch(r){throw r instanceof $t&&dy(r)&&e.auth.currentUser===e&&(yield e.auth.signOut()),r}})}function dy({code:e}){return e==="auth/user-disabled"||e==="auth/user-token-expired"}/**
|
|
736
736
|
* @license
|
|
737
737
|
* Copyright 2020 Google LLC
|
|
738
738
|
*
|
|
@@ -747,7 +747,7 @@
|
|
|
747
747
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
748
748
|
* See the License for the specific language governing permissions and
|
|
749
749
|
* limitations under the License.
|
|
750
|
-
*/class fy{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){var n;if(t){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const i=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(t=!1){if(!this.isRunning)return;const n=this.getInterval(t);this.timerId=setTimeout(()=>
|
|
750
|
+
*/class fy{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){var n;if(t){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const i=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(t=!1){if(!this.isRunning)return;const n=this.getInterval(t);this.timerId=setTimeout(()=>k(this,null,function*(){yield this.iteration()}),n)}iteration(){return k(this,null,function*(){try{yield this.user.getIdToken(!0)}catch(t){(t==null?void 0:t.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()})}}/**
|
|
751
751
|
* @license
|
|
752
752
|
* Copyright 2020 Google LLC
|
|
753
753
|
*
|
|
@@ -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
|
|
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}));ie(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=py(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 Xs(o.createdAt,o.lastLoginAt),isAnonymous:d};Object.assign(e,f)})}function hy(e){return k(this,null,function*(){const t=ke(e);yield Ti(t),yield t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)})}function py(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=Gs(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
|
*
|
|
@@ -792,7 +792,7 @@
|
|
|
792
792
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
793
793
|
* See the License for the specific language governing permissions and
|
|
794
794
|
* limitations under the License.
|
|
795
|
-
*/function gy(e,t){return
|
|
795
|
+
*/function gy(e,t){return k(this,null,function*(){const n=yield Cd(e,{},()=>k(this,null,function*(){const r=Sr({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:i,apiKey:o}=e.config,a=xd(e,i,"/v1/token",`key=${o}`),l=yield e._getAdditionalHeaders();return l["Content-Type"]="application/x-www-form-urlencoded",yd.fetch()(a,{method:"POST",headers:l,body:r})}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}})}function my(e,t){return k(this,null,function*(){return Ke(e,"POST","/v2/accounts:revokeToken",Ye(e,t))})}/**
|
|
796
796
|
* @license
|
|
797
797
|
* Copyright 2020 Google LLC
|
|
798
798
|
*
|
|
@@ -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 Dr{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){ie(t.idToken,"internal-error"),ie(typeof t.idToken!="undefined","internal-error"),ie(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){ie(t.length!==0,"internal-error");const n=Ad(t);this.updateTokensAndExpiration(t,null,n)}getToken(t,n=!1){return
|
|
810
|
+
*/class Dr{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){ie(t.idToken,"internal-error"),ie(typeof t.idToken!="undefined","internal-error"),ie(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){ie(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:(ie(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 gy(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 Dr;return r&&(ie(typeof r=="string","internal-error",{appName:t}),a.refreshToken=r),i&&(ie(typeof i=="string","internal-error",{appName:t}),a.accessToken=i),o&&(ie(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 Dr,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){ie(typeof e=="string"||typeof e=="undefined","internal-error",{appName:t})}class kn{constructor(t){var{uid:n,auth:r,stsTokenManager:i}=t,o=Gs(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new fy(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 Xs(o.createdAt||void 0,o.lastLoginAt||void 0)}getIdToken(t){return
|
|
825
|
+
*/function Kn(e,t){ie(typeof e=="string"||typeof e=="undefined","internal-error",{appName:t})}class kn{constructor(t){var{uid:n,auth:r,stsTokenManager:i}=t,o=Gs(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new fy(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 Xs(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 ie(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n})}getIdTokenResult(t){return uy(this,t)}reload(){return hy(this)}_assign(t){this!==t&&(ie(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){ie(!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,ly(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,g=(a=n.photoURL)!==null&&a!==void 0?a:void 0,m=(l=n.tenantId)!==null&&l!==void 0?l:void 0,v=(s=n._redirectEventId)!==null&&s!==void 0?s:void 0,I=(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:A,stsTokenManager:E}=n;ie(y&&E,t,"internal-error");const D=Dr.fromJSON(this.name,E);ie(typeof y=="string",t,"internal-error"),Kn(f,t.name),Kn(h,t.name),ie(typeof C=="boolean",t,"internal-error"),ie(typeof b=="boolean",t,"internal-error"),Kn(p,t.name),Kn(g,t.name),Kn(m,t.name),Kn(v,t.name),Kn(I,t.name),Kn(w,t.name);const F=new kn({uid:y,auth:t,email:h,emailVerified:C,displayName:f,isAnonymous:b,photoURL:g,phoneNumber:p,tenantId:m,stsTokenManager:D,createdAt:I,lastLoginAt:w});return A&&Array.isArray(A)&&(F.providerData=A.map(Y=>Object.assign({},Y))),v&&(F._redirectEventId=v),F}static _fromIdTokenResponse(t,n,r=!1){return k(this,null,function*(){const i=new Dr;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];ie(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 Dr;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 Xs(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
|
*
|
|
@@ -852,7 +852,7 @@
|
|
|
852
852
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
853
853
|
* See the License for the specific language governing permissions and
|
|
854
854
|
* limitations under the License.
|
|
855
|
-
*/class _d{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return
|
|
855
|
+
*/class _d{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return k(this,null,function*(){return!0})}_set(t,n){return k(this,null,function*(){this.storage[t]=n})}_get(t){return k(this,null,function*(){const n=this.storage[t];return n===void 0?null:n})}_remove(t){return k(this,null,function*(){delete this.storage[t]})}_addListener(t,n){}_removeListener(t,n){}}_d.type="NONE";const Pr=_d;/**
|
|
856
856
|
* @license
|
|
857
857
|
* Copyright 2019 Google LLC
|
|
858
858
|
*
|
|
@@ -867,7 +867,7 @@
|
|
|
867
867
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
868
868
|
* See the License for the specific language governing permissions and
|
|
869
869
|
* limitations under the License.
|
|
870
|
-
*/function ur(e,t,n){return`firebase:${e}:${t}:${n}`}class Or{constructor(t,n,r){this.persistence=t,this.auth=n,this.userKey=r;const{config:i,name:o}=this.auth;this.fullUserKey=ur(this.userKey,i.apiKey,o),this.fullPersistenceKey=ur("persistence",i.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}getCurrentUser(){return
|
|
870
|
+
*/function ur(e,t,n){return`firebase:${e}:${t}:${n}`}class Or{constructor(t,n,r){this.persistence=t,this.auth=n,this.userKey=r;const{config:i,name:o}=this.auth;this.fullUserKey=ur(this.userKey,i.apiKey,o),this.fullPersistenceKey=ur("persistence",i.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}getCurrentUser(){return k(this,null,function*(){const t=yield this.persistence._get(this.fullUserKey);return t?kn._fromJSON(this.auth,t):null})}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(t){return k(this,null,function*(){if(this.persistence===t)return;const n=yield this.getCurrentUser();if(yield this.removeCurrentUser(),this.persistence=t,n)return this.setCurrentUser(n)})}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(t,n,r="authUser"){return k(this,null,function*(){if(!n.length)return new Or(Vt(Pr),t,r);const i=(yield Promise.all(n.map(c=>k(this,null,function*(){if(yield c._isAvailable())return c})))).filter(c=>c);let o=i[0]||Vt(Pr);const a=ur(r,t.config.apiKey,t.name);let l=null;for(const c of n)try{const d=yield c._get(a);if(d){const f=kn._fromJSON(t,d);c!==o&&(l=f),o=c;break}}catch(d){}const s=i.filter(c=>c._shouldAllowMigration);return!o._shouldAllowMigration||!s.length?new Or(o,t,r):(o=s[0],l&&(yield o._set(a,l.toJSON())),yield Promise.all(n.map(c=>k(this,null,function*(){if(c!==o)try{yield c._remove(a)}catch(d){}}))),new Or(o,t,r))})}}/**
|
|
871
871
|
* @license
|
|
872
872
|
* Copyright 2020 Google LLC
|
|
873
873
|
*
|
|
@@ -912,7 +912,7 @@
|
|
|
912
912
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
913
913
|
* See the License for the specific language governing permissions and
|
|
914
914
|
* limitations under the License.
|
|
915
|
-
*/class Cy{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,n){const r=o=>new Promise((a,l)=>{try{const s=t(o);a(s)}catch(s){l(s)}});r.onAbort=n,this.queue.push(r);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}runMiddleware(t){return
|
|
915
|
+
*/class Cy{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,n){const r=o=>new Promise((a,l)=>{try{const s=t(o);a(s)}catch(s){l(s)}});r.onAbort=n,this.queue.push(r);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}runMiddleware(t){return k(this,null,function*(){if(this.auth.currentUser===t)return;const n=[];try{for(const r of this.queue)yield r(t),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(const i of n)try{i()}catch(o){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r==null?void 0:r.message})}})}}/**
|
|
916
916
|
* @license
|
|
917
917
|
* Copyright 2023 Google LLC
|
|
918
918
|
*
|
|
@@ -927,7 +927,7 @@
|
|
|
927
927
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
928
928
|
* See the License for the specific language governing permissions and
|
|
929
929
|
* limitations under the License.
|
|
930
|
-
*/function xy(n){return
|
|
930
|
+
*/function xy(n){return k(this,arguments,function*(e,t={}){return Ke(e,"GET","/v2/passwordPolicy",Ye(e,t))})}/**
|
|
931
931
|
* @license
|
|
932
932
|
* Copyright 2023 Google LLC
|
|
933
933
|
*
|
|
@@ -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 Sy{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 Cy(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(()=>D(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 D(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 D(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 D(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 D(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 D(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=ey()}_delete(){return D(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return D(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 D(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(()=>D(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return D(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(()=>D(this,null,function*(){yield this.assertedPersistence.setPersistence(Vt(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return D(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 D(this,null,function*(){const t=yield xy(this),n=new Iy(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 D(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 my(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 D(this,null,function*(){const r=yield this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return D(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 D(this,null,function*(){var n,r;return this._isInitialized&&(yield this.queue(()=>D(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 D(this,null,function*(){if(t===this.currentUser)return this.queue(()=>D(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 D(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 D(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 D(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&&X0(`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 Sy{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 Cy(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=ey()}_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 xy(this),n=new Iy(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 my(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&&X0(`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)}}/**
|
|
961
961
|
* @license
|
|
962
962
|
* Copyright 2020 Google LLC
|
|
963
963
|
*
|
|
@@ -972,7 +972,7 @@
|
|
|
972
972
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
973
973
|
* See the License for the specific language governing permissions and
|
|
974
974
|
* limitations under the License.
|
|
975
|
-
*/let ki={loadJS(){return
|
|
975
|
+
*/let ki={loadJS(){return k(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Ay(e){ki=e}function Zs(e){return ki.loadJS(e)}function Ty(){return ki.recaptchaV2Script}function Ey(){return ki.recaptchaEnterpriseScript}function _y(){return ki.gapiScript}function Fd(e){return`__${e}${Math.floor(Math.random()*1e6)}`}const ky="recaptcha-enterprise",Dy="NO_RECAPTCHA";class Py{constructor(t){this.type=ky,this.auth=qe(t)}verify(t="verify",n=!1){return k(this,null,function*(){function r(o){return k(this,null,function*(){if(!n){if(o.tenantId==null&&o._agentRecaptchaConfig!=null)return o._agentRecaptchaConfig.siteKey;if(o.tenantId!=null&&o._tenantRecaptchaConfigs[o.tenantId]!==void 0)return o._tenantRecaptchaConfigs[o.tenantId].siteKey}return new Promise((a,l)=>k(this,null,function*(){sy(o,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(s=>{if(s.recaptchaKey===void 0)l(new Error("recaptcha Enterprise site key undefined"));else{const c=new oy(s);return o.tenantId==null?o._agentRecaptchaConfig=c:o._tenantRecaptchaConfigs[o.tenantId]=c,a(c.siteKey)}}).catch(s=>{l(s)})}))})}function i(o,a,l){const s=window.grecaptcha;Id(s)?s.enterprise.ready(()=>{s.enterprise.execute(o,{action:t}).then(c=>{a(c)}).catch(()=>{a(Dy)})}):l(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((o,a)=>{r(this.auth).then(l=>{if(!n&&Id(window.grecaptcha))i(l,o,a);else{if(typeof window=="undefined"){a(new Error("RecaptchaVerifier is only supported in browser"));return}let s=Ey();s.length!==0&&(s+=l),Zs(s).then(()=>{i(l,o,a)}).catch(c=>{a(c)})}}).catch(l=>{a(l)})})})}}function zd(e,t,n,r=!1){return k(this,null,function*(){const i=new Py(e);let o;try{o=yield i.verify(n)}catch(l){o=yield i.verify(n,!0)}const a=Object.assign({},t);return r?Object.assign(a,{captchaResp:o}):Object.assign(a,{captchaResponse:o}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a})}function Di(e,t,n,r){return k(this,null,function*(){var i;if(!((i=e._getRecaptchaConfig())===null||i===void 0)&&i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const o=yield zd(e,t,n,n==="getOobCode");return r(e,o)}else return r(e,t).catch(o=>k(this,null,function*(){if(o.code==="auth/missing-recaptcha-token"){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const a=yield zd(e,t,n,n==="getOobCode");return r(e,a)}else return Promise.reject(o)}))})}/**
|
|
976
976
|
* @license
|
|
977
977
|
* Copyright 2020 Google LLC
|
|
978
978
|
*
|
|
@@ -1017,7 +1017,7 @@
|
|
|
1017
1017
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1018
1018
|
* See the License for the specific language governing permissions and
|
|
1019
1019
|
* limitations under the License.
|
|
1020
|
-
*/function Ud(e,t){return
|
|
1020
|
+
*/function Ud(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:resetPassword",Ye(e,t))})}function By(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:update",t)})}function $y(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:signUp",t)})}function Ny(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:update",Ye(e,t))})}/**
|
|
1021
1021
|
* @license
|
|
1022
1022
|
* Copyright 2020 Google LLC
|
|
1023
1023
|
*
|
|
@@ -1032,7 +1032,7 @@
|
|
|
1032
1032
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1033
1033
|
* See the License for the specific language governing permissions and
|
|
1034
1034
|
* limitations under the License.
|
|
1035
|
-
*/function Fy(e,t){return
|
|
1035
|
+
*/function Fy(e,t){return k(this,null,function*(){return En(e,"POST","/v1/accounts:signInWithPassword",Ye(e,t))})}function Lo(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:sendOobCode",Ye(e,t))})}function zy(e,t){return k(this,null,function*(){return Lo(e,t)})}function jy(e,t){return k(this,null,function*(){return Lo(e,t)})}function Vy(e,t){return k(this,null,function*(){return Lo(e,t)})}function Uy(e,t){return k(this,null,function*(){return Lo(e,t)})}/**
|
|
1036
1036
|
* @license
|
|
1037
1037
|
* Copyright 2020 Google LLC
|
|
1038
1038
|
*
|
|
@@ -1047,7 +1047,7 @@
|
|
|
1047
1047
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1048
1048
|
* See the License for the specific language governing permissions and
|
|
1049
1049
|
* limitations under the License.
|
|
1050
|
-
*/function Hy(e,t){return
|
|
1050
|
+
*/function Hy(e,t){return k(this,null,function*(){return En(e,"POST","/v1/accounts:signInWithEmailLink",Ye(e,t))})}function Wy(e,t){return k(this,null,function*(){return En(e,"POST","/v1/accounts:signInWithEmailLink",Ye(e,t))})}/**
|
|
1051
1051
|
* @license
|
|
1052
1052
|
* Copyright 2020 Google LLC
|
|
1053
1053
|
*
|
|
@@ -1062,7 +1062,7 @@
|
|
|
1062
1062
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1063
1063
|
* See the License for the specific language governing permissions and
|
|
1064
1064
|
* limitations under the License.
|
|
1065
|
-
*/class Pi extends Rr{constructor(t,n,r,i=null){super("password",r),this._email=t,this._password=n,this._tenantId=i}static _fromEmailAndPassword(t,n){return new Pi(t,n,"password")}static _fromEmailAndCode(t,n,r=null){return new Pi(t,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(t){const n=typeof t=="string"?JSON.parse(t):t;if(n!=null&&n.email&&(n!=null&&n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}_getIdTokenResponse(t){return
|
|
1065
|
+
*/class Pi extends Rr{constructor(t,n,r,i=null){super("password",r),this._email=t,this._password=n,this._tenantId=i}static _fromEmailAndPassword(t,n){return new Pi(t,n,"password")}static _fromEmailAndCode(t,n,r=null){return new Pi(t,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(t){const n=typeof t=="string"?JSON.parse(t):t;if(n!=null&&n.email&&(n!=null&&n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}_getIdTokenResponse(t){return k(this,null,function*(){switch(this.signInMethod){case"password":const n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Di(t,n,"signInWithPassword",Fy);case"emailLink":return Hy(t,{email:this._email,oobCode:this._password});default:vt(t,"internal-error")}})}_linkToIdToken(t,n){return k(this,null,function*(){switch(this.signInMethod){case"password":const r={idToken:n,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Di(t,r,"signUpPassword",$y);case"emailLink":return Wy(t,{idToken:n,email:this._email,oobCode:this._password});default:vt(t,"internal-error")}})}_getReauthenticationResolver(t){return this._getIdTokenResponse(t)}}/**
|
|
1066
1066
|
* @license
|
|
1067
1067
|
* Copyright 2020 Google LLC
|
|
1068
1068
|
*
|
|
@@ -1077,7 +1077,7 @@
|
|
|
1077
1077
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1078
1078
|
* See the License for the specific language governing permissions and
|
|
1079
1079
|
* limitations under the License.
|
|
1080
|
-
*/function Dn(e,t){return
|
|
1080
|
+
*/function Dn(e,t){return k(this,null,function*(){return En(e,"POST","/v1/accounts:signInWithIdp",Ye(e,t))})}/**
|
|
1081
1081
|
* @license
|
|
1082
1082
|
* Copyright 2020 Google LLC
|
|
1083
1083
|
*
|
|
@@ -1107,7 +1107,7 @@
|
|
|
1107
1107
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1108
1108
|
* See the License for the specific language governing permissions and
|
|
1109
1109
|
* limitations under the License.
|
|
1110
|
-
*/function Yy(e,t){return
|
|
1110
|
+
*/function Yy(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:sendVerificationCode",Ye(e,t))})}function Ky(e,t){return k(this,null,function*(){return En(e,"POST","/v1/accounts:signInWithPhoneNumber",Ye(e,t))})}function qy(e,t){return k(this,null,function*(){const n=yield En(e,"POST","/v1/accounts:signInWithPhoneNumber",Ye(e,t));if(n.temporaryProof)throw Si(e,"account-exists-with-different-credential",n);return n})}const Qy={USER_NOT_FOUND:"user-not-found"};function Jy(e,t){return k(this,null,function*(){const n=Object.assign(Object.assign({},t),{operation:"REAUTH"});return En(e,"POST","/v1/accounts:signInWithPhoneNumber",Ye(e,n),Qy)})}/**
|
|
1111
1111
|
* @license
|
|
1112
1112
|
* Copyright 2020 Google LLC
|
|
1113
1113
|
*
|
|
@@ -1287,7 +1287,7 @@
|
|
|
1287
1287
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1288
1288
|
* See the License for the specific language governing permissions and
|
|
1289
1289
|
* limitations under the License.
|
|
1290
|
-
*/function Hd(e,t){return
|
|
1290
|
+
*/function Hd(e,t){return k(this,null,function*(){return En(e,"POST","/v1/accounts:signUp",Ye(e,t))})}/**
|
|
1291
1291
|
* @license
|
|
1292
1292
|
* Copyright 2020 Google LLC
|
|
1293
1293
|
*
|
|
@@ -1302,7 +1302,7 @@
|
|
|
1302
1302
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1303
1303
|
* See the License for the specific language governing permissions and
|
|
1304
1304
|
* limitations under the License.
|
|
1305
|
-
*/class Jt{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static _fromIdTokenResponse(t,n,r,i=!1){return
|
|
1305
|
+
*/class Jt{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static _fromIdTokenResponse(t,n,r,i=!1){return k(this,null,function*(){const o=yield kn._fromIdTokenResponse(t,r,i),a=Wd(r);return new Jt({user:o,providerId:a,_tokenResponse:r,operationType:n})})}static _forOperation(t,n,r){return k(this,null,function*(){yield t._updateTokensIfNecessary(r,!0);const i=Wd(r);return new Jt({user:t,providerId:i,_tokenResponse:r,operationType:n})})}}function Wd(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/**
|
|
1306
1306
|
* @license
|
|
1307
1307
|
* Copyright 2020 Google LLC
|
|
1308
1308
|
*
|
|
@@ -1317,7 +1317,7 @@
|
|
|
1317
1317
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1318
1318
|
* See the License for the specific language governing permissions and
|
|
1319
1319
|
* limitations under the License.
|
|
1320
|
-
*/function nC(e){return
|
|
1320
|
+
*/function nC(e){return k(this,null,function*(){var t;if(Ge(e.app))return Promise.reject(bt(e));const n=qe(e);if(yield n._initializationPromise,!((t=n.currentUser)===null||t===void 0)&&t.isAnonymous)return new Jt({user:n.currentUser,providerId:null,operationType:"signIn"});const r=yield Hd(n,{returnSecureToken:!0}),i=yield Jt._fromIdTokenResponse(n,"signIn",r,!0);return yield n._updateCurrentUser(i.user),i})}/**
|
|
1321
1321
|
* @license
|
|
1322
1322
|
* Copyright 2020 Google LLC
|
|
1323
1323
|
*
|
|
@@ -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 rC(e,t){return
|
|
1365
|
+
*/function rC(e,t){return k(this,null,function*(){const n=ke(e);yield Fo(!0,n,t);const{providerUserInfo:r}=yield cy(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 tl(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";ie(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
|
|
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);ie(o.idToken,r,"internal-error");const a=Mo(o.idToken);ie(a,r,"internal-error");const{sub:l}=a;return ie(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
|
*
|
|
@@ -1392,7 +1392,7 @@
|
|
|
1392
1392
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1393
1393
|
* See the License for the specific language governing permissions and
|
|
1394
1394
|
* limitations under the License.
|
|
1395
|
-
*/function qd(e,t,n=!1){return
|
|
1395
|
+
*/function qd(e,t,n=!1){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r="signIn",i=yield Gd(e,r,t),o=yield Jt._fromIdTokenResponse(e,r,i);return n||(yield e._updateCurrentUser(o.user)),o})}function zo(e,t){return k(this,null,function*(){return qd(qe(e),t)})}function Qd(e,t){return k(this,null,function*(){const n=ke(e);return yield Fo(!1,n,t.providerId),tl(n,t)})}function Jd(e,t){return k(this,null,function*(){return Kd(ke(e),t)})}/**
|
|
1396
1396
|
* @license
|
|
1397
1397
|
* Copyright 2020 Google LLC
|
|
1398
1398
|
*
|
|
@@ -1407,7 +1407,7 @@
|
|
|
1407
1407
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1408
1408
|
* See the License for the specific language governing permissions and
|
|
1409
1409
|
* limitations under the License.
|
|
1410
|
-
*/function iC(e,t){return
|
|
1410
|
+
*/function iC(e,t){return k(this,null,function*(){return En(e,"POST","/v1/accounts:signInWithCustomToken",Ye(e,t))})}/**
|
|
1411
1411
|
* @license
|
|
1412
1412
|
* Copyright 2020 Google LLC
|
|
1413
1413
|
*
|
|
@@ -1422,7 +1422,7 @@
|
|
|
1422
1422
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1423
1423
|
* See the License for the specific language governing permissions and
|
|
1424
1424
|
* limitations under the License.
|
|
1425
|
-
*/function oC(e,t){return
|
|
1425
|
+
*/function oC(e,t){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const n=qe(e),r=yield iC(n,{token:t,returnSecureToken:!0}),i=yield Jt._fromIdTokenResponse(n,"signIn",r);return yield n._updateCurrentUser(i.user),i})}/**
|
|
1426
1426
|
* @license
|
|
1427
1427
|
* Copyright 2020 Google LLC
|
|
1428
1428
|
*
|
|
@@ -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 il(e){return
|
|
1470
|
+
*/function il(e){return k(this,null,function*(){const t=qe(e);t._getPasswordPolicyInternal()&&(yield t._updatePasswordPolicy())})}function aC(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 Di(r,i,"getOobCode",jy)})}function sC(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"&&il(e),r}))})}function lC(e,t){return k(this,null,function*(){yield Ny(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(ie(i,n,"internal-error"),i){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":ie(r.newEmail,n,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":ie(r.mfaInfo,n,"internal-error");default:ie(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 cC(e,t){return k(this,null,function*(){const{data:n}=yield Xd(ke(e),t);return n.email})}function uC(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=qe(e),a=yield Di(r,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",Hd).catch(s=>{throw s.code==="auth/password-does-not-meet-requirements"&&il(e),s}),l=yield Jt._fromIdTokenResponse(r,"signIn",a);return yield r._updateCurrentUser(l.user),l})}function dC(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"&&il(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 fC(e,t,n){return
|
|
1485
|
+
*/function fC(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){ie(l.handleCodeInApp,r,"argument-error"),l&&jo(r,a,l)}o(i,n),yield Di(r,i,"getOobCode",Vy)})}function hC(e,t){const n=Bo.parseLink(t);return(n==null?void 0:n.operation)==="EMAIL_SIGNIN"}function pC(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 ie(i._tenantId===(r.tenantId||null),r,"tenant-id-mismatch"),zo(r,i)})}/**
|
|
1486
1486
|
* @license
|
|
1487
1487
|
* Copyright 2020 Google LLC
|
|
1488
1488
|
*
|
|
@@ -1497,7 +1497,7 @@
|
|
|
1497
1497
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1498
1498
|
* See the License for the specific language governing permissions and
|
|
1499
1499
|
* limitations under the License.
|
|
1500
|
-
*/function gC(e,t){return
|
|
1500
|
+
*/function gC(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:createAuthUri",Ye(e,t))})}/**
|
|
1501
1501
|
* @license
|
|
1502
1502
|
* Copyright 2020 Google LLC
|
|
1503
1503
|
*
|
|
@@ -1512,7 +1512,7 @@
|
|
|
1512
1512
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1513
1513
|
* See the License for the specific language governing permissions and
|
|
1514
1514
|
* limitations under the License.
|
|
1515
|
-
*/function mC(e,t){return
|
|
1515
|
+
*/function mC(e,t){return k(this,null,function*(){const n=qs()?wi():"http://localhost",r={identifier:t,continueUri:n},{signinMethods:i}=yield gC(ke(e),r);return i||[]})}function vC(e,t){return k(this,null,function*(){const n=ke(e),i={requestType:"VERIFY_EMAIL",idToken:yield e.getIdToken()};t&&jo(n.auth,i,t);const{email:o}=yield zy(n.auth,i);o!==e.email&&(yield e.reload())})}function bC(e,t,n){return k(this,null,function*(){const r=ke(e),o={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:yield e.getIdToken(),newEmail:t};n&&jo(r.auth,o,n);const{email:a}=yield Uy(r.auth,o);a!==e.email&&(yield e.reload())})}/**
|
|
1516
1516
|
* @license
|
|
1517
1517
|
* Copyright 2020 Google LLC
|
|
1518
1518
|
*
|
|
@@ -1527,7 +1527,7 @@
|
|
|
1527
1527
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1528
1528
|
* See the License for the specific language governing permissions and
|
|
1529
1529
|
* limitations under the License.
|
|
1530
|
-
*/function yC(e,t){return
|
|
1530
|
+
*/function yC(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:update",t)})}/**
|
|
1531
1531
|
* @license
|
|
1532
1532
|
* Copyright 2020 Google LLC
|
|
1533
1533
|
*
|
|
@@ -1542,7 +1542,7 @@
|
|
|
1542
1542
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1543
1543
|
* See the License for the specific language governing permissions and
|
|
1544
1544
|
* limitations under the License.
|
|
1545
|
-
*/function CC(r,i){return
|
|
1545
|
+
*/function CC(r,i){return k(this,arguments,function*(e,{displayName:t,photoURL:n}){if(t===void 0&&n===void 0)return;const o=ke(e),l={idToken:yield o.getIdToken(),displayName:t,photoUrl:n,returnSecureToken:!0},s=yield _n(o,yC(o.auth,l));o.displayName=s.displayName||null,o.photoURL=s.photoUrl||null;const c=o.providerData.find(({providerId:d})=>d==="password");c&&(c.displayName=o.displayName,c.photoURL=o.photoURL),yield o._updateTokensIfNecessary(s)})}function xC(e,t){const n=ke(e);return Ge(n.auth.app)?Promise.reject(bt(n.auth)):Zd(n,t,null)}function wC(e,t){return Zd(ke(e),null,t)}function Zd(e,t,n){return k(this,null,function*(){const{auth:r}=e,o={idToken:yield e.getIdToken(),returnSecureToken:!0};t&&(o.email=t),n&&(o.password=n);const a=yield _n(e,By(r,o));yield e._updateTokensIfNecessary(a,!0)})}/**
|
|
1546
1546
|
* @license
|
|
1547
1547
|
* Copyright 2019 Google LLC
|
|
1548
1548
|
*
|
|
@@ -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 ol{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));ie(i.mfaPendingCredential,r,"internal-error");const a=fr._fromMfaPendingCredential(i.mfaPendingCredential);return new ol(a,o,l=>
|
|
1590
|
+
*/class ol{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));ie(i.mfaPendingCredential,r,"internal-error");const a=fr._fromMfaPendingCredential(i.mfaPendingCredential);return new ol(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 ie(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 PC(e,t){var n;const r=ke(e),i=t;return ie(t.customData.operationType,r,"argument-error"),ie((n=i.customData._serverResponse)===null||n===void 0?void 0:n.mfaPendingCredential,r,"argument-error"),ol._fromError(r,i)}/**
|
|
1591
1591
|
* @license
|
|
1592
1592
|
* Copyright 2020 Google LLC
|
|
1593
1593
|
*
|
|
@@ -1602,7 +1602,7 @@
|
|
|
1602
1602
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1603
1603
|
* See the License for the specific language governing permissions and
|
|
1604
1604
|
* limitations under the License.
|
|
1605
|
-
*/function OC(e,t){return Ke(e,"POST","/v2/accounts/mfaEnrollment:start",Ye(e,t))}function RC(e,t){return Ke(e,"POST","/v2/accounts/mfaEnrollment:finalize",Ye(e,t))}function MC(e,t){return Ke(e,"POST","/v2/accounts/mfaEnrollment:withdraw",Ye(e,t))}class al{constructor(t){this.user=t,this.enrolledFactors=[],t._onReload(n=>{n.mfaInfo&&(this.enrolledFactors=n.mfaInfo.map(r=>Oi._fromServerResponse(t.auth,r)))})}static _fromUser(t){return new al(t)}getSession(){return
|
|
1605
|
+
*/function OC(e,t){return Ke(e,"POST","/v2/accounts/mfaEnrollment:start",Ye(e,t))}function RC(e,t){return Ke(e,"POST","/v2/accounts/mfaEnrollment:finalize",Ye(e,t))}function MC(e,t){return Ke(e,"POST","/v2/accounts/mfaEnrollment:withdraw",Ye(e,t))}class al{constructor(t){this.user=t,this.enrolledFactors=[],t._onReload(n=>{n.mfaInfo&&(this.enrolledFactors=n.mfaInfo.map(r=>Oi._fromServerResponse(t.auth,r)))})}static _fromUser(t){return new al(t)}getSession(){return k(this,null,function*(){return fr._fromIdtoken(yield this.user.getIdToken(),this.user)})}enroll(t,n){return k(this,null,function*(){const r=t,i=yield this.getSession(),o=yield _n(this.user,r._process(this.user.auth,i,n));return yield this.user._updateTokensIfNecessary(o),this.user.reload()})}unenroll(t){return k(this,null,function*(){const n=typeof t=="string"?t:t.uid,r=yield this.user.getIdToken();try{const i=yield _n(this.user,MC(this.user.auth,{idToken:r,mfaEnrollmentId:n}));this.enrolledFactors=this.enrolledFactors.filter(({uid:o})=>o!==n),yield this.user._updateTokensIfNecessary(i),yield this.user.reload()}catch(i){throw i}})}}const sl=new WeakMap;function LC(e){const t=ke(e);return sl.has(t)||sl.set(t,al._fromUser(t)),sl.get(t)}const Vo="__sak";/**
|
|
1606
1606
|
* @license
|
|
1607
1607
|
* Copyright 2019 Google LLC
|
|
1608
1608
|
*
|
|
@@ -1632,7 +1632,7 @@
|
|
|
1632
1632
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1633
1633
|
* See the License for the specific language governing permissions and
|
|
1634
1634
|
* limitations under the License.
|
|
1635
|
-
*/const BC=1e3,$C=10;class Nr extends tf{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,n)=>this.onStorageEvent(t,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Bd(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),i=this.localCache[n];r!==i&&t(n,i,r)}}onStorageEvent(t,n=!1){if(!t.key){this.forAllChangedKeys((a,l,s)=>{this.notifyListeners(a,s)});return}const r=t.key;n?this.detachListener():this.stopPolling();const i=()=>{const a=this.storage.getItem(r);!n&&this.localCache[r]===a||this.notifyListeners(r,a)},o=this.storage.getItem(r);yy()&&o!==t.newValue&&t.newValue!==t.oldValue?setTimeout(i,$C):i()}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:r}),!0)})},BC)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}_set(t,n){return
|
|
1635
|
+
*/const BC=1e3,$C=10;class Nr extends tf{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,n)=>this.onStorageEvent(t,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Bd(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),i=this.localCache[n];r!==i&&t(n,i,r)}}onStorageEvent(t,n=!1){if(!t.key){this.forAllChangedKeys((a,l,s)=>{this.notifyListeners(a,s)});return}const r=t.key;n?this.detachListener():this.stopPolling();const i=()=>{const a=this.storage.getItem(r);!n&&this.localCache[r]===a||this.notifyListeners(r,a)},o=this.storage.getItem(r);yy()&&o!==t.newValue&&t.newValue!==t.oldValue?setTimeout(i,$C):i()}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:r}),!0)})},BC)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}_set(t,n){return k(this,null,function*(){yield Ir(Nr.prototype,this,"_set").call(this,t,n),this.localCache[t]=JSON.stringify(n)})}_get(t){return k(this,null,function*(){const n=yield Ir(Nr.prototype,this,"_get").call(this,t);return this.localCache[t]=JSON.stringify(n),n})}_remove(t){return k(this,null,function*(){yield Ir(Nr.prototype,this,"_remove").call(this,t),delete this.localCache[t]})}}Nr.type="LOCAL";const Uo=Nr;/**
|
|
1636
1636
|
* @license
|
|
1637
1637
|
* Copyright 2020 Google LLC
|
|
1638
1638
|
*
|
|
@@ -1662,7 +1662,7 @@
|
|
|
1662
1662
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1663
1663
|
* See the License for the specific language governing permissions and
|
|
1664
1664
|
* limitations under the License.
|
|
1665
|
-
*/function NC(e){return Promise.all(e.map(t=>
|
|
1665
|
+
*/function NC(e){return Promise.all(e.map(t=>k(this,null,function*(){try{return{fulfilled:!0,value:yield t}}catch(n){return{fulfilled:!1,reason:n}}})))}/**
|
|
1666
1666
|
* @license
|
|
1667
1667
|
* Copyright 2019 Google LLC
|
|
1668
1668
|
*
|
|
@@ -1677,7 +1677,7 @@
|
|
|
1677
1677
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1678
1678
|
* See the License for the specific language governing permissions and
|
|
1679
1679
|
* limitations under the License.
|
|
1680
|
-
*/class Ho{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const n=this.receivers.find(i=>i.isListeningto(t));if(n)return n;const r=new Ho(t);return this.receivers.push(r),r}isListeningto(t){return this.eventTarget===t}handleEvent(t){return
|
|
1680
|
+
*/class Ho{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const n=this.receivers.find(i=>i.isListeningto(t));if(n)return n;const r=new Ho(t);return this.receivers.push(r),r}isListeningto(t){return this.eventTarget===t}handleEvent(t){return k(this,null,function*(){const n=t,{eventId:r,eventType:i,data:o}=n.data,a=this.handlersMap[i];if(!(a!=null&&a.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const l=Array.from(a).map(c=>k(this,null,function*(){return c(n.origin,o)})),s=yield NC(l);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:s})})}_subscribe(t,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[t]||(this.handlersMap[t]=new Set),this.handlersMap[t].add(n)}_unsubscribe(t,n){this.handlersMap[t]&&n&&this.handlersMap[t].delete(n),(!n||this.handlersMap[t].size===0)&&delete this.handlersMap[t],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}Ho.receivers=[];/**
|
|
1681
1681
|
* @license
|
|
1682
1682
|
* Copyright 2020 Google LLC
|
|
1683
1683
|
*
|
|
@@ -1707,7 +1707,7 @@
|
|
|
1707
1707
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1708
1708
|
* See the License for the specific language governing permissions and
|
|
1709
1709
|
* limitations under the License.
|
|
1710
|
-
*/class FC{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}_send(t,n,r=50){return
|
|
1710
|
+
*/class FC{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}_send(t,n,r=50){return k(this,null,function*(){const i=typeof MessageChannel!="undefined"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let o,a;return new Promise((l,s)=>{const c=Ri("",20);i.port1.start();const d=setTimeout(()=>{s(new Error("unsupported_event"))},r);a={messageChannel:i,onMessage(f){const h=f;if(h.data.eventId===c)switch(h.data.status){case"ack":clearTimeout(d),o=setTimeout(()=>{s(new Error("timeout"))},3e3);break;case"done":clearTimeout(o),l(h.data.response);break;default:clearTimeout(d),clearTimeout(o),s(new Error("invalid_response"));break}}},this.handlers.add(a),i.port1.addEventListener("message",a.onMessage),this.target.postMessage({eventType:t,eventId:c,data:n},[i.port2])}).finally(()=>{a&&this.removeMessageHandler(a)})})}}/**
|
|
1711
1711
|
* @license
|
|
1712
1712
|
* Copyright 2020 Google LLC
|
|
1713
1713
|
*
|
|
@@ -1737,7 +1737,7 @@
|
|
|
1737
1737
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1738
1738
|
* See the License for the specific language governing permissions and
|
|
1739
1739
|
* limitations under the License.
|
|
1740
|
-
*/function ll(){return typeof st().WorkerGlobalScope!="undefined"&&typeof st().importScripts=="function"}function jC(){return
|
|
1740
|
+
*/function ll(){return typeof st().WorkerGlobalScope!="undefined"&&typeof st().importScripts=="function"}function jC(){return k(this,null,function*(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(yield navigator.serviceWorker.ready).active}catch(e){return null}})}function VC(){var e;return((e=navigator==null?void 0:navigator.serviceWorker)===null||e===void 0?void 0:e.controller)||null}function UC(){return ll()?self:null}/**
|
|
1741
1741
|
* @license
|
|
1742
1742
|
* Copyright 2019 Google LLC
|
|
1743
1743
|
*
|
|
@@ -1752,7 +1752,7 @@
|
|
|
1752
1752
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1753
1753
|
* See the License for the specific language governing permissions and
|
|
1754
1754
|
* limitations under the License.
|
|
1755
|
-
*/const rf="firebaseLocalStorageDb",HC=1,Wo="firebaseLocalStorage",of="fbase_key";class Mi{constructor(t){this.request=t}toPromise(){return new Promise((t,n)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function Go(e,t){return e.transaction([Wo],t?"readwrite":"readonly").objectStore(Wo)}function WC(){const e=indexedDB.deleteDatabase(rf);return new Mi(e).toPromise()}function cl(){const e=indexedDB.open(rf,HC);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const r=e.result;try{r.createObjectStore(Wo,{keyPath:of})}catch(i){n(i)}}),e.addEventListener("success",()=>
|
|
1755
|
+
*/const rf="firebaseLocalStorageDb",HC=1,Wo="firebaseLocalStorage",of="fbase_key";class Mi{constructor(t){this.request=t}toPromise(){return new Promise((t,n)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function Go(e,t){return e.transaction([Wo],t?"readwrite":"readonly").objectStore(Wo)}function WC(){const e=indexedDB.deleteDatabase(rf);return new Mi(e).toPromise()}function cl(){const e=indexedDB.open(rf,HC);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const r=e.result;try{r.createObjectStore(Wo,{keyPath:of})}catch(i){n(i)}}),e.addEventListener("success",()=>k(this,null,function*(){const r=e.result;r.objectStoreNames.contains(Wo)?t(r):(r.close(),yield WC(),t(yield cl()))}))})}function af(e,t,n){return k(this,null,function*(){const r=Go(e,!0).put({[of]:t,value:n});return new Mi(r).toPromise()})}function GC(e,t){return k(this,null,function*(){const n=Go(e,!1).get(t),r=yield new Mi(n).toPromise();return r===void 0?null:r.value})}function sf(e,t){const n=Go(e,!0).delete(t);return new Mi(n).toPromise()}const YC=800,KC=3;class lf{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}_openDb(){return k(this,null,function*(){return this.db?this.db:(this.db=yield cl(),this.db)})}_withRetries(t){return k(this,null,function*(){let n=0;for(;;)try{const r=yield this._openDb();return yield t(r)}catch(r){if(n++>KC)throw r;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return k(this,null,function*(){return ll()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return k(this,null,function*(){this.receiver=Ho._getInstance(UC()),this.receiver._subscribe("keyChanged",(t,n)=>k(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(n.key)}})),this.receiver._subscribe("ping",(t,n)=>k(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return k(this,null,function*(){var t,n;if(this.activeServiceWorker=yield jC(),!this.activeServiceWorker)return;this.sender=new FC(this.activeServiceWorker);const r=yield this.sender._send("ping",{},800);r&&!((t=r[0])===null||t===void 0)&&t.fulfilled&&!((n=r[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(t){return k(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||VC()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50)}catch(n){}})}_isAvailable(){return k(this,null,function*(){try{if(!indexedDB)return!1;const t=yield cl();return yield af(t,Vo,"1"),yield sf(t,Vo),!0}catch(t){}return!1})}_withPendingWrite(t){return k(this,null,function*(){this.pendingWrites++;try{yield t()}finally{this.pendingWrites--}})}_set(t,n){return k(this,null,function*(){return this._withPendingWrite(()=>k(this,null,function*(){return yield this._withRetries(r=>af(r,t,n)),this.localCache[t]=n,this.notifyServiceWorker(t)}))})}_get(t){return k(this,null,function*(){const n=yield this._withRetries(r=>GC(r,t));return this.localCache[t]=n,n})}_remove(t){return k(this,null,function*(){return this._withPendingWrite(()=>k(this,null,function*(){return yield this._withRetries(n=>sf(n,t)),delete this.localCache[t],this.notifyServiceWorker(t)}))})}_poll(){return k(this,null,function*(){const t=yield this._withRetries(i=>{const o=Go(i,!1).getAll();return new Mi(o).toPromise()});if(!t)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(t.length!==0)for(const{fbase_key:i,value:o}of t)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(o)&&(this.notifyListeners(i,o),n.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),n.push(i));return n})}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const i of Array.from(r))i(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>k(this,null,function*(){return this._poll()}),YC)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(t,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[t]||(this.listeners[t]=new Set,this._get(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&this.stopPolling()}}lf.type="LOCAL";const Fr=lf;/**
|
|
1756
1756
|
* @license
|
|
1757
1757
|
* Copyright 2020 Google LLC
|
|
1758
1758
|
*
|
|
@@ -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 JC=500,XC=6e4,Yo=1e12;class ZC{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 ex(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
|
|
1785
|
+
*/const JC=500,XC=6e4,Yo=1e12;class ZC{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 ex(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 ex{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;ie(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=tx(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()},XC)},JC))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}function tx(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 ul=Fd("rcb"),nx=new Ii(3e4,6e4);class rx{constructor(){var t;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(!((t=st().grecaptcha)===null||t===void 0)&&t.render)}load(t,n=""){return ie(ix(n),t,"argument-error"),this.shouldResolveImmediately(n)&&wd(st().grecaptcha)?Promise.resolve(st().grecaptcha):new Promise((r,i)=>{const o=st().setTimeout(()=>{i(ft(t,"network-request-failed"))},nx.get());st()[ul]=()=>{st().clearTimeout(o),delete st()[ul];const l=st().grecaptcha;if(!l||!wd(l)){i(ft(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=`${Ty()}?${Sr({onload:ul,render:"explicit",hl:n})}`;Zs(a).catch(()=>{clearTimeout(o),i(ft(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 ix(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}class ox{load(t){return
|
|
1800
|
+
*/const ul=Fd("rcb"),nx=new Ii(3e4,6e4);class rx{constructor(){var t;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(!((t=st().grecaptcha)===null||t===void 0)&&t.render)}load(t,n=""){return ie(ix(n),t,"argument-error"),this.shouldResolveImmediately(n)&&wd(st().grecaptcha)?Promise.resolve(st().grecaptcha):new Promise((r,i)=>{const o=st().setTimeout(()=>{i(ft(t,"network-request-failed"))},nx.get());st()[ul]=()=>{st().clearTimeout(o),delete st()[ul];const l=st().grecaptcha;if(!l||!wd(l)){i(ft(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=`${Ty()}?${Sr({onload:ul,render:"explicit",hl:n})}`;Zs(a).catch(()=>{clearTimeout(o),i(ft(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 ix(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}class ox{load(t){return k(this,null,function*(){return new ZC(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",ax={theme:"light",type:"image"};let sx=class{constructor(t,n,r=Object.assign({},ax)){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",ie(typeof document!="undefined",this.auth,"operation-not-supported-in-this-environment");const i=typeof n=="string"?document.getElementById(n):n;ie(i,this.auth,"argument-error"),this.container=i,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new ox:new rx,this.validateStartingState()}verify(){return
|
|
1815
|
+
*/const cf="recaptcha",ax={theme:"light",type:"image"};let sx=class{constructor(t,n,r=Object.assign({},ax)){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",ie(typeof document!="undefined",this.auth,"operation-not-supported-in-this-environment");const i=typeof n=="string"?document.getElementById(n):n;ie(i,this.auth,"argument-error"),this.container=i,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new ox:new rx,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(){ie(!this.parameters.sitekey,this.auth,"argument-error"),ie(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),ie(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(){ie(!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*(){ie(qs()&&!ll(),this.auth,"internal-error"),yield lx(),this.recaptcha=yield this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);const t=yield ay(this.auth);ie(t,this.auth,"internal-error"),this.parameters.sitekey=t})}getAssertedRecaptcha(){return ie(this.recaptcha,this.auth,"internal-error"),this.recaptcha}};function lx(){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 dl{constructor(t,n){this.verificationId=t,this.onConfirmation=n}confirm(t){const n=dr._fromVerification(this.verificationId,t);return this.onConfirmation(n)}}function cx(e,t,n){return
|
|
1830
|
+
*/class dl{constructor(t,n){this.verificationId=t,this.onConfirmation=n}confirm(t){const n=dr._fromVerification(this.verificationId,t);return this.onConfirmation(n)}}function cx(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 dl(i,o=>zo(r,o))})}function ux(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 dl(i,o=>Qd(r,o))})}function dx(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 dl(i,o=>Jd(r,o))})}function Ko(e,t,n){return k(this,null,function*(){var r;const i=yield n.verify();try{ie(typeof i=="string",e,"argument-error"),ie(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 ie(a.type==="enroll",e,"internal-error"),(yield OC(e,{idToken:a.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:i}})).phoneSessionInfo.sessionInfo;{ie(a.type==="signin",e,"internal-error");const l=((r=o.multiFactorHint)===null||r===void 0?void 0:r.uid)||o.multiFactorUid;return ie(l,e,"missing-multi-factor-info"),(yield qC(e,{mfaPendingCredential:a.credential,mfaEnrollmentId:l,phoneSignInInfo:{recaptchaToken:i}})).phoneResponseInfo.sessionInfo}}else{const{sessionInfo:a}=yield Yy(e,{phoneNumber:o.phoneNumber,recaptchaToken:i});return a}}finally{n._reset()}})}function fx(e,t){return k(this,null,function*(){const n=ke(e);if(Ge(n.auth.app))return Promise.reject(bt(n.auth));yield tl(n,t)})}/**
|
|
1831
1831
|
* @license
|
|
1832
1832
|
* Copyright 2020 Google LLC
|
|
1833
1833
|
*
|
|
@@ -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 fl extends Rr{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return Dn(t,this._buildIdpRequest())}_linkToIdToken(t,n){return Dn(t,this._buildIdpRequest(n))}_getReauthenticationResolver(t){return Dn(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 hx(e){return qd(e.auth,new fl(e),e.bypassAuthState)}function px(e){const{auth:t,user:n}=e;return ie(n,t,"internal-error"),Kd(n,new fl(e),e.bypassAuthState)}function gx(e){return
|
|
1875
|
+
*/class fl extends Rr{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return Dn(t,this._buildIdpRequest())}_linkToIdToken(t,n){return Dn(t,this._buildIdpRequest(n))}_getReauthenticationResolver(t){return Dn(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 hx(e){return qd(e.auth,new fl(e),e.bypassAuthState)}function px(e){const{auth:t,user:n}=e;return ie(n,t,"internal-error"),Kd(n,new fl(e),e.bypassAuthState)}function gx(e){return k(this,null,function*(){const{auth:t,user:n}=e;return ie(n,t,"internal-error"),tl(n,new fl(e),e.bypassAuthState)})}/**
|
|
1876
1876
|
* @license
|
|
1877
1877
|
* Copyright 2020 Google LLC
|
|
1878
1878
|
*
|
|
@@ -1887,7 +1887,7 @@
|
|
|
1887
1887
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1888
1888
|
* See the License for the specific language governing permissions and
|
|
1889
1889
|
* limitations under the License.
|
|
1890
|
-
*/class uf{constructor(t,n,r,i,o=!1){this.auth=t,this.resolver=r,this.user=i,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise((t,n)=>
|
|
1890
|
+
*/class uf{constructor(t,n,r,i,o=!1){this.auth=t,this.resolver=r,this.user=i,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise((t,n)=>k(this,null,function*(){this.pendingPromise={resolve:t,reject:n};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}}))}onAuthEvent(t){return k(this,null,function*(){const{urlResponse:n,sessionId:r,postBody:i,tenantId:o,error:a,type:l}=t;if(a){this.reject(a);return}const s={auth:this.auth,requestUri:n,sessionId:r,tenantId:o||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(l)(s))}catch(c){this.reject(c)}})}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return hx;case"linkViaPopup":case"linkViaRedirect":return gx;case"reauthViaPopup":case"reauthViaRedirect":return px;default:vt(this.auth,"internal-error")}}resolve(t){an(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){an(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
|
|
1891
1891
|
* @license
|
|
1892
1892
|
* Copyright 2020 Google LLC
|
|
1893
1893
|
*
|
|
@@ -1902,7 +1902,7 @@
|
|
|
1902
1902
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1903
1903
|
* See the License for the specific language governing permissions and
|
|
1904
1904
|
* limitations under the License.
|
|
1905
|
-
*/const mx=new Ii(2e3,1e4);function vx(e,t,n){return
|
|
1905
|
+
*/const mx=new Ii(2e3,1e4);function vx(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(ft(e,"operation-not-supported-in-this-environment"));const r=qe(e);kr(e,t,Pn);const i=pr(r,n);return new On(r,"signInViaPopup",t,i).executeNotNull()})}function bx(e,t,n){return k(this,null,function*(){const r=ke(e);if(Ge(r.auth.app))return Promise.reject(ft(r.auth,"operation-not-supported-in-this-environment"));kr(r.auth,t,Pn);const i=pr(r.auth,n);return new On(r.auth,"reauthViaPopup",t,i,r).executeNotNull()})}function yx(e,t,n){return k(this,null,function*(){const r=ke(e);kr(r.auth,t,Pn);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 ie(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(ft(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(ft(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(ft(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,mx.get())};t()}}On.currentPopupAction=null;/**
|
|
1906
1906
|
* @license
|
|
1907
1907
|
* Copyright 2020 Google LLC
|
|
1908
1908
|
*
|
|
@@ -1917,7 +1917,7 @@
|
|
|
1917
1917
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1918
1918
|
* See the License for the specific language governing permissions and
|
|
1919
1919
|
* limitations under the License.
|
|
1920
|
-
*/const Cx="pendingRedirect",Li=new Map;class Bi extends uf{constructor(t,n,r=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}execute(){return
|
|
1920
|
+
*/const Cx="pendingRedirect",Li=new Map;class Bi extends uf{constructor(t,n,r=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}execute(){return k(this,null,function*(){let t=Li.get(this.auth._key());if(!t){try{const r=(yield xx(this.resolver,this.auth))?yield Ir(Bi.prototype,this,"execute").call(this):null;t=()=>Promise.resolve(r)}catch(n){t=()=>Promise.reject(n)}Li.set(this.auth._key(),t)}return this.bypassAuthState||Li.set(this.auth._key(),()=>Promise.resolve(null)),t()})}onAuthEvent(t){return k(this,null,function*(){if(t.type==="signInViaRedirect")return Ir(Bi.prototype,this,"onAuthEvent").call(this,t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){const n=yield this.auth._redirectUserForId(t.eventId);if(n)return this.user=n,Ir(Bi.prototype,this,"onAuthEvent").call(this,t);this.resolve(null)}})}onExecution(){return k(this,null,function*(){})}cleanUp(){}}function xx(e,t){return k(this,null,function*(){const n=ff(t),r=df(e);if(!(yield r._isAvailable()))return!1;const i=(yield r._get(n))==="true";return yield r._remove(n),i})}function hl(e,t){return k(this,null,function*(){return df(e)._set(ff(t),"true")})}function wx(){Li.clear()}function pl(e,t){Li.set(e._key(),t)}function df(e){return Vt(e._redirectPersistence)}function ff(e){return ur(Cx,e.config.apiKey,e.name)}/**
|
|
1921
1921
|
* @license
|
|
1922
1922
|
* Copyright 2020 Google LLC
|
|
1923
1923
|
*
|
|
@@ -1932,7 +1932,7 @@
|
|
|
1932
1932
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1933
1933
|
* See the License for the specific language governing permissions and
|
|
1934
1934
|
* limitations under the License.
|
|
1935
|
-
*/function Ix(e,t,n){return Sx(e,t,n)}function Sx(e,t,n){return
|
|
1935
|
+
*/function Ix(e,t,n){return Sx(e,t,n)}function Sx(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=qe(e);kr(e,t,Pn),yield r._initializationPromise;const i=pr(r,n);return yield hl(i,r),i._openRedirect(r,t,"signInViaRedirect")})}function Ax(e,t,n){return Tx(e,t,n)}function Tx(e,t,n){return k(this,null,function*(){const r=ke(e);if(kr(r.auth,t,Pn),Ge(r.auth.app))return Promise.reject(bt(r.auth));yield r.auth._initializationPromise;const i=pr(r.auth,n);yield hl(i,r.auth);const o=yield hf(r);return i._openRedirect(r.auth,t,"reauthViaRedirect",o)})}function Ex(e,t,n){return _x(e,t,n)}function _x(e,t,n){return k(this,null,function*(){const r=ke(e);kr(r.auth,t,Pn),yield r.auth._initializationPromise;const i=pr(r.auth,n);yield Fo(!1,r,t.providerId),yield hl(i,r.auth);const o=yield hf(r);return i._openRedirect(r.auth,t,"linkViaRedirect",o)})}function kx(e,t){return k(this,null,function*(){return yield qe(e)._initializationPromise,qo(e,t,!1)})}function qo(e,t,n=!1){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=qe(e),i=pr(r,t),a=yield new Bi(r,i,n).execute();return a&&!n&&(delete a.user._redirectEventId,yield r._persistUserIfCurrent(a.user),yield r._setRedirectUser(null,t)),a})}function hf(e){return k(this,null,function*(){const t=Ri(`${e.uid}:::`);return e._redirectEventId=t,yield e.auth._setRedirectUser(e),yield e.auth._persistUserIfCurrent(e),t})}/**
|
|
1936
1936
|
* @license
|
|
1937
1937
|
* Copyright 2020 Google LLC
|
|
1938
1938
|
*
|
|
@@ -1962,7 +1962,7 @@
|
|
|
1962
1962
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1963
1963
|
* See the License for the specific language governing permissions and
|
|
1964
1964
|
* limitations under the License.
|
|
1965
|
-
*/function vf(n){return
|
|
1965
|
+
*/function vf(n){return k(this,arguments,function*(e,t={}){return Ke(e,"GET","/v1/projects",t)})}/**
|
|
1966
1966
|
* @license
|
|
1967
1967
|
* Copyright 2020 Google LLC
|
|
1968
1968
|
*
|
|
@@ -1977,7 +1977,7 @@
|
|
|
1977
1977
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1978
1978
|
* See the License for the specific language governing permissions and
|
|
1979
1979
|
* limitations under the License.
|
|
1980
|
-
*/const Ox=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Rx=/^https?/;function Mx(e){return
|
|
1980
|
+
*/const Ox=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Rx=/^https?/;function Mx(e){return k(this,null,function*(){if(e.config.emulator)return;const{authorizedDomains:t}=yield vf(e);for(const n of t)try{if(Lx(n))return}catch(r){}vt(e,"unauthorized-domain")})}function Lx(e){const t=wi(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const a=new URL(e);return a.hostname===""&&r===""?n==="chrome-extension:"&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):n==="chrome-extension:"&&a.hostname===r}if(!Rx.test(n))return!1;if(Ox.test(e))return r===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}/**
|
|
1981
1981
|
* @license
|
|
1982
1982
|
* Copyright 2020 Google LLC.
|
|
1983
1983
|
*
|
|
@@ -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 Fx=new Ii(5e3,15e3),zx="__/auth/iframe",jx="emulator/auth/iframe",Vx={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Ux=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Hx(e){const t=e.config;ie(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?Qs(t,jx):`https://${e.config.authDomain}/${zx}`,r={apiKey:t.apiKey,appName:e.name,v:cr},i=Ux.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 Wx(e){return
|
|
2010
|
+
*/const Fx=new Ii(5e3,15e3),zx="__/auth/iframe",jx="emulator/auth/iframe",Vx={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Ux=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Hx(e){const t=e.config;ie(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?Qs(t,jx):`https://${e.config.authDomain}/${zx}`,r={apiKey:t.apiKey,appName:e.name,v:cr},i=Ux.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 Wx(e){return k(this,null,function*(){const t=yield Nx(e),n=st().gapi;return ie(n,e,"internal-error"),t.open({where:document.body,url:Hx(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Vx,dontclear:!0},r=>new Promise((i,o)=>k(this,null,function*(){yield r.restyle({setHideOnLeave:!1});const a=ft(e,"network-request-failed"),l=st().setTimeout(()=>{o(a)},Fx.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
|
*
|
|
@@ -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 Zx="__/auth/handler",ew="emulator/auth/handler",tw=encodeURIComponent("fac");function gl(e,t,n,r,i,o){return
|
|
2040
|
+
*/const Zx="__/auth/handler",ew="emulator/auth/handler",tw=encodeURIComponent("fac");function gl(e,t,n,r,i,o){return k(this,null,function*(){ie(e.config.authDomain,e,"auth-domain-config-required"),ie(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 Pn){t.setDefaultLanguage(e.languageCode),a.providerId=t.providerId||"",Tb(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?`#${tw}=${encodeURIComponent(s)}`:"";return`${nw(e)}?${Sr(l).slice(1)}${c}`})}function nw({config:e}){return e.emulator?Qs(e,ew):`https://${e.authDomain}/${Zx}`}/**
|
|
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 ml="webStorageSupport";class rw{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Qn,this._completeRedirectFn=qo,this._overrideRedirectResult=pl}_openPopup(t,n,r,i){return
|
|
2055
|
+
*/const ml="webStorageSupport";class rw{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Qn,this._completeRedirectFn=qo,this._overrideRedirectResult=pl}_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 gl(t,n,r,wi(),i);return Jx(t,a,Ri())})}_openRedirect(t,n,r,i){return k(this,null,function*(){yield this._originValidation(t);const o=yield gl(t,n,r,wi(),i);return zC(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 Wx(t),r=new pf(t);return n.register("authEvent",i=>(ie(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(ml,{type:ml},i=>{var o;const a=(o=i==null?void 0:i[0])===null||o===void 0?void 0:o[ml];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]=Mx(t)),this.originValidationPromises[n]}get _shouldInitProactively(){return Bd()||Pd()||_i()}}const Cf=rw;class iw{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 vl extends iw{constructor(t){super("phone"),this.credential=t}static _fromCredential(t){return new vl(t)}_finalizeEnroll(t,n,r){return RC(t,{idToken:n,displayName:r,phoneVerificationInfo:this.credential._makeVerificationRequest()})}_finalizeSignIn(t,n){return QC(t,{mfaPendingCredential:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}class xf{constructor(){}static assertion(t){return vl._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 ow{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
|
|
2070
|
+
*/class ow{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(){ie(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
|
*
|
|
@@ -2097,7 +2097,7 @@
|
|
|
2097
2097
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2098
2098
|
* See the License for the specific language governing permissions and
|
|
2099
2099
|
* limitations under the License.
|
|
2100
|
-
*/const lw=5*60,cw=ju("authIdTokenMaxAge")||lw;let Sf=null;const uw=e=>t=>
|
|
2100
|
+
*/const lw=5*60,cw=ju("authIdTokenMaxAge")||lw;let Sf=null;const uw=e=>t=>k(this,null,function*(){const n=t&&(yield t.getIdTokenResult()),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>cw)return;const i=n==null?void 0:n.token;Sf!==i&&(Sf=i,yield fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});function dw(e=od()){const t=Po(e,"auth");if(t.isInitialized())return t.getImmediate();const n=Oy(e,{popupRedirectResolver:Cf,persistence:[Fr,Uo,Qn]}),r=ju("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const o=new URL(r,location.origin);if(location.origin===o.origin){const a=uw(o.toString());DC(n,a,()=>a(n.currentUser)),kC(n,l=>a(l))}}const i=bb("auth");return i&&el(n,`http://${i}`),n}function fw(){var e,t;return(t=(e=document.getElementsByTagName("head"))===null||e===void 0?void 0:e[0])!==null&&t!==void 0?t:document}Ay({loadJS(e){return new Promise((t,n)=>{const r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=i=>{const o=ft("internal-error");o.customData=i,n(o)},r.type="text/javascript",r.charset="UTF-8",fw().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="}),sw("Browser");/**
|
|
2101
2101
|
* @license
|
|
2102
2102
|
* Copyright 2021 Google LLC
|
|
2103
2103
|
*
|
|
@@ -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 hw=2e3;function pw(e,t,n){return
|
|
2130
|
+
*/const hw=2e3;function pw(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 yw(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,gl(e,n,t.type,void 0,(r=t.eventId)!==null&&r!==void 0?r:void 0,a)})}function gw(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 mw(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,vy()?"_blank":"_system","location=yes"),n(i)})})}function vw(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(ft(e,"redirect-cancelled-by-user"))},hw))}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 bw(e){var t,n,r,i,o,a,l,s,c,d;const f=gr();ie(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"}),ie(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"}),ie(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"}),ie(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"}),ie(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 yw(e){return k(this,null,function*(){const t=Cw(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 Cw(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
|
*
|
|
@@ -2142,7 +2142,7 @@
|
|
|
2142
2142
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2143
2143
|
* See the License for the specific language governing permissions and
|
|
2144
2144
|
* limitations under the License.
|
|
2145
|
-
*/const xw=20;class ww extends pf{constructor(){super(...arguments),this.passiveListeners=new Set,this.initPromise=new Promise(t=>{this.resolveInitialized=t})}addPassiveListener(t){this.passiveListeners.add(t)}removePassiveListener(t){this.passiveListeners.delete(t)}resetRedirect(){this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1}onEvent(t){return this.resolveInitialized(),this.passiveListeners.forEach(n=>n(t)),super.onEvent(t)}initialized(){return
|
|
2145
|
+
*/const xw=20;class ww extends pf{constructor(){super(...arguments),this.passiveListeners=new Set,this.initPromise=new Promise(t=>{this.resolveInitialized=t})}addPassiveListener(t){this.passiveListeners.add(t)}removePassiveListener(t){this.passiveListeners.delete(t)}resetRedirect(){this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1}onEvent(t){return this.resolveInitialized(),this.passiveListeners.forEach(n=>n(t)),super.onEvent(t)}initialized(){return k(this,null,function*(){yield this.initPromise})}}function Iw(e,t,n=null){return{type:t,eventId:n,urlResponse:null,sessionId:Tw(),postBody:null,tenantId:e.tenantId,error:ft(e,"no-auth-event")}}function Sw(e,t){return bl()._set(yl(e),t)}function Af(e){return k(this,null,function*(){const t=yield bl()._get(yl(e));return t&&(yield bl()._remove(yl(e))),t})}function Aw(e,t){var n,r;const i=_w(t);if(i.includes("/__/auth/callback")){const o=Jo(i),a=o.firebaseError?Ew(decodeURIComponent(o.firebaseError)):null,l=(r=(n=a==null?void 0:a.code)===null||n===void 0?void 0:n.split("auth/"))===null||r===void 0?void 0:r[1],s=l?ft(l):null;return s?{type:e.type,eventId:e.eventId,tenantId:e.tenantId,error:s,urlResponse:null,sessionId:null,postBody:null}:{type:e.type,eventId:e.eventId,tenantId:e.tenantId,sessionId:e.sessionId,urlResponse:i,postBody:null}}return null}function Tw(){const e=[],t="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let n=0;n<xw;n++){const r=Math.floor(Math.random()*t.length);e.push(t.charAt(r))}return e.join("")}function bl(){return Vt(Uo)}function yl(e){return ur("authEvent",e.config.apiKey,e.name)}function Ew(e){try{return JSON.parse(e)}catch(t){return null}}function _w(e){const t=Jo(e),n=t.link?decodeURIComponent(t.link):void 0,r=Jo(n).link,i=t.deep_link_id?decodeURIComponent(t.deep_link_id):void 0;return Jo(i).link||i||r||n||e}function Jo(e){if(!(e!=null&&e.includes("?")))return{};const[t,...n]=e.split("?");return Ar(n.join("?"))}/**
|
|
2146
2146
|
* @license
|
|
2147
2147
|
* Copyright 2021 Google LLC
|
|
2148
2148
|
*
|
|
@@ -2157,7 +2157,7 @@
|
|
|
2157
2157
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2158
2158
|
* See the License for the specific language governing permissions and
|
|
2159
2159
|
* limitations under the License.
|
|
2160
|
-
*/const kw=500;class Dw{constructor(){this._redirectPersistence=Qn,this._shouldInitProactively=!0,this.eventManagers=new Map,this.originValidationPromises={},this._completeRedirectFn=qo,this._overrideRedirectResult=pl}_initialize(t){return
|
|
2160
|
+
*/const kw=500;class Dw{constructor(){this._redirectPersistence=Qn,this._shouldInitProactively=!0,this.eventManagers=new Map,this.originValidationPromises={},this._completeRedirectFn=qo,this._overrideRedirectResult=pl}_initialize(t){return k(this,null,function*(){const n=t._key();let r=this.eventManagers.get(n);return r||(r=new ww(t),this.eventManagers.set(n,r),this.attachCallbackListeners(t,r)),r})}_openPopup(t){vt(t,"operation-not-supported-in-this-environment")}_openRedirect(t,n,r,i){return k(this,null,function*(){bw(t);const o=yield this._initialize(t);yield o.initialized(),o.resetRedirect(),wx(),yield this._originValidation(t);const a=Iw(t,r,i);yield Sw(t,a);const l=yield pw(t,a,n),s=yield mw(l);return vw(t,o,s)})}_isIframeWebStorageSupported(t,n){throw new Error("Method not implemented.")}_originValidation(t){const n=t._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=gw(t)),this.originValidationPromises[n]}attachCallbackListeners(t,n){const{universalLinks:r,handleOpenURL:i,BuildInfo:o}=gr(),a=setTimeout(()=>k(this,null,function*(){yield Af(t),n.onEvent(Tf())}),kw),l=d=>k(this,null,function*(){clearTimeout(a);const f=yield Af(t);let h=null;f&&(d!=null&&d.url)&&(h=Aw(f,d.url)),n.onEvent(h||Tf())});typeof r!="undefined"&&typeof r.subscribe=="function"&&r.subscribe(null,l);const s=i,c=`${o.packageName.toLowerCase()}://`;gr().handleOpenURL=d=>k(this,null,function*(){if(d.toLowerCase().startsWith(c)&&l({url:d}),typeof s=="function")try{s(d)}catch(f){console.error(f)}})}}const Pw=Dw;function Tf(){return{type:"unknown",eventId:null,sessionId:null,urlResponse:null,postBody:null,tenantId:null,error:ft("no-auth-event")}}/**
|
|
2161
2161
|
* @license
|
|
2162
2162
|
* Copyright 2017 Google LLC
|
|
2163
2163
|
*
|
|
@@ -2187,7 +2187,7 @@
|
|
|
2187
2187
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2188
2188
|
* See the License for the specific language governing permissions and
|
|
2189
2189
|
* limitations under the License.
|
|
2190
|
-
*/const Lw=1e3;function $i(){var e;return((e=self==null?void 0:self.location)===null||e===void 0?void 0:e.protocol)||null}function Bw(){return $i()==="http:"||$i()==="https:"}function Ef(e=dt()){return!!(($i()==="file:"||$i()==="ionic:"||$i()==="capacitor:")&&e.toLowerCase().match(/iphone|ipad|ipod|android/))}function $w(){return Ps()||Vu()}function Nw(){return Wu()&&(document==null?void 0:document.documentMode)===11}function Fw(e=dt()){return/Edge\/\d+/.test(e)}function zw(e=dt()){return Nw()||Fw(e)}function _f(){try{const e=self.localStorage,t=Ri();if(e)return e.setItem(t,"1"),e.removeItem(t),zw()?_o():!0}catch(e){return Cl()&&_o()}return!1}function Cl(){return typeof global!="undefined"&&"WorkerGlobalScope"in global&&"importScripts"in global}function xl(){return(Bw()||Hu()||Ef())&&!$w()&&_f()&&!Cl()}function kf(){return Ef()&&typeof document!="undefined"}function jw(){return
|
|
2190
|
+
*/const Lw=1e3;function $i(){var e;return((e=self==null?void 0:self.location)===null||e===void 0?void 0:e.protocol)||null}function Bw(){return $i()==="http:"||$i()==="https:"}function Ef(e=dt()){return!!(($i()==="file:"||$i()==="ionic:"||$i()==="capacitor:")&&e.toLowerCase().match(/iphone|ipad|ipod|android/))}function $w(){return Ps()||Vu()}function Nw(){return Wu()&&(document==null?void 0:document.documentMode)===11}function Fw(e=dt()){return/Edge\/\d+/.test(e)}function zw(e=dt()){return Nw()||Fw(e)}function _f(){try{const e=self.localStorage,t=Ri();if(e)return e.setItem(t,"1"),e.removeItem(t),zw()?_o():!0}catch(e){return Cl()&&_o()}return!1}function Cl(){return typeof global!="undefined"&&"WorkerGlobalScope"in global&&"importScripts"in global}function xl(){return(Bw()||Hu()||Ef())&&!$w()&&_f()&&!Cl()}function kf(){return Ef()&&typeof document!="undefined"}function jw(){return k(this,null,function*(){return kf()?new Promise(e=>{const t=setTimeout(()=>{e(!1)},Lw);document.addEventListener("deviceready",()=>{clearTimeout(t),e(!0)})}):!1})}function Vw(){return typeof window!="undefined"?window:null}/**
|
|
2191
2191
|
* @license
|
|
2192
2192
|
* Copyright 2020 Google LLC
|
|
2193
2193
|
*
|
|
@@ -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=ie,Df="persistence";function Uw(e,t){if(Ni(Object.values(Ut).includes(t),e,"invalid-persistence-type"),Ps()){Ni(t!==Ut.SESSION,e,"unsupported-persistence-type");return}if(Vu()){Ni(t===Ut.NONE,e,"unsupported-persistence-type");return}if(Cl()){Ni(t===Ut.NONE||t===Ut.LOCAL&&_o(),e,"unsupported-persistence-type");return}Ni(t===Ut.NONE||_f(),e,"unsupported-persistence-type")}function wl(e){return
|
|
2205
|
+
*/const Ut={LOCAL:"local",NONE:"none",SESSION:"session"},Ni=ie,Df="persistence";function Uw(e,t){if(Ni(Object.values(Ut).includes(t),e,"invalid-persistence-type"),Ps()){Ni(t!==Ut.SESSION,e,"unsupported-persistence-type");return}if(Vu()){Ni(t===Ut.NONE,e,"unsupported-persistence-type");return}if(Cl()){Ni(t===Ut.NONE||t===Ut.LOCAL&&_o(),e,"unsupported-persistence-type");return}Ni(t===Ut.NONE||_f(),e,"unsupported-persistence-type")}function wl(e){return k(this,null,function*(){yield e._initializationPromise;const t=Pf(),n=ur(Df,e.config.apiKey,e.name);t&&t.setItem(n,e._getPersistence())})}function Hw(e,t){const n=Pf();if(!n)return[];const r=ur(Df,e,t);switch(n.getItem(r)){case Ut.NONE:return[Pr];case Ut.LOCAL:return[Fr,Qn];case Ut.SESSION:return[Qn];default:return[]}}function Pf(){var e;try{return((e=Vw())===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 Ww=ie;class Jn{constructor(){this.browserResolver=Vt(Cf),this.cordovaResolver=Vt(Pw),this.underlyingResolver=null,this._redirectPersistence=Qn,this._completeRedirectFn=qo,this._overrideRedirectResult=pl}_initialize(t){return
|
|
2220
|
+
*/const Ww=ie;class Jn{constructor(){this.browserResolver=Vt(Cf),this.cordovaResolver=Vt(Pw),this.underlyingResolver=null,this._redirectPersistence=Qn,this._completeRedirectFn=qo,this._overrideRedirectResult=pl}_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 Ww(this.underlyingResolver,"internal-error"),this.underlyingResolver}selectUnderlyingResolver(){return k(this,null,function*(){if(this.underlyingResolver)return;const t=yield jw();this.underlyingResolver=t?this.cordovaResolver:this.browserResolver})}}/**
|
|
2221
2221
|
* @license
|
|
2222
2222
|
* Copyright 2020 Google LLC
|
|
2223
2223
|
*
|
|
@@ -2247,7 +2247,7 @@
|
|
|
2247
2247
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2248
2248
|
* See the License for the specific language governing permissions and
|
|
2249
2249
|
* limitations under the License.
|
|
2250
|
-
*/function Yw(e){return Rf(e)}function Kw(e,t){var n;const r=(n=t.customData)===null||n===void 0?void 0:n._tokenResponse;if((t==null?void 0:t.code)==="auth/multi-factor-auth-required"){const i=t;i.resolver=new qw(e,PC(e,t))}else if(r){const i=Rf(t),o=t;i&&(o.credential=i,o.tenantId=r.tenantId||void 0,o.email=r.email||void 0,o.phoneNumber=r.phoneNumber||void 0)}}function Rf(e){const{_tokenResponse:t}=e instanceof $t?e.customData:e;if(!t)return null;if(!(e instanceof $t)&&"temporaryProof"in t&&"phoneNumber"in t)return hr.credentialFromResult(e);const n=t.providerId;if(!n||n===xi.PASSWORD)return null;let r;switch(n){case xi.GOOGLE:r=mn;break;case xi.FACEBOOK:r=gn;break;case xi.GITHUB:r=vn;break;case xi.TWITTER:r=bn;break;default:const{oauthIdToken:i,oauthAccessToken:o,oauthTokenSecret:a,pendingToken:l,nonce:s}=t;return!o&&!a&&!i&&!l?null:l?n.startsWith("saml.")?Br._create(n,l):pn._fromParams({providerId:n,signInMethod:n,pendingToken:l,idToken:i,accessToken:o}):new Lr(n).credential({idToken:i,accessToken:o,rawNonce:s})}return e instanceof $t?r.credentialFromError(e):r.credentialFromResult(e)}function Nt(e,t){return t.catch(n=>{throw n instanceof $t&&Kw(e,n),n}).then(n=>{const r=n.operationType,i=n.user;return{operationType:r,credential:Yw(n),additionalUserInfo:_C(n),user:Rn.getOrCreate(i)}})}function Il(e,t){return
|
|
2250
|
+
*/function Yw(e){return Rf(e)}function Kw(e,t){var n;const r=(n=t.customData)===null||n===void 0?void 0:n._tokenResponse;if((t==null?void 0:t.code)==="auth/multi-factor-auth-required"){const i=t;i.resolver=new qw(e,PC(e,t))}else if(r){const i=Rf(t),o=t;i&&(o.credential=i,o.tenantId=r.tenantId||void 0,o.email=r.email||void 0,o.phoneNumber=r.phoneNumber||void 0)}}function Rf(e){const{_tokenResponse:t}=e instanceof $t?e.customData:e;if(!t)return null;if(!(e instanceof $t)&&"temporaryProof"in t&&"phoneNumber"in t)return hr.credentialFromResult(e);const n=t.providerId;if(!n||n===xi.PASSWORD)return null;let r;switch(n){case xi.GOOGLE:r=mn;break;case xi.FACEBOOK:r=gn;break;case xi.GITHUB:r=vn;break;case xi.TWITTER:r=bn;break;default:const{oauthIdToken:i,oauthAccessToken:o,oauthTokenSecret:a,pendingToken:l,nonce:s}=t;return!o&&!a&&!i&&!l?null:l?n.startsWith("saml.")?Br._create(n,l):pn._fromParams({providerId:n,signInMethod:n,pendingToken:l,idToken:i,accessToken:o}):new Lr(n).credential({idToken:i,accessToken:o,rawNonce:s})}return e instanceof $t?r.credentialFromError(e):r.credentialFromResult(e)}function Nt(e,t){return t.catch(n=>{throw n instanceof $t&&Kw(e,n),n}).then(n=>{const r=n.operationType,i=n.user;return{operationType:r,credential:Yw(n),additionalUserInfo:_C(n),user:Rn.getOrCreate(i)}})}function Il(e,t){return k(this,null,function*(){const n=yield t;return{verificationId:n.verificationId,confirm:r=>Nt(e,n.confirm(r))}})}class qw{constructor(t,n){this.resolver=n,this.auth=Gw(t)}get session(){return this.resolver.session}get hints(){return this.resolver.hints}resolveSignIn(t){return Nt(Of(this.auth),this.resolver.resolveSignIn(t))}}/**
|
|
2251
2251
|
* @license
|
|
2252
2252
|
* Copyright 2020 Google LLC
|
|
2253
2253
|
*
|
|
@@ -2262,7 +2262,7 @@
|
|
|
2262
2262
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2263
2263
|
* See the License for the specific language governing permissions and
|
|
2264
2264
|
* limitations under the License.
|
|
2265
|
-
*/class Rn{constructor(t){this._delegate=t,this.multiFactor=LC(t)}static getOrCreate(t){return Rn.USER_MAP.has(t)||Rn.USER_MAP.set(t,new Rn(t)),Rn.USER_MAP.get(t)}delete(){return this._delegate.delete()}reload(){return this._delegate.reload()}toJSON(){return this._delegate.toJSON()}getIdTokenResult(t){return this._delegate.getIdTokenResult(t)}getIdToken(t){return this._delegate.getIdToken(t)}linkAndRetrieveDataWithCredential(t){return this.linkWithCredential(t)}linkWithCredential(t){return
|
|
2265
|
+
*/class Rn{constructor(t){this._delegate=t,this.multiFactor=LC(t)}static getOrCreate(t){return Rn.USER_MAP.has(t)||Rn.USER_MAP.set(t,new Rn(t)),Rn.USER_MAP.get(t)}delete(){return this._delegate.delete()}reload(){return this._delegate.reload()}toJSON(){return this._delegate.toJSON()}getIdTokenResult(t){return this._delegate.getIdTokenResult(t)}getIdToken(t){return this._delegate.getIdToken(t)}linkAndRetrieveDataWithCredential(t){return this.linkWithCredential(t)}linkWithCredential(t){return k(this,null,function*(){return Nt(this.auth,Qd(this._delegate,t))})}linkWithPhoneNumber(t,n){return k(this,null,function*(){return Il(this.auth,ux(this._delegate,t,n))})}linkWithPopup(t){return k(this,null,function*(){return Nt(this.auth,yx(this._delegate,t,Jn))})}linkWithRedirect(t){return k(this,null,function*(){return yield wl(qe(this.auth)),Ex(this._delegate,t,Jn)})}reauthenticateAndRetrieveDataWithCredential(t){return this.reauthenticateWithCredential(t)}reauthenticateWithCredential(t){return k(this,null,function*(){return Nt(this.auth,Jd(this._delegate,t))})}reauthenticateWithPhoneNumber(t,n){return Il(this.auth,dx(this._delegate,t,n))}reauthenticateWithPopup(t){return Nt(this.auth,bx(this._delegate,t,Jn))}reauthenticateWithRedirect(t){return k(this,null,function*(){return yield wl(qe(this.auth)),Ax(this._delegate,t,Jn)})}sendEmailVerification(t){return vC(this._delegate,t)}unlink(t){return k(this,null,function*(){return yield rC(this._delegate,t),this})}updateEmail(t){return xC(this._delegate,t)}updatePassword(t){return wC(this._delegate,t)}updatePhoneNumber(t){return fx(this._delegate,t)}updateProfile(t){return CC(this._delegate,t)}verifyBeforeUpdateEmail(t,n){return bC(this._delegate,t,n)}get emailVerified(){return this._delegate.emailVerified}get isAnonymous(){return this._delegate.isAnonymous}get metadata(){return this._delegate.metadata}get phoneNumber(){return this._delegate.phoneNumber}get providerData(){return this._delegate.providerData}get refreshToken(){return this._delegate.refreshToken}get tenantId(){return this._delegate.tenantId}get displayName(){return this._delegate.displayName}get email(){return this._delegate.email}get photoURL(){return this._delegate.photoURL}get providerId(){return this._delegate.providerId}get uid(){return this._delegate.uid}get auth(){return this._delegate.auth}}Rn.USER_MAP=new WeakMap;/**
|
|
2266
2266
|
* @license
|
|
2267
2267
|
* Copyright 2020 Google LLC
|
|
2268
2268
|
*
|
|
@@ -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=ie;class Sl{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:Qw(r,t.name),popupRedirectResolver:i}}),this._delegate._updateErrorMap(Q0),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){el(this._delegate,t,n)}applyActionCode(t){return lC(this._delegate,t)}checkActionCode(t){return Xd(this._delegate,t)}confirmPasswordReset(t,n){return sC(this._delegate,t,n)}createUserWithEmailAndPassword(t,n){return
|
|
2280
|
+
*/const Fi=ie;class Sl{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:Qw(r,t.name),popupRedirectResolver:i}}),this._delegate._updateErrorMap(Q0),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){el(this._delegate,t,n)}applyActionCode(t){return lC(this._delegate,t)}checkActionCode(t){return Xd(this._delegate,t)}confirmPasswordReset(t,n){return sC(this._delegate,t,n)}createUserWithEmailAndPassword(t,n){return k(this,null,function*(){return Nt(this._delegate,uC(this._delegate,t,n))})}fetchProvidersForEmail(t){return this.fetchSignInMethodsForEmail(t)}fetchSignInMethodsForEmail(t){return mC(this._delegate,t)}isSignInWithEmailLink(t){return hC(this._delegate,t)}getRedirectResult(){return k(this,null,function*(){Fi(xl(),this._delegate,"operation-not-supported-in-this-environment");const t=yield kx(this._delegate,Jn);return t?Nt(this._delegate,Promise.resolve(t)):{credential:null,user:null}})}addFrameworkForLogging(t){Ow(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 fC(this._delegate,t,n)}sendPasswordResetEmail(t,n){return aC(this._delegate,t,n||void 0)}setPersistence(t){return k(this,null,function*(){Uw(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=Pr;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,nC(this._delegate))}signInWithCredential(t){return Nt(this._delegate,zo(this._delegate,t))}signInWithCustomToken(t){return Nt(this._delegate,oC(this._delegate,t))}signInWithEmailAndPassword(t,n){return Nt(this._delegate,dC(this._delegate,t,n))}signInWithEmailLink(t,n){return Nt(this._delegate,pC(this._delegate,t,n))}signInWithPhoneNumber(t,n){return Il(this._delegate,cx(this._delegate,t,n))}signInWithPopup(t){return k(this,null,function*(){return Fi(xl(),this._delegate,"operation-not-supported-in-this-environment"),Nt(this._delegate,vx(this._delegate,t,Jn))})}signInWithRedirect(t){return k(this,null,function*(){return Fi(xl(),this._delegate,"operation-not-supported-in-this-environment"),yield wl(this._delegate),Ix(this._delegate,t,Jn)})}updateCurrentUser(t){return this._delegate.updateCurrentUser(t)}verifyPasswordResetCode(t){return cC(this._delegate,t)}unwrap(){return this._delegate}_delete(){return this._delegate._delete()}linkUnderlyingAuth(){this._delegate.wrapped=()=>this}}Sl.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 Qw(e,t){const n=Hw(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(Pr)||n.push(Pr),n}/**
|
|
2281
2281
|
* @license
|
|
2282
2282
|
* Copyright 2020 Google LLC
|
|
2283
2283
|
*
|
|
@@ -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 Zw="auth-compat";function eI(e){e.INTERNAL.registerComponent(new Un(Zw,t=>{const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("auth");return new Sl(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:Al,PhoneMultiFactorGenerator:xf,RecaptchaVerifier:Xw,TwitterAuthProvider:bn,Auth:Sl,AuthCredential:Rr,Error:$t}).setInstantiationMode("LAZY").setMultipleInstances(!1)),e.registerVersion(Rw,Mw)}eI(Yn);let Lf=!1;const zi=e=>{if(Lf)return Yn.auth();if(e&&e==="dev"){Yn.initializeApp({apiKey:"api_key"});const n=dw();el(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-DPV1TYL0JW"};Yn.initializeApp(n)}return Lf=!0,Yn.auth()},tI=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 nI{constructor(t,n){le(this,"apiKey","");le(this,"clientId","");le(this,"environment","");le(this,"mainQueryParams",{key:"",client_id:""});le(this,"headers",{"Content-Type":"application/json"});le(this,"clientApiBaseUrl","");le(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");le(this,"sportal365Config",null);le(this,"generateSignedInUrl",t=>D(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:Z(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(t)})}));le(this,"storeInBucket",(t,n,r)=>D(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)}));le(this,"fetchImagesFromSportal365",(t,n,r)=>D(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=Z(H({},o),{from:n.from})),n.to&&(o=Z(H({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));le(this,"getSchedulersByEntityId",t=>D(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:Z(H({},this.headers),{Authorization:"Bearer "+i})})}));le(this,"setSchedulers",(t,n,r)=>D(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:Z(H({},this.headers),{Authorization:"Bearer "+l}),body:JSON.stringify(t),method:o})}));le(this,"deleteScheduledTask",t=>D(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:Z(H({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));le(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}`);le(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)});le(this,"getToken",()=>D(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=tI(this.environment)}}const rI=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",iI=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",oI=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",aI=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",sI=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",lI=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?";class cI extends nI{constructor(n,r){super(n,r);le(this,"loyaltyBaseUrl","");le(this,"predictionBaseUrl","");le(this,"miniGamesApiBaseUrl","");le(this,"reportingApiBaseUrl","");le(this,"votingApiBaseUrl","");le(this,"customResolverUrl","");le(this,"getClientById",()=>D(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:Z(H({},this.headers),{Authorization:"Bearer "+i})})}));le(this,"createTemplate",n=>D(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));le(this,"editTemplate",(n,r)=>D(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));le(this,"deleteTemplate",n=>D(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));le(this,"setWinners",n=>D(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));le(this,"exportDetailedLeaderboard",(n,r)=>D(this,null,function*(){const i=`/leaderboard/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(Z(H({},this.mainQueryParams),{limit:r.toString()})),{headers:Z(H({},this.headers),{Authorization:"Bearer "+o})})}));le(this,"exportDetailedGameLeaderboard",(n,r)=>D(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(Z(H({},this.mainQueryParams),{limit:r.toString()})),{headers:Z(H({},this.headers),{Authorization:"Bearer "+o})})}));le(this,"createGame",n=>D(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));le(this,"editGame",(n,r)=>D(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));le(this,"getClassicQuizFeature",()=>D(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));le(this,"getEitherOrFeature",()=>D(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));le(this,"getPollFeature",()=>D(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));le(this,"createClassicQuiz",n=>D(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));le(this,"updateClassicQuiz",(n,r)=>D(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));le(this,"getClassicQuizById",n=>D(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+i})})}));le(this,"deleteClassicQuiz",n=>D(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));le(this,"calculateQuestionsReport",n=>D(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:Z(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));le(this,"exportUsers",n=>D(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));le(this,"getClassicQuizParticipations",(n,r,i,o)=>D(this,null,function*(){const a="/classic-quizzes/participations?",l=Z(H({},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:Z(H({},this.headers),{Authorization:"Bearer "+s})})}));le(this,"getEntityParticipations",(n,r,i)=>D(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=Z(H({},this.mainQueryParams),{from_date:r,to_date:i}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:Z(H({},this.headers),{Authorization:"Bearer "+l})})}));le(this,"getPollById",n=>D(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+i})})}));le(this,"createPoll",n=>D(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));le(this,"updatePoll",(n,r)=>D(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));le(this,"deletePoll",n=>D(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));le(this,"getLists",(n,r,i="DESC")=>D(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:Z(H({},this.headers),{Authorization:"Bearer "+l})})}));le(this,"getListById",n=>D(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:Z(H({},this.headers),{Authorization:"Bearer "+o})})}));le(this,"getListContent",(n,r,i="DESC",o)=>D(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:Z(H({},this.headers),{Authorization:"Bearer "+s})})}));le(this,"createList",n=>D(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:Z(H({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));le(this,"updateList",(n,r)=>D(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:Z(H({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));le(this,"deleteList",n=>D(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:Z(H({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));le(this,"getLanguageConfig",()=>D(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:Z(H({},this.headers),{Authorization:"Bearer "+i})})}));le(this,"updateLanguageConfig",n=>D(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:Z(H({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));le(this,"createBracketGame",n=>D(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));le(this,"updateBracketGame",(n,r)=>D(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Z(H({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));le(this,"resolvePredictions",n=>D(this,null,function*(){const i=yield this.getToken();return yield fetch(this.customResolverUrl+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:Z(H({},this.headers),{Authorization:"Bearer "+i}),signal:AbortSignal.timeout(6e5)})}));this.loyaltyBaseUrl=rI(n.environment),this.predictionBaseUrl=iI(n.environment),this.miniGamesApiBaseUrl=oI(n.environment),this.reportingApiBaseUrl=aI(n.environment),this.votingApiBaseUrl=sI(n.environment),this.customResolverUrl=lI(n.environment)}}const uI=(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"}`},Tl=x.createContext(null),dI=({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=uI(e.sportal365Project,e.sportal365Infrastructure),i=Me.FansUnitedSDK(n),o=new cI(n,r);return u.jsx(Tl.Provider,{value:{sdk:i,https:o},children:t})},Bf=x.createContext(null),fI=({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 P(){return P=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},P.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:{}},hI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",pI=hI,gI=pI;function Nf(){}function Ff(){}Ff.resetWarningCache=Nf;var mI=function(){function e(r,i,o,a,l,s){if(s!==gI){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=mI();var vI=$f.exports;function bI(e){return typeof e=="string"}function yI(e,t,n){return e===void 0||bI(e)?t:P({},t,{ownerState:P({},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 CI(e,t,n){return typeof e=="function"?e(t,n):e}function xI(e){const{rootElementName:t="",componentName:n}=e,[r,i]=z.useState(t.toUpperCase()),o=z.useCallback(a=>{var l;i((l=a==null?void 0:a.tagName)!=null?l:"")},[]);return[r,o]}function wI(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function sn(...e){return z.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{wI(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 II(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),g=P({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),m=P({},n,i,r);return p.length>0&&(m.className=p),Object.keys(g).length>0&&(m.style=g),{props:m,internalRef:void 0}}const a=Mn(P({},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=P({},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=P({},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(z.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?P({},e):e;return Xn(e)&&Xn(t)&&Object.keys(t).forEach(i=>{z.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 Xo(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 Zw="auth-compat";function eI(e){e.INTERNAL.registerComponent(new Un(Zw,t=>{const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("auth");return new Sl(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:Al,PhoneMultiFactorGenerator:xf,RecaptchaVerifier:Xw,TwitterAuthProvider:bn,Auth:Sl,AuthCredential:Rr,Error:$t}).setInstantiationMode("LAZY").setMultipleInstances(!1)),e.registerVersion(Rw,Mw)}eI(Yn);let Lf=!1;const zi=e=>{if(Lf)return Yn.auth();if(e&&e==="dev"){Yn.initializeApp({apiKey:"api_key"});const n=dw();el(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-DPV1TYL0JW"};Yn.initializeApp(n)}return Lf=!0,Yn.auth()},tI=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 nI{constructor(t,n){ae(this,"apiKey","");ae(this,"clientId","");ae(this,"environment","");ae(this,"mainQueryParams",{key:"",client_id:""});ae(this,"headers",{"Content-Type":"application/json"});ae(this,"clientApiBaseUrl","");ae(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");ae(this,"sportal365Config",null);ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(t)})}));ae(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)}));ae(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(H({},o),{from:n.from})),n.to&&(o=X(H({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));ae(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(H({},this.headers),{Authorization:"Bearer "+i})})}));ae(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(H({},this.headers),{Authorization:"Bearer "+l}),body:JSON.stringify(t),method:o})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ae(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}`);ae(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)});ae(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=tI(this.environment)}}const rI=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",iI=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",oI=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",aI=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",sI=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",lI=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?";class cI extends nI{constructor(n,r){super(n,r);ae(this,"loyaltyBaseUrl","");ae(this,"predictionBaseUrl","");ae(this,"miniGamesApiBaseUrl","");ae(this,"reportingApiBaseUrl","");ae(this,"votingApiBaseUrl","");ae(this,"customResolverUrl","");ae(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(H({},this.headers),{Authorization:"Bearer "+i})})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ae(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(H({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ae(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(H({},this.mainQueryParams),{limit:r.toString()})),{headers:X(H({},this.headers),{Authorization:"Bearer "+o})})}));ae(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(H({},this.mainQueryParams),{limit:r.toString()})),{headers:X(H({},this.headers),{Authorization:"Bearer "+o})})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ae(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(H({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));ae(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))}));ae(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))}));ae(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))}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ae(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(H({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i})})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ae(this,"getClassicQuizParticipations",(n,r,i,o)=>k(this,null,function*(){const a="/classic-quizzes/participations?",l=X(H({},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(H({},this.headers),{Authorization:"Bearer "+s})})}));ae(this,"getEntityParticipations",(n,r,i)=>k(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=X(H({},this.mainQueryParams),{from_date:r,to_date:i}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:X(H({},this.headers),{Authorization:"Bearer "+l})})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ae(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(H({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i})})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ae(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(H({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));ae(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(H({},this.headers),{Authorization:"Bearer "+l})})}));ae(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(H({},this.headers),{Authorization:"Bearer "+o})})}));ae(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(H({},this.headers),{Authorization:"Bearer "+s})})}));ae(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(H({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));ae(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(H({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));ae(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(H({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i})})}));ae(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(H({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));ae(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(H({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));ae(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(H({},this.headers),{Authorization:"Bearer "+i}),signal:AbortSignal.timeout(6e5)})}));this.loyaltyBaseUrl=rI(n.environment),this.predictionBaseUrl=iI(n.environment),this.miniGamesApiBaseUrl=oI(n.environment),this.reportingApiBaseUrl=aI(n.environment),this.votingApiBaseUrl=sI(n.environment),this.customResolverUrl=lI(n.environment)}}const uI=(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"}`},Tl=x.createContext(null),dI=({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=uI(e.sportal365Project,e.sportal365Infrastructure),i=Me.FansUnitedSDK(n),o=new cI(n,r);return u.jsx(Tl.Provider,{value:{sdk:i,https:o},children:t})},Bf=x.createContext(null),fI=({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 P(){return P=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},P.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:{}},hI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",pI=hI,gI=pI;function Nf(){}function Ff(){}Ff.resetWarningCache=Nf;var mI=function(){function e(r,i,o,a,l,s){if(s!==gI){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=mI();var vI=$f.exports;function bI(e){return typeof e=="string"}function yI(e,t,n){return e===void 0||bI(e)?t:P({},t,{ownerState:P({},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 CI(e,t,n){return typeof e=="function"?e(t,n):e}function xI(e){const{rootElementName:t="",componentName:n}=e,[r,i]=z.useState(t.toUpperCase()),o=z.useCallback(a=>{var l;i((l=a==null?void 0:a.tagName)!=null?l:"")},[]);return[r,o]}function wI(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function sn(...e){return z.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{wI(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 II(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),g=P({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),m=P({},n,i,r);return p.length>0&&(m.className=p),Object.keys(g).length>0&&(m.style=g),{props:m,internalRef:void 0}}const a=Mn(P({},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=P({},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=P({},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(z.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?P({},e):e;return Xn(e)&&Xn(t)&&Object.keys(t).forEach(i=>{z.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 Xo(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"),Zo=Symbol.for("react.fragment"),ea=Symbol.for("react.strict_mode"),ta=Symbol.for("react.profiler"),na=Symbol.for("react.consumer"),ra=Symbol.for("react.context"),ia=Symbol.for("react.forward_ref"),oa=Symbol.for("react.suspense"),aa=Symbol.for("react.suspense_list"),sa=Symbol.for("react.memo"),la=Symbol.for("react.lazy"),SI=Symbol.for("react.offscreen"),AI=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 Zo:case ta:case ea:case oa:case aa:return e;default:switch(e=e&&e.$$typeof,e){case ra:case ia:case la:case sa:return e;case na:return e;default:return t}}case _l:return t}}}$e.ContextConsumer=na,$e.ContextProvider=ra,$e.Element=El,$e.ForwardRef=ia,$e.Fragment=Zo,$e.Lazy=la,$e.Memo=sa,$e.Portal=_l,$e.Profiler=ta,$e.StrictMode=ea,$e.Suspense=oa,$e.SuspenseList=aa,$e.isContextConsumer=function(e){return Xt(e)===na},$e.isContextProvider=function(e){return Xt(e)===ra},$e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===El},$e.isForwardRef=function(e){return Xt(e)===ia},$e.isFragment=function(e){return Xt(e)===Zo},$e.isLazy=function(e){return Xt(e)===la},$e.isMemo=function(e){return Xt(e)===sa},$e.isPortal=function(e){return Xt(e)===_l},$e.isProfiler=function(e){return Xt(e)===ta},$e.isStrictMode=function(e){return Xt(e)===ea},$e.isSuspense=function(e){return Xt(e)===oa},$e.isSuspenseList=function(e){return Xt(e)===aa},$e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Zo||e===ta||e===ea||e===oa||e===aa||e===SI||typeof e=="object"&&e!==null&&(e.$$typeof===la||e.$$typeof===sa||e.$$typeof===ra||e.$$typeof===na||e.$$typeof===ia||e.$$typeof===AI||e.getModuleId!==void 0)},$e.typeOf=Xt,Hf.exports=$e;var Wf=Hf.exports;function ye(e){if(typeof e!="string")throw new Error(Xo(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Gf(e,t){var n,r;return z.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 TI=typeof window!="undefined"?z.useLayoutEffect:z.useEffect;let Yf=0;function EI(e){const[t,n]=z.useState(e),r=e||t;return z.useEffect(()=>{t==null&&(Yf+=1,n(`mui-${Yf}`))},[t]),r}const Kf=z.useId;function ji(e){if(Kf!==void 0){const t=Kf();return e!=null?e:t}return EI(e)}function kl({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=z.useRef(e!==void 0),[o,a]=z.useState(t),l=i?e:o,s=z.useCallback(c=>{i||a(c)},[]);return[l,s]}class Dl{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Dl}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let ca=!0,Pl=!1;const _I=new Dl,kI={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 DI(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&kI[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function PI(e){e.metaKey||e.altKey||e.ctrlKey||(ca=!0)}function Ol(){ca=!1}function OI(){this.visibilityState==="hidden"&&Pl&&(ca=!0)}function RI(e){e.addEventListener("keydown",PI,!0),e.addEventListener("mousedown",Ol,!0),e.addEventListener("pointerdown",Ol,!0),e.addEventListener("touchstart",Ol,!0),e.addEventListener("visibilitychange",OI,!0)}function MI(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return ca||DI(t)}function qf(){const e=z.useCallback(i=>{i!=null&&RI(i.ownerDocument)},[]),t=z.useRef(!1);function n(){return t.current?(Pl=!0,_I.start(100,()=>{Pl=!1}),t.current=!1,!0):!1}function r(i){return MI(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Qf(e,t){const n=P({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=P({},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]=P({},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,LI=(()=>{let e=Jf;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Jf}}})(),BI={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=BI[t];return r?`${n}-${r}`:`${LI.generate(e)}-${t}`}function $I(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=z.useRef(null),[d,f]=z.useState(!1),{isFocusVisibleRef:h,onFocus:p,onBlur:g,ref:m}=qf(),[v,I]=z.useState(!1);t&&!n&&v&&I(!1),z.useEffect(()=>{h.current=v},[v,h]);const[w,y]=xI({rootElementName:s!=null?s:r||a?"a":void 0,componentName:"Button"}),C=$=>B=>{var L;v&&B.preventDefault(),(L=$.onMouseLeave)==null||L.call($,B)},b=$=>B=>{var L;g(B),h.current===!1&&I(!1),(L=$.onBlur)==null||L.call($,B)},A=$=>B=>{var L;if(c.current||(c.current=B.currentTarget),p(B),h.current===!0){var V;I(!0),(V=$.onFocusVisible)==null||V.call($,B)}(L=$.onFocus)==null||L.call($,B)},E=()=>{const $=c.current;return w==="BUTTON"||w==="INPUT"&&["button","submit","reset"].includes($==null?void 0:$.type)||w==="A"&&($==null?void 0:$.href)},k=$=>B=>{if(!t){var L;(L=$.onClick)==null||L.call($,B)}},F=$=>B=>{var L;t||(f(!0),document.addEventListener("mouseup",()=>{f(!1)},{once:!0})),(L=$.onMouseDown)==null||L.call($,B)},Y=$=>B=>{var L;if((L=$.onKeyDown)==null||L.call($,B),!B.defaultMuiPrevented&&(B.target===B.currentTarget&&!E()&&B.key===" "&&B.preventDefault(),B.target===B.currentTarget&&B.key===" "&&!t&&f(!0),B.target===B.currentTarget&&!E()&&B.key==="Enter"&&!t)){var V;(V=$.onClick)==null||V.call($,B),B.preventDefault()}},W=$=>B=>{var L;if(B.target===B.currentTarget&&f(!1),(L=$.onKeyUp)==null||L.call($,B),B.target===B.currentTarget&&!E()&&!t&&B.key===" "&&!B.defaultMuiPrevented){var V;(V=$.onClick)==null||V.call($,B)}},T=sn(y,i,m,c),U={};return o!==void 0&&(U.tabIndex=o),w==="BUTTON"?(U.type=l!=null?l:"button",n?U["aria-disabled"]=t:U.disabled=t):w==="INPUT"?l&&["button","submit","reset"].includes(l)&&(n?U["aria-disabled"]=t:U.disabled=t):w!==""&&(!r&&!a&&(U.role="button",U.tabIndex=o!=null?o:0),t&&(U["aria-disabled"]=t,U.tabIndex=n?o!=null?o:0:-1)),{getRootProps:($={})=>{const B=P({},Mn(e),Mn($)),L=P({type:l},B,U,$,{onBlur:b(B),onClick:k(B),onFocus:A(B),onKeyDown:Y(B),onKeyUp:W(B),onMouseDown:F(B),onMouseLeave:C(B),ref:T});return delete L.onFocusVisible,L},focusVisible:v,setFocusVisible:I,active:d,rootRef:T}}function NI(e,t){return e===t}const Ml={},Zf=()=>{};function Ll(e,t){const n=P({},e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n}function FI(e){const{nextState:t,initialState:n,stateComparers:r,onStateChange:i,controlledProps:o,lastActionRef:a}=e,l=z.useRef(n);z.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:NI,h=t[c],p=s[c];if(p==null&&h!=null||p!=null&&h==null||p!=null&&h!=null&&!f(h,p)){var g,m;i==null||i((g=a.current.event)!=null?g:null,c,h,(m=a.current.type)!=null?m:"",t)}}),l.current=t,a.current=null},[l,t,a,i,r,o])}function zI(e){const t=z.useRef(null),{reducer:n,initialState:r,controlledProps:i=Ml,stateComparers:o=Ml,onStateChange:a=Zf,actionContext:l,componentName:s=""}=e;z.useRef(i);const c=z.useCallback((p,g)=>{t.current=g;const m=Ll(p,i);return n(m,g)},[i,n]),[d,f]=z.useReducer(c,r),h=z.useCallback(p=>{f(P({},p,{context:l}))},[l]);return FI({nextState:d,initialState:r,stateComparers:o!=null?o:Ml,onStateChange:a!=null?a:Zf,controlledProps:i,lastActionRef:t}),[Ll(d,i),h]}const jI=z.createContext(void 0);function VI(){return z.useContext(jI)}function UI(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=VI();let f,h,p,g,m;if(d){var v,I,w;f=void 0,h=(v=d.disabled)!=null?v:!1,p=(I=d.error)!=null?I:!1,g=(w=d.required)!=null?w:!1,m=d.value}else f=t,h=n,p=r,g=l,m=s;const{current:y}=z.useRef(m!=null),C=z.useCallback($=>{},[]),b=z.useRef(null),A=sn(b,c,C),[E,k]=z.useState(!1);z.useEffect(()=>{!d&&h&&E&&(k(!1),i==null||i())},[d,h,E,i]);const F=$=>B=>{var L;if(d!=null&&d.disabled){B.stopPropagation();return}if((L=$.onFocus)==null||L.call($,B),d&&d.onFocus){var V;d==null||(V=d.onFocus)==null||V.call(d)}else k(!0)},Y=$=>B=>{var L;(L=$.onBlur)==null||L.call($,B),d&&d.onBlur?d.onBlur():k(!1)},W=$=>(B,...L)=>{var V,q;if(!y&&(B.target||b.current)==null)throw new Error(Xo(17));d==null||(V=d.onChange)==null||V.call(d,B),(q=$.onChange)==null||q.call($,B,...L)},T=$=>B=>{var L;b.current&&B.currentTarget===B.target&&b.current.focus(),(L=$.onClick)==null||L.call($,B)};return{disabled:h,error:p,focused:E,formControlContext:d,getInputProps:($={})=>{const L=P({},{onBlur:i,onChange:o,onFocus:a},Mn($)),V=P({},L,{onBlur:Y(L),onChange:W(L),onFocus:F(L)});return P({},V,{"aria-invalid":p||void 0,defaultValue:f,value:m,required:g,disabled:h},$,{ref:A},V)},getRootProps:($={})=>{const B=Mn(e,["onBlur","onChange","onFocus"]),L=P({},B,Mn($));return P({},$,L,{onClick:T(L)})},inputRef:A,required:g,value:m}}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 HI(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 Pt(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(I=>s(I,e));let p,g,m=!a;switch(t){case"reset":if(d===-1)return null;p=0,g="next",m=!1;break;case"start":p=0,g="next",m=!1;break;case"end":p=f,g="previous",m=!1;break;default:{const I=h+t;I<0?!m&&h!==-1||Math.abs(t)>1?(p=0,g="next"):(p=f,g="previous"):I>f?!m||Math.abs(t)>1?(p=f,g="previous"):(p=0,g="next"):(p=I,g=t>=0?"next":"previous")}}const v=HI(p,g,i,l,o,m);return v===-1&&e!==null&&!o(e,h)?e:(r=i[v])!=null?r:null}function WI(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=WI(e,l,o,r);return P({},t,{selectedValues:c,highlightedValue:e})}function GI(e,t,n){const r=t.highlightedValue,{orientation:i,pageSize:o}=n;switch(e){case"Home":return P({},t,{highlightedValue:Pt(r,"start",n)});case"End":return P({},t,{highlightedValue:Pt(r,"end",n)});case"PageUp":return P({},t,{highlightedValue:Pt(r,-o,n)});case"PageDown":return P({},t,{highlightedValue:Pt(r,o,n)});case"ArrowUp":if(i!=="vertical")break;return P({},t,{highlightedValue:Pt(r,-1,n)});case"ArrowDown":if(i!=="vertical")break;return P({},t,{highlightedValue:Pt(r,1,n)});case"ArrowLeft":{if(i==="vertical")break;return P({},t,{highlightedValue:Pt(r,i==="horizontal-ltr"?-1:1,n)})}case"ArrowRight":{if(i==="vertical")break;return P({},t,{highlightedValue:Pt(r,i==="horizontal-ltr"?1:-1,n)})}case"Enter":case" ":return t.highlightedValue===null?t:eh(t.highlightedValue,t,n)}return t}function YI(e,t){return t.focusManagement==="DOM"?e:P({},e,{highlightedValue:null})}function KI(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 qI(e,t,n){const{items:r,isItemDisabled:i,disabledItemsFocusable:o,getItemAsString:a}=n,l=t.length>1;let s=l?e.highlightedValue:Pt(e.highlightedValue,1,n);for(let c=0;c<r.length;c+=1){if(!s||!l&&e.highlightedValue===s)return e;if(KI(s,t,a)&&(!i(s,r.indexOf(s))||o))return P({},e,{highlightedValue:s});s=Pt(s,1,n)}return e}function QI(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=Pt(null,"reset",r));const d=((i=n.selectedValues)!=null?i:[]).filter(f=>e.some(h=>o(h,f)));return P({},n,{highlightedValue:l,selectedValues:d})}function JI(e,t){return P({},e,{highlightedValue:Pt(null,"reset",t)})}function XI(e,t){return P({},e,{highlightedValue:Pt(null,"end",t)})}function ZI(e,t){return P({},e,{selectedValues:[],highlightedValue:Pt(null,"reset",t)})}function th(e,t){const{type:n,context:r}=t;switch(n){case yt.keyDown:return GI(t.key,e,r);case yt.itemClick:return eh(t.item,e,r);case yt.blur:return YI(e,r);case yt.textNavigation:return qI(e,t.searchString,r);case yt.itemsChange:return QI(t.items,t.previousItems,e,r);case yt.resetHighlight:return JI(e,r);case yt.highlightLast:return XI(e,r);case yt.clearSelection:return ZI(e,r);default:return e}}const eS=500;function tS(e){const t=z.useRef({searchString:"",lastTime:null});return z.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>eS?r.searchString=i:(r.searchString.length!==1||i!==r.searchString)&&(r.searchString+=i),r.lastTime=o,e(r.searchString,n)}},[e])}const nh={},nS=()=>{},rS=(e,t)=>e===t,iS=()=>!1,oS=e=>typeof e=="string"?e:String(e),aS=()=>({highlightedValue:null,selectedValues:[]});function sS(e){const{controlledProps:t=nh,disabledItemsFocusable:n=!1,disableListWrap:r=!1,focusManagement:i="activeDescendant",getInitialState:o=aS,getItemDomElement:a,getItemId:l,isItemDisabled:s=iS,rootRef:c,onStateChange:d=nS,items:f,itemComparer:h=rS,getItemAsString:p=oS,onChange:g,onHighlightChange:m,onItemsChange:v,orientation:I="vertical",pageSize:w=5,reducerActionContext:y=nh,selectionMode:C="single",stateReducer:b,componentName:A="useList"}=e,E=z.useRef(null),k=sn(c,E),F=z.useCallback((oe,J,se)=>{if(m==null||m(oe,J,se),i==="DOM"&&J!=null&&(se===yt.itemClick||se===yt.keyDown||se===yt.textNavigation)){var ne;a==null||(ne=a(J))==null||ne.focus()}},[a,m,i]),Y=z.useMemo(()=>({highlightedValue:h,selectedValues:(oe,J)=>zf(oe,J,h)}),[h]),W=z.useCallback((oe,J,se,ne,ge)=>{switch(d==null||d(oe,J,se,ne,ge),J){case"highlightedValue":F(oe,se,ne);break;case"selectedValues":g==null||g(oe,se,ne);break}},[F,g,d]),T=z.useMemo(()=>({disabledItemsFocusable:n,disableListWrap:r,focusManagement:i,isItemDisabled:s,itemComparer:h,items:f,getItemAsString:p,onHighlightChange:F,orientation:I,pageSize:w,selectionMode:C,stateComparers:Y}),[n,r,i,s,h,f,p,F,I,w,C,Y]),U=o(),G=b!=null?b:th,$=z.useMemo(()=>P({},y,T),[y,T]),[B,L]=zI({reducer:G,actionContext:$,initialState:U,controlledProps:t,stateComparers:Y,onStateChange:W,componentName:A}),{highlightedValue:V,selectedValues:q}=B,ee=tS((oe,J)=>L({type:yt.textNavigation,event:J,searchString:oe})),O=z.useRef([]);z.useEffect(()=>{zf(O.current,f,h)||(L({type:yt.itemsChange,event:null,items:f,previousItems:O.current}),O.current=f,v==null||v(f))},[f,h,L,v]);const M=oe=>J=>{var se;if((se=oe.onKeyDown)==null||se.call(oe,J),J.defaultMuiPrevented)return;const ne=["Home","End","PageUp","PageDown"];I==="vertical"?ne.push("ArrowUp","ArrowDown"):ne.push("ArrowLeft","ArrowRight"),i==="activeDescendant"&&ne.push(" ","Enter"),ne.includes(J.key)&&J.preventDefault(),L({type:yt.keyDown,key:J.key,event:J}),ee(J)},N=oe=>J=>{var se,ne;(se=oe.onBlur)==null||se.call(oe,J),!J.defaultMuiPrevented&&((ne=E.current)!=null&&ne.contains(J.relatedTarget)||L({type:yt.blur,event:J}))},j=(oe={})=>{const J=Mn(oe);return P({},oe,{"aria-activedescendant":i==="activeDescendant"&&V!=null?l(V):void 0,tabIndex:i==="DOM"?-1:0,ref:k},J,{onBlur:N(J),onKeyDown:M(J)})},te=z.useCallback(oe=>{const J=(q!=null?q:[]).some(ge=>ge!=null&&h(oe,ge)),se=V!=null&&h(oe,V);return{focusable:i==="DOM",highlighted:se,selected:J}},[h,q,V,i]),ae=z.useMemo(()=>({dispatch:L,getItemState:te}),[L,te]);return z.useDebugValue({state:B}),{contextValue:ae,dispatch:L,getRootProps:j,rootRef:k,state:B}}const rh=z.createContext(null);function lS(e){const{handlePointerOverEvents:t=!1,item:n}=e,r=z.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=z.useCallback(p=>g=>{var m;(m=p.onClick)==null||m.call(p,g),!g.defaultPrevented&&i({type:yt.itemClick,item:n,event:g})},[i,n]),d=z.useCallback(p=>g=>{var m;(m=p.onMouseOver)==null||m.call(p,g),!g.defaultPrevented&&i({type:yt.itemHover,item:n,event:g})},[i,n]);let f;return s&&(f=a?0:-1),{getRootProps:(p={})=>{const g=Mn(p);return P({},p,{onClick:c(g),onPointerOver:t?d(g):void 0,tabIndex:f})},highlighted:a,selected:l}}const Bl=z.createContext(null);function cS(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]=z.useState(new Map),n=z.useRef(new Set),r=z.useCallback(function(c){n.current.delete(c),t(d=>{const f=new Map(d);return f.delete(c),f})},[]),i=z.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=z.useMemo(()=>cS(e),[e]),a=z.useCallback(function(c){return Array.from(o.keys()).indexOf(c)},[o]);return{contextValue:z.useMemo(()=>({getItemIndex:a,registerItem:i,totalSubitemCount:e.size}),[a,i,e.size]),subitems:o}}function oh(e,t){const n=z.useContext(Bl);if(n===null)throw new Error("useCompoundItem must be used within a useCompoundParent");const{registerItem:r}=n,[i,o]=z.useState(typeof e=="function"?void 0:e);return TI(()=>{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 uS(e,t){return function(r={}){const i=P({},r,e(r));return P({},i,t(i))}}const dS=Math.min,fS=Math.max,ua=Math.round,da=Math.floor,fa=e=>({x:e,y:e});function hS(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 pS(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 gS(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function mS(e){return["html","body","#document"].includes(ah(e))}function Nl(e){return $n(e).getComputedStyle(e)}function vS(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=vS(e);return mS(t)?e.ownerDocument?e.ownerDocument.body:e.body:$l(t)&&uh(t)?t:dh(t)}function ha(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?ha(l):[])}return t.concat(i,ha(i,[],n))}function Fl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bS(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=ua(n)!==o||ua(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function zl(e){return pS(e)?e:e.contextElement}function fh(e){const t=zl(e);if(!$l(t))return fa(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=bS(t);let a=(o?ua(n.width):n.width)/r,l=(o?ua(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const yS=fa(0);function CS(e){const t=$n(e);return!gS()||!t.visualViewport?yS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xS(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=fa(1);t&&(a=fh(e));const l=xS()?CS(o):fa(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 g=h,m=Fl(g);for(;m&&r&&p!==g;){const v=fh(m),I=m.getBoundingClientRect(),w=Nl(m),y=I.left+(m.clientLeft+parseFloat(w.paddingLeft))*v.x,C=I.top+(m.clientTop+parseFloat(w.paddingTop))*v.y;s*=v.x,c*=v.y,d*=v.x,f*=v.y,s+=y,c+=C,g=$n(m),m=Fl(g)}}return hS({width:d,height:f,x:s,y:c})}function wS(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=da(d),g=da(i.clientWidth-(c+f)),m=da(i.clientHeight-(d+h)),v=da(c),w={rootMargin:-p+"px "+-g+"px "+-m+"px "+-v+"px",threshold:fS(0,dS(1,s))||1};let y=!0;function C(b){const A=b[0].intersectionRatio;if(A!==s){if(!y)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(C,Z(H({},w),{root:i.ownerDocument}))}catch(b){n=new IntersectionObserver(C,w)}n.observe(e)}return a(!0),o}function IS(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?ha(c):[],...ha(t)]:[];d.forEach(I=>{i&&I.addEventListener("scroll",n,{passive:!0}),o&&I.addEventListener("resize",n)});const f=c&&l?wS(c,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(I=>{let[w]=I;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 g,m=s?hh(e):null;s&&v();function v(){const I=hh(e);m&&(I.x!==m.x||I.y!==m.y||I.width!==m.width||I.height!==m.height)&&n(),m=I,g=requestAnimationFrame(v)}return n(),()=>{var I;d.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),f==null||f(),(I=p)==null||I.disconnect(),p=null,s&&cancelAnimationFrame(g)}}function SS(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=k=>F=>{var Y;F.nativeEvent.defaultPrevented||(f(F.target.checked),o==null||o(F),(Y=k.onChange)==null||Y.call(k,F))},{isFocusVisibleRef:p,onBlur:g,onFocus:m,ref:v}=qf(),[I,w]=z.useState(!1);r&&I&&w(!1),z.useEffect(()=>{p.current=I},[I,p]);const y=z.useRef(null),C=k=>F=>{var Y;y.current||(y.current=F.currentTarget),m(F),p.current===!0&&(w(!0),l==null||l(F)),a==null||a(F),(Y=k.onFocus)==null||Y.call(k,F)},b=k=>F=>{var Y;g(F),p.current===!1&&w(!1),i==null||i(F),(Y=k.onBlur)==null||Y.call(k,F)},A=sn(v,y);return{checked:d,disabled:!!r,focusVisible:I,getInputProps:(k={})=>P({checked:t,defaultChecked:n,disabled:r,readOnly:s,ref:A,required:c,type:"checkbox",role:"switch","aria-checked":t},k,{onChange:h(k),onFocus:C(k),onBlur:b(k)}),inputRef:A,readOnly:!!s}}function AS(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=z.useCallback((v,I)=>{s(I),r==null||r(v,I)},[r,s]),{subitems:d,contextValue:f}=ih(),h=z.useRef(()=>{}),p=z.useCallback(v=>{var I;return(I=d.get(v))==null?void 0:I.id},[d]),g=z.useCallback(v=>h.current(v),[]),m=z.useCallback(v=>{h.current=v},[]);return{contextValue:P({direction:o,getTabId:g,getTabPanelId:p,onSelected:c,orientation:i,registerTabIdLookup:m,selectionFollowsFocus:a,value:l},f)}}const ph=z.createContext(null);function pa(){const e=z.useContext(ph);if(e==null)throw new Error("No TabsContext provided");return e}function TS(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,g=z.useMemo(()=>({getItemIndex:i,registerItem:l,totalSubitemCount:d}),[l,i,d]),m=z.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:g,children:u.jsx(ph.Provider,{value:m,children:n})})}function ES(e){return e.size}function _S(e){const{value:t,id:n,rootRef:r}=e,i=pa();if(i===null)throw new Error("No TabContext provided");const{value:o,getTabId:a}=i,l=ji(n),s=z.useRef(null),c=sn(s,r),d=z.useMemo(()=>({id:l,ref:s}),[l]),{id:f}=oh(t!=null?t:ES,d),h=f!==o,p=f!==void 0?a(f):void 0;return{hidden:h,getRootProps:(m={})=>P({"aria-labelledby":p!=null?p:void 0,hidden:h,id:l!=null?l:void 0},m,{ref:c}),rootRef:c}}const gh={valueChange:"valueChange"};function kS(e,t){if(t.type===gh.valueChange)return P({},e,{highlightedValue:t.value});const n=th(e,t),{context:{selectionFollowsFocus:r}}=t;if(t.type===yt.itemsChange){if(n.selectedValues.length>0)return P({},n,{highlightedValue:n.selectedValues[0]});Pt(null,"reset",t.context)}return r&&n.highlightedValue!=null?P({},n,{selectedValues:[n.highlightedValue]}):n}function DS(e){var t;const{rootRef:n}=e,{direction:r="ltr",onSelected:i,orientation:o="horizontal",value:a,registerTabIdLookup:l,selectionFollowsFocus:s}=pa(),{subitems:c,contextValue:d}=ih(),f=z.useCallback(W=>{var T;return(T=c.get(W))==null?void 0:T.id},[c]);l(f);const h=z.useMemo(()=>Array.from(c.keys()),[c]),p=z.useCallback(W=>{var T,U;return W==null?null:(T=(U=c.get(W))==null?void 0:U.ref.current)!=null?T:null},[c]),g=r==="rtl";let m;o==="vertical"?m="vertical":m=g?"horizontal-rtl":"horizontal-ltr";const v=z.useCallback((W,T)=>{var U;i(W,(U=T[0])!=null?U:null)},[i]),I=z.useMemo(()=>a===void 0?{}:a!=null?{selectedValues:[a]}:{selectedValues:[]},[a]),w=z.useCallback(W=>{var T,U;return(T=(U=c.get(W))==null?void 0:U.disabled)!=null?T:!1},[c]),{contextValue:y,dispatch:C,getRootProps:b,state:{highlightedValue:A,selectedValues:E},rootRef:k}=sS({controlledProps:I,disabledItemsFocusable:!s,focusManagement:"DOM",getItemDomElement:p,isItemDisabled:w,items:h,rootRef:n,onChange:v,orientation:m,reducerActionContext:z.useMemo(()=>({selectionFollowsFocus:s||!1}),[s]),selectionMode:"single",stateReducer:kS});z.useEffect(()=>{a!==void 0&&a!=null&&C({type:gh.valueChange,value:a})},[C,a]);const F=(W={})=>P({},W,b(W),{"aria-orientation":o==="vertical"?"vertical":void 0,role:"tablist"});return{contextValue:z.useMemo(()=>P({},d,y),[d,y]),dispatch:C,getRootProps:F,highlightedValue:A,isRtl:g,orientation:o,rootRef:k,selectedValue:(t=E[0])!=null?t:null}}function PS(e){const{value:t,children:n}=e,{dispatch:r,getItemIndex:i,getItemState:o,registerItem:a,totalSubitemCount:l}=t,s=z.useMemo(()=>({dispatch:r,getItemState:o,getItemIndex:i}),[r,i,o]),c=z.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 OS(e){return e.size}function RS(e){const{value:t,rootRef:n,disabled:r=!1,id:i}=e,o=z.useRef(null),a=ji(i),{value:l,selectionFollowsFocus:s,getTabPanelId:c}=pa(),d=z.useMemo(()=>({disabled:r,ref:o,id:a}),[r,o,a]),{id:f,index:h,totalItemCount:p}=oh(t!=null?t:OS,d),{getRootProps:g,highlighted:m,selected:v}=lS({item:f}),{getRootProps:I,rootRef:w,active:y,focusVisible:C,setFocusVisible:b}=Rl({disabled:r,focusableWhenDisabled:!s,type:"button"}),A=sn(o,n,w),E=f!==void 0?c(f):void 0;return{getRootProps:(F={})=>{const Y=Mn(F),W=uS(g,I);return P({},F,W(Y),{role:"tab","aria-controls":E,"aria-selected":v,id:a,ref:A})},active:y,focusVisible:C,highlighted:m,index:h,rootRef:A,selected:v||f===l,setFocusVisible:b,totalTabsCount:p}}const mh="$$joy";function MS(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}function LS(e,t){return Lt(e,t)}const BS=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},$S=["values","unit","step"],NS=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)=>P({},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,$S),o=NS(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 g=a.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]: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 P({keys:a,values:o,up:l,down:s,between:c,only:d,not:f,unit:n},i)}const FS={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 zS(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function jS(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 ga(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=ga(c,i,f);return f===h&&typeof f=="string"&&(h=ga(c,i,`${t}${f==="default"?"":ye(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function VS(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const US={m:"margin",p:"padding"},HS={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},yh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},WS=VS(e=>{if(e.length>2)if(yh[e])e=yh[e];else return[e];const[t,n]=e.split(""),r=US[t],i=HS[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 GS(e,t){return n=>e.reduce((r,i)=>(r[i]=Hi(t,n),r),{})}function YS(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=WS(n),o=GS(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=>YS(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 ma(...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 KS=en("border",Zt),qS=en("borderTop",Zt),QS=en("borderRight",Zt),JS=en("borderBottom",Zt),XS=en("borderLeft",Zt),ZS=en("borderColor"),eA=en("borderTopColor"),tA=en("borderRightColor"),nA=en("borderBottomColor"),rA=en("borderLeftColor"),iA=en("outline",Zt),oA=en("outlineColor"),va=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};va.propTypes={},va.filterProps=["borderRadius"],ma(KS,qS,QS,JS,XS,ZS,eA,tA,nA,rA,va,iA,oA);const ba=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};ba.propTypes={},ba.filterProps=["gap"];const ya=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};ya.propTypes={},ya.filterProps=["columnGap"];const Ca=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};Ca.propTypes={},Ca.filterProps=["rowGap"];const aA=rt({prop:"gridColumn"}),sA=rt({prop:"gridRow"}),lA=rt({prop:"gridAutoFlow"}),cA=rt({prop:"gridAutoColumns"}),uA=rt({prop:"gridAutoRows"}),dA=rt({prop:"gridTemplateColumns"}),fA=rt({prop:"gridTemplateRows"}),hA=rt({prop:"gridTemplateAreas"}),pA=rt({prop:"gridArea"});ma(ba,ya,Ca,aA,sA,lA,cA,uA,dA,fA,hA,pA);function zr(e,t){return t==="grey"?t:e}const gA=rt({prop:"color",themeKey:"palette",transform:zr}),mA=rt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:zr}),vA=rt({prop:"backgroundColor",themeKey:"palette",transform:zr});ma(gA,mA,vA);function Ht(e){return e<=1&&e!==0?`${e*100}%`:e}const bA=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 yA=rt({prop:"minWidth",transform:Ht}),CA=rt({prop:"height",transform:Ht}),xA=rt({prop:"maxHeight",transform:Ht}),wA=rt({prop:"minHeight",transform:Ht});rt({prop:"size",cssProperty:"width",transform:Ht}),rt({prop:"size",cssProperty:"height",transform:Ht});const IA=rt({prop:"boxSizing"});ma(bA,Hl,yA,CA,xA,wA,IA);const xa={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:va},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:ba},rowGap:{style:Ca},columnGap:{style:ya},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 SA(...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 AA(e,t){return typeof e=="function"?e(t):e}function TA(){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,g=>{let m=ga(h,d,g);return g===m&&typeof g=="string"&&(m=ga(h,d,`${n}${g==="default"?"":ye(g)}`,g)),s===!1?m:{[s]:m}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:xa;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=zS(o.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const g=AA(c[p],o);if(g!=null)if(typeof g=="object")if(a[p])h=Vi(h,e(p,g,o,a));else{const m=Nn({theme:o},g,v=>({[p]:v}));SA(m,g)?h[p]=t({sx:g,theme:o}):h=Vi(h,m)}else h=Vi(h,e(p,g,o,a))}),jS(f,h)}return Array.isArray(i)?i.map(l):l(i)}return t}const wa=TA();wa.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 EA=["breakpoints","palette","spacing","shape"];function Sh(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=Ae(e,EA),l=vh(n),s=wh(i);let c=Bn({breakpoints:l,direction:"ltr",components:{},palette:P({mode:"light"},r),spacing:s,shape:P({},FS,o)},a);return c.applyStyles=Ih,c=t.reduce((d,f)=>Bn(d,f),c),c.unstable_sxConfig=P({},xa,a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(f){return wa({sx:f,theme:this})},c}function _A(e){return Object.keys(e).length===0}function kA(e=null){const t=z.useContext(pe.ThemeContext);return!t||_A(t)?e:t}const DA=Sh();function PA(e=DA){return kA(e)}const OA=["sx"],RA=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:xa;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function MA(e){const{sx:t}=e,n=Ae(e,OA),{systemProps:r,otherProps:i}=RA(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...a)=>{const l=t(...a);return Xn(l)?P({},r,l):r}:o=P({},r,t),P({},i,{sx:o})}const LA=["ownerState"],BA=["variants"],$A=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function NA(e){return Object.keys(e).length===0}function FA(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const zA=Sh(),jA=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Ia({defaultTheme:e,theme:t,themeId:n}){return NA(t)?e:t[n]||t}function VA(e){return e?(t,n)=>n[e]:null}function Sa(e,t){let{ownerState:n}=t,r=Ae(t,LA);const i=typeof e=="function"?e(P({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Sa(o,P({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let l=Ae(i,BA);return o.forEach(s=>{let c=!0;typeof s.props=="function"?c=s.props(P({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(P({ownerState:n},r,n)):s.style))}),l}return i}function UA(e={}){const{themeId:t,defaultTheme:n=zA,rootShouldForwardProp:r=Wl,slotShouldForwardProp:i=Wl}=e,o=a=>wa(P({},a,{theme:Ia(P({},a,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(a,l={})=>{BS(a,b=>b.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:s,slot:c,skipVariantsResolver:d,skipSx:f,overridesResolver:h=VA(jA(c))}=l,p=Ae(l,$A),g=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,m=f||!1;let v,I=Wl;c==="Root"||c==="root"?I=r:c?I=i:FA(a)&&(I=void 0);const w=LS(a,P({shouldForwardProp:I,label:v},p)),y=b=>typeof b=="function"&&b.__emotion_real!==b||Xn(b)?A=>Sa(b,P({},A,{theme:Ia({theme:A.theme,defaultTheme:n,themeId:t})})):b,C=(b,...A)=>{let E=y(b);const k=A?A.map(y):[];s&&h&&k.push(W=>{const T=Ia(P({},W,{defaultTheme:n,themeId:t}));if(!T.components||!T.components[s]||!T.components[s].styleOverrides)return null;const U=T.components[s].styleOverrides,G={};return Object.entries(U).forEach(([$,B])=>{G[$]=Sa(B,P({},W,{theme:T}))}),h(W,G)}),s&&!g&&k.push(W=>{var T;const U=Ia(P({},W,{defaultTheme:n,themeId:t})),G=U==null||(T=U.components)==null||(T=T[s])==null?void 0:T.variants;return Sa({variants:G},P({},W,{theme:U}))}),m||k.push(o);const F=k.length-A.length;if(Array.isArray(b)&&F>0){const W=new Array(F).fill("");E=[...b,...W],E.raw=[...b.raw,...W]}const Y=w(E,...k);return a.muiName&&(Y.muiName=a.muiName),Y};return w.withConfig&&(C.withConfig=w.withConfig),C}}function HA(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 WA({props:e,name:t,defaultTheme:n,themeId:r}){let i=PA(n);return r&&(i=i[r]||i),HA({theme:i,name:t,props:e})}function GA(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(GA(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Xo(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(Xo(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])})},YA=(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)},KA=(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 YA(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]:KA(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 qA(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=qA(e,"string");return vr(t)=="symbol"?t:t+""}const QA=["colorSchemes","components","defaultColorScheme"];function JA(e,t){const{colorSchemes:n={},defaultColorScheme:r="light"}=e,i=Ae(e,QA),{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,g])=>{const{vars:m,css:v,varsWithDefaults:I}=Yl(g,t);s=Bn(s,I),c[p]={css:v,vars:m}}),d){const{css:p,vars:g,varsWithDefaults:m}=Yl(d,t);s=Bn(s,m),c[r]={css:p,vars:g}}return{vars:s,generateCssVars:p=>{var g;if(!p){var m;const I=P({},a);return{css:I,vars:o,selector:(t==null||(m=t.getSelector)==null?void 0:m.call(t,p,I))||":root"}}const v=P({},c[p].css);return{css:v,vars:c[p].vars,selector:(t==null||(g=t.getSelector)==null?void 0:g.call(t,p,v))||":root"}}}}const XA=P({},xa,{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 ZA(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)=>$I(e,t,"Mui"),e1=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;e1(l)&&typeof l=="object"&&(n=P({},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},t1=["cssVarPrefix","breakpoints","spacing","components","variants","shouldSkipGeneratingVar"],n1=["colorSchemes"],r1=(e="joy")=>Gl(e);function i1(e){var t,n,r,i,o,a,l,s,c,d;const f={},{cssVarPrefix:h="joy",breakpoints:p,spacing:g,components:m,variants:v,shouldSkipGeneratingVar:I=ZA}=f,w=Ae(f,t1),y=r1(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 se;const ne=J.split("-"),ge=ne[1],Se=ne[2];return y(J,(se=C[ge])==null?void 0:se[Se])},A=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")}),k={palette:{mode:"light",primary:P({},C.primary,A("primary")),neutral:P({},C.neutral,A("neutral"),{plainColor:b("palette-neutral-700"),plainHoverColor:b("palette-neutral-900"),outlinedColor:b("palette-neutral-700")}),danger:P({},C.danger,A("danger")),success:P({},C.success,A("success")),warning:P({},C.warning,A("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"},F={palette:{mode:"dark",primary:P({},C.primary,E("primary")),neutral:P({},C.neutral,E("neutral"),{plainColor:b("palette-neutral-300"),plainHoverColor:b("palette-neutral-300")}),danger:P({},C.danger,E("danger")),success:P({},C.success,E("success")),warning:P({},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"},Y='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',W=P({body:`"Inter", ${y(`fontFamily-fallback, ${Y}`)}`,display:`"Inter", ${y(`fontFamily-fallback, ${Y}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:Y},w.fontFamily),T=P({sm:300,md:500,lg:600,xl:700},w.fontWeight),U=P({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),G=P({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},w.lineHeight),$=(t=(n=w.colorSchemes)==null||(n=n.light)==null?void 0:n.shadowRing)!=null?t:k.shadowRing,B=(r=(i=w.colorSchemes)==null||(i=i.light)==null?void 0:i.shadowChannel)!=null?r:k.shadowChannel,L=(o=(a=w.colorSchemes)==null||(a=a.light)==null?void 0:a.shadowOpacity)!=null?o:k.shadowOpacity,V={colorSchemes:{light:k,dark:F},fontSize:U,fontFamily:W,fontWeight:T,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:G,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${y("shadowRing",$)}, 0px 1px 2px 0px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)})`,sm:`${y("shadowRing",$)}, 0px 1px 2px 0px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)}), 0px 2px 4px 0px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)})`,md:`${y("shadowRing",$)}, 0px 2px 8px -2px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)}), 0px 6px 12px -2px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)})`,lg:`${y("shadowRing",$)}, 0px 2px 8px -2px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)}), 0px 12px 16px -4px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)})`,xl:`${y("shadowRing",$)}, 0px 2px 8px -2px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)}), 0px 20px 24px -4px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,snackbar:1400,tooltip:1500},typography:{h1:{fontFamily:y(`fontFamily-display, ${W.display}`),fontWeight:y(`fontWeight-xl, ${T.xl}`),fontSize:y(`fontSize-xl4, ${U.xl4}`),lineHeight:y(`lineHeight-xs, ${G.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${k.palette.text.primary}`)},h2:{fontFamily:y(`fontFamily-display, ${W.display}`),fontWeight:y(`fontWeight-xl, ${T.xl}`),fontSize:y(`fontSize-xl3, ${U.xl3}`),lineHeight:y(`lineHeight-xs, ${G.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${k.palette.text.primary}`)},h3:{fontFamily:y(`fontFamily-display, ${W.display}`),fontWeight:y(`fontWeight-lg, ${T.lg}`),fontSize:y(`fontSize-xl2, ${U.xl2}`),lineHeight:y(`lineHeight-xs, ${G.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${k.palette.text.primary}`)},h4:{fontFamily:y(`fontFamily-display, ${W.display}`),fontWeight:y(`fontWeight-lg, ${T.lg}`),fontSize:y(`fontSize-xl, ${U.xl}`),lineHeight:y(`lineHeight-md, ${G.md}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${k.palette.text.primary}`)},"title-lg":{fontFamily:y(`fontFamily-body, ${W.body}`),fontWeight:y(`fontWeight-lg, ${T.lg}`),fontSize:y(`fontSize-lg, ${U.lg}`),lineHeight:y(`lineHeight-xs, ${G.xs}`),color:y(`palette-text-primary, ${k.palette.text.primary}`)},"title-md":{fontFamily:y(`fontFamily-body, ${W.body}`),fontWeight:y(`fontWeight-md, ${T.md}`),fontSize:y(`fontSize-md, ${U.md}`),lineHeight:y(`lineHeight-md, ${G.md}`),color:y(`palette-text-primary, ${k.palette.text.primary}`)},"title-sm":{fontFamily:y(`fontFamily-body, ${W.body}`),fontWeight:y(`fontWeight-md, ${T.md}`),fontSize:y(`fontSize-sm, ${U.sm}`),lineHeight:y(`lineHeight-sm, ${G.sm}`),color:y(`palette-text-primary, ${k.palette.text.primary}`)},"body-lg":{fontFamily:y(`fontFamily-body, ${W.body}`),fontSize:y(`fontSize-lg, ${U.lg}`),lineHeight:y(`lineHeight-md, ${G.md}`),color:y(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-md":{fontFamily:y(`fontFamily-body, ${W.body}`),fontSize:y(`fontSize-md, ${U.md}`),lineHeight:y(`lineHeight-md, ${G.md}`),color:y(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-sm":{fontFamily:y(`fontFamily-body, ${W.body}`),fontSize:y(`fontSize-sm, ${U.sm}`),lineHeight:y(`lineHeight-md, ${G.md}`),color:y(`palette-text-tertiary, ${k.palette.text.tertiary}`)},"body-xs":{fontFamily:y(`fontFamily-body, ${W.body}`),fontWeight:y(`fontWeight-md, ${T.md}`),fontSize:y(`fontSize-xs, ${U.xs}`),lineHeight:y(`lineHeight-md, ${G.md}`),color:y(`palette-text-tertiary, ${k.palette.text.tertiary}`)}}},q=w?Bn(V,w):V,{colorSchemes:ee}=q,O=Ae(q,n1),M=P({colorSchemes:ee},O,{breakpoints:vh(p!=null?p:{}),components:Bn({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:J,theme:se})=>{var ne;const ge=J.instanceFontSize;return P({margin:"var(--Icon-margin)"},J.fontSize&&J.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${se.vars.fontSize[J.fontSize]})`},!J.htmlColor&&P({color:`var(--Icon-color, ${M.vars.palette.text.icon})`},J.color&&J.color!=="inherit"&&se.vars.palette[J.color]&&{color:`rgba(${(ne=se.vars.palette[J.color])==null?void 0:ne.mainChannel} / 1)`}),ge&&ge!=="inherit"&&{"--Icon-fontSize":se.vars.fontSize[ge]})}}}},m),cssVarPrefix:h,getCssVar:y,spacing:wh(g)});function N(J,se){Object.keys(se).forEach(ne=>{const ge={main:"500",light:"200",dark:"700"};J==="dark"&&(ge.main=400),!se[ne].mainChannel&&se[ne][ge.main]&&(se[ne].mainChannel=mr(se[ne][ge.main])),!se[ne].lightChannel&&se[ne][ge.light]&&(se[ne].lightChannel=mr(se[ne][ge.light])),!se[ne].darkChannel&&se[ne][ge.dark]&&(se[ne].darkChannel=mr(se[ne][ge.dark]))})}Object.entries(M.colorSchemes).forEach(([J,se])=>{N(J,se.palette)});const j={prefix:h,shouldSkipGeneratingVar:I},{vars:te,generateCssVars:ae}=JA(P({colorSchemes:ee},O),j);M.vars=te,M.generateCssVars=ae,M.unstable_sxConfig=P({},XA,void 0),M.unstable_sx=function(se){return wa({sx:se,theme:this})},M.getColorSchemeSelector=J=>J==="light"?"&":`&[data-joy-color-scheme="${J}"], [data-joy-color-scheme="${J}"] &`;const oe={getCssVar:y,palette:M.colorSchemes.light.palette};return M.variants=Bn({plain:Tt("plain",oe),plainHover:Tt("plainHover",oe),plainActive:Tt("plainActive",oe),plainDisabled:Tt("plainDisabled",oe),outlined:Tt("outlined",oe),outlinedHover:Tt("outlinedHover",oe),outlinedActive:Tt("outlinedActive",oe),outlinedDisabled:Tt("outlinedDisabled",oe),soft:Tt("soft",oe),softHover:Tt("softHover",oe),softActive:Tt("softActive",oe),softDisabled:Tt("softDisabled",oe),solid:Tt("solid",oe),solidHover:Tt("solidHover",oe),solidActive:Tt("solidActive",oe),solidDisabled:Tt("solidDisabled",oe)},v),M.palette=P({},M.colorSchemes.light.palette,{colorScheme:"light"}),M.shouldSkipGeneratingVar=I,M.applyStyles=Ih,M}const kh=i1(),be=UA({defaultTheme:kh,themeId:mh});function ct({props:e,name:t}){return WA({props:e,name:t,defaultTheme:P({},kh,{components:{}}),themeId:mh})}function o1(e){return it("MuiAccordion",e)}const a1=Xe("MuiAccordion",["root","expanded","disabled"]),s1=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],l1=["component","slots","slotProps"],c1=["component"];function Ie(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:l}=t,s=Ae(t,s1),{component:c,slots:d={[e]:void 0},slotProps:f={[e]:void 0}}=o,h=Ae(o,l1),p=d[e]||r,g=CI(f[e],i),m=II(P({className:n},s,{externalForwardedProps:e==="root"?h:void 0,externalSlotProps:g})),{props:{component:v},internalRef:I}=m,w=Ae(m.props,c1),y=sn(I,g==null?void 0:g.ref,t.ref),C=a?a(w):{},b=P({},i,C),A=e==="root"?v||c:v,E=yI(p,P({},e==="root"&&!c&&!d[e]&&l,e!=="root"&&!d[e]&&l,w,A&&{as:A},{ref:y}),b);return Object.keys(C).forEach(k=>{delete E[k]}),[p,E]}const ql=z.createContext({});function u1(e){return it("MuiListItem",e)}const Dh=Xe("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),Aa=z.createContext(!1),Ql=z.createContext(!1),Ph=z.createContext(!1),Oh=z.createContext(void 0),d1=z.createContext(void 0),Rh=z.createContext(void 0),f1=["component","className","children","nested","sticky","variant","color","startAction","endAction","role","slots","slotProps"],h1=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,u1,{})},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"},P({"--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&&P({},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})`},{[`.${Dh.nested} > &`]:{"--_ListItem-display":"flex"}}),(n=e.variants[t.variant])==null?void 0:n[t.color]]}),p1=be(Jl,{name:"JoyListItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),g1=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})),m1=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=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyListItem"}),i=z.useContext(Rh),o=z.useContext(Oh),a=z.useContext(Ql),l=z.useContext(Ph),s=z.useContext(Aa),{component:c,className:d,children:f,nested:h=!1,sticky:p=!1,variant:g="plain",color:m="neutral",startAction:v,endAction:I,role:w,slots:y={},slotProps:C={}}=r,b=Ae(r,f1),[A,E]=z.useState(""),[k,F]=(o==null?void 0:o.split(":"))||["",""],Y=c||(k&&!k.match(/^(ul|ol|menu)$/)?"div":void 0);let W=i==="menu"?"none":void 0;o&&(W={menu:"none",menubar:"none",group:"presentation"}[F]),w&&(W=w);const T=P({},r,{sticky:p,startAction:v,endAction:I,row:a,wrap:l,variant:g,color:m,nesting:s,nested:h,component:Y,role:W}),U=h1(T),G=P({},b,{component:Y,slots:y,slotProps:C}),[$,B]=Ie("root",{additionalProps:{role:W},ref:n,className:Ln(U.root,d),elementType:p1,externalForwardedProps:G,ownerState:T}),[L,V]=Ie("startAction",{className:U.startAction,elementType:g1,externalForwardedProps:G,ownerState:T}),[q,ee]=Ie("endAction",{className:U.endAction,elementType:m1,externalForwardedProps:G,ownerState:T});return u.jsx(d1.Provider,{value:E,children:u.jsx(Aa.Provider,{value:h?A||!0:!1,children:u.jsxs($,P({},B,{children:[v&&u.jsx(L,P({},V,{children:v})),z.Children.map(f,(O,M)=>{var N;return z.isValidElement(O)?z.cloneElement(O,P({},M===0&&{"data-first-child":""},Gf(O,["ListItem"])&&{component:((N=O.props)==null?void 0:N.component)||"div"})):O}),I&&u.jsx(q,P({},ee,{children:I}))]}))})})});Mh.muiName="ListItem";const Lh=Mh;function v1(e){return it("MuiAccordionDetails",e)}const br=Xe("MuiAccordionDetails",["root","content","expanded"]),b1=["accordionId","component","color","children","defaultExpanded","disabled","expanded","onChange","variant","slots","slotProps"],y1=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,o1,{})},C1=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"}}),x1=z.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:g={}}=r,m=Ae(r,b1),v=ji(i),[I,w]=kl({controlled:d,default:s,name:"Accordion",state:"expanded"}),y=z.useCallback(Y=>{w(!I),f&&f(Y,!I)},[I,f,w]),C=z.useMemo(()=>({accordionId:v,expanded:I,disabled:c,toggle:y}),[v,I,c,y]),b=P({},m,{component:o,slots:p,slotProps:g}),A=P({},r,{component:o,color:a,variant:h,expanded:I,disabled:c,nested:!0}),E=y1(A),[k,F]=Ie("root",{ref:n,className:E.root,elementType:C1,externalForwardedProps:b,ownerState:A});return u.jsx(ql.Provider,{value:C,children:u.jsx(k,P({},F,{children:z.Children.map(l,(Y,W)=>z.isValidElement(Y)&&W===0?z.cloneElement(Y,{"data-first-child":""}):Y)}))})});function w1(e){return it("MuiAccordionGroup",e)}Xe("MuiAccordionGroup",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const I1={"--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(Ph.Provider,{value:i,children:z.Children.map(t,(a,l)=>z.isValidElement(a)?z.cloneElement(a,P({},l===0&&{"data-first-child":""},l===z.Children.count(t)-1&&{"data-last-child":""})):a)})});return n===void 0?o:u.jsx(Aa.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=P({},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 S1(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 A1=z.createContext(void 0),T1=["component","className","children","size","orientation","wrap","variant","color","role","slots","slotProps"],E1=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,S1,{})},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&&P({},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&&P({},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"?P({},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"}),P({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})]}),_1=be(ec,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({}),k1=z.forwardRef(function(t,n){var r;const i=z.useContext(Aa),o=z.useContext(Rh),a=z.useContext(A1),l=ct({props:t,name:"JoyList"}),{component:s,className:c,children:d,size:f,orientation:h="vertical",wrap:p=!1,variant:g="plain",color:m="neutral",role:v,slots:I={},slotProps:w={}}=l,y=Ae(l,T1),C=f||((r=t.size)!=null?r:"md");let b;o&&(b="group"),a&&(b="presentation"),v&&(b=v);const A=P({},l,{instanceSize:t.size,size:C,nesting:i,orientation:h,wrap:p,variant:g,color:m,role:b}),E=E1(A),k=P({},y,{component:s,slots:I,slotProps:w}),[F,Y]=Ie("root",{ref:n,className:Ln(E.root,c),elementType:_1,externalForwardedProps:k,ownerState:A,additionalProps:{as:s,role:b,"aria-labelledby":typeof i=="string"?i:void 0}});return u.jsx(F,P({},Y,{children:u.jsx(Oh.Provider,{value:`${typeof s=="string"?s:""}:${b||""}`,children:u.jsx(Xl,{row:h==="horizontal",wrap:p,children:d})})}))}),D1=["component","color","children","disableDivider","variant","transition","size","slots","slotProps"],P1=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,w1,{})},O1=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}`}})),P({"--List-padding":"0px","--ListDivider-gap":"0px"},n,!t.disableDivider&&{[`& .${a1.root}:not([data-last-child])`]:{"--Accordion-borderBottom":`1px solid ${e.vars.palette.divider}`}})}),R1=z.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,D1),g=P({},p,{component:i,slots:f,slotProps:h}),m=P({},r,{component:i,color:o,disableDivider:l,variant:s,transition:c,size:d}),v=P1(m),[I,w]=Ie("root",{ref:n,className:v.root,elementType:O1,externalForwardedProps:g,ownerState:m});return u.jsx(I,P({},w,{children:u.jsx(Xl,{children:a})}))}),M1=["component","children","color","variant","slots","slotProps"],L1=e=>{const{expanded:t}=e;return lt({root:["root",t&&"expanded"],content:["content",t&&"expanded"]},v1,{})},B1=be("div",{name:"JoyAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n;return P({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"}})}),$1=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}}),N1=z.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,M1),{accordionId:f,expanded:h=!1}=z.useContext(ql),p=z.useRef(null),g=sn(p,n);z.useEffect(()=>{p.current&&p.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])').forEach(E=>{if(h){const k=E.getAttribute("data-prev-tabindex"),F=E.getAttribute("tabindex");F&&k&&(E.setAttribute("tabindex",k),E.removeAttribute("data-prev-tabindex")),!k&&!F&&E.removeAttribute("tabindex")}else E.setAttribute("data-prev-tabindex",E.getAttribute("tabindex")||""),E.setAttribute("tabindex","-1")})},[h]);const m=P({},d,{component:i,slots:s,slotProps:c}),v=P({},r,{component:i,color:a,variant:l,expanded:h,nesting:!0}),I=L1(v),[w,y]=Ie("root",{ref:g,className:I.root,elementType:B1,externalForwardedProps:m,additionalProps:{id:`${f}-details`,"aria-labelledby":`${f}-summary`,role:"region",hidden:h?void 0:!0},ownerState:v}),[C,b]=Ie("content",{className:I.content,elementType:$1,externalForwardedProps:m,ownerState:v});return u.jsx(w,P({},y,{children:u.jsx(C,P({},b,{children:o}))}))});function F1(e){return it("MuiAccordionSummary",e)}const Ta=Xe("MuiAccordionSummary",["root","button","indicator","disabled","expanded"]),Ea=Xe("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]),z1=z.createContext("horizontal"),tc=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,l;return P({"--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]:P({},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],[`.${Dh.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${Ea.selected}`]:P({},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${Ea.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]},[`&.${Ea.disabled}`]:P({},(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})=>P({},!e.row&&{[`&.${Ea.selected}`]:{fontWeight:t.vars.fontWeight.md}}));function j1(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 V1=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],U1=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,j1,{})},Bh={sm:"xl",md:"xl2",lg:"xl3"},H1=be("svg",{name:"JoySvgIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return P({},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&&P({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=z.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:g={},slotProps:m={}}=r,v=Ae(r,V1),I=z.isValidElement(i)&&i.type==="svg",w=P({},r,{color:a,component:l,size:p,instanceSize:t.size,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:I}),y=U1(w),C=P({},v,{component:l,slots:g,slotProps:m}),[b,A]=Ie("root",{ref:n,className:Ln(y.root,o),elementType:H1,externalForwardedProps:C,ownerState:w,additionalProps:P({color:c,focusable:!1},f&&{role:"img"},!f&&{"aria-hidden":!0},!d&&{viewBox:h},I&&i.props)});return u.jsxs(b,P({},A,{children:[I?i.props.children:i,f?u.jsx("title",{children:f}):null]}))});function nc(e,t){function n(r,i){return u.jsx($h,P({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=$h.muiName,z.memo(z.forwardRef(n))}const W1=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 G1=["component","color","children","indicator","variant","slots","slotProps"],Y1=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"]},F1,{})},K1=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)",[`&.${Ta.expanded}`]:{"--Icon-color":"currentColor"}})),q1=be(tc,{name:"JoyAccordionSummary",slot:"Button",overridesResolver:(e,t)=>t.button})({gap:"inherit",fontWeight:"inherit",justifyContent:"space-between",font:"inherit","&:focus-visible":{zIndex:1},[`.${Ta.root} &`]:{"--unstable_ListItem-flex":"1 0 0%"}}),Q1=be("span",{name:"JoyAccordionSummary",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})({display:"inline-flex",[`&.${Ta.expanded}`]:{transform:"rotate(180deg)"}}),J1=z.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(W1,{})),variant:s="plain",slots:c={},slotProps:d={}}=r,f=Ae(r,G1),{accordionId:h,disabled:p=!1,expanded:g=!1,toggle:m}=z.useContext(ql),v=P({},f,{component:i,slots:c,slotProps:d}),I=P({},r,{component:i,color:o,disabled:p,expanded:g,variant:s}),w=Y=>{if(m&&m(Y),typeof d.button=="function"){var W,T;(W=d.button(I))==null||(T=W.onClick)==null||T.call(W,Y)}else{var U,G;(U=d.button)==null||(G=U.onClick)==null||G.call(U,Y)}},y=Y1(I),[C,b]=Ie("root",{ref:n,className:y.root,elementType:K1,externalForwardedProps:v,ownerState:I}),[A,E]=Ie("button",{ref:n,className:y.button,elementType:q1,externalForwardedProps:v,additionalProps:{component:"button",id:`${h}-summary`,"aria-expanded":g?"true":"false","aria-controls":`${h}-details`,disabled:p,type:"button",onClick:w},ownerState:I}),[k,F]=Ie("indicator",{ref:n,className:y.indicator,elementType:Q1,externalForwardedProps:v,ownerState:I});return u.jsx(C,P({},b,{children:u.jsxs(A,P({},E,{children:[a,l&&u.jsx(k,P({},F,{children:l}))]}))}))}),X1=({label:e,disabled:t,children:n})=>(t=t||!1,u.jsx(R1,{variant:"outlined",transition:"0.2s",sx:{borderRadius:"md",overflow:"hidden",[`& .${Ta.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(x1,{disabled:t,children:[u.jsx(J1,{children:e}),u.jsx(N1,{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(S.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(S.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(S.FormControl,{children:[u.jsx(S.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(S.FormHelperText,{children:o})]}):u.jsx(S.Box,{sx:()=>({marginBottom:"16px"}),children:u.jsx(vi,{value:n||r,defaultValue:r,onChange:l,modules:rc,placeholder:i})})},Z1=e=>{const t=n=>{n.persist(),e.onChange(n.target.value)};return u.jsxs(S.Tabs,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(S.TabList,{sx:{borderRadius:0},tabFlex:"auto",children:[u.jsx(S.Tab,{children:e.labels.richText}),u.jsx(S.Tab,{children:e.labels.plainText})]}),u.jsx(S.TabPanel,{value:0,sx:{px:0},children:u.jsx(ic,{label:"",placeholder:"",defaultValue:e.defaultValue,property:"ad_content",onChange:e.onChange})}),u.jsx(S.TabPanel,{value:1,sx:{px:0},children:u.jsx(S.Textarea,{defaultValue:e.defaultValue,minRows:"7",onChange:t,sx:{marginBottom:"16px",overflow:"auto",resize:"vertical"}})})]})},eT=({label:e,defaultValue:t,values:n,description:r,onChange:i})=>{const o=(a,l)=>{i(l||"")};return u.jsxs(S.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(S.FormLabel,{color:"primary",children:e}),u.jsx(S.Select,{defaultValue:t,onChange:o,children:n.map((a,l)=>u.jsx(S.Option,{value:a,children:a},`basic-select-${a}-${l}`))}),r?u.jsx(S.FormHelperText,{children:r}):u.jsx(u.Fragment,{})]})},oc=z.createContext("md");function tT(e){return it("MuiTabs",e)}Xe("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const nT=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],rT=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,tT,{})},iT=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 P({},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=z.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:g={}}=r,m=Ae(r,nT),v=a||(o===void 0?0:void 0),{contextValue:I}=AS(P({},r,{orientation:l,defaultValue:v})),w=P({},r,{orientation:l,direction:s,variant:d,color:f,size:h}),y=rT(w),C=P({},m,{component:c,slots:p,slotProps:g}),[b,A]=Ie("root",{ref:n,elementType:iT,externalForwardedProps:C,additionalProps:{ref:n,as:c},ownerState:w,className:y.root});return u.jsx(b,P({},A,{children:u.jsx(TS,{value:I,children:u.jsx(oc.Provider,{value:h,children:i})})}))});function oT(e){return it("MuiTabList",e)}Xe("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);function aT(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"]),sT=["component","children","variant","color","size","disableUnderline","underlinePlacement","tabFlex","sticky","slots","slotProps"],lT=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,oT,{})},cT=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 P({"--List-gap":"0px","--ListDivider-gap":"0px","--ListItem-paddingX":"var(--Tabs-spacing)","--ListItem-gap":"0.375rem","--unstable_TabList-hasUnderline":t.disableUnderline?"var(--unknown,)":"initial"},I1,{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&&P({},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=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabList"}),i=z.useContext(oc),{isRtl:o,orientation:a,getRootProps:l,contextValue:s}=DS({rootRef:n}),{component:c="div",children:d,variant:f="plain",color:h="neutral",size:p,disableUnderline:g=!1,underlinePlacement:m=a==="horizontal"?"bottom":"right",tabFlex:v,sticky:I,slots:w={},slotProps:y={}}=r,C=Ae(r,sT),b=p!=null?p:i,A=P({},r,{isRtl:o,orientation:a,variant:f,color:h,size:b,sticky:I,tabFlex:v,nesting:!1,disableUnderline:g,underlinePlacement:m}),E=lT(A),k=P({},C,{component:c,slots:w,slotProps:y}),[F,Y]=Ie("root",{ref:n,elementType:cT,getSlotProps:l,externalForwardedProps:k,ownerState:A,className:E.root});return u.jsx(F,P({},Y,{children:u.jsx(PS,{value:s,children:u.jsx(Xl,{row:a==="horizontal",nested:!0,children:d})})}))}),uT=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],dT=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,aT,{})},fT=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=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTab"}),i=z.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:g=!1,slots:m={},slotProps:v={}}=r,I=Ae(r,uT),w=z.useRef(null),y=sn(w,n),{active:C,focusVisible:b,setFocusVisible:A,selected:E,getRootProps:k}=RS(P({},r,{rootRef:y}));z.useImperativeHandle(o,()=>({focusVisible:()=>{A(!0),w.current.focus()}}),[A]);const F=P({},r,{disableIndicator:h,indicatorPlacement:p,indicatorInset:g,orientation:c,row:i,active:C,focusVisible:b,disabled:l,selected:E,variant:d,color:f}),Y=dT(F),W=P({},I,{component:s,slots:m,slotProps:v}),[T,U]=Ie("root",{ref:n,elementType:fT,getSlotProps:k,externalForwardedProps:W,ownerState:F,className:Y.root});return u.jsx(z1.Provider,{value:c,children:u.jsx(T,P({},U,{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(z.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?H({},e):e;return Fn(e)&&Fn(t)&&Object.keys(t).forEach(i=>{z.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=H({},t);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]=H(H({},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]=H({},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 hT(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,pT=(()=>{let e=Vh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Vh}}})(),gT={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=gT[t];return r?`${n}-${r}`:`${pT.generate(e)}-${t}`}function mT(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Uh(e,i,n)}),r}function vT(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 bT(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},H({},t)):t}function yT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function CT(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 xT(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),Z(H({},e),{containerQueries:i})}const _a={xs:0,sm:600,md:900,lg:1200,xl:1536},Hh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${_a[e]}px)`},wT={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:_a[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(yT(o.keys,l)){const s=CT(r.containerQueries?r:wT,l);s&&(a[s]=n(t[l],l))}else if(Object.keys(o.values||_a).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 IT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function ST(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function ka(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=ka(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=ka(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 AT(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const TT={m:"margin",p:"padding"},ET={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Wh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},_T=AT(e=>{if(e.length>2)if(Wh[e])e=Wh[e];else return[e];const[t,n]=e.split(""),r=TT[t],i=ET[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=ka(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 kT(e,t){return n=>e.reduce((r,i)=>(r[i]=Ki(t,n),r),{})}function DT(e,t,n,r){if(!t.includes(n))return null;const i=_T(n),o=kT(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=>DT(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 Pa(...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 PT=nn("border",tn),OT=nn("borderTop",tn),RT=nn("borderRight",tn),MT=nn("borderBottom",tn),LT=nn("borderLeft",tn),BT=nn("borderColor"),$T=nn("borderTopColor"),NT=nn("borderRightColor"),FT=nn("borderBottomColor"),zT=nn("borderLeftColor"),jT=nn("outline",tn),VT=nn("outlineColor"),Oa=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};Oa.propTypes={},Oa.filterProps=["borderRadius"],Pa(PT,OT,RT,MT,LT,BT,$T,NT,FT,zT,Oa,jT,VT);const Ra=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};Ra.propTypes={},Ra.filterProps=["gap"];const Ma=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};Ma.propTypes={},Ma.filterProps=["columnGap"];const La=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};La.propTypes={},La.filterProps=["rowGap"];const UT=ot({prop:"gridColumn"}),HT=ot({prop:"gridRow"}),WT=ot({prop:"gridAutoFlow"}),GT=ot({prop:"gridAutoColumns"}),YT=ot({prop:"gridAutoRows"}),KT=ot({prop:"gridTemplateColumns"}),qT=ot({prop:"gridTemplateRows"}),QT=ot({prop:"gridTemplateAreas"}),JT=ot({prop:"gridArea"});Pa(Ra,Ma,La,UT,HT,WT,GT,YT,KT,qT,QT,JT);function Ur(e,t){return t==="grey"?t:e}const XT=ot({prop:"color",themeKey:"palette",transform:Ur}),ZT=ot({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ur}),eE=ot({prop:"backgroundColor",themeKey:"palette",transform:Ur});Pa(XT,ZT,eE);function Gt(e){return e<=1&&e!==0?`${e*100}%`:e}const tE=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])||_a[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 nE=ot({prop:"minWidth",transform:Gt}),rE=ot({prop:"height",transform:Gt}),iE=ot({prop:"maxHeight",transform:Gt}),oE=ot({prop:"minHeight",transform:Gt});ot({prop:"size",cssProperty:"width",transform:Gt}),ot({prop:"size",cssProperty:"height",transform:Gt});const aE=ot({prop:"boxSizing"});Pa(tE,dc,nE,rE,iE,oE,aE);const Ba={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:Oa},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:Ra},rowGap:{style:La},columnGap:{style:Ma},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 sE(...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 lE(e,t){return typeof e=="function"?e(t):e}function cE(){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=ka(i,c)||{};return f?f(a):zn(a,r,g=>{let m=Da(h,d,g);return g===m&&typeof g=="string"&&(m=Da(h,d,`${n}${g==="default"?"":Vr(g)}`,g)),s===!1?m:{[s]:m}})}function t(n){var l;const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=(l=i.unstable_sxConfig)!=null?l:Ba;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=IT(i.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const g=lE(c[p],i);if(g!=null)if(typeof g=="object")if(o[p])h=Gi(h,e(p,g,i,o));else{const m=zn({theme:i},g,v=>({[p]:v}));sE(m,g)?h[p]=t({sx:g,theme:i}):h=Gi(h,m)}else h=Gi(h,e(p,g,i,o))}),bT(i,ST(f,h))}return Array.isArray(r)?r.map(a):a(r)}return t}const Hr=cE();Hr.filterProps=["sx"];function uE(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 dE={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},fE=!1,hE=/[A-Z]|^ms/g,pE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Yh=function(t){return t.charCodeAt(1)===45},Kh=function(t){return t!=null&&typeof t!="boolean"},fc=MS(function(e){return Yh(e)?e:e.replace(hE,"-$&").toLowerCase()}),qh=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(pE,function(r,i,o){return er={name:i,styles:o,next:er},i})}return dE[t]!==1&&!Yh(t)&&typeof n=="number"&&n!==0?n+"px":n},gE="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function $a(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 mE(e,t,n)}}var s=n;return s}function mE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=$a(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"&&fE)throw new Error(gE);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=$a(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 vE(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+=$a(n,t,o);else{var a=o;i+=a[0]}for(var l=1;l<e.length;l++)if(i+=$a(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=uE(i)+c;return{name:f,styles:i,next:er}}/**
|
|
2333
|
+
*/var El=Symbol.for("react.transitional.element"),_l=Symbol.for("react.portal"),Zo=Symbol.for("react.fragment"),ea=Symbol.for("react.strict_mode"),ta=Symbol.for("react.profiler"),na=Symbol.for("react.consumer"),ra=Symbol.for("react.context"),ia=Symbol.for("react.forward_ref"),oa=Symbol.for("react.suspense"),aa=Symbol.for("react.suspense_list"),sa=Symbol.for("react.memo"),la=Symbol.for("react.lazy"),SI=Symbol.for("react.offscreen"),AI=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 Zo:case ta:case ea:case oa:case aa:return e;default:switch(e=e&&e.$$typeof,e){case ra:case ia:case la:case sa:return e;case na:return e;default:return t}}case _l:return t}}}$e.ContextConsumer=na,$e.ContextProvider=ra,$e.Element=El,$e.ForwardRef=ia,$e.Fragment=Zo,$e.Lazy=la,$e.Memo=sa,$e.Portal=_l,$e.Profiler=ta,$e.StrictMode=ea,$e.Suspense=oa,$e.SuspenseList=aa,$e.isContextConsumer=function(e){return Xt(e)===na},$e.isContextProvider=function(e){return Xt(e)===ra},$e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===El},$e.isForwardRef=function(e){return Xt(e)===ia},$e.isFragment=function(e){return Xt(e)===Zo},$e.isLazy=function(e){return Xt(e)===la},$e.isMemo=function(e){return Xt(e)===sa},$e.isPortal=function(e){return Xt(e)===_l},$e.isProfiler=function(e){return Xt(e)===ta},$e.isStrictMode=function(e){return Xt(e)===ea},$e.isSuspense=function(e){return Xt(e)===oa},$e.isSuspenseList=function(e){return Xt(e)===aa},$e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Zo||e===ta||e===ea||e===oa||e===aa||e===SI||typeof e=="object"&&e!==null&&(e.$$typeof===la||e.$$typeof===sa||e.$$typeof===ra||e.$$typeof===na||e.$$typeof===ia||e.$$typeof===AI||e.getModuleId!==void 0)},$e.typeOf=Xt,Hf.exports=$e;var Wf=Hf.exports;function ye(e){if(typeof e!="string")throw new Error(Xo(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Gf(e,t){var n,r;return z.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 TI=typeof window!="undefined"?z.useLayoutEffect:z.useEffect;let Yf=0;function EI(e){const[t,n]=z.useState(e),r=e||t;return z.useEffect(()=>{t==null&&(Yf+=1,n(`mui-${Yf}`))},[t]),r}const Kf=z.useId;function ji(e){if(Kf!==void 0){const t=Kf();return e!=null?e:t}return EI(e)}function kl({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=z.useRef(e!==void 0),[o,a]=z.useState(t),l=i?e:o,s=z.useCallback(c=>{i||a(c)},[]);return[l,s]}class Dl{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Dl}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let ca=!0,Pl=!1;const _I=new Dl,kI={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 DI(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&kI[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function PI(e){e.metaKey||e.altKey||e.ctrlKey||(ca=!0)}function Ol(){ca=!1}function OI(){this.visibilityState==="hidden"&&Pl&&(ca=!0)}function RI(e){e.addEventListener("keydown",PI,!0),e.addEventListener("mousedown",Ol,!0),e.addEventListener("pointerdown",Ol,!0),e.addEventListener("touchstart",Ol,!0),e.addEventListener("visibilitychange",OI,!0)}function MI(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return ca||DI(t)}function qf(){const e=z.useCallback(i=>{i!=null&&RI(i.ownerDocument)},[]),t=z.useRef(!1);function n(){return t.current?(Pl=!0,_I.start(100,()=>{Pl=!1}),t.current=!1,!0):!1}function r(i){return MI(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Qf(e,t){const n=P({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=P({},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]=P({},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,LI=(()=>{let e=Jf;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Jf}}})(),BI={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=BI[t];return r?`${n}-${r}`:`${LI.generate(e)}-${t}`}function $I(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=z.useRef(null),[d,f]=z.useState(!1),{isFocusVisibleRef:h,onFocus:p,onBlur:g,ref:m}=qf(),[v,I]=z.useState(!1);t&&!n&&v&&I(!1),z.useEffect(()=>{h.current=v},[v,h]);const[w,y]=xI({rootElementName:s!=null?s:r||a?"a":void 0,componentName:"Button"}),C=$=>B=>{var L;v&&B.preventDefault(),(L=$.onMouseLeave)==null||L.call($,B)},b=$=>B=>{var L;g(B),h.current===!1&&I(!1),(L=$.onBlur)==null||L.call($,B)},A=$=>B=>{var L;if(c.current||(c.current=B.currentTarget),p(B),h.current===!0){var V;I(!0),(V=$.onFocusVisible)==null||V.call($,B)}(L=$.onFocus)==null||L.call($,B)},E=()=>{const $=c.current;return w==="BUTTON"||w==="INPUT"&&["button","submit","reset"].includes($==null?void 0:$.type)||w==="A"&&($==null?void 0:$.href)},D=$=>B=>{if(!t){var L;(L=$.onClick)==null||L.call($,B)}},F=$=>B=>{var L;t||(f(!0),document.addEventListener("mouseup",()=>{f(!1)},{once:!0})),(L=$.onMouseDown)==null||L.call($,B)},Y=$=>B=>{var L;if((L=$.onKeyDown)==null||L.call($,B),!B.defaultMuiPrevented&&(B.target===B.currentTarget&&!E()&&B.key===" "&&B.preventDefault(),B.target===B.currentTarget&&B.key===" "&&!t&&f(!0),B.target===B.currentTarget&&!E()&&B.key==="Enter"&&!t)){var V;(V=$.onClick)==null||V.call($,B),B.preventDefault()}},W=$=>B=>{var L;if(B.target===B.currentTarget&&f(!1),(L=$.onKeyUp)==null||L.call($,B),B.target===B.currentTarget&&!E()&&!t&&B.key===" "&&!B.defaultMuiPrevented){var V;(V=$.onClick)==null||V.call($,B)}},T=sn(y,i,m,c),U={};return o!==void 0&&(U.tabIndex=o),w==="BUTTON"?(U.type=l!=null?l:"button",n?U["aria-disabled"]=t:U.disabled=t):w==="INPUT"?l&&["button","submit","reset"].includes(l)&&(n?U["aria-disabled"]=t:U.disabled=t):w!==""&&(!r&&!a&&(U.role="button",U.tabIndex=o!=null?o:0),t&&(U["aria-disabled"]=t,U.tabIndex=n?o!=null?o:0:-1)),{getRootProps:($={})=>{const B=P({},Mn(e),Mn($)),L=P({type:l},B,U,$,{onBlur:b(B),onClick:D(B),onFocus:A(B),onKeyDown:Y(B),onKeyUp:W(B),onMouseDown:F(B),onMouseLeave:C(B),ref:T});return delete L.onFocusVisible,L},focusVisible:v,setFocusVisible:I,active:d,rootRef:T}}function NI(e,t){return e===t}const Ml={},Zf=()=>{};function Ll(e,t){const n=P({},e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n}function FI(e){const{nextState:t,initialState:n,stateComparers:r,onStateChange:i,controlledProps:o,lastActionRef:a}=e,l=z.useRef(n);z.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:NI,h=t[c],p=s[c];if(p==null&&h!=null||p!=null&&h==null||p!=null&&h!=null&&!f(h,p)){var g,m;i==null||i((g=a.current.event)!=null?g:null,c,h,(m=a.current.type)!=null?m:"",t)}}),l.current=t,a.current=null},[l,t,a,i,r,o])}function zI(e){const t=z.useRef(null),{reducer:n,initialState:r,controlledProps:i=Ml,stateComparers:o=Ml,onStateChange:a=Zf,actionContext:l,componentName:s=""}=e;z.useRef(i);const c=z.useCallback((p,g)=>{t.current=g;const m=Ll(p,i);return n(m,g)},[i,n]),[d,f]=z.useReducer(c,r),h=z.useCallback(p=>{f(P({},p,{context:l}))},[l]);return FI({nextState:d,initialState:r,stateComparers:o!=null?o:Ml,onStateChange:a!=null?a:Zf,controlledProps:i,lastActionRef:t}),[Ll(d,i),h]}const jI=z.createContext(void 0);function VI(){return z.useContext(jI)}function UI(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=VI();let f,h,p,g,m;if(d){var v,I,w;f=void 0,h=(v=d.disabled)!=null?v:!1,p=(I=d.error)!=null?I:!1,g=(w=d.required)!=null?w:!1,m=d.value}else f=t,h=n,p=r,g=l,m=s;const{current:y}=z.useRef(m!=null),C=z.useCallback($=>{},[]),b=z.useRef(null),A=sn(b,c,C),[E,D]=z.useState(!1);z.useEffect(()=>{!d&&h&&E&&(D(!1),i==null||i())},[d,h,E,i]);const F=$=>B=>{var L;if(d!=null&&d.disabled){B.stopPropagation();return}if((L=$.onFocus)==null||L.call($,B),d&&d.onFocus){var V;d==null||(V=d.onFocus)==null||V.call(d)}else D(!0)},Y=$=>B=>{var L;(L=$.onBlur)==null||L.call($,B),d&&d.onBlur?d.onBlur():D(!1)},W=$=>(B,...L)=>{var V,q;if(!y&&(B.target||b.current)==null)throw new Error(Xo(17));d==null||(V=d.onChange)==null||V.call(d,B),(q=$.onChange)==null||q.call($,B,...L)},T=$=>B=>{var L;b.current&&B.currentTarget===B.target&&b.current.focus(),(L=$.onClick)==null||L.call($,B)};return{disabled:h,error:p,focused:E,formControlContext:d,getInputProps:($={})=>{const L=P({},{onBlur:i,onChange:o,onFocus:a},Mn($)),V=P({},L,{onBlur:Y(L),onChange:W(L),onFocus:F(L)});return P({},V,{"aria-invalid":p||void 0,defaultValue:f,value:m,required:g,disabled:h},$,{ref:A},V)},getRootProps:($={})=>{const B=Mn(e,["onBlur","onChange","onFocus"]),L=P({},B,Mn($));return P({},$,L,{onClick:T(L)})},inputRef:A,required:g,value:m}}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 HI(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 Pt(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(I=>s(I,e));let p,g,m=!a;switch(t){case"reset":if(d===-1)return null;p=0,g="next",m=!1;break;case"start":p=0,g="next",m=!1;break;case"end":p=f,g="previous",m=!1;break;default:{const I=h+t;I<0?!m&&h!==-1||Math.abs(t)>1?(p=0,g="next"):(p=f,g="previous"):I>f?!m||Math.abs(t)>1?(p=f,g="previous"):(p=0,g="next"):(p=I,g=t>=0?"next":"previous")}}const v=HI(p,g,i,l,o,m);return v===-1&&e!==null&&!o(e,h)?e:(r=i[v])!=null?r:null}function WI(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=WI(e,l,o,r);return P({},t,{selectedValues:c,highlightedValue:e})}function GI(e,t,n){const r=t.highlightedValue,{orientation:i,pageSize:o}=n;switch(e){case"Home":return P({},t,{highlightedValue:Pt(r,"start",n)});case"End":return P({},t,{highlightedValue:Pt(r,"end",n)});case"PageUp":return P({},t,{highlightedValue:Pt(r,-o,n)});case"PageDown":return P({},t,{highlightedValue:Pt(r,o,n)});case"ArrowUp":if(i!=="vertical")break;return P({},t,{highlightedValue:Pt(r,-1,n)});case"ArrowDown":if(i!=="vertical")break;return P({},t,{highlightedValue:Pt(r,1,n)});case"ArrowLeft":{if(i==="vertical")break;return P({},t,{highlightedValue:Pt(r,i==="horizontal-ltr"?-1:1,n)})}case"ArrowRight":{if(i==="vertical")break;return P({},t,{highlightedValue:Pt(r,i==="horizontal-ltr"?1:-1,n)})}case"Enter":case" ":return t.highlightedValue===null?t:eh(t.highlightedValue,t,n)}return t}function YI(e,t){return t.focusManagement==="DOM"?e:P({},e,{highlightedValue:null})}function KI(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 qI(e,t,n){const{items:r,isItemDisabled:i,disabledItemsFocusable:o,getItemAsString:a}=n,l=t.length>1;let s=l?e.highlightedValue:Pt(e.highlightedValue,1,n);for(let c=0;c<r.length;c+=1){if(!s||!l&&e.highlightedValue===s)return e;if(KI(s,t,a)&&(!i(s,r.indexOf(s))||o))return P({},e,{highlightedValue:s});s=Pt(s,1,n)}return e}function QI(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=Pt(null,"reset",r));const d=((i=n.selectedValues)!=null?i:[]).filter(f=>e.some(h=>o(h,f)));return P({},n,{highlightedValue:l,selectedValues:d})}function JI(e,t){return P({},e,{highlightedValue:Pt(null,"reset",t)})}function XI(e,t){return P({},e,{highlightedValue:Pt(null,"end",t)})}function ZI(e,t){return P({},e,{selectedValues:[],highlightedValue:Pt(null,"reset",t)})}function th(e,t){const{type:n,context:r}=t;switch(n){case yt.keyDown:return GI(t.key,e,r);case yt.itemClick:return eh(t.item,e,r);case yt.blur:return YI(e,r);case yt.textNavigation:return qI(e,t.searchString,r);case yt.itemsChange:return QI(t.items,t.previousItems,e,r);case yt.resetHighlight:return JI(e,r);case yt.highlightLast:return XI(e,r);case yt.clearSelection:return ZI(e,r);default:return e}}const eS=500;function tS(e){const t=z.useRef({searchString:"",lastTime:null});return z.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>eS?r.searchString=i:(r.searchString.length!==1||i!==r.searchString)&&(r.searchString+=i),r.lastTime=o,e(r.searchString,n)}},[e])}const nh={},nS=()=>{},rS=(e,t)=>e===t,iS=()=>!1,oS=e=>typeof e=="string"?e:String(e),aS=()=>({highlightedValue:null,selectedValues:[]});function sS(e){const{controlledProps:t=nh,disabledItemsFocusable:n=!1,disableListWrap:r=!1,focusManagement:i="activeDescendant",getInitialState:o=aS,getItemDomElement:a,getItemId:l,isItemDisabled:s=iS,rootRef:c,onStateChange:d=nS,items:f,itemComparer:h=rS,getItemAsString:p=oS,onChange:g,onHighlightChange:m,onItemsChange:v,orientation:I="vertical",pageSize:w=5,reducerActionContext:y=nh,selectionMode:C="single",stateReducer:b,componentName:A="useList"}=e,E=z.useRef(null),D=sn(c,E),F=z.useCallback((oe,J,le)=>{if(m==null||m(oe,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,m,i]),Y=z.useMemo(()=>({highlightedValue:h,selectedValues:(oe,J)=>zf(oe,J,h)}),[h]),W=z.useCallback((oe,J,le,ne,ge)=>{switch(d==null||d(oe,J,le,ne,ge),J){case"highlightedValue":F(oe,le,ne);break;case"selectedValues":g==null||g(oe,le,ne);break}},[F,g,d]),T=z.useMemo(()=>({disabledItemsFocusable:n,disableListWrap:r,focusManagement:i,isItemDisabled:s,itemComparer:h,items:f,getItemAsString:p,onHighlightChange:F,orientation:I,pageSize:w,selectionMode:C,stateComparers:Y}),[n,r,i,s,h,f,p,F,I,w,C,Y]),U=o(),G=b!=null?b:th,$=z.useMemo(()=>P({},y,T),[y,T]),[B,L]=zI({reducer:G,actionContext:$,initialState:U,controlledProps:t,stateComparers:Y,onStateChange:W,componentName:A}),{highlightedValue:V,selectedValues:q}=B,ee=tS((oe,J)=>L({type:yt.textNavigation,event:J,searchString:oe})),O=z.useRef([]);z.useEffect(()=>{zf(O.current,f,h)||(L({type:yt.itemsChange,event:null,items:f,previousItems:O.current}),O.current=f,v==null||v(f))},[f,h,L,v]);const M=oe=>J=>{var le;if((le=oe.onKeyDown)==null||le.call(oe,J),J.defaultMuiPrevented)return;const ne=["Home","End","PageUp","PageDown"];I==="vertical"?ne.push("ArrowUp","ArrowDown"):ne.push("ArrowLeft","ArrowRight"),i==="activeDescendant"&&ne.push(" ","Enter"),ne.includes(J.key)&&J.preventDefault(),L({type:yt.keyDown,key:J.key,event:J}),ee(J)},N=oe=>J=>{var le,ne;(le=oe.onBlur)==null||le.call(oe,J),!J.defaultMuiPrevented&&((ne=E.current)!=null&&ne.contains(J.relatedTarget)||L({type:yt.blur,event:J}))},j=(oe={})=>{const J=Mn(oe);return P({},oe,{"aria-activedescendant":i==="activeDescendant"&&V!=null?l(V):void 0,tabIndex:i==="DOM"?-1:0,ref:D},J,{onBlur:N(J),onKeyDown:M(J)})},te=z.useCallback(oe=>{const J=(q!=null?q:[]).some(ge=>ge!=null&&h(oe,ge)),le=V!=null&&h(oe,V);return{focusable:i==="DOM",highlighted:le,selected:J}},[h,q,V,i]),se=z.useMemo(()=>({dispatch:L,getItemState:te}),[L,te]);return z.useDebugValue({state:B}),{contextValue:se,dispatch:L,getRootProps:j,rootRef:D,state:B}}const rh=z.createContext(null);function lS(e){const{handlePointerOverEvents:t=!1,item:n}=e,r=z.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=z.useCallback(p=>g=>{var m;(m=p.onClick)==null||m.call(p,g),!g.defaultPrevented&&i({type:yt.itemClick,item:n,event:g})},[i,n]),d=z.useCallback(p=>g=>{var m;(m=p.onMouseOver)==null||m.call(p,g),!g.defaultPrevented&&i({type:yt.itemHover,item:n,event:g})},[i,n]);let f;return s&&(f=a?0:-1),{getRootProps:(p={})=>{const g=Mn(p);return P({},p,{onClick:c(g),onPointerOver:t?d(g):void 0,tabIndex:f})},highlighted:a,selected:l}}const Bl=z.createContext(null);function cS(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]=z.useState(new Map),n=z.useRef(new Set),r=z.useCallback(function(c){n.current.delete(c),t(d=>{const f=new Map(d);return f.delete(c),f})},[]),i=z.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=z.useMemo(()=>cS(e),[e]),a=z.useCallback(function(c){return Array.from(o.keys()).indexOf(c)},[o]);return{contextValue:z.useMemo(()=>({getItemIndex:a,registerItem:i,totalSubitemCount:e.size}),[a,i,e.size]),subitems:o}}function oh(e,t){const n=z.useContext(Bl);if(n===null)throw new Error("useCompoundItem must be used within a useCompoundParent");const{registerItem:r}=n,[i,o]=z.useState(typeof e=="function"?void 0:e);return TI(()=>{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 uS(e,t){return function(r={}){const i=P({},r,e(r));return P({},i,t(i))}}const dS=Math.min,fS=Math.max,ua=Math.round,da=Math.floor,fa=e=>({x:e,y:e});function hS(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 pS(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 gS(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function mS(e){return["html","body","#document"].includes(ah(e))}function Nl(e){return $n(e).getComputedStyle(e)}function vS(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=vS(e);return mS(t)?e.ownerDocument?e.ownerDocument.body:e.body:$l(t)&&uh(t)?t:dh(t)}function ha(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?ha(l):[])}return t.concat(i,ha(i,[],n))}function Fl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bS(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=ua(n)!==o||ua(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function zl(e){return pS(e)?e:e.contextElement}function fh(e){const t=zl(e);if(!$l(t))return fa(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=bS(t);let a=(o?ua(n.width):n.width)/r,l=(o?ua(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const yS=fa(0);function CS(e){const t=$n(e);return!gS()||!t.visualViewport?yS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xS(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=fa(1);t&&(a=fh(e));const l=xS()?CS(o):fa(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 g=h,m=Fl(g);for(;m&&r&&p!==g;){const v=fh(m),I=m.getBoundingClientRect(),w=Nl(m),y=I.left+(m.clientLeft+parseFloat(w.paddingLeft))*v.x,C=I.top+(m.clientTop+parseFloat(w.paddingTop))*v.y;s*=v.x,c*=v.y,d*=v.x,f*=v.y,s+=y,c+=C,g=$n(m),m=Fl(g)}}return hS({width:d,height:f,x:s,y:c})}function wS(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=da(d),g=da(i.clientWidth-(c+f)),m=da(i.clientHeight-(d+h)),v=da(c),w={rootMargin:-p+"px "+-g+"px "+-m+"px "+-v+"px",threshold:fS(0,dS(1,s))||1};let y=!0;function C(b){const A=b[0].intersectionRatio;if(A!==s){if(!y)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(C,X(H({},w),{root:i.ownerDocument}))}catch(b){n=new IntersectionObserver(C,w)}n.observe(e)}return a(!0),o}function IS(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?ha(c):[],...ha(t)]:[];d.forEach(I=>{i&&I.addEventListener("scroll",n,{passive:!0}),o&&I.addEventListener("resize",n)});const f=c&&l?wS(c,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(I=>{let[w]=I;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 g,m=s?hh(e):null;s&&v();function v(){const I=hh(e);m&&(I.x!==m.x||I.y!==m.y||I.width!==m.width||I.height!==m.height)&&n(),m=I,g=requestAnimationFrame(v)}return n(),()=>{var I;d.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),f==null||f(),(I=p)==null||I.disconnect(),p=null,s&&cancelAnimationFrame(g)}}function SS(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=D=>F=>{var Y;F.nativeEvent.defaultPrevented||(f(F.target.checked),o==null||o(F),(Y=D.onChange)==null||Y.call(D,F))},{isFocusVisibleRef:p,onBlur:g,onFocus:m,ref:v}=qf(),[I,w]=z.useState(!1);r&&I&&w(!1),z.useEffect(()=>{p.current=I},[I,p]);const y=z.useRef(null),C=D=>F=>{var Y;y.current||(y.current=F.currentTarget),m(F),p.current===!0&&(w(!0),l==null||l(F)),a==null||a(F),(Y=D.onFocus)==null||Y.call(D,F)},b=D=>F=>{var Y;g(F),p.current===!1&&w(!1),i==null||i(F),(Y=D.onBlur)==null||Y.call(D,F)},A=sn(v,y);return{checked:d,disabled:!!r,focusVisible:I,getInputProps:(D={})=>P({checked:t,defaultChecked:n,disabled:r,readOnly:s,ref:A,required:c,type:"checkbox",role:"switch","aria-checked":t},D,{onChange:h(D),onFocus:C(D),onBlur:b(D)}),inputRef:A,readOnly:!!s}}function AS(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=z.useCallback((v,I)=>{s(I),r==null||r(v,I)},[r,s]),{subitems:d,contextValue:f}=ih(),h=z.useRef(()=>{}),p=z.useCallback(v=>{var I;return(I=d.get(v))==null?void 0:I.id},[d]),g=z.useCallback(v=>h.current(v),[]),m=z.useCallback(v=>{h.current=v},[]);return{contextValue:P({direction:o,getTabId:g,getTabPanelId:p,onSelected:c,orientation:i,registerTabIdLookup:m,selectionFollowsFocus:a,value:l},f)}}const ph=z.createContext(null);function pa(){const e=z.useContext(ph);if(e==null)throw new Error("No TabsContext provided");return e}function TS(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,g=z.useMemo(()=>({getItemIndex:i,registerItem:l,totalSubitemCount:d}),[l,i,d]),m=z.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:g,children:u.jsx(ph.Provider,{value:m,children:n})})}function ES(e){return e.size}function _S(e){const{value:t,id:n,rootRef:r}=e,i=pa();if(i===null)throw new Error("No TabContext provided");const{value:o,getTabId:a}=i,l=ji(n),s=z.useRef(null),c=sn(s,r),d=z.useMemo(()=>({id:l,ref:s}),[l]),{id:f}=oh(t!=null?t:ES,d),h=f!==o,p=f!==void 0?a(f):void 0;return{hidden:h,getRootProps:(m={})=>P({"aria-labelledby":p!=null?p:void 0,hidden:h,id:l!=null?l:void 0},m,{ref:c}),rootRef:c}}const gh={valueChange:"valueChange"};function kS(e,t){if(t.type===gh.valueChange)return P({},e,{highlightedValue:t.value});const n=th(e,t),{context:{selectionFollowsFocus:r}}=t;if(t.type===yt.itemsChange){if(n.selectedValues.length>0)return P({},n,{highlightedValue:n.selectedValues[0]});Pt(null,"reset",t.context)}return r&&n.highlightedValue!=null?P({},n,{selectedValues:[n.highlightedValue]}):n}function DS(e){var t;const{rootRef:n}=e,{direction:r="ltr",onSelected:i,orientation:o="horizontal",value:a,registerTabIdLookup:l,selectionFollowsFocus:s}=pa(),{subitems:c,contextValue:d}=ih(),f=z.useCallback(W=>{var T;return(T=c.get(W))==null?void 0:T.id},[c]);l(f);const h=z.useMemo(()=>Array.from(c.keys()),[c]),p=z.useCallback(W=>{var T,U;return W==null?null:(T=(U=c.get(W))==null?void 0:U.ref.current)!=null?T:null},[c]),g=r==="rtl";let m;o==="vertical"?m="vertical":m=g?"horizontal-rtl":"horizontal-ltr";const v=z.useCallback((W,T)=>{var U;i(W,(U=T[0])!=null?U:null)},[i]),I=z.useMemo(()=>a===void 0?{}:a!=null?{selectedValues:[a]}:{selectedValues:[]},[a]),w=z.useCallback(W=>{var T,U;return(T=(U=c.get(W))==null?void 0:U.disabled)!=null?T:!1},[c]),{contextValue:y,dispatch:C,getRootProps:b,state:{highlightedValue:A,selectedValues:E},rootRef:D}=sS({controlledProps:I,disabledItemsFocusable:!s,focusManagement:"DOM",getItemDomElement:p,isItemDisabled:w,items:h,rootRef:n,onChange:v,orientation:m,reducerActionContext:z.useMemo(()=>({selectionFollowsFocus:s||!1}),[s]),selectionMode:"single",stateReducer:kS});z.useEffect(()=>{a!==void 0&&a!=null&&C({type:gh.valueChange,value:a})},[C,a]);const F=(W={})=>P({},W,b(W),{"aria-orientation":o==="vertical"?"vertical":void 0,role:"tablist"});return{contextValue:z.useMemo(()=>P({},d,y),[d,y]),dispatch:C,getRootProps:F,highlightedValue:A,isRtl:g,orientation:o,rootRef:D,selectedValue:(t=E[0])!=null?t:null}}function PS(e){const{value:t,children:n}=e,{dispatch:r,getItemIndex:i,getItemState:o,registerItem:a,totalSubitemCount:l}=t,s=z.useMemo(()=>({dispatch:r,getItemState:o,getItemIndex:i}),[r,i,o]),c=z.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 OS(e){return e.size}function RS(e){const{value:t,rootRef:n,disabled:r=!1,id:i}=e,o=z.useRef(null),a=ji(i),{value:l,selectionFollowsFocus:s,getTabPanelId:c}=pa(),d=z.useMemo(()=>({disabled:r,ref:o,id:a}),[r,o,a]),{id:f,index:h,totalItemCount:p}=oh(t!=null?t:OS,d),{getRootProps:g,highlighted:m,selected:v}=lS({item:f}),{getRootProps:I,rootRef:w,active:y,focusVisible:C,setFocusVisible:b}=Rl({disabled:r,focusableWhenDisabled:!s,type:"button"}),A=sn(o,n,w),E=f!==void 0?c(f):void 0;return{getRootProps:(F={})=>{const Y=Mn(F),W=uS(g,I);return P({},F,W(Y),{role:"tab","aria-controls":E,"aria-selected":v,id:a,ref:A})},active:y,focusVisible:C,highlighted:m,index:h,rootRef:A,selected:v||f===l,setFocusVisible:b,totalTabsCount:p}}const mh="$$joy";function MS(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}function LS(e,t){return Lt(e,t)}const BS=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},$S=["values","unit","step"],NS=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)=>P({},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,$S),o=NS(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 g=a.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]: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 P({keys:a,values:o,up:l,down:s,between:c,only:d,not:f,unit:n},i)}const FS={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 zS(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function jS(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 ga(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=ga(c,i,f);return f===h&&typeof f=="string"&&(h=ga(c,i,`${t}${f==="default"?"":ye(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function VS(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const US={m:"margin",p:"padding"},HS={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},yh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},WS=VS(e=>{if(e.length>2)if(yh[e])e=yh[e];else return[e];const[t,n]=e.split(""),r=US[t],i=HS[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 GS(e,t){return n=>e.reduce((r,i)=>(r[i]=Hi(t,n),r),{})}function YS(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=WS(n),o=GS(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=>YS(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 ma(...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 KS=en("border",Zt),qS=en("borderTop",Zt),QS=en("borderRight",Zt),JS=en("borderBottom",Zt),XS=en("borderLeft",Zt),ZS=en("borderColor"),eA=en("borderTopColor"),tA=en("borderRightColor"),nA=en("borderBottomColor"),rA=en("borderLeftColor"),iA=en("outline",Zt),oA=en("outlineColor"),va=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};va.propTypes={},va.filterProps=["borderRadius"],ma(KS,qS,QS,JS,XS,ZS,eA,tA,nA,rA,va,iA,oA);const ba=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};ba.propTypes={},ba.filterProps=["gap"];const ya=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};ya.propTypes={},ya.filterProps=["columnGap"];const Ca=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};Ca.propTypes={},Ca.filterProps=["rowGap"];const aA=rt({prop:"gridColumn"}),sA=rt({prop:"gridRow"}),lA=rt({prop:"gridAutoFlow"}),cA=rt({prop:"gridAutoColumns"}),uA=rt({prop:"gridAutoRows"}),dA=rt({prop:"gridTemplateColumns"}),fA=rt({prop:"gridTemplateRows"}),hA=rt({prop:"gridTemplateAreas"}),pA=rt({prop:"gridArea"});ma(ba,ya,Ca,aA,sA,lA,cA,uA,dA,fA,hA,pA);function zr(e,t){return t==="grey"?t:e}const gA=rt({prop:"color",themeKey:"palette",transform:zr}),mA=rt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:zr}),vA=rt({prop:"backgroundColor",themeKey:"palette",transform:zr});ma(gA,mA,vA);function Ht(e){return e<=1&&e!==0?`${e*100}%`:e}const bA=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 yA=rt({prop:"minWidth",transform:Ht}),CA=rt({prop:"height",transform:Ht}),xA=rt({prop:"maxHeight",transform:Ht}),wA=rt({prop:"minHeight",transform:Ht});rt({prop:"size",cssProperty:"width",transform:Ht}),rt({prop:"size",cssProperty:"height",transform:Ht});const IA=rt({prop:"boxSizing"});ma(bA,Hl,yA,CA,xA,wA,IA);const xa={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:va},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:ba},rowGap:{style:Ca},columnGap:{style:ya},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 SA(...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 AA(e,t){return typeof e=="function"?e(t):e}function TA(){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,g=>{let m=ga(h,d,g);return g===m&&typeof g=="string"&&(m=ga(h,d,`${n}${g==="default"?"":ye(g)}`,g)),s===!1?m:{[s]:m}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:xa;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=zS(o.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const g=AA(c[p],o);if(g!=null)if(typeof g=="object")if(a[p])h=Vi(h,e(p,g,o,a));else{const m=Nn({theme:o},g,v=>({[p]:v}));SA(m,g)?h[p]=t({sx:g,theme:o}):h=Vi(h,m)}else h=Vi(h,e(p,g,o,a))}),jS(f,h)}return Array.isArray(i)?i.map(l):l(i)}return t}const wa=TA();wa.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 EA=["breakpoints","palette","spacing","shape"];function Sh(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=Ae(e,EA),l=vh(n),s=wh(i);let c=Bn({breakpoints:l,direction:"ltr",components:{},palette:P({mode:"light"},r),spacing:s,shape:P({},FS,o)},a);return c.applyStyles=Ih,c=t.reduce((d,f)=>Bn(d,f),c),c.unstable_sxConfig=P({},xa,a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(f){return wa({sx:f,theme:this})},c}function _A(e){return Object.keys(e).length===0}function kA(e=null){const t=z.useContext(pe.ThemeContext);return!t||_A(t)?e:t}const DA=Sh();function PA(e=DA){return kA(e)}const OA=["sx"],RA=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:xa;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function MA(e){const{sx:t}=e,n=Ae(e,OA),{systemProps:r,otherProps:i}=RA(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...a)=>{const l=t(...a);return Xn(l)?P({},r,l):r}:o=P({},r,t),P({},i,{sx:o})}const LA=["ownerState"],BA=["variants"],$A=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function NA(e){return Object.keys(e).length===0}function FA(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const zA=Sh(),jA=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Ia({defaultTheme:e,theme:t,themeId:n}){return NA(t)?e:t[n]||t}function VA(e){return e?(t,n)=>n[e]:null}function Sa(e,t){let{ownerState:n}=t,r=Ae(t,LA);const i=typeof e=="function"?e(P({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Sa(o,P({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let l=Ae(i,BA);return o.forEach(s=>{let c=!0;typeof s.props=="function"?c=s.props(P({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(P({ownerState:n},r,n)):s.style))}),l}return i}function UA(e={}){const{themeId:t,defaultTheme:n=zA,rootShouldForwardProp:r=Wl,slotShouldForwardProp:i=Wl}=e,o=a=>wa(P({},a,{theme:Ia(P({},a,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(a,l={})=>{BS(a,b=>b.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:s,slot:c,skipVariantsResolver:d,skipSx:f,overridesResolver:h=VA(jA(c))}=l,p=Ae(l,$A),g=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,m=f||!1;let v,I=Wl;c==="Root"||c==="root"?I=r:c?I=i:FA(a)&&(I=void 0);const w=LS(a,P({shouldForwardProp:I,label:v},p)),y=b=>typeof b=="function"&&b.__emotion_real!==b||Xn(b)?A=>Sa(b,P({},A,{theme:Ia({theme:A.theme,defaultTheme:n,themeId:t})})):b,C=(b,...A)=>{let E=y(b);const D=A?A.map(y):[];s&&h&&D.push(W=>{const T=Ia(P({},W,{defaultTheme:n,themeId:t}));if(!T.components||!T.components[s]||!T.components[s].styleOverrides)return null;const U=T.components[s].styleOverrides,G={};return Object.entries(U).forEach(([$,B])=>{G[$]=Sa(B,P({},W,{theme:T}))}),h(W,G)}),s&&!g&&D.push(W=>{var T;const U=Ia(P({},W,{defaultTheme:n,themeId:t})),G=U==null||(T=U.components)==null||(T=T[s])==null?void 0:T.variants;return Sa({variants:G},P({},W,{theme:U}))}),m||D.push(o);const F=D.length-A.length;if(Array.isArray(b)&&F>0){const W=new Array(F).fill("");E=[...b,...W],E.raw=[...b.raw,...W]}const Y=w(E,...D);return a.muiName&&(Y.muiName=a.muiName),Y};return w.withConfig&&(C.withConfig=w.withConfig),C}}function HA(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 WA({props:e,name:t,defaultTheme:n,themeId:r}){let i=PA(n);return r&&(i=i[r]||i),HA({theme:i,name:t,props:e})}function GA(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(GA(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Xo(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(Xo(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])})},YA=(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)},KA=(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 YA(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]:KA(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 qA(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=qA(e,"string");return vr(t)=="symbol"?t:t+""}const QA=["colorSchemes","components","defaultColorScheme"];function JA(e,t){const{colorSchemes:n={},defaultColorScheme:r="light"}=e,i=Ae(e,QA),{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,g])=>{const{vars:m,css:v,varsWithDefaults:I}=Yl(g,t);s=Bn(s,I),c[p]={css:v,vars:m}}),d){const{css:p,vars:g,varsWithDefaults:m}=Yl(d,t);s=Bn(s,m),c[r]={css:p,vars:g}}return{vars:s,generateCssVars:p=>{var g;if(!p){var m;const I=P({},a);return{css:I,vars:o,selector:(t==null||(m=t.getSelector)==null?void 0:m.call(t,p,I))||":root"}}const v=P({},c[p].css);return{css:v,vars:c[p].vars,selector:(t==null||(g=t.getSelector)==null?void 0:g.call(t,p,v))||":root"}}}}const XA=P({},xa,{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 ZA(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)=>$I(e,t,"Mui"),e1=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;e1(l)&&typeof l=="object"&&(n=P({},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},t1=["cssVarPrefix","breakpoints","spacing","components","variants","shouldSkipGeneratingVar"],n1=["colorSchemes"],r1=(e="joy")=>Gl(e);function i1(e){var t,n,r,i,o,a,l,s,c,d;const f={},{cssVarPrefix:h="joy",breakpoints:p,spacing:g,components:m,variants:v,shouldSkipGeneratingVar:I=ZA}=f,w=Ae(f,t1),y=r1(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])},A=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")}),D={palette:{mode:"light",primary:P({},C.primary,A("primary")),neutral:P({},C.neutral,A("neutral"),{plainColor:b("palette-neutral-700"),plainHoverColor:b("palette-neutral-900"),outlinedColor:b("palette-neutral-700")}),danger:P({},C.danger,A("danger")),success:P({},C.success,A("success")),warning:P({},C.warning,A("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"},F={palette:{mode:"dark",primary:P({},C.primary,E("primary")),neutral:P({},C.neutral,E("neutral"),{plainColor:b("palette-neutral-300"),plainHoverColor:b("palette-neutral-300")}),danger:P({},C.danger,E("danger")),success:P({},C.success,E("success")),warning:P({},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"},Y='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',W=P({body:`"Inter", ${y(`fontFamily-fallback, ${Y}`)}`,display:`"Inter", ${y(`fontFamily-fallback, ${Y}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:Y},w.fontFamily),T=P({sm:300,md:500,lg:600,xl:700},w.fontWeight),U=P({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),G=P({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},w.lineHeight),$=(t=(n=w.colorSchemes)==null||(n=n.light)==null?void 0:n.shadowRing)!=null?t:D.shadowRing,B=(r=(i=w.colorSchemes)==null||(i=i.light)==null?void 0:i.shadowChannel)!=null?r:D.shadowChannel,L=(o=(a=w.colorSchemes)==null||(a=a.light)==null?void 0:a.shadowOpacity)!=null?o:D.shadowOpacity,V={colorSchemes:{light:D,dark:F},fontSize:U,fontFamily:W,fontWeight:T,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:G,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${y("shadowRing",$)}, 0px 1px 2px 0px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)})`,sm:`${y("shadowRing",$)}, 0px 1px 2px 0px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)}), 0px 2px 4px 0px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)})`,md:`${y("shadowRing",$)}, 0px 2px 8px -2px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)}), 0px 6px 12px -2px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)})`,lg:`${y("shadowRing",$)}, 0px 2px 8px -2px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)}), 0px 12px 16px -4px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)})`,xl:`${y("shadowRing",$)}, 0px 2px 8px -2px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)}), 0px 20px 24px -4px rgba(${y("shadowChannel",B)} / ${y("shadowOpacity",L)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,snackbar:1400,tooltip:1500},typography:{h1:{fontFamily:y(`fontFamily-display, ${W.display}`),fontWeight:y(`fontWeight-xl, ${T.xl}`),fontSize:y(`fontSize-xl4, ${U.xl4}`),lineHeight:y(`lineHeight-xs, ${G.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${D.palette.text.primary}`)},h2:{fontFamily:y(`fontFamily-display, ${W.display}`),fontWeight:y(`fontWeight-xl, ${T.xl}`),fontSize:y(`fontSize-xl3, ${U.xl3}`),lineHeight:y(`lineHeight-xs, ${G.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${D.palette.text.primary}`)},h3:{fontFamily:y(`fontFamily-display, ${W.display}`),fontWeight:y(`fontWeight-lg, ${T.lg}`),fontSize:y(`fontSize-xl2, ${U.xl2}`),lineHeight:y(`lineHeight-xs, ${G.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${D.palette.text.primary}`)},h4:{fontFamily:y(`fontFamily-display, ${W.display}`),fontWeight:y(`fontWeight-lg, ${T.lg}`),fontSize:y(`fontSize-xl, ${U.xl}`),lineHeight:y(`lineHeight-md, ${G.md}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${D.palette.text.primary}`)},"title-lg":{fontFamily:y(`fontFamily-body, ${W.body}`),fontWeight:y(`fontWeight-lg, ${T.lg}`),fontSize:y(`fontSize-lg, ${U.lg}`),lineHeight:y(`lineHeight-xs, ${G.xs}`),color:y(`palette-text-primary, ${D.palette.text.primary}`)},"title-md":{fontFamily:y(`fontFamily-body, ${W.body}`),fontWeight:y(`fontWeight-md, ${T.md}`),fontSize:y(`fontSize-md, ${U.md}`),lineHeight:y(`lineHeight-md, ${G.md}`),color:y(`palette-text-primary, ${D.palette.text.primary}`)},"title-sm":{fontFamily:y(`fontFamily-body, ${W.body}`),fontWeight:y(`fontWeight-md, ${T.md}`),fontSize:y(`fontSize-sm, ${U.sm}`),lineHeight:y(`lineHeight-sm, ${G.sm}`),color:y(`palette-text-primary, ${D.palette.text.primary}`)},"body-lg":{fontFamily:y(`fontFamily-body, ${W.body}`),fontSize:y(`fontSize-lg, ${U.lg}`),lineHeight:y(`lineHeight-md, ${G.md}`),color:y(`palette-text-secondary, ${D.palette.text.secondary}`)},"body-md":{fontFamily:y(`fontFamily-body, ${W.body}`),fontSize:y(`fontSize-md, ${U.md}`),lineHeight:y(`lineHeight-md, ${G.md}`),color:y(`palette-text-secondary, ${D.palette.text.secondary}`)},"body-sm":{fontFamily:y(`fontFamily-body, ${W.body}`),fontSize:y(`fontSize-sm, ${U.sm}`),lineHeight:y(`lineHeight-md, ${G.md}`),color:y(`palette-text-tertiary, ${D.palette.text.tertiary}`)},"body-xs":{fontFamily:y(`fontFamily-body, ${W.body}`),fontWeight:y(`fontWeight-md, ${T.md}`),fontSize:y(`fontSize-xs, ${U.xs}`),lineHeight:y(`lineHeight-md, ${G.md}`),color:y(`palette-text-tertiary, ${D.palette.text.tertiary}`)}}},q=w?Bn(V,w):V,{colorSchemes:ee}=q,O=Ae(q,n1),M=P({colorSchemes:ee},O,{breakpoints:vh(p!=null?p:{}),components:Bn({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:J,theme:le})=>{var ne;const ge=J.instanceFontSize;return P({margin:"var(--Icon-margin)"},J.fontSize&&J.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${le.vars.fontSize[J.fontSize]})`},!J.htmlColor&&P({color:`var(--Icon-color, ${M.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]})}}}},m),cssVarPrefix:h,getCssVar:y,spacing:wh(g)});function N(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(M.colorSchemes).forEach(([J,le])=>{N(J,le.palette)});const j={prefix:h,shouldSkipGeneratingVar:I},{vars:te,generateCssVars:se}=JA(P({colorSchemes:ee},O),j);M.vars=te,M.generateCssVars=se,M.unstable_sxConfig=P({},XA,void 0),M.unstable_sx=function(le){return wa({sx:le,theme:this})},M.getColorSchemeSelector=J=>J==="light"?"&":`&[data-joy-color-scheme="${J}"], [data-joy-color-scheme="${J}"] &`;const oe={getCssVar:y,palette:M.colorSchemes.light.palette};return M.variants=Bn({plain:Tt("plain",oe),plainHover:Tt("plainHover",oe),plainActive:Tt("plainActive",oe),plainDisabled:Tt("plainDisabled",oe),outlined:Tt("outlined",oe),outlinedHover:Tt("outlinedHover",oe),outlinedActive:Tt("outlinedActive",oe),outlinedDisabled:Tt("outlinedDisabled",oe),soft:Tt("soft",oe),softHover:Tt("softHover",oe),softActive:Tt("softActive",oe),softDisabled:Tt("softDisabled",oe),solid:Tt("solid",oe),solidHover:Tt("solidHover",oe),solidActive:Tt("solidActive",oe),solidDisabled:Tt("solidDisabled",oe)},v),M.palette=P({},M.colorSchemes.light.palette,{colorScheme:"light"}),M.shouldSkipGeneratingVar=I,M.applyStyles=Ih,M}const kh=i1(),be=UA({defaultTheme:kh,themeId:mh});function ct({props:e,name:t}){return WA({props:e,name:t,defaultTheme:P({},kh,{components:{}}),themeId:mh})}function o1(e){return it("MuiAccordion",e)}const a1=Xe("MuiAccordion",["root","expanded","disabled"]),s1=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],l1=["component","slots","slotProps"],c1=["component"];function Ie(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:l}=t,s=Ae(t,s1),{component:c,slots:d={[e]:void 0},slotProps:f={[e]:void 0}}=o,h=Ae(o,l1),p=d[e]||r,g=CI(f[e],i),m=II(P({className:n},s,{externalForwardedProps:e==="root"?h:void 0,externalSlotProps:g})),{props:{component:v},internalRef:I}=m,w=Ae(m.props,c1),y=sn(I,g==null?void 0:g.ref,t.ref),C=a?a(w):{},b=P({},i,C),A=e==="root"?v||c:v,E=yI(p,P({},e==="root"&&!c&&!d[e]&&l,e!=="root"&&!d[e]&&l,w,A&&{as:A},{ref:y}),b);return Object.keys(C).forEach(D=>{delete E[D]}),[p,E]}const ql=z.createContext({});function u1(e){return it("MuiListItem",e)}const Dh=Xe("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),Aa=z.createContext(!1),Ql=z.createContext(!1),Ph=z.createContext(!1),Oh=z.createContext(void 0),d1=z.createContext(void 0),Rh=z.createContext(void 0),f1=["component","className","children","nested","sticky","variant","color","startAction","endAction","role","slots","slotProps"],h1=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,u1,{})},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"},P({"--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&&P({},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})`},{[`.${Dh.nested} > &`]:{"--_ListItem-display":"flex"}}),(n=e.variants[t.variant])==null?void 0:n[t.color]]}),p1=be(Jl,{name:"JoyListItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),g1=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})),m1=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=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyListItem"}),i=z.useContext(Rh),o=z.useContext(Oh),a=z.useContext(Ql),l=z.useContext(Ph),s=z.useContext(Aa),{component:c,className:d,children:f,nested:h=!1,sticky:p=!1,variant:g="plain",color:m="neutral",startAction:v,endAction:I,role:w,slots:y={},slotProps:C={}}=r,b=Ae(r,f1),[A,E]=z.useState(""),[D,F]=(o==null?void 0:o.split(":"))||["",""],Y=c||(D&&!D.match(/^(ul|ol|menu)$/)?"div":void 0);let W=i==="menu"?"none":void 0;o&&(W={menu:"none",menubar:"none",group:"presentation"}[F]),w&&(W=w);const T=P({},r,{sticky:p,startAction:v,endAction:I,row:a,wrap:l,variant:g,color:m,nesting:s,nested:h,component:Y,role:W}),U=h1(T),G=P({},b,{component:Y,slots:y,slotProps:C}),[$,B]=Ie("root",{additionalProps:{role:W},ref:n,className:Ln(U.root,d),elementType:p1,externalForwardedProps:G,ownerState:T}),[L,V]=Ie("startAction",{className:U.startAction,elementType:g1,externalForwardedProps:G,ownerState:T}),[q,ee]=Ie("endAction",{className:U.endAction,elementType:m1,externalForwardedProps:G,ownerState:T});return u.jsx(d1.Provider,{value:E,children:u.jsx(Aa.Provider,{value:h?A||!0:!1,children:u.jsxs($,P({},B,{children:[v&&u.jsx(L,P({},V,{children:v})),z.Children.map(f,(O,M)=>{var N;return z.isValidElement(O)?z.cloneElement(O,P({},M===0&&{"data-first-child":""},Gf(O,["ListItem"])&&{component:((N=O.props)==null?void 0:N.component)||"div"})):O}),I&&u.jsx(q,P({},ee,{children:I}))]}))})})});Mh.muiName="ListItem";const Lh=Mh;function v1(e){return it("MuiAccordionDetails",e)}const br=Xe("MuiAccordionDetails",["root","content","expanded"]),b1=["accordionId","component","color","children","defaultExpanded","disabled","expanded","onChange","variant","slots","slotProps"],y1=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,o1,{})},C1=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"}}),x1=z.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:g={}}=r,m=Ae(r,b1),v=ji(i),[I,w]=kl({controlled:d,default:s,name:"Accordion",state:"expanded"}),y=z.useCallback(Y=>{w(!I),f&&f(Y,!I)},[I,f,w]),C=z.useMemo(()=>({accordionId:v,expanded:I,disabled:c,toggle:y}),[v,I,c,y]),b=P({},m,{component:o,slots:p,slotProps:g}),A=P({},r,{component:o,color:a,variant:h,expanded:I,disabled:c,nested:!0}),E=y1(A),[D,F]=Ie("root",{ref:n,className:E.root,elementType:C1,externalForwardedProps:b,ownerState:A});return u.jsx(ql.Provider,{value:C,children:u.jsx(D,P({},F,{children:z.Children.map(l,(Y,W)=>z.isValidElement(Y)&&W===0?z.cloneElement(Y,{"data-first-child":""}):Y)}))})});function w1(e){return it("MuiAccordionGroup",e)}Xe("MuiAccordionGroup",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const I1={"--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(Ph.Provider,{value:i,children:z.Children.map(t,(a,l)=>z.isValidElement(a)?z.cloneElement(a,P({},l===0&&{"data-first-child":""},l===z.Children.count(t)-1&&{"data-last-child":""})):a)})});return n===void 0?o:u.jsx(Aa.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=P({},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 S1(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 A1=z.createContext(void 0),T1=["component","className","children","size","orientation","wrap","variant","color","role","slots","slotProps"],E1=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,S1,{})},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&&P({},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&&P({},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"?P({},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"}),P({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})]}),_1=be(ec,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({}),k1=z.forwardRef(function(t,n){var r;const i=z.useContext(Aa),o=z.useContext(Rh),a=z.useContext(A1),l=ct({props:t,name:"JoyList"}),{component:s,className:c,children:d,size:f,orientation:h="vertical",wrap:p=!1,variant:g="plain",color:m="neutral",role:v,slots:I={},slotProps:w={}}=l,y=Ae(l,T1),C=f||((r=t.size)!=null?r:"md");let b;o&&(b="group"),a&&(b="presentation"),v&&(b=v);const A=P({},l,{instanceSize:t.size,size:C,nesting:i,orientation:h,wrap:p,variant:g,color:m,role:b}),E=E1(A),D=P({},y,{component:s,slots:I,slotProps:w}),[F,Y]=Ie("root",{ref:n,className:Ln(E.root,c),elementType:_1,externalForwardedProps:D,ownerState:A,additionalProps:{as:s,role:b,"aria-labelledby":typeof i=="string"?i:void 0}});return u.jsx(F,P({},Y,{children:u.jsx(Oh.Provider,{value:`${typeof s=="string"?s:""}:${b||""}`,children:u.jsx(Xl,{row:h==="horizontal",wrap:p,children:d})})}))}),D1=["component","color","children","disableDivider","variant","transition","size","slots","slotProps"],P1=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,w1,{})},O1=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}`}})),P({"--List-padding":"0px","--ListDivider-gap":"0px"},n,!t.disableDivider&&{[`& .${a1.root}:not([data-last-child])`]:{"--Accordion-borderBottom":`1px solid ${e.vars.palette.divider}`}})}),R1=z.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,D1),g=P({},p,{component:i,slots:f,slotProps:h}),m=P({},r,{component:i,color:o,disableDivider:l,variant:s,transition:c,size:d}),v=P1(m),[I,w]=Ie("root",{ref:n,className:v.root,elementType:O1,externalForwardedProps:g,ownerState:m});return u.jsx(I,P({},w,{children:u.jsx(Xl,{children:a})}))}),M1=["component","children","color","variant","slots","slotProps"],L1=e=>{const{expanded:t}=e;return lt({root:["root",t&&"expanded"],content:["content",t&&"expanded"]},v1,{})},B1=be("div",{name:"JoyAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n;return P({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"}})}),$1=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}}),N1=z.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,M1),{accordionId:f,expanded:h=!1}=z.useContext(ql),p=z.useRef(null),g=sn(p,n);z.useEffect(()=>{p.current&&p.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])').forEach(E=>{if(h){const D=E.getAttribute("data-prev-tabindex"),F=E.getAttribute("tabindex");F&&D&&(E.setAttribute("tabindex",D),E.removeAttribute("data-prev-tabindex")),!D&&!F&&E.removeAttribute("tabindex")}else E.setAttribute("data-prev-tabindex",E.getAttribute("tabindex")||""),E.setAttribute("tabindex","-1")})},[h]);const m=P({},d,{component:i,slots:s,slotProps:c}),v=P({},r,{component:i,color:a,variant:l,expanded:h,nesting:!0}),I=L1(v),[w,y]=Ie("root",{ref:g,className:I.root,elementType:B1,externalForwardedProps:m,additionalProps:{id:`${f}-details`,"aria-labelledby":`${f}-summary`,role:"region",hidden:h?void 0:!0},ownerState:v}),[C,b]=Ie("content",{className:I.content,elementType:$1,externalForwardedProps:m,ownerState:v});return u.jsx(w,P({},y,{children:u.jsx(C,P({},b,{children:o}))}))});function F1(e){return it("MuiAccordionSummary",e)}const Ta=Xe("MuiAccordionSummary",["root","button","indicator","disabled","expanded"]),Ea=Xe("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]),z1=z.createContext("horizontal"),tc=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,l;return P({"--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]:P({},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],[`.${Dh.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${Ea.selected}`]:P({},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${Ea.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]},[`&.${Ea.disabled}`]:P({},(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})=>P({},!e.row&&{[`&.${Ea.selected}`]:{fontWeight:t.vars.fontWeight.md}}));function j1(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 V1=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],U1=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,j1,{})},Bh={sm:"xl",md:"xl2",lg:"xl3"},H1=be("svg",{name:"JoySvgIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return P({},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&&P({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=z.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:g={},slotProps:m={}}=r,v=Ae(r,V1),I=z.isValidElement(i)&&i.type==="svg",w=P({},r,{color:a,component:l,size:p,instanceSize:t.size,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:I}),y=U1(w),C=P({},v,{component:l,slots:g,slotProps:m}),[b,A]=Ie("root",{ref:n,className:Ln(y.root,o),elementType:H1,externalForwardedProps:C,ownerState:w,additionalProps:P({color:c,focusable:!1},f&&{role:"img"},!f&&{"aria-hidden":!0},!d&&{viewBox:h},I&&i.props)});return u.jsxs(b,P({},A,{children:[I?i.props.children:i,f?u.jsx("title",{children:f}):null]}))});function nc(e,t){function n(r,i){return u.jsx($h,P({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=$h.muiName,z.memo(z.forwardRef(n))}const W1=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 G1=["component","color","children","indicator","variant","slots","slotProps"],Y1=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"]},F1,{})},K1=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)",[`&.${Ta.expanded}`]:{"--Icon-color":"currentColor"}})),q1=be(tc,{name:"JoyAccordionSummary",slot:"Button",overridesResolver:(e,t)=>t.button})({gap:"inherit",fontWeight:"inherit",justifyContent:"space-between",font:"inherit","&:focus-visible":{zIndex:1},[`.${Ta.root} &`]:{"--unstable_ListItem-flex":"1 0 0%"}}),Q1=be("span",{name:"JoyAccordionSummary",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})({display:"inline-flex",[`&.${Ta.expanded}`]:{transform:"rotate(180deg)"}}),J1=z.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(W1,{})),variant:s="plain",slots:c={},slotProps:d={}}=r,f=Ae(r,G1),{accordionId:h,disabled:p=!1,expanded:g=!1,toggle:m}=z.useContext(ql),v=P({},f,{component:i,slots:c,slotProps:d}),I=P({},r,{component:i,color:o,disabled:p,expanded:g,variant:s}),w=Y=>{if(m&&m(Y),typeof d.button=="function"){var W,T;(W=d.button(I))==null||(T=W.onClick)==null||T.call(W,Y)}else{var U,G;(U=d.button)==null||(G=U.onClick)==null||G.call(U,Y)}},y=Y1(I),[C,b]=Ie("root",{ref:n,className:y.root,elementType:K1,externalForwardedProps:v,ownerState:I}),[A,E]=Ie("button",{ref:n,className:y.button,elementType:q1,externalForwardedProps:v,additionalProps:{component:"button",id:`${h}-summary`,"aria-expanded":g?"true":"false","aria-controls":`${h}-details`,disabled:p,type:"button",onClick:w},ownerState:I}),[D,F]=Ie("indicator",{ref:n,className:y.indicator,elementType:Q1,externalForwardedProps:v,ownerState:I});return u.jsx(C,P({},b,{children:u.jsxs(A,P({},E,{children:[a,l&&u.jsx(D,P({},F,{children:l}))]}))}))}),X1=({label:e,disabled:t,children:n})=>(t=t||!1,u.jsx(R1,{variant:"outlined",transition:"0.2s",sx:{borderRadius:"md",overflow:"hidden",[`& .${Ta.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(x1,{disabled:t,children:[u.jsx(J1,{children:e}),u.jsx(N1,{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(S.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(S.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(S.FormControl,{children:[u.jsx(S.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(S.FormHelperText,{children:o})]}):u.jsx(S.Box,{sx:()=>({marginBottom:"16px"}),children:u.jsx(vi,{value:n||r,defaultValue:r,onChange:l,modules:rc,placeholder:i})})},Z1=e=>{const t=n=>{n.persist(),e.onChange(n.target.value)};return u.jsxs(S.Tabs,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(S.TabList,{sx:{borderRadius:0},tabFlex:"auto",children:[u.jsx(S.Tab,{children:e.labels.richText}),u.jsx(S.Tab,{children:e.labels.plainText})]}),u.jsx(S.TabPanel,{value:0,sx:{px:0},children:u.jsx(ic,{label:"",placeholder:"",defaultValue:e.defaultValue,property:"ad_content",onChange:e.onChange})}),u.jsx(S.TabPanel,{value:1,sx:{px:0},children:u.jsx(S.Textarea,{defaultValue:e.defaultValue,minRows:"7",onChange:t,sx:{marginBottom:"16px",overflow:"auto",resize:"vertical"}})})]})},eT=({label:e,defaultValue:t,values:n,description:r,onChange:i})=>{const o=(a,l)=>{i(l||"")};return u.jsxs(S.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(S.FormLabel,{color:"primary",children:e}),u.jsx(S.Select,{defaultValue:t,onChange:o,children:n.map((a,l)=>u.jsx(S.Option,{value:a,children:a},`basic-select-${a}-${l}`))}),r?u.jsx(S.FormHelperText,{children:r}):u.jsx(u.Fragment,{})]})},oc=z.createContext("md");function tT(e){return it("MuiTabs",e)}Xe("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const nT=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],rT=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,tT,{})},iT=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 P({},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=z.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:g={}}=r,m=Ae(r,nT),v=a||(o===void 0?0:void 0),{contextValue:I}=AS(P({},r,{orientation:l,defaultValue:v})),w=P({},r,{orientation:l,direction:s,variant:d,color:f,size:h}),y=rT(w),C=P({},m,{component:c,slots:p,slotProps:g}),[b,A]=Ie("root",{ref:n,elementType:iT,externalForwardedProps:C,additionalProps:{ref:n,as:c},ownerState:w,className:y.root});return u.jsx(b,P({},A,{children:u.jsx(TS,{value:I,children:u.jsx(oc.Provider,{value:h,children:i})})}))});function oT(e){return it("MuiTabList",e)}Xe("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);function aT(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"]),sT=["component","children","variant","color","size","disableUnderline","underlinePlacement","tabFlex","sticky","slots","slotProps"],lT=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,oT,{})},cT=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 P({"--List-gap":"0px","--ListDivider-gap":"0px","--ListItem-paddingX":"var(--Tabs-spacing)","--ListItem-gap":"0.375rem","--unstable_TabList-hasUnderline":t.disableUnderline?"var(--unknown,)":"initial"},I1,{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&&P({},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=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabList"}),i=z.useContext(oc),{isRtl:o,orientation:a,getRootProps:l,contextValue:s}=DS({rootRef:n}),{component:c="div",children:d,variant:f="plain",color:h="neutral",size:p,disableUnderline:g=!1,underlinePlacement:m=a==="horizontal"?"bottom":"right",tabFlex:v,sticky:I,slots:w={},slotProps:y={}}=r,C=Ae(r,sT),b=p!=null?p:i,A=P({},r,{isRtl:o,orientation:a,variant:f,color:h,size:b,sticky:I,tabFlex:v,nesting:!1,disableUnderline:g,underlinePlacement:m}),E=lT(A),D=P({},C,{component:c,slots:w,slotProps:y}),[F,Y]=Ie("root",{ref:n,elementType:cT,getSlotProps:l,externalForwardedProps:D,ownerState:A,className:E.root});return u.jsx(F,P({},Y,{children:u.jsx(PS,{value:s,children:u.jsx(Xl,{row:a==="horizontal",nested:!0,children:d})})}))}),uT=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],dT=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,aT,{})},fT=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=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTab"}),i=z.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:g=!1,slots:m={},slotProps:v={}}=r,I=Ae(r,uT),w=z.useRef(null),y=sn(w,n),{active:C,focusVisible:b,setFocusVisible:A,selected:E,getRootProps:D}=RS(P({},r,{rootRef:y}));z.useImperativeHandle(o,()=>({focusVisible:()=>{A(!0),w.current.focus()}}),[A]);const F=P({},r,{disableIndicator:h,indicatorPlacement:p,indicatorInset:g,orientation:c,row:i,active:C,focusVisible:b,disabled:l,selected:E,variant:d,color:f}),Y=dT(F),W=P({},I,{component:s,slots:m,slotProps:v}),[T,U]=Ie("root",{ref:n,elementType:fT,getSlotProps:D,externalForwardedProps:W,ownerState:F,className:Y.root});return u.jsx(z1.Provider,{value:c,children:u.jsx(T,P({},U,{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(z.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?H({},e):e;return Fn(e)&&Fn(t)&&Object.keys(t).forEach(i=>{z.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=H({},t);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]=H(H({},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]=H({},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 hT(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,pT=(()=>{let e=Vh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Vh}}})(),gT={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=gT[t];return r?`${n}-${r}`:`${pT.generate(e)}-${t}`}function mT(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Uh(e,i,n)}),r}function vT(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 bT(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},H({},t)):t}function yT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function CT(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 xT(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(H({},e),{containerQueries:i})}const _a={xs:0,sm:600,md:900,lg:1200,xl:1536},Hh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${_a[e]}px)`},wT={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:_a[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(yT(o.keys,l)){const s=CT(r.containerQueries?r:wT,l);s&&(a[s]=n(t[l],l))}else if(Object.keys(o.values||_a).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 IT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function ST(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function ka(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=ka(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=ka(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 AT(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const TT={m:"margin",p:"padding"},ET={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Wh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},_T=AT(e=>{if(e.length>2)if(Wh[e])e=Wh[e];else return[e];const[t,n]=e.split(""),r=TT[t],i=ET[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=ka(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 kT(e,t){return n=>e.reduce((r,i)=>(r[i]=Ki(t,n),r),{})}function DT(e,t,n,r){if(!t.includes(n))return null;const i=_T(n),o=kT(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=>DT(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 Pa(...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 PT=nn("border",tn),OT=nn("borderTop",tn),RT=nn("borderRight",tn),MT=nn("borderBottom",tn),LT=nn("borderLeft",tn),BT=nn("borderColor"),$T=nn("borderTopColor"),NT=nn("borderRightColor"),FT=nn("borderBottomColor"),zT=nn("borderLeftColor"),jT=nn("outline",tn),VT=nn("outlineColor"),Oa=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};Oa.propTypes={},Oa.filterProps=["borderRadius"],Pa(PT,OT,RT,MT,LT,BT,$T,NT,FT,zT,Oa,jT,VT);const Ra=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};Ra.propTypes={},Ra.filterProps=["gap"];const Ma=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};Ma.propTypes={},Ma.filterProps=["columnGap"];const La=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};La.propTypes={},La.filterProps=["rowGap"];const UT=ot({prop:"gridColumn"}),HT=ot({prop:"gridRow"}),WT=ot({prop:"gridAutoFlow"}),GT=ot({prop:"gridAutoColumns"}),YT=ot({prop:"gridAutoRows"}),KT=ot({prop:"gridTemplateColumns"}),qT=ot({prop:"gridTemplateRows"}),QT=ot({prop:"gridTemplateAreas"}),JT=ot({prop:"gridArea"});Pa(Ra,Ma,La,UT,HT,WT,GT,YT,KT,qT,QT,JT);function Ur(e,t){return t==="grey"?t:e}const XT=ot({prop:"color",themeKey:"palette",transform:Ur}),ZT=ot({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ur}),eE=ot({prop:"backgroundColor",themeKey:"palette",transform:Ur});Pa(XT,ZT,eE);function Gt(e){return e<=1&&e!==0?`${e*100}%`:e}const tE=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])||_a[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 nE=ot({prop:"minWidth",transform:Gt}),rE=ot({prop:"height",transform:Gt}),iE=ot({prop:"maxHeight",transform:Gt}),oE=ot({prop:"minHeight",transform:Gt});ot({prop:"size",cssProperty:"width",transform:Gt}),ot({prop:"size",cssProperty:"height",transform:Gt});const aE=ot({prop:"boxSizing"});Pa(tE,dc,nE,rE,iE,oE,aE);const Ba={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:Oa},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:Ra},rowGap:{style:La},columnGap:{style:Ma},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 sE(...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 lE(e,t){return typeof e=="function"?e(t):e}function cE(){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=ka(i,c)||{};return f?f(a):zn(a,r,g=>{let m=Da(h,d,g);return g===m&&typeof g=="string"&&(m=Da(h,d,`${n}${g==="default"?"":Vr(g)}`,g)),s===!1?m:{[s]:m}})}function t(n){var l;const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=(l=i.unstable_sxConfig)!=null?l:Ba;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=IT(i.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const g=lE(c[p],i);if(g!=null)if(typeof g=="object")if(o[p])h=Gi(h,e(p,g,i,o));else{const m=zn({theme:i},g,v=>({[p]:v}));sE(m,g)?h[p]=t({sx:g,theme:i}):h=Gi(h,m)}else h=Gi(h,e(p,g,i,o))}),bT(i,ST(f,h))}return Array.isArray(r)?r.map(a):a(r)}return t}const Hr=cE();Hr.filterProps=["sx"];function uE(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 dE={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},fE=!1,hE=/[A-Z]|^ms/g,pE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Yh=function(t){return t.charCodeAt(1)===45},Kh=function(t){return t!=null&&typeof t!="boolean"},fc=MS(function(e){return Yh(e)?e:e.replace(hE,"-$&").toLowerCase()}),qh=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(pE,function(r,i,o){return er={name:i,styles:o,next:er},i})}return dE[t]!==1&&!Yh(t)&&typeof n=="number"&&n!==0?n+"px":n},gE="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function $a(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 mE(e,t,n)}}var s=n;return s}function mE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=$a(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"&&fE)throw new Error(gE);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=$a(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 vE(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+=$a(n,t,o);else{var a=o;i+=a[0]}for(var l=1;l<e.length;l++)if(i+=$a(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=uE(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 bE(e,t){return Lt(e,t)}function yE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Jh=[];function Xh(e){return Jh[0]=e,vE(Jh)}const CE=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)=>Z(H({},n),{[r.key]:r.val}),{})};function xE(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=CE(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,g){const m=a.indexOf(g);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:g)-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 g=a.indexOf(p);return g===0?l(a[1]):g===a.length-1?s(a[g]):c(p,a[a.indexOf(p)+1]).replace("@media","@media not all and")}return H({keys:a,values:o,up:l,down:s,between:c,only:d,not:f,unit:n},i)}const wE={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 IE(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=xE(n),s=Zh(i);let c=Wt({breakpoints:l,direction:"ltr",components:{},palette:H({mode:"light"},r),spacing:s,shape:H(H({},wE),o)},a);return c=xT(c),c.applyStyles=IE,c=t.reduce((f,h)=>Wt(f,h),c),c.unstable_sxConfig=H(H({},Ba),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 SE=ep();function hc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function AE(e){return e?(t,n)=>n[e]:null}function TE(e,t,n){e.theme=kE(e.theme)?n:e.theme[t]||e.theme}function Na(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>Na(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=Z(H(H({},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=Z(H(H({},e),e.ownerState),{ownerState:e.ownerState})),n.push(a.style(r))):n.push(a.style)}return n}function EE(e={}){const{themeId:t,defaultTheme:n=SE,rootShouldForwardProp:r=hc,slotShouldForwardProp:i=hc}=e;function o(l){TE(l,t,n)}return(l,s={})=>{yE(l,A=>A.filter(E=>E!==Hr));const b=s,{name:c,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=AE(PE(d))}=b,g=We(b,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),m=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,v=h||!1;let I=hc;d==="Root"||d==="root"?I=r:d?I=i:DE(l)&&(I=void 0);const w=bE(l,H({shouldForwardProp:I,label:_E()},g)),y=A=>{if(typeof A=="function"&&A.__emotion_real!==A)return function(k){return Na(k,A)};if(Fn(A)){const E=tp(A);return E.variants?function(F){return Na(F,E)}:E.style}return A},C=(...A)=>{const E=[],k=A.map(y),F=[];if(E.push(o),c&&p&&F.push(function(U){var L,V;const $=(V=(L=U.theme.components)==null?void 0:L[c])==null?void 0:V.styleOverrides;if(!$)return null;const B={};for(const q in $)B[q]=Na(U,$[q]);return p(U,B)}),c&&!m&&F.push(function(U){var B,L;const G=U.theme,$=(L=(B=G==null?void 0:G.components)==null?void 0:B[c])==null?void 0:L.variants;return $?np(U,$):null}),v||F.push(Hr),Array.isArray(k[0])){const T=k.shift(),U=new Array(E.length).fill(""),G=new Array(F.length).fill("");let $;$=[...U,...T,...G],$.raw=[...U,...T.raw,...G],E.unshift($)}const Y=[...E,...k,...F],W=w(...Y);return l.muiName&&(W.muiName=l.muiName),W};return w.withConfig&&(C.withConfig=w.withConfig),C}}function _E(e,t){return void 0}function kE(e){for(const t in e)return!1;return!0}function DE(e){return typeof e=="string"&&e.charCodeAt(0)>96}function PE(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function pc(e,t=0,n=1){return vT(e,t,n)}function OE(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(OE(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 RE=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 RE(e)}catch(n){return e}};function Fa(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])),Fa({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 ME(e,t){const n=gc(e),r=gc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function LE(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,Fa(e)}function za(e,t,n){try{return LE(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 Fa(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 Fa(e)}function Fe(e,t,n){try{return vc(e,t)}catch(r){return e}}function BE(e,t=.15){return gc(e)>.5?mc(e,t):vc(e,t)}function ja(e,t,n){try{return BE(e,t)}catch(r){return e}}const $E=z.createContext(void 0);function NE(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 FE({props:e,name:t}){const n=z.useContext($E);return NE({props:e,name:t,theme:{components:n}})}const ip={theme:void 0};function zE(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 jE(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])})},VE=(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)},UE=(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 VE(e,(l,s,c)=>{if((typeof s=="string"||typeof s=="number")&&(!r||!r(l,s))){const d=`--${n?`${n}-`:""}${l.join("-")}`,f=UE(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 HE(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]:g}=C,m=We(C,[ks(l)]);if(Object.entries(m||{}).forEach(([b,A])=>{const{vars:E,css:k,varsWithDefaults:F}=bc(A,t);h=Wt(h,F),p[b]={css:k,vars:E}}),g){const{css:b,vars:A,varsWithDefaults:E}=bc(g,t);h=Wt(h,E),p[l]={css:b,vars:A}}function v(b,A){var k,F;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: ${((F=(k=o[b])==null?void 0:k.palette)==null?void 0:F.mode)||b})`]:{":root":A}};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=H({},c);return Object.entries(p).forEach(([,{vars:A}])=>{b=Wt(b,A)}),b},generateStyleSheets:()=>{var W,T;const b=[],A=e.defaultColorScheme||"light";function E(U,G){Object.keys(G).length&&b.push(typeof U=="string"?{[U]:H({},G)}:U)}E(n(void 0,H({},d)),d);const Y=p,{[A]:k}=Y,F=We(Y,[ks(A)]);if(k){const{css:U}=k,G=(T=(W=o[A])==null?void 0:W.palette)==null?void 0:T.mode,$=H(!r&&G?{colorScheme:G}:{},U);E(n(A,H({},$)),$)}return Object.entries(F).forEach(([U,{css:G}])=>{var L,V;const $=(V=(L=o[U])==null?void 0:L.palette)==null?void 0:V.mode,B=H(!r&&$?{colorScheme:$}:{},G);E(n(U,H({},B)),B)}),b}}}function WE(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"},GE={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 YE=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 KE(e="light"){return e==="dark"?{main:Yr[200],light:Yr[50],dark:Yr[400]}:{main:Yr[700],light:Yr[400],dark:Yr[800]}}function qE(e="light"){return e==="dark"?{main:Wr[200],light:Wr[50],dark:Wr[400]}:{main:Wr[500],light:Wr[300],dark:Wr[700]}}function QE(e="light"){return e==="dark"?{main:Gr[500],light:Gr[300],dark:Gr[700]}:{main:Gr[700],light:Gr[400],dark:Gr[800]}}function JE(e="light"){return e==="dark"?{main:Kr[400],light:Kr[300],dark:Kr[700]}:{main:Kr[700],light:Kr[500],dark:Kr[900]}}function XE(e="light"){return e==="dark"?{main:qr[400],light:qr[300],dark:qr[700]}:{main:qr[800],light:qr[500],dark:qr[900]}}function ZE(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 m=e,{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=m,i=We(m,["mode","contrastThreshold","tonalOffset"]),o=e.primary||KE(t),a=e.secondary||qE(t),l=e.error||QE(t),s=e.info||JE(t),c=e.success||XE(t),d=e.warning||ZE(t);function f(v){return ME(v,lp.text.primary)>=n?lp.text.primary:YE.text.primary}const h=({color:v,name:I,mainShade:w=500,lightShade:y=300,darkShade:C=700})=>{if(v=H({},v),!v.main&&v[w]&&(v.main=v[w]),!v.hasOwnProperty("main"))throw new Error(yr(11,I?` (${I})`:"",w));if(typeof v.main!="string")throw new Error(yr(12,I?` (${I})`:"",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(H({common:H({},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:GE,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},p),i)}function e_(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 t_(e,t){return H({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}function n_(e){return Math.round(e*1e5)/1e5}const up={textTransform:"uppercase"},dp='"Roboto", "Helvetica", "Arial", sans-serif';function r_(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||(I=>`${I/s*h}rem`),g=(I,w,y,C,b)=>H(H(H({fontFamily:n,fontWeight:I,fontSize:p(w),lineHeight:y},n===dp?{letterSpacing:`${n_(C/w)}em`}:{}),b),c),m={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(o,48,1.167,0),h4:g(o,34,1.235,.25),h5:g(o,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(o,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(o,16,1.5,.15),body2:g(o,14,1.43,.15),button:g(a,14,1.75,.4,up),caption:g(o,12,1.66,.4),overline:g(o,12,2.66,1,up),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Wt(H({htmlFontSize:s,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},m),f,{clone:!1})}const i_=.2,o_=.14,a_=.12;function je(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${i_})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${o_})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${a_})`].join(",")}const s_=["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)],l_={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)"},c_={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function fp(e){return`${Math.round(e)}ms`}function u_(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*mi(t,.25)+t/5)*10),3e3)}function d_(e){const t=H(H({},l_),e.easing),n=H(H({},c_),e.duration);return Z(H({getAutoHeightDuration:u_,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 f_={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function h_(e){return Fn(e)||typeof e=="undefined"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function hp(e={}){const t=H({},e);function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[a,l]=i[o];!h_(l)||a.startsWith("unstable_")?delete r[a]:Fn(l)&&(r[a]=H({},l),n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
2339
|
+
*/function bE(e,t){return Lt(e,t)}function yE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Jh=[];function Xh(e){return Jh[0]=e,vE(Jh)}const CE=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(H({},n),{[r.key]:r.val}),{})};function xE(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=CE(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,g){const m=a.indexOf(g);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:g)-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 g=a.indexOf(p);return g===0?l(a[1]):g===a.length-1?s(a[g]):c(p,a[a.indexOf(p)+1]).replace("@media","@media not all and")}return H({keys:a,values:o,up:l,down:s,between:c,only:d,not:f,unit:n},i)}const wE={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 IE(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=xE(n),s=Zh(i);let c=Wt({breakpoints:l,direction:"ltr",components:{},palette:H({mode:"light"},r),spacing:s,shape:H(H({},wE),o)},a);return c=xT(c),c.applyStyles=IE,c=t.reduce((f,h)=>Wt(f,h),c),c.unstable_sxConfig=H(H({},Ba),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 SE=ep();function hc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function AE(e){return e?(t,n)=>n[e]:null}function TE(e,t,n){e.theme=kE(e.theme)?n:e.theme[t]||e.theme}function Na(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>Na(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(H(H({},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(H(H({},e),e.ownerState),{ownerState:e.ownerState})),n.push(a.style(r))):n.push(a.style)}return n}function EE(e={}){const{themeId:t,defaultTheme:n=SE,rootShouldForwardProp:r=hc,slotShouldForwardProp:i=hc}=e;function o(l){TE(l,t,n)}return(l,s={})=>{yE(l,A=>A.filter(E=>E!==Hr));const b=s,{name:c,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=AE(PE(d))}=b,g=We(b,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),m=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,v=h||!1;let I=hc;d==="Root"||d==="root"?I=r:d?I=i:DE(l)&&(I=void 0);const w=bE(l,H({shouldForwardProp:I,label:_E()},g)),y=A=>{if(typeof A=="function"&&A.__emotion_real!==A)return function(D){return Na(D,A)};if(Fn(A)){const E=tp(A);return E.variants?function(F){return Na(F,E)}:E.style}return A},C=(...A)=>{const E=[],D=A.map(y),F=[];if(E.push(o),c&&p&&F.push(function(U){var L,V;const $=(V=(L=U.theme.components)==null?void 0:L[c])==null?void 0:V.styleOverrides;if(!$)return null;const B={};for(const q in $)B[q]=Na(U,$[q]);return p(U,B)}),c&&!m&&F.push(function(U){var B,L;const G=U.theme,$=(L=(B=G==null?void 0:G.components)==null?void 0:B[c])==null?void 0:L.variants;return $?np(U,$):null}),v||F.push(Hr),Array.isArray(D[0])){const T=D.shift(),U=new Array(E.length).fill(""),G=new Array(F.length).fill("");let $;$=[...U,...T,...G],$.raw=[...U,...T.raw,...G],E.unshift($)}const Y=[...E,...D,...F],W=w(...Y);return l.muiName&&(W.muiName=l.muiName),W};return w.withConfig&&(C.withConfig=w.withConfig),C}}function _E(e,t){return void 0}function kE(e){for(const t in e)return!1;return!0}function DE(e){return typeof e=="string"&&e.charCodeAt(0)>96}function PE(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function pc(e,t=0,n=1){return vT(e,t,n)}function OE(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(OE(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 RE=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 RE(e)}catch(n){return e}};function Fa(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])),Fa({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 ME(e,t){const n=gc(e),r=gc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function LE(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,Fa(e)}function za(e,t,n){try{return LE(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 Fa(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 Fa(e)}function Fe(e,t,n){try{return vc(e,t)}catch(r){return e}}function BE(e,t=.15){return gc(e)>.5?mc(e,t):vc(e,t)}function ja(e,t,n){try{return BE(e,t)}catch(r){return e}}const $E=z.createContext(void 0);function NE(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 FE({props:e,name:t}){const n=z.useContext($E);return NE({props:e,name:t,theme:{components:n}})}const ip={theme:void 0};function zE(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 jE(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])})},VE=(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)},UE=(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 VE(e,(l,s,c)=>{if((typeof s=="string"||typeof s=="number")&&(!r||!r(l,s))){const d=`--${n?`${n}-`:""}${l.join("-")}`,f=UE(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 HE(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]:g}=C,m=We(C,[ks(l)]);if(Object.entries(m||{}).forEach(([b,A])=>{const{vars:E,css:D,varsWithDefaults:F}=bc(A,t);h=Wt(h,F),p[b]={css:D,vars:E}}),g){const{css:b,vars:A,varsWithDefaults:E}=bc(g,t);h=Wt(h,E),p[l]={css:b,vars:A}}function v(b,A){var D,F;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: ${((F=(D=o[b])==null?void 0:D.palette)==null?void 0:F.mode)||b})`]:{":root":A}};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=H({},c);return Object.entries(p).forEach(([,{vars:A}])=>{b=Wt(b,A)}),b},generateStyleSheets:()=>{var W,T;const b=[],A=e.defaultColorScheme||"light";function E(U,G){Object.keys(G).length&&b.push(typeof U=="string"?{[U]:H({},G)}:U)}E(n(void 0,H({},d)),d);const Y=p,{[A]:D}=Y,F=We(Y,[ks(A)]);if(D){const{css:U}=D,G=(T=(W=o[A])==null?void 0:W.palette)==null?void 0:T.mode,$=H(!r&&G?{colorScheme:G}:{},U);E(n(A,H({},$)),$)}return Object.entries(F).forEach(([U,{css:G}])=>{var L,V;const $=(V=(L=o[U])==null?void 0:L.palette)==null?void 0:V.mode,B=H(!r&&$?{colorScheme:$}:{},G);E(n(U,H({},B)),B)}),b}}}function WE(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"},GE={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 YE=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 KE(e="light"){return e==="dark"?{main:Yr[200],light:Yr[50],dark:Yr[400]}:{main:Yr[700],light:Yr[400],dark:Yr[800]}}function qE(e="light"){return e==="dark"?{main:Wr[200],light:Wr[50],dark:Wr[400]}:{main:Wr[500],light:Wr[300],dark:Wr[700]}}function QE(e="light"){return e==="dark"?{main:Gr[500],light:Gr[300],dark:Gr[700]}:{main:Gr[700],light:Gr[400],dark:Gr[800]}}function JE(e="light"){return e==="dark"?{main:Kr[400],light:Kr[300],dark:Kr[700]}:{main:Kr[700],light:Kr[500],dark:Kr[900]}}function XE(e="light"){return e==="dark"?{main:qr[400],light:qr[300],dark:qr[700]}:{main:qr[800],light:qr[500],dark:qr[900]}}function ZE(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 m=e,{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=m,i=We(m,["mode","contrastThreshold","tonalOffset"]),o=e.primary||KE(t),a=e.secondary||qE(t),l=e.error||QE(t),s=e.info||JE(t),c=e.success||XE(t),d=e.warning||ZE(t);function f(v){return ME(v,lp.text.primary)>=n?lp.text.primary:YE.text.primary}const h=({color:v,name:I,mainShade:w=500,lightShade:y=300,darkShade:C=700})=>{if(v=H({},v),!v.main&&v[w]&&(v.main=v[w]),!v.hasOwnProperty("main"))throw new Error(yr(11,I?` (${I})`:"",w));if(typeof v.main!="string")throw new Error(yr(12,I?` (${I})`:"",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(H({common:H({},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:GE,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},p),i)}function e_(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 t_(e,t){return H({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}function n_(e){return Math.round(e*1e5)/1e5}const up={textTransform:"uppercase"},dp='"Roboto", "Helvetica", "Arial", sans-serif';function r_(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||(I=>`${I/s*h}rem`),g=(I,w,y,C,b)=>H(H(H({fontFamily:n,fontWeight:I,fontSize:p(w),lineHeight:y},n===dp?{letterSpacing:`${n_(C/w)}em`}:{}),b),c),m={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(o,48,1.167,0),h4:g(o,34,1.235,.25),h5:g(o,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(o,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(o,16,1.5,.15),body2:g(o,14,1.43,.15),button:g(a,14,1.75,.4,up),caption:g(o,12,1.66,.4),overline:g(o,12,2.66,1,up),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Wt(H({htmlFontSize:s,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},m),f,{clone:!1})}const i_=.2,o_=.14,a_=.12;function je(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${i_})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${o_})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${a_})`].join(",")}const s_=["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)],l_={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)"},c_={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function fp(e){return`${Math.round(e)}ms`}function u_(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*mi(t,.25)+t/5)*10),3e3)}function d_(e){const t=H(H({},l_),e.easing),n=H(H({},c_),e.duration);return X(H({getAutoHeightDuration:u_,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 f_={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function h_(e){return Fn(e)||typeof e=="undefined"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function hp(e={}){const t=H({},e);function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[a,l]=i[o];!h_(l)||a.startsWith("unstable_")?delete r[a]:Fn(l)&&(r[a]=H({},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:t_(f.breakpoints,r),palette:d,shadows:s_.slice(),typography:r_(d,l),transitions:d_(a),zIndex:H({},f_)});return h=Wt(h,c),h=t.reduce((g,m)=>Wt(g,m),h),h.unstable_sxConfig=H(H({},Ba),c==null?void 0:c.unstable_sxConfig),h.unstable_sx=function(m){return Hr({sx:m,theme:this})},h.toRuntimeSource=hp,h}function p_(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 g_=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=p_(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"?g_:[]}function m_(e){const a=e,{palette:t={mode:"light"},opacity:n,overlays:r}=a,i=We(a,["palette","opacity","overlays"]),o=yc(t);return H({palette:o,opacity:H(H({},pp(o.mode)),n),overlays:r||gp(o.mode)},i)}function v_(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 b_=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],y_=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 b_(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]:H(H({},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 C_(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function
|
|
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 x_(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){}},w_=(e="mui")=>jE(e);function xc(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=m_(Z(H({},t),{palette:H({mode:i},t==null?void 0:t.palette)}));return}const l=Cc(Z(H({},n),{palette:H({mode:i},t==null?void 0:t.palette)})),{palette:o}=l,a=We(l,["palette"]);return e[r]=Z(H({},t),{palette:o,opacity:H(H({},pp(i)),t==null?void 0:t.opacity),overlays:(t==null?void 0:t.overlays)||gp(i)}),a}function I_(e={},...t){const F=e,{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=v_,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:s=":root"}=F,c=We(F,["colorSchemes","defaultColorScheme","disableCssColorScheme","cssVarPrefix","shouldSkipGeneratingVar","colorSchemeSelector","rootSelector"]),d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),h=w_(o),Y=n,{[f]:p,light:g,dark:m}=Y,v=We(Y,[ks(f),"light","dark"]),I=H({},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(I,w,c,f);g&&!I.light&&xc(I,g,void 0,"light"),m&&!I.dark&&xc(I,m,void 0,"dark");let C=Z(H({defaultColorScheme:f},y),{cssVarPrefix:o,colorSchemeSelector:l,rootSelector:s,getCssVar:h,colorSchemes:I,font:H(H({},e_(y.typography)),y.font),spacing:x_(c.spacing)});Object.keys(C.colorSchemes).forEach(W=>{const T=C.colorSchemes[W].palette,U=G=>{const $=G.split("-"),B=$[1],L=$[2];return h(G,T[B][L])};if(T.mode==="light"&&(X(T.common,"background","#fff"),X(T.common,"onBackground","#000")),T.mode==="dark"&&(X(T.common,"background","#000"),X(T.common,"onBackground","#fff")),C_(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){X(T.Alert,"errorColor",Ne(T.error.light,.6)),X(T.Alert,"infoColor",Ne(T.info.light,.6)),X(T.Alert,"successColor",Ne(T.success.light,.6)),X(T.Alert,"warningColor",Ne(T.warning.light,.6)),X(T.Alert,"errorFilledBg",U("palette-error-main")),X(T.Alert,"infoFilledBg",U("palette-info-main")),X(T.Alert,"successFilledBg",U("palette-success-main")),X(T.Alert,"warningFilledBg",U("palette-warning-main")),X(T.Alert,"errorFilledColor",yn(()=>T.getContrastText(T.error.main))),X(T.Alert,"infoFilledColor",yn(()=>T.getContrastText(T.info.main))),X(T.Alert,"successFilledColor",yn(()=>T.getContrastText(T.success.main))),X(T.Alert,"warningFilledColor",yn(()=>T.getContrastText(T.warning.main))),X(T.Alert,"errorStandardBg",Fe(T.error.light,.9)),X(T.Alert,"infoStandardBg",Fe(T.info.light,.9)),X(T.Alert,"successStandardBg",Fe(T.success.light,.9)),X(T.Alert,"warningStandardBg",Fe(T.warning.light,.9)),X(T.Alert,"errorIconColor",U("palette-error-main")),X(T.Alert,"infoIconColor",U("palette-info-main")),X(T.Alert,"successIconColor",U("palette-success-main")),X(T.Alert,"warningIconColor",U("palette-warning-main")),X(T.AppBar,"defaultBg",U("palette-grey-100")),X(T.Avatar,"defaultBg",U("palette-grey-400")),X(T.Button,"inheritContainedBg",U("palette-grey-300")),X(T.Button,"inheritContainedHoverBg",U("palette-grey-A100")),X(T.Chip,"defaultBorder",U("palette-grey-400")),X(T.Chip,"defaultAvatarColor",U("palette-grey-700")),X(T.Chip,"defaultIconColor",U("palette-grey-700")),X(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),X(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),X(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),X(T.LinearProgress,"primaryBg",Fe(T.primary.main,.62)),X(T.LinearProgress,"secondaryBg",Fe(T.secondary.main,.62)),X(T.LinearProgress,"errorBg",Fe(T.error.main,.62)),X(T.LinearProgress,"infoBg",Fe(T.info.main,.62)),X(T.LinearProgress,"successBg",Fe(T.success.main,.62)),X(T.LinearProgress,"warningBg",Fe(T.warning.main,.62)),X(T.Skeleton,"bg",`rgba(${U("palette-text-primaryChannel")} / 0.11)`),X(T.Slider,"primaryTrack",Fe(T.primary.main,.62)),X(T.Slider,"secondaryTrack",Fe(T.secondary.main,.62)),X(T.Slider,"errorTrack",Fe(T.error.main,.62)),X(T.Slider,"infoTrack",Fe(T.info.main,.62)),X(T.Slider,"successTrack",Fe(T.success.main,.62)),X(T.Slider,"warningTrack",Fe(T.warning.main,.62));const G=ja(T.background.default,.8);X(T.SnackbarContent,"bg",G),X(T.SnackbarContent,"color",yn(()=>T.getContrastText(G))),X(T.SpeedDialAction,"fabHoverBg",ja(T.background.paper,.15)),X(T.StepConnector,"border",U("palette-grey-400")),X(T.StepContent,"border",U("palette-grey-400")),X(T.Switch,"defaultColor",U("palette-common-white")),X(T.Switch,"defaultDisabledColor",U("palette-grey-100")),X(T.Switch,"primaryDisabledColor",Fe(T.primary.main,.62)),X(T.Switch,"secondaryDisabledColor",Fe(T.secondary.main,.62)),X(T.Switch,"errorDisabledColor",Fe(T.error.main,.62)),X(T.Switch,"infoDisabledColor",Fe(T.info.main,.62)),X(T.Switch,"successDisabledColor",Fe(T.success.main,.62)),X(T.Switch,"warningDisabledColor",Fe(T.warning.main,.62)),X(T.TableCell,"border",Fe(za(T.divider,1),.88)),X(T.Tooltip,"bg",za(T.grey[700],.92))}if(T.mode==="dark"){X(T.Alert,"errorColor",Fe(T.error.light,.6)),X(T.Alert,"infoColor",Fe(T.info.light,.6)),X(T.Alert,"successColor",Fe(T.success.light,.6)),X(T.Alert,"warningColor",Fe(T.warning.light,.6)),X(T.Alert,"errorFilledBg",U("palette-error-dark")),X(T.Alert,"infoFilledBg",U("palette-info-dark")),X(T.Alert,"successFilledBg",U("palette-success-dark")),X(T.Alert,"warningFilledBg",U("palette-warning-dark")),X(T.Alert,"errorFilledColor",yn(()=>T.getContrastText(T.error.dark))),X(T.Alert,"infoFilledColor",yn(()=>T.getContrastText(T.info.dark))),X(T.Alert,"successFilledColor",yn(()=>T.getContrastText(T.success.dark))),X(T.Alert,"warningFilledColor",yn(()=>T.getContrastText(T.warning.dark))),X(T.Alert,"errorStandardBg",Ne(T.error.light,.9)),X(T.Alert,"infoStandardBg",Ne(T.info.light,.9)),X(T.Alert,"successStandardBg",Ne(T.success.light,.9)),X(T.Alert,"warningStandardBg",Ne(T.warning.light,.9)),X(T.Alert,"errorIconColor",U("palette-error-main")),X(T.Alert,"infoIconColor",U("palette-info-main")),X(T.Alert,"successIconColor",U("palette-success-main")),X(T.Alert,"warningIconColor",U("palette-warning-main")),X(T.AppBar,"defaultBg",U("palette-grey-900")),X(T.AppBar,"darkBg",U("palette-background-paper")),X(T.AppBar,"darkColor",U("palette-text-primary")),X(T.Avatar,"defaultBg",U("palette-grey-600")),X(T.Button,"inheritContainedBg",U("palette-grey-800")),X(T.Button,"inheritContainedHoverBg",U("palette-grey-700")),X(T.Chip,"defaultBorder",U("palette-grey-700")),X(T.Chip,"defaultAvatarColor",U("palette-grey-300")),X(T.Chip,"defaultIconColor",U("palette-grey-300")),X(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),X(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),X(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),X(T.LinearProgress,"primaryBg",Ne(T.primary.main,.5)),X(T.LinearProgress,"secondaryBg",Ne(T.secondary.main,.5)),X(T.LinearProgress,"errorBg",Ne(T.error.main,.5)),X(T.LinearProgress,"infoBg",Ne(T.info.main,.5)),X(T.LinearProgress,"successBg",Ne(T.success.main,.5)),X(T.LinearProgress,"warningBg",Ne(T.warning.main,.5)),X(T.Skeleton,"bg",`rgba(${U("palette-text-primaryChannel")} / 0.13)`),X(T.Slider,"primaryTrack",Ne(T.primary.main,.5)),X(T.Slider,"secondaryTrack",Ne(T.secondary.main,.5)),X(T.Slider,"errorTrack",Ne(T.error.main,.5)),X(T.Slider,"infoTrack",Ne(T.info.main,.5)),X(T.Slider,"successTrack",Ne(T.success.main,.5)),X(T.Slider,"warningTrack",Ne(T.warning.main,.5));const G=ja(T.background.default,.98);X(T.SnackbarContent,"bg",G),X(T.SnackbarContent,"color",yn(()=>T.getContrastText(G))),X(T.SpeedDialAction,"fabHoverBg",ja(T.background.paper,.15)),X(T.StepConnector,"border",U("palette-grey-600")),X(T.StepContent,"border",U("palette-grey-600")),X(T.Switch,"defaultColor",U("palette-grey-300")),X(T.Switch,"defaultDisabledColor",U("palette-grey-600")),X(T.Switch,"primaryDisabledColor",Ne(T.primary.main,.55)),X(T.Switch,"secondaryDisabledColor",Ne(T.secondary.main,.55)),X(T.Switch,"errorDisabledColor",Ne(T.error.main,.55)),X(T.Switch,"infoDisabledColor",Ne(T.info.main,.55)),X(T.Switch,"successDisabledColor",Ne(T.success.main,.55)),X(T.Switch,"warningDisabledColor",Ne(T.warning.main,.55)),X(T.TableCell,"border",Ne(za(T.divider,1),.68)),X(T.Tooltip,"bg",za(T.grey[700],.92))}jn(T.background,"default"),jn(T.background,"paper"),jn(T.common,"background"),jn(T.common,"onBackground"),jn(T,"divider"),Object.keys(T).forEach(G=>{const $=T[G];G!=="tonalOffset"&&$&&typeof $=="object"&&($.main&&X(T[G],"mainChannel",qi(Xi($.main))),$.light&&X(T[G],"lightChannel",qi(Xi($.light))),$.dark&&X(T[G],"darkChannel",qi(Xi($.dark))),$.contrastText&&X(T[G],"contrastTextChannel",qi(Xi($.contrastText))),G==="text"&&(jn(T[G],"primary"),jn(T[G],"secondary")),G==="action"&&($.active&&jn(T[G],"active"),$.selected&&jn(T[G],"selected")))})}),C=t.reduce((W,T)=>Wt(W,T),C);const b={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:y_(C)},{vars:A,generateThemeVars:E,generateStyleSheets:k}=HE(C,b);return C.vars=A,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([W,T])=>{C[W]=T}),C.generateThemeVars=E,C.generateStyleSheets=k,C.generateSpacing=function(){return Zh(c.spacing,uc(this))},C.getColorSchemeSelector=WE(l),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=a,C.unstable_sxConfig=H(H({},Ba),c==null?void 0:c.unstable_sxConfig),C.unstable_sx=function(T){return Hr({sx:T,theme:this})},C.toRuntimeSource=hp,C}function mp(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]=Z(H({},n!==!0&&n),{palette:yc(Z(H({},n===!0?{}:n.palette),{mode:t}))}))}function S_(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=H(H({},i),n?{[l]:Z(H({},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(Z(H({},e),{palette:f}),...t);return h.defaultColorScheme=l,h.colorSchemes=c,h.palette.mode==="light"&&(h.colorSchemes.light=Z(H({},c.light!==!0&&c.light),{palette:h.palette}),mp(h,"dark",c.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark=Z(H({},c.dark!==!0&&c.dark),{palette:h.palette}),mp(h,"light",c.light)),h}return!n&&!("light"in c)&&l==="light"&&(c.light=!0),I_(H(Z(H({},a),{colorSchemes:c,defaultColorScheme:l}),typeof r!="boolean"&&r),...t)}const A_=S_(),T_="$$material";function E_(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const __=EE({themeId:T_,defaultTheme:A_,rootShouldForwardProp:e=>E_(e)&&e!=="classes"}),k_=zE;function D_(e){return FE(e)}function P_(e){return Uh("MuiSvgIcon",e)}mT("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const O_=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Vr(t)}`,`fontSize${Vr(n)}`]};return hT(i,P_,r)},R_=__("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)}`]]}})(k_(({theme:e})=>{var t,n,r,i,o,a,l,s,c,d,f,h,p,g,m,v,I,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,A;return{props:{color:y},style:{color:(A=(b=((C=e.vars)!=null?C:e).palette)==null?void 0:b[y])==null?void 0:A.main}}}),{props:{color:"action"},style:{color:(m=(g=((p=e.vars)!=null?p:e).palette)==null?void 0:g.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(w=(I=((v=e.vars)!=null?v:e).palette)==null?void 0:I.action)==null?void 0:w.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),wc=z.forwardRef(function(t,n){const r=D_({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"]),g=z.isValidElement(i)&&i.type==="svg",m=Z(H({},r),{color:a,component:l,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:g}),v={};d||(v.viewBox=h);const I=O_(m);return u.jsxs(R_,Z(H(H(H({as:l,className:Ln(I.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},v),p),g&&i.props),{ownerState:m,children:[g?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,Z(H({"data-testid":`${t}Icon`,ref:i},r),{children:e}))}return n.muiName=wc.muiName,z.memo(z.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"),M_=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"),L_=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 B_(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 $_=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],N_=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,B_,{})},F_=be("div",{name:"JoyTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return P({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=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabPanel"}),{orientation:i}=pa()||{orientation:"horizontal"},o=z.useContext(oc),{children:a,value:l=0,component:s,color:c="neutral",variant:d="plain",size:f,slots:h={},slotProps:p={},keepMounted:g=!1}=r,m=Ae(r,$_),{hidden:v,getRootProps:I}=_S(P({},r,{value:l})),w=f!=null?f:o,y=P({},r,{orientation:i,hidden:v,size:w,color:c,variant:d}),C=N_(y),b=P({},m,{component:s,slots:h,slotProps:p}),[A,E]=Ie("root",{ref:n,elementType:F_,getSlotProps:I,externalForwardedProps:b,additionalProps:{role:"tabpanel",ref:n,as:s},ownerState:y,className:C.root});return g?u.jsx(A,P({},E,{children:a})):u.jsx(A,P({},E,{children:!v&&a}))});function z_(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"]),Va=z.createContext(void 0),j_=["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 V_(e,t){var n;const r=z.useContext(Va),{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:s,className:c,defaultValue:d,disabled:f,disabledInProp:h,error:p,id:g,name:m,onClick:v,onChange:I,onKeyDown:w,onKeyUp:y,onFocus:C,onBlur:b,placeholder:A,readOnly:E,required:k,type:F,value:Y}=e,W=Ae(e,j_),{getRootProps:T,getInputProps:U,focused:G,error:$,disabled:B}=UI({disabled:(n=h!=null?h:r==null?void 0:r.disabled)!=null?n:f,defaultValue:d,error:p,onBlur:b,onClick:v,onChange:I,onFocus:C,required:k!=null?k:r==null?void 0:r.required,value:Y}),L={[t.disabled]:B,[t.error]:$,[t.focused]:G,[t.formControl]:!!r,[c]:c},V={[t.disabled]:B};return P({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:s,disabled:B,id:g,onKeyDown:w,onKeyUp:y,name:m,placeholder:A,readOnly:E,type:F},rootStateClasses:L,inputStateClasses:V,getRootProps:T,getInputProps:U,focused:G,error:$,disabled:B},W)}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,g,m,v,I,w,y,C,b,A;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")]:`${(g=e.colorSchemes.dark)==null?void 0:g.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(m=e.colorSchemes.dark)==null?void 0:m.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(v=e.colorSchemes.dark)==null?void 0:v.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(I=e.colorSchemes.dark)==null?void 0:I.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")]:`${(A=e.colorSchemes.dark)==null?void 0:A.palette.divider} !important`}}};function U_(e){return e.theme!==void 0}const H_=e=>t=>{const n=U_(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)}},W_=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)}},G_=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","fullWidth","size","color","variant","startDecorator","endDecorator","component","slots","slotProps"],Y_=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,z_,{})},K_=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[P({"--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}])`]:P({},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":P({},(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"}}]}),q_=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":P({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)"}})),Q_=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"}),J_=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"}),X_=be(K_,{name:"JoyInput",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Z_=be(q_,{name:"JoyInput",slot:"Input",overridesResolver:(e,t)=>t.input})({}),ek=be(Q_,{name:"JoyInput",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({}),tk=be(J_,{name:"JoyInput",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({}),Ua=z.forwardRef(function(t,n){var r,i,o,a,l,s;const c=ct({props:t,name:"JoyInput"}),d=V_(P({},c,{disabledInProp:t.disabled}),vp),{propsToForward:f,rootStateClasses:h,inputStateClasses:p,getRootProps:g,getInputProps:m,formControl:v,focused:I,error:w=!1,disabled:y,fullWidth:C=!1,size:b="md",color:A="neutral",variant:E="outlined",startDecorator:k,endDecorator:F,component:Y,slots:W={},slotProps:T={}}=d,U=Ae(d,G_),G=(r=(i=t.error)!=null?i:v==null?void 0:v.error)!=null?r:w,$=(o=(a=t.size)!=null?a:v==null?void 0:v.size)!=null?o:b,B=(l=t.color)!=null?l:G?"danger":(s=v==null?void 0:v.color)!=null?s:A,L=P({instanceColor:G?"danger":t.color},c,{fullWidth:C,color:B,disabled:y,error:G,focused:I,size:$,variant:E}),V=Y_(L),q=P({},U,{component:Y,slots:W,slotProps:T}),[ee,O]=Ie("root",{ref:n,className:[V.root,h],elementType:X_,getSlotProps:g,externalForwardedProps:q,ownerState:L}),[M,N]=Ie("input",P({},v&&{additionalProps:{id:v.htmlFor,"aria-describedby":v["aria-describedby"]}},{className:[V.input,p],elementType:Z_,getSlotProps:m,internalForwardedProps:f,externalForwardedProps:q,ownerState:L})),[j,te]=Ie("startDecorator",{className:V.startDecorator,elementType:ek,externalForwardedProps:q,ownerState:L}),[ae,oe]=Ie("endDecorator",{className:V.endDecorator,elementType:tk,externalForwardedProps:q,ownerState:L});return u.jsxs(ee,P({},O,{children:[k&&u.jsx(j,P({},te,{children:k})),u.jsx(M,P({},N)),F&&u.jsx(ae,P({},oe,{children:F}))]}))}),eo=({label:e,placeholder:t,value:n,defaultValue:r,required:i,size:o,readOnly:a=!1,onChange:l})=>u.jsxs(S.FormControl,{size:o||"md",sx:()=>({marginBottom:"16px"}),children:[u.jsx(S.FormLabel,{required:i,color:"primary",children:e}),u.jsx(Ua,{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 nk(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 rk=e=>e,xp;const ik=["color","backgroundColor"],ok=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],ak=pe.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),sk=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,nk,{})};function Jr(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}const lk=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,ik);return P({"--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":P({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})}),ck=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))"}),uk=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)"}),dk=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=rk`
|
|
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:t_(f.breakpoints,r),palette:d,shadows:s_.slice(),typography:r_(d,l),transitions:d_(a),zIndex:H({},f_)});return h=Wt(h,c),h=t.reduce((g,m)=>Wt(g,m),h),h.unstable_sxConfig=H(H({},Ba),c==null?void 0:c.unstable_sxConfig),h.unstable_sx=function(m){return Hr({sx:m,theme:this})},h.toRuntimeSource=hp,h}function p_(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 g_=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=p_(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"?g_:[]}function m_(e){const a=e,{palette:t={mode:"light"},opacity:n,overlays:r}=a,i=We(a,["palette","opacity","overlays"]),o=yc(t);return H({palette:o,opacity:H(H({},pp(o.mode)),n),overlays:r||gp(o.mode)},i)}function v_(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 b_=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],y_=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 b_(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]:H(H({},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 C_(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 x_(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){}},w_=(e="mui")=>jE(e);function xc(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=m_(X(H({},t),{palette:H({mode:i},t==null?void 0:t.palette)}));return}const l=Cc(X(H({},n),{palette:H({mode:i},t==null?void 0:t.palette)})),{palette:o}=l,a=We(l,["palette"]);return e[r]=X(H({},t),{palette:o,opacity:H(H({},pp(i)),t==null?void 0:t.opacity),overlays:(t==null?void 0:t.overlays)||gp(i)}),a}function I_(e={},...t){const F=e,{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=v_,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:s=":root"}=F,c=We(F,["colorSchemes","defaultColorScheme","disableCssColorScheme","cssVarPrefix","shouldSkipGeneratingVar","colorSchemeSelector","rootSelector"]),d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),h=w_(o),Y=n,{[f]:p,light:g,dark:m}=Y,v=We(Y,[ks(f),"light","dark"]),I=H({},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(I,w,c,f);g&&!I.light&&xc(I,g,void 0,"light"),m&&!I.dark&&xc(I,m,void 0,"dark");let C=X(H({defaultColorScheme:f},y),{cssVarPrefix:o,colorSchemeSelector:l,rootSelector:s,getCssVar:h,colorSchemes:I,font:H(H({},e_(y.typography)),y.font),spacing:x_(c.spacing)});Object.keys(C.colorSchemes).forEach(W=>{const T=C.colorSchemes[W].palette,U=G=>{const $=G.split("-"),B=$[1],L=$[2];return h(G,T[B][L])};if(T.mode==="light"&&(Z(T.common,"background","#fff"),Z(T.common,"onBackground","#000")),T.mode==="dark"&&(Z(T.common,"background","#000"),Z(T.common,"onBackground","#fff")),C_(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){Z(T.Alert,"errorColor",Ne(T.error.light,.6)),Z(T.Alert,"infoColor",Ne(T.info.light,.6)),Z(T.Alert,"successColor",Ne(T.success.light,.6)),Z(T.Alert,"warningColor",Ne(T.warning.light,.6)),Z(T.Alert,"errorFilledBg",U("palette-error-main")),Z(T.Alert,"infoFilledBg",U("palette-info-main")),Z(T.Alert,"successFilledBg",U("palette-success-main")),Z(T.Alert,"warningFilledBg",U("palette-warning-main")),Z(T.Alert,"errorFilledColor",yn(()=>T.getContrastText(T.error.main))),Z(T.Alert,"infoFilledColor",yn(()=>T.getContrastText(T.info.main))),Z(T.Alert,"successFilledColor",yn(()=>T.getContrastText(T.success.main))),Z(T.Alert,"warningFilledColor",yn(()=>T.getContrastText(T.warning.main))),Z(T.Alert,"errorStandardBg",Fe(T.error.light,.9)),Z(T.Alert,"infoStandardBg",Fe(T.info.light,.9)),Z(T.Alert,"successStandardBg",Fe(T.success.light,.9)),Z(T.Alert,"warningStandardBg",Fe(T.warning.light,.9)),Z(T.Alert,"errorIconColor",U("palette-error-main")),Z(T.Alert,"infoIconColor",U("palette-info-main")),Z(T.Alert,"successIconColor",U("palette-success-main")),Z(T.Alert,"warningIconColor",U("palette-warning-main")),Z(T.AppBar,"defaultBg",U("palette-grey-100")),Z(T.Avatar,"defaultBg",U("palette-grey-400")),Z(T.Button,"inheritContainedBg",U("palette-grey-300")),Z(T.Button,"inheritContainedHoverBg",U("palette-grey-A100")),Z(T.Chip,"defaultBorder",U("palette-grey-400")),Z(T.Chip,"defaultAvatarColor",U("palette-grey-700")),Z(T.Chip,"defaultIconColor",U("palette-grey-700")),Z(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Z(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Z(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Z(T.LinearProgress,"primaryBg",Fe(T.primary.main,.62)),Z(T.LinearProgress,"secondaryBg",Fe(T.secondary.main,.62)),Z(T.LinearProgress,"errorBg",Fe(T.error.main,.62)),Z(T.LinearProgress,"infoBg",Fe(T.info.main,.62)),Z(T.LinearProgress,"successBg",Fe(T.success.main,.62)),Z(T.LinearProgress,"warningBg",Fe(T.warning.main,.62)),Z(T.Skeleton,"bg",`rgba(${U("palette-text-primaryChannel")} / 0.11)`),Z(T.Slider,"primaryTrack",Fe(T.primary.main,.62)),Z(T.Slider,"secondaryTrack",Fe(T.secondary.main,.62)),Z(T.Slider,"errorTrack",Fe(T.error.main,.62)),Z(T.Slider,"infoTrack",Fe(T.info.main,.62)),Z(T.Slider,"successTrack",Fe(T.success.main,.62)),Z(T.Slider,"warningTrack",Fe(T.warning.main,.62));const G=ja(T.background.default,.8);Z(T.SnackbarContent,"bg",G),Z(T.SnackbarContent,"color",yn(()=>T.getContrastText(G))),Z(T.SpeedDialAction,"fabHoverBg",ja(T.background.paper,.15)),Z(T.StepConnector,"border",U("palette-grey-400")),Z(T.StepContent,"border",U("palette-grey-400")),Z(T.Switch,"defaultColor",U("palette-common-white")),Z(T.Switch,"defaultDisabledColor",U("palette-grey-100")),Z(T.Switch,"primaryDisabledColor",Fe(T.primary.main,.62)),Z(T.Switch,"secondaryDisabledColor",Fe(T.secondary.main,.62)),Z(T.Switch,"errorDisabledColor",Fe(T.error.main,.62)),Z(T.Switch,"infoDisabledColor",Fe(T.info.main,.62)),Z(T.Switch,"successDisabledColor",Fe(T.success.main,.62)),Z(T.Switch,"warningDisabledColor",Fe(T.warning.main,.62)),Z(T.TableCell,"border",Fe(za(T.divider,1),.88)),Z(T.Tooltip,"bg",za(T.grey[700],.92))}if(T.mode==="dark"){Z(T.Alert,"errorColor",Fe(T.error.light,.6)),Z(T.Alert,"infoColor",Fe(T.info.light,.6)),Z(T.Alert,"successColor",Fe(T.success.light,.6)),Z(T.Alert,"warningColor",Fe(T.warning.light,.6)),Z(T.Alert,"errorFilledBg",U("palette-error-dark")),Z(T.Alert,"infoFilledBg",U("palette-info-dark")),Z(T.Alert,"successFilledBg",U("palette-success-dark")),Z(T.Alert,"warningFilledBg",U("palette-warning-dark")),Z(T.Alert,"errorFilledColor",yn(()=>T.getContrastText(T.error.dark))),Z(T.Alert,"infoFilledColor",yn(()=>T.getContrastText(T.info.dark))),Z(T.Alert,"successFilledColor",yn(()=>T.getContrastText(T.success.dark))),Z(T.Alert,"warningFilledColor",yn(()=>T.getContrastText(T.warning.dark))),Z(T.Alert,"errorStandardBg",Ne(T.error.light,.9)),Z(T.Alert,"infoStandardBg",Ne(T.info.light,.9)),Z(T.Alert,"successStandardBg",Ne(T.success.light,.9)),Z(T.Alert,"warningStandardBg",Ne(T.warning.light,.9)),Z(T.Alert,"errorIconColor",U("palette-error-main")),Z(T.Alert,"infoIconColor",U("palette-info-main")),Z(T.Alert,"successIconColor",U("palette-success-main")),Z(T.Alert,"warningIconColor",U("palette-warning-main")),Z(T.AppBar,"defaultBg",U("palette-grey-900")),Z(T.AppBar,"darkBg",U("palette-background-paper")),Z(T.AppBar,"darkColor",U("palette-text-primary")),Z(T.Avatar,"defaultBg",U("palette-grey-600")),Z(T.Button,"inheritContainedBg",U("palette-grey-800")),Z(T.Button,"inheritContainedHoverBg",U("palette-grey-700")),Z(T.Chip,"defaultBorder",U("palette-grey-700")),Z(T.Chip,"defaultAvatarColor",U("palette-grey-300")),Z(T.Chip,"defaultIconColor",U("palette-grey-300")),Z(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Z(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Z(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Z(T.LinearProgress,"primaryBg",Ne(T.primary.main,.5)),Z(T.LinearProgress,"secondaryBg",Ne(T.secondary.main,.5)),Z(T.LinearProgress,"errorBg",Ne(T.error.main,.5)),Z(T.LinearProgress,"infoBg",Ne(T.info.main,.5)),Z(T.LinearProgress,"successBg",Ne(T.success.main,.5)),Z(T.LinearProgress,"warningBg",Ne(T.warning.main,.5)),Z(T.Skeleton,"bg",`rgba(${U("palette-text-primaryChannel")} / 0.13)`),Z(T.Slider,"primaryTrack",Ne(T.primary.main,.5)),Z(T.Slider,"secondaryTrack",Ne(T.secondary.main,.5)),Z(T.Slider,"errorTrack",Ne(T.error.main,.5)),Z(T.Slider,"infoTrack",Ne(T.info.main,.5)),Z(T.Slider,"successTrack",Ne(T.success.main,.5)),Z(T.Slider,"warningTrack",Ne(T.warning.main,.5));const G=ja(T.background.default,.98);Z(T.SnackbarContent,"bg",G),Z(T.SnackbarContent,"color",yn(()=>T.getContrastText(G))),Z(T.SpeedDialAction,"fabHoverBg",ja(T.background.paper,.15)),Z(T.StepConnector,"border",U("palette-grey-600")),Z(T.StepContent,"border",U("palette-grey-600")),Z(T.Switch,"defaultColor",U("palette-grey-300")),Z(T.Switch,"defaultDisabledColor",U("palette-grey-600")),Z(T.Switch,"primaryDisabledColor",Ne(T.primary.main,.55)),Z(T.Switch,"secondaryDisabledColor",Ne(T.secondary.main,.55)),Z(T.Switch,"errorDisabledColor",Ne(T.error.main,.55)),Z(T.Switch,"infoDisabledColor",Ne(T.info.main,.55)),Z(T.Switch,"successDisabledColor",Ne(T.success.main,.55)),Z(T.Switch,"warningDisabledColor",Ne(T.warning.main,.55)),Z(T.TableCell,"border",Ne(za(T.divider,1),.68)),Z(T.Tooltip,"bg",za(T.grey[700],.92))}jn(T.background,"default"),jn(T.background,"paper"),jn(T.common,"background"),jn(T.common,"onBackground"),jn(T,"divider"),Object.keys(T).forEach(G=>{const $=T[G];G!=="tonalOffset"&&$&&typeof $=="object"&&($.main&&Z(T[G],"mainChannel",qi(Xi($.main))),$.light&&Z(T[G],"lightChannel",qi(Xi($.light))),$.dark&&Z(T[G],"darkChannel",qi(Xi($.dark))),$.contrastText&&Z(T[G],"contrastTextChannel",qi(Xi($.contrastText))),G==="text"&&(jn(T[G],"primary"),jn(T[G],"secondary")),G==="action"&&($.active&&jn(T[G],"active"),$.selected&&jn(T[G],"selected")))})}),C=t.reduce((W,T)=>Wt(W,T),C);const b={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:y_(C)},{vars:A,generateThemeVars:E,generateStyleSheets:D}=HE(C,b);return C.vars=A,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([W,T])=>{C[W]=T}),C.generateThemeVars=E,C.generateStyleSheets=D,C.generateSpacing=function(){return Zh(c.spacing,uc(this))},C.getColorSchemeSelector=WE(l),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=a,C.unstable_sxConfig=H(H({},Ba),c==null?void 0:c.unstable_sxConfig),C.unstable_sx=function(T){return Hr({sx:T,theme:this})},C.toRuntimeSource=hp,C}function mp(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]=X(H({},n!==!0&&n),{palette:yc(X(H({},n===!0?{}:n.palette),{mode:t}))}))}function S_(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=H(H({},i),n?{[l]:X(H({},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(H({},e),{palette:f}),...t);return h.defaultColorScheme=l,h.colorSchemes=c,h.palette.mode==="light"&&(h.colorSchemes.light=X(H({},c.light!==!0&&c.light),{palette:h.palette}),mp(h,"dark",c.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark=X(H({},c.dark!==!0&&c.dark),{palette:h.palette}),mp(h,"light",c.light)),h}return!n&&!("light"in c)&&l==="light"&&(c.light=!0),I_(H(X(H({},a),{colorSchemes:c,defaultColorScheme:l}),typeof r!="boolean"&&r),...t)}const A_=S_(),T_="$$material";function E_(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const __=EE({themeId:T_,defaultTheme:A_,rootShouldForwardProp:e=>E_(e)&&e!=="classes"}),k_=zE;function D_(e){return FE(e)}function P_(e){return Uh("MuiSvgIcon",e)}mT("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const O_=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Vr(t)}`,`fontSize${Vr(n)}`]};return hT(i,P_,r)},R_=__("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)}`]]}})(k_(({theme:e})=>{var t,n,r,i,o,a,l,s,c,d,f,h,p,g,m,v,I,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,A;return{props:{color:y},style:{color:(A=(b=((C=e.vars)!=null?C:e).palette)==null?void 0:b[y])==null?void 0:A.main}}}),{props:{color:"action"},style:{color:(m=(g=((p=e.vars)!=null?p:e).palette)==null?void 0:g.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(w=(I=((v=e.vars)!=null?v:e).palette)==null?void 0:I.action)==null?void 0:w.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),wc=z.forwardRef(function(t,n){const r=D_({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"]),g=z.isValidElement(i)&&i.type==="svg",m=X(H({},r),{color:a,component:l,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:g}),v={};d||(v.viewBox=h);const I=O_(m);return u.jsxs(R_,X(H(H(H({as:l,className:Ln(I.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},v),p),g&&i.props),{ownerState:m,children:[g?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(H({"data-testid":`${t}Icon`,ref:i},r),{children:e}))}return n.muiName=wc.muiName,z.memo(z.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"),M_=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"),L_=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 B_(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 $_=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],N_=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,B_,{})},F_=be("div",{name:"JoyTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return P({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=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabPanel"}),{orientation:i}=pa()||{orientation:"horizontal"},o=z.useContext(oc),{children:a,value:l=0,component:s,color:c="neutral",variant:d="plain",size:f,slots:h={},slotProps:p={},keepMounted:g=!1}=r,m=Ae(r,$_),{hidden:v,getRootProps:I}=_S(P({},r,{value:l})),w=f!=null?f:o,y=P({},r,{orientation:i,hidden:v,size:w,color:c,variant:d}),C=N_(y),b=P({},m,{component:s,slots:h,slotProps:p}),[A,E]=Ie("root",{ref:n,elementType:F_,getSlotProps:I,externalForwardedProps:b,additionalProps:{role:"tabpanel",ref:n,as:s},ownerState:y,className:C.root});return g?u.jsx(A,P({},E,{children:a})):u.jsx(A,P({},E,{children:!v&&a}))});function z_(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"]),Va=z.createContext(void 0),j_=["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 V_(e,t){var n;const r=z.useContext(Va),{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:s,className:c,defaultValue:d,disabled:f,disabledInProp:h,error:p,id:g,name:m,onClick:v,onChange:I,onKeyDown:w,onKeyUp:y,onFocus:C,onBlur:b,placeholder:A,readOnly:E,required:D,type:F,value:Y}=e,W=Ae(e,j_),{getRootProps:T,getInputProps:U,focused:G,error:$,disabled:B}=UI({disabled:(n=h!=null?h:r==null?void 0:r.disabled)!=null?n:f,defaultValue:d,error:p,onBlur:b,onClick:v,onChange:I,onFocus:C,required:D!=null?D:r==null?void 0:r.required,value:Y}),L={[t.disabled]:B,[t.error]:$,[t.focused]:G,[t.formControl]:!!r,[c]:c},V={[t.disabled]:B};return P({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:s,disabled:B,id:g,onKeyDown:w,onKeyUp:y,name:m,placeholder:A,readOnly:E,type:F},rootStateClasses:L,inputStateClasses:V,getRootProps:T,getInputProps:U,focused:G,error:$,disabled:B},W)}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,g,m,v,I,w,y,C,b,A;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")]:`${(g=e.colorSchemes.dark)==null?void 0:g.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(m=e.colorSchemes.dark)==null?void 0:m.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(v=e.colorSchemes.dark)==null?void 0:v.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(I=e.colorSchemes.dark)==null?void 0:I.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")]:`${(A=e.colorSchemes.dark)==null?void 0:A.palette.divider} !important`}}};function U_(e){return e.theme!==void 0}const H_=e=>t=>{const n=U_(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)}},W_=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)}},G_=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","fullWidth","size","color","variant","startDecorator","endDecorator","component","slots","slotProps"],Y_=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,z_,{})},K_=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[P({"--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}])`]:P({},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":P({},(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"}}]}),q_=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":P({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)"}})),Q_=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"}),J_=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"}),X_=be(K_,{name:"JoyInput",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Z_=be(q_,{name:"JoyInput",slot:"Input",overridesResolver:(e,t)=>t.input})({}),ek=be(Q_,{name:"JoyInput",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({}),tk=be(J_,{name:"JoyInput",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({}),Ua=z.forwardRef(function(t,n){var r,i,o,a,l,s;const c=ct({props:t,name:"JoyInput"}),d=V_(P({},c,{disabledInProp:t.disabled}),vp),{propsToForward:f,rootStateClasses:h,inputStateClasses:p,getRootProps:g,getInputProps:m,formControl:v,focused:I,error:w=!1,disabled:y,fullWidth:C=!1,size:b="md",color:A="neutral",variant:E="outlined",startDecorator:D,endDecorator:F,component:Y,slots:W={},slotProps:T={}}=d,U=Ae(d,G_),G=(r=(i=t.error)!=null?i:v==null?void 0:v.error)!=null?r:w,$=(o=(a=t.size)!=null?a:v==null?void 0:v.size)!=null?o:b,B=(l=t.color)!=null?l:G?"danger":(s=v==null?void 0:v.color)!=null?s:A,L=P({instanceColor:G?"danger":t.color},c,{fullWidth:C,color:B,disabled:y,error:G,focused:I,size:$,variant:E}),V=Y_(L),q=P({},U,{component:Y,slots:W,slotProps:T}),[ee,O]=Ie("root",{ref:n,className:[V.root,h],elementType:X_,getSlotProps:g,externalForwardedProps:q,ownerState:L}),[M,N]=Ie("input",P({},v&&{additionalProps:{id:v.htmlFor,"aria-describedby":v["aria-describedby"]}},{className:[V.input,p],elementType:Z_,getSlotProps:m,internalForwardedProps:f,externalForwardedProps:q,ownerState:L})),[j,te]=Ie("startDecorator",{className:V.startDecorator,elementType:ek,externalForwardedProps:q,ownerState:L}),[se,oe]=Ie("endDecorator",{className:V.endDecorator,elementType:tk,externalForwardedProps:q,ownerState:L});return u.jsxs(ee,P({},O,{children:[D&&u.jsx(j,P({},te,{children:D})),u.jsx(M,P({},N)),F&&u.jsx(se,P({},oe,{children:F}))]}))}),eo=({label:e,placeholder:t,value:n,defaultValue:r,required:i,size:o,readOnly:a=!1,onChange:l})=>u.jsxs(S.FormControl,{size:o||"md",sx:()=>({marginBottom:"16px"}),children:[u.jsx(S.FormLabel,{required:i,color:"primary",children:e}),u.jsx(Ua,{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 nk(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 rk=e=>e,xp;const ik=["color","backgroundColor"],ok=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],ak=pe.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),sk=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,nk,{})};function Jr(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}const lk=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,ik);return P({"--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":P({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})}),ck=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))"}),uk=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)"}),dk=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=rk`
|
|
2348
2348
|
animation: var(--CircularProgress-circulation, 0.8s linear 0s infinite normal none running)
|
|
2349
2349
|
${0};
|
|
2350
|
-
`),ak)),wp=z.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:g={}}=r,m=Ae(r,ok),v=P({},r,{color:a,size:l,variant:s,thickness:c,value:f,determinate:d,instanceSize:t.size}),I=sk(v),w=P({},m,{component:h,slots:p,slotProps:g}),[y,C]=Ie("root",{ref:n,className:Ln(I.root,o),elementType:lk,externalForwardedProps:w,ownerState:v,additionalProps:P({role:"progressbar",style:{"--CircularProgress-percent":f}},f&&d&&{"aria-valuenow":Math.round(typeof f=="number"?f:Number(f||0))})}),[b,A]=Ie("svg",{className:I.svg,elementType:ck,externalForwardedProps:w,ownerState:v}),[E,k]=Ie("track",{className:I.track,elementType:uk,externalForwardedProps:w,ownerState:v}),[F,Y]=Ie("progress",{className:I.progress,elementType:dk,externalForwardedProps:w,ownerState:v});return u.jsxs(y,P({},C,{children:[u.jsxs(b,P({},A,{children:[u.jsx(E,P({},k)),u.jsx(F,P({},Y))]})),i]}))});function fk(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=z.createContext({}),Ap=z.createContext(void 0),hk=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],pk=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,fk,{});return r&&i&&(d.root+=` ${i}`),d},gk=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)"}),mk=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)"}),vk=be("span",{name:"JoyButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({theme:e,ownerState:t})=>{var n,r;return P({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})}),bk=({theme:e,ownerState:t})=>{var n,r,i,o;return[P({"--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}),P({},(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"}})]},yk=be("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(bk),Xr=z.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:g="center",loadingIndicator:m,disabled:v,component:I,slots:w={},slotProps:y={}}=i,C=Ae(i,hk),b=z.useContext(Sp),A=z.useContext(Ap),E=t.variant||b.variant||s,k=t.size||b.size||c,F=t.color||b.color||l,Y=(r=t.loading||t.disabled)!=null?r:b.disabled||p||v,W=z.useRef(null),T=sn(W,n),{focusVisible:U,setFocusVisible:G,getRootProps:$}=Rl(P({},i,{disabled:Y,rootRef:T})),B=m!=null?m:u.jsx(wp,{color:F,thickness:{sm:2,md:3,lg:4}[k]||3});z.useImperativeHandle(a,()=>({focusVisible:()=>{var ne;G(!0),(ne=W.current)==null||ne.focus()}}),[G]);const L=P({},i,{color:F,fullWidth:d,variant:E,size:k,focusVisible:U,loading:p,loadingPosition:g,disabled:Y}),V=pk(L),q=ne=>{var ge;let Se=i.onClick;if(typeof y.root=="function"?Se=y.root(L).onClick:y.root&&(Se=y.root.onClick),(ge=Se)==null||ge(ne),A){var Ue;(Ue=A.onClick)==null||Ue.call(A,ne,i.value)}};let ee=i["aria-pressed"];typeof y.root=="function"?ee=y.root(L)["aria-pressed"]:y.root&&(ee=y.root["aria-pressed"]),A!=null&&A.value&&(Array.isArray(A.value)?ee=A.value.indexOf(i.value)!==-1:ee=A.value===i.value);const O=P({},C,{component:I,slots:w,slotProps:y}),[M,N]=Ie("root",{ref:n,className:V.root,elementType:yk,externalForwardedProps:O,getSlotProps:$,ownerState:L,additionalProps:{onClick:q,"aria-pressed":ee}}),[j,te]=Ie("startDecorator",{className:V.startDecorator,elementType:gk,externalForwardedProps:O,ownerState:L}),[ae,oe]=Ie("endDecorator",{className:V.endDecorator,elementType:mk,externalForwardedProps:O,ownerState:L}),[J,se]=Ie("loadingIndicatorCenter",{className:V.loadingIndicatorCenter,elementType:vk,externalForwardedProps:O,ownerState:L});return u.jsxs(M,P({},N,{children:[(f||p&&g==="start")&&u.jsx(j,P({},te,{children:p&&g==="start"?B:f})),o,p&&g==="center"&&u.jsx(J,P({},se,{children:B})),(h||p&&g==="end")&&u.jsx(ae,P({},oe,{children:p&&g==="end"?B:h}))]}))});Xr.muiName="Button";var Tp={exports:{}};function Ck(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 xk=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 Ck=="function")try{o=xk}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,A=w.sigBytes;if(this.clamp(),b%4)for(var E=0;E<A;E++){var k=C[E>>>2]>>>24-E%4*8&255;y[b+E>>>2]|=k<<24-(b+E)%4*8}else for(var F=0;F<A;F+=4)y[b+F>>>2]=C[F>>>2];return this.sigBytes+=A,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=[],A=0;A<C;A++){var E=y[A>>>2]>>>24-A%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)}},g=h.Latin1={stringify:function(w){for(var y=w.words,C=w.sigBytes,b=[],A=0;A<C;A++){var E=y[A>>>2]>>>24-A%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)}},m=h.Utf8={stringify:function(w){try{return decodeURIComponent(escape(g.stringify(w)))}catch(y){throw new Error("Malformed UTF-8 data")}},parse:function(w){return g.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=m.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var y,C=this._data,b=C.words,A=C.sigBytes,E=this.blockSize,k=E*4,F=A/k;w?F=r.ceil(F):F=r.max((F|0)-this._minBufferSize,0);var Y=F*E,W=r.min(Y*4,A);if(Y){for(var T=0;T<Y;T+=E)this._doProcessBlock(b,T);y=b.splice(0,Y),C.sigBytes-=W}return new f.init(y,W)},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 I.HMAC.init(w,C).finalize(y)}}});var I=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 m=0;m<64;m++)c[m]=r.abs(r.sin(m+1))*4294967296|0})();var d=s.MD5=l.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,v){for(var I=0;I<16;I++){var w=v+I,y=m[w];m[w]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var C=this._hash.words,b=m[v+0],A=m[v+1],E=m[v+2],k=m[v+3],F=m[v+4],Y=m[v+5],W=m[v+6],T=m[v+7],U=m[v+8],G=m[v+9],$=m[v+10],B=m[v+11],L=m[v+12],V=m[v+13],q=m[v+14],ee=m[v+15],O=C[0],M=C[1],N=C[2],j=C[3];O=f(O,M,N,j,b,7,c[0]),j=f(j,O,M,N,A,12,c[1]),N=f(N,j,O,M,E,17,c[2]),M=f(M,N,j,O,k,22,c[3]),O=f(O,M,N,j,F,7,c[4]),j=f(j,O,M,N,Y,12,c[5]),N=f(N,j,O,M,W,17,c[6]),M=f(M,N,j,O,T,22,c[7]),O=f(O,M,N,j,U,7,c[8]),j=f(j,O,M,N,G,12,c[9]),N=f(N,j,O,M,$,17,c[10]),M=f(M,N,j,O,B,22,c[11]),O=f(O,M,N,j,L,7,c[12]),j=f(j,O,M,N,V,12,c[13]),N=f(N,j,O,M,q,17,c[14]),M=f(M,N,j,O,ee,22,c[15]),O=h(O,M,N,j,A,5,c[16]),j=h(j,O,M,N,W,9,c[17]),N=h(N,j,O,M,B,14,c[18]),M=h(M,N,j,O,b,20,c[19]),O=h(O,M,N,j,Y,5,c[20]),j=h(j,O,M,N,$,9,c[21]),N=h(N,j,O,M,ee,14,c[22]),M=h(M,N,j,O,F,20,c[23]),O=h(O,M,N,j,G,5,c[24]),j=h(j,O,M,N,q,9,c[25]),N=h(N,j,O,M,k,14,c[26]),M=h(M,N,j,O,U,20,c[27]),O=h(O,M,N,j,V,5,c[28]),j=h(j,O,M,N,E,9,c[29]),N=h(N,j,O,M,T,14,c[30]),M=h(M,N,j,O,L,20,c[31]),O=p(O,M,N,j,Y,4,c[32]),j=p(j,O,M,N,U,11,c[33]),N=p(N,j,O,M,B,16,c[34]),M=p(M,N,j,O,q,23,c[35]),O=p(O,M,N,j,A,4,c[36]),j=p(j,O,M,N,F,11,c[37]),N=p(N,j,O,M,T,16,c[38]),M=p(M,N,j,O,$,23,c[39]),O=p(O,M,N,j,V,4,c[40]),j=p(j,O,M,N,b,11,c[41]),N=p(N,j,O,M,k,16,c[42]),M=p(M,N,j,O,W,23,c[43]),O=p(O,M,N,j,G,4,c[44]),j=p(j,O,M,N,L,11,c[45]),N=p(N,j,O,M,ee,16,c[46]),M=p(M,N,j,O,E,23,c[47]),O=g(O,M,N,j,b,6,c[48]),j=g(j,O,M,N,T,10,c[49]),N=g(N,j,O,M,q,15,c[50]),M=g(M,N,j,O,Y,21,c[51]),O=g(O,M,N,j,L,6,c[52]),j=g(j,O,M,N,k,10,c[53]),N=g(N,j,O,M,$,15,c[54]),M=g(M,N,j,O,A,21,c[55]),O=g(O,M,N,j,U,6,c[56]),j=g(j,O,M,N,ee,10,c[57]),N=g(N,j,O,M,W,15,c[58]),M=g(M,N,j,O,V,21,c[59]),O=g(O,M,N,j,F,6,c[60]),j=g(j,O,M,N,B,10,c[61]),N=g(N,j,O,M,E,15,c[62]),M=g(M,N,j,O,G,21,c[63]),C[0]=C[0]+O|0,C[1]=C[1]+M|0,C[2]=C[2]+N|0,C[3]=C[3]+j|0},_doFinalize:function(){var m=this._data,v=m.words,I=this._nDataBytes*8,w=m.sigBytes*8;v[w>>>5]|=128<<24-w%32;var y=r.floor(I/4294967296),C=I;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,m.sigBytes=(v.length+1)*4,this._process();for(var b=this._hash,A=b.words,E=0;E<4;E++){var k=A[E];A[E]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}return b},clone:function(){var m=l.clone.call(this);return m._hash=this._hash.clone(),m}});function f(m,v,I,w,y,C,b){var A=m+(v&I|~v&w)+y+b;return(A<<C|A>>>32-C)+v}function h(m,v,I,w,y,C,b){var A=m+(v&w|I&~w)+y+b;return(A<<C|A>>>32-C)+v}function p(m,v,I,w,y,C,b){var A=m+(v^I^w)+y+b;return(A<<C|A>>>32-C)+v}function g(m,v,I,w,y,C,b){var A=m+(I^(v|~w))+y+b;return(A<<C|A>>>32-C)+v}i.MD5=l._createHelper(d),i.HmacMD5=l._createHmacHelper(d)}(Math),n.MD5})})(Tp);var wk=Tp.exports;const _p=fn(wk);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 Ik=kp.exports;const Dp=fn(Ik);var Pp={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 g=c[p>>>2]>>>24-p%4*8&255,m=c[p+1>>>2]>>>24-(p+1)%4*8&255,v=c[p+2>>>2]>>>24-(p+2)%4*8&255,I=g<<16|m<<8|v,w=0;w<4&&p+w*.75<d;w++)h.push(f.charAt(I>>>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 g=s.indexOf(p);g!==-1&&(c=g)}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 g=d[s.charCodeAt(p-1)]<<p%4*2,m=d[s.charCodeAt(p)]>>>6-p%4*2,v=g|m;f[h>>>2]|=v<<24-h%4*8,h++}return o.create(f,h)}}(),n.enc.Base64})})(Pp);var Sk=Pp.exports;const Ak=fn(Sk);class Op{constructor(){le(this,"readFileAndHash",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Dp.create(new Uint8Array(a)),c=_p(l).toString(Ak);n(c)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}));le(this,"generateHashFileName",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Dp.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(S.Modal,{open:t,onClose:r,children:u.jsxs(S.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(S.ModalClose,{}),u.jsx(S.DialogTitle,{sx:{marginBottom:"10px"},children:e}),u.jsx(S.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"),ht=()=>{const e=x.useContext(Tl);if(!e)throw new Error("useAPIContext must be used within a APIProvider");return e},Tk=Ve(u.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),Ek=({isLoading:e,images:t,onClick:n})=>u.jsxs(u.Fragment,{children:[u.jsx(S.Grid,{container:!0,spacing:2,children:t.map(r=>{var i,o;return u.jsx(S.Grid,{xs:5,sm:4,md:3,children:u.jsxs(S.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(S.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(S.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(S.Typography,{className:"plusSign",level:"h2",sx:{color:"white",opacity:0,transition:"opacity 0.3s ease"},children:"+"})})]})},`sportal-image-${r.id}`)})}),e?u.jsx(S.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:u.jsx(S.CircularProgress,{variant:"solid",color:"neutral"})}):u.jsx(u.Fragment,{})]}),_k=Ve(u.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),kk=Ve(u.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),Dk=e=>u.jsx(S.Box,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:u.jsxs(S.Box,{display:"flex",children:[e.pageCount&&e.pageCount!==1&&u.jsx(S.Button,{variant:"outlined",color:"neutral",startDecorator:u.jsx(_k,{}),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(S.Button,{variant:"outlined",color:"neutral",endDecorator:u.jsx(kk,{}),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})]})}),Pk=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"),Ok=Ve(u.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),Rk=({color:e})=>e==="warning"?u.jsx(Ok,{}):u.jsx(Pk,{}),pt=e=>u.jsx(S.Snackbar,{anchorOrigin:{vertical:"top",horizontal:"right"},open:e.showToast,onClose:e.hideToast,autoHideDuration:3e3,color:e.color,startDecorator:u.jsx(Rk,{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(S.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(S.FormLabel,{required:n,color:"primary",children:e}),u.jsx(S.Input,{type:"date",defaultValue:t,onChange:i,sx:{backgroundColor:"#fff",borderRadius:"md"}})]})},Mk=({labels:e,showFilters:t,onClick:n})=>u.jsx(S.Tooltip,{title:t?e.hideFilters:e.showFilters,children:u.jsx(S.IconButton,{"aria-label":"Filters",onClick:n,children:u.jsx(Tk,{})})}),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(""),[g,m]=x.useState(null),[v,I]=x.useState([]),{https:w}=ht();x.useEffect(()=>{E()},[d]);const y=()=>c(!s),C=()=>f(F=>F-1),b=()=>f(F=>F+1),A=()=>D(this,null,function*(){if(h){o(!0);const F=g?H({},g):null,Y=yield w.fetchImagesFromSportal365(h,F,d);if(Y){const W=yield Y.json();Y.ok?(I(W.data),f(W.meta.pagination.current_page)):(console.error(W),y())}o(!1)}else I([])}),E=()=>D(this,null,function*(){if(h){l(!0),I([]);const F=g&&g.from&&g.to?H({},g):null,Y=yield w.fetchImagesFromSportal365(h,F,d);if(Y){const W=yield Y.json();Y.ok?(I(W.data),f(W.meta.pagination.current_page)):(console.error(W),y())}l(!1)}}),k=(F,Y)=>{m(W=>W?Z(H({},W),{[Y]:F}):{[Y]:F})};return u.jsxs(u.Fragment,{children:[u.jsxs(S.Box,{sx:{marginBottom:"10px"},children:[u.jsx(S.Input,{value:h,onChange:F=>p(F.target.value),sx:{mb:2,width:"100%"},placeholder:e.searchImage,endDecorator:u.jsx(Mk,{labels:e,showFilters:n,onClick:()=>r(!n)})}),n?u.jsxs(S.Grid,{container:!0,spacing:2,children:[u.jsx(S.Grid,{xs:6,children:u.jsx(to,{label:e.fromDate,defaultValue:g==null?void 0:g.from,required:!1,onChange:F=>k(F,"from")})}),u.jsx(S.Grid,{xs:6,children:u.jsx(to,{label:e.toDate,defaultValue:g==null?void 0:g.to,required:!1,onChange:F=>k(F,"to")})})]}):u.jsx(u.Fragment,{}),u.jsx(S.Button,{onClick:A,sx:{mb:2,backgroundColor:"#ef8b34","&:hover":{backgroundColor:"#d7772e"},"&:active":{backgroundColor:"#c06c29"}},loading:i,children:e.search}),u.jsx(Ek,{images:v,isLoading:a,onClick:t}),u.jsx(Dk,{labels:e,pageCount:d,images:v,getPreviousPage:C,getNextPage:b})]}),u.jsx(pt,{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=S.styled("input")`
|
|
2350
|
+
`),ak)),wp=z.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:g={}}=r,m=Ae(r,ok),v=P({},r,{color:a,size:l,variant:s,thickness:c,value:f,determinate:d,instanceSize:t.size}),I=sk(v),w=P({},m,{component:h,slots:p,slotProps:g}),[y,C]=Ie("root",{ref:n,className:Ln(I.root,o),elementType:lk,externalForwardedProps:w,ownerState:v,additionalProps:P({role:"progressbar",style:{"--CircularProgress-percent":f}},f&&d&&{"aria-valuenow":Math.round(typeof f=="number"?f:Number(f||0))})}),[b,A]=Ie("svg",{className:I.svg,elementType:ck,externalForwardedProps:w,ownerState:v}),[E,D]=Ie("track",{className:I.track,elementType:uk,externalForwardedProps:w,ownerState:v}),[F,Y]=Ie("progress",{className:I.progress,elementType:dk,externalForwardedProps:w,ownerState:v});return u.jsxs(y,P({},C,{children:[u.jsxs(b,P({},A,{children:[u.jsx(E,P({},D)),u.jsx(F,P({},Y))]})),i]}))});function fk(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=z.createContext({}),Ap=z.createContext(void 0),hk=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],pk=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,fk,{});return r&&i&&(d.root+=` ${i}`),d},gk=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)"}),mk=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)"}),vk=be("span",{name:"JoyButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({theme:e,ownerState:t})=>{var n,r;return P({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})}),bk=({theme:e,ownerState:t})=>{var n,r,i,o;return[P({"--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}),P({},(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"}})]},yk=be("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(bk),Xr=z.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:g="center",loadingIndicator:m,disabled:v,component:I,slots:w={},slotProps:y={}}=i,C=Ae(i,hk),b=z.useContext(Sp),A=z.useContext(Ap),E=t.variant||b.variant||s,D=t.size||b.size||c,F=t.color||b.color||l,Y=(r=t.loading||t.disabled)!=null?r:b.disabled||p||v,W=z.useRef(null),T=sn(W,n),{focusVisible:U,setFocusVisible:G,getRootProps:$}=Rl(P({},i,{disabled:Y,rootRef:T})),B=m!=null?m:u.jsx(wp,{color:F,thickness:{sm:2,md:3,lg:4}[D]||3});z.useImperativeHandle(a,()=>({focusVisible:()=>{var ne;G(!0),(ne=W.current)==null||ne.focus()}}),[G]);const L=P({},i,{color:F,fullWidth:d,variant:E,size:D,focusVisible:U,loading:p,loadingPosition:g,disabled:Y}),V=pk(L),q=ne=>{var ge;let Se=i.onClick;if(typeof y.root=="function"?Se=y.root(L).onClick:y.root&&(Se=y.root.onClick),(ge=Se)==null||ge(ne),A){var Ue;(Ue=A.onClick)==null||Ue.call(A,ne,i.value)}};let ee=i["aria-pressed"];typeof y.root=="function"?ee=y.root(L)["aria-pressed"]:y.root&&(ee=y.root["aria-pressed"]),A!=null&&A.value&&(Array.isArray(A.value)?ee=A.value.indexOf(i.value)!==-1:ee=A.value===i.value);const O=P({},C,{component:I,slots:w,slotProps:y}),[M,N]=Ie("root",{ref:n,className:V.root,elementType:yk,externalForwardedProps:O,getSlotProps:$,ownerState:L,additionalProps:{onClick:q,"aria-pressed":ee}}),[j,te]=Ie("startDecorator",{className:V.startDecorator,elementType:gk,externalForwardedProps:O,ownerState:L}),[se,oe]=Ie("endDecorator",{className:V.endDecorator,elementType:mk,externalForwardedProps:O,ownerState:L}),[J,le]=Ie("loadingIndicatorCenter",{className:V.loadingIndicatorCenter,elementType:vk,externalForwardedProps:O,ownerState:L});return u.jsxs(M,P({},N,{children:[(f||p&&g==="start")&&u.jsx(j,P({},te,{children:p&&g==="start"?B:f})),o,p&&g==="center"&&u.jsx(J,P({},le,{children:B})),(h||p&&g==="end")&&u.jsx(se,P({},oe,{children:p&&g==="end"?B:h}))]}))});Xr.muiName="Button";var Tp={exports:{}};function Ck(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 xk=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 Ck=="function")try{o=xk}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,A=w.sigBytes;if(this.clamp(),b%4)for(var E=0;E<A;E++){var D=C[E>>>2]>>>24-E%4*8&255;y[b+E>>>2]|=D<<24-(b+E)%4*8}else for(var F=0;F<A;F+=4)y[b+F>>>2]=C[F>>>2];return this.sigBytes+=A,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=[],A=0;A<C;A++){var E=y[A>>>2]>>>24-A%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)}},g=h.Latin1={stringify:function(w){for(var y=w.words,C=w.sigBytes,b=[],A=0;A<C;A++){var E=y[A>>>2]>>>24-A%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)}},m=h.Utf8={stringify:function(w){try{return decodeURIComponent(escape(g.stringify(w)))}catch(y){throw new Error("Malformed UTF-8 data")}},parse:function(w){return g.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=m.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var y,C=this._data,b=C.words,A=C.sigBytes,E=this.blockSize,D=E*4,F=A/D;w?F=r.ceil(F):F=r.max((F|0)-this._minBufferSize,0);var Y=F*E,W=r.min(Y*4,A);if(Y){for(var T=0;T<Y;T+=E)this._doProcessBlock(b,T);y=b.splice(0,Y),C.sigBytes-=W}return new f.init(y,W)},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 I.HMAC.init(w,C).finalize(y)}}});var I=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 m=0;m<64;m++)c[m]=r.abs(r.sin(m+1))*4294967296|0})();var d=s.MD5=l.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,v){for(var I=0;I<16;I++){var w=v+I,y=m[w];m[w]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var C=this._hash.words,b=m[v+0],A=m[v+1],E=m[v+2],D=m[v+3],F=m[v+4],Y=m[v+5],W=m[v+6],T=m[v+7],U=m[v+8],G=m[v+9],$=m[v+10],B=m[v+11],L=m[v+12],V=m[v+13],q=m[v+14],ee=m[v+15],O=C[0],M=C[1],N=C[2],j=C[3];O=f(O,M,N,j,b,7,c[0]),j=f(j,O,M,N,A,12,c[1]),N=f(N,j,O,M,E,17,c[2]),M=f(M,N,j,O,D,22,c[3]),O=f(O,M,N,j,F,7,c[4]),j=f(j,O,M,N,Y,12,c[5]),N=f(N,j,O,M,W,17,c[6]),M=f(M,N,j,O,T,22,c[7]),O=f(O,M,N,j,U,7,c[8]),j=f(j,O,M,N,G,12,c[9]),N=f(N,j,O,M,$,17,c[10]),M=f(M,N,j,O,B,22,c[11]),O=f(O,M,N,j,L,7,c[12]),j=f(j,O,M,N,V,12,c[13]),N=f(N,j,O,M,q,17,c[14]),M=f(M,N,j,O,ee,22,c[15]),O=h(O,M,N,j,A,5,c[16]),j=h(j,O,M,N,W,9,c[17]),N=h(N,j,O,M,B,14,c[18]),M=h(M,N,j,O,b,20,c[19]),O=h(O,M,N,j,Y,5,c[20]),j=h(j,O,M,N,$,9,c[21]),N=h(N,j,O,M,ee,14,c[22]),M=h(M,N,j,O,F,20,c[23]),O=h(O,M,N,j,G,5,c[24]),j=h(j,O,M,N,q,9,c[25]),N=h(N,j,O,M,D,14,c[26]),M=h(M,N,j,O,U,20,c[27]),O=h(O,M,N,j,V,5,c[28]),j=h(j,O,M,N,E,9,c[29]),N=h(N,j,O,M,T,14,c[30]),M=h(M,N,j,O,L,20,c[31]),O=p(O,M,N,j,Y,4,c[32]),j=p(j,O,M,N,U,11,c[33]),N=p(N,j,O,M,B,16,c[34]),M=p(M,N,j,O,q,23,c[35]),O=p(O,M,N,j,A,4,c[36]),j=p(j,O,M,N,F,11,c[37]),N=p(N,j,O,M,T,16,c[38]),M=p(M,N,j,O,$,23,c[39]),O=p(O,M,N,j,V,4,c[40]),j=p(j,O,M,N,b,11,c[41]),N=p(N,j,O,M,D,16,c[42]),M=p(M,N,j,O,W,23,c[43]),O=p(O,M,N,j,G,4,c[44]),j=p(j,O,M,N,L,11,c[45]),N=p(N,j,O,M,ee,16,c[46]),M=p(M,N,j,O,E,23,c[47]),O=g(O,M,N,j,b,6,c[48]),j=g(j,O,M,N,T,10,c[49]),N=g(N,j,O,M,q,15,c[50]),M=g(M,N,j,O,Y,21,c[51]),O=g(O,M,N,j,L,6,c[52]),j=g(j,O,M,N,D,10,c[53]),N=g(N,j,O,M,$,15,c[54]),M=g(M,N,j,O,A,21,c[55]),O=g(O,M,N,j,U,6,c[56]),j=g(j,O,M,N,ee,10,c[57]),N=g(N,j,O,M,W,15,c[58]),M=g(M,N,j,O,V,21,c[59]),O=g(O,M,N,j,F,6,c[60]),j=g(j,O,M,N,B,10,c[61]),N=g(N,j,O,M,E,15,c[62]),M=g(M,N,j,O,G,21,c[63]),C[0]=C[0]+O|0,C[1]=C[1]+M|0,C[2]=C[2]+N|0,C[3]=C[3]+j|0},_doFinalize:function(){var m=this._data,v=m.words,I=this._nDataBytes*8,w=m.sigBytes*8;v[w>>>5]|=128<<24-w%32;var y=r.floor(I/4294967296),C=I;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,m.sigBytes=(v.length+1)*4,this._process();for(var b=this._hash,A=b.words,E=0;E<4;E++){var D=A[E];A[E]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return b},clone:function(){var m=l.clone.call(this);return m._hash=this._hash.clone(),m}});function f(m,v,I,w,y,C,b){var A=m+(v&I|~v&w)+y+b;return(A<<C|A>>>32-C)+v}function h(m,v,I,w,y,C,b){var A=m+(v&w|I&~w)+y+b;return(A<<C|A>>>32-C)+v}function p(m,v,I,w,y,C,b){var A=m+(v^I^w)+y+b;return(A<<C|A>>>32-C)+v}function g(m,v,I,w,y,C,b){var A=m+(I^(v|~w))+y+b;return(A<<C|A>>>32-C)+v}i.MD5=l._createHelper(d),i.HmacMD5=l._createHmacHelper(d)}(Math),n.MD5})})(Tp);var wk=Tp.exports;const _p=fn(wk);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 Ik=kp.exports;const Dp=fn(Ik);var Pp={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 g=c[p>>>2]>>>24-p%4*8&255,m=c[p+1>>>2]>>>24-(p+1)%4*8&255,v=c[p+2>>>2]>>>24-(p+2)%4*8&255,I=g<<16|m<<8|v,w=0;w<4&&p+w*.75<d;w++)h.push(f.charAt(I>>>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 g=s.indexOf(p);g!==-1&&(c=g)}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 g=d[s.charCodeAt(p-1)]<<p%4*2,m=d[s.charCodeAt(p)]>>>6-p%4*2,v=g|m;f[h>>>2]|=v<<24-h%4*8,h++}return o.create(f,h)}}(),n.enc.Base64})})(Pp);var Sk=Pp.exports;const Ak=fn(Sk);class Op{constructor(){ae(this,"readFileAndHash",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Dp.create(new Uint8Array(a)),c=_p(l).toString(Ak);n(c)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}));ae(this,"generateHashFileName",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Dp.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(S.Modal,{open:t,onClose:r,children:u.jsxs(S.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(S.ModalClose,{}),u.jsx(S.DialogTitle,{sx:{marginBottom:"10px"},children:e}),u.jsx(S.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"),ht=()=>{const e=x.useContext(Tl);if(!e)throw new Error("useAPIContext must be used within a APIProvider");return e},Tk=Ve(u.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),Ek=({isLoading:e,images:t,onClick:n})=>u.jsxs(u.Fragment,{children:[u.jsx(S.Grid,{container:!0,spacing:2,children:t.map(r=>{var i,o;return u.jsx(S.Grid,{xs:5,sm:4,md:3,children:u.jsxs(S.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(S.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(S.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(S.Typography,{className:"plusSign",level:"h2",sx:{color:"white",opacity:0,transition:"opacity 0.3s ease"},children:"+"})})]})},`sportal-image-${r.id}`)})}),e?u.jsx(S.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:u.jsx(S.CircularProgress,{variant:"solid",color:"neutral"})}):u.jsx(u.Fragment,{})]}),_k=Ve(u.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),kk=Ve(u.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),Dk=e=>u.jsx(S.Box,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:u.jsxs(S.Box,{display:"flex",children:[e.pageCount&&e.pageCount!==1&&u.jsx(S.Button,{variant:"outlined",color:"neutral",startDecorator:u.jsx(_k,{}),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(S.Button,{variant:"outlined",color:"neutral",endDecorator:u.jsx(kk,{}),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})]})}),Pk=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"),Ok=Ve(u.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),Rk=({color:e})=>e==="warning"?u.jsx(Ok,{}):u.jsx(Pk,{}),pt=e=>u.jsx(S.Snackbar,{anchorOrigin:{vertical:"top",horizontal:"right"},open:e.showToast,onClose:e.hideToast,autoHideDuration:3e3,color:e.color,startDecorator:u.jsx(Rk,{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(S.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(S.FormLabel,{required:n,color:"primary",children:e}),u.jsx(S.Input,{type:"date",defaultValue:t,onChange:i,sx:{backgroundColor:"#fff",borderRadius:"md"}})]})},Mk=({labels:e,showFilters:t,onClick:n})=>u.jsx(S.Tooltip,{title:t?e.hideFilters:e.showFilters,children:u.jsx(S.IconButton,{"aria-label":"Filters",onClick:n,children:u.jsx(Tk,{})})}),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(""),[g,m]=x.useState(null),[v,I]=x.useState([]),{https:w}=ht();x.useEffect(()=>{E()},[d]);const y=()=>c(!s),C=()=>f(F=>F-1),b=()=>f(F=>F+1),A=()=>k(this,null,function*(){if(h){o(!0);const F=g?H({},g):null,Y=yield w.fetchImagesFromSportal365(h,F,d);if(Y){const W=yield Y.json();Y.ok?(I(W.data),f(W.meta.pagination.current_page)):(console.error(W),y())}o(!1)}else I([])}),E=()=>k(this,null,function*(){if(h){l(!0),I([]);const F=g&&g.from&&g.to?H({},g):null,Y=yield w.fetchImagesFromSportal365(h,F,d);if(Y){const W=yield Y.json();Y.ok?(I(W.data),f(W.meta.pagination.current_page)):(console.error(W),y())}l(!1)}}),D=(F,Y)=>{m(W=>W?X(H({},W),{[Y]:F}):{[Y]:F})};return u.jsxs(u.Fragment,{children:[u.jsxs(S.Box,{sx:{marginBottom:"10px"},children:[u.jsx(S.Input,{value:h,onChange:F=>p(F.target.value),sx:{mb:2,width:"100%"},placeholder:e.searchImage,endDecorator:u.jsx(Mk,{labels:e,showFilters:n,onClick:()=>r(!n)})}),n?u.jsxs(S.Grid,{container:!0,spacing:2,children:[u.jsx(S.Grid,{xs:6,children:u.jsx(to,{label:e.fromDate,defaultValue:g==null?void 0:g.from,required:!1,onChange:F=>D(F,"from")})}),u.jsx(S.Grid,{xs:6,children:u.jsx(to,{label:e.toDate,defaultValue:g==null?void 0:g.to,required:!1,onChange:F=>D(F,"to")})})]}):u.jsx(u.Fragment,{}),u.jsx(S.Button,{onClick:A,sx:{mb:2,backgroundColor:"#ef8b34","&:hover":{backgroundColor:"#d7772e"},"&:active":{backgroundColor:"#c06c29"}},loading:i,children:e.search}),u.jsx(Ek,{images:v,isLoading:a,onClick:t}),u.jsx(Dk,{labels:e,pageCount:d,images:v,getPreviousPage:C,getNextPage:b})]}),u.jsx(pt,{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=S.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
|
-
`,tD=1,nD=3,rD=function(e){K0(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=z.createRef(),n.videoRef=z.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=Qk(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=Xk(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,g=f/h,m=void 0;if(p)switch(n.state.mediaObjectFit){default:case"contain":m=d>g?{width:n.containerRect.height*g,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/g};break;case"horizontal-cover":m={width:n.containerRect.width,height:n.containerRect.width/g};break;case"vertical-cover":m={width:n.containerRect.height*g,height:n.containerRect.height};break}else m={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=At(At({},m),{naturalWidth:f,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var v=n.props.cropSize?n.props.cropSize:Wk(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?Ka(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=Hk(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?Ka(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?Ka(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return Yk(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?Ka(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=eD,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,g=i.cropShape,m=i.showGrid,v=i.style,I=v.containerStyle,w=v.cropAreaStyle,y=v.mediaStyle,C=i.classes,b=C.containerClassName,A=C.cropAreaClassName,E=C.mediaClassName,k=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return z.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(Y){return n.containerRef=Y},"data-testid":"container",style:I,className:Qa("reactEasyCrop_Container",b)},o?z.createElement("img",At({alt:"",className:Qa("reactEasyCrop_Image",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="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&&z.createElement("video",At({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:Qa("reactEasyCrop_Video",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="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(F){return z.createElement("source",At({key:F.src},F))})),this.state.cropSize&&z.createElement("div",{style:At(At({},w),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Qa("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",A)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:nD,minZoom:tD,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}(z.Component);const iD=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 oD(e){return e*Math.PI/180}function aD(e,t,n=0){return D(this,null,function*(){const r=yield iD(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(oD(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),g=(y,C)=>{p(C)},m=(y,C)=>f(C),v=()=>D(this,null,function*(){const y=yield aD(n,h);w(),o(y)}),I=()=>{w(),r()},w=()=>{l({x:0,y:0}),c(1),f(16/9),p(null)};return u.jsx(S.Modal,{open:t,onClose:i,children:u.jsxs(S.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(S.ModalClose,{}),u.jsx(S.DialogTitle,{children:e.cropImage}),u.jsxs(S.DialogContent,{sx:{width:"100%"},children:[u.jsx(S.Box,{position:"relative",height:"100%",width:"100%",mb:2,children:u.jsx(rD,{image:n,crop:a,zoom:s,aspect:d,onCropChange:l,onCropComplete:g,onZoomChange:c})}),u.jsxs(S.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(S.FormLabel,{color:"primary",children:e.aspectRatio}),u.jsxs(S.Select,{value:d,onChange:m,children:[u.jsx(S.Option,{value:4/3,children:"4 / 3"}),u.jsx(S.Option,{value:16/9,children:"16 / 9"}),u.jsx(S.Option,{value:1,children:"1"})]})]}),u.jsx(S.Box,{mb:1,mx:2,children:u.jsx(S.Slider,{value:s,min:1,max:3,step:.1,onChange:(y,C)=>c(C)})}),u.jsxs(S.DialogActions,{children:[u.jsx(S.Button,{color:"primary",onClick:v,loading:!1,children:e.crop}),u.jsx(S.Button,{color:"primary",variant:"outlined",onClick:I,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,g]=x.useState(""),[m,v]=x.useState("primary"),[I,w]=x.useState(""),y=x.useRef(null),C=()=>h(!f),b=()=>{y.current&&y.current.click()},A=new Op,E=x.useContext(Tl),k=()=>{g(""),s(!1)},F=L=>{let V="",q="primary";switch(L){case"copy_url":V=e.urlCopiedToClipboardMessage,q="primary";break;case"image_deleted":V=e.imageDeletedMessage,q="primary";break;case"image_reset":V=e.imageResetMessage,q="primary";break;case"upload_success":V=e.uploadingImageMessage,q="success";break;case"upload_failed":V=e.uploadingImageErrorMessage,q="danger";break;case"sign_in_url_failed":V=e.generateSignedInUrlErrorMessage,q="danger";break;case"encrypting_file_failed":V=e.encryptingImageErrorMessage,q="danger";break}v(q),g(V),s(!0)},Y=()=>d(!c),W=()=>{i(),F("image_deleted")},T=L=>{navigator.clipboard.writeText(L),F("copy_url")},U=L=>D(this,null,function*(){L.persist();const V=L.target.files?L.target.files[0]:null;if(V){a(!0);try{const q=V.type.split("/")[1],ee=yield A.readFileAndHash(V),O=(yield A.generateHashFileName(V))+"."+q,M={image_type:q,image_file_name:O,image_size:V.size,base64_sum:ee},N=yield E==null?void 0:E.https.generateSignedInUrl(M);if(N!=null&&N.ok){const j=yield N.json(),te={"Content-Type":V.type,"Content-MD5":ee};try{const ae=new File([V],O,{type:V.type}),oe=yield E==null?void 0:E.https.storeInBucket(j.data.signed_url,ae,te);r(oe||""),w(oe),F("upload_success")}catch(ae){console.error("There was a problem with uploading the file: ",ae),F("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield N==null?void 0:N.json()),F("sign_in_url_failed")}catch(q){console.error("There was a problem with encrypting file...",q),F("encrypting_file_failed")}a(!1)}}),G=L=>D(this,null,function*(){if(L){a(!0);try{const V=L.type.split("/")[1],q=yield A.readFileAndHash(L),ee=(yield A.generateHashFileName(L))+"."+V,O={image_type:V,image_file_name:ee,image_size:L.size,base64_sum:q},M=yield E==null?void 0:E.https.generateSignedInUrl(O);if(M!=null&&M.ok){const N=yield M.json(),j={"Content-Type":L.type,"Content-MD5":q};try{const te=new File([L],ee,{type:L.type}),ae=yield E==null?void 0:E.https.storeInBucket(N.data.signed_url,te,j);r(ae||""),F("upload_success")}catch(te){console.error("There was a problem with uploading the file: ",te),F("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield M==null?void 0:M.json()),F("sign_in_url_failed")}catch(V){console.error("There was a problem with encrypting file...",V),F("encrypting_file_failed")}a(!1)}}),$=()=>{r(I),F("image_reset")},B=L=>{r(L),w(L)};return u.jsxs(u.Fragment,{children:[u.jsxs(S.Card,{sx:{marginBottom:"10px"},children:[u.jsxs(S.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsx(S.Typography,{level:"title-lg",children:t}),u.jsx(S.Tooltip,{title:e.clearImage,children:u.jsx(S.IconButton,{"aria-label":e.clearImage,variant:"plain",color:"danger",size:"sm",onClick:W,children:u.jsx(Cp,{})})})]}),u.jsxs(S.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(S.Skeleton,{loading:o,animation:"wave",children:[n?u.jsx(S.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(S.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(S.Tooltip,{title:e.copyUrl,children:u.jsx(Xr,{onClick:()=>T(n),disabled:!n,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Le.ContentCopy,{})})}),u.jsx(S.Tooltip,{title:e.viewImage,children:u.jsx(Xr,{onClick:Y,disabled:!n,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(Bp,{})})}),u.jsx(S.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(S.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:U,ref:y})]})}),E!=null&&E.https.sportal365Config?u.jsx(S.AccordionGroup,{variant:"soft",children:u.jsxs(S.Accordion,{children:[u.jsx(S.AccordionSummary,{children:u.jsx(S.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.sportal365Images})}),u.jsx(S.AccordionDetails,{children:u.jsx(Lp,{labels:e,onChangeImages:B})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(pt,{showToast:l,message:p,color:m,hideToast:k}),u.jsx(Rp,{title:e.viewImage,open:c,imageSrc:n,toggleModal:Y}),u.jsx(Zp,{labels:e,open:f,imageSrc:n,toggleModal:C,uploadImage:G,resetDefaultImageUrl:$})]})},sD=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),lD=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),cD=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),uD=({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=sD(e),s=lD(e),c=cD(e),d=(g,m)=>{const v=g.target.value;o.colors[m]=v,n(o)},f=(g,m)=>{const v=g.target.value;o.urls[m]=v,n(o)},h=(g,m)=>{o.images[m]=g,n(o)},p=g=>{o.images[g]="",n(o)};return u.jsx(S.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(S.ListItemDecorator,{children:u.jsx(Ic,{sx:{width:"20px"}})}),e.images]}),u.jsxs(jr,{children:[u.jsx(S.ListItemDecorator,{children:u.jsx(M_,{sx:{width:"20px"}})}),e.colors]}),u.jsxs(jr,{children:[u.jsx(S.ListItemDecorator,{children:u.jsx(L_,{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:g=>h(g,"main_logo"),clearImage:()=>p("main_logo")}),u.jsx(S.Link,{underline:"hover",onClick:()=>i(!r),sx:{marginBottom:"10px"},children:r?e.hideMoreImages:e.showMoreImages}),r?u.jsx(u.Fragment,{children:a.map(g=>u.jsx(tg,{labels:e,title:l.get(g),image:o.images[g],onChangeImages:m=>h(m,g),clearImage:()=>p(g)},`branding-image-${g}`))}):u.jsx(u.Fragment,{})]}),u.jsx(Qr,{value:1,sx:{px:0},children:u.jsx(S.Box,{children:Object.keys(o.colors).map(g=>u.jsx(S.Box,{mb:2,children:u.jsx(eo,{size:"sm",label:s.get(g),placeholder:"",defaultValue:o.colors[g],required:!1,onChange:m=>d(m,g)})},`branding-color-${g}`))})}),u.jsx(Qr,{value:2,sx:{px:0},children:u.jsx(S.Box,{children:Object.keys(o.urls).map(g=>u.jsx(S.Box,{mb:2,children:u.jsx(eo,{size:"sm",label:c.get(g),placeholder:"",defaultValue:o.urls[g],required:!1,onChange:m=>f(m,g)})},`branding-url-${g}`))})})]})})},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"),dD=({createLabel:e,createFromTemplateLabel:t,signOutLabel:n,environment:r,onClickCreate:i,onClickCreateFromTemplate:o})=>{const a=()=>D(this,null,function*(){yield zi(r).signOut()});return u.jsx(u.Fragment,{children:u.jsxs(S.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",p:1,sx:()=>({marginBottom:"16px"}),children:[t?u.jsxs(S.Stack,{direction:"row",alignItems:"center",spacing:2,children:[u.jsx(S.Button,{startDecorator:u.jsx(Lc,{}),variant:"solid",color:"primary",onClick:i,children:e}),u.jsx(S.Button,{startDecorator:u.jsx(Lc,{}),variant:"outlined",color:"primary",onClick:o,children:t})]}):u.jsx(S.Button,{startDecorator:u.jsx(Lc,{}),variant:"solid",color:"primary",onClick:i,children:e}),n?u.jsx(S.Button,{variant:"outlined",color:"danger",onClick:a,children:n}):u.jsx(u.Fragment,{})]})})};var ng={},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 rg(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 Ja(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ig(e,t){if(t(e))return e;if(e.parentNode)return ig(e.parentNode,t)}function Xa(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(){},Za=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},fD={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 Za(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 Za(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)}},og=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 g=void 0,m=[],v=0,I=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 A=new RegExp(w).exec(o);A&&(g=!0)&&m[y!=="Y"?"push":"unshift"]({fn:fD[y],val:A[++I]})}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)),m.forEach(function(E){var k=E.fn,F=E.val;return d=k(d,F,c)||d}),d=g?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 hD=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},pD=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},gD={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)},ag=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},mD=300;function vD(e,t){var n={config:Et(Et({},ei),ut.defaultConfig),l10n:no};n.parseDate=Fc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=m,n._setHoursFromDate=h,n._positionCalendar=Ce,n.changeMonth=O,n.changeYear=oe,n.clear=M,n.close=N,n.onMouseOver=Se,n._createElement=Re,n.createDay=A,n.destroy=j,n.isEnabled=J,n.jumpToDate=w,n.updateValue=un,n.open=wt,n.redraw=De,n.set=jt,n.setDate=qt,n.toggle=ku;function r(){n.utils={getDaysInMonth:function(_,R){return _===void 0&&(_=n.currentMonth),R===void 0&&(R=n.currentYear),_===1&&(R%4===0&&R%100!==0||R%400===0)?29:n.l10n.daysInMonth[_]}}}function i(){n.element=n.input=e,n.isOpen=!1,kt(),he(),wn(),As(),r(),n.isMobile||b(),I(),(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 R=(n.days.offsetWidth+1)*_.showMonths;n.daysContainer.style.width=R+"px",n.calendarContainer.style.width=R+(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 R=n.config.minDate===void 0||Kt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),K=jc(n.config);R.setHours(K.hours,K.minutes,K.seconds,R.getMilliseconds()),n.selectedDates=[R],n.latestSelectedDateObj=R}_!==void 0&&_.type!=="blur"&&xt(_);var Q=n._input.value;f(),un(),n._input.value!==Q&&n._debouncedChange()}function c(_,R){return _%12+12*rn(R===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,R=(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(_,R,K);if(ue>xe&&ue<ce){var we=pD(ce);_=we[0],R=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()&&(R=Math.min(R,fe.getMinutes())),R===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()&&R<me.getMinutes()&&(R=me.getMinutes()),R===me.getMinutes()&&(K=Math.max(K,me.getSeconds()))}}p(_,R,K)}}function h(_){var R=_||n.latestSelectedDateObj;R&&R instanceof Date&&p(R.getHours(),R.getMinutes(),R.getSeconds())}function p(_,R,K){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(_%24,R,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(R),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[rn(_>=12)]),n.secondElement!==void 0&&(n.secondElement.value=zt(K)))}function g(_){var R=Yt(_),K=parseInt(R.value)+(_.delta||0);(K/1e3>1||_.key==="Enter"&&!/[^\d]/.test(K.toString()))&&oe(K)}function m(_,R,K,Q){if(R instanceof Array)return R.forEach(function(re){return m(_,re,K,Q)});if(_ instanceof Array)return _.forEach(function(re){return m(re,R,K,Q)});_.addEventListener(R,K,Q),n._handlers.push({remove:function(){return _.removeEventListener(R,K,Q)}})}function v(){ze("onChange")}function I(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(K){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+K+"]"),function(Q){return m(Q,"click",n[K])})}),n.isMobile){_u();return}var _=rg(Ue,50);if(n._debouncedChange=rg(v,mD),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&m(n.daysContainer,"mouseover",function(K){n.config.mode==="range"&&Se(Yt(K))}),m(n._input,"keydown",ge),n.calendarContainer!==void 0&&m(n.calendarContainer,"keydown",ge),!n.config.inline&&!n.config.static&&m(window,"resize",_),window.ontouchstart!==void 0?m(window.document,"touchstart",ae):m(window.document,"mousedown",ae),m(window.document,"focus",ae,{capture:!0}),n.config.clickOpens===!0&&(m(n._input,"focus",n.open),m(n._input,"click",n.open)),n.daysContainer!==void 0&&(m(n.monthNav,"click",Es),m(n.monthNav,["keyup","increment"],g),m(n.daysContainer,"click",It)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var R=function(K){return Yt(K).select()};m(n.timeContainer,["increment"],s),m(n.timeContainer,"blur",s,{capture:!0}),m(n.timeContainer,"click",y),m([n.hourElement,n.minuteElement],["focus","click"],R),n.secondElement!==void 0&&m(n.secondElement,"focus",function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&m(n.amPM,"click",function(K){s(K)})}n.config.allowInput&&m(n._input,"blur",ne)}function w(_,R){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)}R&&n.currentYear!==Q&&(ze("onYearChange"),U()),R&&(n.currentYear!==Q||n.currentMonth!==re)&&ze("onMonthChange"),n.redraw()}function y(_){var R=Yt(_);~R.className.indexOf("arrow")&&C(_,R.classList.contains("arrowUp")?1:-1)}function C(_,R,K){var Q=_&&Yt(_),re=K||Q&&Q.parentNode&&Q.parentNode.firstChild,ce=pi("increment");ce.delta=R,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(B()),n.innerContainer=Re("div","flatpickr-innerContainer"),n.config.weekNumbers){var R=ee(),K=R.weekWrapper,Q=R.weekNumbers;n.innerContainer.appendChild(K),n.weekNumbers=Q,n.weekWrapper=K}n.rContainer=Re("div","flatpickr-rContainer"),n.rContainer.appendChild(V()),n.daysContainer||(n.daysContainer=Re("div","flatpickr-days"),n.daysContainer.tabIndex=-1),T(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),_.appendChild(n.innerContainer)}n.config.enableTime&&_.appendChild(L()),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 A(_,R,K,Q){var re=J(R,!0),ce=Re("span",_,R.getDate().toString());return ce.dateObj=R,ce.$i=Q,ce.setAttribute("aria-label",n.formatDate(R,n.config.ariaDateFormat)),_.indexOf("hidden")===-1&&Kt(R,n.now)===0&&(n.todayDateElem=ce,ce.classList.add("today"),ce.setAttribute("aria-current","date")),re?(ce.tabIndex=-1,Io(R)&&(ce.classList.add("selected"),n.selectedDateElem=ce,n.config.mode==="range"&&(Ot(ce,"startRange",n.selectedDates[0]&&Kt(R,n.selectedDates[0],!0)===0),Ot(ce,"endRange",n.selectedDates[1]&&Kt(R,n.selectedDates[1],!0)===0),_==="nextMonthDay"&&ce.classList.add("inRange")))):ce.classList.add("flatpickr-disabled"),n.config.mode==="range"&&Ts(R)&&!Io(R)&&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(R)+"</span>"),ze("onDayCreate",ce),ce}function E(_){_.focus(),n.config.mode==="range"&&Se(_)}function k(_){for(var R=_>0?0:n.config.showMonths-1,K=_>0?n.config.showMonths:-1,Q=R;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 F(_,R){for(var K=_.className.indexOf("Month")===-1?_.dateObj.getMonth():n.currentMonth,Q=R>0?n.config.showMonths:-1,re=R>0?1:-1,ce=K-n.currentMonth;ce!=Q;ce+=re)for(var xe=n.daysContainer.children[ce],ue=K-n.currentMonth===ce?_.$i+R:R<0?xe.children.length-1:0,we=xe.children.length,fe=ue;fe>=0&&fe<we&&fe!=(R>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(R))return E(me)}n.changeMonth(re),Y(k(re),0)}function Y(_,R){var K=o(),Q=se(K||document.body),re=_!==void 0?_:Q?K:n.selectedDateElem!==void 0&&se(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&se(n.todayDateElem)?n.todayDateElem:k(R>0?1:-1);re===void 0?n._input.focus():Q?F(re,R):E(re)}function W(_,R){for(var K=(new Date(_,R,1).getDay()-n.l10n.firstDayOfWeek+7)%7,Q=n.utils.getDaysInMonth((R-1+12)%12,_),re=n.utils.getDaysInMonth(R,_),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(A("flatpickr-day "+ue,new Date(_,R-1,fe),fe,me));for(fe=1;fe<=re;fe++,me++)ce.appendChild(A("flatpickr-day",new Date(_,R,fe),fe,me));for(var Pe=re+1;Pe<=42-K&&(n.config.showMonths===1||me%7!==0);Pe++,me++)ce.appendChild(A("flatpickr-day "+we,new Date(_,R+1,Pe%re),Pe,me));var Dt=Re("div","dayContainer");return Dt.appendChild(ce),Dt}function T(){if(n.daysContainer!==void 0){Ja(n.daysContainer),n.weekNumbers&&Ja(n.weekNumbers);for(var _=document.createDocumentFragment(),R=0;R<n.config.showMonths;R++){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+R),_.appendChild(W(K.getFullYear(),K.getMonth()))}n.daysContainer.appendChild(_),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&Se()}}function U(){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 R=0;R<12;R++)if(_(R)){var K=Re("option","flatpickr-monthDropdown-month");K.value=new Date(n.currentYear,R).getMonth().toString(),K.textContent=Za(R,n.config.shorthandCurrentMonth,n.l10n),K.tabIndex=-1,n.currentMonth===R&&(K.selected=!0),n.monthsDropdownContainer.appendChild(K)}}}function G(){var _=Re("div","flatpickr-month"),R=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),m(n.monthsDropdownContainer,"change",function(xe){var ue=Yt(xe),we=parseInt(ue.value,10);n.changeMonth(we-n.currentMonth),ze("onMonthChange")}),U(),K=n.monthsDropdownContainer);var Q=Xa("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),R.appendChild(ce),_.appendChild(R),{container:_,yearElement:re,monthElement:K}}function $(){Ja(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var _=n.config.showMonths;_--;){var R=G();n.yearElements.push(R.yearElement),n.monthElements.push(R.monthElement),n.monthNav.appendChild(R.container)}n.monthNav.appendChild(n.nextMonthNav)}function B(){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,$(),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 L(){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 R=Re("span","flatpickr-time-separator",":"),K=Xa("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=K.getElementsByTagName("input")[0];var Q=Xa("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(R),n.timeContainer.appendChild(Q),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var re=Xa("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 V(){n.weekdayContainer?Ja(n.weekdayContainer):n.weekdayContainer=Re("div","flatpickr-weekdays");for(var _=n.config.showMonths;_--;){var R=Re("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(R)}return q(),n.weekdayContainer}function q(){if(n.weekdayContainer){var _=n.l10n.firstDayOfWeek,R=ag(n.l10n.weekdays.shorthand);_>0&&_<R.length&&(R=ag(R.splice(_,R.length),R.splice(0,_)));for(var K=n.config.showMonths;K--;)n.weekdayContainer.children[K].innerHTML=`
|
|
2453
|
+
`,tD=1,nD=3,rD=function(e){K0(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=z.createRef(),n.videoRef=z.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=Qk(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=Xk(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,g=f/h,m=void 0;if(p)switch(n.state.mediaObjectFit){default:case"contain":m=d>g?{width:n.containerRect.height*g,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/g};break;case"horizontal-cover":m={width:n.containerRect.width,height:n.containerRect.width/g};break;case"vertical-cover":m={width:n.containerRect.height*g,height:n.containerRect.height};break}else m={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=At(At({},m),{naturalWidth:f,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var v=n.props.cropSize?n.props.cropSize:Wk(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?Ka(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=Hk(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?Ka(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?Ka(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return Yk(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?Ka(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=eD,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,g=i.cropShape,m=i.showGrid,v=i.style,I=v.containerStyle,w=v.cropAreaStyle,y=v.mediaStyle,C=i.classes,b=C.containerClassName,A=C.cropAreaClassName,E=C.mediaClassName,D=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return z.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(Y){return n.containerRef=Y},"data-testid":"container",style:I,className:Qa("reactEasyCrop_Container",b)},o?z.createElement("img",At({alt:"",className:Qa("reactEasyCrop_Image",D==="contain"&&"reactEasyCrop_Contain",D==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",D==="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&&z.createElement("video",At({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:Qa("reactEasyCrop_Video",D==="contain"&&"reactEasyCrop_Contain",D==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",D==="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(F){return z.createElement("source",At({key:F.src},F))})),this.state.cropSize&&z.createElement("div",{style:At(At({},w),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Qa("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",A)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:nD,minZoom:tD,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}(z.Component);const iD=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 oD(e){return e*Math.PI/180}function aD(e,t,n=0){return k(this,null,function*(){const r=yield iD(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(oD(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),g=(y,C)=>{p(C)},m=(y,C)=>f(C),v=()=>k(this,null,function*(){const y=yield aD(n,h);w(),o(y)}),I=()=>{w(),r()},w=()=>{l({x:0,y:0}),c(1),f(16/9),p(null)};return u.jsx(S.Modal,{open:t,onClose:i,children:u.jsxs(S.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(S.ModalClose,{}),u.jsx(S.DialogTitle,{children:e.cropImage}),u.jsxs(S.DialogContent,{sx:{width:"100%"},children:[u.jsx(S.Box,{position:"relative",height:"100%",width:"100%",mb:2,children:u.jsx(rD,{image:n,crop:a,zoom:s,aspect:d,onCropChange:l,onCropComplete:g,onZoomChange:c})}),u.jsxs(S.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(S.FormLabel,{color:"primary",children:e.aspectRatio}),u.jsxs(S.Select,{value:d,onChange:m,children:[u.jsx(S.Option,{value:4/3,children:"4 / 3"}),u.jsx(S.Option,{value:16/9,children:"16 / 9"}),u.jsx(S.Option,{value:1,children:"1"})]})]}),u.jsx(S.Box,{mb:1,mx:2,children:u.jsx(S.Slider,{value:s,min:1,max:3,step:.1,onChange:(y,C)=>c(C)})}),u.jsxs(S.DialogActions,{children:[u.jsx(S.Button,{color:"primary",onClick:v,loading:!1,children:e.crop}),u.jsx(S.Button,{color:"primary",variant:"outlined",onClick:I,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,g]=x.useState(""),[m,v]=x.useState("primary"),[I,w]=x.useState(""),y=x.useRef(null),C=()=>h(!f),b=()=>{y.current&&y.current.click()},A=new Op,E=x.useContext(Tl),D=()=>{g(""),s(!1)},F=L=>{let V="",q="primary";switch(L){case"copy_url":V=e.urlCopiedToClipboardMessage,q="primary";break;case"image_deleted":V=e.imageDeletedMessage,q="primary";break;case"image_reset":V=e.imageResetMessage,q="primary";break;case"upload_success":V=e.uploadingImageMessage,q="success";break;case"upload_failed":V=e.uploadingImageErrorMessage,q="danger";break;case"sign_in_url_failed":V=e.generateSignedInUrlErrorMessage,q="danger";break;case"encrypting_file_failed":V=e.encryptingImageErrorMessage,q="danger";break}v(q),g(V),s(!0)},Y=()=>d(!c),W=()=>{i(),F("image_deleted")},T=L=>{navigator.clipboard.writeText(L),F("copy_url")},U=L=>k(this,null,function*(){L.persist();const V=L.target.files?L.target.files[0]:null;if(V){a(!0);try{const q=V.type.split("/")[1],ee=yield A.readFileAndHash(V),O=(yield A.generateHashFileName(V))+"."+q,M={image_type:q,image_file_name:O,image_size:V.size,base64_sum:ee},N=yield E==null?void 0:E.https.generateSignedInUrl(M);if(N!=null&&N.ok){const j=yield N.json(),te={"Content-Type":V.type,"Content-MD5":ee};try{const se=new File([V],O,{type:V.type}),oe=yield E==null?void 0:E.https.storeInBucket(j.data.signed_url,se,te);r(oe||""),w(oe),F("upload_success")}catch(se){console.error("There was a problem with uploading the file: ",se),F("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield N==null?void 0:N.json()),F("sign_in_url_failed")}catch(q){console.error("There was a problem with encrypting file...",q),F("encrypting_file_failed")}a(!1)}}),G=L=>k(this,null,function*(){if(L){a(!0);try{const V=L.type.split("/")[1],q=yield A.readFileAndHash(L),ee=(yield A.generateHashFileName(L))+"."+V,O={image_type:V,image_file_name:ee,image_size:L.size,base64_sum:q},M=yield E==null?void 0:E.https.generateSignedInUrl(O);if(M!=null&&M.ok){const N=yield M.json(),j={"Content-Type":L.type,"Content-MD5":q};try{const te=new File([L],ee,{type:L.type}),se=yield E==null?void 0:E.https.storeInBucket(N.data.signed_url,te,j);r(se||""),F("upload_success")}catch(te){console.error("There was a problem with uploading the file: ",te),F("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield M==null?void 0:M.json()),F("sign_in_url_failed")}catch(V){console.error("There was a problem with encrypting file...",V),F("encrypting_file_failed")}a(!1)}}),$=()=>{r(I),F("image_reset")},B=L=>{r(L),w(L)};return u.jsxs(u.Fragment,{children:[u.jsxs(S.Card,{sx:{marginBottom:"10px"},children:[u.jsxs(S.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsx(S.Typography,{level:"title-lg",children:t}),u.jsx(S.Tooltip,{title:e.clearImage,children:u.jsx(S.IconButton,{"aria-label":e.clearImage,variant:"plain",color:"danger",size:"sm",onClick:W,children:u.jsx(Cp,{})})})]}),u.jsxs(S.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(S.Skeleton,{loading:o,animation:"wave",children:[n?u.jsx(S.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(S.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(S.Tooltip,{title:e.copyUrl,children:u.jsx(Xr,{onClick:()=>T(n),disabled:!n,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Le.ContentCopy,{})})}),u.jsx(S.Tooltip,{title:e.viewImage,children:u.jsx(Xr,{onClick:Y,disabled:!n,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(Bp,{})})}),u.jsx(S.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(S.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:U,ref:y})]})}),E!=null&&E.https.sportal365Config?u.jsx(S.AccordionGroup,{variant:"soft",children:u.jsxs(S.Accordion,{children:[u.jsx(S.AccordionSummary,{children:u.jsx(S.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.sportal365Images})}),u.jsx(S.AccordionDetails,{children:u.jsx(Lp,{labels:e,onChangeImages:B})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(pt,{showToast:l,message:p,color:m,hideToast:D}),u.jsx(Rp,{title:e.viewImage,open:c,imageSrc:n,toggleModal:Y}),u.jsx(Zp,{labels:e,open:f,imageSrc:n,toggleModal:C,uploadImage:G,resetDefaultImageUrl:$})]})},sD=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),lD=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),cD=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),uD=({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=sD(e),s=lD(e),c=cD(e),d=(g,m)=>{const v=g.target.value;o.colors[m]=v,n(o)},f=(g,m)=>{const v=g.target.value;o.urls[m]=v,n(o)},h=(g,m)=>{o.images[m]=g,n(o)},p=g=>{o.images[g]="",n(o)};return u.jsx(S.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(S.ListItemDecorator,{children:u.jsx(Ic,{sx:{width:"20px"}})}),e.images]}),u.jsxs(jr,{children:[u.jsx(S.ListItemDecorator,{children:u.jsx(M_,{sx:{width:"20px"}})}),e.colors]}),u.jsxs(jr,{children:[u.jsx(S.ListItemDecorator,{children:u.jsx(L_,{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:g=>h(g,"main_logo"),clearImage:()=>p("main_logo")}),u.jsx(S.Link,{underline:"hover",onClick:()=>i(!r),sx:{marginBottom:"10px"},children:r?e.hideMoreImages:e.showMoreImages}),r?u.jsx(u.Fragment,{children:a.map(g=>u.jsx(tg,{labels:e,title:l.get(g),image:o.images[g],onChangeImages:m=>h(m,g),clearImage:()=>p(g)},`branding-image-${g}`))}):u.jsx(u.Fragment,{})]}),u.jsx(Qr,{value:1,sx:{px:0},children:u.jsx(S.Box,{children:Object.keys(o.colors).map(g=>u.jsx(S.Box,{mb:2,children:u.jsx(eo,{size:"sm",label:s.get(g),placeholder:"",defaultValue:o.colors[g],required:!1,onChange:m=>d(m,g)})},`branding-color-${g}`))})}),u.jsx(Qr,{value:2,sx:{px:0},children:u.jsx(S.Box,{children:Object.keys(o.urls).map(g=>u.jsx(S.Box,{mb:2,children:u.jsx(eo,{size:"sm",label:c.get(g),placeholder:"",defaultValue:o.urls[g],required:!1,onChange:m=>f(m,g)})},`branding-url-${g}`))})})]})})},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"),dD=({createLabel:e,createFromTemplateLabel:t,signOutLabel:n,environment:r,onClickCreate:i,onClickCreateFromTemplate:o})=>{const a=()=>k(this,null,function*(){yield zi(r).signOut()});return u.jsx(u.Fragment,{children:u.jsxs(S.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",p:1,sx:()=>({marginBottom:"16px"}),children:[t?u.jsxs(S.Stack,{direction:"row",alignItems:"center",spacing:2,children:[u.jsx(S.Button,{startDecorator:u.jsx(Lc,{}),variant:"solid",color:"primary",onClick:i,children:e}),u.jsx(S.Button,{startDecorator:u.jsx(Lc,{}),variant:"outlined",color:"primary",onClick:o,children:t})]}):u.jsx(S.Button,{startDecorator:u.jsx(Lc,{}),variant:"solid",color:"primary",onClick:i,children:e}),n?u.jsx(S.Button,{variant:"outlined",color:"danger",onClick:a,children:n}):u.jsx(u.Fragment,{})]})})};var ng={},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 rg(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 Ja(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ig(e,t){if(t(e))return e;if(e.parentNode)return ig(e.parentNode,t)}function Xa(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(){},Za=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},fD={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 Za(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 Za(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)}},og=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 g=void 0,m=[],v=0,I=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 A=new RegExp(w).exec(o);A&&(g=!0)&&m[y!=="Y"?"push":"unshift"]({fn:fD[y],val:A[++I]})}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)),m.forEach(function(E){var D=E.fn,F=E.val;return d=D(d,F,c)||d}),d=g?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 hD=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},pD=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},gD={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)},ag=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},mD=300;function vD(e,t){var n={config:Et(Et({},ei),ut.defaultConfig),l10n:no};n.parseDate=Fc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=m,n._setHoursFromDate=h,n._positionCalendar=Ce,n.changeMonth=O,n.changeYear=oe,n.clear=M,n.close=N,n.onMouseOver=Se,n._createElement=Re,n.createDay=A,n.destroy=j,n.isEnabled=J,n.jumpToDate=w,n.updateValue=un,n.open=wt,n.redraw=De,n.set=jt,n.setDate=qt,n.toggle=ku;function r(){n.utils={getDaysInMonth:function(_,R){return _===void 0&&(_=n.currentMonth),R===void 0&&(R=n.currentYear),_===1&&(R%4===0&&R%100!==0||R%400===0)?29:n.l10n.daysInMonth[_]}}}function i(){n.element=n.input=e,n.isOpen=!1,kt(),he(),wn(),As(),r(),n.isMobile||b(),I(),(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 R=(n.days.offsetWidth+1)*_.showMonths;n.daysContainer.style.width=R+"px",n.calendarContainer.style.width=R+(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 R=n.config.minDate===void 0||Kt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),K=jc(n.config);R.setHours(K.hours,K.minutes,K.seconds,R.getMilliseconds()),n.selectedDates=[R],n.latestSelectedDateObj=R}_!==void 0&&_.type!=="blur"&&xt(_);var Q=n._input.value;f(),un(),n._input.value!==Q&&n._debouncedChange()}function c(_,R){return _%12+12*rn(R===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,R=(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(_,R,K);if(ue>xe&&ue<ce){var we=pD(ce);_=we[0],R=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()&&(R=Math.min(R,fe.getMinutes())),R===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()&&R<me.getMinutes()&&(R=me.getMinutes()),R===me.getMinutes()&&(K=Math.max(K,me.getSeconds()))}}p(_,R,K)}}function h(_){var R=_||n.latestSelectedDateObj;R&&R instanceof Date&&p(R.getHours(),R.getMinutes(),R.getSeconds())}function p(_,R,K){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(_%24,R,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(R),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[rn(_>=12)]),n.secondElement!==void 0&&(n.secondElement.value=zt(K)))}function g(_){var R=Yt(_),K=parseInt(R.value)+(_.delta||0);(K/1e3>1||_.key==="Enter"&&!/[^\d]/.test(K.toString()))&&oe(K)}function m(_,R,K,Q){if(R instanceof Array)return R.forEach(function(re){return m(_,re,K,Q)});if(_ instanceof Array)return _.forEach(function(re){return m(re,R,K,Q)});_.addEventListener(R,K,Q),n._handlers.push({remove:function(){return _.removeEventListener(R,K,Q)}})}function v(){ze("onChange")}function I(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(K){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+K+"]"),function(Q){return m(Q,"click",n[K])})}),n.isMobile){_u();return}var _=rg(Ue,50);if(n._debouncedChange=rg(v,mD),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&m(n.daysContainer,"mouseover",function(K){n.config.mode==="range"&&Se(Yt(K))}),m(n._input,"keydown",ge),n.calendarContainer!==void 0&&m(n.calendarContainer,"keydown",ge),!n.config.inline&&!n.config.static&&m(window,"resize",_),window.ontouchstart!==void 0?m(window.document,"touchstart",se):m(window.document,"mousedown",se),m(window.document,"focus",se,{capture:!0}),n.config.clickOpens===!0&&(m(n._input,"focus",n.open),m(n._input,"click",n.open)),n.daysContainer!==void 0&&(m(n.monthNav,"click",Es),m(n.monthNav,["keyup","increment"],g),m(n.daysContainer,"click",It)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var R=function(K){return Yt(K).select()};m(n.timeContainer,["increment"],s),m(n.timeContainer,"blur",s,{capture:!0}),m(n.timeContainer,"click",y),m([n.hourElement,n.minuteElement],["focus","click"],R),n.secondElement!==void 0&&m(n.secondElement,"focus",function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&m(n.amPM,"click",function(K){s(K)})}n.config.allowInput&&m(n._input,"blur",ne)}function w(_,R){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)}R&&n.currentYear!==Q&&(ze("onYearChange"),U()),R&&(n.currentYear!==Q||n.currentMonth!==re)&&ze("onMonthChange"),n.redraw()}function y(_){var R=Yt(_);~R.className.indexOf("arrow")&&C(_,R.classList.contains("arrowUp")?1:-1)}function C(_,R,K){var Q=_&&Yt(_),re=K||Q&&Q.parentNode&&Q.parentNode.firstChild,ce=pi("increment");ce.delta=R,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(B()),n.innerContainer=Re("div","flatpickr-innerContainer"),n.config.weekNumbers){var R=ee(),K=R.weekWrapper,Q=R.weekNumbers;n.innerContainer.appendChild(K),n.weekNumbers=Q,n.weekWrapper=K}n.rContainer=Re("div","flatpickr-rContainer"),n.rContainer.appendChild(V()),n.daysContainer||(n.daysContainer=Re("div","flatpickr-days"),n.daysContainer.tabIndex=-1),T(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),_.appendChild(n.innerContainer)}n.config.enableTime&&_.appendChild(L()),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 A(_,R,K,Q){var re=J(R,!0),ce=Re("span",_,R.getDate().toString());return ce.dateObj=R,ce.$i=Q,ce.setAttribute("aria-label",n.formatDate(R,n.config.ariaDateFormat)),_.indexOf("hidden")===-1&&Kt(R,n.now)===0&&(n.todayDateElem=ce,ce.classList.add("today"),ce.setAttribute("aria-current","date")),re?(ce.tabIndex=-1,Io(R)&&(ce.classList.add("selected"),n.selectedDateElem=ce,n.config.mode==="range"&&(Ot(ce,"startRange",n.selectedDates[0]&&Kt(R,n.selectedDates[0],!0)===0),Ot(ce,"endRange",n.selectedDates[1]&&Kt(R,n.selectedDates[1],!0)===0),_==="nextMonthDay"&&ce.classList.add("inRange")))):ce.classList.add("flatpickr-disabled"),n.config.mode==="range"&&Ts(R)&&!Io(R)&&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(R)+"</span>"),ze("onDayCreate",ce),ce}function E(_){_.focus(),n.config.mode==="range"&&Se(_)}function D(_){for(var R=_>0?0:n.config.showMonths-1,K=_>0?n.config.showMonths:-1,Q=R;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 F(_,R){for(var K=_.className.indexOf("Month")===-1?_.dateObj.getMonth():n.currentMonth,Q=R>0?n.config.showMonths:-1,re=R>0?1:-1,ce=K-n.currentMonth;ce!=Q;ce+=re)for(var xe=n.daysContainer.children[ce],ue=K-n.currentMonth===ce?_.$i+R:R<0?xe.children.length-1:0,we=xe.children.length,fe=ue;fe>=0&&fe<we&&fe!=(R>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(R))return E(me)}n.changeMonth(re),Y(D(re),0)}function Y(_,R){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:D(R>0?1:-1);re===void 0?n._input.focus():Q?F(re,R):E(re)}function W(_,R){for(var K=(new Date(_,R,1).getDay()-n.l10n.firstDayOfWeek+7)%7,Q=n.utils.getDaysInMonth((R-1+12)%12,_),re=n.utils.getDaysInMonth(R,_),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(A("flatpickr-day "+ue,new Date(_,R-1,fe),fe,me));for(fe=1;fe<=re;fe++,me++)ce.appendChild(A("flatpickr-day",new Date(_,R,fe),fe,me));for(var Pe=re+1;Pe<=42-K&&(n.config.showMonths===1||me%7!==0);Pe++,me++)ce.appendChild(A("flatpickr-day "+we,new Date(_,R+1,Pe%re),Pe,me));var Dt=Re("div","dayContainer");return Dt.appendChild(ce),Dt}function T(){if(n.daysContainer!==void 0){Ja(n.daysContainer),n.weekNumbers&&Ja(n.weekNumbers);for(var _=document.createDocumentFragment(),R=0;R<n.config.showMonths;R++){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+R),_.appendChild(W(K.getFullYear(),K.getMonth()))}n.daysContainer.appendChild(_),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&Se()}}function U(){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 R=0;R<12;R++)if(_(R)){var K=Re("option","flatpickr-monthDropdown-month");K.value=new Date(n.currentYear,R).getMonth().toString(),K.textContent=Za(R,n.config.shorthandCurrentMonth,n.l10n),K.tabIndex=-1,n.currentMonth===R&&(K.selected=!0),n.monthsDropdownContainer.appendChild(K)}}}function G(){var _=Re("div","flatpickr-month"),R=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),m(n.monthsDropdownContainer,"change",function(xe){var ue=Yt(xe),we=parseInt(ue.value,10);n.changeMonth(we-n.currentMonth),ze("onMonthChange")}),U(),K=n.monthsDropdownContainer);var Q=Xa("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),R.appendChild(ce),_.appendChild(R),{container:_,yearElement:re,monthElement:K}}function $(){Ja(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var _=n.config.showMonths;_--;){var R=G();n.yearElements.push(R.yearElement),n.monthElements.push(R.monthElement),n.monthNav.appendChild(R.container)}n.monthNav.appendChild(n.nextMonthNav)}function B(){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,$(),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 L(){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 R=Re("span","flatpickr-time-separator",":"),K=Xa("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=K.getElementsByTagName("input")[0];var Q=Xa("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(R),n.timeContainer.appendChild(Q),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var re=Xa("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 V(){n.weekdayContainer?Ja(n.weekdayContainer):n.weekdayContainer=Re("div","flatpickr-weekdays");for(var _=n.config.showMonths;_--;){var R=Re("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(R)}return q(),n.weekdayContainer}function q(){if(n.weekdayContainer){var _=n.l10n.firstDayOfWeek,R=ag(n.l10n.weekdays.shorthand);_>0&&_<R.length&&(R=ag(R.splice(_,R.length),R.splice(0,_)));for(var K=n.config.showMonths;K--;)n.weekdayContainer.children[K].innerHTML=`
|
|
2454
2454
|
<span class='flatpickr-weekday'>
|
|
2455
2455
|
`+R.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 R=Re("div","flatpickr-weeks");return _.appendChild(R),{weekWrapper:_,weekNumbers:R}}function O(_,R){R===void 0&&(R=!0);var K=R?_:_-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"),U()),T(),ze("onMonthChange"),gi())}function M(_,R){if(_===void 0&&(_=!0),R===void 0&&(R=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,R===!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 N(){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 j(){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 R=n.calendarContainer.parentNode;if(R.lastChild&&R.removeChild(R.lastChild),R.parentNode){for(;R.firstChild;)R.parentNode.insertBefore(R.firstChild,R);R.parentNode.removeChild(R)}}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 ae(_){if(n.isOpen&&!n.config.inline){var R=Yt(_),K=te(R),Q=R===n.input||R===n.altInput||n.element.contains(R)||_.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(R)});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 oe(_){if(!(!_||n.config.minDate&&_<n.config.minDate.getFullYear()||n.config.maxDate&&_>n.config.maxDate.getFullYear())){var R=_,K=n.currentYear!==R;n.currentYear=R||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"),U())}}function J(_,R){var K;R===void 0&&(R=!0);var Q=n.parseDate(_,void 0,R);if(n.config.minDate&&Q&&Kt(Q,n.config.minDate,R!==void 0?R:!n.minDateHasTime)<0||n.config.maxDate&&Q&&Kt(Q,n.config.maxDate,R!==void 0?R:!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 se(_){return n.daysContainer!==void 0?_.className.indexOf("hidden")===-1&&_.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(_):!1}function ne(_){var R=_.target===n._input,K=n._input.value.trimEnd()!==So();R&&K&&!(_.relatedTarget&&te(_.relatedTarget))&&n.setDate(n._input.value,!0,_.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function ge(_){var R=Yt(_),K=n.config.wrap?e.contains(R):R===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,R===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),R.blur();n.open()}else if(te(R)||re||ce){var xe=!!n.timeContainer&&n.timeContainer.contains(R);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&&se(ue))){var we=_.keyCode===39?1:-1;_.ctrlKey?(_.stopPropagation(),O(we),Y(k(1),0)):Y(void 0,we)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:_.preventDefault();var fe=_.keyCode===40?1:-1;n.daysContainer&&R.$i!==void 0||R===n.input||R===n.altInput?_.ctrlKey?(_.stopPropagation(),oe(n.currentYear-fe),Y(k(1),0)):xe||Y(void 0,fe*7):R===n.currentYearElement?oe(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}),Pe=me.indexOf(R);if(Pe!==-1){var Dt=me[Pe+(_.shiftKey?-1:1)];_.preventDefault(),(Dt||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(R)&&_.shiftKey&&(_.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&R===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(R))&&ze("onKeyDown",_)}function Se(_,R){if(R===void 0&&(R="flatpickr-day"),!(n.selectedDates.length!==1||_&&(!_.classList.contains(R)||_.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+=gD.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+") > ."+R));me.forEach(function(Pe){var Dt=Pe.dateObj,nt=Dt.getTime(),dn=ue>0&&nt<ue||we>0&&nt>we;if(dn){Pe.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(In){Pe.classList.remove(In)});return}else if(xe&&!dn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(In){Pe.classList.remove(In)}),_!==void 0&&(_.classList.add(K<=n.selectedDates[0].getTime()?"startRange":"endRange"),Q<K&&nt===Q?Pe.classList.add("startRange"):Q>K&&nt===Q&&Pe.classList.add("endRange"),nt>=ue&&(we===0||nt<=we)&&hD(nt,Q,K)&&Pe.classList.add("inRange"))})}}function Ue(){n.isOpen&&!n.config.static&&!n.config.inline&&Ce()}function wt(_,R){if(R===void 0&&(R=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(R)),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(R){var K=n.config["_"+_+"Date"]=n.parseDate(R,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&&(De(),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"],R=Et(Et({},JSON.parse(JSON.stringify(e.dataset||{}))),t),K={};n.config.parseDate=R.parseDate,n.config.formatDate=R.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=R.mode==="time";if(!R.dateFormat&&(R.enableTime||Q)){var re=ut.defaultConfig.dateFormat||ei.dateFormat;K.dateFormat=R.noCalendar||Q?"H:i"+(R.enableSeconds?":S":""):re+" H:i"+(R.enableSeconds?":S":"")}if(R.altInput&&(R.enableTime||Q)&&!R.altFormat){var ce=ut.defaultConfig.altFormat||ei.altFormat;K.altFormat=R.noCalendar||Q?"h:i"+(R.enableSeconds?":S K":" K"):ce+(" h:i"+(R.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(Pe){n.config[me==="min"?"_minTime":"_maxTime"]=n.parseDate(Pe,"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")}),R.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,K,R);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 R[fe]=="undefined"&&(n.config[fe]=we[fe])}R.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 ut.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Et(Et({},ut.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?ut.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&&ut.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=og(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 R=_||n._positionElement,K=Array.prototype.reduce.call(n.calendarContainer.children,function(hF,pF){return hF+pF.offsetHeight},0),Q=n.calendarContainer.offsetWidth,re=n.config.position.split(" "),ce=re[0],xe=re.length>1?re[1]:null,ue=R.getBoundingClientRect(),we=window.innerHeight-ue.bottom,fe=ce==="above"||ce!=="below"&&we<K&&ue.top>K,me=window.pageYOffset+ue.top+(fe?-K-2:R.offsetHeight+2);if(Ot(n.calendarContainer,"arrowTop",!fe),Ot(n.calendarContainer,"arrowBottom",fe),!n.config.inline){var Pe=window.pageXOffset+ue.left,Dt=!1,nt=!1;xe==="center"?(Pe-=(Q-ue.width)/2,Dt=!0):xe==="right"&&(Pe-=Q-ue.width,nt=!0),Ot(n.calendarContainer,"arrowLeft",!Dt&&!nt),Ot(n.calendarContainer,"arrowCenter",Dt),Ot(n.calendarContainer,"arrowRight",nt);var dn=window.document.body.offsetWidth-(window.pageXOffset+ue.right),In=Pe+Q>window.document.body.offsetWidth,aF=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=Pe+"px",n.calendarContainer.style.right="auto";else if(!aF)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=dn+"px";else{var Du=Te();if(Du===void 0)return;var sF=window.document.body.offsetWidth,lF=Math.max(0,sF/2-Q/2),cF=".flatpickr-calendar.centerMost:before",uF=".flatpickr-calendar.centerMost:after",dF=Du.cssRules.length,fF="{left:"+ue.left+"px;right:auto;}";Ot(n.calendarContainer,"rightMost",!1),Ot(n.calendarContainer,"centerMost",!0),Du.insertRule(cF+","+uF+fF,dF),n.calendarContainer.style.left=lF+"px",n.calendarContainer.style.right="auto"}}}}function Te(){for(var _=null,R=0;R<document.styleSheets.length;R++){var K=document.styleSheets[R];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 De(){n.config.noCalendar||n.isMobile||(U(),gi(),T())}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 R=function(me){return me.classList&&me.classList.contains("flatpickr-day")&&!me.classList.contains("flatpickr-disabled")&&!me.classList.contains("notAllowed")},K=ig(Yt(_),R);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,Pe){return me.getTime()-Pe.getTime()}));if(f(),ce){var ue=n.currentYear!==re.getFullYear();n.currentYear=re.getFullYear(),n.currentMonth=re.getMonth(),ue&&(ze("onYearChange"),U()),ze("onMonthChange")}if(gi(),T(),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:[$,l,V],minDate:[w],maxDate:[w],positionElement:[wo],clickOpens:[function(){n.config.clickOpens===!0?(m(n._input,"focus",n.open),m(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function jt(_,R){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[_]=R,St[_]!==void 0?St[_].forEach(function(Q){return Q()}):Bc.indexOf(_)>-1&&(n.config[_]=$c(R));n.redraw(),un(!0)}function Mt(_,R){var K=[];if(_ instanceof Array)K=_.map(function(Q){return n.parseDate(Q,R)});else if(_ instanceof Date||typeof _=="number")K=[n.parseDate(_,R)];else if(typeof _=="string")switch(n.config.mode){case"single":case"time":K=[n.parseDate(_,R)];break;case"multiple":K=_.split(n.config.conjunction).map(function(Q){return n.parseDate(Q,R)});break;case"range":K=_.split(n.l10n.rangeSeparator).map(function(Q){return n.parseDate(Q,R)});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(_,R,K){if(R===void 0&&(R=!1),K===void 0&&(K=n.config.dateFormat),_!==0&&!_||_ instanceof Array&&_.length===0)return n.clear(R);Mt(_,K),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),w(void 0,R),h(),n.selectedDates.length===0&&n.clear(!1),un(R),R&&ze("onChange")}function or(_){return _.slice().map(function(R){return typeof R=="string"||typeof R=="number"||R instanceof Date?n.parseDate(R,void 0,!0):R&&typeof R=="object"&&R.from&&R.to?{from:n.parseDate(R.from,void 0),to:n.parseDate(R.to,void 0)}:R}).filter(function(R){return R})}function As(){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(R){}m(n.mobileInput,"change",function(R){n.setDate(Yt(R).value,!1,n.mobileFormatStr),ze("onChange"),ze("onClose")})}function ku(_){if(n.isOpen===!0)return n.close();n.open(_)}function ze(_,R){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,R);_==="onChange"&&(n.input.dispatchEvent(pi("change")),n.input.dispatchEvent(pi("input")))}}function pi(_){var R=document.createEvent("Event");return R.initEvent(_,!0,!0),R}function Io(_){for(var R=0;R<n.selectedDates.length;R++){var K=n.selectedDates[R];if(K instanceof Date&&Kt(K,_)===0)return""+R}return!1}function Ts(_){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(_,R){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+R),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[R].textContent=Za(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 R=_||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(K){return n.formatDate(K,R)}).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 Es(_){var R=Yt(_),K=n.prevMonthNav.contains(R),Q=n.nextMonthNav.contains(R);K||Q?O(K?-1:1):n.yearElements.indexOf(R)>=0?R.select():R.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):R.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function xt(_){_.preventDefault();var R=_.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||(R?_.which===38?1:-1:0),fe=ue+xe*we;if(typeof Q.value!="undefined"&&Q.value.length===2){var me=Q===n.hourElement,Pe=Q===n.minuteElement;fe<re?(fe=ce+fe+rn(!me)+(rn(me)&&rn(!n.amPM)),Pe&&C(void 0,-1,n.hourElement)):fe>ce&&(fe=Q===n.hourElement?fe-ce-rn(!n.amPM):re,Pe&&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=vD(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 ut=function(e,t){return typeof e=="string"?ti(window.document.querySelectorAll(e),t):e instanceof Node?ti([e],t):ti(e,t)};ut.defaultConfig={},ut.l10ns={en:Et({},no),default:Et({},no)},ut.localize=function(e){ut.l10ns.default=Et(Et({},ut.l10ns.default),e)},ut.setDefaults=function(e){ut.defaultConfig=Et(Et({},ut.defaultConfig),e)},ut.parseDate=Fc({}),ut.formatDate=og({}),ut.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=ut);const bD=Ou(Object.freeze(Object.defineProperty({__proto__:null,default:ut},Symbol.toStringTag,{value:"Module"})));(function(e){function t(O){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(N){return typeof N}:t=function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},t(O)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(x),r=o(vI),i=o(bD);function o(O){return O&&O.__esModule?O:{default:O}}function a(){if(typeof WeakMap!="function")return null;var O=new WeakMap;return a=function(){return O},O}function l(O){if(O&&O.__esModule)return O;if(O===null||t(O)!=="object"&&typeof O!="function")return{default:O};var M=a();if(M&&M.has(O))return M.get(O);var N={},j=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var te in O)if(Object.prototype.hasOwnProperty.call(O,te)){var ae=j?Object.getOwnPropertyDescriptor(O,te):null;ae&&(ae.get||ae.set)?Object.defineProperty(N,te,ae):N[te]=O[te]}return N.default=O,M&&M.set(O,N),N}function s(O){return h(O)||f(O)||d(O)||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(O,M){if(O){if(typeof O=="string")return p(O,M);var N=Object.prototype.toString.call(O).slice(8,-1);if(N==="Object"&&O.constructor&&(N=O.constructor.name),N==="Map"||N==="Set")return Array.from(O);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return p(O,M)}}function f(O){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(O))return Array.from(O)}function h(O){if(Array.isArray(O))return p(O)}function p(O,M){(M==null||M>O.length)&&(M=O.length);for(var N=0,j=new Array(M);N<M;N++)j[N]=O[N];return j}function g(){return g=Object.assign||function(O){for(var M=1;M<arguments.length;M++){var N=arguments[M];for(var j in N)Object.prototype.hasOwnProperty.call(N,j)&&(O[j]=N[j])}return O},g.apply(this,arguments)}function m(O,M){if(O==null)return{};var N=v(O,M),j,te;if(Object.getOwnPropertySymbols){var ae=Object.getOwnPropertySymbols(O);for(te=0;te<ae.length;te++)j=ae[te],!(M.indexOf(j)>=0)&&Object.prototype.propertyIsEnumerable.call(O,j)&&(N[j]=O[j])}return N}function v(O,M){if(O==null)return{};var N={},j=Object.keys(O),te,ae;for(ae=0;ae<j.length;ae++)te=j[ae],!(M.indexOf(te)>=0)&&(N[te]=O[te]);return N}function I(O,M){var N=Object.keys(O);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(O);M&&(j=j.filter(function(te){return Object.getOwnPropertyDescriptor(O,te).enumerable})),N.push.apply(N,j)}return N}function w(O){for(var M=1;M<arguments.length;M++){var N=arguments[M]!=null?arguments[M]:{};M%2?I(Object(N),!0).forEach(function(j){U(O,j,N[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(N)):I(Object(N)).forEach(function(j){Object.defineProperty(O,j,Object.getOwnPropertyDescriptor(N,j))})}return O}function y(O,M){if(!(O instanceof M))throw new TypeError("Cannot call a class as a function")}function C(O,M){for(var N=0;N<M.length;N++){var j=M[N];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(O,j.key,j)}}function b(O,M,N){return M&&C(O.prototype,M),O}function A(O,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(M&&M.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),M&&E(O,M)}function E(O,M){return E=Object.setPrototypeOf||function(j,te){return j.__proto__=te,j},E(O,M)}function k(O){var M=W();return function(){var j=T(O),te;if(M){var ae=T(this).constructor;te=Reflect.construct(j,arguments,ae)}else te=j.apply(this,arguments);return F(this,te)}}function F(O,M){return M&&(t(M)==="object"||typeof M=="function")?M:Y(O)}function Y(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function W(){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(O){return!1}}function T(O){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(N){return N.__proto__||Object.getPrototypeOf(N)},T(O)}function U(O,M,N){return M in O?Object.defineProperty(O,M,{value:N,enumerable:!0,configurable:!0,writable:!0}):O[M]=N,O}var G=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],$=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),B=["onCreate","onDestroy"],L=r.default.func,V=function(O){A(N,O);var M=k(N);function N(){var j;y(this,N);for(var te=arguments.length,ae=new Array(te),oe=0;oe<te;oe++)ae[oe]=arguments[oe];return j=M.call.apply(M,[this].concat(ae)),U(Y(j),"createFlatpickrInstance",function(){var J=w({onClose:function(){j.node.blur&&j.node.blur()}},j.props.options);J=q(J,j.props),j.flatpickr=(0,i.default)(j.node,J),j.props.hasOwnProperty("value")&&j.flatpickr.setDate(j.props.value,!1);var se=j.props.onCreate;se&&se(j.flatpickr)}),U(Y(j),"destroyFlatpickrInstance",function(){var J=j.props.onDestroy;J&&J(j.flatpickr),j.flatpickr.destroy(),j.flatpickr=null}),U(Y(j),"handleNodeChange",function(J){j.node=J,j.flatpickr&&(j.destroyFlatpickrInstance(),j.createFlatpickrInstance())}),j}return b(N,[{key:"componentDidUpdate",value:function(te){var ae=this.props.options,oe=te.options;ae=q(ae,this.props),oe=q(oe,te);for(var J=Object.getOwnPropertyNames(ae),se=J.length-1;se>=0;se--){var ne=J[se],ge=ae[ne];ge!==oe[ne]&&(G.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,ae=te.options,oe=te.defaultValue,J=te.value,se=te.children,ne=te.render,ge=m(te,["options","defaultValue","value","children","render"]);return G.forEach(function(Se){delete ge[Se]}),B.forEach(function(Se){delete ge[Se]}),ne?ne(w(w({},ge),{},{defaultValue:oe,value:J}),this.handleNodeChange):ae.wrap?n.default.createElement("div",g({},ge,{ref:this.handleNodeChange}),se):n.default.createElement("input",g({},ge,{defaultValue:oe,ref:this.handleNodeChange}))}}]),N}(n.Component);U(V,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:$,onOpen:$,onClose:$,onMonthChange:$,onYearChange:$,onReady:$,onValueUpdate:$,onDayCreate:$,onCreate:L,onDestroy:L,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}),U(V,"defaultProps",{options:{}});function q(O,M){var N=w({},O);return G.forEach(function(j){if(M.hasOwnProperty(j)){var te;N[j]&&!Array.isArray(N[j])?N[j]=[N[j]]:N[j]||(N[j]=[]);var ae=Array.isArray(M[j])?M[j]:[M[j]];(te=N[j]).push.apply(te,s(ae))}}),N}var ee=V;e.default=ee})(ng);const sg=fn(ng);var lg={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",g="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,I=/\[([^\]]+)]|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(G){var $=["th","st","nd","rd"],B=G%100;return"["+G+($[(B-20)%10]||$[B]||$[0])+"]"}},y=function(G,$,B){var L=String(G);return!L||L.length>=$?G:""+Array($+1-L.length).join(B)+G},C={s:y,z:function(G){var $=-G.utcOffset(),B=Math.abs($),L=Math.floor(B/60),V=B%60;return($<=0?"+":"-")+y(L,2,"0")+":"+y(V,2,"0")},m:function G($,B){if($.date()<B.date())return-G(B,$);var L=12*(B.year()-$.year())+(B.month()-$.month()),V=$.clone().add(L,f),q=B-V<0,ee=$.clone().add(L+(q?-1:1),f);return+(-(L+(B-V)/(q?V-ee:ee-V))||0)},a:function(G){return G<0?Math.ceil(G)||0:Math.floor(G)},p:function(G){return{M:f,y:p,w:d,d:c,D:g,h:s,m:l,s:a,ms:o,Q:h}[G]||String(G||"").toLowerCase().replace(/s$/,"")},u:function(G){return G===void 0}},b="en",A={};A[b]=w;var E="$isDayjsObject",k=function(G){return G instanceof T||!(!G||!G[E])},F=function G($,B,L){var V;if(!$)return b;if(typeof $=="string"){var q=$.toLowerCase();A[q]&&(V=q),B&&(A[q]=B,V=q);var ee=$.split("-");if(!V&&ee.length>1)return G(ee[0])}else{var O=$.name;A[O]=$,V=O}return!L&&V&&(b=V),V||!L&&b},Y=function(G,$){if(k(G))return G.clone();var B=typeof $=="object"?$:{};return B.date=G,B.args=arguments,new T(B)},W=C;W.l=F,W.i=k,W.w=function(G,$){return Y(G,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var T=function(){function G(B){this.$L=F(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[E]=!0}var $=G.prototype;return $.parse=function(B){this.$d=function(L){var V=L.date,q=L.utc;if(V===null)return new Date(NaN);if(W.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var ee=V.match(v);if(ee){var O=ee[2]-1||0,M=(ee[7]||"0").substring(0,3);return q?new Date(Date.UTC(ee[1],O,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,M)):new Date(ee[1],O,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,M)}}return new Date(V)}(B),this.init()},$.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},$.$utils=function(){return W},$.isValid=function(){return this.$d.toString()!==m},$.isSame=function(B,L){var V=Y(B);return this.startOf(L)<=V&&V<=this.endOf(L)},$.isAfter=function(B,L){return Y(B)<this.startOf(L)},$.isBefore=function(B,L){return this.endOf(L)<Y(B)},$.$g=function(B,L,V){return W.u(B)?this[L]:this.set(V,B)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(B,L){var V=this,q=!!W.u(L)||L,ee=W.p(B),O=function(se,ne){var ge=W.w(V.$u?Date.UTC(V.$y,ne,se):new Date(V.$y,ne,se),V);return q?ge:ge.endOf(c)},M=function(se,ne){return W.w(V.toDate()[se].apply(V.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(ne)),V)},N=this.$W,j=this.$M,te=this.$D,ae="set"+(this.$u?"UTC":"");switch(ee){case p:return q?O(1,0):O(31,11);case f:return q?O(1,j):O(0,j+1);case d:var oe=this.$locale().weekStart||0,J=(N<oe?N+7:N)-oe;return O(q?te-J:te+(6-J),j);case c:case g:return M(ae+"Hours",0);case s:return M(ae+"Minutes",1);case l:return M(ae+"Seconds",2);case a:return M(ae+"Milliseconds",3);default:return this.clone()}},$.endOf=function(B){return this.startOf(B,!1)},$.$set=function(B,L){var V,q=W.p(B),ee="set"+(this.$u?"UTC":""),O=(V={},V[c]=ee+"Date",V[g]=ee+"Date",V[f]=ee+"Month",V[p]=ee+"FullYear",V[s]=ee+"Hours",V[l]=ee+"Minutes",V[a]=ee+"Seconds",V[o]=ee+"Milliseconds",V)[q],M=q===c?this.$D+(L-this.$W):L;if(q===f||q===p){var N=this.clone().set(g,1);N.$d[O](M),N.init(),this.$d=N.set(g,Math.min(this.$D,N.daysInMonth())).$d}else O&&this.$d[O](M);return this.init(),this},$.set=function(B,L){return this.clone().$set(B,L)},$.get=function(B){return this[W.p(B)]()},$.add=function(B,L){var V,q=this;B=Number(B);var ee=W.p(L),O=function(j){var te=Y(q);return W.w(te.date(te.date()+Math.round(j*B)),q)};if(ee===f)return this.set(f,this.$M+B);if(ee===p)return this.set(p,this.$y+B);if(ee===c)return O(1);if(ee===d)return O(7);var M=(V={},V[l]=r,V[s]=i,V[a]=n,V)[ee]||1,N=this.$d.getTime()+B*M;return W.w(N,this)},$.subtract=function(B,L){return this.add(-1*B,L)},$.format=function(B){var L=this,V=this.$locale();if(!this.isValid())return V.invalidDate||m;var q=B||"YYYY-MM-DDTHH:mm:ssZ",ee=W.z(this),O=this.$H,M=this.$m,N=this.$M,j=V.weekdays,te=V.months,ae=V.meridiem,oe=function(ne,ge,Se,Ue){return ne&&(ne[ge]||ne(L,q))||Se[ge].slice(0,Ue)},J=function(ne){return W.s(O%12||12,ne,"0")},se=ae||function(ne,ge,Se){var Ue=ne<12?"AM":"PM";return Se?Ue.toLowerCase():Ue};return q.replace(I,function(ne,ge){return ge||function(Se){switch(Se){case"YY":return String(L.$y).slice(-2);case"YYYY":return W.s(L.$y,4,"0");case"M":return N+1;case"MM":return W.s(N+1,2,"0");case"MMM":return oe(V.monthsShort,N,te,3);case"MMMM":return oe(te,N);case"D":return L.$D;case"DD":return W.s(L.$D,2,"0");case"d":return String(L.$W);case"dd":return oe(V.weekdaysMin,L.$W,j,2);case"ddd":return oe(V.weekdaysShort,L.$W,j,3);case"dddd":return j[L.$W];case"H":return String(O);case"HH":return W.s(O,2,"0");case"h":return J(1);case"hh":return J(2);case"a":return se(O,M,!0);case"A":return se(O,M,!1);case"m":return String(M);case"mm":return W.s(M,2,"0");case"s":return String(L.$s);case"ss":return W.s(L.$s,2,"0");case"SSS":return W.s(L.$ms,3,"0");case"Z":return ee}return null}(ne)||ee.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(B,L,V){var q,ee=this,O=W.p(L),M=Y(B),N=(M.utcOffset()-this.utcOffset())*r,j=this-M,te=function(){return W.m(ee,M)};switch(O){case p:q=te()/12;break;case f:q=te();break;case h:q=te()/3;break;case d:q=(j-N)/6048e5;break;case c:q=(j-N)/864e5;break;case s:q=j/i;break;case l:q=j/r;break;case a:q=j/n;break;default:q=j}return V?q:W.a(q)},$.daysInMonth=function(){return this.endOf(f).$D},$.$locale=function(){return A[this.$L]},$.locale=function(B,L){if(!B)return this.$L;var V=this.clone(),q=F(B,L,!0);return q&&(V.$L=q),V},$.clone=function(){return W.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},G}(),U=T.prototype;return Y.prototype=U,[["$ms",o],["$s",a],["$m",l],["$H",s],["$W",c],["$M",f],["$y",p],["$D",g]].forEach(function(G){U[G[1]]=function($){return this.$g($,G[0],G[1])}}),Y.extend=function(G,$){return G.$i||(G($,T,Y),G.$i=!0),Y},Y.locale=F,Y.isDayjs=k,Y.unix=function(G){return Y(1e3*G)},Y.en=A[b],Y.Ls=A,Y.p={},Y})})(lg);var yD=lg.exports;const _t=fn(yD);var cg={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,g){g===void 0&&(g={});var m=new Date(h),v=function(I,w){w===void 0&&(w={});var y=w.timeZoneName||"short",C=I+"|"+y,b=r[C];return b||(b=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:I,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:y}),r[C]=b),b}(p,g);return v.formatToParts(m)},c=function(h,p){for(var g=s(h,p),m=[],v=0;v<g.length;v+=1){var I=g[v],w=I.type,y=I.value,C=n[w];C>=0&&(m[C]=parseInt(y,10))}var b=m[3],A=b===24?0:b,E=m[0]+"-"+m[1]+"-"+m[2]+" "+A+":"+m[4]+":"+m[5]+":000",k=+h;return(a.utc(E).valueOf()-(k-=k%1e3))/6e4},d=o.prototype;d.tz=function(h,p){h===void 0&&(h=l);var g,m=this.utcOffset(),v=this.toDate(),I=v.toLocaleString("en-US",{timeZone:h}),w=Math.round((v-new Date(I))/1e3/60),y=15*-Math.round(v.getTimezoneOffset()/15)-w;if(!Number(y))g=this.utcOffset(0,p);else if(g=a(I,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(y,!0),p){var C=g.utcOffset();g=g.add(m-C,"minute")}return g.$x.$timezone=h,g},d.offsetName=function(h){var p=this.$x.$timezone||a.tz.guess(),g=s(this.valueOf(),p,{timeZoneName:h}).find(function(m){return m.type.toLowerCase()==="timezonename"});return g&&g.value};var f=d.startOf;d.startOf=function(h,p){if(!this.$x||!this.$x.$timezone)return f.call(this,h,p);var g=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(g,h,p).tz(this.$x.$timezone,!0)},a.tz=function(h,p,g){var m=g&&p,v=g||p||l,I=c(+a(),v);if(typeof h!="string")return a(h).tz(v);var w=function(A,E,k){var F=A-60*E*1e3,Y=c(F,k);if(E===Y)return[F,E];var W=c(F-=60*(Y-E)*1e3,k);return Y===W?[F,Y]:[A-60*Math.min(Y,W)*1e3,Math.max(Y,W)]}(a.utc(h,m).valueOf(),I,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}}})})(cg);var CD=cg.exports;const xD=fn(CD);var ug={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(m){var v={date:m,utc:!0,args:arguments};return new a(v)},s.utc=function(m){var v=l(this.toDate(),{locale:this.$L,utc:!0});return m?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(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),c.call(this,m)};var d=s.init;s.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else d.call(this)};var f=s.utcOffset;s.utcOffset=function(m,v){var I=this.$utils().u;if(I(m))return this.$u?0:I(this.$offset)?f.call(this):this.$offset;if(typeof m=="string"&&(m=function(b){b===void 0&&(b="");var A=b.match(r);if(!A)return null;var E=(""+A[0]).match(i)||["-",0,0],k=E[0],F=60*+E[1]+ +E[2];return F===0?0:k==="+"?F:-F}(m),m===null))return this;var w=Math.abs(m)<=16?60*m:m,y=this;if(v)return y.$offset=w,y.$u=m===0,y;if(m!==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(m){var v=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},s.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},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(m){return m==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var g=s.diff;s.diff=function(m,v,I){if(m&&this.$u===m.$u)return g.call(this,m,v,I);var w=this.local(),y=l(m).local();return g.call(w,y,v,I)}}})})(ug);var wD=ug.exports;const ID=fn(wD);_t.extend(xD),_t.extend(ID);const SD=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,onChange:r})=>{const i=o=>{if(o&&o.length){const a=_t.utc(o[0]).toISOString();r(a)}else r("")};return u.jsx(S.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(sg,{value:e&&_t(e).format("YYYY-MM-DD HH:mm")||void 0,onChange:i,className:"flatpickr-input",options:{enableTime:!0,dateFormat:"DD.MM.YYYY HH:mm",position:"below",minDate:t||SD(e),maxDate:n,parseDate:(o,a)=>_t(o,a).toDate(),formatDate:(o,a)=>_t(o).format(a),time_24hr:!0,minuteIncrement:1}})})},AD=({required:e,defaultValue:t,onChangeFromDate:n,onChangeToDate:r})=>{const[i,o]=t;return u.jsxs(S.Box,{sx:{marginBottom:"16px"},children:[u.jsx(S.FormControl,{children:u.jsx(S.FormLabel,{required:e,color:"primary",children:"Duration"})}),u.jsxs(S.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})]})]})},dg=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},TD=({label:e,defaultValue:t,required:n,onChange:r})=>{const[i,o]=x.useState(dg(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(S.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(S.FormLabel,{required:n,color:"primary",children:e}),u.jsx(S.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(sg,{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:dg(t)||void 0}})}),u.jsx(pt,{showToast:a,message:"Succesfully cleared the duration time",color:"primary",hideToast:s})]})},ED=({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(S.Box,{"data-testid":"no permission card",sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",bgcolor:"background.body"},children:u.jsx(S.Card,{variant:"outlined",sx:{maxWidth:300,overflow:"hidden",borderRadius:"md"},children:u.jsxs(S.CardContent,{children:[u.jsx(S.Typography,{level:"h2",textAlign:"center",mb:2,children:r}),u.jsx(S.Typography,{level:"body-md",color:"neutral",mb:2,children:i}),u.jsx(S.Box,{display:"flex",justifyContent:"center",children:u.jsx(S.Button,{variant:"solid",color:"neutral",fullWidth:!0,size:"sm",onClick:a,children:o})})]})})})},fg=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],Uc=e=>e.reduce((t,n)=>(t[n.key]=n.value,t),{}),_D=({labels:e,type:t,defaultValue:n,onChange:r})=>{const[i,o]=x.useState(fg(n)),[a,l]=x.useState(null),[s,c]=x.useState(""),[d,f]=x.useState(""),[h,p]=x.useState(""),[g,m]=x.useState("");x.useEffect(()=>o(fg(n)),[n]);const v=()=>{const C=[...i];C.push({key:s,value:h}),o(C),c(""),p(""),r(Uc(C))},I=C=>{const b=i.filter((A,E)=>E!==C);o(b),r(Uc(b))},w=(C,b)=>{f(b.key),m(b.value),l(C)},y=C=>{const b=[...i];b[C]={key:d,value:g},o(b),l(null),f(""),m(""),r(Uc(b))};return u.jsxs(S.Box,{children:[i.map((C,b)=>u.jsx(S.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(S.CardContent,{style:{flex:1},children:a===b?u.jsxs(S.Box,{display:"flex",alignItems:"center",children:[u.jsx(S.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:d,onChange:A=>f(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(S.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:g,onChange:A=>m(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(S.Tooltip,{title:e.save,children:d&&g?u.jsx(S.IconButton,{onClick:()=>y(b),children:u.jsx(Le.Check,{})}):u.jsx("span",{children:u.jsx(S.IconButton,{disabled:!0,children:u.jsx(Le.Check,{})})})})]}):u.jsxs(S.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[u.jsxs(S.Box,{children:[u.jsxs(S.Typography,{style:{fontWeight:"bold"},children:[e.keyDynamicFields,": ",u.jsx(S.Typography,{whiteSpace:"wrap",children:C.key})]}),u.jsxs(S.Typography,{style:{color:"gray"},children:[e.valueDynamicFields,": ",u.jsx(S.Typography,{whiteSpace:"wrap",children:C.value})]})]}),u.jsxs(S.Box,{children:[u.jsx(S.Tooltip,{title:e.edit,children:u.jsx(S.IconButton,{onClick:()=>w(b,C),children:u.jsx(Le.Edit,{})})}),u.jsx(S.Tooltip,{title:e.delete,children:u.jsx(S.IconButton,{onClick:()=>I(b),children:u.jsx(Le.Delete,{})})})]})]})})},`dynamic-fields-${t}-${b}`)),u.jsxs(S.Box,{display:"flex",alignItems:"center",style:{marginTop:i&&i.length?"20px":"0px"},children:[u.jsx(S.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(S.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(S.Tooltip,{title:e.add,children:s&&h?u.jsx(S.Button,{onClick:v,children:u.jsx(Le.Add,{})}):u.jsx("span",{children:u.jsx(S.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 hg(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?hg(Object(n),!0).forEach(function(r){io(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pg(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 DD(e,t,n){return t&&pg(e.prototype,t),n&&pg(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 PD(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 es(e){return es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},es(e)}function gg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(gg=function(){return!!e})()}function OD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RD(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 OD(e)}function MD(e){var t=gg();return function(){var n,r=es(e);if(t){var i=es(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return RD(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 LD(e){if(Array.isArray(e))return Wc(e)}function BD(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mg(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 $D(){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 R=Re("div","flatpickr-weeks");return _.appendChild(R),{weekWrapper:_,weekNumbers:R}}function O(_,R){R===void 0&&(R=!0);var K=R?_:_-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"),U()),T(),ze("onMonthChange"),gi())}function M(_,R){if(_===void 0&&(_=!0),R===void 0&&(R=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,R===!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 N(){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 j(){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 R=n.calendarContainer.parentNode;if(R.lastChild&&R.removeChild(R.lastChild),R.parentNode){for(;R.firstChild;)R.parentNode.insertBefore(R.firstChild,R);R.parentNode.removeChild(R)}}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 R=Yt(_),K=te(R),Q=R===n.input||R===n.altInput||n.element.contains(R)||_.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(R)});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 oe(_){if(!(!_||n.config.minDate&&_<n.config.minDate.getFullYear()||n.config.maxDate&&_>n.config.maxDate.getFullYear())){var R=_,K=n.currentYear!==R;n.currentYear=R||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"),U())}}function J(_,R){var K;R===void 0&&(R=!0);var Q=n.parseDate(_,void 0,R);if(n.config.minDate&&Q&&Kt(Q,n.config.minDate,R!==void 0?R:!n.minDateHasTime)<0||n.config.maxDate&&Q&&Kt(Q,n.config.maxDate,R!==void 0?R:!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 R=_.target===n._input,K=n._input.value.trimEnd()!==So();R&&K&&!(_.relatedTarget&&te(_.relatedTarget))&&n.setDate(n._input.value,!0,_.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function ge(_){var R=Yt(_),K=n.config.wrap?e.contains(R):R===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,R===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),R.blur();n.open()}else if(te(R)||re||ce){var xe=!!n.timeContainer&&n.timeContainer.contains(R);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(),O(we),Y(D(1),0)):Y(void 0,we)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:_.preventDefault();var fe=_.keyCode===40?1:-1;n.daysContainer&&R.$i!==void 0||R===n.input||R===n.altInput?_.ctrlKey?(_.stopPropagation(),oe(n.currentYear-fe),Y(D(1),0)):xe||Y(void 0,fe*7):R===n.currentYearElement?oe(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}),Pe=me.indexOf(R);if(Pe!==-1){var Dt=me[Pe+(_.shiftKey?-1:1)];_.preventDefault(),(Dt||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(R)&&_.shiftKey&&(_.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&R===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(R))&&ze("onKeyDown",_)}function Se(_,R){if(R===void 0&&(R="flatpickr-day"),!(n.selectedDates.length!==1||_&&(!_.classList.contains(R)||_.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+=gD.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+") > ."+R));me.forEach(function(Pe){var Dt=Pe.dateObj,nt=Dt.getTime(),dn=ue>0&&nt<ue||we>0&&nt>we;if(dn){Pe.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(In){Pe.classList.remove(In)});return}else if(xe&&!dn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(In){Pe.classList.remove(In)}),_!==void 0&&(_.classList.add(K<=n.selectedDates[0].getTime()?"startRange":"endRange"),Q<K&&nt===Q?Pe.classList.add("startRange"):Q>K&&nt===Q&&Pe.classList.add("endRange"),nt>=ue&&(we===0||nt<=we)&&hD(nt,Q,K)&&Pe.classList.add("inRange"))})}}function Ue(){n.isOpen&&!n.config.static&&!n.config.inline&&Ce()}function wt(_,R){if(R===void 0&&(R=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(R)),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(R){var K=n.config["_"+_+"Date"]=n.parseDate(R,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&&(De(),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"],R=Et(Et({},JSON.parse(JSON.stringify(e.dataset||{}))),t),K={};n.config.parseDate=R.parseDate,n.config.formatDate=R.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=R.mode==="time";if(!R.dateFormat&&(R.enableTime||Q)){var re=ut.defaultConfig.dateFormat||ei.dateFormat;K.dateFormat=R.noCalendar||Q?"H:i"+(R.enableSeconds?":S":""):re+" H:i"+(R.enableSeconds?":S":"")}if(R.altInput&&(R.enableTime||Q)&&!R.altFormat){var ce=ut.defaultConfig.altFormat||ei.altFormat;K.altFormat=R.noCalendar||Q?"h:i"+(R.enableSeconds?":S K":" K"):ce+(" h:i"+(R.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(Pe){n.config[me==="min"?"_minTime":"_maxTime"]=n.parseDate(Pe,"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")}),R.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,K,R);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 R[fe]=="undefined"&&(n.config[fe]=we[fe])}R.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 ut.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Et(Et({},ut.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?ut.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&&ut.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=og(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 R=_||n._positionElement,K=Array.prototype.reduce.call(n.calendarContainer.children,function(hF,pF){return hF+pF.offsetHeight},0),Q=n.calendarContainer.offsetWidth,re=n.config.position.split(" "),ce=re[0],xe=re.length>1?re[1]:null,ue=R.getBoundingClientRect(),we=window.innerHeight-ue.bottom,fe=ce==="above"||ce!=="below"&&we<K&&ue.top>K,me=window.pageYOffset+ue.top+(fe?-K-2:R.offsetHeight+2);if(Ot(n.calendarContainer,"arrowTop",!fe),Ot(n.calendarContainer,"arrowBottom",fe),!n.config.inline){var Pe=window.pageXOffset+ue.left,Dt=!1,nt=!1;xe==="center"?(Pe-=(Q-ue.width)/2,Dt=!0):xe==="right"&&(Pe-=Q-ue.width,nt=!0),Ot(n.calendarContainer,"arrowLeft",!Dt&&!nt),Ot(n.calendarContainer,"arrowCenter",Dt),Ot(n.calendarContainer,"arrowRight",nt);var dn=window.document.body.offsetWidth-(window.pageXOffset+ue.right),In=Pe+Q>window.document.body.offsetWidth,aF=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=Pe+"px",n.calendarContainer.style.right="auto";else if(!aF)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=dn+"px";else{var Du=Te();if(Du===void 0)return;var sF=window.document.body.offsetWidth,lF=Math.max(0,sF/2-Q/2),cF=".flatpickr-calendar.centerMost:before",uF=".flatpickr-calendar.centerMost:after",dF=Du.cssRules.length,fF="{left:"+ue.left+"px;right:auto;}";Ot(n.calendarContainer,"rightMost",!1),Ot(n.calendarContainer,"centerMost",!0),Du.insertRule(cF+","+uF+fF,dF),n.calendarContainer.style.left=lF+"px",n.calendarContainer.style.right="auto"}}}}function Te(){for(var _=null,R=0;R<document.styleSheets.length;R++){var K=document.styleSheets[R];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 De(){n.config.noCalendar||n.isMobile||(U(),gi(),T())}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 R=function(me){return me.classList&&me.classList.contains("flatpickr-day")&&!me.classList.contains("flatpickr-disabled")&&!me.classList.contains("notAllowed")},K=ig(Yt(_),R);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,Pe){return me.getTime()-Pe.getTime()}));if(f(),ce){var ue=n.currentYear!==re.getFullYear();n.currentYear=re.getFullYear(),n.currentMonth=re.getMonth(),ue&&(ze("onYearChange"),U()),ze("onMonthChange")}if(gi(),T(),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:[$,l,V],minDate:[w],maxDate:[w],positionElement:[wo],clickOpens:[function(){n.config.clickOpens===!0?(m(n._input,"focus",n.open),m(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function jt(_,R){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[_]=R,St[_]!==void 0?St[_].forEach(function(Q){return Q()}):Bc.indexOf(_)>-1&&(n.config[_]=$c(R));n.redraw(),un(!0)}function Mt(_,R){var K=[];if(_ instanceof Array)K=_.map(function(Q){return n.parseDate(Q,R)});else if(_ instanceof Date||typeof _=="number")K=[n.parseDate(_,R)];else if(typeof _=="string")switch(n.config.mode){case"single":case"time":K=[n.parseDate(_,R)];break;case"multiple":K=_.split(n.config.conjunction).map(function(Q){return n.parseDate(Q,R)});break;case"range":K=_.split(n.l10n.rangeSeparator).map(function(Q){return n.parseDate(Q,R)});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(_,R,K){if(R===void 0&&(R=!1),K===void 0&&(K=n.config.dateFormat),_!==0&&!_||_ instanceof Array&&_.length===0)return n.clear(R);Mt(_,K),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),w(void 0,R),h(),n.selectedDates.length===0&&n.clear(!1),un(R),R&&ze("onChange")}function or(_){return _.slice().map(function(R){return typeof R=="string"||typeof R=="number"||R instanceof Date?n.parseDate(R,void 0,!0):R&&typeof R=="object"&&R.from&&R.to?{from:n.parseDate(R.from,void 0),to:n.parseDate(R.to,void 0)}:R}).filter(function(R){return R})}function As(){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(R){}m(n.mobileInput,"change",function(R){n.setDate(Yt(R).value,!1,n.mobileFormatStr),ze("onChange"),ze("onClose")})}function ku(_){if(n.isOpen===!0)return n.close();n.open(_)}function ze(_,R){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,R);_==="onChange"&&(n.input.dispatchEvent(pi("change")),n.input.dispatchEvent(pi("input")))}}function pi(_){var R=document.createEvent("Event");return R.initEvent(_,!0,!0),R}function Io(_){for(var R=0;R<n.selectedDates.length;R++){var K=n.selectedDates[R];if(K instanceof Date&&Kt(K,_)===0)return""+R}return!1}function Ts(_){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(_,R){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+R),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[R].textContent=Za(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 R=_||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(K){return n.formatDate(K,R)}).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 Es(_){var R=Yt(_),K=n.prevMonthNav.contains(R),Q=n.nextMonthNav.contains(R);K||Q?O(K?-1:1):n.yearElements.indexOf(R)>=0?R.select():R.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):R.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function xt(_){_.preventDefault();var R=_.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||(R?_.which===38?1:-1:0),fe=ue+xe*we;if(typeof Q.value!="undefined"&&Q.value.length===2){var me=Q===n.hourElement,Pe=Q===n.minuteElement;fe<re?(fe=ce+fe+rn(!me)+(rn(me)&&rn(!n.amPM)),Pe&&C(void 0,-1,n.hourElement)):fe>ce&&(fe=Q===n.hourElement?fe-ce-rn(!n.amPM):re,Pe&&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=vD(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 ut=function(e,t){return typeof e=="string"?ti(window.document.querySelectorAll(e),t):e instanceof Node?ti([e],t):ti(e,t)};ut.defaultConfig={},ut.l10ns={en:Et({},no),default:Et({},no)},ut.localize=function(e){ut.l10ns.default=Et(Et({},ut.l10ns.default),e)},ut.setDefaults=function(e){ut.defaultConfig=Et(Et({},ut.defaultConfig),e)},ut.parseDate=Fc({}),ut.formatDate=og({}),ut.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=ut);const bD=Ou(Object.freeze(Object.defineProperty({__proto__:null,default:ut},Symbol.toStringTag,{value:"Module"})));(function(e){function t(O){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(N){return typeof N}:t=function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},t(O)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(x),r=o(vI),i=o(bD);function o(O){return O&&O.__esModule?O:{default:O}}function a(){if(typeof WeakMap!="function")return null;var O=new WeakMap;return a=function(){return O},O}function l(O){if(O&&O.__esModule)return O;if(O===null||t(O)!=="object"&&typeof O!="function")return{default:O};var M=a();if(M&&M.has(O))return M.get(O);var N={},j=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var te in O)if(Object.prototype.hasOwnProperty.call(O,te)){var se=j?Object.getOwnPropertyDescriptor(O,te):null;se&&(se.get||se.set)?Object.defineProperty(N,te,se):N[te]=O[te]}return N.default=O,M&&M.set(O,N),N}function s(O){return h(O)||f(O)||d(O)||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(O,M){if(O){if(typeof O=="string")return p(O,M);var N=Object.prototype.toString.call(O).slice(8,-1);if(N==="Object"&&O.constructor&&(N=O.constructor.name),N==="Map"||N==="Set")return Array.from(O);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return p(O,M)}}function f(O){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(O))return Array.from(O)}function h(O){if(Array.isArray(O))return p(O)}function p(O,M){(M==null||M>O.length)&&(M=O.length);for(var N=0,j=new Array(M);N<M;N++)j[N]=O[N];return j}function g(){return g=Object.assign||function(O){for(var M=1;M<arguments.length;M++){var N=arguments[M];for(var j in N)Object.prototype.hasOwnProperty.call(N,j)&&(O[j]=N[j])}return O},g.apply(this,arguments)}function m(O,M){if(O==null)return{};var N=v(O,M),j,te;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(O);for(te=0;te<se.length;te++)j=se[te],!(M.indexOf(j)>=0)&&Object.prototype.propertyIsEnumerable.call(O,j)&&(N[j]=O[j])}return N}function v(O,M){if(O==null)return{};var N={},j=Object.keys(O),te,se;for(se=0;se<j.length;se++)te=j[se],!(M.indexOf(te)>=0)&&(N[te]=O[te]);return N}function I(O,M){var N=Object.keys(O);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(O);M&&(j=j.filter(function(te){return Object.getOwnPropertyDescriptor(O,te).enumerable})),N.push.apply(N,j)}return N}function w(O){for(var M=1;M<arguments.length;M++){var N=arguments[M]!=null?arguments[M]:{};M%2?I(Object(N),!0).forEach(function(j){U(O,j,N[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(N)):I(Object(N)).forEach(function(j){Object.defineProperty(O,j,Object.getOwnPropertyDescriptor(N,j))})}return O}function y(O,M){if(!(O instanceof M))throw new TypeError("Cannot call a class as a function")}function C(O,M){for(var N=0;N<M.length;N++){var j=M[N];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(O,j.key,j)}}function b(O,M,N){return M&&C(O.prototype,M),O}function A(O,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(M&&M.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),M&&E(O,M)}function E(O,M){return E=Object.setPrototypeOf||function(j,te){return j.__proto__=te,j},E(O,M)}function D(O){var M=W();return function(){var j=T(O),te;if(M){var se=T(this).constructor;te=Reflect.construct(j,arguments,se)}else te=j.apply(this,arguments);return F(this,te)}}function F(O,M){return M&&(t(M)==="object"||typeof M=="function")?M:Y(O)}function Y(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function W(){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(O){return!1}}function T(O){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(N){return N.__proto__||Object.getPrototypeOf(N)},T(O)}function U(O,M,N){return M in O?Object.defineProperty(O,M,{value:N,enumerable:!0,configurable:!0,writable:!0}):O[M]=N,O}var G=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],$=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),B=["onCreate","onDestroy"],L=r.default.func,V=function(O){A(N,O);var M=D(N);function N(){var j;y(this,N);for(var te=arguments.length,se=new Array(te),oe=0;oe<te;oe++)se[oe]=arguments[oe];return j=M.call.apply(M,[this].concat(se)),U(Y(j),"createFlatpickrInstance",function(){var J=w({onClose:function(){j.node.blur&&j.node.blur()}},j.props.options);J=q(J,j.props),j.flatpickr=(0,i.default)(j.node,J),j.props.hasOwnProperty("value")&&j.flatpickr.setDate(j.props.value,!1);var le=j.props.onCreate;le&&le(j.flatpickr)}),U(Y(j),"destroyFlatpickrInstance",function(){var J=j.props.onDestroy;J&&J(j.flatpickr),j.flatpickr.destroy(),j.flatpickr=null}),U(Y(j),"handleNodeChange",function(J){j.node=J,j.flatpickr&&(j.destroyFlatpickrInstance(),j.createFlatpickrInstance())}),j}return b(N,[{key:"componentDidUpdate",value:function(te){var se=this.props.options,oe=te.options;se=q(se,this.props),oe=q(oe,te);for(var J=Object.getOwnPropertyNames(se),le=J.length-1;le>=0;le--){var ne=J[le],ge=se[ne];ge!==oe[ne]&&(G.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,oe=te.defaultValue,J=te.value,le=te.children,ne=te.render,ge=m(te,["options","defaultValue","value","children","render"]);return G.forEach(function(Se){delete ge[Se]}),B.forEach(function(Se){delete ge[Se]}),ne?ne(w(w({},ge),{},{defaultValue:oe,value:J}),this.handleNodeChange):se.wrap?n.default.createElement("div",g({},ge,{ref:this.handleNodeChange}),le):n.default.createElement("input",g({},ge,{defaultValue:oe,ref:this.handleNodeChange}))}}]),N}(n.Component);U(V,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:$,onOpen:$,onClose:$,onMonthChange:$,onYearChange:$,onReady:$,onValueUpdate:$,onDayCreate:$,onCreate:L,onDestroy:L,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}),U(V,"defaultProps",{options:{}});function q(O,M){var N=w({},O);return G.forEach(function(j){if(M.hasOwnProperty(j)){var te;N[j]&&!Array.isArray(N[j])?N[j]=[N[j]]:N[j]||(N[j]=[]);var se=Array.isArray(M[j])?M[j]:[M[j]];(te=N[j]).push.apply(te,s(se))}}),N}var ee=V;e.default=ee})(ng);const sg=fn(ng);var lg={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",g="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,I=/\[([^\]]+)]|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(G){var $=["th","st","nd","rd"],B=G%100;return"["+G+($[(B-20)%10]||$[B]||$[0])+"]"}},y=function(G,$,B){var L=String(G);return!L||L.length>=$?G:""+Array($+1-L.length).join(B)+G},C={s:y,z:function(G){var $=-G.utcOffset(),B=Math.abs($),L=Math.floor(B/60),V=B%60;return($<=0?"+":"-")+y(L,2,"0")+":"+y(V,2,"0")},m:function G($,B){if($.date()<B.date())return-G(B,$);var L=12*(B.year()-$.year())+(B.month()-$.month()),V=$.clone().add(L,f),q=B-V<0,ee=$.clone().add(L+(q?-1:1),f);return+(-(L+(B-V)/(q?V-ee:ee-V))||0)},a:function(G){return G<0?Math.ceil(G)||0:Math.floor(G)},p:function(G){return{M:f,y:p,w:d,d:c,D:g,h:s,m:l,s:a,ms:o,Q:h}[G]||String(G||"").toLowerCase().replace(/s$/,"")},u:function(G){return G===void 0}},b="en",A={};A[b]=w;var E="$isDayjsObject",D=function(G){return G instanceof T||!(!G||!G[E])},F=function G($,B,L){var V;if(!$)return b;if(typeof $=="string"){var q=$.toLowerCase();A[q]&&(V=q),B&&(A[q]=B,V=q);var ee=$.split("-");if(!V&&ee.length>1)return G(ee[0])}else{var O=$.name;A[O]=$,V=O}return!L&&V&&(b=V),V||!L&&b},Y=function(G,$){if(D(G))return G.clone();var B=typeof $=="object"?$:{};return B.date=G,B.args=arguments,new T(B)},W=C;W.l=F,W.i=D,W.w=function(G,$){return Y(G,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var T=function(){function G(B){this.$L=F(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[E]=!0}var $=G.prototype;return $.parse=function(B){this.$d=function(L){var V=L.date,q=L.utc;if(V===null)return new Date(NaN);if(W.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var ee=V.match(v);if(ee){var O=ee[2]-1||0,M=(ee[7]||"0").substring(0,3);return q?new Date(Date.UTC(ee[1],O,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,M)):new Date(ee[1],O,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,M)}}return new Date(V)}(B),this.init()},$.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},$.$utils=function(){return W},$.isValid=function(){return this.$d.toString()!==m},$.isSame=function(B,L){var V=Y(B);return this.startOf(L)<=V&&V<=this.endOf(L)},$.isAfter=function(B,L){return Y(B)<this.startOf(L)},$.isBefore=function(B,L){return this.endOf(L)<Y(B)},$.$g=function(B,L,V){return W.u(B)?this[L]:this.set(V,B)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(B,L){var V=this,q=!!W.u(L)||L,ee=W.p(B),O=function(le,ne){var ge=W.w(V.$u?Date.UTC(V.$y,ne,le):new Date(V.$y,ne,le),V);return q?ge:ge.endOf(c)},M=function(le,ne){return W.w(V.toDate()[le].apply(V.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(ne)),V)},N=this.$W,j=this.$M,te=this.$D,se="set"+(this.$u?"UTC":"");switch(ee){case p:return q?O(1,0):O(31,11);case f:return q?O(1,j):O(0,j+1);case d:var oe=this.$locale().weekStart||0,J=(N<oe?N+7:N)-oe;return O(q?te-J:te+(6-J),j);case c:case g:return M(se+"Hours",0);case s:return M(se+"Minutes",1);case l:return M(se+"Seconds",2);case a:return M(se+"Milliseconds",3);default:return this.clone()}},$.endOf=function(B){return this.startOf(B,!1)},$.$set=function(B,L){var V,q=W.p(B),ee="set"+(this.$u?"UTC":""),O=(V={},V[c]=ee+"Date",V[g]=ee+"Date",V[f]=ee+"Month",V[p]=ee+"FullYear",V[s]=ee+"Hours",V[l]=ee+"Minutes",V[a]=ee+"Seconds",V[o]=ee+"Milliseconds",V)[q],M=q===c?this.$D+(L-this.$W):L;if(q===f||q===p){var N=this.clone().set(g,1);N.$d[O](M),N.init(),this.$d=N.set(g,Math.min(this.$D,N.daysInMonth())).$d}else O&&this.$d[O](M);return this.init(),this},$.set=function(B,L){return this.clone().$set(B,L)},$.get=function(B){return this[W.p(B)]()},$.add=function(B,L){var V,q=this;B=Number(B);var ee=W.p(L),O=function(j){var te=Y(q);return W.w(te.date(te.date()+Math.round(j*B)),q)};if(ee===f)return this.set(f,this.$M+B);if(ee===p)return this.set(p,this.$y+B);if(ee===c)return O(1);if(ee===d)return O(7);var M=(V={},V[l]=r,V[s]=i,V[a]=n,V)[ee]||1,N=this.$d.getTime()+B*M;return W.w(N,this)},$.subtract=function(B,L){return this.add(-1*B,L)},$.format=function(B){var L=this,V=this.$locale();if(!this.isValid())return V.invalidDate||m;var q=B||"YYYY-MM-DDTHH:mm:ssZ",ee=W.z(this),O=this.$H,M=this.$m,N=this.$M,j=V.weekdays,te=V.months,se=V.meridiem,oe=function(ne,ge,Se,Ue){return ne&&(ne[ge]||ne(L,q))||Se[ge].slice(0,Ue)},J=function(ne){return W.s(O%12||12,ne,"0")},le=se||function(ne,ge,Se){var Ue=ne<12?"AM":"PM";return Se?Ue.toLowerCase():Ue};return q.replace(I,function(ne,ge){return ge||function(Se){switch(Se){case"YY":return String(L.$y).slice(-2);case"YYYY":return W.s(L.$y,4,"0");case"M":return N+1;case"MM":return W.s(N+1,2,"0");case"MMM":return oe(V.monthsShort,N,te,3);case"MMMM":return oe(te,N);case"D":return L.$D;case"DD":return W.s(L.$D,2,"0");case"d":return String(L.$W);case"dd":return oe(V.weekdaysMin,L.$W,j,2);case"ddd":return oe(V.weekdaysShort,L.$W,j,3);case"dddd":return j[L.$W];case"H":return String(O);case"HH":return W.s(O,2,"0");case"h":return J(1);case"hh":return J(2);case"a":return le(O,M,!0);case"A":return le(O,M,!1);case"m":return String(M);case"mm":return W.s(M,2,"0");case"s":return String(L.$s);case"ss":return W.s(L.$s,2,"0");case"SSS":return W.s(L.$ms,3,"0");case"Z":return ee}return null}(ne)||ee.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(B,L,V){var q,ee=this,O=W.p(L),M=Y(B),N=(M.utcOffset()-this.utcOffset())*r,j=this-M,te=function(){return W.m(ee,M)};switch(O){case p:q=te()/12;break;case f:q=te();break;case h:q=te()/3;break;case d:q=(j-N)/6048e5;break;case c:q=(j-N)/864e5;break;case s:q=j/i;break;case l:q=j/r;break;case a:q=j/n;break;default:q=j}return V?q:W.a(q)},$.daysInMonth=function(){return this.endOf(f).$D},$.$locale=function(){return A[this.$L]},$.locale=function(B,L){if(!B)return this.$L;var V=this.clone(),q=F(B,L,!0);return q&&(V.$L=q),V},$.clone=function(){return W.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},G}(),U=T.prototype;return Y.prototype=U,[["$ms",o],["$s",a],["$m",l],["$H",s],["$W",c],["$M",f],["$y",p],["$D",g]].forEach(function(G){U[G[1]]=function($){return this.$g($,G[0],G[1])}}),Y.extend=function(G,$){return G.$i||(G($,T,Y),G.$i=!0),Y},Y.locale=F,Y.isDayjs=D,Y.unix=function(G){return Y(1e3*G)},Y.en=A[b],Y.Ls=A,Y.p={},Y})})(lg);var yD=lg.exports;const _t=fn(yD);var cg={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,g){g===void 0&&(g={});var m=new Date(h),v=function(I,w){w===void 0&&(w={});var y=w.timeZoneName||"short",C=I+"|"+y,b=r[C];return b||(b=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:I,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:y}),r[C]=b),b}(p,g);return v.formatToParts(m)},c=function(h,p){for(var g=s(h,p),m=[],v=0;v<g.length;v+=1){var I=g[v],w=I.type,y=I.value,C=n[w];C>=0&&(m[C]=parseInt(y,10))}var b=m[3],A=b===24?0:b,E=m[0]+"-"+m[1]+"-"+m[2]+" "+A+":"+m[4]+":"+m[5]+":000",D=+h;return(a.utc(E).valueOf()-(D-=D%1e3))/6e4},d=o.prototype;d.tz=function(h,p){h===void 0&&(h=l);var g,m=this.utcOffset(),v=this.toDate(),I=v.toLocaleString("en-US",{timeZone:h}),w=Math.round((v-new Date(I))/1e3/60),y=15*-Math.round(v.getTimezoneOffset()/15)-w;if(!Number(y))g=this.utcOffset(0,p);else if(g=a(I,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(y,!0),p){var C=g.utcOffset();g=g.add(m-C,"minute")}return g.$x.$timezone=h,g},d.offsetName=function(h){var p=this.$x.$timezone||a.tz.guess(),g=s(this.valueOf(),p,{timeZoneName:h}).find(function(m){return m.type.toLowerCase()==="timezonename"});return g&&g.value};var f=d.startOf;d.startOf=function(h,p){if(!this.$x||!this.$x.$timezone)return f.call(this,h,p);var g=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(g,h,p).tz(this.$x.$timezone,!0)},a.tz=function(h,p,g){var m=g&&p,v=g||p||l,I=c(+a(),v);if(typeof h!="string")return a(h).tz(v);var w=function(A,E,D){var F=A-60*E*1e3,Y=c(F,D);if(E===Y)return[F,E];var W=c(F-=60*(Y-E)*1e3,D);return Y===W?[F,Y]:[A-60*Math.min(Y,W)*1e3,Math.max(Y,W)]}(a.utc(h,m).valueOf(),I,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}}})})(cg);var CD=cg.exports;const xD=fn(CD);var ug={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(m){var v={date:m,utc:!0,args:arguments};return new a(v)},s.utc=function(m){var v=l(this.toDate(),{locale:this.$L,utc:!0});return m?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(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),c.call(this,m)};var d=s.init;s.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else d.call(this)};var f=s.utcOffset;s.utcOffset=function(m,v){var I=this.$utils().u;if(I(m))return this.$u?0:I(this.$offset)?f.call(this):this.$offset;if(typeof m=="string"&&(m=function(b){b===void 0&&(b="");var A=b.match(r);if(!A)return null;var E=(""+A[0]).match(i)||["-",0,0],D=E[0],F=60*+E[1]+ +E[2];return F===0?0:D==="+"?F:-F}(m),m===null))return this;var w=Math.abs(m)<=16?60*m:m,y=this;if(v)return y.$offset=w,y.$u=m===0,y;if(m!==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(m){var v=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},s.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},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(m){return m==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var g=s.diff;s.diff=function(m,v,I){if(m&&this.$u===m.$u)return g.call(this,m,v,I);var w=this.local(),y=l(m).local();return g.call(w,y,v,I)}}})})(ug);var wD=ug.exports;const ID=fn(wD);_t.extend(xD),_t.extend(ID);const SD=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,onChange:r})=>{const i=o=>{if(o&&o.length){const a=_t.utc(o[0]).toISOString();r(a)}else r("")};return u.jsx(S.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(sg,{value:e&&_t(e).format("YYYY-MM-DD HH:mm")||void 0,onChange:i,className:"flatpickr-input",options:{enableTime:!0,dateFormat:"DD.MM.YYYY HH:mm",position:"below",minDate:t||SD(e),maxDate:n,parseDate:(o,a)=>_t(o,a).toDate(),formatDate:(o,a)=>_t(o).format(a),time_24hr:!0,minuteIncrement:1}})})},AD=({required:e,defaultValue:t,onChangeFromDate:n,onChangeToDate:r})=>{const[i,o]=t;return u.jsxs(S.Box,{sx:{marginBottom:"16px"},children:[u.jsx(S.FormControl,{children:u.jsx(S.FormLabel,{required:e,color:"primary",children:"Duration"})}),u.jsxs(S.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})]})]})},dg=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},TD=({label:e,defaultValue:t,required:n,onChange:r})=>{const[i,o]=x.useState(dg(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(S.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(S.FormLabel,{required:n,color:"primary",children:e}),u.jsx(S.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(sg,{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:dg(t)||void 0}})}),u.jsx(pt,{showToast:a,message:"Succesfully cleared the duration time",color:"primary",hideToast:s})]})},ED=({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(S.Box,{"data-testid":"no permission card",sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",bgcolor:"background.body"},children:u.jsx(S.Card,{variant:"outlined",sx:{maxWidth:300,overflow:"hidden",borderRadius:"md"},children:u.jsxs(S.CardContent,{children:[u.jsx(S.Typography,{level:"h2",textAlign:"center",mb:2,children:r}),u.jsx(S.Typography,{level:"body-md",color:"neutral",mb:2,children:i}),u.jsx(S.Box,{display:"flex",justifyContent:"center",children:u.jsx(S.Button,{variant:"solid",color:"neutral",fullWidth:!0,size:"sm",onClick:a,children:o})})]})})})},fg=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],Uc=e=>e.reduce((t,n)=>(t[n.key]=n.value,t),{}),_D=({labels:e,type:t,defaultValue:n,onChange:r})=>{const[i,o]=x.useState(fg(n)),[a,l]=x.useState(null),[s,c]=x.useState(""),[d,f]=x.useState(""),[h,p]=x.useState(""),[g,m]=x.useState("");x.useEffect(()=>o(fg(n)),[n]);const v=()=>{const C=[...i];C.push({key:s,value:h}),o(C),c(""),p(""),r(Uc(C))},I=C=>{const b=i.filter((A,E)=>E!==C);o(b),r(Uc(b))},w=(C,b)=>{f(b.key),m(b.value),l(C)},y=C=>{const b=[...i];b[C]={key:d,value:g},o(b),l(null),f(""),m(""),r(Uc(b))};return u.jsxs(S.Box,{children:[i.map((C,b)=>u.jsx(S.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(S.CardContent,{style:{flex:1},children:a===b?u.jsxs(S.Box,{display:"flex",alignItems:"center",children:[u.jsx(S.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:d,onChange:A=>f(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(S.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:g,onChange:A=>m(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(S.Tooltip,{title:e.save,children:d&&g?u.jsx(S.IconButton,{onClick:()=>y(b),children:u.jsx(Le.Check,{})}):u.jsx("span",{children:u.jsx(S.IconButton,{disabled:!0,children:u.jsx(Le.Check,{})})})})]}):u.jsxs(S.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[u.jsxs(S.Box,{children:[u.jsxs(S.Typography,{style:{fontWeight:"bold"},children:[e.keyDynamicFields,": ",u.jsx(S.Typography,{whiteSpace:"wrap",children:C.key})]}),u.jsxs(S.Typography,{style:{color:"gray"},children:[e.valueDynamicFields,": ",u.jsx(S.Typography,{whiteSpace:"wrap",children:C.value})]})]}),u.jsxs(S.Box,{children:[u.jsx(S.Tooltip,{title:e.edit,children:u.jsx(S.IconButton,{onClick:()=>w(b,C),children:u.jsx(Le.Edit,{})})}),u.jsx(S.Tooltip,{title:e.delete,children:u.jsx(S.IconButton,{onClick:()=>I(b),children:u.jsx(Le.Delete,{})})})]})]})})},`dynamic-fields-${t}-${b}`)),u.jsxs(S.Box,{display:"flex",alignItems:"center",style:{marginTop:i&&i.length?"20px":"0px"},children:[u.jsx(S.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(S.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(S.Tooltip,{title:e.add,children:s&&h?u.jsx(S.Button,{onClick:v,children:u.jsx(Le.Add,{})}):u.jsx("span",{children:u.jsx(S.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 hg(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?hg(Object(n),!0).forEach(function(r){io(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pg(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 DD(e,t,n){return t&&pg(e.prototype,t),n&&pg(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 PD(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 es(e){return es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},es(e)}function gg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(gg=function(){return!!e})()}function OD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RD(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 OD(e)}function MD(e){var t=gg();return function(){var n,r=es(e);if(t){var i=es(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return RD(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 LD(e){if(Array.isArray(e))return Wc(e)}function BD(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mg(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 $D(){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 LD(e)||BD(e)||mg(e)||$D()}function ND(e){if(Array.isArray(e))return e}function FD(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 zD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2460
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vn(e,t){return ND(e)||FD(e,t)||mg(e,t)||zD()}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 jD(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Gc=x.useLayoutEffect,VD=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ts=function(){};function UD(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function HD(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(UD(e,a)));return o.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var ns=function(t){return ZD(t)?t.filter(Boolean):vr(t)==="object"&&t!==null?[t]:[]},vg=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,VD);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 rs(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function WD(e){return rs(e)?window.innerHeight:e.clientHeight}function bg(e){return rs(e)?window.pageYOffset:e.scrollTop}function is(e,t){if(rs(e)){window.scrollTo(0,t);return}e.scrollTop=t}function GD(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 YD(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function os(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ts,i=bg(e),o=t-i,a=10,l=0;function s(){l+=a;var c=YD(l,i,o,n);is(e,c),l<n?window.requestAnimationFrame(s):r(e)}s()}function yg(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?is(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&is(e,Math.max(t.offsetTop-i,0))}function KD(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 Cg(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function qD(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}var xg=!1,QD={get passive(){return xg=!0}},as=typeof window!="undefined"?window:{};as.addEventListener&&as.removeEventListener&&(as.addEventListener("p",ts,QD),as.removeEventListener("p",ts,!1));var JD=xg;function XD(e){return e!=null}function ZD(e){return Array.isArray(e)}function oo(e,t,n){return e?t:n}function _F(e){return e}function kF(e){return e}var eP=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},{})},tP=["children","innerProps"],nP=["children","innerProps"];function rP(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,s=GD(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,g=h.height,m=h.top,v=n.offsetParent.getBoundingClientRect(),I=v.top,w=a?window.innerHeight:WD(s),y=bg(s),C=parseInt(getComputedStyle(n).marginBottom,10),b=parseInt(getComputedStyle(n).marginTop,10),A=I-b,E=w-m,k=A+y,F=f-y-m,Y=p-w+y+C,W=y+m-b,T=160;switch(i){case"auto":case"bottom":if(E>=g)return{placement:"bottom",maxHeight:t};if(F>=g&&!a)return o&&os(s,Y,T),{placement:"bottom",maxHeight:t};if(!a&&F>=r||a&&E>=r){o&&os(s,Y,T);var U=a?E-C:F-C;return{placement:"bottom",maxHeight:U}}if(i==="auto"||a){var G=t,$=a?A:k;return $>=r&&(G=Math.min($-C-l,t)),{placement:"top",maxHeight:G}}if(i==="bottom")return o&&is(s,Y),{placement:"bottom",maxHeight:t};break;case"top":if(A>=g)return{placement:"top",maxHeight:t};if(k>=g&&!a)return o&&os(s,W,T),{placement:"top",maxHeight:t};if(!a&&k>=r||a&&A>=r){var B=t;return(!a&&k>=r||a&&A>=r)&&(B=a?A-b:k-b),o&&os(s,W,T),{placement:"top",maxHeight:B}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function iP(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var wg=function(t){return t==="auto"?"bottom":t},oP=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,iP(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})},Ig=x.createContext(null),aP=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(Ig)||{},d=c.setPortalPlacement,f=x.useRef(null),h=x.useState(i),p=Vn(h,2),g=p[0],m=p[1],v=x.useState(null),I=Vn(v,2),w=I[0],y=I[1],C=s.spacing.controlHeight;return Gc(function(){var b=f.current;if(b){var A=a==="fixed",E=l&&!A,k=rP({maxHeight:i,menuEl:b,minHeight:r,placement:o,shouldScroll:E,isFixedPosition:A,controlHeight:C});m(k.maxHeight),y(k.placement),d==null||d(k.placement)}},[i,o,a,l,r,d,C]),n({ref:f,placerProps:ve(ve({},t),{},{placement:w||wg(o),maxHeight:g})})},sP=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return pe.jsx("div",P({},tt(t,"menu",{menu:!0}),{ref:r},i),n)},lP=sP,cP=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})},uP=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return pe.jsx("div",P({},tt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},Sg=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")})},dP=Sg,fP=Sg,hP=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=Cn(t,tP);return pe.jsx("div",P({},tt(ve(ve({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},pP=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=Cn(t,nP);return pe.jsx("div",P({},tt(ve(ve({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},gP=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}},mP=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(wg(a)),f=Vn(d,2),h=f[0],p=f[1],g=x.useMemo(function(){return{setPortalPlacement:p}},[]),m=x.useState(null),v=Vn(m,2),I=v[0],w=v[1],y=x.useCallback(function(){if(i){var E=KD(i),k=l==="fixed"?0:window.pageYOffset,F=E[h]+k;(F!==(I==null?void 0:I.offset)||E.left!==(I==null?void 0:I.rect.left)||E.width!==(I==null?void 0:I.rect.width))&&w({offset:F,rect:E})}},[i,l,h,I==null?void 0:I.offset,I==null?void 0:I.rect.left,I==null?void 0:I.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=IS(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"||!I)return null;var A=pe.jsx("div",P({ref:b},tt(ve(ve({},t),{},{offset:I.offset,position:l,rect:I.rect}),"menuPortal",{"menu-portal":!0}),o),r);return pe.jsx(Ig.Provider,{value:g},n?Oe.createPortal(A,n):A)},vP=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},bP=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return pe.jsx("div",P({},tt(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},yP=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")})},CP=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return pe.jsx("div",P({},tt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},xP=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},wP=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",P({},tt(t,"indicatorsContainer",{indicators:!0}),r),n)},Ag,IP=["size"],SP=["innerProps","isRtl","size"],AP={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Tg=function(t){var n=t.size,r=Cn(t,IP);return pe.jsx("svg",P({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:AP},r))},Yc=function(t){return pe.jsx(Tg,P({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"}))},Eg=function(t){return pe.jsx(Tg,P({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"}))},_g=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}})},TP=_g,EP=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",P({},tt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||pe.jsx(Eg,null))},_P=_g,kP=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",P({},tt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||pe.jsx(Yc,null))},DP=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})},PP=function(t){var n=t.innerProps;return pe.jsx("span",P({},n,tt(t,"indicatorSeparator",{"indicator-separator":!0})))},OP=pe.keyframes(Ag||(Ag=jD([`
|
|
2460
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vn(e,t){return ND(e)||FD(e,t)||mg(e,t)||zD()}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 jD(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Gc=x.useLayoutEffect,VD=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ts=function(){};function UD(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function HD(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(UD(e,a)));return o.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var ns=function(t){return ZD(t)?t.filter(Boolean):vr(t)==="object"&&t!==null?[t]:[]},vg=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,VD);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 rs(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function WD(e){return rs(e)?window.innerHeight:e.clientHeight}function bg(e){return rs(e)?window.pageYOffset:e.scrollTop}function is(e,t){if(rs(e)){window.scrollTo(0,t);return}e.scrollTop=t}function GD(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 YD(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function os(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ts,i=bg(e),o=t-i,a=10,l=0;function s(){l+=a;var c=YD(l,i,o,n);is(e,c),l<n?window.requestAnimationFrame(s):r(e)}s()}function yg(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?is(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&is(e,Math.max(t.offsetTop-i,0))}function KD(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 Cg(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function qD(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}var xg=!1,QD={get passive(){return xg=!0}},as=typeof window!="undefined"?window:{};as.addEventListener&&as.removeEventListener&&(as.addEventListener("p",ts,QD),as.removeEventListener("p",ts,!1));var JD=xg;function XD(e){return e!=null}function ZD(e){return Array.isArray(e)}function oo(e,t,n){return e?t:n}function _F(e){return e}function kF(e){return e}var eP=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},{})},tP=["children","innerProps"],nP=["children","innerProps"];function rP(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,s=GD(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,g=h.height,m=h.top,v=n.offsetParent.getBoundingClientRect(),I=v.top,w=a?window.innerHeight:WD(s),y=bg(s),C=parseInt(getComputedStyle(n).marginBottom,10),b=parseInt(getComputedStyle(n).marginTop,10),A=I-b,E=w-m,D=A+y,F=f-y-m,Y=p-w+y+C,W=y+m-b,T=160;switch(i){case"auto":case"bottom":if(E>=g)return{placement:"bottom",maxHeight:t};if(F>=g&&!a)return o&&os(s,Y,T),{placement:"bottom",maxHeight:t};if(!a&&F>=r||a&&E>=r){o&&os(s,Y,T);var U=a?E-C:F-C;return{placement:"bottom",maxHeight:U}}if(i==="auto"||a){var G=t,$=a?A:D;return $>=r&&(G=Math.min($-C-l,t)),{placement:"top",maxHeight:G}}if(i==="bottom")return o&&is(s,Y),{placement:"bottom",maxHeight:t};break;case"top":if(A>=g)return{placement:"top",maxHeight:t};if(D>=g&&!a)return o&&os(s,W,T),{placement:"top",maxHeight:t};if(!a&&D>=r||a&&A>=r){var B=t;return(!a&&D>=r||a&&A>=r)&&(B=a?A-b:D-b),o&&os(s,W,T),{placement:"top",maxHeight:B}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function iP(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var wg=function(t){return t==="auto"?"bottom":t},oP=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,iP(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})},Ig=x.createContext(null),aP=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(Ig)||{},d=c.setPortalPlacement,f=x.useRef(null),h=x.useState(i),p=Vn(h,2),g=p[0],m=p[1],v=x.useState(null),I=Vn(v,2),w=I[0],y=I[1],C=s.spacing.controlHeight;return Gc(function(){var b=f.current;if(b){var A=a==="fixed",E=l&&!A,D=rP({maxHeight:i,menuEl:b,minHeight:r,placement:o,shouldScroll:E,isFixedPosition:A,controlHeight:C});m(D.maxHeight),y(D.placement),d==null||d(D.placement)}},[i,o,a,l,r,d,C]),n({ref:f,placerProps:ve(ve({},t),{},{placement:w||wg(o),maxHeight:g})})},sP=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return pe.jsx("div",P({},tt(t,"menu",{menu:!0}),{ref:r},i),n)},lP=sP,cP=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})},uP=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return pe.jsx("div",P({},tt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},Sg=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")})},dP=Sg,fP=Sg,hP=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=Cn(t,tP);return pe.jsx("div",P({},tt(ve(ve({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},pP=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=Cn(t,nP);return pe.jsx("div",P({},tt(ve(ve({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},gP=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}},mP=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(wg(a)),f=Vn(d,2),h=f[0],p=f[1],g=x.useMemo(function(){return{setPortalPlacement:p}},[]),m=x.useState(null),v=Vn(m,2),I=v[0],w=v[1],y=x.useCallback(function(){if(i){var E=KD(i),D=l==="fixed"?0:window.pageYOffset,F=E[h]+D;(F!==(I==null?void 0:I.offset)||E.left!==(I==null?void 0:I.rect.left)||E.width!==(I==null?void 0:I.rect.width))&&w({offset:F,rect:E})}},[i,l,h,I==null?void 0:I.offset,I==null?void 0:I.rect.left,I==null?void 0:I.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=IS(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"||!I)return null;var A=pe.jsx("div",P({ref:b},tt(ve(ve({},t),{},{offset:I.offset,position:l,rect:I.rect}),"menuPortal",{"menu-portal":!0}),o),r);return pe.jsx(Ig.Provider,{value:g},n?Oe.createPortal(A,n):A)},vP=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},bP=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return pe.jsx("div",P({},tt(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},yP=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")})},CP=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return pe.jsx("div",P({},tt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},xP=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},wP=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",P({},tt(t,"indicatorsContainer",{indicators:!0}),r),n)},Ag,IP=["size"],SP=["innerProps","isRtl","size"],AP={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Tg=function(t){var n=t.size,r=Cn(t,IP);return pe.jsx("svg",P({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:AP},r))},Yc=function(t){return pe.jsx(Tg,P({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"}))},Eg=function(t){return pe.jsx(Tg,P({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"}))},_g=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}})},TP=_g,EP=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",P({},tt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||pe.jsx(Eg,null))},_P=_g,kP=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",P({},tt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||pe.jsx(Yc,null))},DP=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})},PP=function(t){var n=t.innerProps;return pe.jsx("span",P({},n,tt(t,"indicatorSeparator",{"indicator-separator":!0})))},OP=pe.keyframes(Ag||(Ag=jD([`
|
|
2461
2461
|
0%, 80%, 100% { opacity: 0; }
|
|
2462
2462
|
40% { opacity: 1; }
|
|
2463
|
-
`]))),RP=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(OP," 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"},"","")})},MP=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=Cn(t,SP);return pe.jsx("div",P({},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}))},LP=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}})},BP=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",P({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)},$P=BP,NP=["data"],FP=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},zP=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",P({},tt(t,"group",{group:!0}),s),pe.jsx(a,P({},l,{selectProps:f,theme:d,getStyles:i,getClassNames:o,cx:r}),c),pe.jsx("div",null,n))},jP=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"})},VP=function(t){var n=vg(t);n.data;var r=Cn(n,NP);return pe.jsx("div",P({},tt(t,"groupHeading",{"group-heading":!0}),r))},UP=zP,HP=["innerRef","isDisabled","isHidden","inputClassName"],WP=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)":""},GP),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:l.neutral80})},kg={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},GP={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"},kg)},YP=function(t){return ve({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},kg)},KP=function(t){var n=t.cx,r=t.value,i=vg(t),o=i.innerRef,a=i.isDisabled,l=i.isHidden,s=i.inputClassName,c=Cn(i,HP);return pe.jsx("div",P({},tt(t,"input",{"input-container":!0}),{"data-value":r||""}),pe.jsx("input",P({className:n({input:!0},s),ref:o,style:YP(l),disabled:a},c)))},qP=KP,QP=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})},JP=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})},XP=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)},ZP=Dg,eO=Dg;function tO(e){var t=e.children,n=e.innerProps;return pe.jsx("div",P({role:"button"},n),t||pe.jsx(Yc,{size:14}))}var nO=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}))},rO=nO,iO=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}})},oO=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",P({},tt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},l),n)},aO=oO,sO=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})},lO=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",P({},tt(t,"placeholder",{placeholder:!0}),r),n)},cO=lO,uO=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})},dO=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return pe.jsx("div",P({},tt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},fO=dO,hO={ClearIndicator:kP,Control:$P,DropdownIndicator:EP,DownChevron:Eg,CrossIcon:Yc,Group:UP,GroupHeading:VP,IndicatorsContainer:wP,IndicatorSeparator:PP,Input:qP,LoadingIndicator:MP,Menu:lP,MenuList:uP,MenuPortal:mP,LoadingMessage:pP,NoOptionsMessage:hP,MultiValue:rO,MultiValueContainer:ZP,MultiValueLabel:eO,MultiValueRemove:tO,Option:aO,Placeholder:cO,SelectContainer:bP,SingleValue:fO,ValueContainer:CP},pO=function(t){return ve(ve({},hO),t.components)},Pg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function gO(e,t){return!!(e===t||Pg(e)&&Pg(t))}function mO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!gO(e[n],t[n]))return!1;return!0}function vO(e,t){t===void 0&&(t=mO);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 bO={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"},yO=function(t){return pe.jsx("span",P({css:bO},t))},Og=yO,CO={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(m,v){return m&&m.length?"".concat(m.indexOf(v)+1," of ").concat(m.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:"",".")}},xO=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,g=s.isMulti,m=s.isOptionDisabled,v=s.isSearchable,I=s.menuIsOpen,w=s.options,y=s.screenReaderStatus,C=s.tabSelectsValue,b=s.isLoading,A=s["aria-label"],E=s["aria-live"],k=x.useMemo(function(){return ve(ve({},CO),f||{})},[f]),F=x.useMemo(function(){var $="";if(n&&k.onChange){var B=n.option,L=n.options,V=n.removedValue,q=n.removedValues,ee=n.value,O=function(J){return Array.isArray(J)?null:J},M=V||B||O(ee),N=M?h(M):"",j=L||q||void 0,te=j?j.map(h):[],ae=ve({isDisabled:M&&m(M,l),label:N,labels:te},n);$=k.onChange(ae)}return $},[n,k,m,l,h]),Y=x.useMemo(function(){var $="",B=r||i,L=!!(r&&l&&l.includes(r));if(B&&k.onFocus){var V={focused:B,label:h(B),isDisabled:m(B,l),isSelected:L,options:o,context:B===r?"menu":"value",selectValue:l,isAppleDevice:d};$=k.onFocus(V)}return $},[r,i,h,m,k,o,l,d]),W=x.useMemo(function(){var $="";if(I&&w.length&&!b&&k.onFilter){var B=y({count:o.length});$=k.onFilter({inputValue:p,resultsMessage:B})}return $},[o,p,I,k,w,y,b]),T=(n==null?void 0:n.action)==="initial-input-focus",U=x.useMemo(function(){var $="";if(k.guidance){var B=i?"value":I?"menu":"input";$=k.guidance({"aria-label":A,context:B,isDisabled:r&&m(r,l),isMulti:g,isSearchable:v,tabSelectsValue:C,isInitialFocus:T})}return $},[A,r,i,g,m,v,I,k,l,C,T]),G=pe.jsx(x.Fragment,null,pe.jsx("span",{id:"aria-selection"},F),pe.jsx("span",{id:"aria-focused"},Y),pe.jsx("span",{id:"aria-results"},W),pe.jsx("span",{id:"aria-guidance"},U));return pe.jsx(x.Fragment,null,pe.jsx(Og,{id:c},T&&G),pe.jsx(Og,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!T&&G))},wO=xO,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źẑżžẓẕƶȥɀⱬꝣ"}],IO=new RegExp("["+qc.map(function(e){return e.letters}).join("")+"]","g"),Rg={},Qc=0;Qc<qc.length;Qc++)for(var Jc=qc[Qc],Xc=0;Xc<Jc.letters.length;Xc++)Rg[Jc.letters[Xc]]=Jc.base;var Mg=function(t){return t.replace(IO,function(n){return Rg[n]})},SO=vO(Mg),Lg=function(t){return t.replace(/^\s+|\s+$/g,"")},AO=function(t){return"".concat(t.label," ").concat(t.value)},TO=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=ve({ignoreCase:!0,ignoreAccents:!0,stringify:AO,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,a=i.ignoreAccents,l=i.stringify,s=i.trim,c=i.matchFrom,d=s?Lg(r):r,f=s?Lg(l(n)):l(n);return o&&(d=d.toLowerCase(),f=f.toLowerCase()),a&&(d=SO(d),f=Mg(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},EO=["innerRef"];function _O(e){var t=e.innerRef,n=Cn(e,EO),r=eP(n,"onExited","in","enter","exit","appear");return pe.jsx("input",P({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 kO=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function DO(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,I){if(c.current!==null){var w=c.current,y=w.scrollTop,C=w.scrollHeight,b=w.clientHeight,A=c.current,E=I>0,k=C-b-y,F=!1;k>I&&a.current&&(r&&r(v),a.current=!1),E&&l.current&&(o&&o(v),l.current=!1),E&&I>k?(n&&!a.current&&n(v),A.scrollTop=C,F=!0,a.current=!0):!E&&-I>y&&(i&&!l.current&&i(v),A.scrollTop=0,F=!0,l.current=!0),F&&kO(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 I=s.current-v.changedTouches[0].clientY;d(v,I)},[d]),g=x.useCallback(function(v){if(v){var I=JD?{passive:!1}:!1;v.addEventListener("wheel",f,I),v.addEventListener("touchstart",h,I),v.addEventListener("touchmove",p,I)}},[p,h,f]),m=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 g(v),function(){m(v)}}},[t,g,m]),function(v){c.current=v}}var Bg=["boxSizing","height","overflow","paddingRight","position"],$g={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Ng(e){e.preventDefault()}function Fg(e){e.stopPropagation()}function zg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function jg(){return"ontouchstart"in window||navigator.maxTouchPoints}var Vg=!!(typeof window!="undefined"&&window.document&&window.document.createElement),ao=0,ri={capture:!1,passive:!1};function PO(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(Vg){var c=document.body,d=c&&c.style;if(r&&Bg.forEach(function(g){var m=d&&d[g];i.current[g]=m}),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($g).forEach(function(g){var m=$g[g];d&&(d[g]=m)}),d&&(d.paddingRight="".concat(p,"px"))}c&&jg()&&(c.addEventListener("touchmove",Ng,ri),s&&(s.addEventListener("touchstart",zg,ri),s.addEventListener("touchmove",Fg,ri))),ao+=1}},[r]),l=x.useCallback(function(s){if(Vg){var c=document.body,d=c&&c.style;ao=Math.max(ao-1,0),r&&ao<1&&Bg.forEach(function(f){var h=i.current[f];d&&(d[f]=h)}),c&&jg()&&(c.removeEventListener("touchmove",Ng,ri),s&&(s.removeEventListener("touchstart",zg,ri),s.removeEventListener("touchmove",Fg,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 OO=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},RO={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function MO(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=DO({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:l,onTopLeave:s}),d=PO({isEnabled:n}),f=function(p){c(p),d(p)};return pe.jsx(x.Fragment,null,n&&pe.jsx("div",{onClick:OO,css:RO}),t(f))}var LO={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},BO=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:LO,value:"",onChange:function(){}})},$O=BO;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 NO(){return Zc(/^iPhone/i)}function Ug(){return Zc(/^Mac/i)}function FO(){return Zc(/^iPad/i)||Ug()&&navigator.maxTouchPoints>1}function zO(){return NO()||FO()}function jO(){return Ug()||zO()}var VO=function(t){return t.label},Hg=function(t){return t.label},Wg=function(t){return t.value},UO=function(t){return!!t.isDisabled},HO={clearIndicator:_P,container:vP,control:LP,dropdownIndicator:TP,group:FP,groupHeading:jP,indicatorsContainer:xP,indicatorSeparator:DP,input:WP,loadingIndicator:RP,loadingMessage:fP,menu:oP,menuList:cP,menuPortal:gP,multiValue:QP,multiValueLabel:JP,multiValueRemove:XP,noOptionsMessage:dP,option:iO,placeholder:sO,singleValue:uO,valueContainer:yP},WO={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%)"},GO=4,Gg=4,YO=38,KO=Gg*2,qO={baseUnit:Gg,controlHeight:YO,menuGutter:KO},eu={borderRadius:GO,colors:WO,spacing:qO},QO={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Cg(),captureMenuScroll:!Cg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:TO(),formatGroupLabel:VO,getOptionLabel:Hg,getOptionValue:Wg,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:UO,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!qD(),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 Yg(e,t,n,r){var i=Xg(e,t,n),o=Zg(e,t,n),a=Jg(e,t),l=ls(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:l,index:r}}function ss(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,l){return Yg(e,a,t,l)}).filter(function(a){return Qg(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Yg(e,n,t,r);return Qg(e,o)?o:void 0}).filter(XD)}function Kg(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 JO(e,t){return Kg(ss(e,t))}function Qg(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,l=t.value;return(!tm(e)||!o)&&em(e,{label:a,value:l,data:i},r)}function XO(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 ZO(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},Jg=function(t,n){return t.getOptionLabel(n)},ls=function(t,n){return t.getOptionValue(n)};function Xg(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function Zg(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ls(e,t);return n.some(function(i){return ls(e,i)===r})}function em(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var tm=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},eR=1,nm=function(e){PD(n,e);var t=MD(n);function n(r){var i;if(kD(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=jO(),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,g=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:g}),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,g=f&&i.isOptionSelected(s,p),m=i.isOptionDisabled(s,p);if(g){var v=i.getOptionValue(s);i.setValue(p.filter(function(I){return i.getOptionValue(I)!==v}),"deselect-option",s)}else if(!m)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(g){return i.getOptionValue(g)!==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(ss(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 HD.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(s){return Jg(i.props,s)},i.getOptionValue=function(s){return ls(i.props,s)},i.getStyles=function(s,c){var d=i.props.unstyled,f=HO[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 pO(i.props)},i.buildCategorizedOptions=function(){return ss(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return Kg(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&&rs(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 tm(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,g=c.isClearable,m=c.isDisabled,v=c.menuIsOpen,I=c.onKeyDown,w=c.tabSelectsValue,y=c.openMenuOnFocus,C=i.state,b=C.focusedOption,A=C.focusedValue,E=C.selectValue;if(!m&&!(typeof I=="function"&&(I(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(A)i.removeValue(A);else{if(!f)return;d?i.popValue():g&&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()):g&&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||++eR),i.state.selectValue=ns(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 DD(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&&yg(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&&(yg(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,g=f.options,m=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:l,getValue:s,hasValue:m,isMulti:h,isRtl:p,options:g,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 Xg(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return Zg(this.props,i,o)}},{key:"filterOption",value:function(i,o){return em(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(),g=p.Input,m=this.state,v=m.inputIsHidden,I=m.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()?(I==null?void 0:I.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?z.createElement(g,P({},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)):z.createElement(_O,P({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ts,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,g=p.controlShouldRenderValue,m=p.isDisabled,v=p.isMulti,I=p.inputValue,w=p.placeholder,y=this.state,C=y.selectValue,b=y.focusedValue,A=y.isFocused;if(!this.hasValue()||!g)return I?null:z.createElement(f,P({},h,{key:"placeholder",isDisabled:m,isFocused:A,innerProps:{id:this.getElementId("placeholder")}}),w);if(v)return C.map(function(k,F){var Y=k===b,W="".concat(i.getOptionLabel(k),"-").concat(i.getOptionValue(k));return z.createElement(a,P({},h,{components:{Container:l,Label:s,Remove:c},isFocused:Y,isDisabled:m,key:W,index:F,removeProps:{onClick:function(){return i.removeValue(k)},onTouchEnd:function(){return i.removeValue(k)},onMouseDown:function(U){U.preventDefault()}},data:k}),i.formatOptionLabel(k,"value"))});if(I)return null;var E=C[0];return z.createElement(d,P({},h,{data:E,isDisabled:m}),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 z.createElement(o,P({},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 z.createElement(o,P({},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 z.createElement(a,P({},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 z.createElement(o,P({},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,g=this.commonProps,m=this.state.focusedOption,v=this.props,I=v.captureMenuScroll,w=v.inputValue,y=v.isLoading,C=v.loadingMessage,b=v.minMenuHeight,A=v.maxMenuHeight,E=v.menuIsOpen,k=v.menuPlacement,F=v.menuPosition,Y=v.menuPortalTarget,W=v.menuShouldBlockScroll,T=v.menuShouldScrollIntoView,U=v.noOptionsMessage,G=v.onMenuScrollToTop,$=v.onMenuScrollToBottom;if(!E)return null;var B=function(N,j){var te=N.type,ae=N.data,oe=N.isDisabled,J=N.isSelected,se=N.label,ne=N.value,ge=m===ae,Se=oe?void 0:function(){return i.onOptionHover(ae)},Ue=oe?void 0:function(){return i.selectOption(ae)},wt="".concat(i.getElementId("option"),"-").concat(j),at={id:wt,onClick:Ue,onMouseMove:Se,onMouseOver:Se,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:J};return z.createElement(p,P({},g,{innerProps:at,data:ae,isDisabled:oe,isSelected:J,key:wt,label:se,type:te,value:ne,isFocused:ge,innerRef:ge?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(N.data,"menu"))},L;if(this.hasOptions())L=this.getCategorizedOptions().map(function(M){if(M.type==="group"){var N=M.data,j=M.options,te=M.index,ae="".concat(i.getElementId("group"),"-").concat(te),oe="".concat(ae,"-heading");return z.createElement(a,P({},g,{key:ae,data:N,options:j,Heading:l,headingProps:{id:oe,data:M.data},label:i.formatGroupLabel(M.data)}),M.options.map(function(J){return B(J,"".concat(te,"-").concat(J.index))}))}else if(M.type==="option")return B(M,"".concat(M.index))});else if(y){var V=C({inputValue:w});if(V===null)return null;L=z.createElement(f,g,V)}else{var q=U({inputValue:w});if(q===null)return null;L=z.createElement(h,g,q)}var ee={minMenuHeight:b,maxMenuHeight:A,menuPlacement:k,menuPosition:F,menuShouldScrollIntoView:T},O=z.createElement(aP,P({},g,ee),function(M){var N=M.ref,j=M.placerProps,te=j.placement,ae=j.maxHeight;return z.createElement(s,P({},g,ee,{innerRef:N,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:y,placement:te}),z.createElement(MO,{captureEnabled:I,onTopArrive:G,onBottomArrive:$,lockEnabled:W},function(oe){return z.createElement(c,P({},g,{innerRef:function(se){i.getMenuListRef(se),oe(se)},innerProps:{role:"listbox","aria-multiselectable":g.isMulti,id:i.getElementId("listbox")},isLoading:y,maxHeight:ae,focusedOption:m}),L)}))});return Y||F==="fixed"?z.createElement(d,P({},g,{appendTo:Y,controlElement:this.controlRef,menuPlacement:k,menuPosition:F}),O):O}},{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 z.createElement($O,{name:c,onFocus:this.onValueInputFocus});if(!(!c||l))if(s)if(a){var h=f.map(function(m){return i.getOptionValue(m)}).join(a);return z.createElement("input",{name:c,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(m,v){return z.createElement("input",{key:"i-".concat(v),name:c,type:"hidden",value:i.getOptionValue(m)})}):z.createElement("input",{name:c,type:"hidden",value:""});return z.createElement("div",null,p)}else{var g=f[0]?this.getOptionValue(f[0]):"";return z.createElement("input",{name:c,type:"hidden",value:g})}}},{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 z.createElement(wO,P({},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,g=this.state.isFocused,m=this.commonProps=this.getCommonProps();return z.createElement(l,P({},m,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:g}),this.renderLiveRegion(),z.createElement(o,P({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:g,menuIsOpen:p}),z.createElement(s,P({},m,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),z.createElement(a,P({},m,{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,g=i.value,m=i.menuIsOpen,v=i.inputValue,I=i.isMulti,w=ns(g),y={};if(a&&(g!==a.value||p!==a.options||m!==a.menuIsOpen||v!==a.inputValue)){var C=m?JO(i,w):[],b=m?qg(ss(i,w),"".concat(h,"-option")):[],A=l?XO(o,w):null,E=ZO(o,C),k=tu(b,E);y={selectValue:w,focusedOption:E,focusedOptionId:k,focusableOptionsWithIds:b,focusedValue:A,clearFocusValueOnUpdate:!1}}var F=s!=null&&i!==a?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},Y=c,W=d&&f;return d&&!W&&(Y={value:oo(I,w,w[0]||null),options:w,action:"initial-input-focus"},W=!f),(c==null?void 0:c.action)==="initial-input-focus"&&(Y=null),ve(ve(ve({},y),F),{},{prevProps:i,ariaSelection:Y,prevWasFocused:W})}}]),n}(x.Component);nm.defaultProps=QO;var tR=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function nR(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,g=Cn(e,tR),m=x.useState(l!==void 0?l:n),v=Vn(m,2),I=v[0],w=v[1],y=x.useState(s!==void 0?s:i),C=Vn(y,2),b=C[0],A=C[1],E=x.useState(p!==void 0?p:a),k=Vn(E,2),F=k[0],Y=k[1],W=x.useCallback(function(V,q){typeof c=="function"&&c(V,q),Y(V)},[c]),T=x.useCallback(function(V,q){var ee;typeof d=="function"&&(ee=d(V,q)),w(ee!==void 0?ee:V)},[d]),U=x.useCallback(function(){typeof h=="function"&&h(),A(!0)},[h]),G=x.useCallback(function(){typeof f=="function"&&f(),A(!1)},[f]),$=l!==void 0?l:I,B=s!==void 0?s:b,L=p!==void 0?p:F;return ve(ve({},g),{},{inputValue:$,menuIsOpen:B,onChange:W,onInputChange:T,onMenuClose:G,onMenuOpen:U,value:L})}var rR=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],rm=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 rm(t,o,i)})||r.some(function(o){return rm(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function iR(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,g=e.onChange,m=Cn(e,rR),v=m.getOptionValue,I=v===void 0?Wg:v,w=m.getOptionLabel,y=w===void 0?Hg:w,C=m.inputValue,b=m.isLoading,A=m.isMulti,E=m.value,k=m.name,F=x.useMemo(function(){return s(C,ns(E),p,{getOptionValue:I,getOptionLabel:y})?d(C,a(C)):void 0},[a,d,y,I,C,s,p,E]),Y=x.useMemo(function(){return(n||!b)&&F?i==="first"?[F].concat(ni(p)):[].concat(ni(p),[F]):p},[n,i,b,F,p]),W=x.useCallback(function(T,U){if(U.action!=="select-option")return g(T,U);var G=Array.isArray(T)?T:[T];if(G[G.length-1]===F){if(f)f(C);else{var $=d(C,C),B={action:"create-option",name:k,option:$};g(oo(A,[].concat(ni(ns(E)),[$]),$),B)}return}g(T,U)},[d,C,A,k,F,f,g,E]);return ve(ve({},m),{},{options:Y,onChange:W})}var oR=x.forwardRef(function(e,t){var n=nR(e),r=iR(n);return z.createElement(nm,P({ref:t},r))}),im=oR;const aR={control:(e,t)=>Z(H({},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=>Z(H({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>Z(H({},e),{minHeight:"36px"}),menu:e=>Z(H({},e),{position:"relative"}),clearIndicator:e=>Z(H({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>Z(H({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>Z(H({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>Z(H({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"14px"}),multiValueLabel:e=>Z(H({},e),{color:"#333"})},sR=e=>e.map(t=>({label:t,value:t})),lR=e=>{const[t,n]=x.useState(""),[r,i]=x.useState(!1),o=sR(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(S.Box,{sx:{marginBottom:"16px"},children:u.jsx(im,{styles:aR,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(pt,{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,g]=x.useState(""),m=x.useRef(null),v=()=>{m.current&&m.current.click()},I=new Op,w=ht(),y=()=>{d(""),i(!1)},C=U=>{let G="",$="primary";switch(U){case"copy_url":G=e.labels.urlCopiedToClipboardMessage,$="primary";break;case"image_deleted":G=e.labels.imageDeletedMessage,$="primary";break;case"image_reset":G=e.labels.imageResetMessage,$="primary";break;case"upload_success":G=e.labels.uploadingImageMessage,$="success";break;case"upload_failed":G=e.labels.uploadingImageErrorMessage,$="danger";break;case"sign_in_url_failed":G=e.labels.generateSignedInUrlErrorMessage,$="danger";break;case"encrypting_file_failed":G=e.labels.encryptingImageErrorMessage,$="danger";break}h($),d(G),i(!0)},b=()=>a(!o),A=()=>s(!l),E=()=>{e.clearImage(),C("image_deleted")},k=U=>{navigator.clipboard.writeText(U),C("copy_url")},F=U=>D(this,null,function*(){U.persist();const G=U.target.files?U.target.files[0]:null;if(G){n(!0);try{const $=G.type.split("/")[1],B=yield I.readFileAndHash(G),L=(yield I.generateHashFileName(G))+"."+$,V={image_type:$,image_file_name:L,image_size:G.size,base64_sum:B},q=yield w==null?void 0:w.https.generateSignedInUrl(V);if(q!=null&&q.ok){const ee=yield q.json(),O={"Content-Type":G.type,"Content-MD5":B};try{const M=new File([G],L,{type:G.type}),N=yield w==null?void 0:w.https.storeInBucket(ee.data.signed_url,M,O);e.onChangeImages(N||""),g(N),C("upload_success")}catch(M){console.error("There was a problem with uploading the file: ",M),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($){console.error("There was a problem with encrypting file...",$),C("encrypting_file_failed")}n(!1)}}),Y=U=>D(this,null,function*(){if(U){n(!0);try{const G=U.type.split("/")[1],$=yield I.readFileAndHash(U),B=(yield I.generateHashFileName(U))+"."+G,L={image_type:G,image_file_name:B,image_size:U.size,base64_sum:$},V=yield w==null?void 0:w.https.generateSignedInUrl(L);if(V!=null&&V.ok){const q=yield V.json(),ee={"Content-Type":U.type,"Content-MD5":$};try{const O=new File([U],B,{type:U.type}),M=yield w==null?void 0:w.https.storeInBucket(q.data.signed_url,O,ee);e.onChangeImages(M||""),C("upload_success")}catch(O){console.error("There was a problem with uploading the file: ",O),C("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield V==null?void 0:V.json()),C("sign_in_url_failed")}catch(G){console.error("There was a problem with encrypting file...",G),C("encrypting_file_failed")}n(!1)}}),W=()=>{e.onChangeImages(p),C("image_reset")},T=U=>{e.onChangeImages(U),g(U)};return u.jsxs(u.Fragment,{children:[u.jsxs(S.Card,{sx:{marginBottom:"10px"},children:[u.jsxs(S.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsx(S.Typography,{level:"title-lg",children:e.title}),u.jsx(S.Tooltip,{title:e.labels.clearImage,children:u.jsx(S.IconButton,{variant:"plain",color:"danger",size:"sm",onClick:E,children:u.jsx(Cp,{})})})]}),u.jsxs(S.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(S.Skeleton,{loading:t,animation:"wave",children:[e.image?u.jsx(S.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(S.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(S.Tooltip,{title:e.labels.copyUrl,children:u.jsx(S.Button,{onClick:()=>k(e.image),disabled:!e.image,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Le.ContentCopy,{})})}),u.jsx(S.Tooltip,{title:e.labels.viewImage,children:u.jsx(S.Button,{onClick:b,disabled:!e.image,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(Bp,{})})}),u.jsx(S.Tooltip,{title:e.labels.cropImage,children:u.jsx(S.Button,{onClick:A,disabled:!e.image,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(eg,{})})})]}),u.jsx(S.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:u.jsxs(S.Button,{sx:{width:"100%"},onClick:v,children:[u.jsx(Le.Upload,{})," ",e.labels.uploadImage,u.jsx($p,{type:"file",accept:"image/*",onChange:F,ref:m})]})}),w.https.sportal365Config?u.jsx(S.AccordionGroup,{variant:"soft",children:u.jsxs(S.Accordion,{children:[u.jsx(S.AccordionSummary,{children:u.jsx(S.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.labels.sportal365Images})}),u.jsx(S.AccordionDetails,{children:u.jsx(Lp,{labels:e.labels,onChangeImages:T})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(pt,{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:A,uploadImage:Y,resetDefaultImageUrl:W})]})},cR=["cover","mobile"],uR=e=>new Map().set("main",e.mainImage).set("cover",e.coverImage).set("mobile",e.mobileImage),dR=e=>e?H({},e):{main:"",mobile:"",cover:""},fR=e=>{const[t,n]=x.useState(!1),r=dR(e.defaultValue),i=uR(e.labels),o=(l,s)=>{r[s]=l,e.onChange(r)},a=l=>{r[l]="",e.onChange(r)};return u.jsxs(S.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(S.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?u.jsx(u.Fragment,{children:cR.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 hR(e){return it("MuiSheet",e)}Xe("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const pR=["className","color","component","variant","invertedColors","slots","slotProps"],gR=e=>{const{variant:t,color:n}=e,r={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`]};return lt(r,hR,{})},mR=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[P({"--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"}),P({},e.typography["body-md"],t.variant==="solid"&&t.color&&t.invertedColors&&H_(t.color)(e),t.variant==="soft"&&t.color&&t.invertedColors&&W_(t.color)(e),(r=e.variants[t.variant])==null?void 0:r[t.color],i)]}),vR=z.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,pR),h=P({},r,{color:o,component:a,invertedColors:s,variant:l}),p=gR(h),g=P({},f,{component:a,slots:c,slotProps:d}),[m,v]=Ie("root",{ref:n,className:Ln(p.root,i),elementType:mR,externalForwardedProps:g,ownerState:h});return u.jsx(m,P({},v))});function bR(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 yR=["color","textColor"],CR=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],ru=z.createContext(!1),xR=z.createContext(!1),wR=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,bR,{})},IR=be("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),SR=be("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),AR=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 P({"--Icon-fontSize":`calc(1em * ${l})`},t.color&&{"--Icon-color":"currentColor"},{margin:"var(--Typography-margin, 0px)"},t.nesting?{display:"inline"}:P({display:"block"},t.unstable_hasSkeleton&&{position:"relative"}),(t.startDecorator||t.endDecorator)&&P({display:"flex",alignItems:"center"},t.nesting&&P({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&&P({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]))}),om={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=z.forwardRef(function(t,n){var r;const i=ct({props:t,name:"JoyTypography"}),{color:o,textColor:a}=i,l=Ae(i,yR),s=z.useContext(ru),c=z.useContext(xR),d=MA(P({},l,{color:a})),{component:f,gutterBottom:h=!1,noWrap:p=!1,level:g="body-md",levelMapping:m=om,children:v,endDecorator:I,startDecorator:w,variant:y,slots:C={},slotProps:b={}}=d,A=Ae(d,CR),E=(r=t.color)!=null?r:y?o!=null?o:"neutral":o,k=s||c?t.level||"inherit":g,F=Gf(v,["Skeleton"]),Y=f||(s?"span":m[k]||om[k]||"span"),W=P({},d,{level:k,component:Y,color:E,gutterBottom:h,noWrap:p,nesting:s,variant:y,unstable_hasSkeleton:F}),T=wR(W),U=P({},A,{component:Y,slots:C,slotProps:b}),[G,$]=Ie("root",{ref:n,className:T.root,elementType:AR,externalForwardedProps:U,ownerState:W}),[B,L]=Ie("startDecorator",{className:T.startDecorator,elementType:IR,externalForwardedProps:U,ownerState:W}),[V,q]=Ie("endDecorator",{className:T.endDecorator,elementType:SR,externalForwardedProps:U,ownerState:W});return u.jsx(ru.Provider,{value:!0,children:u.jsxs(G,P({},$,{children:[w&&u.jsx(B,P({},L,{children:w})),F?z.cloneElement(v,{variant:v.props.variant||"inline"}):v,I&&u.jsx(V,P({},q,{children:I}))]}))})});iu.muiName="Typography";function TR(e){return it("MuiFormControl",e)}const am=Xe("MuiFormControl",["root","error","disabled","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),ER=Xe("MuiSwitch",["root","checked","disabled","action","input","thumb","track","focusVisible","readOnly","colorPrimary","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid","startDecorator","endDecorator"]),_R=["id","className","component","disabled","required","error","color","size","orientation","slots","slotProps"],kR=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,TR,{})},DR=be("div",{name:"JoyFormControl",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i;return P({"--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",[`&.${am.error}`]:{"--FormHelperText-color":e.vars.palette.danger[500]},[`&.${am.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 ~ .${ER.root}`]:{"--unstable_Switch-margin":"0 0 0 auto"}})}),ou=z.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:g={}}=r,m=Ae(r,_R),v=ji(i),[I,w]=z.useState(null),y=P({},r,{id:v,component:a,color:d,disabled:l,error:c,required:s,size:f,orientation:h});let C;const b=kR(y),[A,E]=Ie("root",{ref:n,className:Ln(b.root,o),elementType:DR,externalForwardedProps:P({},m,{component:a,slots:p,slotProps:g}),ownerState:y}),k=z.useMemo(()=>({disabled:l,required:s,error:c,color:d,size:f,htmlFor:v,labelId:`${v}-label`,"aria-describedby":I?`${v}-helper-text`:void 0,setHelperText:w,registerEffect:C}),[d,l,c,I,v,C,s,f]);return u.jsx(Va.Provider,{value:k,children:u.jsx(A,P({},E))})});function PR(e){return it("MuiFormLabel",e)}Xe("MuiFormLabel",["root","asterisk"]);const OR=["children","component","htmlFor","id","slots","slotProps"],RR=()=>lt({root:["root"],asterisk:["asterisk"]},PR,{}),MR=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)"})),LR=be("span",{name:"JoyFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})({color:"var(--FormLabel-asteriskColor)"}),au=z.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,OR),p=z.useContext(Va),g=(r=(i=t.required)!=null?i:p==null?void 0:p.required)!=null?r:!1,m=P({},o,{required:g}),v=RR(),I=P({},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:MR,externalForwardedProps:I,ownerState:m}),[C,b]=Ie("asterisk",{additionalProps:{"aria-hidden":!0},className:v.asterisk,elementType:LR,externalForwardedProps:I,ownerState:m});return u.jsxs(w,P({},y,{children:[a,g&&u.jsxs(C,P({},b,{children:[" ","*"]}))]}))}),BR=({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=()=>D(this,null,function*(){try{yield zi(e).signInWithEmailAndPassword(n,i)}catch(h){console.error(h),s()}});return u.jsxs(u.Fragment,{children:[u.jsx(S.Box,{sx:{minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:u.jsxs(vR,{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(Ua,{name:"email",type:"email",onChange:c})]}),u.jsxs(ou,{children:[u.jsx(au,{children:"Password"}),u.jsx(Ua,{name:"password",type:"password",onChange:d})]}),u.jsx(Xr,{sx:{mt:1},onClick:f,children:"Log in"})]})}),u.jsx(pt,{showToast:a,message:t,color:"danger",hideToast:s})]})};function $R(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"]),NR=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"),FR=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"),zR=["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"],jR=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,$R,{})},VR=be("span",{name:"JoyCheckbox",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i;return P({"--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}})}),UR=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[P({"--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?[]:[P({},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]}]]}),HR=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]}]:[]]}),WR=be("input",{name:"JoyCheckbox",slot:"Input",overridesResolver:(e,t)=>t.input})(()=>({margin:0,opacity:0,position:"absolute",width:"100%",height:"100%",cursor:"pointer"})),GR=be("label",{name:"JoyCheckbox",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>P({flex:1,minWidth:0},e.disableIcon&&{zIndex:1,pointerEvents:"none"})),YR=u.jsx(NR,{}),KR=u.jsx(FR,{}),qR=z.forwardRef(function(t,n){var r,i,o,a,l;const s=ct({props:t,name:"JoyCheckbox"}),{checked:c,uncheckedIcon:d,checkedIcon:f=YR,label:h,defaultChecked:p,disabled:g,disableIcon:m=!1,overlay:v,id:I,indeterminate:w=!1,indeterminateIcon:y=KR,name:C,onBlur:b,onChange:A,onFocus:E,onFocusVisible:k,readOnly:F,required:Y,value:W,color:T,variant:U,size:G="md",component:$,slots:B={},slotProps:L={}}=s,V=Ae(s,zR),q=z.useContext(Va),ee=(r=(i=t.disabled)!=null?i:q==null?void 0:q.disabled)!=null?r:g,O=(o=(a=t.size)!=null?a:q==null?void 0:q.size)!=null?o:G,M=ji(I!=null?I:q==null?void 0:q.htmlFor),N={checked:c,defaultChecked:p,disabled:ee,onBlur:b,onChange:A,onFocus:E,onFocusVisible:k},{getInputProps:j,checked:te,disabled:ae,focusVisible:oe}=SS(N),J=te||w,ge=J?U||"solid":U||"outlined",Se=t.color||(q!=null&&q.error?"danger":(l=q==null?void 0:q.color)!=null?l:T),at=P({},s,{checked:te,disabled:ae,disableIcon:m,overlay:v,focusVisible:oe,color:J?Se||"primary":Se||"neutral",variant:ge,size:O}),kt=jR(at),de=P({},V,{component:$,slots:B,slotProps:L}),[he,Ce]=Ie("root",{ref:n,className:kt.root,elementType:VR,externalForwardedProps:de,ownerState:at}),[Te,He]=Ie("checkbox",{className:kt.checkbox,elementType:UR,externalForwardedProps:de,ownerState:at}),[De,Ee]=Ie("action",{className:kt.action,elementType:HR,externalForwardedProps:de,ownerState:at}),[It,St]=Ie("input",{additionalProps:P({id:M,name:C,value:W,readOnly:F,role:void 0,required:Y!=null?Y:q==null?void 0:q.required,"aria-describedby":q==null?void 0:q["aria-describedby"]},w&&{"aria-checked":"mixed"}),className:kt.input,elementType:WR,externalForwardedProps:de,getSlotProps:j,ownerState:at}),[jt,Mt]=Ie("label",{additionalProps:{htmlFor:M},className:kt.label,elementType:GR,externalForwardedProps:de,ownerState:at});let qt=d;return m?qt=null:w?qt=y:te&&(qt=f),u.jsxs(he,P({},Ce,{children:[u.jsxs(Te,P({},He,{children:[u.jsx(De,P({},Ee,{children:u.jsx(It,P({},St))})),qt]})),h&&u.jsx(ru.Provider,{value:!0,children:u.jsx(jt,P({},Mt,{children:h}))})]}))}),QR=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(S.Box,{sx:{mb:2},children:[u.jsx(S.Typography,{level:"body-sm",mb:1,children:e}),u.jsxs(k1,{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(QR,{fontSize:"medium",color:"primary",sx:{ml:-.5,zIndex:2,pointerEvents:"none"}}),u.jsx(qR,{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(S.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"]},JR=({labels:e,values:t,valuesMap:n,onChange:r})=>{const[i,o]=x.useState(!1);return u.jsxs(S.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(S.FormLabel,{color:"primary",children:e.marketSelection}),u.jsx(S.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="},XR=({match:e,timeFormat:t})=>{var n,r,i,o;return u.jsxs(S.Box,{display:"flex",alignItems:"center",gap:.5,fontSize:"xs",children:[u.jsxs(S.Typography,{mr:1,children:["[",_t(e.kickoffAt).format(t),"]"]}),e.homeTeam.code?u.jsx(S.Tooltip,{title:e.homeTeam.name,children:u.jsxs(S.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[u.jsx(S.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(S.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(S.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(S.Avatar,{src:((r=e.homeTeam.assets)==null?void 0:r.logo)||gt.team,sx:{width:"20px",height:"20px"}})]}),"-",e.awayTeam.code?u.jsx(S.Tooltip,{title:e.awayTeam.name,children:u.jsxs(S.Box,{display:"flex",gap:.5,alignItems:"center",children:[u.jsx(S.Avatar,{src:((i=e.awayTeam.assets)==null?void 0:i.logo)||gt.team,sx:{width:"20px",height:"20px"}})," ",u.jsx(S.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})}):u.jsxs(u.Fragment,{children:[u.jsx(S.Avatar,{src:((o=e.awayTeam.assets)==null?void 0:o.logo)||gt.team,sx:{width:"20px",height:"20px"}}),u.jsx(S.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})]})},sm=Ve(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),ZR=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),{sdk:l}=ht(),s=()=>D(this,null,function*(){try{const h=yield l.topX.getGames({limit:50},!0),p=yield l.matchQuiz.getGames({limit:50},!0),g=[...h.data,...p.data];if(e.related&&e.related.length>0){const m=g.filter(v=>{var I;return(I=e.related)==null?void 0:I.some(w=>w.entity_id===v.id)}).map(v=>v.id);n(m)}i(g)}catch(f){console.error(f),d()}}),c=(f,h)=>{const p=h.map(g=>({entity_id:g,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(S.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(S.FormLabel,{color:"primary",children:e.label}),u.jsx(S.Select,{multiple:!0,indicator:u.jsx(sm,{}),defaultValue:t,renderValue:f=>u.jsx(S.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(S.Chip,{variant:"soft",color:"primary",children:h.label},`related-game-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${S.selectClasses.indicator}`]:{transition:"0.2s",[`&.${S.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(S.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(pt,{showToast:o,message:"There was a problem witch fetching games for related options",color:"danger",hideToast:d})]})},eM=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),{sdk:l}=ht(),s=()=>D(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(g=>{var m;return(m=e.related)==null?void 0:m.some(v=>v.entity_id===g.id)}).map(g=>g.id);n(p)}i(h.data)}catch(f){console.error(f),d()}}),c=(f,h)=>{const p=h.map(g=>({entity_id:g,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(S.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(S.FormLabel,{color:"primary",children:e.label}),u.jsx(S.Select,{multiple:!0,indicator:u.jsx(sm,{}),defaultValue:t,renderValue:f=>u.jsx(S.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(S.Chip,{variant:"soft",color:"primary",children:h.label},`related-template-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${S.selectClasses.indicator}`]:{transition:"0.2s",[`&.${S.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(S.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(pt,{showToast:o,message:"There was a problem witch fetching templates for related options",color:"danger",hideToast:d})]})},lm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="game"),cm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="template"),tM=e=>{const t=(n,r)=>{if(r==="games"){const i=cm(e.related);e.onChange([...n,...i])}if(r==="templates"){const i=lm(e.related);e.onChange([...n,...i])}};return u.jsxs(u.Fragment,{children:[u.jsx(ZR,{label:e.labels.games,related:lm(e.related),onChange:n=>t(n,"games")}),u.jsx(eM,{label:e.labels.templates,related:cm(e.related),onChange:n=>t(n,"templates")})]})},nM=(e,t)=>{const[n,r]=x.useState(null),{https:i}=ht(),o=()=>D(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},cs=({my:e})=>u.jsx(S.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",my:e},children:u.jsx(S.CircularProgress,{variant:"solid",color:"neutral"})}),rM=["PENDING","LIVE","SETTLED"],iM=["CANCELED","LIVE","OPEN","PENDING"],oM=["ACTIVE","INACTIVE","EXPIRED"],aM=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"),um=e=>{let t=[];return e.entityType==="CLASSIC_QUIZ"||e.entityType==="EITHER_OR"||e.entityType==="POLL"?t=Array.from(oM):e.entityType==="TEMPLATE"?t=Array.from(rM):t=Array.from(iM),u.jsx(u.Fragment,{children:t.map(n=>u.jsx(S.Option,{value:n,children:aM.get(n)},`${e.entityType}-${n}-status`))})};class sM{constructor(){le(this,"name","");le(this,"scheduled_task_config",{entity_id:"",entity_type:"",change:{status:""}});le(this,"trigger",{trigger_type:"DATETIME",date:""})}}const lM=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"),cM=e=>{const[t,n]=x.useState(!1),{https:r}=ht(),i=o=>D(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(S.Modal,{open:e.isOpen,onClose:e.toggleModal,children:u.jsxs(S.ModalDialog,{children:[u.jsxs(S.DialogTitle,{children:[u.jsx(lM,{}),e.labels.deleteScheduledTaskModalTitle]}),u.jsx(S.Divider,{}),u.jsx(S.DialogContent,{children:u.jsxs(S.Typography,{children:[e.labels.deleteScheduledTaskModalParagraph,u.jsx(S.Typography,{fontWeight:"bold",children:e.taskName}),"?"]})}),u.jsxs(S.DialogActions,{children:[u.jsx(S.Button,{loading:t,variant:"solid",color:"danger",onClick:o=>i(o),children:e.labels.delete}),u.jsx(S.Button,{variant:"plain",color:"neutral",onClick:o=>{o.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]})})})},uM=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,g]=x.useState(!1),[m,v]=x.useState(!1),[I,w]=x.useState("success"),[y,C]=x.useState(""),[b,A]=x.useState(!1),E=x.useRef(!1),k=nM(e.entityId,E.current),{https:F}=ht();if(!k)return u.jsx(cs,{my:10});const Y=()=>A(!b),W=(L,V)=>{v(!0),w(L),C(V)},T=(L,V)=>{i(V.scheduled_task_config.change.status),s(V.trigger.date),n(L)},U=()=>D(this,null,function*(){h(!0);const L=B("CREATE","");if((yield F.setSchedulers(L,"CREATE",null)).ok){h(!1),a(""),d(""),E.current=!E.current,W("success",e.labels.createScheduledTaskMessage);return}h(!1),a(""),d(""),W("danger",e.labels.createScheduledTaskErrorMessage)}),G=(L,V)=>D(this,null,function*(){g(!0);const q=B("UPDATE",V);if((yield F.setSchedulers(q,"UPDATE",L)).ok){g(!1),n(null),i(""),s(""),E.current=!E.current,W("success",e.labels.updateScheduledTaskMessage);return}g(!1),W("danger",e.labels.updateScheduledTaskErrorMessage),n(null),i(""),s("")}),$=()=>{E.current=!E.current},B=(L,V)=>{const q=new sM,ee=L==="CREATE"?o:r,O=L==="CREATE"?null:V,M=L==="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=M,q.name=O,q};return u.jsxs(u.Fragment,{children:[k.map((L,V)=>u.jsx(S.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(S.CardContent,{children:t===V?u.jsxs(S.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%"},children:[u.jsxs(S.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(S.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(S.Select,{value:r,size:"sm",name:"status",onChange:(q,ee)=>i(ee),sx:{minHeight:"36px"},children:u.jsx(um,{entityType:e.entityType})})]}),u.jsxs(S.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(S.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Vc,{defaultDate:l,onChange:q=>s(q)})]}),r&&l?u.jsx(S.Button,{onClick:()=>G(L.id,L.name),loading:p,sx:{mt:"auto"},children:e.labels.save}):u.jsx(S.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.save})]}):u.jsxs(S.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"}},children:[u.jsxs(S.Box,{children:[u.jsxs(S.Typography,{style:{fontWeight:"bold"},children:[e.labels.name,": ",u.jsx(S.Typography,{whiteSpace:"wrap",children:L.name})]}),u.jsxs(S.Typography,{style:{color:"gray"},children:[e.labels.status,": ",u.jsx(S.Typography,{whiteSpace:"wrap",children:L.status})]})]}),u.jsxs(S.Box,{children:[u.jsx(S.Tooltip,{title:e.labels.edit,children:u.jsx(S.IconButton,{onClick:()=>T(V,L),children:u.jsx(Le.Edit,{})})}),u.jsx(S.Tooltip,{title:e.labels.delete,children:u.jsx(S.IconButton,{onClick:Y,children:u.jsx(Le.Delete,{})})})]}),u.jsx(cM,{labels:e.labels,isOpen:b,taskId:L.id,taskName:L.name,toggleModal:Y,refetchTasks:$,toggleToast:W})]})})},`scheduled-task-${e.entityId}-${e.entityType}-${L.id}`)),u.jsxs(S.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%",mt:k&&k.length?2:0},children:[u.jsxs(S.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(S.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(S.Select,{value:o,size:"sm",name:"status",onChange:(L,V)=>a(V),sx:{minHeight:"37px"},children:u.jsx(um,{entityType:e.entityType})})]}),u.jsxs(S.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(S.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Vc,{defaultDate:c,onChange:L=>d(L)})]}),o&&c?u.jsx(S.Button,{onClick:U,loading:f,sx:{mt:"auto"},children:e.labels.create}):u.jsx(S.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.create})]}),u.jsx(pt,{showToast:m,message:y,color:I,hideToast:()=>v(!1)})]})};function dM(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 fM=["children","action","component","color","disabled","variant","loading","loadingIndicator","size","slots","slotProps"],hM=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,dM,{});return r&&i&&(c.root+=` ${i}`),c},pM=be("button")(({theme:e,ownerState:t})=>{var n,r,i,o;return[P({"--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]:P({"--Icon-color":"currentColor"},e.focus.default)}),P({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":P({"--Icon-color":"currentColor"},(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color])},'&:active, &[aria-pressed="true"]':P({"--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]})]}),gM=be(pM,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),mM=be("span",{name:"JoyIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e,ownerState:t})=>{var n,r;return P({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})}),dm=z.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:g={},slotProps:m={}}=i,v=Ae(i,fM),I=z.useContext(Sp),w=z.useContext(Ap),y=t.variant||I.variant||d,C=t.size||I.size||p,b=t.color||I.color||s,A=(r=t.loading||t.disabled)!=null?r:I.disabled||f||c,E=z.useRef(null),k=sn(E,n),{focusVisible:F,setFocusVisible:Y,getRootProps:W}=Rl(P({},i,{disabled:A,rootRef:k})),T=h!=null?h:u.jsx(wp,{color:b,thickness:{sm:2,md:3,lg:4}[C]||3});z.useImperativeHandle(a,()=>({focusVisible:()=>{var M;Y(!0),(M=E.current)==null||M.focus()}}),[Y]);const U=P({},i,{component:l,color:b,disabled:A,variant:y,loading:f,size:C,focusVisible:F,instanceSize:t.size}),G=hM(U),$=M=>{var N;let j=i.onClick;if(typeof m.root=="function"?j=m.root(U).onClick:m.root&&(j=m.root.onClick),(N=j)==null||N(M),w){var te;(te=w.onClick)==null||te.call(w,M,i.value)}};let B=i["aria-pressed"];typeof m.root=="function"?B=m.root(U)["aria-pressed"]:m.root&&(B=m.root["aria-pressed"]),w!=null&&w.value&&(Array.isArray(w.value)?B=w.value.indexOf(i.value)!==-1:B=w.value===i.value);const L=P({},v,{component:l,slots:g,slotProps:m}),[V,q]=Ie("root",{ref:n,className:G.root,elementType:gM,getSlotProps:W,externalForwardedProps:L,ownerState:U,additionalProps:{onClick:$,"aria-pressed":B}}),[ee,O]=Ie("loadingIndicator",{className:G.loadingIndicator,elementType:mM,externalForwardedProps:L,ownerState:U});return u.jsx(V,P({},q,{children:f?u.jsx(ee,P({},O,{children:T})):o}))});dm.muiName="IconButton";const fm=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"),vM=({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(S.ListItemDecorator,{children:u.jsx(S.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(S.FormControl,{sx:{mb:1},children:[u.jsx(S.FormLabel,{required:r,color:"primary",children:e}),u.jsx(S.Select,Z(H({slotProps:{button:{sx:{whiteSpace:"nowrap"}}},sx:{"--ListItemDecorator-size":"44px",minHeight:"37px"},renderValue:o,value:t,onChange:l},t&&{endDecorator:u.jsx(dm,{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(fm,{})}),indicator:null}),{children:n.map((s,c)=>{var d;return u.jsxs(x.Fragment,{children:[c!==0?u.jsx(S.ListDivider,{role:"none"}):null,u.jsxs(S.Option,{value:s.id,label:s.name,children:[u.jsx(S.ListItemDecorator,{children:u.jsx(S.Avatar,{size:"sm",src:((d=s.assets)==null?void 0:d.logo)||gt.competition})}),s.name]})]},`${s.id}-${c}`)})}))]})};function bM(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hm=bM,yM=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,CM=yM,xM=CM,wM=typeof self=="object"&&self&&self.Object===Object&&self,IM=xM||wM||Function("return this")(),pm=IM,SM=pm,AM=function(){return SM.Date.now()},TM=AM,EM=/\s/;function _M(e){for(var t=e.length;t--&&EM.test(e.charAt(t)););return t}var kM=_M,DM=kM,PM=/^\s+/;function OM(e){return e&&e.slice(0,DM(e)+1).replace(PM,"")}var RM=OM,MM=pm,LM=MM.Symbol,su=LM,gm=su,mm=Object.prototype,BM=mm.hasOwnProperty,$M=mm.toString,lo=gm?gm.toStringTag:void 0;function NM(e){var t=BM.call(e,lo),n=e[lo];try{e[lo]=void 0;var r=!0}catch(o){}var i=$M.call(e);return r&&(t?e[lo]=n:delete e[lo]),i}var FM=NM,zM=Object.prototype,jM=zM.toString;function VM(e){return jM.call(e)}var UM=VM,vm=su,HM=FM,WM=UM,GM="[object Null]",YM="[object Undefined]",bm=vm?vm.toStringTag:void 0;function KM(e){return e==null?e===void 0?YM:GM:bm&&bm in Object(e)?HM(e):WM(e)}var qM=KM;function QM(e){return e!=null&&typeof e=="object"}var JM=QM,XM=qM,ZM=JM,eL="[object Symbol]";function tL(e){return typeof e=="symbol"||ZM(e)&&XM(e)==eL}var ym=tL,nL=RM,Cm=hm,rL=ym,xm=NaN,iL=/^[-+]0x[0-9a-f]+$/i,oL=/^0b[01]+$/i,aL=/^0o[0-7]+$/i,sL=parseInt;function lL(e){if(typeof e=="number")return e;if(rL(e))return xm;if(Cm(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Cm(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=nL(e);var n=oL.test(e);return n||aL.test(e)?sL(e.slice(2),n?2:8):iL.test(e)?xm:+e}var cL=lL,uL=hm,lu=TM,wm=cL,dL="Expected a function",fL=Math.max,hL=Math.min;function pL(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(dL);t=wm(t)||0,uL(n)&&(d=!!n.leading,f="maxWait"in n,o=f?fL(wm(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(A){var E=r,k=i;return r=i=void 0,c=A,a=e.apply(k,E),a}function g(A){return c=A,l=setTimeout(I,t),d?p(A):a}function m(A){var E=A-s,k=A-c,F=t-E;return f?hL(F,o-k):F}function v(A){var E=A-s,k=A-c;return s===void 0||E>=t||E<0||f&&k>=o}function I(){var A=lu();if(v(A))return w(A);l=setTimeout(I,m(A))}function w(A){return l=void 0,h&&r?p(A):(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 A=lu(),E=v(A);if(r=arguments,i=this,s=A,E){if(l===void 0)return g(s);if(f)return clearTimeout(l),l=setTimeout(I,t),p(s)}return l===void 0&&(l=setTimeout(I,t)),a}return b.cancel=y,b.flush=C,b}var gL=pL;const si=fn(gL),xn=({option:e})=>u.jsxs(S.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(S.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:e.logo}),u.jsx(S.Typography,{children:e.label}),u.jsx(S.Typography,{ml:.5,level:"body-xs",children:`(${e.countryName})`})]}),Im=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}}))||[],mL=({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,g]=x.useState(!1),{sdk:m}=ht(),v=()=>g(!p),I=(b,A)=>{a(A),i(A[0]?[A[0].id]:[])},w=3;x.useEffect(()=>{!f&&n&&n.length&&m.football.getCompetitions({competitionIds:n}).then(b=>{a(Im(b))}).catch(b=>{console.error(b),v(),a([])})},[]);const y=x.useMemo(()=>si(b=>{d(!0),m.football.getCompetitions({name:b}).then(A=>{s([...Im(A)]),d(!1)}).catch(A=>{console.error(A),v(),s([]),d(!1)})},300),[]);x.useEffect(()=>{if(!f||f.length<w){s([]);return}return y(f),()=>y.cancel()},[f,y]);const C=(b,A)=>b.map((E,k)=>u.jsx(S.Chip,{variant:"solid",endDecorator:u.jsx(S.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:F=>A({index:k}).onClick(F),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(S.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(S.FormLabel,{required:r,color:"primary",children:t}),u.jsx(S.Box,{children:u.jsx(S.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:c,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(b,A)=>b.id===A.id,endDecorator:c?u.jsx(S.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.competitionsSelectionPlaceholder,options:l,disabled:o.length===1,filterOptions:b=>b.filter(A=>!o.some(E=>E.value===A.value)),onInputChange:(b,A)=>{h(A)},onChange:I,getOptionKey:b=>b.id,value:o,renderTags:C,renderOption:(b,A)=>u.jsx(S.AutocompleteOption,Z(H({},b),{children:u.jsx(xn,{option:A})}))})}),u.jsx(pt,{showToast:p,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:v})]})},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}}))||[],vL=({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:g}=ht(),m=()=>p(!h),v=(C,b)=>{o(b);const A=b.map(E=>E.id);r(A&&A.length?A:null)},I=3;x.useEffect(()=>{!d&&t&&t.length&&g.football.getCompetitions({competitionIds:t}).then(C=>{o(Sm(C))}).catch(C=>{console.error(C),m(),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,g.football.getCompetitions(b).then(A=>{l([...Sm(A)]),c(!1)}).catch(A=>{console.error(A),m(),l([]),c(!1)})},300),[]);x.useEffect(()=>{if(!d||d.length<I){l([]);return}return w(d),()=>w.cancel()},[d,w]);const y=(C,b)=>C.map((A,E)=>u.jsx(S.Chip,{variant:"solid",endDecorator:u.jsx(S.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>b({index:E}).onClick(k),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:A},`option_${A.id}`)},A.id));return u.jsxs(u.Fragment,{children:[u.jsx(S.Box,{sx:{marginBottom:"16px"},children:u.jsx(S.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(S.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.competitionsSelectionPlaceholder,options:a,filterOptions:C=>C.filter(b=>!i.some(A=>A.value===b.value)),onInputChange:(C,b)=>{f(b)},onChange:v,getOptionKey:C=>C.id,value:i,renderTags:y,renderOption:(C,b)=>u.jsx(S.AutocompleteOption,Z(H({},C),{children:u.jsx(xn,{option:b})}))})}),u.jsx(pt,{showToast:h,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:m})]})},Am=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})))||[],bL=({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}=ht(),g=()=>h(!f),m=(y,C)=>{i(C);const b=C.map(A=>A.id);n(b&&b.length?b:null)},v=3;x.useEffect(()=>{!c&&t&&t.length&&p.profile.getByIds(t).then(y=>{i(Am(y))}).catch(y=>{g(),console.error(y),i([])})},[]);const I=x.useMemo(()=>si(y=>{s(!0),p.profile.getByIds([],y).then(C=>{a([...Am(C)]),s(!1)}).catch(C=>{console.error(C),g(),a([]),s(!1)})},300),[]);x.useEffect(()=>{if(!c||c.length<v){a([]);return}return I(c),()=>I.cancel()},[c,I]);const w=(y,C)=>y.map((b,A)=>{var E;return u.jsx(S.Chip,{variant:"solid",endDecorator:u.jsx(S.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>C({index:A}).onClick(k),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsxs(S.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(S.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(E=b.avatar)!=null?E:gt.avatar}),u.jsx(S.Typography,{children:b.label})]})},b.id)});return u.jsxs(u.Fragment,{children:[u.jsx(S.Box,{sx:{marginBottom:"16px"},children:u.jsx(S.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(S.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:m,getOptionKey:y=>y.id,value:r,renderTags:w,renderOption:(y,C)=>{var b;return u.jsx(S.AutocompleteOption,Z(H({},y),{children:u.jsxs(S.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(S.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(b=C.avatar)!=null?b:gt.avatar}),u.jsx(S.Typography,{children:C.label})]})}))}})}),u.jsx(pt,{showToast:f,message:e.searchProfilesErrorMessage,color:"danger",hideToast:g})]})},Tm=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}}))||[],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:g}=ht(),m=()=>p(!h),v=(C,b)=>{o(b);const A=b.map(E=>E.id);r(A&&A.length?A:null)},I=3;x.useEffect(()=>{!d&&t&&t.length&&g.football.getTeams({teamIds:t,scope:n}).then(C=>{const b=C.data.filter(A=>!A.name.includes("/"));o(Tm(b))}).catch(C=>{console.error(C),m(),o([])})},[]);const w=x.useMemo(()=>si(C=>{c(!0),g.football.getTeams({name:C,scope:n}).then(b=>{const A=b.data.filter(E=>!E.name.includes("/"));l([...Tm(A)]),c(!1)}).catch(b=>{console.error(b),m(),l([]),c(!1)})},300),[]);x.useEffect(()=>{if(!d||d.length<I){l([]);return}return w(d),()=>w.cancel()},[d,w]);const y=(C,b)=>C.map((A,E)=>u.jsx(S.Chip,{variant:"solid",endDecorator:u.jsx(S.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>b({index:E}).onClick(k),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:A},`option_${A.id}`)},A.id));return u.jsxs(u.Fragment,{children:[u.jsx(S.Box,{sx:{marginBottom:"16px"},children:u.jsx(S.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(S.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.teamsSelectionPlaceholder,options:a,filterOptions:C=>C.filter(b=>!i.some(A=>A.value===b.value)),onInputChange:(C,b)=>{f(b)},onChange:v,getOptionKey:C=>C.id,value:i,renderTags:y,renderOption:(C,b)=>u.jsx(S.AutocompleteOption,Z(H({},C),{children:u.jsx(xn,{option:b})}))})}),u.jsx(pt,{showToast:h,message:e.searchTeamsErrorMessage,color:"danger",hideToast:m})]})},Em=({checked:e,disabled:t,onChange:n})=>u.jsx(S.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"},[`&.${S.switchClasses.checked}`]:{"--Switch-trackBackground":"#5CB176","&:hover":{"--Switch-trackBackground":"#5CB176"}}}}),CL=({label:e,defaultValue:t,description:n,disabled:r,descriptionColor:i,onChange:o})=>n?u.jsxs(S.Box,{mb:2,children:[u.jsx(S.Typography,{component:"label",endDecorator:u.jsx(Em,{checked:t,disabled:r,onChange:o}),children:e}),u.jsx(S.Typography,{level:"body-sm",color:i||"neutral",children:n})]}):u.jsx(S.Typography,{sx:()=>({marginBottom:"16px"}),component:"label",endDecorator:u.jsx(Em,{checked:t,disabled:r,onChange:o}),children:e}),xL={control:(e,t)=>Z(H({},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=>Z(H({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>Z(H({},e),{minHeight:"36px"}),menu:e=>Z(H({},e),{position:"relative"}),clearIndicator:e=>Z(H({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>Z(H({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>Z(H({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>Z(H({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"13px"}),multiValueLabel:e=>Z(H({},e),{color:"#333"})},wL=e=>e.map(t=>({label:t,value:t})),_m=e=>{const[t,n]=x.useState(""),[r,i]=x.useState(!1),o=wL(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(im,{styles:xL,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(pt,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},IL=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 km{constructor(){le(this,"contestId","");le(this,"contestType","");le(this,"description","");le(this,"userList",[])}}const SL=(e,t,n)=>{const[r,i]=x.useState(null),{sdk:o}=ht(),a=()=>D(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 km)}});return x.useEffect(()=>{a()},[]),r};class AL{constructor(){le(this,"position","");le(this,"profileId","");le(this,"note","");le(this,"tags",[])}}function TL(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 EL=TL,_L=Array.isArray,kL=_L,Dm=su,DL=EL,PL=kL,OL=ym,RL=1/0,Pm=Dm?Dm.prototype:void 0,Om=Pm?Pm.toString:void 0;function Rm(e){if(typeof e=="string")return e;if(PL(e))return DL(e,Rm)+"";if(OL(e))return Om?Om.call(e):"";var t=e+"";return t=="0"&&1/e==-RL?"-0":t}var ML=Rm,LL=ML;function BL(e){return e==null?"":LL(e)}var Mm=BL;function $L(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 NL=$L;function FL(e){return function(t){return e==null?void 0:e[t]}}var zL=FL,jL=zL,VL={À:"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"},UL=jL(VL),HL=UL,WL=HL,GL=Mm,YL=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,KL="\\u0300-\\u036f",qL="\\ufe20-\\ufe2f",QL="\\u20d0-\\u20ff",JL=KL+qL+QL,XL="["+JL+"]",ZL=RegExp(XL,"g");function e2(e){return e=GL(e),e&&e.replace(YL,WL).replace(ZL,"")}var t2=e2,n2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function r2(e){return e.match(n2)||[]}var i2=r2,o2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function a2(e){return o2.test(e)}var s2=a2,Lm="\\ud800-\\udfff",l2="\\u0300-\\u036f",c2="\\ufe20-\\ufe2f",u2="\\u20d0-\\u20ff",d2=l2+c2+u2,Bm="\\u2700-\\u27bf",$m="a-z\\xdf-\\xf6\\xf8-\\xff",f2="\\xac\\xb1\\xd7\\xf7",h2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",p2="\\u2000-\\u206f",g2=" \\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",Nm="A-Z\\xc0-\\xd6\\xd8-\\xde",m2="\\ufe0e\\ufe0f",Fm=f2+h2+p2+g2,zm="['’]",jm="["+Fm+"]",v2="["+d2+"]",Vm="\\d+",b2="["+Bm+"]",Um="["+$m+"]",Hm="[^"+Lm+Fm+Vm+Bm+$m+Nm+"]",y2="\\ud83c[\\udffb-\\udfff]",C2="(?:"+v2+"|"+y2+")",x2="[^"+Lm+"]",Wm="(?:\\ud83c[\\udde6-\\uddff]){2}",Gm="[\\ud800-\\udbff][\\udc00-\\udfff]",li="["+Nm+"]",w2="\\u200d",Ym="(?:"+Um+"|"+Hm+")",I2="(?:"+li+"|"+Hm+")",Km="(?:"+zm+"(?:d|ll|m|re|s|t|ve))?",qm="(?:"+zm+"(?:D|LL|M|RE|S|T|VE))?",Qm=C2+"?",Jm="["+m2+"]?",S2="(?:"+w2+"(?:"+[x2,Wm,Gm].join("|")+")"+Jm+Qm+")*",A2="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",T2="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",E2=Jm+Qm+S2,_2="(?:"+[b2,Wm,Gm].join("|")+")"+E2,k2=RegExp([li+"?"+Um+"+"+Km+"(?="+[jm,li,"$"].join("|")+")",I2+"+"+qm+"(?="+[jm,li+Ym,"$"].join("|")+")",li+"?"+Ym+"+"+Km,li+"+"+qm,T2,A2,Vm,_2].join("|"),"g");function D2(e){return e.match(k2)||[]}var P2=D2,O2=i2,R2=s2,M2=Mm,L2=P2;function B2(e,t,n){return e=M2(e),t=n?void 0:t,t===void 0?R2(e)?L2(e):O2(e):e.match(t)||[]}var $2=B2,N2=NL,F2=t2,z2=$2,j2="['’]",V2=RegExp(j2,"g");function U2(e){return function(t){return N2(z2(F2(t).replace(V2,"")),e,"")}}var H2=U2,W2=H2,G2=W2(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Y2=G2;const K2=fn(Y2);class q2{constructor(){le(this,"id","");le(this,"value","");le(this,"label","")}}class Q2 extends q2{constructor(){super(...arguments);le(this,"logo","");le(this,"countryFlag","");le(this,"countryName","")}}class Xm extends Q2{constructor(){super(...arguments);le(this,"group","")}}const J2=(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)=>Z(H({},n),{[K2(r)]:cu(e[r])}),{}):e,Zm=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 Xm;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},X2=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"}},Z2=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"}},eB=({profile:e,winner:t,labels:n,onChange:r,onRemove:i})=>{var v,I,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=A=>{A.persist();const{value:E}=A.target;a(E),r("position",E)},p=A=>{A.persist();const{value:E}=A.target;s(E),r("note",E)},g=A=>{d(A),r("tags",A)},m=()=>{a(""),s(""),d([]),i()};return u.jsxs("tr",{style:{backgroundColor:f?"rgb(255 237 213)":""},children:[u.jsx("td",{children:u.jsxs(S.Box,{display:"flex",alignItems:"center",children:[u.jsx(S.Avatar,{src:((v=e.profileModel)==null?void 0:v.avatar)||"",alt:((I=e.profileModel)==null?void 0:I.name)||"Unknown",sx:{mr:1}}),u.jsxs(S.Box,{children:[u.jsxs(S.Typography,{fontWeight:"md",children:[J2((w=e.profileModel)==null?void 0:w.name,(y=e.profileModel)==null?void 0:y.nickname)," ",(C=e.profileModel)!=null&&C.name?u.jsxs(S.Typography,{children:["(",(b=e.profileModel)==null?void 0:b.name,")"]}):u.jsx(u.Fragment,{})]}),u.jsx(S.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(S.Input,{name:"position",placeholder:"#",value:o,onChange:h,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(S.Input,{name:"note",value:l,placeholder:"This user has...",onChange:p,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(_m,{labels:n,tags:c,onChange:g})}),u.jsx("td",{children:u.jsx(S.Tooltip,{title:n.clearWinner,children:u.jsx(S.IconButton,{onClick:m,variant:"outlined",color:"danger",disabled:!f,children:u.jsx(Le.Remove,{})})})})]})},tB=e=>{const t=(i,o,a)=>{if(e.winners.find(d=>d.profileId===i)){const d=e.winners.map(f=>f.profileId===i?Z(H({},f),{[o]:a}):f);r(d);return}const s=new AL;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=>Z(H({},o),{userList:i}))};return e.leaderboard?u.jsxs(u.Fragment,{children:[u.jsx(S.Typography,{level:"h4",children:e.labels.configureWinners}),e.leaderboard.length===0?u.jsx(S.Typography,{level:"body-lg",textAlign:"center",fontWeight:"bold",children:e.labels.noStandingsAvailable}):u.jsx(u.Fragment,{}),u.jsxs(S.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(eB,{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(S.Box,{textAlign:"center",my:1,children:u.jsx(S.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(cs,{my:40})},nB=(e,t,n,r,i)=>{const[o,a]=x.useState(null),[l,s]=x.useState(!1),[c,d]=x.useState(!1),{sdk:f}=ht(),h=()=>D(this,null,function*(){d(!0);const p={limit:10,page:r},g=!0;try{let m;t==="template"?m=yield f.loyalty.getLeaderboard(e,p,g):m=yield f.loyalty.getLeaderboardForGame(e,p,g),m.meta.pagination.numberOfPages>r?s(!0):s(!1),o&&o.length?a(v=>[...v,...m.data]):a(m.data)}catch(m){console.error(m),i("danger",n),a([])}d(!1)});return x.useEffect(()=>{h()},[r]),{leaderboard:o,hasMoreParticipants:l,isLeaderboardLoading:c}};class rB{constructor(){le(this,"isValid",!0);le(this,"message","");le(this,"validate",(t,n,r)=>(this.validateField(t,n),this.validateWinnerIds(t,r),this));le(this,"validateField",(t,n)=>{const r=t.every(i=>i.position&&i.profileId);r||(this.isValid=r,this.message=n)});le(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 iB=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(S.Card,{variant:"plain",children:t?u.jsxs(u.Fragment,{children:[u.jsx(S.Typography,{level:"body-lg",mb:2,fontWeight:"bold",children:e.labels.preview}),u.jsx(S.Sheet,{children:u.jsxs(S.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(S.Box,{display:"flex",alignItems:"center",justifyContent:{xs:"center",md:"flex-start"},gap:2,children:[u.jsx(S.Avatar,{src:(r==null?void 0:r.avatar)||"",alt:(r==null?void 0:r.name)||"Unknown"}),u.jsxs(S.Box,{textAlign:"left",children:[u.jsxs(S.Typography,{fontWeight:"bold",children:[(r==null?void 0:r.nickname)||"-------------"," ",u.jsxs(S.Typography,{children:["(",(r==null?void 0:r.name)||"-------------",")"]})]}),u.jsx(S.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(S.Chip,{variant:"soft",color:"neutral",size:"sm",sx:{mr:1},children:o},`preview-winner-${n.profileId}-tag-${o}`))})]},`preview-winner-${n.profileId}`)})})]})})]}):u.jsx(S.Typography,{textAlign:"center",fontWeight:"bold",children:e.labels.noSetWinnersMessage})})},oB=e=>Object.keys(e).length?(e.userList||(e.userList=[]),e):new km,aB=e=>{var b;const[t,n]=x.useState(oB(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,g]=x.useState(""),m=(A,E)=>{h(A),g(E),d(!0)},{leaderboard:v,hasMoreParticipants:I,isLeaderboardLoading:w}=nB(e.entityId,e.entityType,e.labels.leaderboardErrorMessage,l,m),{https:y}=ht(),C=()=>D(this,null,function*(){a(!0);const A=JSON.parse(JSON.stringify(t));if(A.contestId=e.entityId,A.contestType=e.entityType==="template"?"TEMPLATE":"GAME",A.description=r,delete A.contestModel,A.userList.length>0){const k=new rB().validate(A.userList,e.labels.positionAndWinnerRequiredMessage,e.labels.sameChosenWinnerMessage);if(!k.isValid){m("danger",k.message),a(!1);return}}else delete A.userList;const E=cu(A);try{yield y.setWinners(E),m("success",Object.keys(e.winners).length?e.labels.editWinnersMessage:e.labels.createWinnersMessage)}catch(k){console.error(k),m("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(S.Box,{width:"100%",overflow:"hidden",borderRadius:"4px",bgcolor:"#fff",children:u.jsxs(S.Box,{width:"100%",sx:{overflowX:"auto"},children:[u.jsxs(S.Card,{variant:"plain",children:[u.jsx(ic,{property:"description",label:e.labels.description,defaultValue:r,placeholder:e.labels.winnersDescription,onChange:A=>{i(A)}}),u.jsx(tB,{winners:t.userList,leaderboard:v,hasMoreParticipants:I,isLoading:w,setPage:s,setWinnersRequestBody:n,labels:e.labels}),u.jsx(S.Box,{textAlign:"center",my:3,children:u.jsx(S.Button,{variant:"solid",color:"primary",onClick:C,loading:o,children:e.labels.save})}),u.jsx(S.Divider,{sx:{my:4}})]}),v?u.jsx(iB,{winners:t,profiles:v.map(A=>A.profileModel),labels:e.labels}):u.jsx(u.Fragment,{})]})})}),u.jsx(pt,{showToast:c,color:f,message:p,hideToast:()=>d(!1)})]})},sB=e=>{const[t,n]=x.useState(!1),r=()=>n(!0),i=SL(e.entityId,e.entityType,r);return i?u.jsxs(u.Fragment,{children:[u.jsxs(S.Box,{p:2,children:[u.jsx(S.Typography,{fontSize:"12px",sx:{cursor:"pointer"},startDecorator:u.jsx(IL,{fontSize:"inherit"}),onClick:e.onClickBack,children:e.labels.back}),u.jsxs(S.Typography,{level:"h3",children:[e.labels.manageWinners,":"," ",u.jsx(S.Typography,{level:"title-lg",fontWeight:"italic",children:e.entityName})]})]}),u.jsx(aB,{labels:e.labels,winners:i,entityId:e.entityId,entityType:e.entityType}),u.jsx(pt,{showToast:t,color:"danger",message:e.labels.winnersErrorMessage,hideToast:()=>n(!1)})]}):u.jsx(cs,{my:50})},lB=10,cB=e=>{var f;const[t,n]=x.useState([]),[r,i]=x.useState(!1),[o,a]=x.useState(""),{sdk:l}=ht(),s=x.useMemo(()=>si(h=>{if(!h){n([]),i(!1);return}i(!0),l.football.search({query:h}).then(p=>{n([...Zm(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 g=p.map(m=>m.id);e.setOptions(p),e.handleResetData(),e.setFilters(m=>Z(H({},m),{entityIds:g}))},d=(h,p)=>h.map((g,m)=>u.jsx(S.Chip,{variant:"solid",endDecorator:u.jsx(S.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:v=>p({index:m}).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:g},`option_${g.id}`)},g.id));return u.jsxs(S.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(S.FormLabel,{sx:{fontSize:12},color:"primary",children:e.labels.contextEntityTag}),u.jsx(S.Autocomplete,{getOptionDisabled:()=>e.options.length===lB,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(S.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(g=>g.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(S.AutocompleteOption,Z(H({},h),{children:u.jsx(xn,{option:p})}))})]})};function ev(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 uB(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 dB(e){return typeof e=="number"&&isNaN(e)}function tv(e){return ci(e)||dB(e)||typeof e=="number"&&!isFinite(e)}function nv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function fB(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 hB(e,t,n){var r=fB(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 pB(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 gB(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 rv(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function iv(e,t){return Array(t+1).join(e)}function ov(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."+iv("0",Math.abs(a))+i:a>=l?i=i+iv("0",a-l):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function av(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(m,v,I){return m.length>I?(Number(m[0])+Number(v)).toString()+m.substring(1,m.length):v+m},d[0]));var h=rv(d[1]||"",t,n),p=l?"-":"",g=r?".":"";return""+p+f+g+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 sv=uB(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}}}),mB=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function vB(e,t,n){return Math.min(Math.max(e,t),n)}function fu(e){return Math.max(e.selectionStart,e.selectionEnd)}function bB(){return typeof navigator!="undefined"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function yB(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function CB(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function xB(e,t,n,r,i,o,a){a===void 0&&(a=CB);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 g=0,m=d;g<m;g++){var v=a({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:g});if(v&&f[g]!==!0){h[p]=g,f[g]=!0;break}}}for(var I=r;I<c&&(h[I]===-1||!o(n[I]));)I++;var w=I===c||h[I]===-1?d:h[I];for(I=r-1;I>0&&h[I]===-1;)I--;var y=I===-1||h[I]===-1?0:h[I]+1;return y>w?w:r-y<w-r?y:w}function lv(e,t,n,r){var i=e.length;if(t=vB(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 wB(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 cv(e,t,n,r,i,o){o===void 0&&(o=nr);var a=pB(function(g,m){var v,I;return tv(g)?(I="",v=""):typeof g=="number"||m?(I=typeof g=="number"?ov(g):g,v=r(I)):(I=i(g,void 0),v=r(I)),{formattedValue:v,numAsString:I}}),l=x.useState(function(){return a(ci(e)?t:e,n)}),s=l[0],c=l[1],d=function(g,m){g.formattedValue!==s.formattedValue&&c({formattedValue:g.formattedValue,numAsString:g.value}),o(g,m)},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 IB(e){return e.replace(/[^0-9]/g,"")}function SB(e){return e}function AB(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=SB);var l=e.removeFormatting;l===void 0&&(l=IB);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 g=e.onMouseUp;g===void 0&&(g=nr);var m=e.onFocus;m===void 0&&(m=nr);var v=e.onBlur;v===void 0&&(v=nr);var I=e.value,w=e.getCaretBoundary;w===void 0&&(w=wB);var y=e.isValidInputCharacter;y===void 0&&(y=uo);var C=e.isCharacterSame,b=ev(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),A=cv(I,s,!!c,a,l,d),E=A[0],k=E.formattedValue,F=E.numAsString,Y=A[1],W=x.useRef(),T=x.useRef({formattedValue:k,numAsString:F}),U=function(de,he){T.current={formattedValue:de.formattedValue,numAsString:de.value},Y(de,he)},G=x.useState(!1),$=G[0],B=G[1],L=x.useRef(null),V=x.useRef({setCaretTimeout:null,focusTimeout:null});x.useEffect(function(){return B(!0),function(){clearTimeout(V.current.setCaretTimeout),clearTimeout(V.current.focusTimeout)}},[]);var q=a,ee=function(de,he){var Ce=parseFloat(he);return{formattedValue:de,value:he,floatValue:isNaN(Ce)?void 0:Ce}},O=function(de,he,Ce){de.selectionStart===0&&de.selectionEnd===de.value.length||(wr(de,he),V.current.setCaretTimeout=setTimeout(function(){de.value===Ce&&de.selectionStart!==he&&wr(de,he)},0))},M=function(de,he,Ce){return lv(de,he,w(de),Ce)},N=function(de,he,Ce){var Te=w(he),He=xB(he,k,de,Ce,Te,y,C);return He=lv(he,He,Te),He},j=function(de){var he=de.formattedValue;he===void 0&&(he="");var Ce=de.input,Te=de.source,He=de.event,De=de.numAsString,Ee;if(Ce){var It=de.inputValue||Ce.value,St=fu(Ce);Ce.value=he,Ee=N(It,he,St),Ee!==void 0&&O(Ce,Ee,he)}he!==k&&U(ee(he,De),{event:He,source:Te})};x.useEffect(function(){var de=T.current,he=de.formattedValue,Ce=de.numAsString;(k!==he||F!==Ce)&&U(ee(k,F),{event:void 0,source:co.props})},[k,F]);var te=L.current?fu(L.current):void 0,ae=typeof window!="undefined"?x.useLayoutEffect:x.useEffect;ae(function(){var de=L.current;if(k!==T.current.formattedValue&&de){var he=N(T.current.formattedValue,k,te);de.value=k,O(de,he,k)}},[k]);var oe=function(de,he,Ce){var Te=he.target,He=W.current?mB(W.current,Te.selectionEnd):sv(k,de),De=Object.assign(Object.assign({},He),{lastValue:k}),Ee=l(de,De),It=q(Ee);if(Ee=l(It,void 0),f&&!f(ee(It,Ee))){var St=he.target,jt=fu(St),Mt=N(de,k,jt);return St.value=k,O(St,Mt,k),!1}return j({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;W.current={selectionStart:Ce,selectionEnd:Te+he}},se=function(de){var he=de.target,Ce=he.value,Te=oe(Ce,de,co.event);Te&&h(de),W.current=void 0},ne=function(de){var he=de.target,Ce=de.key,Te=he.selectionStart,He=he.selectionEnd,De=he.value;De===void 0&&(De="");var Ee;Ce==="ArrowLeft"||Ce==="Backspace"?Ee=Math.max(Te-1,0):Ce==="ArrowRight"?Ee=Math.min(Te+1,De.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=M(De,Ee,Mt),jt!==Ee&&de.preventDefault()}else Ce==="Delete"&&!y(De[Ee])?jt=M(De,Ee,"right"):Ce==="Backspace"&&!y(De[Ee])&&(jt=M(De,Ee,"left"));jt!==Ee&&O(he,jt,De),p(de),J(he,It)},ge=function(de){var he=de.target,Ce=function(){var Te=he.selectionStart,He=he.selectionEnd,De=he.value;if(De===void 0&&(De=""),Te===He){var Ee=M(De,Te);Ee!==Te&&O(he,Ee,De)}};Ce(),requestAnimationFrame(function(){Ce()}),g(de),J(he)},Se=function(de){de.persist&&de.persist();var he=de.target,Ce=de.currentTarget;L.current=he,V.current.focusTimeout=setTimeout(function(){var Te=he.selectionStart,He=he.selectionEnd,De=he.value;De===void 0&&(De="");var Ee=M(De,Te);Ee!==Te&&!(Te===0&&He===De.length)&&O(he,Ee,De),m(Object.assign(Object.assign({},de),{currentTarget:Ce}))},0)},Ue=function(de){L.current=null,clearTimeout(V.current.focusTimeout),clearTimeout(V.current.setCaretTimeout),v(de)},wt=$&&bB()?"numeric":void 0,at=Object.assign({inputMode:wt},b,{type:t,value:k,onChange:se,onKeyDown:ne,onMouseUp:ge,onFocus:Se,onBlur:Ue});if(n==="text")return i?x.createElement(x.Fragment,null,i(k,b)||null):x.createElement("span",Object.assign({},b,{ref:o}),k);if(r){var kt=r;return x.createElement(kt,Object.assign({},at,{ref:o}))}return x.createElement("input",Object.assign({},at,{ref:o}))}function uv(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=us(t),c=s.thousandSeparator,d=s.decimalSeparator,f=n!==0&&e.indexOf(".")!==-1||n&&r,h=du(e,a),p=h.beforeDecimal,g=h.afterDecimal,m=h.addNegation;return n!==void 0&&(g=rv(g,n,!!r)),c&&(p=hB(p,c,l)),i&&(p=i+p),o&&(g=g+o),m&&(p="-"+p),e=p+(f&&d||"")+g,e}function us(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 TB(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 EB(e,t){return new RegExp("(^-)|[0-9]|"+nv(e),"g")}function _B(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function kB(e,t,n){var r;t===void 0&&(t=yB(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=us(n),p=h.allowedDecimalSeparators,g=h.decimalSeparator,m=e[f]===g;if(uo(e)&&(e===o||e===a)&&t.lastValue==="")return e;if(f-d===1&&p.indexOf(e[d])!==-1){var v=l===0?"":g;e=e.substring(0,d)+v+e.substring(d+1,e.length)}var I=function(L,V,q){var ee=!1,O=!1;o.startsWith("-")?ee=!1:L.startsWith("--")?(ee=!1,O=!0):a.startsWith("-")&&L.length===a.length?ee=!1:L[0]==="-"&&(ee=!0);var M=ee?1:0;return O&&(M=2),M&&(L=L.substring(M),V-=M,q-=M),{value:L,start:V,end:q,hasNegation:ee}},w=I(e,d,f),y=w.hasNegation;r=w,e=r.value,d=r.start,f=r.end;var C=I(t.lastValue,s.start,s.end),b=C.start,A=C.end,E=C.value,k=e.substring(d,f);e.length&&E.length&&(b>E.length-a.length||A<o.length)&&!(k&&a.startsWith(k))&&(e=E);var F=0;e.startsWith(o)?F+=o.length:d<o.length&&(F=d),e=e.substring(F),f-=F;var Y=e.length,W=e.length-a.length;e.endsWith(a)?Y=W:(f>W||f>e.length-a.length)&&(Y=f),e=e.substring(0,Y),e=TB(y?"-"+e:e,i),e=(e.match(EB(g))||[]).join("");var T=e.indexOf(g);e=e.replace(new RegExp(nv(g),"g"),function(L,V){return V===T?".":""});var U=du(e,i),G=U.beforeDecimal,$=U.afterDecimal,B=U.addNegation;return c.end-c.start<s.end-s.start&&G===""&&m&&!parseFloat($)&&(e=B?"-":""),e}function DB(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 PB(e){var t=us(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
|
+
`]))),RP=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(OP," 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"},"","")})},MP=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=Cn(t,SP);return pe.jsx("div",P({},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}))},LP=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}})},BP=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",P({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)},$P=BP,NP=["data"],FP=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},zP=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",P({},tt(t,"group",{group:!0}),s),pe.jsx(a,P({},l,{selectProps:f,theme:d,getStyles:i,getClassNames:o,cx:r}),c),pe.jsx("div",null,n))},jP=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"})},VP=function(t){var n=vg(t);n.data;var r=Cn(n,NP);return pe.jsx("div",P({},tt(t,"groupHeading",{"group-heading":!0}),r))},UP=zP,HP=["innerRef","isDisabled","isHidden","inputClassName"],WP=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)":""},GP),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:l.neutral80})},kg={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},GP={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"},kg)},YP=function(t){return ve({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},kg)},KP=function(t){var n=t.cx,r=t.value,i=vg(t),o=i.innerRef,a=i.isDisabled,l=i.isHidden,s=i.inputClassName,c=Cn(i,HP);return pe.jsx("div",P({},tt(t,"input",{"input-container":!0}),{"data-value":r||""}),pe.jsx("input",P({className:n({input:!0},s),ref:o,style:YP(l),disabled:a},c)))},qP=KP,QP=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})},JP=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})},XP=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)},ZP=Dg,eO=Dg;function tO(e){var t=e.children,n=e.innerProps;return pe.jsx("div",P({role:"button"},n),t||pe.jsx(Yc,{size:14}))}var nO=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}))},rO=nO,iO=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}})},oO=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",P({},tt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},l),n)},aO=oO,sO=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})},lO=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",P({},tt(t,"placeholder",{placeholder:!0}),r),n)},cO=lO,uO=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})},dO=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return pe.jsx("div",P({},tt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},fO=dO,hO={ClearIndicator:kP,Control:$P,DropdownIndicator:EP,DownChevron:Eg,CrossIcon:Yc,Group:UP,GroupHeading:VP,IndicatorsContainer:wP,IndicatorSeparator:PP,Input:qP,LoadingIndicator:MP,Menu:lP,MenuList:uP,MenuPortal:mP,LoadingMessage:pP,NoOptionsMessage:hP,MultiValue:rO,MultiValueContainer:ZP,MultiValueLabel:eO,MultiValueRemove:tO,Option:aO,Placeholder:cO,SelectContainer:bP,SingleValue:fO,ValueContainer:CP},pO=function(t){return ve(ve({},hO),t.components)},Pg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function gO(e,t){return!!(e===t||Pg(e)&&Pg(t))}function mO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!gO(e[n],t[n]))return!1;return!0}function vO(e,t){t===void 0&&(t=mO);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 bO={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"},yO=function(t){return pe.jsx("span",P({css:bO},t))},Og=yO,CO={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(m,v){return m&&m.length?"".concat(m.indexOf(v)+1," of ").concat(m.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:"",".")}},xO=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,g=s.isMulti,m=s.isOptionDisabled,v=s.isSearchable,I=s.menuIsOpen,w=s.options,y=s.screenReaderStatus,C=s.tabSelectsValue,b=s.isLoading,A=s["aria-label"],E=s["aria-live"],D=x.useMemo(function(){return ve(ve({},CO),f||{})},[f]),F=x.useMemo(function(){var $="";if(n&&D.onChange){var B=n.option,L=n.options,V=n.removedValue,q=n.removedValues,ee=n.value,O=function(J){return Array.isArray(J)?null:J},M=V||B||O(ee),N=M?h(M):"",j=L||q||void 0,te=j?j.map(h):[],se=ve({isDisabled:M&&m(M,l),label:N,labels:te},n);$=D.onChange(se)}return $},[n,D,m,l,h]),Y=x.useMemo(function(){var $="",B=r||i,L=!!(r&&l&&l.includes(r));if(B&&D.onFocus){var V={focused:B,label:h(B),isDisabled:m(B,l),isSelected:L,options:o,context:B===r?"menu":"value",selectValue:l,isAppleDevice:d};$=D.onFocus(V)}return $},[r,i,h,m,D,o,l,d]),W=x.useMemo(function(){var $="";if(I&&w.length&&!b&&D.onFilter){var B=y({count:o.length});$=D.onFilter({inputValue:p,resultsMessage:B})}return $},[o,p,I,D,w,y,b]),T=(n==null?void 0:n.action)==="initial-input-focus",U=x.useMemo(function(){var $="";if(D.guidance){var B=i?"value":I?"menu":"input";$=D.guidance({"aria-label":A,context:B,isDisabled:r&&m(r,l),isMulti:g,isSearchable:v,tabSelectsValue:C,isInitialFocus:T})}return $},[A,r,i,g,m,v,I,D,l,C,T]),G=pe.jsx(x.Fragment,null,pe.jsx("span",{id:"aria-selection"},F),pe.jsx("span",{id:"aria-focused"},Y),pe.jsx("span",{id:"aria-results"},W),pe.jsx("span",{id:"aria-guidance"},U));return pe.jsx(x.Fragment,null,pe.jsx(Og,{id:c},T&&G),pe.jsx(Og,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!T&&G))},wO=xO,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źẑżžẓẕƶȥɀⱬꝣ"}],IO=new RegExp("["+qc.map(function(e){return e.letters}).join("")+"]","g"),Rg={},Qc=0;Qc<qc.length;Qc++)for(var Jc=qc[Qc],Xc=0;Xc<Jc.letters.length;Xc++)Rg[Jc.letters[Xc]]=Jc.base;var Mg=function(t){return t.replace(IO,function(n){return Rg[n]})},SO=vO(Mg),Lg=function(t){return t.replace(/^\s+|\s+$/g,"")},AO=function(t){return"".concat(t.label," ").concat(t.value)},TO=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=ve({ignoreCase:!0,ignoreAccents:!0,stringify:AO,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,a=i.ignoreAccents,l=i.stringify,s=i.trim,c=i.matchFrom,d=s?Lg(r):r,f=s?Lg(l(n)):l(n);return o&&(d=d.toLowerCase(),f=f.toLowerCase()),a&&(d=SO(d),f=Mg(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},EO=["innerRef"];function _O(e){var t=e.innerRef,n=Cn(e,EO),r=eP(n,"onExited","in","enter","exit","appear");return pe.jsx("input",P({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 kO=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function DO(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,I){if(c.current!==null){var w=c.current,y=w.scrollTop,C=w.scrollHeight,b=w.clientHeight,A=c.current,E=I>0,D=C-b-y,F=!1;D>I&&a.current&&(r&&r(v),a.current=!1),E&&l.current&&(o&&o(v),l.current=!1),E&&I>D?(n&&!a.current&&n(v),A.scrollTop=C,F=!0,a.current=!0):!E&&-I>y&&(i&&!l.current&&i(v),A.scrollTop=0,F=!0,l.current=!0),F&&kO(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 I=s.current-v.changedTouches[0].clientY;d(v,I)},[d]),g=x.useCallback(function(v){if(v){var I=JD?{passive:!1}:!1;v.addEventListener("wheel",f,I),v.addEventListener("touchstart",h,I),v.addEventListener("touchmove",p,I)}},[p,h,f]),m=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 g(v),function(){m(v)}}},[t,g,m]),function(v){c.current=v}}var Bg=["boxSizing","height","overflow","paddingRight","position"],$g={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Ng(e){e.preventDefault()}function Fg(e){e.stopPropagation()}function zg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function jg(){return"ontouchstart"in window||navigator.maxTouchPoints}var Vg=!!(typeof window!="undefined"&&window.document&&window.document.createElement),ao=0,ri={capture:!1,passive:!1};function PO(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(Vg){var c=document.body,d=c&&c.style;if(r&&Bg.forEach(function(g){var m=d&&d[g];i.current[g]=m}),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($g).forEach(function(g){var m=$g[g];d&&(d[g]=m)}),d&&(d.paddingRight="".concat(p,"px"))}c&&jg()&&(c.addEventListener("touchmove",Ng,ri),s&&(s.addEventListener("touchstart",zg,ri),s.addEventListener("touchmove",Fg,ri))),ao+=1}},[r]),l=x.useCallback(function(s){if(Vg){var c=document.body,d=c&&c.style;ao=Math.max(ao-1,0),r&&ao<1&&Bg.forEach(function(f){var h=i.current[f];d&&(d[f]=h)}),c&&jg()&&(c.removeEventListener("touchmove",Ng,ri),s&&(s.removeEventListener("touchstart",zg,ri),s.removeEventListener("touchmove",Fg,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 OO=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},RO={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function MO(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=DO({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:l,onTopLeave:s}),d=PO({isEnabled:n}),f=function(p){c(p),d(p)};return pe.jsx(x.Fragment,null,n&&pe.jsx("div",{onClick:OO,css:RO}),t(f))}var LO={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},BO=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:LO,value:"",onChange:function(){}})},$O=BO;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 NO(){return Zc(/^iPhone/i)}function Ug(){return Zc(/^Mac/i)}function FO(){return Zc(/^iPad/i)||Ug()&&navigator.maxTouchPoints>1}function zO(){return NO()||FO()}function jO(){return Ug()||zO()}var VO=function(t){return t.label},Hg=function(t){return t.label},Wg=function(t){return t.value},UO=function(t){return!!t.isDisabled},HO={clearIndicator:_P,container:vP,control:LP,dropdownIndicator:TP,group:FP,groupHeading:jP,indicatorsContainer:xP,indicatorSeparator:DP,input:WP,loadingIndicator:RP,loadingMessage:fP,menu:oP,menuList:cP,menuPortal:gP,multiValue:QP,multiValueLabel:JP,multiValueRemove:XP,noOptionsMessage:dP,option:iO,placeholder:sO,singleValue:uO,valueContainer:yP},WO={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%)"},GO=4,Gg=4,YO=38,KO=Gg*2,qO={baseUnit:Gg,controlHeight:YO,menuGutter:KO},eu={borderRadius:GO,colors:WO,spacing:qO},QO={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Cg(),captureMenuScroll:!Cg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:TO(),formatGroupLabel:VO,getOptionLabel:Hg,getOptionValue:Wg,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:UO,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!qD(),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 Yg(e,t,n,r){var i=Xg(e,t,n),o=Zg(e,t,n),a=Jg(e,t),l=ls(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:l,index:r}}function ss(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,l){return Yg(e,a,t,l)}).filter(function(a){return Qg(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Yg(e,n,t,r);return Qg(e,o)?o:void 0}).filter(XD)}function Kg(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 JO(e,t){return Kg(ss(e,t))}function Qg(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,l=t.value;return(!tm(e)||!o)&&em(e,{label:a,value:l,data:i},r)}function XO(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 ZO(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},Jg=function(t,n){return t.getOptionLabel(n)},ls=function(t,n){return t.getOptionValue(n)};function Xg(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function Zg(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ls(e,t);return n.some(function(i){return ls(e,i)===r})}function em(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var tm=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},eR=1,nm=function(e){PD(n,e);var t=MD(n);function n(r){var i;if(kD(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=jO(),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,g=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:g}),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,g=f&&i.isOptionSelected(s,p),m=i.isOptionDisabled(s,p);if(g){var v=i.getOptionValue(s);i.setValue(p.filter(function(I){return i.getOptionValue(I)!==v}),"deselect-option",s)}else if(!m)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(g){return i.getOptionValue(g)!==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(ss(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 HD.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(s){return Jg(i.props,s)},i.getOptionValue=function(s){return ls(i.props,s)},i.getStyles=function(s,c){var d=i.props.unstyled,f=HO[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 pO(i.props)},i.buildCategorizedOptions=function(){return ss(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return Kg(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&&rs(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 tm(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,g=c.isClearable,m=c.isDisabled,v=c.menuIsOpen,I=c.onKeyDown,w=c.tabSelectsValue,y=c.openMenuOnFocus,C=i.state,b=C.focusedOption,A=C.focusedValue,E=C.selectValue;if(!m&&!(typeof I=="function"&&(I(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(A)i.removeValue(A);else{if(!f)return;d?i.popValue():g&&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()):g&&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||++eR),i.state.selectValue=ns(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 DD(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&&yg(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&&(yg(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,g=f.options,m=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:l,getValue:s,hasValue:m,isMulti:h,isRtl:p,options:g,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 Xg(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return Zg(this.props,i,o)}},{key:"filterOption",value:function(i,o){return em(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(),g=p.Input,m=this.state,v=m.inputIsHidden,I=m.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()?(I==null?void 0:I.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?z.createElement(g,P({},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)):z.createElement(_O,P({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ts,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,g=p.controlShouldRenderValue,m=p.isDisabled,v=p.isMulti,I=p.inputValue,w=p.placeholder,y=this.state,C=y.selectValue,b=y.focusedValue,A=y.isFocused;if(!this.hasValue()||!g)return I?null:z.createElement(f,P({},h,{key:"placeholder",isDisabled:m,isFocused:A,innerProps:{id:this.getElementId("placeholder")}}),w);if(v)return C.map(function(D,F){var Y=D===b,W="".concat(i.getOptionLabel(D),"-").concat(i.getOptionValue(D));return z.createElement(a,P({},h,{components:{Container:l,Label:s,Remove:c},isFocused:Y,isDisabled:m,key:W,index:F,removeProps:{onClick:function(){return i.removeValue(D)},onTouchEnd:function(){return i.removeValue(D)},onMouseDown:function(U){U.preventDefault()}},data:D}),i.formatOptionLabel(D,"value"))});if(I)return null;var E=C[0];return z.createElement(d,P({},h,{data:E,isDisabled:m}),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 z.createElement(o,P({},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 z.createElement(o,P({},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 z.createElement(a,P({},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 z.createElement(o,P({},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,g=this.commonProps,m=this.state.focusedOption,v=this.props,I=v.captureMenuScroll,w=v.inputValue,y=v.isLoading,C=v.loadingMessage,b=v.minMenuHeight,A=v.maxMenuHeight,E=v.menuIsOpen,D=v.menuPlacement,F=v.menuPosition,Y=v.menuPortalTarget,W=v.menuShouldBlockScroll,T=v.menuShouldScrollIntoView,U=v.noOptionsMessage,G=v.onMenuScrollToTop,$=v.onMenuScrollToBottom;if(!E)return null;var B=function(N,j){var te=N.type,se=N.data,oe=N.isDisabled,J=N.isSelected,le=N.label,ne=N.value,ge=m===se,Se=oe?void 0:function(){return i.onOptionHover(se)},Ue=oe?void 0:function(){return i.selectOption(se)},wt="".concat(i.getElementId("option"),"-").concat(j),at={id:wt,onClick:Ue,onMouseMove:Se,onMouseOver:Se,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:J};return z.createElement(p,P({},g,{innerProps:at,data:se,isDisabled:oe,isSelected:J,key:wt,label:le,type:te,value:ne,isFocused:ge,innerRef:ge?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(N.data,"menu"))},L;if(this.hasOptions())L=this.getCategorizedOptions().map(function(M){if(M.type==="group"){var N=M.data,j=M.options,te=M.index,se="".concat(i.getElementId("group"),"-").concat(te),oe="".concat(se,"-heading");return z.createElement(a,P({},g,{key:se,data:N,options:j,Heading:l,headingProps:{id:oe,data:M.data},label:i.formatGroupLabel(M.data)}),M.options.map(function(J){return B(J,"".concat(te,"-").concat(J.index))}))}else if(M.type==="option")return B(M,"".concat(M.index))});else if(y){var V=C({inputValue:w});if(V===null)return null;L=z.createElement(f,g,V)}else{var q=U({inputValue:w});if(q===null)return null;L=z.createElement(h,g,q)}var ee={minMenuHeight:b,maxMenuHeight:A,menuPlacement:D,menuPosition:F,menuShouldScrollIntoView:T},O=z.createElement(aP,P({},g,ee),function(M){var N=M.ref,j=M.placerProps,te=j.placement,se=j.maxHeight;return z.createElement(s,P({},g,ee,{innerRef:N,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:y,placement:te}),z.createElement(MO,{captureEnabled:I,onTopArrive:G,onBottomArrive:$,lockEnabled:W},function(oe){return z.createElement(c,P({},g,{innerRef:function(le){i.getMenuListRef(le),oe(le)},innerProps:{role:"listbox","aria-multiselectable":g.isMulti,id:i.getElementId("listbox")},isLoading:y,maxHeight:se,focusedOption:m}),L)}))});return Y||F==="fixed"?z.createElement(d,P({},g,{appendTo:Y,controlElement:this.controlRef,menuPlacement:D,menuPosition:F}),O):O}},{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 z.createElement($O,{name:c,onFocus:this.onValueInputFocus});if(!(!c||l))if(s)if(a){var h=f.map(function(m){return i.getOptionValue(m)}).join(a);return z.createElement("input",{name:c,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(m,v){return z.createElement("input",{key:"i-".concat(v),name:c,type:"hidden",value:i.getOptionValue(m)})}):z.createElement("input",{name:c,type:"hidden",value:""});return z.createElement("div",null,p)}else{var g=f[0]?this.getOptionValue(f[0]):"";return z.createElement("input",{name:c,type:"hidden",value:g})}}},{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 z.createElement(wO,P({},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,g=this.state.isFocused,m=this.commonProps=this.getCommonProps();return z.createElement(l,P({},m,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:g}),this.renderLiveRegion(),z.createElement(o,P({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:g,menuIsOpen:p}),z.createElement(s,P({},m,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),z.createElement(a,P({},m,{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,g=i.value,m=i.menuIsOpen,v=i.inputValue,I=i.isMulti,w=ns(g),y={};if(a&&(g!==a.value||p!==a.options||m!==a.menuIsOpen||v!==a.inputValue)){var C=m?JO(i,w):[],b=m?qg(ss(i,w),"".concat(h,"-option")):[],A=l?XO(o,w):null,E=ZO(o,C),D=tu(b,E);y={selectValue:w,focusedOption:E,focusedOptionId:D,focusableOptionsWithIds:b,focusedValue:A,clearFocusValueOnUpdate:!1}}var F=s!=null&&i!==a?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},Y=c,W=d&&f;return d&&!W&&(Y={value:oo(I,w,w[0]||null),options:w,action:"initial-input-focus"},W=!f),(c==null?void 0:c.action)==="initial-input-focus"&&(Y=null),ve(ve(ve({},y),F),{},{prevProps:i,ariaSelection:Y,prevWasFocused:W})}}]),n}(x.Component);nm.defaultProps=QO;var tR=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function nR(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,g=Cn(e,tR),m=x.useState(l!==void 0?l:n),v=Vn(m,2),I=v[0],w=v[1],y=x.useState(s!==void 0?s:i),C=Vn(y,2),b=C[0],A=C[1],E=x.useState(p!==void 0?p:a),D=Vn(E,2),F=D[0],Y=D[1],W=x.useCallback(function(V,q){typeof c=="function"&&c(V,q),Y(V)},[c]),T=x.useCallback(function(V,q){var ee;typeof d=="function"&&(ee=d(V,q)),w(ee!==void 0?ee:V)},[d]),U=x.useCallback(function(){typeof h=="function"&&h(),A(!0)},[h]),G=x.useCallback(function(){typeof f=="function"&&f(),A(!1)},[f]),$=l!==void 0?l:I,B=s!==void 0?s:b,L=p!==void 0?p:F;return ve(ve({},g),{},{inputValue:$,menuIsOpen:B,onChange:W,onInputChange:T,onMenuClose:G,onMenuOpen:U,value:L})}var rR=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],rm=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 rm(t,o,i)})||r.some(function(o){return rm(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function iR(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,g=e.onChange,m=Cn(e,rR),v=m.getOptionValue,I=v===void 0?Wg:v,w=m.getOptionLabel,y=w===void 0?Hg:w,C=m.inputValue,b=m.isLoading,A=m.isMulti,E=m.value,D=m.name,F=x.useMemo(function(){return s(C,ns(E),p,{getOptionValue:I,getOptionLabel:y})?d(C,a(C)):void 0},[a,d,y,I,C,s,p,E]),Y=x.useMemo(function(){return(n||!b)&&F?i==="first"?[F].concat(ni(p)):[].concat(ni(p),[F]):p},[n,i,b,F,p]),W=x.useCallback(function(T,U){if(U.action!=="select-option")return g(T,U);var G=Array.isArray(T)?T:[T];if(G[G.length-1]===F){if(f)f(C);else{var $=d(C,C),B={action:"create-option",name:D,option:$};g(oo(A,[].concat(ni(ns(E)),[$]),$),B)}return}g(T,U)},[d,C,A,D,F,f,g,E]);return ve(ve({},m),{},{options:Y,onChange:W})}var oR=x.forwardRef(function(e,t){var n=nR(e),r=iR(n);return z.createElement(nm,P({ref:t},r))}),im=oR;const aR={control:(e,t)=>X(H({},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(H({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>X(H({},e),{minHeight:"36px"}),menu:e=>X(H({},e),{position:"relative"}),clearIndicator:e=>X(H({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>X(H({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>X(H({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>X(H({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"14px"}),multiValueLabel:e=>X(H({},e),{color:"#333"})},sR=e=>e.map(t=>({label:t,value:t})),lR=e=>{const[t,n]=x.useState(""),[r,i]=x.useState(!1),o=sR(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(S.Box,{sx:{marginBottom:"16px"},children:u.jsx(im,{styles:aR,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(pt,{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,g]=x.useState(""),m=x.useRef(null),v=()=>{m.current&&m.current.click()},I=new Op,w=ht(),y=()=>{d(""),i(!1)},C=U=>{let G="",$="primary";switch(U){case"copy_url":G=e.labels.urlCopiedToClipboardMessage,$="primary";break;case"image_deleted":G=e.labels.imageDeletedMessage,$="primary";break;case"image_reset":G=e.labels.imageResetMessage,$="primary";break;case"upload_success":G=e.labels.uploadingImageMessage,$="success";break;case"upload_failed":G=e.labels.uploadingImageErrorMessage,$="danger";break;case"sign_in_url_failed":G=e.labels.generateSignedInUrlErrorMessage,$="danger";break;case"encrypting_file_failed":G=e.labels.encryptingImageErrorMessage,$="danger";break}h($),d(G),i(!0)},b=()=>a(!o),A=()=>s(!l),E=()=>{e.clearImage(),C("image_deleted")},D=U=>{navigator.clipboard.writeText(U),C("copy_url")},F=U=>k(this,null,function*(){U.persist();const G=U.target.files?U.target.files[0]:null;if(G){n(!0);try{const $=G.type.split("/")[1],B=yield I.readFileAndHash(G),L=(yield I.generateHashFileName(G))+"."+$,V={image_type:$,image_file_name:L,image_size:G.size,base64_sum:B},q=yield w==null?void 0:w.https.generateSignedInUrl(V);if(q!=null&&q.ok){const ee=yield q.json(),O={"Content-Type":G.type,"Content-MD5":B};try{const M=new File([G],L,{type:G.type}),N=yield w==null?void 0:w.https.storeInBucket(ee.data.signed_url,M,O);e.onChangeImages(N||""),g(N),C("upload_success")}catch(M){console.error("There was a problem with uploading the file: ",M),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($){console.error("There was a problem with encrypting file...",$),C("encrypting_file_failed")}n(!1)}}),Y=U=>k(this,null,function*(){if(U){n(!0);try{const G=U.type.split("/")[1],$=yield I.readFileAndHash(U),B=(yield I.generateHashFileName(U))+"."+G,L={image_type:G,image_file_name:B,image_size:U.size,base64_sum:$},V=yield w==null?void 0:w.https.generateSignedInUrl(L);if(V!=null&&V.ok){const q=yield V.json(),ee={"Content-Type":U.type,"Content-MD5":$};try{const O=new File([U],B,{type:U.type}),M=yield w==null?void 0:w.https.storeInBucket(q.data.signed_url,O,ee);e.onChangeImages(M||""),C("upload_success")}catch(O){console.error("There was a problem with uploading the file: ",O),C("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield V==null?void 0:V.json()),C("sign_in_url_failed")}catch(G){console.error("There was a problem with encrypting file...",G),C("encrypting_file_failed")}n(!1)}}),W=()=>{e.onChangeImages(p),C("image_reset")},T=U=>{e.onChangeImages(U),g(U)};return u.jsxs(u.Fragment,{children:[u.jsxs(S.Card,{sx:{marginBottom:"10px"},children:[u.jsxs(S.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsx(S.Typography,{level:"title-lg",children:e.title}),u.jsx(S.Tooltip,{title:e.labels.clearImage,children:u.jsx(S.IconButton,{variant:"plain",color:"danger",size:"sm",onClick:E,children:u.jsx(Cp,{})})})]}),u.jsxs(S.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(S.Skeleton,{loading:t,animation:"wave",children:[e.image?u.jsx(S.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(S.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(S.Tooltip,{title:e.labels.copyUrl,children:u.jsx(S.Button,{onClick:()=>D(e.image),disabled:!e.image,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Le.ContentCopy,{})})}),u.jsx(S.Tooltip,{title:e.labels.viewImage,children:u.jsx(S.Button,{onClick:b,disabled:!e.image,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(Bp,{})})}),u.jsx(S.Tooltip,{title:e.labels.cropImage,children:u.jsx(S.Button,{onClick:A,disabled:!e.image,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(eg,{})})})]}),u.jsx(S.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:u.jsxs(S.Button,{sx:{width:"100%"},onClick:v,children:[u.jsx(Le.Upload,{})," ",e.labels.uploadImage,u.jsx($p,{type:"file",accept:"image/*",onChange:F,ref:m})]})}),w.https.sportal365Config?u.jsx(S.AccordionGroup,{variant:"soft",children:u.jsxs(S.Accordion,{children:[u.jsx(S.AccordionSummary,{children:u.jsx(S.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.labels.sportal365Images})}),u.jsx(S.AccordionDetails,{children:u.jsx(Lp,{labels:e.labels,onChangeImages:T})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(pt,{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:A,uploadImage:Y,resetDefaultImageUrl:W})]})},cR=["cover","mobile"],uR=e=>new Map().set("main",e.mainImage).set("cover",e.coverImage).set("mobile",e.mobileImage),dR=e=>e?H({},e):{main:"",mobile:"",cover:""},fR=e=>{const[t,n]=x.useState(!1),r=dR(e.defaultValue),i=uR(e.labels),o=(l,s)=>{r[s]=l,e.onChange(r)},a=l=>{r[l]="",e.onChange(r)};return u.jsxs(S.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(S.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?u.jsx(u.Fragment,{children:cR.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 hR(e){return it("MuiSheet",e)}Xe("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const pR=["className","color","component","variant","invertedColors","slots","slotProps"],gR=e=>{const{variant:t,color:n}=e,r={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`]};return lt(r,hR,{})},mR=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[P({"--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"}),P({},e.typography["body-md"],t.variant==="solid"&&t.color&&t.invertedColors&&H_(t.color)(e),t.variant==="soft"&&t.color&&t.invertedColors&&W_(t.color)(e),(r=e.variants[t.variant])==null?void 0:r[t.color],i)]}),vR=z.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,pR),h=P({},r,{color:o,component:a,invertedColors:s,variant:l}),p=gR(h),g=P({},f,{component:a,slots:c,slotProps:d}),[m,v]=Ie("root",{ref:n,className:Ln(p.root,i),elementType:mR,externalForwardedProps:g,ownerState:h});return u.jsx(m,P({},v))});function bR(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 yR=["color","textColor"],CR=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],ru=z.createContext(!1),xR=z.createContext(!1),wR=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,bR,{})},IR=be("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),SR=be("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),AR=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 P({"--Icon-fontSize":`calc(1em * ${l})`},t.color&&{"--Icon-color":"currentColor"},{margin:"var(--Typography-margin, 0px)"},t.nesting?{display:"inline"}:P({display:"block"},t.unstable_hasSkeleton&&{position:"relative"}),(t.startDecorator||t.endDecorator)&&P({display:"flex",alignItems:"center"},t.nesting&&P({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&&P({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]))}),om={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=z.forwardRef(function(t,n){var r;const i=ct({props:t,name:"JoyTypography"}),{color:o,textColor:a}=i,l=Ae(i,yR),s=z.useContext(ru),c=z.useContext(xR),d=MA(P({},l,{color:a})),{component:f,gutterBottom:h=!1,noWrap:p=!1,level:g="body-md",levelMapping:m=om,children:v,endDecorator:I,startDecorator:w,variant:y,slots:C={},slotProps:b={}}=d,A=Ae(d,CR),E=(r=t.color)!=null?r:y?o!=null?o:"neutral":o,D=s||c?t.level||"inherit":g,F=Gf(v,["Skeleton"]),Y=f||(s?"span":m[D]||om[D]||"span"),W=P({},d,{level:D,component:Y,color:E,gutterBottom:h,noWrap:p,nesting:s,variant:y,unstable_hasSkeleton:F}),T=wR(W),U=P({},A,{component:Y,slots:C,slotProps:b}),[G,$]=Ie("root",{ref:n,className:T.root,elementType:AR,externalForwardedProps:U,ownerState:W}),[B,L]=Ie("startDecorator",{className:T.startDecorator,elementType:IR,externalForwardedProps:U,ownerState:W}),[V,q]=Ie("endDecorator",{className:T.endDecorator,elementType:SR,externalForwardedProps:U,ownerState:W});return u.jsx(ru.Provider,{value:!0,children:u.jsxs(G,P({},$,{children:[w&&u.jsx(B,P({},L,{children:w})),F?z.cloneElement(v,{variant:v.props.variant||"inline"}):v,I&&u.jsx(V,P({},q,{children:I}))]}))})});iu.muiName="Typography";function TR(e){return it("MuiFormControl",e)}const am=Xe("MuiFormControl",["root","error","disabled","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),ER=Xe("MuiSwitch",["root","checked","disabled","action","input","thumb","track","focusVisible","readOnly","colorPrimary","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid","startDecorator","endDecorator"]),_R=["id","className","component","disabled","required","error","color","size","orientation","slots","slotProps"],kR=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,TR,{})},DR=be("div",{name:"JoyFormControl",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i;return P({"--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",[`&.${am.error}`]:{"--FormHelperText-color":e.vars.palette.danger[500]},[`&.${am.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 ~ .${ER.root}`]:{"--unstable_Switch-margin":"0 0 0 auto"}})}),ou=z.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:g={}}=r,m=Ae(r,_R),v=ji(i),[I,w]=z.useState(null),y=P({},r,{id:v,component:a,color:d,disabled:l,error:c,required:s,size:f,orientation:h});let C;const b=kR(y),[A,E]=Ie("root",{ref:n,className:Ln(b.root,o),elementType:DR,externalForwardedProps:P({},m,{component:a,slots:p,slotProps:g}),ownerState:y}),D=z.useMemo(()=>({disabled:l,required:s,error:c,color:d,size:f,htmlFor:v,labelId:`${v}-label`,"aria-describedby":I?`${v}-helper-text`:void 0,setHelperText:w,registerEffect:C}),[d,l,c,I,v,C,s,f]);return u.jsx(Va.Provider,{value:D,children:u.jsx(A,P({},E))})});function PR(e){return it("MuiFormLabel",e)}Xe("MuiFormLabel",["root","asterisk"]);const OR=["children","component","htmlFor","id","slots","slotProps"],RR=()=>lt({root:["root"],asterisk:["asterisk"]},PR,{}),MR=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)"})),LR=be("span",{name:"JoyFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})({color:"var(--FormLabel-asteriskColor)"}),au=z.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,OR),p=z.useContext(Va),g=(r=(i=t.required)!=null?i:p==null?void 0:p.required)!=null?r:!1,m=P({},o,{required:g}),v=RR(),I=P({},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:MR,externalForwardedProps:I,ownerState:m}),[C,b]=Ie("asterisk",{additionalProps:{"aria-hidden":!0},className:v.asterisk,elementType:LR,externalForwardedProps:I,ownerState:m});return u.jsxs(w,P({},y,{children:[a,g&&u.jsxs(C,P({},b,{children:[" ","*"]}))]}))}),BR=({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(S.Box,{sx:{minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:u.jsxs(vR,{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(Ua,{name:"email",type:"email",onChange:c})]}),u.jsxs(ou,{children:[u.jsx(au,{children:"Password"}),u.jsx(Ua,{name:"password",type:"password",onChange:d})]}),u.jsx(Xr,{sx:{mt:1},onClick:f,children:"Log in"})]})}),u.jsx(pt,{showToast:a,message:t,color:"danger",hideToast:s})]})};function $R(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"]),NR=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"),FR=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"),zR=["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"],jR=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,$R,{})},VR=be("span",{name:"JoyCheckbox",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i;return P({"--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}})}),UR=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[P({"--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?[]:[P({},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]}]]}),HR=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]}]:[]]}),WR=be("input",{name:"JoyCheckbox",slot:"Input",overridesResolver:(e,t)=>t.input})(()=>({margin:0,opacity:0,position:"absolute",width:"100%",height:"100%",cursor:"pointer"})),GR=be("label",{name:"JoyCheckbox",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>P({flex:1,minWidth:0},e.disableIcon&&{zIndex:1,pointerEvents:"none"})),YR=u.jsx(NR,{}),KR=u.jsx(FR,{}),qR=z.forwardRef(function(t,n){var r,i,o,a,l;const s=ct({props:t,name:"JoyCheckbox"}),{checked:c,uncheckedIcon:d,checkedIcon:f=YR,label:h,defaultChecked:p,disabled:g,disableIcon:m=!1,overlay:v,id:I,indeterminate:w=!1,indeterminateIcon:y=KR,name:C,onBlur:b,onChange:A,onFocus:E,onFocusVisible:D,readOnly:F,required:Y,value:W,color:T,variant:U,size:G="md",component:$,slots:B={},slotProps:L={}}=s,V=Ae(s,zR),q=z.useContext(Va),ee=(r=(i=t.disabled)!=null?i:q==null?void 0:q.disabled)!=null?r:g,O=(o=(a=t.size)!=null?a:q==null?void 0:q.size)!=null?o:G,M=ji(I!=null?I:q==null?void 0:q.htmlFor),N={checked:c,defaultChecked:p,disabled:ee,onBlur:b,onChange:A,onFocus:E,onFocusVisible:D},{getInputProps:j,checked:te,disabled:se,focusVisible:oe}=SS(N),J=te||w,ge=J?U||"solid":U||"outlined",Se=t.color||(q!=null&&q.error?"danger":(l=q==null?void 0:q.color)!=null?l:T),at=P({},s,{checked:te,disabled:se,disableIcon:m,overlay:v,focusVisible:oe,color:J?Se||"primary":Se||"neutral",variant:ge,size:O}),kt=jR(at),de=P({},V,{component:$,slots:B,slotProps:L}),[he,Ce]=Ie("root",{ref:n,className:kt.root,elementType:VR,externalForwardedProps:de,ownerState:at}),[Te,He]=Ie("checkbox",{className:kt.checkbox,elementType:UR,externalForwardedProps:de,ownerState:at}),[De,Ee]=Ie("action",{className:kt.action,elementType:HR,externalForwardedProps:de,ownerState:at}),[It,St]=Ie("input",{additionalProps:P({id:M,name:C,value:W,readOnly:F,role:void 0,required:Y!=null?Y:q==null?void 0:q.required,"aria-describedby":q==null?void 0:q["aria-describedby"]},w&&{"aria-checked":"mixed"}),className:kt.input,elementType:WR,externalForwardedProps:de,getSlotProps:j,ownerState:at}),[jt,Mt]=Ie("label",{additionalProps:{htmlFor:M},className:kt.label,elementType:GR,externalForwardedProps:de,ownerState:at});let qt=d;return m?qt=null:w?qt=y:te&&(qt=f),u.jsxs(he,P({},Ce,{children:[u.jsxs(Te,P({},He,{children:[u.jsx(De,P({},Ee,{children:u.jsx(It,P({},St))})),qt]})),h&&u.jsx(ru.Provider,{value:!0,children:u.jsx(jt,P({},Mt,{children:h}))})]}))}),QR=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(S.Box,{sx:{mb:2},children:[u.jsx(S.Typography,{level:"body-sm",mb:1,children:e}),u.jsxs(k1,{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(QR,{fontSize:"medium",color:"primary",sx:{ml:-.5,zIndex:2,pointerEvents:"none"}}),u.jsx(qR,{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(S.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"]},JR=({labels:e,values:t,valuesMap:n,onChange:r})=>{const[i,o]=x.useState(!1);return u.jsxs(S.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(S.FormLabel,{color:"primary",children:e.marketSelection}),u.jsx(S.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="},XR=({match:e,timeFormat:t})=>{var n,r,i,o;return u.jsxs(S.Box,{display:"flex",alignItems:"center",gap:.5,fontSize:"xs",children:[u.jsxs(S.Typography,{mr:1,children:["[",_t(e.kickoffAt).format(t),"]"]}),e.homeTeam.code?u.jsx(S.Tooltip,{title:e.homeTeam.name,children:u.jsxs(S.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[u.jsx(S.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(S.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(S.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(S.Avatar,{src:((r=e.homeTeam.assets)==null?void 0:r.logo)||gt.team,sx:{width:"20px",height:"20px"}})]}),"-",e.awayTeam.code?u.jsx(S.Tooltip,{title:e.awayTeam.name,children:u.jsxs(S.Box,{display:"flex",gap:.5,alignItems:"center",children:[u.jsx(S.Avatar,{src:((i=e.awayTeam.assets)==null?void 0:i.logo)||gt.team,sx:{width:"20px",height:"20px"}})," ",u.jsx(S.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})}):u.jsxs(u.Fragment,{children:[u.jsx(S.Avatar,{src:((o=e.awayTeam.assets)==null?void 0:o.logo)||gt.team,sx:{width:"20px",height:"20px"}}),u.jsx(S.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})]})},sm=Ve(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),ZR=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),{sdk:l}=ht(),s=()=>k(this,null,function*(){try{const h=yield l.topX.getGames({limit:50},!0),p=yield l.matchQuiz.getGames({limit:50},!0),g=[...h.data,...p.data];if(e.related&&e.related.length>0){const m=g.filter(v=>{var I;return(I=e.related)==null?void 0:I.some(w=>w.entity_id===v.id)}).map(v=>v.id);n(m)}i(g)}catch(f){console.error(f),d()}}),c=(f,h)=>{const p=h.map(g=>({entity_id:g,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(S.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(S.FormLabel,{color:"primary",children:e.label}),u.jsx(S.Select,{multiple:!0,indicator:u.jsx(sm,{}),defaultValue:t,renderValue:f=>u.jsx(S.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(S.Chip,{variant:"soft",color:"primary",children:h.label},`related-game-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${S.selectClasses.indicator}`]:{transition:"0.2s",[`&.${S.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(S.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(pt,{showToast:o,message:"There was a problem witch fetching games for related options",color:"danger",hideToast:d})]})},eM=e=>{const[t,n]=x.useState([]),[r,i]=x.useState([]),[o,a]=x.useState(!1),{sdk:l}=ht(),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(g=>{var m;return(m=e.related)==null?void 0:m.some(v=>v.entity_id===g.id)}).map(g=>g.id);n(p)}i(h.data)}catch(f){console.error(f),d()}}),c=(f,h)=>{const p=h.map(g=>({entity_id:g,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(S.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(S.FormLabel,{color:"primary",children:e.label}),u.jsx(S.Select,{multiple:!0,indicator:u.jsx(sm,{}),defaultValue:t,renderValue:f=>u.jsx(S.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(S.Chip,{variant:"soft",color:"primary",children:h.label},`related-template-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${S.selectClasses.indicator}`]:{transition:"0.2s",[`&.${S.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(S.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(pt,{showToast:o,message:"There was a problem witch fetching templates for related options",color:"danger",hideToast:d})]})},lm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="game"),cm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="template"),tM=e=>{const t=(n,r)=>{if(r==="games"){const i=cm(e.related);e.onChange([...n,...i])}if(r==="templates"){const i=lm(e.related);e.onChange([...n,...i])}};return u.jsxs(u.Fragment,{children:[u.jsx(ZR,{label:e.labels.games,related:lm(e.related),onChange:n=>t(n,"games")}),u.jsx(eM,{label:e.labels.templates,related:cm(e.related),onChange:n=>t(n,"templates")})]})},nM=(e,t)=>{const[n,r]=x.useState(null),{https:i}=ht(),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},cs=({my:e})=>u.jsx(S.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",my:e},children:u.jsx(S.CircularProgress,{variant:"solid",color:"neutral"})}),rM=["PENDING","LIVE","SETTLED"],iM=["CANCELED","LIVE","OPEN","PENDING"],oM=["ACTIVE","INACTIVE","EXPIRED"],aM=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"),um=e=>{let t=[];return e.entityType==="CLASSIC_QUIZ"||e.entityType==="EITHER_OR"||e.entityType==="POLL"?t=Array.from(oM):e.entityType==="TEMPLATE"?t=Array.from(rM):t=Array.from(iM),u.jsx(u.Fragment,{children:t.map(n=>u.jsx(S.Option,{value:n,children:aM.get(n)},`${e.entityType}-${n}-status`))})};class sM{constructor(){ae(this,"name","");ae(this,"scheduled_task_config",{entity_id:"",entity_type:"",change:{status:""}});ae(this,"trigger",{trigger_type:"DATETIME",date:""})}}const lM=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"),cM=e=>{const[t,n]=x.useState(!1),{https:r}=ht(),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(S.Modal,{open:e.isOpen,onClose:e.toggleModal,children:u.jsxs(S.ModalDialog,{children:[u.jsxs(S.DialogTitle,{children:[u.jsx(lM,{}),e.labels.deleteScheduledTaskModalTitle]}),u.jsx(S.Divider,{}),u.jsx(S.DialogContent,{children:u.jsxs(S.Typography,{children:[e.labels.deleteScheduledTaskModalParagraph,u.jsx(S.Typography,{fontWeight:"bold",children:e.taskName}),"?"]})}),u.jsxs(S.DialogActions,{children:[u.jsx(S.Button,{loading:t,variant:"solid",color:"danger",onClick:o=>i(o),children:e.labels.delete}),u.jsx(S.Button,{variant:"plain",color:"neutral",onClick:o=>{o.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]})})})},uM=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,g]=x.useState(!1),[m,v]=x.useState(!1),[I,w]=x.useState("success"),[y,C]=x.useState(""),[b,A]=x.useState(!1),E=x.useRef(!1),D=nM(e.entityId,E.current),{https:F}=ht();if(!D)return u.jsx(cs,{my:10});const Y=()=>A(!b),W=(L,V)=>{v(!0),w(L),C(V)},T=(L,V)=>{i(V.scheduled_task_config.change.status),s(V.trigger.date),n(L)},U=()=>k(this,null,function*(){h(!0);const L=B("CREATE","");if((yield F.setSchedulers(L,"CREATE",null)).ok){h(!1),a(""),d(""),E.current=!E.current,W("success",e.labels.createScheduledTaskMessage);return}h(!1),a(""),d(""),W("danger",e.labels.createScheduledTaskErrorMessage)}),G=(L,V)=>k(this,null,function*(){g(!0);const q=B("UPDATE",V);if((yield F.setSchedulers(q,"UPDATE",L)).ok){g(!1),n(null),i(""),s(""),E.current=!E.current,W("success",e.labels.updateScheduledTaskMessage);return}g(!1),W("danger",e.labels.updateScheduledTaskErrorMessage),n(null),i(""),s("")}),$=()=>{E.current=!E.current},B=(L,V)=>{const q=new sM,ee=L==="CREATE"?o:r,O=L==="CREATE"?null:V,M=L==="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=M,q.name=O,q};return u.jsxs(u.Fragment,{children:[D.map((L,V)=>u.jsx(S.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(S.CardContent,{children:t===V?u.jsxs(S.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%"},children:[u.jsxs(S.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(S.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(S.Select,{value:r,size:"sm",name:"status",onChange:(q,ee)=>i(ee),sx:{minHeight:"36px"},children:u.jsx(um,{entityType:e.entityType})})]}),u.jsxs(S.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(S.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Vc,{defaultDate:l,onChange:q=>s(q)})]}),r&&l?u.jsx(S.Button,{onClick:()=>G(L.id,L.name),loading:p,sx:{mt:"auto"},children:e.labels.save}):u.jsx(S.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.save})]}):u.jsxs(S.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"}},children:[u.jsxs(S.Box,{children:[u.jsxs(S.Typography,{style:{fontWeight:"bold"},children:[e.labels.name,": ",u.jsx(S.Typography,{whiteSpace:"wrap",children:L.name})]}),u.jsxs(S.Typography,{style:{color:"gray"},children:[e.labels.status,": ",u.jsx(S.Typography,{whiteSpace:"wrap",children:L.status})]})]}),u.jsxs(S.Box,{children:[u.jsx(S.Tooltip,{title:e.labels.edit,children:u.jsx(S.IconButton,{onClick:()=>T(V,L),children:u.jsx(Le.Edit,{})})}),u.jsx(S.Tooltip,{title:e.labels.delete,children:u.jsx(S.IconButton,{onClick:Y,children:u.jsx(Le.Delete,{})})})]}),u.jsx(cM,{labels:e.labels,isOpen:b,taskId:L.id,taskName:L.name,toggleModal:Y,refetchTasks:$,toggleToast:W})]})})},`scheduled-task-${e.entityId}-${e.entityType}-${L.id}`)),u.jsxs(S.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%",mt:D&&D.length?2:0},children:[u.jsxs(S.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(S.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(S.Select,{value:o,size:"sm",name:"status",onChange:(L,V)=>a(V),sx:{minHeight:"37px"},children:u.jsx(um,{entityType:e.entityType})})]}),u.jsxs(S.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(S.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Vc,{defaultDate:c,onChange:L=>d(L)})]}),o&&c?u.jsx(S.Button,{onClick:U,loading:f,sx:{mt:"auto"},children:e.labels.create}):u.jsx(S.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.create})]}),u.jsx(pt,{showToast:m,message:y,color:I,hideToast:()=>v(!1)})]})};function dM(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 fM=["children","action","component","color","disabled","variant","loading","loadingIndicator","size","slots","slotProps"],hM=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,dM,{});return r&&i&&(c.root+=` ${i}`),c},pM=be("button")(({theme:e,ownerState:t})=>{var n,r,i,o;return[P({"--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]:P({"--Icon-color":"currentColor"},e.focus.default)}),P({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":P({"--Icon-color":"currentColor"},(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color])},'&:active, &[aria-pressed="true"]':P({"--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]})]}),gM=be(pM,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),mM=be("span",{name:"JoyIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e,ownerState:t})=>{var n,r;return P({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})}),dm=z.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:g={},slotProps:m={}}=i,v=Ae(i,fM),I=z.useContext(Sp),w=z.useContext(Ap),y=t.variant||I.variant||d,C=t.size||I.size||p,b=t.color||I.color||s,A=(r=t.loading||t.disabled)!=null?r:I.disabled||f||c,E=z.useRef(null),D=sn(E,n),{focusVisible:F,setFocusVisible:Y,getRootProps:W}=Rl(P({},i,{disabled:A,rootRef:D})),T=h!=null?h:u.jsx(wp,{color:b,thickness:{sm:2,md:3,lg:4}[C]||3});z.useImperativeHandle(a,()=>({focusVisible:()=>{var M;Y(!0),(M=E.current)==null||M.focus()}}),[Y]);const U=P({},i,{component:l,color:b,disabled:A,variant:y,loading:f,size:C,focusVisible:F,instanceSize:t.size}),G=hM(U),$=M=>{var N;let j=i.onClick;if(typeof m.root=="function"?j=m.root(U).onClick:m.root&&(j=m.root.onClick),(N=j)==null||N(M),w){var te;(te=w.onClick)==null||te.call(w,M,i.value)}};let B=i["aria-pressed"];typeof m.root=="function"?B=m.root(U)["aria-pressed"]:m.root&&(B=m.root["aria-pressed"]),w!=null&&w.value&&(Array.isArray(w.value)?B=w.value.indexOf(i.value)!==-1:B=w.value===i.value);const L=P({},v,{component:l,slots:g,slotProps:m}),[V,q]=Ie("root",{ref:n,className:G.root,elementType:gM,getSlotProps:W,externalForwardedProps:L,ownerState:U,additionalProps:{onClick:$,"aria-pressed":B}}),[ee,O]=Ie("loadingIndicator",{className:G.loadingIndicator,elementType:mM,externalForwardedProps:L,ownerState:U});return u.jsx(V,P({},q,{children:f?u.jsx(ee,P({},O,{children:T})):o}))});dm.muiName="IconButton";const fm=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"),vM=({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(S.ListItemDecorator,{children:u.jsx(S.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(S.FormControl,{sx:{mb:1},children:[u.jsx(S.FormLabel,{required:r,color:"primary",children:e}),u.jsx(S.Select,X(H({slotProps:{button:{sx:{whiteSpace:"nowrap"}}},sx:{"--ListItemDecorator-size":"44px",minHeight:"37px"},renderValue:o,value:t,onChange:l},t&&{endDecorator:u.jsx(dm,{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(fm,{})}),indicator:null}),{children:n.map((s,c)=>{var d;return u.jsxs(x.Fragment,{children:[c!==0?u.jsx(S.ListDivider,{role:"none"}):null,u.jsxs(S.Option,{value:s.id,label:s.name,children:[u.jsx(S.ListItemDecorator,{children:u.jsx(S.Avatar,{size:"sm",src:((d=s.assets)==null?void 0:d.logo)||gt.competition})}),s.name]})]},`${s.id}-${c}`)})}))]})};function bM(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hm=bM,yM=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,CM=yM,xM=CM,wM=typeof self=="object"&&self&&self.Object===Object&&self,IM=xM||wM||Function("return this")(),pm=IM,SM=pm,AM=function(){return SM.Date.now()},TM=AM,EM=/\s/;function _M(e){for(var t=e.length;t--&&EM.test(e.charAt(t)););return t}var kM=_M,DM=kM,PM=/^\s+/;function OM(e){return e&&e.slice(0,DM(e)+1).replace(PM,"")}var RM=OM,MM=pm,LM=MM.Symbol,su=LM,gm=su,mm=Object.prototype,BM=mm.hasOwnProperty,$M=mm.toString,lo=gm?gm.toStringTag:void 0;function NM(e){var t=BM.call(e,lo),n=e[lo];try{e[lo]=void 0;var r=!0}catch(o){}var i=$M.call(e);return r&&(t?e[lo]=n:delete e[lo]),i}var FM=NM,zM=Object.prototype,jM=zM.toString;function VM(e){return jM.call(e)}var UM=VM,vm=su,HM=FM,WM=UM,GM="[object Null]",YM="[object Undefined]",bm=vm?vm.toStringTag:void 0;function KM(e){return e==null?e===void 0?YM:GM:bm&&bm in Object(e)?HM(e):WM(e)}var qM=KM;function QM(e){return e!=null&&typeof e=="object"}var JM=QM,XM=qM,ZM=JM,eL="[object Symbol]";function tL(e){return typeof e=="symbol"||ZM(e)&&XM(e)==eL}var ym=tL,nL=RM,Cm=hm,rL=ym,xm=NaN,iL=/^[-+]0x[0-9a-f]+$/i,oL=/^0b[01]+$/i,aL=/^0o[0-7]+$/i,sL=parseInt;function lL(e){if(typeof e=="number")return e;if(rL(e))return xm;if(Cm(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Cm(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=nL(e);var n=oL.test(e);return n||aL.test(e)?sL(e.slice(2),n?2:8):iL.test(e)?xm:+e}var cL=lL,uL=hm,lu=TM,wm=cL,dL="Expected a function",fL=Math.max,hL=Math.min;function pL(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(dL);t=wm(t)||0,uL(n)&&(d=!!n.leading,f="maxWait"in n,o=f?fL(wm(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(A){var E=r,D=i;return r=i=void 0,c=A,a=e.apply(D,E),a}function g(A){return c=A,l=setTimeout(I,t),d?p(A):a}function m(A){var E=A-s,D=A-c,F=t-E;return f?hL(F,o-D):F}function v(A){var E=A-s,D=A-c;return s===void 0||E>=t||E<0||f&&D>=o}function I(){var A=lu();if(v(A))return w(A);l=setTimeout(I,m(A))}function w(A){return l=void 0,h&&r?p(A):(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 A=lu(),E=v(A);if(r=arguments,i=this,s=A,E){if(l===void 0)return g(s);if(f)return clearTimeout(l),l=setTimeout(I,t),p(s)}return l===void 0&&(l=setTimeout(I,t)),a}return b.cancel=y,b.flush=C,b}var gL=pL;const si=fn(gL),xn=({option:e})=>u.jsxs(S.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(S.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:e.logo}),u.jsx(S.Typography,{children:e.label}),u.jsx(S.Typography,{ml:.5,level:"body-xs",children:`(${e.countryName})`})]}),Im=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}}))||[],mL=({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,g]=x.useState(!1),{sdk:m}=ht(),v=()=>g(!p),I=(b,A)=>{a(A),i(A[0]?[A[0].id]:[])},w=3;x.useEffect(()=>{!f&&n&&n.length&&m.football.getCompetitions({competitionIds:n}).then(b=>{a(Im(b))}).catch(b=>{console.error(b),v(),a([])})},[]);const y=x.useMemo(()=>si(b=>{d(!0),m.football.getCompetitions({name:b}).then(A=>{s([...Im(A)]),d(!1)}).catch(A=>{console.error(A),v(),s([]),d(!1)})},300),[]);x.useEffect(()=>{if(!f||f.length<w){s([]);return}return y(f),()=>y.cancel()},[f,y]);const C=(b,A)=>b.map((E,D)=>u.jsx(S.Chip,{variant:"solid",endDecorator:u.jsx(S.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:F=>A({index:D}).onClick(F),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(S.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(S.FormLabel,{required:r,color:"primary",children:t}),u.jsx(S.Box,{children:u.jsx(S.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:c,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(b,A)=>b.id===A.id,endDecorator:c?u.jsx(S.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.competitionsSelectionPlaceholder,options:l,disabled:o.length===1,filterOptions:b=>b.filter(A=>!o.some(E=>E.value===A.value)),onInputChange:(b,A)=>{h(A)},onChange:I,getOptionKey:b=>b.id,value:o,renderTags:C,renderOption:(b,A)=>u.jsx(S.AutocompleteOption,X(H({},b),{children:u.jsx(xn,{option:A})}))})}),u.jsx(pt,{showToast:p,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:v})]})},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}}))||[],vL=({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:g}=ht(),m=()=>p(!h),v=(C,b)=>{o(b);const A=b.map(E=>E.id);r(A&&A.length?A:null)},I=3;x.useEffect(()=>{!d&&t&&t.length&&g.football.getCompetitions({competitionIds:t}).then(C=>{o(Sm(C))}).catch(C=>{console.error(C),m(),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,g.football.getCompetitions(b).then(A=>{l([...Sm(A)]),c(!1)}).catch(A=>{console.error(A),m(),l([]),c(!1)})},300),[]);x.useEffect(()=>{if(!d||d.length<I){l([]);return}return w(d),()=>w.cancel()},[d,w]);const y=(C,b)=>C.map((A,E)=>u.jsx(S.Chip,{variant:"solid",endDecorator:u.jsx(S.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:D=>b({index:E}).onClick(D),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:A},`option_${A.id}`)},A.id));return u.jsxs(u.Fragment,{children:[u.jsx(S.Box,{sx:{marginBottom:"16px"},children:u.jsx(S.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(S.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.competitionsSelectionPlaceholder,options:a,filterOptions:C=>C.filter(b=>!i.some(A=>A.value===b.value)),onInputChange:(C,b)=>{f(b)},onChange:v,getOptionKey:C=>C.id,value:i,renderTags:y,renderOption:(C,b)=>u.jsx(S.AutocompleteOption,X(H({},C),{children:u.jsx(xn,{option:b})}))})}),u.jsx(pt,{showToast:h,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:m})]})},Am=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})))||[],bL=({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}=ht(),g=()=>h(!f),m=(y,C)=>{i(C);const b=C.map(A=>A.id);n(b&&b.length?b:null)},v=3;x.useEffect(()=>{!c&&t&&t.length&&p.profile.getByIds(t).then(y=>{i(Am(y))}).catch(y=>{g(),console.error(y),i([])})},[]);const I=x.useMemo(()=>si(y=>{s(!0),p.profile.getByIds([],y).then(C=>{a([...Am(C)]),s(!1)}).catch(C=>{console.error(C),g(),a([]),s(!1)})},300),[]);x.useEffect(()=>{if(!c||c.length<v){a([]);return}return I(c),()=>I.cancel()},[c,I]);const w=(y,C)=>y.map((b,A)=>{var E;return u.jsx(S.Chip,{variant:"solid",endDecorator:u.jsx(S.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:D=>C({index:A}).onClick(D),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsxs(S.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(S.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(E=b.avatar)!=null?E:gt.avatar}),u.jsx(S.Typography,{children:b.label})]})},b.id)});return u.jsxs(u.Fragment,{children:[u.jsx(S.Box,{sx:{marginBottom:"16px"},children:u.jsx(S.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(S.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:m,getOptionKey:y=>y.id,value:r,renderTags:w,renderOption:(y,C)=>{var b;return u.jsx(S.AutocompleteOption,X(H({},y),{children:u.jsxs(S.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(S.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(b=C.avatar)!=null?b:gt.avatar}),u.jsx(S.Typography,{children:C.label})]})}))}})}),u.jsx(pt,{showToast:f,message:e.searchProfilesErrorMessage,color:"danger",hideToast:g})]})},Tm=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}}))||[],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:g}=ht(),m=()=>p(!h),v=(C,b)=>{o(b);const A=b.map(E=>E.id);r(A&&A.length?A:null)},I=3;x.useEffect(()=>{!d&&t&&t.length&&g.football.getTeams({teamIds:t,scope:n}).then(C=>{const b=C.data.filter(A=>!A.name.includes("/"));o(Tm(b))}).catch(C=>{console.error(C),m(),o([])})},[]);const w=x.useMemo(()=>si(C=>{c(!0),g.football.getTeams({name:C,scope:n}).then(b=>{const A=b.data.filter(E=>!E.name.includes("/"));l([...Tm(A)]),c(!1)}).catch(b=>{console.error(b),m(),l([]),c(!1)})},300),[]);x.useEffect(()=>{if(!d||d.length<I){l([]);return}return w(d),()=>w.cancel()},[d,w]);const y=(C,b)=>C.map((A,E)=>u.jsx(S.Chip,{variant:"solid",endDecorator:u.jsx(S.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:D=>b({index:E}).onClick(D),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:A},`option_${A.id}`)},A.id));return u.jsxs(u.Fragment,{children:[u.jsx(S.Box,{sx:{marginBottom:"16px"},children:u.jsx(S.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(S.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.teamsSelectionPlaceholder,options:a,filterOptions:C=>C.filter(b=>!i.some(A=>A.value===b.value)),onInputChange:(C,b)=>{f(b)},onChange:v,getOptionKey:C=>C.id,value:i,renderTags:y,renderOption:(C,b)=>u.jsx(S.AutocompleteOption,X(H({},C),{children:u.jsx(xn,{option:b})}))})}),u.jsx(pt,{showToast:h,message:e.searchTeamsErrorMessage,color:"danger",hideToast:m})]})},Em=({checked:e,disabled:t,onChange:n})=>u.jsx(S.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"},[`&.${S.switchClasses.checked}`]:{"--Switch-trackBackground":"#5CB176","&:hover":{"--Switch-trackBackground":"#5CB176"}}}}),CL=({label:e,defaultValue:t,description:n,disabled:r,descriptionColor:i,onChange:o})=>n?u.jsxs(S.Box,{mb:2,children:[u.jsx(S.Typography,{component:"label",endDecorator:u.jsx(Em,{checked:t,disabled:r,onChange:o}),children:e}),u.jsx(S.Typography,{level:"body-sm",color:i||"neutral",children:n})]}):u.jsx(S.Typography,{sx:()=>({marginBottom:"16px"}),component:"label",endDecorator:u.jsx(Em,{checked:t,disabled:r,onChange:o}),children:e}),xL={control:(e,t)=>X(H({},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(H({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>X(H({},e),{minHeight:"36px"}),menu:e=>X(H({},e),{position:"relative"}),clearIndicator:e=>X(H({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>X(H({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>X(H({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>X(H({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"13px"}),multiValueLabel:e=>X(H({},e),{color:"#333"})},wL=e=>e.map(t=>({label:t,value:t})),_m=e=>{const[t,n]=x.useState(""),[r,i]=x.useState(!1),o=wL(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(im,{styles:xL,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(pt,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},IL=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 km{constructor(){ae(this,"contestId","");ae(this,"contestType","");ae(this,"description","");ae(this,"userList",[])}}const SL=(e,t,n)=>{const[r,i]=x.useState(null),{sdk:o}=ht(),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 km)}});return x.useEffect(()=>{a()},[]),r};class AL{constructor(){ae(this,"position","");ae(this,"profileId","");ae(this,"note","");ae(this,"tags",[])}}function TL(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 EL=TL,_L=Array.isArray,kL=_L,Dm=su,DL=EL,PL=kL,OL=ym,RL=1/0,Pm=Dm?Dm.prototype:void 0,Om=Pm?Pm.toString:void 0;function Rm(e){if(typeof e=="string")return e;if(PL(e))return DL(e,Rm)+"";if(OL(e))return Om?Om.call(e):"";var t=e+"";return t=="0"&&1/e==-RL?"-0":t}var ML=Rm,LL=ML;function BL(e){return e==null?"":LL(e)}var Mm=BL;function $L(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 NL=$L;function FL(e){return function(t){return e==null?void 0:e[t]}}var zL=FL,jL=zL,VL={À:"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"},UL=jL(VL),HL=UL,WL=HL,GL=Mm,YL=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,KL="\\u0300-\\u036f",qL="\\ufe20-\\ufe2f",QL="\\u20d0-\\u20ff",JL=KL+qL+QL,XL="["+JL+"]",ZL=RegExp(XL,"g");function e2(e){return e=GL(e),e&&e.replace(YL,WL).replace(ZL,"")}var t2=e2,n2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function r2(e){return e.match(n2)||[]}var i2=r2,o2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function a2(e){return o2.test(e)}var s2=a2,Lm="\\ud800-\\udfff",l2="\\u0300-\\u036f",c2="\\ufe20-\\ufe2f",u2="\\u20d0-\\u20ff",d2=l2+c2+u2,Bm="\\u2700-\\u27bf",$m="a-z\\xdf-\\xf6\\xf8-\\xff",f2="\\xac\\xb1\\xd7\\xf7",h2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",p2="\\u2000-\\u206f",g2=" \\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",Nm="A-Z\\xc0-\\xd6\\xd8-\\xde",m2="\\ufe0e\\ufe0f",Fm=f2+h2+p2+g2,zm="['’]",jm="["+Fm+"]",v2="["+d2+"]",Vm="\\d+",b2="["+Bm+"]",Um="["+$m+"]",Hm="[^"+Lm+Fm+Vm+Bm+$m+Nm+"]",y2="\\ud83c[\\udffb-\\udfff]",C2="(?:"+v2+"|"+y2+")",x2="[^"+Lm+"]",Wm="(?:\\ud83c[\\udde6-\\uddff]){2}",Gm="[\\ud800-\\udbff][\\udc00-\\udfff]",li="["+Nm+"]",w2="\\u200d",Ym="(?:"+Um+"|"+Hm+")",I2="(?:"+li+"|"+Hm+")",Km="(?:"+zm+"(?:d|ll|m|re|s|t|ve))?",qm="(?:"+zm+"(?:D|LL|M|RE|S|T|VE))?",Qm=C2+"?",Jm="["+m2+"]?",S2="(?:"+w2+"(?:"+[x2,Wm,Gm].join("|")+")"+Jm+Qm+")*",A2="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",T2="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",E2=Jm+Qm+S2,_2="(?:"+[b2,Wm,Gm].join("|")+")"+E2,k2=RegExp([li+"?"+Um+"+"+Km+"(?="+[jm,li,"$"].join("|")+")",I2+"+"+qm+"(?="+[jm,li+Ym,"$"].join("|")+")",li+"?"+Ym+"+"+Km,li+"+"+qm,T2,A2,Vm,_2].join("|"),"g");function D2(e){return e.match(k2)||[]}var P2=D2,O2=i2,R2=s2,M2=Mm,L2=P2;function B2(e,t,n){return e=M2(e),t=n?void 0:t,t===void 0?R2(e)?L2(e):O2(e):e.match(t)||[]}var $2=B2,N2=NL,F2=t2,z2=$2,j2="['’]",V2=RegExp(j2,"g");function U2(e){return function(t){return N2(z2(F2(t).replace(V2,"")),e,"")}}var H2=U2,W2=H2,G2=W2(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Y2=G2;const K2=fn(Y2);class q2{constructor(){ae(this,"id","");ae(this,"value","");ae(this,"label","")}}class Q2 extends q2{constructor(){super(...arguments);ae(this,"logo","");ae(this,"countryFlag","");ae(this,"countryName","")}}class Xm extends Q2{constructor(){super(...arguments);ae(this,"group","")}}const J2=(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(H({},n),{[K2(r)]:cu(e[r])}),{}):e,Zm=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 Xm;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},X2=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"}},Z2=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"}},eB=({profile:e,winner:t,labels:n,onChange:r,onRemove:i})=>{var v,I,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=A=>{A.persist();const{value:E}=A.target;a(E),r("position",E)},p=A=>{A.persist();const{value:E}=A.target;s(E),r("note",E)},g=A=>{d(A),r("tags",A)},m=()=>{a(""),s(""),d([]),i()};return u.jsxs("tr",{style:{backgroundColor:f?"rgb(255 237 213)":""},children:[u.jsx("td",{children:u.jsxs(S.Box,{display:"flex",alignItems:"center",children:[u.jsx(S.Avatar,{src:((v=e.profileModel)==null?void 0:v.avatar)||"",alt:((I=e.profileModel)==null?void 0:I.name)||"Unknown",sx:{mr:1}}),u.jsxs(S.Box,{children:[u.jsxs(S.Typography,{fontWeight:"md",children:[J2((w=e.profileModel)==null?void 0:w.name,(y=e.profileModel)==null?void 0:y.nickname)," ",(C=e.profileModel)!=null&&C.name?u.jsxs(S.Typography,{children:["(",(b=e.profileModel)==null?void 0:b.name,")"]}):u.jsx(u.Fragment,{})]}),u.jsx(S.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(S.Input,{name:"position",placeholder:"#",value:o,onChange:h,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(S.Input,{name:"note",value:l,placeholder:"This user has...",onChange:p,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(_m,{labels:n,tags:c,onChange:g})}),u.jsx("td",{children:u.jsx(S.Tooltip,{title:n.clearWinner,children:u.jsx(S.IconButton,{onClick:m,variant:"outlined",color:"danger",disabled:!f,children:u.jsx(Le.Remove,{})})})})]})},tB=e=>{const t=(i,o,a)=>{if(e.winners.find(d=>d.profileId===i)){const d=e.winners.map(f=>f.profileId===i?X(H({},f),{[o]:a}):f);r(d);return}const s=new AL;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(H({},o),{userList:i}))};return e.leaderboard?u.jsxs(u.Fragment,{children:[u.jsx(S.Typography,{level:"h4",children:e.labels.configureWinners}),e.leaderboard.length===0?u.jsx(S.Typography,{level:"body-lg",textAlign:"center",fontWeight:"bold",children:e.labels.noStandingsAvailable}):u.jsx(u.Fragment,{}),u.jsxs(S.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(eB,{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(S.Box,{textAlign:"center",my:1,children:u.jsx(S.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(cs,{my:40})},nB=(e,t,n,r,i)=>{const[o,a]=x.useState(null),[l,s]=x.useState(!1),[c,d]=x.useState(!1),{sdk:f}=ht(),h=()=>k(this,null,function*(){d(!0);const p={limit:10,page:r},g=!0;try{let m;t==="template"?m=yield f.loyalty.getLeaderboard(e,p,g):m=yield f.loyalty.getLeaderboardForGame(e,p,g),m.meta.pagination.numberOfPages>r?s(!0):s(!1),o&&o.length?a(v=>[...v,...m.data]):a(m.data)}catch(m){console.error(m),i("danger",n),a([])}d(!1)});return x.useEffect(()=>{h()},[r]),{leaderboard:o,hasMoreParticipants:l,isLeaderboardLoading:c}};class rB{constructor(){ae(this,"isValid",!0);ae(this,"message","");ae(this,"validate",(t,n,r)=>(this.validateField(t,n),this.validateWinnerIds(t,r),this));ae(this,"validateField",(t,n)=>{const r=t.every(i=>i.position&&i.profileId);r||(this.isValid=r,this.message=n)});ae(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 iB=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(S.Card,{variant:"plain",children:t?u.jsxs(u.Fragment,{children:[u.jsx(S.Typography,{level:"body-lg",mb:2,fontWeight:"bold",children:e.labels.preview}),u.jsx(S.Sheet,{children:u.jsxs(S.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(S.Box,{display:"flex",alignItems:"center",justifyContent:{xs:"center",md:"flex-start"},gap:2,children:[u.jsx(S.Avatar,{src:(r==null?void 0:r.avatar)||"",alt:(r==null?void 0:r.name)||"Unknown"}),u.jsxs(S.Box,{textAlign:"left",children:[u.jsxs(S.Typography,{fontWeight:"bold",children:[(r==null?void 0:r.nickname)||"-------------"," ",u.jsxs(S.Typography,{children:["(",(r==null?void 0:r.name)||"-------------",")"]})]}),u.jsx(S.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(S.Chip,{variant:"soft",color:"neutral",size:"sm",sx:{mr:1},children:o},`preview-winner-${n.profileId}-tag-${o}`))})]},`preview-winner-${n.profileId}`)})})]})})]}):u.jsx(S.Typography,{textAlign:"center",fontWeight:"bold",children:e.labels.noSetWinnersMessage})})},oB=e=>Object.keys(e).length?(e.userList||(e.userList=[]),e):new km,aB=e=>{var b;const[t,n]=x.useState(oB(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,g]=x.useState(""),m=(A,E)=>{h(A),g(E),d(!0)},{leaderboard:v,hasMoreParticipants:I,isLeaderboardLoading:w}=nB(e.entityId,e.entityType,e.labels.leaderboardErrorMessage,l,m),{https:y}=ht(),C=()=>k(this,null,function*(){a(!0);const A=JSON.parse(JSON.stringify(t));if(A.contestId=e.entityId,A.contestType=e.entityType==="template"?"TEMPLATE":"GAME",A.description=r,delete A.contestModel,A.userList.length>0){const D=new rB().validate(A.userList,e.labels.positionAndWinnerRequiredMessage,e.labels.sameChosenWinnerMessage);if(!D.isValid){m("danger",D.message),a(!1);return}}else delete A.userList;const E=cu(A);try{yield y.setWinners(E),m("success",Object.keys(e.winners).length?e.labels.editWinnersMessage:e.labels.createWinnersMessage)}catch(D){console.error(D),m("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(S.Box,{width:"100%",overflow:"hidden",borderRadius:"4px",bgcolor:"#fff",children:u.jsxs(S.Box,{width:"100%",sx:{overflowX:"auto"},children:[u.jsxs(S.Card,{variant:"plain",children:[u.jsx(ic,{property:"description",label:e.labels.description,defaultValue:r,placeholder:e.labels.winnersDescription,onChange:A=>{i(A)}}),u.jsx(tB,{winners:t.userList,leaderboard:v,hasMoreParticipants:I,isLoading:w,setPage:s,setWinnersRequestBody:n,labels:e.labels}),u.jsx(S.Box,{textAlign:"center",my:3,children:u.jsx(S.Button,{variant:"solid",color:"primary",onClick:C,loading:o,children:e.labels.save})}),u.jsx(S.Divider,{sx:{my:4}})]}),v?u.jsx(iB,{winners:t,profiles:v.map(A=>A.profileModel),labels:e.labels}):u.jsx(u.Fragment,{})]})})}),u.jsx(pt,{showToast:c,color:f,message:p,hideToast:()=>d(!1)})]})},sB=e=>{const[t,n]=x.useState(!1),r=()=>n(!0),i=SL(e.entityId,e.entityType,r);return i?u.jsxs(u.Fragment,{children:[u.jsxs(S.Box,{p:2,children:[u.jsx(S.Typography,{fontSize:"12px",sx:{cursor:"pointer"},startDecorator:u.jsx(IL,{fontSize:"inherit"}),onClick:e.onClickBack,children:e.labels.back}),u.jsxs(S.Typography,{level:"h3",children:[e.labels.manageWinners,":"," ",u.jsx(S.Typography,{level:"title-lg",fontWeight:"italic",children:e.entityName})]})]}),u.jsx(aB,{labels:e.labels,winners:i,entityId:e.entityId,entityType:e.entityType}),u.jsx(pt,{showToast:t,color:"danger",message:e.labels.winnersErrorMessage,hideToast:()=>n(!1)})]}):u.jsx(cs,{my:50})},lB=10,cB=e=>{var f;const[t,n]=x.useState([]),[r,i]=x.useState(!1),[o,a]=x.useState(""),{sdk:l}=ht(),s=x.useMemo(()=>si(h=>{if(!h){n([]),i(!1);return}i(!0),l.football.search({query:h}).then(p=>{n([...Zm(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 g=p.map(m=>m.id);e.setOptions(p),e.handleResetData(),e.setFilters(m=>X(H({},m),{entityIds:g}))},d=(h,p)=>h.map((g,m)=>u.jsx(S.Chip,{variant:"solid",endDecorator:u.jsx(S.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:v=>p({index:m}).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:g},`option_${g.id}`)},g.id));return u.jsxs(S.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(S.FormLabel,{sx:{fontSize:12},color:"primary",children:e.labels.contextEntityTag}),u.jsx(S.Autocomplete,{getOptionDisabled:()=>e.options.length===lB,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(S.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(g=>g.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(S.AutocompleteOption,X(H({},h),{children:u.jsx(xn,{option:p})}))})]})};function ev(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 uB(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 dB(e){return typeof e=="number"&&isNaN(e)}function tv(e){return ci(e)||dB(e)||typeof e=="number"&&!isFinite(e)}function nv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function fB(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 hB(e,t,n){var r=fB(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 pB(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 gB(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 rv(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function iv(e,t){return Array(t+1).join(e)}function ov(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."+iv("0",Math.abs(a))+i:a>=l?i=i+iv("0",a-l):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function av(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(m,v,I){return m.length>I?(Number(m[0])+Number(v)).toString()+m.substring(1,m.length):v+m},d[0]));var h=rv(d[1]||"",t,n),p=l?"-":"",g=r?".":"";return""+p+f+g+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 sv=uB(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}}}),mB=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function vB(e,t,n){return Math.min(Math.max(e,t),n)}function fu(e){return Math.max(e.selectionStart,e.selectionEnd)}function bB(){return typeof navigator!="undefined"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function yB(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function CB(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function xB(e,t,n,r,i,o,a){a===void 0&&(a=CB);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 g=0,m=d;g<m;g++){var v=a({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:g});if(v&&f[g]!==!0){h[p]=g,f[g]=!0;break}}}for(var I=r;I<c&&(h[I]===-1||!o(n[I]));)I++;var w=I===c||h[I]===-1?d:h[I];for(I=r-1;I>0&&h[I]===-1;)I--;var y=I===-1||h[I]===-1?0:h[I]+1;return y>w?w:r-y<w-r?y:w}function lv(e,t,n,r){var i=e.length;if(t=vB(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 wB(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 cv(e,t,n,r,i,o){o===void 0&&(o=nr);var a=pB(function(g,m){var v,I;return tv(g)?(I="",v=""):typeof g=="number"||m?(I=typeof g=="number"?ov(g):g,v=r(I)):(I=i(g,void 0),v=r(I)),{formattedValue:v,numAsString:I}}),l=x.useState(function(){return a(ci(e)?t:e,n)}),s=l[0],c=l[1],d=function(g,m){g.formattedValue!==s.formattedValue&&c({formattedValue:g.formattedValue,numAsString:g.value}),o(g,m)},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 IB(e){return e.replace(/[^0-9]/g,"")}function SB(e){return e}function AB(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=SB);var l=e.removeFormatting;l===void 0&&(l=IB);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 g=e.onMouseUp;g===void 0&&(g=nr);var m=e.onFocus;m===void 0&&(m=nr);var v=e.onBlur;v===void 0&&(v=nr);var I=e.value,w=e.getCaretBoundary;w===void 0&&(w=wB);var y=e.isValidInputCharacter;y===void 0&&(y=uo);var C=e.isCharacterSame,b=ev(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),A=cv(I,s,!!c,a,l,d),E=A[0],D=E.formattedValue,F=E.numAsString,Y=A[1],W=x.useRef(),T=x.useRef({formattedValue:D,numAsString:F}),U=function(de,he){T.current={formattedValue:de.formattedValue,numAsString:de.value},Y(de,he)},G=x.useState(!1),$=G[0],B=G[1],L=x.useRef(null),V=x.useRef({setCaretTimeout:null,focusTimeout:null});x.useEffect(function(){return B(!0),function(){clearTimeout(V.current.setCaretTimeout),clearTimeout(V.current.focusTimeout)}},[]);var q=a,ee=function(de,he){var Ce=parseFloat(he);return{formattedValue:de,value:he,floatValue:isNaN(Ce)?void 0:Ce}},O=function(de,he,Ce){de.selectionStart===0&&de.selectionEnd===de.value.length||(wr(de,he),V.current.setCaretTimeout=setTimeout(function(){de.value===Ce&&de.selectionStart!==he&&wr(de,he)},0))},M=function(de,he,Ce){return lv(de,he,w(de),Ce)},N=function(de,he,Ce){var Te=w(he),He=xB(he,D,de,Ce,Te,y,C);return He=lv(he,He,Te),He},j=function(de){var he=de.formattedValue;he===void 0&&(he="");var Ce=de.input,Te=de.source,He=de.event,De=de.numAsString,Ee;if(Ce){var It=de.inputValue||Ce.value,St=fu(Ce);Ce.value=he,Ee=N(It,he,St),Ee!==void 0&&O(Ce,Ee,he)}he!==D&&U(ee(he,De),{event:He,source:Te})};x.useEffect(function(){var de=T.current,he=de.formattedValue,Ce=de.numAsString;(D!==he||F!==Ce)&&U(ee(D,F),{event:void 0,source:co.props})},[D,F]);var te=L.current?fu(L.current):void 0,se=typeof window!="undefined"?x.useLayoutEffect:x.useEffect;se(function(){var de=L.current;if(D!==T.current.formattedValue&&de){var he=N(T.current.formattedValue,D,te);de.value=D,O(de,he,D)}},[D]);var oe=function(de,he,Ce){var Te=he.target,He=W.current?mB(W.current,Te.selectionEnd):sv(D,de),De=Object.assign(Object.assign({},He),{lastValue:D}),Ee=l(de,De),It=q(Ee);if(Ee=l(It,void 0),f&&!f(ee(It,Ee))){var St=he.target,jt=fu(St),Mt=N(de,D,jt);return St.value=D,O(St,Mt,D),!1}return j({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;W.current={selectionStart:Ce,selectionEnd:Te+he}},le=function(de){var he=de.target,Ce=he.value,Te=oe(Ce,de,co.event);Te&&h(de),W.current=void 0},ne=function(de){var he=de.target,Ce=de.key,Te=he.selectionStart,He=he.selectionEnd,De=he.value;De===void 0&&(De="");var Ee;Ce==="ArrowLeft"||Ce==="Backspace"?Ee=Math.max(Te-1,0):Ce==="ArrowRight"?Ee=Math.min(Te+1,De.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=M(De,Ee,Mt),jt!==Ee&&de.preventDefault()}else Ce==="Delete"&&!y(De[Ee])?jt=M(De,Ee,"right"):Ce==="Backspace"&&!y(De[Ee])&&(jt=M(De,Ee,"left"));jt!==Ee&&O(he,jt,De),p(de),J(he,It)},ge=function(de){var he=de.target,Ce=function(){var Te=he.selectionStart,He=he.selectionEnd,De=he.value;if(De===void 0&&(De=""),Te===He){var Ee=M(De,Te);Ee!==Te&&O(he,Ee,De)}};Ce(),requestAnimationFrame(function(){Ce()}),g(de),J(he)},Se=function(de){de.persist&&de.persist();var he=de.target,Ce=de.currentTarget;L.current=he,V.current.focusTimeout=setTimeout(function(){var Te=he.selectionStart,He=he.selectionEnd,De=he.value;De===void 0&&(De="");var Ee=M(De,Te);Ee!==Te&&!(Te===0&&He===De.length)&&O(he,Ee,De),m(Object.assign(Object.assign({},de),{currentTarget:Ce}))},0)},Ue=function(de){L.current=null,clearTimeout(V.current.focusTimeout),clearTimeout(V.current.setCaretTimeout),v(de)},wt=$&&bB()?"numeric":void 0,at=Object.assign({inputMode:wt},b,{type:t,value:D,onChange:le,onKeyDown:ne,onMouseUp:ge,onFocus:Se,onBlur:Ue});if(n==="text")return i?x.createElement(x.Fragment,null,i(D,b)||null):x.createElement("span",Object.assign({},b,{ref:o}),D);if(r){var kt=r;return x.createElement(kt,Object.assign({},at,{ref:o}))}return x.createElement("input",Object.assign({},at,{ref:o}))}function uv(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=us(t),c=s.thousandSeparator,d=s.decimalSeparator,f=n!==0&&e.indexOf(".")!==-1||n&&r,h=du(e,a),p=h.beforeDecimal,g=h.afterDecimal,m=h.addNegation;return n!==void 0&&(g=rv(g,n,!!r)),c&&(p=hB(p,c,l)),i&&(p=i+p),o&&(g=g+o),m&&(p="-"+p),e=p+(f&&d||"")+g,e}function us(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 TB(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 EB(e,t){return new RegExp("(^-)|[0-9]|"+nv(e),"g")}function _B(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function kB(e,t,n){var r;t===void 0&&(t=yB(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=us(n),p=h.allowedDecimalSeparators,g=h.decimalSeparator,m=e[f]===g;if(uo(e)&&(e===o||e===a)&&t.lastValue==="")return e;if(f-d===1&&p.indexOf(e[d])!==-1){var v=l===0?"":g;e=e.substring(0,d)+v+e.substring(d+1,e.length)}var I=function(L,V,q){var ee=!1,O=!1;o.startsWith("-")?ee=!1:L.startsWith("--")?(ee=!1,O=!0):a.startsWith("-")&&L.length===a.length?ee=!1:L[0]==="-"&&(ee=!0);var M=ee?1:0;return O&&(M=2),M&&(L=L.substring(M),V-=M,q-=M),{value:L,start:V,end:q,hasNegation:ee}},w=I(e,d,f),y=w.hasNegation;r=w,e=r.value,d=r.start,f=r.end;var C=I(t.lastValue,s.start,s.end),b=C.start,A=C.end,E=C.value,D=e.substring(d,f);e.length&&E.length&&(b>E.length-a.length||A<o.length)&&!(D&&a.startsWith(D))&&(e=E);var F=0;e.startsWith(o)?F+=o.length:d<o.length&&(F=d),e=e.substring(F),f-=F;var Y=e.length,W=e.length-a.length;e.endsWith(a)?Y=W:(f>W||f>e.length-a.length)&&(Y=f),e=e.substring(0,Y),e=TB(y?"-"+e:e,i),e=(e.match(EB(g))||[]).join("");var T=e.indexOf(g);e=e.replace(new RegExp(nv(g),"g"),function(L,V){return V===T?".":""});var U=du(e,i),G=U.beforeDecimal,$=U.afterDecimal,B=U.addNegation;return c.end-c.start<s.end-s.start&&G===""&&m&&!parseFloat($)&&(e=B?"-":""),e}function DB(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 PB(e){var t=us(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 OB(e){e=PB(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,g=ev(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),m=us(e),v=m.decimalSeparator,I=m.allowedDecimalSeparators,w=function(B){return uv(B,e)},y=function(B,L){return kB(B,L,e)},C=ci(f)?d:f,b=h!=null?h:_B(C,c,t);ci(f)?ci(d)||(b=b||typeof d=="number"):b=b||typeof f=="number";var A=function(B){return tv(B)?B:(typeof B=="number"&&(B=ov(B)),b&&typeof l=="number"?av(B,l,!!s):B)},E=cv(A(f),A(d),!!b,w,y,p),k=E[0],F=k.numAsString,Y=k.formattedValue,W=E[1],T=function(B){var L=B.target,V=B.key,q=L.selectionStart,ee=L.selectionEnd,O=L.value;if(O===void 0&&(O=""),(V==="Backspace"||V==="Delete")&&ee<c.length){B.preventDefault();return}if(q!==ee){i(B);return}V==="Backspace"&&O[0]==="-"&&q===c.length+1&&n&&wr(L,1),l&&s&&(V==="Backspace"&&O[q-1]===v?(wr(L,q-1),B.preventDefault()):V==="Delete"&&O[q]===v&&B.preventDefault()),I!=null&&I.includes(V)&&O[q]===v&&wr(L,q+1);var M=a===!0?",":a;V==="Backspace"&&O[q-1]===M&&wr(L,q-1),V==="Delete"&&O[q]===M&&wr(L,q+1),i(B)},U=function(B){var L=F;if(L.match(/\d/g)||(L=""),r||(L=gB(L)),s&&l&&(L=av(L,l,s)),L!==F){var V=uv(L,e);W({formattedValue:V,value:L,floatValue:parseFloat(L)},{event:B,source:co.event})}o(B)},G=function(B){return B===v?!0:uo(B)},$=function(B){var L=B.currentValue,V=B.lastValue,q=B.formattedValue,ee=B.currentValueIndex,O=B.formattedValueIndex,M=L[ee],N=q[O],j=sv(V,L),te=j.to,ae=function(oe){return y(oe).indexOf(".")+c.length};return f===0&&s&&l&&L[te.start]===v&&ae(L)<ee&&ae(q)>O?!1:ee>=te.start&&ee<te.end&&I&&I.includes(M)&&N===v?!0:M===N};return Object.assign(Object.assign({},g),{value:Y,valueIsNumericString:!1,isValidInputCharacter:G,isCharacterSame:$,onValueChange:W,format:w,removeFormatting:y,getCaretBoundary:function(B){return DB(B,e)},onKeyDown:T,onBlur:U})}function RB(e){var t=OB(e);return x.createElement(AB,Object.assign({},t))}const MB=z.forwardRef(function(t,n){const a=t,{onChange:r,isAllowed:i}=a,o=We(a,["onChange","isAllowed"]);return u.jsx(RB,Z(H({},o),{getInputRef:n,onValueChange:l=>{r({target:{name:t.name,value:l.value}})},thousandSeparator:!0,valueIsNumericString:!0,isAllowed:i}))}),LB=e=>{const t=n=>{e.onChange(Number(n.target.value))};return u.jsxs(ou,{size:"sm",children:[u.jsx(au,{children:e.label}),u.jsx(Ua,{sx:e.sx,value:e.defaultValue,onChange:t,slotProps:{input:{component:MB,isAllowed:e.isAllowed?e.isAllowed:()=>!0}}}),e.description?u.jsx(S.FormHelperText,{children:e.description}):u.jsx(u.Fragment,{})]})},BB=e=>e.startsWith("fb:c:")?"competition":e.startsWith("fb:t:")?"team":"player",$B=(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=>NB(f));n(d)})},NB=e=>{const t=new Xm;return t.label=e.name,t.value=e.name,t.id=e.id,t.group=BB(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},FB=10,zB=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}=ht(),h=()=>d(!c),p=(v,I)=>{n(I),e.onChangeTags(I)};x.useEffect(()=>{$B(e.tags,f,n,h)},[e.tags]);const g=x.useMemo(()=>si(v=>{if(!v){i([]),a(!1);return}a(!0),f.football.search({query:v}).then(I=>{i([...Zm(I)]),a(!1)}).catch(I=>{console.error(I),i([]),a(!1)})},300),[]);x.useEffect(()=>(g(l),()=>g.cancel()),[l,g]);const m=(v,I)=>v.map((w,y)=>u.jsx(S.Chip,{variant:"solid",endDecorator:u.jsx(S.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:C=>I({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(S.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(S.FormLabel,{color:"primary",children:e.labels.contextEntityTag}),u.jsx(S.Autocomplete,{getOptionDisabled:()=>t.length===FB,forcePopupIcon:!1,multiple:!0,loading:o,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(v,I)=>v.id===I.id,endDecorator:o?u.jsx(S.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:t.length>0?"":e.labels.typeContextTagNamePlaceholder,options:r,filterOptions:v=>v.filter(I=>!t.some(w=>w.value===I.value)),onInputChange:(v,I)=>{s(I)},onChange:p,getOptionKey:v=>v.id,groupBy:v=>v.group+"s",value:t!=null?t:[],renderTags:m,renderOption:(v,I)=>u.jsx(S.AutocompleteOption,Z(H({},v),{children:u.jsx(xn,{option:I})}))}),u.jsx(pt,{showToast:c,message:e.labels.getFootballEntitiesErrorMessage,color:"danger",hideToast:h})]})},jB=e=>new Map().set("id",e.id).set("type",e.type).set("label",e.label),VB=e=>{const t=JSON.parse(JSON.stringify(e.context)),n=e.context.content,r=e.context.campaign,i=jB(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(zB,{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(S.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(S.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}`))})]})})},UB=e=>e?H({},e):{main:"",mobile:""},HB=e=>{const[t,n]=x.useState(!1),r=UB(e.defaultValue),i=(a,l)=>{r[l]=a,e.onChange(r)},o=a=>{r[a]="",e.onChange(r)};return u.jsxs(S.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(S.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,{})]})},WB=({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(S.FormControl,{size:"sm",sx:{mb:2},children:[u.jsx(S.FormLabel,{children:n.authRequirement}),u.jsx(S.Select,Z(H({value:e,size:"sm",slotProps:{button:{sx:{whiteSpace:"nowrap"}}},onChange:(a,l)=>r(l),sx:{minHeight:"37px"}},e&&t&&{endDecorator:u.jsx(S.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(fm,{})}),indicator:null}),{children:o.map(a=>u.jsx(S.Option,{value:a.id,children:a.label},a.id))})),u.jsx(S.FormHelperText,{children:n.authRequirementDescription})]})};function GB(){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 ds=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 dv(e){return e instanceof Rt(e).SVGElement}function di(e){return e?ui(e)?e.document:hu(e)?pu(e)?e:fo(e)||dv(e)?e.ownerDocument:document:document:document}const ln=ds?x.useLayoutEffect:x.useEffect;function fs(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 YB(){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 hs(e){const t=fs(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 ps(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 fv(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},H({},t))}}const fi=fv(1),mo=fv(-1);function KB(e){return"clientX"in e&&"clientY"in e}function gs(e){if(!e)return!1;const{KeyboardEvent:t}=Rt(e.target);return t&&e instanceof t}function qB(e){if(!e)return!1;const{TouchEvent:t}=Rt(e.target);return t&&e instanceof t}function ms(e){if(qB(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 KB(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}}}),hv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function QB(e){return e.matches(hv)?e:e.querySelector(hv)}const JB={display:"none"};function XB(e){let{id:t,value:n}=e;return x.createElement("div",{id:t,style:JB},n)}function ZB(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 e$(){const[e,t]=x.useState("");return{announce:x.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const pv=x.createContext(null);function t$(e){const t=x.useContext(pv);x.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function n$(){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 r$={draggable:`
|
|
2471
|
+
`),o=!1),Object.assign(Object.assign({},e),{allowNegative:o})}function OB(e){e=PB(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,g=ev(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),m=us(e),v=m.decimalSeparator,I=m.allowedDecimalSeparators,w=function(B){return uv(B,e)},y=function(B,L){return kB(B,L,e)},C=ci(f)?d:f,b=h!=null?h:_B(C,c,t);ci(f)?ci(d)||(b=b||typeof d=="number"):b=b||typeof f=="number";var A=function(B){return tv(B)?B:(typeof B=="number"&&(B=ov(B)),b&&typeof l=="number"?av(B,l,!!s):B)},E=cv(A(f),A(d),!!b,w,y,p),D=E[0],F=D.numAsString,Y=D.formattedValue,W=E[1],T=function(B){var L=B.target,V=B.key,q=L.selectionStart,ee=L.selectionEnd,O=L.value;if(O===void 0&&(O=""),(V==="Backspace"||V==="Delete")&&ee<c.length){B.preventDefault();return}if(q!==ee){i(B);return}V==="Backspace"&&O[0]==="-"&&q===c.length+1&&n&&wr(L,1),l&&s&&(V==="Backspace"&&O[q-1]===v?(wr(L,q-1),B.preventDefault()):V==="Delete"&&O[q]===v&&B.preventDefault()),I!=null&&I.includes(V)&&O[q]===v&&wr(L,q+1);var M=a===!0?",":a;V==="Backspace"&&O[q-1]===M&&wr(L,q-1),V==="Delete"&&O[q]===M&&wr(L,q+1),i(B)},U=function(B){var L=F;if(L.match(/\d/g)||(L=""),r||(L=gB(L)),s&&l&&(L=av(L,l,s)),L!==F){var V=uv(L,e);W({formattedValue:V,value:L,floatValue:parseFloat(L)},{event:B,source:co.event})}o(B)},G=function(B){return B===v?!0:uo(B)},$=function(B){var L=B.currentValue,V=B.lastValue,q=B.formattedValue,ee=B.currentValueIndex,O=B.formattedValueIndex,M=L[ee],N=q[O],j=sv(V,L),te=j.to,se=function(oe){return y(oe).indexOf(".")+c.length};return f===0&&s&&l&&L[te.start]===v&&se(L)<ee&&se(q)>O?!1:ee>=te.start&&ee<te.end&&I&&I.includes(M)&&N===v?!0:M===N};return Object.assign(Object.assign({},g),{value:Y,valueIsNumericString:!1,isValidInputCharacter:G,isCharacterSame:$,onValueChange:W,format:w,removeFormatting:y,getCaretBoundary:function(B){return DB(B,e)},onKeyDown:T,onBlur:U})}function RB(e){var t=OB(e);return x.createElement(AB,Object.assign({},t))}const MB=z.forwardRef(function(t,n){const a=t,{onChange:r,isAllowed:i}=a,o=We(a,["onChange","isAllowed"]);return u.jsx(RB,X(H({},o),{getInputRef:n,onValueChange:l=>{r({target:{name:t.name,value:l.value}})},thousandSeparator:!0,valueIsNumericString:!0,isAllowed:i}))}),LB=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(Ua,{sx:e.sx,value:e.defaultValue,onChange:t,slotProps:{input:{component:MB,isAllowed:e.isAllowed?e.isAllowed:()=>!0}}}),e.description?u.jsx(S.FormHelperText,{children:e.description}):u.jsx(u.Fragment,{})]})},BB=e=>e.startsWith("fb:c:")?"competition":e.startsWith("fb:t:")?"team":"player",$B=(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=>NB(f));n(d)})},NB=e=>{const t=new Xm;return t.label=e.name,t.value=e.name,t.id=e.id,t.group=BB(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},FB=10,zB=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}=ht(),h=()=>d(!c),p=(v,I)=>{n(I),e.onChangeTags(I)};x.useEffect(()=>{$B(e.tags,f,n,h)},[e.tags]);const g=x.useMemo(()=>si(v=>{if(!v){i([]),a(!1);return}a(!0),f.football.search({query:v}).then(I=>{i([...Zm(I)]),a(!1)}).catch(I=>{console.error(I),i([]),a(!1)})},300),[]);x.useEffect(()=>(g(l),()=>g.cancel()),[l,g]);const m=(v,I)=>v.map((w,y)=>u.jsx(S.Chip,{variant:"solid",endDecorator:u.jsx(S.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:C=>I({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(S.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(S.FormLabel,{color:"primary",children:e.labels.contextEntityTag}),u.jsx(S.Autocomplete,{getOptionDisabled:()=>t.length===FB,forcePopupIcon:!1,multiple:!0,loading:o,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(v,I)=>v.id===I.id,endDecorator:o?u.jsx(S.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:t.length>0?"":e.labels.typeContextTagNamePlaceholder,options:r,filterOptions:v=>v.filter(I=>!t.some(w=>w.value===I.value)),onInputChange:(v,I)=>{s(I)},onChange:p,getOptionKey:v=>v.id,groupBy:v=>v.group+"s",value:t!=null?t:[],renderTags:m,renderOption:(v,I)=>u.jsx(S.AutocompleteOption,X(H({},v),{children:u.jsx(xn,{option:I})}))}),u.jsx(pt,{showToast:c,message:e.labels.getFootballEntitiesErrorMessage,color:"danger",hideToast:h})]})},jB=e=>new Map().set("id",e.id).set("type",e.type).set("label",e.label),VB=e=>{const t=JSON.parse(JSON.stringify(e.context)),n=e.context.content,r=e.context.campaign,i=jB(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(zB,{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(S.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(S.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}`))})]})})},UB=e=>e?H({},e):{main:"",mobile:""},HB=e=>{const[t,n]=x.useState(!1),r=UB(e.defaultValue),i=(a,l)=>{r[l]=a,e.onChange(r)},o=a=>{r[a]="",e.onChange(r)};return u.jsxs(S.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(S.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,{})]})},WB=({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(S.FormControl,{size:"sm",sx:{mb:2},children:[u.jsx(S.FormLabel,{children:n.authRequirement}),u.jsx(S.Select,X(H({value:e,size:"sm",slotProps:{button:{sx:{whiteSpace:"nowrap"}}},onChange:(a,l)=>r(l),sx:{minHeight:"37px"}},e&&t&&{endDecorator:u.jsx(S.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(fm,{})}),indicator:null}),{children:o.map(a=>u.jsx(S.Option,{value:a.id,children:a.label},a.id))})),u.jsx(S.FormHelperText,{children:n.authRequirementDescription})]})};function GB(){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 ds=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 dv(e){return e instanceof Rt(e).SVGElement}function di(e){return e?ui(e)?e.document:hu(e)?pu(e)?e:fo(e)||dv(e)?e.ownerDocument:document:document:document}const ln=ds?x.useLayoutEffect:x.useEffect;function fs(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 YB(){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 hs(e){const t=fs(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 ps(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 fv(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},H({},t))}}const fi=fv(1),mo=fv(-1);function KB(e){return"clientX"in e&&"clientY"in e}function gs(e){if(!e)return!1;const{KeyboardEvent:t}=Rt(e.target);return t&&e instanceof t}function qB(e){if(!e)return!1;const{TouchEvent:t}=Rt(e.target);return t&&e instanceof t}function ms(e){if(qB(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 KB(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}}}),hv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function QB(e){return e.matches(hv)?e:e.querySelector(hv)}const JB={display:"none"};function XB(e){let{id:t,value:n}=e;return x.createElement("div",{id:t,style:JB},n)}function ZB(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 e$(){const[e,t]=x.useState("");return{announce:x.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const pv=x.createContext(null);function t$(e){const t=x.useContext(pv);x.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function n$(){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 r$={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
|
-
`},i$={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 o$(e){let{announcements:t=i$,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=r$}=e;const{announce:o,announcement:a}=e$(),l=go("DndLiveRegion"),[s,c]=x.useState(!1);if(x.useEffect(()=>{c(!0)},[]),t$(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(XB,{id:r,value:i.draggable}),x.createElement(ZB,{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 vs(){}function gv(e,t){return x.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function a$(){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 s$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function l$(e,t){const n=ms(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function c$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function u$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function mv(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 vv(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const d$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=mv(t),o=[];for(const a of r){const{id:l}=a,s=n.get(l);if(s){const c=mv(s),d=i.reduce((h,p,g)=>h+s$(c[g],p),0),f=Number((d/4).toFixed(4));o.push({id:l,data:{droppableContainer:a,value:f}})}}return o.sort(c$)};function f$(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 h$=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=f$(l,t);s>0&&i.push({id:a,data:{droppableContainer:o,value:s}})}}return i.sort(u$)};function p$(e,t,n){return Z(H({},e),{scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1})}function bv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:cn}function g$(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)=>Z(H({},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}),H({},n))}}const m$=g$(1);function yv(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 v$(e,t,n){const r=yv(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 b$={ignoreTransform:!1};function hi(e,t){t===void 0&&(t=b$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Rt(e).getComputedStyle(e);c&&(n=v$(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 Cv(e){return hi(e,{ignoreTransform:!0})}function y$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function C$(e,t){return t===void 0&&(t=Rt(e).getComputedStyle(e)),t.position==="fixed"}function x$(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 bs(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)||dv(i)||n.includes(i))return n;const o=Rt(e).getComputedStyle(i);return i!==e&&x$(i,o)&&n.push(i),C$(i,o)?n:r(i.parentNode)}return e?r(e):n}function xv(e){const[t]=bs(e,1);return t!=null?t:null}function mu(e){return!ds||!e?null:ui(e)?e:hu(e)?pu(e)||e===di(e).scrollingElement?window:fo(e)?e:null:null}function wv(e){return ui(e)?e.scrollX:e.scrollLeft}function Iv(e){return ui(e)?e.scrollY:e.scrollTop}function vu(e){return{x:wv(e),y:Iv(e)}}var Ct;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ct||(Ct={}));function Sv(e){return!ds||!e?!1:e===document.scrollingElement}function Av(e){const t={x:0,y:0},n=Sv(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 w$={x:.2,y:.2};function I$(e,t,n,r,i){let{top:o,left:a,right:l,bottom:s}=n;r===void 0&&(r=10),i===void 0&&(i=w$);const{isTop:c,isBottom:d,isLeft:f,isRight:h}=Av(e),p={x:0,y:0},g={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+m.height?(p.y=Ct.Backward,g.y=r*Math.abs((t.top+m.height-o)/m.height)):!d&&s>=t.bottom-m.height&&(p.y=Ct.Forward,g.y=r*Math.abs((t.bottom-m.height-s)/m.height)),!h&&l>=t.right-m.width?(p.x=Ct.Forward,g.x=r*Math.abs((t.right-m.width-l)/m.width)):!f&&a<=t.left+m.width&&(p.x=Ct.Backward,g.x=r*Math.abs((t.left+m.width-a)/m.width)),{direction:p,speed:g}}function S$(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 Tv(e){return e.reduce((t,n)=>fi(t,vu(n)),cn)}function A$(e){return e.reduce((t,n)=>t+wv(n),0)}function T$(e){return e.reduce((t,n)=>t+Iv(n),0)}function Ev(e,t){if(t===void 0&&(t=hi),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);xv(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const E$=[["x",["left","right"],A$],["y",["top","bottom"],T$]];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=bs(n),i=Tv(r);this.rect=H({},t),this.width=t.width,this.height=t.height;for(const[o,a,l]of E$)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 _$(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 _v(e){e.preventDefault()}function k$(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 kv={start:[_e.Space,_e.Enter],cancel:[_e.Esc],end:[_e.Space,_e.Enter,_e.Tab]},D$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case _e.Right:return Z(H({},n),{x:n.x+25});case _e.Left:return Z(H({},n),{x:n.x-25});case _e.Down:return Z(H({},n),{y:n.y+25});case _e.Up:return Z(H({},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&&Ev(r),n(cn)}handleKeyDown(t){if(gs(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=kv,coordinateGetter:a=D$,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:g}=r.current;for(const m of g){const v=t.code,{isTop:I,isRight:w,isLeft:y,isBottom:C,maxScroll:b,minScroll:A}=Av(m),E=S$(m),k={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))},F=v===_e.Right&&!w||v===_e.Left&&!y,Y=v===_e.Down&&!C||v===_e.Up&&!I;if(F&&k.x!==f.x){const W=m.scrollLeft+h.x,T=v===_e.Right&&W<=b.x||v===_e.Left&&W>=A.x;if(T&&!h.y){m.scrollTo({left:W,behavior:l});return}T?p.x=m.scrollLeft-W:p.x=v===_e.Right?m.scrollLeft-b.x:m.scrollLeft-A.x,p.x&&m.scrollBy({left:-p.x,behavior:l});break}else if(Y&&k.y!==f.y){const W=m.scrollTop+h.y,T=v===_e.Down&&W<=b.y||v===_e.Up&&W>=A.y;if(T&&!h.x){m.scrollTo({top:W,behavior:l});return}T?p.y=m.scrollTop-W:p.y=v===_e.Down?m.scrollTop-b.y:m.scrollTop-A.y,p.y&&m.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=kv,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 Pv(e){return!!(e&&"delay"in e)}class xu{constructor(t,n,r){var i;r===void 0&&(r=_$(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=ms(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,_v),this.windowListeners.add(on.VisibilityChange,this.handleCancel),this.windowListeners.add(on.ContextMenu,_v),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(Pv(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,k$,{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=ms(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(Pv(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 P$={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,P$,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 O$={move:{name:"mousemove"},end:{name:"mouseup"}};var Iu;(function(e){e[e.RightClick=2]="RightClick"})(Iu||(Iu={}));class R$ extends xu{constructor(t){super(t,O$,di(t.event.target))}}R$.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 M$ 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(){}}}M$.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 ys;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(ys||(ys={}));function L$(e){let{acceleration:t,activator:n=bo.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:l=ys.TreeOrder,pointerCoordinates:s,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=$$({delta:f,disabled:!o}),[g,m]=YB(),v=x.useRef({x:0,y:0}),I=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 A=y.current;if(!A)return;const E=v.current.x*I.current.x,k=v.current.y*I.current.y;A.scrollBy(E,k)},[]),b=x.useMemo(()=>l===ys.TreeOrder?[...c].reverse():c,[l,c]);x.useEffect(()=>{if(!o||!c.length||!w){m();return}for(const A of b){if((r==null?void 0:r(A))===!1)continue;const E=c.indexOf(A),k=d[E];if(!k)continue;const{direction:F,speed:Y}=I$(A,k,w,t,h);for(const W of["x","y"])p[W][F[W]]||(Y[W]=0,F[W]=0);if(Y.x>0||Y.y>0){m(),y.current=A,g(C,a),v.current=Y,I.current=F;return}}v.current={x:0,y:0},I.current={x:0,y:0},m()},[t,C,r,m,o,a,JSON.stringify(w),JSON.stringify(p),g,c,b,d,JSON.stringify(h)])}const B$={x:{[Ct.Backward]:!1,[Ct.Forward]:!1},y:{[Ct.Backward]:!1,[Ct.Forward]:!1}};function $$(e){let{delta:t,disabled:n}=e;const r=ps(t);return po(i=>{if(n||!r||!i)return B$;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 N$(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 F$(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 Ov=new Map;function z$(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(I){I===void 0&&(I=[]),!h.current&&a(w=>w===null?I:w.concat(I.filter(y=>!w.includes(y))))},[h]),g=x.useRef(null),m=po(I=>{if(f&&!n)return Ov;if(!I||I===Ov||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 I},[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"||g.current!==null||(g.current=setTimeout(()=>{p(),g.current=null},l))},[l,f,p,...r]),{droppableRects:m,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 j$(e,t){return Tu(e,t)}function V$(e){let{callback:t,disabled:n}=e;const r=fs(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 Cs(e){let{callback:t,disabled:n}=e;const r=fs(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 U$(e){return new bu(hi(e),e)}function Rv(e,t,n){t===void 0&&(t=U$);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=V$({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=Cs({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 H$(e){const t=Tu(e);return bv(e,t)}const Mv=[];function W$(e){const t=x.useRef(e),n=po(r=>e?r&&r!==Mv&&e&&t.current&&e.parentNode===t.current.parentNode?r:bs(e):Mv,[e]);return x.useEffect(()=>{t.current=e},[e]),n}function G$(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):Tv(e):cn,[e,t])}function Lv(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 Y$(e){x.useEffect(()=>{if(!ds)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 K$(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 Bv(e){return x.useMemo(()=>e?y$(e):null,[e])}const $v=[];function q$(e,t){t===void 0&&(t=hi);const[n]=e,r=Bv(n?Rt(n):null),[i,o]=x.useState($v);function a(){o(()=>e.length?e.map(s=>Sv(s)?r:new bu(t(s),s)):$v)}const l=Cs({callback:a});return ln(()=>{l==null||l.disconnect(),a(),e.forEach(s=>l==null?void 0:l.observe(s))},[e]),i}function Nv(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return fo(t)?t:e}function Q$(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?Z(H({},f),{width:h.width,height:h.height}):h});break}},[t]),o=Cs({callback:i}),a=x.useCallback(c=>{const d=Nv(c);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[l,s]=hs(a);return x.useMemo(()=>({nodeRef:l,rect:n,setRef:s}),[n,l,s])}const J$=[{sensor:wu,options:{}},{sensor:Cu,options:{}}],X$={current:{}},xs={draggable:{measure:Cv},droppable:{measure:Cv,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 Z$={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:vs},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:xs,measureDroppableContainers:vs,windowRect:null,measuringScheduled:!1},Fv={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:vs,draggableNodes:new Map,over:null,measureDroppableContainers:vs},xo=x.createContext(Fv),zv=x.createContext(Z$);function eN(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Co}}}function tN(e,t){switch(t.type){case mt.DragStart:return Z(H({},e),{draggable:Z(H({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case mt.DragMove:return e.draggable.active==null?e:Z(H({},e),{draggable:Z(H({},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 Z(H({},e),{draggable:Z(H({},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),Z(H({},e),{droppable:Z(H({},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,Z(H({},o),{disabled:i})),Z(H({},e),{droppable:Z(H({},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),Z(H({},e),{droppable:Z(H({},e.droppable),{containers:o})})}default:return e}}function nN(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=x.useContext(xo),o=ps(r),a=ps(n==null?void 0:n.id);return x.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!gs(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=QB(d);if(f){f.focus();break}}})}},[r,t,i,a,o]),null}function jv(e,t){let i=t,{transform:n}=i,r=We(i,["transform"]);return e!=null&&e.length?e.reduce((o,a)=>a(H({transform:o},r)),n):n}function rN(e){return x.useMemo(()=>({draggable:H(H({},xs.draggable),e==null?void 0:e.draggable),droppable:H(H({},xs.droppable),e==null?void 0:e.droppable),dragOverlay:H(H({},xs.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 iN(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=bv(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=xv(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,l,r,n])}const ws=x.createContext(Z(H({},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 oN=x.memo(function(t){var n,r,i,o;let Es=t,{id:a,accessibility:l,autoScroll:s=!0,children:c,sensors:d=J$,collisionDetection:f=h$,measuring:h,modifiers:p}=Es,g=We(Es,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const m=x.useReducer(tN,void 0,eN),[v,I]=m,[w,y]=n$(),[C,b]=x.useState(ir.Uninitialized),A=C===ir.Initialized,{draggable:{active:E,nodes:k,translate:F},droppable:{containers:Y}}=v,W=E!=null?k.get(E):null,T=x.useRef({initial:null,translated:null}),U=x.useMemo(()=>{var xt;return E!=null?{id:E,data:(xt=W==null?void 0:W.data)!=null?xt:X$,rect:T}:null},[E,W]),G=x.useRef(null),[$,B]=x.useState(null),[L,V]=x.useState(null),q=ho(g,Object.values(g)),ee=go("DndDescribedBy",a),O=x.useMemo(()=>Y.getEnabled(),[Y]),M=rN(h),{droppableRects:N,measureDroppableContainers:j,measuringScheduled:te}=z$(O,{dragging:A,dependencies:[F.x,F.y],config:M.droppable}),ae=N$(k,E),oe=x.useMemo(()=>L?ms(L):null,[L]),J=un(),se=j$(ae,M.draggable.measure);iN({activeNode:E!=null?k.get(E):null,config:J.layoutShiftCompensation,initialRect:se,measure:M.draggable.measure});const ne=Rv(ae,M.draggable.measure,se),ge=Rv(ae?ae.parentElement:null),Se=x.useRef({activatorEvent:null,active:null,activeNode:ae,collisionRect:null,collisions:null,droppableRects:N,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:Y,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ue=Y.getNodeFor((n=Se.current.over)==null?void 0:n.id),wt=Q$({measure:M.dragOverlay.measure}),at=(r=wt.nodeRef.current)!=null?r:ae,kt=A?(i=wt.rect)!=null?i:ne:null,de=!!(wt.nodeRef.current&&wt.rect),he=H$(de?null:ne),Ce=Bv(at?Rt(at):null),Te=W$(A?Ue!=null?Ue:ae:null),He=q$(Te),De=jv(p,{transform:{x:F.x-he.x,y:F.y-he.y,scaleX:1,scaleY:1},activatorEvent:L,active:U,activeNodeRect:ne,containerNodeRect:ge,draggingNodeRect:kt,over:Se.current.over,overlayNodeRect:wt.rect,scrollableAncestors:Te,scrollableAncestorRects:He,windowRect:Ce}),Ee=oe?fi(oe,F):null,It=G$(Te),St=Lv(It),jt=Lv(It,[ne]),Mt=fi(De,St),qt=kt?m$(kt,De):null,or=U&&qt?f({active:U,collisionRect:qt,droppableRects:N,droppableContainers:O,pointerCoordinates:Ee}):null,As=vv(or,"id"),[wn,wo]=x.useState(null),_u=de?De:fi(De,jt),ku=p$(_u,(o=wn==null?void 0:wn.rect)!=null?o:null,ne),ze=x.useRef(null),pi=x.useCallback((xt,_)=>{let{sensor:R,options:K}=_;if(G.current==null)return;const Q=k.get(G.current);if(!Q)return;const re=xt.nativeEvent,ce=new R({active:G.current,activeNode:Q,event:re,options:K,context:Se,onAbort(ue){if(!k.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(!k.get(ue))return;const{onDragPending:Dt}=q.current,nt={id:ue,constraint:we,initialCoordinates:fe,offset:me};Dt==null||Dt(nt),w({type:"onDragPending",event:nt})},onStart(ue){const we=G.current;if(we==null)return;const fe=k.get(we);if(!fe)return;const{onDragStart:me}=q.current,Pe={activatorEvent:re,active:{id:we,data:fe.data,rect:T}};Oe.unstable_batchedUpdates(()=>{me==null||me(Pe),b(ir.Initializing),I({type:mt.DragStart,initialCoordinates:ue,active:we}),w({type:"onDragStart",event:Pe}),B(ze.current),V(re)})},onMove(ue){I({type:mt.DragMove,coordinates:ue})},onEnd:xe(mt.DragEnd),onCancel:xe(mt.DragCancel)});ze.current=ce;function xe(ue){return function(){return D(this,null,function*(){const{active:fe,collisions:me,over:Pe,scrollAdjustedTranslate:Dt}=Se.current;let nt=null;if(fe&&Dt){const{cancelDrop:dn}=q.current;nt={activatorEvent:re,active:fe,collisions:me,delta:Dt,over:Pe},ue===mt.DragEnd&&typeof dn=="function"&&(yield Promise.resolve(dn(nt)))&&(ue=mt.DragCancel)}G.current=null,Oe.unstable_batchedUpdates(()=>{I({type:ue}),b(ir.Uninitialized),wo(null),B(null),V(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})}})})}}},[k]),Io=x.useCallback((xt,_)=>(R,K)=>{const Q=R.nativeEvent,re=k.get(K);if(G.current!==null||!re||Q.dndKit||Q.defaultPrevented)return;const ce={active:re};xt(R,_.options,ce)===!0&&(Q.dndKit={capturedBy:_.sensor},G.current=K,pi(R,_))},[k,pi]),Ts=F$(d,Io);Y$(d),ln(()=>{ne&&C===ir.Initializing&&b(ir.Initialized)},[ne,C]),x.useEffect(()=>{const{onDragMove:xt}=q.current,{active:_,activatorEvent:R,collisions:K,over:Q}=Se.current;if(!_||!R)return;const re={active:_,activatorEvent:R,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:R,droppableContainers:K,scrollAdjustedTranslate:Q}=Se.current;if(!xt||G.current==null||!_||!Q)return;const{onDragOver:re}=q.current,ce=K.get(As),xe=ce&&ce.rect.current?{id:ce.id,rect:ce.rect.current,data:ce.data,disabled:ce.disabled}:null,ue={active:xt,activatorEvent:_,collisions:R,delta:{x:Q.x,y:Q.y},over:xe};Oe.unstable_batchedUpdates(()=>{wo(xe),re==null||re(ue),w({type:"onDragOver",event:ue})})},[As]),ln(()=>{Se.current={activatorEvent:L,active:U,activeNode:ae,collisionRect:qt,collisions:or,droppableRects:N,draggableNodes:k,draggingNode:at,draggingNodeRect:kt,droppableContainers:Y,over:wn,scrollableAncestors:Te,scrollAdjustedTranslate:Mt},T.current={initial:kt,translated:qt}},[U,ae,or,qt,k,at,kt,N,Y,wn,Te,Mt]),L$(Z(H({},J),{delta:F,draggingRect:qt,pointerCoordinates:Ee,scrollableAncestors:Te,scrollableAncestorRects:He}));const gi=x.useMemo(()=>({active:U,activeNode:ae,activeNodeRect:ne,activatorEvent:L,collisions:or,containerNodeRect:ge,dragOverlay:wt,draggableNodes:k,droppableContainers:Y,droppableRects:N,over:wn,measureDroppableContainers:j,scrollableAncestors:Te,scrollableAncestorRects:He,measuringConfiguration:M,measuringScheduled:te,windowRect:Ce}),[U,ae,ne,L,or,ge,wt,k,Y,N,wn,j,Te,He,M,te,Ce]),So=x.useMemo(()=>({activatorEvent:L,activators:Ts,active:U,activeNodeRect:ne,ariaDescribedById:{draggable:ee},dispatch:I,draggableNodes:k,over:wn,measureDroppableContainers:j}),[L,Ts,U,ne,I,ee,k,wn,j]);return x.createElement(pv.Provider,{value:y},x.createElement(xo.Provider,{value:So},x.createElement(zv.Provider,{value:gi},x.createElement(ws.Provider,{value:ku},c)),x.createElement(nN,{disabled:(l==null?void 0:l.restoreFocus)===!1})),x.createElement(o$,Z(H({},l),{hiddenTextDescribedById:ee})));function un(){const xt=($==null?void 0:$.autoScrollEnabled)===!1,_=typeof s=="object"?s.enabled===!1:s===!1,R=A&&!xt&&!_;return typeof s=="object"?Z(H({},s),{enabled:R}):{enabled:R}}}),aN=x.createContext(null),Vv="button",sN="Draggable";function lN(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=go(sN),{activators:a,activatorEvent:l,active:s,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:h}=x.useContext(xo),{role:p=Vv,roleDescription:g="draggable",tabIndex:m=0}=i!=null?i:{},v=(s==null?void 0:s.id)===t,I=x.useContext(v?ws:aN),[w,y]=hs(),[C,b]=hs(),A=K$(a,t),E=ho(n);ln(()=>(f.set(t,{id:t,key:o,node:w,activatorNode:C,data:E}),()=>{const F=f.get(t);F&&F.key===o&&f.delete(t)}),[f,t]);const k=x.useMemo(()=>({role:p,tabIndex:m,"aria-disabled":r,"aria-pressed":v&&p===Vv?!0:void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[r,p,m,v,g,d.draggable]);return{active:s,activatorEvent:l,activeNodeRect:c,attributes:k,isDragging:v,listeners:r?void 0:A,node:w,over:h,setNodeRef:y,setActivatorNodeRef:b,transform:I}}function Uv(){return x.useContext(zv)}const cN="Droppable",uN={timeout:25};function dN(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=go(cN),{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:g,updateMeasurementsFor:m,timeout:v}=H(H({},uN),i),I=ho(m!=null?m:r),w=x.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(I.current)?I.current:[I.current]),p.current=null},v)},[v]),y=Cs({callback:w,disabled:g||!a}),C=x.useCallback((k,F)=>{y&&(F&&(y.unobserve(F),f.current=!1),k&&y.observe(k))},[y]),[b,A]=hs(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:A}}function fN(e){let{animation:t,children:n}=e;const[r,i]=x.useState(null),[o,a]=x.useState(null),l=ps(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 hN={x:0,y:0,scaleX:1,scaleY:1};function pN(e){let{children:t}=e;return x.createElement(xo.Provider,{value:Fv},x.createElement(ws.Provider,{value:hN},t))}const gN={position:"fixed",touchAction:"none"},mN=e=>gs(e)?"transform 250ms ease":void 0,vN=x.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:l,style:s,transform:c,transition:d=mN}=e;if(!l)return null;const f=i?c:Z(H({},c),{scaleX:1,scaleY:1}),h=H(Z(H({},gN),{width:l.width,height:l.height,top:l.top,left:l.left,transform:rr.Transform.toString(f),transformOrigin:i&&r?l$(r,l):void 0,transition:typeof d=="function"?d(r):d}),s);return x.createElement(n,{className:a,style:h,ref:t},o)}),Hv=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)}},bN={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:Hv({styles:{active:{opacity:"0"}}})};function yN(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return fs((o,a)=>{if(t===null)return;const l=n.get(o);if(!l)return;const s=l.node.current;if(!s)return;const c=Nv(a);if(!c)return;const{transform:d}=Rt(a).getComputedStyle(a),f=yv(d);if(!f)return;const h=typeof t=="function"?t:CN(t);return Ev(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 CN(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}=H(H({},bN),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=H({x:s.x-d.x,y:s.y-d.y},f),p=i(Z(H({},c),{active:a,dragOverlay:l,transform:{initial:s,final:h}})),[g]=p,m=p[p.length-1];if(JSON.stringify(g)===JSON.stringify(m))return;const v=r==null?void 0:r(H({active:a,dragOverlay:l},c)),I=l.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise(y=>{I.onfinish=()=>{v==null||v(),y()}})}}let Wv=0;function xN(e){return x.useMemo(()=>{if(e!=null)return Wv++,Wv},[e])}const wN=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:g,droppableContainers:m,dragOverlay:v,over:I,measuringConfiguration:w,scrollableAncestors:y,scrollableAncestorRects:C,windowRect:b}=Uv(),A=x.useContext(ws),E=xN(f==null?void 0:f.id),k=jv(a,{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggingNodeRect:v.rect,over:I,overlayNodeRect:v.rect,scrollableAncestors:y,scrollableAncestorRects:C,transform:A,windowRect:b}),F=Tu(h),Y=yN({config:r,draggableNodes:g,droppableContainers:m,measuringConfiguration:w}),W=F?v.setRef:void 0;return x.createElement(pN,null,x.createElement(fN,{animation:Y},f&&E?x.createElement(vN,{key:E,id:f.id,ref:W,as:l,activatorEvent:d,adjustScale:t,className:s,transition:o,rect:F,style:H({zIndex:c},i),transform:k},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 IN(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Is(e){return e!==null&&e>=0}function SN(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 AN(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Gv=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}},Yv="Sortable",Kv=x.createContext({activeIndex:-1,containerId:Yv,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Gv,disabled:{draggable:!1,droppable:!1}});function TN(e){let{children:t,id:n,items:r,strategy:i=Gv,disabled:o=!1}=e;const{active:a,dragOverlay:l,droppableRects:s,over:c,measureDroppableContainers:d}=Uv(),f=go(Yv,n),h=l.rect!==null,p=x.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),g=a!=null,m=a?p.indexOf(a.id):-1,v=c?p.indexOf(c.id):-1,I=x.useRef(p),w=!SN(p,I.current),y=v!==-1&&m===-1||w,C=AN(o);ln(()=>{w&&g&&d(p)},[w,p,g,d]),x.useEffect(()=>{I.current=p},[p]);const b=x.useMemo(()=>({activeIndex:m,containerId:f,disabled:C,disableTransforms:y,items:p,overIndex:v,useDragOverlay:h,sortedRects:IN(p,s),strategy:i}),[m,f,C.draggable,C.droppable,y,p,v,s,h,i]);return x.createElement(Kv.Provider,{value:b},t)}const EN=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Eu(n,r,i).indexOf(t)},_N=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},kN={duration:200,easing:"ease"},qv="transform",DN=rr.Transition.toString({property:qv,duration:0,easing:"linear"}),PN={roleDescription:"sortable"};function ON(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 RN(e){let{animateLayoutChanges:t=_N,attributes:n,disabled:r,data:i,getNewIndex:o=EN,id:a,strategy:l,resizeObserverConfig:s,transition:c=kN}=e;const{items:d,containerId:f,activeIndex:h,disabled:p,disableTransforms:g,sortedRects:m,overIndex:v,useDragOverlay:I,strategy:w}=x.useContext(Kv),y=MN(r,p),C=d.indexOf(a),b=x.useMemo(()=>H({sortable:{containerId:f,index:C,items:d}},i),[f,i,C,d]),A=x.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:E,node:k,isOver:F,setNodeRef:Y}=dN({id:a,data:b,disabled:y.droppable,resizeObserverConfig:H({updateMeasurementsFor:A},s)}),{active:W,activatorEvent:T,activeNodeRect:U,attributes:G,setNodeRef:$,listeners:B,isDragging:L,over:V,setActivatorNodeRef:q,transform:ee}=lN({id:a,data:b,attributes:H(H({},PN),n),disabled:y.draggable}),O=GB(Y,$),M=!!W,N=M&&!g&&Is(h)&&Is(v),j=!I&&L,te=j&&N?ee:null,ae=l!=null?l:w,oe=N?te!=null?te:ae({rects:m,activeNodeRect:U,activeIndex:h,overIndex:v,index:C}):null,J=Is(h)&&Is(v)?o({id:a,items:d,activeIndex:h,overIndex:v}):C,se=W==null?void 0:W.id,ne=x.useRef({activeId:se,items:d,newIndex:J,containerId:f}),ge=d!==ne.current.items,Se=t({active:W,containerId:f,isDragging:L,isSorting:M,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=ON({disabled:!Se,index:C,node:k,rect:E});return x.useEffect(()=>{M&&ne.current.newIndex!==J&&(ne.current.newIndex=J),f!==ne.current.containerId&&(ne.current.containerId=f),d!==ne.current.items&&(ne.current.items=d)},[M,J,f,d]),x.useEffect(()=>{if(se===ne.current.activeId)return;if(se!=null&&ne.current.activeId==null){ne.current.activeId=se;return}const at=setTimeout(()=>{ne.current.activeId=se},50);return()=>clearTimeout(at)},[se]),{active:W,activeIndex:h,attributes:G,data:b,rect:E,index:C,newIndex:J,items:d,isOver:F,isSorting:M,isDragging:L,listeners:B,node:k,overIndex:v,over:V,setNodeRef:O,setActivatorNodeRef:q,setDroppableNodeRef:Y,setDraggableNodeRef:$,transform:Ue!=null?Ue:oe,transition:wt()};function wt(){if(Ue||ge&&ne.current.newIndex===C)return DN;if(!(j&&!gs(T)||!c)&&(M||Se))return rr.Transition.toString(Z(H({},c),{property:qv}))}}function MN(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 Ss(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 LN=[_e.Down,_e.Right,_e.Up,_e.Left],BN=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:l}}=t;if(LN.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=d$({active:n,collisionRect:r,droppableRects:i,droppableContainers:s,pointerCoordinates:null});let d=vv(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,g=h==null?void 0:h.node.current;if(g&&p&&f&&h){const v=bs(g).some((A,E)=>l[E]!==A),I=Qv(f,h),w=$N(f,h),y=v||!I?{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 Qv(e,t){return!Ss(e)||!Ss(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function $N(e,t){return!Ss(e)||!Ss(t)||!Qv(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const NN=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"),Jv=x.createContext({attributes:{},listeners:void 0,ref(){}}),FN=()=>{const{attributes:e,listeners:t,ref:n}=x.useContext(Jv);return u.jsx(S.Button,Z(H(H({sx:{backgroundColor:"transparent",color:"#919eab",width:"10px",":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}},e),t),{ref:n,children:u.jsx(NN,{})}))},Xv=({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}=RN({id:t}),p=x.useMemo(()=>({attributes:a,listeners:s,ref:d}),[a,s,d]),g={opacity:l?.6:void 0,transform:rr.Translate.toString(f),transition:h};return u.jsx(Jv.Provider,{value:p,children:u.jsx(S.ListItem,{variant:o,ref:c,style:g,startAction:i?u.jsx(FN,{}):u.jsx(u.Fragment,{}),endAction:i?u.jsx(S.Tooltip,{title:n,children:u.jsx(S.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})})},zN={sideEffects:Hv({styles:{active:{opacity:"0.6"}}})},jN=({children:e})=>u.jsx(wN,{dropAnimation:zN,children:e}),VN=({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=a$(gv(wu),gv(Cu,{coordinateGetter:BN}));return u.jsxs(oN,{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(TN,{items:e,children:u.jsx(S.List,{sx:{gap:"10px"},children:e.map(s=>u.jsxs(Xv,{id:s.id,variant:"outlined",removeItem:()=>r(s.id),tooltipTitle:t.removeEntity,children:[u.jsx(S.Typography,{ml:2,children:s.title||s.name}),s.type&&u.jsx(S.Chip,{color:X2(s.type),sx:{marginLeft:2},children:Z2(s.type)})]},`sortable-item-${s.id}`))})}),u.jsx(jN,{children:a?u.jsx(u.Fragment,{children:e.map(s=>u.jsx(Xv,{id:s.id,useDraggable:!1,removeItem:()=>{},tooltipTitle:t.removeEntity},`sortable-overlay-item-${s.id}`))}):u.jsx(u.Fragment,{})})]})},UN=e=>u.jsxs(S.FormControl,{size:"sm",children:[u.jsx(S.FormLabel,{children:e.labels.itemsPerPage}),u.jsx(S.Select,{value:e.value,size:"sm",onChange:e.onChange,sx:{minHeight:"37px"},children:e.options.map((t,n)=>u.jsx(S.Option,{value:t,children:t},`items-per-page-${t}-${n}`))})]}),HN=(e,t)=>{const[n,r]=x.useState(null),{sdk:i}=ht(),o=()=>D(this,null,function*(){let a=[];if(!e){r(a);return}try{switch(e){case"top_x":a=(yield i.topX.getGames({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e}));break;case"match_quiz":a=(yield i.matchQuiz.getGames({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e}));break;case"template":a=(yield i.loyalty.getTemplates()).data.map(g=>({id:g.id,name:g.name,status:g.status,type:e}));break;case"classic_quiz":a=(yield i.miniGames.getClassicQuizzes({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e}));break;case"either_or":a=(yield i.miniGames.getEitherOrs({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e}));break;case"poll":a=(yield i.voting.getPolls({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e}));break;case"bracket":a=(yield i.bracketGame.getGames({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e}));break;case"standing":break}}catch(l){console.error(l),r(a),t();return}r(a)});return x.useEffect(()=>(o(),()=>r(null)),[e]),{relatedEntityOptions:n,setRelatedEntityOptions:r}},WN=({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(S.Chip,{color:t,variant:"solid",size:"sm",children:e})},GN=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"),YN=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"),KN=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"),qN=Ve(u.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),QN=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"),JN=e=>{switch(e.entityType){case"top_x":return u.jsx(S.Tooltip,{title:"Top X",children:u.jsx(GN,{})});case"match_quiz":return u.jsx(S.Tooltip,{title:"Match Quiz",children:u.jsx(YN,{})});case"template":return u.jsx(S.Tooltip,{title:"Leaderboard Templates",children:u.jsx(Le.EmojiEvents,{})});case"classic_quiz":return u.jsx(S.Tooltip,{title:"Classic Quiz",children:u.jsx(KN,{})});case"either_or":return u.jsx(S.Tooltip,{title:"Either/Or",children:u.jsx(qN,{})});case"poll":return u.jsx(S.Tooltip,{title:"Poll",children:u.jsx(QN,{})});case"bracket":return u.jsx(S.Tooltip,{title:"Custom Bracket Game",children:u.jsx(Le.EmojiEvents,{})});case"standing":return u.jsx(S.Tooltip,{title:"Custom Standings Game",children:u.jsx(Le.EmojiEvents,{})});default:return null}},XN=({entity:e,relationshipLabel:t,deleteLabel:n,onDelete:r})=>u.jsxs(u.Fragment,{children:[u.jsx(S.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:u.jsx(S.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:t})}),u.jsx(S.Card,{sx:{p:2,mb:2},children:u.jsx(S.CardContent,{children:u.jsxs(S.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"space-between"},children:[u.jsx(S.Typography,{fontSize:"sm",startDecorator:u.jsx(JN,{entityType:e.type}),children:e.name}),u.jsx(S.Box,{display:{xs:"none",md:"block"},children:u.jsx(WN,{status:e.status})}),u.jsx(S.Box,{children:u.jsx(S.Tooltip,{title:n,children:u.jsx(S.IconButton,{onClick:()=>r(e.id),color:"danger",size:"sm",children:u.jsx(Le.Delete,{})})})})]})})})]}),ZN=(e,t,n,r)=>D(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])}else a.set(l.entity_type,[l.entity_id])});try{for(const[l,s]of a)switch(l){case"top_x":const c=yield e.topX.getGames({limit:s.length,gameIds:s},!0);o=[...o,...c.data.map(v=>({id:v.id,name:v.title,status:v.status,type:l}))];break;case"match_quiz":const d=yield e.matchQuiz.getGames({limit:s.length,gameIds:s},!0);o=[...o,...d.data.map(v=>({id:v.id,name:v.title,status:v.status,type:l}))];break;case"template":const f=yield e.loyalty.getTemplates(void 0,!0);o=[...o,...f.data.filter(v=>s.includes(v.id)).map(v=>({id:v.id,name:v.name,status:v.status,type:l}))];break;case"classic_quiz":const h=yield e.miniGames.getClassicQuizzes({limit:s.length,classicQuizIds:s},!1,!0);o=[...o,...h.data.map(v=>({id:v.id,name:v.title,status:v.status,type:l}))];break;case"either_or":const p=yield e.miniGames.getEitherOrs({limit:s.length,eitherOrIds:s},!1,!0);o=[...o,...p.data.map(v=>({id:v.id,name:v.title,status:v.status,type:l}))];break;case"poll":const g=yield e.voting.getPolls({limit:s.length,pollIds:s},!0);o=[...o,...g.data.map(v=>({id:v.id,name:v.title,status:v.status,type:l}))];break;case"bracket":const m=yield e.bracketGame.getGames({limit:50},!0);o=[...o,...m.data.filter(v=>s.includes(v.id)).map(v=>({id:v.id,name:v.title,status:v.status,type:l}))];break;case"standing":break;default:}}catch(l){console.error("Error loading related entities",l),n(o),r()}n(o)}),eF=["top_x","match_quiz","template","classic_quiz","poll","either_or","bracket","standing"],tF=["relatedTo","blocks","blockedBy","bonusPointsGame","nextInSeries","previousInSeries"],nF=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"),Zv=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"),rF={Login:BR,InformationInput:eo,RichText:ic,HeaderButtons:dD,MarketSelection:JR,Accordion:X1,DynamicFields:_D,BasicSelect:eT,BooleanSwitch:CL,Branding:uD,ProfileSearchSelect:bL,RangeCalendar:TD,CompetitionSearchSelect:mL,Related:tM,Images:fR,Duration:AD,DatePickerComponent:to,Flags:lR,Spinner:cs,Tags:_m,Toast:pt,AdContent:Z1,Match:XR,Winners:sB,CompetitionsSearchSelect:vL,TeamsSearchSelect:yL,CustomSelect:vM,Schedule:uM,NoPermissionCard:ED,CustomFlatpickrCalendar:Vc,ContextSelectFilter:cB,NumberInput:LB,EntityContext:VB,MiniGamesImages:HB,AuthRequirement:WB,SortableList:VN,ItemsPerPageFilter:UN,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),{relatedEntityOptions:g,setRelatedEntityOptions:m}=HN(l,p),v=g?g.filter(C=>e.some(b=>b.entity_id!==C.id)):null,{sdk:I}=ht();x.useEffect(()=>(e.length>0&&ZN(I,e,i,p),()=>{i([]),a(""),s(null),d("relatedTo")}),[]);const w=()=>{const C=[...e,{entity_id:o,entity_type:l,entity_relationship:c}],b=(g==null?void 0:g.filter(k=>k.id===o).map(k=>({id:k.id,name:k.name,type:l,status:k.status})))||[],E=Array.from(g||[]).filter(k=>k.id!==o);i([...r,...b]),m(E),t(C),a("")},y=C=>{const b=e.filter(E=>E.entity_id!==C),A=r.filter(E=>E.id!==C);i(A),t(b)};return u.jsxs(u.Fragment,{children:[r.map(C=>{var b;return u.jsx(XN,{entity:C,relationshipLabel:Zv.get((b=e.find(A=>A.entity_id===C.id))==null?void 0:b.entity_relationship)||"Unknown relationship",deleteLabel:n.delete,onDelete:y},`related-entity-relationship-${C.id}`)}),u.jsxs(S.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},width:"100%",mt:r&&r.length?2:0},children:[u.jsxs(S.FormControl,{sx:{width:"100%",mb:1,mr:{xs:0,md:1}},children:[u.jsx(S.FormLabel,{required:!0,color:"primary",children:n.type}),u.jsx(S.Select,{value:l,size:"sm",name:"entity_type",onChange:(C,b)=>s(b),sx:{minHeight:"37px"},children:eF.map(C=>u.jsx(S.Option,{value:C,children:nF.get(C)},`entity-type-option-${C}`))})]}),u.jsxs(S.FormControl,{sx:{width:"100%",mb:{xs:1,md:0}},children:[u.jsx(S.FormLabel,{required:!0,color:"primary",children:n.relationship}),u.jsx(S.Select,{value:c,size:"sm",name:"entity_relationship",onChange:(C,b)=>d(b),sx:{minHeight:"37px"},children:tF.map(C=>u.jsx(S.Option,{value:C,children:Zv.get(C)},`entity-relationship-option-${C}`))})]})]}),u.jsxs(S.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(S.FormLabel,{required:!0,color:"primary",children:n.entity}),u.jsxs(S.Box,{display:"flex",alignItems:"center",flexDirection:{xs:"column",md:"row"},children:[u.jsx(S.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:!v&&u.jsx(S.CircularProgress,{size:"sm"}),children:v&&v.map(C=>u.jsx(S.Option,{value:C.id,children:C.name},`entity--${C.id}`))}),u.jsx(S.Tooltip,{title:n.add,children:u.jsx(S.IconButton,{disabled:!o||!l,onClick:w,children:u.jsx(Le.Add,{})})})]})]}),u.jsx(pt,{showToast:f,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:p})]})}},eb=x.createContext(null),iF=({children:e})=>u.jsx(eb.Provider,{value:rF,children:e}),oF=()=>{const e=x.useContext(eb);if(!e)throw new Error("useComponentContext must be used within a ComponentProvider");return e},tb=425,nb=1024;return{APIProvider:dI,AuthProvider:fI,AuthContext:Bf,ComponentProvider:iF,useComponentContext:oF,useAPIContext:ht,useIsMobile:()=>{const[e,t]=x.useState(window.innerWidth<=nb),[n,r]=x.useState(window.innerWidth<=tb);return x.useLayoutEffect(()=>{const i=()=>{t(window.innerWidth<=nb),r(window.innerWidth<=tb)};return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),{isMobile:e,isPhone:n}}}});
|
|
2475
|
+
`},i$={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 o$(e){let{announcements:t=i$,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=r$}=e;const{announce:o,announcement:a}=e$(),l=go("DndLiveRegion"),[s,c]=x.useState(!1);if(x.useEffect(()=>{c(!0)},[]),t$(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(XB,{id:r,value:i.draggable}),x.createElement(ZB,{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 vs(){}function gv(e,t){return x.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function a$(){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 s$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function l$(e,t){const n=ms(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function c$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function u$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function mv(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 vv(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const d$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=mv(t),o=[];for(const a of r){const{id:l}=a,s=n.get(l);if(s){const c=mv(s),d=i.reduce((h,p,g)=>h+s$(c[g],p),0),f=Number((d/4).toFixed(4));o.push({id:l,data:{droppableContainer:a,value:f}})}}return o.sort(c$)};function f$(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 h$=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=f$(l,t);s>0&&i.push({id:a,data:{droppableContainer:o,value:s}})}}return i.sort(u$)};function p$(e,t,n){return X(H({},e),{scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1})}function bv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:cn}function g$(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(H({},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}),H({},n))}}const m$=g$(1);function yv(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 v$(e,t,n){const r=yv(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 b$={ignoreTransform:!1};function hi(e,t){t===void 0&&(t=b$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Rt(e).getComputedStyle(e);c&&(n=v$(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 Cv(e){return hi(e,{ignoreTransform:!0})}function y$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function C$(e,t){return t===void 0&&(t=Rt(e).getComputedStyle(e)),t.position==="fixed"}function x$(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 bs(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)||dv(i)||n.includes(i))return n;const o=Rt(e).getComputedStyle(i);return i!==e&&x$(i,o)&&n.push(i),C$(i,o)?n:r(i.parentNode)}return e?r(e):n}function xv(e){const[t]=bs(e,1);return t!=null?t:null}function mu(e){return!ds||!e?null:ui(e)?e:hu(e)?pu(e)||e===di(e).scrollingElement?window:fo(e)?e:null:null}function wv(e){return ui(e)?e.scrollX:e.scrollLeft}function Iv(e){return ui(e)?e.scrollY:e.scrollTop}function vu(e){return{x:wv(e),y:Iv(e)}}var Ct;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ct||(Ct={}));function Sv(e){return!ds||!e?!1:e===document.scrollingElement}function Av(e){const t={x:0,y:0},n=Sv(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 w$={x:.2,y:.2};function I$(e,t,n,r,i){let{top:o,left:a,right:l,bottom:s}=n;r===void 0&&(r=10),i===void 0&&(i=w$);const{isTop:c,isBottom:d,isLeft:f,isRight:h}=Av(e),p={x:0,y:0},g={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+m.height?(p.y=Ct.Backward,g.y=r*Math.abs((t.top+m.height-o)/m.height)):!d&&s>=t.bottom-m.height&&(p.y=Ct.Forward,g.y=r*Math.abs((t.bottom-m.height-s)/m.height)),!h&&l>=t.right-m.width?(p.x=Ct.Forward,g.x=r*Math.abs((t.right-m.width-l)/m.width)):!f&&a<=t.left+m.width&&(p.x=Ct.Backward,g.x=r*Math.abs((t.left+m.width-a)/m.width)),{direction:p,speed:g}}function S$(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 Tv(e){return e.reduce((t,n)=>fi(t,vu(n)),cn)}function A$(e){return e.reduce((t,n)=>t+wv(n),0)}function T$(e){return e.reduce((t,n)=>t+Iv(n),0)}function Ev(e,t){if(t===void 0&&(t=hi),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);xv(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const E$=[["x",["left","right"],A$],["y",["top","bottom"],T$]];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=bs(n),i=Tv(r);this.rect=H({},t),this.width=t.width,this.height=t.height;for(const[o,a,l]of E$)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 _$(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 _v(e){e.preventDefault()}function k$(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 kv={start:[_e.Space,_e.Enter],cancel:[_e.Esc],end:[_e.Space,_e.Enter,_e.Tab]},D$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case _e.Right:return X(H({},n),{x:n.x+25});case _e.Left:return X(H({},n),{x:n.x-25});case _e.Down:return X(H({},n),{y:n.y+25});case _e.Up:return X(H({},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&&Ev(r),n(cn)}handleKeyDown(t){if(gs(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=kv,coordinateGetter:a=D$,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:g}=r.current;for(const m of g){const v=t.code,{isTop:I,isRight:w,isLeft:y,isBottom:C,maxScroll:b,minScroll:A}=Av(m),E=S$(m),D={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))},F=v===_e.Right&&!w||v===_e.Left&&!y,Y=v===_e.Down&&!C||v===_e.Up&&!I;if(F&&D.x!==f.x){const W=m.scrollLeft+h.x,T=v===_e.Right&&W<=b.x||v===_e.Left&&W>=A.x;if(T&&!h.y){m.scrollTo({left:W,behavior:l});return}T?p.x=m.scrollLeft-W:p.x=v===_e.Right?m.scrollLeft-b.x:m.scrollLeft-A.x,p.x&&m.scrollBy({left:-p.x,behavior:l});break}else if(Y&&D.y!==f.y){const W=m.scrollTop+h.y,T=v===_e.Down&&W<=b.y||v===_e.Up&&W>=A.y;if(T&&!h.x){m.scrollTo({top:W,behavior:l});return}T?p.y=m.scrollTop-W:p.y=v===_e.Down?m.scrollTop-b.y:m.scrollTop-A.y,p.y&&m.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=kv,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 Pv(e){return!!(e&&"delay"in e)}class xu{constructor(t,n,r){var i;r===void 0&&(r=_$(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=ms(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,_v),this.windowListeners.add(on.VisibilityChange,this.handleCancel),this.windowListeners.add(on.ContextMenu,_v),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(Pv(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,k$,{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=ms(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(Pv(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 P$={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,P$,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 O$={move:{name:"mousemove"},end:{name:"mouseup"}};var Iu;(function(e){e[e.RightClick=2]="RightClick"})(Iu||(Iu={}));class R$ extends xu{constructor(t){super(t,O$,di(t.event.target))}}R$.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 M$ 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(){}}}M$.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 ys;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(ys||(ys={}));function L$(e){let{acceleration:t,activator:n=bo.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:l=ys.TreeOrder,pointerCoordinates:s,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=$$({delta:f,disabled:!o}),[g,m]=YB(),v=x.useRef({x:0,y:0}),I=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 A=y.current;if(!A)return;const E=v.current.x*I.current.x,D=v.current.y*I.current.y;A.scrollBy(E,D)},[]),b=x.useMemo(()=>l===ys.TreeOrder?[...c].reverse():c,[l,c]);x.useEffect(()=>{if(!o||!c.length||!w){m();return}for(const A of b){if((r==null?void 0:r(A))===!1)continue;const E=c.indexOf(A),D=d[E];if(!D)continue;const{direction:F,speed:Y}=I$(A,D,w,t,h);for(const W of["x","y"])p[W][F[W]]||(Y[W]=0,F[W]=0);if(Y.x>0||Y.y>0){m(),y.current=A,g(C,a),v.current=Y,I.current=F;return}}v.current={x:0,y:0},I.current={x:0,y:0},m()},[t,C,r,m,o,a,JSON.stringify(w),JSON.stringify(p),g,c,b,d,JSON.stringify(h)])}const B$={x:{[Ct.Backward]:!1,[Ct.Forward]:!1},y:{[Ct.Backward]:!1,[Ct.Forward]:!1}};function $$(e){let{delta:t,disabled:n}=e;const r=ps(t);return po(i=>{if(n||!r||!i)return B$;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 N$(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 F$(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 Ov=new Map;function z$(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(I){I===void 0&&(I=[]),!h.current&&a(w=>w===null?I:w.concat(I.filter(y=>!w.includes(y))))},[h]),g=x.useRef(null),m=po(I=>{if(f&&!n)return Ov;if(!I||I===Ov||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 I},[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"||g.current!==null||(g.current=setTimeout(()=>{p(),g.current=null},l))},[l,f,p,...r]),{droppableRects:m,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 j$(e,t){return Tu(e,t)}function V$(e){let{callback:t,disabled:n}=e;const r=fs(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 Cs(e){let{callback:t,disabled:n}=e;const r=fs(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 U$(e){return new bu(hi(e),e)}function Rv(e,t,n){t===void 0&&(t=U$);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=V$({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=Cs({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 H$(e){const t=Tu(e);return bv(e,t)}const Mv=[];function W$(e){const t=x.useRef(e),n=po(r=>e?r&&r!==Mv&&e&&t.current&&e.parentNode===t.current.parentNode?r:bs(e):Mv,[e]);return x.useEffect(()=>{t.current=e},[e]),n}function G$(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):Tv(e):cn,[e,t])}function Lv(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 Y$(e){x.useEffect(()=>{if(!ds)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 K$(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 Bv(e){return x.useMemo(()=>e?y$(e):null,[e])}const $v=[];function q$(e,t){t===void 0&&(t=hi);const[n]=e,r=Bv(n?Rt(n):null),[i,o]=x.useState($v);function a(){o(()=>e.length?e.map(s=>Sv(s)?r:new bu(t(s),s)):$v)}const l=Cs({callback:a});return ln(()=>{l==null||l.disconnect(),a(),e.forEach(s=>l==null?void 0:l.observe(s))},[e]),i}function Nv(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return fo(t)?t:e}function Q$(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(H({},f),{width:h.width,height:h.height}):h});break}},[t]),o=Cs({callback:i}),a=x.useCallback(c=>{const d=Nv(c);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[l,s]=hs(a);return x.useMemo(()=>({nodeRef:l,rect:n,setRef:s}),[n,l,s])}const J$=[{sensor:wu,options:{}},{sensor:Cu,options:{}}],X$={current:{}},xs={draggable:{measure:Cv},droppable:{measure:Cv,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 Z$={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:vs},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:xs,measureDroppableContainers:vs,windowRect:null,measuringScheduled:!1},Fv={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:vs,draggableNodes:new Map,over:null,measureDroppableContainers:vs},xo=x.createContext(Fv),zv=x.createContext(Z$);function eN(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Co}}}function tN(e,t){switch(t.type){case mt.DragStart:return X(H({},e),{draggable:X(H({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case mt.DragMove:return e.draggable.active==null?e:X(H({},e),{draggable:X(H({},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(H({},e),{draggable:X(H({},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(H({},e),{droppable:X(H({},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(H({},o),{disabled:i})),X(H({},e),{droppable:X(H({},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(H({},e),{droppable:X(H({},e.droppable),{containers:o})})}default:return e}}function nN(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=x.useContext(xo),o=ps(r),a=ps(n==null?void 0:n.id);return x.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!gs(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=QB(d);if(f){f.focus();break}}})}},[r,t,i,a,o]),null}function jv(e,t){let i=t,{transform:n}=i,r=We(i,["transform"]);return e!=null&&e.length?e.reduce((o,a)=>a(H({transform:o},r)),n):n}function rN(e){return x.useMemo(()=>({draggable:H(H({},xs.draggable),e==null?void 0:e.draggable),droppable:H(H({},xs.droppable),e==null?void 0:e.droppable),dragOverlay:H(H({},xs.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 iN(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=bv(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=xv(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,l,r,n])}const ws=x.createContext(X(H({},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 oN=x.memo(function(t){var n,r,i,o;let Es=t,{id:a,accessibility:l,autoScroll:s=!0,children:c,sensors:d=J$,collisionDetection:f=h$,measuring:h,modifiers:p}=Es,g=We(Es,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const m=x.useReducer(tN,void 0,eN),[v,I]=m,[w,y]=n$(),[C,b]=x.useState(ir.Uninitialized),A=C===ir.Initialized,{draggable:{active:E,nodes:D,translate:F},droppable:{containers:Y}}=v,W=E!=null?D.get(E):null,T=x.useRef({initial:null,translated:null}),U=x.useMemo(()=>{var xt;return E!=null?{id:E,data:(xt=W==null?void 0:W.data)!=null?xt:X$,rect:T}:null},[E,W]),G=x.useRef(null),[$,B]=x.useState(null),[L,V]=x.useState(null),q=ho(g,Object.values(g)),ee=go("DndDescribedBy",a),O=x.useMemo(()=>Y.getEnabled(),[Y]),M=rN(h),{droppableRects:N,measureDroppableContainers:j,measuringScheduled:te}=z$(O,{dragging:A,dependencies:[F.x,F.y],config:M.droppable}),se=N$(D,E),oe=x.useMemo(()=>L?ms(L):null,[L]),J=un(),le=j$(se,M.draggable.measure);iN({activeNode:E!=null?D.get(E):null,config:J.layoutShiftCompensation,initialRect:le,measure:M.draggable.measure});const ne=Rv(se,M.draggable.measure,le),ge=Rv(se?se.parentElement:null),Se=x.useRef({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:N,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:Y,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ue=Y.getNodeFor((n=Se.current.over)==null?void 0:n.id),wt=Q$({measure:M.dragOverlay.measure}),at=(r=wt.nodeRef.current)!=null?r:se,kt=A?(i=wt.rect)!=null?i:ne:null,de=!!(wt.nodeRef.current&&wt.rect),he=H$(de?null:ne),Ce=Bv(at?Rt(at):null),Te=W$(A?Ue!=null?Ue:se:null),He=q$(Te),De=jv(p,{transform:{x:F.x-he.x,y:F.y-he.y,scaleX:1,scaleY:1},activatorEvent:L,active:U,activeNodeRect:ne,containerNodeRect:ge,draggingNodeRect:kt,over:Se.current.over,overlayNodeRect:wt.rect,scrollableAncestors:Te,scrollableAncestorRects:He,windowRect:Ce}),Ee=oe?fi(oe,F):null,It=G$(Te),St=Lv(It),jt=Lv(It,[ne]),Mt=fi(De,St),qt=kt?m$(kt,De):null,or=U&&qt?f({active:U,collisionRect:qt,droppableRects:N,droppableContainers:O,pointerCoordinates:Ee}):null,As=vv(or,"id"),[wn,wo]=x.useState(null),_u=de?De:fi(De,jt),ku=p$(_u,(o=wn==null?void 0:wn.rect)!=null?o:null,ne),ze=x.useRef(null),pi=x.useCallback((xt,_)=>{let{sensor:R,options:K}=_;if(G.current==null)return;const Q=D.get(G.current);if(!Q)return;const re=xt.nativeEvent,ce=new R({active:G.current,activeNode:Q,event:re,options:K,context:Se,onAbort(ue){if(!D.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(!D.get(ue))return;const{onDragPending:Dt}=q.current,nt={id:ue,constraint:we,initialCoordinates:fe,offset:me};Dt==null||Dt(nt),w({type:"onDragPending",event:nt})},onStart(ue){const we=G.current;if(we==null)return;const fe=D.get(we);if(!fe)return;const{onDragStart:me}=q.current,Pe={activatorEvent:re,active:{id:we,data:fe.data,rect:T}};Oe.unstable_batchedUpdates(()=>{me==null||me(Pe),b(ir.Initializing),I({type:mt.DragStart,initialCoordinates:ue,active:we}),w({type:"onDragStart",event:Pe}),B(ze.current),V(re)})},onMove(ue){I({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:Pe,scrollAdjustedTranslate:Dt}=Se.current;let nt=null;if(fe&&Dt){const{cancelDrop:dn}=q.current;nt={activatorEvent:re,active:fe,collisions:me,delta:Dt,over:Pe},ue===mt.DragEnd&&typeof dn=="function"&&(yield Promise.resolve(dn(nt)))&&(ue=mt.DragCancel)}G.current=null,Oe.unstable_batchedUpdates(()=>{I({type:ue}),b(ir.Uninitialized),wo(null),B(null),V(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})}})})}}},[D]),Io=x.useCallback((xt,_)=>(R,K)=>{const Q=R.nativeEvent,re=D.get(K);if(G.current!==null||!re||Q.dndKit||Q.defaultPrevented)return;const ce={active:re};xt(R,_.options,ce)===!0&&(Q.dndKit={capturedBy:_.sensor},G.current=K,pi(R,_))},[D,pi]),Ts=F$(d,Io);Y$(d),ln(()=>{ne&&C===ir.Initializing&&b(ir.Initialized)},[ne,C]),x.useEffect(()=>{const{onDragMove:xt}=q.current,{active:_,activatorEvent:R,collisions:K,over:Q}=Se.current;if(!_||!R)return;const re={active:_,activatorEvent:R,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:R,droppableContainers:K,scrollAdjustedTranslate:Q}=Se.current;if(!xt||G.current==null||!_||!Q)return;const{onDragOver:re}=q.current,ce=K.get(As),xe=ce&&ce.rect.current?{id:ce.id,rect:ce.rect.current,data:ce.data,disabled:ce.disabled}:null,ue={active:xt,activatorEvent:_,collisions:R,delta:{x:Q.x,y:Q.y},over:xe};Oe.unstable_batchedUpdates(()=>{wo(xe),re==null||re(ue),w({type:"onDragOver",event:ue})})},[As]),ln(()=>{Se.current={activatorEvent:L,active:U,activeNode:se,collisionRect:qt,collisions:or,droppableRects:N,draggableNodes:D,draggingNode:at,draggingNodeRect:kt,droppableContainers:Y,over:wn,scrollableAncestors:Te,scrollAdjustedTranslate:Mt},T.current={initial:kt,translated:qt}},[U,se,or,qt,D,at,kt,N,Y,wn,Te,Mt]),L$(X(H({},J),{delta:F,draggingRect:qt,pointerCoordinates:Ee,scrollableAncestors:Te,scrollableAncestorRects:He}));const gi=x.useMemo(()=>({active:U,activeNode:se,activeNodeRect:ne,activatorEvent:L,collisions:or,containerNodeRect:ge,dragOverlay:wt,draggableNodes:D,droppableContainers:Y,droppableRects:N,over:wn,measureDroppableContainers:j,scrollableAncestors:Te,scrollableAncestorRects:He,measuringConfiguration:M,measuringScheduled:te,windowRect:Ce}),[U,se,ne,L,or,ge,wt,D,Y,N,wn,j,Te,He,M,te,Ce]),So=x.useMemo(()=>({activatorEvent:L,activators:Ts,active:U,activeNodeRect:ne,ariaDescribedById:{draggable:ee},dispatch:I,draggableNodes:D,over:wn,measureDroppableContainers:j}),[L,Ts,U,ne,I,ee,D,wn,j]);return x.createElement(pv.Provider,{value:y},x.createElement(xo.Provider,{value:So},x.createElement(zv.Provider,{value:gi},x.createElement(ws.Provider,{value:ku},c)),x.createElement(nN,{disabled:(l==null?void 0:l.restoreFocus)===!1})),x.createElement(o$,X(H({},l),{hiddenTextDescribedById:ee})));function un(){const xt=($==null?void 0:$.autoScrollEnabled)===!1,_=typeof s=="object"?s.enabled===!1:s===!1,R=A&&!xt&&!_;return typeof s=="object"?X(H({},s),{enabled:R}):{enabled:R}}}),aN=x.createContext(null),Vv="button",sN="Draggable";function lN(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=go(sN),{activators:a,activatorEvent:l,active:s,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:h}=x.useContext(xo),{role:p=Vv,roleDescription:g="draggable",tabIndex:m=0}=i!=null?i:{},v=(s==null?void 0:s.id)===t,I=x.useContext(v?ws:aN),[w,y]=hs(),[C,b]=hs(),A=K$(a,t),E=ho(n);ln(()=>(f.set(t,{id:t,key:o,node:w,activatorNode:C,data:E}),()=>{const F=f.get(t);F&&F.key===o&&f.delete(t)}),[f,t]);const D=x.useMemo(()=>({role:p,tabIndex:m,"aria-disabled":r,"aria-pressed":v&&p===Vv?!0:void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[r,p,m,v,g,d.draggable]);return{active:s,activatorEvent:l,activeNodeRect:c,attributes:D,isDragging:v,listeners:r?void 0:A,node:w,over:h,setNodeRef:y,setActivatorNodeRef:b,transform:I}}function Uv(){return x.useContext(zv)}const cN="Droppable",uN={timeout:25};function dN(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=go(cN),{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:g,updateMeasurementsFor:m,timeout:v}=H(H({},uN),i),I=ho(m!=null?m:r),w=x.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(I.current)?I.current:[I.current]),p.current=null},v)},[v]),y=Cs({callback:w,disabled:g||!a}),C=x.useCallback((D,F)=>{y&&(F&&(y.unobserve(F),f.current=!1),D&&y.observe(D))},[y]),[b,A]=hs(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:A}}function fN(e){let{animation:t,children:n}=e;const[r,i]=x.useState(null),[o,a]=x.useState(null),l=ps(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 hN={x:0,y:0,scaleX:1,scaleY:1};function pN(e){let{children:t}=e;return x.createElement(xo.Provider,{value:Fv},x.createElement(ws.Provider,{value:hN},t))}const gN={position:"fixed",touchAction:"none"},mN=e=>gs(e)?"transform 250ms ease":void 0,vN=x.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:l,style:s,transform:c,transition:d=mN}=e;if(!l)return null;const f=i?c:X(H({},c),{scaleX:1,scaleY:1}),h=H(X(H({},gN),{width:l.width,height:l.height,top:l.top,left:l.left,transform:rr.Transform.toString(f),transformOrigin:i&&r?l$(r,l):void 0,transition:typeof d=="function"?d(r):d}),s);return x.createElement(n,{className:a,style:h,ref:t},o)}),Hv=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)}},bN={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:Hv({styles:{active:{opacity:"0"}}})};function yN(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return fs((o,a)=>{if(t===null)return;const l=n.get(o);if(!l)return;const s=l.node.current;if(!s)return;const c=Nv(a);if(!c)return;const{transform:d}=Rt(a).getComputedStyle(a),f=yv(d);if(!f)return;const h=typeof t=="function"?t:CN(t);return Ev(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 CN(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}=H(H({},bN),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=H({x:s.x-d.x,y:s.y-d.y},f),p=i(X(H({},c),{active:a,dragOverlay:l,transform:{initial:s,final:h}})),[g]=p,m=p[p.length-1];if(JSON.stringify(g)===JSON.stringify(m))return;const v=r==null?void 0:r(H({active:a,dragOverlay:l},c)),I=l.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise(y=>{I.onfinish=()=>{v==null||v(),y()}})}}let Wv=0;function xN(e){return x.useMemo(()=>{if(e!=null)return Wv++,Wv},[e])}const wN=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:g,droppableContainers:m,dragOverlay:v,over:I,measuringConfiguration:w,scrollableAncestors:y,scrollableAncestorRects:C,windowRect:b}=Uv(),A=x.useContext(ws),E=xN(f==null?void 0:f.id),D=jv(a,{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggingNodeRect:v.rect,over:I,overlayNodeRect:v.rect,scrollableAncestors:y,scrollableAncestorRects:C,transform:A,windowRect:b}),F=Tu(h),Y=yN({config:r,draggableNodes:g,droppableContainers:m,measuringConfiguration:w}),W=F?v.setRef:void 0;return x.createElement(pN,null,x.createElement(fN,{animation:Y},f&&E?x.createElement(vN,{key:E,id:f.id,ref:W,as:l,activatorEvent:d,adjustScale:t,className:s,transition:o,rect:F,style:H({zIndex:c},i),transform:D},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 IN(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Is(e){return e!==null&&e>=0}function SN(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 AN(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Gv=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}},Yv="Sortable",Kv=x.createContext({activeIndex:-1,containerId:Yv,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Gv,disabled:{draggable:!1,droppable:!1}});function TN(e){let{children:t,id:n,items:r,strategy:i=Gv,disabled:o=!1}=e;const{active:a,dragOverlay:l,droppableRects:s,over:c,measureDroppableContainers:d}=Uv(),f=go(Yv,n),h=l.rect!==null,p=x.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),g=a!=null,m=a?p.indexOf(a.id):-1,v=c?p.indexOf(c.id):-1,I=x.useRef(p),w=!SN(p,I.current),y=v!==-1&&m===-1||w,C=AN(o);ln(()=>{w&&g&&d(p)},[w,p,g,d]),x.useEffect(()=>{I.current=p},[p]);const b=x.useMemo(()=>({activeIndex:m,containerId:f,disabled:C,disableTransforms:y,items:p,overIndex:v,useDragOverlay:h,sortedRects:IN(p,s),strategy:i}),[m,f,C.draggable,C.droppable,y,p,v,s,h,i]);return x.createElement(Kv.Provider,{value:b},t)}const EN=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Eu(n,r,i).indexOf(t)},_N=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},kN={duration:200,easing:"ease"},qv="transform",DN=rr.Transition.toString({property:qv,duration:0,easing:"linear"}),PN={roleDescription:"sortable"};function ON(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 RN(e){let{animateLayoutChanges:t=_N,attributes:n,disabled:r,data:i,getNewIndex:o=EN,id:a,strategy:l,resizeObserverConfig:s,transition:c=kN}=e;const{items:d,containerId:f,activeIndex:h,disabled:p,disableTransforms:g,sortedRects:m,overIndex:v,useDragOverlay:I,strategy:w}=x.useContext(Kv),y=MN(r,p),C=d.indexOf(a),b=x.useMemo(()=>H({sortable:{containerId:f,index:C,items:d}},i),[f,i,C,d]),A=x.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:E,node:D,isOver:F,setNodeRef:Y}=dN({id:a,data:b,disabled:y.droppable,resizeObserverConfig:H({updateMeasurementsFor:A},s)}),{active:W,activatorEvent:T,activeNodeRect:U,attributes:G,setNodeRef:$,listeners:B,isDragging:L,over:V,setActivatorNodeRef:q,transform:ee}=lN({id:a,data:b,attributes:H(H({},PN),n),disabled:y.draggable}),O=GB(Y,$),M=!!W,N=M&&!g&&Is(h)&&Is(v),j=!I&&L,te=j&&N?ee:null,se=l!=null?l:w,oe=N?te!=null?te:se({rects:m,activeNodeRect:U,activeIndex:h,overIndex:v,index:C}):null,J=Is(h)&&Is(v)?o({id:a,items:d,activeIndex:h,overIndex:v}):C,le=W==null?void 0:W.id,ne=x.useRef({activeId:le,items:d,newIndex:J,containerId:f}),ge=d!==ne.current.items,Se=t({active:W,containerId:f,isDragging:L,isSorting:M,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=ON({disabled:!Se,index:C,node:D,rect:E});return x.useEffect(()=>{M&&ne.current.newIndex!==J&&(ne.current.newIndex=J),f!==ne.current.containerId&&(ne.current.containerId=f),d!==ne.current.items&&(ne.current.items=d)},[M,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:W,activeIndex:h,attributes:G,data:b,rect:E,index:C,newIndex:J,items:d,isOver:F,isSorting:M,isDragging:L,listeners:B,node:D,overIndex:v,over:V,setNodeRef:O,setActivatorNodeRef:q,setDroppableNodeRef:Y,setDraggableNodeRef:$,transform:Ue!=null?Ue:oe,transition:wt()};function wt(){if(Ue||ge&&ne.current.newIndex===C)return DN;if(!(j&&!gs(T)||!c)&&(M||Se))return rr.Transition.toString(X(H({},c),{property:qv}))}}function MN(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 Ss(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 LN=[_e.Down,_e.Right,_e.Up,_e.Left],BN=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:l}}=t;if(LN.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=d$({active:n,collisionRect:r,droppableRects:i,droppableContainers:s,pointerCoordinates:null});let d=vv(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,g=h==null?void 0:h.node.current;if(g&&p&&f&&h){const v=bs(g).some((A,E)=>l[E]!==A),I=Qv(f,h),w=$N(f,h),y=v||!I?{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 Qv(e,t){return!Ss(e)||!Ss(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function $N(e,t){return!Ss(e)||!Ss(t)||!Qv(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const NN=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"),Jv=x.createContext({attributes:{},listeners:void 0,ref(){}}),FN=()=>{const{attributes:e,listeners:t,ref:n}=x.useContext(Jv);return u.jsx(S.Button,X(H(H({sx:{backgroundColor:"transparent",color:"#919eab",width:"10px",":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}},e),t),{ref:n,children:u.jsx(NN,{})}))},Xv=({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}=RN({id:t}),p=x.useMemo(()=>({attributes:a,listeners:s,ref:d}),[a,s,d]),g={opacity:l?.6:void 0,transform:rr.Translate.toString(f),transition:h};return u.jsx(Jv.Provider,{value:p,children:u.jsx(S.ListItem,{variant:o,ref:c,style:g,startAction:i?u.jsx(FN,{}):u.jsx(u.Fragment,{}),endAction:i?u.jsx(S.Tooltip,{title:n,children:u.jsx(S.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})})},zN={sideEffects:Hv({styles:{active:{opacity:"0.6"}}})},jN=({children:e})=>u.jsx(wN,{dropAnimation:zN,children:e}),VN=({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=a$(gv(wu),gv(Cu,{coordinateGetter:BN}));return u.jsxs(oN,{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(TN,{items:e,children:u.jsx(S.List,{sx:{gap:"10px"},children:e.map(s=>u.jsxs(Xv,{id:s.id,variant:"outlined",removeItem:()=>r(s.id),tooltipTitle:t.removeEntity,children:[u.jsx(S.Typography,{ml:2,children:s.title||s.name}),s.type&&u.jsx(S.Chip,{color:X2(s.type),sx:{marginLeft:2},children:Z2(s.type)})]},`sortable-item-${s.id}`))})}),u.jsx(jN,{children:a?u.jsx(u.Fragment,{children:e.map(s=>u.jsx(Xv,{id:s.id,useDraggable:!1,removeItem:()=>{},tooltipTitle:t.removeEntity},`sortable-overlay-item-${s.id}`))}):u.jsx(u.Fragment,{})})]})},UN=e=>u.jsxs(S.FormControl,{size:"sm",children:[u.jsx(S.FormLabel,{children:e.labels.itemsPerPage}),u.jsx(S.Select,{value:e.value,size:"sm",onChange:e.onChange,sx:{minHeight:"37px"},children:e.options.map((t,n)=>u.jsx(S.Option,{value:t,children:t},`items-per-page-${t}-${n}`))})]}),HN=(e,t)=>{const[n,r]=x.useState(null),{sdk:i}=ht(),o=()=>k(this,null,function*(){let a=[];if(!e){r(a);return}try{switch(e){case"top_x":a=(yield i.topX.getGames({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e}));break;case"match_quiz":a=(yield i.matchQuiz.getGames({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e}));break;case"template":a=(yield i.loyalty.getTemplates()).data.map(g=>({id:g.id,name:g.name,status:g.status,type:e}));break;case"classic_quiz":a=(yield i.miniGames.getClassicQuizzes({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e}));break;case"either_or":a=(yield i.miniGames.getEitherOrs({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e}));break;case"poll":a=(yield i.voting.getPolls({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e}));break;case"bracket":a=(yield i.bracketGame.getGames({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e}));break;case"standing":break}}catch(l){console.error(l),r(a),t();return}r(a)});return x.useEffect(()=>(o(),()=>r(null)),[e]),{relatedEntityOptions:n,setRelatedEntityOptions:r}},WN=({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(S.Chip,{color:t,variant:"solid",size:"sm",children:e})},GN=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"),YN=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"),KN=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"),qN=Ve(u.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),QN=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"),JN=e=>{switch(e.entityType){case"top_x":return u.jsx(S.Tooltip,{title:"Top X",children:u.jsx(GN,{})});case"match_quiz":return u.jsx(S.Tooltip,{title:"Match Quiz",children:u.jsx(YN,{})});case"template":return u.jsx(S.Tooltip,{title:"Leaderboard Templates",children:u.jsx(Le.EmojiEvents,{})});case"classic_quiz":return u.jsx(S.Tooltip,{title:"Classic Quiz",children:u.jsx(KN,{})});case"either_or":return u.jsx(S.Tooltip,{title:"Either/Or",children:u.jsx(qN,{})});case"poll":return u.jsx(S.Tooltip,{title:"Poll",children:u.jsx(QN,{})});case"bracket":return u.jsx(S.Tooltip,{title:"Custom Bracket Game",children:u.jsx(Le.EmojiEvents,{})});case"standing":return u.jsx(S.Tooltip,{title:"Custom Standings Game",children:u.jsx(Le.EmojiEvents,{})});default:return null}},XN=({entity:e,relationshipLabel:t,deleteLabel:n,onDelete:r})=>u.jsxs(u.Fragment,{children:[u.jsx(S.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:u.jsx(S.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:t})}),u.jsx(S.Card,{sx:{p:2,mb:2},children:u.jsx(S.CardContent,{children:u.jsxs(S.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"space-between"},children:[u.jsx(S.Typography,{fontSize:"sm",startDecorator:u.jsx(JN,{entityType:e.type}),children:e.name}),u.jsx(S.Box,{display:{xs:"none",md:"block"},children:u.jsx(WN,{status:e.status})}),u.jsx(S.Box,{children:u.jsx(S.Tooltip,{title:n,children:u.jsx(S.IconButton,{onClick:()=>r(e.id),color:"danger",size:"sm",children:u.jsx(Le.Delete,{})})})})]})})})]}),ZN=(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])}else a.set(l.entity_type,[l.entity_id])});try{for(const[l,s]of a)switch(l){case"top_x":const c=yield e.topX.getGames({limit:s.length,gameIds:s},!0);o=[...o,...c.data.map(v=>({id:v.id,name:v.title,status:v.status,type:l}))];break;case"match_quiz":const d=yield e.matchQuiz.getGames({limit:s.length,gameIds:s},!0);o=[...o,...d.data.map(v=>({id:v.id,name:v.title,status:v.status,type:l}))];break;case"template":const f=yield e.loyalty.getTemplates(void 0,!0);o=[...o,...f.data.filter(v=>s.includes(v.id)).map(v=>({id:v.id,name:v.name,status:v.status,type:l}))];break;case"classic_quiz":const h=yield e.miniGames.getClassicQuizzes({limit:s.length,classicQuizIds:s},!1,!0);o=[...o,...h.data.map(v=>({id:v.id,name:v.title,status:v.status,type:l}))];break;case"either_or":const p=yield e.miniGames.getEitherOrs({limit:s.length,eitherOrIds:s},!1,!0);o=[...o,...p.data.map(v=>({id:v.id,name:v.title,status:v.status,type:l}))];break;case"poll":const g=yield e.voting.getPolls({limit:s.length,pollIds:s},!0);o=[...o,...g.data.map(v=>({id:v.id,name:v.title,status:v.status,type:l}))];break;case"bracket":const m=yield e.bracketGame.getGames({limit:50},!0);o=[...o,...m.data.filter(v=>s.includes(v.id)).map(v=>({id:v.id,name:v.title,status:v.status,type:l}))];break;case"standing":break;default:}}catch(l){console.error("Error loading related entities",l),n(o),r()}n(o)}),eF=["top_x","match_quiz","template","classic_quiz","poll","either_or","bracket","standing"],tF=["relatedTo","blocks","blockedBy","bonusPointsGame","nextInSeries","previousInSeries"],nF=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"),Zv=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"),rF={Login:BR,InformationInput:eo,RichText:ic,HeaderButtons:dD,MarketSelection:JR,Accordion:X1,DynamicFields:_D,BasicSelect:eT,BooleanSwitch:CL,Branding:uD,ProfileSearchSelect:bL,RangeCalendar:TD,CompetitionSearchSelect:mL,Related:tM,Images:fR,Duration:AD,DatePickerComponent:to,Flags:lR,Spinner:cs,Tags:_m,Toast:pt,AdContent:Z1,Match:XR,Winners:sB,CompetitionsSearchSelect:vL,TeamsSearchSelect:yL,CustomSelect:vM,Schedule:uM,NoPermissionCard:ED,CustomFlatpickrCalendar:Vc,ContextSelectFilter:cB,NumberInput:LB,EntityContext:VB,MiniGamesImages:HB,AuthRequirement:WB,SortableList:VN,ItemsPerPageFilter:UN,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),{relatedEntityOptions:g,setRelatedEntityOptions:m}=HN(l,p),v=g?g.filter(C=>e.some(b=>b.entity_id!==C.id)):null,{sdk:I}=ht();x.useEffect(()=>(e.length>0&&ZN(I,e,i,p),()=>{i([]),a(""),s(null),d("relatedTo")}),[]);const w=()=>{const C=[...e,{entity_id:o,entity_type:l,entity_relationship:c}],b=(g==null?void 0:g.filter(D=>D.id===o).map(D=>({id:D.id,name:D.name,type:l,status:D.status})))||[],E=Array.from(g||[]).filter(D=>D.id!==o);i([...r,...b]),m(E),t(C),a("")},y=C=>{const b=e.filter(E=>E.entity_id!==C),A=r.filter(E=>E.id!==C);i(A),t(b)};return u.jsxs(u.Fragment,{children:[r.map(C=>{var b;return u.jsx(XN,{entity:C,relationshipLabel:Zv.get((b=e.find(A=>A.entity_id===C.id))==null?void 0:b.entity_relationship)||"Unknown relationship",deleteLabel:n.delete,onDelete:y},`related-entity-relationship-${C.id}`)}),u.jsxs(S.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},width:"100%",mt:r&&r.length?2:0},children:[u.jsxs(S.FormControl,{sx:{width:"100%",mb:1,mr:{xs:0,md:1}},children:[u.jsx(S.FormLabel,{required:!0,color:"primary",children:n.type}),u.jsx(S.Select,{value:l,size:"sm",name:"entity_type",onChange:(C,b)=>s(b),sx:{minHeight:"37px"},children:eF.map(C=>u.jsx(S.Option,{value:C,children:nF.get(C)},`entity-type-option-${C}`))})]}),u.jsxs(S.FormControl,{sx:{width:"100%",mb:{xs:1,md:0}},children:[u.jsx(S.FormLabel,{required:!0,color:"primary",children:n.relationship}),u.jsx(S.Select,{value:c,size:"sm",name:"entity_relationship",onChange:(C,b)=>d(b),sx:{minHeight:"37px"},children:tF.map(C=>u.jsx(S.Option,{value:C,children:Zv.get(C)},`entity-relationship-option-${C}`))})]})]}),u.jsxs(S.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(S.FormLabel,{required:!0,color:"primary",children:n.entity}),u.jsxs(S.Box,{display:"flex",alignItems:"center",flexDirection:{xs:"column",md:"row"},children:[u.jsx(S.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:!v&&u.jsx(S.CircularProgress,{size:"sm"}),children:v&&v.map(C=>u.jsx(S.Option,{value:C.id,children:C.name},`entity--${C.id}`))}),u.jsx(S.Tooltip,{title:n.add,children:u.jsx(S.IconButton,{disabled:!o||!l,onClick:w,children:u.jsx(Le.Add,{})})})]})]}),u.jsx(pt,{showToast:f,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:p})]})}},eb=x.createContext(null),iF=({children:e})=>u.jsx(eb.Provider,{value:rF,children:e}),oF=()=>{const e=x.useContext(eb);if(!e)throw new Error("useComponentContext must be used within a ComponentProvider");return e},tb=425,nb=1024;return{APIProvider:dI,AuthProvider:fI,AuthContext:Bf,ComponentProvider:iF,useComponentContext:oF,useAPIContext:ht,useIsMobile:()=>{const[e,t]=x.useState(window.innerWidth<=nb),[n,r]=x.useState(window.innerWidth<=tb);return x.useLayoutEffect(()=>{const i=()=>{t(window.innerWidth<=nb),r(window.innerWidth<=tb)};return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),{isMobile:e,isPhone:n}}}});
|