diff --git a/.github/workflows/azure-static-web-apps-green-sand-04b157b0f.yml b/.github/workflows/azure-static-web-apps-green-sand-04b157b0f.yml new file mode 100644 index 00000000..09ba7a8a --- /dev/null +++ b/.github/workflows/azure-static-web-apps-green-sand-04b157b0f.yml @@ -0,0 +1,46 @@ +name: Azure Static Web Apps CI/CD + +on: + push: + branches: + - dev + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - dev + +jobs: + build_and_deploy_job: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') + runs-on: ubuntu-latest + name: Build and Deploy Job + steps: + - uses: actions/checkout@v3 + with: + submodules: true + lfs: false + - name: Build And Deploy + id: builddeploy + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_GREEN_SAND_04B157B0F }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + action: "upload" + ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### + # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig + app_location: "./client" # App source code path + api_location: "" # Api source code path - optional + output_location: "dist" # Built app content directory - optional + ###### End of Repository/Build Configurations ###### + + close_pull_request_job: + if: github.event_name == 'pull_request' && github.event.action == 'closed' + runs-on: ubuntu-latest + name: Close Pull Request Job + steps: + - name: Close Pull Request + id: closepullrequest + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_GREEN_SAND_04B157B0F }} + action: "close" diff --git a/.github/workflows/azure-static-web-apps-lemon-forest-0b12e820f.yml b/.github/workflows/azure-static-web-apps-lemon-forest-0b12e820f.yml new file mode 100644 index 00000000..76c930b3 --- /dev/null +++ b/.github/workflows/azure-static-web-apps-lemon-forest-0b12e820f.yml @@ -0,0 +1,46 @@ +name: Azure Static Web Apps CI/CD + +on: + push: + branches: + - dev + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - dev + +jobs: + build_and_deploy_job: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') + runs-on: ubuntu-latest + name: Build and Deploy Job + steps: + - uses: actions/checkout@v3 + with: + submodules: true + lfs: false + - name: Build And Deploy + id: builddeploy + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_LEMON_FOREST_0B12E820F }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + action: "upload" + ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### + # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig + app_location: "./client" # App source code path + api_location: "" # Api source code path - optional + output_location: "dist" # Built app content directory - optional + ###### End of Repository/Build Configurations ###### + + close_pull_request_job: + if: github.event_name == 'pull_request' && github.event.action == 'closed' + runs-on: ubuntu-latest + name: Close Pull Request Job + steps: + - name: Close Pull Request + id: closepullrequest + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_LEMON_FOREST_0B12E820F }} + action: "close" diff --git a/.github/workflows/azure-static-web-apps-polite-ground-0eff54d0f.yml b/.github/workflows/azure-static-web-apps-polite-ground-0eff54d0f.yml new file mode 100644 index 00000000..dd028c2b --- /dev/null +++ b/.github/workflows/azure-static-web-apps-polite-ground-0eff54d0f.yml @@ -0,0 +1,46 @@ +name: Azure Static Web Apps CI/CD + +on: + push: + branches: + - dev + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - dev + +jobs: + build_and_deploy_job: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') + runs-on: ubuntu-latest + name: Build and Deploy Job + steps: + - uses: actions/checkout@v3 + with: + submodules: true + lfs: false + - name: Build And Deploy + id: builddeploy + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_GROUND_0EFF54D0F }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + action: "upload" + ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### + # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig + app_location: "./client" # App source code path + api_location: "" # Api source code path - optional + output_location: "dist" # Built app content directory - optional + ###### End of Repository/Build Configurations ###### + + close_pull_request_job: + if: github.event_name == 'pull_request' && github.event.action == 'closed' + runs-on: ubuntu-latest + name: Close Pull Request Job + steps: + - name: Close Pull Request + id: closepullrequest + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_GROUND_0EFF54D0F }} + action: "close" diff --git a/.github/workflows/dev_earlent.yml b/.github/workflows/dev_earlent.yml new file mode 100644 index 00000000..6b814883 --- /dev/null +++ b/.github/workflows/dev_earlent.yml @@ -0,0 +1,71 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build and deploy Node.js app to Azure Web App - earlent + +on: + push: + branches: + - dev + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js version + uses: actions/setup-node@v3 + with: + node-version: '20.x' + + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm run test --if-present + + - name: Zip artifact for deployment + run: zip release.zip ./* -r + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v3 + with: + name: node-app + path: release.zip + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + permissions: + id-token: write #This is required for requesting the JWT + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v3 + with: + name: node-app + + - name: Unzip artifact for deployment + run: unzip release.zip + + - name: Login to Azure + uses: azure/login@v1 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_9BD5731DC96F49B3947E8FB29084365D }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_175C998FDC464558BB2568F7D06919CF }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_CB50195BF2D54DD6890F18EA62640C1B }} + + - name: 'Deploy to Azure Web App' + id: deploy-to-webapp + uses: azure/webapps-deploy@v2 + with: + app-name: 'earlent' + slot-name: 'Production' + package: . + \ No newline at end of file diff --git a/.github/workflows/earlent-AutoDeployTrigger-63bcd090-148d-46b7-b34b-2cb4b1971f2a.yml b/.github/workflows/earlent-AutoDeployTrigger-63bcd090-148d-46b7-b34b-2cb4b1971f2a.yml new file mode 100644 index 00000000..5a8d32c3 --- /dev/null +++ b/.github/workflows/earlent-AutoDeployTrigger-63bcd090-148d-46b7-b34b-2cb4b1971f2a.yml @@ -0,0 +1,47 @@ +name: Trigger auto deployment for earlent + +# When this action will be executed +on: + # Automatically trigger it when detected changes in repo + push: + branches: + [ dev ] + paths: + - '**' + - '.github/workflows/earlent-AutoDeployTrigger-63bcd090-148d-46b7-b34b-2cb4b1971f2a.yml' + + # Allow manual trigger + workflow_dispatch: + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + permissions: + id-token: write #This is required for requesting the OIDC JWT Token + contents: read #Required when GH token is used to authenticate with private repo + + steps: + - name: Checkout to the branch + uses: actions/checkout@v2 + + - name: Azure Login + uses: azure/login@v1 + with: + client-id: ${{ secrets.EARLENT_AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.EARLENT_AZURE_TENANT_ID }} + subscription-id: ${{ secrets.EARLENT_AZURE_SUBSCRIPTION_ID }} + + - name: Build and push container image to registry + uses: azure/container-apps-deploy-action@v2 + with: + appSourcePath: ${{ github.workspace }} + registryUrl: earlent.azurecr.io + registryUsername: ${{ secrets.EARLENT_REGISTRY_USERNAME }} + registryPassword: ${{ secrets.EARLENT_REGISTRY_PASSWORD }} + containerAppName: earlent + resourceGroup: mental_health_companion + imageToBuild: earlent.azurecr.io/earlent:${{ github.sha }} + _buildArgumentsKey_: | + _buildArgumentsValues_ + + diff --git a/client/.env.production b/client/.env.production new file mode 100644 index 00000000..78a72c85 --- /dev/null +++ b/client/.env.production @@ -0,0 +1 @@ +VITE_API_URL=https://earlent.thankfulpebble-55902899.westus2.azurecontainerapps.io/api \ No newline at end of file diff --git a/client/.gitignore b/client/.gitignore index 1cac5597..bb91fe4d 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -8,7 +8,7 @@ pnpm-debug.log* lerna-debug.log* node_modules -dist + dist-ssr *.local diff --git a/client/dist/assets/Aria-BMTE8U_Y.jpg b/client/dist/assets/Aria-BMTE8U_Y.jpg new file mode 100644 index 00000000..3ecf98e5 Binary files /dev/null and b/client/dist/assets/Aria-BMTE8U_Y.jpg differ diff --git a/client/dist/assets/index-B_Zi3VXB.css b/client/dist/assets/index-B_Zi3VXB.css new file mode 100644 index 00000000..4d4dd955 --- /dev/null +++ b/client/dist/assets/index-B_Zi3VXB.css @@ -0,0 +1 @@ +.mood-logging-container{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;font-family:Arial,sans-serif}.mood-logging{width:90%;max-width:500px;background-color:#fff;padding:25px;border-radius:10px;box-shadow:0 10px 25px #0000001a;transition:box-shadow .3s ease-in-out}.mood-logging:hover{box-shadow:0 20px 45px #00000026}.input-group{display:flex;flex-direction:column}input[type=text]{padding:12px 20px;margin:10px 0;border:2px solid #ccc;border-radius:5px;box-sizing:border-box;font-size:16px;transition:border-color .3s ease-in-out}input[type=text]:focus{border-color:#007bff;outline:none}.submit-button{display:flex;align-items:center;justify-content:center;width:100%;background-color:#007bff;color:#fff;padding:12px 20px;border:none;border-radius:5px;cursor:pointer;font-size:18px;margin-top:20px;transition:background-color .3s ease-in-out}.submit-button:hover{background-color:#0056b3}.message{text-align:center;margin-top:15px;padding:10px;font-size:16px;color:#2c3e50;border-radius:5px;background-color:#e0e0e0}.mood-logs{max-width:600px;margin:50px auto;padding:20px;box-shadow:0 4px 8px #0000001a;border-radius:8px;background-color:#fff}h2{display:flex;align-items:center;font-size:24px}.icon-large{font-size:40px;margin-right:7px}.mood-logs h2{text-align:center;color:#333}ul{list-style-type:none;padding:0}li{padding:10px;border-bottom:1px solid #ccc}li:last-child{border-bottom:none}.error{color:red;text-align:center} diff --git a/client/dist/assets/index-q7Zr2PlQ.js b/client/dist/assets/index-q7Zr2PlQ.js new file mode 100644 index 00000000..374c9ec2 --- /dev/null +++ b/client/dist/assets/index-q7Zr2PlQ.js @@ -0,0 +1,489 @@ +function Y2(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var ot=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Np(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lr(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 o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var _y={exports:{}},Nc={},Ly={exports:{}},_e={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ks=Symbol.for("react.element"),X2=Symbol.for("react.portal"),Q2=Symbol.for("react.fragment"),J2=Symbol.for("react.strict_mode"),Z2=Symbol.for("react.profiler"),eS=Symbol.for("react.provider"),tS=Symbol.for("react.context"),nS=Symbol.for("react.forward_ref"),rS=Symbol.for("react.suspense"),oS=Symbol.for("react.memo"),iS=Symbol.for("react.lazy"),Eg=Symbol.iterator;function aS(e){return e===null||typeof e!="object"?null:(e=Eg&&e[Eg]||e["@@iterator"],typeof e=="function"?e:null)}var Ay={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ny=Object.assign,Dy={};function Vi(e,t,n){this.props=e,this.context=t,this.refs=Dy,this.updater=n||Ay}Vi.prototype.isReactComponent={};Vi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Vi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zy(){}zy.prototype=Vi.prototype;function Dp(e,t,n){this.props=e,this.context=t,this.refs=Dy,this.updater=n||Ay}var zp=Dp.prototype=new zy;zp.constructor=Dp;Ny(zp,Vi.prototype);zp.isPureReactComponent=!0;var Tg=Array.isArray,By=Object.prototype.hasOwnProperty,Bp={current:null},Fy={key:!0,ref:!0,__self:!0,__source:!0};function Uy(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)By.call(t,r)&&!Fy.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1>>1,T=I[v];if(0>>1;vo(N,$))Ho(j,N)?(I[v]=j,I[H]=$,v=H):(I[v]=N,I[_]=$,v=_);else if(Ho(j,$))I[v]=j,I[H]=$,v=H;else break e}}return B}function o(I,B){var $=I.sortIndex-B.sortIndex;return $!==0?$:I.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],d=1,f=null,m=3,w=!1,y=!1,x=!1,k=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(I){for(var B=n(c);B!==null;){if(B.callback===null)r(c);else if(B.startTime<=I)r(c),B.sortIndex=B.expirationTime,t(l,B);else break;B=n(c)}}function C(I){if(x=!1,b(I),!y)if(n(l)!==null)y=!0,J(R);else{var B=n(c);B!==null&&re(C,B.startTime-I)}}function R(I,B){y=!1,x&&(x=!1,g(M),M=-1),w=!0;var $=m;try{for(b(B),f=n(l);f!==null&&(!(f.expirationTime>B)||I&&!F());){var v=f.callback;if(typeof v=="function"){f.callback=null,m=f.priorityLevel;var T=v(f.expirationTime<=B);B=e.unstable_now(),typeof T=="function"?f.callback=T:f===n(l)&&r(l),b(B)}else r(l);f=n(l)}if(f!==null)var L=!0;else{var _=n(c);_!==null&&re(C,_.startTime-B),L=!1}return L}finally{f=null,m=$,w=!1}}var E=!1,P=null,M=-1,D=5,O=-1;function F(){return!(e.unstable_now()-OI||125v?(I.sortIndex=$,t(c,I),n(l)===null&&I===n(c)&&(x?(g(M),M=-1):x=!0,re(C,$-v))):(I.sortIndex=T,t(l,I),y||w||(y=!0,J(R))),I},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(I){var B=m;return function(){var $=m;m=B;try{return I.apply(this,arguments)}finally{m=$}}}})(Gy);qy.exports=Gy;var vS=qy.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var yS=p,wn=vS;function ce(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),df=Object.prototype.hasOwnProperty,xS=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,jg={},Mg={};function bS(e){return df.call(Mg,e)?!0:df.call(jg,e)?!1:xS.test(e)?Mg[e]=!0:(jg[e]=!0,!1)}function wS(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function SS(e,t,n,r){if(t===null||typeof t>"u"||wS(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Zt(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var Nt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Nt[e]=new Zt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Nt[t]=new Zt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Nt[e]=new Zt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Nt[e]=new Zt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Nt[e]=new Zt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Nt[e]=new Zt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Nt[e]=new Zt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Nt[e]=new Zt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Nt[e]=new Zt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Up=/[\-:]([a-z])/g;function Wp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Up,Wp);Nt[t]=new Zt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Up,Wp);Nt[t]=new Zt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Up,Wp);Nt[t]=new Zt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Nt[e]=new Zt(e,1,!1,e.toLowerCase(),null,!1,!1)});Nt.xlinkHref=new Zt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Nt[e]=new Zt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Vp(e,t,n,r){var o=Nt.hasOwnProperty(t)?Nt[t]:null;(o!==null?o.type!==0:r||!(2s||o[a]!==i[s]){var l=` +`+o[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{pd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Pa(e):""}function CS(e){switch(e.tag){case 5:return Pa(e.type);case 16:return Pa("Lazy");case 13:return Pa("Suspense");case 19:return Pa("SuspenseList");case 0:case 2:case 15:return e=hd(e.type,!1),e;case 11:return e=hd(e.type.render,!1),e;case 1:return e=hd(e.type,!0),e;default:return""}}function mf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ai:return"Fragment";case ii:return"Portal";case ff:return"Profiler";case Hp:return"StrictMode";case pf:return"Suspense";case hf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Xy:return(e.displayName||"Context")+".Consumer";case Yy:return(e._context.displayName||"Context")+".Provider";case qp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gp:return t=e.displayName||null,t!==null?t:mf(e.type)||"Memo";case Hr:t=e._payload,e=e._init;try{return mf(e(t))}catch{}}return null}function kS(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return mf(t);case 8:return t===Hp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function lo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Jy(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function RS(e){var t=Jy(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xs(e){e._valueTracker||(e._valueTracker=RS(e))}function Zy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Jy(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Kl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function gf(e,t){var n=t.checked;return pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ig(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=lo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function e1(e,t){t=t.checked,t!=null&&Vp(e,"checked",t,!1)}function vf(e,t){e1(e,t);var n=lo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?yf(e,t.type,n):t.hasOwnProperty("defaultValue")&&yf(e,t.type,lo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _g(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function yf(e,t,n){(t!=="number"||Kl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ea=Array.isArray;function yi(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Qs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ka(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Oa={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},PS=["Webkit","ms","Moz","O"];Object.keys(Oa).forEach(function(e){PS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Oa[t]=Oa[e]})});function o1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Oa.hasOwnProperty(e)&&Oa[e]?(""+t).trim():t+"px"}function i1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=o1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var ES=pt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wf(e,t){if(t){if(ES[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ce(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ce(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ce(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ce(62))}}function Sf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Cf=null;function Kp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kf=null,xi=null,bi=null;function Ng(e){if(e=Es(e)){if(typeof kf!="function")throw Error(ce(280));var t=e.stateNode;t&&(t=Uc(t),kf(e.stateNode,e.type,t))}}function a1(e){xi?bi?bi.push(e):bi=[e]:xi=e}function s1(){if(xi){var e=xi,t=bi;if(bi=xi=null,Ng(e),t)for(e=0;e>>=0,e===0?32:31-(DS(e)/zS|0)|0}var Js=64,Zs=4194304;function Ta(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Jl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~o;s!==0?r=Ta(s):(i&=a,i!==0&&(r=Ta(i)))}else a=n&~o,a!==0?r=Ta(a):i!==0&&(r=Ta(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Rs(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-er(t),e[t]=n}function WS(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=_a),qg=" ",Gg=!1;function E1(e,t){switch(e){case"keyup":return vC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function T1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var si=!1;function xC(e,t){switch(e){case"compositionend":return T1(t);case"keypress":return t.which!==32?null:(Gg=!0,qg);case"textInput":return e=t.data,e===qg&&Gg?null:e;default:return null}}function bC(e,t){if(si)return e==="compositionend"||!nh&&E1(e,t)?(e=R1(),Tl=Zp=Yr=null,si=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Qg(n)}}function O1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?O1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function I1(){for(var e=window,t=Kl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Kl(e.document)}return t}function rh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $C(e){var t=I1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&O1(n.ownerDocument.documentElement,n)){if(r!==null&&rh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Jg(n,i);var a=Jg(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,li=null,jf=null,Aa=null,Mf=!1;function Zg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mf||li==null||li!==Kl(r)||(r=li,"selectionStart"in r&&rh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Aa&&es(Aa,r)||(Aa=r,r=tc(jf,"onSelect"),0di||(e.current=Nf[di],Nf[di]=null,di--)}function Je(e,t){di++,Nf[di]=e.current,e.current=t}var co={},Wt=fo(co),on=fo(!1),_o=co;function Ti(e,t){var n=e.type.contextTypes;if(!n)return co;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function an(e){return e=e.childContextTypes,e!=null}function rc(){tt(on),tt(Wt)}function av(e,t,n){if(Wt.current!==co)throw Error(ce(168));Je(Wt,t),Je(on,n)}function U1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ce(108,kS(e)||"Unknown",o));return pt({},n,r)}function oc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||co,_o=Wt.current,Je(Wt,e),Je(on,on.current),!0}function sv(e,t,n){var r=e.stateNode;if(!r)throw Error(ce(169));n?(e=U1(e,t,_o),r.__reactInternalMemoizedMergedChildContext=e,tt(on),tt(Wt),Je(Wt,e)):tt(on),Je(on,n)}var Cr=null,Wc=!1,Td=!1;function W1(e){Cr===null?Cr=[e]:Cr.push(e)}function FC(e){Wc=!0,W1(e)}function po(){if(!Td&&Cr!==null){Td=!0;var e=0,t=Ve;try{var n=Cr;for(Ve=1;e>=a,o-=a,Rr=1<<32-er(t)+o|n<M?(D=P,P=null):D=P.sibling;var O=m(g,P,b[M],C);if(O===null){P===null&&(P=D);break}e&&P&&O.alternate===null&&t(g,P),h=i(O,h,M),E===null?R=O:E.sibling=O,E=O,P=D}if(M===b.length)return n(g,P),st&&wo(g,M),R;if(P===null){for(;MM?(D=P,P=null):D=P.sibling;var F=m(g,P,O.value,C);if(F===null){P===null&&(P=D);break}e&&P&&F.alternate===null&&t(g,P),h=i(F,h,M),E===null?R=F:E.sibling=F,E=F,P=D}if(O.done)return n(g,P),st&&wo(g,M),R;if(P===null){for(;!O.done;M++,O=b.next())O=f(g,O.value,C),O!==null&&(h=i(O,h,M),E===null?R=O:E.sibling=O,E=O);return st&&wo(g,M),R}for(P=r(g,P);!O.done;M++,O=b.next())O=w(P,g,M,O.value,C),O!==null&&(e&&O.alternate!==null&&P.delete(O.key===null?M:O.key),h=i(O,h,M),E===null?R=O:E.sibling=O,E=O);return e&&P.forEach(function(V){return t(g,V)}),st&&wo(g,M),R}function k(g,h,b,C){if(typeof b=="object"&&b!==null&&b.type===ai&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Ys:e:{for(var R=b.key,E=h;E!==null;){if(E.key===R){if(R=b.type,R===ai){if(E.tag===7){n(g,E.sibling),h=o(E,b.props.children),h.return=g,g=h;break e}}else if(E.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Hr&&uv(R)===E.type){n(g,E.sibling),h=o(E,b.props),h.ref=pa(g,E,b),h.return=g,g=h;break e}n(g,E);break}else t(g,E);E=E.sibling}b.type===ai?(h=Mo(b.props.children,g.mode,C,b.key),h.return=g,g=h):(C=Al(b.type,b.key,b.props,null,g.mode,C),C.ref=pa(g,h,b),C.return=g,g=C)}return a(g);case ii:e:{for(E=b.key;h!==null;){if(h.key===E)if(h.tag===4&&h.stateNode.containerInfo===b.containerInfo&&h.stateNode.implementation===b.implementation){n(g,h.sibling),h=o(h,b.children||[]),h.return=g,g=h;break e}else{n(g,h);break}else t(g,h);h=h.sibling}h=Ad(b,g.mode,C),h.return=g,g=h}return a(g);case Hr:return E=b._init,k(g,h,E(b._payload),C)}if(Ea(b))return y(g,h,b,C);if(la(b))return x(g,h,b,C);al(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,h!==null&&h.tag===6?(n(g,h.sibling),h=o(h,b),h.return=g,g=h):(n(g,h),h=Ld(b,g.mode,C),h.return=g,g=h),a(g)):n(g,h)}return k}var ji=G1(!0),K1=G1(!1),sc=fo(null),lc=null,hi=null,sh=null;function lh(){sh=hi=lc=null}function ch(e){var t=sc.current;tt(sc),e._currentValue=t}function Bf(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Si(e,t){lc=e,sh=hi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(rn=!0),e.firstContext=null)}function zn(e){var t=e._currentValue;if(sh!==e)if(e={context:e,memoizedValue:t,next:null},hi===null){if(lc===null)throw Error(ce(308));hi=e,lc.dependencies={lanes:0,firstContext:e}}else hi=hi.next=e;return t}var Po=null;function uh(e){Po===null?Po=[e]:Po.push(e)}function Y1(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,uh(t)):(n.next=o.next,o.next=n),t.interleaved=n,Mr(e,r)}function Mr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var qr=!1;function dh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function X1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Tr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ro(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ze&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Mr(e,n)}return o=r.interleaved,o===null?(t.next=t,uh(r)):(t.next=o.next,o.next=t),r.interleaved=t,Mr(e,n)}function jl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xp(e,n)}}function dv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function cc(e,t,n,r){var o=e.updateQueue;qr=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==a&&(s===null?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l))}if(i!==null){var f=o.baseState;a=0,d=c=l=null,s=i;do{var m=s.lane,w=s.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:w,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var y=e,x=s;switch(m=t,w=n,x.tag){case 1:if(y=x.payload,typeof y=="function"){f=y.call(w,f,m);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,m=typeof y=="function"?y.call(w,f,m):y,m==null)break e;f=pt({},f,m);break e;case 2:qr=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,m=o.effects,m===null?o.effects=[s]:m.push(s))}else w={eventTime:w,lane:m,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(c=d=w,l=f):d=d.next=w,a|=m;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;m=s,s=m.next,m.next=null,o.lastBaseUpdate=m,o.shared.pending=null}}while(!0);if(d===null&&(l=f),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);No|=a,e.lanes=a,e.memoizedState=f}}function fv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=jd.transition;jd.transition={};try{e(!1),t()}finally{Ve=n,jd.transition=r}}function px(){return Bn().memoizedState}function HC(e,t,n){var r=io(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hx(e))mx(t,n);else if(n=Y1(e,t,n,r),n!==null){var o=Xt();tr(n,e,r,o),gx(n,t,r)}}function qC(e,t,n){var r=io(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hx(e))mx(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,rr(s,a)){var l=t.interleaved;l===null?(o.next=o,uh(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Y1(e,t,o,r),n!==null&&(o=Xt(),tr(n,e,r,o),gx(n,t,r))}}function hx(e){var t=e.alternate;return e===dt||t!==null&&t===dt}function mx(e,t){Na=dc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xp(e,n)}}var fc={readContext:zn,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useInsertionEffect:zt,useLayoutEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useMutableSource:zt,useSyncExternalStore:zt,useId:zt,unstable_isNewReconciler:!1},GC={readContext:zn,useCallback:function(e,t){return lr().memoizedState=[e,t===void 0?null:t],e},useContext:zn,useEffect:hv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ol(4194308,4,lx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ol(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ol(4,2,e,t)},useMemo:function(e,t){var n=lr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=lr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=HC.bind(null,dt,e),[r.memoizedState,e]},useRef:function(e){var t=lr();return e={current:e},t.memoizedState=e},useState:pv,useDebugValue:xh,useDeferredValue:function(e){return lr().memoizedState=e},useTransition:function(){var e=pv(!1),t=e[0];return e=VC.bind(null,e[1]),lr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dt,o=lr();if(st){if(n===void 0)throw Error(ce(407));n=n()}else{if(n=t(),jt===null)throw Error(ce(349));Ao&30||ex(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,hv(nx.bind(null,r,i,e),[e]),r.flags|=2048,ls(9,tx.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=lr(),t=jt.identifierPrefix;if(st){var n=Pr,r=Rr;n=(r&~(1<<32-er(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=as++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[dr]=t,e[rs]=r,Px(e,t,!1,!1),t.stateNode=e;e:{switch(a=Sf(n,r),n){case"dialog":Ze("cancel",e),Ze("close",e),o=r;break;case"iframe":case"object":case"embed":Ze("load",e),o=r;break;case"video":case"audio":for(o=0;o<$a.length;o++)Ze($a[o],e);o=r;break;case"source":Ze("error",e),o=r;break;case"img":case"image":case"link":Ze("error",e),Ze("load",e),o=r;break;case"details":Ze("toggle",e),o=r;break;case"input":Ig(e,r),o=gf(e,r),Ze("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=pt({},r,{value:void 0}),Ze("invalid",e);break;case"textarea":Lg(e,r),o=xf(e,r),Ze("invalid",e);break;default:o=r}wf(n,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="style"?i1(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&r1(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ka(e,l):typeof l=="number"&&Ka(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ga.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ze("scroll",e):l!=null&&Vp(e,i,l,a))}switch(n){case"input":Xs(e),_g(e,r,!1);break;case"textarea":Xs(e),Ag(e);break;case"option":r.value!=null&&e.setAttribute("value",""+lo(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?yi(e,!!r.multiple,i,!1):r.defaultValue!=null&&yi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=nc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Bt(t),null;case 6:if(e&&t.stateNode!=null)Tx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ce(166));if(n=Eo(is.current),Eo(pr.current),il(t)){if(r=t.stateNode,n=t.memoizedProps,r[dr]=t,(i=r.nodeValue!==n)&&(e=xn,e!==null))switch(e.tag){case 3:ol(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ol(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[dr]=t,t.stateNode=r}return Bt(t),null;case 13:if(tt(ut),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(st&&yn!==null&&t.mode&1&&!(t.flags&128))q1(),$i(),t.flags|=98560,i=!1;else if(i=il(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(ce(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(ce(317));i[dr]=t}else $i(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bt(t),i=!1}else Jn!==null&&(np(Jn),Jn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ut.current&1?Pt===0&&(Pt=3):Ph())),t.updateQueue!==null&&(t.flags|=4),Bt(t),null);case 4:return Mi(),Kf(e,t),e===null&&ts(t.stateNode.containerInfo),Bt(t),null;case 10:return ch(t.type._context),Bt(t),null;case 17:return an(t.type)&&rc(),Bt(t),null;case 19:if(tt(ut),i=t.memoizedState,i===null)return Bt(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)ha(i,!1);else{if(Pt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=uc(e),a!==null){for(t.flags|=128,ha(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Je(ut,ut.current&1|2),t.child}e=e.sibling}i.tail!==null&&vt()>Ii&&(t.flags|=128,r=!0,ha(i,!1),t.lanes=4194304)}else{if(!r)if(e=uc(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ha(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!st)return Bt(t),null}else 2*vt()-i.renderingStartTime>Ii&&n!==1073741824&&(t.flags|=128,r=!0,ha(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=vt(),t.sibling=null,n=ut.current,Je(ut,r?n&1|2:n&1),t):(Bt(t),null);case 22:case 23:return Rh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?gn&1073741824&&(Bt(t),t.subtreeFlags&6&&(t.flags|=8192)):Bt(t),null;case 24:return null;case 25:return null}throw Error(ce(156,t.tag))}function tk(e,t){switch(ih(t),t.tag){case 1:return an(t.type)&&rc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mi(),tt(on),tt(Wt),hh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ph(t),null;case 13:if(tt(ut),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ce(340));$i()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tt(ut),null;case 4:return Mi(),null;case 10:return ch(t.type._context),null;case 22:case 23:return Rh(),null;case 24:return null;default:return null}}var ll=!1,Ut=!1,nk=typeof WeakSet=="function"?WeakSet:Set,xe=null;function mi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){gt(e,t,r)}else n.current=null}function Yf(e,t,n){try{n()}catch(r){gt(e,t,r)}}var Rv=!1;function rk(e,t){if(Of=Zl,e=I1(),rh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,d=0,f=e,m=null;t:for(;;){for(var w;f!==n||o!==0&&f.nodeType!==3||(s=a+o),f!==i||r!==0&&f.nodeType!==3||(l=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(w=f.firstChild)!==null;)m=f,f=w;for(;;){if(f===e)break t;if(m===n&&++c===o&&(s=a),m===i&&++d===r&&(l=a),(w=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=w}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(If={focusedElem:e,selectionRange:n},Zl=!1,xe=t;xe!==null;)if(t=xe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xe=e;else for(;xe!==null;){t=xe;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,k=y.memoizedState,g=t.stateNode,h=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:Xn(t.type,x),k);g.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(C){gt(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,xe=e;break}xe=t.return}return y=Rv,Rv=!1,y}function Da(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Yf(t,n,i)}o=o.next}while(o!==r)}}function qc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Xf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $x(e){var t=e.alternate;t!==null&&(e.alternate=null,$x(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[dr],delete t[rs],delete t[Af],delete t[zC],delete t[BC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jx(e){return e.tag===5||e.tag===3||e.tag===4}function Pv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jx(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=nc));else if(r!==4&&(e=e.child,e!==null))for(Qf(e,t,n),e=e.sibling;e!==null;)Qf(e,t,n),e=e.sibling}function Jf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Jf(e,t,n),e=e.sibling;e!==null;)Jf(e,t,n),e=e.sibling}var _t=null,Qn=!1;function Br(e,t,n){for(n=n.child;n!==null;)Mx(e,t,n),n=n.sibling}function Mx(e,t,n){if(fr&&typeof fr.onCommitFiberUnmount=="function")try{fr.onCommitFiberUnmount(Dc,n)}catch{}switch(n.tag){case 5:Ut||mi(n,t);case 6:var r=_t,o=Qn;_t=null,Br(e,t,n),_t=r,Qn=o,_t!==null&&(Qn?(e=_t,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):_t.removeChild(n.stateNode));break;case 18:_t!==null&&(Qn?(e=_t,n=n.stateNode,e.nodeType===8?Ed(e.parentNode,n):e.nodeType===1&&Ed(e,n),Ja(e)):Ed(_t,n.stateNode));break;case 4:r=_t,o=Qn,_t=n.stateNode.containerInfo,Qn=!0,Br(e,t,n),_t=r,Qn=o;break;case 0:case 11:case 14:case 15:if(!Ut&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&Yf(n,t,a),o=o.next}while(o!==r)}Br(e,t,n);break;case 1:if(!Ut&&(mi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){gt(n,t,s)}Br(e,t,n);break;case 21:Br(e,t,n);break;case 22:n.mode&1?(Ut=(r=Ut)||n.memoizedState!==null,Br(e,t,n),Ut=r):Br(e,t,n);break;default:Br(e,t,n)}}function Ev(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new nk),t.forEach(function(r){var o=fk.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Yn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=vt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ik(r/1960))-r,10e?16:e,Xr===null)var r=!1;else{if(e=Xr,Xr=null,mc=0,ze&6)throw Error(ce(331));var o=ze;for(ze|=4,xe=e.current;xe!==null;){var i=xe,a=i.child;if(xe.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lvt()-Ch?jo(e,0):Sh|=n),sn(e,t)}function zx(e,t){t===0&&(e.mode&1?(t=Zs,Zs<<=1,!(Zs&130023424)&&(Zs=4194304)):t=1);var n=Xt();e=Mr(e,t),e!==null&&(Rs(e,t,n),sn(e,n))}function dk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zx(e,n)}function fk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ce(314))}r!==null&&r.delete(t),zx(e,n)}var Bx;Bx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||on.current)rn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return rn=!1,ZC(e,t,n);rn=!!(e.flags&131072)}else rn=!1,st&&t.flags&1048576&&V1(t,ac,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Il(e,t),e=t.pendingProps;var o=Ti(t,Wt.current);Si(t,n),o=gh(null,t,r,e,o,n);var i=vh();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,an(r)?(i=!0,oc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,dh(t),o.updater=Hc,t.stateNode=o,o._reactInternals=t,Uf(t,r,e,n),t=Hf(null,t,r,!0,i,n)):(t.tag=0,st&&i&&oh(t),Kt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Il(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=hk(r),e=Xn(r,e),o){case 0:t=Vf(null,t,r,e,n);break e;case 1:t=Sv(null,t,r,e,n);break e;case 11:t=bv(null,t,r,e,n);break e;case 14:t=wv(null,t,r,Xn(r.type,e),n);break e}throw Error(ce(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xn(r,o),Vf(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xn(r,o),Sv(e,t,r,o,n);case 3:e:{if(Cx(t),e===null)throw Error(ce(387));r=t.pendingProps,i=t.memoizedState,o=i.element,X1(e,t),cc(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Oi(Error(ce(423)),t),t=Cv(e,t,r,n,o);break e}else if(r!==o){o=Oi(Error(ce(424)),t),t=Cv(e,t,r,n,o);break e}else for(yn=no(t.stateNode.containerInfo.firstChild),xn=t,st=!0,Jn=null,n=K1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($i(),r===o){t=Or(e,t,n);break e}Kt(e,t,r,n)}t=t.child}return t;case 5:return Q1(t),e===null&&zf(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,_f(r,o)?a=null:i!==null&&_f(r,i)&&(t.flags|=32),Sx(e,t),Kt(e,t,a,n),t.child;case 6:return e===null&&zf(t),null;case 13:return kx(e,t,n);case 4:return fh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ji(t,null,r,n):Kt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xn(r,o),bv(e,t,r,o,n);case 7:return Kt(e,t,t.pendingProps,n),t.child;case 8:return Kt(e,t,t.pendingProps.children,n),t.child;case 12:return Kt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Je(sc,r._currentValue),r._currentValue=a,i!==null)if(rr(i.value,a)){if(i.children===o.children&&!on.current){t=Or(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Tr(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Bf(i.return,n,t),s.lanes|=n;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(ce(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Bf(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Kt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Si(t,n),o=zn(o),r=r(o),t.flags|=1,Kt(e,t,r,n),t.child;case 14:return r=t.type,o=Xn(r,t.pendingProps),o=Xn(r.type,o),wv(e,t,r,o,n);case 15:return bx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xn(r,o),Il(e,t),t.tag=1,an(r)?(e=!0,oc(t)):e=!1,Si(t,n),vx(t,r,o),Uf(t,r,o,n),Hf(null,t,r,!0,e,n);case 19:return Rx(e,t,n);case 22:return wx(e,t,n)}throw Error(ce(156,t.tag))};function Fx(e,t){return h1(e,t)}function pk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function In(e,t,n,r){return new pk(e,t,n,r)}function Eh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hk(e){if(typeof e=="function")return Eh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===qp)return 11;if(e===Gp)return 14}return 2}function ao(e,t){var n=e.alternate;return n===null?(n=In(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Al(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")Eh(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ai:return Mo(n.children,o,i,t);case Hp:a=8,o|=8;break;case ff:return e=In(12,n,t,o|2),e.elementType=ff,e.lanes=i,e;case pf:return e=In(13,n,t,o),e.elementType=pf,e.lanes=i,e;case hf:return e=In(19,n,t,o),e.elementType=hf,e.lanes=i,e;case Qy:return Kc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yy:a=10;break e;case Xy:a=9;break e;case qp:a=11;break e;case Gp:a=14;break e;case Hr:a=16,r=null;break e}throw Error(ce(130,e==null?e:typeof e,""))}return t=In(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Mo(e,t,n,r){return e=In(7,e,r,t),e.lanes=n,e}function Kc(e,t,n,r){return e=In(22,e,r,t),e.elementType=Qy,e.lanes=n,e.stateNode={isHidden:!1},e}function Ld(e,t,n){return e=In(6,e,null,t),e.lanes=n,e}function Ad(e,t,n){return t=In(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mk(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gd(0),this.expirationTimes=gd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gd(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Th(e,t,n,r,o,i,a,s,l){return e=new mk(e,t,n,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=In(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},dh(i),e}function gk(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Hx)}catch(e){console.error(e)}}Hx(),Hy.exports=kn;var Oh=Hy.exports;const dl=Np(Oh);var Lv=Oh;uf.createRoot=Lv.createRoot,uf.hydrateRoot=Lv.hydrateRoot;function qx(e,t){return function(){return e.apply(t,arguments)}}const{toString:wk}=Object.prototype,{getPrototypeOf:Ih}=Object,Zc=(e=>t=>{const n=wk.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ir=e=>(e=e.toLowerCase(),t=>Zc(t)===e),eu=e=>t=>typeof t===e,{isArray:Gi}=Array,us=eu("undefined");function Sk(e){return e!==null&&!us(e)&&e.constructor!==null&&!us(e.constructor)&&Nn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Gx=ir("ArrayBuffer");function Ck(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Gx(e.buffer),t}const kk=eu("string"),Nn=eu("function"),Kx=eu("number"),tu=e=>e!==null&&typeof e=="object",Rk=e=>e===!0||e===!1,Nl=e=>{if(Zc(e)!=="object")return!1;const t=Ih(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Pk=ir("Date"),Ek=ir("File"),Tk=ir("Blob"),$k=ir("FileList"),jk=e=>tu(e)&&Nn(e.pipe),Mk=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Nn(e.append)&&((t=Zc(e))==="formdata"||t==="object"&&Nn(e.toString)&&e.toString()==="[object FormData]"))},Ok=ir("URLSearchParams"),[Ik,_k,Lk,Ak]=["ReadableStream","Request","Response","Headers"].map(ir),Nk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $s(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Gi(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Xx=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Qx=e=>!us(e)&&e!==Xx;function rp(){const{caseless:e}=Qx(this)&&this||{},t={},n=(r,o)=>{const i=e&&Yx(t,o)||o;Nl(t[i])&&Nl(r)?t[i]=rp(t[i],r):Nl(r)?t[i]=rp({},r):Gi(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r($s(t,(o,i)=>{n&&Nn(o)?e[i]=qx(o,n):e[i]=o},{allOwnKeys:r}),e),zk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Bk=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Fk=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&Ih(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Uk=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Wk=e=>{if(!e)return null;if(Gi(e))return e;let t=e.length;if(!Kx(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Vk=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ih(Uint8Array)),Hk=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},qk=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Gk=ir("HTMLFormElement"),Kk=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Av=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Yk=ir("RegExp"),Jx=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};$s(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},Xk=e=>{Jx(e,(t,n)=>{if(Nn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Nn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Qk=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Gi(e)?r(e):r(String(e).split(t)),n},Jk=()=>{},Zk=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Nd="abcdefghijklmnopqrstuvwxyz",Nv="0123456789",Zx={DIGIT:Nv,ALPHA:Nd,ALPHA_DIGIT:Nd+Nd.toUpperCase()+Nv},eR=(e=16,t=Zx.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function tR(e){return!!(e&&Nn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const nR=e=>{const t=new Array(10),n=(r,o)=>{if(tu(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Gi(r)?[]:{};return $s(r,(a,s)=>{const l=n(a,o+1);!us(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)},rR=ir("AsyncFunction"),oR=e=>e&&(tu(e)||Nn(e))&&Nn(e.then)&&Nn(e.catch),Q={isArray:Gi,isArrayBuffer:Gx,isBuffer:Sk,isFormData:Mk,isArrayBufferView:Ck,isString:kk,isNumber:Kx,isBoolean:Rk,isObject:tu,isPlainObject:Nl,isReadableStream:Ik,isRequest:_k,isResponse:Lk,isHeaders:Ak,isUndefined:us,isDate:Pk,isFile:Ek,isBlob:Tk,isRegExp:Yk,isFunction:Nn,isStream:jk,isURLSearchParams:Ok,isTypedArray:Vk,isFileList:$k,forEach:$s,merge:rp,extend:Dk,trim:Nk,stripBOM:zk,inherits:Bk,toFlatObject:Fk,kindOf:Zc,kindOfTest:ir,endsWith:Uk,toArray:Wk,forEachEntry:Hk,matchAll:qk,isHTMLForm:Gk,hasOwnProperty:Av,hasOwnProp:Av,reduceDescriptors:Jx,freezeMethods:Xk,toObjectSet:Qk,toCamelCase:Kk,noop:Jk,toFiniteNumber:Zk,findKey:Yx,global:Xx,isContextDefined:Qx,ALPHABET:Zx,generateString:eR,isSpecCompliantForm:tR,toJSONObject:nR,isAsyncFn:rR,isThenable:oR};function je(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Q.inherits(je,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Q.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const eb=je.prototype,tb={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{tb[e]={value:e}});Object.defineProperties(je,tb);Object.defineProperty(eb,"isAxiosError",{value:!0});je.from=(e,t,n,r,o,i)=>{const a=Object.create(eb);return Q.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),je.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const iR=null;function op(e){return Q.isPlainObject(e)||Q.isArray(e)}function nb(e){return Q.endsWith(e,"[]")?e.slice(0,-2):e}function Dv(e,t,n){return e?e.concat(t).map(function(o,i){return o=nb(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function aR(e){return Q.isArray(e)&&!e.some(op)}const sR=Q.toFlatObject(Q,{},null,function(t){return/^is[A-Z]/.test(t)});function nu(e,t,n){if(!Q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,k){return!Q.isUndefined(k[x])});const r=n.metaTokens,o=n.visitor||d,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Q.isSpecCompliantForm(t);if(!Q.isFunction(o))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(Q.isDate(y))return y.toISOString();if(!l&&Q.isBlob(y))throw new je("Blob is not supported. Use a Buffer instead.");return Q.isArrayBuffer(y)||Q.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function d(y,x,k){let g=y;if(y&&!k&&typeof y=="object"){if(Q.endsWith(x,"{}"))x=r?x:x.slice(0,-2),y=JSON.stringify(y);else if(Q.isArray(y)&&aR(y)||(Q.isFileList(y)||Q.endsWith(x,"[]"))&&(g=Q.toArray(y)))return x=nb(x),g.forEach(function(b,C){!(Q.isUndefined(b)||b===null)&&t.append(a===!0?Dv([x],C,i):a===null?x:x+"[]",c(b))}),!1}return op(y)?!0:(t.append(Dv(k,x,i),c(y)),!1)}const f=[],m=Object.assign(sR,{defaultVisitor:d,convertValue:c,isVisitable:op});function w(y,x){if(!Q.isUndefined(y)){if(f.indexOf(y)!==-1)throw Error("Circular reference detected in "+x.join("."));f.push(y),Q.forEach(y,function(g,h){(!(Q.isUndefined(g)||g===null)&&o.call(t,g,Q.isString(h)?h.trim():h,x,m))===!0&&w(g,x?x.concat(h):[h])}),f.pop()}}if(!Q.isObject(e))throw new TypeError("data must be an object");return w(e),t}function zv(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function _h(e,t){this._pairs=[],e&&nu(e,this,t)}const rb=_h.prototype;rb.append=function(t,n){this._pairs.push([t,n])};rb.toString=function(t){const n=t?function(r){return t.call(this,r,zv)}:zv;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function lR(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ob(e,t,n){if(!t)return e;const r=n&&n.encode||lR,o=n&&n.serialize;let i;if(o?i=o(t,n):i=Q.isURLSearchParams(t)?t.toString():new _h(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Bv{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const ib={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cR=typeof URLSearchParams<"u"?URLSearchParams:_h,uR=typeof FormData<"u"?FormData:null,dR=typeof Blob<"u"?Blob:null,fR={isBrowser:!0,classes:{URLSearchParams:cR,FormData:uR,Blob:dR},protocols:["http","https","file","blob","url","data"]},Lh=typeof window<"u"&&typeof document<"u",pR=(e=>Lh&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),hR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mR=Lh&&window.location.href||"http://localhost",gR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Lh,hasStandardBrowserEnv:pR,hasStandardBrowserWebWorkerEnv:hR,origin:mR},Symbol.toStringTag,{value:"Module"})),nr={...gR,...fR};function vR(e,t){return nu(e,new nr.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return nr.isNode&&Q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function yR(e){return Q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function xR(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return a=!a&&Q.isArray(o)?o.length:a,l?(Q.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!Q.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&Q.isArray(o[a])&&(o[a]=xR(o[a])),!s)}if(Q.isFormData(e)&&Q.isFunction(e.entries)){const n={};return Q.forEachEntry(e,(r,o)=>{t(yR(r),o,n,0)}),n}return null}function bR(e,t,n){if(Q.isString(e))try{return(t||JSON.parse)(e),Q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const js={transitional:ib,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=Q.isObject(t);if(i&&Q.isHTMLForm(t)&&(t=new FormData(t)),Q.isFormData(t))return o?JSON.stringify(ab(t)):t;if(Q.isArrayBuffer(t)||Q.isBuffer(t)||Q.isStream(t)||Q.isFile(t)||Q.isBlob(t)||Q.isReadableStream(t))return t;if(Q.isArrayBufferView(t))return t.buffer;if(Q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return vR(t,this.formSerializer).toString();if((s=Q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return nu(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),bR(t)):t}],transformResponse:[function(t){const n=this.transitional||js.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(Q.isResponse(t)||Q.isReadableStream(t))return t;if(t&&Q.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?je.from(s,je.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nr.classes.FormData,Blob:nr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Q.forEach(["delete","get","head","post","put","patch"],e=>{js.headers[e]={}});const wR=Q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),SR=e=>{const t={};let n,r,o;return e&&e.split(` +`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&wR[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Fv=Symbol("internals");function ga(e){return e&&String(e).trim().toLowerCase()}function Dl(e){return e===!1||e==null?e:Q.isArray(e)?e.map(Dl):String(e)}function CR(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const kR=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Dd(e,t,n,r,o){if(Q.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!Q.isString(t)){if(Q.isString(r))return t.indexOf(r)!==-1;if(Q.isRegExp(r))return r.test(t)}}function RR(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function PR(e,t){const n=Q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class ln{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,l,c){const d=ga(l);if(!d)throw new Error("header name must be a non-empty string");const f=Q.findKey(o,d);(!f||o[f]===void 0||c===!0||c===void 0&&o[f]!==!1)&&(o[f||l]=Dl(s))}const a=(s,l)=>Q.forEach(s,(c,d)=>i(c,d,l));if(Q.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(Q.isString(t)&&(t=t.trim())&&!kR(t))a(SR(t),n);else if(Q.isHeaders(t))for(const[s,l]of t.entries())i(l,s,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=ga(t),t){const r=Q.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return CR(o);if(Q.isFunction(n))return n.call(this,o,r);if(Q.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ga(t),t){const r=Q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Dd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=ga(a),a){const s=Q.findKey(r,a);s&&(!n||Dd(r,r[s],s,n))&&(delete r[s],o=!0)}}return Q.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Dd(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return Q.forEach(this,(o,i)=>{const a=Q.findKey(r,i);if(a){n[a]=Dl(o),delete n[i];return}const s=t?RR(i):String(i).trim();s!==i&&delete n[i],n[s]=Dl(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Q.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Q.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Fv]=this[Fv]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=ga(a);r[s]||(PR(o,a),r[s]=!0)}return Q.isArray(t)?t.forEach(i):i(t),this}}ln.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Q.reduceDescriptors(ln.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Q.freezeMethods(ln);function zd(e,t){const n=this||js,r=t||n,o=ln.from(r.headers);let i=r.data;return Q.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function sb(e){return!!(e&&e.__CANCEL__)}function Ki(e,t,n){je.call(this,e??"canceled",je.ERR_CANCELED,t,n),this.name="CanceledError"}Q.inherits(Ki,je,{__CANCEL__:!0});function lb(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new je("Request failed with status code "+n.status,[je.ERR_BAD_REQUEST,je.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ER(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function TR(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),d=r[i];a||(a=c),n[o]=l,r[o]=c;let f=i,m=0;for(;f!==o;)m+=n[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-ar)return o&&(clearTimeout(o),o=null),n=s,e.apply(null,arguments);o||(o=setTimeout(()=>(o=null,n=Date.now(),e.apply(null,arguments)),r-(s-n)))}}const yc=(e,t,n=3)=>{let r=0;const o=TR(50,250);return $R(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=a-r,c=o(l),d=a<=s;r=a;const f={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&d?(s-a)/c:void 0,event:i,lengthComputable:s!=null};f[t?"download":"upload"]=!0,e(f)},n)},jR=nr.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const s=Q.isString(a)?o(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),MR=nr.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];Q.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Q.isString(r)&&a.push("path="+r),Q.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function OR(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function IR(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function cb(e,t){return e&&!OR(t)?IR(e,t):t}const Uv=e=>e instanceof ln?{...e}:e;function zo(e,t){t=t||{};const n={};function r(c,d,f){return Q.isPlainObject(c)&&Q.isPlainObject(d)?Q.merge.call({caseless:f},c,d):Q.isPlainObject(d)?Q.merge({},d):Q.isArray(d)?d.slice():d}function o(c,d,f){if(Q.isUndefined(d)){if(!Q.isUndefined(c))return r(void 0,c,f)}else return r(c,d,f)}function i(c,d){if(!Q.isUndefined(d))return r(void 0,d)}function a(c,d){if(Q.isUndefined(d)){if(!Q.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function s(c,d,f){if(f in t)return r(c,d);if(f in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,d)=>o(Uv(c),Uv(d),!0)};return Q.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=l[d]||o,m=f(e[d],t[d],d);Q.isUndefined(m)&&f!==s||(n[d]=m)}),n}const ub=e=>{const t=zo({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=ln.from(a),t.url=ob(cb(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(Q.isFormData(n)){if(nr.hasStandardBrowserEnv||nr.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...d]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...d].join("; "))}}if(nr.hasStandardBrowserEnv&&(r&&Q.isFunction(r)&&(r=r(t)),r||r!==!1&&jR(t.url))){const c=o&&i&&MR.read(i);c&&a.set(o,c)}return t},_R=typeof XMLHttpRequest<"u",LR=_R&&function(e){return new Promise(function(n,r){const o=ub(e);let i=o.data;const a=ln.from(o.headers).normalize();let{responseType:s}=o,l;function c(){o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let d=new XMLHttpRequest;d.open(o.method.toUpperCase(),o.url,!0),d.timeout=o.timeout;function f(){if(!d)return;const w=ln.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:w,config:e,request:d};lb(function(g){n(g),c()},function(g){r(g),c()},x),d=null}"onloadend"in d?d.onloadend=f:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(f)},d.onabort=function(){d&&(r(new je("Request aborted",je.ECONNABORTED,o,d)),d=null)},d.onerror=function(){r(new je("Network Error",je.ERR_NETWORK,o,d)),d=null},d.ontimeout=function(){let y=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const x=o.transitional||ib;o.timeoutErrorMessage&&(y=o.timeoutErrorMessage),r(new je(y,x.clarifyTimeoutError?je.ETIMEDOUT:je.ECONNABORTED,o,d)),d=null},i===void 0&&a.setContentType(null),"setRequestHeader"in d&&Q.forEach(a.toJSON(),function(y,x){d.setRequestHeader(x,y)}),Q.isUndefined(o.withCredentials)||(d.withCredentials=!!o.withCredentials),s&&s!=="json"&&(d.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&d.addEventListener("progress",yc(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",yc(o.onUploadProgress)),(o.cancelToken||o.signal)&&(l=w=>{d&&(r(!w||w.type?new Ki(null,e,d):w),d.abort(),d=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const m=ER(o.url);if(m&&nr.protocols.indexOf(m)===-1){r(new je("Unsupported protocol "+m+":",je.ERR_BAD_REQUEST,e));return}d.send(i||null)})},AR=(e,t)=>{let n=new AbortController,r;const o=function(l){if(!r){r=!0,a();const c=l instanceof Error?l:this.reason;n.abort(c instanceof je?c:new Ki(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{o(new je(`timeout ${t} of ms exceeded`,je.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l&&(l.removeEventListener?l.removeEventListener("abort",o):l.unsubscribe(o))}),e=null)};e.forEach(l=>l&&l.addEventListener&&l.addEventListener("abort",o));const{signal:s}=n;return s.unsubscribe=a,[s,()=>{i&&clearTimeout(i),i=null}]},NR=function*(e,t){let n=e.byteLength;if(!t||n{const i=DR(e,t,o);let a=0;return new ReadableStream({type:"bytes",async pull(s){const{done:l,value:c}=await i.next();if(l){s.close(),r();return}let d=c.byteLength;n&&n(a+=d),s.enqueue(new Uint8Array(c))},cancel(s){return r(s),i.return()}},{highWaterMark:2})},Vv=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},ru=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",db=ru&&typeof ReadableStream=="function",ip=ru&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),zR=db&&(()=>{let e=!1;const t=new Request(nr.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Hv=64*1024,ap=db&&!!(()=>{try{return Q.isReadableStream(new Response("").body)}catch{}})(),xc={stream:ap&&(e=>e.body)};ru&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xc[t]&&(xc[t]=Q.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new je(`Response type '${t}' is not supported`,je.ERR_NOT_SUPPORT,r)})})})(new Response);const BR=async e=>{if(e==null)return 0;if(Q.isBlob(e))return e.size;if(Q.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(Q.isArrayBufferView(e))return e.byteLength;if(Q.isURLSearchParams(e)&&(e=e+""),Q.isString(e))return(await ip(e)).byteLength},FR=async(e,t)=>{const n=Q.toFiniteNumber(e.getContentLength());return n??BR(t)},UR=ru&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:d,withCredentials:f="same-origin",fetchOptions:m}=ub(e);c=c?(c+"").toLowerCase():"text";let[w,y]=o||i||a?AR([o,i],a):[],x,k;const g=()=>{!x&&setTimeout(()=>{w&&w.unsubscribe()}),x=!0};let h;try{if(l&&zR&&n!=="get"&&n!=="head"&&(h=await FR(d,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),P;Q.isFormData(r)&&(P=E.headers.get("content-type"))&&d.setContentType(P),E.body&&(r=Wv(E.body,Hv,Vv(h,yc(l)),null,ip))}Q.isString(f)||(f=f?"cors":"omit"),k=new Request(t,{...m,signal:w,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",withCredentials:f});let b=await fetch(k);const C=ap&&(c==="stream"||c==="response");if(ap&&(s||C)){const E={};["status","statusText","headers"].forEach(M=>{E[M]=b[M]});const P=Q.toFiniteNumber(b.headers.get("content-length"));b=new Response(Wv(b.body,Hv,s&&Vv(P,yc(s,!0)),C&&g,ip),E)}c=c||"text";let R=await xc[Q.findKey(xc,c)||"text"](b,e);return!C&&g(),y&&y(),await new Promise((E,P)=>{lb(E,P,{data:R,headers:ln.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:k})})}catch(b){throw g(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new je("Network Error",je.ERR_NETWORK,e,k),{cause:b.cause||b}):je.from(b,b&&b.code,e,k)}}),sp={http:iR,xhr:LR,fetch:UR};Q.forEach(sp,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const qv=e=>`- ${e}`,WR=e=>Q.isFunction(e)||e===null||e===!1,fb={getAdapter:e=>{e=Q.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since : +`+i.map(qv).join(` +`):" "+qv(i[0]):"as no adapter specified";throw new je("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:sp};function Bd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ki(null,e)}function Gv(e){return Bd(e),e.headers=ln.from(e.headers),e.data=zd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),fb.getAdapter(e.adapter||js.adapter)(e).then(function(r){return Bd(e),r.data=zd.call(e,e.transformResponse,r),r.headers=ln.from(r.headers),r},function(r){return sb(r)||(Bd(e),r&&r.response&&(r.response.data=zd.call(e,e.transformResponse,r.response),r.response.headers=ln.from(r.response.headers))),Promise.reject(r)})}const pb="1.7.2",Ah={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ah[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Kv={};Ah.transitional=function(t,n,r){function o(i,a){return"[Axios v"+pb+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new je(o(a," has been removed"+(n?" in "+n:"")),je.ERR_DEPRECATED);return n&&!Kv[a]&&(Kv[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};function VR(e,t,n){if(typeof e!="object")throw new je("options must be an object",je.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new je("option "+i+" must be "+l,je.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new je("Unknown option "+i,je.ERR_BAD_OPTION)}}const lp={assertOptions:VR,validators:Ah},Fr=lp.validators;class Oo{constructor(t){this.defaults=t,this.interceptors={request:new Bv,response:new Bv}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=zo(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&lp.assertOptions(r,{silentJSONParsing:Fr.transitional(Fr.boolean),forcedJSONParsing:Fr.transitional(Fr.boolean),clarifyTimeoutError:Fr.transitional(Fr.boolean)},!1),o!=null&&(Q.isFunction(o)?n.paramsSerializer={serialize:o}:lp.assertOptions(o,{encode:Fr.function,serialize:Fr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&Q.merge(i.common,i[n.method]);i&&Q.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),n.headers=ln.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(l=l&&x.synchronous,s.unshift(x.fulfilled,x.rejected))});const c=[];this.interceptors.response.forEach(function(x){c.push(x.fulfilled,x.rejected)});let d,f=0,m;if(!l){const y=[Gv.bind(this),void 0];for(y.unshift.apply(y,s),y.push.apply(y,c),m=y.length,d=Promise.resolve(n);f{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new Ki(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Nh(function(o){t=o}),cancel:t}}}function HR(e){return function(n){return e.apply(null,n)}}function qR(e){return Q.isObject(e)&&e.isAxiosError===!0}const cp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(cp).forEach(([e,t])=>{cp[t]=e});function hb(e){const t=new Oo(e),n=qx(Oo.prototype.request,t);return Q.extend(n,Oo.prototype,t,{allOwnKeys:!0}),Q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return hb(zo(e,o))},n}const Oe=hb(js);Oe.Axios=Oo;Oe.CanceledError=Ki;Oe.CancelToken=Nh;Oe.isCancel=sb;Oe.VERSION=pb;Oe.toFormData=nu;Oe.AxiosError=je;Oe.Cancel=Oe.CanceledError;Oe.all=function(t){return Promise.all(t)};Oe.spread=HR;Oe.isAxiosError=qR;Oe.mergeConfig=zo;Oe.AxiosHeaders=ln;Oe.formToJSON=e=>ab(Q.isHTMLForm(e)?new FormData(e):e);Oe.getAdapter=fb.getAdapter;Oe.HttpStatusCode=cp;Oe.default=Oe;/** + * @remix-run/router v1.16.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function ds(){return ds=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function mb(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function KR(){return Math.random().toString(36).substr(2,8)}function Xv(e,t){return{usr:e.state,key:e.key,idx:t}}function up(e,t,n,r){return n===void 0&&(n=null),ds({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Yi(t):t,{state:n,key:t&&t.key||r||KR()})}function bc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Yi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function YR(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s=Qr.Pop,l=null,c=d();c==null&&(c=0,a.replaceState(ds({},a.state,{idx:c}),""));function d(){return(a.state||{idx:null}).idx}function f(){s=Qr.Pop;let k=d(),g=k==null?null:k-c;c=k,l&&l({action:s,location:x.location,delta:g})}function m(k,g){s=Qr.Push;let h=up(x.location,k,g);c=d()+1;let b=Xv(h,c),C=x.createHref(h);try{a.pushState(b,"",C)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;o.location.assign(C)}i&&l&&l({action:s,location:x.location,delta:1})}function w(k,g){s=Qr.Replace;let h=up(x.location,k,g);c=d();let b=Xv(h,c),C=x.createHref(h);a.replaceState(b,"",C),i&&l&&l({action:s,location:x.location,delta:0})}function y(k){let g=o.location.origin!=="null"?o.location.origin:o.location.href,h=typeof k=="string"?k:bc(k);return h=h.replace(/ $/,"%20"),ft(g,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,g)}let x={get action(){return s},get location(){return e(o,a)},listen(k){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Yv,f),l=k,()=>{o.removeEventListener(Yv,f),l=null}},createHref(k){return t(o,k)},createURL:y,encodeLocation(k){let g=y(k);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:m,replace:w,go(k){return a.go(k)}};return x}var Qv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Qv||(Qv={}));function XR(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Yi(t):t,o=_i(r.pathname||"/",n);if(o==null)return null;let i=gb(e);QR(i);let a=null;for(let s=0;a==null&&s{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(ft(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=so([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(ft(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),gb(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:oP(c,i.index),routesMeta:d})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of vb(i.path))o(i,a,l)}),t}function vb(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=vb(r.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function QR(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:iP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const JR=/^:[\w-]+$/,ZR=3,eP=2,tP=1,nP=10,rP=-2,Jv=e=>e==="*";function oP(e,t){let n=e.split("/"),r=n.length;return n.some(Jv)&&(r+=rP),t&&(r+=eP),n.filter(o=>!Jv(o)).reduce((o,i)=>o+(JR.test(i)?ZR:i===""?tP:nP),r)}function iP(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function aP(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let a=0;a{let{paramName:m,isOptional:w}=d;if(m==="*"){let x=s[f]||"";a=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const y=s[f];return w&&!y?c[m]=void 0:c[m]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function sP(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),mb(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function lP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return mb(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function _i(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function cP(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Yi(e):e;return{pathname:n?n.startsWith("/")?n:uP(n,t):t,search:pP(r),hash:hP(o)}}function uP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Fd(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function dP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Dh(e,t){let n=dP(e);return t?n.map((r,o)=>o===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function zh(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Yi(e):(o=ds({},e),ft(!o.pathname||!o.pathname.includes("?"),Fd("?","pathname","search",o)),ft(!o.pathname||!o.pathname.includes("#"),Fd("#","pathname","hash",o)),ft(!o.search||!o.search.includes("#"),Fd("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let m=a.split("/");for(;m[0]==="..";)m.shift(),f-=1;o.pathname=m.join("/")}s=f>=0?t[f]:"/"}let l=cP(o,s),c=a&&a!=="/"&&a.endsWith("/"),d=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const so=e=>e.join("/").replace(/\/\/+/g,"/"),fP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),pP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,hP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function mP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const yb=["post","put","patch","delete"];new Set(yb);const gP=["get",...yb];new Set(gP);/** + * React Router v6.23.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),p.useCallback(function(c,d){if(d===void 0&&(d={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let f=zh(c,JSON.parse(a),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:so([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,a,i,e])}function Ms(){let{matches:e}=p.useContext(Dr),t=e[e.length-1];return t?t.params:{}}function au(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=p.useContext(Nr),{matches:o}=p.useContext(Dr),{pathname:i}=ho(),a=JSON.stringify(Dh(o,r.v7_relativeSplatPath));return p.useMemo(()=>zh(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function xP(e,t){return bP(e,t)}function bP(e,t,n,r){Xi()||ft(!1);let{navigator:o}=p.useContext(Nr),{matches:i}=p.useContext(Dr),a=i[i.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let c=ho(),d;if(t){var f;let k=typeof t=="string"?Yi(t):t;l==="/"||(f=k.pathname)!=null&&f.startsWith(l)||ft(!1),d=k}else d=c;let m=d.pathname||"/",w=m;if(l!=="/"){let k=l.replace(/^\//,"").split("/");w="/"+m.replace(/^\//,"").split("/").slice(k.length).join("/")}let y=XR(e,{pathname:w}),x=RP(y&&y.map(k=>Object.assign({},k,{params:Object.assign({},s,k.params),pathname:so([l,o.encodeLocation?o.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?l:so([l,o.encodeLocation?o.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),i,n,r);return t&&x?p.createElement(iu.Provider,{value:{location:fs({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Qr.Pop}},x):x}function wP(){let e=$P(),t=mP(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:o},n):null,null)}const SP=p.createElement(wP,null);class CP extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?p.createElement(Dr.Provider,{value:this.props.routeContext},p.createElement(bb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function kP(e){let{routeContext:t,match:n,children:r}=e,o=p.useContext(ou);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(Dr.Provider,{value:t},r)}function RP(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let a=e,s=(o=n)==null?void 0:o.errors;if(s!=null){let d=a.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);d>=0||ft(!1),a=a.slice(0,Math.min(a.length,d+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((d,f,m)=>{let w,y=!1,x=null,k=null;n&&(w=s&&f.route.id?s[f.route.id]:void 0,x=f.route.errorElement||SP,l&&(c<0&&m===0?(y=!0,k=null):c===m&&(y=!0,k=f.route.hydrateFallbackElement||null)));let g=t.concat(a.slice(0,m+1)),h=()=>{let b;return w?b=x:y?b=k:f.route.Component?b=p.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=d,p.createElement(kP,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:b})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?p.createElement(CP,{location:n.location,revalidation:n.revalidation,component:x,error:w,children:h(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):h()},null)}var Sb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Sb||{}),wc=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(wc||{});function PP(e){let t=p.useContext(ou);return t||ft(!1),t}function EP(e){let t=p.useContext(xb);return t||ft(!1),t}function TP(e){let t=p.useContext(Dr);return t||ft(!1),t}function Cb(e){let t=TP(),n=t.matches[t.matches.length-1];return n.route.id||ft(!1),n.route.id}function $P(){var e;let t=p.useContext(bb),n=EP(wc.UseRouteError),r=Cb(wc.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function jP(){let{router:e}=PP(Sb.UseNavigateStable),t=Cb(wc.UseNavigateStable),n=p.useRef(!1);return wb(()=>{n.current=!0}),p.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,fs({fromRouteId:t},i)))},[e,t])}function MP(e){let{to:t,replace:n,state:r,relative:o}=e;Xi()||ft(!1);let{future:i,static:a}=p.useContext(Nr),{matches:s}=p.useContext(Dr),{pathname:l}=ho(),c=qo(),d=zh(t,Dh(s,i.v7_relativeSplatPath),l,o==="path"),f=JSON.stringify(d);return p.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:o}),[c,f,o,n,r]),null}function mn(e){ft(!1)}function OP(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Qr.Pop,navigator:i,static:a=!1,future:s}=e;Xi()&&ft(!1);let l=t.replace(/^\/*/,"/"),c=p.useMemo(()=>({basename:l,navigator:i,static:a,future:fs({v7_relativeSplatPath:!1},s)}),[l,s,i,a]);typeof r=="string"&&(r=Yi(r));let{pathname:d="/",search:f="",hash:m="",state:w=null,key:y="default"}=r,x=p.useMemo(()=>{let k=_i(d,l);return k==null?null:{location:{pathname:k,search:f,hash:m,state:w,key:y},navigationType:o}},[l,d,f,m,w,y,o]);return x==null?null:p.createElement(Nr.Provider,{value:c},p.createElement(iu.Provider,{children:n,value:x}))}function IP(e){let{children:t,location:n}=e;return xP(fp(t),n)}new Promise(()=>{});function fp(e,t){t===void 0&&(t=[]);let n=[];return p.Children.forEach(e,(r,o)=>{if(!p.isValidElement(r))return;let i=[...t,o];if(r.type===p.Fragment){n.push.apply(n,fp(r.props.children,i));return}r.type!==mn&&ft(!1),!r.props.index||!r.props.children||ft(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=fp(r.props.children,i)),n.push(a)}),n}/** + * React Router DOM v6.23.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function _P(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function LP(e,t){return e.button===0&&(!t||t==="_self")&&!_P(e)}const AP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],NP=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],DP="6";try{window.__reactRouterVersion=DP}catch{}const zP=p.createContext({isTransitioning:!1}),BP="startTransition",Zv=Gl[BP];function FP(e){let{basename:t,children:n,future:r,window:o}=e,i=p.useRef();i.current==null&&(i.current=GR({window:o,v5Compat:!0}));let a=i.current,[s,l]=p.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},d=p.useCallback(f=>{c&&Zv?Zv(()=>l(f)):l(f)},[l,c]);return p.useLayoutEffect(()=>a.listen(d),[a,d]),p.createElement(OP,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const UP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",WP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Rb=p.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:d,unstable_viewTransition:f}=t,m=kb(t,AP),{basename:w}=p.useContext(Nr),y,x=!1;if(typeof c=="string"&&WP.test(c)&&(y=c,UP))try{let b=new URL(window.location.href),C=c.startsWith("//")?new URL(b.protocol+c):new URL(c),R=_i(C.pathname,w);C.origin===b.origin&&R!=null?c=R+C.search+C.hash:x=!0}catch{}let k=vP(c,{relative:o}),g=qP(c,{replace:a,state:s,target:l,preventScrollReset:d,relative:o,unstable_viewTransition:f});function h(b){r&&r(b),b.defaultPrevented||g(b)}return p.createElement("a",Sc({},m,{href:y||k,onClick:x||i?r:h,ref:n,target:l}))}),VP=p.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:a=!1,style:s,to:l,unstable_viewTransition:c,children:d}=t,f=kb(t,NP),m=au(l,{relative:f.relative}),w=ho(),y=p.useContext(xb),{navigator:x,basename:k}=p.useContext(Nr),g=y!=null&&GP(m)&&c===!0,h=x.encodeLocation?x.encodeLocation(m).pathname:m.pathname,b=w.pathname,C=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;o||(b=b.toLowerCase(),C=C?C.toLowerCase():null,h=h.toLowerCase()),C&&k&&(C=_i(C,k)||C);const R=h!=="/"&&h.endsWith("/")?h.length-1:h.length;let E=b===h||!a&&b.startsWith(h)&&b.charAt(R)==="/",P=C!=null&&(C===h||!a&&C.startsWith(h)&&C.charAt(h.length)==="/"),M={isActive:E,isPending:P,isTransitioning:g},D=E?r:void 0,O;typeof i=="function"?O=i(M):O=[i,E?"active":null,P?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let F=typeof s=="function"?s(M):s;return p.createElement(Rb,Sc({},f,{"aria-current":D,className:O,ref:n,style:F,to:l,unstable_viewTransition:c}),typeof d=="function"?d(M):d)});var pp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(pp||(pp={}));var e0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(e0||(e0={}));function HP(e){let t=p.useContext(ou);return t||ft(!1),t}function qP(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:s}=t===void 0?{}:t,l=qo(),c=ho(),d=au(e,{relative:a});return p.useCallback(f=>{if(LP(f,n)){f.preventDefault();let m=r!==void 0?r:bc(c)===bc(d);l(e,{replace:m,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:s})}},[c,l,d,r,o,n,e,i,a,s])}function GP(e,t){t===void 0&&(t={});let n=p.useContext(zP);n==null&&ft(!1);let{basename:r}=HP(pp.useViewTransitionState),o=au(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=_i(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=_i(n.nextLocation.pathname,r)||n.nextLocation.pathname;return dp(o.pathname,a)!=null||dp(o.pathname,i)!=null}const vr=p.createContext({user:null}),KP=({children:e})=>{const[t,n]=p.useState(!1),[r,o]=p.useState(null),[i,a]=p.useState(0),[s,l]=p.useState([]),c=p.useCallback(x=>{l(k=>[...k,x])},[l]),d=x=>{l(k=>k.filter((g,h)=>h!==x))},f=()=>{a(i+1)},m=qo();p.useEffect(()=>{const x=localStorage.getItem("user");console.log("Attempting to load user:",x),x?(console.log("User found in storage:",x),o(JSON.parse(x))):console.log("No user found in storage at initialization.")},[]),p.useEffect(()=>{r?(console.log("Storing user in storage:",r),localStorage.setItem("user",JSON.stringify(r))):(console.log("Removing user from storage."),localStorage.removeItem("user"))},[r]);const w=p.useCallback(async()=>{var x;try{const k=localStorage.getItem("token");if(console.log("Logging out with token:",k),!k){console.error("No token available for logout");return}const g=await Oe.post("/api/user/logout",{},{headers:{Authorization:`Bearer ${k}`}});if(g.status===200)o(null),localStorage.removeItem("token"),m("/auth");else throw new Error("Logout failed with status: "+g.status)}catch(k){console.error("Logout failed:",((x=k.response)==null?void 0:x.data)||k.message)}},[m]),y=async(x,k,g)=>{var h,b;try{const C=localStorage.getItem("token"),R=await Oe.patch(`/api/user/change_password/${x}`,{current_password:k,new_password:g},{headers:{Authorization:`Bearer ${C}`}});return R.status===200?{success:!0,message:"Password updated successfully!"}:{success:!1,message:R.data.message||"Update failed!"}}catch(C){return C.response.status===403?{success:!1,message:C.response.data.message||"Incorrect current password"}:{success:!1,message:((b=(h=C.response)==null?void 0:h.data)==null?void 0:b.message)||"Network error"}}};return p.useEffect(()=>{const x=k=>{k.data&&k.data.type==="NEW_NOTIFICATION"&&(console.log("Notification received:",k.data.data),c({title:k.data.data.title,message:k.data.data.body}))};return navigator.serviceWorker.addEventListener("message",x),()=>{navigator.serviceWorker.removeEventListener("message",x)}},[c]),u.jsx(vr.Provider,{value:{user:r,setUser:o,logout:w,voiceEnabled:t,setVoiceEnabled:n,changePassword:y,incrementNotificationCount:f,notifications:s,removeNotification:d,addNotification:c},children:e})},ps={black:"#000",white:"#fff"},Xo={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"},Qo={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"},Jo={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"},Zo={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"},ei={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"},va={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"},YP={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"};function Bo(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n=0)continue;n[r]=e[r]}return n}function Pb(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var QP=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,JP=Pb(function(e){return QP.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function ZP(e){if(e.sheet)return e.sheet;for(var t=0;t0?Lt(Qi,--dn):0,Li--,bt===10&&(Li=1,lu--),bt}function bn(){return bt=dn2||ms(bt)>3?"":" "}function fE(e,t){for(;--t&&bn()&&!(bt<48||bt>102||bt>57&&bt<65||bt>70&&bt<97););return Os(e,zl()+(t<6&&hr()==32&&bn()==32))}function mp(e){for(;bn();)switch(bt){case e:return dn;case 34:case 39:e!==34&&e!==39&&mp(bt);break;case 40:e===41&&mp(e);break;case 92:bn();break}return dn}function pE(e,t){for(;bn()&&e+bt!==57;)if(e+bt===84&&hr()===47)break;return"/*"+Os(t,dn-1)+"*"+su(e===47?e:bn())}function hE(e){for(;!ms(hr());)bn();return Os(e,dn)}function mE(e){return Ob(Fl("",null,null,null,[""],e=Mb(e),0,[0],e))}function Fl(e,t,n,r,o,i,a,s,l){for(var c=0,d=0,f=a,m=0,w=0,y=0,x=1,k=1,g=1,h=0,b="",C=o,R=i,E=r,P=b;k;)switch(y=h,h=bn()){case 40:if(y!=108&&Lt(P,f-1)==58){hp(P+=We(Bl(h),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:P+=Bl(h);break;case 9:case 10:case 13:case 32:P+=dE(y);break;case 92:P+=fE(zl()-1,7);continue;case 47:switch(hr()){case 42:case 47:fl(gE(pE(bn(),zl()),t,n),l);break;default:P+="/"}break;case 123*x:s[c++]=cr(P)*g;case 125*x:case 59:case 0:switch(h){case 0:case 125:k=0;case 59+d:g==-1&&(P=We(P,/\f/g,"")),w>0&&cr(P)-f&&fl(w>32?n0(P+";",r,n,f-1):n0(We(P," ","")+";",r,n,f-2),l);break;case 59:P+=";";default:if(fl(E=t0(P,t,n,c,d,o,s,b,C=[],R=[],f),i),h===123)if(d===0)Fl(P,t,E,E,C,i,f,s,R);else switch(m===99&&Lt(P,3)===110?100:m){case 100:case 108:case 109:case 115:Fl(e,E,E,r&&fl(t0(e,E,E,0,0,o,s,b,o,C=[],f),R),o,R,f,s,r?C:R);break;default:Fl(P,E,E,E,[""],R,0,s,R)}}c=d=w=0,x=g=1,b=P="",f=a;break;case 58:f=1+cr(P),w=y;default:if(x<1){if(h==123)--x;else if(h==125&&x++==0&&uE()==125)continue}switch(P+=su(h),h*x){case 38:g=d>0?1:(P+="\f",-1);break;case 44:s[c++]=(cr(P)-1)*g,g=1;break;case 64:hr()===45&&(P+=Bl(bn())),m=hr(),d=f=cr(b=P+=hE(zl())),h++;break;case 45:y===45&&cr(P)==2&&(x=0)}}return i}function t0(e,t,n,r,o,i,a,s,l,c,d){for(var f=o-1,m=o===0?i:[""],w=Uh(m),y=0,x=0,k=0;y0?m[g]+" "+h:We(h,/&\f/g,m[g])))&&(l[k++]=b);return cu(e,t,n,o===0?Bh:s,l,c,d)}function gE(e,t,n){return cu(e,t,n,Eb,su(cE()),hs(e,2,-2),0)}function n0(e,t,n,r){return cu(e,t,n,Fh,hs(e,0,r),hs(e,r+1,-1),r)}function ki(e,t){for(var n="",r=Uh(e),o=0;o6)switch(Lt(e,t+1)){case 109:if(Lt(e,t+4)!==45)break;case 102:return We(e,/(.+:)(.+)-([^]+)/,"$1"+Ue+"$2-$3$1"+Cc+(Lt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~hp(e,"stretch")?Ib(We(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Lt(e,t+1)!==115)break;case 6444:switch(Lt(e,cr(e)-3-(~hp(e,"!important")&&10))){case 107:return We(e,":",":"+Ue)+e;case 101:return We(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ue+(Lt(e,14)===45?"inline-":"")+"box$3$1"+Ue+"$2$3$1"+Ft+"$2box$3")+e}break;case 5936:switch(Lt(e,t+11)){case 114:return Ue+e+Ft+We(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ue+e+Ft+We(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ue+e+Ft+We(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ue+e+Ft+e+e}return e}var RE=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Fh:t.return=Ib(t.value,t.length);break;case Tb:return ki([ya(t,{value:We(t.value,"@","@"+Ue)})],o);case Bh:if(t.length)return lE(t.props,function(i){switch(sE(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ki([ya(t,{props:[We(i,/:(read-\w+)/,":"+Cc+"$1")]})],o);case"::placeholder":return ki([ya(t,{props:[We(i,/:(plac\w+)/,":"+Ue+"input-$1")]}),ya(t,{props:[We(i,/:(plac\w+)/,":"+Cc+"$1")]}),ya(t,{props:[We(i,/:(plac\w+)/,Ft+"input-$1")]})],o)}return""})}},PE=[RE],_b=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(x){var k=x.getAttribute("data-emotion");k.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var o=t.stylisPlugins||PE,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var k=x.getAttribute("data-emotion").split(" "),g=1;g=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var 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,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},zE=/[A-Z]|^ms/g,BE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Fb=function(t){return t.charCodeAt(1)===45},o0=function(t){return t!=null&&typeof t!="boolean"},Ud=Pb(function(e){return Fb(e)?e:e.replace(zE,"-$&").toLowerCase()}),i0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(BE,function(r,o,i){return ur={name:o,styles:i,next:ur},o})}return DE[t]!==1&&!Fb(t)&&typeof n=="number"&&n!==0?n+"px":n};function gs(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return ur={name:n.name,styles:n.styles,next:ur},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ur={name:r.name,styles:r.styles,next:ur},r=r.next;var o=n.styles+";";return o}return FE(e,t,n)}case"function":{if(e!==void 0){var i=ur,a=n(e);return ur=i,gs(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function FE(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o96?qE:GE},u0=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(a){return t.__emotion_forwardProp(a)&&i(a)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},KE=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return zb(n,r,o),WE(function(){return Bb(n,r,o)}),null},YE=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,a;n!==void 0&&(i=n.label,a=n.target);var s=u0(t,n,r),l=s||c0(o),c=!l("as");return function(){var d=arguments,f=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&f.push("label:"+i+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{f.push(d[0][0]);for(var m=d.length,w=1;wt(rT(o)?n:o):t;return u.jsx(HE,{styles:r})}function Gh(e,t){return gp(e,t)}const Xb=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},oT=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:Yb,StyledEngineProvider:nT,ThemeContext:Is,css:bu,default:Gh,internal_processStyles:Xb,keyframes:Ji},Symbol.toStringTag,{value:"Module"}));function kr(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 Qb(e){if(!kr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Qb(e[n])}),t}function Qt(e,t,n={clone:!0}){const r=n.clone?S({},e):e;return kr(e)&&kr(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(kr(t[o])&&o in e&&kr(e[o])?r[o]=Qt(e[o],t[o],n):n.clone?r[o]=kr(t[o])?Qb(t[o]):t[o]:r[o]=t[o])}),r}const iT=Object.freeze(Object.defineProperty({__proto__:null,default:Qt,isPlainObject:kr},Symbol.toStringTag,{value:"Module"})),aT=["values","unit","step"],sT=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)=>S({},n,{[r.key]:r.val}),{})};function Jb(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=se(e,aT),i=sT(t),a=Object.keys(i);function s(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n})`}function l(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-r/100}${n})`}function c(m,w){const y=a.indexOf(w);return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n}) and (max-width:${(y!==-1&&typeof t[a[y]]=="number"?t[a[y]]:w)-r/100}${n})`}function d(m){return a.indexOf(m)+1`@media (min-width:${Kh[e]}px)`};function or(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||d0;return t.reduce((a,s,l)=>(a[i.up(i.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const i=r.breakpoints||d0;return Object.keys(t).reduce((a,s)=>{if(Object.keys(i.values||Kh).indexOf(s)!==-1){const l=i.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function Zb(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function ew(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function cT(e,...t){const n=Zb(e),r=[n,...t].reduce((o,i)=>Qt(o,i),{});return ew(Object.keys(n),r)}function uT(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i{e[o]!=null&&(n[o]=!0)}),n}function Hd({values:e,breakpoints:t,base:n}){const r=n||uT(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((a,s,l)=>(Array.isArray(e)?(a[s]=e[l]!=null?e[l]:e[i],i=l):typeof e=="object"?(a[s]=e[s]!=null?e[s]:e[i],i=s):a[s]=e,a),{})}function Z(e){if(typeof e!="string")throw new Error(Bo(7));return e.charAt(0).toUpperCase()+e.slice(1)}const dT=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"}));function wu(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function kc(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=wu(e,n)||r,t&&(o=t(o,r,e)),o}function yt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=wu(l,r)||{};return or(a,s,f=>{let m=kc(c,o,f);return f===m&&typeof f=="string"&&(m=kc(c,o,`${t}${f==="default"?"":Z(f)}`,f)),n===!1?m:{[n]:m}})};return i.propTypes={},i.filterProps=[t],i}function fT(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const pT={m:"margin",p:"padding"},hT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},f0={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},mT=fT(e=>{if(e.length>2)if(f0[e])e=f0[e];else return[e];const[t,n]=e.split(""),r=pT[t],o=hT[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),Yh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Xh=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Yh,...Xh];function _s(e,t,n,r){var o;const i=(o=wu(e,t,!1))!=null?o:n;return typeof i=="number"?a=>typeof a=="string"?a:i*a:Array.isArray(i)?a=>typeof a=="string"?a:i[a]:typeof i=="function"?i:()=>{}}function Qh(e){return _s(e,"spacing",8)}function Uo(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 gT(e,t){return n=>e.reduce((r,o)=>(r[o]=Uo(t,n),r),{})}function vT(e,t,n,r){if(t.indexOf(n)===-1)return null;const o=mT(n),i=gT(o,r),a=e[n];return or(e,a,i)}function tw(e,t){const n=Qh(e.theme);return Object.keys(e).map(r=>vT(e,t,r,n)).reduce(Fa,{})}function ht(e){return tw(e,Yh)}ht.propTypes={};ht.filterProps=Yh;function mt(e){return tw(e,Xh)}mt.propTypes={};mt.filterProps=Xh;function yT(e=8){if(e.mui)return e;const t=Qh({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function Su(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?Fa(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function On(e){return typeof e!="number"?e:`${e}px solid`}function Hn(e,t){return yt({prop:e,themeKey:"borders",transform:t})}const xT=Hn("border",On),bT=Hn("borderTop",On),wT=Hn("borderRight",On),ST=Hn("borderBottom",On),CT=Hn("borderLeft",On),kT=Hn("borderColor"),RT=Hn("borderTopColor"),PT=Hn("borderRightColor"),ET=Hn("borderBottomColor"),TT=Hn("borderLeftColor"),$T=Hn("outline",On),jT=Hn("outlineColor"),Cu=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=_s(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Uo(t,r)});return or(e,e.borderRadius,n)}return null};Cu.propTypes={};Cu.filterProps=["borderRadius"];Su(xT,bT,wT,ST,CT,kT,RT,PT,ET,TT,Cu,$T,jT);const ku=e=>{if(e.gap!==void 0&&e.gap!==null){const t=_s(e.theme,"spacing",8),n=r=>({gap:Uo(t,r)});return or(e,e.gap,n)}return null};ku.propTypes={};ku.filterProps=["gap"];const Ru=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=_s(e.theme,"spacing",8),n=r=>({columnGap:Uo(t,r)});return or(e,e.columnGap,n)}return null};Ru.propTypes={};Ru.filterProps=["columnGap"];const Pu=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=_s(e.theme,"spacing",8),n=r=>({rowGap:Uo(t,r)});return or(e,e.rowGap,n)}return null};Pu.propTypes={};Pu.filterProps=["rowGap"];const MT=yt({prop:"gridColumn"}),OT=yt({prop:"gridRow"}),IT=yt({prop:"gridAutoFlow"}),_T=yt({prop:"gridAutoColumns"}),LT=yt({prop:"gridAutoRows"}),AT=yt({prop:"gridTemplateColumns"}),NT=yt({prop:"gridTemplateRows"}),DT=yt({prop:"gridTemplateAreas"}),zT=yt({prop:"gridArea"});Su(ku,Ru,Pu,MT,OT,IT,_T,LT,AT,NT,DT,zT);function Ri(e,t){return t==="grey"?t:e}const BT=yt({prop:"color",themeKey:"palette",transform:Ri}),FT=yt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ri}),UT=yt({prop:"backgroundColor",themeKey:"palette",transform:Ri});Su(BT,FT,UT);function vn(e){return e<=1&&e!==0?`${e*100}%`:e}const WT=yt({prop:"width",transform:vn}),Jh=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,o;const i=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||Kh[n];return i?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:vn(n)}};return or(e,e.maxWidth,t)}return null};Jh.filterProps=["maxWidth"];const VT=yt({prop:"minWidth",transform:vn}),HT=yt({prop:"height",transform:vn}),qT=yt({prop:"maxHeight",transform:vn}),GT=yt({prop:"minHeight",transform:vn});yt({prop:"size",cssProperty:"width",transform:vn});yt({prop:"size",cssProperty:"height",transform:vn});const KT=yt({prop:"boxSizing"});Su(WT,Jh,VT,HT,qT,GT,KT);const Ls={border:{themeKey:"borders",transform:On},borderTop:{themeKey:"borders",transform:On},borderRight:{themeKey:"borders",transform:On},borderBottom:{themeKey:"borders",transform:On},borderLeft:{themeKey:"borders",transform:On},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:On},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Cu},color:{themeKey:"palette",transform:Ri},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ri},backgroundColor:{themeKey:"palette",transform:Ri},p:{style:mt},pt:{style:mt},pr:{style:mt},pb:{style:mt},pl:{style:mt},px:{style:mt},py:{style:mt},padding:{style:mt},paddingTop:{style:mt},paddingRight:{style:mt},paddingBottom:{style:mt},paddingLeft:{style:mt},paddingX:{style:mt},paddingY:{style:mt},paddingInline:{style:mt},paddingInlineStart:{style:mt},paddingInlineEnd:{style:mt},paddingBlock:{style:mt},paddingBlockStart:{style:mt},paddingBlockEnd:{style:mt},m:{style:ht},mt:{style:ht},mr:{style:ht},mb:{style:ht},ml:{style:ht},mx:{style:ht},my:{style:ht},margin:{style:ht},marginTop:{style:ht},marginRight:{style:ht},marginBottom:{style:ht},marginLeft:{style:ht},marginX:{style:ht},marginY:{style:ht},marginInline:{style:ht},marginInlineStart:{style:ht},marginInlineEnd:{style:ht},marginBlock:{style:ht},marginBlockStart:{style:ht},marginBlockEnd:{style:ht},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:ku},rowGap:{style:Pu},columnGap:{style:Ru},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:vn},maxWidth:{style:Jh},minWidth:{transform:vn},height:{transform:vn},maxHeight:{transform:vn},minHeight:{transform:vn},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function YT(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function XT(e,t){return typeof e=="function"?e(t):e}function nw(){function e(n,r,o,i){const a={[n]:r,theme:o},s=i[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:d,style:f}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const m=wu(o,c)||{};return f?f(a):or(a,r,y=>{let x=kc(m,d,y);return y===x&&typeof y=="string"&&(x=kc(m,d,`${n}${y==="default"?"":Z(y)}`,y)),l===!1?x:{[l]:x}})}function t(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const a=(r=i.unstable_sxConfig)!=null?r:Ls;function s(l){let c=l;if(typeof l=="function")c=l(i);else if(typeof l!="object")return l;if(!c)return null;const d=Zb(i.breakpoints),f=Object.keys(d);let m=d;return Object.keys(c).forEach(w=>{const y=XT(c[w],i);if(y!=null)if(typeof y=="object")if(a[w])m=Fa(m,e(w,y,i,a));else{const x=or({theme:i},y,k=>({[w]:k}));YT(x,y)?m[w]=t({sx:y,theme:i}):m=Fa(m,x)}else m=Fa(m,e(w,y,i,a))}),ew(f,m)}return Array.isArray(o)?o.map(s):s(o)}return t}const Zi=nw();Zi.filterProps=["sx"];function rw(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 QT=["breakpoints","palette","spacing","shape"];function ea(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=e,a=se(e,QT),s=Jb(n),l=yT(o);let c=Qt({breakpoints:s,direction:"ltr",components:{},palette:S({mode:"light"},r),spacing:l,shape:S({},lT,i)},a);return c.applyStyles=rw,c=t.reduce((d,f)=>Qt(d,f),c),c.unstable_sxConfig=S({},Ls,a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(f){return Zi({sx:f,theme:this})},c}const JT=Object.freeze(Object.defineProperty({__proto__:null,default:ea,private_createBreakpoints:Jb,unstable_applyStyles:rw},Symbol.toStringTag,{value:"Module"}));function ZT(e){return Object.keys(e).length===0}function ow(e=null){const t=p.useContext(Is);return!t||ZT(t)?e:t}const e$=ea();function Eu(e=e$){return ow(e)}function t$({styles:e,themeId:t,defaultTheme:n={}}){const r=Eu(n),o=typeof e=="function"?e(t&&r[t]||r):e;return u.jsx(Yb,{styles:o})}const n$=["sx"],r$=e=>{var t,n;const r={systemProps:{},otherProps:{}},o=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:Ls;return Object.keys(e).forEach(i=>{o[i]?r.systemProps[i]=e[i]:r.otherProps[i]=e[i]}),r};function Tu(e){const{sx:t}=e,n=se(e,n$),{systemProps:r,otherProps:o}=r$(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...a)=>{const s=t(...a);return kr(s)?S({},r,s):r}:i=S({},r,t),S({},o,{sx:i})}const o$=Object.freeze(Object.defineProperty({__proto__:null,default:Zi,extendSxProp:Tu,unstable_createStyleFunctionSx:nw,unstable_defaultSxConfig:Ls},Symbol.toStringTag,{value:"Module"})),p0=e=>e,i$=()=>{let e=p0;return{configure(t){e=t},generate(t){return e(t)},reset(){e=p0}}},Zh=i$();function iw(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ts!=="theme"&&s!=="sx"&&s!=="as"})(Zi);return p.forwardRef(function(l,c){const d=Eu(n),f=Tu(l),{className:m,component:w="div"}=f,y=se(f,a$);return u.jsx(i,S({as:w,ref:c,className:le(m,o?o(r):r),theme:t&&d[t]||d},y))})}const aw={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 be(e,t,n="Mui"){const r=aw[t];return r?`${n}-${r}`:`${Zh.generate(e)}-${t}`}function we(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=be(e,o,n)}),r}var sw={exports:{}},qe={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var em=Symbol.for("react.element"),tm=Symbol.for("react.portal"),$u=Symbol.for("react.fragment"),ju=Symbol.for("react.strict_mode"),Mu=Symbol.for("react.profiler"),Ou=Symbol.for("react.provider"),Iu=Symbol.for("react.context"),l$=Symbol.for("react.server_context"),_u=Symbol.for("react.forward_ref"),Lu=Symbol.for("react.suspense"),Au=Symbol.for("react.suspense_list"),Nu=Symbol.for("react.memo"),Du=Symbol.for("react.lazy"),c$=Symbol.for("react.offscreen"),lw;lw=Symbol.for("react.module.reference");function qn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case em:switch(e=e.type,e){case $u:case Mu:case ju:case Lu:case Au:return e;default:switch(e=e&&e.$$typeof,e){case l$:case Iu:case _u:case Du:case Nu:case Ou:return e;default:return t}}case tm:return t}}}qe.ContextConsumer=Iu;qe.ContextProvider=Ou;qe.Element=em;qe.ForwardRef=_u;qe.Fragment=$u;qe.Lazy=Du;qe.Memo=Nu;qe.Portal=tm;qe.Profiler=Mu;qe.StrictMode=ju;qe.Suspense=Lu;qe.SuspenseList=Au;qe.isAsyncMode=function(){return!1};qe.isConcurrentMode=function(){return!1};qe.isContextConsumer=function(e){return qn(e)===Iu};qe.isContextProvider=function(e){return qn(e)===Ou};qe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===em};qe.isForwardRef=function(e){return qn(e)===_u};qe.isFragment=function(e){return qn(e)===$u};qe.isLazy=function(e){return qn(e)===Du};qe.isMemo=function(e){return qn(e)===Nu};qe.isPortal=function(e){return qn(e)===tm};qe.isProfiler=function(e){return qn(e)===Mu};qe.isStrictMode=function(e){return qn(e)===ju};qe.isSuspense=function(e){return qn(e)===Lu};qe.isSuspenseList=function(e){return qn(e)===Au};qe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===$u||e===Mu||e===ju||e===Lu||e===Au||e===c$||typeof e=="object"&&e!==null&&(e.$$typeof===Du||e.$$typeof===Nu||e.$$typeof===Ou||e.$$typeof===Iu||e.$$typeof===_u||e.$$typeof===lw||e.getModuleId!==void 0)};qe.typeOf=qn;sw.exports=qe;var h0=sw.exports;const u$=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function cw(e){const t=`${e}`.match(u$);return t&&t[1]||""}function uw(e,t=""){return e.displayName||e.name||cw(e)||t}function m0(e,t,n){const r=uw(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function d$(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return uw(e,"Component");if(typeof e=="object")switch(e.$$typeof){case h0.ForwardRef:return m0(e,e.render,"ForwardRef");case h0.Memo:return m0(e,e.type,"memo");default:return}}}const f$=Object.freeze(Object.defineProperty({__proto__:null,default:d$,getFunctionName:cw},Symbol.toStringTag,{value:"Module"})),p$=["ownerState"],h$=["variants"],m$=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function g$(e){return Object.keys(e).length===0}function v$(e){return typeof e=="string"&&e.charCodeAt(0)>96}function qd(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const y$=ea(),x$=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function pl({defaultTheme:e,theme:t,themeId:n}){return g$(t)?e:t[n]||t}function b$(e){return e?(t,n)=>n[e]:null}function Ul(e,t){let{ownerState:n}=t,r=se(t,p$);const o=typeof e=="function"?e(S({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(i=>Ul(i,S({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let s=se(o,h$);return i.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props(S({ownerState:n},r,n)):Object.keys(l.props).forEach(d=>{(n==null?void 0:n[d])!==l.props[d]&&r[d]!==l.props[d]&&(c=!1)}),c&&(Array.isArray(s)||(s=[s]),s.push(typeof l.style=="function"?l.style(S({ownerState:n},r,n)):l.style))}),s}return o}function w$(e={}){const{themeId:t,defaultTheme:n=y$,rootShouldForwardProp:r=qd,slotShouldForwardProp:o=qd}=e,i=a=>Zi(S({},a,{theme:pl(S({},a,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(a,s={})=>{Xb(a,R=>R.filter(E=>!(E!=null&&E.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:d,skipSx:f,overridesResolver:m=b$(x$(c))}=s,w=se(s,m$),y=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,x=f||!1;let k,g=qd;c==="Root"||c==="root"?g=r:c?g=o:v$(a)&&(g=void 0);const h=Gh(a,S({shouldForwardProp:g,label:k},w)),b=R=>typeof R=="function"&&R.__emotion_real!==R||kr(R)?E=>Ul(R,S({},E,{theme:pl({theme:E.theme,defaultTheme:n,themeId:t})})):R,C=(R,...E)=>{let P=b(R);const M=E?E.map(b):[];l&&m&&M.push(F=>{const V=pl(S({},F,{defaultTheme:n,themeId:t}));if(!V.components||!V.components[l]||!V.components[l].styleOverrides)return null;const U=V.components[l].styleOverrides,q={};return Object.entries(U).forEach(([ee,J])=>{q[ee]=Ul(J,S({},F,{theme:V}))}),m(F,q)}),l&&!y&&M.push(F=>{var V;const U=pl(S({},F,{defaultTheme:n,themeId:t})),q=U==null||(V=U.components)==null||(V=V[l])==null?void 0:V.variants;return Ul({variants:q},S({},F,{theme:U}))}),x||M.push(i);const D=M.length-E.length;if(Array.isArray(R)&&D>0){const F=new Array(D).fill("");P=[...R,...F],P.raw=[...R.raw,...F]}const O=h(P,...M);return a.muiName&&(O.muiName=a.muiName),O};return h.withConfig&&(C.withConfig=h.withConfig),C}}const dw=w$();function nm(e,t){const n=S({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=S({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},i=t[r];n[r]={},!i||!Object.keys(i)?n[r]=o:!o||!Object.keys(o)?n[r]=i:(n[r]=S({},i),Object.keys(o).forEach(a=>{n[r][a]=nm(o[a],i[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function S$(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:nm(t.components[n].defaultProps,r)}function rm({props:e,name:t,defaultTheme:n,themeId:r}){let o=Eu(n);return r&&(o=o[r]||o),S$({theme:o,name:t,props:e})}const Sn=typeof window<"u"?p.useLayoutEffect:p.useEffect;function C$(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const k$=Object.freeze(Object.defineProperty({__proto__:null,default:C$},Symbol.toStringTag,{value:"Module"}));function yp(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function ta(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function R$(e,t){return()=>null}function Ua(e,t){var n,r;return p.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}function St(e){return e&&e.ownerDocument||document}function Fn(e){return St(e).defaultView||window}function P$(e,t){return()=>null}function Rc(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let g0=0;function E$(e){const[t,n]=p.useState(e),r=e||t;return p.useEffect(()=>{t==null&&(g0+=1,n(`mui-${g0}`))},[t]),r}const v0=Gl.useId;function As(e){if(v0!==void 0){const t=v0();return e??t}return E$(e)}function T$(e,t,n,r,o){return null}function vs({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=p.useRef(e!==void 0),[i,a]=p.useState(t),s=o?e:i,l=p.useCallback(c=>{o||a(c)},[]);return[s,l]}function Yt(e){const t=p.useRef(e);return Sn(()=>{t.current=e}),p.useRef((...n)=>(0,t.current)(...n)).current}function ct(...e){return p.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Rc(n,t)})},e)}const y0={};function $$(e,t){const n=p.useRef(y0);return n.current===y0&&(n.current=e(t)),n}const j$=[];function M$(e){p.useEffect(e,j$)}class Ns{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Ns}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function To(){const e=$$(Ns.create).current;return M$(e.disposeEffect),e}let zu=!0,xp=!1;const O$=new Ns,I$={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 _$(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&I$[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function L$(e){e.metaKey||e.altKey||e.ctrlKey||(zu=!0)}function Gd(){zu=!1}function A$(){this.visibilityState==="hidden"&&xp&&(zu=!0)}function N$(e){e.addEventListener("keydown",L$,!0),e.addEventListener("mousedown",Gd,!0),e.addEventListener("pointerdown",Gd,!0),e.addEventListener("touchstart",Gd,!0),e.addEventListener("visibilitychange",A$,!0)}function D$(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return zu||_$(t)}function om(){const e=p.useCallback(o=>{o!=null&&N$(o.ownerDocument)},[]),t=p.useRef(!1);function n(){return t.current?(xp=!0,O$.start(100,()=>{xp=!1}),t.current=!1,!0):!1}function r(o){return D$(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function fw(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let ti;function pw(){if(ti)return ti;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),ti="reverse",e.scrollLeft>0?ti="default":(e.scrollLeft=1,e.scrollLeft===0&&(ti="negative")),document.body.removeChild(e),ti}function z$(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(pw()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const hw=e=>{const t=p.useRef({});return p.useEffect(()=>{t.current=e}),t.current};function Se(e,t,n=void 0){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((i,a)=>{if(a){const s=t(a);s!==""&&i.push(s),n&&n[a]&&i.push(n[a])}return i},[]).join(" ")}),r}const mw=p.createContext(null);function gw(){return p.useContext(mw)}const B$=typeof Symbol=="function"&&Symbol.for,F$=B$?Symbol.for("mui.nested"):"__THEME_NESTED__";function U$(e,t){return typeof t=="function"?t(e):S({},e,t)}function W$(e){const{children:t,theme:n}=e,r=gw(),o=p.useMemo(()=>{const i=r===null?n:U$(r,n);return i!=null&&(i[F$]=r!==null),i},[n,r]);return u.jsx(mw.Provider,{value:o,children:t})}const V$=["value"],vw=p.createContext();function H$(e){let{value:t}=e,n=se(e,V$);return u.jsx(vw.Provider,S({value:t??!0},n))}const Ds=()=>{const e=p.useContext(vw);return e??!1},x0={};function b0(e,t,n,r=!1){return p.useMemo(()=>{const o=e&&t[e]||t;if(typeof n=="function"){const i=n(o),a=e?S({},t,{[e]:i}):i;return r?()=>a:a}return e?S({},t,{[e]:n}):S({},t,n)},[e,t,n,r])}function q$(e){const{children:t,theme:n,themeId:r}=e,o=ow(x0),i=gw()||x0,a=b0(r,o,n),s=b0(r,i,n,!0),l=a.direction==="rtl";return u.jsx(W$,{theme:s,children:u.jsx(Is.Provider,{value:a,children:u.jsx(H$,{value:l,children:t})})})}const G$=["className","component","disableGutters","fixed","maxWidth","classes"],K$=ea(),Y$=dw("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Z(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),X$=e=>rm({props:e,name:"MuiContainer",defaultTheme:K$}),Q$=(e,t)=>{const n=l=>be(t,l),{classes:r,fixed:o,disableGutters:i,maxWidth:a}=e,s={root:["root",a&&`maxWidth${Z(String(a))}`,o&&"fixed",i&&"disableGutters"]};return Se(s,n,r)};function J$(e={}){const{createStyledComponent:t=Y$,useThemeProps:n=X$,componentName:r="MuiContainer"}=e,o=t(({theme:a,ownerState:s})=>S({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!s.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}),({theme:a,ownerState:s})=>s.fixed&&Object.keys(a.breakpoints.values).reduce((l,c)=>{const d=c,f=a.breakpoints.values[d];return f!==0&&(l[a.breakpoints.up(d)]={maxWidth:`${f}${a.breakpoints.unit}`}),l},{}),({theme:a,ownerState:s})=>S({},s.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},s.maxWidth&&s.maxWidth!=="xs"&&{[a.breakpoints.up(s.maxWidth)]:{maxWidth:`${a.breakpoints.values[s.maxWidth]}${a.breakpoints.unit}`}}));return p.forwardRef(function(s,l){const c=n(s),{className:d,component:f="div",disableGutters:m=!1,fixed:w=!1,maxWidth:y="lg"}=c,x=se(c,G$),k=S({},c,{component:f,disableGutters:m,fixed:w,maxWidth:y}),g=Q$(k,r);return u.jsx(o,S({as:f,ownerState:k,className:le(g.root,d),ref:l},x))})}const Z$=["component","direction","spacing","divider","children","className","useFlexGap"],e4=ea(),t4=dw("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function n4(e){return rm({props:e,name:"MuiStack",defaultTheme:e4})}function r4(e,t){const n=p.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],i4=({ownerState:e,theme:t})=>{let n=S({display:"flex",flexDirection:"column"},or({theme:t},Hd({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=Qh(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),i=Hd({values:e.direction,base:o}),a=Hd({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,c,d)=>{if(!i[l]){const m=c>0?i[d[c-1]]:"column";i[l]=m}}),n=Qt(n,or({theme:t},a,(l,c)=>e.useFlexGap?{gap:Uo(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${o4(c?i[c]:e.direction)}`]:Uo(r,l)}}))}return n=cT(t.breakpoints,n),n};function a4(e={}){const{createStyledComponent:t=t4,useThemeProps:n=n4,componentName:r="MuiStack"}=e,o=()=>Se({root:["root"]},l=>be(r,l),{}),i=t(i4);return p.forwardRef(function(l,c){const d=n(l),f=Tu(d),{component:m="div",direction:w="column",spacing:y=0,divider:x,children:k,className:g,useFlexGap:h=!1}=f,b=se(f,Z$),C={direction:w,spacing:y,useFlexGap:h},R=o();return u.jsx(i,S({as:m,ownerState:C,ref:c,className:le(R.root,g)},b,{children:x?r4(k,x):k}))})}function s4(e,t){return S({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var xt={},yw={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(yw);var Te=yw.exports;const l4=Lr(XP),c4=Lr(k$);var xw=Te;Object.defineProperty(xt,"__esModule",{value:!0});var Fe=xt.alpha=Cw;xt.blend=w4;xt.colorChannel=void 0;var Pc=xt.darken=am;xt.decomposeColor=Un;var u4=xt.emphasize=kw,d4=xt.getContrastRatio=g4;xt.getLuminance=Tc;xt.hexToRgb=bw;xt.hslToRgb=Sw;var Ec=xt.lighten=sm;xt.private_safeAlpha=v4;xt.private_safeColorChannel=void 0;xt.private_safeDarken=y4;xt.private_safeEmphasize=b4;xt.private_safeLighten=x4;xt.recomposeColor=na;xt.rgbToHex=m4;var w0=xw(l4),f4=xw(c4);function im(e,t=0,n=1){return(0,f4.default)(e,t,n)}function bw(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,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function p4(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function Un(e){if(e.type)return e;if(e.charAt(0)==="#")return Un(bw(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,w0.default)(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error((0,w0.default)(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const ww=e=>{const t=Un(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};xt.colorChannel=ww;const h4=(e,t)=>{try{return ww(e)}catch{return e}};xt.private_safeColorChannel=h4;function na(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function m4(e){if(e.indexOf("#")===0)return e;const{values:t}=Un(e);return`#${t.map((n,r)=>p4(r===3?Math.round(255*n):n)).join("")}`}function Sw(e){e=Un(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(c,d=(c+n/30)%12)=>o-i*Math.max(Math.min(d-3,9-d,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),na({type:s,values:l})}function Tc(e){e=Un(e);let t=e.type==="hsl"||e.type==="hsla"?Un(Sw(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function g4(e,t){const n=Tc(e),r=Tc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Cw(e,t){return e=Un(e),t=im(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,na(e)}function v4(e,t,n){try{return Cw(e,t)}catch{return e}}function am(e,t){if(e=Un(e),t=im(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return na(e)}function y4(e,t,n){try{return am(e,t)}catch{return e}}function sm(e,t){if(e=Un(e),t=im(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return na(e)}function x4(e,t,n){try{return sm(e,t)}catch{return e}}function kw(e,t=.15){return Tc(e)>.5?am(e,t):sm(e,t)}function b4(e,t,n){try{return kw(e,t)}catch{return e}}function w4(e,t,n,r=1){const o=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),i=Un(e),a=Un(t),s=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return na({type:"rgb",values:s})}const S4=["mode","contrastThreshold","tonalOffset"],S0={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:ps.white,default:ps.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}},Kd={text:{primary:ps.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:ps.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}};function C0(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Ec(e.main,o):t==="dark"&&(e.dark=Pc(e.main,i)))}function C4(e="light"){return e==="dark"?{main:Jo[200],light:Jo[50],dark:Jo[400]}:{main:Jo[700],light:Jo[400],dark:Jo[800]}}function k4(e="light"){return e==="dark"?{main:Qo[200],light:Qo[50],dark:Qo[400]}:{main:Qo[500],light:Qo[300],dark:Qo[700]}}function R4(e="light"){return e==="dark"?{main:Xo[500],light:Xo[300],dark:Xo[700]}:{main:Xo[700],light:Xo[400],dark:Xo[800]}}function P4(e="light"){return e==="dark"?{main:Zo[400],light:Zo[300],dark:Zo[700]}:{main:Zo[700],light:Zo[500],dark:Zo[900]}}function E4(e="light"){return e==="dark"?{main:ei[400],light:ei[300],dark:ei[700]}:{main:ei[800],light:ei[500],dark:ei[900]}}function T4(e="light"){return e==="dark"?{main:va[400],light:va[300],dark:va[700]}:{main:"#ed6c02",light:va[500],dark:va[900]}}function $4(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=se(e,S4),i=e.primary||C4(t),a=e.secondary||k4(t),s=e.error||R4(t),l=e.info||P4(t),c=e.success||E4(t),d=e.warning||T4(t);function f(x){return d4(x,Kd.text.primary)>=n?Kd.text.primary:S0.text.primary}const m=({color:x,name:k,mainShade:g=500,lightShade:h=300,darkShade:b=700})=>{if(x=S({},x),!x.main&&x[g]&&(x.main=x[g]),!x.hasOwnProperty("main"))throw new Error(Bo(11,k?` (${k})`:"",g));if(typeof x.main!="string")throw new Error(Bo(12,k?` (${k})`:"",JSON.stringify(x.main)));return C0(x,"light",h,r),C0(x,"dark",b,r),x.contrastText||(x.contrastText=f(x.main)),x},w={dark:Kd,light:S0};return Qt(S({common:S({},ps),mode:t,primary:m({color:i,name:"primary"}),secondary:m({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:s,name:"error"}),warning:m({color:d,name:"warning"}),info:m({color:l,name:"info"}),success:m({color:c,name:"success"}),grey:YP,contrastThreshold:n,getContrastText:f,augmentColor:m,tonalOffset:r},w[t]),o)}const j4=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function M4(e){return Math.round(e*1e5)/1e5}const k0={textTransform:"uppercase"},R0='"Roboto", "Helvetica", "Arial", sans-serif';function O4(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=R0,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:d,pxToRem:f}=n,m=se(n,j4),w=o/14,y=f||(g=>`${g/c*w}rem`),x=(g,h,b,C,R)=>S({fontFamily:r,fontWeight:g,fontSize:y(h),lineHeight:b},r===R0?{letterSpacing:`${M4(C/h)}em`}:{},R,d),k={h1:x(i,96,1.167,-1.5),h2:x(i,60,1.2,-.5),h3:x(a,48,1.167,0),h4:x(a,34,1.235,.25),h5:x(a,24,1.334,0),h6:x(s,20,1.6,.15),subtitle1:x(a,16,1.75,.15),subtitle2:x(s,14,1.57,.1),body1:x(a,16,1.5,.15),body2:x(a,14,1.43,.15),button:x(s,14,1.75,.4,k0),caption:x(a,12,1.66,.4),overline:x(a,12,2.66,1,k0),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Qt(S({htmlFontSize:c,pxToRem:y,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},k),m,{clone:!1})}const I4=.2,_4=.14,L4=.12;function it(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${I4})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${_4})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${L4})`].join(",")}const A4=["none",it(0,2,1,-1,0,1,1,0,0,1,3,0),it(0,3,1,-2,0,2,2,0,0,1,5,0),it(0,3,3,-2,0,3,4,0,0,1,8,0),it(0,2,4,-1,0,4,5,0,0,1,10,0),it(0,3,5,-1,0,5,8,0,0,1,14,0),it(0,3,5,-1,0,6,10,0,0,1,18,0),it(0,4,5,-2,0,7,10,1,0,2,16,1),it(0,5,5,-3,0,8,10,1,0,3,14,2),it(0,5,6,-3,0,9,12,1,0,3,16,2),it(0,6,6,-3,0,10,14,1,0,4,18,3),it(0,6,7,-4,0,11,15,1,0,4,20,3),it(0,7,8,-4,0,12,17,2,0,5,22,4),it(0,7,8,-4,0,13,19,2,0,5,24,4),it(0,7,9,-4,0,14,21,2,0,5,26,4),it(0,8,9,-5,0,15,22,2,0,6,28,5),it(0,8,10,-5,0,16,24,2,0,6,30,5),it(0,8,11,-5,0,17,26,2,0,6,32,5),it(0,9,11,-5,0,18,28,2,0,7,34,6),it(0,9,12,-6,0,19,29,2,0,7,36,6),it(0,10,13,-6,0,20,31,3,0,8,38,7),it(0,10,13,-6,0,21,33,3,0,8,40,7),it(0,10,14,-6,0,22,35,3,0,8,42,7),it(0,11,14,-7,0,23,36,3,0,9,44,8),it(0,11,15,-7,0,24,38,3,0,9,46,8)],N4=["duration","easing","delay"],D4={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)"},z4={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function P0(e){return`${Math.round(e)}ms`}function B4(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function F4(e){const t=S({},D4,e.easing),n=S({},z4,e.duration);return S({getAutoHeightDuration:B4,create:(o=["all"],i={})=>{const{duration:a=n.standard,easing:s=t.easeInOut,delay:l=0}=i;return se(i,N4),(Array.isArray(o)?o:[o]).map(c=>`${c} ${typeof a=="string"?a:P0(a)} ${s} ${typeof l=="string"?l:P0(l)}`).join(",")}},e,{easing:t,duration:n})}const U4={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},W4=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function zs(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=e,a=se(e,W4);if(e.vars)throw new Error(Bo(18));const s=$4(r),l=ea(e);let c=Qt(l,{mixins:s4(l.breakpoints,n),palette:s,shadows:A4.slice(),typography:O4(s,i),transitions:F4(o),zIndex:S({},U4)});return c=Qt(c,a),c=t.reduce((d,f)=>Qt(d,f),c),c.unstable_sxConfig=S({},Ls,a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(f){return Zi({sx:f,theme:this})},c}const Bu=zs();function mo(){const e=Eu(Bu);return e[Fo]||e}function ke({props:e,name:t}){return rm({props:e,name:t,defaultTheme:Bu,themeId:Fo})}var Bs={},Yd={exports:{}},E0;function V4(){return E0||(E0=1,function(e){function t(n,r){if(n==null)return{};var o={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(r.indexOf(i)>=0)continue;o[i]=n[i]}return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Yd)),Yd.exports}const Rw=Lr(oT),H4=Lr(iT),q4=Lr(dT),G4=Lr(f$),K4=Lr(JT),Y4=Lr(o$);var ra=Te;Object.defineProperty(Bs,"__esModule",{value:!0});var X4=Bs.default=c5;Bs.shouldForwardProp=Wl;Bs.systemDefaultTheme=void 0;var Tn=ra(Hb()),bp=ra(V4()),T0=r5(Rw),Q4=H4;ra(q4);ra(G4);var J4=ra(K4),Z4=ra(Y4);const e5=["ownerState"],t5=["variants"],n5=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Pw(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Pw=function(r){return r?n:t})(e)}function r5(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Pw(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function o5(e){return Object.keys(e).length===0}function i5(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const a5=Bs.systemDefaultTheme=(0,J4.default)(),s5=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function hl({defaultTheme:e,theme:t,themeId:n}){return o5(t)?e:t[n]||t}function l5(e){return e?(t,n)=>n[e]:null}function Vl(e,t){let{ownerState:n}=t,r=(0,bp.default)(t,e5);const o=typeof e=="function"?e((0,Tn.default)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(i=>Vl(i,(0,Tn.default)({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let s=(0,bp.default)(o,t5);return i.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,Tn.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(d=>{(n==null?void 0:n[d])!==l.props[d]&&r[d]!==l.props[d]&&(c=!1)}),c&&(Array.isArray(s)||(s=[s]),s.push(typeof l.style=="function"?l.style((0,Tn.default)({ownerState:n},r,n)):l.style))}),s}return o}function c5(e={}){const{themeId:t,defaultTheme:n=a5,rootShouldForwardProp:r=Wl,slotShouldForwardProp:o=Wl}=e,i=a=>(0,Z4.default)((0,Tn.default)({},a,{theme:hl((0,Tn.default)({},a,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(a,s={})=>{(0,T0.internal_processStyles)(a,R=>R.filter(E=>!(E!=null&&E.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:d,skipSx:f,overridesResolver:m=l5(s5(c))}=s,w=(0,bp.default)(s,n5),y=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,x=f||!1;let k,g=Wl;c==="Root"||c==="root"?g=r:c?g=o:i5(a)&&(g=void 0);const h=(0,T0.default)(a,(0,Tn.default)({shouldForwardProp:g,label:k},w)),b=R=>typeof R=="function"&&R.__emotion_real!==R||(0,Q4.isPlainObject)(R)?E=>Vl(R,(0,Tn.default)({},E,{theme:hl({theme:E.theme,defaultTheme:n,themeId:t})})):R,C=(R,...E)=>{let P=b(R);const M=E?E.map(b):[];l&&m&&M.push(F=>{const V=hl((0,Tn.default)({},F,{defaultTheme:n,themeId:t}));if(!V.components||!V.components[l]||!V.components[l].styleOverrides)return null;const U=V.components[l].styleOverrides,q={};return Object.entries(U).forEach(([ee,J])=>{q[ee]=Vl(J,(0,Tn.default)({},F,{theme:V}))}),m(F,q)}),l&&!y&&M.push(F=>{var V;const U=hl((0,Tn.default)({},F,{defaultTheme:n,themeId:t})),q=U==null||(V=U.components)==null||(V=V[l])==null?void 0:V.variants;return Vl({variants:q},(0,Tn.default)({},F,{theme:U}))}),x||M.push(i);const D=M.length-E.length;if(Array.isArray(R)&&D>0){const F=new Array(D).fill("");P=[...R,...F],P.raw=[...R.raw,...F]}const O=h(P,...M);return a.muiName&&(O.muiName=a.muiName),O};return h.withConfig&&(C.withConfig=h.withConfig),C}}function Ew(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Vt=e=>Ew(e)&&e!=="classes",ie=X4({themeId:Fo,defaultTheme:Bu,rootShouldForwardProp:Vt}),u5=["theme"];function lm(e){let{theme:t}=e,n=se(e,u5);const r=t[Fo];return u.jsx(q$,S({},n,{themeId:r?Fo:void 0,theme:r||t}))}const $0=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function d5(e){return be("MuiSvgIcon",e)}we("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const f5=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],p5=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Z(t)}`,`fontSize${Z(n)}`]};return Se(o,d5,r)},h5=ie("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Z(n.color)}`],t[`fontSize${Z(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,i,a,s,l,c,d,f,m,w,y;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((i=e.typography)==null||(a=i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem",medium:((s=e.typography)==null||(l=s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem",large:((c=e.typography)==null||(d=c.pxToRem)==null?void 0:d.call(c,35))||"2.1875rem"}[t.fontSize],color:(f=(m=(e.vars||e).palette)==null||(m=m[t.color])==null?void 0:m.main)!=null?f:{action:(w=(e.vars||e).palette)==null||(w=w.action)==null?void 0:w.active,disabled:(y=(e.vars||e).palette)==null||(y=y.action)==null?void 0:y.disabled,inherit:void 0}[t.color]}}),wp=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:f,viewBox:m="0 0 24 24"}=r,w=se(r,f5),y=p.isValidElement(o)&&o.type==="svg",x=S({},r,{color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:m,hasSvgAsChild:y}),k={};d||(k.viewBox=m);const g=p5(x);return u.jsxs(h5,S({as:s,className:le(g.root,i),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},k,w,y&&o.props,{ownerState:x,children:[y?o.props.children:o,f?u.jsx("title",{children:f}):null]}))});wp.muiName="SvgIcon";function Ht(e,t){function n(r,o){return u.jsx(wp,S({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return n.muiName=wp.muiName,p.memo(p.forwardRef(n))}const m5={configure:e=>{Zh.configure(e)}},g5=Object.freeze(Object.defineProperty({__proto__:null,capitalize:Z,createChainedFunction:yp,createSvgIcon:Ht,debounce:ta,deprecatedPropType:R$,isMuiElement:Ua,ownerDocument:St,ownerWindow:Fn,requirePropFactory:P$,setRef:Rc,unstable_ClassNameGenerator:m5,unstable_useEnhancedEffect:Sn,unstable_useId:As,unsupportedProp:T$,useControlled:vs,useEventCallback:Yt,useForkRef:ct,useIsFocusVisible:om},Symbol.toStringTag,{value:"Module"}));var Ke={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var cm=Symbol.for("react.element"),um=Symbol.for("react.portal"),Fu=Symbol.for("react.fragment"),Uu=Symbol.for("react.strict_mode"),Wu=Symbol.for("react.profiler"),Vu=Symbol.for("react.provider"),Hu=Symbol.for("react.context"),v5=Symbol.for("react.server_context"),qu=Symbol.for("react.forward_ref"),Gu=Symbol.for("react.suspense"),Ku=Symbol.for("react.suspense_list"),Yu=Symbol.for("react.memo"),Xu=Symbol.for("react.lazy"),y5=Symbol.for("react.offscreen"),Tw;Tw=Symbol.for("react.module.reference");function Gn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case cm:switch(e=e.type,e){case Fu:case Wu:case Uu:case Gu:case Ku:return e;default:switch(e=e&&e.$$typeof,e){case v5:case Hu:case qu:case Xu:case Yu:case Vu:return e;default:return t}}case um:return t}}}Ke.ContextConsumer=Hu;Ke.ContextProvider=Vu;Ke.Element=cm;Ke.ForwardRef=qu;Ke.Fragment=Fu;Ke.Lazy=Xu;Ke.Memo=Yu;Ke.Portal=um;Ke.Profiler=Wu;Ke.StrictMode=Uu;Ke.Suspense=Gu;Ke.SuspenseList=Ku;Ke.isAsyncMode=function(){return!1};Ke.isConcurrentMode=function(){return!1};Ke.isContextConsumer=function(e){return Gn(e)===Hu};Ke.isContextProvider=function(e){return Gn(e)===Vu};Ke.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===cm};Ke.isForwardRef=function(e){return Gn(e)===qu};Ke.isFragment=function(e){return Gn(e)===Fu};Ke.isLazy=function(e){return Gn(e)===Xu};Ke.isMemo=function(e){return Gn(e)===Yu};Ke.isPortal=function(e){return Gn(e)===um};Ke.isProfiler=function(e){return Gn(e)===Wu};Ke.isStrictMode=function(e){return Gn(e)===Uu};Ke.isSuspense=function(e){return Gn(e)===Gu};Ke.isSuspenseList=function(e){return Gn(e)===Ku};Ke.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Fu||e===Wu||e===Uu||e===Gu||e===Ku||e===y5||typeof e=="object"&&e!==null&&(e.$$typeof===Xu||e.$$typeof===Yu||e.$$typeof===Vu||e.$$typeof===Hu||e.$$typeof===qu||e.$$typeof===Tw||e.getModuleId!==void 0)};Ke.typeOf=Gn;function Qu(e){return ke}function Sp(e,t){return Sp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Sp(e,t)}function $w(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Sp(e,t)}const j0={disabled:!1},$c=nn.createContext(null);var x5=function(t){return t.scrollTop},ja="unmounted",Co="exited",ko="entering",ri="entered",Cp="exiting",ar=function(e){$w(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=Co,i.appearStatus=ko):l=ri:r.unmountOnExit||r.mountOnEnter?l=ja:l=Co,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===ja?{status:Co}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==ko&&a!==ri&&(i=ko):(a===ko||a===ri)&&(i=Cp)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===ko){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:dl.findDOMNode(this);a&&x5(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Co&&this.setState({status:ja})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[dl.findDOMNode(this),s],c=l[0],d=l[1],f=this.getTimeouts(),m=s?f.appear:f.enter;if(!o&&!a||j0.disabled){this.safeSetState({status:ri},function(){i.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:ko},function(){i.props.onEntering(c,d),i.onTransitionEnd(m,function(){i.safeSetState({status:ri},function(){i.props.onEntered(c,d)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:dl.findDOMNode(this);if(!i||j0.disabled){this.safeSetState({status:Co},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Cp},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Co},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:dl.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],d=l[1];this.props.addEndListener(c,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===ja)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=se(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return nn.createElement($c.Provider,{value:null},typeof a=="function"?a(o,s):nn.cloneElement(nn.Children.only(a),s))},t}(nn.Component);ar.contextType=$c;ar.propTypes={};function ni(){}ar.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ni,onEntering:ni,onEntered:ni,onExit:ni,onExiting:ni,onExited:ni};ar.UNMOUNTED=ja;ar.EXITED=Co;ar.ENTERING=ko;ar.ENTERED=ri;ar.EXITING=Cp;function b5(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dm(e,t){var n=function(i){return t&&p.isValidElement(i)?t(i):i},r=Object.create(null);return e&&p.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function w5(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(r[l])for(a=0;ae.scrollTop;function Ai(e,t){var n,r;const{timeout:o,easing:i,style:a={}}=e;return{duration:(n=a.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=a.transitionTimingFunction)!=null?r:typeof i=="object"?i[t.mode]:i,delay:a.transitionDelay}}function P5(e){return be("MuiPaper",e)}we("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const E5=["className","component","elevation","square","variant"],T5=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Se(i,P5,o)},$5=ie("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return S({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&S({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Fe("#fff",$0(t.elevation))}, ${Fe("#fff",$0(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),En=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiPaper"}),{className:o,component:i="div",elevation:a=1,square:s=!1,variant:l="elevation"}=r,c=se(r,E5),d=S({},r,{component:i,elevation:a,square:s,variant:l}),f=T5(d);return u.jsx($5,S({as:i,ownerState:d,className:le(f.root,o),ref:n},c))});function Ni(e){return typeof e=="string"}function vi(e,t,n){return e===void 0||Ni(e)?t:S({},t,{ownerState:S({},t.ownerState,n)})}const j5={disableDefaultClasses:!1},M5=p.createContext(j5);function O5(e){const{disableDefaultClasses:t}=p.useContext(M5);return n=>t?"":e(n)}function jc(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 jw(e,t,n){return typeof e=="function"?e(t,n):e}function M0(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 Mw(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const w=le(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),y=S({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),x=S({},n,o,r);return w.length>0&&(x.className=w),Object.keys(y).length>0&&(x.style=y),{props:x,internalRef:void 0}}const a=jc(S({},o,r)),s=M0(r),l=M0(o),c=t(a),d=le(c==null?void 0:c.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),f=S({},c==null?void 0:c.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),m=S({},c,n,l,s);return d.length>0&&(m.className=d),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:c.ref}}const I5=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function fn(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1}=e,a=se(e,I5),s=i?{}:jw(r,o),{props:l,internalRef:c}=Mw(S({},a,{externalSlotProps:s})),d=ct(c,s==null?void 0:s.ref,(t=e.additionalProps)==null?void 0:t.ref);return vi(n,S({},l,{ref:d}),o)}const _5=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],L5=["component","slots","slotProps"],A5=["component"];function kp(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:a,internalForwardedProps:s}=t,l=se(t,_5),{component:c,slots:d={[e]:void 0},slotProps:f={[e]:void 0}}=i,m=se(i,L5),w=d[e]||r,y=jw(f[e],o),x=Mw(S({className:n},l,{externalForwardedProps:e==="root"?m:void 0,externalSlotProps:y})),{props:{component:k},internalRef:g}=x,h=se(x.props,A5),b=ct(g,y==null?void 0:y.ref,t.ref),C=a?a(h):{},R=S({},o,C),E=e==="root"?k||c:k,P=vi(w,S({},e==="root"&&!c&&!d[e]&&s,e!=="root"&&!d[e]&&s,h,E&&{as:E},{ref:b}),R);return Object.keys(C).forEach(M=>{delete P[M]}),[w,P]}function N5(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[d,f]=p.useState(!1),m=le(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),w={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},y=le(n.child,d&&n.childLeaving,r&&n.childPulsate);return!s&&!d&&f(!0),p.useEffect(()=>{if(!s&&l!=null){const x=setTimeout(l,c);return()=>{clearTimeout(x)}}},[l,s,c]),u.jsx("span",{className:m,style:w,children:u.jsx("span",{className:y})})}const $n=we("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),D5=["center","classes","className"];let Ju=e=>e,O0,I0,_0,L0;const Rp=550,z5=80,B5=Ji(O0||(O0=Ju` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`)),F5=Ji(I0||(I0=Ju` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`)),U5=Ji(_0||(_0=Ju` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`)),W5=ie("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),V5=ie(N5,{name:"MuiTouchRipple",slot:"Ripple"})(L0||(L0=Ju` + opacity: 0; + position: absolute; + + &.${0} { + opacity: 0.3; + transform: scale(1); + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + &.${0} { + animation-duration: ${0}ms; + } + + & .${0} { + opacity: 1; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: currentColor; + } + + & .${0} { + opacity: 0; + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + & .${0} { + position: absolute; + /* @noflip */ + left: 0px; + top: 0; + animation-name: ${0}; + animation-duration: 2500ms; + animation-timing-function: ${0}; + animation-iteration-count: infinite; + animation-delay: 200ms; + } +`),$n.rippleVisible,B5,Rp,({theme:e})=>e.transitions.easing.easeInOut,$n.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,$n.child,$n.childLeaving,F5,Rp,({theme:e})=>e.transitions.easing.easeInOut,$n.childPulsate,U5,({theme:e})=>e.transitions.easing.easeInOut),H5=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a}=r,s=se(r,D5),[l,c]=p.useState([]),d=p.useRef(0),f=p.useRef(null);p.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const m=p.useRef(!1),w=To(),y=p.useRef(null),x=p.useRef(null),k=p.useCallback(C=>{const{pulsate:R,rippleX:E,rippleY:P,rippleSize:M,cb:D}=C;c(O=>[...O,u.jsx(V5,{classes:{ripple:le(i.ripple,$n.ripple),rippleVisible:le(i.rippleVisible,$n.rippleVisible),ripplePulsate:le(i.ripplePulsate,$n.ripplePulsate),child:le(i.child,$n.child),childLeaving:le(i.childLeaving,$n.childLeaving),childPulsate:le(i.childPulsate,$n.childPulsate)},timeout:Rp,pulsate:R,rippleX:E,rippleY:P,rippleSize:M},d.current)]),d.current+=1,f.current=D},[i]),g=p.useCallback((C={},R={},E=()=>{})=>{const{pulsate:P=!1,center:M=o||R.pulsate,fakeElement:D=!1}=R;if((C==null?void 0:C.type)==="mousedown"&&m.current){m.current=!1;return}(C==null?void 0:C.type)==="touchstart"&&(m.current=!0);const O=D?null:x.current,F=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let V,U,q;if(M||C===void 0||C.clientX===0&&C.clientY===0||!C.clientX&&!C.touches)V=Math.round(F.width/2),U=Math.round(F.height/2);else{const{clientX:ee,clientY:J}=C.touches&&C.touches.length>0?C.touches[0]:C;V=Math.round(ee-F.left),U=Math.round(J-F.top)}if(M)q=Math.sqrt((2*F.width**2+F.height**2)/3),q%2===0&&(q+=1);else{const ee=Math.max(Math.abs((O?O.clientWidth:0)-V),V)*2+2,J=Math.max(Math.abs((O?O.clientHeight:0)-U),U)*2+2;q=Math.sqrt(ee**2+J**2)}C!=null&&C.touches?y.current===null&&(y.current=()=>{k({pulsate:P,rippleX:V,rippleY:U,rippleSize:q,cb:E})},w.start(z5,()=>{y.current&&(y.current(),y.current=null)})):k({pulsate:P,rippleX:V,rippleY:U,rippleSize:q,cb:E})},[o,k,w]),h=p.useCallback(()=>{g({},{pulsate:!0})},[g]),b=p.useCallback((C,R)=>{if(w.clear(),(C==null?void 0:C.type)==="touchend"&&y.current){y.current(),y.current=null,w.start(0,()=>{b(C,R)});return}y.current=null,c(E=>E.length>0?E.slice(1):E),f.current=R},[w]);return p.useImperativeHandle(n,()=>({pulsate:h,start:g,stop:b}),[h,g,b]),u.jsx(W5,S({className:le($n.root,i.root,a),ref:x},s,{children:u.jsx(fm,{component:null,exit:!0,children:l})}))});function q5(e){return be("MuiButtonBase",e)}const G5=we("MuiButtonBase",["root","disabled","focusVisible"]),K5=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Y5=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=Se({root:["root",t&&"disabled",n&&"focusVisible"]},q5,o);return n&&r&&(a.root+=` ${r}`),a},X5=ie("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${G5.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ir=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:d=!1,disableTouchRipple:f=!1,focusRipple:m=!1,LinkComponent:w="a",onBlur:y,onClick:x,onContextMenu:k,onDragLeave:g,onFocus:h,onFocusVisible:b,onKeyDown:C,onKeyUp:R,onMouseDown:E,onMouseLeave:P,onMouseUp:M,onTouchEnd:D,onTouchMove:O,onTouchStart:F,tabIndex:V=0,TouchRippleProps:U,touchRippleRef:q,type:ee}=r,J=se(r,K5),re=p.useRef(null),I=p.useRef(null),B=ct(I,q),{isFocusVisibleRef:$,onFocus:v,onBlur:T,ref:L}=om(),[_,N]=p.useState(!1);c&&_&&N(!1),p.useImperativeHandle(o,()=>({focusVisible:()=>{N(!0),re.current.focus()}}),[]);const[H,j]=p.useState(!1);p.useEffect(()=>{j(!0)},[]);const A=H&&!d&&!c;p.useEffect(()=>{_&&m&&!d&&H&&I.current.pulsate()},[d,m,_,H]);function G(he,Ge,Xe=f){return Yt(Ye=>(Ge&&Ge(Ye),!Xe&&I.current&&I.current[he](Ye),!0))}const Y=G("start",E),K=G("stop",k),oe=G("stop",g),te=G("stop",M),ne=G("stop",he=>{_&&he.preventDefault(),P&&P(he)}),de=G("start",F),Re=G("stop",D),W=G("stop",O),ae=G("stop",he=>{T(he),$.current===!1&&N(!1),y&&y(he)},!1),ge=Yt(he=>{re.current||(re.current=he.currentTarget),v(he),$.current===!0&&(N(!0),b&&b(he)),h&&h(he)}),z=()=>{const he=re.current;return l&&l!=="button"&&!(he.tagName==="A"&&he.href)},X=p.useRef(!1),fe=Yt(he=>{m&&!X.current&&_&&I.current&&he.key===" "&&(X.current=!0,I.current.stop(he,()=>{I.current.start(he)})),he.target===he.currentTarget&&z()&&he.key===" "&&he.preventDefault(),C&&C(he),he.target===he.currentTarget&&z()&&he.key==="Enter"&&!c&&(he.preventDefault(),x&&x(he))}),pe=Yt(he=>{m&&he.key===" "&&I.current&&_&&!he.defaultPrevented&&(X.current=!1,I.current.stop(he,()=>{I.current.pulsate(he)})),R&&R(he),x&&he.target===he.currentTarget&&z()&&he.key===" "&&!he.defaultPrevented&&x(he)});let ve=l;ve==="button"&&(J.href||J.to)&&(ve=w);const Ce={};ve==="button"?(Ce.type=ee===void 0?"button":ee,Ce.disabled=c):(!J.href&&!J.to&&(Ce.role="button"),c&&(Ce["aria-disabled"]=c));const Le=ct(n,L,re),De=S({},r,{centerRipple:i,component:l,disabled:c,disableRipple:d,disableTouchRipple:f,focusRipple:m,tabIndex:V,focusVisible:_}),Ee=Y5(De);return u.jsxs(X5,S({as:ve,className:le(Ee.root,s),ownerState:De,onBlur:ae,onClick:x,onContextMenu:K,onFocus:ge,onKeyDown:fe,onKeyUp:pe,onMouseDown:Y,onMouseLeave:ne,onMouseUp:te,onDragLeave:oe,onTouchEnd:Re,onTouchMove:W,onTouchStart:de,ref:Le,tabIndex:c?-1:V,type:ee},Ce,J,{children:[a,A?u.jsx(H5,S({ref:B,center:i},U)):null]}))});function Q5(e){return be("MuiAlert",e)}const A0=we("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function J5(e){return be("MuiIconButton",e)}const Z5=we("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),ej=["edge","children","className","color","disabled","disableFocusRipple","size"],tj=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,a={root:["root",n&&"disabled",r!=="default"&&`color${Z(r)}`,o&&`edge${Z(o)}`,`size${Z(i)}`]};return Se(a,J5,t)},nj=ie(Ir,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Z(n.color)}`],n.edge&&t[`edge${Z(n.edge)}`],t[`size${Z(n.size)}`]]}})(({theme:e,ownerState:t})=>S({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Fe(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return S({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&S({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":S({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Fe(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${Z5.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),lt=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:c=!1,size:d="medium"}=r,f=se(r,ej),m=S({},r,{edge:o,color:s,disabled:l,disableFocusRipple:c,size:d}),w=tj(m);return u.jsx(nj,S({className:le(w.root,a),centerRipple:!0,focusRipple:!c,disabled:l,ref:n},f,{ownerState:m,children:i}))}),rj=Ht(u.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),oj=Ht(u.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),ij=Ht(u.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),aj=Ht(u.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),sj=Ht(u.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),lj=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],cj=Qu(),uj=e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root",`color${Z(n||r)}`,`${t}${Z(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return Se(i,Q5,o)},dj=ie(En,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Z(n.color||n.severity)}`]]}})(({theme:e})=>{const t=e.palette.mode==="light"?Pc:Ec,n=e.palette.mode==="light"?Ec:Pc;return S({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${A0.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${A0.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,r])=>r.main&&r.dark).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:S({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)})}))]})}),fj=ie("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),pj=ie("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),N0=ie("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),D0={success:u.jsx(rj,{fontSize:"inherit"}),warning:u.jsx(oj,{fontSize:"inherit"}),error:u.jsx(ij,{fontSize:"inherit"}),info:u.jsx(aj,{fontSize:"inherit"})},xr=p.forwardRef(function(t,n){const r=cj({props:t,name:"MuiAlert"}),{action:o,children:i,className:a,closeText:s="Close",color:l,components:c={},componentsProps:d={},icon:f,iconMapping:m=D0,onClose:w,role:y="alert",severity:x="success",slotProps:k={},slots:g={},variant:h="standard"}=r,b=se(r,lj),C=S({},r,{color:l,severity:x,variant:h,colorSeverity:l||x}),R=uj(C),E={slots:S({closeButton:c.CloseButton,closeIcon:c.CloseIcon},g),slotProps:S({},d,k)},[P,M]=kp("closeButton",{elementType:lt,externalForwardedProps:E,ownerState:C}),[D,O]=kp("closeIcon",{elementType:sj,externalForwardedProps:E,ownerState:C});return u.jsxs(dj,S({role:y,elevation:0,ownerState:C,className:le(R.root,a),ref:n},b,{children:[f!==!1?u.jsx(fj,{ownerState:C,className:R.icon,children:f||m[x]||D0[x]}):null,u.jsx(pj,{ownerState:C,className:R.message,children:i}),o!=null?u.jsx(N0,{ownerState:C,className:R.action,children:o}):null,o==null&&w?u.jsx(N0,{ownerState:C,className:R.action,children:u.jsx(P,S({size:"small","aria-label":s,title:s,color:"inherit",onClick:w},M,{children:u.jsx(D,S({fontSize:"small"},O))}))}):null]}))});function hj(e){return be("MuiTypography",e)}we("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const mj=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],gj=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${Z(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Se(s,hj,a)},vj=ie("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Z(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>S({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),z0={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},yj={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},xj=e=>yj[e]||e,Ie=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiTypography"}),o=xj(r.color),i=Tu(S({},r,{color:o})),{align:a="inherit",className:s,component:l,gutterBottom:c=!1,noWrap:d=!1,paragraph:f=!1,variant:m="body1",variantMapping:w=z0}=i,y=se(i,mj),x=S({},i,{align:a,color:o,className:s,component:l,gutterBottom:c,noWrap:d,paragraph:f,variant:m,variantMapping:w}),k=l||(f?"p":w[m]||z0[m])||"span",g=gj(x);return u.jsx(vj,S({as:k,ref:n,ownerState:x,className:le(g.root,s)},y))});function bj(e){return be("MuiAppBar",e)}we("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const wj=["className","color","enableColorOnDark","position"],Sj=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${Z(t)}`,`position${Z(n)}`]};return Se(o,bj,r)},ml=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,Cj=ie(En,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Z(n.position)}`],t[`color${Z(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return S({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&S({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&S({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&S({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:ml(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:ml(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:ml(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:ml(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),kj=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiAppBar"}),{className:o,color:i="primary",enableColorOnDark:a=!1,position:s="fixed"}=r,l=se(r,wj),c=S({},r,{color:i,position:s,enableColorOnDark:a}),d=Sj(c);return u.jsx(Cj,S({square:!0,component:"header",ownerState:c,elevation:4,className:le(d.root,o,s==="fixed"&&"mui-fixed"),ref:n},l))});function Rj(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=hw({badgeContent:t,max:r});let a=n;n===!1&&t===0&&!o&&(a=!0);const{badgeContent:s,max:l=r}=a?i:e,c=s&&Number(s)>l?`${l}+`:s;return{badgeContent:s,invisible:a,max:l,displayValue:c}}const Ow="base";function Pj(e){return`${Ow}--${e}`}function Ej(e,t){return`${Ow}-${e}-${t}`}function Iw(e,t){const n=aw[t];return n?Pj(n):Ej(e,t)}function Tj(e,t){const n={};return t.forEach(r=>{n[r]=Iw(e,r)}),n}function B0(e){return e.substring(2).toLowerCase()}function $j(e,t){return t.documentElement.clientWidth(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const d=ct(t.ref,s),f=Yt(y=>{const x=c.current;c.current=!1;const k=St(s.current);if(!l.current||!s.current||"clientX"in y&&$j(y,k))return;if(a.current){a.current=!1;return}let g;y.composedPath?g=y.composedPath().indexOf(s.current)>-1:g=!k.documentElement.contains(y.target)||s.current.contains(y.target),!g&&(n||!x)&&o(y)}),m=y=>x=>{c.current=!0;const k=t.props[y];k&&k(x)},w={ref:d};return i!==!1&&(w[i]=m(i)),p.useEffect(()=>{if(i!==!1){const y=B0(i),x=St(s.current),k=()=>{a.current=!0};return x.addEventListener(y,f),x.addEventListener("touchmove",k),()=>{x.removeEventListener(y,f),x.removeEventListener("touchmove",k)}}},[f,i]),r!==!1&&(w[r]=m(r)),p.useEffect(()=>{if(r!==!1){const y=B0(r),x=St(s.current);return x.addEventListener(y,f),()=>{x.removeEventListener(y,f)}}},[f,r]),u.jsx(p.Fragment,{children:p.cloneElement(t,w)})}const Mj=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Oj(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function Ij(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function _j(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Ij(e))}function Lj(e){const t=[],n=[];return Array.from(e.querySelectorAll(Mj)).forEach((r,o)=>{const i=Oj(r);i===-1||!_j(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function Aj(){return!0}function Nj(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Lj,isEnabled:a=Aj,open:s}=e,l=p.useRef(!1),c=p.useRef(null),d=p.useRef(null),f=p.useRef(null),m=p.useRef(null),w=p.useRef(!1),y=p.useRef(null),x=ct(t.ref,y),k=p.useRef(null);p.useEffect(()=>{!s||!y.current||(w.current=!n)},[n,s]),p.useEffect(()=>{if(!s||!y.current)return;const b=St(y.current);return y.current.contains(b.activeElement)||(y.current.hasAttribute("tabIndex")||y.current.setAttribute("tabIndex","-1"),w.current&&y.current.focus()),()=>{o||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[s]),p.useEffect(()=>{if(!s||!y.current)return;const b=St(y.current),C=P=>{k.current=P,!(r||!a()||P.key!=="Tab")&&b.activeElement===y.current&&P.shiftKey&&(l.current=!0,d.current&&d.current.focus())},R=()=>{const P=y.current;if(P===null)return;if(!b.hasFocus()||!a()||l.current){l.current=!1;return}if(P.contains(b.activeElement)||r&&b.activeElement!==c.current&&b.activeElement!==d.current)return;if(b.activeElement!==m.current)m.current=null;else if(m.current!==null)return;if(!w.current)return;let M=[];if((b.activeElement===c.current||b.activeElement===d.current)&&(M=i(y.current)),M.length>0){var D,O;const F=!!((D=k.current)!=null&&D.shiftKey&&((O=k.current)==null?void 0:O.key)==="Tab"),V=M[0],U=M[M.length-1];typeof V!="string"&&typeof U!="string"&&(F?U.focus():V.focus())}else P.focus()};b.addEventListener("focusin",R),b.addEventListener("keydown",C,!0);const E=setInterval(()=>{b.activeElement&&b.activeElement.tagName==="BODY"&&R()},50);return()=>{clearInterval(E),b.removeEventListener("focusin",R),b.removeEventListener("keydown",C,!0)}},[n,r,o,a,s,i]);const g=b=>{f.current===null&&(f.current=b.relatedTarget),w.current=!0,m.current=b.target;const C=t.props.onFocus;C&&C(b)},h=b=>{f.current===null&&(f.current=b.relatedTarget),w.current=!0};return u.jsxs(p.Fragment,{children:[u.jsx("div",{tabIndex:s?0:-1,onFocus:h,ref:c,"data-testid":"sentinelStart"}),p.cloneElement(t,{ref:x,onFocus:g}),u.jsx("div",{tabIndex:s?0:-1,onFocus:h,ref:d,"data-testid":"sentinelEnd"})]})}function Dj(e){return typeof e=="function"?e():e}const _w=p.forwardRef(function(t,n){const{children:r,container:o,disablePortal:i=!1}=t,[a,s]=p.useState(null),l=ct(p.isValidElement(r)?r.ref:null,n);if(Sn(()=>{i||s(Dj(o)||document.body)},[o,i]),Sn(()=>{if(a&&!i)return Rc(n,a),()=>{Rc(n,null)}},[n,a,i]),i){if(p.isValidElement(r)){const c={ref:l};return p.cloneElement(r,c)}return u.jsx(p.Fragment,{children:r})}return u.jsx(p.Fragment,{children:a&&Oh.createPortal(r,a)})});function zj(e){const t=St(e);return t.body===e?Fn(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Wa(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function F0(e){return parseInt(Fn(e).getComputedStyle(e).paddingRight,10)||0}function Bj(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function U0(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,a=>{const s=i.indexOf(a)===-1,l=!Bj(a);s&&l&&Wa(a,o)})}function Xd(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function Fj(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(zj(r)){const a=fw(St(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${F0(r)+a}px`;const s=St(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${F0(l)+a}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=St(r).body;else{const a=r.parentElement,s=Fn(r);i=(a==null?void 0:a.nodeName)==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:s})=>{i?a.style.setProperty(s,i):a.style.removeProperty(s)})}}function Uj(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Wj{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Wa(t.modalRef,!1);const o=Uj(n);U0(n,t.mount,t.modalRef,o,!0);const i=Xd(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=Xd(this.containers,i=>i.modals.indexOf(t)!==-1),o=this.containers[r];o.restore||(o.restore=Fj(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=Xd(this.containers,a=>a.modals.indexOf(t)!==-1),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&Wa(t.modalRef,n),U0(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&Wa(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Vj(e){return typeof e=="function"?e():e}function Hj(e){return e?e.props.hasOwnProperty("in"):!1}const qj=new Wj;function Gj(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=qj,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:d,rootRef:f}=e,m=p.useRef({}),w=p.useRef(null),y=p.useRef(null),x=ct(y,f),[k,g]=p.useState(!d),h=Hj(l);let b=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(b=!1);const C=()=>St(w.current),R=()=>(m.current.modalRef=y.current,m.current.mount=w.current,m.current),E=()=>{o.mount(R(),{disableScrollLock:r}),y.current&&(y.current.scrollTop=0)},P=Yt(()=>{const J=Vj(t)||C().body;o.add(R(),J),y.current&&E()}),M=p.useCallback(()=>o.isTopModal(R()),[o]),D=Yt(J=>{w.current=J,J&&(d&&M()?E():y.current&&Wa(y.current,b))}),O=p.useCallback(()=>{o.remove(R(),b)},[b,o]);p.useEffect(()=>()=>{O()},[O]),p.useEffect(()=>{d?P():(!h||!i)&&O()},[d,O,h,i,P]);const F=J=>re=>{var I;(I=J.onKeyDown)==null||I.call(J,re),!(re.key!=="Escape"||re.which===229||!M())&&(n||(re.stopPropagation(),c&&c(re,"escapeKeyDown")))},V=J=>re=>{var I;(I=J.onClick)==null||I.call(J,re),re.target===re.currentTarget&&c&&c(re,"backdropClick")};return{getRootProps:(J={})=>{const re=jc(e);delete re.onTransitionEnter,delete re.onTransitionExited;const I=S({},re,J);return S({role:"presentation"},I,{onKeyDown:F(I),ref:x})},getBackdropProps:(J={})=>{const re=J;return S({"aria-hidden":!0},re,{onClick:V(re),open:d})},getTransitionProps:()=>{const J=()=>{g(!1),a&&a()},re=()=>{g(!0),s&&s(),i&&O()};return{onEnter:yp(J,l==null?void 0:l.props.onEnter),onExited:yp(re,l==null?void 0:l.props.onExited)}},rootRef:x,portalRef:D,isTopModal:M,exited:k,hasTransition:h}}var cn="top",Wn="bottom",Vn="right",un="left",hm="auto",Fs=[cn,Wn,Vn,un],Di="start",ys="end",Kj="clippingParents",Lw="viewport",xa="popper",Yj="reference",W0=Fs.reduce(function(e,t){return e.concat([t+"-"+Di,t+"-"+ys])},[]),Aw=[].concat(Fs,[hm]).reduce(function(e,t){return e.concat([t,t+"-"+Di,t+"-"+ys])},[]),Xj="beforeRead",Qj="read",Jj="afterRead",Zj="beforeMain",eM="main",tM="afterMain",nM="beforeWrite",rM="write",oM="afterWrite",iM=[Xj,Qj,Jj,Zj,eM,tM,nM,rM,oM];function yr(e){return e?(e.nodeName||"").toLowerCase():null}function Cn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Wo(e){var t=Cn(e).Element;return e instanceof t||e instanceof Element}function Dn(e){var t=Cn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function mm(e){if(typeof ShadowRoot>"u")return!1;var t=Cn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function aM(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!Dn(i)||!yr(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function sM(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Dn(o)||!yr(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const lM={name:"applyStyles",enabled:!0,phase:"write",fn:aM,effect:sM,requires:["computeStyles"]};function mr(e){return e.split("-")[0]}var Io=Math.max,Mc=Math.min,zi=Math.round;function Pp(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Nw(){return!/^((?!chrome|android).)*safari/i.test(Pp())}function Bi(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Dn(e)&&(o=e.offsetWidth>0&&zi(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&zi(r.height)/e.offsetHeight||1);var a=Wo(e)?Cn(e):window,s=a.visualViewport,l=!Nw()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/o,d=(r.top+(l&&s?s.offsetTop:0))/i,f=r.width/o,m=r.height/i;return{width:f,height:m,top:d,right:c+f,bottom:d+m,left:c,x:c,y:d}}function gm(e){var t=Bi(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Dw(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&mm(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function _r(e){return Cn(e).getComputedStyle(e)}function cM(e){return["table","td","th"].indexOf(yr(e))>=0}function go(e){return((Wo(e)?e.ownerDocument:e.document)||window.document).documentElement}function Zu(e){return yr(e)==="html"?e:e.assignedSlot||e.parentNode||(mm(e)?e.host:null)||go(e)}function V0(e){return!Dn(e)||_r(e).position==="fixed"?null:e.offsetParent}function uM(e){var t=/firefox/i.test(Pp()),n=/Trident/i.test(Pp());if(n&&Dn(e)){var r=_r(e);if(r.position==="fixed")return null}var o=Zu(e);for(mm(o)&&(o=o.host);Dn(o)&&["html","body"].indexOf(yr(o))<0;){var i=_r(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function Us(e){for(var t=Cn(e),n=V0(e);n&&cM(n)&&_r(n).position==="static";)n=V0(n);return n&&(yr(n)==="html"||yr(n)==="body"&&_r(n).position==="static")?t:n||uM(e)||t}function vm(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Va(e,t,n){return Io(e,Mc(t,n))}function dM(e,t,n){var r=Va(e,t,n);return r>n?n:r}function zw(){return{top:0,right:0,bottom:0,left:0}}function Bw(e){return Object.assign({},zw(),e)}function Fw(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var fM=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Bw(typeof t!="number"?t:Fw(t,Fs))};function pM(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=mr(n.placement),l=vm(s),c=[un,Vn].indexOf(s)>=0,d=c?"height":"width";if(!(!i||!a)){var f=fM(o.padding,n),m=gm(i),w=l==="y"?cn:un,y=l==="y"?Wn:Vn,x=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],k=a[l]-n.rects.reference[l],g=Us(i),h=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0,b=x/2-k/2,C=f[w],R=h-m[d]-f[y],E=h/2-m[d]/2+b,P=Va(C,E,R),M=l;n.modifiersData[r]=(t={},t[M]=P,t.centerOffset=P-E,t)}}function hM(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Dw(t.elements.popper,o)&&(t.elements.arrow=o))}const mM={name:"arrow",enabled:!0,phase:"main",fn:pM,effect:hM,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Fi(e){return e.split("-")[1]}var gM={top:"auto",right:"auto",bottom:"auto",left:"auto"};function vM(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:zi(n*o)/o||0,y:zi(r*o)/o||0}}function H0(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,m=a.x,w=m===void 0?0:m,y=a.y,x=y===void 0?0:y,k=typeof d=="function"?d({x:w,y:x}):{x:w,y:x};w=k.x,x=k.y;var g=a.hasOwnProperty("x"),h=a.hasOwnProperty("y"),b=un,C=cn,R=window;if(c){var E=Us(n),P="clientHeight",M="clientWidth";if(E===Cn(n)&&(E=go(n),_r(E).position!=="static"&&s==="absolute"&&(P="scrollHeight",M="scrollWidth")),E=E,o===cn||(o===un||o===Vn)&&i===ys){C=Wn;var D=f&&E===R&&R.visualViewport?R.visualViewport.height:E[P];x-=D-r.height,x*=l?1:-1}if(o===un||(o===cn||o===Wn)&&i===ys){b=Vn;var O=f&&E===R&&R.visualViewport?R.visualViewport.width:E[M];w-=O-r.width,w*=l?1:-1}}var F=Object.assign({position:s},c&&gM),V=d===!0?vM({x:w,y:x},Cn(n)):{x:w,y:x};if(w=V.x,x=V.y,l){var U;return Object.assign({},F,(U={},U[C]=h?"0":"",U[b]=g?"0":"",U.transform=(R.devicePixelRatio||1)<=1?"translate("+w+"px, "+x+"px)":"translate3d("+w+"px, "+x+"px, 0)",U))}return Object.assign({},F,(t={},t[C]=h?x+"px":"",t[b]=g?w+"px":"",t.transform="",t))}function yM(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:mr(t.placement),variation:Fi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,H0(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,H0(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const xM={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:yM,data:{}};var gl={passive:!0};function bM(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=Cn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(d){d.addEventListener("scroll",n.update,gl)}),s&&l.addEventListener("resize",n.update,gl),function(){i&&c.forEach(function(d){d.removeEventListener("scroll",n.update,gl)}),s&&l.removeEventListener("resize",n.update,gl)}}const wM={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:bM,data:{}};var SM={left:"right",right:"left",bottom:"top",top:"bottom"};function Hl(e){return e.replace(/left|right|bottom|top/g,function(t){return SM[t]})}var CM={start:"end",end:"start"};function q0(e){return e.replace(/start|end/g,function(t){return CM[t]})}function ym(e){var t=Cn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function xm(e){return Bi(go(e)).left+ym(e).scrollLeft}function kM(e,t){var n=Cn(e),r=go(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=Nw();(c||!c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+xm(e),y:l}}function RM(e){var t,n=go(e),r=ym(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Io(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Io(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+xm(e),l=-r.scrollTop;return _r(o||n).direction==="rtl"&&(s+=Io(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function bm(e){var t=_r(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Uw(e){return["html","body","#document"].indexOf(yr(e))>=0?e.ownerDocument.body:Dn(e)&&bm(e)?e:Uw(Zu(e))}function Ha(e,t){var n;t===void 0&&(t=[]);var r=Uw(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=Cn(r),a=o?[i].concat(i.visualViewport||[],bm(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Ha(Zu(a)))}function Ep(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function PM(e,t){var n=Bi(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function G0(e,t,n){return t===Lw?Ep(kM(e,n)):Wo(t)?PM(t,n):Ep(RM(go(e)))}function EM(e){var t=Ha(Zu(e)),n=["absolute","fixed"].indexOf(_r(e).position)>=0,r=n&&Dn(e)?Us(e):e;return Wo(r)?t.filter(function(o){return Wo(o)&&Dw(o,r)&&yr(o)!=="body"}):[]}function TM(e,t,n,r){var o=t==="clippingParents"?EM(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(l,c){var d=G0(e,c,r);return l.top=Io(d.top,l.top),l.right=Mc(d.right,l.right),l.bottom=Mc(d.bottom,l.bottom),l.left=Io(d.left,l.left),l},G0(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Ww(e){var t=e.reference,n=e.element,r=e.placement,o=r?mr(r):null,i=r?Fi(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case cn:l={x:a,y:t.y-n.height};break;case Wn:l={x:a,y:t.y+t.height};break;case Vn:l={x:t.x+t.width,y:s};break;case un:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=o?vm(o):null;if(c!=null){var d=c==="y"?"height":"width";switch(i){case Di:l[c]=l[c]-(t[d]/2-n[d]/2);break;case ys:l[c]=l[c]+(t[d]/2-n[d]/2);break}}return l}function xs(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?Kj:s,c=n.rootBoundary,d=c===void 0?Lw:c,f=n.elementContext,m=f===void 0?xa:f,w=n.altBoundary,y=w===void 0?!1:w,x=n.padding,k=x===void 0?0:x,g=Bw(typeof k!="number"?k:Fw(k,Fs)),h=m===xa?Yj:xa,b=e.rects.popper,C=e.elements[y?h:m],R=TM(Wo(C)?C:C.contextElement||go(e.elements.popper),l,d,a),E=Bi(e.elements.reference),P=Ww({reference:E,element:b,strategy:"absolute",placement:o}),M=Ep(Object.assign({},b,P)),D=m===xa?M:E,O={top:R.top-D.top+g.top,bottom:D.bottom-R.bottom+g.bottom,left:R.left-D.left+g.left,right:D.right-R.right+g.right},F=e.modifiersData.offset;if(m===xa&&F){var V=F[o];Object.keys(O).forEach(function(U){var q=[Vn,Wn].indexOf(U)>=0?1:-1,ee=[cn,Wn].indexOf(U)>=0?"y":"x";O[U]+=V[ee]*q})}return O}function $M(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Aw:l,d=Fi(r),f=d?s?W0:W0.filter(function(y){return Fi(y)===d}):Fs,m=f.filter(function(y){return c.indexOf(y)>=0});m.length===0&&(m=f);var w=m.reduce(function(y,x){return y[x]=xs(e,{placement:x,boundary:o,rootBoundary:i,padding:a})[mr(x)],y},{});return Object.keys(w).sort(function(y,x){return w[y]-w[x]})}function jM(e){if(mr(e)===hm)return[];var t=Hl(e);return[q0(e),t,q0(t)]}function MM(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,d=n.boundary,f=n.rootBoundary,m=n.altBoundary,w=n.flipVariations,y=w===void 0?!0:w,x=n.allowedAutoPlacements,k=t.options.placement,g=mr(k),h=g===k,b=l||(h||!y?[Hl(k)]:jM(k)),C=[k].concat(b).reduce(function(_,N){return _.concat(mr(N)===hm?$M(t,{placement:N,boundary:d,rootBoundary:f,padding:c,flipVariations:y,allowedAutoPlacements:x}):N)},[]),R=t.rects.reference,E=t.rects.popper,P=new Map,M=!0,D=C[0],O=0;O=0,ee=q?"width":"height",J=xs(t,{placement:F,boundary:d,rootBoundary:f,altBoundary:m,padding:c}),re=q?U?Vn:un:U?Wn:cn;R[ee]>E[ee]&&(re=Hl(re));var I=Hl(re),B=[];if(i&&B.push(J[V]<=0),s&&B.push(J[re]<=0,J[I]<=0),B.every(function(_){return _})){D=F,M=!1;break}P.set(F,B)}if(M)for(var $=y?3:1,v=function(N){var H=C.find(function(j){var A=P.get(j);if(A)return A.slice(0,N).every(function(G){return G})});if(H)return D=H,"break"},T=$;T>0;T--){var L=v(T);if(L==="break")break}t.placement!==D&&(t.modifiersData[r]._skip=!0,t.placement=D,t.reset=!0)}}const OM={name:"flip",enabled:!0,phase:"main",fn:MM,requiresIfExists:["offset"],data:{_skip:!1}};function K0(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Y0(e){return[cn,Vn,Wn,un].some(function(t){return e[t]>=0})}function IM(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=xs(t,{elementContext:"reference"}),s=xs(t,{altBoundary:!0}),l=K0(a,r),c=K0(s,o,i),d=Y0(l),f=Y0(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const _M={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:IM};function LM(e,t,n){var r=mr(e),o=[un,cn].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[un,Vn].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function AM(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=Aw.reduce(function(d,f){return d[f]=LM(f,t.rects,i),d},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const NM={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:AM};function DM(e){var t=e.state,n=e.name;t.modifiersData[n]=Ww({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const zM={name:"popperOffsets",enabled:!0,phase:"read",fn:DM,data:{}};function BM(e){return e==="x"?"y":"x"}function FM(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,f=n.padding,m=n.tether,w=m===void 0?!0:m,y=n.tetherOffset,x=y===void 0?0:y,k=xs(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:d}),g=mr(t.placement),h=Fi(t.placement),b=!h,C=vm(g),R=BM(C),E=t.modifiersData.popperOffsets,P=t.rects.reference,M=t.rects.popper,D=typeof x=="function"?x(Object.assign({},t.rects,{placement:t.placement})):x,O=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),F=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(E){if(i){var U,q=C==="y"?cn:un,ee=C==="y"?Wn:Vn,J=C==="y"?"height":"width",re=E[C],I=re+k[q],B=re-k[ee],$=w?-M[J]/2:0,v=h===Di?P[J]:M[J],T=h===Di?-M[J]:-P[J],L=t.elements.arrow,_=w&&L?gm(L):{width:0,height:0},N=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:zw(),H=N[q],j=N[ee],A=Va(0,P[J],_[J]),G=b?P[J]/2-$-A-H-O.mainAxis:v-A-H-O.mainAxis,Y=b?-P[J]/2+$+A+j+O.mainAxis:T+A+j+O.mainAxis,K=t.elements.arrow&&Us(t.elements.arrow),oe=K?C==="y"?K.clientTop||0:K.clientLeft||0:0,te=(U=F==null?void 0:F[C])!=null?U:0,ne=re+G-te-oe,de=re+Y-te,Re=Va(w?Mc(I,ne):I,re,w?Io(B,de):B);E[C]=Re,V[C]=Re-re}if(s){var W,ae=C==="x"?cn:un,ge=C==="x"?Wn:Vn,z=E[R],X=R==="y"?"height":"width",fe=z+k[ae],pe=z-k[ge],ve=[cn,un].indexOf(g)!==-1,Ce=(W=F==null?void 0:F[R])!=null?W:0,Le=ve?fe:z-P[X]-M[X]-Ce+O.altAxis,De=ve?z+P[X]+M[X]-Ce-O.altAxis:pe,Ee=w&&ve?dM(Le,z,De):Va(w?Le:fe,z,w?De:pe);E[R]=Ee,V[R]=Ee-z}t.modifiersData[r]=V}}const UM={name:"preventOverflow",enabled:!0,phase:"main",fn:FM,requiresIfExists:["offset"]};function WM(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function VM(e){return e===Cn(e)||!Dn(e)?ym(e):WM(e)}function HM(e){var t=e.getBoundingClientRect(),n=zi(t.width)/e.offsetWidth||1,r=zi(t.height)/e.offsetHeight||1;return n!==1||r!==1}function qM(e,t,n){n===void 0&&(n=!1);var r=Dn(t),o=Dn(t)&&HM(t),i=go(t),a=Bi(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((yr(t)!=="body"||bm(i))&&(s=VM(t)),Dn(t)?(l=Bi(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=xm(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function GM(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function KM(e){var t=GM(e);return iM.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function YM(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function XM(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var X0={placement:"bottom",modifiers:[],strategy:"absolute"};function Q0(){for(var e=arguments.length,t=new Array(e),n=0;nSe({root:["root"]},O5(eO)),aO={},sO=p.forwardRef(function(t,n){var r;const{anchorEl:o,children:i,direction:a,disablePortal:s,modifiers:l,open:c,placement:d,popperOptions:f,popperRef:m,slotProps:w={},slots:y={},TransitionProps:x}=t,k=se(t,tO),g=p.useRef(null),h=ct(g,n),b=p.useRef(null),C=ct(b,m),R=p.useRef(C);Sn(()=>{R.current=C},[C]),p.useImperativeHandle(m,()=>b.current,[]);const E=rO(d,a),[P,M]=p.useState(E),[D,O]=p.useState(Tp(o));p.useEffect(()=>{b.current&&b.current.forceUpdate()}),p.useEffect(()=>{o&&O(Tp(o))},[o]),Sn(()=>{if(!D||!c)return;const ee=I=>{M(I.placement)};let J=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:I})=>{ee(I)}}];l!=null&&(J=J.concat(l)),f&&f.modifiers!=null&&(J=J.concat(f.modifiers));const re=ZM(D,g.current,S({placement:E},f,{modifiers:J}));return R.current(re),()=>{re.destroy(),R.current(null)}},[D,s,l,c,f,E]);const F={placement:P};x!==null&&(F.TransitionProps=x);const V=iO(),U=(r=y.root)!=null?r:"div",q=fn({elementType:U,externalSlotProps:w.root,externalForwardedProps:k,additionalProps:{role:"tooltip",ref:h},ownerState:t,className:V.root});return u.jsx(U,S({},q,{children:typeof i=="function"?i(F):i}))}),lO=p.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:d,placement:f="bottom",popperOptions:m=aO,popperRef:w,style:y,transition:x=!1,slotProps:k={},slots:g={}}=t,h=se(t,nO),[b,C]=p.useState(!0),R=()=>{C(!1)},E=()=>{C(!0)};if(!l&&!d&&(!x||b))return null;let P;if(i)P=i;else if(r){const O=Tp(r);P=O&&oO(O)?St(O).body:St(null).body}const M=!d&&l&&(!x||b)?"none":void 0,D=x?{in:d,onEnter:R,onExited:E}:void 0;return u.jsx(_w,{disablePortal:s,container:P,children:u.jsx(sO,S({anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:x?!b:d,placement:f,popperOptions:m,popperRef:w,slotProps:k,slots:g},h,{style:S({position:"fixed",top:0,left:0,display:M},y),TransitionProps:D,children:o}))})});function cO(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:i}=e,a=To();p.useEffect(()=>{if(!o)return;function g(h){h.defaultPrevented||(h.key==="Escape"||h.key==="Esc")&&(r==null||r(h,"escapeKeyDown"))}return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[o,r]);const s=Yt((g,h)=>{r==null||r(g,h)}),l=Yt(g=>{!r||g==null||a.start(g,()=>{s(null,"timeout")})});p.useEffect(()=>(o&&l(t),a.clear),[o,t,l,a]);const c=g=>{r==null||r(g,"clickaway")},d=a.clear,f=p.useCallback(()=>{t!=null&&l(i??t*.5)},[t,i,l]),m=g=>h=>{const b=g.onBlur;b==null||b(h),f()},w=g=>h=>{const b=g.onFocus;b==null||b(h),d()},y=g=>h=>{const b=g.onMouseEnter;b==null||b(h),d()},x=g=>h=>{const b=g.onMouseLeave;b==null||b(h),f()};return p.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",f),window.addEventListener("blur",d),()=>{window.removeEventListener("focus",f),window.removeEventListener("blur",d)}},[n,o,f,d]),{getRootProps:(g={})=>{const h=S({},jc(e),jc(g));return S({role:"presentation"},g,h,{onBlur:m(h),onFocus:w(h),onMouseEnter:y(h),onMouseLeave:x(h)})},onClickAway:c}}const uO=["onChange","maxRows","minRows","style","value"];function vl(e){return parseInt(e,10)||0}const dO={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function fO(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const pO=p.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:a,value:s}=t,l=se(t,uO),{current:c}=p.useRef(s!=null),d=p.useRef(null),f=ct(n,d),m=p.useRef(null),w=p.useCallback(()=>{const k=d.current,h=Fn(k).getComputedStyle(k);if(h.width==="0px")return{outerHeightStyle:0,overflowing:!1};const b=m.current;b.style.width=h.width,b.value=k.value||t.placeholder||"x",b.value.slice(-1)===` +`&&(b.value+=" ");const C=h.boxSizing,R=vl(h.paddingBottom)+vl(h.paddingTop),E=vl(h.borderBottomWidth)+vl(h.borderTopWidth),P=b.scrollHeight;b.value="x";const M=b.scrollHeight;let D=P;i&&(D=Math.max(Number(i)*M,D)),o&&(D=Math.min(Number(o)*M,D)),D=Math.max(D,M);const O=D+(C==="border-box"?R+E:0),F=Math.abs(D-P)<=1;return{outerHeightStyle:O,overflowing:F}},[o,i,t.placeholder]),y=p.useCallback(()=>{const k=w();if(fO(k))return;const g=d.current;g.style.height=`${k.outerHeightStyle}px`,g.style.overflow=k.overflowing?"hidden":""},[w]);Sn(()=>{const k=()=>{y()};let g;const h=ta(k),b=d.current,C=Fn(b);C.addEventListener("resize",h);let R;return typeof ResizeObserver<"u"&&(R=new ResizeObserver(k),R.observe(b)),()=>{h.clear(),cancelAnimationFrame(g),C.removeEventListener("resize",h),R&&R.disconnect()}},[w,y]),Sn(()=>{y()});const x=k=>{c||y(),r&&r(k)};return u.jsxs(p.Fragment,{children:[u.jsx("textarea",S({value:s,onChange:x,ref:f,rows:i,style:a},l)),u.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:m,tabIndex:-1,style:S({},dO.shadow,a,{paddingTop:0,paddingBottom:0})})]})});var wm={};Object.defineProperty(wm,"__esModule",{value:!0});var Hw=wm.default=void 0,hO=gO(p),mO=Rw;function qw(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(qw=function(r){return r?n:t})(e)}function gO(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=qw(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function vO(e){return Object.keys(e).length===0}function yO(e=null){const t=hO.useContext(mO.ThemeContext);return!t||vO(t)?e:t}Hw=wm.default=yO;const xO=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],bO=ie(lO,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Gw=p.forwardRef(function(t,n){var r;const o=Hw(),i=ke({props:t,name:"MuiPopper"}),{anchorEl:a,component:s,components:l,componentsProps:c,container:d,disablePortal:f,keepMounted:m,modifiers:w,open:y,placement:x,popperOptions:k,popperRef:g,transition:h,slots:b,slotProps:C}=i,R=se(i,xO),E=(r=b==null?void 0:b.root)!=null?r:l==null?void 0:l.Root,P=S({anchorEl:a,container:d,disablePortal:f,keepMounted:m,modifiers:w,open:y,placement:x,popperOptions:k,popperRef:g,transition:h},R);return u.jsx(bO,S({as:s,direction:o==null?void 0:o.direction,slots:{root:E},slotProps:C??c},P,{ref:n}))}),wO=Ht(u.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function SO(e){return be("MuiChip",e)}const Be=we("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),CO=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],kO=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e,c={root:["root",l,n&&"disabled",`size${Z(r)}`,`color${Z(o)}`,s&&"clickable",s&&`clickableColor${Z(o)}`,a&&"deletable",a&&`deletableColor${Z(o)}`,`${l}${Z(o)}`],label:["label",`label${Z(r)}`],avatar:["avatar",`avatar${Z(r)}`,`avatarColor${Z(o)}`],icon:["icon",`icon${Z(r)}`,`iconColor${Z(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Z(r)}`,`deleteIconColor${Z(o)}`,`deleteIcon${Z(l)}Color${Z(o)}`]};return Se(c,SO,t)},RO=ie("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${Be.avatar}`]:t.avatar},{[`& .${Be.avatar}`]:t[`avatar${Z(s)}`]},{[`& .${Be.avatar}`]:t[`avatarColor${Z(r)}`]},{[`& .${Be.icon}`]:t.icon},{[`& .${Be.icon}`]:t[`icon${Z(s)}`]},{[`& .${Be.icon}`]:t[`iconColor${Z(o)}`]},{[`& .${Be.deleteIcon}`]:t.deleteIcon},{[`& .${Be.deleteIcon}`]:t[`deleteIcon${Z(s)}`]},{[`& .${Be.deleteIcon}`]:t[`deleteIconColor${Z(r)}`]},{[`& .${Be.deleteIcon}`]:t[`deleteIcon${Z(l)}Color${Z(r)}`]},t.root,t[`size${Z(s)}`],t[`color${Z(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${Z(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${Z(r)}`],t[l],t[`${l}${Z(r)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return S({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Be.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Be.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${Be.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Be.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Be.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Be.icon}`]:S({marginLeft:5,marginRight:-6},t.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&S({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},t.color!=="default"&&{color:"inherit"})),[`& .${Be.deleteIcon}`]:S({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Fe(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Fe(e.palette.text.primary,.4)}},t.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},t.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:Fe(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},t.size==="small"&&{height:24},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${Be.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Fe(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&t.color!=="default"&&{[`&.${Be.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>S({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Fe(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Be.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Fe(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&t.color!=="default"&&{[`&:hover, &.${Be.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>S({},t.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Be.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Be.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Be.avatar}`]:{marginLeft:4},[`& .${Be.avatarSmall}`]:{marginLeft:2},[`& .${Be.icon}`]:{marginLeft:4},[`& .${Be.iconSmall}`]:{marginLeft:2},[`& .${Be.deleteIcon}`]:{marginRight:5},[`& .${Be.deleteIconSmall}`]:{marginRight:3}},t.variant==="outlined"&&t.color!=="default"&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Fe(e.palette[t.color].main,.7)}`,[`&.${Be.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Fe(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${Be.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Fe(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${Be.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Fe(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),PO=ie("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${Z(r)}`]]}})(({ownerState:e})=>S({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function J0(e){return e.key==="Backspace"||e.key==="Delete"}const EO=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:s="default",component:l,deleteIcon:c,disabled:d=!1,icon:f,label:m,onClick:w,onDelete:y,onKeyDown:x,onKeyUp:k,size:g="medium",variant:h="filled",tabIndex:b,skipFocusWhenDisabled:C=!1}=r,R=se(r,CO),E=p.useRef(null),P=ct(E,n),M=B=>{B.stopPropagation(),y&&y(B)},D=B=>{B.currentTarget===B.target&&J0(B)&&B.preventDefault(),x&&x(B)},O=B=>{B.currentTarget===B.target&&(y&&J0(B)?y(B):B.key==="Escape"&&E.current&&E.current.blur()),k&&k(B)},F=a!==!1&&w?!0:a,V=F||y?Ir:l||"div",U=S({},r,{component:V,disabled:d,size:g,color:s,iconColor:p.isValidElement(f)&&f.props.color||s,onDelete:!!y,clickable:F,variant:h}),q=kO(U),ee=V===Ir?S({component:l||"div",focusVisibleClassName:q.focusVisible},y&&{disableRipple:!0}):{};let J=null;y&&(J=c&&p.isValidElement(c)?p.cloneElement(c,{className:le(c.props.className,q.deleteIcon),onClick:M}):u.jsx(wO,{className:le(q.deleteIcon),onClick:M}));let re=null;o&&p.isValidElement(o)&&(re=p.cloneElement(o,{className:le(q.avatar,o.props.className)}));let I=null;return f&&p.isValidElement(f)&&(I=p.cloneElement(f,{className:le(q.icon,f.props.className)})),u.jsxs(RO,S({as:V,className:le(q.root,i),disabled:F&&d?!0:void 0,onClick:w,onKeyDown:D,onKeyUp:O,ref:P,tabIndex:C&&d?-1:b,ownerState:U},ee,R,{children:[re||I,u.jsx(PO,{className:le(q.label),ownerState:U,children:m}),J]}))});function vo({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const ed=p.createContext(void 0);function br(){return p.useContext(ed)}function Kw(e){return u.jsx(t$,S({},e,{defaultTheme:Bu,themeId:Fo}))}function Z0(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Oc(e,t=!1){return e&&(Z0(e.value)&&e.value!==""||t&&Z0(e.defaultValue)&&e.defaultValue!=="")}function TO(e){return e.startAdornment}function $O(e){return be("MuiInputBase",e)}const Ui=we("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),jO=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],td=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Z(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},nd=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},MO=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:d,readOnly:f,size:m,startAdornment:w,type:y}=e,x={root:["root",`color${Z(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",m&&m!=="medium"&&`size${Z(m)}`,d&&"multiline",w&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",y==="search"&&"inputTypeSearch",d&&"inputMultiline",m==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",w&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]};return Se(x,$O,t)},rd=ie("div",{name:"MuiInputBase",slot:"Root",overridesResolver:td})(({theme:e,ownerState:t})=>S({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Ui.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&S({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),od=ie("input",{name:"MuiInputBase",slot:"Input",overridesResolver:nd})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",r=S({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return S({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Ui.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${Ui.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),OO=u.jsx(Kw,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),IO=p.forwardRef(function(t,n){var r;const o=ke({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:a,autoFocus:s,className:l,components:c={},componentsProps:d={},defaultValue:f,disabled:m,disableInjectingGlobalStyles:w,endAdornment:y,fullWidth:x=!1,id:k,inputComponent:g="input",inputProps:h={},inputRef:b,maxRows:C,minRows:R,multiline:E=!1,name:P,onBlur:M,onChange:D,onClick:O,onFocus:F,onKeyDown:V,onKeyUp:U,placeholder:q,readOnly:ee,renderSuffix:J,rows:re,slotProps:I={},slots:B={},startAdornment:$,type:v="text",value:T}=o,L=se(o,jO),_=h.value!=null?h.value:T,{current:N}=p.useRef(_!=null),H=p.useRef(),j=p.useCallback(Ee=>{},[]),A=ct(H,b,h.ref,j),[G,Y]=p.useState(!1),K=br(),oe=vo({props:o,muiFormControl:K,states:["color","disabled","error","hiddenLabel","size","required","filled"]});oe.focused=K?K.focused:G,p.useEffect(()=>{!K&&m&&G&&(Y(!1),M&&M())},[K,m,G,M]);const te=K&&K.onFilled,ne=K&&K.onEmpty,de=p.useCallback(Ee=>{Oc(Ee)?te&&te():ne&&ne()},[te,ne]);Sn(()=>{N&&de({value:_})},[_,de,N]);const Re=Ee=>{if(oe.disabled){Ee.stopPropagation();return}F&&F(Ee),h.onFocus&&h.onFocus(Ee),K&&K.onFocus?K.onFocus(Ee):Y(!0)},W=Ee=>{M&&M(Ee),h.onBlur&&h.onBlur(Ee),K&&K.onBlur?K.onBlur(Ee):Y(!1)},ae=(Ee,...he)=>{if(!N){const Ge=Ee.target||H.current;if(Ge==null)throw new Error(Bo(1));de({value:Ge.value})}h.onChange&&h.onChange(Ee,...he),D&&D(Ee,...he)};p.useEffect(()=>{de(H.current)},[]);const ge=Ee=>{H.current&&Ee.currentTarget===Ee.target&&H.current.focus(),O&&O(Ee)};let z=g,X=h;E&&z==="input"&&(re?X=S({type:void 0,minRows:re,maxRows:re},X):X=S({type:void 0,maxRows:C,minRows:R},X),z=pO);const fe=Ee=>{de(Ee.animationName==="mui-auto-fill-cancel"?H.current:{value:"x"})};p.useEffect(()=>{K&&K.setAdornedStart(!!$)},[K,$]);const pe=S({},o,{color:oe.color||"primary",disabled:oe.disabled,endAdornment:y,error:oe.error,focused:oe.focused,formControl:K,fullWidth:x,hiddenLabel:oe.hiddenLabel,multiline:E,size:oe.size,startAdornment:$,type:v}),ve=MO(pe),Ce=B.root||c.Root||rd,Le=I.root||d.root||{},De=B.input||c.Input||od;return X=S({},X,(r=I.input)!=null?r:d.input),u.jsxs(p.Fragment,{children:[!w&&OO,u.jsxs(Ce,S({},Le,!Ni(Ce)&&{ownerState:S({},pe,Le.ownerState)},{ref:n,onClick:ge},L,{className:le(ve.root,Le.className,l,ee&&"MuiInputBase-readOnly"),children:[$,u.jsx(ed.Provider,{value:null,children:u.jsx(De,S({ownerState:pe,"aria-invalid":oe.error,"aria-describedby":i,autoComplete:a,autoFocus:s,defaultValue:f,disabled:oe.disabled,id:k,onAnimationStart:fe,name:P,placeholder:q,readOnly:ee,required:oe.required,rows:re,value:_,onKeyDown:V,onKeyUp:U,type:v},X,!Ni(De)&&{as:z,ownerState:S({},pe,X.ownerState)},{ref:A,className:le(ve.input,X.className,ee&&"MuiInputBase-readOnly"),onBlur:W,onChange:ae,onFocus:Re}))}),y,J?J(S({},oe,{startAdornment:$})):null]}))]})}),Sm=IO;function _O(e){return be("MuiInput",e)}const ba=S({},Ui,we("MuiInput",["root","underline","input"]));function LO(e){return be("MuiOutlinedInput",e)}const Ur=S({},Ui,we("MuiOutlinedInput",["root","notchedOutline","input"]));function AO(e){return be("MuiFilledInput",e)}const xo=S({},Ui,we("MuiFilledInput",["root","underline","input"])),NO=Ht(u.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),DO=Ht(u.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function zO(e){return be("MuiAvatar",e)}we("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const BO=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],FO=Qu(),UO=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Se({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},zO,t)},WO=ie("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:S({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:S({backgroundColor:e.palette.grey[400]},e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})))}]})),VO=ie("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),HO=ie(DO,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function qO({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,i]=p.useState(!1);return p.useEffect(()=>{if(!n&&!r)return;i(!1);let a=!0;const s=new Image;return s.onload=()=>{a&&i("loaded")},s.onerror=()=>{a&&i("error")},s.crossOrigin=e,s.referrerPolicy=t,s.src=n,r&&(s.srcset=r),()=>{a=!1}},[e,t,n,r]),o}const Er=p.forwardRef(function(t,n){const r=FO({props:t,name:"MuiAvatar"}),{alt:o,children:i,className:a,component:s="div",slots:l={},slotProps:c={},imgProps:d,sizes:f,src:m,srcSet:w,variant:y="circular"}=r,x=se(r,BO);let k=null;const g=qO(S({},d,{src:m,srcSet:w})),h=m||w,b=h&&g!=="error",C=S({},r,{colorDefault:!b,component:s,variant:y}),R=UO(C),[E,P]=kp("img",{className:R.img,elementType:VO,externalForwardedProps:{slots:l,slotProps:{img:S({},d,c.img)}},additionalProps:{alt:o,src:m,srcSet:w,sizes:f},ownerState:C});return b?k=u.jsx(E,S({},P)):i||i===0?k=i:h&&o?k=o[0]:k=u.jsx(HO,{ownerState:C,className:R.fallback}),u.jsx(WO,S({as:s,ownerState:C,className:le(R.root,a),ref:n},x,{children:k}))}),GO=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],KO={entering:{opacity:1},entered:{opacity:1}},Yw=p.forwardRef(function(t,n){const r=mo(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:d,onEntered:f,onEntering:m,onExit:w,onExited:y,onExiting:x,style:k,timeout:g=o,TransitionComponent:h=ar}=t,b=se(t,GO),C=p.useRef(null),R=ct(C,s.ref,n),E=q=>ee=>{if(q){const J=C.current;ee===void 0?q(J):q(J,ee)}},P=E(m),M=E((q,ee)=>{pm(q);const J=Ai({style:k,timeout:g,easing:l},{mode:"enter"});q.style.webkitTransition=r.transitions.create("opacity",J),q.style.transition=r.transitions.create("opacity",J),d&&d(q,ee)}),D=E(f),O=E(x),F=E(q=>{const ee=Ai({style:k,timeout:g,easing:l},{mode:"exit"});q.style.webkitTransition=r.transitions.create("opacity",ee),q.style.transition=r.transitions.create("opacity",ee),w&&w(q)}),V=E(y),U=q=>{i&&i(C.current,q)};return u.jsx(h,S({appear:a,in:c,nodeRef:C,onEnter:M,onEntered:D,onEntering:P,onExit:F,onExited:V,onExiting:O,addEndListener:U,timeout:g},b,{children:(q,ee)=>p.cloneElement(s,S({style:S({opacity:0,visibility:q==="exited"&&!c?"hidden":void 0},KO[q],k,s.props.style),ref:R},ee))}))});function YO(e){return be("MuiBackdrop",e)}we("MuiBackdrop",["root","invisible"]);const XO=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],QO=e=>{const{classes:t,invisible:n}=e;return Se({root:["root",n&&"invisible"]},YO,t)},JO=ie("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>S({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),Xw=p.forwardRef(function(t,n){var r,o,i;const a=ke({props:t,name:"MuiBackdrop"}),{children:s,className:l,component:c="div",components:d={},componentsProps:f={},invisible:m=!1,open:w,slotProps:y={},slots:x={},TransitionComponent:k=Yw,transitionDuration:g}=a,h=se(a,XO),b=S({},a,{component:c,invisible:m}),C=QO(b),R=(r=y.root)!=null?r:f.root;return u.jsx(k,S({in:w,timeout:g},h,{children:u.jsx(JO,S({"aria-hidden":!0},R,{as:(o=(i=x.root)!=null?i:d.Root)!=null?o:c,className:le(C.root,l,R==null?void 0:R.className),ownerState:S({},b,R==null?void 0:R.ownerState),classes:C,ref:n,children:s}))}))});function ZO(e){return be("MuiBadge",e)}const Wr=we("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),e3=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],Qd=10,Jd=4,t3=Qu(),n3=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Z(n.vertical)}${Z(n.horizontal)}`,`anchorOrigin${Z(n.vertical)}${Z(n.horizontal)}${Z(o)}`,`overlap${Z(o)}`,t!=="default"&&`color${Z(t)}`]};return Se(s,ZO,a)},r3=ie("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),o3=ie("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Z(n.anchorOrigin.vertical)}${Z(n.anchorOrigin.horizontal)}${Z(n.overlap)}`],n.color!=="default"&&t[`color${Z(n.color)}`],n.invisible&&t.invisible]}})(({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:Qd*2,lineHeight:1,padding:"0 6px",height:Qd*2,borderRadius:Qd,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r,o;return((r=e.vars)!=null?r:e).palette[n].main&&((o=e.vars)!=null?o:e).palette[n].contrastText}).map(n=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText}})),{props:{variant:"dot"},style:{borderRadius:Jd,height:Jd*2,minWidth:Jd*2,padding:0}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Wr.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Wr.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Wr.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Wr.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Wr.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Wr.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Wr.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Wr.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}}),i3=p.forwardRef(function(t,n){var r,o,i,a,s,l;const c=t3({props:t,name:"MuiBadge"}),{anchorOrigin:d={vertical:"top",horizontal:"right"},className:f,component:m,components:w={},componentsProps:y={},children:x,overlap:k="rectangular",color:g="default",invisible:h=!1,max:b=99,badgeContent:C,slots:R,slotProps:E,showZero:P=!1,variant:M="standard"}=c,D=se(c,e3),{badgeContent:O,invisible:F,max:V,displayValue:U}=Rj({max:b,invisible:h,badgeContent:C,showZero:P}),q=hw({anchorOrigin:d,color:g,overlap:k,variant:M,badgeContent:C}),ee=F||O==null&&M!=="dot",{color:J=g,overlap:re=k,anchorOrigin:I=d,variant:B=M}=ee?q:c,$=B!=="dot"?U:void 0,v=S({},c,{badgeContent:O,invisible:ee,max:V,displayValue:$,showZero:P,anchorOrigin:I,color:J,overlap:re,variant:B}),T=n3(v),L=(r=(o=R==null?void 0:R.root)!=null?o:w.Root)!=null?r:r3,_=(i=(a=R==null?void 0:R.badge)!=null?a:w.Badge)!=null?i:o3,N=(s=E==null?void 0:E.root)!=null?s:y.root,H=(l=E==null?void 0:E.badge)!=null?l:y.badge,j=fn({elementType:L,externalSlotProps:N,externalForwardedProps:D,additionalProps:{ref:n,as:m},ownerState:v,className:le(N==null?void 0:N.className,T.root,f)}),A=fn({elementType:_,externalSlotProps:H,ownerState:v,className:le(T.badge,H==null?void 0:H.className)});return u.jsxs(L,S({},j,{children:[x,u.jsx(_,S({},A,{children:$}))]}))}),a3=we("MuiBox",["root"]),s3=zs(),et=s$({themeId:Fo,defaultTheme:s3,defaultClassName:a3.root,generateClassName:Zh.generate});function l3(e){return be("MuiButton",e)}const yl=we("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),c3=p.createContext({}),u3=p.createContext(void 0),d3=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],f3=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e,s={root:["root",i,`${i}${Z(t)}`,`size${Z(o)}`,`${i}Size${Z(o)}`,`color${Z(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${Z(o)}`],endIcon:["icon","endIcon",`iconSize${Z(o)}`]},l=Se(s,l3,a);return S({},a,l)},Qw=e=>S({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),p3=ie(Ir,{shouldForwardProp:e=>Vt(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Z(n.color)}`],t[`size${Z(n.size)}`],t[`${n.variant}Size${Z(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const o=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],i=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return S({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":S({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Fe(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Fe(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Fe(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":S({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${yl.focusVisible}`]:S({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${yl.disabled}`]:S({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Fe(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${yl.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${yl.disabled}`]:{boxShadow:"none"}}),h3=ie("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Z(n.size)}`]]}})(({ownerState:e})=>S({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},Qw(e))),m3=ie("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Z(n.size)}`]]}})(({ownerState:e})=>S({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},Qw(e))),Rt=p.forwardRef(function(t,n){const r=p.useContext(c3),o=p.useContext(u3),i=nm(r,t),a=ke({props:i,name:"MuiButton"}),{children:s,color:l="primary",component:c="button",className:d,disabled:f=!1,disableElevation:m=!1,disableFocusRipple:w=!1,endIcon:y,focusVisibleClassName:x,fullWidth:k=!1,size:g="medium",startIcon:h,type:b,variant:C="text"}=a,R=se(a,d3),E=S({},a,{color:l,component:c,disabled:f,disableElevation:m,disableFocusRipple:w,fullWidth:k,size:g,type:b,variant:C}),P=f3(E),M=h&&u.jsx(h3,{className:P.startIcon,ownerState:E,children:h}),D=y&&u.jsx(m3,{className:P.endIcon,ownerState:E,children:y}),O=o||"";return u.jsxs(p3,S({ownerState:E,className:le(r.className,P.root,d,O),component:c,disabled:f,focusRipple:!w,focusVisibleClassName:le(P.focusVisible,x),ref:n,type:b},R,{classes:P,children:[M,s,D]}))});function g3(e){return be("MuiCard",e)}we("MuiCard",["root"]);const v3=["className","raised"],y3=e=>{const{classes:t}=e;return Se({root:["root"]},g3,t)},x3=ie(En,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),id=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiCard"}),{className:o,raised:i=!1}=r,a=se(r,v3),s=S({},r,{raised:i}),l=y3(s);return u.jsx(x3,S({className:le(l.root,o),elevation:i?8:void 0,ref:n,ownerState:s},a))});function b3(e){return be("MuiCardContent",e)}we("MuiCardContent",["root"]);const w3=["className","component"],S3=e=>{const{classes:t}=e;return Se({root:["root"]},b3,t)},C3=ie("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),Cm=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiCardContent"}),{className:o,component:i="div"}=r,a=se(r,w3),s=S({},r,{component:i}),l=S3(s);return u.jsx(C3,S({as:i,className:le(l.root,o),ownerState:s,ref:n},a))});function k3(e){return be("PrivateSwitchBase",e)}we("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const R3=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],P3=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${Z(o)}`],input:["input"]};return Se(i,k3,t)},E3=ie(Ir)(({ownerState:e})=>S({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),T3=ie("input",{shouldForwardProp:Vt})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Jw=p.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,className:a,defaultChecked:s,disabled:l,disableFocusRipple:c=!1,edge:d=!1,icon:f,id:m,inputProps:w,inputRef:y,name:x,onBlur:k,onChange:g,onFocus:h,readOnly:b,required:C=!1,tabIndex:R,type:E,value:P}=t,M=se(t,R3),[D,O]=vs({controlled:o,default:!!s,name:"SwitchBase",state:"checked"}),F=br(),V=B=>{h&&h(B),F&&F.onFocus&&F.onFocus(B)},U=B=>{k&&k(B),F&&F.onBlur&&F.onBlur(B)},q=B=>{if(B.nativeEvent.defaultPrevented)return;const $=B.target.checked;O($),g&&g(B,$)};let ee=l;F&&typeof ee>"u"&&(ee=F.disabled);const J=E==="checkbox"||E==="radio",re=S({},t,{checked:D,disabled:ee,disableFocusRipple:c,edge:d}),I=P3(re);return u.jsxs(E3,S({component:"span",className:le(I.root,a),centerRipple:!0,focusRipple:!c,disabled:ee,tabIndex:null,role:void 0,onFocus:V,onBlur:U,ownerState:re,ref:n},M,{children:[u.jsx(T3,S({autoFocus:r,checked:o,defaultChecked:s,className:I.input,disabled:ee,id:J?m:void 0,name:x,onChange:q,readOnly:b,ref:y,required:C,ownerState:re,tabIndex:R,type:E},E==="checkbox"&&P===void 0?{}:{value:P},w)),D?i:f]}))}),$3=Ht(u.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),j3=Ht(u.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),M3=Ht(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-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function O3(e){return be("MuiCheckbox",e)}const Zd=we("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),I3=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],_3=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${Z(r)}`,`size${Z(o)}`]},a=Se(i,O3,t);return S({},t,a)},L3=ie(Jw,{shouldForwardProp:e=>Vt(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Z(n.size)}`],n.color!=="default"&&t[`color${Z(n.color)}`]]}})(({theme:e,ownerState:t})=>S({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Fe(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${Zd.checked}, &.${Zd.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${Zd.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),A3=u.jsx(j3,{}),N3=u.jsx($3,{}),D3=u.jsx(M3,{}),km=p.forwardRef(function(t,n){var r,o;const i=ke({props:t,name:"MuiCheckbox"}),{checkedIcon:a=A3,color:s="primary",icon:l=N3,indeterminate:c=!1,indeterminateIcon:d=D3,inputProps:f,size:m="medium",className:w}=i,y=se(i,I3),x=c?d:l,k=c?d:a,g=S({},i,{color:s,indeterminate:c,size:m}),h=_3(g);return u.jsx(L3,S({type:"checkbox",inputProps:S({"data-indeterminate":c},f),icon:p.cloneElement(x,{fontSize:(r=x.props.fontSize)!=null?r:m}),checkedIcon:p.cloneElement(k,{fontSize:(o=k.props.fontSize)!=null?o:m}),ownerState:g,ref:n,className:le(h.root,w)},y,{classes:h}))});function z3(e){return be("MuiCircularProgress",e)}we("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const B3=["className","color","disableShrink","size","style","thickness","value","variant"];let ad=e=>e,ey,ty,ny,ry;const Vr=44,F3=Ji(ey||(ey=ad` + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +`)),U3=Ji(ty||(ty=ad` + 0% { + stroke-dasharray: 1px, 200px; + stroke-dashoffset: 0; + } + + 50% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -15px; + } + + 100% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -125px; + } +`)),W3=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${Z(r)}`],svg:["svg"],circle:["circle",`circle${Z(n)}`,o&&"circleDisableShrink"]};return Se(i,z3,t)},V3=ie("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Z(n.color)}`]]}})(({ownerState:e,theme:t})=>S({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&bu(ny||(ny=ad` + animation: ${0} 1.4s linear infinite; + `),F3)),H3=ie("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),q3=ie("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Z(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>S({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&bu(ry||(ry=ad` + animation: ${0} 1.4s ease-in-out infinite; + `),U3)),_n=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:l,thickness:c=3.6,value:d=0,variant:f="indeterminate"}=r,m=se(r,B3),w=S({},r,{color:i,disableShrink:a,size:s,thickness:c,value:d,variant:f}),y=W3(w),x={},k={},g={};if(f==="determinate"){const h=2*Math.PI*((Vr-c)/2);x.strokeDasharray=h.toFixed(3),g["aria-valuenow"]=Math.round(d),x.strokeDashoffset=`${((100-d)/100*h).toFixed(3)}px`,k.transform="rotate(-90deg)"}return u.jsx(V3,S({className:le(y.root,o),style:S({width:s,height:s},k,l),ownerState:w,ref:n,role:"progressbar"},g,m,{children:u.jsx(H3,{className:y.svg,ownerState:w,viewBox:`${Vr/2} ${Vr/2} ${Vr} ${Vr}`,children:u.jsx(q3,{className:y.circle,style:x,ownerState:w,cx:Vr,cy:Vr,r:(Vr-c)/2,fill:"none",strokeWidth:c})})}))}),Zw=J$({createStyledComponent:ie("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Z(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>ke({props:e,name:"MuiContainer"})}),G3=(e,t)=>S({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),K3=e=>S({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),Y3=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([a,s])=>{var l;r[e.getColorSchemeSelector(a).replace(/\s*&/,"")]={colorScheme:(l=s.palette)==null?void 0:l.mode}});let o=S({html:G3(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:S({margin:0},K3(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const i=(n=e.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return i&&(o=[o,i]),o};function Rm(e){const t=ke({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return u.jsxs(p.Fragment,{children:[u.jsx(Kw,{styles:o=>Y3(o,r)}),n]})}function X3(e){return be("MuiModal",e)}we("MuiModal",["root","hidden","backdrop"]);const Q3=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],J3=e=>{const{open:t,exited:n,classes:r}=e;return Se({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},X3,r)},Z3=ie("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>S({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),eI=ie(Xw,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Pm=p.forwardRef(function(t,n){var r,o,i,a,s,l;const c=ke({name:"MuiModal",props:t}),{BackdropComponent:d=eI,BackdropProps:f,className:m,closeAfterTransition:w=!1,children:y,container:x,component:k,components:g={},componentsProps:h={},disableAutoFocus:b=!1,disableEnforceFocus:C=!1,disableEscapeKeyDown:R=!1,disablePortal:E=!1,disableRestoreFocus:P=!1,disableScrollLock:M=!1,hideBackdrop:D=!1,keepMounted:O=!1,onBackdropClick:F,open:V,slotProps:U,slots:q}=c,ee=se(c,Q3),J=S({},c,{closeAfterTransition:w,disableAutoFocus:b,disableEnforceFocus:C,disableEscapeKeyDown:R,disablePortal:E,disableRestoreFocus:P,disableScrollLock:M,hideBackdrop:D,keepMounted:O}),{getRootProps:re,getBackdropProps:I,getTransitionProps:B,portalRef:$,isTopModal:v,exited:T,hasTransition:L}=Gj(S({},J,{rootRef:n})),_=S({},J,{exited:T}),N=J3(_),H={};if(y.props.tabIndex===void 0&&(H.tabIndex="-1"),L){const{onEnter:te,onExited:ne}=B();H.onEnter=te,H.onExited=ne}const j=(r=(o=q==null?void 0:q.root)!=null?o:g.Root)!=null?r:Z3,A=(i=(a=q==null?void 0:q.backdrop)!=null?a:g.Backdrop)!=null?i:d,G=(s=U==null?void 0:U.root)!=null?s:h.root,Y=(l=U==null?void 0:U.backdrop)!=null?l:h.backdrop,K=fn({elementType:j,externalSlotProps:G,externalForwardedProps:ee,getSlotProps:re,additionalProps:{ref:n,as:k},ownerState:_,className:le(m,G==null?void 0:G.className,N==null?void 0:N.root,!_.open&&_.exited&&(N==null?void 0:N.hidden))}),oe=fn({elementType:A,externalSlotProps:Y,additionalProps:f,getSlotProps:te=>I(S({},te,{onClick:ne=>{F&&F(ne),te!=null&&te.onClick&&te.onClick(ne)}})),className:le(Y==null?void 0:Y.className,f==null?void 0:f.className,N==null?void 0:N.backdrop),ownerState:_});return!O&&!V&&(!L||T)?null:u.jsx(_w,{ref:$,container:x,disablePortal:E,children:u.jsxs(j,S({},K,{children:[!D&&d?u.jsx(A,S({},oe)):null,u.jsx(Nj,{disableEnforceFocus:C,disableAutoFocus:b,disableRestoreFocus:P,isEnabled:v,open:V,children:p.cloneElement(y,H)})]}))})});function tI(e){return be("MuiDialog",e)}const ef=we("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),e2=p.createContext({}),nI=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],rI=ie(Xw,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),oI=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${Z(n)}`],paper:["paper",`paperScroll${Z(n)}`,`paperWidth${Z(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Se(a,tI,t)},iI=ie(Pm,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),aI=ie("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Z(n.scroll)}`]]}})(({ownerState:e})=>S({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),sI=ie(En,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Z(n.scroll)}`],t[`paperWidth${Z(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>S({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${ef.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${ef.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${ef.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),$p=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiDialog"}),o=mo(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,BackdropComponent:l,BackdropProps:c,children:d,className:f,disableEscapeKeyDown:m=!1,fullScreen:w=!1,fullWidth:y=!1,maxWidth:x="sm",onBackdropClick:k,onClick:g,onClose:h,open:b,PaperComponent:C=En,PaperProps:R={},scroll:E="paper",TransitionComponent:P=Yw,transitionDuration:M=i,TransitionProps:D}=r,O=se(r,nI),F=S({},r,{disableEscapeKeyDown:m,fullScreen:w,fullWidth:y,maxWidth:x,scroll:E}),V=oI(F),U=p.useRef(),q=I=>{U.current=I.target===I.currentTarget},ee=I=>{g&&g(I),U.current&&(U.current=null,k&&k(I),h&&h(I,"backdropClick"))},J=As(s),re=p.useMemo(()=>({titleId:J}),[J]);return u.jsx(iI,S({className:le(V.root,f),closeAfterTransition:!0,components:{Backdrop:rI},componentsProps:{backdrop:S({transitionDuration:M,as:l},c)},disableEscapeKeyDown:m,onClose:h,open:b,ref:n,onClick:ee,ownerState:F},O,{children:u.jsx(P,S({appear:!0,in:b,timeout:M,role:"presentation"},D,{children:u.jsx(aI,{className:le(V.container),onMouseDown:q,ownerState:F,children:u.jsx(sI,S({as:C,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":J},R,{className:le(V.paper,R.className),ownerState:F,children:u.jsx(e2.Provider,{value:re,children:d})}))})}))}))});function lI(e){return be("MuiDialogActions",e)}we("MuiDialogActions",["root","spacing"]);const cI=["className","disableSpacing"],uI=e=>{const{classes:t,disableSpacing:n}=e;return Se({root:["root",!n&&"spacing"]},lI,t)},dI=ie("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(({ownerState:e})=>S({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),jp=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1}=r,a=se(r,cI),s=S({},r,{disableSpacing:i}),l=uI(s);return u.jsx(dI,S({className:le(l.root,o),ownerState:s,ref:n},a))});function fI(e){return be("MuiDialogContent",e)}we("MuiDialogContent",["root","dividers"]);function pI(e){return be("MuiDialogTitle",e)}const hI=we("MuiDialogTitle",["root"]),mI=["className","dividers"],gI=e=>{const{classes:t,dividers:n}=e;return Se({root:["root",n&&"dividers"]},fI,t)},vI=ie("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>S({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${hI.root} + &`]:{paddingTop:0}})),Mp=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1}=r,a=se(r,mI),s=S({},r,{dividers:i}),l=gI(s);return u.jsx(vI,S({className:le(l.root,o),ownerState:s,ref:n},a))});function yI(e){return be("MuiDialogContentText",e)}we("MuiDialogContentText",["root"]);const xI=["children","className"],bI=e=>{const{classes:t}=e,r=Se({root:["root"]},yI,t);return S({},t,r)},wI=ie(Ie,{shouldForwardProp:e=>Vt(e)||e==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),t2=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiDialogContentText"}),{className:o}=r,i=se(r,xI),a=bI(i);return u.jsx(wI,S({component:"p",variant:"body1",color:"text.secondary",ref:n,ownerState:i,className:le(a.root,o)},r,{classes:a}))}),SI=["className","id"],CI=e=>{const{classes:t}=e;return Se({root:["root"]},pI,t)},kI=ie(Ie,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),Op=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiDialogTitle"}),{className:o,id:i}=r,a=se(r,SI),s=r,l=CI(s),{titleId:c=i}=p.useContext(e2);return u.jsx(kI,S({component:"h2",className:le(l.root,o),ownerState:s,ref:n,variant:"h6",id:i??c},a))});function RI(e){return be("MuiDivider",e)}const oy=we("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),PI=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],EI=e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return Se({root:["root",t&&"absolute",l,i&&"light",a==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",s==="right"&&a!=="vertical"&&"textAlignRight",s==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},RI,r)},TI=ie("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>S({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Fe(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>S({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>S({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>S({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>S({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),$I=ie("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>S({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),Wi=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:a,component:s=i?"div":"hr",flexItem:l=!1,light:c=!1,orientation:d="horizontal",role:f=s!=="hr"?"separator":void 0,textAlign:m="center",variant:w="fullWidth"}=r,y=se(r,PI),x=S({},r,{absolute:o,component:s,flexItem:l,light:c,orientation:d,role:f,textAlign:m,variant:w}),k=EI(x);return u.jsx(TI,S({as:s,className:le(k.root,a),role:f,ref:n,ownerState:x},y,{children:i?u.jsx($I,{className:k.wrapper,ownerState:x,children:i}):null}))});Wi.muiSkipListHighlight=!0;const jI=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function MI(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=Fn(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const c=i.getComputedStyle(t);a=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let s=0,l=0;if(a&&a!=="none"&&typeof a=="string"){const c=a.split("(")[1].split(")")[0].split(",");s=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?o?`translateX(${o.right+s-r.left}px)`:`translateX(${i.innerWidth+s-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:e==="up"?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function OI(e){return typeof e=="function"?e():e}function xl(e,t,n){const r=OI(n),o=MI(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const II=p.forwardRef(function(t,n){const r=mo(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:c,direction:d="down",easing:f=o,in:m,onEnter:w,onEntered:y,onEntering:x,onExit:k,onExited:g,onExiting:h,style:b,timeout:C=i,TransitionComponent:R=ar}=t,E=se(t,jI),P=p.useRef(null),M=ct(l.ref,P,n),D=I=>B=>{I&&(B===void 0?I(P.current):I(P.current,B))},O=D((I,B)=>{xl(d,I,c),pm(I),w&&w(I,B)}),F=D((I,B)=>{const $=Ai({timeout:C,style:b,easing:f},{mode:"enter"});I.style.webkitTransition=r.transitions.create("-webkit-transform",S({},$)),I.style.transition=r.transitions.create("transform",S({},$)),I.style.webkitTransform="none",I.style.transform="none",x&&x(I,B)}),V=D(y),U=D(h),q=D(I=>{const B=Ai({timeout:C,style:b,easing:f},{mode:"exit"});I.style.webkitTransition=r.transitions.create("-webkit-transform",B),I.style.transition=r.transitions.create("transform",B),xl(d,I,c),k&&k(I)}),ee=D(I=>{I.style.webkitTransition="",I.style.transition="",g&&g(I)}),J=I=>{a&&a(P.current,I)},re=p.useCallback(()=>{P.current&&xl(d,P.current,c)},[d,c]);return p.useEffect(()=>{if(m||d==="down"||d==="right")return;const I=ta(()=>{P.current&&xl(d,P.current,c)}),B=Fn(P.current);return B.addEventListener("resize",I),()=>{I.clear(),B.removeEventListener("resize",I)}},[d,m,c]),p.useEffect(()=>{m||re()},[m,re]),u.jsx(R,S({nodeRef:P,onEnter:O,onEntered:V,onEntering:F,onExit:q,onExited:ee,onExiting:U,addEndListener:J,appear:s,in:m,timeout:C},E,{children:(I,B)=>p.cloneElement(l,S({ref:M,style:S({visibility:I==="exited"&&!m?"hidden":void 0},b,l.props.style)},B))}))});function _I(e){return be("MuiDrawer",e)}we("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const LI=["BackdropProps"],AI=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],n2=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},NI=e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${Z(n)}`,r!=="temporary"&&`paperAnchorDocked${Z(n)}`]};return Se(o,_I,t)},DI=ie(Pm,{name:"MuiDrawer",slot:"Root",overridesResolver:n2})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),iy=ie("div",{shouldForwardProp:Vt,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:n2})({flex:"0 0 auto"}),zI=ie(En,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${Z(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${Z(n.anchor)}`]]}})(({theme:e,ownerState:t})=>S({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},t.anchor==="left"&&{left:0},t.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="right"&&{right:0},t.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="left"&&t.variant!=="temporary"&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="top"&&t.variant!=="temporary"&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="right"&&t.variant!=="temporary"&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="bottom"&&t.variant!=="temporary"&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),r2={left:"right",right:"left",top:"down",bottom:"up"};function BI(e){return["left","right"].indexOf(e)!==-1}function FI({direction:e},t){return e==="rtl"&&BI(t)?r2[t]:t}const UI=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiDrawer"}),o=mo(),i=Ds(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:c,className:d,elevation:f=16,hideBackdrop:m=!1,ModalProps:{BackdropProps:w}={},onClose:y,open:x=!1,PaperProps:k={},SlideProps:g,TransitionComponent:h=II,transitionDuration:b=a,variant:C="temporary"}=r,R=se(r.ModalProps,LI),E=se(r,AI),P=p.useRef(!1);p.useEffect(()=>{P.current=!0},[]);const M=FI({direction:i?"rtl":"ltr"},s),O=S({},r,{anchor:s,elevation:f,open:x,variant:C},E),F=NI(O),V=u.jsx(zI,S({elevation:C==="temporary"?f:0,square:!0},k,{className:le(F.paper,k.className),ownerState:O,children:c}));if(C==="permanent")return u.jsx(iy,S({className:le(F.root,F.docked,d),ownerState:O,ref:n},E,{children:V}));const U=u.jsx(h,S({in:x,direction:r2[M],timeout:b,appear:P.current},g,{children:V}));return C==="persistent"?u.jsx(iy,S({className:le(F.root,F.docked,d),ownerState:O,ref:n},E,{children:U})):u.jsx(DI,S({BackdropProps:S({},l,w,{transitionDuration:b}),className:le(F.root,F.modal,d),open:x,ownerState:O,onClose:y,hideBackdrop:m,ref:n},E,R,{children:U}))}),WI=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],VI=e=>{const{classes:t,disableUnderline:n}=e,o=Se({root:["root",!n&&"underline"],input:["input"]},AO,t);return S({},t,o)},HI=ie(rd,{shouldForwardProp:e=>Vt(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...td(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r=e.palette.mode==="light",o=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return S({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i}},[`&.${xo.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i},[`&.${xo.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${xo.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${xo.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${xo.disabled}, .${xo.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${xo.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&S({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9}))}),qI=ie(od,{name:"MuiFilledInput",slot:"Input",overridesResolver:nd})(({theme:e,ownerState:t})=>S({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),Em=p.forwardRef(function(t,n){var r,o,i,a;const s=ke({props:t,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:d=!1,inputComponent:f="input",multiline:m=!1,slotProps:w,slots:y={},type:x="text"}=s,k=se(s,WI),g=S({},s,{fullWidth:d,inputComponent:f,multiline:m,type:x}),h=VI(s),b={root:{ownerState:g},input:{ownerState:g}},C=w??c?Qt(b,w??c):b,R=(r=(o=y.root)!=null?o:l.Root)!=null?r:HI,E=(i=(a=y.input)!=null?a:l.Input)!=null?i:qI;return u.jsx(Sm,S({slots:{root:R,input:E},componentsProps:C,fullWidth:d,inputComponent:f,multiline:m,ref:n,type:x},k,{classes:h}))});Em.muiName="Input";function GI(e){return be("MuiFormControl",e)}we("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const KI=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],YI=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${Z(n)}`,r&&"fullWidth"]};return Se(o,GI,t)},XI=ie("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>S({},t.root,t[`margin${Z(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>S({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),sd=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,error:c=!1,focused:d,fullWidth:f=!1,hiddenLabel:m=!1,margin:w="none",required:y=!1,size:x="medium",variant:k="outlined"}=r,g=se(r,KI),h=S({},r,{color:a,component:s,disabled:l,error:c,fullWidth:f,hiddenLabel:m,margin:w,required:y,size:x,variant:k}),b=YI(h),[C,R]=p.useState(()=>{let U=!1;return o&&p.Children.forEach(o,q=>{if(!Ua(q,["Input","Select"]))return;const ee=Ua(q,["Select"])?q.props.input:q;ee&&TO(ee.props)&&(U=!0)}),U}),[E,P]=p.useState(()=>{let U=!1;return o&&p.Children.forEach(o,q=>{Ua(q,["Input","Select"])&&(Oc(q.props,!0)||Oc(q.props.inputProps,!0))&&(U=!0)}),U}),[M,D]=p.useState(!1);l&&M&&D(!1);const O=d!==void 0&&!l?d:M;let F;const V=p.useMemo(()=>({adornedStart:C,setAdornedStart:R,color:a,disabled:l,error:c,filled:E,focused:O,fullWidth:f,hiddenLabel:m,size:x,onBlur:()=>{D(!1)},onEmpty:()=>{P(!1)},onFilled:()=>{P(!0)},onFocus:()=>{D(!0)},registerEffect:F,required:y,variant:k}),[C,a,l,c,E,O,f,m,F,y,x,k]);return u.jsx(ed.Provider,{value:V,children:u.jsx(XI,S({as:s,ownerState:h,className:le(b.root,i),ref:n},g,{children:o}))})}),QI=a4({createStyledComponent:ie("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>ke({props:e,name:"MuiStack"})});function JI(e){return be("MuiFormControlLabel",e)}const Ma=we("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),ZI=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],e_=e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e,a={root:["root",n&&"disabled",`labelPlacement${Z(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return Se(a,JI,t)},t_=ie("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ma.label}`]:t.label},t.root,t[`labelPlacement${Z(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>S({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Ma.disabled}`]:{cursor:"default"}},t.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},t.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},t.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${Ma.label}`]:{[`&.${Ma.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),n_=ie("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${Ma.error}`]:{color:(e.vars||e).palette.error.main}})),Tm=p.forwardRef(function(t,n){var r,o;const i=ke({props:t,name:"MuiFormControlLabel"}),{className:a,componentsProps:s={},control:l,disabled:c,disableTypography:d,label:f,labelPlacement:m="end",required:w,slotProps:y={}}=i,x=se(i,ZI),k=br(),g=(r=c??l.props.disabled)!=null?r:k==null?void 0:k.disabled,h=w??l.props.required,b={disabled:g,required:h};["checked","name","onChange","value","inputRef"].forEach(D=>{typeof l.props[D]>"u"&&typeof i[D]<"u"&&(b[D]=i[D])});const C=vo({props:i,muiFormControl:k,states:["error"]}),R=S({},i,{disabled:g,labelPlacement:m,required:h,error:C.error}),E=e_(R),P=(o=y.typography)!=null?o:s.typography;let M=f;return M!=null&&M.type!==Ie&&!d&&(M=u.jsx(Ie,S({component:"span"},P,{className:le(E.label,P==null?void 0:P.className),children:M}))),u.jsxs(t_,S({className:le(E.root,a),ownerState:R,ref:n},x,{children:[p.cloneElement(l,b),h?u.jsxs(QI,{display:"block",children:[M,u.jsxs(n_,{ownerState:R,"aria-hidden":!0,className:E.asterisk,children:[" ","*"]})]}):M]}))});function r_(e){return be("MuiFormGroup",e)}we("MuiFormGroup",["root","row","error"]);const o_=["className","row"],i_=e=>{const{classes:t,row:n,error:r}=e;return Se({root:["root",n&&"row",r&&"error"]},r_,t)},a_=ie("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})(({ownerState:e})=>S({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),o2=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiFormGroup"}),{className:o,row:i=!1}=r,a=se(r,o_),s=br(),l=vo({props:r,muiFormControl:s,states:["error"]}),c=S({},r,{row:i,error:l.error}),d=i_(c);return u.jsx(a_,S({className:le(d.root,o),ownerState:c,ref:n},a))});function s_(e){return be("MuiFormHelperText",e)}const ay=we("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var sy;const l_=["children","className","component","disabled","error","filled","focused","margin","required","variant"],c_=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e,c={root:["root",o&&"disabled",i&&"error",r&&`size${Z(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return Se(c,s_,t)},u_=ie("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Z(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>S({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${ay.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ay.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),d_=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p"}=r,s=se(r,l_),l=br(),c=vo({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),d=S({},r,{component:a,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=c_(d);return u.jsx(u_,S({as:a,ownerState:d,className:le(f.root,i),ref:n},s,{children:o===" "?sy||(sy=u.jsx("span",{className:"notranslate",children:"​"})):o}))});function f_(e){return be("MuiFormLabel",e)}const qa=we("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),p_=["children","className","color","component","disabled","error","filled","focused","required"],h_=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e,l={root:["root",`color${Z(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return Se(l,f_,t)},m_=ie("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>S({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>S({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${qa.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${qa.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${qa.error}`]:{color:(e.vars||e).palette.error.main}})),g_=ie("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${qa.error}`]:{color:(e.vars||e).palette.error.main}})),v_=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiFormLabel"}),{children:o,className:i,component:a="label"}=r,s=se(r,p_),l=br(),c=vo({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),d=S({},r,{color:c.color||"primary",component:a,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=h_(d);return u.jsxs(m_,S({as:a,ownerState:d,className:le(f.root,i),ref:n},s,{children:[o,c.required&&u.jsxs(g_,{ownerState:d,"aria-hidden":!0,className:f.asterisk,children:[" ","*"]})]}))}),y_=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Ip(e){return`scale(${e}, ${e**2})`}const x_={entering:{opacity:1,transform:Ip(1)},entered:{opacity:1,transform:"none"}},tf=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),bs=p.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:d,onExit:f,onExited:m,onExiting:w,style:y,timeout:x="auto",TransitionComponent:k=ar}=t,g=se(t,y_),h=To(),b=p.useRef(),C=mo(),R=p.useRef(null),E=ct(R,i.ref,n),P=ee=>J=>{if(ee){const re=R.current;J===void 0?ee(re):ee(re,J)}},M=P(d),D=P((ee,J)=>{pm(ee);const{duration:re,delay:I,easing:B}=Ai({style:y,timeout:x,easing:a},{mode:"enter"});let $;x==="auto"?($=C.transitions.getAutoHeightDuration(ee.clientHeight),b.current=$):$=re,ee.style.transition=[C.transitions.create("opacity",{duration:$,delay:I}),C.transitions.create("transform",{duration:tf?$:$*.666,delay:I,easing:B})].join(","),l&&l(ee,J)}),O=P(c),F=P(w),V=P(ee=>{const{duration:J,delay:re,easing:I}=Ai({style:y,timeout:x,easing:a},{mode:"exit"});let B;x==="auto"?(B=C.transitions.getAutoHeightDuration(ee.clientHeight),b.current=B):B=J,ee.style.transition=[C.transitions.create("opacity",{duration:B,delay:re}),C.transitions.create("transform",{duration:tf?B:B*.666,delay:tf?re:re||B*.333,easing:I})].join(","),ee.style.opacity=0,ee.style.transform=Ip(.75),f&&f(ee)}),U=P(m),q=ee=>{x==="auto"&&h.start(b.current||0,ee),r&&r(R.current,ee)};return u.jsx(k,S({appear:o,in:s,nodeRef:R,onEnter:D,onEntered:O,onEntering:M,onExit:V,onExited:U,onExiting:F,addEndListener:q,timeout:x==="auto"?null:x},g,{children:(ee,J)=>p.cloneElement(i,S({style:S({opacity:0,transform:Ip(.75),visibility:ee==="exited"&&!s?"hidden":void 0},x_[ee],y,i.props.style),ref:E},J))}))});bs.muiSupportAuto=!0;const b_=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],w_=e=>{const{classes:t,disableUnderline:n}=e,o=Se({root:["root",!n&&"underline"],input:["input"]},_O,t);return S({},t,o)},S_=ie(rd,{shouldForwardProp:e=>Vt(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...td(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),S({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ba.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ba.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ba.disabled}, .${ba.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${ba.disabled}:before`]:{borderBottomStyle:"dotted"}})}),C_=ie(od,{name:"MuiInput",slot:"Input",overridesResolver:nd})({}),$m=p.forwardRef(function(t,n){var r,o,i,a;const s=ke({props:t,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:d,fullWidth:f=!1,inputComponent:m="input",multiline:w=!1,slotProps:y,slots:x={},type:k="text"}=s,g=se(s,b_),h=w_(s),C={root:{ownerState:{disableUnderline:l}}},R=y??d?Qt(y??d,C):C,E=(r=(o=x.root)!=null?o:c.Root)!=null?r:S_,P=(i=(a=x.input)!=null?a:c.Input)!=null?i:C_;return u.jsx(Sm,S({slots:{root:E,input:P},slotProps:R,fullWidth:f,inputComponent:m,multiline:w,ref:n,type:k},g,{classes:h}))});$m.muiName="Input";function k_(e){return be("MuiInputAdornment",e)}const ly=we("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var cy;const R_=["children","className","component","disablePointerEvents","disableTypography","position","variant"],P_=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Z(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},E_=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e,s={root:["root",n&&"disablePointerEvents",o&&`position${Z(o)}`,a,r&&"hiddenLabel",i&&`size${Z(i)}`]};return Se(s,k_,t)},T_=ie("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:P_})(({theme:e,ownerState:t})=>S({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},t.variant==="filled"&&{[`&.${ly.positionStart}&:not(.${ly.hiddenLabel})`]:{marginTop:16}},t.position==="start"&&{marginRight:8},t.position==="end"&&{marginLeft:8},t.disablePointerEvents===!0&&{pointerEvents:"none"})),Ic=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:d}=r,f=se(r,R_),m=br()||{};let w=d;d&&m.variant,m&&!w&&(w=m.variant);const y=S({},r,{hiddenLabel:m.hiddenLabel,size:m.size,disablePointerEvents:s,position:c,variant:w}),x=E_(y);return u.jsx(ed.Provider,{value:null,children:u.jsx(T_,S({as:a,ownerState:y,className:le(x.root,i),ref:n},f,{children:typeof o=="string"&&!l?u.jsx(Ie,{color:"text.secondary",children:o}):u.jsxs(p.Fragment,{children:[c==="start"?cy||(cy=u.jsx("span",{className:"notranslate",children:"​"})):null,o]})}))})});function $_(e){return be("MuiInputLabel",e)}we("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const j_=["disableAnimation","margin","shrink","variant","className"],M_=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${Z(r)}`,a],asterisk:[s&&"asterisk"]},c=Se(l,$_,t);return S({},t,c)},O_=ie(v_,{shouldForwardProp:e=>Vt(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${qa.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(({theme:e,ownerState:t})=>S({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&S({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&S({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&S({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),ld=p.forwardRef(function(t,n){const r=ke({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,shrink:i,className:a}=r,s=se(r,j_),l=br();let c=i;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const d=vo({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),f=S({},r,{disableAnimation:o,formControl:l,shrink:c,size:d.size,variant:d.variant,required:d.required,focused:d.focused}),m=M_(f);return u.jsx(O_,S({"data-shrink":c,ownerState:f,ref:n,className:le(m.root,a)},s,{classes:m}))}),gr=p.createContext({});function I_(e){return be("MuiList",e)}we("MuiList",["root","padding","dense","subheader"]);const __=["children","className","component","dense","disablePadding","subheader"],L_=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Se({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},I_,t)},A_=ie("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>S({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Ws=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c}=r,d=se(r,__),f=p.useMemo(()=>({dense:s}),[s]),m=S({},r,{component:a,dense:s,disablePadding:l}),w=L_(m);return u.jsx(gr.Provider,{value:f,children:u.jsxs(A_,S({as:a,className:le(w.root,i),ref:n,ownerState:m},d,{children:[c,o]}))})});function N_(e){return be("MuiListItem",e)}const oi=we("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),D_=we("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function z_(e){return be("MuiListItemSecondaryAction",e)}we("MuiListItemSecondaryAction",["root","disableGutters"]);const B_=["className"],F_=e=>{const{disableGutters:t,classes:n}=e;return Se({root:["root",t&&"disableGutters"]},z_,n)},U_=ie("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>S({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),i2=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiListItemSecondaryAction"}),{className:o}=r,i=se(r,B_),a=p.useContext(gr),s=S({},r,{disableGutters:a.disableGutters}),l=F_(s);return u.jsx(U_,S({className:le(l.root,o),ownerState:s,ref:n},i))});i2.muiName="ListItemSecondaryAction";const W_=["className"],V_=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],H_=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]},q_=e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:i,disableGutters:a,disablePadding:s,divider:l,hasSecondaryAction:c,selected:d}=e;return Se({root:["root",o&&"dense",!a&&"gutters",!s&&"padding",l&&"divider",i&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",d&&"selected"],container:["container"]},N_,r)},G_=ie("div",{name:"MuiListItem",slot:"Root",overridesResolver:H_})(({theme:e,ownerState:t})=>S({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&S({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${D_.root}`]:{paddingRight:48}},{[`&.${oi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${oi.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Fe(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${oi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Fe(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${oi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.alignItems==="flex-start"&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${oi.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Fe(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Fe(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),K_=ie("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),_c=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiListItem"}),{alignItems:o="center",autoFocus:i=!1,button:a=!1,children:s,className:l,component:c,components:d={},componentsProps:f={},ContainerComponent:m="li",ContainerProps:{className:w}={},dense:y=!1,disabled:x=!1,disableGutters:k=!1,disablePadding:g=!1,divider:h=!1,focusVisibleClassName:b,secondaryAction:C,selected:R=!1,slotProps:E={},slots:P={}}=r,M=se(r.ContainerProps,W_),D=se(r,V_),O=p.useContext(gr),F=p.useMemo(()=>({dense:y||O.dense||!1,alignItems:o,disableGutters:k}),[o,O.dense,y,k]),V=p.useRef(null);Sn(()=>{i&&V.current&&V.current.focus()},[i]);const U=p.Children.toArray(s),q=U.length&&Ua(U[U.length-1],["ListItemSecondaryAction"]),ee=S({},r,{alignItems:o,autoFocus:i,button:a,dense:F.dense,disabled:x,disableGutters:k,disablePadding:g,divider:h,hasSecondaryAction:q,selected:R}),J=q_(ee),re=ct(V,n),I=P.root||d.Root||G_,B=E.root||f.root||{},$=S({className:le(J.root,B.className,l),disabled:x},D);let v=c||"li";return a&&($.component=c||"div",$.focusVisibleClassName=le(oi.focusVisible,b),v=Ir),q?(v=!$.component&&!c?"div":v,m==="li"&&(v==="li"?v="div":$.component==="li"&&($.component="div")),u.jsx(gr.Provider,{value:F,children:u.jsxs(K_,S({as:m,className:le(J.container,w),ref:re,ownerState:ee},M,{children:[u.jsx(I,S({},B,!Ni(I)&&{as:v,ownerState:S({},ee,B.ownerState)},$,{children:U})),U.pop()]}))})):u.jsx(gr.Provider,{value:F,children:u.jsxs(I,S({},B,{as:v,ref:re},!Ni(I)&&{ownerState:S({},ee,B.ownerState)},$,{children:[U,C&&u.jsx(i2,{children:C})]}))})});function Y_(e){return be("MuiListItemAvatar",e)}we("MuiListItemAvatar",["root","alignItemsFlexStart"]);const X_=["className"],Q_=e=>{const{alignItems:t,classes:n}=e;return Se({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Y_,n)},J_=ie("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({ownerState:e})=>S({minWidth:56,flexShrink:0},e.alignItems==="flex-start"&&{marginTop:8})),Z_=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiListItemAvatar"}),{className:o}=r,i=se(r,X_),a=p.useContext(gr),s=S({},r,{alignItems:a.alignItems}),l=Q_(s);return u.jsx(J_,S({className:le(l.root,o),ownerState:s,ref:n},i))});function eL(e){return be("MuiListItemIcon",e)}const uy=we("MuiListItemIcon",["root","alignItemsFlexStart"]),tL=["className"],nL=e=>{const{alignItems:t,classes:n}=e;return Se({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},eL,n)},rL=ie("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>S({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),dy=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiListItemIcon"}),{className:o}=r,i=se(r,tL),a=p.useContext(gr),s=S({},r,{alignItems:a.alignItems}),l=nL(s);return u.jsx(rL,S({className:le(l.root,o),ownerState:s,ref:n},i))});function oL(e){return be("MuiListItemText",e)}const Lc=we("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),iL=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],aL=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return Se({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},oL,t)},sL=ie("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Lc.primary}`]:t.primary},{[`& .${Lc.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>S({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),ws=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:d,secondaryTypographyProps:f}=r,m=se(r,iL),{dense:w}=p.useContext(gr);let y=l??o,x=d;const k=S({},r,{disableTypography:a,inset:s,primary:!!y,secondary:!!x,dense:w}),g=aL(k);return y!=null&&y.type!==Ie&&!a&&(y=u.jsx(Ie,S({variant:w?"body2":"body1",className:g.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:y}))),x!=null&&x.type!==Ie&&!a&&(x=u.jsx(Ie,S({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},f,{children:x}))),u.jsxs(sL,S({className:le(g.root,i),ownerState:k,ref:n},m,{children:[y,x]}))}),lL=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function nf(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function fy(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function a2(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function wa(e,t,n,r,o,i){let a=!1,s=o(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!a2(s,i)||l)s=o(e,s,n);else return s.focus(),!0}return!1}const cL=p.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:d,variant:f="selectedMenu"}=t,m=se(t,lL),w=p.useRef(null),y=p.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Sn(()=>{o&&w.current.focus()},[o]),p.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(b,{direction:C})=>{const R=!w.current.style.width;if(b.clientHeight{const C=w.current,R=b.key,E=St(C).activeElement;if(R==="ArrowDown")b.preventDefault(),wa(C,E,c,l,nf);else if(R==="ArrowUp")b.preventDefault(),wa(C,E,c,l,fy);else if(R==="Home")b.preventDefault(),wa(C,null,c,l,nf);else if(R==="End")b.preventDefault(),wa(C,null,c,l,fy);else if(R.length===1){const P=y.current,M=R.toLowerCase(),D=performance.now();P.keys.length>0&&(D-P.lastTime>500?(P.keys=[],P.repeating=!0,P.previousKeyMatched=!0):P.repeating&&M!==P.keys[0]&&(P.repeating=!1)),P.lastTime=D,P.keys.push(M);const O=E&&!P.repeating&&a2(E,P);P.previousKeyMatched&&(O||wa(C,E,!1,l,nf,P))?b.preventDefault():P.previousKeyMatched=!1}d&&d(b)},k=ct(w,n);let g=-1;p.Children.forEach(a,(b,C)=>{if(!p.isValidElement(b)){g===C&&(g+=1,g>=a.length&&(g=-1));return}b.props.disabled||(f==="selectedMenu"&&b.props.selected||g===-1)&&(g=C),g===C&&(b.props.disabled||b.props.muiSkipListHighlight||b.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))});const h=p.Children.map(a,(b,C)=>{if(C===g){const R={};return i&&(R.autoFocus=!0),b.props.tabIndex===void 0&&f==="selectedMenu"&&(R.tabIndex=0),p.cloneElement(b,R)}return b});return u.jsx(Ws,S({role:"menu",ref:k,className:s,onKeyDown:x,tabIndex:o?0:-1},m,{children:h}))});function uL(e){return be("MuiPopover",e)}we("MuiPopover",["root","paper"]);const dL=["onEntering"],fL=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],pL=["slotProps"];function py(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function hy(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function my(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function rf(e){return typeof e=="function"?e():e}const hL=e=>{const{classes:t}=e;return Se({root:["root"],paper:["paper"]},uL,t)},mL=ie(Pm,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),s2=ie(En,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),gL=p.forwardRef(function(t,n){var r,o,i;const a=ke({props:t,name:"MuiPopover"}),{action:s,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:d,anchorReference:f="anchorEl",children:m,className:w,container:y,elevation:x=8,marginThreshold:k=16,open:g,PaperProps:h={},slots:b,slotProps:C,transformOrigin:R={vertical:"top",horizontal:"left"},TransitionComponent:E=bs,transitionDuration:P="auto",TransitionProps:{onEntering:M}={},disableScrollLock:D=!1}=a,O=se(a.TransitionProps,dL),F=se(a,fL),V=(r=C==null?void 0:C.paper)!=null?r:h,U=p.useRef(),q=ct(U,V.ref),ee=S({},a,{anchorOrigin:c,anchorReference:f,elevation:x,marginThreshold:k,externalPaperSlotProps:V,transformOrigin:R,TransitionComponent:E,transitionDuration:P,TransitionProps:O}),J=hL(ee),re=p.useCallback(()=>{if(f==="anchorPosition")return d;const te=rf(l),de=(te&&te.nodeType===1?te:St(U.current).body).getBoundingClientRect();return{top:de.top+py(de,c.vertical),left:de.left+hy(de,c.horizontal)}},[l,c.horizontal,c.vertical,d,f]),I=p.useCallback(te=>({vertical:py(te,R.vertical),horizontal:hy(te,R.horizontal)}),[R.horizontal,R.vertical]),B=p.useCallback(te=>{const ne={width:te.offsetWidth,height:te.offsetHeight},de=I(ne);if(f==="none")return{top:null,left:null,transformOrigin:my(de)};const Re=re();let W=Re.top-de.vertical,ae=Re.left-de.horizontal;const ge=W+ne.height,z=ae+ne.width,X=Fn(rf(l)),fe=X.innerHeight-k,pe=X.innerWidth-k;if(k!==null&&Wfe){const ve=ge-fe;W-=ve,de.vertical+=ve}if(k!==null&&aepe){const ve=z-pe;ae-=ve,de.horizontal+=ve}return{top:`${Math.round(W)}px`,left:`${Math.round(ae)}px`,transformOrigin:my(de)}},[l,f,re,I,k]),[$,v]=p.useState(g),T=p.useCallback(()=>{const te=U.current;if(!te)return;const ne=B(te);ne.top!==null&&(te.style.top=ne.top),ne.left!==null&&(te.style.left=ne.left),te.style.transformOrigin=ne.transformOrigin,v(!0)},[B]);p.useEffect(()=>(D&&window.addEventListener("scroll",T),()=>window.removeEventListener("scroll",T)),[l,D,T]);const L=(te,ne)=>{M&&M(te,ne),T()},_=()=>{v(!1)};p.useEffect(()=>{g&&T()}),p.useImperativeHandle(s,()=>g?{updatePosition:()=>{T()}}:null,[g,T]),p.useEffect(()=>{if(!g)return;const te=ta(()=>{T()}),ne=Fn(l);return ne.addEventListener("resize",te),()=>{te.clear(),ne.removeEventListener("resize",te)}},[l,g,T]);let N=P;P==="auto"&&!E.muiSupportAuto&&(N=void 0);const H=y||(l?St(rf(l)).body:void 0),j=(o=b==null?void 0:b.root)!=null?o:mL,A=(i=b==null?void 0:b.paper)!=null?i:s2,G=fn({elementType:A,externalSlotProps:S({},V,{style:$?V.style:S({},V.style,{opacity:0})}),additionalProps:{elevation:x,ref:q},ownerState:ee,className:le(J.paper,V==null?void 0:V.className)}),Y=fn({elementType:j,externalSlotProps:(C==null?void 0:C.root)||{},externalForwardedProps:F,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:H,open:g},ownerState:ee,className:le(J.root,w)}),{slotProps:K}=Y,oe=se(Y,pL);return u.jsx(j,S({},oe,!Ni(j)&&{slotProps:K,disableScrollLock:D},{children:u.jsx(E,S({appear:!0,in:g,onEntering:L,onExited:_,timeout:N},O,{children:u.jsx(A,S({},G,{children:m}))}))}))});function vL(e){return be("MuiMenu",e)}we("MuiMenu",["root","paper","list"]);const yL=["onEntering"],xL=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],bL={vertical:"top",horizontal:"right"},wL={vertical:"top",horizontal:"left"},SL=e=>{const{classes:t}=e;return Se({root:["root"],paper:["paper"],list:["list"]},vL,t)},CL=ie(gL,{shouldForwardProp:e=>Vt(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),kL=ie(s2,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),RL=ie(cL,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),l2=p.forwardRef(function(t,n){var r,o;const i=ke({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:l,disableAutoFocusItem:c=!1,MenuListProps:d={},onClose:f,open:m,PaperProps:w={},PopoverClasses:y,transitionDuration:x="auto",TransitionProps:{onEntering:k}={},variant:g="selectedMenu",slots:h={},slotProps:b={}}=i,C=se(i.TransitionProps,yL),R=se(i,xL),E=Ds(),P=S({},i,{autoFocus:a,disableAutoFocusItem:c,MenuListProps:d,onEntering:k,PaperProps:w,transitionDuration:x,TransitionProps:C,variant:g}),M=SL(P),D=a&&!c&&m,O=p.useRef(null),F=(I,B)=>{O.current&&O.current.adjustStyleForScrollbar(I,{direction:E?"rtl":"ltr"}),k&&k(I,B)},V=I=>{I.key==="Tab"&&(I.preventDefault(),f&&f(I,"tabKeyDown"))};let U=-1;p.Children.map(s,(I,B)=>{p.isValidElement(I)&&(I.props.disabled||(g==="selectedMenu"&&I.props.selected||U===-1)&&(U=B))});const q=(r=h.paper)!=null?r:kL,ee=(o=b.paper)!=null?o:w,J=fn({elementType:h.root,externalSlotProps:b.root,ownerState:P,className:[M.root,l]}),re=fn({elementType:q,externalSlotProps:ee,ownerState:P,className:M.paper});return u.jsx(CL,S({onClose:f,anchorOrigin:{vertical:"bottom",horizontal:E?"right":"left"},transformOrigin:E?bL:wL,slots:{paper:q,root:h.root},slotProps:{root:J,paper:re},open:m,ref:n,transitionDuration:x,TransitionProps:S({onEntering:F},C),ownerState:P},R,{classes:y,children:u.jsx(RL,S({onKeyDown:V,actions:O,autoFocus:a&&(U===-1||c),autoFocusItem:D,variant:g},d,{className:le(M.list,d.className),children:s}))}))});function PL(e){return be("MuiMenuItem",e)}const Sa=we("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),EL=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],TL=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},$L=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,l=Se({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},PL,a);return S({},a,l)},jL=ie(Ir,{shouldForwardProp:e=>Vt(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:TL})(({theme:e,ownerState:t})=>S({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Sa.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Fe(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Sa.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Fe(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Sa.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Fe(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Fe(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Sa.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Sa.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${oy.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${oy.inset}`]:{marginLeft:52},[`& .${Lc.root}`]:{marginTop:0,marginBottom:0},[`& .${Lc.inset}`]:{paddingLeft:36},[`& .${uy.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&S({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${uy.root} svg`]:{fontSize:"1.25rem"}}))),Zn=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:d="menuitem",tabIndex:f,className:m}=r,w=se(r,EL),y=p.useContext(gr),x=p.useMemo(()=>({dense:a||y.dense||!1,disableGutters:l}),[y.dense,a,l]),k=p.useRef(null);Sn(()=>{o&&k.current&&k.current.focus()},[o]);const g=S({},r,{dense:x.dense,divider:s,disableGutters:l}),h=$L(r),b=ct(k,n);let C;return r.disabled||(C=f!==void 0?f:-1),u.jsx(gr.Provider,{value:x,children:u.jsx(jL,S({ref:b,role:d,tabIndex:C,component:i,focusVisibleClassName:le(h.focusVisible,c),className:le(h.root,m)},w,{ownerState:g,classes:h}))})});function ML(e){return be("MuiNativeSelect",e)}const jm=we("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),OL=["className","disabled","error","IconComponent","inputRef","variant"],IL=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Z(n)}`,i&&"iconOpen",r&&"disabled"]};return Se(s,ML,t)},c2=({ownerState:e,theme:t})=>S({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":S({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${jm.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),_L=ie("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Vt,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${jm.multiple}`]:t.multiple}]}})(c2),u2=({ownerState:e,theme:t})=>S({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${jm.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),LL=ie("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Z(n.variant)}`],n.open&&t.iconOpen]}})(u2),AL=p.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:s,variant:l="standard"}=t,c=se(t,OL),d=S({},t,{disabled:o,variant:l,error:i}),f=IL(d);return u.jsxs(p.Fragment,{children:[u.jsx(_L,S({ownerState:d,className:le(f.select,r),disabled:o,ref:s||n},c)),t.multiple?null:u.jsx(LL,{as:a,ownerState:d,className:f.icon})]})});var gy;const NL=["children","classes","className","label","notched"],DL=ie("fieldset",{shouldForwardProp:Vt})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),zL=ie("legend",{shouldForwardProp:Vt})(({ownerState:e,theme:t})=>S({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&S({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function BL(e){const{className:t,label:n,notched:r}=e,o=se(e,NL),i=n!=null&&n!=="",a=S({},e,{notched:r,withLabel:i});return u.jsx(DL,S({"aria-hidden":!0,className:t,ownerState:a},o,{children:u.jsx(zL,{ownerState:a,children:i?u.jsx("span",{children:n}):gy||(gy=u.jsx("span",{className:"notranslate",children:"​"}))})}))}const FL=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],UL=e=>{const{classes:t}=e,r=Se({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},LO,t);return S({},t,r)},WL=ie(rd,{shouldForwardProp:e=>Vt(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:td})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return S({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Ur.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ur.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${Ur.focused} .${Ur.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${Ur.error} .${Ur.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Ur.disabled} .${Ur.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&S({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),VL=ie(BL,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),HL=ie(od,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:nd})(({theme:e,ownerState:t})=>S({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),Mm=p.forwardRef(function(t,n){var r,o,i,a,s;const l=ke({props:t,name:"MuiOutlinedInput"}),{components:c={},fullWidth:d=!1,inputComponent:f="input",label:m,multiline:w=!1,notched:y,slots:x={},type:k="text"}=l,g=se(l,FL),h=UL(l),b=br(),C=vo({props:l,muiFormControl:b,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),R=S({},l,{color:C.color||"primary",disabled:C.disabled,error:C.error,focused:C.focused,formControl:b,fullWidth:d,hiddenLabel:C.hiddenLabel,multiline:w,size:C.size,type:k}),E=(r=(o=x.root)!=null?o:c.Root)!=null?r:WL,P=(i=(a=x.input)!=null?a:c.Input)!=null?i:HL;return u.jsx(Sm,S({slots:{root:E,input:P},renderSuffix:M=>u.jsx(VL,{ownerState:R,className:h.notchedOutline,label:m!=null&&m!==""&&C.required?s||(s=u.jsxs(p.Fragment,{children:[m," ","*"]})):m,notched:typeof y<"u"?y:!!(M.startAdornment||M.filled||M.focused)}),fullWidth:d,inputComponent:f,multiline:w,ref:n,type:k},g,{classes:S({},h,{notchedOutline:null})}))});Mm.muiName="Input";function qL(e){return be("MuiSelect",e)}const Ca=we("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var vy;const GL=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],KL=ie("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Ca.select}`]:t.select},{[`&.${Ca.select}`]:t[n.variant]},{[`&.${Ca.error}`]:t.error},{[`&.${Ca.multiple}`]:t.multiple}]}})(c2,{[`&.${Ca.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),YL=ie("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Z(n.variant)}`],n.open&&t.iconOpen]}})(u2),XL=ie("input",{shouldForwardProp:e=>Ew(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function yy(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function QL(e){return e==null||typeof e=="string"&&!e.trim()}const JL=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Z(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Se(s,qL,t)},ZL=p.forwardRef(function(t,n){var r;const{"aria-describedby":o,"aria-label":i,autoFocus:a,autoWidth:s,children:l,className:c,defaultOpen:d,defaultValue:f,disabled:m,displayEmpty:w,error:y=!1,IconComponent:x,inputRef:k,labelId:g,MenuProps:h={},multiple:b,name:C,onBlur:R,onChange:E,onClose:P,onFocus:M,onOpen:D,open:O,readOnly:F,renderValue:V,SelectDisplayProps:U={},tabIndex:q,value:ee,variant:J="standard"}=t,re=se(t,GL),[I,B]=vs({controlled:ee,default:f,name:"Select"}),[$,v]=vs({controlled:O,default:d,name:"Select"}),T=p.useRef(null),L=p.useRef(null),[_,N]=p.useState(null),{current:H}=p.useRef(O!=null),[j,A]=p.useState(),G=ct(n,k),Y=p.useCallback(ye=>{L.current=ye,ye&&N(ye)},[]),K=_==null?void 0:_.parentNode;p.useImperativeHandle(G,()=>({focus:()=>{L.current.focus()},node:T.current,value:I}),[I]),p.useEffect(()=>{d&&$&&_&&!H&&(A(s?null:K.clientWidth),L.current.focus())},[_,s]),p.useEffect(()=>{a&&L.current.focus()},[a]),p.useEffect(()=>{if(!g)return;const ye=St(L.current).getElementById(g);if(ye){const Pe=()=>{getSelection().isCollapsed&&L.current.focus()};return ye.addEventListener("click",Pe),()=>{ye.removeEventListener("click",Pe)}}},[g]);const oe=(ye,Pe)=>{ye?D&&D(Pe):P&&P(Pe),H||(A(s?null:K.clientWidth),v(ye))},te=ye=>{ye.button===0&&(ye.preventDefault(),L.current.focus(),oe(!0,ye))},ne=ye=>{oe(!1,ye)},de=p.Children.toArray(l),Re=ye=>{const Pe=de.find(ue=>ue.props.value===ye.target.value);Pe!==void 0&&(B(Pe.props.value),E&&E(ye,Pe))},W=ye=>Pe=>{let ue;if(Pe.currentTarget.hasAttribute("tabindex")){if(b){ue=Array.isArray(I)?I.slice():[];const me=I.indexOf(ye.props.value);me===-1?ue.push(ye.props.value):ue.splice(me,1)}else ue=ye.props.value;if(ye.props.onClick&&ye.props.onClick(Pe),I!==ue&&(B(ue),E)){const me=Pe.nativeEvent||Pe,$e=new me.constructor(me.type,me);Object.defineProperty($e,"target",{writable:!0,value:{value:ue,name:C}}),E($e,ye)}b||oe(!1,Pe)}},ae=ye=>{F||[" ","ArrowUp","ArrowDown","Enter"].indexOf(ye.key)!==-1&&(ye.preventDefault(),oe(!0,ye))},ge=_!==null&&$,z=ye=>{!ge&&R&&(Object.defineProperty(ye,"target",{writable:!0,value:{value:I,name:C}}),R(ye))};delete re["aria-invalid"];let X,fe;const pe=[];let ve=!1;(Oc({value:I})||w)&&(V?X=V(I):ve=!0);const Ce=de.map(ye=>{if(!p.isValidElement(ye))return null;let Pe;if(b){if(!Array.isArray(I))throw new Error(Bo(2));Pe=I.some(ue=>yy(ue,ye.props.value)),Pe&&ve&&pe.push(ye.props.children)}else Pe=yy(I,ye.props.value),Pe&&ve&&(fe=ye.props.children);return p.cloneElement(ye,{"aria-selected":Pe?"true":"false",onClick:W(ye),onKeyUp:ue=>{ue.key===" "&&ue.preventDefault(),ye.props.onKeyUp&&ye.props.onKeyUp(ue)},role:"option",selected:Pe,value:void 0,"data-value":ye.props.value})});ve&&(b?pe.length===0?X=null:X=pe.reduce((ye,Pe,ue)=>(ye.push(Pe),ue{const{classes:t}=e;return t},Om={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Vt(e)&&e!=="variant",slot:"Root"},rA=ie($m,Om)(""),oA=ie(Mm,Om)(""),iA=ie(Em,Om)(""),Vs=p.forwardRef(function(t,n){const r=ke({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:d=NO,id:f,input:m,inputProps:w,label:y,labelId:x,MenuProps:k,multiple:g=!1,native:h=!1,onClose:b,onOpen:C,open:R,renderValue:E,SelectDisplayProps:P,variant:M="outlined"}=r,D=se(r,eA),O=h?AL:ZL,F=br(),V=vo({props:r,muiFormControl:F,states:["variant","error"]}),U=V.variant||M,q=S({},r,{variant:U,classes:a}),ee=nA(q),J=se(ee,tA),re=m||{standard:u.jsx(rA,{ownerState:q}),outlined:u.jsx(oA,{label:y,ownerState:q}),filled:u.jsx(iA,{ownerState:q})}[U],I=ct(n,re.ref);return u.jsx(p.Fragment,{children:p.cloneElement(re,S({inputComponent:O,inputProps:S({children:i,error:V.error,IconComponent:d,variant:U,type:void 0,multiple:g},h?{id:f}:{autoWidth:o,defaultOpen:l,displayEmpty:c,labelId:x,MenuProps:k,onClose:b,onOpen:C,open:R,renderValue:E,SelectDisplayProps:S({id:f},P)},w,{classes:w?Qt(J,w.classes):J},m?m.props.inputProps:{})},(g&&h||c)&&U==="outlined"?{notched:!0}:{},{ref:I,className:le(re.props.className,s,ee.root)},!m&&{variant:U},D))})});Vs.muiName="Select";function aA(e){return be("MuiSnackbarContent",e)}we("MuiSnackbarContent",["root","message","action"]);const sA=["action","className","message","role"],lA=e=>{const{classes:t}=e;return Se({root:["root"],action:["action"],message:["message"]},aA,t)},cA=ie(En,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=u4(e.palette.background.default,t);return S({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),uA=ie("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),dA=ie("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),fA=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiSnackbarContent"}),{action:o,className:i,message:a,role:s="alert"}=r,l=se(r,sA),c=r,d=lA(c);return u.jsxs(cA,S({role:s,square:!0,elevation:6,className:le(d.root,i),ownerState:c,ref:n},l,{children:[u.jsx(uA,{className:d.message,ownerState:c,children:a}),o?u.jsx(dA,{className:d.action,ownerState:c,children:o}):null]}))});function pA(e){return be("MuiSnackbar",e)}we("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const hA=["onEnter","onExited"],mA=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],gA=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Z(n.vertical)}${Z(n.horizontal)}`]};return Se(r,pA,t)},xy=ie("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Z(n.anchorOrigin.vertical)}${Z(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return S({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},t.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},t.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},t.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:S({},t.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},t.anchorOrigin.horizontal==="center"&&n,t.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},t.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),yo=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiSnackbar"}),o=mo(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:d,className:f,ClickAwayListenerProps:m,ContentProps:w,disableWindowBlurListener:y=!1,message:x,open:k,TransitionComponent:g=bs,transitionDuration:h=i,TransitionProps:{onEnter:b,onExited:C}={}}=r,R=se(r.TransitionProps,hA),E=se(r,mA),P=S({},r,{anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:c,disableWindowBlurListener:y,TransitionComponent:g,transitionDuration:h}),M=gA(P),{getRootProps:D,onClickAway:O}=cO(S({},P)),[F,V]=p.useState(!0),U=fn({elementType:xy,getSlotProps:D,externalForwardedProps:E,ownerState:P,additionalProps:{ref:n},className:[M.root,f]}),q=J=>{V(!0),C&&C(J)},ee=(J,re)=>{V(!1),b&&b(J,re)};return!k&&F?null:u.jsx(jj,S({onClickAway:O},m,{children:u.jsx(xy,S({},U,{children:u.jsx(g,S({appear:!0,in:k,timeout:h,direction:s==="top"?"down":"up",onEnter:ee,onExited:q},R,{children:d||u.jsx(fA,S({message:x,action:a},w))}))}))}))});function vA(e){return be("MuiTooltip",e)}const Jr=we("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),yA=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function xA(e){return Math.round(e*1e5)/1e5}const bA=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Z(i.split("-")[0])}`],arrow:["arrow"]};return Se(a,vA,t)},wA=ie(Gw,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>S({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${Jr.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Jr.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Jr.arrow}`]:S({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Jr.arrow}`]:S({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),SA=ie("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Z(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>S({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Fe(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${xA(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Jr.popper}[data-popper-placement*="left"] &`]:S({transformOrigin:"right center"},t.isRtl?S({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):S({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Jr.popper}[data-popper-placement*="right"] &`]:S({transformOrigin:"left center"},t.isRtl?S({marginRight:"14px"},t.touch&&{marginRight:"24px"}):S({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Jr.popper}[data-popper-placement*="top"] &`]:S({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Jr.popper}[data-popper-placement*="bottom"] &`]:S({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),CA=ie("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Fe(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let bl=!1;const by=new Ns;let ka={x:0,y:0};function wl(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Ln=p.forwardRef(function(t,n){var r,o,i,a,s,l,c,d,f,m,w,y,x,k,g,h,b,C,R;const E=ke({props:t,name:"MuiTooltip"}),{arrow:P=!1,children:M,components:D={},componentsProps:O={},describeChild:F=!1,disableFocusListener:V=!1,disableHoverListener:U=!1,disableInteractive:q=!1,disableTouchListener:ee=!1,enterDelay:J=100,enterNextDelay:re=0,enterTouchDelay:I=700,followCursor:B=!1,id:$,leaveDelay:v=0,leaveTouchDelay:T=1500,onClose:L,onOpen:_,open:N,placement:H="bottom",PopperComponent:j,PopperProps:A={},slotProps:G={},slots:Y={},title:K,TransitionComponent:oe=bs,TransitionProps:te}=E,ne=se(E,yA),de=p.isValidElement(M)?M:u.jsx("span",{children:M}),Re=mo(),W=Ds(),[ae,ge]=p.useState(),[z,X]=p.useState(null),fe=p.useRef(!1),pe=q||B,ve=To(),Ce=To(),Le=To(),De=To(),[Ee,he]=vs({controlled:N,default:!1,name:"Tooltip",state:"open"});let Ge=Ee;const Xe=As($),Ye=p.useRef(),ye=Yt(()=>{Ye.current!==void 0&&(document.body.style.WebkitUserSelect=Ye.current,Ye.current=void 0),De.clear()});p.useEffect(()=>ye,[ye]);const Pe=Ne=>{by.clear(),bl=!0,he(!0),_&&!Ge&&_(Ne)},ue=Yt(Ne=>{by.start(800+v,()=>{bl=!1}),he(!1),L&&Ge&&L(Ne),ve.start(Re.transitions.duration.shortest,()=>{fe.current=!1})}),me=Ne=>{fe.current&&Ne.type!=="touchstart"||(ae&&ae.removeAttribute("title"),Ce.clear(),Le.clear(),J||bl&&re?Ce.start(bl?re:J,()=>{Pe(Ne)}):Pe(Ne))},$e=Ne=>{Ce.clear(),Le.start(v,()=>{ue(Ne)})},{isFocusVisibleRef:Ae,onBlur:Qe,onFocus:Ct,ref:Ot}=om(),[,pn]=p.useState(!1),Dt=Ne=>{Qe(Ne),Ae.current===!1&&(pn(!1),$e(Ne))},zr=Ne=>{ae||ge(Ne.currentTarget),Ct(Ne),Ae.current===!0&&(pn(!0),me(Ne))},Go=Ne=>{fe.current=!0;const hn=de.props;hn.onTouchStart&&hn.onTouchStart(Ne)},Et=Ne=>{Go(Ne),Le.clear(),ve.clear(),ye(),Ye.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",De.start(I,()=>{document.body.style.WebkitUserSelect=Ye.current,me(Ne)})},ud=Ne=>{de.props.onTouchEnd&&de.props.onTouchEnd(Ne),ye(),Le.start(T,()=>{ue(Ne)})};p.useEffect(()=>{if(!Ge)return;function Ne(hn){(hn.key==="Escape"||hn.key==="Esc")&&ue(hn)}return document.addEventListener("keydown",Ne),()=>{document.removeEventListener("keydown",Ne)}},[ue,Ge]);const Hs=ct(de.ref,Ot,ge,n);!K&&K!==0&&(Ge=!1);const ia=p.useRef(),aa=Ne=>{const hn=de.props;hn.onMouseMove&&hn.onMouseMove(Ne),ka={x:Ne.clientX,y:Ne.clientY},ia.current&&ia.current.update()},nt={},en=typeof K=="string";F?(nt.title=!Ge&&en&&!U?K:null,nt["aria-describedby"]=Ge?Xe:null):(nt["aria-label"]=en?K:null,nt["aria-labelledby"]=Ge&&!en?Xe:null);const rt=S({},nt,ne,de.props,{className:le(ne.className,de.props.className),onTouchStart:Go,ref:Hs},B?{onMouseMove:aa}:{}),Tt={};ee||(rt.onTouchStart=Et,rt.onTouchEnd=ud),U||(rt.onMouseOver=wl(me,rt.onMouseOver),rt.onMouseLeave=wl($e,rt.onMouseLeave),pe||(Tt.onMouseOver=me,Tt.onMouseLeave=$e)),V||(rt.onFocus=wl(zr,rt.onFocus),rt.onBlur=wl(Dt,rt.onBlur),pe||(Tt.onFocus=zr,Tt.onBlur=Dt));const It=p.useMemo(()=>{var Ne;let hn=[{name:"arrow",enabled:!!z,options:{element:z,padding:4}}];return(Ne=A.popperOptions)!=null&&Ne.modifiers&&(hn=hn.concat(A.popperOptions.modifiers)),S({},A.popperOptions,{modifiers:hn})},[z,A]),qt=S({},E,{isRtl:W,arrow:P,disableInteractive:pe,placement:H,PopperComponentProp:j,touch:fe.current}),Kn=bA(qt),Ko=(r=(o=Y.popper)!=null?o:D.Popper)!=null?r:wA,sa=(i=(a=(s=Y.transition)!=null?s:D.Transition)!=null?a:oe)!=null?i:bs,qs=(l=(c=Y.tooltip)!=null?c:D.Tooltip)!=null?l:SA,Gs=(d=(f=Y.arrow)!=null?f:D.Arrow)!=null?d:CA,H2=vi(Ko,S({},A,(m=G.popper)!=null?m:O.popper,{className:le(Kn.popper,A==null?void 0:A.className,(w=(y=G.popper)!=null?y:O.popper)==null?void 0:w.className)}),qt),q2=vi(sa,S({},te,(x=G.transition)!=null?x:O.transition),qt),G2=vi(qs,S({},(k=G.tooltip)!=null?k:O.tooltip,{className:le(Kn.tooltip,(g=(h=G.tooltip)!=null?h:O.tooltip)==null?void 0:g.className)}),qt),K2=vi(Gs,S({},(b=G.arrow)!=null?b:O.arrow,{className:le(Kn.arrow,(C=(R=G.arrow)!=null?R:O.arrow)==null?void 0:C.className)}),qt);return u.jsxs(p.Fragment,{children:[p.cloneElement(de,rt),u.jsx(Ko,S({as:j??Gw,placement:H,anchorEl:B?{getBoundingClientRect:()=>({top:ka.y,left:ka.x,right:ka.x,bottom:ka.y,width:0,height:0})}:ae,popperRef:ia,open:ae?Ge:!1,id:Xe,transition:!0},Tt,H2,{popperOptions:It,children:({TransitionProps:Ne})=>u.jsx(sa,S({timeout:Re.transitions.duration.shorter},Ne,q2,{children:u.jsxs(qs,S({},G2,{children:[K,P?u.jsx(Gs,S({},K2,{ref:X})):null]}))}))}))]})});function kA(e){return be("MuiSwitch",e)}const Gt=we("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),RA=["className","color","edge","size","sx"],PA=Qu(),EA=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,s={root:["root",n&&`edge${Z(n)}`,`size${Z(r)}`],switchBase:["switchBase",`color${Z(o)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=Se(s,kA,t);return S({},t,l)},TA=ie("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Z(n.edge)}`],t[`size${Z(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Gt.thumb}`]:{width:16,height:16},[`& .${Gt.switchBase}`]:{padding:4,[`&.${Gt.checked}`]:{transform:"translateX(16px)"}}}}]}),$A=ie(Jw,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Gt.input}`]:t.input},n.color!=="default"&&t[`color${Z(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Gt.checked}`]:{transform:"translateX(20px)"},[`&.${Gt.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Gt.checked} + .${Gt.track}`]:{opacity:.5},[`&.${Gt.disabled} + .${Gt.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Gt.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Fe(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{color:t},style:{[`&.${Gt.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Fe(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Gt.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?Ec(e.palette[t].main,.62):Pc(e.palette[t].main,.55)}`}},[`&.${Gt.checked} + .${Gt.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),jA=ie("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),MA=ie("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),d2=p.forwardRef(function(t,n){const r=PA({props:t,name:"MuiSwitch"}),{className:o,color:i="primary",edge:a=!1,size:s="medium",sx:l}=r,c=se(r,RA),d=S({},r,{color:i,edge:a,size:s}),f=EA(d),m=u.jsx(MA,{className:f.thumb,ownerState:d});return u.jsxs(TA,{className:le(f.root,o),sx:l,ownerState:d,children:[u.jsx($A,S({type:"checkbox",icon:m,checkedIcon:m,ref:n,ownerState:d},c,{classes:S({},f,{root:f.switchBase})})),u.jsx(jA,{className:f.track,ownerState:d})]})});function OA(e){return be("MuiTab",e)}const bo=we("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),IA=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],_A=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:s,disabled:l}=e,c={root:["root",i&&a&&"labelIcon",`textColor${Z(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return Se(c,OA,t)},LA=ie(Ir,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Z(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>S({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${bo.iconWrapper}`]:S({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${bo.selected}`]:{opacity:1},[`&.${bo.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${bo.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${bo.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${bo.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${bo.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),ql=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:s,icon:l,iconPosition:c="top",indicator:d,label:f,onChange:m,onClick:w,onFocus:y,selected:x,selectionFollowsFocus:k,textColor:g="inherit",value:h,wrapped:b=!1}=r,C=se(r,IA),R=S({},r,{disabled:i,disableFocusRipple:a,selected:x,icon:!!l,iconPosition:c,label:!!f,fullWidth:s,textColor:g,wrapped:b}),E=_A(R),P=l&&f&&p.isValidElement(l)?p.cloneElement(l,{className:le(E.iconWrapper,l.props.className)}):l,M=O=>{!x&&m&&m(O,h),w&&w(O)},D=O=>{k&&!x&&m&&m(O,h),y&&y(O)};return u.jsxs(LA,S({focusRipple:!a,className:le(E.root,o),ref:n,role:"tab","aria-selected":x,disabled:i,onClick:M,onFocus:D,ownerState:R,tabIndex:x?0:-1},C,{children:[c==="top"||c==="start"?u.jsxs(p.Fragment,{children:[P,f]}):u.jsxs(p.Fragment,{children:[f,P]}),d]}))});function AA(e){return be("MuiToolbar",e)}we("MuiToolbar",["root","gutters","regular","dense"]);const NA=["className","component","disableGutters","variant"],DA=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Se({root:["root",!n&&"gutters",r]},AA,t)},zA=ie("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>S({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),BA=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:a=!1,variant:s="regular"}=r,l=se(r,NA),c=S({},r,{component:i,disableGutters:a,variant:s}),d=DA(c);return u.jsx(zA,S({as:i,className:le(d.root,o),ref:n,ownerState:c},l))}),FA=Ht(u.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),UA=Ht(u.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function WA(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function VA(e,t,n,r={},o=()=>{}){const{ease:i=WA,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const d=()=>{c=!0},f=m=>{if(c){o(new Error("Animation cancelled"));return}s===null&&(s=m);const w=Math.min(1,(m-s)/a);if(t[e]=i(w)*(n-l)+l,w>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(f)};return l===n?(o(new Error("Element already at target position")),d):(requestAnimationFrame(f),d)}const HA=["onChange"],qA={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function GA(e){const{onChange:t}=e,n=se(e,HA),r=p.useRef(),o=p.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return Sn(()=>{const a=ta(()=>{const l=r.current;i(),l!==r.current&&t(r.current)}),s=Fn(o.current);return s.addEventListener("resize",a),()=>{a.clear(),s.removeEventListener("resize",a)}},[t]),p.useEffect(()=>{i(),t(r.current)},[t]),u.jsx("div",S({style:qA,ref:o},n))}function KA(e){return be("MuiTabScrollButton",e)}const YA=we("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),XA=["className","slots","slotProps","direction","orientation","disabled"],QA=e=>{const{classes:t,orientation:n,disabled:r}=e;return Se({root:["root",n,r&&"disabled"]},KA,t)},JA=ie(Ir,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>S({width:40,flexShrink:0,opacity:.8,[`&.${YA.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),ZA=p.forwardRef(function(t,n){var r,o;const i=ke({props:t,name:"MuiTabScrollButton"}),{className:a,slots:s={},slotProps:l={},direction:c}=i,d=se(i,XA),f=Ds(),m=S({isRtl:f},i),w=QA(m),y=(r=s.StartScrollButtonIcon)!=null?r:FA,x=(o=s.EndScrollButtonIcon)!=null?o:UA,k=fn({elementType:y,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),g=fn({elementType:x,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return u.jsx(JA,S({component:"div",className:le(w.root,a),ref:n,role:null,ownerState:m,tabIndex:null},d,{children:c==="left"?u.jsx(y,S({},k)):u.jsx(x,S({},g))}))});function eN(e){return be("MuiTabs",e)}const of=we("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),tN=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],wy=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Sy=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Sl=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},nN=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return Se({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},eN,l)},rN=ie("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${of.scrollButtons}`]:t.scrollButtons},{[`& .${of.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>S({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${of.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),oN=ie("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>S({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),iN=ie("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>S({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),aN=ie("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>S({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),sN=ie(GA)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Cy={},f2=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiTabs"}),o=mo(),i=Ds(),{"aria-label":a,"aria-labelledby":s,action:l,centered:c=!1,children:d,className:f,component:m="div",allowScrollButtonsMobile:w=!1,indicatorColor:y="primary",onChange:x,orientation:k="horizontal",ScrollButtonComponent:g=ZA,scrollButtons:h="auto",selectionFollowsFocus:b,slots:C={},slotProps:R={},TabIndicatorProps:E={},TabScrollButtonProps:P={},textColor:M="primary",value:D,variant:O="standard",visibleScrollbar:F=!1}=r,V=se(r,tN),U=O==="scrollable",q=k==="vertical",ee=q?"scrollTop":"scrollLeft",J=q?"top":"left",re=q?"bottom":"right",I=q?"clientHeight":"clientWidth",B=q?"height":"width",$=S({},r,{component:m,allowScrollButtonsMobile:w,indicatorColor:y,orientation:k,vertical:q,scrollButtons:h,textColor:M,variant:O,visibleScrollbar:F,fixed:!U,hideScrollbar:U&&!F,scrollableX:U&&!q,scrollableY:U&&q,centered:c&&!U,scrollButtonsHideMobile:!w}),v=nN($),T=fn({elementType:C.StartScrollButtonIcon,externalSlotProps:R.startScrollButtonIcon,ownerState:$}),L=fn({elementType:C.EndScrollButtonIcon,externalSlotProps:R.endScrollButtonIcon,ownerState:$}),[_,N]=p.useState(!1),[H,j]=p.useState(Cy),[A,G]=p.useState(!1),[Y,K]=p.useState(!1),[oe,te]=p.useState(!1),[ne,de]=p.useState({overflow:"hidden",scrollbarWidth:0}),Re=new Map,W=p.useRef(null),ae=p.useRef(null),ge=()=>{const ue=W.current;let me;if(ue){const Ae=ue.getBoundingClientRect();me={clientWidth:ue.clientWidth,scrollLeft:ue.scrollLeft,scrollTop:ue.scrollTop,scrollLeftNormalized:z$(ue,i?"rtl":"ltr"),scrollWidth:ue.scrollWidth,top:Ae.top,bottom:Ae.bottom,left:Ae.left,right:Ae.right}}let $e;if(ue&&D!==!1){const Ae=ae.current.children;if(Ae.length>0){const Qe=Ae[Re.get(D)];$e=Qe?Qe.getBoundingClientRect():null}}return{tabsMeta:me,tabMeta:$e}},z=Yt(()=>{const{tabsMeta:ue,tabMeta:me}=ge();let $e=0,Ae;if(q)Ae="top",me&&ue&&($e=me.top-ue.top+ue.scrollTop);else if(Ae=i?"right":"left",me&&ue){const Ct=i?ue.scrollLeftNormalized+ue.clientWidth-ue.scrollWidth:ue.scrollLeft;$e=(i?-1:1)*(me[Ae]-ue[Ae]+Ct)}const Qe={[Ae]:$e,[B]:me?me[B]:0};if(isNaN(H[Ae])||isNaN(H[B]))j(Qe);else{const Ct=Math.abs(H[Ae]-Qe[Ae]),Ot=Math.abs(H[B]-Qe[B]);(Ct>=1||Ot>=1)&&j(Qe)}}),X=(ue,{animation:me=!0}={})=>{me?VA(ee,W.current,ue,{duration:o.transitions.duration.standard}):W.current[ee]=ue},fe=ue=>{let me=W.current[ee];q?me+=ue:(me+=ue*(i?-1:1),me*=i&&pw()==="reverse"?-1:1),X(me)},pe=()=>{const ue=W.current[I];let me=0;const $e=Array.from(ae.current.children);for(let Ae=0;Ae<$e.length;Ae+=1){const Qe=$e[Ae];if(me+Qe[I]>ue){Ae===0&&(me=ue);break}me+=Qe[I]}return me},ve=()=>{fe(-1*pe())},Ce=()=>{fe(pe())},Le=p.useCallback(ue=>{de({overflow:null,scrollbarWidth:ue})},[]),De=()=>{const ue={};ue.scrollbarSizeListener=U?u.jsx(sN,{onChange:Le,className:le(v.scrollableX,v.hideScrollbar)}):null;const $e=U&&(h==="auto"&&(A||Y)||h===!0);return ue.scrollButtonStart=$e?u.jsx(g,S({slots:{StartScrollButtonIcon:C.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:T},orientation:k,direction:i?"right":"left",onClick:ve,disabled:!A},P,{className:le(v.scrollButtons,P.className)})):null,ue.scrollButtonEnd=$e?u.jsx(g,S({slots:{EndScrollButtonIcon:C.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:L},orientation:k,direction:i?"left":"right",onClick:Ce,disabled:!Y},P,{className:le(v.scrollButtons,P.className)})):null,ue},Ee=Yt(ue=>{const{tabsMeta:me,tabMeta:$e}=ge();if(!(!$e||!me)){if($e[J]me[re]){const Ae=me[ee]+($e[re]-me[re]);X(Ae,{animation:ue})}}}),he=Yt(()=>{U&&h!==!1&&te(!oe)});p.useEffect(()=>{const ue=ta(()=>{W.current&&z()});let me;const $e=Ct=>{Ct.forEach(Ot=>{Ot.removedNodes.forEach(pn=>{var Dt;(Dt=me)==null||Dt.unobserve(pn)}),Ot.addedNodes.forEach(pn=>{var Dt;(Dt=me)==null||Dt.observe(pn)})}),ue(),he()},Ae=Fn(W.current);Ae.addEventListener("resize",ue);let Qe;return typeof ResizeObserver<"u"&&(me=new ResizeObserver(ue),Array.from(ae.current.children).forEach(Ct=>{me.observe(Ct)})),typeof MutationObserver<"u"&&(Qe=new MutationObserver($e),Qe.observe(ae.current,{childList:!0})),()=>{var Ct,Ot;ue.clear(),Ae.removeEventListener("resize",ue),(Ct=Qe)==null||Ct.disconnect(),(Ot=me)==null||Ot.disconnect()}},[z,he]),p.useEffect(()=>{const ue=Array.from(ae.current.children),me=ue.length;if(typeof IntersectionObserver<"u"&&me>0&&U&&h!==!1){const $e=ue[0],Ae=ue[me-1],Qe={root:W.current,threshold:.99},Ct=zr=>{G(!zr[0].isIntersecting)},Ot=new IntersectionObserver(Ct,Qe);Ot.observe($e);const pn=zr=>{K(!zr[0].isIntersecting)},Dt=new IntersectionObserver(pn,Qe);return Dt.observe(Ae),()=>{Ot.disconnect(),Dt.disconnect()}}},[U,h,oe,d==null?void 0:d.length]),p.useEffect(()=>{N(!0)},[]),p.useEffect(()=>{z()}),p.useEffect(()=>{Ee(Cy!==H)},[Ee,H]),p.useImperativeHandle(l,()=>({updateIndicator:z,updateScrollButtons:he}),[z,he]);const Ge=u.jsx(aN,S({},E,{className:le(v.indicator,E.className),ownerState:$,style:S({},H,E.style)}));let Xe=0;const Ye=p.Children.map(d,ue=>{if(!p.isValidElement(ue))return null;const me=ue.props.value===void 0?Xe:ue.props.value;Re.set(me,Xe);const $e=me===D;return Xe+=1,p.cloneElement(ue,S({fullWidth:O==="fullWidth",indicator:$e&&!_&&Ge,selected:$e,selectionFollowsFocus:b,onChange:x,textColor:M,value:me},Xe===1&&D===!1&&!ue.props.tabIndex?{tabIndex:0}:{}))}),ye=ue=>{const me=ae.current,$e=St(me).activeElement;if($e.getAttribute("role")!=="tab")return;let Qe=k==="horizontal"?"ArrowLeft":"ArrowUp",Ct=k==="horizontal"?"ArrowRight":"ArrowDown";switch(k==="horizontal"&&i&&(Qe="ArrowRight",Ct="ArrowLeft"),ue.key){case Qe:ue.preventDefault(),Sl(me,$e,Sy);break;case Ct:ue.preventDefault(),Sl(me,$e,wy);break;case"Home":ue.preventDefault(),Sl(me,null,wy);break;case"End":ue.preventDefault(),Sl(me,null,Sy);break}},Pe=De();return u.jsxs(rN,S({className:le(v.root,f),ownerState:$,ref:n,as:m},V,{children:[Pe.scrollButtonStart,Pe.scrollbarSizeListener,u.jsxs(oN,{className:v.scroller,ownerState:$,style:{overflow:ne.overflow,[q?`margin${i?"Left":"Right"}`:"marginBottom"]:F?void 0:-ne.scrollbarWidth},ref:W,children:[u.jsx(iN,{"aria-label":a,"aria-labelledby":s,"aria-orientation":k==="vertical"?"vertical":null,className:v.flexContainer,ownerState:$,onKeyDown:ye,ref:ae,role:"tablist",children:Ye}),_&&Ge]}),Pe.scrollButtonEnd]}))});function lN(e){return be("MuiTextField",e)}we("MuiTextField",["root"]);const cN=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],uN={standard:$m,filled:Em,outlined:Mm},dN=e=>{const{classes:t}=e;return Se({root:["root"]},lN,t)},fN=ie(sd,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),at=p.forwardRef(function(t,n){const r=ke({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:s,color:l="primary",defaultValue:c,disabled:d=!1,error:f=!1,FormHelperTextProps:m,fullWidth:w=!1,helperText:y,id:x,InputLabelProps:k,inputProps:g,InputProps:h,inputRef:b,label:C,maxRows:R,minRows:E,multiline:P=!1,name:M,onBlur:D,onChange:O,onFocus:F,placeholder:V,required:U=!1,rows:q,select:ee=!1,SelectProps:J,type:re,value:I,variant:B="outlined"}=r,$=se(r,cN),v=S({},r,{autoFocus:i,color:l,disabled:d,error:f,fullWidth:w,multiline:P,required:U,select:ee,variant:B}),T=dN(v),L={};B==="outlined"&&(k&&typeof k.shrink<"u"&&(L.notched=k.shrink),L.label=C),ee&&((!J||!J.native)&&(L.id=void 0),L["aria-describedby"]=void 0);const _=As(x),N=y&&_?`${_}-helper-text`:void 0,H=C&&_?`${_}-label`:void 0,j=uN[B],A=u.jsx(j,S({"aria-describedby":N,autoComplete:o,autoFocus:i,defaultValue:c,fullWidth:w,multiline:P,name:M,rows:q,maxRows:R,minRows:E,type:re,value:I,id:_,inputRef:b,onBlur:D,onChange:O,onFocus:F,placeholder:V,inputProps:g},L,h));return u.jsxs(fN,S({className:le(T.root,s),disabled:d,error:f,fullWidth:w,ref:n,required:U,color:l,variant:B,ownerState:v},$,{children:[C!=null&&C!==""&&u.jsx(ld,S({htmlFor:_,id:H},k,{children:C})),ee?u.jsx(Vs,S({"aria-describedby":N,id:_,labelId:H,value:I,input:A},J,{children:a})):A,y&&u.jsx(d_,S({id:N},m,{children:y}))]}))});var Im={},af={};const pN=Lr(g5);var ky;function Me(){return ky||(ky=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=pN}(af)),af}var hN=Te;Object.defineProperty(Im,"__esModule",{value:!0});var oa=Im.default=void 0,mN=hN(Me()),gN=u;oa=Im.default=(0,mN.default)((0,gN.jsx)("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"}),"Send");var _m={},vN=Te;Object.defineProperty(_m,"__esModule",{value:!0});var Lm=_m.default=void 0,yN=vN(Me()),xN=u;Lm=_m.default=(0,yN.default)((0,xN.jsx)("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3m5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72z"}),"Mic");var Am={},bN=Te;Object.defineProperty(Am,"__esModule",{value:!0});var Nm=Am.default=void 0,wN=bN(Me()),SN=u;Nm=Am.default=(0,wN.default)((0,SN.jsx)("path",{d:"M19 11h-1.7c0 .74-.16 1.43-.43 2.05l1.23 1.23c.56-.98.9-2.09.9-3.28m-4.02.17c0-.06.02-.11.02-.17V5c0-1.66-1.34-3-3-3S9 3.34 9 5v.18zM4.27 3 3 4.27l6.01 6.01V11c0 1.66 1.33 3 2.99 3 .22 0 .44-.03.65-.08l1.66 1.66c-.71.33-1.5.52-2.31.52-2.76 0-5.3-2.1-5.3-5.1H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c.91-.13 1.77-.45 2.54-.9L19.73 21 21 19.73z"}),"MicOff");var Dm={},CN=Te;Object.defineProperty(Dm,"__esModule",{value:!0});var cd=Dm.default=void 0,kN=CN(Me()),RN=u;cd=Dm.default=(0,kN.default)((0,RN.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person");var zm={},PN=Te;Object.defineProperty(zm,"__esModule",{value:!0});var Ss=zm.default=void 0,EN=PN(Me()),TN=u;Ss=zm.default=(0,EN.default)((0,TN.jsx)("path",{d:"M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77"}),"VolumeUp");var Bm={},$N=Te;Object.defineProperty(Bm,"__esModule",{value:!0});var Cs=Bm.default=void 0,jN=$N(Me()),MN=u;Cs=Bm.default=(0,jN.default)((0,MN.jsx)("path",{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63m2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71M4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9zM12 4 9.91 6.09 12 8.18z"}),"VolumeOff");var Fm={},ON=Te;Object.defineProperty(Fm,"__esModule",{value:!0});var Um=Fm.default=void 0,IN=ON(Me()),_N=u;Um=Fm.default=(0,IN.default)((0,_N.jsx)("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-1 9h-4v4h-2v-4H9V9h4V5h2v4h4z"}),"LibraryAdd");const Pi="/assets/Aria-BMTE8U_Y.jpg";var LN={exports:{}};(function(e){/** + * {@link https://github.com/muaz-khan/RecordRTC|RecordRTC} is a WebRTC JavaScript library for audio/video as well as screen activity recording. It supports Chrome, Firefox, Opera, Android, and Microsoft Edge. Platforms: Linux, Mac and Windows. + * @summary Record audio, video or screen inside the browser. + * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} + * @author {@link https://MuazKhan.com|Muaz Khan} + * @typedef RecordRTC + * @class + * @example + * var recorder = RecordRTC(mediaStream or [arrayOfMediaStream], { + * type: 'video', // audio or video or gif or canvas + * recorderType: MediaStreamRecorder || CanvasRecorder || StereoAudioRecorder || Etc + * }); + * recorder.startRecording(); + * @see For further information: + * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} + * @param {MediaStream} mediaStream - Single media-stream object, array of media-streams, html-canvas-element, etc. + * @param {object} config - {type:"video", recorderType: MediaStreamRecorder, disableLogs: true, numberOfAudioChannels: 1, bufferSize: 0, sampleRate: 0, desiredSampRate: 16000, video: HTMLVideoElement, etc.} + */function t($,v){if(!$)throw"First parameter is required.";v=v||{type:"video"},v=new n($,v);var T=this;function L(W){return v.disableLogs||console.log("RecordRTC version: ",T.version),W&&(v=new n($,W)),v.disableLogs||console.log("started recording "+v.type+" stream."),ne?(ne.clearRecordedData(),ne.record(),K("recording"),T.recordingDuration&&Y(),T):(_(function(){T.recordingDuration&&Y()}),T)}function _(W){W&&(v.initCallback=function(){W(),W=v.initCallback=null});var ae=new r($,v);ne=new ae($,v),ne.record(),K("recording"),v.disableLogs||console.log("Initialized recorderType:",ne.constructor.name,"for output-type:",v.type)}function N(W){if(W=W||function(){},!ne){te();return}if(T.state==="paused"){T.resumeRecording(),setTimeout(function(){N(W)},1);return}T.state!=="recording"&&!v.disableLogs&&console.warn('Recording state should be: "recording", however current state is: ',T.state),v.disableLogs||console.log("Stopped recording "+v.type+" stream."),v.type!=="gif"?ne.stop(ae):(ne.stop(),ae()),K("stopped");function ae(ge){if(!ne){typeof W.call=="function"?W.call(T,""):W("");return}Object.keys(ne).forEach(function(fe){typeof ne[fe]!="function"&&(T[fe]=ne[fe])});var z=ne.blob;if(!z)if(ge)ne.blob=z=ge;else throw"Recording failed.";if(z&&!v.disableLogs&&console.log(z.type,"->",g(z.size)),W){var X;try{X=d.createObjectURL(z)}catch{}typeof W.call=="function"?W.call(T,X):W(X)}v.autoWriteToDisk&&G(function(fe){var pe={};pe[v.type+"Blob"]=fe,q.Store(pe)})}}function H(){if(!ne){te();return}if(T.state!=="recording"){v.disableLogs||console.warn("Unable to pause the recording. Recording state: ",T.state);return}K("paused"),ne.pause(),v.disableLogs||console.log("Paused recording.")}function j(){if(!ne){te();return}if(T.state!=="paused"){v.disableLogs||console.warn("Unable to resume the recording. Recording state: ",T.state);return}K("recording"),ne.resume(),v.disableLogs||console.log("Resumed recording.")}function A(W){postMessage(new FileReaderSync().readAsDataURL(W))}function G(W,ae){if(!W)throw"Pass a callback function over getDataURL.";var ge=ae?ae.blob:(ne||{}).blob;if(!ge){v.disableLogs||console.warn("Blob encoder did not finish its job yet."),setTimeout(function(){G(W,ae)},1e3);return}if(typeof Worker<"u"&&!navigator.mozGetUserMedia){var z=fe(A);z.onmessage=function(pe){W(pe.data)},z.postMessage(ge)}else{var X=new FileReader;X.readAsDataURL(ge),X.onload=function(pe){W(pe.target.result)}}function fe(pe){try{var ve=d.createObjectURL(new Blob([pe.toString(),"this.onmessage = function (eee) {"+pe.name+"(eee.data);}"],{type:"application/javascript"})),Ce=new Worker(ve);return d.revokeObjectURL(ve),Ce}catch{}}}function Y(W){if(W=W||0,T.state==="paused"){setTimeout(function(){Y(W)},1e3);return}if(T.state!=="stopped"){if(W>=T.recordingDuration){N(T.onRecordingStopped);return}W+=1e3,setTimeout(function(){Y(W)},1e3)}}function K(W){T&&(T.state=W,typeof T.onStateChanged.call=="function"?T.onStateChanged.call(T,W):T.onStateChanged(W))}var oe='It seems that recorder is destroyed or "startRecording" is not invoked for '+v.type+" recorder.";function te(){v.disableLogs!==!0&&console.warn(oe)}var ne,de={startRecording:L,stopRecording:N,pauseRecording:H,resumeRecording:j,initRecorder:_,setRecordingDuration:function(W,ae){if(typeof W>"u")throw"recordingDuration is required.";if(typeof W!="number")throw"recordingDuration must be a number.";return T.recordingDuration=W,T.onRecordingStopped=ae||function(){},{onRecordingStopped:function(ge){T.onRecordingStopped=ge}}},clearRecordedData:function(){if(!ne){te();return}ne.clearRecordedData(),v.disableLogs||console.log("Cleared old recorded data.")},getBlob:function(){if(!ne){te();return}return ne.blob},getDataURL:G,toURL:function(){if(!ne){te();return}return d.createObjectURL(ne.blob)},getInternalRecorder:function(){return ne},save:function(W){if(!ne){te();return}h(ne.blob,W)},getFromDisk:function(W){if(!ne){te();return}t.getFromDisk(v.type,W)},setAdvertisementArray:function(W){v.advertisement=[];for(var ae=W.length,ge=0;ge"u"||(ot.navigator={userAgent:i,getUserMedia:function(){}},ot.console||(ot.console={}),(typeof ot.console.log>"u"||typeof ot.console.error>"u")&&(ot.console.error=ot.console.log=ot.console.log||function(){console.log(arguments)}),typeof document>"u"&&($.document={documentElement:{appendChild:function(){return""}}},document.createElement=document.captureStream=document.mozCaptureStream=function(){var v={getContext:function(){return v},play:function(){},pause:function(){},drawImage:function(){},toDataURL:function(){return""},style:{}};return v},$.HTMLVideoElement=function(){}),typeof location>"u"&&($.location={protocol:"file:",href:"",hash:""}),typeof screen>"u"&&($.screen={width:0,height:0}),typeof d>"u"&&($.URL={createObjectURL:function(){return""},revokeObjectURL:function(){return""}}),$.window=ot))})(typeof ot<"u"?ot:null);var a=window.requestAnimationFrame;if(typeof a>"u"){if(typeof webkitRequestAnimationFrame<"u")a=webkitRequestAnimationFrame;else if(typeof mozRequestAnimationFrame<"u")a=mozRequestAnimationFrame;else if(typeof msRequestAnimationFrame<"u")a=msRequestAnimationFrame;else if(typeof a>"u"){var s=0;a=function($,v){var T=new Date().getTime(),L=Math.max(0,16-(T-s)),_=setTimeout(function(){$(T+L)},L);return s=T+L,_}}}var l=window.cancelAnimationFrame;typeof l>"u"&&(typeof webkitCancelAnimationFrame<"u"?l=webkitCancelAnimationFrame:typeof mozCancelAnimationFrame<"u"?l=mozCancelAnimationFrame:typeof msCancelAnimationFrame<"u"?l=msCancelAnimationFrame:typeof l>"u"&&(l=function($){clearTimeout($)}));var c=window.AudioContext;typeof c>"u"&&(typeof webkitAudioContext<"u"&&(c=webkitAudioContext),typeof mozAudioContext<"u"&&(c=mozAudioContext));var d=window.URL;typeof d>"u"&&typeof webkitURL<"u"&&(d=webkitURL),typeof navigator<"u"&&typeof navigator.getUserMedia>"u"&&(typeof navigator.webkitGetUserMedia<"u"&&(navigator.getUserMedia=navigator.webkitGetUserMedia),typeof navigator.mozGetUserMedia<"u"&&(navigator.getUserMedia=navigator.mozGetUserMedia));var f=navigator.userAgent.indexOf("Edge")!==-1&&(!!navigator.msSaveBlob||!!navigator.msSaveOrOpenBlob),m=!!window.opera||navigator.userAgent.indexOf("OPR/")!==-1,w=navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&"netscape"in window&&/ rv:/.test(navigator.userAgent),y=!m&&!f&&!!navigator.webkitGetUserMedia||b()||navigator.userAgent.toLowerCase().indexOf("chrome/")!==-1,x=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);x&&!y&&navigator.userAgent.indexOf("CriOS")!==-1&&(x=!1,y=!0);var k=window.MediaStream;typeof k>"u"&&typeof webkitMediaStream<"u"&&(k=webkitMediaStream),typeof k<"u"&&typeof k.prototype.stop>"u"&&(k.prototype.stop=function(){this.getTracks().forEach(function($){$.stop()})});function g($){var v=1e3,T=["Bytes","KB","MB","GB","TB"];if($===0)return"0 Bytes";var L=parseInt(Math.floor(Math.log($)/Math.log(v)),10);return($/Math.pow(v,L)).toPrecision(3)+" "+T[L]}function h($,v){if(!$)throw"Blob object is required.";if(!$.type)try{$.type="video/webm"}catch{}var T=($.type||"video/webm").split("/")[1];if(T.indexOf(";")!==-1&&(T=T.split(";")[0]),v&&v.indexOf(".")!==-1){var L=v.split(".");v=L[0],T=L[1]}var _=(v||Math.round(Math.random()*9999999999)+888888888)+"."+T;if(typeof navigator.msSaveOrOpenBlob<"u")return navigator.msSaveOrOpenBlob($,_);if(typeof navigator.msSaveBlob<"u")return navigator.msSaveBlob($,_);var N=document.createElement("a");N.href=d.createObjectURL($),N.download=_,N.style="display:none;opacity:0;color:transparent;",(document.body||document.documentElement).appendChild(N),typeof N.click=="function"?N.click():(N.target="_blank",N.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))),d.revokeObjectURL(N.href)}function b(){return!!(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&process.versions.electron||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0)}function C($,v){return!$||!$.getTracks?[]:$.getTracks().filter(function(T){return T.kind===(v||"audio")})}function R($,v){"srcObject"in v?v.srcObject=$:"mozSrcObject"in v?v.mozSrcObject=$:v.srcObject=$}function E($,v){if(typeof EBML>"u")throw new Error("Please link: https://www.webrtc-experiment.com/EBML.js");var T=new EBML.Reader,L=new EBML.Decoder,_=EBML.tools,N=new FileReader;N.onload=function(H){var j=L.decode(this.result);j.forEach(function(K){T.read(K)}),T.stop();var A=_.makeMetadataSeekable(T.metadatas,T.duration,T.cues),G=this.result.slice(T.metadataSize),Y=new Blob([A,G],{type:"video/webm"});v(Y)},N.readAsArrayBuffer($)}typeof t<"u"&&(t.invokeSaveAsDialog=h,t.getTracks=C,t.getSeekableBlob=E,t.bytesToSize=g,t.isElectron=b);/** + * Storage is a standalone object used by {@link RecordRTC} to store reusable objects e.g. "new AudioContext". + * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} + * @author {@link https://MuazKhan.com|Muaz Khan} + * @example + * Storage.AudioContext === webkitAudioContext + * @property {webkitAudioContext} AudioContext - Keeps a reference to AudioContext object. + * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} + */var P={};typeof c<"u"?P.AudioContext=c:typeof webkitAudioContext<"u"&&(P.AudioContext=webkitAudioContext),typeof t<"u"&&(t.Storage=P);function M(){if(w||x||f)return!0;var $=navigator.userAgent,v=""+parseFloat(navigator.appVersion),T=parseInt(navigator.appVersion,10),L,_;return(y||m)&&(L=$.indexOf("Chrome"),v=$.substring(L+7)),(_=v.indexOf(";"))!==-1&&(v=v.substring(0,_)),(_=v.indexOf(" "))!==-1&&(v=v.substring(0,_)),T=parseInt(""+v,10),isNaN(T)&&(v=""+parseFloat(navigator.appVersion),T=parseInt(navigator.appVersion,10)),T>=49}/** + * MediaStreamRecorder is an abstraction layer for {@link https://w3c.github.io/mediacapture-record/MediaRecorder.html|MediaRecorder API}. It is used by {@link RecordRTC} to record MediaStream(s) in both Chrome and Firefox. + * @summary Runs top over {@link https://w3c.github.io/mediacapture-record/MediaRecorder.html|MediaRecorder API}. + * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} + * @author {@link https://github.com/muaz-khan|Muaz Khan} + * @typedef MediaStreamRecorder + * @class + * @example + * var config = { + * mimeType: 'video/webm', // vp8, vp9, h264, mkv, opus/vorbis + * audioBitsPerSecond : 256 * 8 * 1024, + * videoBitsPerSecond : 256 * 8 * 1024, + * bitsPerSecond: 256 * 8 * 1024, // if this is provided, skip above two + * checkForInactiveTracks: true, + * timeSlice: 1000, // concatenate intervals based blobs + * ondataavailable: function() {} // get intervals based blobs + * } + * var recorder = new MediaStreamRecorder(mediaStream, config); + * recorder.record(); + * recorder.stop(function(blob) { + * video.src = URL.createObjectURL(blob); + * + * // or + * var blob = recorder.blob; + * }); + * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} + * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. + * @param {object} config - {disableLogs:true, initCallback: function, mimeType: "video/webm", timeSlice: 1000} + * @throws Will throw an error if first argument "MediaStream" is missing. Also throws error if "MediaRecorder API" are not supported by the browser. + */function D($,v){var Y=this;if(typeof $>"u")throw'First argument "MediaStream" is required.';if(typeof MediaRecorder>"u")throw"Your browser does not support the Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.";if(v=v||{mimeType:"video/webm"},v.type==="audio"){if(C($,"video").length&&C($,"audio").length){var T;navigator.mozGetUserMedia?(T=new k,T.addTrack(C($,"audio")[0])):T=new k(C($,"audio")),$=T}(!v.mimeType||v.mimeType.toString().toLowerCase().indexOf("audio")===-1)&&(v.mimeType=y?"audio/webm":"audio/ogg"),v.mimeType&&v.mimeType.toString().toLowerCase()!=="audio/ogg"&&navigator.mozGetUserMedia&&(v.mimeType="audio/ogg")}var L=[];this.getArrayOfBlobs=function(){return L},this.record=function(){Y.blob=null,Y.clearRecordedData(),Y.timestamps=[],G=[],L=[];var K=v;v.disableLogs||console.log("Passing following config over MediaRecorder API.",K),j&&(j=null),y&&!M()&&(K="video/vp8"),typeof MediaRecorder.isTypeSupported=="function"&&K.mimeType&&(MediaRecorder.isTypeSupported(K.mimeType)||(v.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",K.mimeType),K.mimeType=v.type==="audio"?"audio/webm":"video/webm"));try{j=new MediaRecorder($,K),v.mimeType=K.mimeType}catch{j=new MediaRecorder($)}K.mimeType&&!MediaRecorder.isTypeSupported&&"canRecordMimeType"in j&&j.canRecordMimeType(K.mimeType)===!1&&(v.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",K.mimeType)),j.ondataavailable=function(oe){if(oe.data&&G.push("ondataavailable: "+g(oe.data.size)),typeof v.timeSlice=="number"){if(oe.data&&oe.data.size&&(L.push(oe.data),_(),typeof v.ondataavailable=="function")){var te=v.getNativeBlob?oe.data:new Blob([oe.data],{type:N(K)});v.ondataavailable(te)}return}if(!oe.data||!oe.data.size||oe.data.size<100||Y.blob){Y.recordingCallback&&(Y.recordingCallback(new Blob([],{type:N(K)})),Y.recordingCallback=null);return}Y.blob=v.getNativeBlob?oe.data:new Blob([oe.data],{type:N(K)}),Y.recordingCallback&&(Y.recordingCallback(Y.blob),Y.recordingCallback=null)},j.onstart=function(){G.push("started")},j.onpause=function(){G.push("paused")},j.onresume=function(){G.push("resumed")},j.onstop=function(){G.push("stopped")},j.onerror=function(oe){oe&&(oe.name||(oe.name="UnknownError"),G.push("error: "+oe),v.disableLogs||(oe.name.toString().toLowerCase().indexOf("invalidstate")!==-1?console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.",oe):oe.name.toString().toLowerCase().indexOf("notsupported")!==-1?console.error("MIME type (",K.mimeType,") is not supported.",oe):oe.name.toString().toLowerCase().indexOf("security")!==-1?console.error("MediaRecorder security error",oe):oe.name==="OutOfMemory"?console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.",oe):oe.name==="IllegalStreamModification"?console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.",oe):oe.name==="OtherRecordingError"?console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.",oe):oe.name==="GenericError"?console.error("The UA cannot provide the codec or recording option that has been requested.",oe):console.error("MediaRecorder Error",oe)),function(te){if(!Y.manuallyStopped&&j&&j.state==="inactive"){delete v.timeslice,j.start(10*60*1e3);return}setTimeout(te,1e3)}(),j.state!=="inactive"&&j.state!=="stopped"&&j.stop())},typeof v.timeSlice=="number"?(_(),j.start(v.timeSlice)):j.start(36e5),v.initCallback&&v.initCallback()},this.timestamps=[];function _(){Y.timestamps.push(new Date().getTime()),typeof v.onTimeStamp=="function"&&v.onTimeStamp(Y.timestamps[Y.timestamps.length-1],Y.timestamps)}function N(K){return j&&j.mimeType?j.mimeType:K.mimeType||"video/webm"}this.stop=function(K){K=K||function(){},Y.manuallyStopped=!0,j&&(this.recordingCallback=K,j.state==="recording"&&j.stop(),typeof v.timeSlice=="number"&&setTimeout(function(){Y.blob=new Blob(L,{type:N(v)}),Y.recordingCallback(Y.blob)},100))},this.pause=function(){j&&j.state==="recording"&&j.pause()},this.resume=function(){j&&j.state==="paused"&&j.resume()},this.clearRecordedData=function(){j&&j.state==="recording"&&Y.stop(H),H()};function H(){L=[],j=null,Y.timestamps=[]}var j;this.getInternalRecorder=function(){return j};function A(){if("active"in $){if(!$.active)return!1}else if("ended"in $&&$.ended)return!1;return!0}this.blob=null,this.getState=function(){return j&&j.state||"inactive"};var G=[];this.getAllStates=function(){return G},typeof v.checkForInactiveTracks>"u"&&(v.checkForInactiveTracks=!1);var Y=this;(function K(){if(!(!j||v.checkForInactiveTracks===!1)){if(A()===!1){v.disableLogs||console.log("MediaStream seems stopped."),Y.stop();return}setTimeout(K,1e3)}})(),this.name="MediaStreamRecorder",this.toString=function(){return this.name}}typeof t<"u"&&(t.MediaStreamRecorder=D);/** + * StereoAudioRecorder is a standalone class used by {@link RecordRTC} to bring "stereo" audio-recording in chrome. + * @summary JavaScript standalone object for stereo audio recording. + * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} + * @author {@link https://MuazKhan.com|Muaz Khan} + * @typedef StereoAudioRecorder + * @class + * @example + * var recorder = new StereoAudioRecorder(MediaStream, { + * sampleRate: 44100, + * bufferSize: 4096 + * }); + * recorder.record(); + * recorder.stop(function(blob) { + * video.src = URL.createObjectURL(blob); + * }); + * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} + * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. + * @param {object} config - {sampleRate: 44100, bufferSize: 4096, numberOfAudioChannels: 1, etc.} + */function O($,v){if(!C($,"audio").length)throw"Your stream has no audio tracks.";v=v||{};var T=this,L=[],_=[],N=!1,H=0,j,A=2,G=v.desiredSampRate;v.leftChannel===!0&&(A=1),v.numberOfAudioChannels===1&&(A=1),(!A||A<1)&&(A=2),v.disableLogs||console.log("StereoAudioRecorder is set to record number of channels: "+A),typeof v.checkForInactiveTracks>"u"&&(v.checkForInactiveTracks=!0);function Y(){if(v.checkForInactiveTracks===!1)return!0;if("active"in $){if(!$.active)return!1}else if("ended"in $&&$.ended)return!1;return!0}this.record=function(){if(Y()===!1)throw"Please make sure MediaStream is active.";ge(),X=ae=!1,N=!0,typeof v.timeSlice<"u"&&ve()};function K(Ce,Le){function De(he,Ge){var Xe=he.numberOfAudioChannels,Ye=he.leftBuffers.slice(0),ye=he.rightBuffers.slice(0),Pe=he.sampleRate,ue=he.internalInterleavedLength,me=he.desiredSampRate;Xe===2&&(Ye=Qe(Ye,ue),ye=Qe(ye,ue),me&&(Ye=$e(Ye,me,Pe),ye=$e(ye,me,Pe))),Xe===1&&(Ye=Qe(Ye,ue),me&&(Ye=$e(Ye,me,Pe))),me&&(Pe=me);function $e(nt,en,rt){var Tt=Math.round(nt.length*(en/rt)),It=[],qt=Number((nt.length-1)/(Tt-1));It[0]=nt[0];for(var Kn=1;Kn"u"&&(t.Storage={AudioContextConstructor:null,AudioContext:window.AudioContext||window.webkitAudioContext}),(!t.Storage.AudioContextConstructor||t.Storage.AudioContextConstructor.state==="closed")&&(t.Storage.AudioContextConstructor=new t.Storage.AudioContext);var te=t.Storage.AudioContextConstructor,ne=te.createMediaStreamSource($),de=[0,256,512,1024,2048,4096,8192,16384],Re=typeof v.bufferSize>"u"?4096:v.bufferSize;if(de.indexOf(Re)===-1&&(v.disableLogs||console.log("Legal values for buffer-size are "+JSON.stringify(de,null," "))),te.createJavaScriptNode)j=te.createJavaScriptNode(Re,A,A);else if(te.createScriptProcessor)j=te.createScriptProcessor(Re,A,A);else throw"WebAudio API has no support on this browser.";ne.connect(j),v.bufferSize||(Re=j.bufferSize);var W=typeof v.sampleRate<"u"?v.sampleRate:te.sampleRate||44100;(W<22050||W>96e3)&&(v.disableLogs||console.log("sample-rate must be under range 22050 and 96000.")),v.disableLogs||v.desiredSampRate&&console.log("Desired sample-rate: "+v.desiredSampRate);var ae=!1;this.pause=function(){ae=!0},this.resume=function(){if(Y()===!1)throw"Please make sure MediaStream is active.";if(!N){v.disableLogs||console.log("Seems recording has been restarted."),this.record();return}ae=!1},this.clearRecordedData=function(){v.checkForInactiveTracks=!1,N&&this.stop(z),z()};function ge(){L=[],_=[],H=0,X=!1,N=!1,ae=!1,te=null,T.leftchannel=L,T.rightchannel=_,T.numberOfAudioChannels=A,T.desiredSampRate=G,T.sampleRate=W,T.recordingLength=H,pe={left:[],right:[],recordingLength:0}}function z(){j&&(j.onaudioprocess=null,j.disconnect(),j=null),ne&&(ne.disconnect(),ne=null),ge()}this.name="StereoAudioRecorder",this.toString=function(){return this.name};var X=!1;function fe(Ce){if(!ae){if(Y()===!1&&(v.disableLogs||console.log("MediaStream seems stopped."),j.disconnect(),N=!1),!N){ne&&(ne.disconnect(),ne=null);return}X||(X=!0,v.onAudioProcessStarted&&v.onAudioProcessStarted(),v.initCallback&&v.initCallback());var Le=Ce.inputBuffer.getChannelData(0),De=new Float32Array(Le);if(L.push(De),A===2){var Ee=Ce.inputBuffer.getChannelData(1),he=new Float32Array(Ee);_.push(he)}H+=Re,T.recordingLength=H,typeof v.timeSlice<"u"&&(pe.recordingLength+=Re,pe.left.push(De),A===2&&pe.right.push(he))}}j.onaudioprocess=fe,te.createMediaStreamDestination?j.connect(te.createMediaStreamDestination()):j.connect(te.destination),this.leftchannel=L,this.rightchannel=_,this.numberOfAudioChannels=A,this.desiredSampRate=G,this.sampleRate=W,T.recordingLength=H;var pe={left:[],right:[],recordingLength:0};function ve(){!N||typeof v.ondataavailable!="function"||typeof v.timeSlice>"u"||(pe.left.length?(K({desiredSampRate:G,sampleRate:W,numberOfAudioChannels:A,internalInterleavedLength:pe.recordingLength,leftBuffers:pe.left,rightBuffers:A===1?[]:pe.right},function(Ce,Le){var De=new Blob([Le],{type:"audio/wav"});v.ondataavailable(De),setTimeout(ve,v.timeSlice)}),pe={left:[],right:[],recordingLength:0}):setTimeout(ve,v.timeSlice))}}typeof t<"u"&&(t.StereoAudioRecorder=O);/** + * CanvasRecorder is a standalone class used by {@link RecordRTC} to bring HTML5-Canvas recording into video WebM. It uses HTML2Canvas library and runs top over {@link Whammy}. + * @summary HTML2Canvas recording into video WebM. + * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} + * @author {@link https://MuazKhan.com|Muaz Khan} + * @typedef CanvasRecorder + * @class + * @example + * var recorder = new CanvasRecorder(htmlElement, { disableLogs: true, useWhammyRecorder: true }); + * recorder.record(); + * recorder.stop(function(blob) { + * video.src = URL.createObjectURL(blob); + * }); + * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} + * @param {HTMLElement} htmlElement - querySelector/getElementById/getElementsByTagName[0]/etc. + * @param {object} config - {disableLogs:true, initCallback: function} + */function F($,v){if(typeof html2canvas>"u")throw"Please link: https://www.webrtc-experiment.com/screenshot.js";v=v||{},v.frameInterval||(v.frameInterval=10);var T=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach(function(de){de in document.createElement("canvas")&&(T=!0)});var L=(!!window.webkitRTCPeerConnection||!!window.webkitGetUserMedia)&&!!window.chrome,_=50,N=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);L&&N&&N[2]&&(_=parseInt(N[2],10)),L&&_<52&&(T=!1),v.useWhammyRecorder&&(T=!1);var H,j;if(T)if(v.disableLogs||console.log("Your browser supports both MediRecorder API and canvas.captureStream!"),$ instanceof HTMLCanvasElement)H=$;else if($ instanceof CanvasRenderingContext2D)H=$.canvas;else throw"Please pass either HTMLCanvasElement or CanvasRenderingContext2D.";else navigator.mozGetUserMedia&&(v.disableLogs||console.error("Canvas recording is NOT supported in Firefox."));var A;this.record=function(){if(A=!0,T&&!v.useWhammyRecorder){var de;"captureStream"in H?de=H.captureStream(25):"mozCaptureStream"in H?de=H.mozCaptureStream(25):"webkitCaptureStream"in H&&(de=H.webkitCaptureStream(25));try{var Re=new k;Re.addTrack(C(de,"video")[0]),de=Re}catch{}if(!de)throw"captureStream API are NOT available.";j=new D(de,{mimeType:v.mimeType||"video/webm"}),j.record()}else ne.frames=[],te=new Date().getTime(),oe();v.initCallback&&v.initCallback()},this.getWebPImages=function(de){if($.nodeName.toLowerCase()!=="canvas"){de();return}var Re=ne.frames.length;ne.frames.forEach(function(W,ae){var ge=Re-ae;v.disableLogs||console.log(ge+"/"+Re+" frames remaining"),v.onEncodingCallback&&v.onEncodingCallback(ge,Re);var z=W.image.toDataURL("image/webp",1);ne.frames[ae].image=z}),v.disableLogs||console.log("Generating WebM"),de()},this.stop=function(de){A=!1;var Re=this;if(T&&j){j.stop(de);return}this.getWebPImages(function(){ne.compile(function(W){v.disableLogs||console.log("Recording finished!"),Re.blob=W,Re.blob.forEach&&(Re.blob=new Blob([],{type:"video/webm"})),de&&de(Re.blob),ne.frames=[]})})};var G=!1;this.pause=function(){if(G=!0,j instanceof D){j.pause();return}},this.resume=function(){if(G=!1,j instanceof D){j.resume();return}A||this.record()},this.clearRecordedData=function(){A&&this.stop(Y),Y()};function Y(){ne.frames=[],A=!1,G=!1}this.name="CanvasRecorder",this.toString=function(){return this.name};function K(){var de=document.createElement("canvas"),Re=de.getContext("2d");return de.width=$.width,de.height=$.height,Re.drawImage($,0,0),de}function oe(){if(G)return te=new Date().getTime(),setTimeout(oe,500);if($.nodeName.toLowerCase()==="canvas"){var de=new Date().getTime()-te;te=new Date().getTime(),ne.frames.push({image:K(),duration:de}),A&&setTimeout(oe,v.frameInterval);return}html2canvas($,{grabMouse:typeof v.showMousePointer>"u"||v.showMousePointer,onrendered:function(Re){var W=new Date().getTime()-te;if(!W)return setTimeout(oe,v.frameInterval);te=new Date().getTime(),ne.frames.push({image:Re.toDataURL("image/webp",1),duration:W}),A&&setTimeout(oe,v.frameInterval)}})}var te=new Date().getTime(),ne=new U.Video(100)}typeof t<"u"&&(t.CanvasRecorder=F);/** + * WhammyRecorder is a standalone class used by {@link RecordRTC} to bring video recording in Chrome. It runs top over {@link Whammy}. + * @summary Video recording feature in Chrome. + * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} + * @author {@link https://MuazKhan.com|Muaz Khan} + * @typedef WhammyRecorder + * @class + * @example + * var recorder = new WhammyRecorder(mediaStream); + * recorder.record(); + * recorder.stop(function(blob) { + * video.src = URL.createObjectURL(blob); + * }); + * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} + * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. + * @param {object} config - {disableLogs: true, initCallback: function, video: HTMLVideoElement, etc.} + */function V($,v){v=v||{},v.frameInterval||(v.frameInterval=10),v.disableLogs||console.log("Using frames-interval:",v.frameInterval),this.record=function(){v.width||(v.width=320),v.height||(v.height=240),v.video||(v.video={width:v.width,height:v.height}),v.canvas||(v.canvas={width:v.width,height:v.height}),A.width=v.canvas.width||320,A.height=v.canvas.height||240,G=A.getContext("2d"),v.video&&v.video instanceof HTMLVideoElement?(Y=v.video.cloneNode(),v.initCallback&&v.initCallback()):(Y=document.createElement("video"),R($,Y),Y.onloadedmetadata=function(){v.initCallback&&v.initCallback()},Y.width=v.video.width,Y.height=v.video.height),Y.muted=!0,Y.play(),K=new Date().getTime(),oe=new U.Video,v.disableLogs||(console.log("canvas resolutions",A.width,"*",A.height),console.log("video width/height",Y.width||A.width,"*",Y.height||A.height)),T(v.frameInterval)};function T(te){te=typeof te<"u"?te:10;var ne=new Date().getTime()-K;if(!ne)return setTimeout(T,te,te);if(H)return K=new Date().getTime(),setTimeout(T,100);K=new Date().getTime(),Y.paused&&Y.play(),G.drawImage(Y,0,0,A.width,A.height),oe.frames.push({duration:ne,image:A.toDataURL("image/webp")}),N||setTimeout(T,te,te)}function L(te){var ne=-1,de=te.length;(function Re(){if(ne++,ne===de){te.callback();return}setTimeout(function(){te.functionToLoop(Re,ne)},1)})()}function _(te,ne,de,Re,W){var ae=document.createElement("canvas");ae.width=A.width,ae.height=A.height;var ge=ae.getContext("2d"),z=[],X=te.length,fe={r:0,g:0,b:0},pe=Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2)),ve=0,Ce=0,Le=!1;L({length:X,functionToLoop:function(De,Ee){var he,Ge,Xe,Ye=function(){!Le&&Xe-he<=Xe*Ce||(Le=!0,z.push(te[Ee])),De()};if(Le)Ye();else{var ye=new Image;ye.onload=function(){ge.drawImage(ye,0,0,A.width,A.height);var Pe=ge.getImageData(0,0,A.width,A.height);he=0,Ge=Pe.data.length,Xe=Pe.data.length/4;for(var ue=0;ue0;)ae.push(W&255),W=W>>8;return new Uint8Array(ae.reverse())}function A(W){return new Uint8Array(W.split("").map(function(ae){return ae.charCodeAt(0)}))}function G(W){var ae=[],ge=W.length%8?new Array(9-W.length%8).join("0"):"";W=ge+W;for(var z=0;z127)throw"TrackNumber > 127 not supported";var ge=[W.trackNum|128,W.timecode>>8,W.timecode&255,ae].map(function(z){return String.fromCharCode(z)}).join("")+W.frame;return ge}function oe(W){for(var ae=W.RIFF[0].WEBP[0],ge=ae.indexOf("*"),z=0,X=[];z<4;z++)X[z]=ae.charCodeAt(ge+3+z);var fe,pe,ve;return ve=X[1]<<8|X[0],fe=ve&16383,ve=X[3]<<8|X[2],pe=ve&16383,{width:fe,height:pe,data:ae,riff:W}}function te(W,ae){return parseInt(W.substr(ae+4,4).split("").map(function(ge){var z=ge.charCodeAt(0).toString(2);return new Array(8-z.length+1).join("0")+z}).join(""),2)}function ne(W){for(var ae=0,ge={};ae"u"||typeof indexedDB.open>"u"){console.error("IndexedDB API are not available in this browser.");return}var v=1,T=this.dbName||location.href.replace(/\/|:|#|%|\.|\[|\]/g,""),L,_=indexedDB.open(T,v);function N(j){j.createObjectStore($.dataStoreName)}function H(){var j=L.transaction([$.dataStoreName],"readwrite");$.videoBlob&&j.objectStore($.dataStoreName).put($.videoBlob,"videoBlob"),$.gifBlob&&j.objectStore($.dataStoreName).put($.gifBlob,"gifBlob"),$.audioBlob&&j.objectStore($.dataStoreName).put($.audioBlob,"audioBlob");function A(G){j.objectStore($.dataStoreName).get(G).onsuccess=function(Y){$.callback&&$.callback(Y.target.result,G)}}A("audioBlob"),A("videoBlob"),A("gifBlob")}_.onerror=$.onError,_.onsuccess=function(){if(L=_.result,L.onerror=$.onError,L.setVersion)if(L.version!==v){var j=L.setVersion(v);j.onsuccess=function(){N(L),H()}}else H();else H()},_.onupgradeneeded=function(j){N(j.target.result)}},Fetch:function($){return this.callback=$,this.init(),this},Store:function($){return this.audioBlob=$.audioBlob,this.videoBlob=$.videoBlob,this.gifBlob=$.gifBlob,this.init(),this},onError:function($){console.error(JSON.stringify($,null," "))},dataStoreName:"recordRTC",dbName:null};typeof t<"u"&&(t.DiskStorage=q);/** + * GifRecorder is standalone calss used by {@link RecordRTC} to record video or canvas into animated gif. + * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} + * @author {@link https://MuazKhan.com|Muaz Khan} + * @typedef GifRecorder + * @class + * @example + * var recorder = new GifRecorder(mediaStream || canvas || context, { onGifPreview: function, onGifRecordingStarted: function, width: 1280, height: 720, frameRate: 200, quality: 10 }); + * recorder.record(); + * recorder.stop(function(blob) { + * img.src = URL.createObjectURL(blob); + * }); + * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} + * @param {MediaStream} mediaStream - MediaStream object or HTMLCanvasElement or CanvasRenderingContext2D. + * @param {object} config - {disableLogs:true, initCallback: function, width: 320, height: 240, frameRate: 200, quality: 10} + */function ee($,v){if(typeof GIFEncoder>"u"){var T=document.createElement("script");T.src="https://www.webrtc-experiment.com/gif-recorder.js",(document.body||document.documentElement).appendChild(T)}v=v||{};var L=$ instanceof CanvasRenderingContext2D||$ instanceof HTMLCanvasElement;this.record=function(){if(typeof GIFEncoder>"u"){setTimeout(te.record,1e3);return}if(!A){setTimeout(te.record,1e3);return}L||(v.width||(v.width=G.offsetWidth||320),v.height||(v.height=G.offsetHeight||240),v.video||(v.video={width:v.width,height:v.height}),v.canvas||(v.canvas={width:v.width,height:v.height}),H.width=v.canvas.width||320,H.height=v.canvas.height||240,G.width=v.video.width||320,G.height=v.video.height||240),oe=new GIFEncoder,oe.setRepeat(0),oe.setDelay(v.frameRate||200),oe.setQuality(v.quality||10),oe.start(),typeof v.onGifRecordingStarted=="function"&&v.onGifRecordingStarted();function ne(de){if(te.clearedRecordedData!==!0){if(_)return setTimeout(function(){ne(de)},100);Y=a(ne),typeof K===void 0&&(K=de),!(de-K<90)&&(!L&&G.paused&&G.play(),L||j.drawImage(G,0,0,H.width,H.height),v.onGifPreview&&v.onGifPreview(H.toDataURL("image/png")),oe.addFrame(j),K=de)}}Y=a(ne),v.initCallback&&v.initCallback()},this.stop=function(ne){ne=ne||function(){},Y&&l(Y),this.blob=new Blob([new Uint8Array(oe.stream().bin)],{type:"image/gif"}),ne(this.blob),oe.stream().bin=[]};var _=!1;this.pause=function(){_=!0},this.resume=function(){_=!1},this.clearRecordedData=function(){te.clearedRecordedData=!0,N()};function N(){oe&&(oe.stream().bin=[])}this.name="GifRecorder",this.toString=function(){return this.name};var H=document.createElement("canvas"),j=H.getContext("2d");L&&($ instanceof CanvasRenderingContext2D?(j=$,H=j.canvas):$ instanceof HTMLCanvasElement&&(j=$.getContext("2d"),H=$));var A=!0;if(!L){var G=document.createElement("video");G.muted=!0,G.autoplay=!0,G.playsInline=!0,A=!1,G.onloadedmetadata=function(){A=!0},R($,G),G.play()}var Y=null,K,oe,te=this}typeof t<"u"&&(t.GifRecorder=ee);function J($,v){var T="Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45";(function(z){typeof t<"u"||z&&(typeof window<"u"||typeof ot>"u"||(ot.navigator={userAgent:T,getUserMedia:function(){}},ot.console||(ot.console={}),(typeof ot.console.log>"u"||typeof ot.console.error>"u")&&(ot.console.error=ot.console.log=ot.console.log||function(){console.log(arguments)}),typeof document>"u"&&(z.document={documentElement:{appendChild:function(){return""}}},document.createElement=document.captureStream=document.mozCaptureStream=function(){var X={getContext:function(){return X},play:function(){},pause:function(){},drawImage:function(){},toDataURL:function(){return""},style:{}};return X},z.HTMLVideoElement=function(){}),typeof location>"u"&&(z.location={protocol:"file:",href:"",hash:""}),typeof screen>"u"&&(z.screen={width:0,height:0}),typeof G>"u"&&(z.URL={createObjectURL:function(){return""},revokeObjectURL:function(){return""}}),z.window=ot))})(typeof ot<"u"?ot:null),v=v||"multi-streams-mixer";var L=[],_=!1,N=document.createElement("canvas"),H=N.getContext("2d");N.style.opacity=0,N.style.position="absolute",N.style.zIndex=-1,N.style.top="-1000em",N.style.left="-1000em",N.className=v,(document.body||document.documentElement).appendChild(N),this.disableLogs=!1,this.frameInterval=10,this.width=360,this.height=240,this.useGainNode=!0;var j=this,A=window.AudioContext;typeof A>"u"&&(typeof webkitAudioContext<"u"&&(A=webkitAudioContext),typeof mozAudioContext<"u"&&(A=mozAudioContext));var G=window.URL;typeof G>"u"&&typeof webkitURL<"u"&&(G=webkitURL),typeof navigator<"u"&&typeof navigator.getUserMedia>"u"&&(typeof navigator.webkitGetUserMedia<"u"&&(navigator.getUserMedia=navigator.webkitGetUserMedia),typeof navigator.mozGetUserMedia<"u"&&(navigator.getUserMedia=navigator.mozGetUserMedia));var Y=window.MediaStream;typeof Y>"u"&&typeof webkitMediaStream<"u"&&(Y=webkitMediaStream),typeof Y<"u"&&typeof Y.prototype.stop>"u"&&(Y.prototype.stop=function(){this.getTracks().forEach(function(z){z.stop()})});var K={};typeof A<"u"?K.AudioContext=A:typeof webkitAudioContext<"u"&&(K.AudioContext=webkitAudioContext);function oe(z,X){"srcObject"in X?X.srcObject=z:"mozSrcObject"in X?X.mozSrcObject=z:X.srcObject=z}this.startDrawingFrames=function(){te()};function te(){if(!_){var z=L.length,X=!1,fe=[];if(L.forEach(function(ve){ve.stream||(ve.stream={}),ve.stream.fullcanvas?X=ve:fe.push(ve)}),X)N.width=X.stream.width,N.height=X.stream.height;else if(fe.length){N.width=z>1?fe[0].width*2:fe[0].width;var pe=1;(z===3||z===4)&&(pe=2),(z===5||z===6)&&(pe=3),(z===7||z===8)&&(pe=4),(z===9||z===10)&&(pe=5),N.height=fe[0].height*pe}else N.width=j.width||360,N.height=j.height||240;X&&X instanceof HTMLVideoElement&&ne(X),fe.forEach(function(ve,Ce){ne(ve,Ce)}),setTimeout(te,j.frameInterval)}}function ne(z,X){if(!_){var fe=0,pe=0,ve=z.width,Ce=z.height;X===1&&(fe=z.width),X===2&&(pe=z.height),X===3&&(fe=z.width,pe=z.height),X===4&&(pe=z.height*2),X===5&&(fe=z.width,pe=z.height*2),X===6&&(pe=z.height*3),X===7&&(fe=z.width,pe=z.height*3),typeof z.stream.left<"u"&&(fe=z.stream.left),typeof z.stream.top<"u"&&(pe=z.stream.top),typeof z.stream.width<"u"&&(ve=z.stream.width),typeof z.stream.height<"u"&&(Ce=z.stream.height),H.drawImage(z,fe,pe,ve,Ce),typeof z.stream.onRender=="function"&&z.stream.onRender(H,fe,pe,ve,Ce,X)}}function de(){_=!1;var z=Re(),X=W();return X&&X.getTracks().filter(function(fe){return fe.kind==="audio"}).forEach(function(fe){z.addTrack(fe)}),$.forEach(function(fe){fe.fullcanvas}),z}function Re(){ge();var z;"captureStream"in N?z=N.captureStream():"mozCaptureStream"in N?z=N.mozCaptureStream():j.disableLogs||console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");var X=new Y;return z.getTracks().filter(function(fe){return fe.kind==="video"}).forEach(function(fe){X.addTrack(fe)}),N.stream=X,X}function W(){K.AudioContextConstructor||(K.AudioContextConstructor=new K.AudioContext),j.audioContext=K.AudioContextConstructor,j.audioSources=[],j.useGainNode===!0&&(j.gainNode=j.audioContext.createGain(),j.gainNode.connect(j.audioContext.destination),j.gainNode.gain.value=0);var z=0;if($.forEach(function(X){if(X.getTracks().filter(function(pe){return pe.kind==="audio"}).length){z++;var fe=j.audioContext.createMediaStreamSource(X);j.useGainNode===!0&&fe.connect(j.gainNode),j.audioSources.push(fe)}}),!!z)return j.audioDestination=j.audioContext.createMediaStreamDestination(),j.audioSources.forEach(function(X){X.connect(j.audioDestination)}),j.audioDestination.stream}function ae(z){var X=document.createElement("video");return oe(z,X),X.className=v,X.muted=!0,X.volume=0,X.width=z.width||j.width||360,X.height=z.height||j.height||240,X.play(),X}this.appendStreams=function(z){if(!z)throw"First parameter is required.";z instanceof Array||(z=[z]),z.forEach(function(X){var fe=new Y;if(X.getTracks().filter(function(Ce){return Ce.kind==="video"}).length){var pe=ae(X);pe.stream=X,L.push(pe),fe.addTrack(X.getTracks().filter(function(Ce){return Ce.kind==="video"})[0])}if(X.getTracks().filter(function(Ce){return Ce.kind==="audio"}).length){var ve=j.audioContext.createMediaStreamSource(X);j.audioDestination=j.audioContext.createMediaStreamDestination(),ve.connect(j.audioDestination),fe.addTrack(j.audioDestination.stream.getTracks().filter(function(Ce){return Ce.kind==="audio"})[0])}$.push(fe)})},this.releaseStreams=function(){L=[],_=!0,j.gainNode&&(j.gainNode.disconnect(),j.gainNode=null),j.audioSources.length&&(j.audioSources.forEach(function(z){z.disconnect()}),j.audioSources=[]),j.audioDestination&&(j.audioDestination.disconnect(),j.audioDestination=null),j.audioContext&&j.audioContext.close(),j.audioContext=null,H.clearRect(0,0,N.width,N.height),N.stream&&(N.stream.stop(),N.stream=null)},this.resetVideoStreams=function(z){z&&!(z instanceof Array)&&(z=[z]),ge(z)};function ge(z){L=[],z=z||$,z.forEach(function(X){if(X.getTracks().filter(function(pe){return pe.kind==="video"}).length){var fe=ae(X);fe.stream=X,L.push(fe)}})}this.name="MultiStreamsMixer",this.toString=function(){return this.name},this.getMixedStream=de}typeof t>"u"&&(e.exports=J);/** + * MultiStreamRecorder can record multiple videos in single container. + * @summary Multi-videos recorder. + * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} + * @author {@link https://MuazKhan.com|Muaz Khan} + * @typedef MultiStreamRecorder + * @class + * @example + * var options = { + * mimeType: 'video/webm' + * } + * var recorder = new MultiStreamRecorder(ArrayOfMediaStreams, options); + * recorder.record(); + * recorder.stop(function(blob) { + * video.src = URL.createObjectURL(blob); + * + * // or + * var blob = recorder.blob; + * }); + * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} + * @param {MediaStreams} mediaStreams - Array of MediaStreams. + * @param {object} config - {disableLogs:true, frameInterval: 1, mimeType: "video/webm"} + */function re($,v){$=$||[];var T=this,L,_;v=v||{elementClass:"multi-streams-mixer",mimeType:"video/webm",video:{width:360,height:240}},v.frameInterval||(v.frameInterval=10),v.video||(v.video={}),v.video.width||(v.video.width=360),v.video.height||(v.video.height=240),this.record=function(){L=new J($,v.elementClass||"multi-streams-mixer"),N().length&&(L.frameInterval=v.frameInterval||10,L.width=v.video.width||360,L.height=v.video.height||240,L.startDrawingFrames()),v.previewStream&&typeof v.previewStream=="function"&&v.previewStream(L.getMixedStream()),_=new D(L.getMixedStream(),v),_.record()};function N(){var H=[];return $.forEach(function(j){C(j,"video").forEach(function(A){H.push(A)})}),H}this.stop=function(H){_&&_.stop(function(j){T.blob=j,H(j),T.clearRecordedData()})},this.pause=function(){_&&_.pause()},this.resume=function(){_&&_.resume()},this.clearRecordedData=function(){_&&(_.clearRecordedData(),_=null),L&&(L.releaseStreams(),L=null)},this.addStreams=function(H){if(!H)throw"First parameter is required.";H instanceof Array||(H=[H]),$.concat(H),!(!_||!L)&&(L.appendStreams(H),v.previewStream&&typeof v.previewStream=="function"&&v.previewStream(L.getMixedStream()))},this.resetVideoStreams=function(H){L&&(H&&!(H instanceof Array)&&(H=[H]),L.resetVideoStreams(H))},this.getMixer=function(){return L},this.name="MultiStreamRecorder",this.toString=function(){return this.name}}typeof t<"u"&&(t.MultiStreamRecorder=re);/** + * RecordRTCPromisesHandler adds promises support in {@link RecordRTC}. Try a {@link https://github.com/muaz-khan/RecordRTC/blob/master/simple-demos/RecordRTCPromisesHandler.html|demo here} + * @summary Promises for {@link RecordRTC} + * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} + * @author {@link https://MuazKhan.com|Muaz Khan} + * @typedef RecordRTCPromisesHandler + * @class + * @example + * var recorder = new RecordRTCPromisesHandler(mediaStream, options); + * recorder.startRecording() + * .then(successCB) + * .catch(errorCB); + * // Note: You can access all RecordRTC API using "recorder.recordRTC" e.g. + * recorder.recordRTC.onStateChanged = function(state) {}; + * recorder.recordRTC.setRecordingDuration(5000); + * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} + * @param {MediaStream} mediaStream - Single media-stream object, array of media-streams, html-canvas-element, etc. + * @param {object} config - {type:"video", recorderType: MediaStreamRecorder, disableLogs: true, numberOfAudioChannels: 1, bufferSize: 0, sampleRate: 0, video: HTMLVideoElement, etc.} + * @throws Will throw an error if "new" keyword is not used to initiate "RecordRTCPromisesHandler". Also throws error if first argument "MediaStream" is missing. + * @requires {@link RecordRTC} + */function I($,v){if(!this)throw'Use "new RecordRTCPromisesHandler()"';if(typeof $>"u")throw'First argument "MediaStream" is required.';var T=this;T.recordRTC=new t($,v),this.startRecording=function(){return new Promise(function(L,_){try{T.recordRTC.startRecording(),L()}catch(N){_(N)}})},this.stopRecording=function(){return new Promise(function(L,_){try{T.recordRTC.stopRecording(function(N){if(T.blob=T.recordRTC.getBlob(),!T.blob||!T.blob.size){_("Empty blob.",T.blob);return}L(N)})}catch(N){_(N)}})},this.pauseRecording=function(){return new Promise(function(L,_){try{T.recordRTC.pauseRecording(),L()}catch(N){_(N)}})},this.resumeRecording=function(){return new Promise(function(L,_){try{T.recordRTC.resumeRecording(),L()}catch(N){_(N)}})},this.getDataURL=function(L){return new Promise(function(_,N){try{T.recordRTC.getDataURL(function(H){_(H)})}catch(H){N(H)}})},this.getBlob=function(){return new Promise(function(L,_){try{L(T.recordRTC.getBlob())}catch(N){_(N)}})},this.getInternalRecorder=function(){return new Promise(function(L,_){try{L(T.recordRTC.getInternalRecorder())}catch(N){_(N)}})},this.reset=function(){return new Promise(function(L,_){try{L(T.recordRTC.reset())}catch(N){_(N)}})},this.destroy=function(){return new Promise(function(L,_){try{L(T.recordRTC.destroy())}catch(N){_(N)}})},this.getState=function(){return new Promise(function(L,_){try{L(T.recordRTC.getState())}catch(N){_(N)}})},this.blob=null,this.version="5.6.2"}typeof t<"u"&&(t.RecordRTCPromisesHandler=I);/** + * WebAssemblyRecorder lets you create webm videos in JavaScript via WebAssembly. The library consumes raw RGBA32 buffers (4 bytes per pixel) and turns them into a webm video with the given framerate and quality. This makes it compatible out-of-the-box with ImageData from a CANVAS. With realtime mode you can also use webm-wasm for streaming webm videos. + * @summary Video recording feature in Chrome, Firefox and maybe Edge. + * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} + * @author {@link https://MuazKhan.com|Muaz Khan} + * @typedef WebAssemblyRecorder + * @class + * @example + * var recorder = new WebAssemblyRecorder(mediaStream); + * recorder.record(); + * recorder.stop(function(blob) { + * video.src = URL.createObjectURL(blob); + * }); + * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} + * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. + * @param {object} config - {webAssemblyPath:'webm-wasm.wasm',workerPath: 'webm-worker.js', frameRate: 30, width: 1920, height: 1080, bitrate: 1024, realtime: true} + */function B($,v){(typeof ReadableStream>"u"||typeof WritableStream>"u")&&console.error("Following polyfill is strongly recommended: https://unpkg.com/@mattiasbuelens/web-streams-polyfill/dist/polyfill.min.js"),v=v||{},v.width=v.width||640,v.height=v.height||480,v.frameRate=v.frameRate||30,v.bitrate=v.bitrate||1200,v.realtime=v.realtime||!0;var T;function L(){return new ReadableStream({start:function(G){var Y=document.createElement("canvas"),K=document.createElement("video"),oe=!0;K.srcObject=$,K.muted=!0,K.height=v.height,K.width=v.width,K.volume=0,K.onplaying=function(){Y.width=v.width,Y.height=v.height;var te=Y.getContext("2d"),ne=1e3/v.frameRate,de=setInterval(function(){if(T&&(clearInterval(de),G.close()),oe&&(oe=!1,v.onVideoProcessStarted&&v.onVideoProcessStarted()),te.drawImage(K,0,0),G._controlledReadableStream.state!=="closed")try{G.enqueue(te.getImageData(0,0,v.width,v.height))}catch{}},ne)},K.play()}})}var _;function N(G,Y){if(!v.workerPath&&!Y){T=!1,fetch("https://unpkg.com/webm-wasm@latest/dist/webm-worker.js").then(function(oe){oe.arrayBuffer().then(function(te){N(G,te)})});return}if(!v.workerPath&&Y instanceof ArrayBuffer){var K=new Blob([Y],{type:"text/javascript"});v.workerPath=d.createObjectURL(K)}v.workerPath||console.error("workerPath parameter is missing."),_=new Worker(v.workerPath),_.postMessage(v.webAssemblyPath||"https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"),_.addEventListener("message",function(oe){oe.data==="READY"?(_.postMessage({width:v.width,height:v.height,bitrate:v.bitrate||1200,timebaseDen:v.frameRate||30,realtime:v.realtime}),L().pipeTo(new WritableStream({write:function(te){if(T){console.error("Got image, but recorder is finished!");return}_.postMessage(te.data.buffer,[te.data.buffer])}}))):oe.data&&(H||A.push(oe.data))})}this.record=function(){A=[],H=!1,this.blob=null,N($),typeof v.initCallback=="function"&&v.initCallback()};var H;this.pause=function(){H=!0},this.resume=function(){H=!1};function j(G){if(!_){G&&G();return}_.addEventListener("message",function(Y){Y.data===null&&(_.terminate(),_=null,G&&G())}),_.postMessage(null)}var A=[];this.stop=function(G){T=!0;var Y=this;j(function(){Y.blob=new Blob(A,{type:"video/webm"}),G(Y.blob)})},this.name="WebAssemblyRecorder",this.toString=function(){return this.name},this.clearRecordedData=function(){A=[],H=!1,this.blob=null},this.blob=null}typeof t<"u"&&(t.WebAssemblyRecorder=B)})(LN);const AN=()=>u.jsxs(et,{sx:{display:"flex",alignItems:"center",color:"text.secondary"},children:[u.jsx(Er,{src:Pi,sx:{width:24,height:24,marginRight:1},alt:"Aria"}),u.jsxs("div",{style:{display:"flex"},children:[u.jsx("div",{style:{animation:"blink 1.4s infinite",width:6,height:6,borderRadius:"50%",backgroundColor:"currentColor",marginRight:2}}),u.jsx("div",{style:{animation:"blink 1.4s infinite 0.2s",width:6,height:6,borderRadius:"50%",backgroundColor:"currentColor",marginRight:2}}),u.jsx("div",{style:{animation:"blink 1.4s infinite 0.4s",width:6,height:6,borderRadius:"50%",backgroundColor:"currentColor"}})]})]}),NN=()=>{const{user:e,voiceEnabled:t,setVoiceEnabled:n}=p.useContext(vr),r=e==null?void 0:e.userId,[o,i]=p.useState(null),[a,s]=p.useState(0),[l,c]=p.useState(""),[d,f]=p.useState([]),[m,w]=p.useState(!1),[y,x]=p.useState(null),k=p.useRef([]),[g,h]=p.useState(!1),[b,C]=p.useState(""),[R,E]=p.useState(!1),[P,M]=p.useState(!1),[D,O]=p.useState(""),[F,V]=p.useState("info"),[U,q]=p.useState(null),ee=j=>{j.preventDefault(),n(!t)},J=j=>{if(!t||j===U){q(null),window.speechSynthesis.cancel();return}const A=window.speechSynthesis,G=new SpeechSynthesisUtterance(j),Y=()=>{const K=A.getVoices();console.log(K.map(te=>`${te.name} - ${te.lang} - ${te.gender}`));const oe=K.find(te=>te.name.includes("Microsoft Zira - English (United States)"));oe?G.voice=oe:console.log("No female voice found"),G.onend=()=>{q(null)},q(j),A.speak(G)};A.getVoices().length===0?A.onvoiceschanged=Y:Y()},re=p.useCallback(async()=>{if(r){h(!0),E(!0);try{const j=await fetch(`/api/ai/mental_health/welcome/${r}`,{method:"POST",headers:{"Content-Type":"application/json"}}),A=await j.json();console.log(A),j.ok?(C(A.message),t&&A.message&&J(A.message),i(A.chat_id),console.log(A.chat_id)):(console.error("Failed to fetch welcome message:",A),C("Error fetching welcome message."))}catch(j){console.error("Network or server error:",j)}finally{h(!1),E(!1)}}},[r]);p.useEffect(()=>{re()},[]);const I=(j,A)=>{A!=="clickaway"&&M(!1)},B=p.useCallback(async()=>{if(o!==null){h(!0);try{const j=await fetch(`/api/ai/mental_health/finalize/${r}/${o}`,{method:"POST",headers:{"Content-Type":"application/json"}}),A=await j.json();j.ok?(O("Chat finalized successfully"),V("success"),i(null),s(0),f([]),re()):(O("Failed to finalize chat"),V("error"))}catch{O("Error finalizing chat"),V("error")}finally{h(!1),M(!0)}}},[r,o,re]),$=p.useCallback(async()=>{if(!(!l.trim()||o===void 0)){console.log(o),h(!0);try{const j=JSON.stringify({prompt:l,turn_id:a}),A=await fetch(`/api/ai/mental_health/${r}/${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:j}),G=await A.json();console.log(G),A.ok?(f(Y=>[...Y,{message:l,sender:"user"},{message:G,sender:"agent"}]),t&&G&&J(G),s(Y=>Y+1),c("")):(console.error("Failed to send message:",G.error||"Unknown error occurred"),O(G.error||"An error occurred while sending the message."),V("error"),M(!0))}catch(j){console.error("Failed to send message:",j),O("Network or server error occurred."),V("error"),M(!0)}finally{h(!1)}}},[l,r,o,a]),v=()=>MediaRecorder.isTypeSupported("audio/webm; codecs=opus")?"audio/webm; codecs=opus":MediaRecorder.isTypeSupported("audio/mp4")?"audio/mp4":"audio/wav",T=()=>{navigator.mediaDevices.getUserMedia({audio:{sampleRate:44100,channelCount:1,volume:1,echoCancellation:!0}}).then(j=>{k.current=[];const A=v();let G=new MediaRecorder(j,{mimeType:A});G.ondataavailable=Y=>{k.current.push(Y.data)},G.start(),x(G),w(!0)}).catch(j=>{console.error("Error accessing microphone:",j)})},L=()=>{y&&(y.stream.getTracks().forEach(j=>j.stop()),y.onstop=()=>{const j=y.mimeType,A=new Blob(k.current,{type:j});_(A),w(!1),x(null)},y.stop())},_=j=>{if(j.size===0){console.error("Audio Blob is empty");return}const A=new FormData;A.append("audio",j),h(!0),Oe.post("/api/ai/mental_health/voice-to-text",A,{headers:{"Content-Type":"multipart/form-data"}}).then(G=>{const{message:Y}=G.data;c(Y),$()}).catch(G=>{console.error("Error uploading audio:",G)}).finally(()=>{h(!1)})},N=p.useCallback(j=>{const A=j.target.value;A.split(/\s+/).length>200?(c(Y=>Y.split(/\s+/).slice(0,200).join(" ")),O("Word limit reached. Only 200 words allowed."),V("warning"),M(!0)):c(A)},[]),H=j=>j===U?u.jsx(Cs,{}):u.jsx(Ss,{});return u.jsxs(u.Fragment,{children:[u.jsx("style",{children:` + @keyframes blink { + 0%, 100% { opacity: 0; } + 50% { opacity: 1; } + } + @media (max-width: 720px) { + .new-chat-button { + + top: 5px; + right: 5px; + padding: 4px 8px; /* Smaller padding */ + font-size: 0.8rem; /* Smaller font size */ + } + } + `}),u.jsxs(et,{sx:{maxWidth:"100%",mx:"auto",my:2,display:"flex",flexDirection:"column",height:"91vh",borderRadius:2,boxShadow:1},children:[u.jsxs(id,{sx:{display:"flex",flexDirection:"column",height:"100%",borderRadius:2,boxShadow:3},children:[u.jsxs(Cm,{sx:{flexGrow:1,overflow:"auto",padding:3,position:"relative"},children:[u.jsxs(et,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",position:"relative",marginBottom:"5px"},children:[u.jsx(Ln,{title:"Toggle voice responses",children:u.jsx(lt,{color:"inherit",onClick:ee,sx:{padding:0},children:u.jsx(d2,{checked:t,onChange:j=>n(j.target.checked),icon:u.jsx(Cs,{}),checkedIcon:u.jsx(Ss,{}),inputProps:{"aria-label":"Voice response toggle"},color:"default",sx:{height:42,"& .MuiSwitch-switchBase":{padding:"9px"},"& .MuiSwitch-switchBase.Mui-checked":{color:"white",transform:"translateX(16px)","& + .MuiSwitch-track":{backgroundColor:"primary.main"}}}})})}),u.jsx(Ln,{title:"Start a new chat",placement:"top",arrow:!0,children:u.jsx(lt,{"aria-label":"new chat",color:"primary",onClick:B,disabled:g,sx:{"&:hover":{backgroundColor:"primary.main",color:"common.white"}},children:u.jsx(Um,{})})})]}),u.jsx(Wi,{sx:{marginBottom:"10px"}}),b.length===0&&u.jsxs(et,{sx:{display:"flex",marginBottom:2,marginTop:3},children:[u.jsx(Er,{src:Pi,sx:{width:44,height:44,marginRight:2},alt:"Aria"}),u.jsx(Ie,{variant:"h4",component:"h1",gutterBottom:!0,children:"Welcome to Your Mental Health Companion"})]}),R?u.jsx(AN,{}):d.length===0&&u.jsxs(et,{sx:{display:"flex"},children:[u.jsx(Er,{src:Pi,sx:{width:36,height:36,marginRight:1},alt:"Aria"}),u.jsxs(Ie,{variant:"body1",gutterBottom:!0,sx:{bgcolor:"grey.200",borderRadius:"16px",px:2,py:1,display:"flex",flexDirection:"row",alignItems:"center",flexWrap:"nowrap"},children:[b,t&&b&&u.jsx(lt,{onClick:()=>J(b),size:"small",sx:{ml:1},children:H(b)})]})]}),u.jsx(Ws,{sx:{maxHeight:"100%",overflow:"auto"},children:d.map((j,A)=>u.jsx(_c,{sx:{display:"flex",flexDirection:"column",alignItems:j.sender==="user"?"flex-end":"flex-start",borderRadius:2,mb:.5,p:1,border:"none","&:before":{display:"none"},"&:after":{display:"none"}},children:u.jsxs(et,{sx:{display:"flex",alignItems:"center",color:j.sender==="user"?"common.white":"text.primary",borderRadius:"16px"},children:[j.sender==="agent"&&u.jsx(Er,{src:Pi,sx:{width:36,height:36,mr:1},alt:"Aria"}),u.jsx(ws,{primary:u.jsxs(et,{sx:{display:"flex",flexDirection:"row",alignItems:"center",flexWrap:"nowrap"},children:[j.message,t&&j.sender==="agent"&&u.jsx(lt,{onClick:()=>J(j.message),size:"small",sx:{ml:1},children:H(j.message)})]}),primaryTypographyProps:{sx:{color:j.sender==="user"?"common.white":"text.primary",bgcolor:j.sender==="user"?"primary.main":"grey.200",borderRadius:"16px",px:2,py:1,display:"inline-block"}}}),j.sender==="user"&&u.jsx(Er,{sx:{width:36,height:36,ml:1},children:u.jsx(cd,{})})]})},A))})]}),u.jsx(Wi,{}),u.jsxs(et,{sx:{p:2,pb:1,display:"flex",alignItems:"center",bgcolor:"background.paper"},children:[u.jsx(at,{fullWidth:!0,variant:"outlined",placeholder:"Type your message here...",value:l,onChange:N,disabled:g,sx:{mr:1,flexGrow:1},InputProps:{endAdornment:u.jsx(Ic,{position:"end",children:u.jsxs(lt,{onClick:m?L:T,color:"primary.main","aria-label":m?"Stop recording":"Start recording",size:"large",edge:"end",disabled:g,children:[m?u.jsx(Nm,{size:"small"}):u.jsx(Lm,{size:"small"}),m&&u.jsx(_n,{size:30,sx:{color:"primary.main",position:"absolute",zIndex:1}})]})})}}),g?u.jsx(_n,{size:24}):u.jsx(Rt,{variant:"contained",color:"primary",onClick:$,disabled:g||!l.trim(),endIcon:u.jsx(oa,{}),children:"Send"})]})]}),u.jsx(yo,{open:P,autoHideDuration:6e3,onClose:I,children:u.jsx(xr,{elevation:6,variant:"filled",onClose:I,severity:F,children:D})})]})]})};var Wm={},DN=Te;Object.defineProperty(Wm,"__esModule",{value:!0});var p2=Wm.default=void 0,zN=DN(Me()),BN=u;p2=Wm.default=(0,zN.default)((0,BN.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2M9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9zm9 14H6V10h12zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2"}),"LockOutlined");var Vm={},FN=Te;Object.defineProperty(Vm,"__esModule",{value:!0});var h2=Vm.default=void 0,UN=FN(Me()),WN=u;h2=Vm.default=(0,UN.default)((0,WN.jsx)("path",{d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonAdd");var Hm={},VN=Te;Object.defineProperty(Hm,"__esModule",{value:!0});var Ac=Hm.default=void 0,HN=VN(Me()),qN=u;Ac=Hm.default=(0,HN.default)((0,qN.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff");const Ry=Ht(u.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),Py=Ht(u.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff");var qm={},GN=Te;Object.defineProperty(qm,"__esModule",{value:!0});var Gm=qm.default=void 0,KN=GN(Me()),YN=u;Gm=qm.default=(0,KN.default)((0,YN.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");const sf=zs({palette:{primary:{main:"#556cd6"},secondary:{main:"#19857b"},background:{default:"linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)",paper:"#fff"}},typography:{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',h5:{fontWeight:600,color:"#444"},button:{textTransform:"none",fontWeight:"bold"}},components:{MuiButton:{styleOverrides:{root:{margin:"8px"}}}}}),XN=ie(En)(({theme:e})=>({marginTop:e.spacing(12),display:"flex",flexDirection:"column",alignItems:"center",padding:e.spacing(4),borderRadius:e.shape.borderRadius,boxShadow:e.shadows[10],width:"90%",maxWidth:"450px",opacity:.98,backdropFilter:"blur(10px)"}));function QN(){const e=qo(),[t,n]=p.useState(!1),{setUser:r}=p.useContext(vr),[o,i]=p.useState(0),[a,s]=p.useState(""),[l,c]=p.useState(""),[d,f]=p.useState(!1),[m,w]=p.useState(""),[y,x]=p.useState(!1),[k,g]=p.useState(""),[h,b]=p.useState(""),[C,R]=p.useState(""),[E,P]=p.useState(""),[M,D]=p.useState(""),[O,F]=p.useState(!1),[V,U]=p.useState(!1),[q,ee]=p.useState(""),[J,re]=p.useState("info"),I=[{id:"job_search",name:"Stress from job search"},{id:"classwork",name:"Stress from classwork"},{id:"social_anxiety",name:"Social anxiety"},{id:"impostor_syndrome",name:"Impostor Syndrome"},{id:"career_drift",name:"Career Drift"}],[B,$]=p.useState([]),v=A=>{const G=A.target.value,Y=B.includes(G)?B.filter(K=>K!==G):[...B,G];$(Y)},T=async A=>{var G,Y;A.preventDefault(),F(!0);try{const K=await Oe.post("/api/user/login",{username:a,password:m});if(K&&K.data){const oe=K.data.userId;localStorage.setItem("token",K.data.access_token),console.log("Token stored:",localStorage.getItem("token")),ee("Login successful!"),re("success"),n(!0),r({userId:oe}),e("/"),console.log("User logged in:",oe)}else throw new Error("Invalid response from server")}catch(K){console.error("Login failed:",K),ee("Login failed: "+(((Y=(G=K.response)==null?void 0:G.data)==null?void 0:Y.msg)||"Unknown error")),re("error"),f(!0)}U(!0),F(!1)},L=async A=>{var G,Y;A.preventDefault(),F(!0);try{const K=await Oe.post("/api/user/signup",{username:a,email:l,password:m,name:k,age:h,gender:C,placeOfResidence:E,fieldOfWork:M,mental_health_concerns:B});if(K&&K.data){const oe=K.data.userId;localStorage.setItem("token",K.data.access_token),console.log("Token stored:",localStorage.getItem("token")),ee("User registered successfully!"),re("success"),n(!0),r({userId:oe}),e("/"),console.log("User registered:",oe)}else throw new Error("Invalid response from server")}catch(K){console.error("Signup failed:",K),ee(((Y=(G=K.response)==null?void 0:G.data)==null?void 0:Y.error)||"Failed to register user."),re("error")}F(!1),U(!0)},_=async A=>{var G,Y;A.preventDefault(),F(!0);try{const K=await Oe.post("/api/user/anonymous_signin");if(K&&K.data)localStorage.setItem("token",K.data.access_token),console.log("Token stored:",localStorage.getItem("token")),ee("Anonymous sign-in successful!"),re("success"),n(!0),r({userId:null}),e("/");else throw new Error("Invalid response from server")}catch(K){console.error("Anonymous sign-in failed:",K),ee("Anonymous sign-in failed: "+(((Y=(G=K.response)==null?void 0:G.data)==null?void 0:Y.msg)||"Unknown error")),re("error")}F(!1),U(!0)},N=(A,G)=>{i(G)},H=(A,G)=>{G!=="clickaway"&&U(!1)},j=()=>{x(!y)};return u.jsxs(lm,{theme:sf,children:[u.jsx(Rm,{}),u.jsx(et,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:sf.palette.background.default},children:u.jsxs(XN,{children:[u.jsxs(f2,{value:o,onChange:N,variant:"fullWidth",centered:!0,indicatorColor:"primary",textColor:"primary",children:[u.jsx(ql,{icon:u.jsx(p2,{}),label:"Login"}),u.jsx(ql,{icon:u.jsx(h2,{}),label:"Sign Up"}),u.jsx(ql,{icon:u.jsx(Ac,{}),label:"Anonymous"})]}),u.jsxs(et,{sx:{mt:3,width:"100%",px:3},children:[o===0&&u.jsxs("form",{onSubmit:T,children:[u.jsx(at,{label:"Username",variant:"outlined",margin:"normal",required:!0,fullWidth:!0,value:a,onChange:A=>s(A.target.value)}),u.jsx(at,{label:"Password",type:y?"text":"password",variant:"outlined",margin:"normal",required:!0,fullWidth:!0,value:m,onChange:A=>w(A.target.value),InputProps:{endAdornment:u.jsx(lt,{onClick:j,edge:"end",children:y?u.jsx(Py,{}):u.jsx(Ry,{})})}}),u.jsxs(Rt,{type:"submit",variant:"contained",color:"primary",fullWidth:!0,sx:{mt:2,maxWidth:"325px"},disabled:O,children:[O?u.jsx(_n,{size:24}):"Login"," "]}),d&&u.jsxs(Ie,{variant:"body2",textAlign:"center",sx:{mt:2},children:["Forgot your password? ",u.jsx(Rb,{to:"/request_reset",style:{textDecoration:"none",color:sf.palette.secondary.main},children:"Reset it here"})]})]}),o===1&&u.jsxs("form",{onSubmit:L,children:[u.jsx(at,{label:"Username",variant:"outlined",margin:"normal",required:!0,fullWidth:!0,value:a,onChange:A=>s(A.target.value)}),u.jsx(at,{label:"Email",type:"email",variant:"outlined",margin:"normal",required:!0,fullWidth:!0,value:l,onChange:A=>c(A.target.value)}),u.jsx(at,{label:"Password",type:y?"text":"password",variant:"outlined",margin:"normal",required:!0,fullWidth:!0,value:m,onChange:A=>w(A.target.value),InputProps:{endAdornment:u.jsx(lt,{onClick:j,edge:"end",children:y?u.jsx(Py,{}):u.jsx(Ry,{})})}}),u.jsx(at,{label:"Name",variant:"outlined",margin:"normal",fullWidth:!0,value:k,onChange:A=>g(A.target.value)}),u.jsx(at,{label:"Age",type:"number",variant:"outlined",margin:"normal",required:!0,fullWidth:!0,value:h,onChange:A=>b(A.target.value)}),u.jsxs(sd,{required:!0,fullWidth:!0,margin:"normal",children:[u.jsx(ld,{children:"Gender"}),u.jsxs(Vs,{value:C,label:"Gender",onChange:A=>R(A.target.value),children:[u.jsx(Zn,{value:"",children:"Select Gender"}),u.jsx(Zn,{value:"male",children:"Male"}),u.jsx(Zn,{value:"female",children:"Female"}),u.jsx(Zn,{value:"other",children:"Other"})]})]}),u.jsx(at,{label:"Place of Residence",variant:"outlined",margin:"normal",fullWidth:!0,value:E,onChange:A=>P(A.target.value)}),u.jsx(at,{label:"Field of Work",variant:"outlined",margin:"normal",fullWidth:!0,value:M,onChange:A=>D(A.target.value)}),u.jsxs(o2,{sx:{marginTop:"10px"},children:[u.jsx(Ie,{variant:"body1",gutterBottom:!0,children:"Select any mental stressors you are currently experiencing to help us better tailor your therapy sessions."}),I.map(A=>u.jsx(Tm,{control:u.jsx(km,{checked:B.includes(A.id),onChange:v,value:A.id}),label:u.jsxs(et,{display:"flex",alignItems:"center",children:[A.name,u.jsx(Ln,{title:u.jsx(Ie,{variant:"body2",children:JN(A.id)}),arrow:!0,placement:"right",children:u.jsx(Gm,{color:"action",style:{marginLeft:4,fontSize:20}})})]})},A.id))]}),u.jsx(Rt,{type:"submit",variant:"contained",color:"primary",fullWidth:!0,sx:{mt:2},disabled:O,children:O?u.jsx(_n,{size:24}):"Sign Up"})]}),o===2&&u.jsx("form",{onSubmit:_,children:u.jsx(Rt,{type:"submit",variant:"outlined",color:"secondary",fullWidth:!0,sx:{mt:2},disabled:O,children:O?u.jsx(_n,{size:24}):"Anonymous Sign-In"})})]}),u.jsx(yo,{open:V,autoHideDuration:6e3,onClose:H,children:u.jsx(xr,{onClose:H,severity:J,sx:{width:"100%"},children:q})})]})})]})}function JN(e){switch(e){case"job_search":return"Feelings of stress stemming from the job search process.";case"classwork":return"Stress related to managing coursework and academic responsibilities.";case"social_anxiety":return"Anxiety experienced during social interactions or in anticipation of social interactions.";case"impostor_syndrome":return"Persistent doubt concerning one's abilities or accomplishments coupled with a fear of being exposed as a fraud.";case"career_drift":return"Stress from uncertainty or dissatisfaction with one's career path or progress.";default:return"No description available."}}var Km={},ZN=Te;Object.defineProperty(Km,"__esModule",{value:!0});var m2=Km.default=void 0,e6=ZN(Me()),t6=u;m2=Km.default=(0,e6.default)((0,t6.jsx)("path",{d:"M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"VpnKey");var Ym={},n6=Te;Object.defineProperty(Ym,"__esModule",{value:!0});var g2=Ym.default=void 0,r6=n6(Me()),o6=u;g2=Ym.default=(0,r6.default)((0,o6.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock");const Ey=zs({palette:{primary:{main:"#3F51B5"},secondary:{main:"#F6AE2D"}}}),i6=()=>{const{changePassword:e}=p.useContext(vr),[t,n]=p.useState(""),[r,o]=p.useState(""),[i,a]=p.useState(!1),[s,l]=p.useState(""),[c,d]=p.useState("success"),{userId:f}=Ms(),m=async w=>{w.preventDefault();const y=await e(f,t,r);l(y.message),d(y.success?"success":"error"),a(!0)};return u.jsx(lm,{theme:Ey,children:u.jsx(Zw,{component:"main",maxWidth:"xs",sx:{background:"#fff",borderRadius:"8px",boxShadow:"0px 2px 4px rgba(0,0,0,0.2)"},children:u.jsxs(et,{sx:{marginTop:8,display:"flex",flexDirection:"column",alignItems:"center"},children:[u.jsx(Ie,{component:"h1",variant:"h5",children:"Update Password"}),u.jsxs("form",{onSubmit:m,style:{width:"100%",marginTop:Ey.spacing(1)},children:[u.jsx(at,{variant:"outlined",margin:"normal",required:!0,fullWidth:!0,id:"current-password",label:"Current Password",name:"currentPassword",autoComplete:"current-password",type:"password",value:t,onChange:w=>n(w.target.value),InputProps:{startAdornment:u.jsx(g2,{color:"primary",style:{marginRight:"10px"}})}}),u.jsx(at,{variant:"outlined",margin:"normal",required:!0,fullWidth:!0,id:"new-password",label:"New Password",name:"newPassword",autoComplete:"new-password",type:"password",value:r,onChange:w=>o(w.target.value),InputProps:{startAdornment:u.jsx(m2,{color:"secondary",style:{marginRight:"10px"}})}}),u.jsx(Rt,{type:"submit",fullWidth:!0,variant:"contained",color:"primary",sx:{mt:3,mb:2},children:"Update Password"})]}),u.jsx(yo,{open:i,autoHideDuration:6e3,onClose:()=>a(!1),children:u.jsx(xr,{onClose:()=>a(!1),severity:c,sx:{width:"100%"},children:s})})]})})})};var Xm={},a6=Te;Object.defineProperty(Xm,"__esModule",{value:!0});var v2=Xm.default=void 0,s6=a6(Me()),l6=u;v2=Xm.default=(0,s6.default)((0,l6.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4-8 5-8-5V6l8 5 8-5z"}),"Email");var Qm={},c6=Te;Object.defineProperty(Qm,"__esModule",{value:!0});var y2=Qm.default=void 0,u6=c6(Me()),d6=u;y2=Qm.default=(0,u6.default)((0,d6.jsx)("path",{d:"M12 6c1.11 0 2-.9 2-2 0-.38-.1-.73-.29-1.03L12 0l-1.71 2.97c-.19.3-.29.65-.29 1.03 0 1.1.9 2 2 2m4.6 9.99-1.07-1.07-1.08 1.07c-1.3 1.3-3.58 1.31-4.89 0l-1.07-1.07-1.09 1.07C6.75 16.64 5.88 17 4.96 17c-.73 0-1.4-.23-1.96-.61V21c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-4.61c-.56.38-1.23.61-1.96.61-.92 0-1.79-.36-2.44-1.01M18 9h-5V7h-2v2H6c-1.66 0-3 1.34-3 3v1.54c0 1.08.88 1.96 1.96 1.96.52 0 1.02-.2 1.38-.57l2.14-2.13 2.13 2.13c.74.74 2.03.74 2.77 0l2.14-2.13 2.13 2.13c.37.37.86.57 1.38.57 1.08 0 1.96-.88 1.96-1.96V12C21 10.34 19.66 9 18 9"}),"Cake");var Jm={},f6=Te;Object.defineProperty(Jm,"__esModule",{value:!0});var x2=Jm.default=void 0,p6=f6(Me()),h6=u;x2=Jm.default=(0,p6.default)((0,h6.jsx)("path",{d:"M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2m9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2"}),"Wc");var Zm={},m6=Te;Object.defineProperty(Zm,"__esModule",{value:!0});var b2=Zm.default=void 0,g6=m6(Me()),v6=u;b2=Zm.default=(0,g6.default)((0,v6.jsx)("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home");var eg={},y6=Te;Object.defineProperty(eg,"__esModule",{value:!0});var w2=eg.default=void 0,x6=y6(Me()),b6=u;w2=eg.default=(0,x6.default)((0,b6.jsx)("path",{d:"M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2m-6 0h-4V4h4z"}),"Work");var tg={},w6=Te;Object.defineProperty(tg,"__esModule",{value:!0});var ng=tg.default=void 0,S6=w6(Me()),C6=u;ng=tg.default=(0,S6.default)((0,C6.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20"}),"AccountCircle");var rg={},k6=Te;Object.defineProperty(rg,"__esModule",{value:!0});var S2=rg.default=void 0,R6=k6(Me()),P6=u;S2=rg.default=(0,R6.default)((0,P6.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");const E6=ie(f2)({background:"#fff",borderRadius:"8px",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",margin:"20px 0",maxWidth:"100%",overflow:"hidden"}),Ty=ie(ql)({fontSize:"1rem",fontWeight:"bold",color:"#3F51B5",marginRight:"4px",marginLeft:"4px",flex:1,maxWidth:"none","&.Mui-selected":{color:"#F6AE2D",background:"#e0e0e0"},"&:hover":{background:"#f4f4f4",transition:"background-color 0.3s"},"@media (max-width: 720px)":{padding:"6px 12px",fontSize:"0.8rem"}}),T6=zs({palette:{primary:{main:"#3F51B5"},secondary:{main:"#F6AE2D"},background:{default:"#e0e0e0"}},typography:{fontFamily:'"Open Sans", "Helvetica", "Arial", sans-serif',button:{textTransform:"none",fontWeight:"bold"}},components:{MuiButton:{styleOverrides:{root:{boxShadow:"none",borderRadius:8,"&:hover":{boxShadow:"0px 2px 4px rgba(0,0,0,0.2)"}}}},MuiPaper:{styleOverrides:{root:{padding:"20px",borderRadius:"10px",boxShadow:"0px 4px 12px rgba(0,0,0,0.1)"}}}}}),$6=ie(En)(({theme:e})=>({marginTop:e.spacing(2),padding:e.spacing(2),display:"flex",flexDirection:"column",alignItems:"center",gap:e.spacing(2),boxShadow:e.shadows[3]}));function j6(){const{userId:e}=Ms(),[t,n]=p.useState({username:"",name:"",email:"",age:"",gender:"",placeOfResidence:"",fieldOfWork:"",mental_health_concerns:[]}),[r,o]=p.useState(0),i=(g,h)=>{o(h)},[a,s]=p.useState(""),[l,c]=p.useState(!1),[d,f]=p.useState("info");p.useEffect(()=>{if(!e){console.error("User ID is undefined");return}(async()=>{try{const h=await Oe.get(`/api/user/profile/${e}`);console.log("Fetched data:",h.data);const b={username:h.data.username||"",name:h.data.name||"",email:h.data.email||"",age:h.data.age||"",gender:h.data.gender||"",placeOfResidence:h.data.placeOfResidence||"Not specified",fieldOfWork:h.data.fieldOfWork||"Not specified",mental_health_concerns:h.data.mental_health_concerns||[]};console.log("Formatted data:",b),n(b)}catch{s("Failed to fetch user data"),f("error"),c(!0)}})()},[e]);const m=[{label:"Stress from Job Search",value:"job_search"},{label:"Stress from Classwork",value:"classwork"},{label:"Social Anxiety",value:"social_anxiety"},{label:"Impostor Syndrome",value:"impostor_syndrome"},{label:"Career Drift",value:"career_drift"}];console.log("current mental health concerns: ",t.mental_health_concerns);const w=g=>{const{name:h,checked:b}=g.target;n(C=>{const R=b?[...C.mental_health_concerns,h]:C.mental_health_concerns.filter(E=>E!==h);return{...C,mental_health_concerns:R}})},y=g=>{const{name:h,value:b}=g.target;n(C=>({...C,[h]:b}))},x=async g=>{g.preventDefault();try{await Oe.patch(`/api/user/profile/${e}`,t),s("Profile updated successfully!"),f("success")}catch{s("Failed to update profile"),f("error")}c(!0)},k=()=>{c(!1)};return u.jsxs(lm,{theme:T6,children:[u.jsx(Rm,{}),u.jsxs(Zw,{component:"main",maxWidth:"md",children:[u.jsxs(E6,{value:r,onChange:i,centered:!0,children:[u.jsx(Ty,{label:"Profile"}),u.jsx(Ty,{label:"Update Password"})]}),r===0&&u.jsxs($6,{component:"form",onSubmit:x,sx:{maxHeight:"81vh",overflow:"auto"},children:[u.jsxs(Ie,{variant:"h5",style:{fontWeight:700},children:[u.jsx(ng,{style:{marginRight:"10px"}})," ",t.username]}),u.jsx(at,{fullWidth:!0,label:"Name",variant:"outlined",name:"name",value:t.name||"",onChange:y,InputProps:{startAdornment:u.jsx(lt,{position:"start",children:u.jsx(cd,{})})}}),u.jsx(at,{fullWidth:!0,label:"Email",variant:"outlined",name:"email",value:t.email||"",onChange:y,InputProps:{startAdornment:u.jsx(lt,{position:"start",children:u.jsx(v2,{})})}}),u.jsx(at,{fullWidth:!0,label:"Age",variant:"outlined",name:"age",type:"number",value:t.age||"",onChange:y,InputProps:{startAdornment:u.jsx(lt,{children:u.jsx(y2,{})})}}),u.jsxs(sd,{fullWidth:!0,children:[u.jsx(ld,{children:"Gender"}),u.jsxs(Vs,{name:"gender",value:t.gender||"",label:"Gender",onChange:y,startAdornment:u.jsx(lt,{children:u.jsx(x2,{})}),children:[u.jsx(Zn,{value:"male",children:"Male"}),u.jsx(Zn,{value:"female",children:"Female"}),u.jsx(Zn,{value:"other",children:"Other"})]})]}),u.jsx(at,{fullWidth:!0,label:"Place of Residence",variant:"outlined",name:"placeOfResidence",value:t.placeOfResidence||"",onChange:y,InputProps:{startAdornment:u.jsx(lt,{children:u.jsx(b2,{})})}}),u.jsx(at,{fullWidth:!0,label:"Field of Work",variant:"outlined",name:"fieldOfWork",value:t.fieldOfWork||"",onChange:y,InputProps:{startAdornment:u.jsx(lt,{position:"start",children:u.jsx(w2,{})})}}),u.jsx(o2,{children:m.map((g,h)=>(console.log(`Is "${g.label}" checked?`,t.mental_health_concerns.includes(g.value)),u.jsx(Tm,{control:u.jsx(km,{checked:t.mental_health_concerns.includes(g.value),onChange:w,name:g.value}),label:u.jsxs(et,{display:"flex",alignItems:"center",children:[g.label,u.jsx(Ln,{title:u.jsx(Ie,{variant:"body2",children:M6(g.value)}),arrow:!0,placement:"right",children:u.jsx(Gm,{color:"action",style:{marginLeft:4,fontSize:20}})})]})},h)))}),u.jsxs(Rt,{type:"submit",color:"primary",variant:"contained",children:[u.jsx(S2,{style:{marginRight:"10px"}}),"Update Profile"]})]}),r===1&&u.jsx(i6,{userId:e}),u.jsx(yo,{open:l,autoHideDuration:6e3,onClose:k,children:u.jsx(xr,{onClose:k,severity:d,sx:{width:"100%"},children:a})})]})]})}function M6(e){switch(e){case"job_search":return"Feelings of stress stemming from the job search process.";case"classwork":return"Stress related to managing coursework and academic responsibilities.";case"social_anxiety":return"Anxiety experienced during social interactions or in anticipation of social interactions.";case"impostor_syndrome":return"Persistent doubt concerning one's abilities or accomplishments coupled with a fear of being exposed as a fraud.";case"career_drift":return"Stress from uncertainty or dissatisfaction with one's career path or progress.";default:return"No description available."}}var og={},O6=Te;Object.defineProperty(og,"__esModule",{value:!0});var C2=og.default=void 0,I6=O6(Me()),$y=u;C2=og.default=(0,I6.default)([(0,$y.jsx)("path",{d:"M22 9 12 2 2 9h9v13h2V9z"},"0"),(0,$y.jsx)("path",{d:"m4.14 12-1.96.37.82 4.37V22h2l.02-4H7v4h2v-6H4.9zm14.96 4H15v6h2v-4h1.98l.02 4h2v-5.26l.82-4.37-1.96-.37z"},"1")],"Deck");var ig={},_6=Te;Object.defineProperty(ig,"__esModule",{value:!0});var k2=ig.default=void 0,L6=_6(Me()),A6=u;k2=ig.default=(0,L6.default)((0,A6.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5m-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11m3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5"}),"InsertEmoticon");var ag={},N6=Te;Object.defineProperty(ag,"__esModule",{value:!0});var sg=ag.default=void 0,D6=N6(Me()),z6=u;sg=ag.default=(0,D6.default)((0,z6.jsx)("path",{d:"M19 5v14H5V5zm1.1-2H3.9c-.5 0-.9.4-.9.9v16.2c0 .4.4.9.9.9h16.2c.4 0 .9-.5.9-.9V3.9c0-.5-.5-.9-.9-.9M11 7h6v2h-6zm0 4h6v2h-6zm0 4h6v2h-6zM7 7h2v2H7zm0 4h2v2H7zm0 4h2v2H7z"}),"ListAlt");var lg={},B6=Te;Object.defineProperty(lg,"__esModule",{value:!0});var R2=lg.default=void 0,F6=B6(Me()),U6=u;R2=lg.default=(0,F6.default)((0,U6.jsx)("path",{d:"M10.09 15.59 11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"}),"ExitToApp");var cg={},W6=Te;Object.defineProperty(cg,"__esModule",{value:!0});var P2=cg.default=void 0,V6=W6(Me()),H6=u;P2=cg.default=(0,V6.default)((0,H6.jsx)("path",{d:"M16.53 11.06 15.47 10l-4.88 4.88-2.12-2.12-1.06 1.06L10.59 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V8h14z"}),"EventAvailable");var ug={},q6=Te;Object.defineProperty(ug,"__esModule",{value:!0});var E2=ug.default=void 0,G6=q6(Me()),jy=u;E2=ug.default=(0,G6.default)([(0,jy.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,jy.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"Schedule");var dg={},K6=Te;Object.defineProperty(dg,"__esModule",{value:!0});var T2=dg.default=void 0,Y6=K6(Me()),X6=u;T2=dg.default=(0,Y6.default)((0,X6.jsx)("path",{d:"m22.69 18.37 1.14-1-1-1.73-1.45.49c-.32-.27-.68-.48-1.08-.63L20 14h-2l-.3 1.49c-.4.15-.76.36-1.08.63l-1.45-.49-1 1.73 1.14 1c-.08.5-.08.76 0 1.26l-1.14 1 1 1.73 1.45-.49c.32.27.68.48 1.08.63L18 24h2l.3-1.49c.4-.15.76-.36 1.08-.63l1.45.49 1-1.73-1.14-1c.08-.51.08-.77 0-1.27M19 21c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2M11 7v5.41l2.36 2.36 1.04-1.79-1.4-1.39V7zm10 5c0-4.97-4.03-9-9-9-2.83 0-5.35 1.32-7 3.36V4H3v6h6V8H6.26C7.53 6.19 9.63 5 12 5c3.86 0 7 3.14 7 7zm-10.14 6.91c-2.99-.49-5.35-2.9-5.78-5.91H3.06c.5 4.5 4.31 8 8.94 8h.07z"}),"ManageHistory");const My=230;function Q6(){const{logout:e,user:t}=p.useContext(vr),n=ho(),r=i=>n.pathname===i,o=[{text:"Mind Chat",icon:u.jsx(C2,{}),path:"/"},...t!=null&&t.userId?[{text:"Track Your Vibes",icon:u.jsx(k2,{}),path:"/user/mood_logging"},{text:"Mood Logs",icon:u.jsx(sg,{}),path:"/user/mood_logs"},{text:"Schedule Check-In",icon:u.jsx(E2,{}),path:"/user/check_in"},{text:"Check-In Reporting",icon:u.jsx(P2,{}),path:`/user/check_ins/${t==null?void 0:t.userId}`},{text:"Chat Log Manager",icon:u.jsx(T2,{}),path:"/user/chat_log_Manager"}]:[]];return u.jsx(UI,{sx:{width:My,flexShrink:0,mt:8,"& .MuiDrawer-paper":{width:My,boxSizing:"border-box",position:"relative",height:"91vh",top:0,overflowX:"hidden",borderRadius:2,boxShadow:1}},variant:"permanent",anchor:"left",children:u.jsxs(Ws,{children:[o.map(i=>u.jsx(VP,{to:i.path,style:{textDecoration:"none",color:"inherit"},children:u.jsxs(_c,{button:!0,sx:{backgroundColor:r(i.path)?"rgba(25, 118, 210, 0.5)":"inherit","&:hover":{bgcolor:"grey.200"}},children:[u.jsx(dy,{children:i.icon}),u.jsx(ws,{primary:i.text})]})},i.text)),u.jsxs(_c,{button:!0,onClick:e,children:[u.jsx(dy,{children:u.jsx(R2,{})}),u.jsx(ws,{primary:"Logout"})]})]})})}var fg={},J6=Te;Object.defineProperty(fg,"__esModule",{value:!0});var $2=fg.default=void 0,Z6=J6(Me()),eD=u;$2=fg.default=(0,Z6.default)((0,eD.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");var pg={},tD=Te;Object.defineProperty(pg,"__esModule",{value:!0});var j2=pg.default=void 0,nD=tD(Me()),rD=u;j2=pg.default=(0,nD.default)((0,rD.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2m6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1z"}),"Notifications");var hg={},oD=Te;Object.defineProperty(hg,"__esModule",{value:!0});var M2=hg.default=void 0,iD=oD(Me()),aD=u;M2=hg.default=(0,iD.default)((0,aD.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel");function sD({toggleSidebar:e}){const{incrementNotificationCount:t,notifications:n,addNotification:r,removeNotification:o}=p.useContext(vr),i=qo(),{user:a}=p.useContext(vr),[s,l]=p.useState(null),c=localStorage.getItem("token"),d=a==null?void 0:a.userId;console.log("User ID:",d),p.useEffect(()=>{d?f():console.error("No user ID available from URL parameters.")},[d]);const f=async()=>{if(!d){console.error("User ID is missing in context");return}try{const k=(await Oe.get(`/api/check-in/missed?user_id=${d}`,{headers:{Authorization:`Bearer ${c}`}})).data;console.log("Missed check-ins:",k),k.length>0?k.forEach(g=>{r({title:`Missed Check-in on ${new Date(g.check_in_time).toLocaleString()}`,message:"Please complete your check-in."})}):r({title:"You have no missed check-ins.",message:""})}catch(x){console.error("Failed to fetch missed check-ins:",x),r({title:"Failed to fetch missed check-ins. Please check the console for more details.",message:""})}},m=x=>{l(x.currentTarget)},w=x=>{l(null),o(x)},y=()=>{a&&a.userId?i(`/user/profile/${a.userId}`):console.error("User ID not found")};return p.useEffect(()=>{const x=k=>{k.data&&k.data.msg==="updateCount"&&(console.log("Received message from service worker:",k.data),r({title:k.data.title,message:k.data.body}),t())};return navigator.serviceWorker.addEventListener("message",x),()=>{navigator.serviceWorker.removeEventListener("message",x)}},[]),u.jsx(kj,{position:"fixed",sx:{zIndex:x=>x.zIndex.drawer+1},children:u.jsxs(BA,{children:[u.jsx(lt,{onClick:e,color:"inherit",edge:"start",sx:{marginRight:2},children:u.jsx($2,{})}),u.jsx(Ie,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1},children:"Dashboard"}),(a==null?void 0:a.userId)&&u.jsx(lt,{color:"inherit",onClick:m,children:u.jsx(i3,{badgeContent:n.length,color:"secondary",children:u.jsx(j2,{})})}),u.jsx(l2,{anchorEl:s,open:!!s,onClose:()=>w(null),children:n.map((x,k)=>u.jsx(Zn,{onClick:()=>w(k),sx:{whiteSpace:"normal",maxWidth:350,padding:1},children:u.jsxs(id,{elevation:2,sx:{display:"flex",alignItems:"center",width:"100%"},children:[u.jsx(M2,{color:"error"}),u.jsxs(Cm,{sx:{flex:"1 1 auto"},children:[u.jsx(Ie,{variant:"subtitle1",sx:{fontWeight:"bold"},children:x.title}),u.jsx(Ie,{variant:"body2",color:"text.secondary",children:x.message})]})]})},k))}),(a==null?void 0:a.userId)&&u.jsx(lt,{color:"inherit",onClick:y,children:u.jsx(ng,{})})]})})}var mg={},lD=Te;Object.defineProperty(mg,"__esModule",{value:!0});var O2=mg.default=void 0,cD=lD(Me()),uD=u;O2=mg.default=(0,cD.default)((0,uD.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M17 13l-5 5-5-5h3V9h4v4z"}),"CloudDownload");var gg={},dD=Te;Object.defineProperty(gg,"__esModule",{value:!0});var _p=gg.default=void 0,fD=dD(Me()),pD=u;_p=gg.default=(0,fD.default)((0,pD.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zm2.46-7.12 1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"DeleteForever");var vg={},hD=Te;Object.defineProperty(vg,"__esModule",{value:!0});var I2=vg.default=void 0,mD=hD(Me()),gD=u;I2=vg.default=(0,mD.default)((0,gD.jsx)("path",{d:"M9 11H7v2h2zm4 0h-2v2h2zm4 0h-2v2h2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V9h14z"}),"DateRange");const vD=ie(En)(({theme:e})=>({padding:e.spacing(3),borderRadius:e.shape.borderRadius,boxShadow:1,maxWidth:"100%",margin:"auto",marginTop:e.spacing(2),backgroundColor:"#fff",overflow:"auto"})),Cl=ie(Rt)(({theme:e})=>({margin:e.spacing(0),paddingLeft:e.spacing(1),paddingRight:e.spacing(3)}));function yD(){const[e,t]=nn.useState(!1),[n,r]=p.useState(!1),[o,i]=nn.useState(""),[a,s]=nn.useState("info"),[l,c]=p.useState(!1),[d,f]=p.useState(""),[m,w]=p.useState(""),[y,x]=p.useState(!1),k=(R,E)=>{E!=="clickaway"&&t(!1)},g=()=>{r(!1)},h=R=>{x(R),r(!0)},b=async(R=!1)=>{var E,P;c(!0);try{const M=R?"/api/user/download_chat_logs/range":"/api/user/download_chat_logs",D=R?{params:{start_date:d,end_date:m}}:{},O=await Oe.get(M,{...D,headers:{Authorization:`Bearer ${localStorage.getItem("token")}`},responseType:"blob"}),F=window.URL.createObjectURL(new Blob([O.data])),V=document.createElement("a");V.href=F,V.setAttribute("download",R?"chat_logs_range.csv":"chat_logs.csv"),document.body.appendChild(V),V.click(),i("Chat logs downloaded successfully."),s("success")}catch(M){i(`Failed to download chat logs: ${((P=(E=M.response)==null?void 0:E.data)==null?void 0:P.error)||M.message}`),s("error")}finally{c(!1)}t(!0)},C=async()=>{var R,E;r(!1),c(!0);try{const P=y?"/api/user/delete_chat_logs/range":"/api/user/delete_chat_logs",M=y?{params:{start_date:d,end_date:m}}:{},D=await Oe.delete(P,{...M,headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});i(D.data.message),s("success")}catch(P){i(`Failed to delete chat logs: ${((E=(R=P.response)==null?void 0:R.data)==null?void 0:E.error)||P.message}`),s("error")}finally{c(!1)}t(!0)};return u.jsxs(vD,{sx:{height:"91vh"},children:[u.jsx(Ie,{variant:"h4",gutterBottom:!0,children:"Manage Your Chat Logs"}),u.jsx(Ie,{variant:"body1",paragraph:!0,children:"Manage your chat logs efficiently by downloading or deleting entries for specific dates or entire ranges. Please be cautious as deletion is permanent."}),u.jsxs("div",{style:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",gap:20},children:[u.jsxs("div",{style:{display:"flex",gap:10,marginBottom:20},children:[u.jsx(at,{label:"Start Date",type:"date",value:d,onChange:R=>f(R.target.value),InputLabelProps:{shrink:!0}}),u.jsx(at,{label:"End Date",type:"date",value:m,onChange:R=>w(R.target.value),InputLabelProps:{shrink:!0}})]}),u.jsx(Ie,{variant:"body1",paragraph:!0,children:"Here you can download your chat logs as a CSV file, which includes details like chat IDs, content, type, and additional information for each session."}),u.jsx(Ln,{title:"Download chat logs for selected date range",children:u.jsx(Cl,{variant:"outlined",startIcon:u.jsx(I2,{}),onClick:()=>b(!0),disabled:l||!d||!m,children:l?u.jsx(_n,{size:24,color:"inherit"}):"Download Range"})}),u.jsx(Ln,{title:"Download your chat logs as a CSV file",children:u.jsx(Cl,{variant:"contained",color:"primary",startIcon:u.jsx(O2,{}),onClick:()=>b(!1),disabled:l,children:l?u.jsx(_n,{size:24,color:"inherit"}):"Download Chat Logs"})}),u.jsx(Ie,{variant:"body1",paragraph:!0,children:"If you need to clear your history for privacy or other reasons, you can also permanently delete your chat logs from the server."}),u.jsx(Ln,{title:"Delete chat logs for selected date range",children:u.jsx(Cl,{variant:"outlined",color:"warning",startIcon:u.jsx(_p,{}),onClick:()=>h(!0),disabled:l||!d||!m,children:l?u.jsx(_n,{size:24,color:"inherit"}):"Delete Range"})}),u.jsx(Ln,{title:"Permanently delete all your chat logs",children:u.jsx(Cl,{variant:"contained",color:"secondary",startIcon:u.jsx(_p,{}),onClick:()=>h(!1),disabled:l,children:l?u.jsx(_n,{size:24,color:"inherit"}):"Delete Chat Logs"})}),u.jsx(Ie,{variant:"body1",paragraph:!0,children:"Please use these options carefully as deleting your chat logs is irreversible."})]}),u.jsxs($p,{open:n,onClose:g,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[u.jsx(Op,{id:"alert-dialog-title",children:"Confirm Deletion"}),u.jsx(Mp,{children:u.jsx(t2,{id:"alert-dialog-description",children:"Are you sure you want to delete these chat logs? This action cannot be undone."})}),u.jsxs(jp,{children:[u.jsx(Rt,{onClick:g,color:"primary",children:"Cancel"}),u.jsx(Rt,{onClick:()=>C(),color:"secondary",autoFocus:!0,children:"Confirm"})]})]}),u.jsx(yo,{open:e,autoHideDuration:6e3,onClose:k,children:u.jsx(xr,{onClose:k,severity:a,sx:{width:"100%"},children:o})})]})}const Oy=()=>{const{user:e,voiceEnabled:t,setVoiceEnabled:n}=p.useContext(vr),r=e==null?void 0:e.userId,[o,i]=p.useState(0),[a,s]=p.useState(0),[l,c]=p.useState(""),[d,f]=p.useState([]),[m,w]=p.useState(!1),[y,x]=p.useState(null),k=p.useRef([]),[g,h]=p.useState(!1),[b,C]=p.useState(!1),[R,E]=p.useState(""),[P,M]=p.useState("info"),[D,O]=p.useState(null),F=T=>{T.preventDefault(),n(!t)},V=T=>{if(!t||T===D){O(null),window.speechSynthesis.cancel();return}const L=window.speechSynthesis,_=new SpeechSynthesisUtterance(T),N=()=>{const H=L.getVoices();console.log(H.map(A=>`${A.name} - ${A.lang} - ${A.gender}`));const j=H.find(A=>A.name.includes("Microsoft Zira - English (United States)"));j?_.voice=j:console.log("No female voice found"),_.onend=()=>{O(null)},O(T),L.speak(_)};L.getVoices().length===0?L.onvoiceschanged=N:N()},U=(T,L)=>{L!=="clickaway"&&C(!1)},q=p.useCallback(async()=>{if(o!==null){h(!0);try{const T=await fetch(`/api/ai/mental_health/finalize/${r}/${o}`,{method:"POST",headers:{"Content-Type":"application/json"}}),L=await T.json();T.ok?(E("Chat finalized successfully"),M("success"),i(null),s(0),f([])):(E("Failed to finalize chat"),M("error"))}catch{E("Error finalizing chat"),M("error")}finally{h(!1),C(!0)}}},[r,o]),ee=p.useCallback(async()=>{if(l.trim()){console.log(o),h(!0);try{const T=JSON.stringify({prompt:l,turn_id:a}),L=await fetch(`/api/ai/mental_health/${r}/${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:T}),_=await L.json();console.log(_),L.ok?(f(N=>[...N,{message:l,sender:"user"},{message:_,sender:"agent"}]),s(N=>N+1),c("")):(console.error("Failed to send message:",_),E(_.error||"An error occurred while sending the message."),M("error"),C(!0))}catch(T){console.error("Failed to send message:",T),E("Network or server error occurred."),M("error"),C(!0)}finally{h(!1)}}},[l,r,o,a]),J=()=>MediaRecorder.isTypeSupported("audio/webm; codecs=opus")?"audio/webm; codecs=opus":MediaRecorder.isTypeSupported("audio/mp4")?"audio/mp4":"audio/wav",re=()=>{navigator.mediaDevices.getUserMedia({audio:{sampleRate:44100,channelCount:1,volume:1,echoCancellation:!0}}).then(T=>{k.current=[];const L=J();let _=new MediaRecorder(T,{mimeType:L});_.ondataavailable=N=>{k.current.push(N.data)},_.start(),x(_),w(!0)}).catch(T=>{console.error("Error accessing microphone:",T)})},I=()=>{y&&(y.stream.getTracks().forEach(T=>T.stop()),y.onstop=()=>{const T=y.mimeType,L=new Blob(k.current,{type:T});B(L),w(!1),x(null)},y.stop())},B=T=>{if(T.size===0){console.error("Audio Blob is empty");return}const L=new FormData;L.append("audio",T),h(!0),Oe.post("/api/ai/mental_health/voice-to-text",L,{headers:{"Content-Type":"multipart/form-data"}}).then(_=>{const{message:N}=_.data;c(N),ee()}).catch(_=>{console.error("Error uploading audio:",_)}).finally(()=>{h(!1)})},$=p.useCallback(T=>{const L=T.target.value;L.split(/\s+/).length>200?(c(N=>N.split(/\s+/).slice(0,200).join(" ")),E("Word limit reached. Only 200 words allowed."),M("warning"),C(!0)):c(L)},[]),v=T=>T===D?u.jsx(Cs,{}):u.jsx(Ss,{});return u.jsxs(u.Fragment,{children:[u.jsx("style",{children:` + @keyframes blink { + 0%, 100% { opacity: 0; } + 50% { opacity: 1; } + } + @media (max-width: 720px) { + .new-chat-button { + + top: 5px; + right: 5px; + padding: 4px 8px; /* Smaller padding */ + font-size: 0.8rem; /* Smaller font size */ + } + } + `}),u.jsxs(et,{sx:{maxWidth:"100%",mx:"auto",my:2,display:"flex",flexDirection:"column",height:"91vh",borderRadius:2,boxShadow:1},children:[u.jsxs(id,{sx:{display:"flex",flexDirection:"column",height:"100%",borderRadius:2,boxShadow:3},children:[u.jsxs(Cm,{sx:{flexGrow:1,overflow:"auto",padding:3,position:"relative"},children:[u.jsxs(et,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",position:"relative",marginBottom:"5px"},children:[u.jsx(Ln,{title:"Toggle voice responses",children:u.jsx(lt,{color:"inherit",onClick:F,sx:{padding:0},children:u.jsx(d2,{checked:t,onChange:T=>n(T.target.checked),icon:u.jsx(Cs,{}),checkedIcon:u.jsx(Ss,{}),inputProps:{"aria-label":"Voice response toggle"},color:"default",sx:{height:42,"& .MuiSwitch-switchBase":{padding:"9px"},"& .MuiSwitch-switchBase.Mui-checked":{color:"white",transform:"translateX(16px)","& + .MuiSwitch-track":{backgroundColor:"primary.main"}}}})})}),u.jsx(Ln,{title:"Start a new chat",placement:"top",arrow:!0,children:u.jsx(lt,{"aria-label":"new chat",color:"primary",onClick:q,disabled:g,sx:{"&:hover":{backgroundColor:"primary.main",color:"common.white"}},children:u.jsx(Um,{})})})]}),u.jsx(Wi,{sx:{marginBottom:"10px"}}),d.length===0&&u.jsxs(et,{sx:{display:"flex",marginBottom:2,marginTop:3},children:[u.jsx(Er,{src:Pi,sx:{width:44,height:44,marginRight:2},alt:"Aria"}),u.jsx(Ie,{variant:"h4",component:"h1",gutterBottom:!0,children:"Welcome to Your Mental Health Companion"})]}),u.jsx(Ws,{sx:{maxHeight:"100%",overflow:"auto"},children:d.map((T,L)=>u.jsx(_c,{sx:{display:"flex",flexDirection:"column",alignItems:T.sender==="user"?"flex-end":"flex-start",borderRadius:2,mb:.5,p:1,border:"none","&:before":{display:"none"},"&:after":{display:"none"}},children:u.jsxs(et,{sx:{display:"flex",alignItems:"center",color:T.sender==="user"?"common.white":"text.primary",borderRadius:"16px"},children:[T.sender==="agent"&&u.jsx(Er,{src:Pi,sx:{width:36,height:36,mr:1},alt:"Aria"}),u.jsx(ws,{primary:u.jsxs(et,{sx:{display:"flex",flexDirection:"row",alignItems:"center",flexWrap:"nowrap"},children:[T.message,t&&T.sender==="agent"&&u.jsx(lt,{onClick:()=>V(T.message),size:"small",sx:{ml:1},children:v(T.message)})]}),primaryTypographyProps:{sx:{color:T.sender==="user"?"common.white":"text.primary",bgcolor:T.sender==="user"?"primary.main":"grey.200",borderRadius:"16px",px:2,py:1,display:"inline-block"}}}),T.sender==="user"&&u.jsx(Er,{sx:{width:36,height:36,ml:1},children:u.jsx(cd,{})})]})},L))})]}),u.jsx(Wi,{}),u.jsxs(et,{sx:{p:2,pb:1,display:"flex",alignItems:"center",bgcolor:"background.paper"},children:[u.jsx(at,{fullWidth:!0,variant:"outlined",placeholder:"Type your message here...",value:l,onChange:$,disabled:g,sx:{mr:1,flexGrow:1},InputProps:{endAdornment:u.jsx(Ic,{position:"end",children:u.jsxs(lt,{onClick:m?I:re,color:"primary.main","aria-label":m?"Stop recording":"Start recording",size:"large",edge:"end",disabled:g,children:[m?u.jsx(Nm,{size:"small"}):u.jsx(Lm,{size:"small"}),m&&u.jsx(_n,{size:30,sx:{color:"primary.main",position:"absolute",zIndex:1}})]})})}}),g?u.jsx(_n,{size:24}):u.jsx(Rt,{variant:"contained",color:"primary",onClick:ee,disabled:g||!l.trim(),endIcon:u.jsx(oa,{}),children:"Send"})]})]}),u.jsx(yo,{open:b,autoHideDuration:6e3,onClose:U,children:u.jsx(xr,{elevation:6,variant:"filled",onClose:U,severity:P,children:R})})]})]})};var yg={},xD=Te;Object.defineProperty(yg,"__esModule",{value:!0});var _2=yg.default=void 0,bD=xD(Me()),wD=u;_2=yg.default=(0,bD.default)((0,wD.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5m-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11m3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5"}),"Mood");function SD(){const[e,t]=p.useState(""),[n,r]=p.useState(""),[o,i]=p.useState(""),a=async()=>{const s=localStorage.getItem("token");if(!e||!n){i("Both mood and activities are required.");return}if(!s){i("You are not logged in.");return}try{const l=await Oe.post("/api/user/log_mood",{mood:e,activities:n},{headers:{Authorization:`Bearer ${s}`}});i(l.data.message)}catch(l){i(l.response.data.error)}};return u.jsxs("div",{className:"mood-logging-container",children:[u.jsxs("h1",{children:[u.jsx(_2,{fontSize:"large"})," Track Your Vibes "]}),u.jsxs("div",{className:"mood-logging",children:[u.jsxs("div",{className:"input-group",children:[u.jsx("label",{htmlFor:"mood-input",children:"Mood:"}),u.jsx("input",{id:"mood-input",type:"text",value:e,onChange:s=>t(s.target.value),placeholder:"Enter your current mood"}),u.jsx("label",{htmlFor:"activities-input",children:"Activities:"}),u.jsx("input",{id:"activities-input",type:"text",value:n,onChange:s=>r(s.target.value),placeholder:"What are you doing?"})]}),u.jsx(Rt,{variant:"contained",className:"submit-button",onClick:a,startIcon:u.jsx(oa,{}),children:"Log Mood"}),o&&u.jsx("div",{className:"message",children:o})]})]})}function CD(){const[e,t]=p.useState([]),[n,r]=p.useState("");p.useEffect(()=>{(async()=>{const a=localStorage.getItem("token");if(!a){r("You are not logged in.");return}try{const s=await Oe.get("/api/user/get_mood_logs",{headers:{Authorization:`Bearer ${a}`}});console.log("Received data:",s.data),t(s.data.mood_logs||[])}catch(s){r(s.response.data.error)}})()},[]);const o=i=>{const a={year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"};try{const s=i.$date;return new Date(s).toLocaleDateString("en-US",a)}catch(s){return console.error("Date parsing error:",s),"Invalid Date"}};return u.jsxs("div",{className:"mood-logs",children:[u.jsxs("h2",{children:[u.jsx(sg,{className:"icon-large"}),"Your Mood Journey"]}),n?u.jsx("div",{className:"error",children:n}):u.jsx("ul",{children:e.map((i,a)=>u.jsxs("li",{children:[u.jsxs("div",{children:[u.jsx("strong",{children:"Mood:"})," ",i.mood]}),u.jsxs("div",{children:[u.jsx("strong",{children:"Activities:"})," ",i.activities]}),u.jsxs("div",{children:[u.jsx("strong",{children:"Timestamp:"})," ",o(i.timestamp)]})]},a))})]})}function kD(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}const L2=6e4,A2=36e5;function lf(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}function RD(e,t){const n=kD(e);if(isNaN(n.getTime()))throw new RangeError("Invalid time value");const r=(t==null?void 0:t.format)??"extended";let o="";const i=r==="extended"?"-":"";{const a=lf(n.getDate(),2),s=lf(n.getMonth()+1,2);o=`${lf(n.getFullYear(),4)}${i}${s}${i}${a}`}return o}function PD(e,t){const r=jD(e);let o;if(r.date){const l=MD(r.date,2);o=OD(l.restDateString,l.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);const i=o.getTime();let a=0,s;if(r.time&&(a=ID(r.time),isNaN(a)))return new Date(NaN);if(r.timezone){if(s=_D(r.timezone),isNaN(s))return new Date(NaN)}else{const l=new Date(i+a),c=new Date(0);return c.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),c.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),c}return new Date(i+a+s)}const kl={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ED=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,TD=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,$D=/^([+-])(\d{2})(?::?(\d{2}))?$/;function jD(e){const t={},n=e.split(kl.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],kl.timeZoneDelimiter.test(t.date)&&(t.date=e.split(kl.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const o=kl.timezone.exec(r);o?(t.time=r.replace(o[1],""),t.timezone=o[1]):t.time=r}return t}function MD(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const o=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?o:i*100,restDateString:e.slice((r[1]||r[2]).length)}}function OD(e,t){if(t===null)return new Date(NaN);const n=e.match(ED);if(!n)return new Date(NaN);const r=!!n[4],o=Ra(n[1]),i=Ra(n[2])-1,a=Ra(n[3]),s=Ra(n[4]),l=Ra(n[5])-1;if(r)return zD(t,s,l)?LD(t,s,l):new Date(NaN);{const c=new Date(0);return!ND(t,i,a)||!DD(t,o)?new Date(NaN):(c.setUTCFullYear(t,i,Math.max(o,a)),c)}}function Ra(e){return e?parseInt(e):1}function ID(e){const t=e.match(TD);if(!t)return NaN;const n=cf(t[1]),r=cf(t[2]),o=cf(t[3]);return BD(n,r,o)?n*A2+r*L2+o*1e3:NaN}function cf(e){return e&&parseFloat(e.replace(",","."))||0}function _D(e){if(e==="Z")return 0;const t=e.match($D);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return FD(r,o)?n*(r*A2+o*L2):NaN}function LD(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const o=r.getUTCDay()||7,i=(t-1)*7+n+1-o;return r.setUTCDate(r.getUTCDate()+i),r}const AD=[31,null,31,30,31,30,31,31,30,31,30,31];function N2(e){return e%400===0||e%4===0&&e%100!==0}function ND(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(AD[t]||(N2(e)?29:28))}function DD(e,t){return t>=1&&t<=(N2(e)?366:365)}function zD(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function BD(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function FD(e,t){return t>=0&&t<=59}function Lp({userId:e,update:t}){const[n,r]=p.useState(""),[o,i]=p.useState("daily"),[a,s]=p.useState(!1),{checkInId:l}=Ms(),[c,d]=p.useState(!1),[f,m]=p.useState({open:!1,message:"",severity:"info"}),w=localStorage.getItem("token");p.useEffect(()=>{t&&l&&(d(!0),Oe.get(`/api/check-in/${l}`,{headers:{Authorization:`Bearer ${w}`}}).then(k=>{const g=k.data;console.log("Fetched check-in data:",g);const h=RD(PD(g.check_in_time),{representation:"date"});r(h.slice(0,16)),i(g.frequency),s(g.notify),d(!1)}).catch(k=>{console.error("Failed to fetch check-in details:",k),d(!1)}))},[t,l]);const y=async k=>{var P,M,D;if(k.preventDefault(),new Date(n)<=new Date){m({open:!0,message:"Cannot schedule check-in in the past. Please choose a future time.",severity:"error"});return}const b=t?`/api/check-in/${l}`:"/api/check-in/schedule",C={headers:{Authorization:`Bearer ${w}`,"Content-Type":"application/json"}};console.log("URL:",b);const R=t?"patch":"post",E={user_id:e,check_in_time:n,frequency:o,notify:a};console.log("Submitting:",E);try{const O=await Oe[R](b,E,C);console.log("Success:",O.data.message),m({open:!0,message:O.data.message,severity:"success"})}catch(O){console.error("Error:",((P=O.response)==null?void 0:P.data)||O);const F=((D=(M=O.response)==null?void 0:M.data)==null?void 0:D.error)||"An unexpected error occurred";m({open:!0,message:F,severity:"error"})}},x=(k,g)=>{g!=="clickaway"&&m({...f,open:!1})};return c?u.jsx(Ie,{children:"Loading..."}):u.jsxs(et,{component:"form",onSubmit:y,noValidate:!0,sx:{mt:4,padding:3,borderRadius:2,boxShadow:3},children:[u.jsx(at,{id:"datetime-local",label:"Check-in Time",type:"datetime-local",fullWidth:!0,value:n,onChange:k=>r(k.target.value),sx:{marginBottom:3},InputLabelProps:{shrink:!0},required:!0,helperText:"Select the date and time for your check-in."}),u.jsxs(sd,{fullWidth:!0,sx:{marginBottom:3},children:[u.jsx(ld,{id:"frequency-label",children:"Frequency"}),u.jsxs(Vs,{labelId:"frequency-label",id:"frequency",value:o,label:"Frequency",onChange:k=>i(k.target.value),children:[u.jsx(Zn,{value:"daily",children:"Daily"}),u.jsx(Zn,{value:"weekly",children:"Weekly"}),u.jsx(Zn,{value:"monthly",children:"Monthly"})]}),u.jsx(Ln,{title:"Choose how often you want the check-ins to occur",children:u.jsx("i",{className:"fas fa-info-circle"})})]}),u.jsx(Tm,{control:u.jsx(km,{checked:a,onChange:k=>s(k.target.checked),color:"primary"}),label:"Notify me",sx:{marginBottom:2}}),u.jsx(Rt,{type:"submit",fullWidth:!0,variant:"contained",color:"primary",sx:{mt:2,mb:2,padding:"10px 0"},children:t?"Update Check-In":"Schedule Check-In"}),u.jsx(yo,{open:f.open,autoHideDuration:6e3,onClose:x,children:u.jsx(xr,{onClose:x,severity:f.severity,children:f.message})})]})}Lp.propTypes={userId:Vd.string.isRequired,checkInId:Vd.string,update:Vd.bool.isRequired};var xg={},UD=Te;Object.defineProperty(xg,"__esModule",{value:!0});var D2=xg.default=void 0,WD=UD(Me()),Iy=u;D2=xg.default=(0,WD.default)([(0,Iy.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,Iy.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");var bg={},VD=Te;Object.defineProperty(bg,"__esModule",{value:!0});var z2=bg.default=void 0,HD=VD(Me()),qD=u;z2=bg.default=(0,HD.default)((0,qD.jsx)("path",{d:"M7 7h10v3l4-4-4-4v3H5v6h2zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2z"}),"Repeat");var wg={},GD=Te;Object.defineProperty(wg,"__esModule",{value:!0});var B2=wg.default=void 0,KD=GD(Me()),YD=u;B2=wg.default=(0,KD.default)((0,YD.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert");var Sg={},XD=Te;Object.defineProperty(Sg,"__esModule",{value:!0});var F2=Sg.default=void 0,QD=XD(Me()),JD=u;F2=Sg.default=(0,QD.default)((0,JD.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");var Cg={},ZD=Te;Object.defineProperty(Cg,"__esModule",{value:!0});var U2=Cg.default=void 0,ez=ZD(Me()),tz=u;U2=Cg.default=(0,ez.default)((0,tz.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit");const nz=ie(id)(({theme:e})=>({marginBottom:e.spacing(2),padding:e.spacing(2),display:"flex",alignItems:"center",justifyContent:"space-between",transition:"transform 0.1s ease-in-out","&:hover":{transform:"scale(1.01)",boxShadow:e.shadows[3]}})),rz=nn.forwardRef(function(t,n){return u.jsx(xr,{elevation:6,ref:n,variant:"filled",...t})});function oz(){const{userId:e}=Ms(),t=qo(),[n,r]=p.useState([]),[o,i]=p.useState(null),[a,s]=p.useState(!1),[l,c]=p.useState(!1),[d,f]=p.useState(!1),[m,w]=p.useState(""),[y,x]=p.useState(!1),[k,g]=p.useState(""),[h,b]=p.useState("info"),C=localStorage.getItem("token");p.useEffect(()=>{R()},[e]);const R=async()=>{if(!e){w("User not logged in");return}if(!C){w("No token found, please log in again");return}f(!0);try{const V=await Oe.get(`/api/check-in/all?user_id=${e}`,{headers:{Authorization:`Bearer ${C}`}});if(console.log("API Response:",V.data),Array.isArray(V.data)&&V.data.every(U=>U._id&&U._id.$oid&&U.check_in_time&&U.check_in_time.$date)){const U=V.data.map(q=>({...q,_id:q._id.$oid,check_in_time:new Date(q.check_in_time.$date).toLocaleString()}));r(U)}else console.error("Data received is not in expected array format:",V.data),w("Unexpected data format");f(!1)}catch(V){console.error("Error during fetch:",V),w(V.message),f(!1)}},E=V=>{const U=n.find(q=>q._id===V);U&&(i(U),console.log("Selected check-in for details or update:",U),s(!0))},P=()=>{s(!1),c(!1)},M=async()=>{if(o){try{await Oe.delete(`/api/check-in/${o._id}`,{headers:{Authorization:`Bearer ${C}`}}),g("Check-in deleted successfully"),b("success"),R(),P()}catch{g("Failed to delete check-in"),b("error")}x(!0)}},D=()=>{t(`/user/check_in/${o._id}`),console.log("Redirecting to update check-in form",o._id)},O=(V,U)=>{U!=="clickaway"&&x(!1)},F=()=>{c(!0)};return e?d?u.jsx(Ie,{variant:"h6",mt:"2",children:"Loading..."}):u.jsxs(et,{sx:{margin:3,maxWidth:600,mx:"auto",maxHeight:"91vh",overflow:"auto"},children:[u.jsx(Ie,{variant:"h4",gutterBottom:!0,children:"Track Your Commitments"}),u.jsx(Wi,{sx:{mb:2}}),n.length>0?u.jsx(Ws,{children:n.map(V=>u.jsxs(nz,{children:[u.jsx(Z_,{children:u.jsx(Er,{sx:{bgcolor:"primary.main"},children:u.jsx(D2,{})})}),u.jsx(ws,{primary:`Check-In: ${V.check_in_time}`,secondary:u.jsx(EO,{label:V.frequency,icon:u.jsx(z2,{}),size:"small"})}),u.jsx(Ln,{title:"More options",children:u.jsx(lt,{onClick:()=>E(V._id),children:u.jsx(B2,{})})})]},V._id))}):u.jsx(Ie,{variant:"h6",sx:{mb:2,mt:2,color:"error.main",fontWeight:"medium",textAlign:"center",padding:2,borderRadius:1,backgroundColor:"background.paper",boxShadow:2},children:"No check-ins found."}),u.jsxs($p,{open:a,onClose:P,children:[u.jsx(Op,{children:"Check-In Details"}),u.jsx(Mp,{children:u.jsxs(Ie,{component:"div",children:[u.jsxs(Ie,{variant:"body1",children:[u.jsx("strong",{children:"Time:"})," ",o==null?void 0:o.check_in_time]}),u.jsxs(Ie,{variant:"body1",children:[u.jsx("strong",{children:"Frequency:"})," ",o==null?void 0:o.frequency]}),u.jsxs(Ie,{variant:"body1",children:[u.jsx("strong",{children:"Status:"})," ",o==null?void 0:o.status]}),u.jsxs(Ie,{variant:"body1",children:[u.jsx("strong",{children:"Notify:"})," ",o!=null&&o.notify?"Yes":"No"]})]})}),u.jsxs(jp,{children:[u.jsx(Rt,{onClick:D,startIcon:u.jsx(U2,{}),children:"Update"}),u.jsx(Rt,{onClick:F,startIcon:u.jsx(F2,{}),color:"error",children:"Delete"}),u.jsx(Rt,{onClick:P,children:"Close"})]})]}),u.jsxs($p,{open:l,onClose:P,children:[u.jsx(Op,{children:"Confirm Deletion"}),u.jsx(Mp,{children:u.jsx(t2,{children:"Are you sure you want to delete this check-in? This action cannot be undone."})}),u.jsxs(jp,{children:[u.jsx(Rt,{onClick:M,color:"error",children:"Delete"}),u.jsx(Rt,{onClick:P,children:"Cancel"})]})]}),u.jsx(yo,{open:y,autoHideDuration:6e3,onClose:O,children:u.jsx(rz,{onClose:O,severity:h,children:k})})]}):u.jsx(Ie,{variant:"h6",mt:"2",children:"Please log in to see your check-ins."})}const wr=({children:e})=>{const t=localStorage.getItem("token");return console.log("isAuthenticated:",t),t?e:u.jsx(MP,{to:"/auth",replace:!0})};var kg={},iz=Te;Object.defineProperty(kg,"__esModule",{value:!0});var W2=kg.default=void 0,az=iz(Me()),sz=u;W2=kg.default=(0,az.default)((0,sz.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 14H4V8l8 5 8-5zm-8-7L4 6h16z"}),"MailOutline");function lz(){const[e,t]=p.useState(""),[n,r]=p.useState(""),[o,i]=p.useState(!1),[a,s]=p.useState(!1),l=async c=>{var d,f;c.preventDefault(),s(!0);try{const m=await Oe.post("/api/user/request_reset",{email:e});r(m.data.message),i(!1)}catch(m){r(((f=(d=m.response)==null?void 0:d.data)==null?void 0:f.message)||"Failed to send reset link. Please try again."),i(!0)}s(!1)};return u.jsx(et,{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh",sx:{background:"linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)","& .MuiPaper-root":{background:"#fff",padding:"30px",width:"400px",textAlign:"center"}},children:u.jsxs(En,{elevation:3,style:{padding:"30px",width:"400px",textAlign:"center"},children:[u.jsx(Ie,{variant:"h5",component:"h1",marginBottom:"20px",children:"Reset Your Password"}),u.jsxs("form",{onSubmit:l,children:[u.jsx(at,{label:"Email Address",type:"email",value:e,onChange:c=>t(c.target.value),variant:"outlined",fullWidth:!0,required:!0,margin:"normal",InputProps:{endAdornment:u.jsx(W2,{})}}),u.jsx(Rt,{type:"submit",variant:"contained",color:"primary",fullWidth:!0,disabled:a,endIcon:a?null:u.jsx(oa,{}),children:a?u.jsx(_n,{size:24}):"Send Reset Link"})]}),n&&u.jsx(xr,{severity:o?"error":"success",sx:{maxWidth:"325px",mt:2},children:n})]})})}var Rg={},cz=Te;Object.defineProperty(Rg,"__esModule",{value:!0});var Ap=Rg.default=void 0,uz=cz(Me()),dz=u;Ap=Rg.default=(0,uz.default)((0,dz.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility");var Pg={},fz=Te;Object.defineProperty(Pg,"__esModule",{value:!0});var V2=Pg.default=void 0,pz=fz(Me()),hz=u;V2=Pg.default=(0,pz.default)((0,hz.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l4 4 4-4H6c0-3.86 3.14-7 7-7s7 3.14 7 7-3.14 7-7 7c-1.9 0-3.62-.76-4.88-1.99L6.7 18.42C8.32 20.01 10.55 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m2 8v-1c0-1.1-.9-2-2-2s-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1m-1 0h-2v-1c0-.55.45-1 1-1s1 .45 1 1z"}),"LockReset");function mz(){const e=qo(),{token:t}=Ms(),[n,r]=p.useState(""),[o,i]=p.useState(""),[a,s]=p.useState(!1),[l,c]=p.useState(""),[d,f]=p.useState(!1),m=async y=>{if(y.preventDefault(),n!==o){c("Passwords do not match."),f(!0);return}try{const x=await Oe.post(`/api/user/reset_password/${t}`,{password:n});c(x.data.message),f(!1),setTimeout(()=>e("/auth"),2e3)}catch(x){c(x.response.data.error),f(!0)}},w=()=>{s(!a)};return u.jsx(et,{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh",sx:{background:"linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)","& .MuiPaper-root":{padding:"40px",width:"400px",textAlign:"center",marginTop:"20px",borderRadius:"10px"}},children:u.jsxs(En,{elevation:6,children:[u.jsxs(Ie,{variant:"h5",component:"h1",marginBottom:"2",children:["Reset Your Password ",u.jsx(V2,{})]}),u.jsxs("form",{onSubmit:m,children:[u.jsx(at,{label:"New Password",type:a?"text":"password",value:n,onChange:y=>r(y.target.value),variant:"outlined",fullWidth:!0,required:!0,margin:"normal",InputProps:{endAdornment:u.jsx(Ic,{position:"end",children:u.jsx(lt,{"aria-label":"toggle password visibility",onClick:w,children:a?u.jsx(Ap,{}):u.jsx(Ac,{})})})}}),u.jsx(at,{label:"Confirm New Password",type:a?"text":"password",value:o,onChange:y=>i(y.target.value),variant:"outlined",fullWidth:!0,required:!0,margin:"normal",InputProps:{endAdornment:u.jsx(Ic,{position:"end",children:u.jsx(lt,{"aria-label":"toggle password visibility",onClick:w,children:a?u.jsx(Ap,{}):u.jsx(Ac,{})})})}}),u.jsx(Rt,{type:"submit",variant:"contained",color:"primary",fullWidth:!0,sx:{mt:2},endIcon:u.jsx(oa,{}),children:"Reset Password"})]}),l&&u.jsx(xr,{severity:d?"error":"success",sx:{mt:2,maxWidth:"325px"},children:l})]})})}function gz(){const{user:e}=p.useContext(vr);return p.useEffect(()=>{document.body.style.backgroundColor="#f5f5f5"},[]),u.jsx(vz,{children:u.jsxs(IP,{children:[u.jsx(mn,{path:"/",element:u.jsx(wr,{children:e!=null&&e.userId?u.jsx(NN,{}):u.jsx(Oy,{})})}),u.jsx(mn,{path:"/chat",element:u.jsx(wr,{children:u.jsx(Oy,{})})}),u.jsx(mn,{path:"/reset_password/:token",element:u.jsx(mz,{})}),u.jsx(mn,{path:"/request_reset",element:u.jsx(lz,{})}),u.jsx(mn,{path:"/auth",element:u.jsx(QN,{})}),u.jsx(mn,{path:"/user/profile/:userId",element:u.jsx(wr,{children:u.jsx(j6,{})})}),u.jsx(mn,{path:"/user/mood_logging",element:u.jsx(wr,{children:u.jsx(SD,{})})}),u.jsx(mn,{path:"/user/mood_logs",element:u.jsx(wr,{children:u.jsx(CD,{})})}),u.jsx(mn,{path:"/user/check_in",element:u.jsx(wr,{children:u.jsx(Lp,{userId:e==null?void 0:e.userId,checkInId:"",update:!1})})}),u.jsx(mn,{path:"/user/check_in/:checkInId",element:u.jsx(wr,{children:u.jsx(Lp,{userId:e==null?void 0:e.userId,update:!0})})}),u.jsx(mn,{path:"/user/chat_log_Manager",element:u.jsx(wr,{children:u.jsx(yD,{})})}),u.jsx(mn,{path:"/user/check_ins/:userId",element:u.jsx(wr,{children:u.jsx(oz,{})})})]})})}function vz({children:e}){p.useContext(vr);const t=ho(),r=!["/auth","/request_reset",new RegExp("^/reset_password/[^/]+$")].some(l=>typeof l=="string"?l===t.pathname:l.test(t.pathname)),o=r?6:0,[i,a]=p.useState(!0),s=()=>{a(!i)};return u.jsxs(et,{sx:{display:"flex",maxHeight:"100vh"},children:[u.jsx(Rm,{}),r&&u.jsx(sD,{toggleSidebar:s}),r&&i&&u.jsx(Q6,{}),u.jsx(et,{component:"main",sx:{flexGrow:1,p:o},children:e})]})}function yz(e){const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=window.atob(n),o=new Uint8Array(r.length);for(let i=0;i{if(t!=="granted")throw new Error("Permission not granted for Notification");return e.pushManager.getSubscription()}).then(function(t){return t||e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:yz(bz)})}).then(function(t){console.log("Subscription:",t);const n={p256dh:btoa(String.fromCharCode.apply(null,new Uint8Array(t.getKey("p256dh")))),auth:btoa(String.fromCharCode.apply(null,new Uint8Array(t.getKey("auth"))))};if(console.log("Subscription keys:",n),!n.p256dh||!n.auth)throw console.error("Subscription object:",t),new Error("Subscription keys are missing");const r={endpoint:t.endpoint,keys:n},o=xz();if(!o)throw new Error("No token found");return fetch("/api/subscribe",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`},body:JSON.stringify(r)})}).then(t=>t.json()).then(t=>console.log("Subscription response:",t)).catch(t=>console.error("Subscription failed:",t))}).catch(function(e){console.error("Service Worker registration failed:",e)})});uf.createRoot(document.getElementById("root")).render(u.jsx(FP,{children:u.jsx(KP,{children:u.jsx(gz,{})})})); diff --git a/client/dist/index.html b/client/dist/index.html new file mode 100644 index 00000000..56fc83b6 --- /dev/null +++ b/client/dist/index.html @@ -0,0 +1,19 @@ + + + + + + + + + Mental Health Companion + + + + +
+ + \ No newline at end of file diff --git a/client/index.html b/client/index.html index 784068bd..264aba92 100644 --- a/client/index.html +++ b/client/index.html @@ -7,9 +7,9 @@ - Mental Health App + Earlent - Mental Health Companion
diff --git a/client/package-lock.json b/client/package-lock.json index 1b890564..89e03052 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -21,6 +21,7 @@ "react-dom": "^18.2.0", "react-redux": "^9.1.2", "react-router-dom": "^6.23.1", + "recordrtc": "^5.6.2", "redux": "^5.0.1", "redux-thunk": "^3.1.0" }, @@ -5433,6 +5434,11 @@ "react-dom": ">=16.6.0" } }, + "node_modules/recordrtc": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/recordrtc/-/recordrtc-5.6.2.tgz", + "integrity": "sha512-1QNKKNtl7+KcwD1lyOgP3ZlbiJ1d0HtXnypUy7yq49xEERxk31PHvE9RCciDrulPCY7WJ+oz0R9hpNxgsIurGQ==" + }, "node_modules/redux": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", diff --git a/client/package.json b/client/package.json index 477f425a..6d84a223 100644 --- a/client/package.json +++ b/client/package.json @@ -23,6 +23,7 @@ "react-dom": "^18.2.0", "react-redux": "^9.1.2", "react-router-dom": "^6.23.1", + "recordrtc": "^5.6.2", "redux": "^5.0.1", "redux-thunk": "^3.1.0" }, diff --git a/client/src/App.jsx b/client/src/App.jsx index 5930c4b3..5fcb7343 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -16,6 +16,8 @@ import CheckInsList from './Components/checkInsList'; import { CssBaseline, Box } from '@mui/material'; import { UserContext } from './Components/userContext'; import ProtectedRoute from './protectedRoute'; +import RequestPasswordReset from './Components/requestPasswordReset'; +import ResetPassword from './Components/passwordReset'; function App() { const { user } = useContext(UserContext); @@ -36,6 +38,8 @@ function App() { } /> + } /> + } /> } /> @@ -61,9 +65,11 @@ function App() { function Layout({ children }) { const { user } = useContext(UserContext); const location = useLocation(); - const noNavRoutes = ['/auth']; // List of routes that shouldn't show the navbar or sidebar - const showNav = !noNavRoutes.includes(location.pathname); - const mainPadding = noNavRoutes.includes(location.pathname) ? 0 : 6; + const noNavRoutes = ['/auth','/request_reset',new RegExp('^/reset_password/[^/]+$')]; // List of routes that shouldn't show the navbar or sidebar + const showNav = !noNavRoutes.some(route => + typeof route === 'string' ? route === location.pathname : route.test(location.pathname)); + + const mainPadding = !showNav ? 0 : 6; const [sidebarOpen, setSidebarOpen] = useState(true); // State to control the sidebar const toggleSidebar = () => { diff --git a/client/src/Assets/Styles/MoodLogging.css b/client/src/Assets/Styles/MoodLogging.css index 8f3735d3..6e22f337 100644 --- a/client/src/Assets/Styles/MoodLogging.css +++ b/client/src/Assets/Styles/MoodLogging.css @@ -6,12 +6,13 @@ min-height: 100vh; font-family: 'Arial', sans-serif; + } .mood-logging { width: 90%; max-width: 500px; - + background-color: white; padding: 25px; border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); diff --git a/client/src/Components/authComponent.jsx b/client/src/Components/authComponent.jsx index 94b1bb11..733c9cf7 100644 --- a/client/src/Components/authComponent.jsx +++ b/client/src/Components/authComponent.jsx @@ -3,7 +3,7 @@ import axios from 'axios'; import apiServerAxios from '../api/axios'; import { useNavigate } from 'react-router-dom'; import { UserContext } from './userContext'; - +import { Link } from 'react-router-dom'; import {TextField, Button, Paper, CssBaseline, Snackbar, Alert, Tab, Tabs, Box, CircularProgress,Select, InputLabel,FormControl,MenuItem, IconButton, Typography, Tooltip} from '@mui/material'; import { createTheme, ThemeProvider, styled } from '@mui/material/styles'; @@ -14,6 +14,7 @@ import { Visibility, VisibilityOff } from '@mui/icons-material'; import { Checkbox, FormGroup, FormControlLabel } from '@mui/material'; import InfoIcon from '@mui/icons-material/Info'; + const theme = createTheme({ palette: { primary: { @@ -71,6 +72,7 @@ function AuthComponent() { const [activeTab, setActiveTab] = useState(0); const [username, setUsername] = useState(''); const [email, setEmail] = useState(''); + const [showForgotPassword, setShowForgotPassword] = useState(false); const [password, setPassword] = useState(''); const [showPassword, setShowPassword] = useState(false); const [name, setName] = useState(''); @@ -122,6 +124,7 @@ function AuthComponent() { console.error('Login failed:', error); setMessage('Login failed: ' + (error.response?.data?.msg || 'Unknown error')); setSeverity('error'); + setShowForgotPassword(true); } setOpen(true); setLoading(false); @@ -229,8 +232,13 @@ function AuthComponent() { ), }} /> - + {showForgotPassword && ( + + Forgot your password? Reset it here + + )} )} {activeTab === 1 && ( diff --git a/client/src/Components/chatComponent.jsx b/client/src/Components/chatComponent.jsx index 0d613bc5..580f0bb9 100644 --- a/client/src/Components/chatComponent.jsx +++ b/client/src/Components/chatComponent.jsx @@ -12,8 +12,7 @@ import VolumeOffIcon from '@mui/icons-material/VolumeOff'; import LibraryAddIcon from '@mui/icons-material/LibraryAdd'; import { UserContext } from './userContext'; import Aria from '../Assets/Images/Aria.jpg'; // Adjust the path to where your logo is stored - - +import RecordRTC from 'recordrtc'; const TypingIndicator = () => ( @@ -27,7 +26,8 @@ const TypingIndicator = () => ( const ChatComponent = () => { - const { user, voiceEnabled } = useContext(UserContext); + const { user, voiceEnabled , setVoiceEnabled} = useContext(UserContext); + const userId = user?.userId; const [chatId, setChatId] = useState(null); const [turnId, setTurnId] = useState(0); @@ -45,6 +45,10 @@ const ChatComponent = () => { const [currentPlayingMessage, setCurrentPlayingMessage] = useState(null); + const handleToggleVoice = (event) => { + event.preventDefault(); // Prevents the IconButton from triggering form submissions if used in forms + setVoiceEnabled(!voiceEnabled); + }; const speak = (text) => { @@ -198,68 +202,99 @@ const ChatComponent = () => { } }, [input, userId, chatId, turnId]); + + + // Function to handle recording start - const startRecording = () => { - navigator.mediaDevices.getUserMedia({ audio: true }) - .then(stream => { - audioChunksRef.current = []; // Clear the ref at the start of recording - const options = { mimeType: 'audio/webm' }; - const recorder = new MediaRecorder(stream, options); - recorder.ondataavailable = (e) => { - console.log('Data available:', e.data.size); // Log size to check if data is present - audioChunksRef.current.push(e.data); - }; - - recorder.start(); - setMediaRecorder(recorder); - setIsRecording(true); - }).catch(console.error); - }; + // Function to check supported MIME types for recording +const getSupportedMimeType = () => { + if (MediaRecorder.isTypeSupported('audio/webm; codecs=opus')) { + return 'audio/webm; codecs=opus'; + } else if (MediaRecorder.isTypeSupported('audio/mp4')) { + // Fallback for Safari on iOS + return 'audio/mp4'; + } else { + // Default to WAV if no other formats are supported + return 'audio/wav'; + } +}; - // Function to handle recording stop - const stopRecording = () => { - if (mediaRecorder) { - mediaRecorder.onstop = () => { - sendAudioToServer(audioChunksRef.current); // Ensure sendAudioToServer is called only after recording has fully stopped - setIsRecording(false); - setMediaRecorder(null); - }; - mediaRecorder.stop(); // Stop recording, onstop will be triggered after this +// Function to start recording +const startRecording = () => { + navigator.mediaDevices.getUserMedia({ + audio: { + sampleRate: 44100, + channelCount: 1, + volume: 1.0, + echoCancellation: true } - }; + }) + .then(stream => { + audioChunksRef.current = []; + const mimeType = getSupportedMimeType(); + let recorder = new MediaRecorder(stream, { mimeType }); + + recorder.ondataavailable = e => { + audioChunksRef.current.push(e.data); + }; - const sendAudioToServer = chunks => { - console.log('Audio chunks size:', chunks.reduce((sum, chunk) => sum + chunk.size, 0)); // Log total size of chunks - const audioBlob = new Blob(chunks, { 'type': 'audio/webm' }); - if (audioBlob.size === 0) { - console.error('Audio Blob is empty'); - return; - } - console.log(`Sending audio blob of size: ${audioBlob.size} bytes`); - const formData = new FormData(); - formData.append('audio', audioBlob); - setIsLoading(true); + recorder.start(); + setMediaRecorder(recorder); + setIsRecording(true); + }) + .catch(error => { + console.error('Error accessing microphone:', error); + // Handle error - show message to user + }); +}; - apiServerAxios.post('/api/ai/mental_health/voice-to-text', formData, { - headers: { - 'Content-Type': 'multipart/form-data' - } - }) - .then(response => { - const { message } = response.data; - setInput(message); - sendMessage(); - }) - .catch(error => { - console.error('Error uploading audio:', error); - setOpen(true); - setSnackbarMessage('Error processing voice input: ' + error.message); - setSnackbarSeverity('error'); - }) - .finally(() => { - setIsLoading(false); - }); - }; // Remove audioChunks from dependencies to prevent re-creation +// Function to stop recording +const stopRecording = () => { + if (mediaRecorder) { + mediaRecorder.stream.getTracks().forEach(track => track.stop()); + + mediaRecorder.onstop = () => { + const mimeType = mediaRecorder.mimeType; + const audioBlob = new Blob(audioChunksRef.current, { type: mimeType }); + sendAudioToServer(audioBlob); + setIsRecording(false); + setMediaRecorder(null); + }; + + mediaRecorder.stop(); + } +}; + +// Function to send audio to server +const sendAudioToServer = (audioBlob) => { + if (audioBlob.size === 0) { + console.error('Audio Blob is empty'); + // Handle error - show message to user + return; + } + + const formData = new FormData(); + formData.append('audio', audioBlob); + setIsLoading(true); + + apiServerAxios.post('/api/ai/mental_health/voice-to-text', formData, { + headers: { + 'Content-Type': 'multipart/form-data' + } + }) + .then(response => { + const { message } = response.data; + setInput(message); + sendMessage(); + }) + .catch(error => { + console.error('Error uploading audio:', error); + // Handle error - show message to user + }) + .finally(() => { + setIsLoading(false); + }); +};// Remove audioChunks from dependencies to prevent re-creation // Handle input changes @@ -303,6 +338,39 @@ const ChatComponent = () => { + + + + setVoiceEnabled(e.target.checked)} + icon={} + checkedIcon={} + inputProps={{ 'aria-label': 'Voice response toggle' }} + color="default" + sx={{ + height: 42, // Adjust height to align with icons + '& .MuiSwitch-switchBase': { + padding: '9px', // Reduce padding to make the switch smaller + }, + '& .MuiSwitch-switchBase.Mui-checked': { + color: 'white', + transform: 'translateX(16px)', + '& + .MuiSwitch-track': { + + backgroundColor: 'primary.main', + }, + }, + }} + /> + + { onClick={finalizeChat} disabled={isLoading} sx={{ - position: 'absolute', // Positioning the button at the top-right corner - top: 5, // Top margin - right: 5, // Right margin '&:hover': { backgroundColor: 'primary.main', color: 'common.white', @@ -324,12 +389,13 @@ const ChatComponent = () => { - + + {welcomeMessage.length === 0 && ( - Welcome to Mental Health Companion + Welcome to Your Mental Health Companion )} diff --git a/client/src/Components/chatInterface.jsx b/client/src/Components/chatInterface.jsx index 3b2ec390..fc458e94 100644 --- a/client/src/Components/chatInterface.jsx +++ b/client/src/Components/chatInterface.jsx @@ -13,21 +13,12 @@ import LibraryAddIcon from '@mui/icons-material/LibraryAdd'; import { UserContext } from './userContext'; import Aria from '../Assets/Images/Aria.jpg'; // Adjust the path to where your logo is stored -const TypingIndicator = () => ( - - -
-
-
-
-
-
-); + const ChatComponent = () => { - const { user,voiceEnabled } = useContext(UserContext); + const { user,voiceEnabled , setVoiceEnabled} = useContext(UserContext); const userId = user?.userId; const [chatId, setChatId] = useState(0); const [turnId, setTurnId] = useState(0); @@ -42,33 +33,46 @@ const ChatComponent = () => { const [snackbarSeverity, setSnackbarSeverity] = useState('info'); const [currentPlayingMessage, setCurrentPlayingMessage] = useState(null); - const speak = (text) => { - + const handleToggleVoice = (event) => { + event.preventDefault(); // Prevents the IconButton from triggering form submissions if used in forms + setVoiceEnabled(!voiceEnabled); + }; + + const speak = (text) => { + if (!voiceEnabled || text === currentPlayingMessage) { setCurrentPlayingMessage(null); window.speechSynthesis.cancel(); // Stop the current speech synthesis return; - } + } const synth = window.speechSynthesis; const utterance = new SpeechSynthesisUtterance(text); - const voices = synth.getVoices(); - console.log(voices.map(voice => `${voice.name} - ${voice.lang} - ${voice.gender}`)); + const setVoiceAndSpeak = () => { + const voices = synth.getVoices(); + console.log(voices.map(voice => `${voice.name} - ${voice.lang} - ${voice.gender}`)); - const femaleVoice = voices.find(voice => voice.name.includes("Microsoft Zira - English (United States)")); // Example: Adjust based on available voices + const femaleVoice = voices.find(voice => voice.name.includes("Microsoft Zira - English (United States)")); // Example: Adjust based on available voices - if (femaleVoice) { - utterance.voice = femaleVoice; - } else { - console.log("No female voice found"); - } + if (femaleVoice) { + utterance.voice = femaleVoice; + } else { + console.log("No female voice found"); + } - utterance.onend = () => { - setCurrentPlayingMessage(null); // Reset after speech has ended - }; + utterance.onend = () => { + setCurrentPlayingMessage(null); // Reset after speech has ended + }; - setCurrentPlayingMessage(text); - synth.speak(utterance); -}; + setCurrentPlayingMessage(text); + synth.speak(utterance); + }; + + if (synth.getVoices().length === 0){ + synth.onvoiceschanged = setVoiceAndSpeak; + } else { + setVoiceAndSpeak(); + } + }; const handleSnackbarClose = (event, reason) => { if (reason === 'clickaway') { @@ -149,73 +153,113 @@ const ChatComponent = () => { } }, [input, userId, chatId, turnId]); - // Function to handle recording start - const startRecording = () => { - navigator.mediaDevices.getUserMedia({ audio: true }) - .then(stream => { - audioChunksRef.current = []; // Clear the ref at the start of recording - const options = { mimeType: 'audio/webm' }; - const recorder = new MediaRecorder(stream, options); - recorder.ondataavailable = (e) => { - console.log('Data available:', e.data.size); // Log size to check if data is present - audioChunksRef.current.push(e.data); - }; - - recorder.start(); - setMediaRecorder(recorder); - setIsRecording(true); - }).catch(console.error); - }; - // Function to handle recording stop - const stopRecording = () => { - if (mediaRecorder) { - mediaRecorder.onstop = () => { - sendAudioToServer(audioChunksRef.current); // Ensure sendAudioToServer is called only after recording has fully stopped - setIsRecording(false); - setMediaRecorder(null); - }; - mediaRecorder.stop(); // Stop recording, onstop will be triggered after this - } - }; - const sendAudioToServer = chunks => { - console.log('Audio chunks size:', chunks.reduce((sum, chunk) => sum + chunk.size, 0)); // Log total size of chunks - const audioBlob = new Blob(chunks, { 'type': 'audio/webm' }); - if (audioBlob.size === 0) { - console.error('Audio Blob is empty'); - return; + +// Function to check supported MIME types for recording +const getSupportedMimeType = () => { + if (MediaRecorder.isTypeSupported('audio/webm; codecs=opus')) { + return 'audio/webm; codecs=opus'; + } else if (MediaRecorder.isTypeSupported('audio/mp4')) { + // Fallback for Safari on iOS + return 'audio/mp4'; + } else { + // Default to WAV if no other formats are supported + return 'audio/wav'; + } +}; + + // Function to handle recording start +const startRecording = () => { + navigator.mediaDevices.getUserMedia({ + audio: { + sampleRate: 44100, + channelCount: 1, + volume: 1.0, + echoCancellation: true } - console.log(`Sending audio blob of size: ${audioBlob.size} bytes`); - const formData = new FormData(); - formData.append('audio', audioBlob); - setIsLoading(true); - - apiServerAxios.post('/api/ai/mental_health/voice-to-text', formData, { - headers: { - 'Content-Type': 'multipart/form-data' - } - }) - .then(response => { - const { message } = response.data; - setInput(message); - sendMessage(); - }) - .catch(error => { - console.error('Error uploading audio:', error); - setOpen(true); - setSnackbarMessage('Error processing voice input: ' + error.message); - setSnackbarSeverity('error'); - }) - .finally(() => { - setIsLoading(false); - }); - }; // Remove audioChunks from dependencies to prevent re-creation - + }) + .then(stream => { + audioChunksRef.current = []; + const mimeType = getSupportedMimeType(); + let recorder = new MediaRecorder(stream, { mimeType }); + + recorder.ondataavailable = e => { + audioChunksRef.current.push(e.data); + }; + + recorder.start(); + setMediaRecorder(recorder); + setIsRecording(true); + }) + .catch(error => { + console.error('Error accessing microphone:', error); + // Handle error - show message to user + }); +}; + + // Function to stop recording +const stopRecording = () => { + if (mediaRecorder) { + mediaRecorder.stream.getTracks().forEach(track => track.stop()); + + mediaRecorder.onstop = () => { + const mimeType = mediaRecorder.mimeType; + const audioBlob = new Blob(audioChunksRef.current, { type: mimeType }); + sendAudioToServer(audioBlob); + setIsRecording(false); + setMediaRecorder(null); + }; + + mediaRecorder.stop(); + } +}; + + // Function to send audio to server +const sendAudioToServer = (audioBlob) => { + if (audioBlob.size === 0) { + console.error('Audio Blob is empty'); + // Handle error - show message to user + return; + } + + const formData = new FormData(); + formData.append('audio', audioBlob); + setIsLoading(true); + + apiServerAxios.post('/api/ai/mental_health/voice-to-text', formData, { + headers: { + 'Content-Type': 'multipart/form-data' + } + }) + }) + .then(response => { + const { message } = response.data; + setInput(message); + sendMessage(); + }) + .catch(error => { + console.error('Error uploading audio:', error); + // Handle error - show message to user + }) + .finally(() => { + setIsLoading(false); + }); +};// Remove audioChunks from dependencies to prevent re-creation // Handle input changes const handleInputChange = useCallback((event) => { - setInput(event.target.value); + const inputText = event.target.value; + const words = inputText.split(/\s+/); + if (words.length > 200) { + // If the word count exceeds 200, prevent further input by not updating the state + setInput(input => input.split(/\s+/).slice(0, 200).join(" ")); + setSnackbarMessage('Word limit reached. Only 200 words allowed.'); + setSnackbarSeverity('warning'); + setOpen(true); + } else { + setInput(inputText); + } }, []); const messageIcon = (message) => { @@ -246,32 +290,65 @@ const ChatComponent = () => { - - + + + setVoiceEnabled(e.target.checked)} + icon={} + checkedIcon={} + inputProps={{ 'aria-label': 'Voice response toggle' }} + color="default" sx={{ - position: 'absolute', // Positioning the button at the top-right corner - top: 5, // Top margin - right: 5, // Right margin - '&:hover': { + height: 42, // Adjust height to align with icons + '& .MuiSwitch-switchBase': { + padding: '9px', // Reduce padding to make the switch smaller + }, + '& .MuiSwitch-switchBase.Mui-checked': { + color: 'white', + transform: 'translateX(16px)', + '& + .MuiSwitch-track': { + backgroundColor: 'primary.main', - color: 'common.white', - } + }, + }, }} - > - + /> + + + + + + - + +
+ {messages.length === 0 && ( - Welcome to Mental Health Companion + Welcome to Your Mental Health Companion )} diff --git a/client/src/Components/checkInsList.jsx b/client/src/Components/checkInsList.jsx index 3ff1d48e..a26da391 100644 --- a/client/src/Components/checkInsList.jsx +++ b/client/src/Components/checkInsList.jsx @@ -143,12 +143,12 @@ function CheckInsList() { setDeleteConfirmOpen(true); }; - if (!userId) return Please log in to see your check-ins.; - if (loading) return Loading...; - if (error) return Error: {error}; + if (!userId) return Please log in to see your check-ins.; + if (loading) return Loading...; + return ( - + Track Your Commitments {checkIns.length > 0 ? ( @@ -173,7 +173,23 @@ function CheckInsList() { ))} ) : ( - No check-ins found. + + No check-ins found. + + )} {/* Dialog for Check-In Details */} diff --git a/client/src/Components/navBar.jsx b/client/src/Components/navBar.jsx index 08ca8f20..934c1a22 100644 --- a/client/src/Components/navBar.jsx +++ b/client/src/Components/navBar.jsx @@ -2,20 +2,19 @@ import React, {useContext, useState, useEffect} from 'react'; import axios from 'axios'; import apiServerAxios from '../api/axios'; import { useNavigate } from 'react-router-dom'; -import { AppBar, Toolbar, IconButton, Typography, Badge,Switch, Tooltip, Menu, MenuItem, Card, CardContent } from '@mui/material'; +import { AppBar, Toolbar, IconButton, Typography, Badge, Menu, MenuItem, Card, CardContent } from '@mui/material'; import MenuIcon from '@mui/icons-material/Menu'; import NotificationsIcon from '@mui/icons-material/Notifications'; import AccountCircle from '@mui/icons-material/AccountCircle'; import { UserContext } from './userContext'; -import VolumeOffIcon from '@mui/icons-material/VolumeOff'; -import VolumeUpIcon from '@mui/icons-material/VolumeUp'; + import CancelIcon from '@mui/icons-material/Cancel'; function Navbar({ toggleSidebar }) { const { incrementNotificationCount, notifications, addNotification, removeNotification } = useContext(UserContext); const navigate = useNavigate(); - const { voiceEnabled, setVoiceEnabled,user } = useContext(UserContext); + const { user } = useContext(UserContext); const [anchorEl, setAnchorEl] = useState(null); const token = localStorage.getItem('token'); const userId = user?.userId; @@ -73,10 +72,7 @@ function Navbar({ toggleSidebar }) { } }; - const handleToggleVoice = (event) => { - event.preventDefault(); // Prevents the IconButton from triggering form submissions if used in forms - setVoiceEnabled(!voiceEnabled); - }; + useEffect(() => { const handleServiceWorkerMessage = (event) => { @@ -108,32 +104,7 @@ function Navbar({ toggleSidebar }) { Dashboard - - - setVoiceEnabled(e.target.checked)} - icon={} - checkedIcon={} - inputProps={{ 'aria-label': 'Voice response toggle' }} - color="default" - sx={{ - height: 42, // Adjust height to align with icons - '& .MuiSwitch-switchBase': { - padding: '9px', // Reduce padding to make the switch smaller - }, - '& .MuiSwitch-switchBase.Mui-checked': { - color: 'white', - transform: 'translateX(16px)', - '& + .MuiSwitch-track': { - - backgroundColor: 'white', - }, - }, - }} - /> - - + {user?.userId &&( diff --git a/client/src/Components/passwordReset.jsx b/client/src/Components/passwordReset.jsx new file mode 100644 index 00000000..04d21273 --- /dev/null +++ b/client/src/Components/passwordReset.jsx @@ -0,0 +1,116 @@ +import React, { useState } from 'react'; +import axios from 'axios'; +import { useParams, useNavigate } from 'react-router-dom'; +import { TextField, Button, Paper, Typography, Box, Alert, IconButton, InputAdornment } from '@mui/material'; +import Visibility from '@mui/icons-material/Visibility'; +import VisibilityOff from '@mui/icons-material/VisibilityOff'; +import LockResetIcon from '@mui/icons-material/LockReset'; +import SendIcon from '@mui/icons-material/Send'; +function ResetPassword() { + const navigate = useNavigate(); + const { token } = useParams(); + const [password, setPassword] = useState(''); + const [confirmPassword, setConfirmPassword] = useState(''); + const [showPassword, setShowPassword] = useState(false); + const [message, setMessage] = useState(''); + const [isError, setIsError] = useState(false); + + const handleSubmit = async (e) => { + e.preventDefault(); + if (password !== confirmPassword) { + setMessage("Passwords do not match."); + setIsError(true); + return; + } + try { + const response = await axios.post(`/api/user/reset_password/${token}`, { password }); + setMessage(response.data.message); + setIsError(false); + // Navigate to auth page after a short delay + setTimeout(() => navigate('/auth'), 2000); // Redirects after 2 seconds + } catch (error) { + setMessage(error.response.data.error); + setIsError(true); + } + }; + + const handleClickShowPassword = () => { + setShowPassword(!showPassword); + }; + + + return ( + + + + Reset Your Password + +
+ setPassword(e.target.value)} + variant="outlined" + fullWidth + required + margin="normal" + InputProps={{ + endAdornment: ( + + + {showPassword ? : } + + + ) + }} + /> + setConfirmPassword(e.target.value)} + variant="outlined" + fullWidth + required + margin="normal" + InputProps={{ + endAdornment: ( + + + {showPassword ? : } + + + ) + }} + /> + + + {message && ( + + {message} + + )} +
+
+ ); +} + +export default ResetPassword; diff --git a/client/src/Components/requestPasswordReset.jsx b/client/src/Components/requestPasswordReset.jsx new file mode 100644 index 00000000..8f4aa16b --- /dev/null +++ b/client/src/Components/requestPasswordReset.jsx @@ -0,0 +1,70 @@ +import React, { useState } from 'react'; +import axios from 'axios'; +import { TextField, Button, Paper, Typography, Box,Alert, CircularProgress } from '@mui/material'; +import MailOutlineIcon from '@mui/icons-material/MailOutline'; // Importing an email icon +import SendIcon from '@mui/icons-material/Send'; // Importing the send icon + +function RequestPasswordReset() { + const [email, setEmail] = useState(''); + const [message, setMessage] = useState(''); + const [isError, setIsError] = useState(false); + const [isLoading, setIsLoading] = useState(false); + + const handleSubmit = async (e) => { + e.preventDefault(); + setIsLoading(true); + try { + const response = await axios.post('/api/user/request_reset', { email }); + setMessage(response.data.message); + setIsError(false); + } catch (error) { + setMessage(error.response?.data?.message || "Failed to send reset link. Please try again."); + setIsError(true); + } + setIsLoading(false); + }; + + return ( + + + + Reset Your Password + +
+ setEmail(e.target.value)} + variant="outlined" + fullWidth + required + margin="normal" + InputProps={{ + endAdornment: // Email icon in the TextField + }} + /> + + + {message && ( + + {message} + + )} +
+
+ ); +} + + +export default RequestPasswordReset; diff --git a/server/Dockerfile b/server/Dockerfile index 28d8dc73..8c094111 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -8,7 +8,7 @@ apt-get install --no-install-suggests --no-install-recommends -y pipx ffmpeg ENV PATH="/root/.local/bin:${PATH}" ENV FLASK_RUN_HOST=0.0.0.0 \ -FLASK_RUN_PORT=80 \ +FLASK_RUN_PORT=8000 \ FLASK_ENV=production RUN pipx install poetry @@ -23,4 +23,4 @@ COPY . ./ RUN mv .env.production .env # # Execute Flask -CMD poetry run gunicorn -b ${FLASK_RUN_HOST}:${FLASK_RUN_PORT} app:app \ No newline at end of file +CMD ["poetry", "run", "gunicorn", "-b", "0.0.0.0:8000", "app:app"] diff --git a/server/app.py b/server/app.py index d4277b5b..267700c6 100644 --- a/server/app.py +++ b/server/app.py @@ -41,6 +41,7 @@ def run_app(): mail = Mail(app) jwt = JWTManager(app) cors_config = { + r"*": { "origins": ["https://mental-health-app-web.azurewebsites.net", "127.0.0.1"], "methods": ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], @@ -53,7 +54,7 @@ def run_app(): } } CORS(app, resources=cors_config) - + # Register routes app.register_blueprint(user_routes) diff --git a/server/routes/ai.py b/server/routes/ai.py index fc44bb82..2ef19cfd 100644 --- a/server/routes/ai.py +++ b/server/routes/ai.py @@ -12,7 +12,7 @@ ai_routes = Blueprint("ai", __name__) -@ai_routes.post("/ai/mental_health/welcome/") +@ai_routes.post("/api/ai/mental_health/welcome/") def get_mental_health_agent_welcome(user_id): agent = MentalHealthAIAgent(tool_names=["web_search_tavily"]) @@ -27,7 +27,7 @@ def get_mental_health_agent_welcome(user_id): return jsonify(response), 200 -@ai_routes.post("/ai/mental_health//") +@ai_routes.post("/api/ai/mental_health//") def run_mental_health_agent(user_id, chat_id): body = request.get_json() if not body: @@ -57,7 +57,7 @@ def run_mental_health_agent(user_id, chat_id): return jsonify({"error": str(e)}), 500 -@ai_routes.patch("/ai/mental_health/finalize//") +@ai_routes.patch("/api/ai/mental_health/finalize//") def set_mental_health_end_state(user_id, chat_id): try: logger.info(f"Finalizing chat {chat_id} for user {user_id}") @@ -74,7 +74,7 @@ def set_mental_health_end_state(user_id, chat_id): return jsonify({"error": "Failed to finalize chat"}), 500 -@ai_routes.post("/ai/mental_health/voice-to-text") +@ai_routes.post("/api/ai/mental_health/voice-to-text") def handle_voice_input(): # Check if the part 'audio' is present in files if 'audio' not in request.files: diff --git a/server/routes/check_in.py b/server/routes/check_in.py index a379a4bc..9735ff84 100644 --- a/server/routes/check_in.py +++ b/server/routes/check_in.py @@ -26,7 +26,7 @@ check_in_routes = Blueprint("check-in", __name__) -@check_in_routes.post('/check-in/schedule') +@check_in_routes.post('/api/check-in/schedule') @jwt_required() def schedule_check_in(): try: # Parse and validate the request data using Pydantic model @@ -66,7 +66,7 @@ def schedule_check_in(): return jsonify({'error': str(e)}), 500 -@check_in_routes.patch('/check-in/') +@check_in_routes.patch('/api/check-in/') @jwt_required() def update_check_in(check_in_id): data = request.get_json() @@ -106,7 +106,7 @@ def update_check_in(check_in_id): except Exception as e: return jsonify({'error': str(e)}), 500 -@check_in_routes.get('/check-in/') +@check_in_routes.get('/api/check-in/') @jwt_required() def retrieve_check_in(check_in_id): logging.debug(f"Attempting to retrieve check-in with ID: {check_in_id}") @@ -127,7 +127,7 @@ def retrieve_check_in(check_in_id): logging.error(f"An unexpected error occurred: {str(e)}") return jsonify({'error': f"An unexpected error occurred: {str(e)}"}), 500 -@check_in_routes.delete('/check-in/') +@check_in_routes.delete('/api/check-in/') @jwt_required() def delete_check_in(check_in_id): try: @@ -141,7 +141,7 @@ def delete_check_in(check_in_id): except Exception as e: return jsonify({'error': str(e)}), 500 -@check_in_routes.get('/check-in/all') +@check_in_routes.get('/api/check-in/all') @jwt_required() def retrieve_all_check_ins(): user_id = request.args.get('user_id') @@ -160,7 +160,7 @@ def retrieve_all_check_ins(): return jsonify({'error': str(e)}), 500 -@check_in_routes.get('/check-in/missed') +@check_in_routes.get('/api/check-in/missed') @jwt_required() def check_missed_check_ins(): user_id = request.args.get('user_id') @@ -183,7 +183,7 @@ def check_missed_check_ins(): return jsonify({'message': 'No missed check-ins'}), 200 -@check_in_routes.route('/subscribe', methods=['POST']) +@check_in_routes.route('/api/subscribe', methods=['POST']) @jwt_required() def subscribe(): data = request.json @@ -217,7 +217,7 @@ def subscribe(): return jsonify({'message': 'Subscription saved successfully'}), 200 -@check_in_routes.route('/send_push', methods=['POST']) +@check_in_routes.route('/api/send_push', methods=['POST']) @jwt_required() def send_push(): data = request.json diff --git a/server/routes/user.py b/server/routes/user.py index 2cef64aa..0872ebc3 100644 --- a/server/routes/user.py +++ b/server/routes/user.py @@ -4,7 +4,8 @@ import csv import io import asyncio - +import os +from dotenv import load_dotenv from flask import Blueprint, request, jsonify, current_app from time import sleep from flask import Blueprint, request, jsonify, send_file @@ -21,6 +22,7 @@ from agents.mental_health_agent import MentalHealthAIAgent, HumanMessage from itsdangerous import URLSafeTimedSerializer, SignatureExpired, BadSignature from flask_mail import Message, Mail +load_dotenv() mail = Mail() def generate_reset_token(email): @@ -37,7 +39,7 @@ def verify_reset_token(token): user_routes = Blueprint("user", __name__) -@user_routes.post('/user/signup') +@user_routes.post('/api/user/signup') def signup(): try: logging.info("Starting user registration process") @@ -86,7 +88,7 @@ def signup(): return jsonify({"error": str(e)}), 400 -@user_routes.post('/user/anonymous_signin') +@user_routes.post('/api/user/anonymous_signin') def anonymous_signin(): try: # Set a reasonable expiration time for tokens, e.g., 24 hours @@ -103,7 +105,7 @@ def anonymous_signin(): return jsonify({"msg": "Failed to create access token"}), 500 -@user_routes.post('/user/login') +@user_routes.post('/api/user/login') def login(): try: username = request.json.get('username', None) @@ -124,7 +126,7 @@ def login(): return jsonify({"error": str(e)}), 500 -@user_routes.post('/user/logout') +@user_routes.post('/api/user/logout') @jwt_required() def logout(): # JWT Revocation or Blacklisting could be implemented here if needed @@ -133,7 +135,7 @@ def logout(): return jsonify({"msg": "Logout successful"}), 200 -@user_routes.get('/user/profile/') +@user_routes.get('/api/user/profile/') def get_public_profile(user_id): db_client = MongoDBClient.get_client() db = db_client[MongoDBClient.get_db_name()] @@ -157,7 +159,7 @@ def get_public_profile(user_id): return jsonify(user_data), 200 -@user_routes.patch('/user/profile/') +@user_routes.patch('/api/user/profile/') def update_profile_fields(user_id): update_fields = request.get_json() @@ -179,7 +181,7 @@ def update_profile_fields(user_id): return jsonify({"message": "User has been updated successfully."}), 200 -@user_routes.patch('/user/change_password/') +@user_routes.patch('/api/user/change_password/') def change_password(user_id): try: # Authenticate user @@ -212,7 +214,7 @@ def change_password(user_id): logging.error(f"Error changing password: {str(e)}") return jsonify({"error": str(e)}), 500 -@user_routes.post('/user/request_reset') +@user_routes.post('/api/user/request_reset') def request_password_reset(): email = request.json.get('email') user = UserModel.find_by_email(email) @@ -220,14 +222,15 @@ def request_password_reset(): return jsonify({"message": "No user found with this email"}), 404 token = generate_reset_token(user.email) - reset_url = f"{request.host_url}user/reset_password/{token}" - msg = Message("Password Reset Request", sender='yourapp@example.com', recipients=[user.email]) + base_url = os.getenv('RESET_PASSWORD_BASE_URL', 'http://localhost:3000/reset_password/') # Default if not set + reset_url = f"{base_url}{token}" + msg = Message("Password Reset Request", sender=os.getenv('MAIL_USERNAME'), recipients=[user.email]) msg.body = f"Please click on the link to reset your password: {reset_url}" mail.send(msg) return jsonify({"message": "Check your email for the reset password link"}), 200 -@user_routes.post('/user/reset_password/') +@user_routes.post('/api/user/reset_password/') def reset_password(token): new_password = request.json.get('password') user = verify_reset_token(token) @@ -240,7 +243,7 @@ def reset_password(token): return jsonify({"message": "Password has been reset successfully"}), 200 -@user_routes.post('/user/log_mood') +@user_routes.post('/api/user/log_mood') @jwt_required() def log_mood(): try: @@ -266,7 +269,7 @@ def log_mood(): return jsonify({"error": "Failed to log mood"}), 500 -@user_routes.get('/user/get_mood_logs') +@user_routes.get('/api/user/get_mood_logs') @jwt_required() def get_mood_logs(): try: @@ -280,7 +283,7 @@ def get_mood_logs(): return jsonify({"error": "Failed to retrieve mood logs"}), 500 -@user_routes.get('/user/download_chat_logs') +@user_routes.get('/api/user/download_chat_logs') @jwt_required() def download_chat_logs(): try: @@ -328,7 +331,7 @@ def download_chat_logs(): return jsonify({"error": "Failed to download chat logs"}), 500 -@user_routes.delete('/user/delete_chat_logs') +@user_routes.delete('/api/user/delete_chat_logs') @jwt_required() def delete_user_chat_logs(): try: @@ -347,7 +350,7 @@ def delete_user_chat_logs(): logging.error(f"Error deleting chat logs: {str(e)}") return jsonify({"error": "Failed to delete chat logs"}), 500 -@user_routes.delete('/user/delete_chat_logs/range') +@user_routes.delete('/api/user/delete_chat_logs/range') @jwt_required() def delete_user_chat_logs_in_range(): logging.info("Entered the delete route") @@ -387,7 +390,7 @@ def delete_user_chat_logs_in_range(): -@user_routes.get('/user/download_chat_logs/range') +@user_routes.get('/api/user/download_chat_logs/range') @jwt_required() def download_chat_logs_in_range(): try: