diff --git a/.env b/.env deleted file mode 100644 index 67dbc71..0000000 --- a/.env +++ /dev/null @@ -1,7 +0,0 @@ -VITE_apiKey=AIzaSyA9rwmAgjAlIC-gitEJi7lm5c8xlpgeOdY -VITE_authDomain=connection-280f7.firebaseapp.com -VITE_projectId=connection-280f7 -VITE_storageBucket=connection-280f7.appspot.com -VITE_messagingSenderId=514095534536 -VITE_appId=1:514095534536:web:6bca02ef3459c41bde70fd -VITE_databaseURL=https://connection-280f7-default-rtdb.europe-west1.firebasedatabase.app \ No newline at end of file diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index ce53ce2..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - root: true, - env: { browser: true, es2020: true }, - extends: [ - 'eslint:recommended', - 'plugin:react/recommended', - 'plugin:react/jsx-runtime', - 'plugin:react-hooks/recommended', - 'plugin:prettier/recommended' - ], - ignorePatterns: ['dist', '.eslintrc.cjs'], - parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, - settings: { react: { version: '18.2' } }, - plugins: ['react-refresh', 'prettier'], - rules: { - 'react/jsx-no-target-blank': 'off', - 'react-refresh/only-export-components': [ - 'warn', - { allowConstantExport: true }, - ], - 'prettier/prettier': [ - 'warn', - { - endOfLine: 'auto', - }, - ] - }, -} diff --git a/.firebaserc b/.firebaserc deleted file mode 100644 index 012ace3..0000000 --- a/.firebaserc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "projects": { - "default": "connection-280f7" - } -} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index e4fb9a5..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages - -on: - # Runs on pushes targeting the default branch - push: - branches: ['main'] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow one concurrent deployment -concurrency: - group: 'pages' - cancel-in-progress: true - -jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'npm' - - name: Install dependencies - run: npm ci - - name: Build - run: npm run build - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload dist folder - path: './dist' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore deleted file mode 100644 index a547bf3..0000000 --- a/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 369938e..0000000 --- a/.prettierignore +++ /dev/null @@ -1,7 +0,0 @@ -**/.git -**/.svn -**/.hg -**/node_modules -**/.scss -**/.css -**/.vue diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 213598e..0000000 --- a/.prettierrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "semi": true, - "tabWidth": 2, - "singleQuote": true, - "trailingComma": "all", - "bracketSpacing": true, - "arrowParens": "avoid", - "maxLineLength": 200 -} diff --git a/404.html b/404.html new file mode 100644 index 0000000..16584c7 --- /dev/null +++ b/404.html @@ -0,0 +1,19 @@ + + + + + + + + + + Connection + + + + + +
+ + + \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index fe6ac1e..0000000 --- a/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# React + Vite - -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. - -Currently, two official plugins are available: - -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh -"# react-template" -"# Connection" -"# Connection" diff --git a/assets/index-CbB4cIxE.js b/assets/index-CbB4cIxE.js new file mode 100644 index 0000000..8dcf839 --- /dev/null +++ b/assets/index-CbB4cIxE.js @@ -0,0 +1,8726 @@ +function ZU(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function _m(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function hc(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var qU={exports:{}},Wx={},eF={exports:{}},Nn={};/** + * @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 Y1=Symbol.for("react.element"),cY=Symbol.for("react.portal"),uY=Symbol.for("react.fragment"),fY=Symbol.for("react.strict_mode"),dY=Symbol.for("react.profiler"),hY=Symbol.for("react.provider"),pY=Symbol.for("react.context"),mY=Symbol.for("react.forward_ref"),gY=Symbol.for("react.suspense"),vY=Symbol.for("react.memo"),yY=Symbol.for("react.lazy"),iN=Symbol.iterator;function wY(t){return t===null||typeof t!="object"?null:(t=iN&&t[iN]||t["@@iterator"],typeof t=="function"?t:null)}var tF={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nF=Object.assign,rF={};function Mm(t,e,n){this.props=t,this.context=e,this.refs=rF,this.updater=n||tF}Mm.prototype.isReactComponent={};Mm.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};Mm.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function iF(){}iF.prototype=Mm.prototype;function nL(t,e,n){this.props=t,this.context=e,this.refs=rF,this.updater=n||tF}var rL=nL.prototype=new iF;rL.constructor=nL;nF(rL,Mm.prototype);rL.isPureReactComponent=!0;var sN=Array.isArray,sF=Object.prototype.hasOwnProperty,iL={current:null},oF={key:!0,ref:!0,__self:!0,__source:!0};function aF(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)sF.call(e,r)&&!oF.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,_e=j[de];if(0>>1;dei(we,ne))he<_e&&0>i(Ie,we)?(j[de]=Ie,j[he]=ne,de=he):(j[de]=we,j[ce]=ne,de=ce);else if(he<_e&&0>i(Ie,ne))j[de]=Ie,j[he]=ne,de=he;else break e}}return q}function i(j,q){var ne=j.sortIndex-q.sortIndex;return ne!==0?ne:j.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,v=!1,w=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(j){for(var q=n(c);q!==null;){if(q.callback===null)r(c);else if(q.startTime<=j)r(c),q.sortIndex=q.expirationTime,e(l,q);else break;q=n(c)}}function S(j){if(w=!1,x(j),!v)if(n(l)!==null)v=!0,ee(D);else{var q=n(c);q!==null&&le(S,q.startTime-j)}}function D(j,q){v=!1,w&&(w=!1,g(R),R=-1),m=!0;var ne=h;try{for(x(q),f=n(l);f!==null&&(!(f.expirationTime>q)||j&&!P());){var de=f.callback;if(typeof de=="function"){f.callback=null,h=f.priorityLevel;var _e=de(f.expirationTime<=q);q=t.unstable_now(),typeof _e=="function"?f.callback=_e:f===n(l)&&r(l),x(q)}else r(l);f=n(l)}if(f!==null)var ge=!0;else{var ce=n(c);ce!==null&&le(S,ce.startTime-q),ge=!1}return ge}finally{f=null,h=ne,m=!1}}var T=!1,E=null,R=-1,C=5,L=-1;function P(){return!(t.unstable_now()-Lj||125de?(j.sortIndex=ne,e(c,j),n(l)===null&&j===n(c)&&(w?(g(R),R=-1):w=!0,le(S,ne-de))):(j.sortIndex=_e,e(l,j),v||m||(v=!0,ee(D))),j},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(j){var q=h;return function(){var ne=h;h=q;try{return j.apply(this,arguments)}finally{h=ne}}}})(dF);fF.exports=dF;var LY=fF.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 RY=I,Ao=LY;function vt(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jA=Object.prototype.hasOwnProperty,PY=/^[: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]*$/,aN={},lN={};function DY(t){return jA.call(lN,t)?!0:jA.call(aN,t)?!1:PY.test(t)?lN[t]=!0:(aN[t]=!0,!1)}function NY(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function kY(t,e,n,r){if(e===null||typeof e>"u"||NY(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Fs(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Xi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Xi[t]=new Fs(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Xi[e]=new Fs(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Xi[t]=new Fs(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Xi[t]=new Fs(t,2,!1,t,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(t){Xi[t]=new Fs(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Xi[t]=new Fs(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Xi[t]=new Fs(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Xi[t]=new Fs(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Xi[t]=new Fs(t,5,!1,t.toLowerCase(),null,!1,!1)});var oL=/[\-:]([a-z])/g;function aL(t){return t[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(t){var e=t.replace(oL,aL);Xi[e]=new Fs(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(oL,aL);Xi[e]=new Fs(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(oL,aL);Xi[e]=new Fs(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Xi[t]=new Fs(t,1,!1,t.toLowerCase(),null,!1,!1)});Xi.xlinkHref=new Fs("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Xi[t]=new Fs(t,1,!1,t.toLowerCase(),null,!0,!0)});function lL(t,e,n,r){var i=Xi.hasOwnProperty(e)?Xi[e]:null;(i!==null?i.type!==0:r||!(2a||i[o]!==s[a]){var l=` +`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{bC=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?tg(t):""}function BY(t){switch(t.tag){case 5:return tg(t.type);case 16:return tg("Lazy");case 13:return tg("Suspense");case 19:return tg("SuspenseList");case 0:case 2:case 15:return t=SC(t.type,!1),t;case 11:return t=SC(t.type.render,!1),t;case 1:return t=SC(t.type,!0),t;default:return""}}function VA(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ep:return"Fragment";case qh:return"Portal";case zA:return"Profiler";case cL:return"StrictMode";case HA:return"Suspense";case GA:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case mF:return(t.displayName||"Context")+".Consumer";case pF:return(t._context.displayName||"Context")+".Provider";case uL:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case fL:return e=t.displayName||null,e!==null?e:VA(t.type)||"Memo";case zc:e=t._payload,t=t._init;try{return VA(t(e))}catch{}}return null}function OY(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return VA(e);case 8:return e===cL?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function yu(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function vF(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function UY(t){var e=vF(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Fy(t){t._valueTracker||(t._valueTracker=UY(t))}function yF(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=vF(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function nM(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function WA(t,e){var n=e.checked;return Br({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function uN(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=yu(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function wF(t,e){e=e.checked,e!=null&&lL(t,"checked",e,!1)}function $A(t,e){wF(t,e);var n=yu(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?JA(t,e.type,n):e.hasOwnProperty("defaultValue")&&JA(t,e.type,yu(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function fN(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function JA(t,e,n){(e!=="number"||nM(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var ng=Array.isArray;function gp(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=jy.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Xg(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var yg={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},FY=["Webkit","ms","Moz","O"];Object.keys(yg).forEach(function(t){FY.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),yg[e]=yg[t]})});function bF(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||yg.hasOwnProperty(t)&&yg[t]?(""+e).trim():e+"px"}function SF(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=bF(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var jY=Br({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 XA(t,e){if(e){if(jY[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(vt(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(vt(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(vt(61))}if(e.style!=null&&typeof e.style!="object")throw Error(vt(62))}}function KA(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 ZA=null;function dL(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var qA=null,vp=null,yp=null;function pN(t){if(t=K1(t)){if(typeof qA!="function")throw Error(vt(280));var e=t.stateNode;e&&(e=Xx(e),qA(t.stateNode,t.type,e))}}function CF(t){vp?yp?yp.push(t):yp=[t]:vp=t}function EF(){if(vp){var t=vp,e=yp;if(yp=vp=null,pN(t),e)for(t=0;t>>=0,t===0?32:31-(KY(t)/ZY|0)|0}var zy=64,Hy=4194304;function rg(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function oM(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=rg(a):(s&=o,s!==0&&(r=rg(s)))}else o=n&~i,o!==0?r=rg(o):s!==0&&(r=rg(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function Q1(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ra(e),t[e]=n}function nQ(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=_g),bN=" ",SN=!1;function $F(t,e){switch(t){case"keyup":return LQ.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function JF(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var tp=!1;function PQ(t,e){switch(t){case"compositionend":return JF(e);case"keypress":return e.which!==32?null:(SN=!0,bN);case"textInput":return t=e.data,t===bN&&SN?null:t;default:return null}}function DQ(t,e){if(tp)return t==="compositionend"||!_L&&$F(t,e)?(t=VF(),S_=vL=tu=null,tp=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=TN(n)}}function KF(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?KF(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function ZF(){for(var t=window,e=nM();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=nM(t.document)}return e}function ML(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function HQ(t){var e=ZF(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&KF(n.ownerDocument.documentElement,n)){if(r!==null&&ML(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=IN(n,s);var o=IN(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,np=null,sT=null,xg=null,oT=!1;function LN(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;oT||np==null||np!==nM(r)||(r=np,"selectionStart"in r&&ML(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}),xg&&n1(xg,r)||(xg=r,r=cM(sT,"onSelect"),0sp||(t.current=dT[sp],dT[sp]=null,sp--)}function _r(t,e){sp++,dT[sp]=t.current,t.current=e}var wu={},ys=Ru(wu),Ys=Ru(!1),ud=wu;function Op(t,e){var n=t.type.contextTypes;if(!n)return wu;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Qs(t){return t=t.childContextTypes,t!=null}function fM(){Sr(Ys),Sr(ys)}function ON(t,e,n){if(ys.current!==wu)throw Error(vt(168));_r(ys,e),_r(Ys,n)}function aj(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(vt(108,OY(t)||"Unknown",i));return Br({},n,r)}function dM(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||wu,ud=ys.current,_r(ys,t),_r(Ys,Ys.current),!0}function UN(t,e,n){var r=t.stateNode;if(!r)throw Error(vt(169));n?(t=aj(t,e,ud),r.__reactInternalMemoizedMergedChildContext=t,Sr(Ys),Sr(ys),_r(ys,t)):Sr(Ys),_r(Ys,n)}var zl=null,Kx=!1,UC=!1;function lj(t){zl===null?zl=[t]:zl.push(t)}function eX(t){Kx=!0,lj(t)}function Pu(){if(!UC&&zl!==null){UC=!0;var t=0,e=lr;try{var n=zl;for(lr=1;t>=o,i-=o,Wl=1<<32-Ra(e)+i|n<R?(C=E,E=null):C=E.sibling;var L=h(g,E,x[R],S);if(L===null){E===null&&(E=C);break}t&&E&&L.alternate===null&&e(g,E),_=s(L,_,R),T===null?D=L:T.sibling=L,T=L,E=C}if(R===x.length)return n(g,E),Ar&&Af(g,R),D;if(E===null){for(;RR?(C=E,E=null):C=E.sibling;var P=h(g,E,L.value,S);if(P===null){E===null&&(E=C);break}t&&E&&P.alternate===null&&e(g,E),_=s(P,_,R),T===null?D=P:T.sibling=P,T=P,E=C}if(L.done)return n(g,E),Ar&&Af(g,R),D;if(E===null){for(;!L.done;R++,L=x.next())L=f(g,L.value,S),L!==null&&(_=s(L,_,R),T===null?D=L:T.sibling=L,T=L);return Ar&&Af(g,R),D}for(E=r(g,E);!L.done;R++,L=x.next())L=m(E,g,R,L.value,S),L!==null&&(t&&L.alternate!==null&&E.delete(L.key===null?R:L.key),_=s(L,_,R),T===null?D=L:T.sibling=L,T=L);return t&&E.forEach(function(z){return e(g,z)}),Ar&&Af(g,R),D}function y(g,_,x,S){if(typeof x=="object"&&x!==null&&x.type===ep&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Uy:e:{for(var D=x.key,T=_;T!==null;){if(T.key===D){if(D=x.type,D===ep){if(T.tag===7){n(g,T.sibling),_=i(T,x.props.children),_.return=g,g=_;break e}}else if(T.elementType===D||typeof D=="object"&&D!==null&&D.$$typeof===zc&&zN(D)===T.type){n(g,T.sibling),_=i(T,x.props),_.ref=M0(g,T,x),_.return=g,g=_;break e}n(g,T);break}else e(g,T);T=T.sibling}x.type===ep?(_=td(x.props.children,g.mode,S,x.key),_.return=g,g=_):(S=P_(x.type,x.key,x.props,null,g.mode,S),S.ref=M0(g,_,x),S.return=g,g=S)}return o(g);case qh:e:{for(T=x.key;_!==null;){if(_.key===T)if(_.tag===4&&_.stateNode.containerInfo===x.containerInfo&&_.stateNode.implementation===x.implementation){n(g,_.sibling),_=i(_,x.children||[]),_.return=g,g=_;break e}else{n(g,_);break}else e(g,_);_=_.sibling}_=$C(x,g.mode,S),_.return=g,g=_}return o(g);case zc:return T=x._init,y(g,_,T(x._payload),S)}if(ng(x))return v(g,_,x,S);if(g0(x))return w(g,_,x,S);Qy(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,_!==null&&_.tag===6?(n(g,_.sibling),_=i(_,x),_.return=g,g=_):(n(g,_),_=WC(x,g.mode,S),_.return=g,g=_),o(g)):n(g,_)}return y}var Fp=dj(!0),hj=dj(!1),mM=Ru(null),gM=null,lp=null,CL=null;function EL(){CL=lp=gM=null}function AL(t){var e=mM.current;Sr(mM),t._currentValue=e}function mT(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function _p(t,e){gM=t,CL=lp=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&($s=!0),t.firstContext=null)}function ra(t){var e=t._currentValue;if(CL!==t)if(t={context:t,memoizedValue:e,next:null},lp===null){if(gM===null)throw Error(vt(308));lp=t,gM.dependencies={lanes:0,firstContext:t}}else lp=lp.next=t;return e}var Ff=null;function TL(t){Ff===null?Ff=[t]:Ff.push(t)}function pj(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,TL(e)):(n.next=i.next,i.next=n),e.interleaved=n,sc(t,r)}function sc(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Hc=!1;function IL(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mj(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Zl(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function cu(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Yn&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,sc(t,n)}return i=r.interleaved,i===null?(e.next=e,TL(r)):(e.next=i.next,i.next=e),r.interleaved=e,sc(t,n)}function E_(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,pL(t,n)}}function HN(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function vM(t,e,n,r){var i=t.updateQueue;Hc=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,u=c=l=null,a=s;do{var h=a.lane,m=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=t,w=a;switch(h=e,m=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){f=v.call(m,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,h=typeof v=="function"?v.call(m,f,h):v,h==null)break e;f=Br({},f,h);break e;case 2:Hc=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else m={eventTime:m,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=m,l=f):u=u.next=m,o|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(u===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);hd|=o,t.lanes=o,t.memoizedState=f}}function GN(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var r=jC.transition;jC.transition={};try{t(!1),e()}finally{lr=n,jC.transition=r}}function Pj(){return ia().memoizedState}function iX(t,e,n){var r=fu(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Dj(t))Nj(e,n);else if(n=pj(t,e,n,r),n!==null){var i=Ds();Pa(n,t,r,i),kj(n,e,r)}}function sX(t,e,n){var r=fu(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Dj(t))Nj(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Ba(a,o)){var l=e.interleaved;l===null?(i.next=i,TL(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=pj(t,e,i,r),n!==null&&(i=Ds(),Pa(n,t,r,i),kj(n,e,r))}}function Dj(t){var e=t.alternate;return t===Nr||e!==null&&e===Nr}function Nj(t,e){bg=wM=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function kj(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,pL(t,n)}}var _M={readContext:ra,useCallback:as,useContext:as,useEffect:as,useImperativeHandle:as,useInsertionEffect:as,useLayoutEffect:as,useMemo:as,useReducer:as,useRef:as,useState:as,useDebugValue:as,useDeferredValue:as,useTransition:as,useMutableSource:as,useSyncExternalStore:as,useId:as,unstable_isNewReconciler:!1},oX={readContext:ra,useCallback:function(t,e){return Xa().memoizedState=[t,e===void 0?null:e],t},useContext:ra,useEffect:WN,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,T_(4194308,4,Aj.bind(null,e,t),n)},useLayoutEffect:function(t,e){return T_(4194308,4,t,e)},useInsertionEffect:function(t,e){return T_(4,2,t,e)},useMemo:function(t,e){var n=Xa();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Xa();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=iX.bind(null,Nr,t),[r.memoizedState,t]},useRef:function(t){var e=Xa();return t={current:t},e.memoizedState=t},useState:VN,useDebugValue:OL,useDeferredValue:function(t){return Xa().memoizedState=t},useTransition:function(){var t=VN(!1),e=t[0];return t=rX.bind(null,t[1]),Xa().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Nr,i=Xa();if(Ar){if(n===void 0)throw Error(vt(407));n=n()}else{if(n=e(),Oi===null)throw Error(vt(349));dd&30||wj(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,WN(Mj.bind(null,r,s,t),[t]),r.flags|=2048,u1(9,_j.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=Xa(),e=Oi.identifierPrefix;if(Ar){var n=$l,r=Wl;n=(r&~(1<<32-Ra(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=l1++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[qa]=e,t[s1]=r,Wj(t,e,!1,!1),e.stateNode=t;e:{switch(o=KA(n,r),n){case"dialog":xr("cancel",t),xr("close",t),i=r;break;case"iframe":case"object":case"embed":xr("load",t),i=r;break;case"video":case"audio":for(i=0;iHp&&(e.flags|=128,r=!0,x0(s,!1),e.lanes=4194304)}else{if(!r)if(t=yM(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),x0(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ar)return ls(e),null}else 2*Kr()-s.renderingStartTime>Hp&&n!==1073741824&&(e.flags|=128,r=!0,x0(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Kr(),e.sibling=null,n=Rr.current,_r(Rr,r?n&1|2:n&1),e):(ls(e),null);case 22:case 23:return GL(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?uo&1073741824&&(ls(e),e.subtreeFlags&6&&(e.flags|=8192)):ls(e),null;case 24:return null;case 25:return null}throw Error(vt(156,e.tag))}function pX(t,e){switch(bL(e),e.tag){case 1:return Qs(e.type)&&fM(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return jp(),Sr(Ys),Sr(ys),PL(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return RL(e),null;case 13:if(Sr(Rr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(vt(340));Up()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Sr(Rr),null;case 4:return jp(),null;case 10:return AL(e.type._context),null;case 22:case 23:return GL(),null;case 24:return null;default:return null}}var Ky=!1,ms=!1,mX=typeof WeakSet=="function"?WeakSet:Set,jt=null;function cp(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Gr(t,e,r)}else n.current=null}function ST(t,e,n){try{n()}catch(r){Gr(t,e,r)}}var nk=!1;function gX(t,e){if(aT=aM,t=ZF(),ML(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,f=t,h=null;t:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===t)break t;if(h===n&&++c===i&&(a=o),h===s&&++u===r&&(l=o),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(lT={focusedElem:t,selectionRange:n},aM=!1,jt=e;jt!==null;)if(e=jt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,jt=t;else for(;jt!==null;){e=jt;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,y=v.memoizedState,g=e.stateNode,_=g.getSnapshotBeforeUpdate(e.elementType===e.type?w:ba(e.type,w),y);g.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(vt(163))}}catch(S){Gr(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,jt=t;break}jt=e.return}return v=nk,nk=!1,v}function Sg(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&ST(e,n,s)}i=i.next}while(i!==r)}}function eb(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function CT(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function Yj(t){var e=t.alternate;e!==null&&(t.alternate=null,Yj(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[qa],delete e[s1],delete e[fT],delete e[ZQ],delete e[qQ])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Qj(t){return t.tag===5||t.tag===3||t.tag===4}function rk(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Qj(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function ET(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=uM));else if(r!==4&&(t=t.child,t!==null))for(ET(t,e,n),t=t.sibling;t!==null;)ET(t,e,n),t=t.sibling}function AT(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(AT(t,e,n),t=t.sibling;t!==null;)AT(t,e,n),t=t.sibling}var Gi=null,Ca=!1;function Ec(t,e,n){for(n=n.child;n!==null;)Xj(t,e,n),n=n.sibling}function Xj(t,e,n){if(nl&&typeof nl.onCommitFiberUnmount=="function")try{nl.onCommitFiberUnmount($x,n)}catch{}switch(n.tag){case 5:ms||cp(n,e);case 6:var r=Gi,i=Ca;Gi=null,Ec(t,e,n),Gi=r,Ca=i,Gi!==null&&(Ca?(t=Gi,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Gi.removeChild(n.stateNode));break;case 18:Gi!==null&&(Ca?(t=Gi,n=n.stateNode,t.nodeType===8?OC(t.parentNode,n):t.nodeType===1&&OC(t,n),e1(t)):OC(Gi,n.stateNode));break;case 4:r=Gi,i=Ca,Gi=n.stateNode.containerInfo,Ca=!0,Ec(t,e,n),Gi=r,Ca=i;break;case 0:case 11:case 14:case 15:if(!ms&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&ST(n,e,o),i=i.next}while(i!==r)}Ec(t,e,n);break;case 1:if(!ms&&(cp(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Gr(n,e,a)}Ec(t,e,n);break;case 21:Ec(t,e,n);break;case 22:n.mode&1?(ms=(r=ms)||n.memoizedState!==null,Ec(t,e,n),ms=r):Ec(t,e,n);break;default:Ec(t,e,n)}}function ik(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new mX),e.forEach(function(r){var i=CX.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ya(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=Kr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yX(r/1960))-r,10t?16:t,nu===null)var r=!1;else{if(t=nu,nu=null,bM=0,Yn&6)throw Error(vt(331));var i=Yn;for(Yn|=4,jt=t.current;jt!==null;){var s=jt,o=s.child;if(jt.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lKr()-zL?ed(t,0):jL|=n),Xs(t,e)}function iz(t,e){e===0&&(t.mode&1?(e=Hy,Hy<<=1,!(Hy&130023424)&&(Hy=4194304)):e=1);var n=Ds();t=sc(t,e),t!==null&&(Q1(t,e,n),Xs(t,n))}function SX(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),iz(t,n)}function CX(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(vt(314))}r!==null&&r.delete(e),iz(t,n)}var sz;sz=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Ys.current)$s=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return $s=!1,dX(t,e,n);$s=!!(t.flags&131072)}else $s=!1,Ar&&e.flags&1048576&&cj(e,pM,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;I_(t,e),t=e.pendingProps;var i=Op(e,ys.current);_p(e,n),i=NL(null,e,r,t,i,n);var s=kL();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Qs(r)?(s=!0,dM(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,IL(e),i.updater=qx,e.stateNode=i,i._reactInternals=e,vT(e,r,t,n),e=_T(null,e,r,!0,s,n)):(e.tag=0,Ar&&s&&xL(e),Rs(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(I_(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=AX(r),t=ba(r,t),i){case 0:e=wT(null,e,r,t,n);break e;case 1:e=qN(null,e,r,t,n);break e;case 11:e=KN(null,e,r,t,n);break e;case 14:e=ZN(null,e,r,ba(r.type,t),n);break e}throw Error(vt(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:ba(r,i),wT(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:ba(r,i),qN(t,e,r,i,n);case 3:e:{if(Hj(e),t===null)throw Error(vt(387));r=e.pendingProps,s=e.memoizedState,i=s.element,mj(t,e),vM(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=zp(Error(vt(423)),e),e=ek(t,e,r,n,i);break e}else if(r!==i){i=zp(Error(vt(424)),e),e=ek(t,e,r,n,i);break e}else for(go=lu(e.stateNode.containerInfo.firstChild),bo=e,Ar=!0,Aa=null,n=hj(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Up(),r===i){e=oc(t,e,n);break e}Rs(t,e,r,n)}e=e.child}return e;case 5:return gj(e),t===null&&pT(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,cT(r,i)?o=null:s!==null&&cT(r,s)&&(e.flags|=32),zj(t,e),Rs(t,e,o,n),e.child;case 6:return t===null&&pT(e),null;case 13:return Gj(t,e,n);case 4:return LL(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Fp(e,null,r,n):Rs(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:ba(r,i),KN(t,e,r,i,n);case 7:return Rs(t,e,e.pendingProps,n),e.child;case 8:return Rs(t,e,e.pendingProps.children,n),e.child;case 12:return Rs(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,_r(mM,r._currentValue),r._currentValue=o,s!==null)if(Ba(s.value,o)){if(s.children===i.children&&!Ys.current){e=oc(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Zl(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),mT(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(vt(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),mT(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Rs(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,_p(e,n),i=ra(i),r=r(i),e.flags|=1,Rs(t,e,r,n),e.child;case 14:return r=e.type,i=ba(r,e.pendingProps),i=ba(r.type,i),ZN(t,e,r,i,n);case 15:return Fj(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:ba(r,i),I_(t,e),e.tag=1,Qs(r)?(t=!0,dM(e)):t=!1,_p(e,n),Bj(e,r,i),vT(e,r,i,n),_T(null,e,r,!0,t,n);case 19:return Vj(t,e,n);case 22:return jj(t,e,n)}throw Error(vt(156,e.tag))};function oz(t,e){return DF(t,e)}function EX(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 qo(t,e,n,r){return new EX(t,e,n,r)}function WL(t){return t=t.prototype,!(!t||!t.isReactComponent)}function AX(t){if(typeof t=="function")return WL(t)?1:0;if(t!=null){if(t=t.$$typeof,t===uL)return 11;if(t===fL)return 14}return 2}function du(t,e){var n=t.alternate;return n===null?(n=qo(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function P_(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")WL(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case ep:return td(n.children,i,s,e);case cL:o=8,i|=8;break;case zA:return t=qo(12,n,e,i|2),t.elementType=zA,t.lanes=s,t;case HA:return t=qo(13,n,e,i),t.elementType=HA,t.lanes=s,t;case GA:return t=qo(19,n,e,i),t.elementType=GA,t.lanes=s,t;case gF:return nb(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case pF:o=10;break e;case mF:o=9;break e;case uL:o=11;break e;case fL:o=14;break e;case zc:o=16,r=null;break e}throw Error(vt(130,t==null?t:typeof t,""))}return e=qo(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function td(t,e,n,r){return t=qo(7,t,r,e),t.lanes=n,t}function nb(t,e,n,r){return t=qo(22,t,r,e),t.elementType=gF,t.lanes=n,t.stateNode={isHidden:!1},t}function WC(t,e,n){return t=qo(6,t,null,e),t.lanes=n,t}function $C(t,e,n){return e=qo(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function TX(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=EC(0),this.expirationTimes=EC(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=EC(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $L(t,e,n,r,i,s,o,a,l){return t=new TX(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=qo(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},IL(s),t}function IX(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uz)}catch(t){console.error(t)}}uz(),uF.exports=Io;var md=uF.exports;const sg=_m(md),NX=ZU({__proto__:null,default:sg},[md]);var dk=md;FA.createRoot=dk.createRoot,FA.hydrateRoot=dk.hydrateRoot;/** + * @remix-run/router v1.17.0 + * + * 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 Lr(){return Lr=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function Gp(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function BX(){return Math.random().toString(36).substr(2,8)}function pk(t,e){return{usr:t.state,key:t.key,idx:e}}function d1(t,e,n,r){return n===void 0&&(n=null),Lr({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Du(e):e,{state:n,key:e&&e.key||r||BX()})}function q1(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Du(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function OX(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=pi.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(Lr({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function f(){a=pi.Pop;let y=u(),g=y==null?null:y-c;c=y,l&&l({action:a,location:w.location,delta:g})}function h(y,g){a=pi.Push;let _=d1(w.location,y,g);c=u()+1;let x=pk(_,c),S=w.createHref(_);try{o.pushState(x,"",S)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;i.location.assign(S)}s&&l&&l({action:a,location:w.location,delta:1})}function m(y,g){a=pi.Replace;let _=d1(w.location,y,g);c=u();let x=pk(_,c),S=w.createHref(_);o.replaceState(x,"",S),s&&l&&l({action:a,location:w.location,delta:0})}function v(y){let g=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof y=="string"?y:q1(y);return _=_.replace(/ $/,"%20"),Ln(g,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,g)}let w={get action(){return a},get location(){return t(i,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(hk,f),l=y,()=>{i.removeEventListener(hk,f),l=null}},createHref(y){return e(i,y)},createURL:v,encodeLocation(y){let g=v(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:m,go(y){return o.go(y)}};return w}var yr;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(yr||(yr={}));const UX=new Set(["lazy","caseSensitive","path","id","index","children"]);function FX(t){return t.index===!0}function h1(t,e,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),t.map((i,s)=>{let o=[...n,String(s)],a=typeof i.id=="string"?i.id:o.join("-");if(Ln(i.index!==!0||!i.children,"Cannot specify children on an index route"),Ln(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),FX(i)){let l=Lr({},i,e(i),{id:a});return r[a]=l,l}else{let l=Lr({},i,e(i),{id:a,children:void 0});return r[a]=l,i.children&&(l.children=h1(i.children,e,o,r)),l}})}function Nf(t,e,n){return n===void 0&&(n="/"),D_(t,e,n,!1)}function D_(t,e,n,r){let i=typeof e=="string"?Du(e):e,s=ev(i.pathname||"/",n);if(s==null)return null;let o=fz(t);zX(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Ln(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=hu([r,l.relativePath]),u=n.concat(l);s.children&&s.children.length>0&&(Ln(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),fz(s.children,e,u,c)),!(s.path==null&&!s.index)&&e.push({path:c,score:YX(c,s.index),routesMeta:u})};return t.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of dz(s.path))i(s,o,l)}),e}function dz(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=dz(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function zX(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:QX(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const HX=/^:[\w-]+$/,GX=3,VX=2,WX=1,$X=10,JX=-2,mk=t=>t==="*";function YX(t,e){let n=t.split("/"),r=n.length;return n.some(mk)&&(r+=JX),e&&(r+=VX),n.filter(i=>!mk(i)).reduce((i,s)=>i+(HX.test(s)?GX:s===""?WX:$X),r)}function QX(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function XX(t,e,n){n===void 0&&(n=!1);let{routesMeta:r}=t,i={},s="/",o=[];for(let a=0;a{let{paramName:h,isOptional:m}=u;if(h==="*"){let w=a[f]||"";o=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const v=a[f];return m&&!v?c[h]=void 0:c[h]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:t}}function KX(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Gp(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function ZX(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Gp(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function ev(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function qX(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Du(t):t;return{pathname:n?n.startsWith("/")?n:eK(n,e):e,search:nK(r),hash:rK(i)}}function eK(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function JC(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` 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 hz(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function XL(t,e){let n=hz(t);return e?n.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function KL(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=Du(t):(i=Lr({},t),Ln(!i.pathname||!i.pathname.includes("?"),JC("?","pathname","search",i)),Ln(!i.pathname||!i.pathname.includes("#"),JC("#","pathname","hash",i)),Ln(!i.search||!i.search.includes("#"),JC("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let f=e.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}a=f>=0?e[f]:"/"}let l=qX(i,a),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const hu=t=>t.join("/").replace(/\/\/+/g,"/"),tK=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),nK=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,rK=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class ZL{constructor(e,n,r,i){i===void 0&&(i=!1),this.status=e,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ab(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const pz=["post","put","patch","delete"],iK=new Set(pz),sK=["get",...pz],oK=new Set(sK),aK=new Set([301,302,303,307,308]),lK=new Set([307,308]),YC={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},cK={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},S0={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},qL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,uK=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),mz="remix-router-transitions";function fK(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",r=!n;Ln(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let ue=t.detectErrorBoundary;i=me=>({hasErrorBoundary:ue(me)})}else i=uK;let s={},o=h1(t.routes,i,void 0,s),a,l=t.basename||"/",c=t.unstable_dataStrategy||gK,u=t.unstable_patchRoutesOnMiss,f=Lr({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},t.future),h=null,m=new Set,v=null,w=null,y=null,g=t.hydrationData!=null,_=Nf(o,t.history.location,l),x=null;if(_==null&&!u){let ue=Ls(404,{pathname:t.history.location.pathname}),{matches:me,route:Se}=Ek(o);_=me,x={[Se.id]:ue}}let S;if(!_)S=!1,_=[];else if(_.some(ue=>ue.route.lazy))S=!1;else if(!_.some(ue=>ue.route.loader))S=!0;else if(f.v7_partialHydration){let ue=t.hydrationData?t.hydrationData.loaderData:null,me=t.hydrationData?t.hydrationData.errors:null,Se=Ge=>Ge.route.loader?typeof Ge.route.loader=="function"&&Ge.route.loader.hydrate===!0?!1:ue&&ue[Ge.route.id]!==void 0||me&&me[Ge.route.id]!==void 0:!0;if(me){let Ge=_.findIndex(mt=>me[mt.route.id]!==void 0);S=_.slice(0,Ge+1).every(Se)}else S=_.every(Se)}else S=t.hydrationData!=null;let D,T={historyAction:t.history.action,location:t.history.location,matches:_,initialized:S,navigation:YC,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||x,fetchers:new Map,blockers:new Map},E=pi.Pop,R=!1,C,L=!1,P=new Map,z=null,B=!1,Y=!1,ie=[],ee=[],le=new Map,j=0,q=-1,ne=new Map,de=new Set,_e=new Map,ge=new Map,ce=new Set,we=new Map,he=new Map,Ie=new Map,et=!1;function ct(){if(h=t.history.listen(ue=>{let{action:me,location:Se,delta:Ge}=ue;if(et){et=!1;return}Gp(he.size===0||Ge!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let mt=fe({currentLocation:T.location,nextLocation:Se,historyAction:me});if(mt&&Ge!=null){et=!0,t.history.go(Ge*-1),st(mt,{state:"blocked",location:Se,proceed(){st(mt,{state:"proceeding",proceed:void 0,reset:void 0,location:Se}),t.history.go(Ge)},reset(){let bt=new Map(T.blockers);bt.set(mt,S0),$({blockers:bt})}});return}return Ue(me,Se)}),n){IK(e,P);let ue=()=>LK(e,P);e.addEventListener("pagehide",ue),z=()=>e.removeEventListener("pagehide",ue)}return T.initialized||Ue(pi.Pop,T.location,{initialHydration:!0}),D}function it(){h&&h(),z&&z(),m.clear(),C&&C.abort(),T.fetchers.forEach((ue,me)=>_t(me)),T.blockers.forEach((ue,me)=>pe(me))}function ut(ue){return m.add(ue),()=>m.delete(ue)}function $(ue,me){me===void 0&&(me={}),T=Lr({},T,ue);let Se=[],Ge=[];f.v7_fetcherPersist&&T.fetchers.forEach((mt,bt)=>{mt.state==="idle"&&(ce.has(bt)?Ge.push(bt):Se.push(bt))}),[...m].forEach(mt=>mt(T,{deletedFetchers:Ge,unstable_viewTransitionOpts:me.viewTransitionOpts,unstable_flushSync:me.flushSync===!0})),f.v7_fetcherPersist&&(Se.forEach(mt=>T.fetchers.delete(mt)),Ge.forEach(mt=>_t(mt)))}function Ce(ue,me,Se){var Ge,mt;let{flushSync:bt}=Se===void 0?{}:Se,ot=T.actionData!=null&&T.navigation.formMethod!=null&&Ea(T.navigation.formMethod)&&T.navigation.state==="loading"&&((Ge=ue.state)==null?void 0:Ge._isRedirect)!==!0,gt;me.actionData?Object.keys(me.actionData).length>0?gt=me.actionData:gt=null:ot?gt=T.actionData:gt=null;let Gt=me.loaderData?Sk(T.loaderData,me.loaderData,me.matches||[],me.errors):T.loaderData,F=T.blockers;F.size>0&&(F=new Map(F),F.forEach((U,J)=>F.set(J,S0)));let W=R===!0||T.navigation.formMethod!=null&&Ea(T.navigation.formMethod)&&((mt=ue.state)==null?void 0:mt._isRedirect)!==!0;a&&(o=a,a=void 0),B||E===pi.Pop||(E===pi.Push?t.history.push(ue,ue.state):E===pi.Replace&&t.history.replace(ue,ue.state));let ae;if(E===pi.Pop){let U=P.get(T.location.pathname);U&&U.has(ue.pathname)?ae={currentLocation:T.location,nextLocation:ue}:P.has(ue.pathname)&&(ae={currentLocation:ue,nextLocation:T.location})}else if(L){let U=P.get(T.location.pathname);U?U.add(ue.pathname):(U=new Set([ue.pathname]),P.set(T.location.pathname,U)),ae={currentLocation:T.location,nextLocation:ue}}$(Lr({},me,{actionData:gt,loaderData:Gt,historyAction:E,location:ue,initialized:!0,navigation:YC,revalidation:"idle",restoreScrollPosition:rn(ue,me.matches||T.matches),preventScrollReset:W,blockers:F}),{viewTransitionOpts:ae,flushSync:bt===!0}),E=pi.Pop,R=!1,L=!1,B=!1,Y=!1,ie=[],ee=[]}async function Ne(ue,me){if(typeof ue=="number"){t.history.go(ue);return}let Se=PT(T.location,T.matches,l,f.v7_prependBasename,ue,f.v7_relativeSplatPath,me==null?void 0:me.fromRouteId,me==null?void 0:me.relative),{path:Ge,submission:mt,error:bt}=vk(f.v7_normalizeFormMethod,!1,Se,me),ot=T.location,gt=d1(T.location,Ge,me&&me.state);gt=Lr({},gt,t.history.encodeLocation(gt));let Gt=me&&me.replace!=null?me.replace:void 0,F=pi.Push;Gt===!0?F=pi.Replace:Gt===!1||mt!=null&&Ea(mt.formMethod)&&mt.formAction===T.location.pathname+T.location.search&&(F=pi.Replace);let W=me&&"preventScrollReset"in me?me.preventScrollReset===!0:void 0,ae=(me&&me.unstable_flushSync)===!0,U=fe({currentLocation:ot,nextLocation:gt,historyAction:F});if(U){st(U,{state:"blocked",location:gt,proceed(){st(U,{state:"proceeding",proceed:void 0,reset:void 0,location:gt}),Ne(ue,me)},reset(){let J=new Map(T.blockers);J.set(U,S0),$({blockers:J})}});return}return await Ue(F,gt,{submission:mt,pendingError:bt,preventScrollReset:W,replace:me&&me.replace,enableViewTransition:me&&me.unstable_viewTransition,flushSync:ae})}function ze(){if(Qe(),$({revalidation:"loading"}),T.navigation.state!=="submitting"){if(T.navigation.state==="idle"){Ue(T.historyAction,T.location,{startUninterruptedRevalidation:!0});return}Ue(E||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation})}}async function Ue(ue,me,Se){C&&C.abort(),C=null,E=ue,B=(Se&&Se.startUninterruptedRevalidation)===!0,Jt(T.location,T.matches),R=(Se&&Se.preventScrollReset)===!0,L=(Se&&Se.enableViewTransition)===!0;let Ge=a||o,mt=Se&&Se.overrideNavigation,bt=Nf(Ge,me,l),ot=(Se&&Se.flushSync)===!0,gt=Jn(bt,Ge,me.pathname);if(gt.active&>.matches&&(bt=gt.matches),!bt){let{error:K,notFoundMatches:se,route:te}=Pe(me.pathname);Ce(me,{matches:se,loaderData:{},errors:{[te.id]:K}},{flushSync:ot});return}if(T.initialized&&!Y&&xK(T.location,me)&&!(Se&&Se.submission&&Ea(Se.submission.formMethod))){Ce(me,{matches:bt},{flushSync:ot});return}C=new AbortController;let Gt=mh(t.history,me,C.signal,Se&&Se.submission),F;if(Se&&Se.pendingError)F=[Ag(bt).route.id,{type:yr.error,error:Se.pendingError}];else if(Se&&Se.submission&&Ea(Se.submission.formMethod)){let K=await Et(Gt,me,Se.submission,bt,gt.active,{replace:Se.replace,flushSync:ot});if(K.shortCircuited)return;if(K.pendingActionResult){let[se,te]=K.pendingActionResult;if(fo(te)&&ab(te.error)&&te.error.status===404){C=null,Ce(me,{matches:K.matches,loaderData:{},errors:{[se]:te.error}});return}}bt=K.matches||bt,F=K.pendingActionResult,mt=QC(me,Se.submission),ot=!1,gt.active=!1,Gt=mh(t.history,Gt.url,Gt.signal)}let{shortCircuited:W,matches:ae,loaderData:U,errors:J}=await lt(Gt,me,bt,gt.active,mt,Se&&Se.submission,Se&&Se.fetcherSubmission,Se&&Se.replace,Se&&Se.initialHydration===!0,ot,F);W||(C=null,Ce(me,Lr({matches:ae||bt},Ck(F),{loaderData:U,errors:J})))}async function Et(ue,me,Se,Ge,mt,bt){bt===void 0&&(bt={}),Qe();let ot=AK(me,Se);if($({navigation:ot},{flushSync:bt.flushSync===!0}),mt){let F=await jn(Ge,me.pathname,ue.signal);if(F.type==="aborted")return{shortCircuited:!0};if(F.type==="error"){let{error:W,notFoundMatches:ae,route:U}=rt(me.pathname,F);return{matches:ae,pendingActionResult:[U.id,{type:yr.error,error:W}]}}else if(F.matches)Ge=F.matches;else{let{notFoundMatches:W,error:ae,route:U}=Pe(me.pathname);return{matches:W,pendingActionResult:[U.id,{type:yr.error,error:ae}]}}}let gt,Gt=og(Ge,me);if(!Gt.route.action&&!Gt.route.lazy)gt={type:yr.error,error:Ls(405,{method:ue.method,pathname:me.pathname,routeId:Gt.route.id})};else if(gt=(await He("action",ue,[Gt],Ge))[0],ue.signal.aborted)return{shortCircuited:!0};if(Hf(gt)){let F;return bt&&bt.replace!=null?F=bt.replace:F=Mk(gt.response.headers.get("Location"),new URL(ue.url),l)===T.location.pathname+T.location.search,await De(ue,gt,{submission:Se,replace:F}),{shortCircuited:!0}}if(zf(gt))throw Ls(400,{type:"defer-action"});if(fo(gt)){let F=Ag(Ge,Gt.route.id);return(bt&&bt.replace)!==!0&&(E=pi.Push),{matches:Ge,pendingActionResult:[F.route.id,gt]}}return{matches:Ge,pendingActionResult:[Gt.route.id,gt]}}async function lt(ue,me,Se,Ge,mt,bt,ot,gt,Gt,F,W){let ae=mt||QC(me,bt),U=bt||ot||Ik(ae),J=!B&&(!f.v7_partialHydration||!Gt);if(Ge){if(J){let St=yt(W);$(Lr({navigation:ae},St!==void 0?{actionData:St}:{}),{flushSync:F})}let qe=await jn(Se,me.pathname,ue.signal);if(qe.type==="aborted")return{shortCircuited:!0};if(qe.type==="error"){let{error:St,notFoundMatches:at,route:Oe}=rt(me.pathname,qe);return{matches:at,loaderData:{},errors:{[Oe.id]:St}}}else if(qe.matches)Se=qe.matches;else{let{error:St,notFoundMatches:at,route:Oe}=Pe(me.pathname);return{matches:at,loaderData:{},errors:{[Oe.id]:St}}}}let K=a||o,[se,te]=yk(t.history,T,Se,U,me,f.v7_partialHydration&&Gt===!0,f.unstable_skipActionErrorRevalidation,Y,ie,ee,ce,_e,de,K,l,W);if(It(qe=>!(Se&&Se.some(St=>St.route.id===qe))||se&&se.some(St=>St.route.id===qe)),q=++j,se.length===0&&te.length===0){let qe=Tt();return Ce(me,Lr({matches:Se,loaderData:{},errors:W&&fo(W[1])?{[W[0]]:W[1].error}:null},Ck(W),qe?{fetchers:new Map(T.fetchers)}:{}),{flushSync:F}),{shortCircuited:!0}}if(J){let qe={};if(!Ge){qe.navigation=ae;let St=yt(W);St!==void 0&&(qe.actionData=St)}te.length>0&&(qe.fetchers=re(te)),$(qe,{flushSync:F})}te.forEach(qe=>{le.has(qe.key)&&We(qe.key),qe.controller&&le.set(qe.key,qe.controller)});let ve=()=>te.forEach(qe=>We(qe.key));C&&C.signal.addEventListener("abort",ve);let{loaderResults:xe,fetcherResults:Te}=await pt(T.matches,Se,se,te,ue);if(ue.signal.aborted)return{shortCircuited:!0};C&&C.signal.removeEventListener("abort",ve),te.forEach(qe=>le.delete(qe.key));let Ae=Ak([...xe,...Te]);if(Ae){if(Ae.idx>=se.length){let qe=te[Ae.idx-se.length].key;de.add(qe)}return await De(ue,Ae.result,{replace:gt}),{shortCircuited:!0}}let{loaderData:ht,errors:Ve}=bk(T,Se,se,xe,W,te,Te,we);we.forEach((qe,St)=>{qe.subscribe(at=>{(at||qe.done)&&we.delete(St)})}),f.v7_partialHydration&&Gt&&T.errors&&Object.entries(T.errors).filter(qe=>{let[St]=qe;return!se.some(at=>at.route.id===St)}).forEach(qe=>{let[St,at]=qe;Ve=Object.assign(Ve||{},{[St]:at})});let $e=Tt(),ft=Ft(q),Mt=$e||ft||te.length>0;return Lr({matches:Se,loaderData:ht,errors:Ve},Mt?{fetchers:new Map(T.fetchers)}:{})}function yt(ue){if(ue&&!fo(ue[1]))return{[ue[0]]:ue[1].data};if(T.actionData)return Object.keys(T.actionData).length===0?null:T.actionData}function re(ue){return ue.forEach(me=>{let Se=T.fetchers.get(me.key),Ge=C0(void 0,Se?Se.data:void 0);T.fetchers.set(me.key,Ge)}),new Map(T.fetchers)}function V(ue,me,Se,Ge){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");le.has(ue)&&We(ue);let mt=(Ge&&Ge.unstable_flushSync)===!0,bt=a||o,ot=PT(T.location,T.matches,l,f.v7_prependBasename,Se,f.v7_relativeSplatPath,me,Ge==null?void 0:Ge.relative),gt=Nf(bt,ot,l),Gt=Jn(gt,bt,ot);if(Gt.active&&Gt.matches&&(gt=Gt.matches),!gt){Ke(ue,me,Ls(404,{pathname:ot}),{flushSync:mt});return}let{path:F,submission:W,error:ae}=vk(f.v7_normalizeFormMethod,!0,ot,Ge);if(ae){Ke(ue,me,ae,{flushSync:mt});return}let U=og(gt,F);if(R=(Ge&&Ge.preventScrollReset)===!0,W&&Ea(W.formMethod)){Ee(ue,me,F,U,gt,Gt.active,mt,W);return}_e.set(ue,{routeId:me,path:F}),je(ue,me,F,U,gt,Gt.active,mt,W)}async function Ee(ue,me,Se,Ge,mt,bt,ot,gt){Qe(),_e.delete(ue);function Gt(Oe){if(!Oe.route.action&&!Oe.route.lazy){let kt=Ls(405,{method:gt.formMethod,pathname:Se,routeId:me});return Ke(ue,me,kt,{flushSync:ot}),!0}return!1}if(!bt&&Gt(Ge))return;let F=T.fetchers.get(ue);Ye(ue,TK(gt,F),{flushSync:ot});let W=new AbortController,ae=mh(t.history,Se,W.signal,gt);if(bt){let Oe=await jn(mt,Se,ae.signal);if(Oe.type==="aborted")return;if(Oe.type==="error"){let{error:kt}=rt(Se,Oe);Ke(ue,me,kt,{flushSync:ot});return}else if(Oe.matches){if(mt=Oe.matches,Ge=og(mt,Se),Gt(Ge))return}else{Ke(ue,me,Ls(404,{pathname:Se}),{flushSync:ot});return}}le.set(ue,W);let U=j,K=(await He("action",ae,[Ge],mt))[0];if(ae.signal.aborted){le.get(ue)===W&&le.delete(ue);return}if(f.v7_fetcherPersist&&ce.has(ue)){if(Hf(K)||fo(K)){Ye(ue,jc(void 0));return}}else{if(Hf(K))if(le.delete(ue),q>U){Ye(ue,jc(void 0));return}else return de.add(ue),Ye(ue,C0(gt)),De(ae,K,{fetcherSubmission:gt});if(fo(K)){Ke(ue,me,K.error);return}}if(zf(K))throw Ls(400,{type:"defer-action"});let se=T.navigation.location||T.location,te=mh(t.history,se,W.signal),ve=a||o,xe=T.navigation.state!=="idle"?Nf(ve,T.navigation.location,l):T.matches;Ln(xe,"Didn't find any matches after fetcher action");let Te=++j;ne.set(ue,Te);let Ae=C0(gt,K.data);T.fetchers.set(ue,Ae);let[ht,Ve]=yk(t.history,T,xe,gt,se,!1,f.unstable_skipActionErrorRevalidation,Y,ie,ee,ce,_e,de,ve,l,[Ge.route.id,K]);Ve.filter(Oe=>Oe.key!==ue).forEach(Oe=>{let kt=Oe.key,Pt=T.fetchers.get(kt),Ut=C0(void 0,Pt?Pt.data:void 0);T.fetchers.set(kt,Ut),le.has(kt)&&We(kt),Oe.controller&&le.set(kt,Oe.controller)}),$({fetchers:new Map(T.fetchers)});let $e=()=>Ve.forEach(Oe=>We(Oe.key));W.signal.addEventListener("abort",$e);let{loaderResults:ft,fetcherResults:Mt}=await pt(T.matches,xe,ht,Ve,te);if(W.signal.aborted)return;W.signal.removeEventListener("abort",$e),ne.delete(ue),le.delete(ue),Ve.forEach(Oe=>le.delete(Oe.key));let qe=Ak([...ft,...Mt]);if(qe){if(qe.idx>=ht.length){let Oe=Ve[qe.idx-ht.length].key;de.add(Oe)}return De(te,qe.result)}let{loaderData:St,errors:at}=bk(T,T.matches,ht,ft,void 0,Ve,Mt,we);if(T.fetchers.has(ue)){let Oe=jc(K.data);T.fetchers.set(ue,Oe)}Ft(Te),T.navigation.state==="loading"&&Te>q?(Ln(E,"Expected pending action"),C&&C.abort(),Ce(T.navigation.location,{matches:xe,loaderData:St,errors:at,fetchers:new Map(T.fetchers)})):($({errors:at,loaderData:Sk(T.loaderData,St,xe,at),fetchers:new Map(T.fetchers)}),Y=!1)}async function je(ue,me,Se,Ge,mt,bt,ot,gt){let Gt=T.fetchers.get(ue);Ye(ue,C0(gt,Gt?Gt.data:void 0),{flushSync:ot});let F=new AbortController,W=mh(t.history,Se,F.signal);if(bt){let K=await jn(mt,Se,W.signal);if(K.type==="aborted")return;if(K.type==="error"){let{error:se}=rt(Se,K);Ke(ue,me,se,{flushSync:ot});return}else if(K.matches)mt=K.matches,Ge=og(mt,Se);else{Ke(ue,me,Ls(404,{pathname:Se}),{flushSync:ot});return}}le.set(ue,F);let ae=j,J=(await He("loader",W,[Ge],mt))[0];if(zf(J)&&(J=await _z(J,W.signal,!0)||J),le.get(ue)===F&&le.delete(ue),!W.signal.aborted){if(ce.has(ue)){Ye(ue,jc(void 0));return}if(Hf(J))if(q>ae){Ye(ue,jc(void 0));return}else{de.add(ue),await De(W,J);return}if(fo(J)){Ke(ue,me,J.error);return}Ln(!zf(J),"Unhandled fetcher deferred data"),Ye(ue,jc(J.data))}}async function De(ue,me,Se){let{submission:Ge,fetcherSubmission:mt,replace:bt}=Se===void 0?{}:Se;me.response.headers.has("X-Remix-Revalidate")&&(Y=!0);let ot=me.response.headers.get("Location");Ln(ot,"Expected a Location header on the redirect Response"),ot=Mk(ot,new URL(ue.url),l);let gt=d1(T.location,ot,{_isRedirect:!0});if(n){let J=!1;if(me.response.headers.has("X-Remix-Reload-Document"))J=!0;else if(qL.test(ot)){const K=t.history.createURL(ot);J=K.origin!==e.location.origin||ev(K.pathname,l)==null}if(J){bt?e.location.replace(ot):e.location.assign(ot);return}}C=null;let Gt=bt===!0?pi.Replace:pi.Push,{formMethod:F,formAction:W,formEncType:ae}=T.navigation;!Ge&&!mt&&F&&W&&ae&&(Ge=Ik(T.navigation));let U=Ge||mt;if(lK.has(me.response.status)&&U&&Ea(U.formMethod))await Ue(Gt,gt,{submission:Lr({},U,{formAction:ot}),preventScrollReset:R});else{let J=QC(gt,Ge);await Ue(Gt,gt,{overrideNavigation:J,fetcherSubmission:mt,preventScrollReset:R})}}async function He(ue,me,Se,Ge){try{let mt=await vK(c,ue,me,Se,Ge,s,i);return await Promise.all(mt.map((bt,ot)=>{if(SK(bt)){let gt=bt.result;return{type:yr.redirect,response:_K(gt,me,Se[ot].route.id,Ge,l,f.v7_relativeSplatPath)}}return wK(bt)}))}catch(mt){return Se.map(()=>({type:yr.error,error:mt}))}}async function pt(ue,me,Se,Ge,mt){let[bt,...ot]=await Promise.all([Se.length?He("loader",mt,Se,me):[],...Ge.map(gt=>{if(gt.matches&>.match&>.controller){let Gt=mh(t.history,gt.path,gt.controller.signal);return He("loader",Gt,[gt.match],gt.matches).then(F=>F[0])}else return Promise.resolve({type:yr.error,error:Ls(404,{pathname:gt.path})})})]);return await Promise.all([Tk(ue,Se,bt,bt.map(()=>mt.signal),!1,T.loaderData),Tk(ue,Ge.map(gt=>gt.match),ot,Ge.map(gt=>gt.controller?gt.controller.signal:null),!0)]),{loaderResults:bt,fetcherResults:ot}}function Qe(){Y=!0,ie.push(...It()),_e.forEach((ue,me)=>{le.has(me)&&(ee.push(me),We(me))})}function Ye(ue,me,Se){Se===void 0&&(Se={}),T.fetchers.set(ue,me),$({fetchers:new Map(T.fetchers)},{flushSync:(Se&&Se.flushSync)===!0})}function Ke(ue,me,Se,Ge){Ge===void 0&&(Ge={});let mt=Ag(T.matches,me);_t(ue),$({errors:{[mt.route.id]:Se},fetchers:new Map(T.fetchers)},{flushSync:(Ge&&Ge.flushSync)===!0})}function nt(ue){return f.v7_fetcherPersist&&(ge.set(ue,(ge.get(ue)||0)+1),ce.has(ue)&&ce.delete(ue)),T.fetchers.get(ue)||cK}function _t(ue){let me=T.fetchers.get(ue);le.has(ue)&&!(me&&me.state==="loading"&&ne.has(ue))&&We(ue),_e.delete(ue),ne.delete(ue),de.delete(ue),ce.delete(ue),T.fetchers.delete(ue)}function Qt(ue){if(f.v7_fetcherPersist){let me=(ge.get(ue)||0)-1;me<=0?(ge.delete(ue),ce.add(ue)):ge.set(ue,me)}else _t(ue);$({fetchers:new Map(T.fetchers)})}function We(ue){let me=le.get(ue);Ln(me,"Expected fetch controller: "+ue),me.abort(),le.delete(ue)}function Ze(ue){for(let me of ue){let Se=nt(me),Ge=jc(Se.data);T.fetchers.set(me,Ge)}}function Tt(){let ue=[],me=!1;for(let Se of de){let Ge=T.fetchers.get(Se);Ln(Ge,"Expected fetcher: "+Se),Ge.state==="loading"&&(de.delete(Se),ue.push(Se),me=!0)}return Ze(ue),me}function Ft(ue){let me=[];for(let[Se,Ge]of ne)if(Ge0}function en(ue,me){let Se=T.blockers.get(ue)||S0;return he.get(ue)!==me&&he.set(ue,me),Se}function pe(ue){T.blockers.delete(ue),he.delete(ue)}function st(ue,me){let Se=T.blockers.get(ue)||S0;Ln(Se.state==="unblocked"&&me.state==="blocked"||Se.state==="blocked"&&me.state==="blocked"||Se.state==="blocked"&&me.state==="proceeding"||Se.state==="blocked"&&me.state==="unblocked"||Se.state==="proceeding"&&me.state==="unblocked","Invalid blocker state transition: "+Se.state+" -> "+me.state);let Ge=new Map(T.blockers);Ge.set(ue,me),$({blockers:Ge})}function fe(ue){let{currentLocation:me,nextLocation:Se,historyAction:Ge}=ue;if(he.size===0)return;he.size>1&&Gp(!1,"A router only supports one blocker at a time");let mt=Array.from(he.entries()),[bt,ot]=mt[mt.length-1],gt=T.blockers.get(bt);if(!(gt&>.state==="proceeding")&&ot({currentLocation:me,nextLocation:Se,historyAction:Ge}))return bt}function Pe(ue){let me=Ls(404,{pathname:ue}),Se=a||o,{matches:Ge,route:mt}=Ek(Se);return It(),{notFoundMatches:Ge,route:mt,error:me}}function rt(ue,me){let Se=me.partialMatches,Ge=Se[Se.length-1].route,mt=Ls(400,{type:"route-discovery",routeId:Ge.id,pathname:ue,message:me.error!=null&&"message"in me.error?me.error:String(me.error)});return{notFoundMatches:Se,route:Ge,error:mt}}function It(ue){let me=[];return we.forEach((Se,Ge)=>{(!ue||ue(Ge))&&(Se.cancel(),me.push(Ge),we.delete(Ge))}),me}function Le(ue,me,Se){if(v=ue,y=me,w=Se||null,!g&&T.navigation===YC){g=!0;let Ge=rn(T.location,T.matches);Ge!=null&&$({restoreScrollPosition:Ge})}return()=>{v=null,y=null,w=null}}function At(ue,me){return w&&w(ue,me.map(Ge=>jX(Ge,T.loaderData)))||ue.key}function Jt(ue,me){if(v&&y){let Se=At(ue,me);v[Se]=y()}}function rn(ue,me){if(v){let Se=At(ue,me),Ge=v[Se];if(typeof Ge=="number")return Ge}return null}function Jn(ue,me,Se){if(u)if(ue){if(ue[ue.length-1].route.path==="*")return{active:!0,matches:D_(me,Se,l,!0)}}else return{active:!0,matches:D_(me,Se,l,!0)||[]};return{active:!1,matches:null}}async function jn(ue,me,Se){let Ge=ue,mt=Ge.length>0?Ge[Ge.length-1].route:null;for(;;){try{await mK(u,me,Ge,o||a,s,i,Ie,Se)}catch(F){return{type:"error",error:F,partialMatches:Ge}}if(Se.aborted)return{type:"aborted"};let bt=a||o,ot=Nf(bt,me,l),gt=!1;if(ot){let F=ot[ot.length-1].route;if(F.index)return{type:"success",matches:ot};if(F.path&&F.path.length>0)if(F.path==="*")gt=!0;else return{type:"success",matches:ot}}let Gt=D_(bt,me,l,!0);if(!Gt||Ge.map(F=>F.route.id).join("-")===Gt.map(F=>F.route.id).join("-"))return{type:"success",matches:gt?ot:null};if(Ge=Gt,mt=Ge[Ge.length-1].route,mt.path==="*")return{type:"success",matches:Ge}}}function vn(ue){s={},a=h1(ue,i,void 0,s)}return D={get basename(){return l},get future(){return f},get state(){return T},get routes(){return o},get window(){return e},initialize:ct,subscribe:ut,enableScrollRestoration:Le,navigate:Ne,fetch:V,revalidate:ze,createHref:ue=>t.history.createHref(ue),encodeLocation:ue=>t.history.encodeLocation(ue),getFetcher:nt,deleteFetcher:Qt,dispose:it,getBlocker:en,deleteBlocker:pe,patchRoutes(ue,me){return vz(ue,me,o||a,s,i)},_internalFetchControllers:le,_internalActiveDeferreds:we,_internalSetRoutes:vn},D}function dK(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function PT(t,e,n,r,i,s,o,a){let l,c;if(o){l=[];for(let f of e)if(l.push(f),f.route.id===o){c=f;break}}else l=e,c=e[e.length-1];let u=KL(i||".",XL(l,s),ev(t.pathname,n)||t.pathname,a==="path");return i==null&&(u.search=t.search,u.hash=t.hash),(i==null||i===""||i===".")&&c&&c.route.index&&!e4(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:hu([n,u.pathname])),q1(u)}function vk(t,e,n,r){if(!r||!dK(r))return{path:n};if(r.formMethod&&!EK(r.formMethod))return{path:n,error:Ls(405,{method:r.formMethod})};let i=()=>({path:n,error:Ls(400,{type:"invalid-body"})}),s=r.formMethod||"get",o=t?s.toUpperCase():s.toLowerCase(),a=yz(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ea(o))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,v)=>{let[w,y]=v;return""+m+w+"="+y+` +`},""):String(r.body);return{path:n,submission:{formMethod:o,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Ea(o))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:a,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}Ln(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=DT(r.formData),c=r.formData;else if(r.body instanceof FormData)l=DT(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=xk(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=xk(l)}catch{return i()}let u={formMethod:o,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Ea(u.formMethod))return{path:n,submission:u};let f=Du(n);return e&&f.search&&e4(f.search)&&l.append("index",""),f.search="?"+l,{path:q1(f),submission:u}}function hK(t,e){let n=t;if(e){let r=t.findIndex(i=>i.route.id===e);r>=0&&(n=t.slice(0,r))}return n}function yk(t,e,n,r,i,s,o,a,l,c,u,f,h,m,v,w){let y=w?fo(w[1])?w[1].error:w[1].data:void 0,g=t.createURL(e.location),_=t.createURL(i),x=w&&fo(w[1])?w[0]:void 0,S=x?hK(n,x):n,D=w?w[1].statusCode:void 0,T=o&&D&&D>=400,E=S.filter((C,L)=>{let{route:P}=C;if(P.lazy)return!0;if(P.loader==null)return!1;if(s)return typeof P.loader!="function"||P.loader.hydrate?!0:e.loaderData[P.id]===void 0&&(!e.errors||e.errors[P.id]===void 0);if(pK(e.loaderData,e.matches[L],C)||l.some(Y=>Y===C.route.id))return!0;let z=e.matches[L],B=C;return wk(C,Lr({currentUrl:g,currentParams:z.params,nextUrl:_,nextParams:B.params},r,{actionResult:y,unstable_actionStatus:D,defaultShouldRevalidate:T?!1:a||g.pathname+g.search===_.pathname+_.search||g.search!==_.search||gz(z,B)}))}),R=[];return f.forEach((C,L)=>{if(s||!n.some(ie=>ie.route.id===C.routeId)||u.has(L))return;let P=Nf(m,C.path,v);if(!P){R.push({key:L,routeId:C.routeId,path:C.path,matches:null,match:null,controller:null});return}let z=e.fetchers.get(L),B=og(P,C.path),Y=!1;h.has(L)?Y=!1:c.includes(L)?Y=!0:z&&z.state!=="idle"&&z.data===void 0?Y=a:Y=wk(B,Lr({currentUrl:g,currentParams:e.matches[e.matches.length-1].params,nextUrl:_,nextParams:n[n.length-1].params},r,{actionResult:y,unstable_actionStatus:D,defaultShouldRevalidate:T?!1:a})),Y&&R.push({key:L,routeId:C.routeId,path:C.path,matches:P,match:B,controller:new AbortController})}),[E,R]}function pK(t,e,n){let r=!e||n.route.id!==e.route.id,i=t[n.route.id]===void 0;return r||i}function gz(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function wk(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}async function mK(t,e,n,r,i,s,o,a){let l=[e,...n.map(c=>c.route.id)].join("-");try{let c=o.get(l);c||(c=t({path:e,matches:n,patch:(u,f)=>{a.aborted||vz(u,f,r,i,s)}}),o.set(l,c)),c&&bK(c)&&await c}finally{o.delete(l)}}function vz(t,e,n,r,i){if(t){var s;let o=r[t];Ln(o,"No route found to patch children into: routeId = "+t);let a=h1(e,i,[t,"patch",String(((s=o.children)==null?void 0:s.length)||"0")],r);o.children?o.children.push(...a):o.children=a}else{let o=h1(e,i,["patch",String(n.length||"0")],r);n.push(...o)}}async function _k(t,e,n){if(!t.lazy)return;let r=await t.lazy();if(!t.lazy)return;let i=n[t.id];Ln(i,"No route found in manifest");let s={};for(let o in r){let l=i[o]!==void 0&&o!=="hasErrorBoundary";Gp(!l,'Route "'+i.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!UX.has(o)&&(s[o]=r[o])}Object.assign(i,s),Object.assign(i,Lr({},e(i),{lazy:void 0}))}function gK(t){return Promise.all(t.matches.map(e=>e.resolve()))}async function vK(t,e,n,r,i,s,o,a){let l=r.reduce((f,h)=>f.add(h.route.id),new Set),c=new Set,u=await t({matches:i.map(f=>{let h=l.has(f.route.id);return Lr({},f,{shouldLoad:h,resolve:v=>(c.add(f.route.id),h?yK(e,n,f,s,o,v,a):Promise.resolve({type:yr.data,result:void 0}))})}),request:n,params:i[0].params,context:a});return i.forEach(f=>Ln(c.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),u.filter((f,h)=>l.has(i[h].route.id))}async function yK(t,e,n,r,i,s,o){let a,l,c=u=>{let f,h=new Promise((w,y)=>f=y);l=()=>f(),e.signal.addEventListener("abort",l);let m=w=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+n.route.id+"]"))):u({request:e,params:n.params,context:o},...w!==void 0?[w]:[]),v;return s?v=s(w=>m(w)):v=(async()=>{try{return{type:"data",result:await m()}}catch(w){return{type:"error",result:w}}})(),Promise.race([v,h])};try{let u=n.route[t];if(n.route.lazy)if(u){let f,[h]=await Promise.all([c(u).catch(m=>{f=m}),_k(n.route,i,r)]);if(f!==void 0)throw f;a=h}else if(await _k(n.route,i,r),u=n.route[t],u)a=await c(u);else if(t==="action"){let f=new URL(e.url),h=f.pathname+f.search;throw Ls(405,{method:e.method,pathname:h,routeId:n.route.id})}else return{type:yr.data,result:void 0};else if(u)a=await c(u);else{let f=new URL(e.url),h=f.pathname+f.search;throw Ls(404,{pathname:h})}Ln(a.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:yr.error,result:u}}finally{l&&e.signal.removeEventListener("abort",l)}return a}async function wK(t){let{result:e,type:n,status:r}=t;if(wz(e)){let o;try{let a=e.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?e.body==null?o=null:o=await e.json():o=await e.text()}catch(a){return{type:yr.error,error:a}}return n===yr.error?{type:yr.error,error:new ZL(e.status,e.statusText,o),statusCode:e.status,headers:e.headers}:{type:yr.data,data:o,statusCode:e.status,headers:e.headers}}if(n===yr.error)return{type:yr.error,error:e,statusCode:ab(e)?e.status:r};if(CK(e)){var i,s;return{type:yr.deferred,deferredData:e,statusCode:(i=e.init)==null?void 0:i.status,headers:((s=e.init)==null?void 0:s.headers)&&new Headers(e.init.headers)}}return{type:yr.data,data:e,statusCode:r}}function _K(t,e,n,r,i,s){let o=t.headers.get("Location");if(Ln(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!qL.test(o)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);o=PT(new URL(e.url),a,i,!0,o,s),t.headers.set("Location",o)}return t}function Mk(t,e,n){if(qL.test(t)){let r=t,i=r.startsWith("//")?new URL(e.protocol+r):new URL(r),s=ev(i.pathname,n)!=null;if(i.origin===e.origin&&s)return i.pathname+i.search+i.hash}return t}function mh(t,e,n,r){let i=t.createURL(yz(e)).toString(),s={signal:n};if(r&&Ea(r.formMethod)){let{formMethod:o,formEncType:a}=r;s.method=o.toUpperCase(),a==="application/json"?(s.headers=new Headers({"Content-Type":a}),s.body=JSON.stringify(r.json)):a==="text/plain"?s.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?s.body=DT(r.formData):s.body=r.formData}return new Request(i,s)}function DT(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function xk(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function MK(t,e,n,r,i,s){let o={},a=null,l,c=!1,u={},f=r&&fo(r[1])?r[1].error:void 0;return n.forEach((h,m)=>{let v=e[m].route.id;if(Ln(!Hf(h),"Cannot handle redirect results in processLoaderData"),fo(h)){let w=h.error;f!==void 0&&(w=f,f=void 0),a=a||{};{let y=Ag(t,v);a[y.route.id]==null&&(a[y.route.id]=w)}o[v]=void 0,c||(c=!0,l=ab(h.error)?h.error.status:500),h.headers&&(u[v]=h.headers)}else zf(h)?(i.set(v,h.deferredData),o[v]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!c&&(l=h.statusCode),h.headers&&(u[v]=h.headers)):(o[v]=h.data,h.statusCode&&h.statusCode!==200&&!c&&(l=h.statusCode),h.headers&&(u[v]=h.headers))}),f!==void 0&&r&&(a={[r[0]]:f},o[r[0]]=void 0),{loaderData:o,errors:a,statusCode:l||200,loaderHeaders:u}}function bk(t,e,n,r,i,s,o,a){let{loaderData:l,errors:c}=MK(e,n,r,i,a);for(let u=0;ur.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function Ek(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Ls(t,e){let{pathname:n,routeId:r,method:i,type:s,message:o}=e===void 0?{}:e,a="Unknown Server Error",l="Unknown @remix-run/router error";return t===400?(a="Bad Request",s==="route-discovery"?l='Unable to match URL "'+n+'" - the `children()` function for '+("route `"+r+"` threw the following error:\n"+o):i&&n&&r?l="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":s==="defer-action"?l="defer() is not supported in actions":s==="invalid-body"&&(l="Unable to encode submission body")):t===403?(a="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):t===404?(a="Not Found",l='No route matches URL "'+n+'"'):t===405&&(a="Method Not Allowed",i&&n&&r?l="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new ZL(t||500,a,new Error(l),!0)}function Ak(t){for(let e=t.length-1;e>=0;e--){let n=t[e];if(Hf(n))return{result:n,idx:e}}}function yz(t){let e=typeof t=="string"?Du(t):t;return q1(Lr({},e,{hash:""}))}function xK(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function bK(t){return typeof t=="object"&&t!=null&&"then"in t}function SK(t){return wz(t.result)&&aK.has(t.result.status)}function zf(t){return t.type===yr.deferred}function fo(t){return t.type===yr.error}function Hf(t){return(t&&t.type)===yr.redirect}function CK(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function wz(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function EK(t){return oK.has(t.toLowerCase())}function Ea(t){return iK.has(t.toLowerCase())}async function Tk(t,e,n,r,i,s){for(let o=0;of.route.id===l.route.id),u=c!=null&&!gz(c,l)&&(s&&s[l.route.id])!==void 0;if(zf(a)&&(i||u)){let f=r[o];Ln(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await _z(a,f,i).then(h=>{h&&(n[o]=h||n[o])})}}}async function _z(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:yr.data,data:t.deferredData.unwrappedData}}catch(i){return{type:yr.error,error:i}}return{type:yr.data,data:t.deferredData.data}}}function e4(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function og(t,e){let n=typeof e=="string"?Du(e).search:e.search;if(t[t.length-1].route.index&&e4(n||""))return t[t.length-1];let r=hz(t);return r[r.length-1]}function Ik(t){let{formMethod:e,formAction:n,formEncType:r,text:i,formData:s,json:o}=t;if(!(!e||!n||!r)){if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:e,formAction:n,formEncType:r,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function QC(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function AK(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function C0(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function TK(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function jc(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function IK(t,e){try{let n=t.sessionStorage.getItem(mz);if(n){let r=JSON.parse(n);for(let[i,s]of Object.entries(r||{}))s&&Array.isArray(s)&&e.set(i,new Set(s||[]))}}catch{}}function LK(t,e){if(e.size>0){let n={};for(let[r,i]of e)n[r]=[...i];try{t.sessionStorage.setItem(mz,JSON.stringify(n))}catch(r){Gp(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + * React Router v6.24.0 + * + * 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 EM(){return EM=Object.assign?Object.assign.bind():function(t){for(var e=1;e{a.current=!0}),I.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=KL(c,JSON.parse(o),s,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:hu([e,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[e,r,o,s,t])}const PK=I.createContext(null);function DK(t){let e=I.useContext(Nu).outlet;return e&&I.createElement(PK.Provider,{value:t},e)}function NK(t,e,n,r){nv()||Ln(!1);let{navigator:i}=I.useContext(tv),{matches:s}=I.useContext(Nu),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=n4(),u;u=c;let f=u.pathname||"/",h=f;if(l!=="/"){let w=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let m=Nf(t,{pathname:h});return FK(m&&m.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:hu([l,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:hu([l,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,r)}function kK(){let t=Ez(),e=ab(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},e),n?I.createElement("pre",{style:i},n):null,null)}const BK=I.createElement(kK,null);class OK extends I.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?I.createElement(Nu.Provider,{value:this.props.routeContext},I.createElement(xz.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function UK(t){let{routeContext:e,match:n,children:r}=t,i=I.useContext(lb);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),I.createElement(Nu.Provider,{value:e},r)}function FK(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var s;if((s=n)!=null&&s.errors)t=n.matches;else return null}let o=t,a=(i=n)==null?void 0:i.errors;if(a!=null){let u=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);u>=0||Ln(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,f,h)=>{let m,v=!1,w=null,y=null;n&&(m=a&&f.route.id?a[f.route.id]:void 0,w=f.route.errorElement||BK,l&&(c<0&&h===0?(v=!0,y=null):c===h&&(v=!0,y=f.route.hydrateFallbackElement||null)));let g=e.concat(o.slice(0,h+1)),_=()=>{let x;return m?x=w:v?x=y:f.route.Component?x=I.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=u,I.createElement(UK,{match:f,routeContext:{outlet:u,matches:g,isDataRoute:n!=null},children:x})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?I.createElement(OK,{location:n.location,revalidation:n.revalidation,component:w,error:m,children:_(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):_()},null)}var Sz=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(Sz||{}),AM=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(AM||{});function jK(t){let e=I.useContext(lb);return e||Ln(!1),e}function zK(t){let e=I.useContext(Mz);return e||Ln(!1),e}function HK(t){let e=I.useContext(Nu);return e||Ln(!1),e}function Cz(t){let e=HK(),n=e.matches[e.matches.length-1];return n.route.id||Ln(!1),n.route.id}function Ez(){var t;let e=I.useContext(xz),n=zK(AM.UseRouteError),r=Cz(AM.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function GK(){let{router:t}=jK(Sz.UseNavigateStable),e=Cz(AM.UseNavigateStable),n=I.useRef(!1);return bz(()=>{n.current=!0}),I.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,EM({fromRouteId:e},s)))},[t,e])}function VK(t){let{to:e,replace:n,state:r,relative:i}=t;nv()||Ln(!1);let{future:s,static:o}=I.useContext(tv),{matches:a}=I.useContext(Nu),{pathname:l}=n4(),c=yl(),u=KL(e,XL(a,s.v7_relativeSplatPath),l,i==="path"),f=JSON.stringify(u);return I.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:i}),[c,f,i,n,r]),null}function WK(t){return DK(t.context)}function $K(t){let{basename:e="/",children:n=null,location:r,navigationType:i=pi.Pop,navigator:s,static:o=!1,future:a}=t;nv()&&Ln(!1);let l=e.replace(/^\/*/,"/"),c=I.useMemo(()=>({basename:l,navigator:s,static:o,future:EM({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Du(r));let{pathname:u="/",search:f="",hash:h="",state:m=null,key:v="default"}=r,w=I.useMemo(()=>{let y=ev(u,l);return y==null?null:{location:{pathname:y,search:f,hash:h,state:m,key:v},navigationType:i}},[l,u,f,h,m,v,i]);return w==null?null:I.createElement(tv.Provider,{value:c},I.createElement(t4.Provider,{children:n,value:w}))}new Promise(()=>{});function JK(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:I.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:I.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:I.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** + * React Router DOM v6.24.0 + * + * 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 TM(){return TM=Object.assign?Object.assign.bind():function(t){for(var e=1;e{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}};function iZ(t){let{fallbackElement:e,router:n,future:r}=t,[i,s]=I.useState(n.state),[o,a]=I.useState(),[l,c]=I.useState({isTransitioning:!1}),[u,f]=I.useState(),[h,m]=I.useState(),[v,w]=I.useState(),y=I.useRef(new Map),{v7_startTransition:g}=r||{},_=I.useCallback(E=>{g?nZ(E):E()},[g]),x=I.useCallback((E,R)=>{let{deletedFetchers:C,unstable_flushSync:L,unstable_viewTransitionOpts:P}=R;C.forEach(B=>y.current.delete(B)),E.fetchers.forEach((B,Y)=>{B.data!==void 0&&y.current.set(Y,B.data)});let z=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!P||z){L?E0(()=>s(E)):_(()=>s(E));return}if(L){E0(()=>{h&&(u&&u.resolve(),h.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:P.currentLocation,nextLocation:P.nextLocation})});let B=n.window.document.startViewTransition(()=>{E0(()=>s(E))});B.finished.finally(()=>{E0(()=>{f(void 0),m(void 0),a(void 0),c({isTransitioning:!1})})}),E0(()=>m(B));return}h?(u&&u.resolve(),h.skipTransition(),w({state:E,currentLocation:P.currentLocation,nextLocation:P.nextLocation})):(a(E),c({isTransitioning:!0,flushSync:!1,currentLocation:P.currentLocation,nextLocation:P.nextLocation}))},[n.window,h,u,y,_]);I.useLayoutEffect(()=>n.subscribe(x),[n,x]),I.useEffect(()=>{l.isTransitioning&&!l.flushSync&&f(new rZ)},[l]),I.useEffect(()=>{if(u&&o&&n.window){let E=o,R=u.promise,C=n.window.document.startViewTransition(async()=>{_(()=>s(E)),await R});C.finished.finally(()=>{f(void 0),m(void 0),a(void 0),c({isTransitioning:!1})}),m(C)}},[_,o,u,n.window]),I.useEffect(()=>{u&&o&&i.location.key===o.location.key&&u.resolve()},[u,h,i.location,o]),I.useEffect(()=>{!l.isTransitioning&&v&&(a(v.state),c({isTransitioning:!0,flushSync:!1,currentLocation:v.currentLocation,nextLocation:v.nextLocation}),w(void 0))},[l.isTransitioning,v]),I.useEffect(()=>{},[]);let S=I.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:E=>n.navigate(E),push:(E,R,C)=>n.navigate(E,{state:R,preventScrollReset:C==null?void 0:C.preventScrollReset}),replace:(E,R,C)=>n.navigate(E,{replace:!0,state:R,preventScrollReset:C==null?void 0:C.preventScrollReset})}),[n]),D=n.basename||"/",T=I.useMemo(()=>({router:n,navigator:S,static:!1,basename:D}),[n,S,D]);return I.createElement(I.Fragment,null,I.createElement(lb.Provider,{value:T},I.createElement(Mz.Provider,{value:i},I.createElement(qK.Provider,{value:y.current},I.createElement(ZK.Provider,{value:l},I.createElement($K,{basename:D,location:i.location,navigationType:i.historyAction,navigator:S,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},i.initialized||n.future.v7_partialHydration?I.createElement(sZ,{routes:n.routes,future:n.future,state:i}):e))))),null)}function sZ(t){let{routes:e,future:n,state:r}=t;return NK(e,void 0,r,n)}var Pk;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Pk||(Pk={}));var Dk;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Dk||(Dk={}));var Az={exports:{}},oZ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",aZ=oZ,lZ=aZ;function Tz(){}function Iz(){}Iz.resetWarningCache=Tz;var cZ=function(){function t(r,i,s,o,a,l){if(l!==lZ){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Iz,resetWarningCache:Tz};return n.PropTypes=n,n};Az.exports=cZ();var uZ=Az.exports;const Cn=_m(uZ);Lz.propTypes={router:Cn.object};function Lz({router:t}){return O.jsx("div",{className:"wrapper",children:O.jsx("div",{className:"content",children:O.jsx(iZ,{router:t})})})}function X(){return X=Object.assign?Object.assign.bind():function(t){for(var e=1;e0?Wi(Sm,--Zs):0,Vp--,gi===10&&(Vp=1,ub--),gi}function So(){return gi=Zs2||m1(gi)>3?"":" "}function EZ(t,e){for(;--e&&So()&&!(gi<48||gi>102||gi>57&&gi<65||gi>70&&gi<97););return rv(t,N_()+(e<6&&il()==32&&So()==32))}function kT(t){for(;So();)switch(gi){case t:return Zs;case 34:case 39:t!==34&&t!==39&&kT(gi);break;case 40:t===41&&kT(t);break;case 92:So();break}return Zs}function AZ(t,e){for(;So()&&t+gi!==57;)if(t+gi===84&&il()===47)break;return"/*"+rv(e,Zs-1)+"*"+cb(t===47?t:So())}function TZ(t){for(;!m1(il());)So();return rv(t,Zs)}function IZ(t){return Oz(B_("",null,null,null,[""],t=Bz(t),0,[0],t))}function B_(t,e,n,r,i,s,o,a,l){for(var c=0,u=0,f=o,h=0,m=0,v=0,w=1,y=1,g=1,_=0,x="",S=i,D=s,T=r,E=x;y;)switch(v=_,_=So()){case 40:if(v!=108&&Wi(E,f-1)==58){NT(E+=rr(k_(_),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:E+=k_(_);break;case 9:case 10:case 13:case 32:E+=CZ(v);break;case 92:E+=EZ(N_()-1,7);continue;case 47:switch(il()){case 42:case 47:ew(LZ(AZ(So(),N_()),e,n),l);break;default:E+="/"}break;case 123*w:a[c++]=Ka(E)*g;case 125*w:case 59:case 0:switch(_){case 0:case 125:y=0;case 59+u:g==-1&&(E=rr(E,/\f/g,"")),m>0&&Ka(E)-f&&ew(m>32?kk(E+";",r,n,f-1):kk(rr(E," ","")+";",r,n,f-2),l);break;case 59:E+=";";default:if(ew(T=Nk(E,e,n,c,u,i,a,x,S=[],D=[],f),s),_===123)if(u===0)B_(E,e,T,T,S,s,f,a,D);else switch(h===99&&Wi(E,3)===110?100:h){case 100:case 108:case 109:case 115:B_(t,T,T,r&&ew(Nk(t,T,T,0,0,i,a,x,i,S=[],f),D),i,D,f,a,r?S:D);break;default:B_(E,T,T,T,[""],D,0,a,D)}}c=u=m=0,w=g=1,x=E="",f=o;break;case 58:f=1+Ka(E),m=v;default:if(w<1){if(_==123)--w;else if(_==125&&w++==0&&SZ()==125)continue}switch(E+=cb(_),_*w){case 38:g=u>0?1:(E+="\f",-1);break;case 44:a[c++]=(Ka(E)-1)*g,g=1;break;case 64:il()===45&&(E+=k_(So())),h=il(),u=f=Ka(x=E+=TZ(N_())),_++;break;case 45:v===45&&Ka(E)==2&&(w=0)}}return s}function Nk(t,e,n,r,i,s,o,a,l,c,u){for(var f=i-1,h=i===0?s:[""],m=s4(h),v=0,w=0,y=0;v0?h[g]+" "+_:rr(_,/&\f/g,h[g])))&&(l[y++]=x);return fb(t,e,n,i===0?r4:a,l,c,u)}function LZ(t,e,n){return fb(t,e,n,Pz,cb(bZ()),p1(t,2,-2),0)}function kk(t,e,n,r){return fb(t,e,n,i4,p1(t,0,r),p1(t,r+1,-1),r)}function xp(t,e){for(var n="",r=s4(t),i=0;i6)switch(Wi(t,e+1)){case 109:if(Wi(t,e+4)!==45)break;case 102:return rr(t,/(.+:)(.+)-([^]+)/,"$1"+nr+"$2-$3$1"+IM+(Wi(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~NT(t,"stretch")?Uz(rr(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Wi(t,e+1)!==115)break;case 6444:switch(Wi(t,Ka(t)-3-(~NT(t,"!important")&&10))){case 107:return rr(t,":",":"+nr)+t;case 101:return rr(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+nr+(Wi(t,14)===45?"inline-":"")+"box$3$1"+nr+"$2$3$1"+hs+"$2box$3")+t}break;case 5936:switch(Wi(t,e+11)){case 114:return nr+t+hs+rr(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return nr+t+hs+rr(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return nr+t+hs+rr(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return nr+t+hs+t+t}return t}var FZ=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case i4:e.return=Uz(e.value,e.length);break;case Dz:return xp([A0(e,{value:rr(e.value,"@","@"+nr)})],i);case r4:if(e.length)return xZ(e.props,function(s){switch(MZ(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return xp([A0(e,{props:[rr(s,/:(read-\w+)/,":"+IM+"$1")]})],i);case"::placeholder":return xp([A0(e,{props:[rr(s,/:(plac\w+)/,":"+nr+"input-$1")]}),A0(e,{props:[rr(s,/:(plac\w+)/,":"+IM+"$1")]}),A0(e,{props:[rr(s,/:(plac\w+)/,hs+"input-$1")]})],i)}return""})}},jZ=[FZ],Fz=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var y=w.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=e.stylisPlugins||jZ,s={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var y=w.getAttribute("data-emotion").split(" "),g=1;g=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var ZZ={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},qZ=/[A-Z]|^ms/g,eq=/_EMO_([^_]+?)_([^]*?)_EMO_/g,$z=function(e){return e.charCodeAt(1)===45},Ok=function(e){return e!=null&&typeof e!="boolean"},XC=Rz(function(t){return $z(t)?t:t.replace(qZ,"-$&").toLowerCase()}),Uk=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(eq,function(r,i,s){return Za={name:i,styles:s,next:Za},i})}return ZZ[e]!==1&&!$z(e)&&typeof n=="number"&&n!==0?n+"px":n};function g1(t,e,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 Za={name:n.name,styles:n.styles,next:Za},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Za={name:r.name,styles:r.styles,next:Za},r=r.next;var i=n.styles+";";return i}return tq(t,e,n)}case"function":{if(t!==void 0){var s=Za,o=n(t);return Za=s,g1(t,e,o)}break}}if(e==null)return n;var a=e[n];return a!==void 0?a:n}function tq(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i96?oq:aq},Gk=function(e,n,r){var i;if(n){var s=n.shouldForwardProp;i=e.__emotion_forwardProp&&s?function(o){return e.__emotion_forwardProp(o)&&s(o)}:s}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},lq=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return Vz(n,r,i),rq(function(){return Wz(n,r,i)}),null},cq=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,s,o;n!==void 0&&(s=n.label,o=n.target);var a=Gk(e,n,r),l=a||Hk(i),c=!l("as");return function(){var u=arguments,f=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(s!==void 0&&f.push("label:"+s+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{f.push(u[0][0]);for(var h=u.length,m=1;m{e[n]=Zz(t[n])}),e}function Co(t,e,n={clone:!0}){const r=n.clone?X({},t):t;return Yc(t)&&Yc(e)&&Object.keys(e).forEach(i=>{Yc(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&Yc(t[i])?r[i]=Co(t[i],e[i],n):n.clone?r[i]=Yc(e[i])?Zz(e[i]):e[i]:r[i]=e[i]}),r}const fq=Object.freeze(Object.defineProperty({__proto__:null,default:Co,isPlainObject:Yc},Symbol.toStringTag,{value:"Module"}));function gd(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;nn==null?e:function(...i){e.apply(this,i),n.apply(this,i)},()=>{})}function Db(t,e=166){let n;function r(...i){const s=()=>{t.apply(this,i)};clearTimeout(n),n=setTimeout(s,e)}return r.clear=()=>{clearTimeout(n)},r}function wq(t,e){return()=>null}function Tg(t,e){var n,r;return I.isValidElement(t)&&e.indexOf((n=t.type.muiName)!=null?n:(r=t.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Zr(t){return t&&t.ownerDocument||document}function Ks(t){return Zr(t).defaultView||window}function _q(t,e){return()=>null}function LM(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const Oa=typeof window<"u"?I.useLayoutEffect:I.useEffect;let $k=0;function Mq(t){const[e,n]=I.useState(t),r=t||e;return I.useEffect(()=>{e==null&&($k+=1,n(`mui-${$k}`))},[e]),r}const Jk=tM.useId;function Nb(t){if(Jk!==void 0){const e=Jk();return t??e}return Mq(t)}function xq(t,e,n,r,i){return null}function RM({controlled:t,default:e,name:n,state:r="value"}){const{current:i}=I.useRef(t!==void 0),[s,o]=I.useState(e),a=i?t:s,l=I.useCallback(c=>{i||o(c)},[]);return[a,l]}function vo(t){const e=I.useRef(t);return Oa(()=>{e.current=t}),I.useRef((...n)=>(0,e.current)(...n)).current}function ni(...t){return I.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{LM(n,e)})},t)}const Yk={};function bq(t,e){const n=I.useRef(Yk);return n.current===Yk&&(n.current=t(e)),n}const Sq=[];function Cq(t){I.useEffect(t,Sq)}class kb{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new kb}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function Bb(){const t=bq(kb.create).current;return Cq(t.disposeEffect),t}let Ob=!0,OT=!1;const Eq=new kb,Aq={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 Tq(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&Aq[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function Iq(t){t.metaKey||t.altKey||t.ctrlKey||(Ob=!0)}function qC(){Ob=!1}function Lq(){this.visibilityState==="hidden"&&OT&&(Ob=!0)}function Rq(t){t.addEventListener("keydown",Iq,!0),t.addEventListener("mousedown",qC,!0),t.addEventListener("pointerdown",qC,!0),t.addEventListener("touchstart",qC,!0),t.addEventListener("visibilitychange",Lq,!0)}function Pq(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return Ob||Tq(e)}function r5(){const t=I.useCallback(i=>{i!=null&&Rq(i.ownerDocument)},[]),e=I.useRef(!1);function n(){return e.current?(OT=!0,Eq.start(100,()=>{OT=!1}),e.current=!1,!0):!1}function r(i){return Pq(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function i5(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}function PM(t,e){const n=X({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=X({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=t[r]||{},s=e[r];n[r]={},!s||!Object.keys(s)?n[r]=i:!i||!Object.keys(i)?n[r]=s:(n[r]=X({},s),Object.keys(i).forEach(o=>{n[r][o]=PM(i[o],s[o])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function bn(t,e,n=void 0){const r={};return Object.keys(t).forEach(i=>{r[i]=t[i].reduce((s,o)=>{if(o){const a=e(o);a!==""&&s.push(a),n&&n[o]&&s.push(n[o])}return s},[]).join(" ")}),r}const Qk=t=>t,Dq=()=>{let t=Qk;return{configure(e){t=e},generate(e){return t(e)},reset(){t=Qk}}},h4=Dq(),Nq={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 Mn(t,e,n="Mui"){const r=Nq[e];return r?`${n}-${r}`:`${h4.generate(t)}-${e}`}function fn(t,e,n="Mui"){const r={};return e.forEach(i=>{r[i]=Mn(t,i,n)}),r}function kq(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const Bq=Object.freeze(Object.defineProperty({__proto__:null,default:kq},Symbol.toStringTag,{value:"Module"}));function Nt(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}function s5(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;ee(Hq(i)?n:i):e;return O.jsx(sq,{styles:r})}function l5(t,e){return Be(t,e)}const Gq=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},Vq=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:a5,StyledEngineProvider:zq,ThemeContext:iv,css:wl,default:l5,internal_processStyles:Gq,keyframes:Cm},Symbol.toStringTag,{value:"Module"})),Wq=hc(Vq),$q=hc(fq),Jq=hc(yq),Yq=hc(vq),Qq=["values","unit","step"],Xq=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>X({},n,{[r.key]:r.val}),{})};function c5(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,i=Nt(t,Qq),s=Xq(e),o=Object.keys(s);function a(h){return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof e[h]=="number"?e[h]:h)-r/100}${n})`}function c(h,m){const v=o.indexOf(m);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n}) and (max-width:${(v!==-1&&typeof e[o[v]]=="number"?e[o[v]]:m)-r/100}${n})`}function u(h){return o.indexOf(h)+1`@media (min-width:${p4[t]}px)`};function ac(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const s=r.breakpoints||Kk;return e.reduce((o,a,l)=>(o[s.up(s.keys[l])]=n(e[l]),o),{})}if(typeof e=="object"){const s=r.breakpoints||Kk;return Object.keys(e).reduce((o,a)=>{if(Object.keys(s.values||p4).indexOf(a)!==-1){const l=s.up(a);o[l]=n(e[a],a)}else{const l=a;o[l]=e[l]}return o},{})}return n(e)}function Zq(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,i)=>{const s=t.up(i);return r[s]={},r},{}))||{}}function qq(t,e){return t.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},e)}function Ub(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,t);if(r!=null)return r}return e.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,t)}function DM(t,e,n,r=n){let i;return typeof t=="function"?i=t(n):Array.isArray(t)?i=t[n]||r:i=Ub(t,n)||r,e&&(i=e(i,r,t)),i}function ri(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:i}=t,s=o=>{if(o[e]==null)return null;const a=o[e],l=o.theme,c=Ub(l,r)||{};return ac(o,a,f=>{let h=DM(c,i,f);return f===h&&typeof f=="string"&&(h=DM(c,i,`${e}${f==="default"?"":zt(f)}`,f)),n===!1?h:{[n]:h}})};return s.propTypes={},s.filterProps=[e],s}function eee(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const tee={m:"margin",p:"padding"},nee={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Zk={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ree=eee(t=>{if(t.length>2)if(Zk[t])t=Zk[t];else return[t];const[e,n]=t.split(""),r=tee[e],i=nee[n]||"";return Array.isArray(i)?i.map(s=>r+s):[r+i]}),m4=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],g4=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...m4,...g4];function ov(t,e,n,r){var i;const s=(i=Ub(t,e,!1))!=null?i:n;return typeof s=="number"?o=>typeof o=="string"?o:s*o:Array.isArray(s)?o=>typeof o=="string"?o:s[o]:typeof s=="function"?s:()=>{}}function u5(t){return ov(t,"spacing",8)}function av(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function iee(t,e){return n=>t.reduce((r,i)=>(r[i]=av(e,n),r),{})}function see(t,e,n,r){if(e.indexOf(n)===-1)return null;const i=ree(n),s=iee(i,r),o=t[n];return ac(t,o,s)}function f5(t,e){const n=u5(t.theme);return Object.keys(t).map(r=>see(t,e,r,n)).reduce(Ig,{})}function zr(t){return f5(t,m4)}zr.propTypes={};zr.filterProps=m4;function Hr(t){return f5(t,g4)}Hr.propTypes={};Hr.filterProps=g4;function oee(t=8){if(t.mui)return t;const e=u5({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(s=>{const o=e(s);return typeof o=="number"?`${o}px`:o}).join(" ");return n.mui=!0,n}function Fb(...t){const e=t.reduce((r,i)=>(i.filterProps.forEach(s=>{r[s]=i}),r),{}),n=r=>Object.keys(r).reduce((i,s)=>e[s]?Ig(i,e[s](r)):i,{});return n.propTypes={},n.filterProps=t.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Xo(t){return typeof t!="number"?t:`${t}px solid`}function ca(t,e){return ri({prop:t,themeKey:"borders",transform:e})}const aee=ca("border",Xo),lee=ca("borderTop",Xo),cee=ca("borderRight",Xo),uee=ca("borderBottom",Xo),fee=ca("borderLeft",Xo),dee=ca("borderColor"),hee=ca("borderTopColor"),pee=ca("borderRightColor"),mee=ca("borderBottomColor"),gee=ca("borderLeftColor"),vee=ca("outline",Xo),yee=ca("outlineColor"),jb=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=ov(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:av(e,r)});return ac(t,t.borderRadius,n)}return null};jb.propTypes={};jb.filterProps=["borderRadius"];Fb(aee,lee,cee,uee,fee,dee,hee,pee,mee,gee,jb,vee,yee);const zb=t=>{if(t.gap!==void 0&&t.gap!==null){const e=ov(t.theme,"spacing",8),n=r=>({gap:av(e,r)});return ac(t,t.gap,n)}return null};zb.propTypes={};zb.filterProps=["gap"];const Hb=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=ov(t.theme,"spacing",8),n=r=>({columnGap:av(e,r)});return ac(t,t.columnGap,n)}return null};Hb.propTypes={};Hb.filterProps=["columnGap"];const Gb=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=ov(t.theme,"spacing",8),n=r=>({rowGap:av(e,r)});return ac(t,t.rowGap,n)}return null};Gb.propTypes={};Gb.filterProps=["rowGap"];const wee=ri({prop:"gridColumn"}),_ee=ri({prop:"gridRow"}),Mee=ri({prop:"gridAutoFlow"}),xee=ri({prop:"gridAutoColumns"}),bee=ri({prop:"gridAutoRows"}),See=ri({prop:"gridTemplateColumns"}),Cee=ri({prop:"gridTemplateRows"}),Eee=ri({prop:"gridTemplateAreas"}),Aee=ri({prop:"gridArea"});Fb(zb,Hb,Gb,wee,_ee,Mee,xee,bee,See,Cee,Eee,Aee);function bp(t,e){return e==="grey"?e:t}const Tee=ri({prop:"color",themeKey:"palette",transform:bp}),Iee=ri({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:bp}),Lee=ri({prop:"backgroundColor",themeKey:"palette",transform:bp});Fb(Tee,Iee,Lee);function po(t){return t<=1&&t!==0?`${t*100}%`:t}const Ree=ri({prop:"width",transform:po}),v4=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,i;const s=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||p4[n];return s?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${s}${t.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:po(n)}};return ac(t,t.maxWidth,e)}return null};v4.filterProps=["maxWidth"];const Pee=ri({prop:"minWidth",transform:po}),Dee=ri({prop:"height",transform:po}),Nee=ri({prop:"maxHeight",transform:po}),kee=ri({prop:"minHeight",transform:po});ri({prop:"size",cssProperty:"width",transform:po});ri({prop:"size",cssProperty:"height",transform:po});const Bee=ri({prop:"boxSizing"});Fb(Ree,v4,Pee,Dee,Nee,kee,Bee);const lv={border:{themeKey:"borders",transform:Xo},borderTop:{themeKey:"borders",transform:Xo},borderRight:{themeKey:"borders",transform:Xo},borderBottom:{themeKey:"borders",transform:Xo},borderLeft:{themeKey:"borders",transform:Xo},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Xo},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:jb},color:{themeKey:"palette",transform:bp},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:bp},backgroundColor:{themeKey:"palette",transform:bp},p:{style:Hr},pt:{style:Hr},pr:{style:Hr},pb:{style:Hr},pl:{style:Hr},px:{style:Hr},py:{style:Hr},padding:{style:Hr},paddingTop:{style:Hr},paddingRight:{style:Hr},paddingBottom:{style:Hr},paddingLeft:{style:Hr},paddingX:{style:Hr},paddingY:{style:Hr},paddingInline:{style:Hr},paddingInlineStart:{style:Hr},paddingInlineEnd:{style:Hr},paddingBlock:{style:Hr},paddingBlockStart:{style:Hr},paddingBlockEnd:{style:Hr},m:{style:zr},mt:{style:zr},mr:{style:zr},mb:{style:zr},ml:{style:zr},mx:{style:zr},my:{style:zr},margin:{style:zr},marginTop:{style:zr},marginRight:{style:zr},marginBottom:{style:zr},marginLeft:{style:zr},marginX:{style:zr},marginY:{style:zr},marginInline:{style:zr},marginInlineStart:{style:zr},marginInlineEnd:{style:zr},marginBlock:{style:zr},marginBlockStart:{style:zr},marginBlockEnd:{style:zr},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:zb},rowGap:{style:Gb},columnGap:{style:Hb},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:po},maxWidth:{style:v4},minWidth:{transform:po},height:{transform:po},maxHeight:{transform:po},minHeight:{transform:po},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Oee(...t){const e=t.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function Uee(t,e){return typeof t=="function"?t(e):t}function d5(){function t(n,r,i,s){const o={[n]:r,theme:i},a=s[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:f}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Ub(i,c)||{};return f?f(o):ac(o,r,v=>{let w=DM(h,u,v);return v===w&&typeof v=="string"&&(w=DM(h,u,`${n}${v==="default"?"":zt(v)}`,v)),l===!1?w:{[l]:w}})}function e(n){var r;const{sx:i,theme:s={}}=n||{};if(!i)return null;const o=(r=s.unstable_sxConfig)!=null?r:lv;function a(l){let c=l;if(typeof l=="function")c=l(s);else if(typeof l!="object")return l;if(!c)return null;const u=Zq(s.breakpoints),f=Object.keys(u);let h=u;return Object.keys(c).forEach(m=>{const v=Uee(c[m],s);if(v!=null)if(typeof v=="object")if(o[m])h=Ig(h,t(m,v,s,o));else{const w=ac({theme:s},v,y=>({[m]:y}));Oee(w,v)?h[m]=e({sx:v,theme:s}):h=Ig(h,w)}else h=Ig(h,t(m,v,s,o))}),qq(f,h)}return Array.isArray(i)?i.map(a):a(i)}return e}const cv=d5();cv.filterProps=["sx"];function h5(t,e){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}:n.palette.mode===t?e:{}}const Fee=["breakpoints","palette","spacing","shape"];function y4(t={},...e){const{breakpoints:n={},palette:r={},spacing:i,shape:s={}}=t,o=Nt(t,Fee),a=c5(n),l=oee(i);let c=Co({breakpoints:a,direction:"ltr",components:{},palette:X({mode:"light"},r),spacing:l,shape:X({},Kq,s)},o);return c.applyStyles=h5,c=e.reduce((u,f)=>Co(u,f),c),c.unstable_sxConfig=X({},lv,o==null?void 0:o.unstable_sxConfig),c.unstable_sx=function(f){return cv({sx:f,theme:this})},c}const jee=Object.freeze(Object.defineProperty({__proto__:null,default:y4,private_createBreakpoints:c5,unstable_applyStyles:h5},Symbol.toStringTag,{value:"Module"})),zee=hc(jee),Hee=["sx"],Gee=t=>{var e,n;const r={systemProps:{},otherProps:{}},i=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:lv;return Object.keys(t).forEach(s=>{i[s]?r.systemProps[s]=t[s]:r.otherProps[s]=t[s]}),r};function w4(t){const{sx:e}=t,n=Nt(t,Hee),{systemProps:r,otherProps:i}=Gee(n);let s;return Array.isArray(e)?s=[r,...e]:typeof e=="function"?s=(...o)=>{const a=e(...o);return Yc(a)?X({},r,a):r}:s=X({},r,e),X({},i,{sx:s})}const Vee=Object.freeze(Object.defineProperty({__proto__:null,default:cv,extendSxProp:w4,unstable_createStyleFunctionSx:d5,unstable_defaultSxConfig:lv},Symbol.toStringTag,{value:"Module"})),Wee=hc(Vee);var Em=Ur;Object.defineProperty(sv,"__esModule",{value:!0});var $ee=sv.default=ste;sv.shouldForwardProp=O_;sv.systemDefaultTheme=void 0;var $o=Em(Xz()),FT=Em(jq()),qk=qee(Wq),Jee=$q;Em(Jq);Em(Yq);var Yee=Em(zee),Qee=Em(Wee);const Xee=["ownerState"],Kee=["variants"],Zee=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p5(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(p5=function(r){return r?n:e})(t)}function qee(t,e){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var n=p5(e);if(n&&n.has(t))return n.get(t);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var o=i?Object.getOwnPropertyDescriptor(t,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=t[s]}return r.default=t,n&&n.set(t,r),r}function ete(t){return Object.keys(t).length===0}function tte(t){return typeof t=="string"&&t.charCodeAt(0)>96}function O_(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const nte=sv.systemDefaultTheme=(0,Yee.default)(),rte=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function tw({defaultTheme:t,theme:e,themeId:n}){return ete(e)?t:e[n]||e}function ite(t){return t?(e,n)=>n[t]:null}function U_(t,e){let{ownerState:n}=e,r=(0,FT.default)(e,Xee);const i=typeof t=="function"?t((0,$o.default)({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(s=>U_(s,(0,$o.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:s=[]}=i;let a=(0,FT.default)(i,Kee);return s.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,$o.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,$o.default)({ownerState:n},r,n)):l.style))}),a}return i}function ste(t={}){const{themeId:e,defaultTheme:n=nte,rootShouldForwardProp:r=O_,slotShouldForwardProp:i=O_}=t,s=o=>(0,Qee.default)((0,$o.default)({},o,{theme:tw((0,$o.default)({},o,{defaultTheme:n,themeId:e}))}));return s.__mui_systemSx=!0,(o,a={})=>{(0,qk.internal_processStyles)(o,D=>D.filter(T=>!(T!=null&&T.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:f,overridesResolver:h=ite(rte(c))}=a,m=(0,FT.default)(a,Zee),v=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,w=f||!1;let y,g=O_;c==="Root"||c==="root"?g=r:c?g=i:tte(o)&&(g=void 0);const _=(0,qk.default)(o,(0,$o.default)({shouldForwardProp:g,label:y},m)),x=D=>typeof D=="function"&&D.__emotion_real!==D||(0,Jee.isPlainObject)(D)?T=>U_(D,(0,$o.default)({},T,{theme:tw({theme:T.theme,defaultTheme:n,themeId:e})})):D,S=(D,...T)=>{let E=x(D);const R=T?T.map(x):[];l&&h&&R.push(P=>{const z=tw((0,$o.default)({},P,{defaultTheme:n,themeId:e}));if(!z.components||!z.components[l]||!z.components[l].styleOverrides)return null;const B=z.components[l].styleOverrides,Y={};return Object.entries(B).forEach(([ie,ee])=>{Y[ie]=U_(ee,(0,$o.default)({},P,{theme:z}))}),h(P,Y)}),l&&!v&&R.push(P=>{var z;const B=tw((0,$o.default)({},P,{defaultTheme:n,themeId:e})),Y=B==null||(z=B.components)==null||(z=z[l])==null?void 0:z.variants;return U_({variants:Y},(0,$o.default)({},P,{theme:B}))}),w||R.push(s);const C=R.length-T.length;if(Array.isArray(D)&&C>0){const P=new Array(C).fill("");E=[...D,...P],E.raw=[...D.raw,...P]}const L=_(E,...R);return o.muiName&&(L.muiName=o.muiName),L};return _.withConfig&&(S.withConfig=_.withConfig),S}}function ote(t,e){return X({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}var ii={};const ate=hc(dq),lte=hc(Bq);var m5=Ur;Object.defineProperty(ii,"__esModule",{value:!0});var yo=ii.alpha=w5;ii.blend=_te;ii.colorChannel=void 0;var jT=ii.darken=M4;ii.decomposeColor=sa;var cte=ii.emphasize=_5,ute=ii.getContrastRatio=mte;ii.getLuminance=NM;ii.hexToRgb=g5;ii.hslToRgb=y5;var zT=ii.lighten=x4;ii.private_safeAlpha=gte;ii.private_safeColorChannel=void 0;ii.private_safeDarken=vte;ii.private_safeEmphasize=wte;ii.private_safeLighten=yte;ii.recomposeColor=Am;ii.rgbToHex=pte;var e6=m5(ate),fte=m5(lte);function _4(t,e=0,n=1){return(0,fte.default)(t,e,n)}function g5(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function dte(t){const e=t.toString(16);return e.length===1?`0${e}`:e}function sa(t){if(t.type)return t;if(t.charAt(0)==="#")return sa(g5(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,e6.default)(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,e6.default)(10,i))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:i}}const v5=t=>{const e=sa(t);return e.values.slice(0,3).map((n,r)=>e.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};ii.colorChannel=v5;const hte=(t,e)=>{try{return v5(t)}catch{return t}};ii.private_safeColorChannel=hte;function Am(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,s)=>s<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function pte(t){if(t.indexOf("#")===0)return t;const{values:e}=sa(t);return`#${e.map((n,r)=>dte(r===3?Math.round(255*n):n)).join("")}`}function y5(t){t=sa(t);const{values:e}=t,n=e[0],r=e[1]/100,i=e[2]/100,s=r*Math.min(i,1-i),o=(c,u=(c+n/30)%12)=>i-s*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),Am({type:a,values:l})}function NM(t){t=sa(t);let e=t.type==="hsl"||t.type==="hsla"?sa(y5(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function mte(t,e){const n=NM(t),r=NM(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function w5(t,e){return t=sa(t),e=_4(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Am(t)}function gte(t,e,n){try{return w5(t,e)}catch{return t}}function M4(t,e){if(t=sa(t),e=_4(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return Am(t)}function vte(t,e,n){try{return M4(t,e)}catch{return t}}function x4(t,e){if(t=sa(t),e=_4(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return Am(t)}function yte(t,e,n){try{return x4(t,e)}catch{return t}}function _5(t,e=.15){return NM(t)>.5?M4(t,e):x4(t,e)}function wte(t,e,n){try{return _5(t,e)}catch{return t}}function _te(t,e,n,r=1){const i=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),s=sa(t),o=sa(e),a=[i(s.values[0],o.values[0]),i(s.values[1],o.values[1]),i(s.values[2],o.values[2])];return Am({type:"rgb",values:a})}const v1={black:"#000",white:"#fff"},Mte={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"},gh={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"},vh={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"},T0={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"},yh={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"},wh={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"},_h={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"},xte=["mode","contrastThreshold","tonalOffset"],t6={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:v1.white,default:v1.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}},tE={text:{primary:v1.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:v1.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 n6(t,e,n,r){const i=r.light||r,s=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=zT(t.main,i):e==="dark"&&(t.dark=jT(t.main,s)))}function bte(t="light"){return t==="dark"?{main:yh[200],light:yh[50],dark:yh[400]}:{main:yh[700],light:yh[400],dark:yh[800]}}function Ste(t="light"){return t==="dark"?{main:gh[200],light:gh[50],dark:gh[400]}:{main:gh[500],light:gh[300],dark:gh[700]}}function Cte(t="light"){return t==="dark"?{main:vh[500],light:vh[300],dark:vh[700]}:{main:vh[700],light:vh[400],dark:vh[800]}}function Ete(t="light"){return t==="dark"?{main:wh[400],light:wh[300],dark:wh[700]}:{main:wh[700],light:wh[500],dark:wh[900]}}function Ate(t="light"){return t==="dark"?{main:_h[400],light:_h[300],dark:_h[700]}:{main:_h[800],light:_h[500],dark:_h[900]}}function Tte(t="light"){return t==="dark"?{main:T0[400],light:T0[300],dark:T0[700]}:{main:"#ed6c02",light:T0[500],dark:T0[900]}}function Ite(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,i=Nt(t,xte),s=t.primary||bte(e),o=t.secondary||Ste(e),a=t.error||Cte(e),l=t.info||Ete(e),c=t.success||Ate(e),u=t.warning||Tte(e);function f(w){return ute(w,tE.text.primary)>=n?tE.text.primary:t6.text.primary}const h=({color:w,name:y,mainShade:g=500,lightShade:_=300,darkShade:x=700})=>{if(w=X({},w),!w.main&&w[g]&&(w.main=w[g]),!w.hasOwnProperty("main"))throw new Error(gd(11,y?` (${y})`:"",g));if(typeof w.main!="string")throw new Error(gd(12,y?` (${y})`:"",JSON.stringify(w.main)));return n6(w,"light",_,r),n6(w,"dark",x,r),w.contrastText||(w.contrastText=f(w.main)),w},m={dark:tE,light:t6};return Co(X({common:X({},v1),mode:e,primary:h({color:s,name:"primary"}),secondary:h({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:Mte,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},m[e]),i)}const Lte=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Rte(t){return Math.round(t*1e5)/1e5}const r6={textTransform:"uppercase"},i6='"Roboto", "Helvetica", "Arial", sans-serif';function Pte(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=i6,fontSize:i=14,fontWeightLight:s=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:f}=n,h=Nt(n,Lte),m=i/14,v=f||(g=>`${g/c*m}rem`),w=(g,_,x,S,D)=>X({fontFamily:r,fontWeight:g,fontSize:v(_),lineHeight:x},r===i6?{letterSpacing:`${Rte(S/_)}em`}:{},D,u),y={h1:w(s,96,1.167,-1.5),h2:w(s,60,1.2,-.5),h3:w(o,48,1.167,0),h4:w(o,34,1.235,.25),h5:w(o,24,1.334,0),h6:w(a,20,1.6,.15),subtitle1:w(o,16,1.75,.15),subtitle2:w(a,14,1.57,.1),body1:w(o,16,1.5,.15),body2:w(o,14,1.43,.15),button:w(a,14,1.75,.4,r6),caption:w(o,12,1.66,.4),overline:w(o,12,2.66,1,r6),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Co(X({htmlFontSize:c,pxToRem:v,fontFamily:r,fontSize:i,fontWeightLight:s,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},y),h,{clone:!1})}const Dte=.2,Nte=.14,kte=.12;function Er(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${Dte})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${Nte})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${kte})`].join(",")}const Bte=["none",Er(0,2,1,-1,0,1,1,0,0,1,3,0),Er(0,3,1,-2,0,2,2,0,0,1,5,0),Er(0,3,3,-2,0,3,4,0,0,1,8,0),Er(0,2,4,-1,0,4,5,0,0,1,10,0),Er(0,3,5,-1,0,5,8,0,0,1,14,0),Er(0,3,5,-1,0,6,10,0,0,1,18,0),Er(0,4,5,-2,0,7,10,1,0,2,16,1),Er(0,5,5,-3,0,8,10,1,0,3,14,2),Er(0,5,6,-3,0,9,12,1,0,3,16,2),Er(0,6,6,-3,0,10,14,1,0,4,18,3),Er(0,6,7,-4,0,11,15,1,0,4,20,3),Er(0,7,8,-4,0,12,17,2,0,5,22,4),Er(0,7,8,-4,0,13,19,2,0,5,24,4),Er(0,7,9,-4,0,14,21,2,0,5,26,4),Er(0,8,9,-5,0,15,22,2,0,6,28,5),Er(0,8,10,-5,0,16,24,2,0,6,30,5),Er(0,8,11,-5,0,17,26,2,0,6,32,5),Er(0,9,11,-5,0,18,28,2,0,7,34,6),Er(0,9,12,-6,0,19,29,2,0,7,36,6),Er(0,10,13,-6,0,20,31,3,0,8,38,7),Er(0,10,13,-6,0,21,33,3,0,8,40,7),Er(0,10,14,-6,0,22,35,3,0,8,42,7),Er(0,11,14,-7,0,23,36,3,0,9,44,8),Er(0,11,15,-7,0,24,38,3,0,9,46,8)],Ote=["duration","easing","delay"],Ute={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)"},M5={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function s6(t){return`${Math.round(t)}ms`}function Fte(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function jte(t){const e=X({},Ute,t.easing),n=X({},M5,t.duration);return X({getAutoHeightDuration:Fte,create:(i=["all"],s={})=>{const{duration:o=n.standard,easing:a=e.easeInOut,delay:l=0}=s;return Nt(s,Ote),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof o=="string"?o:s6(o)} ${a} ${typeof l=="string"?l:s6(l)}`).join(",")}},t,{easing:e,duration:n})}const zte={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Hte=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function b4(t={},...e){const{mixins:n={},palette:r={},transitions:i={},typography:s={}}=t,o=Nt(t,Hte);if(t.vars)throw new Error(gd(18));const a=Ite(r),l=y4(t);let c=Co(l,{mixins:ote(l.breakpoints,n),palette:a,shadows:Bte.slice(),typography:Pte(a,s),transitions:jte(i),zIndex:X({},zte)});return c=Co(c,o),c=e.reduce((u,f)=>Co(u,f),c),c.unstable_sxConfig=X({},lv,o==null?void 0:o.unstable_sxConfig),c.unstable_sx=function(f){return cv({sx:f,theme:this})},c}const S4=b4(),Wp="$$material";function x5(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const Po=t=>x5(t)&&t!=="classes",Ct=$ee({themeId:Wp,defaultTheme:S4,rootShouldForwardProp:Po});function Gte(t){return Mn("MuiSvgIcon",t)}fn("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Vte=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Wte=t=>{const{color:e,fontSize:n,classes:r}=t,i={root:["root",e!=="inherit"&&`color${zt(e)}`,`fontSize${zt(n)}`]};return bn(i,Gte,r)},$te=Ct("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${zt(n.color)}`],e[`fontSize${zt(n.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var n,r,i,s,o,a,l,c,u,f,h,m,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=t.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=t.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((s=t.typography)==null||(o=s.pxToRem)==null?void 0:o.call(s,20))||"1.25rem",medium:((a=t.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=t.typography)==null||(u=c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}[e.fontSize],color:(f=(h=(t.vars||t).palette)==null||(h=h[e.color])==null?void 0:h.main)!=null?f:{action:(m=(t.vars||t).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(v=(t.vars||t).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[e.color]}}),HT=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiSvgIcon"}),{children:i,className:s,color:o="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:h="0 0 24 24"}=r,m=Nt(r,Vte),v=I.isValidElement(i)&&i.type==="svg",w=X({},r,{color:o,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:v}),y={};u||(y.viewBox=h);const g=Wte(w);return O.jsxs($te,X({as:a,className:Vt(g.root,s),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},y,m,v&&i.props,{ownerState:w,children:[v?i.props.children:i,f?O.jsx("title",{children:f}):null]}))});HT.muiName="SvgIcon";function ku(t,e){function n(r,i){return O.jsx(HT,X({"data-testid":`${e}Icon`,ref:i},r,{children:t}))}return n.muiName=HT.muiName,I.memo(I.forwardRef(n))}const Jte={configure:t=>{h4.configure(t)}},Yte=Object.freeze(Object.defineProperty({__proto__:null,capitalize:zt,createChainedFunction:BT,createSvgIcon:ku,debounce:Db,deprecatedPropType:wq,isMuiElement:Tg,ownerDocument:Zr,ownerWindow:Ks,requirePropFactory:_q,setRef:LM,unstable_ClassNameGenerator:Jte,unstable_useEnhancedEffect:Oa,unstable_useId:Nb,unsupportedProp:xq,useControlled:RM,useEventCallback:vo,useForkRef:ni,useIsFocusVisible:r5},Symbol.toStringTag,{value:"Module"})),Qte=hc(Yte);var o6;function si(){return o6||(o6=1,function(t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.createSvgIcon}});var e=Qte}(ZC)),ZC}var Xte=Ur;Object.defineProperty(u4,"__esModule",{value:!0});var C4=u4.default=void 0,Kte=Xte(si()),Zte=O;C4=u4.default=(0,Kte.default)((0,Zte.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");function qte(t){return Object.keys(t).length===0}function b5(t=null){const e=I.useContext(iv);return!e||qte(e)?t:e}const ene=y4();function E4(t=ene){return b5(t)}function tne({styles:t,themeId:e,defaultTheme:n={}}){const r=E4(n),i=typeof t=="function"?t(e&&r[e]||r):t;return O.jsx(a5,{styles:i})}const nne=["className","component"];function rne(t={}){const{themeId:e,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=t,s=l5("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(cv);return I.forwardRef(function(l,c){const u=E4(n),f=w4(l),{className:h,component:m="div"}=f,v=Nt(f,nne);return O.jsx(s,X({as:m,ref:c,className:Vt(h,i?i(r):r),theme:e&&u[e]||u},v))})}const S5=I.createContext(null);function C5(){return I.useContext(S5)}const ine=typeof Symbol=="function"&&Symbol.for,sne=ine?Symbol.for("mui.nested"):"__THEME_NESTED__";function one(t,e){return typeof e=="function"?e(t):X({},t,e)}function ane(t){const{children:e,theme:n}=t,r=C5(),i=I.useMemo(()=>{const s=r===null?n:one(r,n);return s!=null&&(s[sne]=r!==null),s},[n,r]);return O.jsx(S5.Provider,{value:i,children:e})}const lne=["value"],E5=I.createContext();function cne(t){let{value:e}=t,n=Nt(t,lne);return O.jsx(E5.Provider,X({value:e??!0},n))}const A5=()=>{const t=I.useContext(E5);return t??!1},a6={};function l6(t,e,n,r=!1){return I.useMemo(()=>{const i=t&&e[t]||e;if(typeof n=="function"){const s=n(i),o=t?X({},e,{[t]:s}):s;return r?()=>o:o}return t?X({},e,{[t]:n}):X({},e,n)},[t,e,n,r])}function une(t){const{children:e,theme:n,themeId:r}=t,i=b5(a6),s=C5()||a6,o=l6(r,i,n),a=l6(r,s,n,!0),l=o.direction==="rtl";return O.jsx(ane,{theme:a,children:O.jsx(iv.Provider,{value:o,children:O.jsx(cne,{value:l,children:O.jsx(Oq,{value:o==null?void 0:o.components,children:e})})})})}function Bu(){const t=E4(S4);return t[Wp]||t}const fne=["theme"];function dne(t){let{theme:e}=t,n=Nt(t,fne);const r=e[Wp];return O.jsx(une,X({},n,{themeId:r?Wp:void 0,theme:r||e}))}const c6=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)};var fr={};/** + * @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 A4=Symbol.for("react.element"),T4=Symbol.for("react.portal"),Vb=Symbol.for("react.fragment"),Wb=Symbol.for("react.strict_mode"),$b=Symbol.for("react.profiler"),Jb=Symbol.for("react.provider"),Yb=Symbol.for("react.context"),hne=Symbol.for("react.server_context"),Qb=Symbol.for("react.forward_ref"),Xb=Symbol.for("react.suspense"),Kb=Symbol.for("react.suspense_list"),Zb=Symbol.for("react.memo"),qb=Symbol.for("react.lazy"),pne=Symbol.for("react.offscreen"),T5;T5=Symbol.for("react.module.reference");function ua(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case A4:switch(t=t.type,t){case Vb:case $b:case Wb:case Xb:case Kb:return t;default:switch(t=t&&t.$$typeof,t){case hne:case Yb:case Qb:case qb:case Zb:case Jb:return t;default:return e}}case T4:return e}}}fr.ContextConsumer=Yb;fr.ContextProvider=Jb;fr.Element=A4;fr.ForwardRef=Qb;fr.Fragment=Vb;fr.Lazy=qb;fr.Memo=Zb;fr.Portal=T4;fr.Profiler=$b;fr.StrictMode=Wb;fr.Suspense=Xb;fr.SuspenseList=Kb;fr.isAsyncMode=function(){return!1};fr.isConcurrentMode=function(){return!1};fr.isContextConsumer=function(t){return ua(t)===Yb};fr.isContextProvider=function(t){return ua(t)===Jb};fr.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===A4};fr.isForwardRef=function(t){return ua(t)===Qb};fr.isFragment=function(t){return ua(t)===Vb};fr.isLazy=function(t){return ua(t)===qb};fr.isMemo=function(t){return ua(t)===Zb};fr.isPortal=function(t){return ua(t)===T4};fr.isProfiler=function(t){return ua(t)===$b};fr.isStrictMode=function(t){return ua(t)===Wb};fr.isSuspense=function(t){return ua(t)===Xb};fr.isSuspenseList=function(t){return ua(t)===Kb};fr.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Vb||t===$b||t===Wb||t===Xb||t===Kb||t===pne||typeof t=="object"&&t!==null&&(t.$$typeof===qb||t.$$typeof===Zb||t.$$typeof===Jb||t.$$typeof===Yb||t.$$typeof===Qb||t.$$typeof===T5||t.getModuleId!==void 0)};fr.typeOf=ua;function GT(t,e){return GT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},GT(t,e)}function I5(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,GT(t,e)}const u6={disabled:!1},kM=qt.createContext(null);var mne=function(e){return e.scrollTop},ag="unmounted",If="exited",Lf="entering",Wh="entered",VT="exiting",fa=function(t){I5(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=i,a=o&&!o.isMounting?r.enter:r.appear,l;return s.appearStatus=null,r.in?a?(l=If,s.appearStatus=Lf):l=Wh:r.unmountOnExit||r.mountOnEnter?l=ag:l=If,s.state={status:l},s.nextCallback=null,s}e.getDerivedStateFromProps=function(i,s){var o=i.in;return o&&s.status===ag?{status:If}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==Lf&&o!==Wh&&(s=Lf):(o===Lf||o===Wh)&&(s=VT)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,o,a;return s=o=a=i,i!=null&&typeof i!="number"&&(s=i.exit,o=i.enter,a=i.appear!==void 0?i.appear:o),{exit:s,enter:o,appear:a}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===Lf){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:sg.findDOMNode(this);o&&mne(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===If&&this.setState({status:ag})},n.performEnter=function(i){var s=this,o=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[sg.findDOMNode(this),a],c=l[0],u=l[1],f=this.getTimeouts(),h=a?f.appear:f.enter;if(!i&&!o||u6.disabled){this.safeSetState({status:Wh},function(){s.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Lf},function(){s.props.onEntering(c,u),s.onTransitionEnd(h,function(){s.safeSetState({status:Wh},function(){s.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,s=this.props.exit,o=this.getTimeouts(),a=this.props.nodeRef?void 0:sg.findDOMNode(this);if(!s||u6.disabled){this.safeSetState({status:If},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:VT},function(){i.props.onExiting(a),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:If},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,o=!0;return this.nextCallback=function(a){o&&(o=!1,s.nextCallback=null,i(a))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var o=this.props.nodeRef?this.props.nodeRef.current:sg.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!o||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===ag)return null;var s=this.props,o=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var a=Nt(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return qt.createElement(kM.Provider,{value:null},typeof o=="function"?o(i,a):qt.cloneElement(qt.Children.only(o),a))},e}(qt.Component);fa.contextType=kM;fa.propTypes={};function Mh(){}fa.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Mh,onEntering:Mh,onEntered:Mh,onExit:Mh,onExiting:Mh,onExited:Mh};fa.UNMOUNTED=ag;fa.EXITED=If;fa.ENTERING=Lf;fa.ENTERED=Wh;fa.EXITING=VT;function gne(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function I4(t,e){var n=function(s){return e&&I.isValidElement(s)?e(s):s},r=Object.create(null);return t&&I.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function vne(t,e){t=t||{},e=e||{};function n(u){return u in e?e[u]:t[u]}var r=Object.create(null),i=[];for(var s in t)s in e?i.length&&(r[s]=i,i=[]):i.push(s);var o,a={};for(var l in e){if(r[l])for(o=0;ot.scrollTop;function lc(t,e){var n,r;const{timeout:i,easing:s,style:o={}}=t;return{duration:(n=o.transitionDuration)!=null?n:typeof i=="number"?i:i[e.mode]||0,easing:(r=o.transitionTimingFunction)!=null?r:typeof s=="object"?s[e.mode]:s,delay:o.transitionDelay}}function xne(t){return Mn("MuiCollapse",t)}fn("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const bne=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],Sne=t=>{const{orientation:e,classes:n}=t,r={root:["root",`${e}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${e}`],wrapperInner:["wrapperInner",`${e}`]};return bn(r,xne,n)},Cne=Ct("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.orientation],n.state==="entered"&&e.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&e.hidden]}})(({theme:t,ownerState:e})=>X({height:0,overflow:"hidden",transition:t.transitions.create("height")},e.orientation==="horizontal"&&{height:"auto",width:0,transition:t.transitions.create("width")},e.state==="entered"&&X({height:"auto",overflow:"visible"},e.orientation==="horizontal"&&{width:"auto"}),e.state==="exited"&&!e.in&&e.collapsedSize==="0px"&&{visibility:"hidden"})),Ene=Ct("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(t,e)=>e.wrapper})(({ownerState:t})=>X({display:"flex",width:"100%"},t.orientation==="horizontal"&&{width:"auto",height:"100%"})),Ane=Ct("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(t,e)=>e.wrapperInner})(({ownerState:t})=>X({width:"100%"},t.orientation==="horizontal"&&{width:"auto",height:"100%"})),L5=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiCollapse"}),{addEndListener:i,children:s,className:o,collapsedSize:a="0px",component:l,easing:c,in:u,onEnter:f,onEntered:h,onEntering:m,onExit:v,onExited:w,onExiting:y,orientation:g="vertical",style:_,timeout:x=M5.standard,TransitionComponent:S=fa}=r,D=Nt(r,bne),T=X({},r,{orientation:g,collapsedSize:a}),E=Sne(T),R=Bu(),C=Bb(),L=I.useRef(null),P=I.useRef(),z=typeof a=="number"?`${a}px`:a,B=g==="horizontal",Y=B?"width":"height",ie=I.useRef(null),ee=ni(n,ie),le=he=>Ie=>{if(he){const et=ie.current;Ie===void 0?he(et):he(et,Ie)}},j=()=>L.current?L.current[B?"clientWidth":"clientHeight"]:0,q=le((he,Ie)=>{L.current&&B&&(L.current.style.position="absolute"),he.style[Y]=z,f&&f(he,Ie)}),ne=le((he,Ie)=>{const et=j();L.current&&B&&(L.current.style.position="");const{duration:ct,easing:it}=lc({style:_,timeout:x,easing:c},{mode:"enter"});if(x==="auto"){const ut=R.transitions.getAutoHeightDuration(et);he.style.transitionDuration=`${ut}ms`,P.current=ut}else he.style.transitionDuration=typeof ct=="string"?ct:`${ct}ms`;he.style[Y]=`${et}px`,he.style.transitionTimingFunction=it,m&&m(he,Ie)}),de=le((he,Ie)=>{he.style[Y]="auto",h&&h(he,Ie)}),_e=le(he=>{he.style[Y]=`${j()}px`,v&&v(he)}),ge=le(w),ce=le(he=>{const Ie=j(),{duration:et,easing:ct}=lc({style:_,timeout:x,easing:c},{mode:"exit"});if(x==="auto"){const it=R.transitions.getAutoHeightDuration(Ie);he.style.transitionDuration=`${it}ms`,P.current=it}else he.style.transitionDuration=typeof et=="string"?et:`${et}ms`;he.style[Y]=z,he.style.transitionTimingFunction=ct,y&&y(he)}),we=he=>{x==="auto"&&C.start(P.current||0,he),i&&i(ie.current,he)};return O.jsx(S,X({in:u,onEnter:q,onEntered:de,onEntering:ne,onExit:_e,onExited:ge,onExiting:ce,addEndListener:we,nodeRef:ie,timeout:x==="auto"?null:x},D,{children:(he,Ie)=>O.jsx(Cne,X({as:l,className:Vt(E.root,o,{entered:E.entered,exited:!u&&z==="0px"&&E.hidden}[he]),style:X({[B?"minWidth":"minHeight"]:z},_),ref:ee},Ie,{ownerState:X({},T,{state:he}),children:O.jsx(Ene,{ownerState:X({},T,{state:he}),className:E.wrapper,ref:L,children:O.jsx(Ane,{ownerState:X({},T,{state:he}),className:E.wrapperInner,children:s})})}))}))});L5.muiSupportAuto=!0;function Tne(t){return Mn("MuiPaper",t)}fn("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 Ine=["className","component","elevation","square","variant"],Lne=t=>{const{square:e,elevation:n,variant:r,classes:i}=t,s={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return bn(s,Tne,i)},Rne=Ct("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return X({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&X({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${yo("#fff",c6(e.elevation))}, ${yo("#fff",c6(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),Ou=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiPaper"}),{className:i,component:s="div",elevation:o=1,square:a=!1,variant:l="elevation"}=r,c=Nt(r,Ine),u=X({},r,{component:s,elevation:o,square:a,variant:l}),f=Lne(u);return O.jsx(Rne,X({as:s,ownerState:u,className:Vt(f.root,i),ref:n},c))}),R5=I.createContext({});function $p(t){return typeof t=="string"}function P5(t,e,n){return t===void 0||$p(t)?e:X({},e,{ownerState:X({},e.ownerState,n)})}function BM(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function D5(t,e,n){return typeof t=="function"?t(e,n):t}function f6(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function N5(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=t;if(!e){const m=Vt(n==null?void 0:n.className,s,i==null?void 0:i.className,r==null?void 0:r.className),v=X({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),w=X({},n,i,r);return m.length>0&&(w.className=m),Object.keys(v).length>0&&(w.style=v),{props:w,internalRef:void 0}}const o=BM(X({},i,r)),a=f6(r),l=f6(i),c=e(o),u=Vt(c==null?void 0:c.className,n==null?void 0:n.className,s,i==null?void 0:i.className,r==null?void 0:r.className),f=X({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=X({},c,n,l,a);return u.length>0&&(h.className=u),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}const Pne=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function vd(t){var e;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:s=!1}=t,o=Nt(t,Pne),a=s?{}:D5(r,i),{props:l,internalRef:c}=N5(X({},o,{externalSlotProps:a})),u=ni(c,a==null?void 0:a.ref,(e=t.additionalProps)==null?void 0:e.ref);return P5(n,X({},l,{ref:u}),i)}const Dne=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],Nne=["component","slots","slotProps"],kne=["component"];function OM(t,e){const{className:n,elementType:r,ownerState:i,externalForwardedProps:s,getSlotOwnerState:o,internalForwardedProps:a}=e,l=Nt(e,Dne),{component:c,slots:u={[t]:void 0},slotProps:f={[t]:void 0}}=s,h=Nt(s,Nne),m=u[t]||r,v=D5(f[t],i),w=N5(X({className:n},l,{externalForwardedProps:t==="root"?h:void 0,externalSlotProps:v})),{props:{component:y},internalRef:g}=w,_=Nt(w.props,kne),x=ni(g,v==null?void 0:v.ref,e.ref),S=o?o(_):{},D=X({},i,S),T=t==="root"?y||c:y,E=P5(m,X({},t==="root"&&!c&&!u[t]&&a,t!=="root"&&!u[t]&&a,_,T&&{as:T},{ref:x}),D);return Object.keys(S).forEach(R=>{delete E[R]}),[m,E]}function Bne(t){return Mn("MuiAccordion",t)}const nw=fn("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),One=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],Une=t=>{const{classes:e,square:n,expanded:r,disabled:i,disableGutters:s}=t;return bn({root:["root",!n&&"rounded",r&&"expanded",i&&"disabled",!s&&"gutters"],region:["region"]},Bne,e)},Fne=Ct(Ou,{name:"MuiAccordion",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${nw.region}`]:e.region},e.root,!n.square&&e.rounded,!n.disableGutters&&e.gutters]}})(({theme:t})=>{const e={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],e),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],e)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${nw.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${nw.disabled}`]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}},({theme:t})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${nw.expanded}`]:{margin:"16px 0"}}}]})),jne=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiAccordion"}),{children:i,className:s,defaultExpanded:o=!1,disabled:a=!1,disableGutters:l=!1,expanded:c,onChange:u,square:f=!1,slots:h={},slotProps:m={},TransitionComponent:v,TransitionProps:w}=r,y=Nt(r,One),[g,_]=RM({controlled:c,default:o,name:"Accordion",state:"expanded"}),x=I.useCallback(B=>{_(!g),u&&u(B,!g)},[g,u,_]),[S,...D]=I.Children.toArray(i),T=I.useMemo(()=>({expanded:g,disabled:a,disableGutters:l,toggle:x}),[g,a,l,x]),E=X({},r,{square:f,disabled:a,disableGutters:l,expanded:g}),R=Une(E),C=X({transition:v},h),L=X({transition:w},m),[P,z]=OM("transition",{elementType:L5,externalForwardedProps:{slots:C,slotProps:L},ownerState:E});return O.jsxs(Fne,X({className:Vt(R.root,s),ref:n,ownerState:E,square:f},y,{children:[O.jsx(R5.Provider,{value:T,children:S}),O.jsx(P,X({in:g,timeout:"auto"},z,{children:O.jsx("div",{"aria-labelledby":S.props.id,id:S.props["aria-controls"],role:"region",className:R.region,children:D})}))]}))});function zne(t){return Mn("MuiAccordionDetails",t)}fn("MuiAccordionDetails",["root"]);const Hne=["className"],Gne=t=>{const{classes:e}=t;return bn({root:["root"]},zne,e)},Vne=Ct("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({padding:t.spacing(1,2,2)})),Wne=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiAccordionDetails"}),{className:i}=r,s=Nt(r,Hne),o=r,a=Gne(o);return O.jsx(Vne,X({className:Vt(a.root,i),ref:n,ownerState:o},s))});function $ne(t){const{className:e,classes:n,pulsate:r=!1,rippleX:i,rippleY:s,rippleSize:o,in:a,onExited:l,timeout:c}=t,[u,f]=I.useState(!1),h=Vt(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:o,height:o,top:-(o/2)+s,left:-(o/2)+i},v=Vt(n.child,u&&n.childLeaving,r&&n.childPulsate);return!a&&!u&&f(!0),I.useEffect(()=>{if(!a&&l!=null){const w=setTimeout(l,c);return()=>{clearTimeout(w)}}},[l,a,c]),O.jsx("span",{className:h,style:m,children:O.jsx("span",{className:v})})}const Jo=fn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Jne=["center","classes","className"];let e2=t=>t,d6,h6,p6,m6;const WT=550,Yne=80,Qne=Cm(d6||(d6=e2` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`)),Xne=Cm(h6||(h6=e2` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`)),Kne=Cm(p6||(p6=e2` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`)),Zne=Ct("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),qne=Ct($ne,{name:"MuiTouchRipple",slot:"Ripple"})(m6||(m6=e2` + 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; + } +`),Jo.rippleVisible,Qne,WT,({theme:t})=>t.transitions.easing.easeInOut,Jo.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,Jo.child,Jo.childLeaving,Xne,WT,({theme:t})=>t.transitions.easing.easeInOut,Jo.childPulsate,Kne,({theme:t})=>t.transitions.easing.easeInOut),ere=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:s={},className:o}=r,a=Nt(r,Jne),[l,c]=I.useState([]),u=I.useRef(0),f=I.useRef(null);I.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const h=I.useRef(!1),m=Bb(),v=I.useRef(null),w=I.useRef(null),y=I.useCallback(S=>{const{pulsate:D,rippleX:T,rippleY:E,rippleSize:R,cb:C}=S;c(L=>[...L,O.jsx(qne,{classes:{ripple:Vt(s.ripple,Jo.ripple),rippleVisible:Vt(s.rippleVisible,Jo.rippleVisible),ripplePulsate:Vt(s.ripplePulsate,Jo.ripplePulsate),child:Vt(s.child,Jo.child),childLeaving:Vt(s.childLeaving,Jo.childLeaving),childPulsate:Vt(s.childPulsate,Jo.childPulsate)},timeout:WT,pulsate:D,rippleX:T,rippleY:E,rippleSize:R},u.current)]),u.current+=1,f.current=C},[s]),g=I.useCallback((S={},D={},T=()=>{})=>{const{pulsate:E=!1,center:R=i||D.pulsate,fakeElement:C=!1}=D;if((S==null?void 0:S.type)==="mousedown"&&h.current){h.current=!1;return}(S==null?void 0:S.type)==="touchstart"&&(h.current=!0);const L=C?null:w.current,P=L?L.getBoundingClientRect():{width:0,height:0,left:0,top:0};let z,B,Y;if(R||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)z=Math.round(P.width/2),B=Math.round(P.height/2);else{const{clientX:ie,clientY:ee}=S.touches&&S.touches.length>0?S.touches[0]:S;z=Math.round(ie-P.left),B=Math.round(ee-P.top)}if(R)Y=Math.sqrt((2*P.width**2+P.height**2)/3),Y%2===0&&(Y+=1);else{const ie=Math.max(Math.abs((L?L.clientWidth:0)-z),z)*2+2,ee=Math.max(Math.abs((L?L.clientHeight:0)-B),B)*2+2;Y=Math.sqrt(ie**2+ee**2)}S!=null&&S.touches?v.current===null&&(v.current=()=>{y({pulsate:E,rippleX:z,rippleY:B,rippleSize:Y,cb:T})},m.start(Yne,()=>{v.current&&(v.current(),v.current=null)})):y({pulsate:E,rippleX:z,rippleY:B,rippleSize:Y,cb:T})},[i,y,m]),_=I.useCallback(()=>{g({},{pulsate:!0})},[g]),x=I.useCallback((S,D)=>{if(m.clear(),(S==null?void 0:S.type)==="touchend"&&v.current){v.current(),v.current=null,m.start(0,()=>{x(S,D)});return}v.current=null,c(T=>T.length>0?T.slice(1):T),f.current=D},[m]);return I.useImperativeHandle(n,()=>({pulsate:_,start:g,stop:x}),[_,g,x]),O.jsx(Zne,X({className:Vt(Jo.root,s.root,o),ref:w},a,{children:O.jsx(L4,{component:null,exit:!0,children:l})}))});function tre(t){return Mn("MuiButtonBase",t)}const nre=fn("MuiButtonBase",["root","disabled","focusVisible"]),rre=["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"],ire=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:i}=t,o=bn({root:["root",e&&"disabled",n&&"focusVisible"]},tre,i);return n&&r&&(o.root+=` ${r}`),o},sre=Ct("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.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"},[`&.${nre.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),t2=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:s=!1,children:o,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:f=!1,focusRipple:h=!1,LinkComponent:m="a",onBlur:v,onClick:w,onContextMenu:y,onDragLeave:g,onFocus:_,onFocusVisible:x,onKeyDown:S,onKeyUp:D,onMouseDown:T,onMouseLeave:E,onMouseUp:R,onTouchEnd:C,onTouchMove:L,onTouchStart:P,tabIndex:z=0,TouchRippleProps:B,touchRippleRef:Y,type:ie}=r,ee=Nt(r,rre),le=I.useRef(null),j=I.useRef(null),q=ni(j,Y),{isFocusVisibleRef:ne,onFocus:de,onBlur:_e,ref:ge}=r5(),[ce,we]=I.useState(!1);c&&ce&&we(!1),I.useImperativeHandle(i,()=>({focusVisible:()=>{we(!0),le.current.focus()}}),[]);const[he,Ie]=I.useState(!1);I.useEffect(()=>{Ie(!0)},[]);const et=he&&!u&&!c;I.useEffect(()=>{ce&&h&&!u&&he&&j.current.pulsate()},[u,h,ce,he]);function ct(Ke,nt,_t=f){return vo(Qt=>(nt&&nt(Qt),!_t&&j.current&&j.current[Ke](Qt),!0))}const it=ct("start",T),ut=ct("stop",y),$=ct("stop",g),Ce=ct("stop",R),Ne=ct("stop",Ke=>{ce&&Ke.preventDefault(),E&&E(Ke)}),ze=ct("start",P),Ue=ct("stop",C),Et=ct("stop",L),lt=ct("stop",Ke=>{_e(Ke),ne.current===!1&&we(!1),v&&v(Ke)},!1),yt=vo(Ke=>{le.current||(le.current=Ke.currentTarget),de(Ke),ne.current===!0&&(we(!0),x&&x(Ke)),_&&_(Ke)}),re=()=>{const Ke=le.current;return l&&l!=="button"&&!(Ke.tagName==="A"&&Ke.href)},V=I.useRef(!1),Ee=vo(Ke=>{h&&!V.current&&ce&&j.current&&Ke.key===" "&&(V.current=!0,j.current.stop(Ke,()=>{j.current.start(Ke)})),Ke.target===Ke.currentTarget&&re()&&Ke.key===" "&&Ke.preventDefault(),S&&S(Ke),Ke.target===Ke.currentTarget&&re()&&Ke.key==="Enter"&&!c&&(Ke.preventDefault(),w&&w(Ke))}),je=vo(Ke=>{h&&Ke.key===" "&&j.current&&ce&&!Ke.defaultPrevented&&(V.current=!1,j.current.stop(Ke,()=>{j.current.pulsate(Ke)})),D&&D(Ke),w&&Ke.target===Ke.currentTarget&&re()&&Ke.key===" "&&!Ke.defaultPrevented&&w(Ke)});let De=l;De==="button"&&(ee.href||ee.to)&&(De=m);const He={};De==="button"?(He.type=ie===void 0?"button":ie,He.disabled=c):(!ee.href&&!ee.to&&(He.role="button"),c&&(He["aria-disabled"]=c));const pt=ni(n,ge,le),Qe=X({},r,{centerRipple:s,component:l,disabled:c,disableRipple:u,disableTouchRipple:f,focusRipple:h,tabIndex:z,focusVisible:ce}),Ye=ire(Qe);return O.jsxs(sre,X({as:De,className:Vt(Ye.root,a),ownerState:Qe,onBlur:lt,onClick:w,onContextMenu:ut,onFocus:yt,onKeyDown:Ee,onKeyUp:je,onMouseDown:it,onMouseLeave:Ne,onMouseUp:Ce,onDragLeave:$,onTouchEnd:Ue,onTouchMove:Et,onTouchStart:ze,ref:pt,tabIndex:c?-1:z,type:ie},He,ee,{children:[o,et?O.jsx(ere,X({ref:q,center:s},B)):null]}))});function ore(t){return Mn("MuiAccordionSummary",t)}const fp=fn("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),are=["children","className","expandIcon","focusVisibleClassName","onClick"],lre=t=>{const{classes:e,expanded:n,disabled:r,disableGutters:i}=t;return bn({root:["root",n&&"expanded",r&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},ore,e)},cre=Ct(t2,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{const e={duration:t.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],e),[`&.${fp.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${fp.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`&:hover:not(.${fp.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${fp.expanded}`]:{minHeight:64}}}]}}),ure=Ct("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(t,e)=>e.content})(({theme:t})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),[`&.${fp.expanded}`]:{margin:"20px 0"}}}]})),fre=Ct("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(t,e)=>e.expandIconWrapper})(({theme:t})=>({display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),[`&.${fp.expanded}`]:{transform:"rotate(180deg)"}})),dre=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiAccordionSummary"}),{children:i,className:s,expandIcon:o,focusVisibleClassName:a,onClick:l}=r,c=Nt(r,are),{disabled:u=!1,disableGutters:f,expanded:h,toggle:m}=I.useContext(R5),v=g=>{m&&m(g),l&&l(g)},w=X({},r,{expanded:h,disabled:u,disableGutters:f}),y=lre(w);return O.jsxs(cre,X({focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":h,className:Vt(y.root,s),focusVisibleClassName:Vt(y.focusVisible,a),onClick:v,ref:n,ownerState:w},c,{children:[O.jsx(ure,{className:y.content,ownerState:w,children:i}),o&&O.jsx(fre,{className:y.expandIconWrapper,ownerState:w,children:o})]}))});function hre(t){return Mn("MuiAlert",t)}const g6=fn("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 pre(t){return Mn("MuiIconButton",t)}const mre=fn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),gre=["edge","children","className","color","disabled","disableFocusRipple","size"],vre=t=>{const{classes:e,disabled:n,color:r,edge:i,size:s}=t,o={root:["root",n&&"disabled",r!=="default"&&`color${zt(r)}`,i&&`edge${zt(i)}`,`size${zt(s)}`]};return bn(o,pre,e)},yre=Ct(t2,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${zt(n.color)}`],n.edge&&e[`edge${zt(n.edge)}`],e[`size${zt(n.size)}`]]}})(({theme:t,ownerState:e})=>X({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:yo(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12}),({theme:t,ownerState:e})=>{var n;const r=(n=(t.vars||t).palette)==null?void 0:n[e.color];return X({},e.color==="inherit"&&{color:"inherit"},e.color!=="inherit"&&e.color!=="default"&&X({color:r==null?void 0:r.main},!e.disableRipple&&{"&:hover":X({},r&&{backgroundColor:t.vars?`rgba(${r.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:yo(r.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),e.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},e.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${mre.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),wre=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiIconButton"}),{edge:i=!1,children:s,className:o,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium"}=r,f=Nt(r,gre),h=X({},r,{edge:i,color:a,disabled:l,disableFocusRipple:c,size:u}),m=vre(h);return O.jsx(yre,X({className:Vt(m.root,o),centerRipple:!0,focusRipple:!c,disabled:l,ref:n},f,{ownerState:h,children:s}))}),_re=ku(O.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"),Mre=ku(O.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),xre=ku(O.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"),bre=ku(O.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"),Sre=ku(O.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"),Cre=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],Ere=t=>{const{variant:e,color:n,severity:r,classes:i}=t,s={root:["root",`color${zt(n||r)}`,`${e}${zt(n||r)}`,`${e}`],icon:["icon"],message:["message"],action:["action"]};return bn(s,hre,i)},Are=Ct(Ou,{name:"MuiAlert",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${zt(n.color||n.severity)}`]]}})(({theme:t})=>{const e=t.palette.mode==="light"?jT:zT,n=t.palette.mode==="light"?zT:jT;return X({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${r}StandardBg`]:n(t.palette[r].light,.9),[`& .${g6.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),border:`1px solid ${(t.vars||t).palette[r].light}`,[`& .${g6.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(([,r])=>r.main&&r.dark).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:X({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert[`${r}FilledColor`],backgroundColor:t.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[r].dark:t.palette[r].main,color:t.palette.getContrastText(t.palette[r].main)})}))]})}),Tre=Ct("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,e)=>e.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),Ire=Ct("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),v6=Ct("div",{name:"MuiAlert",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),y6={success:O.jsx(_re,{fontSize:"inherit"}),warning:O.jsx(Mre,{fontSize:"inherit"}),error:O.jsx(xre,{fontSize:"inherit"}),info:O.jsx(bre,{fontSize:"inherit"})},k5=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiAlert"}),{action:i,children:s,className:o,closeText:a="Close",color:l,components:c={},componentsProps:u={},icon:f,iconMapping:h=y6,onClose:m,role:v="alert",severity:w="success",slotProps:y={},slots:g={},variant:_="standard"}=r,x=Nt(r,Cre),S=X({},r,{color:l,severity:w,variant:_,colorSeverity:l||w}),D=Ere(S),T={slots:X({closeButton:c.CloseButton,closeIcon:c.CloseIcon},g),slotProps:X({},u,y)},[E,R]=OM("closeButton",{elementType:wre,externalForwardedProps:T,ownerState:S}),[C,L]=OM("closeIcon",{elementType:Sre,externalForwardedProps:T,ownerState:S});return O.jsxs(Are,X({role:v,elevation:0,ownerState:S,className:Vt(D.root,o),ref:n},x,{children:[f!==!1?O.jsx(Tre,{ownerState:S,className:D.icon,children:f||h[w]||y6[w]}):null,O.jsx(Ire,{ownerState:S,className:D.message,children:s}),i!=null?O.jsx(v6,{ownerState:S,className:D.action,children:i}):null,i==null&&m?O.jsx(v6,{ownerState:S,className:D.action,children:O.jsx(E,X({size:"small","aria-label":a,title:a,color:"inherit",onClick:m},R,{children:O.jsx(C,X({fontSize:"small"},L))}))}):null]}))});function Lre(t){return Mn("MuiTypography",t)}fn("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Rre=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Pre=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:i,variant:s,classes:o}=t,a={root:["root",s,t.align!=="inherit"&&`align${zt(e)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return bn(a,Lre,o)},Dre=Ct("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${zt(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>X({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),w6={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Nre={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},kre=t=>Nre[t]||t,Bre=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiTypography"}),i=kre(r.color),s=w4(X({},r,{color:i})),{align:o="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:f=!1,variant:h="body1",variantMapping:m=w6}=s,v=Nt(s,Rre),w=X({},s,{align:o,color:i,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:f,variant:h,variantMapping:m}),y=l||(f?"p":m[h]||w6[h])||"span",g=Pre(w);return O.jsx(Dre,X({as:y,ref:n,ownerState:w,className:Vt(g.root,a)},v))});function Ore(t){return Mn("MuiAppBar",t)}fn("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const Ure=["className","color","enableColorOnDark","position"],Fre=t=>{const{color:e,position:n,classes:r}=t,i={root:["root",`color${zt(e)}`,`position${zt(n)}`]};return bn(i,Ore,r)},rw=(t,e)=>t?`${t==null?void 0:t.replace(")","")}, ${e})`:e,jre=Ct(Ou,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${zt(n.position)}`],e[`color${zt(n.color)}`]]}})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[900];return X({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},e.position==="fixed"&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},e.position==="absolute"&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="sticky"&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="static"&&{position:"static"},e.position==="relative"&&{position:"relative"},!t.vars&&X({},e.color==="default"&&{backgroundColor:n,color:t.palette.getContrastText(n)},e.color&&e.color!=="default"&&e.color!=="inherit"&&e.color!=="transparent"&&{backgroundColor:t.palette[e.color].main,color:t.palette[e.color].contrastText},e.color==="inherit"&&{color:"inherit"},t.palette.mode==="dark"&&!e.enableColorOnDark&&{backgroundColor:null,color:null},e.color==="transparent"&&X({backgroundColor:"transparent",color:"inherit"},t.palette.mode==="dark"&&{backgroundImage:"none"})),t.vars&&X({},e.color==="default"&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette.AppBar.defaultBg:rw(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":e.enableColorOnDark?t.vars.palette.text.primary:rw(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},e.color&&!e.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette[e.color].main:rw(t.vars.palette.AppBar.darkBg,t.vars.palette[e.color].main),"--AppBar-color":e.enableColorOnDark?t.vars.palette[e.color].contrastText:rw(t.vars.palette.AppBar.darkColor,t.vars.palette[e.color].contrastText)},!["inherit","transparent"].includes(e.color)&&{backgroundColor:"var(--AppBar-background)"},{color:e.color==="inherit"?"inherit":"var(--AppBar-color)"},e.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),zre=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiAppBar"}),{className:i,color:s="primary",enableColorOnDark:o=!1,position:a="fixed"}=r,l=Nt(r,Ure),c=X({},r,{color:s,position:a,enableColorOnDark:o}),u=Fre(c);return O.jsx(jre,X({square:!0,component:"header",ownerState:c,elevation:4,className:Vt(u.root,i,a==="fixed"&&"mui-fixed"),ref:n},l))});function _6(t){return t.substring(2).toLowerCase()}function Hre(t,e){return e.documentElement.clientWidth(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=ni(e.ref,a),f=vo(v=>{const w=c.current;c.current=!1;const y=Zr(a.current);if(!l.current||!a.current||"clientX"in v&&Hre(v,y))return;if(o.current){o.current=!1;return}let g;v.composedPath?g=v.composedPath().indexOf(a.current)>-1:g=!y.documentElement.contains(v.target)||a.current.contains(v.target),!g&&(n||!w)&&i(v)}),h=v=>w=>{c.current=!0;const y=e.props[v];y&&y(w)},m={ref:u};return s!==!1&&(m[s]=h(s)),I.useEffect(()=>{if(s!==!1){const v=_6(s),w=Zr(a.current),y=()=>{o.current=!0};return w.addEventListener(v,f),w.addEventListener("touchmove",y),()=>{w.removeEventListener(v,f),w.removeEventListener("touchmove",y)}}},[f,s]),r!==!1&&(m[r]=h(r)),I.useEffect(()=>{if(r!==!1){const v=_6(r),w=Zr(a.current);return w.addEventListener(v,f),()=>{w.removeEventListener(v,f)}}},[f,r]),O.jsx(I.Fragment,{children:I.cloneElement(e,m)})}const Vre=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Wre(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function $re(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function Jre(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||$re(t))}function Yre(t){const e=[],n=[];return Array.from(t.querySelectorAll(Vre)).forEach((r,i)=>{const s=Wre(r);s===-1||!Jre(r)||(s===0?e.push(r):n.push({documentOrder:i,tabIndex:s,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(e)}function Qre(){return!0}function Xre(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:s=Yre,isEnabled:o=Qre,open:a}=t,l=I.useRef(!1),c=I.useRef(null),u=I.useRef(null),f=I.useRef(null),h=I.useRef(null),m=I.useRef(!1),v=I.useRef(null),w=ni(e.ref,v),y=I.useRef(null);I.useEffect(()=>{!a||!v.current||(m.current=!n)},[n,a]),I.useEffect(()=>{if(!a||!v.current)return;const x=Zr(v.current);return v.current.contains(x.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),m.current&&v.current.focus()),()=>{i||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[a]),I.useEffect(()=>{if(!a||!v.current)return;const x=Zr(v.current),S=E=>{y.current=E,!(r||!o()||E.key!=="Tab")&&x.activeElement===v.current&&E.shiftKey&&(l.current=!0,u.current&&u.current.focus())},D=()=>{const E=v.current;if(E===null)return;if(!x.hasFocus()||!o()||l.current){l.current=!1;return}if(E.contains(x.activeElement)||r&&x.activeElement!==c.current&&x.activeElement!==u.current)return;if(x.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!m.current)return;let R=[];if((x.activeElement===c.current||x.activeElement===u.current)&&(R=s(v.current)),R.length>0){var C,L;const P=!!((C=y.current)!=null&&C.shiftKey&&((L=y.current)==null?void 0:L.key)==="Tab"),z=R[0],B=R[R.length-1];typeof z!="string"&&typeof B!="string"&&(P?B.focus():z.focus())}else E.focus()};x.addEventListener("focusin",D),x.addEventListener("keydown",S,!0);const T=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&D()},50);return()=>{clearInterval(T),x.removeEventListener("focusin",D),x.removeEventListener("keydown",S,!0)}},[n,r,i,o,a,s]);const g=x=>{f.current===null&&(f.current=x.relatedTarget),m.current=!0,h.current=x.target;const S=e.props.onFocus;S&&S(x)},_=x=>{f.current===null&&(f.current=x.relatedTarget),m.current=!0};return O.jsxs(I.Fragment,{children:[O.jsx("div",{tabIndex:a?0:-1,onFocus:_,ref:c,"data-testid":"sentinelStart"}),I.cloneElement(e,{ref:w,onFocus:g}),O.jsx("div",{tabIndex:a?0:-1,onFocus:_,ref:u,"data-testid":"sentinelEnd"})]})}function Kre(t){return typeof t=="function"?t():t}const Zre=I.forwardRef(function(e,n){const{children:r,container:i,disablePortal:s=!1}=e,[o,a]=I.useState(null),l=ni(I.isValidElement(r)?r.ref:null,n);if(Oa(()=>{s||a(Kre(i)||document.body)},[i,s]),Oa(()=>{if(o&&!s)return LM(n,o),()=>{LM(n,null)}},[n,o,s]),s){if(I.isValidElement(r)){const c={ref:l};return I.cloneElement(r,c)}return O.jsx(I.Fragment,{children:r})}return O.jsx(I.Fragment,{children:o&&md.createPortal(r,o)})});function qre(t){const e=Zr(t);return e.body===t?Ks(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Lg(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function M6(t){return parseInt(Ks(t).getComputedStyle(t).paddingRight,10)||0}function eie(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function x6(t,e,n,r,i){const s=[e,n,...r];[].forEach.call(t.children,o=>{const a=s.indexOf(o)===-1,l=!eie(o);a&&l&&Lg(o,i)})}function nE(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function tie(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(qre(r)){const o=i5(Zr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${M6(r)+o}px`;const a=Zr(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${M6(l)+o}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=Zr(r).body;else{const o=r.parentElement,a=Ks(r);s=(o==null?void 0:o.nodeName)==="HTML"&&a.getComputedStyle(o).overflowY==="scroll"?o:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:o,property:a})=>{s?o.style.setProperty(a,s):o.style.removeProperty(a)})}}function nie(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class rie{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Lg(e.modalRef,!1);const i=nie(n);x6(n,e.mount,e.modalRef,i,!0);const s=nE(this.containers,o=>o.container===n);return s!==-1?(this.containers[s].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=nE(this.containers,s=>s.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=tie(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=nE(this.containers,o=>o.modals.indexOf(e)!==-1),s=this.containers[i];if(s.modals.splice(s.modals.indexOf(e),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),e.modalRef&&Lg(e.modalRef,n),x6(s.container,e.mount,e.modalRef,s.hiddenSiblings,!1),this.containers.splice(i,1);else{const o=s.modals[s.modals.length-1];o.modalRef&&Lg(o.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}function iie(t){return typeof t=="function"?t():t}function sie(t){return t?t.props.hasOwnProperty("in"):!1}const oie=new rie;function aie(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=oie,closeAfterTransition:s=!1,onTransitionEnter:o,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:f}=t,h=I.useRef({}),m=I.useRef(null),v=I.useRef(null),w=ni(v,f),[y,g]=I.useState(!u),_=sie(l);let x=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(x=!1);const S=()=>Zr(m.current),D=()=>(h.current.modalRef=v.current,h.current.mount=m.current,h.current),T=()=>{i.mount(D(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},E=vo(()=>{const ee=iie(e)||S().body;i.add(D(),ee),v.current&&T()}),R=I.useCallback(()=>i.isTopModal(D()),[i]),C=vo(ee=>{m.current=ee,ee&&(u&&R()?T():v.current&&Lg(v.current,x))}),L=I.useCallback(()=>{i.remove(D(),x)},[x,i]);I.useEffect(()=>()=>{L()},[L]),I.useEffect(()=>{u?E():(!_||!s)&&L()},[u,L,_,s,E]);const P=ee=>le=>{var j;(j=ee.onKeyDown)==null||j.call(ee,le),!(le.key!=="Escape"||le.which===229||!R())&&(n||(le.stopPropagation(),c&&c(le,"escapeKeyDown")))},z=ee=>le=>{var j;(j=ee.onClick)==null||j.call(ee,le),le.target===le.currentTarget&&c&&c(le,"backdropClick")};return{getRootProps:(ee={})=>{const le=BM(t);delete le.onTransitionEnter,delete le.onTransitionExited;const j=X({},le,ee);return X({role:"presentation"},j,{onKeyDown:P(j),ref:w})},getBackdropProps:(ee={})=>{const le=ee;return X({"aria-hidden":!0},le,{onClick:z(le),open:u})},getTransitionProps:()=>{const ee=()=>{g(!1),o&&o()},le=()=>{g(!0),a&&a(),s&&L()};return{onEnter:BT(ee,l==null?void 0:l.props.onEnter),onExited:BT(le,l==null?void 0:l.props.onExited)}},rootRef:w,portalRef:C,isTopModal:R,exited:y,hasTransition:_}}function lie(t){const{children:e,defer:n=!1,fallback:r=null}=t,[i,s]=I.useState(!1);return Oa(()=>{n||s(!0)},[n]),I.useEffect(()=>{n&&s(!0)},[n]),O.jsx(I.Fragment,{children:i?e:r})}function cie(t={}){const{autoHideDuration:e=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:s}=t,o=Bb();I.useEffect(()=>{if(!i)return;function g(_){_.defaultPrevented||(_.key==="Escape"||_.key==="Esc")&&(r==null||r(_,"escapeKeyDown"))}return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[i,r]);const a=vo((g,_)=>{r==null||r(g,_)}),l=vo(g=>{!r||g==null||o.start(g,()=>{a(null,"timeout")})});I.useEffect(()=>(i&&l(e),o.clear),[i,e,l,o]);const c=g=>{r==null||r(g,"clickaway")},u=o.clear,f=I.useCallback(()=>{e!=null&&l(s??e*.5)},[e,s,l]),h=g=>_=>{const x=g.onBlur;x==null||x(_),f()},m=g=>_=>{const x=g.onFocus;x==null||x(_),u()},v=g=>_=>{const x=g.onMouseEnter;x==null||x(_),u()},w=g=>_=>{const x=g.onMouseLeave;x==null||x(_),f()};return I.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",f),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",f),window.removeEventListener("blur",u)}},[n,i,f,u]),{getRootProps:(g={})=>{const _=X({},BM(t),BM(g));return X({role:"presentation"},g,_,{onBlur:h(_),onFocus:m(_),onMouseEnter:v(_),onMouseLeave:w(_)})},onClickAway:c}}const uie=["onChange","maxRows","minRows","style","value"];function iw(t){return parseInt(t,10)||0}const fie={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function die(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflowing}const hie=I.forwardRef(function(e,n){const{onChange:r,maxRows:i,minRows:s=1,style:o,value:a}=e,l=Nt(e,uie),{current:c}=I.useRef(a!=null),u=I.useRef(null),f=ni(n,u),h=I.useRef(null),m=I.useCallback(()=>{const y=u.current,_=Ks(y).getComputedStyle(y);if(_.width==="0px")return{outerHeightStyle:0,overflowing:!1};const x=h.current;x.style.width=_.width,x.value=y.value||e.placeholder||"x",x.value.slice(-1)===` +`&&(x.value+=" ");const S=_.boxSizing,D=iw(_.paddingBottom)+iw(_.paddingTop),T=iw(_.borderBottomWidth)+iw(_.borderTopWidth),E=x.scrollHeight;x.value="x";const R=x.scrollHeight;let C=E;s&&(C=Math.max(Number(s)*R,C)),i&&(C=Math.min(Number(i)*R,C)),C=Math.max(C,R);const L=C+(S==="border-box"?D+T:0),P=Math.abs(C-E)<=1;return{outerHeightStyle:L,overflowing:P}},[i,s,e.placeholder]),v=I.useCallback(()=>{const y=m();if(die(y))return;const g=u.current;g.style.height=`${y.outerHeightStyle}px`,g.style.overflow=y.overflowing?"hidden":""},[m]);Oa(()=>{const y=()=>{v()};let g;const _=Db(y),x=u.current,S=Ks(x);S.addEventListener("resize",_);let D;return typeof ResizeObserver<"u"&&(D=new ResizeObserver(y),D.observe(x)),()=>{_.clear(),cancelAnimationFrame(g),S.removeEventListener("resize",_),D&&D.disconnect()}},[m,v]),Oa(()=>{v()});const w=y=>{c||v(),r&&r(y)};return O.jsxs(I.Fragment,{children:[O.jsx("textarea",X({value:a,onChange:w,ref:f,rows:s,style:o},l)),O.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:h,tabIndex:-1,style:X({},fie.shadow,o,{paddingTop:0,paddingBottom:0})})]})});function Tm({props:t,states:e,muiFormControl:n}){return e.reduce((r,i)=>(r[i]=t[i],n&&typeof t[i]>"u"&&(r[i]=n[i]),r),{})}const P4=I.createContext(void 0);function Im(){return I.useContext(P4)}function B5(t){return O.jsx(tne,X({},t,{defaultTheme:S4,themeId:Wp}))}function b6(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function UM(t,e=!1){return t&&(b6(t.value)&&t.value!==""||e&&b6(t.defaultValue)&&t.defaultValue!=="")}function pie(t){return t.startAdornment}function mie(t){return Mn("MuiInputBase",t)}const Jp=fn("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),gie=["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"],n2=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${zt(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},r2=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},vie=t=>{const{classes:e,color:n,disabled:r,error:i,endAdornment:s,focused:o,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:f,size:h,startAdornment:m,type:v}=t,w={root:["root",`color${zt(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",o&&"focused",a&&"formControl",h&&h!=="medium"&&`size${zt(h)}`,u&&"multiline",m&&"adornedStart",s&&"adornedEnd",c&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",v==="search"&&"inputTypeSearch",u&&"inputMultiline",h==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",s&&"inputAdornedEnd",f&&"readOnly"]};return bn(w,mie,e)},i2=Ct("div",{name:"MuiInputBase",slot:"Root",overridesResolver:n2})(({theme:t,ownerState:e})=>X({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Jp.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},e.multiline&&X({padding:"4px 0 5px"},e.size==="small"&&{paddingTop:1}),e.fullWidth&&{width:"100%"})),s2=Ct("input",{name:"MuiInputBase",slot:"Input",overridesResolver:r2})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=X({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},s=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return X({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] + .${Jp.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":s,"&:focus::-moz-placeholder":s,"&:focus:-ms-input-placeholder":s,"&:focus::-ms-input-placeholder":s},[`&.${Jp.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},e.size==="small"&&{paddingTop:1},e.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},e.type==="search"&&{MozAppearance:"textfield"})}),yie=O.jsx(B5,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),wie=I.forwardRef(function(e,n){var r;const i=gn({props:e,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:o,autoFocus:a,className:l,components:c={},componentsProps:u={},defaultValue:f,disabled:h,disableInjectingGlobalStyles:m,endAdornment:v,fullWidth:w=!1,id:y,inputComponent:g="input",inputProps:_={},inputRef:x,maxRows:S,minRows:D,multiline:T=!1,name:E,onBlur:R,onChange:C,onClick:L,onFocus:P,onKeyDown:z,onKeyUp:B,placeholder:Y,readOnly:ie,renderSuffix:ee,rows:le,slotProps:j={},slots:q={},startAdornment:ne,type:de="text",value:_e}=i,ge=Nt(i,gie),ce=_.value!=null?_.value:_e,{current:we}=I.useRef(ce!=null),he=I.useRef(),Ie=I.useCallback(Ye=>{},[]),et=ni(he,x,_.ref,Ie),[ct,it]=I.useState(!1),ut=Im(),$=Tm({props:i,muiFormControl:ut,states:["color","disabled","error","hiddenLabel","size","required","filled"]});$.focused=ut?ut.focused:ct,I.useEffect(()=>{!ut&&h&&ct&&(it(!1),R&&R())},[ut,h,ct,R]);const Ce=ut&&ut.onFilled,Ne=ut&&ut.onEmpty,ze=I.useCallback(Ye=>{UM(Ye)?Ce&&Ce():Ne&&Ne()},[Ce,Ne]);Oa(()=>{we&&ze({value:ce})},[ce,ze,we]);const Ue=Ye=>{if($.disabled){Ye.stopPropagation();return}P&&P(Ye),_.onFocus&&_.onFocus(Ye),ut&&ut.onFocus?ut.onFocus(Ye):it(!0)},Et=Ye=>{R&&R(Ye),_.onBlur&&_.onBlur(Ye),ut&&ut.onBlur?ut.onBlur(Ye):it(!1)},lt=(Ye,...Ke)=>{if(!we){const nt=Ye.target||he.current;if(nt==null)throw new Error(gd(1));ze({value:nt.value})}_.onChange&&_.onChange(Ye,...Ke),C&&C(Ye,...Ke)};I.useEffect(()=>{ze(he.current)},[]);const yt=Ye=>{he.current&&Ye.currentTarget===Ye.target&&he.current.focus(),L&&L(Ye)};let re=g,V=_;T&&re==="input"&&(le?V=X({type:void 0,minRows:le,maxRows:le},V):V=X({type:void 0,maxRows:S,minRows:D},V),re=hie);const Ee=Ye=>{ze(Ye.animationName==="mui-auto-fill-cancel"?he.current:{value:"x"})};I.useEffect(()=>{ut&&ut.setAdornedStart(!!ne)},[ut,ne]);const je=X({},i,{color:$.color||"primary",disabled:$.disabled,endAdornment:v,error:$.error,focused:$.focused,formControl:ut,fullWidth:w,hiddenLabel:$.hiddenLabel,multiline:T,size:$.size,startAdornment:ne,type:de}),De=vie(je),He=q.root||c.Root||i2,pt=j.root||u.root||{},Qe=q.input||c.Input||s2;return V=X({},V,(r=j.input)!=null?r:u.input),O.jsxs(I.Fragment,{children:[!m&&yie,O.jsxs(He,X({},pt,!$p(He)&&{ownerState:X({},je,pt.ownerState)},{ref:n,onClick:yt},ge,{className:Vt(De.root,pt.className,l,ie&&"MuiInputBase-readOnly"),children:[ne,O.jsx(P4.Provider,{value:null,children:O.jsx(Qe,X({ownerState:je,"aria-invalid":$.error,"aria-describedby":s,autoComplete:o,autoFocus:a,defaultValue:f,disabled:$.disabled,id:y,onAnimationStart:Ee,name:E,placeholder:Y,readOnly:ie,required:$.required,rows:le,value:ce,onKeyDown:z,onKeyUp:B,type:de},V,!$p(Qe)&&{as:re,ownerState:X({},je,V.ownerState)},{ref:et,className:Vt(De.input,V.className,ie&&"MuiInputBase-readOnly"),onBlur:Et,onChange:lt,onFocus:Ue}))}),v,ee?ee(X({},$,{startAdornment:ne})):null]}))]})}),D4=wie;function _ie(t){return Mn("MuiInput",t)}const I0=X({},Jp,fn("MuiInput",["root","underline","input"]));function Mie(t){return Mn("MuiOutlinedInput",t)}const Ac=X({},Jp,fn("MuiOutlinedInput",["root","notchedOutline","input"]));function xie(t){return Mn("MuiFilledInput",t)}const hf=X({},Jp,fn("MuiFilledInput",["root","underline","input"])),bie=ku(O.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Sie=ku(O.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 Cie(t){return Mn("MuiAvatar",t)}fn("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const Eie=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],Aie=t=>{const{classes:e,variant:n,colorDefault:r}=t;return bn({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},Cie,e)},Tie=Ct("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],n.colorDefault&&e.colorDefault]}})(({theme:t})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:X({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:X({backgroundColor:t.palette.grey[400]},t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})))}]})),Iie=Ct("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(t,e)=>e.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Lie=Ct(Sie,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(t,e)=>e.fallback})({width:"75%",height:"75%"});function Rie({crossOrigin:t,referrerPolicy:e,src:n,srcSet:r}){const[i,s]=I.useState(!1);return I.useEffect(()=>{if(!n&&!r)return;s(!1);let o=!0;const a=new Image;return a.onload=()=>{o&&s("loaded")},a.onerror=()=>{o&&s("error")},a.crossOrigin=t,a.referrerPolicy=e,a.src=n,r&&(a.srcset=r),()=>{o=!1}},[t,e,n,r]),i}const Pie=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiAvatar"}),{alt:i,children:s,className:o,component:a="div",slots:l={},slotProps:c={},imgProps:u,sizes:f,src:h,srcSet:m,variant:v="circular"}=r,w=Nt(r,Eie);let y=null;const g=Rie(X({},u,{src:h,srcSet:m})),_=h||m,x=_&&g!=="error",S=X({},r,{colorDefault:!x,component:a,variant:v}),D=Aie(S),[T,E]=OM("img",{className:D.img,elementType:Iie,externalForwardedProps:{slots:l,slotProps:{img:X({},u,c.img)}},additionalProps:{alt:i,src:h,srcSet:m,sizes:f},ownerState:S});return x?y=O.jsx(T,X({},E)):s||s===0?y=s:_&&i?y=i[0]:y=O.jsx(Lie,{ownerState:S,className:D.fallback}),O.jsx(Tie,X({as:a,ownerState:S,className:Vt(D.root,o),ref:n},w,{children:y}))}),Die=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Nie={entering:{opacity:1},entered:{opacity:1}},O5=I.forwardRef(function(e,n){const r=Bu(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:o=!0,children:a,easing:l,in:c,onEnter:u,onEntered:f,onEntering:h,onExit:m,onExited:v,onExiting:w,style:y,timeout:g=i,TransitionComponent:_=fa}=e,x=Nt(e,Die),S=I.useRef(null),D=ni(S,a.ref,n),T=Y=>ie=>{if(Y){const ee=S.current;ie===void 0?Y(ee):Y(ee,ie)}},E=T(h),R=T((Y,ie)=>{R4(Y);const ee=lc({style:y,timeout:g,easing:l},{mode:"enter"});Y.style.webkitTransition=r.transitions.create("opacity",ee),Y.style.transition=r.transitions.create("opacity",ee),u&&u(Y,ie)}),C=T(f),L=T(w),P=T(Y=>{const ie=lc({style:y,timeout:g,easing:l},{mode:"exit"});Y.style.webkitTransition=r.transitions.create("opacity",ie),Y.style.transition=r.transitions.create("opacity",ie),m&&m(Y)}),z=T(v),B=Y=>{s&&s(S.current,Y)};return O.jsx(_,X({appear:o,in:c,nodeRef:S,onEnter:R,onEntered:C,onEntering:E,onExit:P,onExited:z,onExiting:L,addEndListener:B,timeout:g},x,{children:(Y,ie)=>I.cloneElement(a,X({style:X({opacity:0,visibility:Y==="exited"&&!c?"hidden":void 0},Nie[Y],y,a.props.style),ref:D},ie))}))});function kie(t){return Mn("MuiBackdrop",t)}fn("MuiBackdrop",["root","invisible"]);const Bie=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Oie=t=>{const{classes:e,invisible:n}=t;return bn({root:["root",n&&"invisible"]},kie,e)},Uie=Ct("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>X({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"},t.invisible&&{backgroundColor:"transparent"})),U5=I.forwardRef(function(e,n){var r,i,s;const o=gn({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:f={},invisible:h=!1,open:m,slotProps:v={},slots:w={},TransitionComponent:y=O5,transitionDuration:g}=o,_=Nt(o,Bie),x=X({},o,{component:c,invisible:h}),S=Oie(x),D=(r=v.root)!=null?r:f.root;return O.jsx(y,X({in:m,timeout:g},_,{children:O.jsx(Uie,X({"aria-hidden":!0},D,{as:(i=(s=w.root)!=null?s:u.Root)!=null?i:c,className:Vt(S.root,l,D==null?void 0:D.className),ownerState:X({},x,D==null?void 0:D.ownerState),classes:S,ref:n,children:a}))}))}),Fie=fn("MuiBox",["root"]),jie=b4(),zie=rne({themeId:Wp,defaultTheme:jie,defaultClassName:Fie.root,generateClassName:h4.generate});function Hie(t){return Mn("MuiButton",t)}const sw=fn("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"]),Gie=I.createContext({}),Vie=I.createContext(void 0),Wie=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],$ie=t=>{const{color:e,disableElevation:n,fullWidth:r,size:i,variant:s,classes:o}=t,a={root:["root",s,`${s}${zt(e)}`,`size${zt(i)}`,`${s}Size${zt(i)}`,`color${zt(e)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${zt(i)}`],endIcon:["icon","endIcon",`iconSize${zt(i)}`]},l=bn(a,Hie,o);return X({},o,l)},F5=t=>X({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Jie=Ct(t2,{shouldForwardProp:t=>Po(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${zt(n.color)}`],e[`size${zt(n.size)}`],e[`${n.variant}Size${zt(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth]}})(({theme:t,ownerState:e})=>{var n,r;const i=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],s=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return X({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":X({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:yo(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="text"&&e.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:yo(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="outlined"&&e.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[e.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:yo(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="contained"&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:s,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},e.variant==="contained"&&e.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}),"&:active":X({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${sw.focusVisible}`]:X({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${sw.disabled}`]:X({color:(t.vars||t).palette.action.disabled},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},e.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},e.variant==="text"&&{padding:"6px 8px"},e.variant==="text"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main},e.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},e.variant==="outlined"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:`1px solid ${yo(t.palette[e.color].main,.5)}`},e.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(n=(r=t.palette).getContrastText)==null?void 0:n.call(r,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},e.variant==="contained"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main},e.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},e.size==="small"&&e.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},e.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${sw.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${sw.disabled}`]:{boxShadow:"none"}}),Yie=Ct("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,e[`iconSize${zt(n.size)}`]]}})(({ownerState:t})=>X({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},F5(t))),Qie=Ct("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,e[`iconSize${zt(n.size)}`]]}})(({ownerState:t})=>X({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},F5(t))),FM=I.forwardRef(function(e,n){const r=I.useContext(Gie),i=I.useContext(Vie),s=PM(r,e),o=gn({props:s,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:f=!1,disableElevation:h=!1,disableFocusRipple:m=!1,endIcon:v,focusVisibleClassName:w,fullWidth:y=!1,size:g="medium",startIcon:_,type:x,variant:S="text"}=o,D=Nt(o,Wie),T=X({},o,{color:l,component:c,disabled:f,disableElevation:h,disableFocusRipple:m,fullWidth:y,size:g,type:x,variant:S}),E=$ie(T),R=_&&O.jsx(Yie,{className:E.startIcon,ownerState:T,children:_}),C=v&&O.jsx(Qie,{className:E.endIcon,ownerState:T,children:v}),L=i||"";return O.jsxs(Jie,X({ownerState:T,className:Vt(r.className,E.root,u,L),component:c,disabled:f,focusRipple:!m,focusVisibleClassName:Vt(E.focusVisible,w),ref:n,type:x},D,{classes:E,children:[R,a,C]}))});function Xie(t){return Mn("MuiCircularProgress",t)}fn("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Kie=["className","color","disableShrink","size","style","thickness","value","variant"];let o2=t=>t,S6,C6,E6,A6;const Tc=44,Zie=Cm(S6||(S6=o2` + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +`)),qie=Cm(C6||(C6=o2` + 0% { + stroke-dasharray: 1px, 200px; + stroke-dashoffset: 0; + } + + 50% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -15px; + } + + 100% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -125px; + } +`)),ese=t=>{const{classes:e,variant:n,color:r,disableShrink:i}=t,s={root:["root",n,`color${zt(r)}`],svg:["svg"],circle:["circle",`circle${zt(n)}`,i&&"circleDisableShrink"]};return bn(s,Xie,e)},tse=Ct("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${zt(n.color)}`]]}})(({ownerState:t,theme:e})=>X({display:"inline-block"},t.variant==="determinate"&&{transition:e.transitions.create("transform")},t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main}),({ownerState:t})=>t.variant==="indeterminate"&&wl(E6||(E6=o2` + animation: ${0} 1.4s linear infinite; + `),Zie)),nse=Ct("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),rse=Ct("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${zt(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(({ownerState:t,theme:e})=>X({stroke:"currentColor"},t.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},t.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink&&wl(A6||(A6=o2` + animation: ${0} 1.4s ease-in-out infinite; + `),qie)),ise=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiCircularProgress"}),{className:i,color:s="primary",disableShrink:o=!1,size:a=40,style:l,thickness:c=3.6,value:u=0,variant:f="indeterminate"}=r,h=Nt(r,Kie),m=X({},r,{color:s,disableShrink:o,size:a,thickness:c,value:u,variant:f}),v=ese(m),w={},y={},g={};if(f==="determinate"){const _=2*Math.PI*((Tc-c)/2);w.strokeDasharray=_.toFixed(3),g["aria-valuenow"]=Math.round(u),w.strokeDashoffset=`${((100-u)/100*_).toFixed(3)}px`,y.transform="rotate(-90deg)"}return O.jsx(tse,X({className:Vt(v.root,i),style:X({width:a,height:a},y,l),ownerState:m,ref:n,role:"progressbar"},g,h,{children:O.jsx(nse,{className:v.svg,ownerState:m,viewBox:`${Tc/2} ${Tc/2} ${Tc} ${Tc}`,children:O.jsx(rse,{className:v.circle,style:w,ownerState:m,cx:Tc,cy:Tc,r:(Tc-c)/2,fill:"none",strokeWidth:c})})}))}),sse=(t,e)=>X({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&!t.vars&&{colorScheme:t.palette.mode}),ose=t=>X({color:(t.vars||t).palette.text.primary},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),ase=(t,e=!1)=>{var n;const r={};e&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([o,a])=>{var l;r[t.getColorSchemeSelector(o).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let i=X({html:sse(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:X({margin:0},ose(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},r);const s=(n=t.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return s&&(i=[i,s]),i};function lse(t){const e=gn({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return O.jsxs(I.Fragment,{children:[O.jsx(B5,{styles:i=>ase(i,r)}),n]})}function cse(t){return Mn("MuiModal",t)}fn("MuiModal",["root","hidden","backdrop"]);const use=["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"],fse=t=>{const{open:e,exited:n,classes:r}=t;return bn({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},cse,r)},dse=Ct("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>X({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),hse=Ct(U5,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),N4=I.forwardRef(function(e,n){var r,i,s,o,a,l;const c=gn({name:"MuiModal",props:e}),{BackdropComponent:u=hse,BackdropProps:f,className:h,closeAfterTransition:m=!1,children:v,container:w,component:y,components:g={},componentsProps:_={},disableAutoFocus:x=!1,disableEnforceFocus:S=!1,disableEscapeKeyDown:D=!1,disablePortal:T=!1,disableRestoreFocus:E=!1,disableScrollLock:R=!1,hideBackdrop:C=!1,keepMounted:L=!1,onBackdropClick:P,open:z,slotProps:B,slots:Y}=c,ie=Nt(c,use),ee=X({},c,{closeAfterTransition:m,disableAutoFocus:x,disableEnforceFocus:S,disableEscapeKeyDown:D,disablePortal:T,disableRestoreFocus:E,disableScrollLock:R,hideBackdrop:C,keepMounted:L}),{getRootProps:le,getBackdropProps:j,getTransitionProps:q,portalRef:ne,isTopModal:de,exited:_e,hasTransition:ge}=aie(X({},ee,{rootRef:n})),ce=X({},ee,{exited:_e}),we=fse(ce),he={};if(v.props.tabIndex===void 0&&(he.tabIndex="-1"),ge){const{onEnter:Ce,onExited:Ne}=q();he.onEnter=Ce,he.onExited=Ne}const Ie=(r=(i=Y==null?void 0:Y.root)!=null?i:g.Root)!=null?r:dse,et=(s=(o=Y==null?void 0:Y.backdrop)!=null?o:g.Backdrop)!=null?s:u,ct=(a=B==null?void 0:B.root)!=null?a:_.root,it=(l=B==null?void 0:B.backdrop)!=null?l:_.backdrop,ut=vd({elementType:Ie,externalSlotProps:ct,externalForwardedProps:ie,getSlotProps:le,additionalProps:{ref:n,as:y},ownerState:ce,className:Vt(h,ct==null?void 0:ct.className,we==null?void 0:we.root,!ce.open&&ce.exited&&(we==null?void 0:we.hidden))}),$=vd({elementType:et,externalSlotProps:it,additionalProps:f,getSlotProps:Ce=>j(X({},Ce,{onClick:Ne=>{P&&P(Ne),Ce!=null&&Ce.onClick&&Ce.onClick(Ne)}})),className:Vt(it==null?void 0:it.className,f==null?void 0:f.className,we==null?void 0:we.backdrop),ownerState:ce});return!L&&!z&&(!ge||_e)?null:O.jsx(Zre,{ref:ne,container:w,disablePortal:T,children:O.jsxs(Ie,X({},ut,{children:[!C&&u?O.jsx(et,X({},$)):null,O.jsx(Xre,{disableEnforceFocus:S,disableAutoFocus:x,disableRestoreFocus:E,isEnabled:de,open:z,children:I.cloneElement(v,he)})]}))})});function pse(t){return Mn("MuiDialog",t)}const rE=fn("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),j5=I.createContext({}),mse=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],gse=Ct(U5,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),vse=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:i,fullScreen:s}=t,o={root:["root"],container:["container",`scroll${zt(n)}`],paper:["paper",`paperScroll${zt(n)}`,`paperWidth${zt(String(r))}`,i&&"paperFullWidth",s&&"paperFullScreen"]};return bn(o,pse,e)},yse=Ct(N4,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),wse=Ct("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${zt(n.scroll)}`]]}})(({ownerState:t})=>X({height:"100%","@media print":{height:"auto"},outline:0},t.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},t.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),_se=Ct(Ou,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${zt(n.scroll)}`],e[`paperWidth${zt(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(({theme:t,ownerState:e})=>X({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},e.maxWidth==="xs"&&{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${rE.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&e.maxWidth!=="xs"&&{maxWidth:`${t.breakpoints.values[e.maxWidth]}${t.breakpoints.unit}`,[`&.${rE.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${rE.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),z5=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiDialog"}),i=Bu(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":o,"aria-labelledby":a,BackdropComponent:l,BackdropProps:c,children:u,className:f,disableEscapeKeyDown:h=!1,fullScreen:m=!1,fullWidth:v=!1,maxWidth:w="sm",onBackdropClick:y,onClick:g,onClose:_,open:x,PaperComponent:S=Ou,PaperProps:D={},scroll:T="paper",TransitionComponent:E=O5,transitionDuration:R=s,TransitionProps:C}=r,L=Nt(r,mse),P=X({},r,{disableEscapeKeyDown:h,fullScreen:m,fullWidth:v,maxWidth:w,scroll:T}),z=vse(P),B=I.useRef(),Y=j=>{B.current=j.target===j.currentTarget},ie=j=>{g&&g(j),B.current&&(B.current=null,y&&y(j),_&&_(j,"backdropClick"))},ee=Nb(a),le=I.useMemo(()=>({titleId:ee}),[ee]);return O.jsx(yse,X({className:Vt(z.root,f),closeAfterTransition:!0,components:{Backdrop:gse},componentsProps:{backdrop:X({transitionDuration:R,as:l},c)},disableEscapeKeyDown:h,onClose:_,open:x,ref:n,onClick:ie,ownerState:P},L,{children:O.jsx(E,X({appear:!0,in:x,timeout:R,role:"presentation"},C,{children:O.jsx(wse,{className:Vt(z.container),onMouseDown:Y,ownerState:P,children:O.jsx(_se,X({as:S,elevation:24,role:"dialog","aria-describedby":o,"aria-labelledby":ee},D,{className:Vt(z.paper,D.className),ownerState:P,children:O.jsx(j5.Provider,{value:le,children:u})}))})}))}))});function Mse(t){return Mn("MuiDialogActions",t)}fn("MuiDialogActions",["root","spacing"]);const xse=["className","disableSpacing"],bse=t=>{const{classes:e,disableSpacing:n}=t;return bn({root:["root",!n&&"spacing"]},Mse,e)},Sse=Ct("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>X({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),H5=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:s=!1}=r,o=Nt(r,xse),a=X({},r,{disableSpacing:s}),l=bse(a);return O.jsx(Sse,X({className:Vt(l.root,i),ownerState:a,ref:n},o))});function Cse(t){return Mn("MuiDialogContent",t)}fn("MuiDialogContent",["root","dividers"]);function Ese(t){return Mn("MuiDialogTitle",t)}const Ase=fn("MuiDialogTitle",["root"]),Tse=["className","dividers"],Ise=t=>{const{classes:e,dividers:n}=t;return bn({root:["root",n&&"dividers"]},Cse,e)},Lse=Ct("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(({theme:t,ownerState:e})=>X({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${Ase.root} + &`]:{paddingTop:0}})),G5=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiDialogContent"}),{className:i,dividers:s=!1}=r,o=Nt(r,Tse),a=X({},r,{dividers:s}),l=Ise(a);return O.jsx(Lse,X({className:Vt(l.root,i),ownerState:a,ref:n},o))}),Rse=["className","id"],Pse=t=>{const{classes:e}=t;return bn({root:["root"]},Ese,e)},Dse=Ct(Bre,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(t,e)=>e.root})({padding:"16px 24px",flex:"0 0 auto"}),V5=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiDialogTitle"}),{className:i,id:s}=r,o=Nt(r,Rse),a=r,l=Pse(a),{titleId:c=s}=I.useContext(j5);return O.jsx(Dse,X({component:"h2",className:Vt(l.root,i),ownerState:a,ref:n,variant:"h6",id:s??c},o))});function Nse(t){return Mn("MuiDivider",t)}fn("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const kse=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Bse=t=>{const{absolute:e,children:n,classes:r,flexItem:i,light:s,orientation:o,textAlign:a,variant:l}=t;return bn({root:["root",e&&"absolute",l,s&&"light",o==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&o==="vertical"&&"withChildrenVertical",a==="right"&&o!=="vertical"&&"textAlignRight",a==="left"&&o!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",o==="vertical"&&"wrapperVertical"]},Nse,r)},Ose=Ct("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,n.orientation==="vertical"&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&n.orientation==="vertical"&&e.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&e.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&e.textAlignLeft]}})(({theme:t,ownerState:e})=>X({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},e.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},e.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:yo(t.palette.divider,.08)},e.variant==="inset"&&{marginLeft:72},e.variant==="middle"&&e.orientation==="horizontal"&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},e.variant==="middle"&&e.orientation==="vertical"&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},e.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},e.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:t})=>X({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:t,ownerState:e})=>X({},e.children&&e.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`}}),({theme:t,ownerState:e})=>X({},e.children&&e.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`}}),({ownerState:t})=>X({},t.textAlign==="right"&&t.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},t.textAlign==="left"&&t.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),Use=Ct("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.wrapper,n.orientation==="vertical"&&e.wrapperVertical]}})(({theme:t,ownerState:e})=>X({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},e.orientation==="vertical"&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`})),W5=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiDivider"}),{absolute:i=!1,children:s,className:o,component:a=s?"div":"hr",flexItem:l=!1,light:c=!1,orientation:u="horizontal",role:f=a!=="hr"?"separator":void 0,textAlign:h="center",variant:m="fullWidth"}=r,v=Nt(r,kse),w=X({},r,{absolute:i,component:a,flexItem:l,light:c,orientation:u,role:f,textAlign:h,variant:m}),y=Bse(w);return O.jsx(Ose,X({as:a,className:Vt(y.root,o),role:f,ref:n,ownerState:w},v,{children:s?O.jsx(Use,{className:y.wrapper,ownerState:w,children:s}):null}))});W5.muiSkipListHighlight=!0;const Fse=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function jse(t,e,n){const r=e.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),s=Ks(e);let o;if(e.fakeTransform)o=e.fakeTransform;else{const c=s.getComputedStyle(e);o=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(o&&o!=="none"&&typeof o=="string"){const c=o.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return t==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${s.innerWidth+a-r.left}px)`:t==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:t==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${s.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function zse(t){return typeof t=="function"?t():t}function ow(t,e,n){const r=zse(n),i=jse(t,e,r);i&&(e.style.webkitTransform=i,e.style.transform=i)}const Hse=I.forwardRef(function(e,n){const r=Bu(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:l,container:c,direction:u="down",easing:f=i,in:h,onEnter:m,onEntered:v,onEntering:w,onExit:y,onExited:g,onExiting:_,style:x,timeout:S=s,TransitionComponent:D=fa}=e,T=Nt(e,Fse),E=I.useRef(null),R=ni(l.ref,E,n),C=j=>q=>{j&&(q===void 0?j(E.current):j(E.current,q))},L=C((j,q)=>{ow(u,j,c),R4(j),m&&m(j,q)}),P=C((j,q)=>{const ne=lc({timeout:S,style:x,easing:f},{mode:"enter"});j.style.webkitTransition=r.transitions.create("-webkit-transform",X({},ne)),j.style.transition=r.transitions.create("transform",X({},ne)),j.style.webkitTransform="none",j.style.transform="none",w&&w(j,q)}),z=C(v),B=C(_),Y=C(j=>{const q=lc({timeout:S,style:x,easing:f},{mode:"exit"});j.style.webkitTransition=r.transitions.create("-webkit-transform",q),j.style.transition=r.transitions.create("transform",q),ow(u,j,c),y&&y(j)}),ie=C(j=>{j.style.webkitTransition="",j.style.transition="",g&&g(j)}),ee=j=>{o&&o(E.current,j)},le=I.useCallback(()=>{E.current&&ow(u,E.current,c)},[u,c]);return I.useEffect(()=>{if(h||u==="down"||u==="right")return;const j=Db(()=>{E.current&&ow(u,E.current,c)}),q=Ks(E.current);return q.addEventListener("resize",j),()=>{j.clear(),q.removeEventListener("resize",j)}},[u,h,c]),I.useEffect(()=>{h||le()},[h,le]),O.jsx(D,X({nodeRef:E,onEnter:L,onEntered:z,onEntering:P,onExit:Y,onExited:ie,onExiting:B,addEndListener:ee,appear:a,in:h,timeout:S},T,{children:(j,q)=>I.cloneElement(l,X({ref:R,style:X({visibility:j==="exited"&&!h?"hidden":void 0},x,l.props.style)},q))}))});function Gse(t){return Mn("MuiDrawer",t)}fn("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Vse=["BackdropProps"],Wse=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],$5=(t,e)=>{const{ownerState:n}=t;return[e.root,(n.variant==="permanent"||n.variant==="persistent")&&e.docked,e.modal]},$se=t=>{const{classes:e,anchor:n,variant:r}=t,i={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${zt(n)}`,r!=="temporary"&&`paperAnchorDocked${zt(n)}`]};return bn(i,Gse,e)},Jse=Ct(N4,{name:"MuiDrawer",slot:"Root",overridesResolver:$5})(({theme:t})=>({zIndex:(t.vars||t).zIndex.drawer})),T6=Ct("div",{shouldForwardProp:Po,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:$5})({flex:"0 0 auto"}),Yse=Ct(Ou,{name:"MuiDrawer",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`paperAnchor${zt(n.anchor)}`],n.variant!=="temporary"&&e[`paperAnchorDocked${zt(n.anchor)}`]]}})(({theme:t,ownerState:e})=>X({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},e.anchor==="left"&&{left:0},e.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},e.anchor==="right"&&{right:0},e.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},e.anchor==="left"&&e.variant!=="temporary"&&{borderRight:`1px solid ${(t.vars||t).palette.divider}`},e.anchor==="top"&&e.variant!=="temporary"&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`},e.anchor==="right"&&e.variant!=="temporary"&&{borderLeft:`1px solid ${(t.vars||t).palette.divider}`},e.anchor==="bottom"&&e.variant!=="temporary"&&{borderTop:`1px solid ${(t.vars||t).palette.divider}`})),J5={left:"right",right:"left",top:"down",bottom:"up"};function kf(t){return["left","right"].indexOf(t)!==-1}function lg({direction:t},e){return t==="rtl"&&kf(e)?J5[e]:e}const Qse=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiDrawer"}),i=Bu(),s=A5(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:f=16,hideBackdrop:h=!1,ModalProps:{BackdropProps:m}={},onClose:v,open:w=!1,PaperProps:y={},SlideProps:g,TransitionComponent:_=Hse,transitionDuration:x=o,variant:S="temporary"}=r,D=Nt(r.ModalProps,Vse),T=Nt(r,Wse),E=I.useRef(!1);I.useEffect(()=>{E.current=!0},[]);const R=lg({direction:s?"rtl":"ltr"},a),L=X({},r,{anchor:a,elevation:f,open:w,variant:S},T),P=$se(L),z=O.jsx(Yse,X({elevation:S==="temporary"?f:0,square:!0},y,{className:Vt(P.paper,y.className),ownerState:L,children:c}));if(S==="permanent")return O.jsx(T6,X({className:Vt(P.root,P.docked,u),ownerState:L,ref:n},T,{children:z}));const B=O.jsx(_,X({in:w,direction:J5[R],timeout:x,appear:E.current},g,{children:z}));return S==="persistent"?O.jsx(T6,X({className:Vt(P.root,P.docked,u),ownerState:L,ref:n},T,{children:B})):O.jsx(Jse,X({BackdropProps:X({},l,m,{transitionDuration:x}),className:Vt(P.root,P.modal,u),open:w,ownerState:L,onClose:v,hideBackdrop:h,ref:n},T,D,{children:B}))}),Xse=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Kse=t=>{const{classes:e,disableUnderline:n}=t,i=bn({root:["root",!n&&"underline"],input:["input"]},xie,e);return X({},e,i)},Zse=Ct(i2,{shouldForwardProp:t=>Po(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...n2(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",s=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return X({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s}},[`&.${hf.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s},[`&.${hf.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:a}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${hf.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${hf.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${hf.disabled}, .${hf.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${hf.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&X({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9}))}),qse=Ct(s2,{name:"MuiFilledInput",slot:"Input",overridesResolver:r2})(({theme:t,ownerState:e})=>X({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),k4=I.forwardRef(function(e,n){var r,i,s,o;const a=gn({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:f="input",multiline:h=!1,slotProps:m,slots:v={},type:w="text"}=a,y=Nt(a,Xse),g=X({},a,{fullWidth:u,inputComponent:f,multiline:h,type:w}),_=Kse(a),x={root:{ownerState:g},input:{ownerState:g}},S=m??c?Co(x,m??c):x,D=(r=(i=v.root)!=null?i:l.Root)!=null?r:Zse,T=(s=(o=v.input)!=null?o:l.Input)!=null?s:qse;return O.jsx(D4,X({slots:{root:D,input:T},componentsProps:S,fullWidth:u,inputComponent:f,multiline:h,ref:n,type:w},y,{classes:_}))});k4.muiName="Input";function eoe(t){return Mn("MuiFormControl",t)}fn("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const toe=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],noe=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${zt(n)}`,r&&"fullWidth"]};return bn(i,eoe,e)},roe=Ct("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>X({},e.root,e[`margin${zt(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>X({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),ioe=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiFormControl"}),{children:i,className:s,color:o="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:f=!1,hiddenLabel:h=!1,margin:m="none",required:v=!1,size:w="medium",variant:y="outlined"}=r,g=Nt(r,toe),_=X({},r,{color:o,component:a,disabled:l,error:c,fullWidth:f,hiddenLabel:h,margin:m,required:v,size:w,variant:y}),x=noe(_),[S,D]=I.useState(()=>{let B=!1;return i&&I.Children.forEach(i,Y=>{if(!Tg(Y,["Input","Select"]))return;const ie=Tg(Y,["Select"])?Y.props.input:Y;ie&&pie(ie.props)&&(B=!0)}),B}),[T,E]=I.useState(()=>{let B=!1;return i&&I.Children.forEach(i,Y=>{Tg(Y,["Input","Select"])&&(UM(Y.props,!0)||UM(Y.props.inputProps,!0))&&(B=!0)}),B}),[R,C]=I.useState(!1);l&&R&&C(!1);const L=u!==void 0&&!l?u:R;let P;const z=I.useMemo(()=>({adornedStart:S,setAdornedStart:D,color:o,disabled:l,error:c,filled:T,focused:L,fullWidth:f,hiddenLabel:h,size:w,onBlur:()=>{C(!1)},onEmpty:()=>{E(!1)},onFilled:()=>{E(!0)},onFocus:()=>{C(!0)},registerEffect:P,required:v,variant:y}),[S,o,l,c,T,L,f,h,P,v,w,y]);return O.jsx(P4.Provider,{value:z,children:O.jsx(roe,X({as:a,ownerState:_,className:Vt(x.root,s),ref:n},g,{children:i}))})});function soe(t){return Mn("MuiFormHelperText",t)}const I6=fn("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var L6;const ooe=["children","className","component","disabled","error","filled","focused","margin","required","variant"],aoe=t=>{const{classes:e,contained:n,size:r,disabled:i,error:s,filled:o,focused:a,required:l}=t,c={root:["root",i&&"disabled",s&&"error",r&&`size${zt(r)}`,n&&"contained",a&&"focused",o&&"filled",l&&"required"]};return bn(c,soe,e)},loe=Ct("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${zt(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>X({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${I6.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${I6.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),coe=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiFormHelperText"}),{children:i,className:s,component:o="p"}=r,a=Nt(r,ooe),l=Im(),c=Tm({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=X({},r,{component:o,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=aoe(u);return O.jsx(loe,X({as:o,ownerState:u,className:Vt(f.root,s),ref:n},a,{children:i===" "?L6||(L6=O.jsx("span",{className:"notranslate",children:"​"})):i}))});function uoe(t){return Mn("MuiFormLabel",t)}const Rg=fn("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),foe=["children","className","color","component","disabled","error","filled","focused","required"],doe=t=>{const{classes:e,color:n,focused:r,disabled:i,error:s,filled:o,required:a}=t,l={root:["root",`color${zt(n)}`,i&&"disabled",s&&"error",o&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",s&&"error"]};return bn(l,uoe,e)},hoe=Ct("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>X({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>X({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Rg.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${Rg.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Rg.error}`]:{color:(t.vars||t).palette.error.main}})),poe=Ct("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${Rg.error}`]:{color:(t.vars||t).palette.error.main}})),moe=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiFormLabel"}),{children:i,className:s,component:o="label"}=r,a=Nt(r,foe),l=Im(),c=Tm({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=X({},r,{color:c.color||"primary",component:o,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=doe(u);return O.jsxs(hoe,X({as:o,ownerState:u,className:Vt(f.root,s),ref:n},a,{children:[i,c.required&&O.jsxs(poe,{ownerState:u,"aria-hidden":!0,className:f.asterisk,children:[" ","*"]})]}))}),goe=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function $T(t){return`scale(${t}, ${t**2})`}const voe={entering:{opacity:1,transform:$T(1)},entered:{opacity:1,transform:"none"}},iE=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),B4=I.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:s,easing:o,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:f,onExited:h,onExiting:m,style:v,timeout:w="auto",TransitionComponent:y=fa}=e,g=Nt(e,goe),_=Bb(),x=I.useRef(),S=Bu(),D=I.useRef(null),T=ni(D,s.ref,n),E=ie=>ee=>{if(ie){const le=D.current;ee===void 0?ie(le):ie(le,ee)}},R=E(u),C=E((ie,ee)=>{R4(ie);const{duration:le,delay:j,easing:q}=lc({style:v,timeout:w,easing:o},{mode:"enter"});let ne;w==="auto"?(ne=S.transitions.getAutoHeightDuration(ie.clientHeight),x.current=ne):ne=le,ie.style.transition=[S.transitions.create("opacity",{duration:ne,delay:j}),S.transitions.create("transform",{duration:iE?ne:ne*.666,delay:j,easing:q})].join(","),l&&l(ie,ee)}),L=E(c),P=E(m),z=E(ie=>{const{duration:ee,delay:le,easing:j}=lc({style:v,timeout:w,easing:o},{mode:"exit"});let q;w==="auto"?(q=S.transitions.getAutoHeightDuration(ie.clientHeight),x.current=q):q=ee,ie.style.transition=[S.transitions.create("opacity",{duration:q,delay:le}),S.transitions.create("transform",{duration:iE?q:q*.666,delay:iE?le:le||q*.333,easing:j})].join(","),ie.style.opacity=0,ie.style.transform=$T(.75),f&&f(ie)}),B=E(h),Y=ie=>{w==="auto"&&_.start(x.current||0,ie),r&&r(D.current,ie)};return O.jsx(y,X({appear:i,in:a,nodeRef:D,onEnter:C,onEntered:L,onEntering:R,onExit:z,onExited:B,onExiting:P,addEndListener:Y,timeout:w==="auto"?null:w},g,{children:(ie,ee)=>I.cloneElement(s,X({style:X({opacity:0,transform:$T(.75),visibility:ie==="exited"&&!a?"hidden":void 0},voe[ie],v,s.props.style),ref:T},ee))}))});B4.muiSupportAuto=!0;const yoe=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],woe=t=>{const{classes:e,disableUnderline:n}=t,i=bn({root:["root",!n&&"underline"],input:["input"]},_ie,e);return X({},e,i)},_oe=Ct(i2,{shouldForwardProp:t=>Po(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...n2(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),X({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${I0.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${I0.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${I0.disabled}, .${I0.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${I0.disabled}:before`]:{borderBottomStyle:"dotted"}})}),Moe=Ct(s2,{name:"MuiInput",slot:"Input",overridesResolver:r2})({}),a2=I.forwardRef(function(e,n){var r,i,s,o;const a=gn({props:e,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:f=!1,inputComponent:h="input",multiline:m=!1,slotProps:v,slots:w={},type:y="text"}=a,g=Nt(a,yoe),_=woe(a),S={root:{ownerState:{disableUnderline:l}}},D=v??u?Co(v??u,S):S,T=(r=(i=w.root)!=null?i:c.Root)!=null?r:_oe,E=(s=(o=w.input)!=null?o:c.Input)!=null?s:Moe;return O.jsx(D4,X({slots:{root:T,input:E},slotProps:D,fullWidth:f,inputComponent:h,multiline:m,ref:n,type:y},g,{classes:_}))});a2.muiName="Input";function xoe(t){return Mn("MuiInputLabel",t)}fn("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const boe=["disableAnimation","margin","shrink","variant","className"],Soe=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:s,variant:o,required:a}=t,l={root:["root",n&&"formControl",!s&&"animated",i&&"shrink",r&&r!=="normal"&&`size${zt(r)}`,o],asterisk:[a&&"asterisk"]},c=bn(l,xoe,e);return X({},e,c)},Coe=Ct(moe,{shouldForwardProp:t=>Po(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Rg.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>X({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&X({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&X({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&X({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),Eoe=I.forwardRef(function(e,n){const r=gn({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:s,className:o}=r,a=Nt(r,boe),l=Im();let c=s;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=Tm({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),f=X({},r,{disableAnimation:i,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),h=Soe(f);return O.jsx(Coe,X({"data-shrink":c,ownerState:f,ref:n,className:Vt(h.root,o)},a,{classes:h}))}),Pg=I.createContext({});function Aoe(t){return Mn("MuiList",t)}fn("MuiList",["root","padding","dense","subheader"]);const Toe=["children","className","component","dense","disablePadding","subheader"],Ioe=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return bn({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},Aoe,e)},Loe=Ct("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>X({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),uv=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiList"}),{children:i,className:s,component:o="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,u=Nt(r,Toe),f=I.useMemo(()=>({dense:a}),[a]),h=X({},r,{component:o,dense:a,disablePadding:l}),m=Ioe(h);return O.jsx(Pg.Provider,{value:f,children:O.jsxs(Loe,X({as:o,className:Vt(m.root,s),ref:n,ownerState:h},u,{children:[c,i]}))})});function Roe(t){return Mn("MuiListItem",t)}const $h=fn("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Poe=fn("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Doe(t){return Mn("MuiListItemSecondaryAction",t)}fn("MuiListItemSecondaryAction",["root","disableGutters"]);const Noe=["className"],koe=t=>{const{disableGutters:e,classes:n}=t;return bn({root:["root",e&&"disableGutters"]},Doe,n)},Boe=Ct("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})(({ownerState:t})=>X({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),Y5=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=r,s=Nt(r,Noe),o=I.useContext(Pg),a=X({},r,{disableGutters:o.disableGutters}),l=koe(a);return O.jsx(Boe,X({className:Vt(l.root,i),ownerState:a,ref:n},s))});Y5.muiName="ListItemSecondaryAction";const Ooe=["className"],Uoe=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Foe=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]},joe=t=>{const{alignItems:e,button:n,classes:r,dense:i,disabled:s,disableGutters:o,disablePadding:a,divider:l,hasSecondaryAction:c,selected:u}=t;return bn({root:["root",i&&"dense",!o&&"gutters",!a&&"padding",l&&"divider",s&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},Roe,r)},zoe=Ct("div",{name:"MuiListItem",slot:"Root",overridesResolver:Foe})(({theme:t,ownerState:e})=>X({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&X({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${Poe.root}`]:{paddingRight:48}},{[`&.${$h.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${$h.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:yo(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${$h.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:yo(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${$h.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.alignItems==="flex-start"&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${$h.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:yo(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:yo(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),Hoe=Ct("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),l2=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:s=!1,button:o=!1,children:a,className:l,component:c,components:u={},componentsProps:f={},ContainerComponent:h="li",ContainerProps:{className:m}={},dense:v=!1,disabled:w=!1,disableGutters:y=!1,disablePadding:g=!1,divider:_=!1,focusVisibleClassName:x,secondaryAction:S,selected:D=!1,slotProps:T={},slots:E={}}=r,R=Nt(r.ContainerProps,Ooe),C=Nt(r,Uoe),L=I.useContext(Pg),P=I.useMemo(()=>({dense:v||L.dense||!1,alignItems:i,disableGutters:y}),[i,L.dense,v,y]),z=I.useRef(null);Oa(()=>{s&&z.current&&z.current.focus()},[s]);const B=I.Children.toArray(a),Y=B.length&&Tg(B[B.length-1],["ListItemSecondaryAction"]),ie=X({},r,{alignItems:i,autoFocus:s,button:o,dense:P.dense,disabled:w,disableGutters:y,disablePadding:g,divider:_,hasSecondaryAction:Y,selected:D}),ee=joe(ie),le=ni(z,n),j=E.root||u.Root||zoe,q=T.root||f.root||{},ne=X({className:Vt(ee.root,q.className,l),disabled:w},C);let de=c||"li";return o&&(ne.component=c||"div",ne.focusVisibleClassName=Vt($h.focusVisible,x),de=t2),Y?(de=!ne.component&&!c?"div":de,h==="li"&&(de==="li"?de="div":ne.component==="li"&&(ne.component="div")),O.jsx(Pg.Provider,{value:P,children:O.jsxs(Hoe,X({as:h,className:Vt(ee.container,m),ref:le,ownerState:ie},R,{children:[O.jsx(j,X({},q,!$p(j)&&{as:de,ownerState:X({},ie,q.ownerState)},ne,{children:B})),B.pop()]}))})):O.jsx(Pg.Provider,{value:P,children:O.jsxs(j,X({},q,{as:de,ref:le},!$p(j)&&{ownerState:X({},ie,q.ownerState)},ne,{children:[B,S&&O.jsx(Y5,{children:S})]}))})}),Goe=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function sE(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function R6(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function Q5(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function L0(t,e,n,r,i,s){let o=!1,a=i(t,e,e?n:!1);for(;a;){if(a===t.firstChild){if(o)return!1;o=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!Q5(a,s)||l)a=i(t,a,n);else return a.focus(),!0}return!1}const Voe=I.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:s=!1,children:o,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:f="selectedMenu"}=e,h=Nt(e,Goe),m=I.useRef(null),v=I.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Oa(()=>{i&&m.current.focus()},[i]),I.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(x,{direction:S})=>{const D=!m.current.style.width;if(x.clientHeight{const S=m.current,D=x.key,T=Zr(S).activeElement;if(D==="ArrowDown")x.preventDefault(),L0(S,T,c,l,sE);else if(D==="ArrowUp")x.preventDefault(),L0(S,T,c,l,R6);else if(D==="Home")x.preventDefault(),L0(S,null,c,l,sE);else if(D==="End")x.preventDefault(),L0(S,null,c,l,R6);else if(D.length===1){const E=v.current,R=D.toLowerCase(),C=performance.now();E.keys.length>0&&(C-E.lastTime>500?(E.keys=[],E.repeating=!0,E.previousKeyMatched=!0):E.repeating&&R!==E.keys[0]&&(E.repeating=!1)),E.lastTime=C,E.keys.push(R);const L=T&&!E.repeating&&Q5(T,E);E.previousKeyMatched&&(L||L0(S,T,!1,l,sE,E))?x.preventDefault():E.previousKeyMatched=!1}u&&u(x)},y=ni(m,n);let g=-1;I.Children.forEach(o,(x,S)=>{if(!I.isValidElement(x)){g===S&&(g+=1,g>=o.length&&(g=-1));return}x.props.disabled||(f==="selectedMenu"&&x.props.selected||g===-1)&&(g=S),g===S&&(x.props.disabled||x.props.muiSkipListHighlight||x.type.muiSkipListHighlight)&&(g+=1,g>=o.length&&(g=-1))});const _=I.Children.map(o,(x,S)=>{if(S===g){const D={};return s&&(D.autoFocus=!0),x.props.tabIndex===void 0&&f==="selectedMenu"&&(D.tabIndex=0),I.cloneElement(x,D)}return x});return O.jsx(uv,X({role:"menu",ref:y,className:a,onKeyDown:w,tabIndex:i?0:-1},h,{children:_}))});function Woe(t){return Mn("MuiPopover",t)}fn("MuiPopover",["root","paper"]);const $oe=["onEntering"],Joe=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Yoe=["slotProps"];function P6(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function D6(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function N6(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function oE(t){return typeof t=="function"?t():t}const Qoe=t=>{const{classes:e}=t;return bn({root:["root"],paper:["paper"]},Woe,e)},Xoe=Ct(N4,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),X5=Ct(Ou,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Koe=I.forwardRef(function(e,n){var r,i,s;const o=gn({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:f="anchorEl",children:h,className:m,container:v,elevation:w=8,marginThreshold:y=16,open:g,PaperProps:_={},slots:x,slotProps:S,transformOrigin:D={vertical:"top",horizontal:"left"},TransitionComponent:T=B4,transitionDuration:E="auto",TransitionProps:{onEntering:R}={},disableScrollLock:C=!1}=o,L=Nt(o.TransitionProps,$oe),P=Nt(o,Joe),z=(r=S==null?void 0:S.paper)!=null?r:_,B=I.useRef(),Y=ni(B,z.ref),ie=X({},o,{anchorOrigin:c,anchorReference:f,elevation:w,marginThreshold:y,externalPaperSlotProps:z,transformOrigin:D,TransitionComponent:T,transitionDuration:E,TransitionProps:L}),ee=Qoe(ie),le=I.useCallback(()=>{if(f==="anchorPosition")return u;const Ce=oE(l),ze=(Ce&&Ce.nodeType===1?Ce:Zr(B.current).body).getBoundingClientRect();return{top:ze.top+P6(ze,c.vertical),left:ze.left+D6(ze,c.horizontal)}},[l,c.horizontal,c.vertical,u,f]),j=I.useCallback(Ce=>({vertical:P6(Ce,D.vertical),horizontal:D6(Ce,D.horizontal)}),[D.horizontal,D.vertical]),q=I.useCallback(Ce=>{const Ne={width:Ce.offsetWidth,height:Ce.offsetHeight},ze=j(Ne);if(f==="none")return{top:null,left:null,transformOrigin:N6(ze)};const Ue=le();let Et=Ue.top-ze.vertical,lt=Ue.left-ze.horizontal;const yt=Et+Ne.height,re=lt+Ne.width,V=Ks(oE(l)),Ee=V.innerHeight-y,je=V.innerWidth-y;if(y!==null&&EtEe){const De=yt-Ee;Et-=De,ze.vertical+=De}if(y!==null&<je){const De=re-je;lt-=De,ze.horizontal+=De}return{top:`${Math.round(Et)}px`,left:`${Math.round(lt)}px`,transformOrigin:N6(ze)}},[l,f,le,j,y]),[ne,de]=I.useState(g),_e=I.useCallback(()=>{const Ce=B.current;if(!Ce)return;const Ne=q(Ce);Ne.top!==null&&(Ce.style.top=Ne.top),Ne.left!==null&&(Ce.style.left=Ne.left),Ce.style.transformOrigin=Ne.transformOrigin,de(!0)},[q]);I.useEffect(()=>(C&&window.addEventListener("scroll",_e),()=>window.removeEventListener("scroll",_e)),[l,C,_e]);const ge=(Ce,Ne)=>{R&&R(Ce,Ne),_e()},ce=()=>{de(!1)};I.useEffect(()=>{g&&_e()}),I.useImperativeHandle(a,()=>g?{updatePosition:()=>{_e()}}:null,[g,_e]),I.useEffect(()=>{if(!g)return;const Ce=Db(()=>{_e()}),Ne=Ks(l);return Ne.addEventListener("resize",Ce),()=>{Ce.clear(),Ne.removeEventListener("resize",Ce)}},[l,g,_e]);let we=E;E==="auto"&&!T.muiSupportAuto&&(we=void 0);const he=v||(l?Zr(oE(l)).body:void 0),Ie=(i=x==null?void 0:x.root)!=null?i:Xoe,et=(s=x==null?void 0:x.paper)!=null?s:X5,ct=vd({elementType:et,externalSlotProps:X({},z,{style:ne?z.style:X({},z.style,{opacity:0})}),additionalProps:{elevation:w,ref:Y},ownerState:ie,className:Vt(ee.paper,z==null?void 0:z.className)}),it=vd({elementType:Ie,externalSlotProps:(S==null?void 0:S.root)||{},externalForwardedProps:P,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:he,open:g},ownerState:ie,className:Vt(ee.root,m)}),{slotProps:ut}=it,$=Nt(it,Yoe);return O.jsx(Ie,X({},$,!$p(Ie)&&{slotProps:ut,disableScrollLock:C},{children:O.jsx(T,X({appear:!0,in:g,onEntering:ge,onExited:ce,timeout:we},L,{children:O.jsx(et,X({},ct,{children:h}))}))}))});function Zoe(t){return Mn("MuiMenu",t)}fn("MuiMenu",["root","paper","list"]);const qoe=["onEntering"],eae=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],tae={vertical:"top",horizontal:"right"},nae={vertical:"top",horizontal:"left"},rae=t=>{const{classes:e}=t;return bn({root:["root"],paper:["paper"],list:["list"]},Zoe,e)},iae=Ct(Koe,{shouldForwardProp:t=>Po(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),sae=Ct(X5,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),oae=Ct(Voe,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),aae=I.forwardRef(function(e,n){var r,i;const s=gn({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:f,open:h,PaperProps:m={},PopoverClasses:v,transitionDuration:w="auto",TransitionProps:{onEntering:y}={},variant:g="selectedMenu",slots:_={},slotProps:x={}}=s,S=Nt(s.TransitionProps,qoe),D=Nt(s,eae),T=A5(),E=X({},s,{autoFocus:o,disableAutoFocusItem:c,MenuListProps:u,onEntering:y,PaperProps:m,transitionDuration:w,TransitionProps:S,variant:g}),R=rae(E),C=o&&!c&&h,L=I.useRef(null),P=(j,q)=>{L.current&&L.current.adjustStyleForScrollbar(j,{direction:T?"rtl":"ltr"}),y&&y(j,q)},z=j=>{j.key==="Tab"&&(j.preventDefault(),f&&f(j,"tabKeyDown"))};let B=-1;I.Children.map(a,(j,q)=>{I.isValidElement(j)&&(j.props.disabled||(g==="selectedMenu"&&j.props.selected||B===-1)&&(B=q))});const Y=(r=_.paper)!=null?r:sae,ie=(i=x.paper)!=null?i:m,ee=vd({elementType:_.root,externalSlotProps:x.root,ownerState:E,className:[R.root,l]}),le=vd({elementType:Y,externalSlotProps:ie,ownerState:E,className:R.paper});return O.jsx(iae,X({onClose:f,anchorOrigin:{vertical:"bottom",horizontal:T?"right":"left"},transformOrigin:T?tae:nae,slots:{paper:Y,root:_.root},slotProps:{root:ee,paper:le},open:h,ref:n,transitionDuration:w,TransitionProps:X({onEntering:P},S),ownerState:E},D,{classes:v,children:O.jsx(oae,X({onKeyDown:z,actions:L,autoFocus:o&&(B===-1||c),autoFocusItem:C,variant:g},u,{className:Vt(R.list,u.className),children:a}))}))});function lae(t){return Mn("MuiNativeSelect",t)}const O4=fn("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),cae=["className","disabled","error","IconComponent","inputRef","variant"],uae=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:s,error:o}=t,a={select:["select",n,r&&"disabled",i&&"multiple",o&&"error"],icon:["icon",`icon${zt(n)}`,s&&"iconOpen",r&&"disabled"]};return bn(a,lae,e)},K5=({ownerState:t,theme:e})=>X({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":X({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${O4.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),fae=Ct("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Po,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${O4.multiple}`]:e.multiple}]}})(K5),Z5=({ownerState:t,theme:e})=>X({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${O4.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),dae=Ct("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${zt(n.variant)}`],n.open&&e.iconOpen]}})(Z5),hae=I.forwardRef(function(e,n){const{className:r,disabled:i,error:s,IconComponent:o,inputRef:a,variant:l="standard"}=e,c=Nt(e,cae),u=X({},e,{disabled:i,variant:l,error:s}),f=uae(u);return O.jsxs(I.Fragment,{children:[O.jsx(fae,X({ownerState:u,className:Vt(f.select,r),disabled:i,ref:a||n},c)),e.multiple?null:O.jsx(dae,{as:o,ownerState:u,className:f.icon})]})});var k6;const pae=["children","classes","className","label","notched"],mae=Ct("fieldset",{shouldForwardProp:Po})({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%"}),gae=Ct("legend",{shouldForwardProp:Po})(({ownerState:t,theme:e})=>X({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&X({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function vae(t){const{className:e,label:n,notched:r}=t,i=Nt(t,pae),s=n!=null&&n!=="",o=X({},t,{notched:r,withLabel:s});return O.jsx(mae,X({"aria-hidden":!0,className:e,ownerState:o},i,{children:O.jsx(gae,{ownerState:o,children:s?O.jsx("span",{children:n}):k6||(k6=O.jsx("span",{className:"notranslate",children:"​"}))})}))}const yae=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],wae=t=>{const{classes:e}=t,r=bn({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Mie,e);return X({},e,r)},_ae=Ct(i2,{shouldForwardProp:t=>Po(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:n2})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return X({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${Ac.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ac.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${Ac.focused} .${Ac.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${Ac.error} .${Ac.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${Ac.disabled} .${Ac.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&X({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),Mae=Ct(vae,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),xae=Ct(s2,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:r2})(({theme:t,ownerState:e})=>X({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),U4=I.forwardRef(function(e,n){var r,i,s,o,a;const l=gn({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:f="input",label:h,multiline:m=!1,notched:v,slots:w={},type:y="text"}=l,g=Nt(l,yae),_=wae(l),x=Im(),S=Tm({props:l,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),D=X({},l,{color:S.color||"primary",disabled:S.disabled,error:S.error,focused:S.focused,formControl:x,fullWidth:u,hiddenLabel:S.hiddenLabel,multiline:m,size:S.size,type:y}),T=(r=(i=w.root)!=null?i:c.Root)!=null?r:_ae,E=(s=(o=w.input)!=null?o:c.Input)!=null?s:xae;return O.jsx(D4,X({slots:{root:T,input:E},renderSuffix:R=>O.jsx(Mae,{ownerState:D,className:_.notchedOutline,label:h!=null&&h!==""&&S.required?a||(a=O.jsxs(I.Fragment,{children:[h," ","*"]})):h,notched:typeof v<"u"?v:!!(R.startAdornment||R.filled||R.focused)}),fullWidth:u,inputComponent:f,multiline:m,ref:n,type:y},g,{classes:X({},_,{notchedOutline:null})}))});U4.muiName="Input";function bae(t){return Mn("MuiSelect",t)}const R0=fn("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var B6;const Sae=["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"],Cae=Ct("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${R0.select}`]:e.select},{[`&.${R0.select}`]:e[n.variant]},{[`&.${R0.error}`]:e.error},{[`&.${R0.multiple}`]:e.multiple}]}})(K5,{[`&.${R0.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Eae=Ct("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${zt(n.variant)}`],n.open&&e.iconOpen]}})(Z5),Aae=Ct("input",{shouldForwardProp:t=>x5(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function O6(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function Tae(t){return t==null||typeof t=="string"&&!t.trim()}const Iae=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:s,error:o}=t,a={select:["select",n,r&&"disabled",i&&"multiple",o&&"error"],icon:["icon",`icon${zt(n)}`,s&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return bn(a,bae,e)},Lae=I.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":s,autoFocus:o,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:f,disabled:h,displayEmpty:m,error:v=!1,IconComponent:w,inputRef:y,labelId:g,MenuProps:_={},multiple:x,name:S,onBlur:D,onChange:T,onClose:E,onFocus:R,onOpen:C,open:L,readOnly:P,renderValue:z,SelectDisplayProps:B={},tabIndex:Y,value:ie,variant:ee="standard"}=e,le=Nt(e,Sae),[j,q]=RM({controlled:ie,default:f,name:"Select"}),[ne,de]=RM({controlled:L,default:u,name:"Select"}),_e=I.useRef(null),ge=I.useRef(null),[ce,we]=I.useState(null),{current:he}=I.useRef(L!=null),[Ie,et]=I.useState(),ct=ni(n,y),it=I.useCallback(We=>{ge.current=We,We&&we(We)},[]),ut=ce==null?void 0:ce.parentNode;I.useImperativeHandle(ct,()=>({focus:()=>{ge.current.focus()},node:_e.current,value:j}),[j]),I.useEffect(()=>{u&&ne&&ce&&!he&&(et(a?null:ut.clientWidth),ge.current.focus())},[ce,a]),I.useEffect(()=>{o&&ge.current.focus()},[o]),I.useEffect(()=>{if(!g)return;const We=Zr(ge.current).getElementById(g);if(We){const Ze=()=>{getSelection().isCollapsed&&ge.current.focus()};return We.addEventListener("click",Ze),()=>{We.removeEventListener("click",Ze)}}},[g]);const $=(We,Ze)=>{We?C&&C(Ze):E&&E(Ze),he||(et(a?null:ut.clientWidth),de(We))},Ce=We=>{We.button===0&&(We.preventDefault(),ge.current.focus(),$(!0,We))},Ne=We=>{$(!1,We)},ze=I.Children.toArray(l),Ue=We=>{const Ze=ze.find(Tt=>Tt.props.value===We.target.value);Ze!==void 0&&(q(Ze.props.value),T&&T(We,Ze))},Et=We=>Ze=>{let Tt;if(Ze.currentTarget.hasAttribute("tabindex")){if(x){Tt=Array.isArray(j)?j.slice():[];const Ft=j.indexOf(We.props.value);Ft===-1?Tt.push(We.props.value):Tt.splice(Ft,1)}else Tt=We.props.value;if(We.props.onClick&&We.props.onClick(Ze),j!==Tt&&(q(Tt),T)){const Ft=Ze.nativeEvent||Ze,en=new Ft.constructor(Ft.type,Ft);Object.defineProperty(en,"target",{writable:!0,value:{value:Tt,name:S}}),T(en,We)}x||$(!1,Ze)}},lt=We=>{P||[" ","ArrowUp","ArrowDown","Enter"].indexOf(We.key)!==-1&&(We.preventDefault(),$(!0,We))},yt=ce!==null&&ne,re=We=>{!yt&&D&&(Object.defineProperty(We,"target",{writable:!0,value:{value:j,name:S}}),D(We))};delete le["aria-invalid"];let V,Ee;const je=[];let De=!1;(UM({value:j})||m)&&(z?V=z(j):De=!0);const He=ze.map(We=>{if(!I.isValidElement(We))return null;let Ze;if(x){if(!Array.isArray(j))throw new Error(gd(2));Ze=j.some(Tt=>O6(Tt,We.props.value)),Ze&&De&&je.push(We.props.children)}else Ze=O6(j,We.props.value),Ze&&De&&(Ee=We.props.children);return I.cloneElement(We,{"aria-selected":Ze?"true":"false",onClick:Et(We),onKeyUp:Tt=>{Tt.key===" "&&Tt.preventDefault(),We.props.onKeyUp&&We.props.onKeyUp(Tt)},role:"option",selected:Ze,value:void 0,"data-value":We.props.value})});De&&(x?je.length===0?V=null:V=je.reduce((We,Ze,Tt)=>(We.push(Ze),Tt{const{classes:e}=t;return e},F4={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Po(t)&&t!=="variant",slot:"Root"},Nae=Ct(a2,F4)(""),kae=Ct(U4,F4)(""),Bae=Ct(k4,F4)(""),q5=I.forwardRef(function(e,n){const r=gn({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:s,classes:o={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=bie,id:f,input:h,inputProps:m,label:v,labelId:w,MenuProps:y,multiple:g=!1,native:_=!1,onClose:x,onOpen:S,open:D,renderValue:T,SelectDisplayProps:E,variant:R="outlined"}=r,C=Nt(r,Rae),L=_?hae:Lae,P=Im(),z=Tm({props:r,muiFormControl:P,states:["variant","error"]}),B=z.variant||R,Y=X({},r,{variant:B,classes:o}),ie=Dae(Y),ee=Nt(ie,Pae),le=h||{standard:O.jsx(Nae,{ownerState:Y}),outlined:O.jsx(kae,{label:v,ownerState:Y}),filled:O.jsx(Bae,{ownerState:Y})}[B],j=ni(n,le.ref);return O.jsx(I.Fragment,{children:I.cloneElement(le,X({inputComponent:L,inputProps:X({children:s,error:z.error,IconComponent:u,variant:B,type:void 0,multiple:g},_?{id:f}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:w,MenuProps:y,onClose:x,onOpen:S,open:D,renderValue:T,SelectDisplayProps:X({id:f},E)},m,{classes:m?Co(ee,m.classes):ee},h?h.props.inputProps:{})},(g&&_||c)&&B==="outlined"?{notched:!0}:{},{ref:j,className:Vt(le.props.className,a,ie.root)},!h&&{variant:B},C))})});q5.muiName="Select";function Oae(t){return Mn("MuiSnackbarContent",t)}fn("MuiSnackbarContent",["root","message","action"]);const Uae=["action","className","message","role"],Fae=t=>{const{classes:e}=t;return bn({root:["root"],action:["action"],message:["message"]},Oae,e)},jae=Ct(Ou,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{const e=t.palette.mode==="light"?.8:.98,n=cte(t.palette.background.default,e);return X({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(n),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),zae=Ct("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0"}),Hae=Ct("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),Gae=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiSnackbarContent"}),{action:i,className:s,message:o,role:a="alert"}=r,l=Nt(r,Uae),c=r,u=Fae(c);return O.jsxs(jae,X({role:a,square:!0,elevation:6,className:Vt(u.root,s),ownerState:c,ref:n},l,{children:[O.jsx(zae,{className:u.message,ownerState:c,children:o}),i?O.jsx(Hae,{className:u.action,ownerState:c,children:i}):null]}))});function Vae(t){return Mn("MuiSnackbar",t)}fn("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const Wae=["onEnter","onExited"],$ae=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],Jae=t=>{const{classes:e,anchorOrigin:n}=t,r={root:["root",`anchorOrigin${zt(n.vertical)}${zt(n.horizontal)}`]};return bn(r,Vae,e)},U6=Ct("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`anchorOrigin${zt(n.anchorOrigin.vertical)}${zt(n.anchorOrigin.horizontal)}`]]}})(({theme:t,ownerState:e})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return X({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},e.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},e.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},e.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:X({},e.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},e.anchorOrigin.horizontal==="center"&&n,e.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},e.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),e8=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiSnackbar"}),i=Bu(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:o,anchorOrigin:{vertical:a,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:f,ClickAwayListenerProps:h,ContentProps:m,disableWindowBlurListener:v=!1,message:w,open:y,TransitionComponent:g=B4,transitionDuration:_=s,TransitionProps:{onEnter:x,onExited:S}={}}=r,D=Nt(r.TransitionProps,Wae),T=Nt(r,$ae),E=X({},r,{anchorOrigin:{vertical:a,horizontal:l},autoHideDuration:c,disableWindowBlurListener:v,TransitionComponent:g,transitionDuration:_}),R=Jae(E),{getRootProps:C,onClickAway:L}=cie(X({},E)),[P,z]=I.useState(!0),B=vd({elementType:U6,getSlotProps:C,externalForwardedProps:T,ownerState:E,additionalProps:{ref:n},className:[R.root,f]}),Y=ee=>{z(!0),S&&S(ee)},ie=(ee,le)=>{z(!1),x&&x(ee,le)};return!y&&P?null:O.jsx(Gre,X({onClickAway:L},h,{children:O.jsx(U6,X({},B,{children:O.jsx(g,X({appear:!0,in:y,timeout:_,direction:a==="top"?"down":"up",onEnter:ie,onExited:Y},D,{children:u||O.jsx(Gae,X({message:w,action:o},m))}))}))}))}),Yae=["anchor","classes","className","width","style"],Qae=Ct("div",{shouldForwardProp:Po})(({theme:t,ownerState:e})=>X({position:"fixed",top:0,left:0,bottom:0,zIndex:t.zIndex.drawer-1},e.anchor==="left"&&{right:"auto"},e.anchor==="right"&&{left:"auto",right:0},e.anchor==="top"&&{bottom:"auto",right:0},e.anchor==="bottom"&&{top:"auto",bottom:0,right:0})),Xae=I.forwardRef(function(e,n){const{anchor:r,classes:i={},className:s,width:o,style:a}=e,l=Nt(e,Yae),c=e;return O.jsx(Qae,X({className:Vt("PrivateSwipeArea-root",i.root,i[`anchor${zt(r)}`],s),ref:n,style:X({[kf(r)?"width":"height"]:o},a),ownerState:c},l))}),Kae=["BackdropProps"],Zae=["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","allowSwipeInChildren","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"],aw=3,aE=20;let Rl=null;function lE(t,e,n){return t==="right"?n.body.offsetWidth-e[0].pageX:e[0].pageX}function cE(t,e,n){return t==="bottom"?n.innerHeight-e[0].clientY:e[0].clientY}function P0(t,e){return t?e.clientWidth:e.clientHeight}function F6(t,e,n,r){return Math.min(Math.max(n?e-t:r+e-t,0),r)}function qae(t,e){const n=[];for(;t&&t!==e.parentElement;){const r=Ks(e).getComputedStyle(t);r.getPropertyValue("position")==="absolute"||r.getPropertyValue("overflow-x")==="hidden"||(t.clientWidth>0&&t.scrollWidth>t.clientWidth||t.clientHeight>0&&t.scrollHeight>t.clientHeight)&&n.push(t),t=t.parentElement}return n}function ele({domTreeShapes:t,start:e,current:n,anchor:r}){const i={scrollPosition:{x:"scrollLeft",y:"scrollTop"},scrollLength:{x:"scrollWidth",y:"scrollHeight"},clientLength:{x:"clientWidth",y:"clientHeight"}};return t.some(s=>{let o=n>=e;(r==="top"||r==="left")&&(o=!o);const a=r==="left"||r==="right"?"x":"y",l=Math.round(s[i.scrollPosition[a]]),c=l>0,u=l+s[i.clientLength[a]]{le.current=null},[g]);const j=I.useCallback((ge,ce={})=>{const{mode:we=null,changeTransition:he=!0}=ce,Ie=lg(i,o),et=["right","bottom"].indexOf(Ie)!==-1?1:-1,ct=kf(o),it=ct?`translate(${et*ge}px, 0)`:`translate(0, ${et*ge}px)`,ut=Y.current.style;ut.webkitTransform=it,ut.transform=it;let $="";if(we&&($=i.transitions.create("all",lc({easing:void 0,style:void 0,timeout:D},{mode:we}))),he&&(ut.webkitTransition=$,ut.transition=$),!a&&!u){const Ce=B.current.style;Ce.opacity=1-ge/P0(ct,Y.current),he&&(Ce.webkitTransition=$,Ce.transition=$)}},[o,a,u,i,D]),q=vo(ge=>{if(!ee.current)return;if(Rl=null,ee.current=!1,md.flushSync(()=>{L(!1)}),!P.current.isSwiping){P.current.isSwiping=null;return}P.current.isSwiping=null;const ce=lg(i,o),we=kf(o);let he;we?he=lE(ce,ge.changedTouches,Zr(ge.currentTarget)):he=cE(ce,ge.changedTouches,Ks(ge.currentTarget));const Ie=we?P.current.startX:P.current.startY,et=P0(we,Y.current),ct=F6(he,Ie,g,et),it=ct/et;if(Math.abs(P.current.velocity)>m&&(le.current=Math.abs((et-ct)/P.current.velocity)*1e3),g){P.current.velocity>m||it>f?w():j(0,{mode:"exit"});return}P.current.velocity<-m||1-it>f?y():j(P0(we,Y.current),{mode:"enter"})}),ne=(ge=!1)=>{if(!C){(ge||!(l&&h))&&md.flushSync(()=>{L(!0)});const ce=kf(o);!g&&Y.current&&j(P0(ce,Y.current)+(l?15:-aE),{changeTransition:!1}),P.current.velocity=0,P.current.lastTime=null,P.current.lastTranslate=null,P.current.paperHit=!1,ee.current=!0}},de=vo(ge=>{if(!Y.current||!ee.current||Rl!==null&&Rl!==P.current)return;ne(!0);const ce=lg(i,o),we=kf(o),he=lE(ce,ge.touches,Zr(ge.currentTarget)),Ie=cE(ce,ge.touches,Ks(ge.currentTarget));if(g&&Y.current.contains(ge.target)&&Rl===null){const $=qae(ge.target,Y.current);if(ele({domTreeShapes:$,start:we?P.current.startX:P.current.startY,current:we?he:Ie,anchor:o})){Rl=!0;return}Rl=P.current}if(P.current.isSwiping==null){const $=Math.abs(he-P.current.startX),Ce=Math.abs(Ie-P.current.startY),Ne=we?$>Ce&&$>aw:Ce>$&&Ce>aw;if(Ne&&ge.cancelable&&ge.preventDefault(),Ne===!0||(we?Ce>aw:$>aw)){if(P.current.isSwiping=Ne,!Ne){q(ge);return}P.current.startX=he,P.current.startY=Ie,!l&&!g&&(we?P.current.startX-=aE:P.current.startY-=aE)}}if(!P.current.isSwiping)return;const et=P0(we,Y.current);let ct=we?P.current.startX:P.current.startY;g&&!P.current.paperHit&&(ct=Math.min(ct,et));const it=F6(we?he:Ie,ct,g,et);if(g)if(P.current.paperHit)it===0&&(P.current.startX=he,P.current.startY=Ie);else if(we?he{if(ge.defaultPrevented||ge.defaultMuiPrevented||g&&(u||!B.current.contains(ge.target))&&!Y.current.contains(ge.target))return;const ce=lg(i,o),we=kf(o),he=lE(ce,ge.touches,Zr(ge.currentTarget)),Ie=cE(ce,ge.touches,Ks(ge.currentTarget));if(!g){var et;if(c||!(ge.target===z.current||(et=Y.current)!=null&&et.contains(ge.target)&&(typeof h=="function"?h(ge,z.current,Y.current):h)))return;if(we){if(he>S)return}else if(Ie>S)return}ge.defaultMuiPrevented=!0,Rl=null,P.current.startX=he,P.current.startY=Ie,ne()});return I.useEffect(()=>{if(T==="temporary"){const ge=Zr(Y.current);return ge.addEventListener("touchstart",_e),ge.addEventListener("touchmove",de,{passive:!g}),ge.addEventListener("touchend",q),()=>{ge.removeEventListener("touchstart",_e),ge.removeEventListener("touchmove",de,{passive:!g}),ge.removeEventListener("touchend",q)}}},[T,g,_e,de,q]),I.useEffect(()=>()=>{Rl===P.current&&(Rl=null)},[]),I.useEffect(()=>{g||L(!1)},[g]),O.jsxs(I.Fragment,{children:[O.jsx(Qse,X({open:T==="temporary"&&C?!0:g,variant:T,ModalProps:X({BackdropProps:X({},v,{ref:B})},T==="temporary"&&{keepMounted:!0},E),hideBackdrop:u,PaperProps:X({},_,{style:X({pointerEvents:T==="temporary"&&!g&&!h?"none":""},_.style),ref:ie}),anchor:o,transitionDuration:le.current||D,onClose:w,ref:n},R)),!c&&T==="temporary"&&O.jsx(lie,{children:O.jsx(Xae,X({anchor:o,ref:z,width:S},x))})]})});function rle(t){return Mn("MuiToolbar",t)}fn("MuiToolbar",["root","gutters","regular","dense"]);const ile=["className","component","disableGutters","variant"],sle=t=>{const{classes:e,disableGutters:n,variant:r}=t;return bn({root:["root",!n&&"gutters",r]},rle,e)},ole=Ct("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableGutters&&e.gutters,e[n.variant]]}})(({theme:t,ownerState:e})=>X({position:"relative",display:"flex",alignItems:"center"},!e.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},e.variant==="dense"&&{minHeight:48}),({theme:t,ownerState:e})=>e.variant==="regular"&&t.mixins.toolbar),ale=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiToolbar"}),{className:i,component:s="div",disableGutters:o=!1,variant:a="regular"}=r,l=Nt(r,ile),c=X({},r,{component:s,disableGutters:o,variant:a}),u=sle(c);return O.jsx(ole,X({as:s,className:Vt(u.root,i),ref:n,ownerState:c},l))});function lle(t){return Mn("MuiTextField",t)}fn("MuiTextField",["root"]);const cle=["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"],ule={standard:a2,filled:k4,outlined:U4},fle=t=>{const{classes:e}=t;return bn({root:["root"]},lle,e)},dle=Ct(ioe,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),hle=I.forwardRef(function(e,n){const r=gn({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:s=!1,children:o,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:f=!1,FormHelperTextProps:h,fullWidth:m=!1,helperText:v,id:w,InputLabelProps:y,inputProps:g,InputProps:_,inputRef:x,label:S,maxRows:D,minRows:T,multiline:E=!1,name:R,onBlur:C,onChange:L,onFocus:P,placeholder:z,required:B=!1,rows:Y,select:ie=!1,SelectProps:ee,type:le,value:j,variant:q="outlined"}=r,ne=Nt(r,cle),de=X({},r,{autoFocus:s,color:l,disabled:u,error:f,fullWidth:m,multiline:E,required:B,select:ie,variant:q}),_e=fle(de),ge={};q==="outlined"&&(y&&typeof y.shrink<"u"&&(ge.notched=y.shrink),ge.label=S),ie&&((!ee||!ee.native)&&(ge.id=void 0),ge["aria-describedby"]=void 0);const ce=Nb(w),we=v&&ce?`${ce}-helper-text`:void 0,he=S&&ce?`${ce}-label`:void 0,Ie=ule[q],et=O.jsx(Ie,X({"aria-describedby":we,autoComplete:i,autoFocus:s,defaultValue:c,fullWidth:m,multiline:E,name:R,rows:Y,maxRows:D,minRows:T,type:le,value:j,id:ce,inputRef:x,onBlur:C,onChange:L,onFocus:P,placeholder:z,inputProps:g},ge,_));return O.jsxs(dle,X({className:Vt(_e.root,a),disabled:u,error:f,fullWidth:m,ref:n,required:B,color:l,variant:q,ownerState:de},ne,{children:[S!=null&&S!==""&&O.jsx(Eoe,X({htmlFor:ce,id:he},y,{children:S})),ie?O.jsx(q5,X({"aria-describedby":we,id:ce,labelId:he,value:j,input:et},ee,{children:o})):et,v&&O.jsx(coe,X({id:we},h,{children:v}))]}))});var ple={VITE_apiKey:"AIzaSyA9rwmAgjAlIC-gitEJi7lm5c8xlpgeOdY",VITE_authDomain:"connection-280f7.firebaseapp.com",VITE_projectId:"connection-280f7",VITE_storageBucket:"connection-280f7.appspot.com",VITE_messagingSenderId:"514095534536",VITE_appId:"1:514095534536:web:6bca02ef3459c41bde70fd",VITE_databaseURL:"https://connection-280f7-default-rtdb.europe-west1.firebasedatabase.app",BASE_URL:"/Connection/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const j6=t=>{let e;const n=new Set,r=(u,f)=>{const h=typeof u=="function"?u(e):u;if(!Object.is(h,e)){const m=e;e=f??(typeof h!="object"||h===null)?h:Object.assign({},e,h),n.forEach(v=>v(e,m))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(ple?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=e=t(r,i,l);return l},mle=t=>t?j6(t):j6;var t8={exports:{}},n8={},r8={exports:{}},i8={};/** + * @license React + * use-sync-external-store-shim.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 Yp=I;function gle(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var vle=typeof Object.is=="function"?Object.is:gle,yle=Yp.useState,wle=Yp.useEffect,_le=Yp.useLayoutEffect,Mle=Yp.useDebugValue;function xle(t,e){var n=e(),r=yle({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return _le(function(){i.value=n,i.getSnapshot=e,uE(i)&&s({inst:i})},[t,n,e]),wle(function(){return uE(i)&&s({inst:i}),t(function(){uE(i)&&s({inst:i})})},[t]),Mle(n),n}function uE(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!vle(t,n)}catch{return!0}}function ble(t,e){return e()}var Sle=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ble:xle;i8.useSyncExternalStore=Yp.useSyncExternalStore!==void 0?Yp.useSyncExternalStore:Sle;r8.exports=i8;var Cle=r8.exports;/** + * @license React + * use-sync-external-store-shim/with-selector.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 c2=I,Ele=Cle;function Ale(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Tle=typeof Object.is=="function"?Object.is:Ale,Ile=Ele.useSyncExternalStore,Lle=c2.useRef,Rle=c2.useEffect,Ple=c2.useMemo,Dle=c2.useDebugValue;n8.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var s=Lle(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=Ple(function(){function l(m){if(!c){if(c=!0,u=m,m=r(m),i!==void 0&&o.hasValue){var v=o.value;if(i(v,m))return f=v}return f=m}if(v=f,Tle(u,m))return v;var w=r(m);return i!==void 0&&i(v,w)?v:(u=m,f=w)}var c=!1,u,f,h=n===void 0?null:n;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,n,r,i]);var a=Ile(t,s[0],s[1]);return Rle(function(){o.hasValue=!0,o.value=a},[a]),Dle(a),a};t8.exports=n8;var Nle=t8.exports;const kle=_m(Nle);var s8={VITE_apiKey:"AIzaSyA9rwmAgjAlIC-gitEJi7lm5c8xlpgeOdY",VITE_authDomain:"connection-280f7.firebaseapp.com",VITE_projectId:"connection-280f7",VITE_storageBucket:"connection-280f7.appspot.com",VITE_messagingSenderId:"514095534536",VITE_appId:"1:514095534536:web:6bca02ef3459c41bde70fd",VITE_databaseURL:"https://connection-280f7-default-rtdb.europe-west1.firebasedatabase.app",BASE_URL:"/Connection/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:Ble}=qt,{useSyncExternalStoreWithSelector:Ole}=kle;let z6=!1;const Ule=t=>t;function Fle(t,e=Ule,n){(s8?"production":void 0)!=="production"&&n&&!z6&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),z6=!0);const r=Ole(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return Ble(r),r}const H6=t=>{(s8?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?mle(t):t,n=(r,i)=>Fle(e,r,i);return Object.assign(n,e),n},j4=t=>t?H6(t):H6;var G6={};/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const o8=function(t){const e=[];let n=0;for(let r=0;r>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},jle=function(t){const e=[];let n=0,r=0;for(;n191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],a=t[n++],l=((i&7)<<18|(s&63)<<12|(o&63)<<6|a&63)-65536;e[r++]=String.fromCharCode(55296+(l>>10)),e[r++]=String.fromCharCode(56320+(l&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},a8={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i>2,f=(s&3)<<4|a>>4;let h=(a&15)<<2|c>>6,m=c&63;l||(m=64,o||(h=64)),r.push(n[u],n[f],n[h],n[m])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(o8(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):jle(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i>4;if(r.push(h),c!==64){const m=a<<4&240|c>>2;if(r.push(m),f!==64){const v=c<<6&192|f;r.push(v)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class zle extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Hle=function(t){const e=o8(t);return a8.encodeByteArray(e,!0)},jM=function(t){return Hle(t).replace(/\./g,"")},l8=function(t){try{return a8.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Gle(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Vle=()=>Gle().__FIREBASE_DEFAULTS__,Wle=()=>{if(typeof process>"u"||typeof G6>"u")return;const t=G6.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},$le=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&l8(t[1]);return e&&JSON.parse(e)},u2=()=>{try{return Vle()||Wle()||$le()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},c8=t=>{var e,n;return(n=(e=u2())===null||e===void 0?void 0:e.emulatorHosts)===null||n===void 0?void 0:n[t]},u8=t=>{const e=c8(t);if(!e)return;const n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(n+1),10);return e[0]==="["?[e.substring(1,n-1),r]:[e.substring(0,n),r]},f8=()=>{var t;return(t=u2())===null||t===void 0?void 0:t.config},d8=t=>{var e;return(e=u2())===null||e===void 0?void 0:e[`_${t}`]};/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Jle{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function h8(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",i=t.iat||0,s=t.sub||t.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},t);return[jM(JSON.stringify(n)),jM(JSON.stringify(o)),""].join(".")}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Ki(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Yle(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ki())}function Qle(){var t;const e=(t=u2())===null||t===void 0?void 0:t.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function Xle(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function Kle(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Zle(){const t=Ki();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function qle(){return!Qle()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function ece(){try{return typeof indexedDB=="object"}catch{return!1}}function tce(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){e(n)}})}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const nce="FirebaseError";class Ml extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=nce,Object.setPrototypeOf(this,Ml.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,fv.prototype.create)}}class fv{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?rce(s,r):"Error",a=`${this.serviceName}: ${o} (${i}).`;return new Ml(i,a,r)}}function rce(t,e){return t.replace(ice,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const ice=/\{\$([^}]+)}/g;function sce(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function Qp(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],o=e[i];if(V6(s)&&V6(o)){if(!Qp(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function V6(t){return t!==null&&typeof t=="object"}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function dv(t){const e=[];for(const[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(i=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function cg(t){const e={};return t.replace(/^\?/,"").split("&").forEach(r=>{if(r){const[i,s]=r.split("=");e[decodeURIComponent(i)]=decodeURIComponent(s)}}),e}function ug(t){const e=t.indexOf("?");if(!e)return"";const n=t.indexOf("#",e);return t.substring(e,n>0?n:void 0)}function oce(t,e){const n=new ace(t,e);return n.subscribe.bind(n)}class ace{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,r){let i;if(e===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");lce(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=fE),i.error===void 0&&(i.error=fE),i.complete===void 0&&(i.complete=fE);const s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function lce(t,e){if(typeof t!="object"||t===null)return!1;for(const n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function fE(){}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function mr(t){return t&&t._delegate?t._delegate:t}let _u=class{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}};/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Rf="[DEFAULT]";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let cce=class{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new Jle;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(fce(e))try{this.getOrInitializeService({instanceIdentifier:Rf})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=Rf){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=Rf){return this.instances.has(e)}getOptions(e=Rf){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,o]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(s);r===a&&o.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(e),this.onInitCallbacks.set(i,s);const o=this.instances.get(i);return o&&e(o,i),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:uce(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=Rf){return this.component?this.component.multipleInstances?e:Rf:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function uce(t){return t===Rf?void 0:t}function fce(t){return t.instantiationMode==="EAGER"}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class dce{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new cce(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */var Gn;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(Gn||(Gn={}));const hce={debug:Gn.DEBUG,verbose:Gn.VERBOSE,info:Gn.INFO,warn:Gn.WARN,error:Gn.ERROR,silent:Gn.SILENT},pce=Gn.INFO,mce={[Gn.DEBUG]:"log",[Gn.VERBOSE]:"log",[Gn.INFO]:"info",[Gn.WARN]:"warn",[Gn.ERROR]:"error"},gce=(t,e,...n)=>{if(ee.some(n=>t instanceof n);let W6,$6;function yce(){return W6||(W6=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function wce(){return $6||($6=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const p8=new WeakMap,JT=new WeakMap,m8=new WeakMap,dE=new WeakMap,H4=new WeakMap;function _ce(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{n(pu(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&p8.set(n,t)}).catch(()=>{}),H4.set(e,t),e}function Mce(t){if(JT.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});JT.set(t,e)}let YT={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return JT.get(t);if(e==="objectStoreNames")return t.objectStoreNames||m8.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return pu(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function xce(t){YT=t(YT)}function bce(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(hE(this),e,...n);return m8.set(r,e.sort?e.sort():[e]),pu(r)}:wce().includes(t)?function(...e){return t.apply(hE(this),e),pu(p8.get(this))}:function(...e){return pu(t.apply(hE(this),e))}}function Sce(t){return typeof t=="function"?bce(t):(t instanceof IDBTransaction&&Mce(t),vce(t,yce())?new Proxy(t,YT):t)}function pu(t){if(t instanceof IDBRequest)return _ce(t);if(dE.has(t))return dE.get(t);const e=Sce(t);return e!==t&&(dE.set(t,e),H4.set(e,t)),e}const hE=t=>H4.get(t);function Cce(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=pu(o);return r&&o.addEventListener("upgradeneeded",l=>{r(pu(o.result),l.oldVersion,l.newVersion,pu(o.transaction),l)}),n&&o.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),a.then(l=>{s&&l.addEventListener("close",()=>s()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const Ece=["get","getKey","getAll","getAllKeys","count"],Ace=["put","add","delete","clear"],pE=new Map;function J6(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(pE.get(e))return pE.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=Ace.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Ece.includes(n)))return;const s=async function(o,...a){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return r&&(c=c.index(a.shift())),(await Promise.all([c[n](...a),i&&l.done]))[0]};return pE.set(e,s),s}xce(t=>({...t,get:(e,n,r)=>J6(e,n)||t.get(e,n,r),has:(e,n)=>!!J6(e,n)||t.has(e,n)}));/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Tce{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(Ice(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function Ice(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const QT="@firebase/app",Y6="0.10.6";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const yd=new z4("@firebase/app"),Lce="@firebase/app-compat",Rce="@firebase/analytics-compat",Pce="@firebase/analytics",Dce="@firebase/app-check-compat",Nce="@firebase/app-check",kce="@firebase/auth",Bce="@firebase/auth-compat",Oce="@firebase/database",Uce="@firebase/database-compat",Fce="@firebase/functions",jce="@firebase/functions-compat",zce="@firebase/installations",Hce="@firebase/installations-compat",Gce="@firebase/messaging",Vce="@firebase/messaging-compat",Wce="@firebase/performance",$ce="@firebase/performance-compat",Jce="@firebase/remote-config",Yce="@firebase/remote-config-compat",Qce="@firebase/storage",Xce="@firebase/storage-compat",Kce="@firebase/firestore",Zce="@firebase/vertexai-preview",qce="@firebase/firestore-compat",eue="firebase",tue="10.12.3";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const XT="[DEFAULT]",nue={[QT]:"fire-core",[Lce]:"fire-core-compat",[Pce]:"fire-analytics",[Rce]:"fire-analytics-compat",[Nce]:"fire-app-check",[Dce]:"fire-app-check-compat",[kce]:"fire-auth",[Bce]:"fire-auth-compat",[Oce]:"fire-rtdb",[Uce]:"fire-rtdb-compat",[Fce]:"fire-fn",[jce]:"fire-fn-compat",[zce]:"fire-iid",[Hce]:"fire-iid-compat",[Gce]:"fire-fcm",[Vce]:"fire-fcm-compat",[Wce]:"fire-perf",[$ce]:"fire-perf-compat",[Jce]:"fire-rc",[Yce]:"fire-rc-compat",[Qce]:"fire-gcs",[Xce]:"fire-gcs-compat",[Kce]:"fire-fst",[qce]:"fire-fst-compat",[Zce]:"fire-vertex","fire-js":"fire-js",[eue]:"fire-js-all"};/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const zM=new Map,rue=new Map,KT=new Map;function Q6(t,e){try{t.container.addComponent(e)}catch(n){yd.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function wd(t){const e=t.name;if(KT.has(e))return yd.debug(`There were multiple attempts to register component ${e}.`),!1;KT.set(e,t);for(const n of zM.values())Q6(n,t);for(const n of rue.values())Q6(n,t);return!0}function f2(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function La(t){return t.settings!==void 0}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const iue={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},mu=new fv("app","Firebase",iue);/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class sue{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new _u("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw mu.create("app-deleted",{appName:this._name})}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Bd=tue;function g8(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:XT,automaticDataCollectionEnabled:!1},e),i=r.name;if(typeof i!="string"||!i)throw mu.create("bad-app-name",{appName:String(i)});if(n||(n=f8()),!n)throw mu.create("no-options");const s=zM.get(i);if(s){if(Qp(n,s.options)&&Qp(r,s.config))return s;throw mu.create("duplicate-app",{appName:i})}const o=new dce(i);for(const l of KT.values())o.addComponent(l);const a=new sue(n,r,o);return zM.set(i,a),a}function G4(t=XT){const e=zM.get(t);if(!e&&t===XT&&f8())return g8();if(!e)throw mu.create("no-app",{appName:t});return e}function sl(t,e,n){var r;let i=(r=nue[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const s=i.match(/\s|\//),o=e.match(/\s|\//);if(s||o){const a=[`Unable to register library "${i}" with version "${e}":`];s&&a.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&a.push("and"),o&&a.push(`version name "${e}" contains illegal characters (whitespace or "/")`),yd.warn(a.join(" "));return}wd(new _u(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const oue="firebase-heartbeat-database",aue=1,y1="firebase-heartbeat-store";let mE=null;function v8(){return mE||(mE=Cce(oue,aue,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(y1)}catch(n){console.warn(n)}}}}).catch(t=>{throw mu.create("idb-open",{originalErrorMessage:t.message})})),mE}async function lue(t){try{const n=(await v8()).transaction(y1),r=await n.objectStore(y1).get(y8(t));return await n.done,r}catch(e){if(e instanceof Ml)yd.warn(e.message);else{const n=mu.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});yd.warn(n.message)}}}async function X6(t,e){try{const r=(await v8()).transaction(y1,"readwrite");await r.objectStore(y1).put(e,y8(t)),await r.done}catch(n){if(n instanceof Ml)yd.warn(n.message);else{const r=mu.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});yd.warn(r.message)}}}function y8(t){return`${t.name}!${t.options.appId}`}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const cue=1024,uue=30*24*60*60*1e3;class fue{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new hue(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,n;const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=K6();if(!(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s)))return this._heartbeatsCache.heartbeats.push({date:s,agent:i}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{const a=new Date(o.date).valueOf();return Date.now()-a<=uue}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){var e;if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=K6(),{heartbeatsToSend:r,unsentEntries:i}=due(this._heartbeatsCache.heartbeats),s=jM(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,i.length>0?(this._heartbeatsCache.heartbeats=i,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}}function K6(){return new Date().toISOString().substring(0,10)}function due(t,e=cue){const n=[];let r=t.slice();for(const i of t){const s=n.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),Z6(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),Z6(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class hue{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return ece()?tce().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await lue(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return X6(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return X6(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function Z6(t){return jM(JSON.stringify({version:2,heartbeats:t})).length}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function pue(t){wd(new _u("platform-logger",e=>new Tce(e),"PRIVATE")),wd(new _u("heartbeat",e=>new fue(e),"PRIVATE")),sl(QT,Y6,t),sl(QT,Y6,"esm2017"),sl("fire-js","")}pue("");function V4(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i"u")return null;const t=navigator;return t.languages&&t.languages[0]||t.language||null}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class hv{constructor(e,n){this.shortDelay=e,this.longDelay=n,cc(n>e,"Short delay should be less than long delay!"),this.isMobile=Yle()||Kle()}get(){return wue()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function J4(t,e){cc(t.emulator,"Emulator should always be set here");const{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class M8{static initialize(e,n,r){this.fetchImpl=e,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;Jl("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;Jl("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;Jl("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Mue={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const xue=new hv(3e4,6e4);function Uu(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}async function Fu(t,e,n,r,i={}){return x8(t,i,async()=>{let s={},o={};r&&(e==="GET"?o=r:s={body:JSON.stringify(r)});const a=dv(Object.assign({key:t.config.apiKey},o)).slice(1),l=await t._getAdditionalHeaders();return l["Content-Type"]="application/json",t.languageCode&&(l["X-Firebase-Locale"]=t.languageCode),M8.fetch()(b8(t,t.config.apiHost,n,a),Object.assign({method:e,headers:l,referrerPolicy:"no-referrer"},s))})}async function x8(t,e,n){t._canInitEmulator=!1;const r=Object.assign(Object.assign({},Mue),e);try{const i=new Sue(t),s=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();const o=await s.json();if("needConfirmation"in o)throw lw(t,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{const a=s.ok?o.errorMessage:o.error.message,[l,c]=a.split(" : ");if(l==="FEDERATED_USER_ID_ALREADY_LINKED")throw lw(t,"credential-already-in-use",o);if(l==="EMAIL_EXISTS")throw lw(t,"email-already-in-use",o);if(l==="USER_DISABLED")throw lw(t,"user-disabled",o);const u=r[l]||l.toLowerCase().replace(/[_\s]+/g,"-");if(c)throw W4(t,u,c);oa(t,u)}}catch(i){if(i instanceof Ml)throw i;oa(t,"network-request-failed",{message:String(i)})}}async function pv(t,e,n,r,i={}){const s=await Fu(t,e,n,r,i);return"mfaPendingCredential"in s&&oa(t,"multi-factor-auth-required",{_serverResponse:s}),s}function b8(t,e,n,r){const i=`${e}${n}?${r}`;return t.config.emulator?J4(t.config,i):`${t.config.apiScheme}://${i}`}function bue(t){switch(t){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class Sue{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(Da(this.auth,"network-request-failed")),xue.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function lw(t,e,n){const r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=Da(t,e,r);return i.customData._tokenResponse=n,i}function eB(t){return t!==void 0&&t.enterprise!==void 0}class Cue{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],e.recaptchaKey===void 0)throw new Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||this.recaptchaEnforcementState.length===0)return null;for(const n of this.recaptchaEnforcementState)if(n.provider&&n.provider===e)return bue(n.enforcementState);return null}isProviderEnabled(e){return this.getProviderEnforcementState(e)==="ENFORCE"||this.getProviderEnforcementState(e)==="AUDIT"}}async function Eue(t,e){return Fu(t,"GET","/v2/recaptchaConfig",Uu(t,e))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function Aue(t,e){return Fu(t,"POST","/v1/accounts:delete",e)}async function S8(t,e){return Fu(t,"POST","/v1/accounts:lookup",e)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Dg(t){if(t)try{const e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function Tue(t,e=!1){const n=mr(t),r=await n.getIdToken(e),i=Y4(r);sn(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const s=typeof i.firebase=="object"?i.firebase:void 0,o=s==null?void 0:s.sign_in_provider;return{claims:i,token:r,authTime:Dg(gE(i.auth_time)),issuedAtTime:Dg(gE(i.iat)),expirationTime:Dg(gE(i.exp)),signInProvider:o||null,signInSecondFactor:(s==null?void 0:s.sign_in_second_factor)||null}}function gE(t){return Number(t)*1e3}function Y4(t){const[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return F_("JWT malformed, contained fewer than 3 sections"),null;try{const i=l8(n);return i?JSON.parse(i):(F_("Failed to decode base64 JWT payload"),null)}catch(i){return F_("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function tB(t){const e=Y4(t);return sn(e,"internal-error"),sn(typeof e.exp<"u","internal-error"),sn(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function w1(t,e,n=!1){if(n)return e;try{return await e}catch(r){throw r instanceof Ml&&Iue(r)&&t.auth.currentUser===t&&await t.auth.signOut(),r}}function Iue({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Lue{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){var n;if(e){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const i=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(e=!1){if(!this.isRunning)return;const n=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(e==null?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class qT{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=Dg(this.lastLoginAt),this.creationTime=Dg(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function GM(t){var e;const n=t.auth,r=await t.getIdToken(),i=await w1(t,S8(n,{idToken:r}));sn(i==null?void 0:i.users.length,n,"internal-error");const s=i.users[0];t._notifyReloadListener(s);const o=!((e=s.providerUserInfo)===null||e===void 0)&&e.length?C8(s.providerUserInfo):[],a=Pue(t.providerData,o),l=t.isAnonymous,c=!(t.email&&s.passwordHash)&&!(a!=null&&a.length),u=l?c:!1,f={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:a,metadata:new qT(s.createdAt,s.lastLoginAt),isAnonymous:u};Object.assign(t,f)}async function Rue(t){const e=mr(t);await GM(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function Pue(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function C8(t){return t.map(e=>{var{providerId:n}=e,r=V4(e,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function Due(t,e){const n=await x8(t,{},async()=>{const r=dv({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:s}=t.config,o=b8(t,i,"/v1/token",`key=${s}`),a=await t._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",M8.fetch()(o,{method:"POST",headers:a,body:r})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function Nue(t,e){return Fu(t,"POST","/v2/accounts:revokeToken",Uu(t,e))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Sp{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){sn(e.idToken,"internal-error"),sn(typeof e.idToken<"u","internal-error"),sn(typeof e.refreshToken<"u","internal-error");const n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):tB(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}updateFromIdToken(e){sn(e.length!==0,"internal-error");const n=tB(e);this.updateTokensAndExpiration(e,null,n)}async getToken(e,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(sn(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(e,n){const{accessToken:r,refreshToken:i,expiresIn:s}=await Due(e,n);this.updateTokensAndExpiration(r,i,Number(s))}updateTokensAndExpiration(e,n,r){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(e,n){const{refreshToken:r,accessToken:i,expirationTime:s}=n,o=new Sp;return r&&(sn(typeof r=="string","internal-error",{appName:e}),o.refreshToken=r),i&&(sn(typeof i=="string","internal-error",{appName:e}),o.accessToken=i),s&&(sn(typeof s=="number","internal-error",{appName:e}),o.expirationTime=s),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Sp,this.toJSON())}_performRefresh(){return Jl("not implemented")}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Ic(t,e){sn(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}class Yl{constructor(e){var{uid:n,auth:r,stsTokenManager:i}=e,s=V4(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Lue(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.providerData=s.providerData?[...s.providerData]:[],this.metadata=new qT(s.createdAt||void 0,s.lastLoginAt||void 0)}async getIdToken(e){const n=await w1(this,this.stsTokenManager.getToken(this.auth,e));return sn(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return Tue(this,e)}reload(){return Rue(this)}_assign(e){this!==e&&(sn(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(n=>Object.assign({},n)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const n=new Yl(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(e){sn(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,n=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),n&&await GM(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(La(this.auth.app))return Promise.reject(ql(this.auth));const e=await this.getIdToken();return await w1(this,Aue(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,n){var r,i,s,o,a,l,c,u;const f=(r=n.displayName)!==null&&r!==void 0?r:void 0,h=(i=n.email)!==null&&i!==void 0?i:void 0,m=(s=n.phoneNumber)!==null&&s!==void 0?s:void 0,v=(o=n.photoURL)!==null&&o!==void 0?o:void 0,w=(a=n.tenantId)!==null&&a!==void 0?a:void 0,y=(l=n._redirectEventId)!==null&&l!==void 0?l:void 0,g=(c=n.createdAt)!==null&&c!==void 0?c:void 0,_=(u=n.lastLoginAt)!==null&&u!==void 0?u:void 0,{uid:x,emailVerified:S,isAnonymous:D,providerData:T,stsTokenManager:E}=n;sn(x&&E,e,"internal-error");const R=Sp.fromJSON(this.name,E);sn(typeof x=="string",e,"internal-error"),Ic(f,e.name),Ic(h,e.name),sn(typeof S=="boolean",e,"internal-error"),sn(typeof D=="boolean",e,"internal-error"),Ic(m,e.name),Ic(v,e.name),Ic(w,e.name),Ic(y,e.name),Ic(g,e.name),Ic(_,e.name);const C=new Yl({uid:x,auth:e,email:h,emailVerified:S,displayName:f,isAnonymous:D,photoURL:v,phoneNumber:m,tenantId:w,stsTokenManager:R,createdAt:g,lastLoginAt:_});return T&&Array.isArray(T)&&(C.providerData=T.map(L=>Object.assign({},L))),y&&(C._redirectEventId=y),C}static async _fromIdTokenResponse(e,n,r=!1){const i=new Sp;i.updateFromServerResponse(n);const s=new Yl({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return await GM(s),s}static async _fromGetAccountInfoResponse(e,n,r){const i=n.users[0];sn(i.localId!==void 0,"internal-error");const s=i.providerUserInfo!==void 0?C8(i.providerUserInfo):[],o=!(i.email&&i.passwordHash)&&!(s!=null&&s.length),a=new Sp;a.updateFromIdToken(r);const l=new Yl({uid:i.localId,auth:e,stsTokenManager:a,isAnonymous:o}),c={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:s,metadata:new qT(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!(s!=null&&s.length)};return Object.assign(l,c),l}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const nB=new Map;function Ql(t){cc(t instanceof Function,"Expected a class definition");let e=nB.get(t);return e?(cc(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,nB.set(t,e),e)}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class E8{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,n){this.storage[e]=n}async _get(e){const n=this.storage[e];return n===void 0?null:n}async _remove(e){delete this.storage[e]}_addListener(e,n){}_removeListener(e,n){}}E8.type="NONE";const rB=E8;/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function j_(t,e,n){return`firebase:${t}:${e}:${n}`}class Cp{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;const{config:i,name:s}=this.auth;this.fullUserKey=j_(this.userKey,i.apiKey,s),this.fullPersistenceKey=j_("persistence",i.apiKey,s),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?Yl._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,n,r="authUser"){if(!n.length)return new Cp(Ql(rB),e,r);const i=(await Promise.all(n.map(async c=>{if(await c._isAvailable())return c}))).filter(c=>c);let s=i[0]||Ql(rB);const o=j_(r,e.config.apiKey,e.name);let a=null;for(const c of n)try{const u=await c._get(o);if(u){const f=Yl._fromJSON(e,u);c!==s&&(a=f),s=c;break}}catch{}const l=i.filter(c=>c._shouldAllowMigration);return!s._shouldAllowMigration||!l.length?new Cp(s,e,r):(s=l[0],a&&await s._set(o,a.toJSON()),await Promise.all(n.map(async c=>{if(c!==s)try{await c._remove(o)}catch{}})),new Cp(s,e,r))}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function iB(t){const e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(I8(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(A8(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(R8(e))return"Blackberry";if(P8(e))return"Webos";if(Q4(e))return"Safari";if((e.includes("chrome/")||T8(e))&&!e.includes("edge/"))return"Chrome";if(L8(e))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=t.match(n);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function A8(t=Ki()){return/firefox\//i.test(t)}function Q4(t=Ki()){const e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function T8(t=Ki()){return/crios\//i.test(t)}function I8(t=Ki()){return/iemobile/i.test(t)}function L8(t=Ki()){return/android/i.test(t)}function R8(t=Ki()){return/blackberry/i.test(t)}function P8(t=Ki()){return/webos/i.test(t)}function d2(t=Ki()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function kue(t=Ki()){var e;return d2(t)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function Bue(){return Zle()&&document.documentMode===10}function D8(t=Ki()){return d2(t)||L8(t)||P8(t)||R8(t)||/windows phone/i.test(t)||I8(t)}function Oue(){try{return!!(window&&window!==window.top)}catch{return!1}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function N8(t,e=[]){let n;switch(t){case"Browser":n=iB(Ki());break;case"Worker":n=`${iB(Ki())}-${t}`;break;default:n=t}const r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${Bd}/${r}`}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Uue{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){const r=s=>new Promise((o,a)=>{try{const l=e(s);o(l)}catch(l){a(l)}});r.onAbort=n,this.queue.push(r);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const n=[];try{for(const r of this.queue)await r(e),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(const i of n)try{i()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r==null?void 0:r.message})}}}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function Fue(t,e={}){return Fu(t,"GET","/v2/passwordPolicy",Uu(t,e))}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const jue=6;class zue{constructor(e){var n,r,i,s;const o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(n=o.minPasswordLength)!==null&&n!==void 0?n:jue,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),o.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),o.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),o.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),o.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(i=(r=e.allowedNonAlphanumericCharacters)===null||r===void 0?void 0:r.join(""))!==null&&i!==void 0?i:"",this.forceUpgradeOnSignin=(s=e.forceUpgradeOnSignin)!==null&&s!==void 0?s:!1,this.schemaVersion=e.schemaVersion}validatePassword(e){var n,r,i,s,o,a;const l={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,l),this.validatePasswordCharacterOptions(e,l),l.isValid&&(l.isValid=(n=l.meetsMinPasswordLength)!==null&&n!==void 0?n:!0),l.isValid&&(l.isValid=(r=l.meetsMaxPasswordLength)!==null&&r!==void 0?r:!0),l.isValid&&(l.isValid=(i=l.containsLowercaseLetter)!==null&&i!==void 0?i:!0),l.isValid&&(l.isValid=(s=l.containsUppercaseLetter)!==null&&s!==void 0?s:!0),l.isValid&&(l.isValid=(o=l.containsNumericCharacter)!==null&&o!==void 0?o:!0),l.isValid&&(l.isValid=(a=l.containsNonAlphanumericCharacter)!==null&&a!==void 0?a:!0),l}validatePasswordLengthOptions(e,n){const r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=e.length>=r),i&&(n.meetsMaxPasswordLength=e.length<=i)}validatePasswordCharacterOptions(e,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let r;for(let i=0;i="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,n,r,i,s){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=s))}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Hue{constructor(e,n,r,i){this.app=e,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new sB(this),this.idTokenSubscription=new sB(this),this.beforeStateQueue=new Uue(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=_8,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=i.sdkClientVersion}_initializeWithPersistence(e,n){return n&&(this._popupRedirectResolver=Ql(n)),this._initializationPromise=this.queue(async()=>{var r,i;if(!this._deleted&&(this.persistenceManager=await Cp.create(this,e),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{const n=await S8(this,{idToken:e}),r=await Yl._fromGetAccountInfoResponse(this,n,e);await this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){var n;if(La(this.app)){const o=this.app.settings.authIdToken;return o?new Promise(a=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(o).then(a,a))}):this.directlySetCurrentUser(null)}const r=await this.assertedPersistence.getCurrentUser();let i=r,s=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const o=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,a=i==null?void 0:i._redirectEventId,l=await this.tryRedirectSignIn(e);(!o||o===a)&&(l!=null&&l.user)&&(i=l.user,s=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(s)try{await this.beforeStateQueue.runMiddleware(i)}catch(o){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return sn(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)}async tryRedirectSignIn(e){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(e){try{await GM(e)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=_ue()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(La(this.app))return Promise.reject(ql(this));const n=e?mr(e):null;return n&&sn(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(e,n=!1){if(!this._deleted)return e&&sn(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return La(this.app)?Promise.reject(ql(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return La(this.app)?Promise.reject(ql(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(Ql(e))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(e)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await Fue(this),n=new zue(e);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new fv("auth","Firebase",e())}onAuthStateChanged(e,n,r){return this.registerStateListener(this.authStateSubscription,e,n,r)}beforeAuthStateChanged(e,n){return this.beforeStateQueue.pushCallback(e,n)}onIdTokenChanged(e,n,r){return this.registerStateListener(this.idTokenSubscription,e,n,r)}authStateReady(){return new Promise((e,n)=>{if(this.currentUser)e();else{const r=this.onAuthStateChanged(()=>{r(),e()},n)}})}async revokeAccessToken(e){if(this.currentUser){const n=await this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),await Nue(this,r)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}async _setRedirectUser(e,n){const r=await this.getOrInitRedirectPersistenceManager(n);return e===null?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const n=e&&Ql(e)||this._popupRedirectResolver;sn(n,this,"argument-error"),this.redirectPersistenceManager=await Cp.create(this,[Ql(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var n,r;return this._isInitialized&&await this.queue(async()=>{}),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===e?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,n,r,i){if(this._deleted)return()=>{};const s=typeof n=="function"?n:n.next.bind(n);let o=!1;const a=this._isInitialized?Promise.resolve():this._initializationPromise;if(sn(a,this,"internal-error"),a.then(()=>{o||s(this.currentUser)}),typeof n=="function"){const l=e.addObserver(n,r,i);return()=>{o=!0,l()}}else{const l=e.addObserver(n);return()=>{o=!0,l()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return sn(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=N8(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=await((e=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getHeartbeatsHeader());r&&(n["X-Firebase-Client"]=r);const i=await this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n}async _getAppCheckToken(){var e;const n=await((e=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getToken());return n!=null&&n.error&&gue(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token}}function ju(t){return mr(t)}class sB{constructor(e){this.auth=e,this.observer=null,this.addObserver=oce(n=>this.observer=n)}get next(){return sn(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let h2={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Gue(t){h2=t}function k8(t){return h2.loadJS(t)}function Vue(){return h2.recaptchaEnterpriseScript}function Wue(){return h2.gapiScript}function $ue(t){return`__${t}${Math.floor(Math.random()*1e6)}`}const Jue="recaptcha-enterprise",Yue="NO_RECAPTCHA";class Que{constructor(e){this.type=Jue,this.auth=ju(e)}async verify(e="verify",n=!1){async function r(s){if(!n){if(s.tenantId==null&&s._agentRecaptchaConfig!=null)return s._agentRecaptchaConfig.siteKey;if(s.tenantId!=null&&s._tenantRecaptchaConfigs[s.tenantId]!==void 0)return s._tenantRecaptchaConfigs[s.tenantId].siteKey}return new Promise(async(o,a)=>{Eue(s,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(l=>{if(l.recaptchaKey===void 0)a(new Error("recaptcha Enterprise site key undefined"));else{const c=new Cue(l);return s.tenantId==null?s._agentRecaptchaConfig=c:s._tenantRecaptchaConfigs[s.tenantId]=c,o(c.siteKey)}}).catch(l=>{a(l)})})}function i(s,o,a){const l=window.grecaptcha;eB(l)?l.enterprise.ready(()=>{l.enterprise.execute(s,{action:e}).then(c=>{o(c)}).catch(()=>{o(Yue)})}):a(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((s,o)=>{r(this.auth).then(a=>{if(!n&&eB(window.grecaptcha))i(a,s,o);else{if(typeof window>"u"){o(new Error("RecaptchaVerifier is only supported in browser"));return}let l=Vue();l.length!==0&&(l+=a),k8(l).then(()=>{i(a,s,o)}).catch(c=>{o(c)})}}).catch(a=>{o(a)})})}}async function oB(t,e,n,r=!1){const i=new Que(t);let s;try{s=await i.verify(n)}catch{s=await i.verify(n,!0)}const o=Object.assign({},e);return r?Object.assign(o,{captchaResp:s}):Object.assign(o,{captchaResponse:s}),Object.assign(o,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(o,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),o}async function eI(t,e,n,r){var i;if(!((i=t._getRecaptchaConfig())===null||i===void 0)&&i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const s=await oB(t,e,n,n==="getOobCode");return r(t,s)}else return r(t,e).catch(async s=>{if(s.code==="auth/missing-recaptcha-token"){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const o=await oB(t,e,n,n==="getOobCode");return r(t,o)}else return Promise.reject(s)})}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Xue(t,e){const n=f2(t,"auth");if(n.isInitialized()){const i=n.getImmediate(),s=n.getOptions();if(Qp(s,e??{}))return i;oa(i,"already-initialized")}return n.initialize({options:e})}function Kue(t,e){const n=(e==null?void 0:e.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Ql);e!=null&&e.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e==null?void 0:e.popupRedirectResolver)}function Zue(t,e,n){const r=ju(t);sn(r._canInitEmulator,r,"emulator-config-failed"),sn(/^https?:\/\//.test(e),r,"invalid-emulator-scheme");const i=!1,s=B8(e),{host:o,port:a}=que(e),l=a===null?"":`:${a}`;r.config.emulator={url:`${s}//${o}${l}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:o,port:a,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:i})}),efe()}function B8(t){const e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function que(t){const e=B8(t),n=/(\/\/)?([^?#/]+)/.exec(t.substr(e.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const s=i[1];return{host:s,port:aB(r.substr(s.length+1))}}else{const[s,o]=r.split(":");return{host:s,port:aB(o)}}}function aB(t){if(!t)return null;const e=Number(t);return isNaN(e)?null:e}function efe(){function t(){const e=document.createElement("p"),n=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t())}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class X4{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return Jl("not implemented")}_getIdTokenResponse(e){return Jl("not implemented")}_linkToIdToken(e,n){return Jl("not implemented")}_getReauthenticationResolver(e){return Jl("not implemented")}}async function tfe(t,e){return Fu(t,"POST","/v1/accounts:signUp",e)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function nfe(t,e){return pv(t,"POST","/v1/accounts:signInWithPassword",Uu(t,e))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function rfe(t,e){return pv(t,"POST","/v1/accounts:signInWithEmailLink",Uu(t,e))}async function ife(t,e){return pv(t,"POST","/v1/accounts:signInWithEmailLink",Uu(t,e))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class _1 extends X4{constructor(e,n,r,i=null){super("password",r),this._email=e,this._password=n,this._tenantId=i}static _fromEmailAndPassword(e,n){return new _1(e,n,"password")}static _fromEmailAndCode(e,n,r=null){return new _1(e,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e;if(n!=null&&n.email&&(n!=null&&n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":const n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return eI(e,n,"signInWithPassword",nfe);case"emailLink":return rfe(e,{email:this._email,oobCode:this._password});default:oa(e,"internal-error")}}async _linkToIdToken(e,n){switch(this.signInMethod){case"password":const r={idToken:n,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return eI(e,r,"signUpPassword",tfe);case"emailLink":return ife(e,{idToken:n,email:this._email,oobCode:this._password});default:oa(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function Ep(t,e){return pv(t,"POST","/v1/accounts:signInWithIdp",Uu(t,e))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const sfe="http://localhost";class _d extends X4{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const n=new _d(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(n.idToken=e.idToken),e.accessToken&&(n.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):oa("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:i}=n,s=V4(n,["providerId","signInMethod"]);if(!r||!i)return null;const o=new _d(r,i);return o.idToken=s.idToken||void 0,o.accessToken=s.accessToken||void 0,o.secret=s.secret,o.nonce=s.nonce,o.pendingToken=s.pendingToken||null,o}_getIdTokenResponse(e){const n=this.buildRequest();return Ep(e,n)}_linkToIdToken(e,n){const r=this.buildRequest();return r.idToken=n,Ep(e,r)}_getReauthenticationResolver(e){const n=this.buildRequest();return n.autoCreate=!1,Ep(e,n)}buildRequest(){const e={requestUri:sfe,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),e.postBody=dv(n)}return e}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function ofe(t){switch(t){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function afe(t){const e=cg(ug(t)).link,n=e?cg(ug(e)).deep_link_id:null,r=cg(ug(t)).deep_link_id;return(r?cg(ug(r)).link:null)||r||n||e||t}class K4{constructor(e){var n,r,i,s,o,a;const l=cg(ug(e)),c=(n=l.apiKey)!==null&&n!==void 0?n:null,u=(r=l.oobCode)!==null&&r!==void 0?r:null,f=ofe((i=l.mode)!==null&&i!==void 0?i:null);sn(c&&u&&f,"argument-error"),this.apiKey=c,this.operation=f,this.code=u,this.continueUrl=(s=l.continueUrl)!==null&&s!==void 0?s:null,this.languageCode=(o=l.languageCode)!==null&&o!==void 0?o:null,this.tenantId=(a=l.tenantId)!==null&&a!==void 0?a:null}static parseLink(e){const n=afe(e);try{return new K4(n)}catch{return null}}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Lm{constructor(){this.providerId=Lm.PROVIDER_ID}static credential(e,n){return _1._fromEmailAndPassword(e,n)}static credentialWithLink(e,n){const r=K4.parseLink(n);return sn(r,"argument-error"),_1._fromEmailAndCode(e,r.code,r.tenantId)}}Lm.PROVIDER_ID="password";Lm.EMAIL_PASSWORD_SIGN_IN_METHOD="password";Lm.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Z4{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class mv extends Z4{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Qc extends mv{constructor(){super("facebook.com")}static credential(e){return _d._fromParams({providerId:Qc.PROVIDER_ID,signInMethod:Qc.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Qc.credentialFromTaggedObject(e)}static credentialFromError(e){return Qc.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Qc.credential(e.oauthAccessToken)}catch{return null}}}Qc.FACEBOOK_SIGN_IN_METHOD="facebook.com";Qc.PROVIDER_ID="facebook.com";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Hl extends mv{constructor(){super("google.com"),this.addScope("profile")}static credential(e,n){return _d._fromParams({providerId:Hl.PROVIDER_ID,signInMethod:Hl.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})}static credentialFromResult(e){return Hl.credentialFromTaggedObject(e)}static credentialFromError(e){return Hl.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:n,oauthAccessToken:r}=e;if(!n&&!r)return null;try{return Hl.credential(n,r)}catch{return null}}}Hl.GOOGLE_SIGN_IN_METHOD="google.com";Hl.PROVIDER_ID="google.com";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Xc extends mv{constructor(){super("github.com")}static credential(e){return _d._fromParams({providerId:Xc.PROVIDER_ID,signInMethod:Xc.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Xc.credentialFromTaggedObject(e)}static credentialFromError(e){return Xc.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Xc.credential(e.oauthAccessToken)}catch{return null}}}Xc.GITHUB_SIGN_IN_METHOD="github.com";Xc.PROVIDER_ID="github.com";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Kc extends mv{constructor(){super("twitter.com")}static credential(e,n){return _d._fromParams({providerId:Kc.PROVIDER_ID,signInMethod:Kc.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})}static credentialFromResult(e){return Kc.credentialFromTaggedObject(e)}static credentialFromError(e){return Kc.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=e;if(!n||!r)return null;try{return Kc.credential(n,r)}catch{return null}}}Kc.TWITTER_SIGN_IN_METHOD="twitter.com";Kc.PROVIDER_ID="twitter.com";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function lfe(t,e){return pv(t,"POST","/v1/accounts:signUp",Uu(t,e))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Md{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,n,r,i=!1){const s=await Yl._fromIdTokenResponse(e,r,i),o=lB(r);return new Md({user:s,providerId:o,_tokenResponse:r,operationType:n})}static async _forOperation(e,n,r){await e._updateTokensIfNecessary(r,!0);const i=lB(r);return new Md({user:e,providerId:i,_tokenResponse:r,operationType:n})}}function lB(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class VM extends Ml{constructor(e,n,r,i){var s;super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,VM.prototype),this.customData={appName:e.name,tenantId:(s=e.tenantId)!==null&&s!==void 0?s:void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,i){return new VM(e,n,r,i)}}function O8(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?VM._fromErrorAndOperation(t,s,e,r):s})}async function cfe(t,e,n=!1){const r=await w1(t,e._linkToIdToken(t.auth,await t.getIdToken()),n);return Md._forOperation(t,"link",r)}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function ufe(t,e,n=!1){const{auth:r}=t;if(La(r.app))return Promise.reject(ql(r));const i="reauthenticate";try{const s=await w1(t,O8(r,i,e,t),n);sn(s.idToken,r,"internal-error");const o=Y4(s.idToken);sn(o,r,"internal-error");const{sub:a}=o;return sn(t.uid===a,r,"user-mismatch"),Md._forOperation(t,i,s)}catch(s){throw(s==null?void 0:s.code)==="auth/user-not-found"&&oa(r,"user-mismatch"),s}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function U8(t,e,n=!1){if(La(t.app))return Promise.reject(ql(t));const r="signIn",i=await O8(t,r,e),s=await Md._fromIdTokenResponse(t,r,i);return n||await t._updateCurrentUser(s.user),s}async function ffe(t,e){return U8(ju(t),e)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function F8(t){const e=ju(t);e._getPasswordPolicyInternal()&&await e._updatePasswordPolicy()}async function dfe(t,e,n){if(La(t.app))return Promise.reject(ql(t));const r=ju(t),o=await eI(r,{returnSecureToken:!0,email:e,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",lfe).catch(l=>{throw l.code==="auth/password-does-not-meet-requirements"&&F8(t),l}),a=await Md._fromIdTokenResponse(r,"signIn",o);return await r._updateCurrentUser(a.user),a}function hfe(t,e,n){return La(t.app)?Promise.reject(ql(t)):ffe(mr(t),Lm.credential(e,n)).catch(async r=>{throw r.code==="auth/password-does-not-meet-requirements"&&F8(t),r})}function pfe(t,e,n,r){return mr(t).onIdTokenChanged(e,n,r)}function mfe(t,e,n){return mr(t).beforeAuthStateChanged(e,n)}function gfe(t,e,n,r){return mr(t).onAuthStateChanged(e,n,r)}function vfe(t){return mr(t).signOut()}const WM="__sak";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class j8{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(WM,"1"),this.storage.removeItem(WM),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,n){return this.storage.setItem(e,JSON.stringify(n)),Promise.resolve()}_get(e){const n=this.storage.getItem(e);return Promise.resolve(n?JSON.parse(n):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function yfe(){const t=Ki();return Q4(t)||d2(t)}const wfe=1e3,_fe=10;class z8 extends j8{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=yfe()&&Oue(),this.fallbackToPolling=D8(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),i=this.localCache[n];r!==i&&e(n,i,r)}}onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((o,a,l)=>{this.notifyListeners(o,l)});return}const r=e.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const o=this.storage.getItem(r);if(e.newValue!==o)e.newValue!==null?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!n)return}const i=()=>{const o=this.storage.getItem(r);!n&&this.localCache[r]===o||this.notifyListeners(r,o)},s=this.storage.getItem(r);Bue()&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,_fe):i()}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:n,newValue:r}),!0)})},wfe)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,n){await super._set(e,n),this.localCache[e]=JSON.stringify(n)}async _get(e){const n=await super._get(e);return this.localCache[e]=JSON.stringify(n),n}async _remove(e){await super._remove(e),delete this.localCache[e]}}z8.type="LOCAL";const Mfe=z8;/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class H8 extends j8{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}H8.type="SESSION";const G8=H8;/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function xfe(t){return Promise.all(t.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(n){return{fulfilled:!1,reason:n}}}))}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class p2{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const n=this.receivers.find(i=>i.isListeningto(e));if(n)return n;const r=new p2(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const n=e,{eventId:r,eventType:i,data:s}=n.data,o=this.handlersMap[i];if(!(o!=null&&o.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const a=Array.from(o).map(async c=>c(n.origin,s)),l=await xfe(a);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:l})}_subscribe(e,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(n)}_unsubscribe(e,n){this.handlersMap[e]&&n&&this.handlersMap[e].delete(n),(!n||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}p2.receivers=[];/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function q4(t="",e=10){let n="";for(let r=0;r{const c=q4("",20);i.port1.start();const u=setTimeout(()=>{l(new Error("unsupported_event"))},r);o={messageChannel:i,onMessage(f){const h=f;if(h.data.eventId===c)switch(h.data.status){case"ack":clearTimeout(u),s=setTimeout(()=>{l(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),a(h.data.response);break;default:clearTimeout(u),clearTimeout(s),l(new Error("invalid_response"));break}}},this.handlers.add(o),i.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:c,data:n},[i.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function ol(){return window}function Sfe(t){ol().location.href=t}/** + * @license + * Copyright 2020 Google LLC. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function V8(){return typeof ol().WorkerGlobalScope<"u"&&typeof ol().importScripts=="function"}async function Cfe(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function Efe(){var t;return((t=navigator==null?void 0:navigator.serviceWorker)===null||t===void 0?void 0:t.controller)||null}function Afe(){return V8()?self:null}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const W8="firebaseLocalStorageDb",Tfe=1,$M="firebaseLocalStorage",$8="fbase_key";class gv{constructor(e){this.request=e}toPromise(){return new Promise((e,n)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function m2(t,e){return t.transaction([$M],e?"readwrite":"readonly").objectStore($M)}function Ife(){const t=indexedDB.deleteDatabase(W8);return new gv(t).toPromise()}function tI(){const t=indexedDB.open(W8,Tfe);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{const r=t.result;try{r.createObjectStore($M,{keyPath:$8})}catch(i){n(i)}}),t.addEventListener("success",async()=>{const r=t.result;r.objectStoreNames.contains($M)?e(r):(r.close(),await Ife(),e(await tI()))})})}async function cB(t,e,n){const r=m2(t,!0).put({[$8]:e,value:n});return new gv(r).toPromise()}async function Lfe(t,e){const n=m2(t,!1).get(e),r=await new gv(n).toPromise();return r===void 0?null:r.value}function uB(t,e){const n=m2(t,!0).delete(e);return new gv(n).toPromise()}const Rfe=800,Pfe=3;class J8{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await tI(),this.db)}async _withRetries(e){let n=0;for(;;)try{const r=await this._openDb();return await e(r)}catch(r){if(n++>Pfe)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return V8()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=p2._getInstance(Afe()),this.receiver._subscribe("keyChanged",async(e,n)=>({keyProcessed:(await this._poll()).includes(n.key)})),this.receiver._subscribe("ping",async(e,n)=>["keyChanged"])}async initializeSender(){var e,n;if(this.activeServiceWorker=await Cfe(),!this.activeServiceWorker)return;this.sender=new bfe(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);r&&!((e=r[0])===null||e===void 0)&&e.fulfilled&&!((n=r[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||Efe()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await tI();return await cB(e,WM,"1"),await uB(e,WM),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>cB(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)))}async _get(e){const n=await this._withRetries(r=>Lfe(r,e));return this.localCache[e]=n,n}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(n=>uB(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(i=>{const s=m2(i,!1).getAll();return new gv(s).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(e.length!==0)for(const{fbase_key:i,value:s}of e)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(s)&&(this.notifyListeners(i,s),n.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),n.push(i));return n}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),Rfe)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}}J8.type="LOCAL";const Dfe=J8;new hv(3e4,6e4);/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Y8(t,e){return e?Ql(e):(sn(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class e3 extends X4{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Ep(e,this._buildIdpRequest())}_linkToIdToken(e,n){return Ep(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return Ep(e,this._buildIdpRequest())}_buildIdpRequest(e){const n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(n.idToken=e),n}}function Nfe(t){return U8(t.auth,new e3(t),t.bypassAuthState)}function kfe(t){const{auth:e,user:n}=t;return sn(n,e,"internal-error"),ufe(n,new e3(t),t.bypassAuthState)}async function Bfe(t){const{auth:e,user:n}=t;return sn(n,e,"internal-error"),cfe(n,new e3(t),t.bypassAuthState)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Q8{constructor(e,n,r,i,s=!1){this.auth=e,this.resolver=r,this.user=i,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(e,n)=>{this.pendingPromise={resolve:e,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(e){const{urlResponse:n,sessionId:r,postBody:i,tenantId:s,error:o,type:a}=e;if(o){this.reject(o);return}const l={auth:this.auth,requestUri:n,sessionId:r,tenantId:s||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(l))}catch(c){this.reject(c)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Nfe;case"linkViaPopup":case"linkViaRedirect":return Bfe;case"reauthViaPopup":case"reauthViaRedirect":return kfe;default:oa(this.auth,"internal-error")}}resolve(e){cc(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){cc(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Ofe=new hv(2e3,1e4);async function Ufe(t,e,n){if(La(t.app))return Promise.reject(Da(t,"operation-not-supported-in-this-environment"));const r=ju(t);vue(t,e,Z4);const i=Y8(r,n);return new Vf(r,"signInViaPopup",e,i).executeNotNull()}class Vf extends Q8{constructor(e,n,r,i,s){super(e,n,i,s),this.provider=r,this.authWindow=null,this.pollId=null,Vf.currentPopupAction&&Vf.currentPopupAction.cancel(),Vf.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return sn(e,this.auth,"internal-error"),e}async onExecution(){cc(this.filter.length===1,"Popup operations only handle one event");const e=q4();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(Da(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return((e=this.authWindow)===null||e===void 0?void 0:e.associatedEvent)||null}cancel(){this.reject(Da(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Vf.currentPopupAction=null}pollUserCancellation(){const e=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Da(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,Ofe.get())};e()}}Vf.currentPopupAction=null;/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Ffe="pendingRedirect",z_=new Map;class jfe extends Q8{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let e=z_.get(this.auth._key());if(!e){try{const r=await zfe(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}z_.set(this.auth._key(),e)}return this.bypassAuthState||z_.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const n=await this.auth._redirectUserForId(e.eventId);if(n)return this.user=n,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function zfe(t,e){const n=Vfe(e),r=Gfe(t);if(!await r._isAvailable())return!1;const i=await r._get(n)==="true";return await r._remove(n),i}function Hfe(t,e){z_.set(t._key(),e)}function Gfe(t){return Ql(t._redirectPersistence)}function Vfe(t){return j_(Ffe,t.config.apiKey,t.name)}async function Wfe(t,e,n=!1){if(La(t.app))return Promise.reject(ql(t));const r=ju(t),i=Y8(r,e),o=await new jfe(r,i,n).execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,e)),o}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const $fe=10*60*1e3;class Jfe{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(n=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!Yfe(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){var r;if(e.error&&!X8(e)){const i=((r=e.error.code)===null||r===void 0?void 0:r.split("auth/")[1])||"internal-error";n.onError(Da(this.auth,i))}else n.onAuthEvent(e)}isEventForConsumer(e,n){const r=n.eventId===null||!!e.eventId&&e.eventId===n.eventId;return n.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=$fe&&this.cachedEventUids.clear(),this.cachedEventUids.has(fB(e))}saveEventToCache(e){this.cachedEventUids.add(fB(e)),this.lastProcessedEventTime=Date.now()}}function fB(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function X8({type:t,error:e}){return t==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function Yfe(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return X8(t);default:return!1}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function Qfe(t,e={}){return Fu(t,"GET","/v1/projects",e)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Xfe=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Kfe=/^https?/;async function Zfe(t){if(t.config.emulator)return;const{authorizedDomains:e}=await Qfe(t);for(const n of e)try{if(qfe(n))return}catch{}oa(t,"unauthorized-domain")}function qfe(t){const e=ZT(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){const o=new URL(t);return o.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&o.hostname===r}if(!Kfe.test(n))return!1;if(Xfe.test(t))return r===t;const i=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}/** + * @license + * Copyright 2020 Google LLC. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const ede=new hv(3e4,6e4);function dB(){const t=ol().___jsl;if(t!=null&&t.H){for(const e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let n=0;n{var r,i,s;function o(){dB(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{dB(),n(Da(t,"network-request-failed"))},timeout:ede.get()})}if(!((i=(r=ol().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)e(gapi.iframes.getContext());else if(!((s=ol().gapi)===null||s===void 0)&&s.load)o();else{const a=$ue("iframefcb");return ol()[a]=()=>{gapi.load?o():n(Da(t,"network-request-failed"))},k8(`${Wue()}?onload=${a}`).catch(l=>n(l))}}).catch(e=>{throw H_=null,e})}let H_=null;function nde(t){return H_=H_||tde(t),H_}/** + * @license + * Copyright 2020 Google LLC. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const rde=new hv(5e3,15e3),ide="__/auth/iframe",sde="emulator/auth/iframe",ode={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},ade=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function lde(t){const e=t.config;sn(e.authDomain,t,"auth-domain-config-required");const n=e.emulator?J4(e,sde):`https://${t.config.authDomain}/${ide}`,r={apiKey:e.apiKey,appName:t.name,v:Bd},i=ade.get(t.config.apiHost);i&&(r.eid=i);const s=t._getFrameworks();return s.length&&(r.fw=s.join(",")),`${n}?${dv(r).slice(1)}`}async function cde(t){const e=await nde(t),n=ol().gapi;return sn(n,t,"internal-error"),e.open({where:document.body,url:lde(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:ode,dontclear:!0},r=>new Promise(async(i,s)=>{await r.restyle({setHideOnLeave:!1});const o=Da(t,"network-request-failed"),a=ol().setTimeout(()=>{s(o)},rde.get());function l(){ol().clearTimeout(a),i(r)}r.ping(l).then(l,()=>{s(o)})}))}/** + * @license + * Copyright 2020 Google LLC. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const ude={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},fde=500,dde=600,hde="_blank",pde="http://localhost";class hB{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function mde(t,e,n,r=fde,i=dde){const s=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const l=Object.assign(Object.assign({},ude),{width:r.toString(),height:i.toString(),top:s,left:o}),c=Ki().toLowerCase();n&&(a=T8(c)?hde:n),A8(c)&&(e=e||pde,l.scrollbars="yes");const u=Object.entries(l).reduce((h,[m,v])=>`${h}${m}=${v},`,"");if(kue(c)&&a!=="_self")return gde(e||"",a),new hB(null);const f=window.open(e||"",a,u);sn(f,t,"popup-blocked");try{f.focus()}catch{}return new hB(f)}function gde(t,e){const n=document.createElement("a");n.href=t,n.target=e;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const vde="__/auth/handler",yde="emulator/auth/handler",wde=encodeURIComponent("fac");async function pB(t,e,n,r,i,s){sn(t.config.authDomain,t,"auth-domain-config-required"),sn(t.config.apiKey,t,"invalid-api-key");const o={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:Bd,eventId:i};if(e instanceof Z4){e.setDefaultLanguage(t.languageCode),o.providerId=e.providerId||"",sce(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(const[u,f]of Object.entries({}))o[u]=f}if(e instanceof mv){const u=e.getScopes().filter(f=>f!=="");u.length>0&&(o.scopes=u.join(","))}t.tenantId&&(o.tid=t.tenantId);const a=o;for(const u of Object.keys(a))a[u]===void 0&&delete a[u];const l=await t._getAppCheckToken(),c=l?`#${wde}=${encodeURIComponent(l)}`:"";return`${_de(t)}?${dv(a).slice(1)}${c}`}function _de({config:t}){return t.emulator?J4(t,yde):`https://${t.authDomain}/${vde}`}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const vE="webStorageSupport";class Mde{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=G8,this._completeRedirectFn=Wfe,this._overrideRedirectResult=Hfe}async _openPopup(e,n,r,i){var s;cc((s=this.eventManagers[e._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");const o=await pB(e,n,r,ZT(),i);return mde(e,o,q4())}async _openRedirect(e,n,r,i){await this._originValidation(e);const s=await pB(e,n,r,ZT(),i);return Sfe(s),new Promise(()=>{})}_initialize(e){const n=e._key();if(this.eventManagers[n]){const{manager:i,promise:s}=this.eventManagers[n];return i?Promise.resolve(i):(cc(s,"If manager is not set, promise should be"),s)}const r=this.initAndGetManager(e);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(e){const n=await cde(e),r=new Jfe(e);return n.register("authEvent",i=>(sn(i==null?void 0:i.authEvent,e,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=n,r}_isIframeWebStorageSupported(e,n){this.iframes[e._key()].send(vE,{type:vE},i=>{var s;const o=(s=i==null?void 0:i[0])===null||s===void 0?void 0:s[vE];o!==void 0&&n(!!o),oa(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=Zfe(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return D8()||Q4()||d2()}}const xde=Mde;var mB="@firebase/auth",gB="1.7.5";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class bde{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const n=this.auth.onIdTokenChanged(r=>{e((r==null?void 0:r.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,n),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const n=this.internalListeners.get(e);n&&(this.internalListeners.delete(e),n(),this.updateProactiveRefresh())}assertAuthConfigured(){sn(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Sde(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function Cde(t){wd(new _u("auth",(e,{options:n})=>{const r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=r.options;sn(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});const l={apiKey:o,authDomain:a,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:N8(t)},c=new Hue(r,i,s,l);return Kue(c,n),c},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),wd(new _u("auth-internal",e=>{const n=ju(e.getProvider("auth").getImmediate());return(r=>new bde(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),sl(mB,gB,Sde(t)),sl(mB,gB,"esm2017")}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Ede=5*60,Ade=d8("authIdTokenMaxAge")||Ede;let vB=null;const Tde=t=>async e=>{const n=e&&await e.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>Ade)return;const i=n==null?void 0:n.token;vB!==i&&(vB=i,await fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function Ide(t=G4()){const e=f2(t,"auth");if(e.isInitialized())return e.getImmediate();const n=Xue(t,{popupRedirectResolver:xde,persistence:[Dfe,Mfe,G8]}),r=d8("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const s=new URL(r,location.origin);if(location.origin===s.origin){const o=Tde(s.toString());mfe(n,o,()=>o(n.currentUser)),pfe(n,a=>o(a))}}const i=c8("auth");return i&&Zue(n,`http://${i}`),n}function Lde(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}Gue({loadJS(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{const s=Da("internal-error");s.customData=i,n(s)},r.type="text/javascript",r.charset="UTF-8",Lde().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});Cde("Browser");var yB=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license +Copyright The Closure Library Authors. +SPDX-License-Identifier: Apache-2.0 +*/var nd,K8;(function(){var t;/** @license + + Copyright The Closure Library Authors. + SPDX-License-Identifier: Apache-2.0 +*/function e(E,R){function C(){}C.prototype=R.prototype,E.D=R.prototype,E.prototype=new C,E.prototype.constructor=E,E.C=function(L,P,z){for(var B=Array(arguments.length-2),Y=2;YP;++P)L[P]=R.charCodeAt(C++)|R.charCodeAt(C++)<<8|R.charCodeAt(C++)<<16|R.charCodeAt(C++)<<24;else for(P=0;16>P;++P)L[P]=R[C++]|R[C++]<<8|R[C++]<<16|R[C++]<<24;R=E.g[0],C=E.g[1],P=E.g[2];var z=E.g[3],B=R+(z^C&(P^z))+L[0]+3614090360&4294967295;R=C+(B<<7&4294967295|B>>>25),B=z+(P^R&(C^P))+L[1]+3905402710&4294967295,z=R+(B<<12&4294967295|B>>>20),B=P+(C^z&(R^C))+L[2]+606105819&4294967295,P=z+(B<<17&4294967295|B>>>15),B=C+(R^P&(z^R))+L[3]+3250441966&4294967295,C=P+(B<<22&4294967295|B>>>10),B=R+(z^C&(P^z))+L[4]+4118548399&4294967295,R=C+(B<<7&4294967295|B>>>25),B=z+(P^R&(C^P))+L[5]+1200080426&4294967295,z=R+(B<<12&4294967295|B>>>20),B=P+(C^z&(R^C))+L[6]+2821735955&4294967295,P=z+(B<<17&4294967295|B>>>15),B=C+(R^P&(z^R))+L[7]+4249261313&4294967295,C=P+(B<<22&4294967295|B>>>10),B=R+(z^C&(P^z))+L[8]+1770035416&4294967295,R=C+(B<<7&4294967295|B>>>25),B=z+(P^R&(C^P))+L[9]+2336552879&4294967295,z=R+(B<<12&4294967295|B>>>20),B=P+(C^z&(R^C))+L[10]+4294925233&4294967295,P=z+(B<<17&4294967295|B>>>15),B=C+(R^P&(z^R))+L[11]+2304563134&4294967295,C=P+(B<<22&4294967295|B>>>10),B=R+(z^C&(P^z))+L[12]+1804603682&4294967295,R=C+(B<<7&4294967295|B>>>25),B=z+(P^R&(C^P))+L[13]+4254626195&4294967295,z=R+(B<<12&4294967295|B>>>20),B=P+(C^z&(R^C))+L[14]+2792965006&4294967295,P=z+(B<<17&4294967295|B>>>15),B=C+(R^P&(z^R))+L[15]+1236535329&4294967295,C=P+(B<<22&4294967295|B>>>10),B=R+(P^z&(C^P))+L[1]+4129170786&4294967295,R=C+(B<<5&4294967295|B>>>27),B=z+(C^P&(R^C))+L[6]+3225465664&4294967295,z=R+(B<<9&4294967295|B>>>23),B=P+(R^C&(z^R))+L[11]+643717713&4294967295,P=z+(B<<14&4294967295|B>>>18),B=C+(z^R&(P^z))+L[0]+3921069994&4294967295,C=P+(B<<20&4294967295|B>>>12),B=R+(P^z&(C^P))+L[5]+3593408605&4294967295,R=C+(B<<5&4294967295|B>>>27),B=z+(C^P&(R^C))+L[10]+38016083&4294967295,z=R+(B<<9&4294967295|B>>>23),B=P+(R^C&(z^R))+L[15]+3634488961&4294967295,P=z+(B<<14&4294967295|B>>>18),B=C+(z^R&(P^z))+L[4]+3889429448&4294967295,C=P+(B<<20&4294967295|B>>>12),B=R+(P^z&(C^P))+L[9]+568446438&4294967295,R=C+(B<<5&4294967295|B>>>27),B=z+(C^P&(R^C))+L[14]+3275163606&4294967295,z=R+(B<<9&4294967295|B>>>23),B=P+(R^C&(z^R))+L[3]+4107603335&4294967295,P=z+(B<<14&4294967295|B>>>18),B=C+(z^R&(P^z))+L[8]+1163531501&4294967295,C=P+(B<<20&4294967295|B>>>12),B=R+(P^z&(C^P))+L[13]+2850285829&4294967295,R=C+(B<<5&4294967295|B>>>27),B=z+(C^P&(R^C))+L[2]+4243563512&4294967295,z=R+(B<<9&4294967295|B>>>23),B=P+(R^C&(z^R))+L[7]+1735328473&4294967295,P=z+(B<<14&4294967295|B>>>18),B=C+(z^R&(P^z))+L[12]+2368359562&4294967295,C=P+(B<<20&4294967295|B>>>12),B=R+(C^P^z)+L[5]+4294588738&4294967295,R=C+(B<<4&4294967295|B>>>28),B=z+(R^C^P)+L[8]+2272392833&4294967295,z=R+(B<<11&4294967295|B>>>21),B=P+(z^R^C)+L[11]+1839030562&4294967295,P=z+(B<<16&4294967295|B>>>16),B=C+(P^z^R)+L[14]+4259657740&4294967295,C=P+(B<<23&4294967295|B>>>9),B=R+(C^P^z)+L[1]+2763975236&4294967295,R=C+(B<<4&4294967295|B>>>28),B=z+(R^C^P)+L[4]+1272893353&4294967295,z=R+(B<<11&4294967295|B>>>21),B=P+(z^R^C)+L[7]+4139469664&4294967295,P=z+(B<<16&4294967295|B>>>16),B=C+(P^z^R)+L[10]+3200236656&4294967295,C=P+(B<<23&4294967295|B>>>9),B=R+(C^P^z)+L[13]+681279174&4294967295,R=C+(B<<4&4294967295|B>>>28),B=z+(R^C^P)+L[0]+3936430074&4294967295,z=R+(B<<11&4294967295|B>>>21),B=P+(z^R^C)+L[3]+3572445317&4294967295,P=z+(B<<16&4294967295|B>>>16),B=C+(P^z^R)+L[6]+76029189&4294967295,C=P+(B<<23&4294967295|B>>>9),B=R+(C^P^z)+L[9]+3654602809&4294967295,R=C+(B<<4&4294967295|B>>>28),B=z+(R^C^P)+L[12]+3873151461&4294967295,z=R+(B<<11&4294967295|B>>>21),B=P+(z^R^C)+L[15]+530742520&4294967295,P=z+(B<<16&4294967295|B>>>16),B=C+(P^z^R)+L[2]+3299628645&4294967295,C=P+(B<<23&4294967295|B>>>9),B=R+(P^(C|~z))+L[0]+4096336452&4294967295,R=C+(B<<6&4294967295|B>>>26),B=z+(C^(R|~P))+L[7]+1126891415&4294967295,z=R+(B<<10&4294967295|B>>>22),B=P+(R^(z|~C))+L[14]+2878612391&4294967295,P=z+(B<<15&4294967295|B>>>17),B=C+(z^(P|~R))+L[5]+4237533241&4294967295,C=P+(B<<21&4294967295|B>>>11),B=R+(P^(C|~z))+L[12]+1700485571&4294967295,R=C+(B<<6&4294967295|B>>>26),B=z+(C^(R|~P))+L[3]+2399980690&4294967295,z=R+(B<<10&4294967295|B>>>22),B=P+(R^(z|~C))+L[10]+4293915773&4294967295,P=z+(B<<15&4294967295|B>>>17),B=C+(z^(P|~R))+L[1]+2240044497&4294967295,C=P+(B<<21&4294967295|B>>>11),B=R+(P^(C|~z))+L[8]+1873313359&4294967295,R=C+(B<<6&4294967295|B>>>26),B=z+(C^(R|~P))+L[15]+4264355552&4294967295,z=R+(B<<10&4294967295|B>>>22),B=P+(R^(z|~C))+L[6]+2734768916&4294967295,P=z+(B<<15&4294967295|B>>>17),B=C+(z^(P|~R))+L[13]+1309151649&4294967295,C=P+(B<<21&4294967295|B>>>11),B=R+(P^(C|~z))+L[4]+4149444226&4294967295,R=C+(B<<6&4294967295|B>>>26),B=z+(C^(R|~P))+L[11]+3174756917&4294967295,z=R+(B<<10&4294967295|B>>>22),B=P+(R^(z|~C))+L[2]+718787259&4294967295,P=z+(B<<15&4294967295|B>>>17),B=C+(z^(P|~R))+L[9]+3951481745&4294967295,E.g[0]=E.g[0]+R&4294967295,E.g[1]=E.g[1]+(P+(B<<21&4294967295|B>>>11))&4294967295,E.g[2]=E.g[2]+P&4294967295,E.g[3]=E.g[3]+z&4294967295}r.prototype.u=function(E,R){R===void 0&&(R=E.length);for(var C=R-this.blockSize,L=this.B,P=this.h,z=0;zthis.h?this.blockSize:2*this.blockSize)-this.h);E[0]=128;for(var R=1;RR;++R)for(var L=0;32>L;L+=8)E[C++]=this.g[R]>>>L&255;return E};function s(E,R){var C=a;return Object.prototype.hasOwnProperty.call(C,E)?C[E]:C[E]=R(E)}function o(E,R){this.h=R;for(var C=[],L=!0,P=E.length-1;0<=P;P--){var z=E[P]|0;L&&z==R||(C[P]=z,L=!1)}this.g=C}var a={};function l(E){return-128<=E&&128>E?s(E,function(R){return new o([R|0],0>R?-1:0)}):new o([E|0],0>E?-1:0)}function c(E){if(isNaN(E)||!isFinite(E))return f;if(0>E)return y(c(-E));for(var R=[],C=1,L=0;E>=C;L++)R[L]=E/C|0,C*=4294967296;return new o(R,0)}function u(E,R){if(E.length==0)throw Error("number format error: empty string");if(R=R||10,2>R||36z?(z=c(Math.pow(R,z)),L=L.j(z).add(c(B))):(L=L.j(C),L=L.add(c(B)))}return L}var f=l(0),h=l(1),m=l(16777216);t=o.prototype,t.m=function(){if(w(this))return-y(this).m();for(var E=0,R=1,C=0;CE||36>>0).toString(E);if(C=P,v(C))return z+L;for(;6>z.length;)z="0"+z;L=z+L}},t.i=function(E){return 0>E?0:E>>16)+(this.i(P)>>>16)+(E.i(P)>>>16);L=B>>>16,z&=65535,B&=65535,C[P]=B<<16|z}return new o(C,C[C.length-1]&-2147483648?-1:0)};function g(E,R){return E.add(y(R))}t.j=function(E){if(v(this)||v(E))return f;if(w(this))return w(E)?y(this).j(y(E)):y(y(this).j(E));if(w(E))return y(this.j(y(E)));if(0>this.l(m)&&0>E.l(m))return c(this.m()*E.m());for(var R=this.g.length+E.g.length,C=[],L=0;L<2*R;L++)C[L]=0;for(L=0;L>>16,B=this.i(L)&65535,Y=E.i(P)>>>16,ie=E.i(P)&65535;C[2*L+2*P]+=B*ie,_(C,2*L+2*P),C[2*L+2*P+1]+=z*ie,_(C,2*L+2*P+1),C[2*L+2*P+1]+=B*Y,_(C,2*L+2*P+1),C[2*L+2*P+2]+=z*Y,_(C,2*L+2*P+2)}for(L=0;L>>16,E[R]&=65535,R++}function x(E,R){this.g=E,this.h=R}function S(E,R){if(v(R))throw Error("division by zero");if(v(E))return new x(f,f);if(w(E))return R=S(y(E),R),new x(y(R.g),y(R.h));if(w(R))return R=S(E,y(R)),new x(y(R.g),R.h);if(30=L.l(E);)C=D(C),L=D(L);var P=T(C,1),z=T(L,1);for(L=T(L,2),C=T(C,2);!v(L);){var B=z.add(L);0>=B.l(E)&&(P=P.add(C),z=B),L=T(L,1),C=T(C,1)}return R=g(E,P.j(R)),new x(P,R)}for(P=f;0<=E.l(R);){for(C=Math.max(1,Math.floor(E.m()/R.m())),L=Math.ceil(Math.log(C)/Math.LN2),L=48>=L?1:Math.pow(2,L-48),z=c(C),B=z.j(R);w(B)||0>>31;return new o(C,E.h)}function T(E,R){var C=R>>5;R%=32;for(var L=E.g.length-C,P=[],z=0;z>>R|E.i(z+C+1)<<32-R:E.i(z+C);return new o(P,E.h)}r.prototype.digest=r.prototype.v,r.prototype.reset=r.prototype.s,r.prototype.update=r.prototype.u,K8=r,o.prototype.add=o.prototype.add,o.prototype.multiply=o.prototype.j,o.prototype.modulo=o.prototype.A,o.prototype.compare=o.prototype.l,o.prototype.toNumber=o.prototype.m,o.prototype.toString=o.prototype.toString,o.prototype.getBits=o.prototype.i,o.fromNumber=c,o.fromString=u,nd=o}).apply(typeof yB<"u"?yB:typeof self<"u"?self:typeof window<"u"?window:{});var cw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license +Copyright The Closure Library Authors. +SPDX-License-Identifier: Apache-2.0 +*/var Z8,q8,fg,eH,G_,nI,tH,nH,rH;(function(){var t,e=typeof Object.defineProperties=="function"?Object.defineProperty:function(M,k,H){return M==Array.prototype||M==Object.prototype||(M[k]=H.value),M};function n(M){M=[typeof globalThis=="object"&&globalThis,M,typeof window=="object"&&window,typeof self=="object"&&self,typeof cw=="object"&&cw];for(var k=0;k{throw M},0)}function B(){var M=q;let k=null;return M.g&&(k=M.g,M.g=M.g.next,M.g||(M.h=null),k.next=null),k}class Y{constructor(){this.h=this.g=null}add(k,H){const Q=ie.get();Q.set(k,H),this.h?this.h.next=Q:this.g=Q,this.h=Q}}var ie=new g(()=>new ee,M=>M.reset());class ee{constructor(){this.next=this.g=this.h=null}set(k,H){this.h=k,this.g=H,this.next=null}reset(){this.next=this.g=this.h=null}}let le,j=!1,q=new Y,ne=()=>{const M=a.Promise.resolve(void 0);le=()=>{M.then(de)}};var de=()=>{for(var M;M=B();){try{M.h.call(M.g)}catch(H){z(H)}var k=ie;k.j(M),100>k.h&&(k.h++,M.next=k.g,k.g=M)}j=!1};function _e(){this.s=this.s,this.C=this.C}_e.prototype.s=!1,_e.prototype.ma=function(){this.s||(this.s=!0,this.N())},_e.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function ge(M,k){this.type=M,this.g=this.target=k,this.defaultPrevented=!1}ge.prototype.h=function(){this.defaultPrevented=!0};var ce=function(){if(!a.addEventListener||!Object.defineProperty)return!1;var M=!1,k=Object.defineProperty({},"passive",{get:function(){M=!0}});try{const H=()=>{};a.addEventListener("test",H,k),a.removeEventListener("test",H,k)}catch{}return M}();function we(M,k){if(ge.call(this,M?M.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,M){var H=this.type=M.type,Q=M.changedTouches&&M.changedTouches.length?M.changedTouches[0]:null;if(this.target=M.target||M.srcElement,this.g=k,k=M.relatedTarget){if(D){e:{try{S(k.nodeName);var be=!0;break e}catch{}be=!1}be||(k=null)}}else H=="mouseover"?k=M.fromElement:H=="mouseout"&&(k=M.toElement);this.relatedTarget=k,Q?(this.clientX=Q.clientX!==void 0?Q.clientX:Q.pageX,this.clientY=Q.clientY!==void 0?Q.clientY:Q.pageY,this.screenX=Q.screenX||0,this.screenY=Q.screenY||0):(this.clientX=M.clientX!==void 0?M.clientX:M.pageX,this.clientY=M.clientY!==void 0?M.clientY:M.pageY,this.screenX=M.screenX||0,this.screenY=M.screenY||0),this.button=M.button,this.key=M.key||"",this.ctrlKey=M.ctrlKey,this.altKey=M.altKey,this.shiftKey=M.shiftKey,this.metaKey=M.metaKey,this.pointerId=M.pointerId||0,this.pointerType=typeof M.pointerType=="string"?M.pointerType:he[M.pointerType]||"",this.state=M.state,this.i=M,M.defaultPrevented&&we.aa.h.call(this)}}v(we,ge);var he={2:"touch",3:"pen",4:"mouse"};we.prototype.h=function(){we.aa.h.call(this);var M=this.i;M.preventDefault?M.preventDefault():M.returnValue=!1};var Ie="closure_listenable_"+(1e6*Math.random()|0),et=0;function ct(M,k,H,Q,be){this.listener=M,this.proxy=null,this.src=k,this.type=H,this.capture=!!Q,this.ha=be,this.key=++et,this.da=this.fa=!1}function it(M){M.da=!0,M.listener=null,M.proxy=null,M.src=null,M.ha=null}function ut(M){this.src=M,this.g={},this.h=0}ut.prototype.add=function(M,k,H,Q,be){var ke=M.toString();M=this.g[ke],M||(M=this.g[ke]=[],this.h++);var wt=Ce(M,k,Q,be);return-1>>0);function He(M){return typeof M=="function"?M:(M[De]||(M[De]=function(k){return M.handleEvent(k)}),M[De])}function pt(){_e.call(this),this.i=new ut(this),this.M=this,this.F=null}v(pt,_e),pt.prototype[Ie]=!0,pt.prototype.removeEventListener=function(M,k,H,Q){yt(this,M,k,H,Q)};function Qe(M,k){var H,Q=M.F;if(Q)for(H=[];Q;Q=Q.F)H.push(Q);if(M=M.M,Q=k.type||k,typeof k=="string")k=new ge(k,M);else if(k instanceof ge)k.target=k.target||M;else{var be=k;k=new ge(Q,M),L(k,be)}if(be=!0,H)for(var ke=H.length-1;0<=ke;ke--){var wt=k.g=H[ke];be=Ye(wt,Q,!0,k)&&be}if(wt=k.g=M,be=Ye(wt,Q,!0,k)&&be,be=Ye(wt,Q,!1,k)&&be,H)for(ke=0;ke{M.g=null,M.i&&(M.i=!1,nt(M))},M.l);const k=M.h;M.h=null,M.m.apply(null,k)}class _t extends _e{constructor(k,H){super(),this.m=k,this.l=H,this.h=null,this.i=!1,this.g=null}j(k){this.h=arguments,this.g?this.i=!0:nt(this)}N(){super.N(),this.g&&(a.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Qt(M){_e.call(this),this.h=M,this.g={}}v(Qt,_e);var We=[];function Ze(M){T(M.g,function(k,H){this.g.hasOwnProperty(H)&&re(k)},M),M.g={}}Qt.prototype.N=function(){Qt.aa.N.call(this),Ze(this)},Qt.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Tt=a.JSON.stringify,Ft=a.JSON.parse,en=class{stringify(M){return a.JSON.stringify(M,void 0)}parse(M){return a.JSON.parse(M,void 0)}};function pe(){}pe.prototype.h=null;function st(M){return M.h||(M.h=M.i())}function fe(){}var Pe={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function rt(){ge.call(this,"d")}v(rt,ge);function It(){ge.call(this,"c")}v(It,ge);var Le={},At=null;function Jt(){return At=At||new pt}Le.La="serverreachability";function rn(M){ge.call(this,Le.La,M)}v(rn,ge);function Jn(M){const k=Jt();Qe(k,new rn(k))}Le.STAT_EVENT="statevent";function jn(M,k){ge.call(this,Le.STAT_EVENT,M),this.stat=k}v(jn,ge);function vn(M){const k=Jt();Qe(k,new jn(k,M))}Le.Ma="timingevent";function ue(M,k){ge.call(this,Le.Ma,M),this.size=k}v(ue,ge);function me(M,k){if(typeof M!="function")throw Error("Fn must not be null and must be a function");return a.setTimeout(function(){M()},k)}function Se(){this.g=!0}Se.prototype.xa=function(){this.g=!1};function Ge(M,k,H,Q,be,ke){M.info(function(){if(M.g)if(ke)for(var wt="",Hn=ke.split("&"),ai=0;aiQ.length)){var be=Q[1];if(Array.isArray(be)&&!(1>be.length)){var ke=be[0];if(ke!="noop"&&ke!="stop"&&ke!="close")for(var wt=1;wtsr)&&(sr!=3||this.g&&(this.h.h||this.g.oa()||qu(this.g)))){this.J||sr!=4||k==7||(k==8||0>=ci?Jn(3):Jn(2)),Ve(this);var H=this.g.Z();this.X=H;t:if(xe(this)){var Q=qu(this.g);M="";var be=Q.length,ke=Yr(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){ft(this),$e(this);var wt="";break t}this.h.i=new a.TextDecoder}for(k=0;kk.length?se:(k=k.slice(Q,Q+H),M.C=Q+H,k)))}U.prototype.cancel=function(){this.J=!0,ft(this)};function Ae(M){M.S=Date.now()+M.I,ht(M,M.I)}function ht(M,k){if(M.B!=null)throw Error("WatchDog timer not null");M.B=me(h(M.ba,M),k)}function Ve(M){M.B&&(a.clearTimeout(M.B),M.B=null)}U.prototype.ba=function(){this.B=null;const M=Date.now();0<=M-this.S?(ot(this.i,this.A),this.L!=2&&(Jn(),vn(17)),ft(this),this.s=2,$e(this)):ht(this,this.S-M)};function $e(M){M.j.G==0||M.J||Km(M.j,M)}function ft(M){Ve(M);var k=M.M;k&&typeof k.ma=="function"&&k.ma(),M.M=null,Ze(M.U),M.g&&(k=M.g,M.g=null,k.abort(),k.ma())}function Mt(M,k){try{var H=M.j;if(H.G!=0&&(H.g==M||kt(H.h,M))){if(!M.K&&kt(H.h,M)&&H.G==3){try{var Q=H.Da.g.parse(k)}catch{Q=null}if(Array.isArray(Q)&&Q.length==3){var be=Q;if(be[0]==0){e:if(!H.u){if(H.g)if(H.g.F+3e3be[2]&&H.F&&H.v==0&&!H.C&&(H.C=me(h(H.Za,H),6e3));if(1>=Oe(H.h)&&H.ca){try{H.ca()}catch{}H.ca=void 0}}else Va(H,11)}else if((M.K||H.g==M)&&Al(H),!_(k))for(be=H.Da.g.parse(k),k=0;k=M.j:!1}function Oe(M){return M.h?1:M.g?M.g.size:0}function kt(M,k){return M.h?M.h==k:M.g?M.g.has(k):!1}function Pt(M,k){M.g?M.g.add(k):M.h=k}function Ut(M,k){M.h&&M.h==k?M.h=null:M.g&&M.g.has(k)&&M.g.delete(k)}St.prototype.cancel=function(){if(this.i=yn(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const M of this.g.values())M.cancel();this.g.clear()}};function yn(M){if(M.h!=null)return M.i.concat(M.h.D);if(M.g!=null&&M.g.size!==0){let k=M.i;for(const H of M.g.values())k=k.concat(H.D);return k}return w(M.i)}function Tn(M){if(M.V&&typeof M.V=="function")return M.V();if(typeof Map<"u"&&M instanceof Map||typeof Set<"u"&&M instanceof Set)return Array.from(M.values());if(typeof M=="string")return M.split("");if(l(M)){for(var k=[],H=M.length,Q=0;Qk)throw Error("Bad port number "+k);M.s=k}else M.s=null}function Ri(M,k,H){k instanceof Qu?(M.i=k,LS(M.i,M.h)):(H||(k=ma(k,Jm)),M.i=new Qu(k,M.h))}function kn(M,k,H){M.i.set(k,H)}function bl(M){return kn(M,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),M}function Ga(M,k){return M?k?decodeURI(M.replace(/%25/g,"%2525")):decodeURIComponent(M):""}function ma(M,k,H){return typeof M=="string"?(M=encodeURI(M).replace(k,Kd),H&&(M=M.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),M):null}function Kd(M){return M=M.charCodeAt(0),"%"+(M>>4&15).toString(16)+(M&15).toString(16)}var qv=/[#\/\?@]/g,IS=/[#\?:]/g,$m=/[#\?]/g,Jm=/[#\?@]/g,Yu=/#/g;function Qu(M,k){this.h=this.g=null,this.i=M||null,this.j=!!k}function No(M){M.g||(M.g=new Map,M.h=0,M.i&&dr(M.i,function(k,H){M.add(decodeURIComponent(k.replace(/\+/g," ")),H)}))}t=Qu.prototype,t.add=function(M,k){No(this),this.i=null,M=Sl(this,M);var H=this.g.get(M);return H||this.g.set(M,H=[]),H.push(k),this.h+=1,this};function zn(M,k){No(M),k=Sl(M,k),M.g.has(k)&&(M.i=null,M.h-=M.g.get(k).length,M.g.delete(k))}function Ym(M,k){return No(M),k=Sl(M,k),M.g.has(k)}t.forEach=function(M,k){No(this),this.g.forEach(function(H,Q){H.forEach(function(be){M.call(k,be,Q,this)},this)},this)},t.na=function(){No(this);const M=Array.from(this.g.values()),k=Array.from(this.g.keys()),H=[];for(let Q=0;Q{Q.abort(),ko(H,"TestPingServer: timeout",!1,k)},1e4);fetch(M,{signal:Q.signal}).then(ke=>{clearTimeout(be),ke.ok?ko(H,"TestPingServer: ok",!0,k):ko(H,"TestPingServer: server error",!1,k)}).catch(()=>{clearTimeout(be),ko(H,"TestPingServer: error",!1,k)})}function ko(M,k,H,Q,be){try{be&&(be.onload=null,be.onerror=null,be.onabort=null,be.ontimeout=null),Q(H)}catch{}}function PS(){this.g=new en}function Qm(M,k,H){const Q=H||"";try{cn(M,function(be,ke){let wt=be;c(be)&&(wt=Tt(be)),k.push(Q+ke+"="+encodeURIComponent(wt))})}catch(be){throw k.push(Q+"type="+encodeURIComponent("_badmap")),be}}function Xu(M){this.l=M.Ub||null,this.j=M.eb||!1}v(Xu,pe),Xu.prototype.g=function(){return new Cl(this.l,this.j)},Xu.prototype.i=function(M){return function(){return M}}({});function Cl(M,k){pt.call(this),this.D=M,this.o=k,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.u=new Headers,this.h=null,this.B="GET",this.A="",this.g=!1,this.v=this.j=this.l=null}v(Cl,pt),t=Cl.prototype,t.open=function(M,k){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.B=M,this.A=k,this.readyState=1,Zu(this)},t.send=function(M){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const k={headers:this.u,method:this.B,credentials:this.m,cache:void 0};M&&(k.body=M),(this.D||a).fetch(new Request(this.A,k)).then(this.Sa.bind(this),this.ga.bind(this))},t.abort=function(){this.response=this.responseText="",this.u=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,Ku(this)),this.readyState=0},t.Sa=function(M){if(this.g&&(this.l=M,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=M.headers,this.readyState=2,Zu(this)),this.g&&(this.readyState=3,Zu(this),this.g)))if(this.responseType==="arraybuffer")M.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof a.ReadableStream<"u"&&"body"in M){if(this.j=M.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;eo(this)}else M.text().then(this.Ra.bind(this),this.ga.bind(this))};function eo(M){M.j.read().then(M.Pa.bind(M)).catch(M.ga.bind(M))}t.Pa=function(M){if(this.g){if(this.o&&M.value)this.response.push(M.value);else if(!this.o){var k=M.value?M.value:new Uint8Array(0);(k=this.v.decode(k,{stream:!M.done}))&&(this.response=this.responseText+=k)}M.done?Ku(this):Zu(this),this.readyState==3&&eo(this)}},t.Ra=function(M){this.g&&(this.response=this.responseText=M,Ku(this))},t.Qa=function(M){this.g&&(this.response=M,Ku(this))},t.ga=function(){this.g&&Ku(this)};function Ku(M){M.readyState=4,M.l=null,M.j=null,M.v=null,Zu(M)}t.setRequestHeader=function(M,k){this.u.append(M,k)},t.getResponseHeader=function(M){return this.h&&this.h.get(M.toLowerCase())||""},t.getAllResponseHeaders=function(){if(!this.h)return"";const M=[],k=this.h.entries();for(var H=k.next();!H.done;)H=H.value,M.push(H[0]+": "+H[1]),H=k.next();return M.join(`\r +`)};function Zu(M){M.onreadystatechange&&M.onreadystatechange.call(M)}Object.defineProperty(Cl.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(M){this.m=M?"include":"same-origin"}});function to(M){let k="";return T(M,function(H,Q){k+=Q,k+=":",k+=H,k+=`\r +`}),k}function no(M,k,H){e:{for(Q in H){var Q=!1;break e}Q=!0}Q||(H=to(H),typeof M=="string"?H!=null&&encodeURIComponent(String(H)):kn(M,k,H))}function hr(M){pt.call(this),this.headers=new Map,this.o=M||null,this.h=!1,this.v=this.g=null,this.D="",this.m=0,this.l="",this.j=this.B=this.u=this.A=!1,this.I=null,this.H="",this.J=!1}v(hr,pt);var Xm=/^https?$/i,ey=["POST","PUT"];t=hr.prototype,t.Ha=function(M){this.J=M},t.ea=function(M,k,H,Q){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+M);k=k?k.toUpperCase():"GET",this.D=M,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():W.g(),this.v=this.o?st(this.o):st(W),this.g.onreadystatechange=h(this.Ea,this);try{this.B=!0,this.g.open(k,String(M),!0),this.B=!1}catch(ke){ty(this,ke);return}if(M=H||"",H=new Map(this.headers),Q)if(Object.getPrototypeOf(Q)===Object.prototype)for(var be in Q)H.set(be,Q[be]);else if(typeof Q.keys=="function"&&typeof Q.get=="function")for(const ke of Q.keys())H.set(ke,Q.get(ke));else throw Error("Unknown input type for opt_headers: "+String(Q));Q=Array.from(H.keys()).find(ke=>ke.toLowerCase()=="content-type"),be=a.FormData&&M instanceof a.FormData,!(0<=Array.prototype.indexOf.call(ey,k,void 0))||Q||be||H.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[ke,wt]of H)this.g.setRequestHeader(ke,wt);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{ry(this),this.u=!0,this.g.send(M),this.u=!1}catch(ke){ty(this,ke)}};function ty(M,k){M.h=!1,M.g&&(M.j=!0,M.g.abort(),M.j=!1),M.l=k,M.m=5,ro(M),El(M)}function ro(M){M.A||(M.A=!0,Qe(M,"complete"),Qe(M,"error"))}t.abort=function(M){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=M||7,Qe(this,"complete"),Qe(this,"abort"),El(this))},t.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),El(this,!0)),hr.aa.N.call(this)},t.Ea=function(){this.s||(this.B||this.u||this.j?ny(this):this.bb())},t.bb=function(){ny(this)};function ny(M){if(M.h&&typeof o<"u"&&(!M.v[1]||Yr(M)!=4||M.Z()!=2)){if(M.u&&Yr(M)==4)Ke(M.Ea,0,M);else if(Qe(M,"readystatechange"),Yr(M)==4){M.h=!1;try{const wt=M.Z();e:switch(wt){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var k=!0;break e;default:k=!1}var H;if(!(H=k)){var Q;if(Q=wt===0){var be=String(M.D).match(ln)[1]||null;!be&&a.self&&a.self.location&&(be=a.self.location.protocol.slice(0,-1)),Q=!Xm.test(be?be.toLowerCase():"")}H=Q}if(H)Qe(M,"complete"),Qe(M,"success");else{M.m=6;try{var ke=2{}:null;M.g=null,M.v=null,k||Qe(M,"ready");try{H.onreadystatechange=Q}catch{}}}function ry(M){M.I&&(a.clearTimeout(M.I),M.I=null)}t.isActive=function(){return!!this.g};function Yr(M){return M.g?M.g.readyState:0}t.Z=function(){try{return 2=M.h.j-(M.s?1:0)?!1:M.s?(M.i=k.D.concat(M.i),!0):M.G==1||M.G==2||M.B>=(M.Va?0:M.Wa)?!1:(M.s=me(h(M.Ga,M,k),nf(M,M.B)),M.B++,!0)}t.Ga=function(M){if(this.s)if(this.s=null,this.G==1){if(!M){this.U=Math.floor(1e5*Math.random()),M=this.U++;const be=new U(this,this.j,M);let ke=this.o;if(this.S&&(ke?(ke=R(ke),L(ke,this.S)):ke=this.S),this.m!==null||this.O||(be.H=ke,ke=null),this.P)e:{for(var k=0,H=0;HBn)ke=Math.max(0,be[ai].g-100),Hn=!1;else try{Qm(li,wt,"req"+Bn+"_")}catch{Q&&Q(li)}}if(Hn){Q=wt.join("&");break e}}}return M=M.i.splice(0,H),k.D=M,Q}function nh(M){if(!M.g&&!M.u){M.Y=1;var k=M.Fa;le||ne(),j||(le(),j=!0),q.add(k,M),M.v=0}}function rh(M){return M.g||M.u||3<=M.v?!1:(M.Y++,M.u=me(h(M.Fa,M),nf(M,M.v)),M.v++,!0)}t.Fa=function(){if(this.u=null,va(this),this.ba&&!(this.M||this.g==null||0>=this.R)){var M=2*this.R;this.j.info("BP detection timer enabled: "+M),this.A=me(h(this.ab,this),M)}},t.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,vn(10),tf(this),va(this))};function io(M){M.A!=null&&(a.clearTimeout(M.A),M.A=null)}function va(M){M.g=new U(M,M.j,"rpc",M.Y),M.m===null&&(M.g.H=M.o),M.g.O=0;var k=on(M.qa);kn(k,"RID","rpc"),kn(k,"SID",M.K),kn(k,"AID",M.T),kn(k,"CI",M.F?"0":"1"),!M.F&&M.ja&&kn(k,"TO",M.ja),kn(k,"TYPE","xmlhttp"),ts(M,k),M.m&&M.o&&no(k,M.m,M.o),M.L&&(M.g.I=M.L);var H=M.g;M=M.ia,H.L=1,H.v=bl(on(k)),H.m=null,H.P=!0,ve(H,M)}t.Za=function(){this.C!=null&&(this.C=null,tf(this),rh(this),vn(19))};function Al(M){M.C!=null&&(a.clearTimeout(M.C),M.C=null)}function Km(M,k){var H=null;if(M.g==k){Al(M),io(M),M.g=null;var Q=2}else if(kt(M.h,k))H=k.D,Ut(M.h,k),Q=1;else return;if(M.G!=0){if(k.o)if(Q==1){H=k.m?k.m.length:0,k=Date.now()-k.F;var be=M.B;Q=Jt(),Qe(Q,new ue(Q,H)),yc(M)}else nh(M);else if(be=k.s,be==3||be==0&&0`${this.name}: [code=${this.code}]: ${this.message}`}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ec{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class iH{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class Rde{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable(()=>n(ps.UNAUTHENTICATED))}shutdown(){}}class Pde{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,n){this.changeListener=n,e.enqueueRetryable(()=>n(this.token.user))}shutdown(){this.changeListener=null}}class Dde{constructor(e){this.t=e,this.currentUser=ps.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){let r=this.i;const i=l=>this.i!==r?(r=this.i,n(l)):Promise.resolve();let s=new ec;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new ec,e.enqueueRetryable(()=>i(this.currentUser))};const o=()=>{const l=s;e.enqueueRetryable(async()=>{await l.promise,await i(this.currentUser)})},a=l=>{Wt("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=l,this.auth.addAuthTokenListener(this.o),o()};this.t.onInit(l=>a(l)),setTimeout(()=>{if(!this.auth){const l=this.t.getImmediate({optional:!0});l?a(l):(Wt("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new ec)}},0),o()}getToken(){const e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(r=>this.i!==e?(Wt("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(Mr(typeof r.accessToken=="string"),new iH(r.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const e=this.auth&&this.auth.getUid();return Mr(e===null||typeof e=="string"),new ps(e)}}class Nde{constructor(e,n,r){this.l=e,this.h=n,this.P=r,this.type="FirstParty",this.user=ps.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const e=this.T();return e&&this.I.set("Authorization",e),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class kde{constructor(e,n,r){this.l=e,this.h=n,this.P=r}getToken(){return Promise.resolve(new Nde(this.l,this.h,this.P))}start(e,n){e.enqueueRetryable(()=>n(ps.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class Bde{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class Ode{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,n){const r=s=>{s.error!=null&&Wt("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const o=s.token!==this.R;return this.R=s.token,Wt("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?n(s.token):Promise.resolve()};this.o=s=>{e.enqueueRetryable(()=>r(s))};const i=s=>{Wt("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.appCheck.addTokenListener(this.o)};this.A.onInit(s=>i(s)),setTimeout(()=>{if(!this.appCheck){const s=this.A.getImmediate({optional:!0});s?i(s):Wt("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(n=>n?(Mr(typeof n.token=="string"),this.R=n.token,new Bde(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Ude(t){const e=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(n);else for(let r=0;re?1:0}function Kp(t,e,n){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class _i{constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new Rt(Xe.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new Rt(Xe.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<-62135596800)throw new Rt(Xe.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new Rt(Xe.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return _i.fromMillis(Date.now())}static fromDate(e){return _i.fromMillis(e.getTime())}static fromMillis(e){const n=Math.floor(e/1e3),r=Math.floor(1e6*(e-1e3*n));return new _i(n,r)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?ir(this.nanoseconds,e.nanoseconds):ir(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class un{constructor(e){this.timestamp=e}static fromTimestamp(e){return new un(e)}static min(){return new un(new _i(0,0))}static max(){return new un(new _i(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class M1{constructor(e,n,r){n===void 0?n=0:n>e.length&&an(),r===void 0?r=e.length-n:r>e.length-n&&an(),this.segments=e,this.offset=n,this.len=r}get length(){return this.len}isEqual(e){return M1.comparator(this,e)===0}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof M1?e.forEach(r=>{n.push(r)}):n.push(e),this.construct(n)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.lengtho)return 1}return e.lengthn.length?1:0}}class wr extends M1{construct(e,n,r){return new wr(e,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const n=[];for(const r of e){if(r.indexOf("//")>=0)throw new Rt(Xe.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter(i=>i.length>0))}return new wr(n)}static emptyPath(){return new wr([])}}const Fde=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class $i extends M1{construct(e,n,r){return new $i(e,n,r)}static isValidIdentifier(e){return Fde.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),$i.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new $i(["__name__"])}static fromServerFormat(e){const n=[];let r="",i=0;const s=()=>{if(r.length===0)throw new Rt(Xe.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let o=!1;for(;i=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return e!==null&&wr.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return wr.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new Zt(new wr(e.slice()))}}function jde(t,e){const n=t.toTimestamp().seconds,r=t.toTimestamp().nanoseconds+1,i=un.fromTimestamp(r===1e9?new _i(n+1,0):new _i(n,r));return new Mu(i,Zt.empty(),e)}function zde(t){return new Mu(t.readTime,t.key,-1)}class Mu{constructor(e,n,r){this.readTime=e,this.documentKey=n,this.largestBatchId=r}static min(){return new Mu(un.min(),Zt.empty(),-1)}static max(){return new Mu(un.max(),Zt.empty(),-1)}}function Hde(t,e){let n=t.readTime.compareTo(e.readTime);return n!==0?n:(n=Zt.comparator(t.documentKey,e.documentKey),n!==0?n:ir(t.largestBatchId,e.largestBatchId))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Gde="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class Vde{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function vv(t){if(t.code!==Xe.FAILED_PRECONDITION||t.message!==Gde)throw t;Wt("LocalStore","Unexpectedly lost primary lease")}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class dt{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(n=>{this.isDone=!0,this.result=n,this.nextCallback&&this.nextCallback(n)},n=>{this.isDone=!0,this.error=n,this.catchCallback&&this.catchCallback(n)})}catch(e){return this.next(void 0,e)}next(e,n){return this.callbackAttached&&an(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new dt((r,i)=>{this.nextCallback=s=>{this.wrapSuccess(e,s).next(r,i)},this.catchCallback=s=>{this.wrapFailure(n,s).next(r,i)}})}toPromise(){return new Promise((e,n)=>{this.next(e,n)})}wrapUserFunction(e){try{const n=e();return n instanceof dt?n:dt.resolve(n)}catch(n){return dt.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction(()=>e(n)):dt.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction(()=>e(n)):dt.reject(n)}static resolve(e){return new dt((n,r)=>{n(e)})}static reject(e){return new dt((n,r)=>{r(e)})}static waitFor(e){return new dt((n,r)=>{let i=0,s=0,o=!1;e.forEach(a=>{++i,a.next(()=>{++s,o&&s===i&&n()},l=>r(l))}),o=!0,s===i&&n()})}static or(e){let n=dt.resolve(!1);for(const r of e)n=n.next(i=>i?dt.resolve(i):r());return n}static forEach(e,n){const r=[];return e.forEach((i,s)=>{r.push(n.call(this,i,s))}),this.waitFor(r)}static mapArray(e,n){return new dt((r,i)=>{const s=e.length,o=new Array(s);let a=0;for(let l=0;l{o[c]=u,++a,a===s&&r(o)},u=>i(u))}})}static doWhile(e,n){return new dt((r,i)=>{const s=()=>{e()===!0?n().next(()=>{s()},i):r()};s()})}}function Wde(t){const e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)}function yv(t){return t.name==="IndexedDbTransactionError"}/** + * @license + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class n3{constructor(e,n){this.previousValue=e,n&&(n.sequenceNumberHandler=r=>this.ie(r),this.se=r=>n.writeSequenceNumber(r))}ie(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.se&&this.se(e),e}}n3.oe=-1;function g2(t){return t==null}function JM(t){return t===0&&1/t==-1/0}function $de(t){return typeof t=="number"&&Number.isInteger(t)&&!JM(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function _B(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function Od(t,e){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function oH(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Or{constructor(e,n){this.comparator=e,this.root=n||Vi.EMPTY}insert(e,n){return new Or(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,Vi.BLACK,null,null))}remove(e){return new Or(this.comparator,this.root.remove(e,this.comparator).copy(null,null,Vi.BLACK,null,null))}get(e){let n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(r===0)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null}indexOf(e){let n=0,r=this.root;for(;!r.isEmpty();){const i=this.comparator(e,r.key);if(i===0)return n+r.left.size;i<0?r=r.left:(n+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((n,r)=>(e(n,r),!1))}toString(){const e=[];return this.inorderTraversal((n,r)=>(e.push(`${n}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new uw(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new uw(this.root,e,this.comparator,!1)}getReverseIterator(){return new uw(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new uw(this.root,e,this.comparator,!0)}}class uw{constructor(e,n,r,i){this.isReverse=i,this.nodeStack=[];let s=1;for(;!e.isEmpty();)if(s=n?r(e.key,n):1,n&&i&&(s*=-1),s<0)e=this.isReverse?e.left:e.right;else{if(s===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const n={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class Vi{constructor(e,n,r,i,s){this.key=e,this.value=n,this.color=r??Vi.RED,this.left=i??Vi.EMPTY,this.right=s??Vi.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,r,i,s){return new Vi(e??this.key,n??this.value,r??this.color,i??this.left,s??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let i=this;const s=r(e,i.key);return i=s<0?i.copy(null,null,null,i.left.insert(e,n,r),null):s===0?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(e,n,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return Vi.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,n){let r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),n(e,i.key)===0){if(i.right.isEmpty())return Vi.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,Vi.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,Vi.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,n)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw an();const e=this.left.check();if(e!==this.right.check())throw an();return e+(this.isRed()?0:1)}}Vi.EMPTY=null,Vi.RED=!0,Vi.BLACK=!1;Vi.EMPTY=new class{constructor(){this.size=0}get key(){throw an()}get value(){throw an()}get color(){throw an()}get left(){throw an()}get right(){throw an()}copy(e,n,r,i,s){return this}insert(e,n,r){return new Vi(e,n)}remove(e,n){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Yi{constructor(e){this.comparator=e,this.data=new Or(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((n,r)=>(e(n),!1))}forEachInRange(e,n){const r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){const i=r.getNext();if(this.comparator(i.key,e[1])>=0)return;n(i.key)}}forEachWhile(e,n){let r;for(r=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){const n=this.data.getIteratorFrom(e);return n.hasNext()?n.getNext().key:null}getIterator(){return new MB(this.data.getIterator())}getIteratorFrom(e){return new MB(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let n=this;return n.size{n=n.add(r)}),n}isEqual(e){if(!(e instanceof Yi)||this.size!==e.size)return!1;const n=this.data.getIterator(),r=e.data.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(this.comparator(i,s)!==0)return!1}return!0}toArray(){const e=[];return this.forEach(n=>{e.push(n)}),e}toString(){const e=[];return this.forEach(n=>e.push(n)),"SortedSet("+e.toString()+")"}copy(e){const n=new Yi(this.comparator);return n.data=e,n}}class MB{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class wo{constructor(e){this.fields=e,e.sort($i.comparator)}static empty(){return new wo([])}unionWith(e){let n=new Yi($i.comparator);for(const r of this.fields)n=n.add(r);for(const r of e)n=n.add(r);return new wo(n.toArray())}covers(e){for(const n of this.fields)if(n.isPrefixOf(e))return!0;return!1}isEqual(e){return Kp(this.fields,e.fields,(n,r)=>n.isEqual(r))}}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class aH extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ws{constructor(e){this.binaryString=e}static fromBase64String(e){const n=function(i){try{return atob(i)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new aH("Invalid base64 string: "+s):s}}(e);return new ws(n)}static fromUint8Array(e){const n=function(i){let s="";for(let o=0;oehl(n,e))!==void 0}function Zp(t,e){if(t===e)return 0;const n=Sd(t),r=Sd(e);if(n!==r)return ir(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return ir(t.booleanValue,e.booleanValue);case 2:return function(s,o){const a=mi(s.integerValue||s.doubleValue),l=mi(o.integerValue||o.doubleValue);return al?1:a===l?0:isNaN(a)?isNaN(l)?0:-1:1}(t,e);case 3:return xB(t.timestampValue,e.timestampValue);case 4:return xB(x1(t),x1(e));case 5:return ir(t.stringValue,e.stringValue);case 6:return function(s,o){const a=bd(s),l=bd(o);return a.compareTo(l)}(t.bytesValue,e.bytesValue);case 7:return function(s,o){const a=s.split("/"),l=o.split("/");for(let c=0;ce.mapValue.fields[n]=Ng(r)),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=Ng(t.arrayValue.values[n]);return e}return Object.assign({},t)}function Qde(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ws{constructor(e){this.value=e}static empty(){return new Ws({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let n=this.value;for(let r=0;r{if(!n.isImmediateParentOf(a)){const l=this.getFieldsMap(n);this.applyChanges(l,r,i),r={},i=[],n=a.popLast()}o?r[a.lastSegment()]=Ng(o):i.push(a.lastSegment())});const s=this.getFieldsMap(n);this.applyChanges(s,r,i)}delete(e){const n=this.field(e.popLast());V_(n)&&n.mapValue.fields&&delete n.mapValue.fields[e.lastSegment()]}isEqual(e){return hl(this.value,e.value)}getFieldsMap(e){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let r=0;re[i]=s);for(const i of r)delete e[i]}clone(){return new Ws(Ng(this.value))}}function lH(t){const e=[];return Od(t.fields,(n,r)=>{const i=new $i([n]);if(V_(r)){const s=lH(r.mapValue).fields;if(s.length===0)e.push(i);else for(const o of s)e.push(i.child(o))}else e.push(i)}),new wo(e)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class gs{constructor(e,n,r,i,s,o,a){this.key=e,this.documentType=n,this.version=r,this.readTime=i,this.createTime=s,this.data=o,this.documentState=a}static newInvalidDocument(e){return new gs(e,0,un.min(),un.min(),un.min(),Ws.empty(),0)}static newFoundDocument(e,n,r,i){return new gs(e,1,n,un.min(),r,i,0)}static newNoDocument(e,n){return new gs(e,2,n,un.min(),un.min(),Ws.empty(),0)}static newUnknownDocument(e,n){return new gs(e,3,n,un.min(),un.min(),Ws.empty(),2)}convertToFoundDocument(e,n){return!this.createTime.isEqual(un.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=e),this.version=e,this.documentType=1,this.data=n,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=Ws.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=Ws.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=un.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(e){return e instanceof gs&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new gs(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class em{constructor(e,n){this.position=e,this.inclusive=n}}function CB(t,e,n){let r=0;for(let i=0;i":return e>0;case">=":return e>=0;default:return an()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class Ua extends cH{constructor(e,n){super(),this.filters=e,this.op=n,this.ae=null}static create(e,n){return new Ua(e,n)}matches(e){return uH(this)?this.filters.find(n=>!n.matches(e))===void 0:this.filters.find(n=>n.matches(e))!==void 0}getFlattenedFilters(){return this.ae!==null||(this.ae=this.filters.reduce((e,n)=>e.concat(n.getFlattenedFilters()),[])),this.ae}getFilters(){return Object.assign([],this.filters)}}function uH(t){return t.op==="and"}function fH(t){return Kde(t)&&uH(t)}function Kde(t){for(const e of t.filters)if(e instanceof Ua)return!1;return!0}function sI(t){if(t instanceof yi)return t.field.canonicalString()+t.op.toString()+qp(t.value);if(fH(t))return t.filters.map(e=>sI(e)).join(",");{const e=t.filters.map(n=>sI(n)).join(",");return`${t.op}(${e})`}}function dH(t,e){return t instanceof yi?function(r,i){return i instanceof yi&&r.op===i.op&&r.field.isEqual(i.field)&&hl(r.value,i.value)}(t,e):t instanceof Ua?function(r,i){return i instanceof Ua&&r.op===i.op&&r.filters.length===i.filters.length?r.filters.reduce((s,o,a)=>s&&dH(o,i.filters[a]),!0):!1}(t,e):void an()}function hH(t){return t instanceof yi?function(n){return`${n.field.canonicalString()} ${n.op} ${qp(n.value)}`}(t):t instanceof Ua?function(n){return n.op.toString()+" {"+n.getFilters().map(hH).join(" ,")+"}"}(t):"Filter"}class Zde extends yi{constructor(e,n,r){super(e,n,r),this.key=Zt.fromName(r.referenceValue)}matches(e){const n=Zt.comparator(e.key,this.key);return this.matchesComparison(n)}}class qde extends yi{constructor(e,n){super(e,"in",n),this.keys=pH("in",n)}matches(e){return this.keys.some(n=>n.isEqual(e.key))}}class ehe extends yi{constructor(e,n){super(e,"not-in",n),this.keys=pH("not-in",n)}matches(e){return!this.keys.some(n=>n.isEqual(e.key))}}function pH(t,e){var n;return(((n=e.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(r=>Zt.fromName(r.referenceValue))}class the extends yi{constructor(e,n){super(e,"array-contains",n)}matches(e){const n=e.data.field(this.field);return i3(n)&&S1(n.arrayValue,this.value)}}class nhe extends yi{constructor(e,n){super(e,"in",n)}matches(e){const n=e.data.field(this.field);return n!==null&&S1(this.value.arrayValue,n)}}class rhe extends yi{constructor(e,n){super(e,"not-in",n)}matches(e){if(S1(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=e.data.field(this.field);return n!==null&&!S1(this.value.arrayValue,n)}}class ihe extends yi{constructor(e,n){super(e,"array-contains-any",n)}matches(e){const n=e.data.field(this.field);return!(!i3(n)||!n.arrayValue.values)&&n.arrayValue.values.some(r=>S1(this.value.arrayValue,r))}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class she{constructor(e,n=null,r=[],i=[],s=null,o=null,a=null){this.path=e,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=s,this.startAt=o,this.endAt=a,this.ue=null}}function AB(t,e=null,n=[],r=[],i=null,s=null,o=null){return new she(t,e,n,r,i,s,o)}function s3(t){const e=pn(t);if(e.ue===null){let n=e.path.canonicalString();e.collectionGroup!==null&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map(r=>sI(r)).join(","),n+="|ob:",n+=e.orderBy.map(r=>function(s){return s.field.canonicalString()+s.dir}(r)).join(","),g2(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map(r=>qp(r)).join(",")),e.endAt&&(n+="|ub:",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map(r=>qp(r)).join(",")),e.ue=n}return e.ue}function o3(t,e){if(t.limit!==e.limit||t.orderBy.length!==e.orderBy.length)return!1;for(let n=0;n0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(o){let a=new Yi($i.comparator);return o.filters.forEach(l=>{l.getFlattenedFilters().forEach(c=>{c.isInequality()&&(a=a.add(c.field))})}),a})(e).forEach(s=>{n.has(s.canonicalString())||s.isKeyField()||e.ce.push(new C1(s,r))}),n.has($i.keyField().canonicalString())||e.ce.push(new C1($i.keyField(),r))}return e.ce}function al(t){const e=pn(t);return e.le||(e.le=ahe(e,Ap(t))),e.le}function ahe(t,e){if(t.limitType==="F")return AB(t.path,t.collectionGroup,e,t.filters,t.limit,t.startAt,t.endAt);{e=e.map(i=>{const s=i.dir==="desc"?"asc":"desc";return new C1(i.field,s)});const n=t.endAt?new em(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new em(t.startAt.position,t.startAt.inclusive):null;return AB(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}}function aI(t,e){const n=t.filters.concat([e]);return new Ud(t.path,t.collectionGroup,t.explicitOrderBy.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}function QM(t,e,n){return new Ud(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function w2(t,e){return o3(al(t),al(e))&&t.limitType===e.limitType}function mH(t){return`${s3(al(t))}|lt:${t.limitType}`}function Jh(t){return`Query(target=${function(n){let r=n.path.canonicalString();return n.collectionGroup!==null&&(r+=" collectionGroup="+n.collectionGroup),n.filters.length>0&&(r+=`, filters: [${n.filters.map(i=>hH(i)).join(", ")}]`),g2(n.limit)||(r+=", limit: "+n.limit),n.orderBy.length>0&&(r+=`, orderBy: [${n.orderBy.map(i=>function(o){return`${o.field.canonicalString()} (${o.dir})`}(i)).join(", ")}]`),n.startAt&&(r+=", startAt: ",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map(i=>qp(i)).join(",")),n.endAt&&(r+=", endAt: ",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map(i=>qp(i)).join(",")),`Target(${r})`}(al(t))}; limitType=${t.limitType})`}function _2(t,e){return e.isFoundDocument()&&function(r,i){const s=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(s):Zt.isDocumentKey(r.path)?r.path.isEqual(s):r.path.isImmediateParentOf(s)}(t,e)&&function(r,i){for(const s of Ap(r))if(!s.field.isKeyField()&&i.data.field(s.field)===null)return!1;return!0}(t,e)&&function(r,i){for(const s of r.filters)if(!s.matches(i))return!1;return!0}(t,e)&&function(r,i){return!(r.startAt&&!function(o,a,l){const c=CB(o,a,l);return o.inclusive?c<=0:c<0}(r.startAt,Ap(r),i)||r.endAt&&!function(o,a,l){const c=CB(o,a,l);return o.inclusive?c>=0:c>0}(r.endAt,Ap(r),i))}(t,e)}function lhe(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function gH(t){return(e,n)=>{let r=!1;for(const i of Ap(t)){const s=che(i,e,n);if(s!==0)return s;r=r||i.field.isKeyField()}return 0}}function che(t,e,n){const r=t.field.isKeyField()?Zt.comparator(e.key,n.key):function(s,o,a){const l=o.data.field(s),c=a.data.field(s);return l!==null&&c!==null?Zp(l,c):an()}(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return an()}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Pm{constructor(e,n){this.mapKeyFn=e,this.equalsFn=n,this.inner={},this.innerSize=0}get(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r!==void 0){for(const[i,s]of r)if(this.equalsFn(i,e))return s}}has(e){return this.get(e)!==void 0}set(e,n){const r=this.mapKeyFn(e),i=this.inner[r];if(i===void 0)return this.inner[r]=[[e,n]],void this.innerSize++;for(let s=0;s{for(const[i,s]of r)e(i,s)})}isEmpty(){return oH(this.inner)}size(){return this.innerSize}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const uhe=new Or(Zt.comparator);function fc(){return uhe}const vH=new Or(Zt.comparator);function dg(...t){let e=vH;for(const n of t)e=e.insert(n.key,n);return e}function yH(t){let e=vH;return t.forEach((n,r)=>e=e.insert(n,r.overlayedDocument)),e}function Wf(){return kg()}function wH(){return kg()}function kg(){return new Pm(t=>t.toString(),(t,e)=>t.isEqual(e))}const fhe=new Or(Zt.comparator),dhe=new Yi(Zt.comparator);function Un(...t){let e=dhe;for(const n of t)e=e.add(n);return e}const hhe=new Yi(ir);function phe(){return hhe}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function _H(t,e){if(t.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:JM(e)?"-0":e}}function MH(t){return{integerValue:""+t}}function mhe(t,e){return $de(e)?MH(e):_H(t,e)}/** + * @license + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class M2{constructor(){this._=void 0}}function ghe(t,e,n){return t instanceof XM?function(i,s){const o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return s&&v2(s)&&(s=r3(s)),s&&(o.fields.__previous_value__=s),{mapValue:o}}(n,e):t instanceof tm?bH(t,e):t instanceof nm?SH(t,e):function(i,s){const o=xH(i,s),a=IB(o)+IB(i.Pe);return iI(o)&&iI(i.Pe)?MH(a):_H(i.serializer,a)}(t,e)}function vhe(t,e,n){return t instanceof tm?bH(t,e):t instanceof nm?SH(t,e):n}function xH(t,e){return t instanceof KM?function(r){return iI(r)||function(s){return!!s&&"doubleValue"in s}(r)}(e)?e:{integerValue:0}:null}class XM extends M2{}class tm extends M2{constructor(e){super(),this.elements=e}}function bH(t,e){const n=CH(e);for(const r of t.elements)n.some(i=>hl(i,r))||n.push(r);return{arrayValue:{values:n}}}class nm extends M2{constructor(e){super(),this.elements=e}}function SH(t,e){let n=CH(e);for(const r of t.elements)n=n.filter(i=>!hl(i,r));return{arrayValue:{values:n}}}class KM extends M2{constructor(e,n){super(),this.serializer=e,this.Pe=n}}function IB(t){return mi(t.integerValue||t.doubleValue)}function CH(t){return i3(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class EH{constructor(e,n){this.field=e,this.transform=n}}function yhe(t,e){return t.field.isEqual(e.field)&&function(r,i){return r instanceof tm&&i instanceof tm||r instanceof nm&&i instanceof nm?Kp(r.elements,i.elements,hl):r instanceof KM&&i instanceof KM?hl(r.Pe,i.Pe):r instanceof XM&&i instanceof XM}(t.transform,e.transform)}class whe{constructor(e,n){this.version=e,this.transformResults=n}}class Ns{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new Ns}static exists(e){return new Ns(void 0,e)}static updateTime(e){return new Ns(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function W_(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class x2{}function AH(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new b2(t.key,Ns.none()):new wv(t.key,t.data,Ns.none());{const n=t.data,r=Ws.empty();let i=new Yi($i.comparator);for(let s of e.fields)if(!i.has(s)){let o=n.field(s);o===null&&s.length>1&&(s=s.popLast(),o=n.field(s)),o===null?r.delete(s):r.set(s,o),i=i.add(s)}return new zu(t.key,r,new wo(i.toArray()),Ns.none())}}function _he(t,e,n){t instanceof wv?function(i,s,o){const a=i.value.clone(),l=RB(i.fieldTransforms,s,o.transformResults);a.setAll(l),s.convertToFoundDocument(o.version,a).setHasCommittedMutations()}(t,e,n):t instanceof zu?function(i,s,o){if(!W_(i.precondition,s))return void s.convertToUnknownDocument(o.version);const a=RB(i.fieldTransforms,s,o.transformResults),l=s.data;l.setAll(TH(i)),l.setAll(a),s.convertToFoundDocument(o.version,l).setHasCommittedMutations()}(t,e,n):function(i,s,o){s.convertToNoDocument(o.version).setHasCommittedMutations()}(0,e,n)}function Bg(t,e,n,r){return t instanceof wv?function(s,o,a,l){if(!W_(s.precondition,o))return a;const c=s.value.clone(),u=PB(s.fieldTransforms,l,o);return c.setAll(u),o.convertToFoundDocument(o.version,c).setHasLocalMutations(),null}(t,e,n,r):t instanceof zu?function(s,o,a,l){if(!W_(s.precondition,o))return a;const c=PB(s.fieldTransforms,l,o),u=o.data;return u.setAll(TH(s)),u.setAll(c),o.convertToFoundDocument(o.version,u).setHasLocalMutations(),a===null?null:a.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map(f=>f.field))}(t,e,n,r):function(s,o,a){return W_(s.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):a}(t,e,n)}function Mhe(t,e){let n=null;for(const r of t.fieldTransforms){const i=e.data.field(r.field),s=xH(r.transform,i||null);s!=null&&(n===null&&(n=Ws.empty()),n.set(r.field,s))}return n||null}function LB(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(r,i){return r===void 0&&i===void 0||!(!r||!i)&&Kp(r,i,(s,o)=>yhe(s,o))}(t.fieldTransforms,e.fieldTransforms)&&(t.type===0?t.value.isEqual(e.value):t.type!==1||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}class wv extends x2{constructor(e,n,r,i=[]){super(),this.key=e,this.value=n,this.precondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class zu extends x2{constructor(e,n,r,i,s=[]){super(),this.key=e,this.data=n,this.fieldMask=r,this.precondition=i,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function TH(t){const e=new Map;return t.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){const r=t.data.field(n);e.set(n,r)}}),e}function RB(t,e,n){const r=new Map;Mr(t.length===n.length);for(let i=0;i{const s=e.get(i.key),o=s.overlayedDocument;let a=this.applyToLocalView(o,s.mutatedFields);a=n.has(i.key)?null:a;const l=AH(o,a);l!==null&&r.set(i.key,l),o.isValidDocument()||o.convertToNoDocument(un.min())}),r}keys(){return this.mutations.reduce((e,n)=>e.add(n.key),Un())}isEqual(e){return this.batchId===e.batchId&&Kp(this.mutations,e.mutations,(n,r)=>LB(n,r))&&Kp(this.baseMutations,e.baseMutations,(n,r)=>LB(n,r))}}class l3{constructor(e,n,r,i){this.batch=e,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}static from(e,n,r){Mr(e.mutations.length===r.length);let i=function(){return fhe}();const s=e.mutations;for(let o=0;o=8)throw new hg(`Invalid padding: ${n}`);if(r<0)throw new hg(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new hg(`Invalid hash count: ${r}`);if(e.length===0&&n!==0)throw new hg(`Invalid padding when bitmap length is 0: ${n}`);this.Ie=8*e.length-n,this.Te=nd.fromNumber(this.Ie)}Ee(e,n,r){let i=e.add(n.multiply(nd.fromNumber(r)));return i.compare(The)===1&&(i=new nd([i.getBits(0),i.getBits(1)],0)),i.modulo(this.Te).toNumber()}de(e){return(this.bitmap[Math.floor(e/8)]&1<o.insert(a)),o}insert(e){if(this.Ie===0)return;const n=DB(e),[r,i]=NB(n);for(let s=0;s0&&(this.we=!0,this.pe=e)}Ce(){let e=Un(),n=Un(),r=Un();return this.ge.forEach((i,s)=>{switch(s){case 0:e=e.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:an()}}),new _v(this.pe,this.ye,e,n,r)}ve(){this.we=!1,this.ge=OB()}Fe(e,n){this.we=!0,this.ge=this.ge.insert(e,n)}Me(e){this.we=!0,this.ge=this.ge.remove(e)}xe(){this.fe+=1}Oe(){this.fe-=1,Mr(this.fe>=0)}Ne(){this.we=!0,this.ye=!0}}class Ihe{constructor(e){this.Le=e,this.Be=new Map,this.ke=fc(),this.qe=BB(),this.Qe=new Or(ir)}Ke(e){for(const n of e.Re)e.Ve&&e.Ve.isFoundDocument()?this.$e(n,e.Ve):this.Ue(n,e.key,e.Ve);for(const n of e.removedTargetIds)this.Ue(n,e.key,e.Ve)}We(e){this.forEachTarget(e,n=>{const r=this.Ge(n);switch(e.state){case 0:this.ze(n)&&r.De(e.resumeToken);break;case 1:r.Oe(),r.Se||r.ve(),r.De(e.resumeToken);break;case 2:r.Oe(),r.Se||this.removeTarget(n);break;case 3:this.ze(n)&&(r.Ne(),r.De(e.resumeToken));break;case 4:this.ze(n)&&(this.je(n),r.De(e.resumeToken));break;default:an()}})}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.Be.forEach((r,i)=>{this.ze(i)&&n(i)})}He(e){const n=e.targetId,r=e.me.count,i=this.Je(n);if(i){const s=i.target;if(oI(s))if(r===0){const o=new Zt(s.path);this.Ue(n,o,gs.newNoDocument(o,un.min()))}else Mr(r===1);else{const o=this.Ye(n);if(o!==r){const a=this.Ze(e),l=a?this.Xe(a,e,o):1;if(l!==0){this.je(n);const c=l===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Qe=this.Qe.insert(n,c)}}}}}Ze(e){const n=e.me.unchangedNames;if(!n||!n.bits)return null;const{bits:{bitmap:r="",padding:i=0},hashCount:s=0}=n;let o,a;try{o=bd(r).toUint8Array()}catch(l){if(l instanceof aH)return Xp("Decoding the base64 bloom filter in existence filter failed ("+l.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw l}try{a=new c3(o,i,s)}catch(l){return Xp(l instanceof hg?"BloomFilter error: ":"Applying bloom filter failed: ",l),null}return a.Ie===0?null:a}Xe(e,n,r){return n.me.count===r-this.nt(e,n.targetId)?0:2}nt(e,n){const r=this.Le.getRemoteKeysForTarget(n);let i=0;return r.forEach(s=>{const o=this.Le.tt(),a=`projects/${o.projectId}/databases/${o.database}/documents/${s.path.canonicalString()}`;e.mightContain(a)||(this.Ue(n,s,null),i++)}),i}rt(e){const n=new Map;this.Be.forEach((s,o)=>{const a=this.Je(o);if(a){if(s.current&&oI(a.target)){const l=new Zt(a.target.path);this.ke.get(l)!==null||this.it(o,l)||this.Ue(o,l,gs.newNoDocument(l,e))}s.be&&(n.set(o,s.Ce()),s.ve())}});let r=Un();this.qe.forEach((s,o)=>{let a=!0;o.forEachWhile(l=>{const c=this.Je(l);return!c||c.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(r=r.add(s))}),this.ke.forEach((s,o)=>o.setReadTime(e));const i=new S2(e,n,this.Qe,this.ke,r);return this.ke=fc(),this.qe=BB(),this.Qe=new Or(ir),i}$e(e,n){if(!this.ze(e))return;const r=this.it(e,n.key)?2:0;this.Ge(e).Fe(n.key,r),this.ke=this.ke.insert(n.key,n),this.qe=this.qe.insert(n.key,this.st(n.key).add(e))}Ue(e,n,r){if(!this.ze(e))return;const i=this.Ge(e);this.it(e,n)?i.Fe(n,1):i.Me(n),this.qe=this.qe.insert(n,this.st(n).delete(e)),r&&(this.ke=this.ke.insert(n,r))}removeTarget(e){this.Be.delete(e)}Ye(e){const n=this.Ge(e).Ce();return this.Le.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}xe(e){this.Ge(e).xe()}Ge(e){let n=this.Be.get(e);return n||(n=new kB,this.Be.set(e,n)),n}st(e){let n=this.qe.get(e);return n||(n=new Yi(ir),this.qe=this.qe.insert(e,n)),n}ze(e){const n=this.Je(e)!==null;return n||Wt("WatchChangeAggregator","Detected inactive target",e),n}Je(e){const n=this.Be.get(e);return n&&n.Se?null:this.Le.ot(e)}je(e){this.Be.set(e,new kB),this.Le.getRemoteKeysForTarget(e).forEach(n=>{this.Ue(e,n,null)})}it(e,n){return this.Le.getRemoteKeysForTarget(e).has(n)}}function BB(){return new Or(Zt.comparator)}function OB(){return new Or(Zt.comparator)}const Lhe={asc:"ASCENDING",desc:"DESCENDING"},Rhe={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},Phe={and:"AND",or:"OR"};class Dhe{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function lI(t,e){return t.useProto3Json||g2(e)?e:{value:e}}function ZM(t,e){return t.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function PH(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function Nhe(t,e){return ZM(t,e.toTimestamp())}function ll(t){return Mr(!!t),un.fromTimestamp(function(n){const r=xu(n);return new _i(r.seconds,r.nanos)}(t))}function u3(t,e){return cI(t,e).canonicalString()}function cI(t,e){const n=function(i){return new wr(["projects",i.projectId,"databases",i.database])}(t).child("documents");return e===void 0?n:n.child(e)}function DH(t){const e=wr.fromString(t);return Mr(UH(e)),e}function uI(t,e){return u3(t.databaseId,e.path)}function yE(t,e){const n=DH(e);if(n.get(1)!==t.databaseId.projectId)throw new Rt(Xe.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new Rt(Xe.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new Zt(kH(n))}function NH(t,e){return u3(t.databaseId,e)}function khe(t){const e=DH(t);return e.length===4?wr.emptyPath():kH(e)}function fI(t){return new wr(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function kH(t){return Mr(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function UB(t,e,n){return{name:uI(t,e),fields:n.value.mapValue.fields}}function Bhe(t,e){let n;if("targetChange"in e){e.targetChange;const r=function(c){return c==="NO_CHANGE"?0:c==="ADD"?1:c==="REMOVE"?2:c==="CURRENT"?3:c==="RESET"?4:an()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],s=function(c,u){return c.useProto3Json?(Mr(u===void 0||typeof u=="string"),ws.fromBase64String(u||"")):(Mr(u===void 0||u instanceof Buffer||u instanceof Uint8Array),ws.fromUint8Array(u||new Uint8Array))}(t,e.targetChange.resumeToken),o=e.targetChange.cause,a=o&&function(c){const u=c.code===void 0?Xe.UNKNOWN:IH(c.code);return new Rt(u,c.message||"")}(o);n=new RH(r,i,s,a||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=yE(t,r.document.name),s=ll(r.document.updateTime),o=r.document.createTime?ll(r.document.createTime):un.min(),a=new Ws({mapValue:{fields:r.document.fields}}),l=gs.newFoundDocument(i,s,o,a),c=r.targetIds||[],u=r.removedTargetIds||[];n=new $_(c,u,l.key,l)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=yE(t,r.document),s=r.readTime?ll(r.readTime):un.min(),o=gs.newNoDocument(i,s),a=r.removedTargetIds||[];n=new $_([],a,o.key,o)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=yE(t,r.document),s=r.removedTargetIds||[];n=new $_([],s,i,null)}else{if(!("filter"in e))return an();{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:s}=r,o=new Che(i,s),a=r.targetId;n=new LH(a,o)}}return n}function Ohe(t,e){let n;if(e instanceof wv)n={update:UB(t,e.key,e.value)};else if(e instanceof b2)n={delete:uI(t,e.key)};else if(e instanceof zu)n={update:UB(t,e.key,e.data),updateMask:$he(e.fieldMask)};else{if(!(e instanceof xhe))return an();n={verify:uI(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map(r=>function(s,o){const a=o.transform;if(a instanceof XM)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof tm)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof nm)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof KM)return{fieldPath:o.field.canonicalString(),increment:a.Pe};throw an()}(0,r))),e.precondition.isNone||(n.currentDocument=function(i,s){return s.updateTime!==void 0?{updateTime:Nhe(i,s.updateTime)}:s.exists!==void 0?{exists:s.exists}:an()}(t,e.precondition)),n}function Uhe(t,e){return t&&t.length>0?(Mr(e!==void 0),t.map(n=>function(i,s){let o=i.updateTime?ll(i.updateTime):ll(s);return o.isEqual(un.min())&&(o=ll(s)),new whe(o,i.transformResults||[])}(n,e))):[]}function Fhe(t,e){return{documents:[NH(t,e.path)]}}function jhe(t,e){const n={structuredQuery:{}},r=e.path;let i;e.collectionGroup!==null?(i=r,n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(i=r.popLast(),n.structuredQuery.from=[{collectionId:r.lastSegment()}]),n.parent=NH(t,i);const s=function(c){if(c.length!==0)return OH(Ua.create(c,"and"))}(e.filters);s&&(n.structuredQuery.where=s);const o=function(c){if(c.length!==0)return c.map(u=>function(h){return{field:Yh(h.field),direction:Ghe(h.dir)}}(u))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);const a=lI(t,e.limit);return a!==null&&(n.structuredQuery.limit=a),e.startAt&&(n.structuredQuery.startAt=function(c){return{before:c.inclusive,values:c.position}}(e.startAt)),e.endAt&&(n.structuredQuery.endAt=function(c){return{before:!c.inclusive,values:c.position}}(e.endAt)),{_t:n,parent:i}}function zhe(t){let e=khe(t.parent);const n=t.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){Mr(r===1);const u=n.from[0];u.allDescendants?i=u.collectionId:e=e.child(u.collectionId)}let s=[];n.where&&(s=function(f){const h=BH(f);return h instanceof Ua&&fH(h)?h.getFilters():[h]}(n.where));let o=[];n.orderBy&&(o=function(f){return f.map(h=>function(v){return new C1(Qh(v.field),function(y){switch(y){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(v.direction))}(h))}(n.orderBy));let a=null;n.limit&&(a=function(f){let h;return h=typeof f=="object"?f.value:f,g2(h)?null:h}(n.limit));let l=null;n.startAt&&(l=function(f){const h=!!f.before,m=f.values||[];return new em(m,h)}(n.startAt));let c=null;return n.endAt&&(c=function(f){const h=!f.before,m=f.values||[];return new em(m,h)}(n.endAt)),ohe(e,i,o,s,a,"F",l,c)}function Hhe(t,e){const n=function(i){switch(i){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return an()}}(e.purpose);return n==null?null:{"goog-listen-tags":n}}function BH(t){return t.unaryFilter!==void 0?function(n){switch(n.unaryFilter.op){case"IS_NAN":const r=Qh(n.unaryFilter.field);return yi.create(r,"==",{doubleValue:NaN});case"IS_NULL":const i=Qh(n.unaryFilter.field);return yi.create(i,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const s=Qh(n.unaryFilter.field);return yi.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=Qh(n.unaryFilter.field);return yi.create(o,"!=",{nullValue:"NULL_VALUE"});default:return an()}}(t):t.fieldFilter!==void 0?function(n){return yi.create(Qh(n.fieldFilter.field),function(i){switch(i){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return an()}}(n.fieldFilter.op),n.fieldFilter.value)}(t):t.compositeFilter!==void 0?function(n){return Ua.create(n.compositeFilter.filters.map(r=>BH(r)),function(i){switch(i){case"AND":return"and";case"OR":return"or";default:return an()}}(n.compositeFilter.op))}(t):an()}function Ghe(t){return Lhe[t]}function Vhe(t){return Rhe[t]}function Whe(t){return Phe[t]}function Yh(t){return{fieldPath:t.canonicalString()}}function Qh(t){return $i.fromServerFormat(t.fieldPath)}function OH(t){return t instanceof yi?function(n){if(n.op==="=="){if(SB(n.value))return{unaryFilter:{field:Yh(n.field),op:"IS_NAN"}};if(bB(n.value))return{unaryFilter:{field:Yh(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(SB(n.value))return{unaryFilter:{field:Yh(n.field),op:"IS_NOT_NAN"}};if(bB(n.value))return{unaryFilter:{field:Yh(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Yh(n.field),op:Vhe(n.op),value:n.value}}}(t):t instanceof Ua?function(n){const r=n.getFilters().map(i=>OH(i));return r.length===1?r[0]:{compositeFilter:{op:Whe(n.op),filters:r}}}(t):an()}function $he(t){const e=[];return t.fields.forEach(n=>e.push(n.canonicalString())),{fieldPaths:e}}function UH(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ru{constructor(e,n,r,i,s=un.min(),o=un.min(),a=ws.EMPTY_BYTE_STRING,l=null){this.target=e,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a,this.expectedCount=l}withSequenceNumber(e){return new ru(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,n){return new ru(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new ru(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new ru(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Jhe{constructor(e){this.ct=e}}function Yhe(t){const e=zhe({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?QM(e,e.limit,"L"):e}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Qhe{constructor(){this._n=new Xhe}addToCollectionParentIndex(e,n){return this._n.add(n),dt.resolve()}getCollectionParents(e,n){return dt.resolve(this._n.getEntries(n))}addFieldIndex(e,n){return dt.resolve()}deleteFieldIndex(e,n){return dt.resolve()}deleteAllFieldIndexes(e){return dt.resolve()}createTargetIndexes(e,n){return dt.resolve()}getDocumentsMatchingTarget(e,n){return dt.resolve(null)}getIndexType(e,n){return dt.resolve(0)}getFieldIndexes(e,n){return dt.resolve([])}getNextCollectionGroupToUpdate(e){return dt.resolve(null)}getMinOffset(e,n){return dt.resolve(Mu.min())}getMinOffsetFromCollectionGroup(e,n){return dt.resolve(Mu.min())}updateCollectionGroup(e,n,r){return dt.resolve()}updateIndexEntries(e,n){return dt.resolve()}}class Xhe{constructor(){this.index={}}add(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n]||new Yi(wr.comparator),s=!i.has(r);return this.index[n]=i.add(r),s}has(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n];return i&&i.has(r)}getEntries(e){return(this.index[e]||new Yi(wr.comparator)).toArray()}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rm{constructor(e){this.On=e}next(){return this.On+=2,this.On}static Nn(){return new rm(0)}static Ln(){return new rm(-1)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Khe{constructor(){this.changes=new Pm(e=>e.toString(),(e,n)=>e.isEqual(n)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,n){this.assertNotApplied(),this.changes.set(e,gs.newInvalidDocument(e).setReadTime(n))}getEntry(e,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?dt.resolve(r):this.getFromCache(e,n)}getEntries(e,n){return this.getAllFromCache(e,n)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Zhe{constructor(e,n){this.overlayedDocument=e,this.mutatedFields=n}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class qhe{constructor(e,n,r,i){this.remoteDocumentCache=e,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}getDocument(e,n){let r=null;return this.documentOverlayCache.getOverlay(e,n).next(i=>(r=i,this.remoteDocumentCache.getEntry(e,n))).next(i=>(r!==null&&Bg(r.mutation,i,wo.empty(),_i.now()),i))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.getLocalViewOfDocuments(e,r,Un()).next(()=>r))}getLocalViewOfDocuments(e,n,r=Un()){const i=Wf();return this.populateOverlays(e,i,n).next(()=>this.computeViews(e,n,i,r).next(s=>{let o=dg();return s.forEach((a,l)=>{o=o.insert(a,l.overlayedDocument)}),o}))}getOverlayedDocuments(e,n){const r=Wf();return this.populateOverlays(e,r,n).next(()=>this.computeViews(e,n,r,Un()))}populateOverlays(e,n,r){const i=[];return r.forEach(s=>{n.has(s)||i.push(s)}),this.documentOverlayCache.getOverlays(e,i).next(s=>{s.forEach((o,a)=>{n.set(o,a)})})}computeViews(e,n,r,i){let s=fc();const o=kg(),a=function(){return kg()}();return n.forEach((l,c)=>{const u=r.get(c.key);i.has(c.key)&&(u===void 0||u.mutation instanceof zu)?s=s.insert(c.key,c):u!==void 0?(o.set(c.key,u.mutation.getFieldMask()),Bg(u.mutation,c,u.mutation.getFieldMask(),_i.now())):o.set(c.key,wo.empty())}),this.recalculateAndSaveOverlays(e,s).next(l=>(l.forEach((c,u)=>o.set(c,u)),n.forEach((c,u)=>{var f;return a.set(c,new Zhe(u,(f=o.get(c))!==null&&f!==void 0?f:null))}),a))}recalculateAndSaveOverlays(e,n){const r=kg();let i=new Or((o,a)=>o-a),s=Un();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next(o=>{for(const a of o)a.keys().forEach(l=>{const c=n.get(l);if(c===null)return;let u=r.get(l)||wo.empty();u=a.applyToLocalView(c,u),r.set(l,u);const f=(i.get(a.batchId)||Un()).add(l);i=i.insert(a.batchId,f)})}).next(()=>{const o=[],a=i.getReverseIterator();for(;a.hasNext();){const l=a.getNext(),c=l.key,u=l.value,f=wH();u.forEach(h=>{if(!s.has(h)){const m=AH(n.get(h),r.get(h));m!==null&&f.set(h,m),s=s.add(h)}}),o.push(this.documentOverlayCache.saveOverlays(e,c,f))}return dt.waitFor(o)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.recalculateAndSaveOverlays(e,r))}getDocumentsMatchingQuery(e,n,r,i){return function(o){return Zt.isDocumentKey(o.path)&&o.collectionGroup===null&&o.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):a3(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,r,i):this.getDocumentsMatchingCollectionQuery(e,n,r,i)}getNextDocuments(e,n,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,r,i).next(s=>{const o=i-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,r.largestBatchId,i-s.size):dt.resolve(Wf());let a=-1,l=s;return o.next(c=>dt.forEach(c,(u,f)=>(a{l=l.insert(u,h)}))).next(()=>this.populateOverlays(e,c,s)).next(()=>this.computeViews(e,l,c,Un())).next(u=>({batchId:a,changes:yH(u)})))})}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new Zt(n)).next(r=>{let i=dg();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i})}getDocumentsMatchingCollectionGroupQuery(e,n,r,i){const s=n.collectionGroup;let o=dg();return this.indexManager.getCollectionParents(e,s).next(a=>dt.forEach(a,l=>{const c=function(f,h){return new Ud(h,null,f.explicitOrderBy.slice(),f.filters.slice(),f.limit,f.limitType,f.startAt,f.endAt)}(n,l.child(s));return this.getDocumentsMatchingCollectionQuery(e,c,r,i).next(u=>{u.forEach((f,h)=>{o=o.insert(f,h)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,n,r,i){let s;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,r.largestBatchId).next(o=>(s=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,r,s,i))).next(o=>{s.forEach((l,c)=>{const u=c.getKey();o.get(u)===null&&(o=o.insert(u,gs.newInvalidDocument(u)))});let a=dg();return o.forEach((l,c)=>{const u=s.get(l);u!==void 0&&Bg(u.mutation,c,wo.empty(),_i.now()),_2(n,c)&&(a=a.insert(l,c))}),a})}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class epe{constructor(e){this.serializer=e,this.cr=new Map,this.lr=new Map}getBundleMetadata(e,n){return dt.resolve(this.cr.get(n))}saveBundleMetadata(e,n){return this.cr.set(n.id,function(i){return{id:i.id,version:i.version,createTime:ll(i.createTime)}}(n)),dt.resolve()}getNamedQuery(e,n){return dt.resolve(this.lr.get(n))}saveNamedQuery(e,n){return this.lr.set(n.name,function(i){return{name:i.name,query:Yhe(i.bundledQuery),readTime:ll(i.readTime)}}(n)),dt.resolve()}}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class tpe{constructor(){this.overlays=new Or(Zt.comparator),this.hr=new Map}getOverlay(e,n){return dt.resolve(this.overlays.get(n))}getOverlays(e,n){const r=Wf();return dt.forEach(n,i=>this.getOverlay(e,i).next(s=>{s!==null&&r.set(i,s)})).next(()=>r)}saveOverlays(e,n,r){return r.forEach((i,s)=>{this.ht(e,n,s)}),dt.resolve()}removeOverlaysForBatchId(e,n,r){const i=this.hr.get(r);return i!==void 0&&(i.forEach(s=>this.overlays=this.overlays.remove(s)),this.hr.delete(r)),dt.resolve()}getOverlaysForCollection(e,n,r){const i=Wf(),s=n.length+1,o=new Zt(n.child("")),a=this.overlays.getIteratorFrom(o);for(;a.hasNext();){const l=a.getNext().value,c=l.getKey();if(!n.isPrefixOf(c.path))break;c.path.length===s&&l.largestBatchId>r&&i.set(l.getKey(),l)}return dt.resolve(i)}getOverlaysForCollectionGroup(e,n,r,i){let s=new Or((c,u)=>c-u);const o=this.overlays.getIterator();for(;o.hasNext();){const c=o.getNext().value;if(c.getKey().getCollectionGroup()===n&&c.largestBatchId>r){let u=s.get(c.largestBatchId);u===null&&(u=Wf(),s=s.insert(c.largestBatchId,u)),u.set(c.getKey(),c)}}const a=Wf(),l=s.getIterator();for(;l.hasNext()&&(l.getNext().value.forEach((c,u)=>a.set(c,u)),!(a.size()>=i)););return dt.resolve(a)}ht(e,n,r){const i=this.overlays.get(r.key);if(i!==null){const o=this.hr.get(i.largestBatchId).delete(r.key);this.hr.set(i.largestBatchId,o)}this.overlays=this.overlays.insert(r.key,new She(n,r));let s=this.hr.get(n);s===void 0&&(s=Un(),this.hr.set(n,s)),this.hr.set(n,s.add(r.key))}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class f3{constructor(){this.Pr=new Yi(ki.Ir),this.Tr=new Yi(ki.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(e,n){const r=new ki(e,n);this.Pr=this.Pr.add(r),this.Tr=this.Tr.add(r)}dr(e,n){e.forEach(r=>this.addReference(r,n))}removeReference(e,n){this.Ar(new ki(e,n))}Rr(e,n){e.forEach(r=>this.removeReference(r,n))}Vr(e){const n=new Zt(new wr([])),r=new ki(n,e),i=new ki(n,e+1),s=[];return this.Tr.forEachInRange([r,i],o=>{this.Ar(o),s.push(o.key)}),s}mr(){this.Pr.forEach(e=>this.Ar(e))}Ar(e){this.Pr=this.Pr.delete(e),this.Tr=this.Tr.delete(e)}gr(e){const n=new Zt(new wr([])),r=new ki(n,e),i=new ki(n,e+1);let s=Un();return this.Tr.forEachInRange([r,i],o=>{s=s.add(o.key)}),s}containsKey(e){const n=new ki(e,0),r=this.Pr.firstAfterOrEqual(n);return r!==null&&e.isEqual(r.key)}}class ki{constructor(e,n){this.key=e,this.pr=n}static Ir(e,n){return Zt.comparator(e.key,n.key)||ir(e.pr,n.pr)}static Er(e,n){return ir(e.pr,n.pr)||Zt.comparator(e.key,n.key)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class npe{constructor(e,n){this.indexManager=e,this.referenceDelegate=n,this.mutationQueue=[],this.yr=1,this.wr=new Yi(ki.Ir)}checkEmpty(e){return dt.resolve(this.mutationQueue.length===0)}addMutationBatch(e,n,r,i){const s=this.yr;this.yr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const o=new bhe(s,n,r,i);this.mutationQueue.push(o);for(const a of i)this.wr=this.wr.add(new ki(a.key,s)),this.indexManager.addToCollectionParentIndex(e,a.key.path.popLast());return dt.resolve(o)}lookupMutationBatch(e,n){return dt.resolve(this.Sr(n))}getNextMutationBatchAfterBatchId(e,n){const r=n+1,i=this.br(r),s=i<0?0:i;return dt.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return dt.resolve(this.mutationQueue.length===0?-1:this.yr-1)}getAllMutationBatches(e){return dt.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,n){const r=new ki(n,0),i=new ki(n,Number.POSITIVE_INFINITY),s=[];return this.wr.forEachInRange([r,i],o=>{const a=this.Sr(o.pr);s.push(a)}),dt.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(e,n){let r=new Yi(ir);return n.forEach(i=>{const s=new ki(i,0),o=new ki(i,Number.POSITIVE_INFINITY);this.wr.forEachInRange([s,o],a=>{r=r.add(a.pr)})}),dt.resolve(this.Dr(r))}getAllMutationBatchesAffectingQuery(e,n){const r=n.path,i=r.length+1;let s=r;Zt.isDocumentKey(s)||(s=s.child(""));const o=new ki(new Zt(s),0);let a=new Yi(ir);return this.wr.forEachWhile(l=>{const c=l.key.path;return!!r.isPrefixOf(c)&&(c.length===i&&(a=a.add(l.pr)),!0)},o),dt.resolve(this.Dr(a))}Dr(e){const n=[];return e.forEach(r=>{const i=this.Sr(r);i!==null&&n.push(i)}),n}removeMutationBatch(e,n){Mr(this.Cr(n.batchId,"removed")===0),this.mutationQueue.shift();let r=this.wr;return dt.forEach(n.mutations,i=>{const s=new ki(i.key,n.batchId);return r=r.delete(s),this.referenceDelegate.markPotentiallyOrphaned(e,i.key)}).next(()=>{this.wr=r})}Mn(e){}containsKey(e,n){const r=new ki(n,0),i=this.wr.firstAfterOrEqual(r);return dt.resolve(n.isEqual(i&&i.key))}performConsistencyCheck(e){return this.mutationQueue.length,dt.resolve()}Cr(e,n){return this.br(e)}br(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Sr(e){const n=this.br(e);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class rpe{constructor(e){this.vr=e,this.docs=function(){return new Or(Zt.comparator)}(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const r=n.key,i=this.docs.get(r),s=i?i.size:0,o=this.vr(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:o}),this.size+=o-s,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const n=this.docs.get(e);n&&(this.docs=this.docs.remove(e),this.size-=n.size)}getEntry(e,n){const r=this.docs.get(n);return dt.resolve(r?r.document.mutableCopy():gs.newInvalidDocument(n))}getEntries(e,n){let r=fc();return n.forEach(i=>{const s=this.docs.get(i);r=r.insert(i,s?s.document.mutableCopy():gs.newInvalidDocument(i))}),dt.resolve(r)}getDocumentsMatchingQuery(e,n,r,i){let s=fc();const o=n.path,a=new Zt(o.child("")),l=this.docs.getIteratorFrom(a);for(;l.hasNext();){const{key:c,value:{document:u}}=l.getNext();if(!o.isPrefixOf(c.path))break;c.path.length>o.length+1||Hde(zde(u),r)<=0||(i.has(u.key)||_2(n,u))&&(s=s.insert(u.key,u.mutableCopy()))}return dt.resolve(s)}getAllFromCollectionGroup(e,n,r,i){an()}Fr(e,n){return dt.forEach(this.docs,r=>n(r))}newChangeBuffer(e){return new ipe(this)}getSize(e){return dt.resolve(this.size)}}class ipe extends Khe{constructor(e){super(),this.ar=e}applyChanges(e){const n=[];return this.changes.forEach((r,i)=>{i.isValidDocument()?n.push(this.ar.addEntry(e,i)):this.ar.removeEntry(r)}),dt.waitFor(n)}getFromCache(e,n){return this.ar.getEntry(e,n)}getAllFromCache(e,n){return this.ar.getEntries(e,n)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class spe{constructor(e){this.persistence=e,this.Mr=new Pm(n=>s3(n),o3),this.lastRemoteSnapshotVersion=un.min(),this.highestTargetId=0,this.Or=0,this.Nr=new f3,this.targetCount=0,this.Lr=rm.Nn()}forEachTarget(e,n){return this.Mr.forEach((r,i)=>n(i)),dt.resolve()}getLastRemoteSnapshotVersion(e){return dt.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return dt.resolve(this.Or)}allocateTargetId(e){return this.highestTargetId=this.Lr.next(),dt.resolve(this.highestTargetId)}setTargetsMetadata(e,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.Or&&(this.Or=n),dt.resolve()}qn(e){this.Mr.set(e.target,e);const n=e.targetId;n>this.highestTargetId&&(this.Lr=new rm(n),this.highestTargetId=n),e.sequenceNumber>this.Or&&(this.Or=e.sequenceNumber)}addTargetData(e,n){return this.qn(n),this.targetCount+=1,dt.resolve()}updateTargetData(e,n){return this.qn(n),dt.resolve()}removeTargetData(e,n){return this.Mr.delete(n.target),this.Nr.Vr(n.targetId),this.targetCount-=1,dt.resolve()}removeTargets(e,n,r){let i=0;const s=[];return this.Mr.forEach((o,a)=>{a.sequenceNumber<=n&&r.get(a.targetId)===null&&(this.Mr.delete(o),s.push(this.removeMatchingKeysForTargetId(e,a.targetId)),i++)}),dt.waitFor(s).next(()=>i)}getTargetCount(e){return dt.resolve(this.targetCount)}getTargetData(e,n){const r=this.Mr.get(n)||null;return dt.resolve(r)}addMatchingKeys(e,n,r){return this.Nr.dr(n,r),dt.resolve()}removeMatchingKeys(e,n,r){this.Nr.Rr(n,r);const i=this.persistence.referenceDelegate,s=[];return i&&n.forEach(o=>{s.push(i.markPotentiallyOrphaned(e,o))}),dt.waitFor(s)}removeMatchingKeysForTargetId(e,n){return this.Nr.Vr(n),dt.resolve()}getMatchingKeysForTargetId(e,n){const r=this.Nr.gr(n);return dt.resolve(r)}containsKey(e,n){return dt.resolve(this.Nr.containsKey(n))}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ope{constructor(e,n){this.Br={},this.overlays={},this.kr=new n3(0),this.qr=!1,this.qr=!0,this.referenceDelegate=e(this),this.Qr=new spe(this),this.indexManager=new Qhe,this.remoteDocumentCache=function(i){return new rpe(i)}(r=>this.referenceDelegate.Kr(r)),this.serializer=new Jhe(n),this.$r=new epe(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let n=this.overlays[e.toKey()];return n||(n=new tpe,this.overlays[e.toKey()]=n),n}getMutationQueue(e,n){let r=this.Br[e.toKey()];return r||(r=new npe(n,this.referenceDelegate),this.Br[e.toKey()]=r),r}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(e,n,r){Wt("MemoryPersistence","Starting transaction:",e);const i=new ape(this.kr.next());return this.referenceDelegate.Ur(),r(i).next(s=>this.referenceDelegate.Wr(i).next(()=>s)).toPromise().then(s=>(i.raiseOnCommittedEvent(),s))}Gr(e,n){return dt.or(Object.values(this.Br).map(r=>()=>r.containsKey(e,n)))}}class ape extends Vde{constructor(e){super(),this.currentSequenceNumber=e}}class d3{constructor(e){this.persistence=e,this.zr=new f3,this.jr=null}static Hr(e){return new d3(e)}get Jr(){if(this.jr)return this.jr;throw an()}addReference(e,n,r){return this.zr.addReference(r,n),this.Jr.delete(r.toString()),dt.resolve()}removeReference(e,n,r){return this.zr.removeReference(r,n),this.Jr.add(r.toString()),dt.resolve()}markPotentiallyOrphaned(e,n){return this.Jr.add(n.toString()),dt.resolve()}removeTarget(e,n){this.zr.Vr(n.targetId).forEach(i=>this.Jr.add(i.toString()));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,n.targetId).next(i=>{i.forEach(s=>this.Jr.add(s.toString()))}).next(()=>r.removeTargetData(e,n))}Ur(){this.jr=new Set}Wr(e){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return dt.forEach(this.Jr,r=>{const i=Zt.fromPath(r);return this.Yr(e,i).next(s=>{s||n.removeEntry(i,un.min())})}).next(()=>(this.jr=null,n.apply(e)))}updateLimboDocument(e,n){return this.Yr(e,n).next(r=>{r?this.Jr.delete(n.toString()):this.Jr.add(n.toString())})}Kr(e){return 0}Yr(e,n){return dt.or([()=>dt.resolve(this.zr.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(e,n),()=>this.persistence.Gr(e,n)])}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class h3{constructor(e,n,r,i){this.targetId=e,this.fromCache=n,this.qi=r,this.Qi=i}static Ki(e,n){let r=Un(),i=Un();for(const s of n.docChanges)switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}return new h3(e,n.fromCache,r,i)}}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class lpe{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class cpe{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=function(){return qle()?8:Wde(Ki())>0?6:4}()}initialize(e,n){this.zi=e,this.indexManager=n,this.$i=!0}getDocumentsMatchingQuery(e,n,r,i){const s={result:null};return this.ji(e,n).next(o=>{s.result=o}).next(()=>{if(!s.result)return this.Hi(e,n,i,r).next(o=>{s.result=o})}).next(()=>{if(s.result)return;const o=new lpe;return this.Ji(e,n,o).next(a=>{if(s.result=a,this.Ui)return this.Yi(e,n,o,a.size)})}).next(()=>s.result)}Yi(e,n,r,i){return r.documentReadCountthis.Gi*i?(D0()<=Gn.DEBUG&&Wt("QueryEngine","The SDK decides to create cache indexes for query:",Jh(n),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,al(n))):dt.resolve())}ji(e,n){if(TB(n))return dt.resolve(null);let r=al(n);return this.indexManager.getIndexType(e,r).next(i=>i===0?null:(n.limit!==null&&i===1&&(n=QM(n,null,"F"),r=al(n)),this.indexManager.getDocumentsMatchingTarget(e,r).next(s=>{const o=Un(...s);return this.zi.getDocuments(e,o).next(a=>this.indexManager.getMinOffset(e,r).next(l=>{const c=this.Zi(n,a);return this.Xi(n,c,o,l.readTime)?this.ji(e,QM(n,null,"F")):this.es(e,c,n,l)}))})))}Hi(e,n,r,i){return TB(n)||i.isEqual(un.min())?dt.resolve(null):this.zi.getDocuments(e,r).next(s=>{const o=this.Zi(n,s);return this.Xi(n,o,r,i)?dt.resolve(null):(D0()<=Gn.DEBUG&&Wt("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),Jh(n)),this.es(e,o,n,jde(i,-1)).next(a=>a))})}Zi(e,n){let r=new Yi(gH(e));return n.forEach((i,s)=>{_2(e,s)&&(r=r.add(s))}),r}Xi(e,n,r,i){if(e.limit===null)return!1;if(r.size!==n.size)return!0;const s=e.limitType==="F"?n.last():n.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(i)>0)}Ji(e,n,r){return D0()<=Gn.DEBUG&&Wt("QueryEngine","Using full collection scan to execute query:",Jh(n)),this.zi.getDocumentsMatchingQuery(e,n,Mu.min(),r)}es(e,n,r,i){return this.zi.getDocumentsMatchingQuery(e,r,i).next(s=>(n.forEach(o=>{s=s.insert(o.key,o)}),s))}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class upe{constructor(e,n,r,i){this.persistence=e,this.ts=n,this.serializer=i,this.ns=new Or(ir),this.rs=new Pm(s=>s3(s),o3),this.ss=new Map,this.os=e.getRemoteDocumentCache(),this.Qr=e.getTargetCache(),this.$r=e.getBundleCache(),this._s(r)}_s(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new qhe(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>e.collect(n,this.ns))}}function fpe(t,e,n,r){return new upe(t,e,n,r)}async function FH(t,e){const n=pn(t);return await n.persistence.runTransaction("Handle user change","readonly",r=>{let i;return n.mutationQueue.getAllMutationBatches(r).next(s=>(i=s,n._s(e),n.mutationQueue.getAllMutationBatches(r))).next(s=>{const o=[],a=[];let l=Un();for(const c of i){o.push(c.batchId);for(const u of c.mutations)l=l.add(u.key)}for(const c of s){a.push(c.batchId);for(const u of c.mutations)l=l.add(u.key)}return n.localDocuments.getDocuments(r,l).next(c=>({us:c,removedBatchIds:o,addedBatchIds:a}))})})}function dpe(t,e){const n=pn(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{const i=e.batch.keys(),s=n.os.newChangeBuffer({trackRemovals:!0});return function(a,l,c,u){const f=c.batch,h=f.keys();let m=dt.resolve();return h.forEach(v=>{m=m.next(()=>u.getEntry(l,v)).next(w=>{const y=c.docVersions.get(v);Mr(y!==null),w.version.compareTo(y)<0&&(f.applyToRemoteDocument(w,c),w.isValidDocument()&&(w.setReadTime(c.commitVersion),u.addEntry(w)))})}),m.next(()=>a.mutationQueue.removeMutationBatch(l,f))}(n,r,e,s).next(()=>s.apply(r)).next(()=>n.mutationQueue.performConsistencyCheck(r)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(r,i,e.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(a){let l=Un();for(let c=0;c0&&(l=l.add(a.batch.mutations[c].key));return l}(e))).next(()=>n.localDocuments.getDocuments(r,i))})}function jH(t){const e=pn(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",n=>e.Qr.getLastRemoteSnapshotVersion(n))}function hpe(t,e){const n=pn(t),r=e.snapshotVersion;let i=n.ns;return n.persistence.runTransaction("Apply remote event","readwrite-primary",s=>{const o=n.os.newChangeBuffer({trackRemovals:!0});i=n.ns;const a=[];e.targetChanges.forEach((u,f)=>{const h=i.get(f);if(!h)return;a.push(n.Qr.removeMatchingKeys(s,u.removedDocuments,f).next(()=>n.Qr.addMatchingKeys(s,u.addedDocuments,f)));let m=h.withSequenceNumber(s.currentSequenceNumber);e.targetMismatches.get(f)!==null?m=m.withResumeToken(ws.EMPTY_BYTE_STRING,un.min()).withLastLimboFreeSnapshotVersion(un.min()):u.resumeToken.approximateByteSize()>0&&(m=m.withResumeToken(u.resumeToken,r)),i=i.insert(f,m),function(w,y,g){return w.resumeToken.approximateByteSize()===0||y.snapshotVersion.toMicroseconds()-w.snapshotVersion.toMicroseconds()>=3e8?!0:g.addedDocuments.size+g.modifiedDocuments.size+g.removedDocuments.size>0}(h,m,u)&&a.push(n.Qr.updateTargetData(s,m))});let l=fc(),c=Un();if(e.documentUpdates.forEach(u=>{e.resolvedLimboDocuments.has(u)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(s,u))}),a.push(ppe(s,o,e.documentUpdates).next(u=>{l=u.cs,c=u.ls})),!r.isEqual(un.min())){const u=n.Qr.getLastRemoteSnapshotVersion(s).next(f=>n.Qr.setTargetsMetadata(s,s.currentSequenceNumber,r));a.push(u)}return dt.waitFor(a).next(()=>o.apply(s)).next(()=>n.localDocuments.getLocalViewOfDocuments(s,l,c)).next(()=>l)}).then(s=>(n.ns=i,s))}function ppe(t,e,n){let r=Un(),i=Un();return n.forEach(s=>r=r.add(s)),e.getEntries(t,r).next(s=>{let o=fc();return n.forEach((a,l)=>{const c=s.get(a);l.isFoundDocument()!==c.isFoundDocument()&&(i=i.add(a)),l.isNoDocument()&&l.version.isEqual(un.min())?(e.removeEntry(a,l.readTime),o=o.insert(a,l)):!c.isValidDocument()||l.version.compareTo(c.version)>0||l.version.compareTo(c.version)===0&&c.hasPendingWrites?(e.addEntry(l),o=o.insert(a,l)):Wt("LocalStore","Ignoring outdated watch update for ",a,". Current version:",c.version," Watch version:",l.version)}),{cs:o,ls:i}})}function mpe(t,e){const n=pn(t);return n.persistence.runTransaction("Get next mutation batch","readonly",r=>(e===void 0&&(e=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(r,e)))}function gpe(t,e){const n=pn(t);return n.persistence.runTransaction("Allocate target","readwrite",r=>{let i;return n.Qr.getTargetData(r,e).next(s=>s?(i=s,dt.resolve(i)):n.Qr.allocateTargetId(r).next(o=>(i=new ru(e,o,"TargetPurposeListen",r.currentSequenceNumber),n.Qr.addTargetData(r,i).next(()=>i))))}).then(r=>{const i=n.ns.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.ns=n.ns.insert(r.targetId,r),n.rs.set(e,r.targetId)),r})}async function dI(t,e,n){const r=pn(t),i=r.ns.get(e),s=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",s,o=>r.persistence.referenceDelegate.removeTarget(o,i))}catch(o){if(!yv(o))throw o;Wt("LocalStore",`Failed to update sequence numbers for target ${e}: ${o}`)}r.ns=r.ns.remove(e),r.rs.delete(i.target)}function FB(t,e,n){const r=pn(t);let i=un.min(),s=Un();return r.persistence.runTransaction("Execute query","readwrite",o=>function(l,c,u){const f=pn(l),h=f.rs.get(u);return h!==void 0?dt.resolve(f.ns.get(h)):f.Qr.getTargetData(c,u)}(r,o,al(e)).next(a=>{if(a)return i=a.lastLimboFreeSnapshotVersion,r.Qr.getMatchingKeysForTargetId(o,a.targetId).next(l=>{s=l})}).next(()=>r.ts.getDocumentsMatchingQuery(o,e,n?i:un.min(),n?s:Un())).next(a=>(vpe(r,lhe(e),a),{documents:a,hs:s})))}function vpe(t,e,n){let r=t.ss.get(e)||un.min();n.forEach((i,s)=>{s.readTime.compareTo(r)>0&&(r=s.readTime)}),t.ss.set(e,r)}class jB{constructor(){this.activeTargetIds=phe()}As(e){this.activeTargetIds=this.activeTargetIds.add(e)}Rs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}ds(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class ype{constructor(){this.no=new jB,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,r){}addLocalQueryTarget(e){return this.no.As(e),this.ro[e]||"not-current"}updateQueryState(e,n,r){this.ro[e]=n}removeLocalQueryTarget(e){this.no.Rs(e)}isLocalQueryTarget(e){return this.no.activeTargetIds.has(e)}clearQueryState(e){delete this.ro[e]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(e){return this.no.activeTargetIds.has(e)}start(){return this.no=new jB,Promise.resolve()}handleUserChange(e,n,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class wpe{io(e){}shutdown(){}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class zB{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(e){this.uo.push(e)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){Wt("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.uo)e(0)}ao(){Wt("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.uo)e(1)}static D(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let dw=null;function wE(){return dw===null?dw=function(){return 268435456+Math.round(2147483648*Math.random())}():dw++,"0x"+dw.toString(16)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const _pe={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Mpe{constructor(e){this.lo=e.lo,this.ho=e.ho}Po(e){this.Io=e}To(e){this.Eo=e}Ao(e){this.Ro=e}onMessage(e){this.Vo=e}close(){this.ho()}send(e){this.lo(e)}mo(){this.Io()}fo(){this.Eo()}po(e){this.Ro(e)}yo(e){this.Vo(e)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const cs="WebChannelConnection";class xpe extends class{constructor(n){this.databaseInfo=n,this.databaseId=n.databaseId;const r=n.ssl?"https":"http",i=encodeURIComponent(this.databaseId.projectId),s=encodeURIComponent(this.databaseId.database);this.wo=r+"://"+n.host,this.So=`projects/${i}/databases/${s}`,this.bo=this.databaseId.database==="(default)"?`project_id=${i}`:`project_id=${i}&database_id=${s}`}get Do(){return!1}Co(n,r,i,s,o){const a=wE(),l=this.vo(n,r.toUriEncodedString());Wt("RestConnection",`Sending RPC '${n}' ${a}:`,l,i);const c={"google-cloud-resource-prefix":this.So,"x-goog-request-params":this.bo};return this.Fo(c,s,o),this.Mo(n,l,c,i).then(u=>(Wt("RestConnection",`Received RPC '${n}' ${a}: `,u),u),u=>{throw Xp("RestConnection",`RPC '${n}' ${a} failed with error: `,u,"url: ",l,"request:",i),u})}xo(n,r,i,s,o,a){return this.Co(n,r,i,s,o)}Fo(n,r,i){n["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+Rm}(),n["Content-Type"]="text/plain",this.databaseInfo.appId&&(n["X-Firebase-GMPID"]=this.databaseInfo.appId),r&&r.headers.forEach((s,o)=>n[o]=s),i&&i.headers.forEach((s,o)=>n[o]=s)}vo(n,r){const i=_pe[n];return`${this.wo}/v1/${r}:${i}`}terminate(){}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}Mo(e,n,r,i){const s=wE();return new Promise((o,a)=>{const l=new Z8;l.setWithCredentials(!0),l.listenOnce(eH.COMPLETE,()=>{try{switch(l.getLastErrorCode()){case G_.NO_ERROR:const u=l.getResponseJson();Wt(cs,`XHR for RPC '${e}' ${s} received:`,JSON.stringify(u)),o(u);break;case G_.TIMEOUT:Wt(cs,`RPC '${e}' ${s} timed out`),a(new Rt(Xe.DEADLINE_EXCEEDED,"Request time out"));break;case G_.HTTP_ERROR:const f=l.getStatus();if(Wt(cs,`RPC '${e}' ${s} failed with status:`,f,"response text:",l.getResponseText()),f>0){let h=l.getResponseJson();Array.isArray(h)&&(h=h[0]);const m=h==null?void 0:h.error;if(m&&m.status&&m.message){const v=function(y){const g=y.toLowerCase().replace(/_/g,"-");return Object.values(Xe).indexOf(g)>=0?g:Xe.UNKNOWN}(m.status);a(new Rt(v,m.message))}else a(new Rt(Xe.UNKNOWN,"Server responded with status "+l.getStatus()))}else a(new Rt(Xe.UNAVAILABLE,"Connection failed."));break;default:an()}}finally{Wt(cs,`RPC '${e}' ${s} completed.`)}});const c=JSON.stringify(i);Wt(cs,`RPC '${e}' ${s} sending request:`,i),l.send(n,"POST",c,r,15)})}Oo(e,n,r){const i=wE(),s=[this.wo,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=rH(),a=nH(),l={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},c=this.longPollingOptions.timeoutSeconds;c!==void 0&&(l.longPollingTimeout=Math.round(1e3*c)),this.useFetchStreams&&(l.xmlHttpFactory=new q8({})),this.Fo(l.initMessageHeaders,n,r),l.encodeInitMessageHeaders=!0;const u=s.join("");Wt(cs,`Creating RPC '${e}' stream ${i}: ${u}`,l);const f=o.createWebChannel(u,l);let h=!1,m=!1;const v=new Mpe({lo:y=>{m?Wt(cs,`Not sending because RPC '${e}' stream ${i} is closed:`,y):(h||(Wt(cs,`Opening RPC '${e}' stream ${i} transport.`),f.open(),h=!0),Wt(cs,`RPC '${e}' stream ${i} sending:`,y),f.send(y))},ho:()=>f.close()}),w=(y,g,_)=>{y.listen(g,x=>{try{_(x)}catch(S){setTimeout(()=>{throw S},0)}})};return w(f,fg.EventType.OPEN,()=>{m||(Wt(cs,`RPC '${e}' stream ${i} transport opened.`),v.mo())}),w(f,fg.EventType.CLOSE,()=>{m||(m=!0,Wt(cs,`RPC '${e}' stream ${i} transport closed`),v.po())}),w(f,fg.EventType.ERROR,y=>{m||(m=!0,Xp(cs,`RPC '${e}' stream ${i} transport errored:`,y),v.po(new Rt(Xe.UNAVAILABLE,"The operation could not be completed")))}),w(f,fg.EventType.MESSAGE,y=>{var g;if(!m){const _=y.data[0];Mr(!!_);const x=_,S=x.error||((g=x[0])===null||g===void 0?void 0:g.error);if(S){Wt(cs,`RPC '${e}' stream ${i} received error:`,S);const D=S.status;let T=function(C){const L=hi[C];if(L!==void 0)return IH(L)}(D),E=S.message;T===void 0&&(T=Xe.INTERNAL,E="Unknown error status: "+D+" with message "+S.message),m=!0,v.po(new Rt(T,E)),f.close()}else Wt(cs,`RPC '${e}' stream ${i} received:`,_),v.yo(_)}}),w(a,tH.STAT_EVENT,y=>{y.stat===nI.PROXY?Wt(cs,`RPC '${e}' stream ${i} detected buffering proxy`):y.stat===nI.NOPROXY&&Wt(cs,`RPC '${e}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{v.fo()},0),v}}function _E(){return typeof document<"u"?document:null}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function C2(t){return new Dhe(t,!0)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class zH{constructor(e,n,r=1e3,i=1.5,s=6e4){this.oi=e,this.timerId=n,this.No=r,this.Lo=i,this.Bo=s,this.ko=0,this.qo=null,this.Qo=Date.now(),this.reset()}reset(){this.ko=0}Ko(){this.ko=this.Bo}$o(e){this.cancel();const n=Math.floor(this.ko+this.Uo()),r=Math.max(0,Date.now()-this.Qo),i=Math.max(0,n-r);i>0&&Wt("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.ko} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.qo=this.oi.enqueueAfterDelay(this.timerId,i,()=>(this.Qo=Date.now(),e())),this.ko*=this.Lo,this.kothis.Bo&&(this.ko=this.Bo)}Wo(){this.qo!==null&&(this.qo.skipDelay(),this.qo=null)}cancel(){this.qo!==null&&(this.qo.cancel(),this.qo=null)}Uo(){return(Math.random()-.5)*this.ko}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class HH{constructor(e,n,r,i,s,o,a,l){this.oi=e,this.Go=r,this.zo=i,this.connection=s,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=a,this.listener=l,this.state=0,this.jo=0,this.Ho=null,this.Jo=null,this.stream=null,this.Yo=new zH(e,n)}Zo(){return this.state===1||this.state===5||this.Xo()}Xo(){return this.state===2||this.state===3}start(){this.state!==4?this.auth():this.e_()}async stop(){this.Zo()&&await this.close(0)}t_(){this.state=0,this.Yo.reset()}n_(){this.Xo()&&this.Ho===null&&(this.Ho=this.oi.enqueueAfterDelay(this.Go,6e4,()=>this.r_()))}i_(e){this.s_(),this.stream.send(e)}async r_(){if(this.Xo())return this.close(0)}s_(){this.Ho&&(this.Ho.cancel(),this.Ho=null)}o_(){this.Jo&&(this.Jo.cancel(),this.Jo=null)}async close(e,n){this.s_(),this.o_(),this.Yo.cancel(),this.jo++,e!==4?this.Yo.reset():n&&n.code===Xe.RESOURCE_EXHAUSTED?(uc(n.toString()),uc("Using maximum backoff delay to prevent overloading the backend."),this.Yo.Ko()):n&&n.code===Xe.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.__(),this.stream.close(),this.stream=null),this.state=e,await this.listener.Ao(n)}__(){}auth(){this.state=1;const e=this.a_(this.jo),n=this.jo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,i])=>{this.jo===n&&this.u_(r,i)},r=>{e(()=>{const i=new Rt(Xe.UNKNOWN,"Fetching auth token failed: "+r.message);return this.c_(i)})})}u_(e,n){const r=this.a_(this.jo);this.stream=this.l_(e,n),this.stream.Po(()=>{r(()=>this.listener.Po())}),this.stream.To(()=>{r(()=>(this.state=2,this.Jo=this.oi.enqueueAfterDelay(this.zo,1e4,()=>(this.Xo()&&(this.state=3),Promise.resolve())),this.listener.To()))}),this.stream.Ao(i=>{r(()=>this.c_(i))}),this.stream.onMessage(i=>{r(()=>this.onMessage(i))})}e_(){this.state=5,this.Yo.$o(async()=>{this.state=0,this.start()})}c_(e){return Wt("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}a_(e){return n=>{this.oi.enqueueAndForget(()=>this.jo===e?n():(Wt("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class bpe extends HH{constructor(e,n,r,i,s,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,i,o),this.serializer=s}l_(e,n){return this.connection.Oo("Listen",e,n)}onMessage(e){this.Yo.reset();const n=Bhe(this.serializer,e),r=function(s){if(!("targetChange"in s))return un.min();const o=s.targetChange;return o.targetIds&&o.targetIds.length?un.min():o.readTime?ll(o.readTime):un.min()}(e);return this.listener.h_(n,r)}P_(e){const n={};n.database=fI(this.serializer),n.addTarget=function(s,o){let a;const l=o.target;if(a=oI(l)?{documents:Fhe(s,l)}:{query:jhe(s,l)._t},a.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){a.resumeToken=PH(s,o.resumeToken);const c=lI(s,o.expectedCount);c!==null&&(a.expectedCount=c)}else if(o.snapshotVersion.compareTo(un.min())>0){a.readTime=ZM(s,o.snapshotVersion.toTimestamp());const c=lI(s,o.expectedCount);c!==null&&(a.expectedCount=c)}return a}(this.serializer,e);const r=Hhe(this.serializer,e);r&&(n.labels=r),this.i_(n)}I_(e){const n={};n.database=fI(this.serializer),n.removeTarget=e,this.i_(n)}}class Spe extends HH{constructor(e,n,r,i,s,o){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,r,i,o),this.serializer=s,this.T_=!1}get E_(){return this.T_}start(){this.T_=!1,this.lastStreamToken=void 0,super.start()}__(){this.T_&&this.d_([])}l_(e,n){return this.connection.Oo("Write",e,n)}onMessage(e){if(Mr(!!e.streamToken),this.lastStreamToken=e.streamToken,this.T_){this.Yo.reset();const n=Uhe(e.writeResults,e.commitTime),r=ll(e.commitTime);return this.listener.A_(r,n)}return Mr(!e.writeResults||e.writeResults.length===0),this.T_=!0,this.listener.R_()}V_(){const e={};e.database=fI(this.serializer),this.i_(e)}d_(e){const n={streamToken:this.lastStreamToken,writes:e.map(r=>Ohe(this.serializer,r))};this.i_(n)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Cpe extends class{}{constructor(e,n,r,i){super(),this.authCredentials=e,this.appCheckCredentials=n,this.connection=r,this.serializer=i,this.m_=!1}f_(){if(this.m_)throw new Rt(Xe.FAILED_PRECONDITION,"The client has already been terminated.")}Co(e,n,r,i){return this.f_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.connection.Co(e,cI(n,r),i,s,o)).catch(s=>{throw s.name==="FirebaseError"?(s.code===Xe.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new Rt(Xe.UNKNOWN,s.toString())})}xo(e,n,r,i,s){return this.f_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,a])=>this.connection.xo(e,cI(n,r),i,o,a,s)).catch(o=>{throw o.name==="FirebaseError"?(o.code===Xe.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new Rt(Xe.UNKNOWN,o.toString())})}terminate(){this.m_=!0,this.connection.terminate()}}class Epe{constructor(e,n){this.asyncQueue=e,this.onlineStateHandler=n,this.state="Unknown",this.g_=0,this.p_=null,this.y_=!0}w_(){this.g_===0&&(this.S_("Unknown"),this.p_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.p_=null,this.b_("Backend didn't respond within 10 seconds."),this.S_("Offline"),Promise.resolve())))}D_(e){this.state==="Online"?this.S_("Unknown"):(this.g_++,this.g_>=1&&(this.C_(),this.b_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.S_("Offline")))}set(e){this.C_(),this.g_=0,e==="Online"&&(this.y_=!1),this.S_(e)}S_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}b_(e){const n=`Could not reach Cloud Firestore backend. ${e} +This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.y_?(uc(n),this.y_=!1):Wt("OnlineStateTracker",n)}C_(){this.p_!==null&&(this.p_.cancel(),this.p_=null)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ape{constructor(e,n,r,i,s){this.localStore=e,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.v_=[],this.F_=new Map,this.M_=new Set,this.x_=[],this.O_=s,this.O_.io(o=>{r.enqueueAndForget(async()=>{Fd(this)&&(Wt("RemoteStore","Restarting streams for network reachability change."),await async function(l){const c=pn(l);c.M_.add(4),await Mv(c),c.N_.set("Unknown"),c.M_.delete(4),await E2(c)}(this))})}),this.N_=new Epe(r,i)}}async function E2(t){if(Fd(t))for(const e of t.x_)await e(!0)}async function Mv(t){for(const e of t.x_)await e(!1)}function GH(t,e){const n=pn(t);n.F_.has(e.targetId)||(n.F_.set(e.targetId,e),v3(n)?g3(n):Dm(n).Xo()&&m3(n,e))}function p3(t,e){const n=pn(t),r=Dm(n);n.F_.delete(e),r.Xo()&&VH(n,e),n.F_.size===0&&(r.Xo()?r.n_():Fd(n)&&n.N_.set("Unknown"))}function m3(t,e){if(t.L_.xe(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(un.min())>0){const n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}Dm(t).P_(e)}function VH(t,e){t.L_.xe(e),Dm(t).I_(e)}function g3(t){t.L_=new Ihe({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),ot:e=>t.F_.get(e)||null,tt:()=>t.datastore.serializer.databaseId}),Dm(t).start(),t.N_.w_()}function v3(t){return Fd(t)&&!Dm(t).Zo()&&t.F_.size>0}function Fd(t){return pn(t).M_.size===0}function WH(t){t.L_=void 0}async function Tpe(t){t.N_.set("Online")}async function Ipe(t){t.F_.forEach((e,n)=>{m3(t,e)})}async function Lpe(t,e){WH(t),v3(t)?(t.N_.D_(e),g3(t)):t.N_.set("Unknown")}async function Rpe(t,e,n){if(t.N_.set("Online"),e instanceof RH&&e.state===2&&e.cause)try{await async function(i,s){const o=s.cause;for(const a of s.targetIds)i.F_.has(a)&&(await i.remoteSyncer.rejectListen(a,o),i.F_.delete(a),i.L_.removeTarget(a))}(t,e)}catch(r){Wt("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),await qM(t,r)}else if(e instanceof $_?t.L_.Ke(e):e instanceof LH?t.L_.He(e):t.L_.We(e),!n.isEqual(un.min()))try{const r=await jH(t.localStore);n.compareTo(r)>=0&&await function(s,o){const a=s.L_.rt(o);return a.targetChanges.forEach((l,c)=>{if(l.resumeToken.approximateByteSize()>0){const u=s.F_.get(c);u&&s.F_.set(c,u.withResumeToken(l.resumeToken,o))}}),a.targetMismatches.forEach((l,c)=>{const u=s.F_.get(l);if(!u)return;s.F_.set(l,u.withResumeToken(ws.EMPTY_BYTE_STRING,u.snapshotVersion)),VH(s,l);const f=new ru(u.target,l,c,u.sequenceNumber);m3(s,f)}),s.remoteSyncer.applyRemoteEvent(a)}(t,n)}catch(r){Wt("RemoteStore","Failed to raise snapshot:",r),await qM(t,r)}}async function qM(t,e,n){if(!yv(e))throw e;t.M_.add(1),await Mv(t),t.N_.set("Offline"),n||(n=()=>jH(t.localStore)),t.asyncQueue.enqueueRetryable(async()=>{Wt("RemoteStore","Retrying IndexedDB access"),await n(),t.M_.delete(1),await E2(t)})}function $H(t,e){return e().catch(n=>qM(t,n,e))}async function A2(t){const e=pn(t),n=bu(e);let r=e.v_.length>0?e.v_[e.v_.length-1].batchId:-1;for(;Ppe(e);)try{const i=await mpe(e.localStore,r);if(i===null){e.v_.length===0&&n.n_();break}r=i.batchId,Dpe(e,i)}catch(i){await qM(e,i)}JH(e)&&YH(e)}function Ppe(t){return Fd(t)&&t.v_.length<10}function Dpe(t,e){t.v_.push(e);const n=bu(t);n.Xo()&&n.E_&&n.d_(e.mutations)}function JH(t){return Fd(t)&&!bu(t).Zo()&&t.v_.length>0}function YH(t){bu(t).start()}async function Npe(t){bu(t).V_()}async function kpe(t){const e=bu(t);for(const n of t.v_)e.d_(n.mutations)}async function Bpe(t,e,n){const r=t.v_.shift(),i=l3.from(r,e,n);await $H(t,()=>t.remoteSyncer.applySuccessfulWrite(i)),await A2(t)}async function Ope(t,e){e&&bu(t).E_&&await async function(r,i){if(function(o){return Ehe(o)&&o!==Xe.ABORTED}(i.code)){const s=r.v_.shift();bu(r).t_(),await $H(r,()=>r.remoteSyncer.rejectFailedWrite(s.batchId,i)),await A2(r)}}(t,e),JH(t)&&YH(t)}async function HB(t,e){const n=pn(t);n.asyncQueue.verifyOperationInProgress(),Wt("RemoteStore","RemoteStore received new credentials");const r=Fd(n);n.M_.add(3),await Mv(n),r&&n.N_.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.M_.delete(3),await E2(n)}async function Upe(t,e){const n=pn(t);e?(n.M_.delete(2),await E2(n)):e||(n.M_.add(2),await Mv(n),n.N_.set("Unknown"))}function Dm(t){return t.B_||(t.B_=function(n,r,i){const s=pn(n);return s.f_(),new bpe(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(t.datastore,t.asyncQueue,{Po:Tpe.bind(null,t),To:Ipe.bind(null,t),Ao:Lpe.bind(null,t),h_:Rpe.bind(null,t)}),t.x_.push(async e=>{e?(t.B_.t_(),v3(t)?g3(t):t.N_.set("Unknown")):(await t.B_.stop(),WH(t))})),t.B_}function bu(t){return t.k_||(t.k_=function(n,r,i){const s=pn(n);return s.f_(),new Spe(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(t.datastore,t.asyncQueue,{Po:()=>Promise.resolve(),To:Npe.bind(null,t),Ao:Ope.bind(null,t),R_:kpe.bind(null,t),A_:Bpe.bind(null,t)}),t.x_.push(async e=>{e?(t.k_.t_(),await A2(t)):(await t.k_.stop(),t.v_.length>0&&(Wt("RemoteStore",`Stopping write stream with ${t.v_.length} pending writes`),t.v_=[]))})),t.k_}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class y3{constructor(e,n,r,i,s){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new ec,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,n,r,i,s){const o=Date.now()+r,a=new y3(e,n,o,i,s);return a.start(r),a}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new Rt(Xe.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function w3(t,e){if(uc("AsyncQueue",`${e}: ${t}`),yv(t))return new Rt(Xe.UNAVAILABLE,`${e}: ${t}`);throw t}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Tp{constructor(e){this.comparator=e?(n,r)=>e(n,r)||Zt.comparator(n.key,r.key):(n,r)=>Zt.comparator(n.key,r.key),this.keyedMap=dg(),this.sortedSet=new Or(this.comparator)}static emptySet(e){return new Tp(e.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const n=this.keyedMap.get(e);return n?this.sortedSet.indexOf(n):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((n,r)=>(e(n),!1))}add(e){const n=this.delete(e.key);return n.copy(n.keyedMap.insert(e.key,e),n.sortedSet.insert(e,null))}delete(e){const n=this.get(e);return n?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(n)):this}isEqual(e){if(!(e instanceof Tp)||this.size!==e.size)return!1;const n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(!i.isEqual(s))return!1}return!0}toString(){const e=[];return this.forEach(n=>{e.push(n.toString())}),e.length===0?"DocumentSet ()":`DocumentSet ( + `+e.join(` +`)+` +)`}copy(e,n){const r=new Tp;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class GB{constructor(){this.q_=new Or(Zt.comparator)}track(e){const n=e.doc.key,r=this.q_.get(n);r?e.type!==0&&r.type===3?this.q_=this.q_.insert(n,e):e.type===3&&r.type!==1?this.q_=this.q_.insert(n,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.q_=this.q_.insert(n,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.q_=this.q_.insert(n,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.q_=this.q_.remove(n):e.type===1&&r.type===2?this.q_=this.q_.insert(n,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.q_=this.q_.insert(n,{type:2,doc:e.doc}):an():this.q_=this.q_.insert(n,e)}Q_(){const e=[];return this.q_.inorderTraversal((n,r)=>{e.push(r)}),e}}class im{constructor(e,n,r,i,s,o,a,l,c){this.query=e,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=s,this.fromCache=o,this.syncStateChanged=a,this.excludesMetadataChanges=l,this.hasCachedResults=c}static fromInitialDocuments(e,n,r,i,s){const o=[];return n.forEach(a=>{o.push({type:0,doc:a})}),new im(e,n,Tp.emptySet(n),o,r,i,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&w2(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const n=this.docChanges,r=e.docChanges;if(n.length!==r.length)return!1;for(let i=0;ie.G_())}}class jpe{constructor(){this.queries=new Pm(e=>mH(e),w2),this.onlineState="Unknown",this.z_=new Set}}async function _3(t,e){const n=pn(t);let r=3;const i=e.query;let s=n.queries.get(i);s?!s.W_()&&e.G_()&&(r=2):(s=new Fpe,r=e.G_()?0:1);try{switch(r){case 0:s.K_=await n.onListen(i,!0);break;case 1:s.K_=await n.onListen(i,!1);break;case 2:await n.onFirstRemoteStoreListen(i)}}catch(o){const a=w3(o,`Initialization of query '${Jh(e.query)}' failed`);return void e.onError(a)}n.queries.set(i,s),s.U_.push(e),e.j_(n.onlineState),s.K_&&e.H_(s.K_)&&x3(n)}async function M3(t,e){const n=pn(t),r=e.query;let i=3;const s=n.queries.get(r);if(s){const o=s.U_.indexOf(e);o>=0&&(s.U_.splice(o,1),s.U_.length===0?i=e.G_()?0:1:!s.W_()&&e.G_()&&(i=2))}switch(i){case 0:return n.queries.delete(r),n.onUnlisten(r,!0);case 1:return n.queries.delete(r),n.onUnlisten(r,!1);case 2:return n.onLastRemoteStoreUnlisten(r);default:return}}function zpe(t,e){const n=pn(t);let r=!1;for(const i of e){const s=i.query,o=n.queries.get(s);if(o){for(const a of o.U_)a.H_(i)&&(r=!0);o.K_=i}}r&&x3(n)}function Hpe(t,e,n){const r=pn(t),i=r.queries.get(e);if(i)for(const s of i.U_)s.onError(n);r.queries.delete(e)}function x3(t){t.z_.forEach(e=>{e.next()})}var hI,VB;(VB=hI||(hI={})).J_="default",VB.Cache="cache";class b3{constructor(e,n,r){this.query=e,this.Y_=n,this.Z_=!1,this.X_=null,this.onlineState="Unknown",this.options=r||{}}H_(e){if(!this.options.includeMetadataChanges){const r=[];for(const i of e.docChanges)i.type!==3&&r.push(i);e=new im(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let n=!1;return this.Z_?this.ea(e)&&(this.Y_.next(e),n=!0):this.ta(e,this.onlineState)&&(this.na(e),n=!0),this.X_=e,n}onError(e){this.Y_.error(e)}j_(e){this.onlineState=e;let n=!1;return this.X_&&!this.Z_&&this.ta(this.X_,e)&&(this.na(this.X_),n=!0),n}ta(e,n){if(!e.fromCache||!this.G_())return!0;const r=n!=="Offline";return(!this.options.ra||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||n==="Offline")}ea(e){if(e.docChanges.length>0)return!0;const n=this.X_&&this.X_.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}na(e){e=im.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Z_=!0,this.Y_.next(e)}G_(){return this.options.source!==hI.Cache}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class QH{constructor(e){this.key=e}}class XH{constructor(e){this.key=e}}class Gpe{constructor(e,n){this.query=e,this.la=n,this.ha=null,this.hasCachedResults=!1,this.current=!1,this.Pa=Un(),this.mutatedKeys=Un(),this.Ia=gH(e),this.Ta=new Tp(this.Ia)}get Ea(){return this.la}da(e,n){const r=n?n.Aa:new GB,i=n?n.Ta:this.Ta;let s=n?n.mutatedKeys:this.mutatedKeys,o=i,a=!1;const l=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,c=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((u,f)=>{const h=i.get(u),m=_2(this.query,f)?f:null,v=!!h&&this.mutatedKeys.has(h.key),w=!!m&&(m.hasLocalMutations||this.mutatedKeys.has(m.key)&&m.hasCommittedMutations);let y=!1;h&&m?h.data.isEqual(m.data)?v!==w&&(r.track({type:3,doc:m}),y=!0):this.Ra(h,m)||(r.track({type:2,doc:m}),y=!0,(l&&this.Ia(m,l)>0||c&&this.Ia(m,c)<0)&&(a=!0)):!h&&m?(r.track({type:0,doc:m}),y=!0):h&&!m&&(r.track({type:1,doc:h}),y=!0,(l||c)&&(a=!0)),y&&(m?(o=o.add(m),s=w?s.add(u):s.delete(u)):(o=o.delete(u),s=s.delete(u)))}),this.query.limit!==null)for(;o.size>this.query.limit;){const u=this.query.limitType==="F"?o.last():o.first();o=o.delete(u.key),s=s.delete(u.key),r.track({type:1,doc:u})}return{Ta:o,Aa:r,Xi:a,mutatedKeys:s}}Ra(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}applyChanges(e,n,r,i){const s=this.Ta;this.Ta=e.Ta,this.mutatedKeys=e.mutatedKeys;const o=e.Aa.Q_();o.sort((u,f)=>function(m,v){const w=y=>{switch(y){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return an()}};return w(m)-w(v)}(u.type,f.type)||this.Ia(u.doc,f.doc)),this.Va(r),i=i!=null&&i;const a=n&&!i?this.ma():[],l=this.Pa.size===0&&this.current&&!i?1:0,c=l!==this.ha;return this.ha=l,o.length!==0||c?{snapshot:new im(this.query,e.Ta,s,o,e.mutatedKeys,l===0,c,!1,!!r&&r.resumeToken.approximateByteSize()>0),fa:a}:{fa:a}}j_(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({Ta:this.Ta,Aa:new GB,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{fa:[]}}ga(e){return!this.la.has(e)&&!!this.Ta.has(e)&&!this.Ta.get(e).hasLocalMutations}Va(e){e&&(e.addedDocuments.forEach(n=>this.la=this.la.add(n)),e.modifiedDocuments.forEach(n=>{}),e.removedDocuments.forEach(n=>this.la=this.la.delete(n)),this.current=e.current)}ma(){if(!this.current)return[];const e=this.Pa;this.Pa=Un(),this.Ta.forEach(r=>{this.ga(r.key)&&(this.Pa=this.Pa.add(r.key))});const n=[];return e.forEach(r=>{this.Pa.has(r)||n.push(new XH(r))}),this.Pa.forEach(r=>{e.has(r)||n.push(new QH(r))}),n}pa(e){this.la=e.hs,this.Pa=Un();const n=this.da(e.documents);return this.applyChanges(n,!0)}ya(){return im.fromInitialDocuments(this.query,this.Ta,this.mutatedKeys,this.ha===0,this.hasCachedResults)}}class Vpe{constructor(e,n,r){this.query=e,this.targetId=n,this.view=r}}class Wpe{constructor(e){this.key=e,this.wa=!1}}class $pe{constructor(e,n,r,i,s,o){this.localStore=e,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=s,this.maxConcurrentLimboResolutions=o,this.Sa={},this.ba=new Pm(a=>mH(a),w2),this.Da=new Map,this.Ca=new Set,this.va=new Or(Zt.comparator),this.Fa=new Map,this.Ma=new f3,this.xa={},this.Oa=new Map,this.Na=rm.Ln(),this.onlineState="Unknown",this.La=void 0}get isPrimaryClient(){return this.La===!0}}async function Jpe(t,e,n=!0){const r=nG(t);let i;const s=r.ba.get(e);return s?(r.sharedClientState.addLocalQueryTarget(s.targetId),i=s.view.ya()):i=await KH(r,e,n,!0),i}async function Ype(t,e){const n=nG(t);await KH(n,e,!0,!1)}async function KH(t,e,n,r){const i=await gpe(t.localStore,al(e)),s=i.targetId,o=n?t.sharedClientState.addLocalQueryTarget(s):"not-current";let a;return r&&(a=await Qpe(t,e,s,o==="current",i.resumeToken)),t.isPrimaryClient&&n&&GH(t.remoteStore,i),a}async function Qpe(t,e,n,r,i){t.Ba=(f,h,m)=>async function(w,y,g,_){let x=y.view.da(g);x.Xi&&(x=await FB(w.localStore,y.query,!1).then(({documents:E})=>y.view.da(E,x)));const S=_&&_.targetChanges.get(y.targetId),D=_&&_.targetMismatches.get(y.targetId)!=null,T=y.view.applyChanges(x,w.isPrimaryClient,S,D);return $B(w,y.targetId,T.fa),T.snapshot}(t,f,h,m);const s=await FB(t.localStore,e,!0),o=new Gpe(e,s.hs),a=o.da(s.documents),l=_v.createSynthesizedTargetChangeForCurrentChange(n,r&&t.onlineState!=="Offline",i),c=o.applyChanges(a,t.isPrimaryClient,l);$B(t,n,c.fa);const u=new Vpe(e,n,o);return t.ba.set(e,u),t.Da.has(n)?t.Da.get(n).push(e):t.Da.set(n,[e]),c.snapshot}async function Xpe(t,e,n){const r=pn(t),i=r.ba.get(e),s=r.Da.get(i.targetId);if(s.length>1)return r.Da.set(i.targetId,s.filter(o=>!w2(o,e))),void r.ba.delete(e);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedClientState.isActiveQueryTarget(i.targetId)||await dI(r.localStore,i.targetId,!1).then(()=>{r.sharedClientState.clearQueryState(i.targetId),n&&p3(r.remoteStore,i.targetId),pI(r,i.targetId)}).catch(vv)):(pI(r,i.targetId),await dI(r.localStore,i.targetId,!0))}async function Kpe(t,e){const n=pn(t),r=n.ba.get(e),i=n.Da.get(r.targetId);n.isPrimaryClient&&i.length===1&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),p3(n.remoteStore,r.targetId))}async function Zpe(t,e,n){const r=sme(t);try{const i=await function(o,a){const l=pn(o),c=_i.now(),u=a.reduce((m,v)=>m.add(v.key),Un());let f,h;return l.persistence.runTransaction("Locally write mutations","readwrite",m=>{let v=fc(),w=Un();return l.os.getEntries(m,u).next(y=>{v=y,v.forEach((g,_)=>{_.isValidDocument()||(w=w.add(g))})}).next(()=>l.localDocuments.getOverlayedDocuments(m,v)).next(y=>{f=y;const g=[];for(const _ of a){const x=Mhe(_,f.get(_.key).overlayedDocument);x!=null&&g.push(new zu(_.key,x,lH(x.value.mapValue),Ns.exists(!0)))}return l.mutationQueue.addMutationBatch(m,c,g,a)}).next(y=>{h=y;const g=y.applyToLocalDocumentSet(f,w);return l.documentOverlayCache.saveOverlays(m,y.batchId,g)})}).then(()=>({batchId:h.batchId,changes:yH(f)}))}(r.localStore,e);r.sharedClientState.addPendingMutation(i.batchId),function(o,a,l){let c=o.xa[o.currentUser.toKey()];c||(c=new Or(ir)),c=c.insert(a,l),o.xa[o.currentUser.toKey()]=c}(r,i.batchId,n),await xv(r,i.changes),await A2(r.remoteStore)}catch(i){const s=w3(i,"Failed to persist write");n.reject(s)}}async function ZH(t,e){const n=pn(t);try{const r=await hpe(n.localStore,e);e.targetChanges.forEach((i,s)=>{const o=n.Fa.get(s);o&&(Mr(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1),i.addedDocuments.size>0?o.wa=!0:i.modifiedDocuments.size>0?Mr(o.wa):i.removedDocuments.size>0&&(Mr(o.wa),o.wa=!1))}),await xv(n,r,e)}catch(r){await vv(r)}}function WB(t,e,n){const r=pn(t);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.ba.forEach((s,o)=>{const a=o.view.j_(e);a.snapshot&&i.push(a.snapshot)}),function(o,a){const l=pn(o);l.onlineState=a;let c=!1;l.queries.forEach((u,f)=>{for(const h of f.U_)h.j_(a)&&(c=!0)}),c&&x3(l)}(r.eventManager,e),i.length&&r.Sa.h_(i),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function qpe(t,e,n){const r=pn(t);r.sharedClientState.updateQueryState(e,"rejected",n);const i=r.Fa.get(e),s=i&&i.key;if(s){let o=new Or(Zt.comparator);o=o.insert(s,gs.newNoDocument(s,un.min()));const a=Un().add(s),l=new S2(un.min(),new Map,new Or(ir),o,a);await ZH(r,l),r.va=r.va.remove(s),r.Fa.delete(e),S3(r)}else await dI(r.localStore,e,!1).then(()=>pI(r,e,n)).catch(vv)}async function eme(t,e){const n=pn(t),r=e.batch.batchId;try{const i=await dpe(n.localStore,e);eG(n,r,null),qH(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await xv(n,i)}catch(i){await vv(i)}}async function tme(t,e,n){const r=pn(t);try{const i=await function(o,a){const l=pn(o);return l.persistence.runTransaction("Reject batch","readwrite-primary",c=>{let u;return l.mutationQueue.lookupMutationBatch(c,a).next(f=>(Mr(f!==null),u=f.keys(),l.mutationQueue.removeMutationBatch(c,f))).next(()=>l.mutationQueue.performConsistencyCheck(c)).next(()=>l.documentOverlayCache.removeOverlaysForBatchId(c,u,a)).next(()=>l.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(c,u)).next(()=>l.localDocuments.getDocuments(c,u))})}(r.localStore,e);eG(r,e,n),qH(r,e),r.sharedClientState.updateMutationState(e,"rejected",n),await xv(r,i)}catch(i){await vv(i)}}function qH(t,e){(t.Oa.get(e)||[]).forEach(n=>{n.resolve()}),t.Oa.delete(e)}function eG(t,e,n){const r=pn(t);let i=r.xa[r.currentUser.toKey()];if(i){const s=i.get(e);s&&(n?s.reject(n):s.resolve(),i=i.remove(e)),r.xa[r.currentUser.toKey()]=i}}function pI(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const r of t.Da.get(e))t.ba.delete(r),n&&t.Sa.ka(r,n);t.Da.delete(e),t.isPrimaryClient&&t.Ma.Vr(e).forEach(r=>{t.Ma.containsKey(r)||tG(t,r)})}function tG(t,e){t.Ca.delete(e.path.canonicalString());const n=t.va.get(e);n!==null&&(p3(t.remoteStore,n),t.va=t.va.remove(e),t.Fa.delete(n),S3(t))}function $B(t,e,n){for(const r of n)r instanceof QH?(t.Ma.addReference(r.key,e),nme(t,r)):r instanceof XH?(Wt("SyncEngine","Document no longer in limbo: "+r.key),t.Ma.removeReference(r.key,e),t.Ma.containsKey(r.key)||tG(t,r.key)):an()}function nme(t,e){const n=e.key,r=n.path.canonicalString();t.va.get(n)||t.Ca.has(r)||(Wt("SyncEngine","New document in limbo: "+n),t.Ca.add(r),S3(t))}function S3(t){for(;t.Ca.size>0&&t.va.size{o.push(r.Ba(l,e,n).then(c=>{var u;if((c||n)&&r.isPrimaryClient){const f=c?!c.fromCache:(u=n==null?void 0:n.targetChanges.get(l.targetId))===null||u===void 0?void 0:u.current;r.sharedClientState.updateQueryState(l.targetId,f?"current":"not-current")}if(c){i.push(c);const f=h3.Ki(l.targetId,c);s.push(f)}}))}),await Promise.all(o),r.Sa.h_(i),await async function(l,c){const u=pn(l);try{await u.persistence.runTransaction("notifyLocalViewChanges","readwrite",f=>dt.forEach(c,h=>dt.forEach(h.qi,m=>u.persistence.referenceDelegate.addReference(f,h.targetId,m)).next(()=>dt.forEach(h.Qi,m=>u.persistence.referenceDelegate.removeReference(f,h.targetId,m)))))}catch(f){if(!yv(f))throw f;Wt("LocalStore","Failed to update sequence numbers: "+f)}for(const f of c){const h=f.targetId;if(!f.fromCache){const m=u.ns.get(h),v=m.snapshotVersion,w=m.withLastLimboFreeSnapshotVersion(v);u.ns=u.ns.insert(h,w)}}}(r.localStore,s))}async function rme(t,e){const n=pn(t);if(!n.currentUser.isEqual(e)){Wt("SyncEngine","User change. New user:",e.toKey());const r=await FH(n.localStore,e);n.currentUser=e,function(s,o){s.Oa.forEach(a=>{a.forEach(l=>{l.reject(new Rt(Xe.CANCELLED,o))})}),s.Oa.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await xv(n,r.us)}}function ime(t,e){const n=pn(t),r=n.Fa.get(e);if(r&&r.wa)return Un().add(r.key);{let i=Un();const s=n.Da.get(e);if(!s)return i;for(const o of s){const a=n.ba.get(o);i=i.unionWith(a.view.Ea)}return i}}function nG(t){const e=pn(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=ZH.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=ime.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=qpe.bind(null,e),e.Sa.h_=zpe.bind(null,e.eventManager),e.Sa.ka=Hpe.bind(null,e.eventManager),e}function sme(t){const e=pn(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=eme.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=tme.bind(null,e),e}class JB{constructor(){this.synchronizeTabs=!1}async initialize(e){this.serializer=C2(e.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(e),this.persistence=this.createPersistence(e),await this.persistence.start(),this.localStore=this.createLocalStore(e),this.gcScheduler=this.createGarbageCollectionScheduler(e,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(e,this.localStore)}createGarbageCollectionScheduler(e,n){return null}createIndexBackfillerScheduler(e,n){return null}createLocalStore(e){return fpe(this.persistence,new cpe,e.initialUser,this.serializer)}createPersistence(e){return new ope(d3.Hr,this.serializer)}createSharedClientState(e){return new ype}async terminate(){var e,n;(e=this.gcScheduler)===null||e===void 0||e.stop(),(n=this.indexBackfillerScheduler)===null||n===void 0||n.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class ome{async initialize(e,n){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>WB(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=rme.bind(null,this.syncEngine),await Upe(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return function(){return new jpe}()}createDatastore(e){const n=C2(e.databaseInfo.databaseId),r=function(s){return new xpe(s)}(e.databaseInfo);return function(s,o,a,l){return new Cpe(s,o,a,l)}(e.authCredentials,e.appCheckCredentials,r,n)}createRemoteStore(e){return function(r,i,s,o,a){return new Ape(r,i,s,o,a)}(this.localStore,this.datastore,e.asyncQueue,n=>WB(this.syncEngine,n,0),function(){return zB.D()?new zB:new wpe}())}createSyncEngine(e,n){return function(i,s,o,a,l,c,u){const f=new $pe(i,s,o,a,l,c);return u&&(f.La=!0),f}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}async terminate(){var e;await async function(r){const i=pn(r);Wt("RemoteStore","RemoteStore shutting down."),i.M_.add(5),await Mv(i),i.O_.shutdown(),i.N_.set("Unknown")}(this.remoteStore),(e=this.datastore)===null||e===void 0||e.terminate()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class C3{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Ka(this.observer.next,e)}error(e){this.observer.error?this.Ka(this.observer.error,e):uc("Uncaught Error in snapshot listener:",e.toString())}$a(){this.muted=!0}Ka(e,n){this.muted||setTimeout(()=>{this.muted||e(n)},0)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ame{constructor(e,n,r,i){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=ps.UNAUTHENTICATED,this.clientId=sH.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(r,async s=>{Wt("FirestoreClient","Received user=",s.uid),await this.authCredentialListener(s),this.user=s}),this.appCheckCredentials.start(r,s=>(Wt("FirestoreClient","Received new app check token=",s),this.appCheckCredentialListener(s,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new Rt(Xe.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const e=new ec;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){const r=w3(n,"Failed to shutdown persistence");e.reject(r)}}),e.promise}}async function ME(t,e){t.asyncQueue.verifyOperationInProgress(),Wt("FirestoreClient","Initializing OfflineComponentProvider");const n=t.configuration;await e.initialize(n);let r=n.initialUser;t.setCredentialChangeListener(async i=>{r.isEqual(i)||(await FH(e.localStore,i),r=i)}),e.persistence.setDatabaseDeletedListener(()=>t.terminate()),t._offlineComponents=e}async function YB(t,e){t.asyncQueue.verifyOperationInProgress();const n=await cme(t);Wt("FirestoreClient","Initializing OnlineComponentProvider"),await e.initialize(n,t.configuration),t.setCredentialChangeListener(r=>HB(e.remoteStore,r)),t.setAppCheckTokenChangeListener((r,i)=>HB(e.remoteStore,i)),t._onlineComponents=e}function lme(t){return t.name==="FirebaseError"?t.code===Xe.FAILED_PRECONDITION||t.code===Xe.UNIMPLEMENTED:!(typeof DOMException<"u"&&t instanceof DOMException)||t.code===22||t.code===20||t.code===11}async function cme(t){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){Wt("FirestoreClient","Using user provided OfflineComponentProvider");try{await ME(t,t._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!lme(n))throw n;Xp("Error using user provided cache. Falling back to memory cache: "+n),await ME(t,new JB)}}else Wt("FirestoreClient","Using default OfflineComponentProvider"),await ME(t,new JB);return t._offlineComponents}async function rG(t){return t._onlineComponents||(t._uninitializedComponentsProvider?(Wt("FirestoreClient","Using user provided OnlineComponentProvider"),await YB(t,t._uninitializedComponentsProvider._online)):(Wt("FirestoreClient","Using default OnlineComponentProvider"),await YB(t,new ome))),t._onlineComponents}function ume(t){return rG(t).then(e=>e.syncEngine)}async function ex(t){const e=await rG(t),n=e.eventManager;return n.onListen=Jpe.bind(null,e.syncEngine),n.onUnlisten=Xpe.bind(null,e.syncEngine),n.onFirstRemoteStoreListen=Ype.bind(null,e.syncEngine),n.onLastRemoteStoreUnlisten=Kpe.bind(null,e.syncEngine),n}function fme(t,e,n={}){const r=new ec;return t.asyncQueue.enqueueAndForget(async()=>function(s,o,a,l,c){const u=new C3({next:h=>{o.enqueueAndForget(()=>M3(s,f));const m=h.docs.has(a);!m&&h.fromCache?c.reject(new Rt(Xe.UNAVAILABLE,"Failed to get document because the client is offline.")):m&&h.fromCache&&l&&l.source==="server"?c.reject(new Rt(Xe.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):c.resolve(h)},error:h=>c.reject(h)}),f=new b3(y2(a.path),u,{includeMetadataChanges:!0,ra:!0});return _3(s,f)}(await ex(t),t.asyncQueue,e,n,r)),r.promise}function dme(t,e,n={}){const r=new ec;return t.asyncQueue.enqueueAndForget(async()=>function(s,o,a,l,c){const u=new C3({next:h=>{o.enqueueAndForget(()=>M3(s,f)),h.fromCache&&l.source==="server"?c.reject(new Rt(Xe.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):c.resolve(h)},error:h=>c.reject(h)}),f=new b3(a,u,{includeMetadataChanges:!0,ra:!0});return _3(s,f)}(await ex(t),t.asyncQueue,e,n,r)),r.promise}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function iG(t){const e={};return t.timeoutSeconds!==void 0&&(e.timeoutSeconds=t.timeoutSeconds),e}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const QB=new Map;/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function sG(t,e,n){if(!n)throw new Rt(Xe.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function hme(t,e,n,r){if(e===!0&&r===!0)throw new Rt(Xe.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function XB(t){if(!Zt.isDocumentKey(t))throw new Rt(Xe.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function KB(t){if(Zt.isDocumentKey(t))throw new Rt(Xe.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function T2(t){if(t===void 0)return"undefined";if(t===null)return"null";if(typeof t=="string")return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return""+t;if(typeof t=="object"){if(t instanceof Array)return"an array";{const e=function(r){return r.constructor?r.constructor.name:null}(t);return e?`a custom ${e} object`:"an object"}}return typeof t=="function"?"a function":an()}function ks(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new Rt(Xe.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=T2(t);throw new Rt(Xe.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ZB{constructor(e){var n,r;if(e.host===void 0){if(e.ssl!==void 0)throw new Rt(Xe.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=(n=e.ssl)===null||n===void 0||n;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<1048576)throw new Rt(Xe.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}hme("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:e.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=iG((r=e.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),function(s){if(s.timeoutSeconds!==void 0){if(isNaN(s.timeoutSeconds))throw new Rt(Xe.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new Rt(Xe.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new Rt(Xe.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(r,i){return r.timeoutSeconds===i.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class I2{constructor(e,n,r,i){this._authCredentials=e,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new ZB({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Rt(Xe.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!==void 0}_setSettings(e){if(this._settingsFrozen)throw new Rt(Xe.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new ZB(e),e.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new Rde;switch(r.type){case"firstParty":return new kde(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new Rt(Xe.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(n){const r=QB.get(n);r&&(Wt("ComponentProvider","Removing Datastore"),QB.delete(n),r.terminate())}(this),Promise.resolve()}}function pme(t,e,n,r={}){var i;const s=(t=ks(t,I2))._getSettings(),o=`${e}:${n}`;if(s.host!=="firestore.googleapis.com"&&s.host!==o&&Xp("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),t._setSettings(Object.assign(Object.assign({},s),{host:o,ssl:!1})),r.mockUserToken){let a,l;if(typeof r.mockUserToken=="string")a=r.mockUserToken,l=ps.MOCK_USER;else{a=h8(r.mockUserToken,(i=t._app)===null||i===void 0?void 0:i.options.projectId);const c=r.mockUserToken.sub||r.mockUserToken.user_id;if(!c)throw new Rt(Xe.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");l=new ps(c)}t._authCredentials=new Pde(new iH(a,l))}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class xl{constructor(e,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new xl(this.firestore,e,this._query)}}class vs{constructor(e,n,r){this.converter=n,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new gu(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new vs(this.firestore,e,this._key)}}class gu extends xl{constructor(e,n,r){super(e,n,y2(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new vs(this.firestore,null,new Zt(e))}withConverter(e){return new gu(this.firestore,e,this._path)}}function oG(t,e,...n){if(t=mr(t),sG("collection","path",e),t instanceof I2){const r=wr.fromString(e,...n);return KB(r),new gu(t,null,r)}{if(!(t instanceof vs||t instanceof gu))throw new Rt(Xe.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(wr.fromString(e,...n));return KB(r),new gu(t.firestore,null,r)}}function Nm(t,e,...n){if(t=mr(t),arguments.length===1&&(e=sH.newId()),sG("doc","path",e),t instanceof I2){const r=wr.fromString(e,...n);return XB(r),new vs(t,null,new Zt(r))}{if(!(t instanceof vs||t instanceof gu))throw new Rt(Xe.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(wr.fromString(e,...n));return XB(r),new vs(t.firestore,t instanceof gu?t.converter:null,new Zt(r))}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class mme{constructor(){this.iu=Promise.resolve(),this.su=[],this.ou=!1,this._u=[],this.au=null,this.uu=!1,this.cu=!1,this.lu=[],this.Yo=new zH(this,"async_queue_retry"),this.hu=()=>{const n=_E();n&&Wt("AsyncQueue","Visibility state changed to "+n.visibilityState),this.Yo.Wo()};const e=_E();e&&typeof e.addEventListener=="function"&&e.addEventListener("visibilitychange",this.hu)}get isShuttingDown(){return this.ou}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.Pu(),this.Iu(e)}enterRestrictedMode(e){if(!this.ou){this.ou=!0,this.cu=e||!1;const n=_E();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.hu)}}enqueue(e){if(this.Pu(),this.ou)return new Promise(()=>{});const n=new ec;return this.Iu(()=>this.ou&&this.cu?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.su.push(e),this.Tu()))}async Tu(){if(this.su.length!==0){try{await this.su[0](),this.su.shift(),this.Yo.reset()}catch(e){if(!yv(e))throw e;Wt("AsyncQueue","Operation failed with retryable error: "+e)}this.su.length>0&&this.Yo.$o(()=>this.Tu())}}Iu(e){const n=this.iu.then(()=>(this.uu=!0,e().catch(r=>{this.au=r,this.uu=!1;const i=function(o){let a=o.message||"";return o.stack&&(a=o.stack.includes(o.message)?o.stack:o.message+` +`+o.stack),a}(r);throw uc("INTERNAL UNHANDLED ERROR: ",i),r}).then(r=>(this.uu=!1,r))));return this.iu=n,n}enqueueAfterDelay(e,n,r){this.Pu(),this.lu.indexOf(e)>-1&&(n=0);const i=y3.createAndSchedule(this,e,n,r,s=>this.Eu(s));return this._u.push(i),i}Pu(){this.au&&an()}verifyOperationInProgress(){}async du(){let e;do e=this.iu,await e;while(e!==this.iu)}Au(e){for(const n of this._u)if(n.timerId===e)return!0;return!1}Ru(e){return this.du().then(()=>{this._u.sort((n,r)=>n.targetTimeMs-r.targetTimeMs);for(const n of this._u)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.du()})}Vu(e){this.lu.push(e)}Eu(e){const n=this._u.indexOf(e);this._u.splice(n,1)}}function qB(t){return function(n,r){if(typeof n!="object"||n===null)return!1;const i=n;for(const s of r)if(s in i&&typeof i[s]=="function")return!0;return!1}(t,["next","error","complete"])}class pl extends I2{constructor(e,n,r,i){super(e,n,r,i),this.type="firestore",this._queue=function(){return new mme}(),this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||aG(this),this._firestoreClient.terminate()}}function gme(t,e){const n=typeof t=="object"?t:G4(),r=typeof t=="string"?t:"(default)",i=f2(n,"firestore").getImmediate({identifier:r});if(!i._initialized){const s=u8("firestore");s&&pme(i,...s)}return i}function bv(t){return t._firestoreClient||aG(t),t._firestoreClient.verifyNotTerminated(),t._firestoreClient}function aG(t){var e,n,r;const i=t._freezeSettings(),s=function(a,l,c,u){return new Yde(a,l,c,u.host,u.ssl,u.experimentalForceLongPolling,u.experimentalAutoDetectLongPolling,iG(u.experimentalLongPollingOptions),u.useFetchStreams)}(t._databaseId,((e=t._app)===null||e===void 0?void 0:e.options.appId)||"",t._persistenceKey,i);t._firestoreClient=new ame(t._authCredentials,t._appCheckCredentials,t._queue,s),!((n=i.localCache)===null||n===void 0)&&n._offlineComponentProvider&&(!((r=i.localCache)===null||r===void 0)&&r._onlineComponentProvider)&&(t._firestoreClient._uninitializedComponentsProvider={_offlineKind:i.localCache.kind,_offline:i.localCache._offlineComponentProvider,_online:i.localCache._onlineComponentProvider})}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class sm{constructor(e){this._byteString=e}static fromBase64String(e){try{return new sm(ws.fromBase64String(e))}catch(n){throw new Rt(Xe.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new sm(ws.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Sv{constructor(...e){for(let n=0;n90)throw new Rt(Xe.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new Rt(Xe.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=e,this._long=n}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return ir(this._lat,e._lat)||ir(this._long,e._long)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const vme=/^__.*__$/;class yme{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return this.fieldMask!==null?new zu(e,this.data,this.fieldMask,n,this.fieldTransforms):new wv(e,this.data,n,this.fieldTransforms)}}class lG{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return new zu(e,this.data,this.fieldMask,n,this.fieldTransforms)}}function cG(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw an()}}class L2{constructor(e,n,r,i,s,o){this.settings=e,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=i,s===void 0&&this.mu(),this.fieldTransforms=s||[],this.fieldMask=o||[]}get path(){return this.settings.path}get fu(){return this.settings.fu}gu(e){return new L2(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}pu(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.gu({path:r,yu:!1});return i.wu(e),i}Su(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.gu({path:r,yu:!1});return i.mu(),i}bu(e){return this.gu({path:void 0,yu:!0})}Du(e){return tx(e,this.settings.methodName,this.settings.Cu||!1,this.path,this.settings.vu)}contains(e){return this.fieldMask.find(n=>e.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>e.isPrefixOf(n.field))!==void 0}mu(){if(this.path)for(let e=0;el.covers(f.field))}else l=null,c=o.fieldTransforms;return new yme(new Ws(a),l,c)}class R2 extends Cv{_toFieldTransform(e){if(e.fu!==2)throw e.fu===1?e.Du(`${this._methodName}() can only appear at the top level of your update data`):e.Du(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof R2}}function uG(t,e,n){return new L2({fu:3,vu:e.settings.vu,methodName:t._methodName,yu:n},e.databaseId,e.serializer,e.ignoreUndefinedProperties)}class T3 extends Cv{constructor(e,n){super(e),this.Mu=n}_toFieldTransform(e){const n=uG(this,e,!0),r=this.Mu.map(s=>jd(s,n)),i=new tm(r);return new EH(e.path,i)}isEqual(e){return e instanceof T3&&Qp(this.Mu,e.Mu)}}class I3 extends Cv{constructor(e,n){super(e),this.Mu=n}_toFieldTransform(e){const n=uG(this,e,!0),r=this.Mu.map(s=>jd(s,n)),i=new nm(r);return new EH(e.path,i)}isEqual(e){return e instanceof I3&&Qp(this.Mu,e.Mu)}}function fG(t,e,n,r){const i=t.Fu(1,e,n);L3("Data must be an object, but it was:",i,r);const s=[],o=Ws.empty();Od(r,(l,c)=>{const u=R3(e,l,n);c=mr(c);const f=i.Su(u);if(c instanceof R2)s.push(u);else{const h=jd(c,f);h!=null&&(s.push(u),o.set(u,h))}});const a=new wo(s);return new lG(o,a,i.fieldTransforms)}function dG(t,e,n,r,i,s){const o=t.Fu(1,e,n),a=[mI(e,r,n)],l=[i];if(s.length%2!=0)throw new Rt(Xe.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let h=0;h=0;--h)if(!gG(c,a[h])){const m=a[h];let v=l[h];v=mr(v);const w=o.Su(m);if(v instanceof R2)c.push(m);else{const y=jd(v,w);y!=null&&(c.push(m),u.set(m,y))}}const f=new wo(c);return new lG(u,f,o.fieldTransforms)}function hG(t,e,n,r=!1){return jd(n,t.Fu(r?4:3,e))}function jd(t,e){if(mG(t=mr(t)))return L3("Unsupported field value:",e,t),pG(t,e);if(t instanceof Cv)return function(r,i){if(!cG(i.fu))throw i.Du(`${r._methodName}() can only be used with update() and set()`);if(!i.path)throw i.Du(`${r._methodName}() is not currently supported inside arrays`);const s=r._toFieldTransform(i);s&&i.fieldTransforms.push(s)}(t,e),null;if(t===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.yu&&e.fu!==4)throw e.Du("Nested arrays are not supported");return function(r,i){const s=[];let o=0;for(const a of r){let l=jd(a,i.bu(o));l==null&&(l={nullValue:"NULL_VALUE"}),s.push(l),o++}return{arrayValue:{values:s}}}(t,e)}return function(r,i){if((r=mr(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return mhe(i.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const s=_i.fromDate(r);return{timestampValue:ZM(i.serializer,s)}}if(r instanceof _i){const s=new _i(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:ZM(i.serializer,s)}}if(r instanceof E3)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof sm)return{bytesValue:PH(i.serializer,r._byteString)};if(r instanceof vs){const s=i.databaseId,o=r.firestore._databaseId;if(!o.isEqual(s))throw i.Du(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:u3(r.firestore._databaseId||i.databaseId,r._key.path)}}throw i.Du(`Unsupported field value: ${T2(r)}`)}(t,e)}function pG(t,e){const n={};return oH(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):Od(t,(r,i)=>{const s=jd(i,e.pu(r));s!=null&&(n[r]=s)}),{mapValue:{fields:n}}}function mG(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof _i||t instanceof E3||t instanceof sm||t instanceof vs||t instanceof Cv)}function L3(t,e,n){if(!mG(n)||!function(i){return typeof i=="object"&&i!==null&&(Object.getPrototypeOf(i)===Object.prototype||Object.getPrototypeOf(i)===null)}(n)){const r=T2(n);throw r==="an object"?e.Du(t+" a custom object"):e.Du(t+" "+r)}}function mI(t,e,n){if((e=mr(e))instanceof Sv)return e._internalPath;if(typeof e=="string")return R3(t,e);throw tx("Field path arguments must be of type string or ",t,!1,void 0,n)}const _me=new RegExp("[~\\*/\\[\\]]");function R3(t,e,n){if(e.search(_me)>=0)throw tx(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new Sv(...e.split("."))._internalPath}catch{throw tx(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function tx(t,e,n,r,i){const s=r&&!r.isEmpty(),o=i!==void 0;let a=`Function ${e}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(s||o)&&(l+=" (found",s&&(l+=` in field ${r}`),o&&(l+=` in document ${i}`),l+=")"),new Rt(Xe.INVALID_ARGUMENT,a+t+l)}function gG(t,e){return t.some(n=>n.isEqual(e))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class P3{constructor(e,n,r,i,s){this._firestore=e,this._userDataWriter=n,this._key=r,this._document=i,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new vs(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new Mme(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const n=this._document.data.field(P2("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}}class Mme extends P3{data(){return super.data()}}function P2(t,e){return typeof e=="string"?R3(t,e):e instanceof Sv?e._internalPath:e._delegate._internalPath}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function vG(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new Rt(Xe.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class D3{}class D2 extends D3{}function eO(t,e,...n){let r=[];e instanceof D3&&r.push(e),r=r.concat(n),function(s){const o=s.filter(l=>l instanceof Av).length,a=s.filter(l=>l instanceof Ev).length;if(o>1||o>0&&a>0)throw new Rt(Xe.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(r);for(const i of r)t=i._apply(t);return t}class Ev extends D2{constructor(e,n,r){super(),this._field=e,this._op=n,this._value=r,this.type="where"}static _create(e,n,r){return new Ev(e,n,r)}_apply(e){const n=this._parse(e);return wG(e._query,n),new xl(e.firestore,e.converter,aI(e._query,n))}_parse(e){const n=km(e.firestore);return function(s,o,a,l,c,u,f){let h;if(c.isKeyField()){if(u==="array-contains"||u==="array-contains-any")throw new Rt(Xe.INVALID_ARGUMENT,`Invalid Query. You can't perform '${u}' queries on documentId().`);if(u==="in"||u==="not-in"){nO(f,u);const m=[];for(const v of f)m.push(tO(l,s,v));h={arrayValue:{values:m}}}else h=tO(l,s,f)}else u!=="in"&&u!=="not-in"&&u!=="array-contains-any"||nO(f,u),h=hG(a,o,f,u==="in"||u==="not-in");return yi.create(c,u,h)}(e._query,"where",n,e.firestore._databaseId,this._field,this._op,this._value)}}function xme(t,e,n){const r=e,i=P2("where",t);return Ev._create(i,r,n)}class Av extends D3{constructor(e,n){super(),this.type=e,this._queryConstraints=n}static _create(e,n){return new Av(e,n)}_parse(e){const n=this._queryConstraints.map(r=>r._parse(e)).filter(r=>r.getFilters().length>0);return n.length===1?n[0]:Ua.create(n,this._getOperator())}_apply(e){const n=this._parse(e);return n.getFilters().length===0?e:(function(i,s){let o=i;const a=s.getFlattenedFilters();for(const l of a)wG(o,l),o=aI(o,l)}(e._query,n),new xl(e.firestore,e.converter,aI(e._query,n)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}function bme(...t){return t.forEach(e=>Cme("or",e)),Av._create("or",t)}class N3 extends D2{constructor(e,n){super(),this._field=e,this._direction=n,this.type="orderBy"}static _create(e,n){return new N3(e,n)}_apply(e){const n=function(i,s,o){if(i.startAt!==null)throw new Rt(Xe.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(i.endAt!==null)throw new Rt(Xe.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new C1(s,o)}(e._query,this._field,this._direction);return new xl(e.firestore,e.converter,function(i,s){const o=i.explicitOrderBy.concat([s]);return new Ud(i.path,i.collectionGroup,o,i.filters.slice(),i.limit,i.limitType,i.startAt,i.endAt)}(e._query,n))}}function nx(t,e="asc"){const n=e,r=P2("orderBy",t);return N3._create(r,n)}class k3 extends D2{constructor(e,n,r){super(),this.type=e,this._limit=n,this._limitType=r}static _create(e,n,r){return new k3(e,n,r)}_apply(e){return new xl(e.firestore,e.converter,QM(e._query,this._limit,this._limitType))}}function rx(t){return k3._create("limit",t,"F")}class B3 extends D2{constructor(e,n,r){super(),this.type=e,this._docOrFields=n,this._inclusive=r}static _create(e,n,r){return new B3(e,n,r)}_apply(e){const n=Sme(e,this.type,this._docOrFields,this._inclusive);return new xl(e.firestore,e.converter,function(i,s){return new Ud(i.path,i.collectionGroup,i.explicitOrderBy.slice(),i.filters.slice(),i.limit,i.limitType,s,i.endAt)}(e._query,n))}}function yG(...t){return B3._create("startAfter",t,!1)}function Sme(t,e,n,r){if(n[0]=mr(n[0]),n[0]instanceof P3)return function(s,o,a,l,c){if(!l)throw new Rt(Xe.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${a}().`);const u=[];for(const f of Ap(s))if(f.field.isKeyField())u.push(YM(o,l.key));else{const h=l.data.field(f.field);if(v2(h))throw new Rt(Xe.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+f.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(h===null){const m=f.field.canonicalString();throw new Rt(Xe.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${m}' (used as the orderBy) does not exist.`)}u.push(h)}return new em(u,c)}(t._query,t.firestore._databaseId,e,n[0]._document,r);{const i=km(t.firestore);return function(o,a,l,c,u,f){const h=o.explicitOrderBy;if(u.length>h.length)throw new Rt(Xe.INVALID_ARGUMENT,`Too many arguments provided to ${c}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);const m=[];for(let v=0;v=0)return a.op;return null}(t.filters,function(i){switch(i){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(n!==null)throw n===e.op?new Rt(Xe.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new Rt(Xe.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`)}function Cme(t,e){if(!(e instanceof Ev||e instanceof Av))throw new Rt(Xe.INVALID_ARGUMENT,`Function ${t}() requires AppliableConstraints created with a call to 'where(...)', 'or(...)', or 'and(...)'.`)}class Eme{convertValue(e,n="none"){switch(Sd(e)){case 0:return null;case 1:return e.booleanValue;case 2:return mi(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,n);case 5:return e.stringValue;case 6:return this.convertBytes(bd(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,n);case 10:return this.convertObject(e.mapValue,n);default:throw an()}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){const r={};return Od(e,(i,s)=>{r[i]=this.convertValue(s,n)}),r}convertGeoPoint(e){return new E3(mi(e.latitude),mi(e.longitude))}convertArray(e,n){return(e.values||[]).map(r=>this.convertValue(r,n))}convertServerTimestamp(e,n){switch(n){case"previous":const r=r3(e);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(x1(e));default:return null}}convertTimestamp(e){const n=xu(e);return new _i(n.seconds,n.nanos)}convertDocumentKey(e,n){const r=wr.fromString(e);Mr(UH(r));const i=new b1(r.get(1),r.get(3)),s=new Zt(r.popFirst(5));return i.isEqual(n)||uc(`Document ${s} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),s}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function O3(t,e,n){let r;return r=t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e,r}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class pg{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class _G extends P3{constructor(e,n,r,i,s,o){super(e,n,r,i,o),this._firestore=e,this._firestoreImpl=e,this.metadata=s}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const n=new J_(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(n,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,n={}){if(this._document){const r=this._document.data.field(P2("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}}class J_ extends _G{data(e={}){return super.data(e)}}class MG{constructor(e,n,r,i){this._firestore=e,this._userDataWriter=n,this._snapshot=i,this.metadata=new pg(i.hasPendingWrites,i.fromCache),this.query=r}get docs(){const e=[];return this.forEach(n=>e.push(n)),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,n){this._snapshot.docs.forEach(r=>{e.call(n,new J_(this._firestore,this._userDataWriter,r.key,r,new pg(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const n=!!e.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new Rt(Xe.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=function(i,s){if(i._snapshot.oldDocs.isEmpty()){let o=0;return i._snapshot.docChanges.map(a=>{const l=new J_(i._firestore,i._userDataWriter,a.doc.key,a.doc,new pg(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);return a.doc,{type:"added",doc:l,oldIndex:-1,newIndex:o++}})}{let o=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(a=>s||a.type!==3).map(a=>{const l=new J_(i._firestore,i._userDataWriter,a.doc.key,a.doc,new pg(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);let c=-1,u=-1;return a.type!==0&&(c=o.indexOf(a.doc.key),o=o.delete(a.doc.key)),a.type!==1&&(o=o.add(a.doc),u=o.indexOf(a.doc.key)),{type:Ame(a.type),doc:l,oldIndex:c,newIndex:u}})}}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}}function Ame(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return an()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Tme(t){t=ks(t,vs);const e=ks(t.firestore,pl);return fme(bv(e),t._key).then(n=>xG(e,t,n))}class U3 extends Eme{constructor(e){super(),this.firestore=e}convertBytes(e){return new sm(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return new vs(this.firestore,null,n)}}function Ime(t){t=ks(t,xl);const e=ks(t.firestore,pl),n=bv(e),r=new U3(e);return vG(t._query),dme(n,t._query).then(i=>new MG(e,r,t,i))}function Lme(t,e,n){t=ks(t,vs);const r=ks(t.firestore,pl),i=O3(t.converter,e,n);return Tv(r,[A3(km(r),"setDoc",t._key,i,t.converter!==null,n).toMutation(t._key,Ns.none())])}function Rme(t,e,n,...r){t=ks(t,vs);const i=ks(t.firestore,pl),s=km(i);let o;return o=typeof(e=mr(e))=="string"||e instanceof Sv?dG(s,"updateDoc",t._key,e,n,r):fG(s,"updateDoc",t._key,e),Tv(i,[o.toMutation(t._key,Ns.exists(!0))])}function Pme(t){return Tv(ks(t.firestore,pl),[new b2(t._key,Ns.none())])}function Dme(t,e){const n=ks(t.firestore,pl),r=Nm(t),i=O3(t.converter,e);return Tv(n,[A3(km(t.firestore),"addDoc",r._key,i,t.converter!==null,{}).toMutation(r._key,Ns.exists(!1))]).then(()=>r)}function Nme(t,...e){var n,r,i;t=mr(t);let s={includeMetadataChanges:!1,source:"default"},o=0;typeof e[o]!="object"||qB(e[o])||(s=e[o],o++);const a={includeMetadataChanges:s.includeMetadataChanges,source:s.source};if(qB(e[o])){const f=e[o];e[o]=(n=f.next)===null||n===void 0?void 0:n.bind(f),e[o+1]=(r=f.error)===null||r===void 0?void 0:r.bind(f),e[o+2]=(i=f.complete)===null||i===void 0?void 0:i.bind(f)}let l,c,u;if(t instanceof vs)c=ks(t.firestore,pl),u=y2(t._key.path),l={next:f=>{e[o]&&e[o](xG(c,t,f))},error:e[o+1],complete:e[o+2]};else{const f=ks(t,xl);c=ks(f.firestore,pl),u=f._query;const h=new U3(c);l={next:m=>{e[o]&&e[o](new MG(c,h,f,m))},error:e[o+1],complete:e[o+2]},vG(t._query)}return function(h,m,v,w){const y=new C3(w),g=new b3(m,y,v);return h.asyncQueue.enqueueAndForget(async()=>_3(await ex(h),g)),()=>{y.$a(),h.asyncQueue.enqueueAndForget(async()=>M3(await ex(h),g))}}(bv(c),u,a,l)}function Tv(t,e){return function(r,i){const s=new ec;return r.asyncQueue.enqueueAndForget(async()=>Zpe(await ume(r),i,s)),s.promise}(bv(t),e)}function xG(t,e,n){const r=n.docs.get(e._key),i=new U3(t);return new _G(t,i,e._key,r,new pg(n.hasPendingWrites,n.fromCache),e.converter)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class kme{constructor(e,n){this._firestore=e,this._commitHandler=n,this._mutations=[],this._committed=!1,this._dataReader=km(e)}set(e,n,r){this._verifyNotCommitted();const i=xE(e,this._firestore),s=O3(i.converter,n,r),o=A3(this._dataReader,"WriteBatch.set",i._key,s,i.converter!==null,r);return this._mutations.push(o.toMutation(i._key,Ns.none())),this}update(e,n,r,...i){this._verifyNotCommitted();const s=xE(e,this._firestore);let o;return o=typeof(n=mr(n))=="string"||n instanceof Sv?dG(this._dataReader,"WriteBatch.update",s._key,n,r,i):fG(this._dataReader,"WriteBatch.update",s._key,n),this._mutations.push(o.toMutation(s._key,Ns.exists(!0))),this}delete(e){this._verifyNotCommitted();const n=xE(e,this._firestore);return this._mutations=this._mutations.concat(new b2(n._key,Ns.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new Rt(Xe.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}}function xE(t,e){if((t=mr(t)).firestore!==e)throw new Rt(Xe.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return t}function gI(...t){return new T3("arrayUnion",t)}function ix(...t){return new I3("arrayRemove",t)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Bme(t){return bv(t=ks(t,pl)),new kme(t,e=>Tv(t,e))}(function(e,n=!0){(function(i){Rm=i})(Bd),wd(new _u("firestore",(r,{instanceIdentifier:i,options:s})=>{const o=r.getProvider("app").getImmediate(),a=new pl(new Dde(r.getProvider("auth-internal")),new Ode(r.getProvider("app-check-internal")),function(c,u){if(!Object.prototype.hasOwnProperty.apply(c.options,["projectId"]))throw new Rt(Xe.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new b1(c.options.projectId,u)}(o,i),o);return s=Object.assign({useFetchStreams:n},s),a._setSettings(s),a},"PUBLIC").setMultipleInstances(!0)),sl(wB,"4.6.4",e),sl(wB,"4.6.4","esm2017")})();var Ome="firebase",Ume="10.12.3";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */sl(Ome,Ume,"app");const Fme={apiKey:"AIzaSyA9rwmAgjAlIC-gitEJi7lm5c8xlpgeOdY",authDomain:"connection-280f7.firebaseapp.com",projectId:"connection-280f7",storageBucket:"connection-280f7.appspot.com",messagingSenderId:"514095534536",appId:"1:514095534536:web:6bca02ef3459c41bde70fd",databaseURL:"https://connection-280f7-default-rtdb.europe-west1.firebasedatabase.app"},F3=g8(Fme),Su=gme(F3),bG=(t=[])=>t?t.map(e=>xme(...e)):[],SG=(t=[])=>t?t.map(n=>bme(...bG(n.wheres),...SG(n.ors))):[],jme=t=>t||[],CG=(t,e)=>{let n=[];return e&&n.push(...bG(e.wheres),...SG(e.ors),...jme(e.other)),!t.length%2?eO(Nm(Su,...t),...n):eO(oG(Su,...t),...n)};async function zme(t,e){try{await Lme(Nm(Su,...t),e)}catch(n){console.error("Error adding document: ",n)}}async function rO(t,e){try{return await Dme(oG(Su,...t),e)}catch(n){console.error("Error adding document: ",n)}}async function tc(t,e,n={}){try{const r=CG(t,e),i=await Ime(r),s={};return n.getDoc?s.data=i.docs:n.id?s.data=i.docs.map(o=>({id:o.id,...o.data()})):s.data=i.docs.map(o=>o.data()),n.last&&(s.last=i.docs[i.docs.length-1]),s}catch(r){console.error(r)}}async function om(t,e={}){const n=await Tme(Nm(Su,...t));return e.getDoc?n.docs:n.data()}async function cl(t,e,n){if(n&&(t.length%3||t.length==1)){const r=Bme(Su),{data:i}=await tc(t,n,{getDoc:!0});return i.forEach(async s=>{r.update(s.ref,e)}),await r.commit(),{type:"success",message:"Update is complete"}}else return await Rme(Nm(Su,...t),e),await om(t)}async function Hme(t,e){return await Pme(Nm(Su,...t)),null}function EG(t,e,n){let r=CG(t,n);return Nme(r,i=>{e(i)})}const Bm=Ide(F3);Bm.useDeviceLanguage();const Gme=new Hl,Vme=t=>String(t).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),Wme=t=>String(t).trim().length>=6,$me=(t,e)=>t==e,AG=(t,e)=>{let n={success:!0,type:"success",errors:{}};return Vme(t)||(n.success=!1,n.type="error",n.errors.email={message:"Email is not valid"}),Wme(e)||(n.success=!1,n.type="error",n.errors.password={message:"Password must be at least 6 characters"}),n},Jme=()=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let e="";const n=async()=>{e="#";for(let r=0;r<6;r++)e+=t.charAt(Math.floor(Math.random()*t.length));(await tc(["users"],{wheres:[["tag","==",e]]})).data.length&&n()};return n(),e},TG=t=>zme(["users",t.uid],{displayName:t.displayName,email:t.email,phoneNumber:t.phoneNumber,photoURL:t.photoURL,invitations:[],chats:[],tag:Jme(),uid:t.uid,friends:[]}),IG=t=>{const e=Ms.getState().setUser;e(t),localStorage.setItem("uid",t.uid)};async function Yme({email:t,password:e,confirmPassword:n},r){const i=AG(t,e);if($me(e,n)||(i.success=!1,i.type="error",i.errors.confirmPassword={message:"Сonfirmation password is incorrect"}),i.type=="error")return i;try{const o=(await dfe(Bm,t,e)).user;o.displayName=o.email.split("@")[0],await TG(o),r()}catch(s){console.error(s)}}async function Qme({email:t,password:e},n){const r=AG(t,e);if(r.type=="error")return r;try{await hfe(Bm,t,e),n()}catch(i){console.error(i)}}async function Xme(){try{await vfe(Bm)}catch(t){console.error(t)}}async function LG(t){try{const n=(await Ufe(Bm,Gme)).user;await om(["users",n.uid])||(TG(n),IG(await om(["users",n.uid]))),t()}catch(e){console.error(e)}}gfe(Bm,async t=>{try{if(t){const e=await om(["users",t.uid]);if(e)IG(e);else return}else{Ms.getState().setUser(t);return}}catch(e){console.error(e)}});const Ms=j4(t=>({user:void 0,setUser:e=>t({user:e}),logOut:async()=>{await Xme(),t({user:void 0})}}));mc.propTypes={sx:Cn.object,user:Cn.object,size:Cn.number,current:Cn.bool,adaptiv:Cn.bool};function mc({user:t,current:e,size:n=60,adaptiv:r=!1,...i}){const{user:s}=Ms();function o(l){let c=0,u;for(u=0;u>u*8&255;f+=`00${h.toString(16)}`.slice(-2)}return f}function a(l){return{sx:{bgcolor:o(l),...i.sx,width:r?`calc(${n*.75+"px"} + ${n-n*.75} * ((100vw - 320px) / 1600))`:n,height:r?`calc(${n*.75+"px"} + ${n-n*.75} * ((100vw - 320px) / 1600))`:n,adaptiv:r},children:`${l.split(" ").map(c=>c[0]).join(" ")}`}}return O.jsx(O.Fragment,{children:O.jsx(Pie,{src:t&&t.photoURL||e&&s&&s.photoURL,...i,...t&&a(t.displayName)||s&&a(s.displayName)})})}var j3={},Kme=Ur;Object.defineProperty(j3,"__esModule",{value:!0});var RG=j3.default=void 0,Zme=Kme(si()),qme=O;RG=j3.default=(0,Zme.default)((0,qme.jsx)("path",{d:"M14 8c0-2.21-1.79-4-4-4S6 5.79 6 8s1.79 4 4 4 4-1.79 4-4m3 2v2h6v-2zM2 18v2h16v-2c0-2.66-5.33-4-8-4s-8 1.34-8 4"}),"PersonRemove");const Om=j4(t=>({userSidebar:(()=>{if(window.outerWidth<=1140)return!1;if(localStorage.getItem("userSidebar")=="true")return!0;if(localStorage.getItem("userSidebar")=="false")return!1})(),setUserSidebar:e=>t(()=>(localStorage.setItem("userSidebar",e),{userSidebar:e})),chatList:localStorage.getItem("chatList")=="true"?!0:localStorage.getItem("chatList")!="false",setChatList:e=>t(()=>(localStorage.setItem("chatList",e),{chatList:e})),sidebar:location.pathname.split("/")[1]!="chat",setSidebar:e=>t({sidebar:e})}));let bE=!1;const Fa=j4((t,e)=>({chat:null,setChat:n=>{if(Om.getState().setSidebar(!1),!n){t({chat:n});return}t(r=>{r.messagesWatch&&r.messagesWatch(),bE=!0;const i=EG(["chats",n.id,"messages"],s=>{const o=s.docChanges();if(bE){bE=!1,r.setMessages(o.reverse().map(a=>({id:a.doc.id,...a.doc.data()}))),r.setLastMessageDoc(o[0]?o[0].doc:null);return}t(a=>{const l=[...a.messages];return o.forEach(c=>{if(c.type==="added")l.push({id:c.doc.id,...c.doc.data()});else if(c.type==="modified"){const u=l.findIndex(f=>f.id===c.doc.id);u!==-1&&(l[u]={id:c.doc.id,...c.doc.data()})}}),{messages:l}})},{other:[nx("date","desc"),rx(30)]});return r.setMessagesWatch(i),{chat:n}})},user:null,setUser:n=>t({user:n}),chatList:null,setChatList:n=>{const r=e().setChatScroll;r(n.scrollHeight),setTimeout(()=>{n.scrollTop=n.scrollHeight},500),t({chatList:n})},scrollDown:()=>{const n=e().chatList;n.scrollTop=n.scrollHeight;const r=e().setChatScroll;r(n.scrollHeight)},chatScroll:0,setChatScroll:n=>t({chatScroll:n}),messages:[],setMessages:n=>t({messages:n}),lastMessageDoc:null,setLastMessageDoc:n=>t({lastMessageDoc:n}),messagesWatch:null,setMessagesWatch:n=>t({messagesWatch:n}),setValue:n=>t(n)}));function e0e(){const{user:t,chat:e,setUser:n}=Fa(),{setUserSidebar:r}=Om(),{user:i}=Ms(),s=yl();async function o(){await cl(["users",i.uid],{friends:ix(t.uid)}),await cl(["users",t.uid],{friends:ix(i.uid)}),e&&await Hme(["chats",e.id]),n(null),s("/")}return O.jsxs(t0e,{children:[O.jsx(r0e,{onClick:()=>r(!1)}),O.jsxs(n0e,{children:[O.jsxs(i0e,{children:[O.jsx(s0e,{children:"Information"}),O.jsx(o0e,{onClick:()=>r(!1)})]}),O.jsxs(a0e,{children:[O.jsx(mc,{current:!0,size:70,user:t}),O.jsx(l0e,{children:O.jsx(c0e,{children:t.displayName})})]}),O.jsx(u0e,{children:O.jsxs(m0e,{onClick:o,children:[O.jsxs(h0e,{children:[O.jsx(RG,{css:d0e}),O.jsx("span",{children:"Remove from friends"})]}),O.jsx(p0e,{})]})})]})]})}const t0e=Be.div` + @media (max-width: 1140px) { + position: absolute; + z-index: 10000; + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; + padding: 0 5px; + } +`,n0e=Be.aside` + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + max-width: 350px; + background-color: ${Dn.$colorChat}; + ${En("padding",20,15,1)} + ${En("column-gap",15,7.5,1)} + + & * { + user-select: none; + } + + @media (max-width: 1140px) { + height: auto; + } +`,r0e=Be.div` + display: none; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.5); + z-index: -1; + @media (max-width: 1140px) { + display: block; + } +`,i0e=Be.div` + display: flex; + align-items: center; + justify-content: space-between; +`,s0e=Be.h2` + ${En("font-size",20,18,1)} +`,o0e=Be(C4)` + ${En("font-size",35,24,1)} + + @media (any-hover:hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + color: ${Dn.$colorMain}; + } + } +`,a0e=Be.div` + display: flex; + align-items: center; + ${En("column-gap",15,7.5,1)} + ${_l("padding",15,7.5,0,0)} + border-bottom: 9px solid #3151A3; + ${En("border-bottom-width",9,3,1)} +`,l0e=Be.div` + display: flex; + flex-direction: column; + overflow: hidden; + row-gap: 1px; +`,c0e=Be.span` + ${En("font-size",18,16,1)} + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +`,u0e=Be(uv)` + display: flex; + flex-direction: column; + ${En("row-gap",8,4,1)} +`,f0e=Be(l2)` + border-radius: 999px; + + @media (any-hover: hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + background-color: #2d3855; + } + } +`,d0e=wl` + ${En("font-size",26,22,1)} +`,h0e=Be.div` + display: flex; + align-items: center; + column-gap: 5px; + + & span { + ${En("font-size",18,16,1)} + } +`,p0e=Be.div` + display: flex; + align-items: center; +`,m0e=Be(f0e)` + color: #be4646; +`,PG="/Connection/assets/logo-BAk-MPAP.png";var z3={},g0e=Ur;Object.defineProperty(z3,"__esModule",{value:!0});var DG=z3.default=void 0,v0e=g0e(si()),y0e=O;DG=z3.default=(0,v0e.default)((0,y0e.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");var H3={},w0e=Ur;Object.defineProperty(H3,"__esModule",{value:!0});var NG=H3.default=void 0,_0e=w0e(si()),M0e=O;NG=H3.default=(0,_0e.default)((0,M0e.jsx)("path",{d:"M13 8c0-2.21-1.79-4-4-4S5 5.79 5 8s1.79 4 4 4 4-1.79 4-4m-2 0c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2M1 18v2h16v-2c0-2.66-5.33-4-8-4s-8 1.34-8 4m2 0c.2-.71 3.3-2 6-2 2.69 0 5.78 1.28 6 2zm17-3v-3h3v-2h-3V7h-2v3h-3v2h3v3z"}),"PersonAddAlt");kG.propTypes={onClose:Cn.func,open:Cn.bool};function kG({onClose:t,open:e}){const n=Ms(),[r,i]=I.useState(""),[s,o]=I.useState({type:"ok",message:"ok"});async function a(){try{const l=r.trim().slice(1,r.trim().length);if(r.trim()[0]!="#"){o({type:"error",message:"The # symbol is required"});return}else if(l.length>6||l.length<6){o({type:"error",message:"Tag should be length 6"});return}o({type:"ok",message:"ok"}),r.trim()!=n.user.tag&&await cl(["users"],{invitations:gI(n.user.uid)},{wheres:[["tag","==",r.trim()]]}),o({type:"success",message:"Invite sent"})}catch(l){console.error(l)}}return O.jsxs(z5,{open:e,onClose:t,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[O.jsx(V5,{id:"alert-dialog-title",children:"Search friends"}),O.jsxs(G5,{children:[O.jsxs(b0e,{children:[O.jsx(x0e,{placeholder:"#User tag",value:r,onChange:l=>i(l.target.value)}),O.jsx(FM,{onClick:a,children:"Invite to friends"})]}),s.type=="error"&&O.jsx(S0e,{children:s.message}),s.type=="success"&&O.jsx(C0e,{children:s.message})]}),O.jsx(H5,{children:O.jsx(FM,{onClick:t,children:"Cancel"})})]})}const x0e=Be(a2)` + font-size: 20px; +`,b0e=Be.div` + display: flex; + align-items: center; + column-gap: 5px; +`,S0e=Be.div` + color: ${Dn.$colorError}; + margin-top: 10px; + font-size: 16px; +`,C0e=Be.div` + color: ${Dn.$colorSuccess}; + margin-top: 10px; + font-size: 16px; +`;function E0e(){const[t,e]=I.useState(!1),[n,r]=I.useState(""),[i,s]=I.useState(!1),[o,a]=I.useState(null),l=I.useRef(null),{user:c}=Ms(),{setUser:u,setChat:f,chat:h}=Fa(),m=yl();function v(){e(!0)}function w(){e(!1)}function y(_){l.current&&clearTimeout(l.current),l.current=setTimeout(async()=>{const{data:x}=await tc(["users"],{wheres:[["uid","in",c.friends],["displayName",">=",_.target.value]]});a(x)},500)}function g(_){return async()=>{if(h&&h.pair.includes(_.uid)&&h.pair.includes(c.uid))return;const x=[_.uid,c.uid],S=(await tc(["chats"],{ors:[{wheres:[["pair","==",x],["pair","==",x.toReversed()]]}]})).data[0];f(S),u(_),m(S?`/chat/${S.id}`:`/friend/${_.uid}`)}}return O.jsxs(O.Fragment,{children:[O.jsx(A0e,{position:"sticky",children:O.jsxs(T0e,{children:[O.jsx(I0e,{src:PG,alt:"Logo",className:i&&"none"}),O.jsxs(L0e,{children:[O.jsx(R0e,{placeholder:"Search...",value:n,onChange:_=>r(_.target.value),onFocus:()=>s(!0),onBlur:()=>s(!1),onInput:y}),O.jsx(k0e,{}),O.jsx(P0e,{className:i&&o&&"visible",children:o&&O.jsx(O.Fragment,{children:o.length?o.map(_=>O.jsxs(D0e,{onClick:g(_),children:[O.jsx(mc,{user:_,size:50}),O.jsx(N0e,{children:_.displayName})]},_.uid)):O.jsx(O0e,{children:"Not found"})})})]}),O.jsx(B0e,{onClick:v,className:i&&"none"})]})}),O.jsx(kG,{open:t,onClose:w})]})}const A0e=Be(zre)` + background-color: transparent; + background-image: none; + box-shadow: none; +`,T0e=Be(ale)` + ${En("column-gap",10,6,1)} + padding: 0 10px !important; +`,I0e=Be.img` + width: 100%; + max-width: 45px; + object-fit: cover; + transition: all 0.2s ease-in-out 0s; + + &.none { + max-width: 0; + } +`,L0e=Be.div` + background-color: #303030; + border-radius: 999px; + display: flex; + justify-content: space-between; + align-items: center; + ${_l("padding",6,4,10,6)} + flex: 1 1 auto; + transition: all 0.3s ease 0s; + position: relative; +`,R0e=Be.input` + ${En("font-size",16,14,1)} + background: transparent; + width: 100%; + padding-right: 10px; +`,P0e=Be.ul` + position: absolute; + display: flex; + flex-direction: column; + top: calc(100% + 5px); + width: 100%; + left: 0; + border-radius: 15px; + background: #333; + padding: 5px 0; + overflow: auto; + max-height: 40vh; + opacity: 0; + transition: all 0.1s ease 0.1s; + + &.visible { + opacity: 1; + } +`,D0e=Be.li` + display: flex; + align-items: center; + column-gap: 5px; + padding: 5px 10px; + + @media (any-hover: hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + background: #444; + } + } +`,N0e=Be.span` + font-size: 15px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +`,k0e=Be(DG)` + ${En("font-size",30,24,1)} +`,B0e=Be(NG)` + ${En("font-size",30,28,1)} + transition: all 0.2s ease 0s; + + &.none { + width: 0; + } + @media (any-hover: hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + color: ${Dn.$colorMain}; + } + } +`,O0e=Be.div` + font-size: 20px; + text-align: center; + padding: 20px 0; +`;var G3={},U0e=Ur;Object.defineProperty(G3,"__esModule",{value:!0});var BG=G3.default=void 0,F0e=U0e(si()),j0e=O;BG=G3.default=(0,F0e.default)((0,j0e.jsx)("path",{d:"M20 2H4.01c-1.1 0-2 .9-2 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-8 4c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m4 8H8v-.57c0-.81.48-1.53 1.22-1.85.85-.37 1.79-.58 2.78-.58.99 0 1.93.21 2.78.58.74.32 1.22 1.04 1.22 1.85z"}),"ThreeP");var V3={},z0e=Ur;Object.defineProperty(V3,"__esModule",{value:!0});var OG=V3.default=void 0,H0e=z0e(si()),G0e=O;OG=V3.default=(0,H0e.default)((0,G0e.jsx)("path",{d:"M12 12.75c1.63 0 3.07.39 4.24.9 1.08.48 1.76 1.56 1.76 2.73V18H6v-1.61c0-1.18.68-2.26 1.76-2.73 1.17-.52 2.61-.91 4.24-.91M4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58C.48 14.9 0 15.62 0 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29M20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m4 3.43c0-.81-.48-1.53-1.22-1.85-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24zM12 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3"}),"Groups");var W3={},V0e=Ur;Object.defineProperty(W3,"__esModule",{value:!0});var UG=W3.default=void 0,W0e=V0e(si()),$0e=O;UG=W3.default=(0,W0e.default)((0,$0e.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");var $3={},J0e=Ur;Object.defineProperty($3,"__esModule",{value:!0});var FG=$3.default=void 0,Y0e=J0e(si()),Q0e=O;FG=$3.default=(0,Y0e.default)((0,Q0e.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout");var N2={},X0e=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=iO[e.format]||iO.default;window.clipboardData.setData(f,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(a),s.selectNodeContents(a),o.addRange(s);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(f){n&&console.error("unable to copy using clipboardData: ",f),n&&console.error("falling back to prompt"),r=q0e("message"in e?e.message:Z0e),window.prompt(r,t)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(s):o.removeAllRanges()),a&&document.body.removeChild(a),i()}return l}var tge=ege;function vI(t){"@babel/helpers - typeof";return vI=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vI(t)}Object.defineProperty(N2,"__esModule",{value:!0});N2.CopyToClipboard=void 0;var hw=jG(I),nge=jG(tge),rge=["text","onCopy","options","children"];function jG(t){return t&&t.__esModule?t:{default:t}}function sO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function oO(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function sge(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s=0)&&(n[i]=t[i]);return n}function oge(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function age(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sx(t){return sx=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},sx(t)}function J3(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var HG=function(t){cge(n,t);var e=uge(n);function n(){var r;oge(this,n);for(var i=arguments.length,s=new Array(i),o=0;oEn("font-size",t,t-2,1)} +`,_ge=Be.input` + background-color: transparent; + color: #fff; + position: relative; + width: 100%; + border-bottom: 1px solid #fff; + z-index: 1; + ${({size:t})=>En("font-size",t,t-2,1)} + + &:focus ~ label, + &:valid ~ label { + /* transform: translateY(calc(-100% - 0px)); */ + bottom: calc(70%); + font-size: 80%; + } + ${t=>t.error&&"border-color:red"} +`,Mge=Be.span` + font-size: 16px; + color: ${Dn.$colorError}; +`;var Q3={},xge=Ur;Object.defineProperty(Q3,"__esModule",{value:!0});var VG=Q3.default=void 0,bge=xge(si()),Sge=O;VG=Q3.default=(0,bge.default)((0,Sge.jsx)("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"}),"Upload");/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const WG="firebasestorage.googleapis.com",$G="storageBucket",Cge=2*60*1e3,Ege=10*60*1e3;/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class $r extends Ml{constructor(e,n,r=0){super(SE(e),`Firebase Storage: ${n} (${SE(e)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,$r.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return SE(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage} +${this.customData.serverResponse}`:this.message=this._baseMessage}}var Wr;(function(t){t.UNKNOWN="unknown",t.OBJECT_NOT_FOUND="object-not-found",t.BUCKET_NOT_FOUND="bucket-not-found",t.PROJECT_NOT_FOUND="project-not-found",t.QUOTA_EXCEEDED="quota-exceeded",t.UNAUTHENTICATED="unauthenticated",t.UNAUTHORIZED="unauthorized",t.UNAUTHORIZED_APP="unauthorized-app",t.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",t.INVALID_CHECKSUM="invalid-checksum",t.CANCELED="canceled",t.INVALID_EVENT_NAME="invalid-event-name",t.INVALID_URL="invalid-url",t.INVALID_DEFAULT_BUCKET="invalid-default-bucket",t.NO_DEFAULT_BUCKET="no-default-bucket",t.CANNOT_SLICE_BLOB="cannot-slice-blob",t.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",t.NO_DOWNLOAD_URL="no-download-url",t.INVALID_ARGUMENT="invalid-argument",t.INVALID_ARGUMENT_COUNT="invalid-argument-count",t.APP_DELETED="app-deleted",t.INVALID_ROOT_OPERATION="invalid-root-operation",t.INVALID_FORMAT="invalid-format",t.INTERNAL_ERROR="internal-error",t.UNSUPPORTED_ENVIRONMENT="unsupported-environment"})(Wr||(Wr={}));function SE(t){return"storage/"+t}function X3(){const t="An unknown error occurred, please check the error payload for server response.";return new $r(Wr.UNKNOWN,t)}function Age(t){return new $r(Wr.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")}function Tge(t){return new $r(Wr.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function Ige(){const t="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new $r(Wr.UNAUTHENTICATED,t)}function Lge(){return new $r(Wr.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project.")}function Rge(t){return new $r(Wr.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")}function Pge(){return new $r(Wr.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function Dge(){return new $r(Wr.CANCELED,"User canceled the upload/download.")}function Nge(t){return new $r(Wr.INVALID_URL,"Invalid URL '"+t+"'.")}function kge(t){return new $r(Wr.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}function Bge(){return new $r(Wr.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+$G+"' property when initializing the app?")}function Oge(){return new $r(Wr.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function Uge(){return new $r(Wr.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function Fge(t){return new $r(Wr.UNSUPPORTED_ENVIRONMENT,`${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`)}function _I(t){return new $r(Wr.INVALID_ARGUMENT,t)}function JG(){return new $r(Wr.APP_DELETED,"The Firebase app was deleted.")}function jge(t){return new $r(Wr.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function Og(t,e){return new $r(Wr.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function N0(t){throw new $r(Wr.INTERNAL_ERROR,"Internal error: "+t)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class _o{constructor(e,n){this.bucket=e,this.path_=n}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,n){let r;try{r=_o.makeFromUrl(e,n)}catch{return new _o(e,"")}if(r.path==="")return r;throw kge(e)}static makeFromUrl(e,n){let r=null;const i="([A-Za-z0-9.\\-_]+)";function s(S){S.path.charAt(S.path.length-1)==="/"&&(S.path_=S.path_.slice(0,-1))}const o="(/(.*))?$",a=new RegExp("^gs://"+i+o,"i"),l={bucket:1,path:3};function c(S){S.path_=decodeURIComponent(S.path)}const u="v[A-Za-z0-9_]+",f=n.replace(/[.]/g,"\\."),h="(/([^?#]*).*)?$",m=new RegExp(`^https?://${f}/${u}/b/${i}/o${h}`,"i"),v={bucket:1,path:3},w=n===WG?"(?:storage.googleapis.com|storage.cloud.google.com)":n,y="([^?#]*)",g=new RegExp(`^https?://${w}/${i}/${y}`,"i"),x=[{regex:a,indices:l,postModify:s},{regex:m,indices:v,postModify:c},{regex:g,indices:{bucket:1,path:2},postModify:c}];for(let S=0;S{i=null,t(m,l())},y)}function h(){s&&clearTimeout(s)}function m(y,...g){if(c){h();return}if(y){h(),u.call(null,y,...g);return}if(l()||o){h(),u.call(null,y,...g);return}r<64&&(r*=2);let x;a===1?(a=2,x=0):x=(r+Math.random())*1e3,f(x)}let v=!1;function w(y){v||(v=!0,h(),!c&&(i!==null?(y||(a=2),clearTimeout(i),f(0)):y||(a=1)))}return f(0),s=setTimeout(()=>{o=!0,w(!0)},n),w}function Gge(t){t(!1)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Vge(t){return t!==void 0}function Wge(t){return typeof t=="object"&&!Array.isArray(t)}function K3(t){return typeof t=="string"||t instanceof String}function aO(t){return Z3()&&t instanceof Blob}function Z3(){return typeof Blob<"u"}function lO(t,e,n,r){if(rn)throw _I(`Invalid value for '${t}'. Expected ${n} or less.`)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function k2(t,e,n){let r=e;return n==null&&(r=`https://${e}`),`${n}://${r}/v0${t}`}function YG(t){const e=encodeURIComponent;let n="?";for(const r in t)if(t.hasOwnProperty(r)){const i=e(r)+"="+e(t[r]);n=n+i+"&"}return n=n.slice(0,-1),n}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */var rd;(function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"})(rd||(rd={}));/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function $ge(t,e){const n=t>=500&&t<600,i=[408,429].indexOf(t)!==-1,s=e.indexOf(t)!==-1;return n||i||s}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Jge{constructor(e,n,r,i,s,o,a,l,c,u,f,h=!0){this.url_=e,this.method_=n,this.headers_=r,this.body_=i,this.successCodes_=s,this.additionalRetryCodes_=o,this.callback_=a,this.errorCallback_=l,this.timeout_=c,this.progressCallback_=u,this.connectionFactory_=f,this.retry=h,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((m,v)=>{this.resolve_=m,this.reject_=v,this.start_()})}start_(){const e=(r,i)=>{if(i){r(!1,new pw(!1,null,!0));return}const s=this.connectionFactory_();this.pendingConnection_=s;const o=a=>{const l=a.loaded,c=a.lengthComputable?a.total:-1;this.progressCallback_!==null&&this.progressCallback_(l,c)};this.progressCallback_!==null&&s.addUploadProgressListener(o),s.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&s.removeUploadProgressListener(o),this.pendingConnection_=null;const a=s.getErrorCode()===rd.NO_ERROR,l=s.getStatus();if(!a||$ge(l,this.additionalRetryCodes_)&&this.retry){const u=s.getErrorCode()===rd.ABORT;r(!1,new pw(!1,null,u));return}const c=this.successCodes_.indexOf(l)!==-1;r(!0,new pw(c,s))})},n=(r,i)=>{const s=this.resolve_,o=this.reject_,a=i.connection;if(i.wasSuccessCode)try{const l=this.callback_(a,a.getResponse());Vge(l)?s(l):s()}catch(l){o(l)}else if(a!==null){const l=X3();l.serverResponse=a.getErrorText(),this.errorCallback_?o(this.errorCallback_(a,l)):o(l)}else if(i.canceled){const l=this.appDelete_?JG():Dge();o(l)}else{const l=Pge();o(l)}};this.canceled_?n(!1,new pw(!1,null,!0)):this.backoffId_=Hge(e,n,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,this.backoffId_!==null&&Gge(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}}class pw{constructor(e,n,r){this.wasSuccessCode=e,this.connection=n,this.canceled=!!r}}function Yge(t,e){e!==null&&e.length>0&&(t.Authorization="Firebase "+e)}function Qge(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(e??"AppManager")}function Xge(t,e){e&&(t["X-Firebase-GMPID"]=e)}function Kge(t,e){e!==null&&(t["X-Firebase-AppCheck"]=e)}function Zge(t,e,n,r,i,s,o=!0){const a=YG(t.urlParams),l=t.url+a,c=Object.assign({},t.headers);return Xge(c,e),Yge(c,n),Qge(c,s),Kge(c,r),new Jge(l,t.method,c,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,i,o)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function qge(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}function e1e(...t){const e=qge();if(e!==void 0){const n=new e;for(let r=0;r"u")throw Fge("base-64");return atob(t)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const el={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class CE{constructor(e,n){this.data=e,this.contentType=n||null}}function r1e(t,e){switch(t){case el.RAW:return new CE(QG(e));case el.BASE64:case el.BASE64URL:return new CE(XG(t,e));case el.DATA_URL:return new CE(s1e(e),o1e(e))}throw X3()}function QG(t){const e=[];for(let n=0;n>6,128|r&63);else if((r&64512)===55296)if(!(n>18,128|r>>12&63,128|r>>6&63,128|r&63)}else(r&64512)===56320?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|r&63)}return new Uint8Array(e)}function i1e(t){let e;try{e=decodeURIComponent(t)}catch{throw Og(el.DATA_URL,"Malformed data URL.")}return QG(e)}function XG(t,e){switch(t){case el.BASE64:{const i=e.indexOf("-")!==-1,s=e.indexOf("_")!==-1;if(i||s)throw Og(t,"Invalid character '"+(i?"-":"_")+"' found: is it base64url encoded?");break}case el.BASE64URL:{const i=e.indexOf("+")!==-1,s=e.indexOf("/")!==-1;if(i||s)throw Og(t,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=n1e(e)}catch(i){throw i.message.includes("polyfill")?i:Og(t,"Invalid character found")}const r=new Uint8Array(n.length);for(let i=0;i][;base64],");const r=n[1]||null;r!=null&&(this.base64=a1e(r,";base64"),this.contentType=this.base64?r.substring(0,r.length-7):r),this.rest=e.substring(e.indexOf(",")+1)}}function s1e(t){const e=new KG(t);return e.base64?XG(el.BASE64,e.rest):i1e(e.rest)}function o1e(t){return new KG(t).contentType}function a1e(t,e){return t.length>=e.length?t.substring(t.length-e.length)===e:!1}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class qc{constructor(e,n){let r=0,i="";aO(e)?(this.data_=e,r=e.size,i=e.type):e instanceof ArrayBuffer?(n?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),r=this.data_.length):e instanceof Uint8Array&&(n?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),r=e.length),this.size_=r,this.type_=i}size(){return this.size_}type(){return this.type_}slice(e,n){if(aO(this.data_)){const r=this.data_,i=t1e(r,e,n);return i===null?null:new qc(i)}else{const r=new Uint8Array(this.data_.buffer,e,n-e);return new qc(r,!0)}}static getBlob(...e){if(Z3()){const n=e.map(r=>r instanceof qc?r.data_:r);return new qc(e1e.apply(null,n))}else{const n=e.map(o=>K3(o)?r1e(el.RAW,o).data:o.data_);let r=0;n.forEach(o=>{r+=o.byteLength});const i=new Uint8Array(r);let s=0;return n.forEach(o=>{for(let a=0;ar.length>0).join("/");return t.length===0?n:t+"/"+n}function qG(t){const e=t.lastIndexOf("/",t.length-2);return e===-1?t:t.slice(e+1)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function u1e(t,e){return e}class As{constructor(e,n,r,i){this.server=e,this.local=n||e,this.writable=!!r,this.xform=i||u1e}}let mw=null;function f1e(t){return!K3(t)||t.length<2?t:qG(t)}function eV(){if(mw)return mw;const t=[];t.push(new As("bucket")),t.push(new As("generation")),t.push(new As("metageneration")),t.push(new As("name","fullPath",!0));function e(s,o){return f1e(o)}const n=new As("name");n.xform=e,t.push(n);function r(s,o){return o!==void 0?Number(o):o}const i=new As("size");return i.xform=r,t.push(i),t.push(new As("timeCreated")),t.push(new As("updated")),t.push(new As("md5Hash",null,!0)),t.push(new As("cacheControl",null,!0)),t.push(new As("contentDisposition",null,!0)),t.push(new As("contentEncoding",null,!0)),t.push(new As("contentLanguage",null,!0)),t.push(new As("contentType",null,!0)),t.push(new As("metadata","customMetadata",!0)),mw=t,mw}function d1e(t,e){function n(){const r=t.bucket,i=t.fullPath,s=new _o(r,i);return e._makeStorageReference(s)}Object.defineProperty(t,"ref",{get:n})}function h1e(t,e,n){const r={};r.type="file";const i=n.length;for(let s=0;s{const u=t.bucket,f=t.fullPath,h="/b/"+o(u)+"/o/"+o(f),m=k2(h,n,r),v=YG({alt:"media",token:c});return m+v})[0]}function m1e(t,e){const n={},r=e.length;for(let i=0;i{this.xhr_.addEventListener("abort",()=>{this.errorCode_=rd.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=rd.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,n,r,i){if(this.sent_)throw N0("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(n,e,!0),i!==void 0)for(const s in i)i.hasOwnProperty(s)&&this.xhr_.setRequestHeader(s,i[s].toString());return r!==void 0?this.xhr_.send(r):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw N0("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw N0("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw N0("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw N0("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",e)}}class S1e extends b1e{initXhr(){this.xhr_.responseType="text"}}function eR(){return new S1e}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Cd{constructor(e,n){this._service=e,n instanceof _o?this._location=n:this._location=_o.makeFromUrl(n,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,n){return new Cd(e,n)}get root(){const e=new _o(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return qG(this._location.path)}get storage(){return this._service}get parent(){const e=l1e(this._location.path);if(e===null)return null;const n=new _o(this._location.bucket,e);return new Cd(this._service,n)}_throwIfRoot(e){if(this._location.path==="")throw jge(e)}}function C1e(t,e,n){t._throwIfRoot("uploadBytes");const r=x1e(t.storage,t._location,eV(),new qc(e,!0),n);return t.storage.makeRequestWithTokens(r,eR).then(i=>({metadata:i,ref:t}))}function E1e(t){t._throwIfRoot("getDownloadURL");const e=y1e(t.storage,t._location,eV());return t.storage.makeRequestWithTokens(e,eR).then(n=>{if(n===null)throw Uge();return n})}function A1e(t){t._throwIfRoot("deleteObject");const e=w1e(t.storage,t._location);return t.storage.makeRequestWithTokens(e,eR)}function T1e(t,e){const n=c1e(t._location.path,e),r=new _o(t._location.bucket,n);return new Cd(t.storage,r)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function I1e(t){return/^[A-Za-z]+:\/\//.test(t)}function L1e(t,e){return new Cd(t,e)}function sV(t,e){if(t instanceof tR){const n=t;if(n._bucket==null)throw Bge();const r=new Cd(n,n._bucket);return e!=null?sV(r,e):r}else return e!==void 0?T1e(t,e):t}function R1e(t,e){if(e&&I1e(e)){if(t instanceof tR)return L1e(t,e);throw _I("To use ref(service, url), the first argument must be a Storage instance.")}else return sV(t,e)}function cO(t,e){const n=e==null?void 0:e[$G];return n==null?null:_o.makeFromBucketSpec(n,t)}function P1e(t,e,n,r={}){t.host=`${e}:${n}`,t._protocol="http";const{mockUserToken:i}=r;i&&(t._overrideAuthToken=typeof i=="string"?i:h8(i,t.app.options.projectId))}class tR{constructor(e,n,r,i,s){this.app=e,this._authProvider=n,this._appCheckProvider=r,this._url=i,this._firebaseVersion=s,this._bucket=null,this._host=WG,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=Cge,this._maxUploadRetryTime=Ege,this._requests=new Set,i!=null?this._bucket=_o.makeFromBucketSpec(i,this._host):this._bucket=cO(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,this._url!=null?this._bucket=_o.makeFromBucketSpec(this._url,e):this._bucket=cO(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){lO("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){lO("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const n=await e.getToken();if(n!==null)return n.accessToken}return null}async _getAppCheckToken(){const e=this._appCheckProvider.getImmediate({optional:!0});return e?(await e.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new Cd(this,e)}_makeRequest(e,n,r,i,s=!0){if(this._deleted)return new zge(JG());{const o=Zge(e,this._appId,r,i,n,this._firebaseVersion,s);return this._requests.add(o),o.getPromise().then(()=>this._requests.delete(o),()=>this._requests.delete(o)),o}}async makeRequestWithTokens(e,n){const[r,i]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,n,r,i).getPromise()}}const uO="@firebase/storage",fO="0.12.6";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const oV="storage";function D1e(t,e,n){return t=mr(t),C1e(t,e,n)}function N1e(t){return t=mr(t),E1e(t)}function k1e(t){return t=mr(t),A1e(t)}function aV(t,e){return t=mr(t),R1e(t,e)}function B1e(t=G4(),e){t=mr(t);const r=f2(t,oV).getImmediate({identifier:e}),i=u8("storage");return i&&O1e(r,...i),r}function O1e(t,e,n,r={}){P1e(t,e,n,r)}function U1e(t,{instanceIdentifier:e}){const n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal"),i=t.getProvider("app-check-internal");return new tR(n,r,i,e,Bd)}function F1e(){wd(new _u(oV,U1e,"PUBLIC").setMultipleInstances(!0)),sl(uO,fO,""),sl(uO,fO,"esm2017")}F1e();const lV=B1e(F3);async function MI(t,e=[]){try{if(!e.length)return[];const{user:n}=Ms.getState(),r=Array.from(e).map(async i=>new Promise(s=>{const o=aV(lV,[...t,i.name+"-"+n.uid+new Date().toISOString()].join("/"));D1e(o,i).then(a=>{N1e(a.ref).then(l=>{s(l)})})}));return Promise.all(r)}catch(n){console.error(n)}}async function dO(t){try{const e=aV(lV,t.join("/"));await k1e(e)}catch(e){return{type:"error",error:e}}}cV.propTypes={open:Cn.bool,onClose:Cn.func};function cV({open:t,onClose:e}){const{user:n,setUser:r}=Ms(),[i,s]=I.useState(n),[o,a]=I.useState(),[l,c]=I.useState(!1),[u,f]=I.useState(!1),h=()=>y=>s({...i,displayName:y.target.value}),m=()=>y=>s({...i,phoneNumber:y.target.value}),v=y=>{const g=y.target.files[0];if(c(!1),!FileReader)return;if(!g){c(!0),a(null),s({...i,photoURL:null});return}a(g);const _=new FileReader;_.onload=()=>{s({...i,photoURL:_.result})},_.readAsDataURL(g)},w=async()=>{const y=i;if(o){await dO([n.photoURL]);const[g]=await MI(["avatars"],[o]);y.photoURL=g}else l&&await dO([n.photoURL]);await cl(["users",n.uid],y),await cl(["chats"],{["users."+[n.uid]]:y},{wheres:[["pair","array-contains",n.uid]]}),r(y),f(!0),e(),setTimeout(()=>{f(!1)},2e3)};return O.jsxs(O.Fragment,{children:[O.jsxs(z5,{open:t,onClose:e,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[O.jsx(V5,{id:"alert-dialog-title",children:"Edit profile"}),O.jsxs(j1e,{sx:{overflow:"visible"},children:[O.jsxs(H1e,{children:[O.jsxs(z1e,{htmlFor:"avatar",children:[O.jsx(mc,{src:i.photoURL,size:80}),O.jsx(G1e,{})]}),O.jsx(V1e,{type:"file",name:"avatar",id:"avatar",onChange:v,accept:".png, .jpg, .jpeg, .webp, .avif, .heic, .gif"})]}),O.jsx(Zc,{id:"username",placeholder:"Username",value:i.displayName,onChange:h()}),O.jsx(Zc,{id:"phone",placeholder:"Phone",value:i.phoneNumber||"",onChange:m()})]}),O.jsxs(H5,{children:[O.jsx(FM,{onClick:e,children:"Cancel"}),O.jsx(FM,{onClick:w,autoFocus:!0,children:"Confirm"})]})]}),O.jsx(e8,{open:u,children:O.jsx(k5,{severity:"success",children:"Profile changed!"})})]})}const j1e=Be(G5)` + display: flex; + flex-direction: column; + align-items: start; + row-gap: 15px; +`,z1e=Be.label` + cursor: pointer; +`,H1e=Be.div` + position: relative; + + .avatar { + transition: all 0.3s ease 0s; + } + + @media (any-hover: hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + & svg { + opacity: 1; + } + + & .avatar { + filter: brightness(0.5); + } + } + } +`,G1e=Be(VG)` + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + font-size: 40px; + opacity: 0; + z-index: 2; +`,V1e=Be.input` + display: none; +`;uV.propTypes={open:Cn.bool,toggle:Cn.func};function uV({open:t,toggle:e}){const{user:n}=Ms(),[r,i]=I.useState(!1),[s,o]=I.useState(!1);function a(){i(!0),setTimeout(()=>{i(!1)},2e3)}return O.jsxs(O.Fragment,{children:[O.jsx(cV,{open:s,onClose:()=>o(!1)}),O.jsx(nle,{sx:{paper:{background:"red"}},swipeAreaWidth:5,open:t,anchor:"left",onOpen:e(!0),onClose:e(!1),PaperProps:{sx:{backgroundColor:Dn.$colorAside,backgroundImage:"none"}},children:O.jsx(W1e,{role:"presentation",children:n&&O.jsxs($1e,{children:[O.jsxs(X1e,{justifyBetween:!0,itemsStart:!0,children:[O.jsx(Q1e,{size:80,current:!0}),O.jsx(K1e,{onClick:()=>o(!0)})]}),O.jsx(J1e,{children:n.displayName}),O.jsx(pge.CopyToClipboard,{text:n.tag,onCopy:a,children:O.jsx(Y1e,{className:r&&"copied",children:n.tag})}),O.jsx(e8,{open:r,children:O.jsx(k5,{severity:"success",children:"Tag copied!"})})]})})})]})}const W1e=Be(zie)` + width: 300px; + padding: 10px 0; + overflow: hidden; +`,$1e=Be.div` + display: flex; + flex-direction: column; + row-gap: 5px; + padding: 0 15px; +`,J1e=Be.span` + color: #fff; + font-size: 18px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +`,Y1e=Be.span` + color: ${Dn.$colorMain}; + font-size: 16px; + user-select: none; + transition: all 0.3s ease 0s; + + &.copied { + color: ${Dn.$colorSuccess}; + } + + @media (any-hover: hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + text-decoration: underline; + } + } +`,Q1e=Be(mc)` + margin-bottom: 5px; +`,X1e=Be.div(t=>` + display: flex; + ${t.justifyBetween&&"justify-content: space-between;"||t.justifyAround&&"justify-content: space-around;"||t.justifyEvenly&&"justify-content: space-evenly;"} + ${t.itemsCenter&&"align-items: center;"||t.itemsStart&&"align-items: flex-start;"||t.itemsEnd&&"align-items: flex-end;"} + `),K1e=Be(GG)` + padding: 5px; + border-radius: 50%; + font-size: 33px; + + @media (any-hover: hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + background-color: rgba(124, 124, 124, 0.3); + } + } + + &:active { + background-color: rgba(124, 124, 124, 0.5); + } +`;nR.propTypes={size:Cn.number,sx:Cn.object};function nR({size:t,...e}){return O.jsx(W5,{sx:{width:"100%",height:t,background:"rgba(255, 255, 255, 0.12)",...e.sx}})}function Z1e(){const[t,e]=I.useState(!1),{logOut:n}=Ms(),{setChatList:r,setSidebar:i}=Om(),s=yl(),o=c=>()=>{e(c)};function a(){n(),s("/authentication")}function l(c){c(),i(!0)}return O.jsxs(q1e,{children:[O.jsx(uV,{open:t,toggle:o}),O.jsx(gw,{onClick:o(!0),children:O.jsx(UG,{})}),O.jsx(gw,{onClick:()=>l(()=>r(!0)),children:O.jsx(BG,{})}),O.jsx(gw,{onClick:()=>l(()=>r(!1)),children:O.jsx(OG,{})}),O.jsx(nR,{}),O.jsx(gw,{onClick:a,children:O.jsx(FG,{})})]})}const q1e=Be.aside` + display: flex; + flex-direction: column; + align-items: center; + ${_l("padding",5,0,10,6)} + + row-gap: 10px; + background: color-mix(in srgb, ${Dn.$colorAside}, #111); +`,eve=wl` + svg { + font-size: 30px; + } +`,gw=Be.button` + display: flex; + align-items: center; + justify-content: center; + padding: 4px; + cursor: pointer; + border-radius: 5px; + ${eve} + + @media (any-hover: hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + background: #2d364b; + } + } +`;var rR={},tve=Ur;Object.defineProperty(rR,"__esModule",{value:!0});var fV=rR.default=void 0,nve=tve(si()),rve=O;fV=rR.default=(0,nve.default)((0,rve.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done");var iR={},ive=Ur;Object.defineProperty(iR,"__esModule",{value:!0});var dV=iR.default=void 0,sve=ive(si()),ove=O;dV=iR.default=(0,sve.default)((0,ove.jsx)("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"}),"DoneAll");hV.propTypes={chat:Cn.object};function hV({chat:t,...e}){const{user:n}=Ms(),r=I.useRef(t.users[t.pair.filter(i=>i!=n.uid)[0]]);return O.jsxs(ave,{...e,children:[O.jsx(lve,{user:r.current,size:60,adaptiv:!0,alt:r.current.displayName}),O.jsxs(cve,{children:[O.jsxs(uve,{children:[O.jsx(fve,{children:r.current.displayName}),O.jsx(dve,{children:t.lastMessage.text})]}),O.jsxs(hve,{children:[O.jsx(pve,{children:t.lastMessage.date.toDate().toLocaleTimeString().split(":").slice(0,2).join(":")}),t.lastMessage.check?O.jsx(hO,{as:dV}):O.jsx(hO,{as:fV})]})]})]})}const ave=Be(l2)` + display: flex; + align-items: center; + width: 100%; + ${En("column-gap",15,10,1)} + ${_l("padding",8,8,16,8)} + + @media (any-hover:hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + background-color: #222233; + } + } +`,lve=Be(mc)` + width: 60px; + height: 60px; +`,cve=Be.div` + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + overflow: hidden; +`,uve=Be.div` + display: flex; + flex-direction: column; + max-width: 80%; +`,fve=Be.span` + ${En("font-size",16,14,1)} + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +`,dve=Be.span` + color: ${Dn.$colorMain}; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +`,hve=Be.div` + display: flex; + flex-direction: column; + align-items: flex-end; +`,pve=Be.div` + ${En("font-size",16,14,1)} +`,hO=Be.div` + ${En("font-size",22,18,1)} + color:${Dn.$colorMain} +`;function mve(){const[t,e]=I.useState([]),{user:n}=Ms(),{chat:r,setChat:i,setUser:s}=Fa(),o=yl(),[a,l]=I.useState(!1),c=I.useRef(null),u=I.useRef(!1),f=I.useRef(null);I.useEffect(()=>{let m=!0;return EG(["chats"],w=>{const y=w.docChanges();if(y.length)l(!1);else{l(!0),m=!1;return}if(m){m=!1,e(y.map(g=>g.doc.data())),f.current=y[y.length-1].doc;return}e(g=>{const _=[...g];return y.forEach(x=>{x.type=="added"?_.unshift(x.doc.data()):x.type=="modified"&&(_.findIndex(S=>S.id==x.doc.id)<0?_.unshift(x.doc.data()):_[_.findIndex(S=>S.id==x.doc.id)]=x.doc.data())}),_.sort((x,S)=>S.lastMessage.date.seconds-x.lastMessage.date.seconds),_})},{wheres:[["pair","array-contains",n.uid]],other:[rx(30),nx("lastMessage.date","desc")]})},[n.uid]),I.useEffect(()=>{const m=c.current;async function v(w){const y=w.target,g=w.target.scrollTop;if(f.current&&!u.current&&g+y.offsetHeight>=y.scrollHeight-350){u.current=!0;const{data:_,last:x}=await tc(["chats"],{wheres:[["pair","array-contains",n.uid]],other:[rx(30),nx("lastMessage.date","desc"),yG(f.current)]},{last:!0});e([...t,..._]),f.current=x,u.current=!1}}return m.addEventListener("scroll",v),()=>{m.removeEventListener("scroll",v)}},[t,n.uid]);const h=m=>()=>{if((r==null?void 0:r.id)==m.id){i(m);return}const v=m.users[m.pair.filter(w=>w!=n.uid)[0]];i(m),s(v),o("/chat/"+m.id)};return O.jsx(O.Fragment,{children:O.jsx(gve,{ref:c,children:a?O.jsx(vve,{children:"No chats"}):t.map(m=>O.jsx(hV,{onClick:h(m),chat:m},m.id))})})}const gve=Be(uv)` + width: 100%; + overflow: auto; + ${xb(5,"#252c41","transparent",50)} +`,vve=Be.div` + display: flex; + align-items: center; + justify-content: center; + font-size: 28px; + height: 100%; +`;var sR={},yve=Ur;Object.defineProperty(sR,"__esModule",{value:!0});var pV=sR.default=void 0,wve=yve(si()),_ve=O;pV=sR.default=(0,wve.default)((0,_ve.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");var oR={},Mve=Ur;Object.defineProperty(oR,"__esModule",{value:!0});var mV=oR.default=void 0,xve=Mve(si()),bve=O;mV=oR.default=(0,xve.default)((0,bve.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");xI.propTypes={invite:Cn.bool,user:Cn.object,onAccept:Cn.func,onReject:Cn.func};function xI({invite:t,user:e,onAccept:n,onReject:r,...i}){return O.jsx(Sve,{invite:t,children:O.jsxs(Cve,{...i,children:[O.jsxs(Eve,{children:[O.jsx(mc,{user:e}),O.jsx(Ave,{children:e.displayName})]}),t&&O.jsxs(Tve,{children:[O.jsx(Ive,{onClick:n,children:O.jsx(pV,{sx:pO})}),O.jsx(Lve,{onClick:r,children:O.jsx(mV,{sx:pO})})]})]})})}const Sve=Be.div` + ${({invite:t})=>!t&&`@media (any-hover:hover){ + &{ + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover{ + background:#293248; + } + }`} +`,Cve=Be(l2)` + display: flex; + justify-content: space-between; + column-gap: 10px; +`,Eve=Be.div` + display: flex; + column-gap: 10px; + align-items: center; + overflow: hidden; +`,Ave=Be.span` + font-size: 20px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +`,Tve=Be.div` + display: flex; + align-items: center; + column-gap: 10px; +`,gV=Be.button` + padding: 5px; + border-radius: 50%; + border: 1px solid #464646; + @media (any-hover: hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + transform: translateY(-2px); + } + } +`,pO=wl` + font-size: 30px; +`,Ive=Be(gV)` + color: ${Dn.$colorSuccess}; + + @media (any-hover: hover) { + &:hover { + box-shadow: inset 0 0 0 2px ${Dn.$colorSuccess}; + } + } +`,Lve=Be(gV)` + color: ${Dn.$colorError}; + + @media (any-hover: hover) { + &:hover { + box-shadow: inset 0 0 0 2px ${Dn.$colorError}; + } + } +`;var aR={},Rve=Ur;Object.defineProperty(aR,"__esModule",{value:!0});var vV=aR.default=void 0,Pve=Rve(si()),Dve=O;vV=aR.default=(0,Pve.default)((0,Dve.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");function Nve(){const{user:t,setUser:e}=Ms(),{setUser:n,setChat:r,chat:i}=Fa(),[s,o]=I.useState([]),[a,l]=I.useState([]),[c,u]=I.useState(!1),[f,h]=I.useState(!1),m=yl();I.useEffect(()=>{async function x(){l((await tc(["users"],{wheres:[["uid","in",t.invitations]]})).data)}async function S(){o((await tc(["users"],{wheres:[["uid","in",t.friends]]})).data)}t.invitations.length&&x(),t.friends.length&&S()},[t.invitations,t.friends]),I.useEffect(()=>{u(localStorage.getItem("invitationsAccordion")=="true"),h(localStorage.getItem("friendsAccordion")=="true")},[]);function v(x,S){u(S),localStorage.setItem("invitationsAccordion",S)}function w(x,S){h(S),localStorage.setItem("friendsAccordion",S)}function y(x){return async()=>{const S=await cl(["users",t.uid],{invitations:ix(x),friends:gI(x)});await cl(["users",x],{friends:gI(t.uid)}),l(a.filter(D=>D.uid!=x)),e(S)}}function g(x){return async()=>{const S=await cl(["users",t.uid],{invitations:ix(x)});l(a.filter(D=>D.uid!=x)),e(S)}}function _(x){return async()=>{if(i&&i.pair.includes(x.uid)&&i.pair.includes(t.uid))return;const S=[x.uid,t.uid],D=(await tc(["chats"],{ors:[{wheres:[["pair","==",S],["pair","==",S.toReversed()]]}]})).data[0];r(D),n(x),m(D?`/chat/${D.id}`:`/friend/${x.uid}`)}}return O.jsxs(O.Fragment,{children:[O.jsxs(mO,{expanded:!!(c&&a.length),onChange:v,children:[O.jsxs(gO,{expandIcon:!!a.length&&O.jsx(vO,{}),children:["Friend invitations (",t.invitations.length,")"]}),O.jsx(yO,{children:O.jsx(wO,{children:a.map(x=>O.jsx(xI,{invite:!0,user:x,onAccept:y(x.uid),onReject:g(x.uid)},x.uid))})})]}),O.jsx(nR,{size:3}),O.jsxs(mO,{expanded:!!(f&&s.length),onChange:w,children:[O.jsxs(gO,{expandIcon:!!s.length&&O.jsx(vO,{}),children:["Friends (",t.friends.length,")"]}),O.jsx(yO,{children:O.jsx(wO,{children:s.map(x=>O.jsx(xI,{user:x,onClick:_(x)},x.uid))})})]})]})}const mO=Be(jne)` + background: transparent; + &, + &.Mui-expanded { + margin: 0; + } +`,gO=Be(dre)` + &, + &.Mui-expanded { + min-height: auto; + } + & .MuiAccordionSummary-content, + & .MuiAccordionSummary-content.Mui-expanded { + margin: 5px 0; + } +`,vO=Be(vV)` + font-size: 25px; +`,yO=Be(Wne)` + padding: 0; +`,wO=Be(uv)` + width: 100%; +`;function kve(){const{chatList:t,sidebar:e}=Om();return O.jsxs(Bve,{sidebar:e,children:[O.jsx(Z1e,{}),O.jsxs(Ove,{children:[O.jsx(E0e,{}),t?O.jsx(mve,{}):O.jsx(Nve,{})]})]})}const Bve=Be.aside` + width: 100%; + max-width: 400px; + background: ${Dn.$colorAside}; + display: flex; + user-select: none; + @media (max-width: 960px) { + max-width: 100%; + ${({sidebar:t})=>!t&&"display:none;"} + } +`,Ove=Be.div` + display: flex; + flex-direction: column; + overflow: hidden; + width: 100%; +`;yV.propTypes={children:Cn.oneOfType([Cn.element,Cn.string,Cn.number])};function yV({children:t,...e}){const[n,r]=I.useState(".");return I.useEffect(()=>{const i=setInterval(()=>r(s=>s.length==3?".":s+"."),300);return()=>clearInterval(i)},[n]),O.jsxs(O.Fragment,{children:[O.jsx("svg",{width:0,height:0,children:O.jsx("defs",{children:O.jsxs("linearGradient",{id:"my_gradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[O.jsx("stop",{offset:"0%",stopColor:"#08d2f6"}),O.jsx("stop",{offset:"100%",stopColor:"#1b66a9"})]})})}),O.jsxs(Uve,{children:[O.jsx(ise,{sx:{"svg circle":{stroke:"url(#my_gradient)"}},...e}),t&&O.jsxs(Fve,{children:[t,n]})]})]})}const Uve=Be.div` + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + flex: 1 1 auto; + row-gap: 10px; +`,Fve=Be.span` + font-size: 25px; + letter-spacing: 5px; +`;wV.propTypes={children:Cn.element};function wV({children:t}){const{user:e}=Ms();return O.jsx(O.Fragment,{children:e!==null?O.jsx(O.Fragment,{children:e?O.jsx(O.Fragment,{children:t}):O.jsx(yV,{size:100,children:"Loading"})}):O.jsx(VK,{to:"/authentication"})})}function jve(){const{userSidebar:t}=Om(),{user:e}=Fa();return O.jsx(wV,{children:O.jsxs("div",{className:"app",children:[O.jsx(kve,{}),O.jsx(WK,{}),t&&e&&O.jsx(e0e,{})]})})}function zve(){const t=Ez();console.error(t);const e=yl();return O.jsx(O.Fragment,{children:O.jsxs("div",{className:"error",children:[O.jsx("div",{className:"noise"}),O.jsx("div",{className:"overlay"}),O.jsxs("div",{className:"terminal",children:[O.jsxs("h1",{children:["Error ",O.jsx("span",{className:"errorcode",children:"404"})]}),O.jsx("p",{className:"output",children:"The page you are looking for might have been removed, had its name changed or is temporarily unavailable."}),O.jsxs("p",{className:"output",children:["Please try to"," ",O.jsx("span",{className:"link",onClick:()=>e(-1),children:"go back"})," ","or"," ",O.jsx("span",{className:"link",onClick:()=>e("/"),children:"return to the homepage"}),"."]}),O.jsx("p",{className:"output",children:"Good luck."})]})]})})}const _V="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24'%20viewBox='0%200%2024%2024'%20width='24'%3e%3cpath%20d='M22.56%2012.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26%201.37-1.04%202.53-2.21%203.31v2.77h3.57c2.08-1.92%203.28-4.74%203.28-8.09z'%20fill='%234285F4'/%3e%3cpath%20d='M12%2023c2.97%200%205.46-.98%207.28-2.66l-3.57-2.77c-.98.66-2.23%201.06-3.71%201.06-2.86%200-5.29-1.93-6.16-4.53H2.18v2.84C3.99%2020.53%207.7%2023%2012%2023z'%20fill='%2334A853'/%3e%3cpath%20d='M5.84%2014.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43%208.55%201%2010.22%201%2012s.43%203.45%201.18%204.93l2.85-2.22.81-.62z'%20fill='%23FBBC05'/%3e%3cpath%20d='M12%205.38c1.62%200%203.06.56%204.21%201.64l3.15-3.15C17.45%202.09%2014.97%201%2012%201%207.7%201%203.99%203.47%202.18%207.07l3.66%202.84c.87-2.6%203.3-4.53%206.16-4.53z'%20fill='%23EA4335'/%3e%3cpath%20d='M1%201h22v22H1z'%20fill='none'/%3e%3c/svg%3e";bI.propTypes={children:Cn.oneOfType([Cn.number,Cn.string,Cn.element]),onClick:Cn.func};function bI({children:t,onClick:e=()=>{},...n}){return O.jsx(Hve,{onClick:r=>{r.preventDefault(),e()},...n,children:t})}const Hve=Be.button` + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + ${En("font-size",20,18,1)} + ${_l("padding",8,4,10,5)} + background: #2c2c50; + border-radius: 5px; + + @media (any-hover: hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + background: #3a3a66; + } + } + + &:disabled { + color: #9b9b9b; + background: #23233a; + cursor: not-allowed; + } +`;function Gve(){const[t,e]=I.useState(!0),[n,r]=I.useState(""),[i,s]=I.useState(""),[o,a]=I.useState(""),[l,c]=I.useState({}),u=yl();function f(g){e(g),h()}function h(){r(""),s(""),c({}),a("")}const m=!(n.trim()&&i.trim());async function v(){c({});const g=await Qme({email:n,password:i},()=>u("/"));g&&g.type=="error"&&c(g.errors)}async function w(){c({});const g=await Yme({email:n,password:i,confirmPassword:o},()=>u("/"));g&&g.type=="error"&&c(g.errors)}function y(){LG(()=>u("/"))}return O.jsxs(Vve,{children:[O.jsxs(Wve,{login:t,children:[O.jsx(_O,{onClick:()=>f(!0),children:"Log in"}),O.jsx(_O,{onClick:()=>f(!1),children:"Sig up"})]}),O.jsxs($ve,{onClick:y,children:[O.jsx(Jve,{children:"Authentication with Google"}),O.jsx(Yve,{src:_V,alt:"google auth"})]}),t?O.jsxs(MO,{children:[O.jsx(Zc,{error:l.email,name:"email",placeholder:"Email",value:n,onChange:g=>r(g.target.value)}),O.jsx(Zc,{type:"password",error:l.password,name:"password",placeholder:"Password",value:i,onChange:g=>s(g.target.value)}),O.jsx(bI,{disabled:m,onClick:v,children:"Log in"})]}):O.jsxs(MO,{children:[O.jsx(Zc,{error:l.email,name:"email",placeholder:"Email",value:n,onChange:g=>r(g.target.value)}),O.jsx(Zc,{type:"password",error:l.password,name:"password",placeholder:"Password",value:i,onChange:g=>s(g.target.value)}),O.jsx(Zc,{type:"password",error:l.confirmPassword,name:"confirmPassword",placeholder:"Confirm password",value:o,onChange:g=>a(g.target.value)}),O.jsx(bI,{disabled:m||!o.trim(),onClick:w,children:"Sign up"})]})]})}const Vve=Be.div` + display: flex; + flex-direction: column; + width: 100%; + max-width: 400px; + ${En("padding",30,6,1)} + background-color:#1d1d38; + border-radius: 10px; +`,Wve=Be.div(t=>` + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + padding: 5px; + background-color: #16162b; + border-radius: 5px; + overflow: hidden; + position: relative; + ${En("margin-bottom",15,10,1)} + + &::before { + content: ''; + position: absolute; + z-index: 1; + background: #252544; + width: calc(50% - 10px); + height: calc(100% - 4px * 2); + left: 5px; + top: 4px; + border-radius: 5px; + transition: all 0.3s ease 0s; + ${!t.login&&"left: calc(50% + 5px)"} + } +`),_O=Be.div` + text-align: center; + ${En("font-size",25,20,1)} + position: relative; + z-index: 2; + width: 100%; + cursor: pointer; +`,$ve=Be.button` + align-self: center; + width: 100%; + max-width: 300px; + background: #303055; + border-radius: 10px; + padding: 6px 10px; + display: flex; + align-items: center; + justify-content: center; + column-gap: 20px; + margin-bottom: 10px; + + @media (any-hover: hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + transform: translateY(3px); + } + } +`,Jve=Be.span` + ${En("font-size",18,16,1)} +`,Yve=Be.img` + width: 100%; + max-width: 30px; +`,MO=Be.form` + display: flex; + flex-direction: column; + row-gap: 10px; +`;function Qve(){return O.jsx(Xve,{children:O.jsx(Gve,{})})}const Xve=Be.div` + display: flex; + justify-content: center; + align-items: center; + flex: 1 1 auto; + padding: 0 10px; +`;var lR={},Kve=Ur;Object.defineProperty(lR,"__esModule",{value:!0});var MV=lR.default=void 0,Zve=Kve(si()),qve=O;MV=lR.default=(0,Zve.default)((0,qve.jsx)("path",{d:"M14.59 7.41 18.17 11H6v2h12.17l-3.59 3.59L16 18l6-6-6-6zM2 6v12h2V6z"}),"StartOutlined");var cR={},eye=Ur;Object.defineProperty(cR,"__esModule",{value:!0});var xV=cR.default=void 0,tye=eye(si()),nye=O;xV=cR.default=(0,tye.default)((0,nye.jsx)("path",{d:"M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z"}),"KeyboardBackspace");function rye(){const{user:t,setChat:e,setUser:n}=Fa(),{userSidebar:r,setUserSidebar:i,setSidebar:s}=Om(),o=yl();function a(){e(null),n(null),s(!0),o("/")}return O.jsxs(iye,{children:[O.jsx(uye,{onClick:a}),O.jsxs(sye,{onClick:()=>i(!r),children:[O.jsx(mc,{size:60,user:t,adaptiv:!0}),O.jsx(oye,{children:O.jsx(lye,{children:t.displayName})})]}),O.jsx(cye,{onClick:()=>i(!r),sx:{transform:!r&&"scaleX(-1)"}})]})}const iye=Be.div` + user-select: none; + background-color: ${Dn.$colorChat}; + display: flex; + align-items: center; + justify-content: space-between; + ${_l("padding",10,6,20,10)} + column-gap: 10px; +`,sye=Be.div` + display: flex; + ${En("column-gap",20,5,1)} + align-items: center; + width: 100%; + overflow: hidden; + @media (any-hover: hover) { + & { + cursor: pointer; + } + } +`,oye=Be.div` + display: flex; + flex-direction: column; + overflow: hidden; +`,aye=wl` + ${En("font-size",18,16,1)} +`,lye=Be.span` + ${aye} + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +`,cye=Be(MV)` + ${En("font-size",30,25,1)} + + @media (any-hover:hover) { + & { + cursor: pointer; + transition: color 0.3s ease 0s; + } + &:hover { + color: ${Dn.$colorMain}; + } + } + + @media (max-width: 1140px) { + display: none; + } +`,uye=Be(xV)` + display: none; + ${En("font-size",35,27,1,null,960)} + + @media (max-width: 960px) { + display: block; + } +`;var uR={},fye=Ur;Object.defineProperty(uR,"__esModule",{value:!0});var bV=uR.default=void 0,dye=fye(si()),hye=O;bV=uR.default=(0,dye.default)((0,hye.jsx)("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFileOutlined");var fR={},pye=Ur;Object.defineProperty(fR,"__esModule",{value:!0});var SV=fR.default=void 0,mye=pye(si()),EE=O;SV=fR.default=(0,mye.default)([(0,EE.jsx)("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"0"),(0,EE.jsx)("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"1"),(0,EE.jsx)("path",{d:"M12 16c-1.48 0-2.75-.81-3.45-2H6.88c.8 2.05 2.79 3.5 5.12 3.5s4.32-1.45 5.12-3.5h-1.67c-.7 1.19-1.97 2-3.45 2m-.01-14C6.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"},"2")],"SentimentSatisfiedOutlined");var dR={},gye=Ur;Object.defineProperty(dR,"__esModule",{value:!0});var CV=dR.default=void 0,vye=gye(si()),yye=O;CV=dR.default=(0,vye.default)((0,yye.jsx)("path",{d:"m4.01 6.03 7.51 3.22-7.52-1zm7.5 8.72L4 17.97v-2.22zM2.01 3 2 10l15 2-15 2 .01 7L23 12z"}),"SendOutlined");function SI(t){return[].concat(t)}function hR(t){return t.startsWith(":")}function EV(t){return B2(t)&&(t==="*"||t.length>1&&":>~.+*".includes(t.slice(0,1))||LV(t))}function AV(t,e){return(B2(e)||typeof e=="number")&&!IV(t)&&!hR(t)&&!TV(t)}function TV(t){return t.startsWith("@media")}function wye(t){return t==="."}function IV(t){return t==="--"}function B2(t){return t+""===t}function LV(t){return B2(t)&&(t.startsWith("&")||hR(t))}function ox(t,e=""){return t.filter(Boolean).join(e)}function RV(t,e){let n=0;if(e.length===0)return n.toString();for(let r=0;rhR(s)?i+s:LV(s)?i+s.slice(1):ox([i,s]," "),e);return ox([r,xye(n)]," ")}var Sye=class Y_{constructor(e,n=null,{preconditions:r,postconditions:i}={}){this.sheet=e,this.preconditions=[],this.scopeClassName=null,this.scopeName=null,this.postconditions=[],this.preconditions=r?SI(r):[],this.postconditions=i?SI(i):[],this.setScope(n)}setScope(e){return e?(this.scopeClassName||(this.scopeName=e,this.scopeClassName=RV(this.sheet.name,e+this.sheet.count)),this):this}get hasConditions(){return this.preconditions.length>0||this.postconditions.length>0}addScope(e){return new Y_(this.sheet,e,{preconditions:this.preconditions,postconditions:this.postconditions})}addPrecondition(e){return new Y_(this.sheet,this.scopeClassName,{postconditions:this.postconditions,preconditions:this.preconditions.concat(e)})}addPostcondition(e){return new Y_(this.sheet,this.scopeClassName,{preconditions:this.preconditions,postconditions:this.postconditions.concat(e)})}createRule(e,n){return new PV(this.sheet,e,n,this)}},Cye=class{constructor(t,e){this.name=t,this.rootNode=e,this.storedStyles={},this.storedClasses={},this.style="",this.count=0,this.id=`flairup-${t}`,this.styleTag=this.createStyleTag()}getStyle(){return this.style}append(t){this.style=bye(this.style,t)}apply(){this.count++,this.styleTag&&(this.styleTag.innerHTML=this.style)}isApplied(){return!!this.styleTag}createStyleTag(){if(typeof document>"u"||this.isApplied()||this.rootNode===null)return this.styleTag;const t=document.createElement("style");return t.type="text/css",t.id=this.id,(this.rootNode??document.head).appendChild(t),t}addRule(t){const e=this.storedClasses[t.key];return B2(e)?e:(this.storedClasses[t.key]=t.hash,this.storedStyles[t.hash]=[t.property,t.value],this.append(t.toString()),t.hash)}};function pR(t,e){for(const n in t)e(n.trim(),t[n])}function Fn(...t){const e=t.reduce((n,r)=>(r instanceof Set?n.push(...r):typeof r=="string"?n.push(r):Array.isArray(r)?n.push(Fn(...r)):typeof r=="object"&&Object.entries(r).forEach(([i,s])=>{s&&n.push(i)}),n),[]);return ox(e," ").trim()}function Eye(t,e){const n=new Cye(t,e);return{create:r,getStyle:n.getStyle.bind(n),isApplied:n.isApplied.bind(n)};function r(i){const s={};return NV(n,i,new Sye(n)).forEach(([a,l,c])=>{O2(n,l,c).forEach(u=>{o(a,u)})}),n.apply(),s;function o(a,l){s[a]=s[a]??new Set,s[a].add(l)}}}function NV(t,e,n){const r=[];return pR(e,(i,s)=>{if(EV(i))return NV(t,s,n.addPrecondition(i)).forEach(o=>r.push(o));r.push([i,e[i],n.addScope(i)])}),r}function O2(t,e,n){const r=new Set;return pR(e,(i,s)=>{let o=[];if(EV(i))o=O2(t,s,n.addPostcondition(i));else if(wye(i))o=SI(s);else if(TV(i))o=Tye(t,s,i,n);else if(IV(i))o=Aye(t,s,n);else if(AV(i,s)){const a=n.createRule(i,s);t.addRule(a),r.add(a.hash)}return kV(o,r)}),r}function kV(t,e){return t.forEach(n=>e.add(n)),e}function Aye(t,e,n){const r=new Set,i=[];if(pR(e,(s,o)=>{if(AV(s,o)){i.push(PV.genRule(s,o));return}const a=O2(t,o??{},n);kV(a,r)}),!n.scopeClassName)return r;if(i.length){const s=i.join(" ");t.append(`${CI(n.preconditions,{right:n.scopeClassName})} {${s}}`)}return r.add(n.scopeClassName),r}function Tye(t,e,n,r){t.append(n+" {");const i=O2(t,e,r);return t.append("}"),i}function kr(){return kr=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Lye(t,e){if(t){if(typeof t=="string")return bO(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bO(t,e)}}function bO(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Rn;(function(t){t.hiddenOnSearch="epr-hidden-on-search",t.searchActive="epr-search-active",t.hidden="epr-hidden",t.visible="epr-visible",t.active="epr-active",t.emoji="epr-emoji",t.category="epr-emoji-category",t.label="epr-emoji-category-label",t.categoryContent="epr-emoji-category-content",t.emojiHasVariations="epr-emoji-has-variations",t.scrollBody="epr-body",t.emojiList="epr-emoji-list",t.external="__EmojiPicker__",t.emojiPicker="EmojiPickerReact",t.open="epr-open",t.vertical="epr-vertical",t.horizontal="epr-horizontal",t.variationPicker="epr-emoji-variation-picker",t.darkTheme="epr-dark-theme",t.autoTheme="epr-auto-theme"})(Rn||(Rn={}));function _s(){for(var t=arguments.length,e=new Array(t),n=0;n0}function twe(t,e){return e?Lv(t).find(function(n){return n.includes(e)}):Bs(t)}function lm(t){if(t){if(Ip[t])return Ip[t];var e=vR(t);return Ip[e]}}var U2=Object.values(T1).flat();function nwe(t){T1[In.CUSTOM].length=0,t.forEach(function(e){var n=rwe(e);T1[In.CUSTOM].push(n),!Ip[n[ea.unified]]&&(U2.push(n),Ip[n[ea.unified]]=n,zV(n))})}function rwe(t){var e;return e={},e[ea.name]=t.names.map(function(n){return n.toLowerCase()}),e[ea.unified]=t.id.toLowerCase(),e[ea.added_in]="0",e[ea.imgUrl]=t.imgUrl,e}var Ip={};setTimeout(function(){U2.reduce(function(t,e){return t[Bs(e)]=e,Um(e)&&Lv(e).forEach(function(n){t[n]=e}),t},Ip)});function iwe(t){var e=t.split("-"),n=e[1];return ax.includes(n)?n:null}var swe=["2640-fe0f","2642-fe0f","2695-fe0f"],lx="Search",owe="No results found",GV=" found. Use up and down arrow keys to navigate.",awe="1 result"+GV,lwe="%n results"+GV;function CO(t){var e,n;t===void 0&&(t={});var r=VV(),i=Object.assign(r.previewConfig,(e=t.previewConfig)!=null?e:{}),s=Object.assign(r,t),o=Bye(t.categories,{suggestionMode:s.suggestedEmojisMode});s.hiddenEmojis.forEach(function(l){s.unicodeToHide.add(l)}),nwe((n=s.customEmojis)!=null?n:[]);var a=s.searchDisabled?am.PREVIEW:s.skinTonePickerLocation;return kr({},s,{categories:o,previewConfig:i,skinTonePickerLocation:a})}function VV(){return{autoFocusSearch:!0,categories:FV(),className:"",customEmojis:[],defaultSkinTone:Ta.NEUTRAL,emojiStyle:Mo.APPLE,emojiVersion:null,getEmojiUrl:HV,height:450,lazyLoadEmojis:!1,previewConfig:kr({},cwe),searchDisabled:!1,searchPlaceHolder:lx,searchPlaceholder:lx,skinTonePickerLocation:am.SEARCH,skinTonesDisabled:!1,style:{},suggestedEmojisMode:E1.FREQUENT,theme:A1.LIGHT,unicodeToHide:new Set(swe),width:350,reactionsDefaultOpen:!1,reactions:Dye,open:!0,allowExpandReactions:!0,hiddenEmojis:[]}}var cwe={defaultEmoji:"1f60a",defaultCaption:"What's your mood?",showPreview:!0},uwe=["children"],WV=I.createContext(VV());function fwe(t){var e=t.children,n=BV(t,uwe),r=dwe(n);return I.createElement(WV.Provider,{value:r},e)}function dwe(t){var e,n=I.useState(function(){return CO(t)}),r=n[0],i=n[1];return I.useEffect(function(){OV(r,t)||i(CO(t))},[(e=t.customEmojis)==null?void 0:e.length,t.open,t.emojiVersion,t.reactionsDefaultOpen,t.searchPlaceHolder,t.searchPlaceholder,t.defaultSkinTone,t.skinTonesDisabled,t.autoFocusSearch,t.emojiStyle,t.theme,t.suggestedEmojisMode,t.lazyLoadEmojis,t.className,t.height,t.width,t.searchDisabled,t.skinTonePickerLocation,t.allowExpandReactions]),r}function Jr(){return I.useContext(WV)}var $V=qt.createContext({});function JV(){var t=qt.useContext($V);return t}function hwe(t){var e=qt.useRef({onEmojiClick:t.onEmojiClick||vw,onReactionClick:t.onReactionClick||t.onEmojiClick,onSkinToneChange:t.onSkinToneChange||vw});return qt.useEffect(function(){e.current.onEmojiClick=t.onEmojiClick||vw,e.current.onReactionClick=t.onReactionClick||t.onEmojiClick},[t.onEmojiClick,t.onReactionClick]),qt.useEffect(function(){e.current.onSkinToneChange=t.onSkinToneChange||vw},[t.onSkinToneChange]),e}function vw(){}var I1;(function(t){t.REACTIONS="reactions",t.PICKER="picker"})(I1||(I1={}));function pwe(){var t,e=Jr(),n=e.searchPlaceHolder,r=e.searchPlaceholder;return(t=[n,r].find(function(i){return i!==lx}))!=null?t:lx}function mwe(){var t=Jr(),e=t.defaultSkinTone;return e}function YV(){var t=Jr(),e=t.allowExpandReactions;return e}function QV(){var t=Jr(),e=t.skinTonesDisabled;return e}function Hd(){var t=Jr(),e=t.emojiStyle;return e}function gwe(){var t=Jr(),e=t.autoFocusSearch;return e}function XV(){var t=Jr(),e=t.categories;return e}function vwe(){var t=Jr(),e=t.customEmojis;return e}function ywe(){var t=Jr(),e=t.open;return e}function wwe(t){var e,n=JV(),r=n.current,i=(e=t===I1.REACTIONS?r.onReactionClick:r.onEmojiClick)!=null?e:r.onEmojiClick;return i||function(){}}function _we(){var t=JV(),e=t.current;return e.onSkinToneChange||function(){}}function KV(){var t=Jr(),e=t.previewConfig;return e}function Mwe(){var t=Jr(),e=t.theme;return e}function xwe(){var t=Jr(),e=t.suggestedEmojisMode;return e}function bwe(){var t=Jr(),e=t.lazyLoadEmojis;return e}function Swe(){var t=Jr(),e=t.className;return e}function Cwe(){var t=Jr(),e=t.height,n=t.width,r=t.style;return kr({height:EO(e),width:EO(n)},r)}function Ewe(){var t=Jr(),e=t.reactionsDefaultOpen;return e}function Awe(){var t=Jr(),e=t.emojiVersion;return e}function ZV(){var t=Jr(),e=t.searchDisabled;return e}function qV(){var t=Jr(),e=t.skinTonePickerLocation;return e}function Twe(){var t=Jr(),e=t.unicodeToHide;return e}function Iwe(){var t=Jr(),e=t.reactions;return e}function Fm(){var t=Jr(),e=t.getEmojiUrl;return e}function EO(t){return typeof t=="number"?t+"px":t}function Lwe(t){var e=t>0,n=t>1;return e?n?lwe.replace("%n",t.toString()):awe:owe}function AO(t,e){e===void 0&&(e=0);var n=I.useState(t),r=n[0],i=n[1],s=I.useRef(null);function o(a){return new Promise(function(l){var c;s.current&&clearTimeout(s.current),s.current=(c=window)==null?void 0:c.setTimeout(function(){i(a),l(a)},e)})}return[r,o]}function Rwe(){var t=Twe();return function(e){return t.has(e)}}function e7(){var t=I.useRef({}),e=Awe();return I.useMemo(function(){var n=parseFloat(""+e);return!e||Number.isNaN(n)?t.current:U2.reduce(function(r,i){return Dwe(i,n)&&(r[Bs(i)]=!0),r},t.current)},[e])}function Pwe(){var t=e7(),e=Rwe();return function(r){var i=vR(Bs(r));return!!(t[i]||e(i))}}function Dwe(t,e){return qye(t)>e}function Nwe(t){I.useEffect(function(){t(!0)},[t])}function kwe(t){var e=t.children,n=e7(),r=mwe(),i=Ewe(),s=I.useRef(Ug),o=I.useRef(!1),a=I.useRef(!1),l=I.useRef(n),c=AO(Date.now(),200),u=AO("",100),f=I.useState(!1),h=I.useState(r),m=I.useState(null),v=I.useState(new Set),w=I.useState(null),y=I.useState(i),g=I.useState(!1),_=g[0],x=g[1];return Nwe(x),I.createElement(da.Provider,{value:{activeCategoryState:m,activeSkinTone:h,disallowClickRef:o,disallowMouseRef:a,disallowedEmojisRef:l,emojiVariationPickerState:w,emojisThatFailedToLoadState:v,filterRef:s,isPastInitialLoad:_,searchTerm:u,skinToneFanOpenState:f,suggestedUpdateState:c,reactionsModeState:y}},e)}var da=I.createContext({activeCategoryState:[null,function(){}],activeSkinTone:[Ta.NEUTRAL,function(){}],disallowClickRef:{current:!1},disallowMouseRef:{current:!1},disallowedEmojisRef:{current:{}},emojiVariationPickerState:[null,function(){}],emojisThatFailedToLoadState:[new Set,function(){}],filterRef:{current:{}},isPastInitialLoad:!0,searchTerm:["",function(){return new Promise(function(){})}],skinToneFanOpenState:[!1,function(){}],suggestedUpdateState:[Date.now(),function(){}],reactionsModeState:[!1,function(){}]});function yR(){var t=I.useContext(da),e=t.filterRef;return e}function Bwe(){var t=I.useContext(da),e=t.disallowClickRef;return e}function wR(){var t=I.useContext(da),e=t.disallowMouseRef;return e}function F2(){var t=I.useContext(da),e=t.reactionsModeState;return e}function j2(){var t=I.useContext(da),e=t.searchTerm;return e}function _R(){var t=I.useContext(da),e=t.activeSkinTone;return e}function t7(){var t=I.useContext(da),e=t.emojisThatFailedToLoadState;return e}function Owe(){var t=I.useContext(da),e=t.isPastInitialLoad;return e}function jm(){var t=I.useContext(da),e=t.emojiVariationPickerState;return e}function Rv(){var t=I.useContext(da),e=t.skinToneFanOpenState;return e}function n7(){var t=I.useContext(da),e=t.suggestedUpdateState,n=e[0],r=e[1];return[n,function(){r(Date.now())}]}function z2(){var t=j2(),e=t[0];return!!e}function Do(t){t&&requestAnimationFrame(function(){t.focus()})}function r7(t){if(t){var e=t.previousElementSibling;Do(e)}}function i7(t){if(t){var e=t.nextElementSibling;Do(e)}}function s7(t){if(t){var e=t.firstElementChild;Do(e)}}function L1(){return document.activeElement}function Uwe(t){var e=t.children,n=I.useRef(null),r=I.useRef(null),i=I.useRef(null),s=I.useRef(null),o=I.useRef(null),a=I.useRef(null),l=I.useRef(null),c=I.useRef(null);return I.createElement(o7.Provider,{value:{AnchoredEmojiRef:r,BodyRef:i,CategoryNavigationRef:a,PickerMainRef:n,SearchInputRef:s,SkinTonePickerRef:o,VariationPickerRef:l,ReactionsRef:c}},e)}var o7=I.createContext({AnchoredEmojiRef:I.createRef(),BodyRef:I.createRef(),CategoryNavigationRef:I.createRef(),PickerMainRef:I.createRef(),SearchInputRef:I.createRef(),SkinTonePickerRef:I.createRef(),VariationPickerRef:I.createRef(),ReactionsRef:I.createRef()});function Hu(){return I.useContext(o7)}function Pv(){return Hu().PickerMainRef}function H2(){return Hu().AnchoredEmojiRef}function a7(){var t=H2();return function(e){e===null&&t.current!==null&&Do(t.current),t.current=e}}function ha(){return Hu().BodyRef}function Fwe(){return Hu().ReactionsRef}function Gu(){return Hu().SearchInputRef}function MR(){return Hu().SkinTonePickerRef}function xR(){return Hu().CategoryNavigationRef}function jwe(){return Hu().VariationPickerRef}function l7(t,e){e===void 0&&(e=0);var n=b7(t);n&&requestAnimationFrame(function(){n.scrollTop=e})}function zwe(t,e){var n=b7(t);n&&requestAnimationFrame(function(){n.scrollTop=n.scrollTop+e})}function Hwe(){var t=ha();return I.useCallback(function(e){requestAnimationFrame(function(){t.current&&(t.current.scrollTop=e)})},[t])}function G2(t){if(!(!t||!P_e(t))&&!t.closest(_s(Rn.variationPicker))){var e=C7(t),n=S7(t);zwe(e,-(TR(Vu(t))-n))}}function V2(t){var e=PR(t);Do(e),G2(e)}function Gwe(t){var e=PR(t);Do(e),e==null||e.click()}function Vwe(t){Do(I7(t))}function Wwe(t){if(t){var e=L7(t);if(!e)return V2($2(t));Do(e),G2(e)}}function $we(t){if(t){var e=RR(t);if(!e)return Vwe(W2(t));Do(e),G2(e)}}function Jwe(t,e){if(t){var n=Qwe(t);if(!n)return e();Do(n),G2(n)}}function Ywe(t){if(t){var e=Xwe(t);return Do(e)}}function Qwe(t){if(!t)return null;var e=R7(t),n=Vu(e),r=w7(e,t),i=_7(e,t),s=y7(e,t);if(i===0){var o=W2(n);return o?M7(cm(o),-1,s,r):null}return E_e(cm(e),i,s,r)}function Xwe(t){if(!t)return null;var e=R7(t),n=Vu(e),r=w7(e,t),i=_7(e,t),s=y7(e,t);if(!b_e(e,t)){var o=$2(n);return o?M7(cm(o),0,s,r):null}var a=C_e(cm(e),i,s,r);return a}function Gd(){var t=jm(),e=t[0],n=t[1],r=Rv(),i=r[0],s=r[1],o=I.useCallback(function(){e&&n(null),i&&s(!1)},[e,i,n,s]);return o}function c7(){var t=jm(),e=t[0],n=Rv(),r=n[0];return function(){return!!e||r}}function Kwe(){var t=wR();return function(){t.current=!0}}function u7(){var t=wR();return function(){t.current=!1}}function f7(){var t=wR();return function(){return t.current}}function Zwe(){var t=ha(),e=u7(),n=f7();I.useEffect(function(){var r=t.current;r==null||r.addEventListener("mousemove",i,{passive:!0});function i(){n()&&e()}return function(){r==null||r.removeEventListener("mousemove",i)}},[t,e,n])}function Vd(){var t=Gu();return I.useCallback(function(){Do(t.current)},[t])}function qwe(){var t=MR();return I.useCallback(function(){t.current&&s7(t.current)},[t])}function d7(){var t=xR();return I.useCallback(function(){t.current&&s7(t.current)},[t])}function e_e(){var t=yR();return function e(n){if(typeof n=="function")return e(n(t.current));t.current=n}}function h7(){var t=bR(),e=Gu(),n=Vd();return function(){e.current&&(e.current.value=""),t(""),n()}}function t_e(){var t=Gu(),e=bR();return function(r){t.current?(t.current.value=""+t.current.value+r,e(TI(t.current.value))):e(TI(r))}}function n_e(){var t=Gu(),e=yR(),n=e_e(),r=bR(),i=j2(),s=i[0],o=l_e(e.current,s);return{onChange:a,searchTerm:s,SearchInputRef:t,statusSearchResults:o};function a(l){var c=e.current,u=l.toLowerCase();if(c!=null&&c[u]||u.length<=1)return r(u);var f=a_e(u,c);if(!f)return r(u);n(function(h){var m;return Object.assign(h,(m={},m[u]=r_e(f,u),m))}),r(u)}}function bR(){var t=j2(),e=t[1],n=Pv();return function(i){requestAnimationFrame(function(){e(i&&(i==null?void 0:i.toLowerCase())).then(function(){l7(n.current,0)})})}}function r_e(t,e){var n={};for(var r in t){var i=t[r];i_e(i,e)&&(n[r]=i)}return n}function i_e(t,e){return Iv(t).some(function(n){return n.includes(e)})}function s_e(){var t=yR(),e=t.current,n=j2(),r=n[0];return function(i){return o_e(i,e,r)}}function o_e(t,e,n){var r;return!e||!n?!1:!((r=e[n])!=null&&r[t])}function a_e(t,e){if(!e)return null;if(e[t])return e[t];var n=Object.keys(e).sort(function(r,i){return i.length-r.length}).find(function(r){return t.includes(r)});return n?e[n]:null}function TI(t){return!t||typeof t!="string"?"":t.trim().toLowerCase()}function l_e(t,e){var n;if(!(t!=null&&t[e]))return"";var r=((n=Object.entries(t==null?void 0:t[e]))==null?void 0:n.length)||0;return Lwe(r)}function p7(){var t=a7(),e=jm(),n=e[1];return function(i){var s=AR(i),o=s[0];o&&(t(i),n(o))}}function SR(){var t=qV();return t===am.SEARCH}function m7(){var t=qV();return t===am.PREVIEW}var wi;(function(t){t.ArrowDown="ArrowDown",t.ArrowUp="ArrowUp",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.Escape="Escape",t.Enter="Enter",t.Space=" "})(wi||(wi={}));function c_e(){u_e(),f_e(),d_e(),h_e(),p_e()}function u_e(){var t=Pv(),e=h7(),n=Hwe(),r=Gu(),i=Vd(),s=c7(),o=Kwe(),a=Gd(),l=I.useMemo(function(){return function(u){var f=u.key;switch(o(),f){case wi.Escape:if(u.preventDefault(),s()){a();return}e(),n(0),i();break}}},[n,e,a,i,s,o]);I.useEffect(function(){var c=t.current;if(c)return c.addEventListener("keydown",l),function(){c.removeEventListener("keydown",l)}},[t,r,n,l])}function f_e(){var t=qwe(),e=Pv(),n=ha(),r=Gu(),i=Rv(),s=i[1],o=g7(),a=SR(),l=I.useMemo(function(){return function(u){var f=u.key;switch(f){case wi.ArrowRight:if(!a)return;u.preventDefault(),s(!0),t();break;case wi.ArrowDown:u.preventDefault(),o();break;case wi.Enter:u.preventDefault(),Gwe(n.current);break}}},[t,o,s,n,a]);I.useEffect(function(){var c=r.current;if(c)return c.addEventListener("keydown",l),function(){c.removeEventListener("keydown",l)}},[e,r,l])}function d_e(){var t=MR(),e=Vd(),n=Gu(),r=g7(),i=Rv(),s=i[0],o=i[1],a=m7(),l=SR(),c=CR(),u=I.useMemo(function(){return function(h){var m=h.key;if(l)switch(m){case wi.ArrowLeft:if(h.preventDefault(),!s)return e();TO(e);break;case wi.ArrowRight:if(h.preventDefault(),!s)return e();IO();break;case wi.ArrowDown:h.preventDefault(),s&&o(!1),r();break;default:c(h);break}if(a)switch(m){case wi.ArrowUp:if(h.preventDefault(),!s)return e();TO(e);break;case wi.ArrowDown:if(h.preventDefault(),!s)return e();IO();break;default:c(h);break}}},[s,e,o,r,c,a,l]);I.useEffect(function(){var f=t.current;if(f)return f.addEventListener("keydown",u),function(){f.removeEventListener("keydown",u)}},[t,n,s,u])}function h_e(){var t=Vd(),e=xR(),n=ha(),r=CR(),i=I.useMemo(function(){return function(o){var a=o.key;switch(a){case wi.ArrowUp:o.preventDefault(),t();break;case wi.ArrowRight:o.preventDefault(),i7(L1());break;case wi.ArrowLeft:o.preventDefault(),r7(L1());break;case wi.ArrowDown:o.preventDefault(),V2(n.current);break;default:r(o);break}}},[n,t,r]);I.useEffect(function(){var s=e.current;if(s)return s.addEventListener("keydown",i),function(){s.removeEventListener("keydown",i)}},[e,n,i])}function p_e(){var t=ha(),e=m_e(),n=p7(),r=c7(),i=Gd(),s=CR(),o=I.useMemo(function(){return function(l){var c=l.key,u=Na(L1());switch(c){case wi.ArrowRight:l.preventDefault(),Wwe(u);break;case wi.ArrowLeft:l.preventDefault(),$we(u);break;case wi.ArrowDown:if(l.preventDefault(),r()){i();break}Ywe(u);break;case wi.ArrowUp:if(l.preventDefault(),r()){i();break}Jwe(u,e);break;case wi.Space:l.preventDefault(),n(l.target);break;default:s(l);break}}},[e,s,n,r,i]);I.useEffect(function(){var a=t.current;if(a)return a.addEventListener("keydown",o),function(){a.removeEventListener("keydown",o)}},[t,o])}function g7(){var t=d7(),e=z2(),n=ha();return I.useCallback(function(){return e?V2(n.current):t()},[n,t,e])}function m_e(){var t=Vd(),e=d7(),n=z2();return I.useCallback(function(){return n?t():e()},[t,n,e])}function TO(t){var e=L1();e&&(T_e(e)||t(),i7(e))}function IO(){var t=L1();t&&r7(t)}function CR(){var t=t_e(),e=Vd(),n=ZV(),r=Gd();return function(s){var o=s.key;g_e(s)||n||o.match(/(^[a-zA-Z0-9]$){1}/)&&(s.preventDefault(),r(),e(),t(o))}}function g_e(t){var e=t.metaKey,n=t.ctrlKey,r=t.altKey;return e||n||r}function v_e(t,e,n){if(e&&n!==Mo.NATIVE){var r=Bs(e);LO.has(r)||(Lv(e).forEach(function(i){var s=t(i,n);y_e(s)}),LO.add(r))}}var LO=new Set;function y_e(t){var e=new Image;e.src=t}function w_e(){var t=ha(),e=Hd(),n=Fm();I.useEffect(function(){if(e===Mo.NATIVE)return;var r=t.current;return r==null||r.addEventListener("focusin",i),function(){r==null||r.removeEventListener("focusin",i)};function i(s){var o=Na(s.target);if(o){var a=AR(o),l=a[0];l&&Um(l)&&v_e(n,l,e)}}},[t,e,n])}var __e=["width","height"],v7=40;function M_e(t){var e=t.children;return I.createElement(kwe,null,I.createElement(x_e,null,e))}function x_e(t){var e,n=t.children,r=F2(),i=r[0],s=Mwe(),o=z2(),a=Pv(),l=Swe(),c=Cwe();c_e(),w_e();var u=c||{},f=u.width,h=u.height,m=BV(u,__e);return I.createElement("aside",{className:Fn(k0.main,k0.baseVariables,s===A1.DARK&&k0.darkTheme,s===A1.AUTO&&k0.autoThemeDark,(e={},e[Rn.searchActive]=o,e),i&&k0.reactionsMenu,l),ref:a,style:kr({},m,!i&&{height:h,width:f})},n)}var RO={"--epr-emoji-variation-picker-bg-color":"var(--epr-dark-emoji-variation-picker-bg-color)","--epr-hover-bg-color-reduced-opacity":"var(--epr-dark-hover-bg-color-reduced-opacity)","--epr-highlight-color":"var(--epr-dark-highlight-color)","--epr-text-color":"var(--epr-dark-text-color)","--epr-hover-bg-color":"var(--epr-dark-hover-bg-color)","--epr-focus-bg-color":"var(--epr-dark-focus-bg-color)","--epr-search-input-bg-color":"var(--epr-dark-search-input-bg-color)","--epr-category-label-bg-color":"var(--epr-dark-category-label-bg-color)","--epr-picker-border-color":"var(--epr-dark-picker-border-color)","--epr-bg-color":"var(--epr-dark-bg-color)","--epr-reactions-bg-color":"var(--epr-dark-reactions-bg-color)","--epr-search-input-bg-color-active":"var(--epr-dark-search-input-bg-color-active)","--epr-emoji-variation-indicator-color":"var(--epr-dark-emoji-variation-indicator-color)","--epr-category-icon-active-color":"var(--epr-dark-category-icon-active-color)","--epr-skin-tone-picker-menu-color":"var(--epr-dark-skin-tone-picker-menu-color)"},k0=Tr.create({main:{".":["epr-main",Rn.emojiPicker],position:"relative",display:"flex",flexDirection:"column",borderWidth:"1px",borderStyle:"solid",borderRadius:"var(--epr-picker-border-radius)",borderColor:"var(--epr-picker-border-color)",backgroundColor:"var(--epr-bg-color)",overflow:"hidden",transition:"all 0.3s ease-in-out, background-color 0.1s ease-in-out","*":{boxSizing:"border-box",fontFamily:"sans-serif"}},baseVariables:{"--":{"--epr-highlight-color":"#007aeb","--epr-hover-bg-color":"#f1f8ff","--epr-hover-bg-color-reduced-opacity":"#f1f8ff80","--epr-focus-bg-color":"#e0f0ff","--epr-text-color":"#858585","--epr-search-input-bg-color":"#f6f6f6","--epr-picker-border-color":"#e7e7e7","--epr-bg-color":"#fff","--epr-reactions-bg-color":"#ffffff90","--epr-category-icon-active-color":"#6aa8de","--epr-skin-tone-picker-menu-color":"#ffffff95","--epr-horizontal-padding":"10px","--epr-picker-border-radius":"8px","--epr-search-border-color":"var(--epr-highlight-color)","--epr-header-padding":"15px var(--epr-horizontal-padding)","--epr-active-skin-tone-indicator-border-color":"var(--epr-highlight-color)","--epr-active-skin-hover-color":"var(--epr-hover-bg-color)","--epr-search-input-bg-color-active":"var(--epr-search-input-bg-color)","--epr-search-input-padding":"0 30px","--epr-search-input-border-radius":"8px","--epr-search-input-height":"40px","--epr-search-input-text-color":"var(--epr-text-color)","--epr-search-input-placeholder-color":"var(--epr-text-color)","--epr-search-bar-inner-padding":"var(--epr-horizontal-padding)","--epr-category-navigation-button-size":"30px","--epr-emoji-variation-picker-height":"45px","--epr-emoji-variation-picker-bg-color":"var(--epr-bg-color)","--epr-preview-height":"70px","--epr-preview-text-size":"14px","--epr-preview-text-padding":"0 var(--epr-horizontal-padding)","--epr-preview-border-color":"var(--epr-picker-border-color)","--epr-preview-text-color":"var(--epr-text-color)","--epr-category-padding":"0 var(--epr-horizontal-padding)","--epr-category-label-bg-color":"#ffffffe6","--epr-category-label-text-color":"var(--epr-text-color)","--epr-category-label-padding":"0 var(--epr-horizontal-padding)","--epr-category-label-height":v7+"px","--epr-emoji-size":"30px","--epr-emoji-padding":"5px","--epr-emoji-fullsize":"calc(var(--epr-emoji-size) + var(--epr-emoji-padding) * 2)","--epr-emoji-hover-color":"var(--epr-hover-bg-color)","--epr-emoji-variation-indicator-color":"var(--epr-picker-border-color)","--epr-emoji-variation-indicator-color-hover":"var(--epr-text-color)","--epr-header-overlay-z-index":"3","--epr-emoji-variations-indictator-z-index":"1","--epr-category-label-z-index":"2","--epr-skin-variation-picker-z-index":"5","--epr-preview-z-index":"6","--epr-dark":"#000","--epr-dark-emoji-variation-picker-bg-color":"var(--epr-dark)","--epr-dark-highlight-color":"#c0c0c0","--epr-dark-text-color":"var(--epr-highlight-color)","--epr-dark-hover-bg-color":"#363636f6","--epr-dark-hover-bg-color-reduced-opacity":"#36363680","--epr-dark-focus-bg-color":"#474747","--epr-dark-search-input-bg-color":"#333333","--epr-dark-category-label-bg-color":"#222222e6","--epr-dark-picker-border-color":"#151617","--epr-dark-bg-color":"#222222","--epr-dark-reactions-bg-color":"#22222290","--epr-dark-search-input-bg-color-active":"var(--epr-dark)","--epr-dark-emoji-variation-indicator-color":"#444","--epr-dark-category-icon-active-color":"#3271b7","--epr-dark-skin-tone-picker-menu-color":"#22222295"}},autoThemeDark:{".":Rn.autoTheme,"@media (prefers-color-scheme: dark)":{"--":RO}},darkTheme:{".":Rn.darkTheme,"--":RO},reactionsMenu:{".":"epr-reactions",height:"50px",display:"inline-flex",backgroundColor:"var(--epr-reactions-bg-color)",backdropFilter:"blur(8px)","--":{"--epr-picker-border-radius":"50px"}}});function y7(t,e){if(!t||!e)return 0;var n=t.getBoundingClientRect().width,r=e.getBoundingClientRect().width;return Math.floor(n/r)}function w7(t,e){if(!t||!e)return 0;var n=e.getBoundingClientRect().width,r=e.getBoundingClientRect().left,i=t.getBoundingClientRect().left;return Math.floor((r-i)/n)}function _7(t,e){if(!t||!e)return 0;var n=e.getBoundingClientRect().height,r=e.getBoundingClientRect().top,i=t.getBoundingClientRect().top;return Math.round((r-i)/n)}function b_e(t,e){if(!t||!e)return!1;var n=e.getBoundingClientRect().height,r=e.getBoundingClientRect().top,i=t.getBoundingClientRect().top,s=t.getBoundingClientRect().height;return Math.round(r-i+n)t.length?[]:ER(t,r,n)}function M7(t,e,n,r){var i=ER(t,e,n);return i[r]||i[i.length-1]||null}function C_e(t,e,n,r){var i=S_e(t,e,n);return i[r]||i[i.length-1]||null}function E_e(t,e,n,r){var i=ER(t,e-1,n);return i[r]||i[i.length-1]||null}function A_e(t,e,n){if(!t||!e.length)return null;var r=t.getBoundingClientRect().top,i=t.getBoundingClientRect().bottom,s=r+I_e(t),o=e.find(function(a){var l=a.getBoundingClientRect().top,c=a.getBoundingClientRect().bottom,u=a.clientHeight*n,f=l+u,h=c-u;return f=r&&f<=i||h>=r&&h<=i});return o||null}function T_e(t){return!!t.nextElementSibling}function I_e(t){for(var e=Array.from(t.querySelectorAll(_s(Rn.label))),n=0,r=e;n0)return s}return v7}var cx="button"+_s(Rn.emoji),L_e=[cx,_s(Rn.visible),":not("+_s(Rn.hidden)+")"].join("");function Na(t){var e;return(e=t==null?void 0:t.closest(cx))!=null?e:null}function AR(t){var e=E7(t),n=IR(t);if(!e)return[];var r=lm(n??e);return r?[r,n]:[]}function R_e(t){var e;return!!(t!=null&&t.matches(cx)||!(t==null||(e=t.parentElement)==null)&&e.matches(cx))}function PO(t){var e;return(e=t==null?void 0:t.clientHeight)!=null?e:0}function x7(t){if(!t)return 0;var e=Na(t),n=Vu(e),r=TR(n);return DO(e)+DO(n)+r}function TR(t){var e,n;if(!t)return 0;var r=t.querySelector(_s(Rn.categoryContent));return((e=t==null?void 0:t.clientHeight)!=null?e:0)-((n=r==null?void 0:r.clientHeight)!=null?n:0)}function P_e(t){return t?S7(t)0?[]:ewe(e);m.length>0&&r.current++;var v=0,w=m.map(function(y){var g=Bs(y,c),_=i(y),x=_.failedToLoad,S=_.filteredOut,D=_.hidden,T=u(y);return(D||T)&&v++,T?null:I.createElement(J2,{showVariations:h,key:g,emoji:y,unified:g,hidden:x,hiddenOnSearch:S,emojiStyle:o,lazyLoad:s,getEmojiUrl:f})});return I.createElement(O7,{categoryConfig:n,hidden:v===w.length},w)}var tMe=Tr.create({emojiList:{".":Rn.emojiList,listStyle:"none",margin:"0",padding:"0"}}),nMe="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MHB4IgoJIGhlaWdodD0iMTVweCIgdmlld0JveD0iMCAwIDUwIDE1IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MCAxNSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnIGlkPSJMYXllcl8xIj4KPC9nPgo8ZyBpZD0iTGF5ZXJfMiI+Cgk8cGF0aCBmaWxsPSIjRkZGRkZGIiBzdHJva2U9IiNFOEU3RTciIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTEuODYtMC40M2w5LjgzLDExLjUzYzAuNTksMC42OSwxLjU2LDAuNjksMi4xNCwwbDkuODMtMTEuNTMiLz4KCTxwYXRoIGZpbGw9IiMwMTAyMDIiIHN0cm9rZT0iIzE1MTYxNyIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMjYuODYtMC40M2w5LjgzLDExLjUzYzAuNTksMC42OSwxLjU2LDAuNjksMi4xNCwwbDkuODMtMTEuNTMiLz4KPC9nPgo8L3N2Zz4=",Lp;(function(t){t[t.Up=0]="Up",t[t.Down=1]="Down"})(Lp||(Lp={}));function rMe(){var t=H2(),e=jwe(),n=jm(),r=n[0],i=Hd(),s=sMe(e),o=s.getTop,a=s.getMenuDirection,l=a7(),c=iMe(e),u=Fm(),f=Na(t.current),h=!!(r&&f&&Um(r)&&f.classList.contains(Rn.emojiHasVariations));I.useEffect(function(){h&&V2(e.current)},[e,h,t]);var m,v;return!h&&t.current?l(null):(m=o(),v=c()),I.createElement("div",{ref:e,className:Fn(yw.variationPicker,a()===Lp.Down&&yw.pointingUp,h&&yw.visible),style:{top:m}},h&&r?[Bs(r)].concat(Lv(r)).slice(0,6).map(function(w){return I.createElement(J2,{key:w,emoji:r,unified:w,emojiStyle:i,showVariations:!1,getEmojiUrl:u})}):null,I.createElement("div",{className:Fn(yw.pointer),style:v}))}function iMe(t){var e=H2();return function(){var r={};if(!t.current)return r;if(e.current){var i=Na(e.current),s=D_e(i);if(!i)return r;r.left=s+(i==null?void 0:i.clientWidth)/2}return r}}function sMe(t){var e=H2(),n=ha(),r=Lp.Up;return{getMenuDirection:i,getTop:s};function i(){return r}function s(){r=Lp.Up;var o=0;if(!t.current)return 0;var a=PO(t.current);if(e.current){var l,c=n.current,u=Na(e.current),f=PO(u);o=x7(u);var h=(l=c==null?void 0:c.scrollTop)!=null?l:0;h>o-a&&(r=Lp.Down,o+=f+a)}return o-a}}var yw=Tr.create(kr({variationPicker:{".":Rn.variationPicker,position:"absolute",right:"15px",left:"15px",padding:"5px",boxShadow:"0px 2px 5px rgba(0, 0, 0, 0.2)",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"space-around",opacity:"0",visibility:"hidden",pointerEvents:"none",top:"-100%",border:"1px solid var(--epr-picker-border-color)",height:"var(--epr-emoji-variation-picker-height)",zIndex:"var(--epr-skin-variation-picker-z-index)",background:"var(--epr-emoji-variation-picker-bg-color)",transform:"scale(0.9)",transition:"transform 0.1s ease-out, opacity 0.2s ease-out"},visible:{opacity:"1",visibility:"visible",pointerEvents:"all",transform:"scale(1)"},pointingUp:{".":"pointing-up",transformOrigin:"center 0%",transform:"scale(0.9)"},".pointing-up":{pointer:{top:"0",transform:"rotate(180deg) translateY(100%) translateX(18px)"}},pointer:{".":"epr-emoji-pointer",content:"",position:"absolute",width:"25px",height:"15px",backgroundRepeat:"no-repeat",backgroundPosition:"0 0",backgroundSize:"50px 15px",top:"100%",transform:"translateX(-18px)",backgroundImage:"url("+nMe+")"}},Cu("pointer",{backgroundPosition:"-25px 0"})));function oMe(){var t=ha();return Q_e(t),B7(t,I1.PICKER),Zwe(),I.createElement("div",{className:Fn(aMe.body,zd.hiddenOnReactions),ref:t},I.createElement(rMe,null),I.createElement(q_e,null))}var aMe=Tr.create({body:{".":Rn.scrollBody,flex:"1",overflowY:"scroll",overflowX:"hidden",position:"relative"}});function lMe(t,e){if(!t||!e)return 0;var n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.height-(n.y-r.y)}function cMe(t,e){var n=ha(),r=f7(),i=u7();I.useEffect(function(){if(!t)return;var s=n.current;s==null||s.addEventListener("keydown",l,{passive:!0}),s==null||s.addEventListener("mouseover",c,!0),s==null||s.addEventListener("focus",o,!0),s==null||s.addEventListener("mouseout",a,{passive:!0}),s==null||s.addEventListener("blur",a,!0);function o(u){var f=Na(u.target);if(!f)return a();var h=A7(f),m=h.unified,v=h.originalUnified;if(!m||!v)return a();e({unified:m,originalUnified:v})}function a(u){if(u){var f=u.relatedTarget;if(!Na(f))return e(null)}e(null)}function l(u){u.key==="Escape"&&e(null)}function c(u){if(!r()){var f=Na(u.target);if(f){var h=lMe(f,s),m=f.getBoundingClientRect().height;if(h button":{width:"var(--epr-skin-tone-size)",display:"block",cursor:"pointer",borderRadius:"4px",height:"var(--epr-skin-tone-size)",position:"absolute",right:"0",transition:"transform 0.3s ease-in-out, opacity 0.35s ease-in-out",zIndex:"0",boxShadow:"0 0 0 0px var(--epr-active-skin-hover-color)"}}});function mMe(){var t=KV(),e=m7();return t.showPreview?I.createElement(U7,{className:Fn(X_.preview,zd.hiddenOnReactions)},I.createElement(gMe,null),I.createElement(fMe,null),e?I.createElement(pMe,null):null):null}function gMe(){var t,e=KV(),n=I.useState(null),r=n[0],i=n[1],s=Hd(),o=jm(),a=o[0],l=Fm();cMe(e.showPreview,i);var c=lm((t=r==null?void 0:r.unified)!=null?t:r==null?void 0:r.originalUnified),u=c!=null&&r!=null;return I.createElement(f,null);function f(){var h=a??lm(e.defaultEmoji);if(!h)return null;var m=a?AI(a):e.defaultCaption;return I.createElement(I.Fragment,null,I.createElement("div",null,u?I.createElement(II,{unified:r==null?void 0:r.unified,emoji:c,emojiStyle:s,size:45,getEmojiUrl:l,className:Fn(X_.emoji)}):h?I.createElement(II,{unified:Bs(h),emoji:h,emojiStyle:s,size:45,getEmojiUrl:l,className:Fn(X_.emoji)}):null),I.createElement("div",{className:Fn(X_.label)},u?AI(c):m))}}var X_=Tr.create({preview:{alignItems:"center",borderTop:"1px solid var(--epr-preview-border-color)",height:"var(--epr-preview-height)",padding:"0 var(--epr-horizontal-padding)",position:"relative",zIndex:"var(--epr-preview-z-index)"},label:{color:"var(--epr-preview-text-color)",fontSize:"var(--epr-preview-text-size)",padding:"var(--epr-preview-text-padding)",textTransform:"capitalize"},emoji:{padding:"0"}});function vMe(t){var e;return(e=t==null?void 0:t.getAttribute("data-name"))!=null?e:null}function yMe(t){var e=ha();I.useEffect(function(){var n=new Map,r=e.current,i=new IntersectionObserver(function(s){if(r){for(var o=Rye(s),a;!(a=o()).done;){var l=a.value,c=vMe(l.target);n.set(c,l.intersectionRatio)}var u=Array.from(n),f=u[u.length-1];if(f[1]==1)return t(f[0]);for(var h=0,m=u;h .epr-icn-clear-search":{backgroundPositionY:"-60px"}}},zO=Tr.create(kr({btnClearSearch:{".":"epr-btn-clear-search",position:"absolute",right:"var(--epr-search-bar-inner-padding)",height:"30px",width:"30px",display:"flex",alignItems:"center",justifyContent:"center",top:"50%",transform:"translateY(-50%)",padding:"0",borderRadius:"50%",":hover":{background:"var(--epr-hover-bg-color)"},":focus":{background:"var(--epr-hover-bg-color)"}},icnClearnSearch:{".":"epr-icn-clear-search",backgroundColor:"transparent",backgroundRepeat:"no-repeat",backgroundSize:"20px",height:"20px",width:"20px",backgroundImage:"url("+j7+")",":hover":{backgroundPositionY:"-20px"},":focus":{backgroundPositionY:"-20px"}}},Cu("icnClearnSearch",{backgroundPositionY:"-40px"}),Cu("btnClearSearch",TMe))),RE=_s(Rn.emojiPicker)+" "+_s(Rn.emojiList),z7=["button",_s(Rn.emoji)].join(""),IMe=_s(Rn.category);function LMe(t){var e=t.value;if(!e)return null;var n=RMe(e);return I.createElement("style",null,` + `+RE+" "+z7+` { + display: none; + } + + + `+RE+" "+n+` { + display: flex; + } + + `+RE+" "+IMe+":not(:has("+n+`)) { + display: none; + } + `)}function RMe(t){return[z7,'[data-full-name*="',TI(t),'"]'].join("")}var PMe="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjQwcHgiIHZpZXdCb3g9IjAgMCAyMCA0MCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjAgNDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iIzg2ODY4NiIgZD0iTTEyLDguODFjMCwyLjA4LTEuNjgsMy43Ni0zLjc2LDMuNzZjLTIuMDgsMC0zLjc2LTEuNjgtMy43Ni0zLjc2CgljMC0yLjA4LDEuNjgtMy43NiwzLjc2LTMuNzZDMTAuMzIsNS4wNSwxMiw2LjczLDEyLDguODF6IE0xMS4yMywxMi43MmMtMC44MywwLjY0LTEuODcsMS4wMS0yLjk5LDEuMDFjLTIuNzIsMC00LjkyLTIuMi00LjkyLTQuOTIKCWMwLTIuNzIsMi4yLTQuOTIsNC45Mi00LjkyYzIuNzIsMCw0LjkyLDIuMiw0LjkyLDQuOTJjMCwxLjEzLTAuMzgsMi4xNi0xLjAxLDIuOTlsMy45NCwzLjkzYzAuMjUsMC4yNSwwLjI1LDAuNjYsMCwwLjkyCgljLTAuMjUsMC4yNS0wLjY2LDAuMjUtMC45MiwwTDExLjIzLDEyLjcyeiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iI0MwQzBCRiIgZD0iTTEyLDI4LjgxYzAsMi4wOC0xLjY4LDMuNzYtMy43NiwzLjc2Yy0yLjA4LDAtMy43Ni0xLjY4LTMuNzYtMy43NgoJYzAtMi4wOCwxLjY4LTMuNzYsMy43Ni0zLjc2QzEwLjMyLDI1LjA1LDEyLDI2LjczLDEyLDI4LjgxeiBNMTEuMjMsMzIuNzJjLTAuODMsMC42NC0xLjg3LDEuMDEtMi45OSwxLjAxCgljLTIuNzIsMC00LjkyLTIuMi00LjkyLTQuOTJjMC0yLjcyLDIuMi00LjkyLDQuOTItNC45MmMyLjcyLDAsNC45MiwyLjIsNC45Miw0LjkyYzAsMS4xMy0wLjM4LDIuMTYtMS4wMSwyLjk5bDMuOTQsMy45MwoJYzAuMjUsMC4yNSwwLjI1LDAuNjYsMCwwLjkyYy0wLjI1LDAuMjUtMC42NiwwLjI1LTAuOTIsMEwxMS4yMywzMi43MnoiLz4KPC9zdmc+";function DMe(){return I.createElement("div",{className:Fn(NMe.icnSearch)})}var NMe=Tr.create(kr({icnSearch:{".":"epr-icn-search",content:"",position:"absolute",top:"50%",left:"var(--epr-search-bar-inner-padding)",transform:"translateY(-50%)",width:"20px",height:"20px",backgroundRepeat:"no-repeat",backgroundPosition:"0 0",backgroundSize:"20px",backgroundImage:"url("+PMe+")"}},Cu("icnSearch",{backgroundPositionY:"-20px"})));function kMe(){var t=ZV(),e=SR();return t?null:I.createElement(U7,{className:Fn(K_.overlay)},I.createElement(BMe,null),e?I.createElement(F7,null):null)}function BMe(){var t=I.useState(0),e=t[0],n=t[1],r=Gd(),i=Gu(),s=pwe(),o=gwe(),a=n_e(),l=a.statusSearchResults,c=a.searchTerm,u=a.onChange,f=i==null?void 0:i.current,h=f==null?void 0:f.value;return I.createElement(Y2,{className:Fn(K_.searchContainer)},I.createElement(LMe,{value:h}),I.createElement("input",{autoFocus:o,"aria-label":"Type to search for an emoji",onFocus:r,className:Fn(K_.search),type:"text","aria-controls":"epr-search-id",placeholder:s,onChange:function(v){n(e+1),setTimeout(function(){var w,y;u((w=v==null||(y=v.target)==null?void 0:y.value)!=null?w:h)})},ref:i}),c?I.createElement("div",{role:"status",className:Fn("epr-status-search-results",K_.visuallyHidden),"aria-live":"polite",id:"epr-search-id","aria-atomic":"true"},l):null,I.createElement(DMe,null),I.createElement(AMe,null))}var K_=Tr.create(kr({overlay:{padding:"var(--epr-header-padding)",zIndex:"var(--epr-header-overlay-z-index)"},searchContainer:{".":"epr-search-container",flex:"1",display:"block",minWidth:"0"},visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"},search:{outline:"none",transition:"all 0.2s ease-in-out",color:"var(--epr-search-input-text-color)",borderRadius:"var(--epr-search-input-border-radius)",padding:"var(--epr-search-input-padding)",height:"var(--epr-search-input-height)",backgroundColor:"var(--epr-search-input-bg-color)",border:"1px solid var(--epr-search-input-bg-color)",width:"100%",":focus":{backgroundColor:"var(--epr-search-input-bg-color-active)",border:"1px solid var(--epr-search-border-color)"},"::placeholder":{color:"var(--epr-search-input-placeholder-color)"}},btnClearSearch:{".":"epr-btn-clear-search",position:"absolute",right:"var(--epr-search-bar-inner-padding)",height:"30px",width:"30px",display:"flex",alignItems:"center",justifyContent:"center",top:"50%",transform:"translateY(-50%)",padding:"0",borderRadius:"50%",":hover":{background:"var(--epr-hover-bg-color)"},":focus":{background:"var(--epr-hover-bg-color)"}},icnClearnSearch:{".":"epr-icn-clear-search",backgroundColor:"transparent",backgroundRepeat:"no-repeat",backgroundSize:"20px",height:"20px",width:"20px",backgroundImage:"url("+j7+")",":hover":{backgroundPositionY:"-20px"},":focus":{backgroundPositionY:"-20px"}}},Cu("icnClearnSearch",{backgroundPositionY:"-40px"}),Cu("btnClearSearch",{":hover > .epr-icn-clear-search":{backgroundPositionY:"-60px"}})));function OMe(){return I.createElement(Y2,{className:Fn("epr-header",zd.hiddenOnReactions)},I.createElement(kMe,null),I.createElement(CMe,null))}function UMe(t){return I.createElement(Uwe,null,I.createElement(Pye,null),I.createElement(fwe,Object.assign({},t),I.createElement(FMe,null)))}function FMe(){var t=F2(),e=t[0],n=YV(),r=I.useState(!e),i=r[0],s=r[1],o=ywe();return I.useEffect(function(){e&&!n||i||s(!0)},[i,n,e]),o?I.createElement(M_e,null,I.createElement(Y_e,null),I.createElement(jMe,{renderAll:i})):null}function jMe(t){var e=t.renderAll;return e?I.createElement(I.Fragment,null,I.createElement(OMe,null),I.createElement(oMe,null),I.createElement(mMe,null)):null}var zMe=I.memo(UMe,OV),HMe=function(t){Iye(e,t);function e(r){var i;return i=t.call(this,r)||this,i.state={hasError:!1},i}e.getDerivedStateFromError=function(){return{hasError:!0}};var n=e.prototype;return n.componentDidCatch=function(i,s){console.error("Emoji Picker React failed to render:",i,s)},n.render=function(){return this.state.hasError?null:this.props.children},e}(I.Component);function GMe(t){var e=hwe({onEmojiClick:t.onEmojiClick,onReactionClick:t.onReactionClick,onSkinToneChange:t.onSkinToneChange});return I.createElement(HMe,null,I.createElement($V.Provider,{value:e},I.createElement(zMe,Object.assign({},t))))}var DR={},VMe=Ur;Object.defineProperty(DR,"__esModule",{value:!0});var NR=DR.default=void 0,WMe=VMe(si()),$Me=O;NR=DR.default=(0,WMe.default)((0,$Me.jsx)("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"}),"InsertDriveFile");function JMe(){const[t,e]=I.useState(""),[n,r]=I.useState([]),[i,s]=I.useState(null),[o,a]=I.useState(!1),{chat:l,user:c,setChat:u,scrollDown:f}=Fa(),{user:h}=Ms(),m=I.useRef(null);function v(S){e(t+S.emoji)}function w(S){r(S.target.files),x(S.target.files[0])}function y(){m.current.value="",r([])}function g(S){S.keyCode==13&&(S.preventDefault(),S.shiftKey==!0?e(t+` +`):_())}async function _(){let S;if(!t.trim()&&!n.length)return;l||(S=(await rO(["chats"],{pair:[h.uid,c.uid],users:{[h.uid]:h,[c.uid]:c}})).id,await cl(["chats",S],{id:S}),u(await om(["chats",S])));const D=[],T=[];if(n.length){const R=Array.from(n);D.push(...await MI(["chats",l.id],R.filter(C=>C.type.includes("image")))),T.push(...await MI(["chats",l.id],R.filter(C=>!C.type.includes("image"))))}e(""),r([]);const E={text:t,date:_i.fromDate(new Date),check:!1,userUid:h.uid,media:T,imgs:D};await cl(["chats",S||l.id],{lastMessage:E}),await rO(["chats",S||l.id,"messages"],E),f()}function x(S){const D=new FileReader;D.onload=()=>{s(D.result)},D.readAsDataURL(S)}return O.jsxs(YMe,{children:[!!n.length&&O.jsx(QMe,{children:O.jsxs(oxe,{children:[O.jsxs(axe,{children:[n[0].type.includes("image")?O.jsx(cxe,{src:i}):O.jsxs(uxe,{children:[O.jsx(NR,{}),n[0].name]}),!!(n.length-1)&&O.jsxs(lxe,{children:["+",n.length-1," files"]})]}),O.jsx(fxe,{onClick:y})]})}),O.jsxs(XMe,{children:[O.jsx(sxe,{ref:m,id:"files",type:"file",multiple:!0,onChange:w}),O.jsx("label",{htmlFor:"files",children:O.jsx(KMe,{})}),O.jsx(exe,{value:t,onChange:S=>e(S.target.value),placeholder:"Input message...",multiline:!0,maxRows:4,onKeyDown:g}),O.jsxs(txe,{children:[O.jsxs(nxe,{onMouseLeave:()=>a(!1),children:[O.jsx(ZMe,{onClick:()=>a(!o),onMouseMove:()=>a(!0)}),O.jsx(rxe,{children:O.jsx(ixe,{autoFocusSearch:!1,lazyLoadEmojis:!0,open:o,theme:"light",onEmojiClick:v,style:{"--epr-bg-color":"#212c49","--epr-picker-border-color":"#1a233a","--epr-search-input-bg-color":"#151c2e","--epr-light":"#11192e","--epr-skin-tone-picker-menu-color":"rgba(17, 25, 46, 0.6)","--epr-category-label-bg-color":"rgba(17, 25, 46, 0.902)","--epr-hover-bg-color":"#35487c","--epr-focus-bg-color":"#35487c"}})})]}),O.jsx(qMe,{onClick:_,disabled:!(t||n.length)})]})]})]})}const YMe=Be.div` + display: flex; + flex-direction: column; + row-gap: 10px; + + background: ${Dn.$colorChat}; + ${_l("padding",17,12,20,16)} +`,QMe=Be.div` + display: flex; + align-items: center; +`,XMe=Be.div` + display: flex; + align-items: flex-end; +`,kR=wl` + ${En("font-size",30,25,1)} + + @media (any-hover:hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + color: ${Dn.$colorMain}; + } + } +`,KMe=Be(bV)` + ${kR} +`,ZMe=Be(SV)` + ${kR} +`,qMe=Be(CV)` + ${kR} + + &[disabled] { + color: #838383; + pointer-events: none; + } +`,exe=Be(hle)` + flex: 1 1 auto; + background: transparent; + margin-right: 10px; + margin-left: 10px; + + & .MuiInputBase-root { + padding: 0; + } + + & textarea { + ${En("font-size",21,18,1)} + ${xb(5,Dn.$colorMain,"#334881",5)} + } + + & * { + border: none; + border-color: transparent !important; + } +`,txe=Be.div` + display: flex; + align-items: center; + column-gap: 10px; +`,nxe=Be.div` + position: relative; +`,rxe=Be.div` + position: absolute; + right: -20px; + bottom: calc(100% - 5px); + padding: 10px; +`,ixe=Be(GMe)` + & * { + ${xb(5,Dn.$colorMain,"#334881",5)} + } +`,sxe=Be.input` + display: none; +`,oxe=Be.div` + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; +`,axe=Be.div` + display: flex; + align-items: center; + column-gap: 5px; +`,lxe=Be.span` + color: #fff; +`,cxe=Be.img` + width: 50px; + height: 50px; + object-fit: contain; +`,uxe=Be.div` + display: flex; + align-items: center; +`,fxe=Be(C4)` + font-size: 30px; + @media (any-hover: hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + color: ${Dn.$colorMain}; + } + } +`;function Si(){return Si=Object.assign||function(t){for(var e=1;e=0||(i[n]=t[n]);return i}function id(t){var e=I.useRef({fn:t,curr:void 0}).current;if(e.fn=t,!e.curr){var n=Object.create(null);Object.keys(t).forEach(function(r){n[r]=function(){var i;return(i=e.fn[r]).call.apply(i,[e.fn].concat([].slice.call(arguments)))}}),e.curr=n}return e.curr}function fx(t){return I.useReducer(function(e,n){return Si({},e,typeof n=="function"?n(e):n)},t)}var H7=I.createContext(void 0),Ul=typeof window<"u"&&"ontouchstart"in window,LI=function(t,e,n){return Math.max(Math.min(t,n),e)},_w=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=0),LI(t,1*(1-n),Math.max(6,e)*(1+n))},RI=typeof window>"u"||/ServerSideRendering/.test(navigator&&navigator.userAgent)?I.useEffect:I.useLayoutEffect;function Xh(t,e,n){var r=I.useRef(e);r.current=e,I.useEffect(function(){function i(s){r.current(s)}return t&&window.addEventListener(t,i,n),function(){t&&window.removeEventListener(t,i)}},[t])}var dxe=["container"];function hxe(t){var e=t.container,n=e===void 0?document.body:e,r=Q2(t,dxe);return md.createPortal(qt.createElement("div",Si({},r)),n)}function pxe(t){return qt.createElement("svg",Si({width:"44",height:"44",viewBox:"0 0 768 768"},t),qt.createElement("path",{d:"M607.5 205.5l-178.5 178.5 178.5 178.5-45 45-178.5-178.5-178.5 178.5-45-45 178.5-178.5-178.5-178.5 45-45 178.5 178.5 178.5-178.5z"}))}function mxe(t){return qt.createElement("svg",Si({width:"44",height:"44",viewBox:"0 0 768 768"},t),qt.createElement("path",{d:"M640.5 352.5v63h-390l178.5 180-45 45-256.5-256.5 256.5-256.5 45 45-178.5 180h390z"}))}function gxe(t){return qt.createElement("svg",Si({width:"44",height:"44",viewBox:"0 0 768 768"},t),qt.createElement("path",{d:"M384 127.5l256.5 256.5-256.5 256.5-45-45 178.5-180h-390v-63h390l-178.5-180z"}))}function vxe(){return I.useEffect(function(){var t=document.body.style,e=t.overflow;return t.overflow="hidden",function(){t.overflow=e}},[]),null}function HO(t){var e=t.touches[0],n=e.clientX,r=e.clientY;if(t.touches.length>=2){var i=t.touches[1],s=i.clientX,o=i.clientY;return[(n+s)/2,(r+o)/2,Math.sqrt(Math.pow(s-n,2)+Math.pow(o-r,2))]}return[n,r,0]}var Gc=function(t,e,n,r){var i,s=n*e,o=(s-r)/2,a=t;return s<=r?(i=1,a=0):t>0&&o-t<=0?(i=2,a=o):t<0&&o+t<=0&&(i=3,a=-o),[i,a]};function PE(t,e,n,r,i,s,o,a,l,c){o===void 0&&(o=innerWidth/2),a===void 0&&(a=innerHeight/2),l===void 0&&(l=0),c===void 0&&(c=0);var u=Gc(t,s,n,innerWidth)[0],f=Gc(e,s,r,innerHeight),h=innerWidth/2,m=innerHeight/2;return{x:o-s/i*(o-(h+t))-h+(r/n>=3&&n*s===innerWidth?0:u?l/2:l),y:a-s/i*(a-(m+e))-m+(f[0]?c/2:c),lastCX:o,lastCY:a}}function PI(t,e,n){var r=t%180!=0;return r?[n,e,r]:[e,n,r]}function DE(t,e,n){var r=PI(n,innerWidth,innerHeight),i=r[0],s=r[1],o=0,a=i,l=s,c=t/e*s,u=e/t*i;return t=s?a=c:t>=i&&ei/s?l=u:e/t>=3&&!r[2]?o=((l=u)-s)/2:a=c,{width:a,height:l,x:0,y:o,pause:!0}}function Mw(t,e){var n=e.leading,r=n!==void 0&&n,i=e.maxWait,s=e.wait,o=s===void 0?i||0:s,a=I.useRef(t);a.current=t;var l=I.useRef(0),c=I.useRef(),u=function(){return c.current&&clearTimeout(c.current)},f=I.useCallback(function(){var h=[].slice.call(arguments),m=Date.now();function v(){l.current=m,u(),a.current.apply(null,h)}var w=l.current,y=m-w;if(w===0&&(r&&v(),l.current=m),i!==void 0){if(y>i)return void v()}else y=1&&s&&s())};u()}function u(){l=requestAnimationFrame(c)}}var wxe={T:0,L:0,W:0,H:0,FIT:void 0},G7=function(){var t=I.useRef(!1);return I.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),t},_xe=["className"];function Mxe(t){var e=t.className,n=e===void 0?"":e,r=Q2(t,_xe);return qt.createElement("div",Si({className:"PhotoView__Spinner "+n},r),qt.createElement("svg",{viewBox:"0 0 32 32",width:"36",height:"36",fill:"white"},qt.createElement("path",{opacity:".25",d:"M16 0 A16 16 0 0 0 16 32 A16 16 0 0 0 16 0 M16 4 A12 12 0 0 1 16 28 A12 12 0 0 1 16 4"}),qt.createElement("path",{d:"M16 0 A16 16 0 0 1 32 16 L28 16 A12 12 0 0 0 16 4z"})))}var xxe=["src","loaded","broken","className","onPhotoLoad","loadingElement","brokenElement"];function bxe(t){var e=t.src,n=t.loaded,r=t.broken,i=t.className,s=t.onPhotoLoad,o=t.loadingElement,a=t.brokenElement,l=Q2(t,xxe),c=G7();return e&&!r?qt.createElement(qt.Fragment,null,qt.createElement("img",Si({className:"PhotoView__Photo"+(i?" "+i:""),src:e,onLoad:function(u){var f=u.target;c.current&&s({loaded:!0,naturalWidth:f.naturalWidth,naturalHeight:f.naturalHeight})},onError:function(){c.current&&s({broken:!0})},alt:""},l)),!n&&(qt.createElement("span",{className:"PhotoView__icon"},o)||qt.createElement(Mxe,{className:"PhotoView__icon"}))):a?qt.createElement("span",{className:"PhotoView__icon"},typeof a=="function"?a({src:e}):a):null}var Sxe={naturalWidth:void 0,naturalHeight:void 0,width:void 0,height:void 0,loaded:void 0,broken:!1,x:0,y:0,touched:!1,maskTouched:!1,rotate:0,scale:1,CX:0,CY:0,lastX:0,lastY:0,lastCX:0,lastCY:0,lastScale:1,touchTime:0,touchLength:0,pause:!0,stopRaf:!0,reach:void 0};function Cxe(t){var e=t.item,n=e.src,r=e.render,i=e.width,s=i===void 0?0:i,o=e.height,a=o===void 0?0:o,l=e.originRef,c=t.visible,u=t.speed,f=t.easing,h=t.wrapClassName,m=t.className,v=t.style,w=t.loadingElement,y=t.brokenElement,g=t.onPhotoTap,_=t.onMaskTap,x=t.onReachMove,S=t.onReachUp,D=t.onPhotoResize,T=t.isActive,E=t.expose,R=fx(Sxe),C=R[0],L=R[1],P=I.useRef(0),z=G7(),B=C.naturalWidth,Y=B===void 0?s:B,ie=C.naturalHeight,ee=ie===void 0?a:ie,le=C.width,j=le===void 0?s:le,q=C.height,ne=q===void 0?a:q,de=C.loaded,_e=de===void 0?!n:de,ge=C.broken,ce=C.x,we=C.y,he=C.touched,Ie=C.stopRaf,et=C.maskTouched,ct=C.rotate,it=C.scale,ut=C.CX,$=C.CY,Ce=C.lastX,Ne=C.lastY,ze=C.lastCX,Ue=C.lastCY,Et=C.lastScale,lt=C.touchTime,yt=C.touchLength,re=C.pause,V=C.reach,Ee=id({onScale:function(Le){return je(_w(Le))},onRotate:function(Le){ct!==Le&&(E({rotate:Le}),L(Si({rotate:Le},DE(Y,ee,Le))))}});function je(Le,At,Jt){it!==Le&&(E({scale:Le}),L(Si({scale:Le},PE(ce,we,j,ne,it,Le,At,Jt),Le<=1&&{x:0,y:0})))}var De=Mw(function(Le,At,Jt){if(Jt===void 0&&(Jt=0),(he||et)&&T){var rn=PI(ct,j,ne),Jn=rn[0],jn=rn[1];if(Jt===0&&P.current===0){var vn=Math.abs(Le-ut)<=20,ue=Math.abs(At-$)<=20;if(vn&&ue)return void L({lastCX:Le,lastCY:At});P.current=vn?At>$?3:2:1}var me,Se=Le-ze,Ge=At-Ue;if(Jt===0){var mt=Gc(Se+Ce,it,Jn,innerWidth)[0],bt=Gc(Ge+Ne,it,jn,innerHeight);me=function(gt,Gt,F,W){return Gt&>===1||W==="x"?"x":F&>>1||W==="y"?"y":void 0}(P.current,mt,bt[0],V),me!==void 0&&x(me,Le,At,it)}if(me==="x"||et)return void L({reach:"x"});var ot=_w(it+(Jt-yt)/100/2*it,Y/j,.2);E({scale:ot}),L(Si({touchLength:Jt,reach:me,scale:ot},PE(ce,we,j,ne,it,ot,Le,At,Se,Ge)))}},{maxWait:8});function He(Le){return!Ie&&!he&&(z.current&&L(Si({},Le,{pause:c})),z.current)}var pt,Qe,Ye,Ke,nt,_t,Qt,We,Ze=(nt=function(Le){return He({x:Le})},_t=function(Le){return He({y:Le})},Qt=function(Le){return z.current&&(E({scale:Le}),L({scale:Le})),!he&&z.current},We=id({X:function(Le){return nt(Le)},Y:function(Le){return _t(Le)},S:function(Le){return Qt(Le)}}),function(Le,At,Jt,rn,Jn,jn,vn,ue,me,Se,Ge){var mt=PI(Se,Jn,jn),bt=mt[0],ot=mt[1],gt=Gc(Le,ue,bt,innerWidth),Gt=gt[0],F=gt[1],W=Gc(At,ue,ot,innerHeight),ae=W[0],U=W[1],J=Date.now()-Ge;if(J>=200||ue!==vn||Math.abs(me-vn)>1){var K=PE(Le,At,Jn,jn,vn,ue),se=K.x,te=K.y,ve=Gt?F:se!==Le?se:null,xe=ae?U:te!==At?te:null;return ve!==null&&Bf(Le,ve,We.X),xe!==null&&Bf(At,xe,We.Y),void(ue!==vn&&Bf(vn,ue,We.S))}var Te=(Le-Jt)/J,Ae=(At-rn)/J,ht=Math.sqrt(Math.pow(Te,2)+Math.pow(Ae,2)),Ve=!1,$e=!1;(function(ft,Mt){var qe,St=ft,at=0,Oe=0,kt=function(yn){qe||(qe=yn);var Tn=yn-qe,ar=Math.sign(ft),cn=-.001*ar,ln=Math.sign(-St)*Math.pow(St,2)*2e-4,dr=St*Tn+(cn+ln)*Math.pow(Tn,2)/2;at+=dr,qe=yn,ar*(St+=(cn+ln)*Tn)<=0?Ut():Mt(at)?Pt():Ut()};function Pt(){Oe=requestAnimationFrame(kt)}function Ut(){cancelAnimationFrame(Oe)}Pt()})(ht,function(ft){var Mt=Le+ft*(Te/ht),qe=At+ft*(Ae/ht),St=Gc(Mt,vn,bt,innerWidth),at=St[0],Oe=St[1],kt=Gc(qe,vn,ot,innerHeight),Pt=kt[0],Ut=kt[1];if(at&&!Ve&&(Ve=!0,Gt?Bf(Mt,Oe,We.X):GO(Oe,Mt+(Mt-Oe),We.X)),Pt&&!$e&&($e=!0,ae?Bf(qe,Ut,We.Y):GO(Ut,qe+(qe-Ut),We.Y)),Ve&&$e)return!1;var yn=Ve||We.X(Oe),Tn=$e||We.Y(Ut);return yn&&Tn})}),Tt=(pt=g,Qe=function(Le,At){V||je(it!==1?1:Math.max(2,Y/j),Le,At)},Ye=I.useRef(0),Ke=Mw(function(){Ye.current=0,pt.apply(void 0,[].slice.call(arguments))},{wait:300}),function(){var Le=[].slice.call(arguments);Ye.current+=1,Ke.apply(void 0,Le),Ye.current>=2&&(Ke.cancel(),Ye.current=0,Qe.apply(void 0,Le))});function Ft(Le,At){if(P.current=0,(he||et)&&T){L({touched:!1,maskTouched:!1,pause:!1,stopRaf:!1,reach:void 0});var Jt=_w(it,Y/j);if(Ze(ce,we,Ce,Ne,j,ne,it,Jt,Et,ct,lt),S(Le,At),ut===Le&&$===At){if(he)return void Tt(Le,At);et&&_(Le,At)}}}function en(Le,At,Jt){Jt===void 0&&(Jt=0),L({touched:!0,CX:Le,CY:At,lastCX:Le,lastCY:At,lastX:ce,lastY:we,lastScale:it,touchLength:Jt,touchTime:Date.now()})}function pe(Le){L({maskTouched:!0,CX:Le.clientX,CY:Le.clientY,lastX:ce,lastY:we})}Xh(Ul?void 0:"mousemove",function(Le){Le.preventDefault(),De(Le.clientX,Le.clientY)}),Xh(Ul?void 0:"mouseup",function(Le){Ft(Le.clientX,Le.clientY)}),Xh(Ul?"touchmove":void 0,function(Le){Le.preventDefault();var At=HO(Le);De.apply(void 0,At)},{passive:!1}),Xh(Ul?"touchend":void 0,function(Le){var At=Le.changedTouches[0];Ft(At.clientX,At.clientY)},{passive:!1}),Xh("resize",Mw(function(){_e&&!he&&(L(DE(Y,ee,ct)),D())},{maxWait:8})),RI(function(){T&&E(Si({scale:it,rotate:ct},Ee))},[T]);var st=function(Le,At,Jt,rn,Jn,jn,vn,ue,me,Se){var Ge=function(se,te,ve,xe,Te){var Ae=I.useRef(!1),ht=fx({lead:!0,scale:ve}),Ve=ht[0],$e=Ve.lead,ft=Ve.scale,Mt=ht[1],qe=Mw(function(St){try{return Te(!0),Mt({lead:!1,scale:St}),Promise.resolve()}catch(at){return Promise.reject(at)}},{wait:xe});return RI(function(){Ae.current?(Te(!1),Mt({lead:!0}),qe(ve)):Ae.current=!0},[ve]),$e?[se*ft,te*ft,ve/ft]:[se*ve,te*ve,1]}(jn,vn,ue,me,Se),mt=Ge[0],bt=Ge[1],ot=Ge[2],gt=function(se,te,ve,xe,Te){var Ae=I.useState(wxe),ht=Ae[0],Ve=Ae[1],$e=I.useState(0),ft=$e[0],Mt=$e[1],qe=I.useRef(),St=id({OK:function(){return se&&Mt(4)}});function at(Oe){Te(!1),Mt(Oe)}return I.useEffect(function(){if(qe.current||(qe.current=Date.now()),ve){if(function(Oe,kt){var Pt=Oe&&Oe.current;if(Pt&&Pt.nodeType===1){var Ut=Pt.getBoundingClientRect();kt({T:Ut.top,L:Ut.left,W:Ut.width,H:Ut.height,FIT:Pt.tagName==="IMG"?getComputedStyle(Pt).objectFit:void 0})}}(te,Ve),se)return Date.now()-qe.current<250?(Mt(1),requestAnimationFrame(function(){Mt(2),requestAnimationFrame(function(){return at(3)})}),void setTimeout(St.OK,xe)):void Mt(4);at(5)}},[se,ve]),[ft,ht]}(Le,At,Jt,me,Se),Gt=gt[0],F=gt[1],W=F.W,ae=F.FIT,U=innerWidth/2,J=innerHeight/2,K=Gt<3||Gt>4;return[K?W?F.L:U:rn+(U-jn*ue/2),K?W?F.T:J:Jn+(J-vn*ue/2),mt,K&&ae?mt*(F.H/W):bt,Gt===0?ot:K?W/(jn*ue)||.01:ot,K?ae?1:0:1,Gt,ae]}(c,l,_e,ce,we,j,ne,it,u,function(Le){return L({pause:Le})}),fe=st[4],Pe=st[6],rt="transform "+u+"ms "+f,It={className:m,onMouseDown:Ul?void 0:function(Le){Le.stopPropagation(),Le.button===0&&en(Le.clientX,Le.clientY,0)},onTouchStart:Ul?function(Le){Le.stopPropagation(),en.apply(void 0,HO(Le))}:void 0,onWheel:function(Le){if(!V){var At=_w(it-Le.deltaY/100/2,Y/j);L({stopRaf:!0}),je(At,Le.clientX,Le.clientY)}},style:{width:st[2]+"px",height:st[3]+"px",opacity:st[5],objectFit:Pe===4?void 0:st[7],transform:ct?"rotate("+ct+"deg)":void 0,transition:Pe>2?rt+", opacity "+u+"ms ease, height "+(Pe<4?u/2:Pe>4?u:0)+"ms "+f:void 0}};return qt.createElement("div",{className:"PhotoView__PhotoWrap"+(h?" "+h:""),style:v,onMouseDown:!Ul&&T?pe:void 0,onTouchStart:Ul&&T?function(Le){return pe(Le.touches[0])}:void 0},qt.createElement("div",{className:"PhotoView__PhotoBox",style:{transform:"matrix("+fe+", 0, 0, "+fe+", "+st[0]+", "+st[1]+")",transition:he||re?void 0:rt,willChange:T?"transform":void 0}},n?qt.createElement(bxe,Si({src:n,loaded:_e,broken:ge},It,{onPhotoLoad:function(Le){L(Si({},Le,Le.loaded&&DE(Le.naturalWidth||0,Le.naturalHeight||0,ct)))},loadingElement:w,brokenElement:y})):r&&r({attrs:It,scale:fe,rotate:ct})))}var VO={x:0,touched:!1,pause:!1,lastCX:void 0,lastCY:void 0,bg:void 0,lastBg:void 0,overlay:!0,minimal:!0,scale:1,rotate:0};function Exe(t){var e=t.loop,n=e===void 0?3:e,r=t.speed,i=t.easing,s=t.photoClosable,o=t.maskClosable,a=o===void 0||o,l=t.maskOpacity,c=l===void 0?1:l,u=t.pullClosable,f=u===void 0||u,h=t.bannerVisible,m=h===void 0||h,v=t.overlayRender,w=t.toolbarRender,y=t.className,g=t.maskClassName,_=t.photoClassName,x=t.photoWrapClassName,S=t.loadingElement,D=t.brokenElement,T=t.images,E=t.index,R=E===void 0?0:E,C=t.onIndexChange,L=t.visible,P=t.onClose,z=t.afterClose,B=t.portalContainer,Y=fx(VO),ie=Y[0],ee=Y[1],le=I.useState(0),j=le[0],q=le[1],ne=ie.x,de=ie.touched,_e=ie.pause,ge=ie.lastCX,ce=ie.lastCY,we=ie.bg,he=we===void 0?c:we,Ie=ie.lastBg,et=ie.overlay,ct=ie.minimal,it=ie.scale,ut=ie.rotate,$=ie.onScale,Ce=ie.onRotate,Ne=t.hasOwnProperty("index"),ze=Ne?R:j,Ue=Ne?C:q,Et=I.useRef(ze),lt=T.length,yt=T[ze],re=typeof n=="boolean"?n:lt>n,V=function(fe,Pe){var rt=I.useReducer(function(Jt){return!Jt},!1)[1],It=I.useRef(0),Le=function(Jt,rn){var Jn=I.useRef(Jt);function jn(vn){Jn.current=vn}return I.useMemo(function(){(function(vn){fe?(vn(fe),It.current=1):It.current=2})(jn)},[Jt]),[Jn.current,jn]}(fe),At=Le[1];return[Le[0],It.current,function(){rt(),It.current===2&&(At(!1),Pe&&Pe()),It.current=0}]}(L,z),Ee=V[0],je=V[1],De=V[2];RI(function(){if(Ee)return ee({pause:!0,x:ze*-(innerWidth+20)}),void(Et.current=ze);ee(VO)},[Ee]);var He=id({close:function(fe){Ce&&Ce(0),ee({overlay:!0,lastBg:he}),P(fe)},changeIndex:function(fe,Pe){Pe===void 0&&(Pe=!1);var rt=re?Et.current+(fe-ze):fe,It=lt-1,Le=LI(rt,0,It),At=re?rt:Le,Jt=innerWidth+20;ee({touched:!1,lastCX:void 0,lastCY:void 0,x:-Jt*At,pause:Pe}),Et.current=At,Ue&&Ue(re?fe<0?It:fe>It?0:fe:Le)}}),pt=He.close,Qe=He.changeIndex;function Ye(fe){return fe?pt():ee({overlay:!et})}function Ke(){ee({x:-(innerWidth+20)*ze,lastCX:void 0,lastCY:void 0,pause:!0}),Et.current=ze}function nt(fe,Pe,rt,It){fe==="x"?function(Le){if(ge!==void 0){var At=Le-ge,Jt=At;!re&&(ze===0&&At>0||ze===lt-1&&At<0)&&(Jt=At/2),ee({touched:!0,lastCX:ge,x:-(innerWidth+20)*Et.current+Jt,pause:!1})}else ee({touched:!0,lastCX:Le,x:ne,pause:!1})}(Pe):fe==="y"&&function(Le,At){if(ce!==void 0){var Jt=c===null?null:LI(c,.01,c-Math.abs(Le-ce)/100/4);ee({touched:!0,lastCY:ce,bg:At===1?Jt:c,minimal:At===1})}else ee({touched:!0,lastCY:Le,bg:he,minimal:!0})}(rt,It)}function _t(fe,Pe){var rt=fe-(ge??fe),It=Pe-(ce??Pe),Le=!1;if(rt<-40)Qe(ze+1);else if(rt>40)Qe(ze-1);else{var At=-(innerWidth+20)*Et.current;Math.abs(It)>100&&ct&&f&&(Le=!0,pt()),ee({touched:!1,x:At,lastCX:void 0,lastCY:void 0,bg:c,overlay:!!Le||et})}}Xh("keydown",function(fe){if(L)switch(fe.key){case"ArrowLeft":Qe(ze-1,!0);break;case"ArrowRight":Qe(ze+1,!0);break;case"Escape":pt()}});var Qt=function(fe,Pe,rt){return I.useMemo(function(){var It=fe.length;return rt?fe.concat(fe).concat(fe).slice(It+Pe-1,It+Pe+2):fe.slice(Math.max(Pe-1,0),Math.min(Pe+2,It+1))},[fe,Pe,rt])}(T,ze,re);if(!Ee)return null;var We=et&&!je,Ze=L?he:Ie,Tt=$&&Ce&&{images:T,index:ze,visible:L,onClose:pt,onIndexChange:Qe,overlayVisible:We,overlay:yt&&yt.overlay,scale:it,rotate:ut,onScale:$,onRotate:Ce},Ft=r?r(je):400,en=i?i(je):"cubic-bezier(0.25, 0.8, 0.25, 1)",pe=r?r(3):600,st=i?i(3):"cubic-bezier(0.25, 0.8, 0.25, 1)";return qt.createElement(hxe,{className:"PhotoView-Portal"+(We?"":" PhotoView-Slider__clean")+(L?"":" PhotoView-Slider__willClose")+(y?" "+y:""),role:"dialog",onClick:function(fe){return fe.stopPropagation()},container:B},L&&qt.createElement(vxe,null),qt.createElement("div",{className:"PhotoView-Slider__Backdrop"+(g?" "+g:"")+(je===1?" PhotoView-Slider__fadeIn":je===2?" PhotoView-Slider__fadeOut":""),style:{background:Ze?"rgba(0, 0, 0, "+Ze+")":void 0,transitionTimingFunction:en,transitionDuration:(de?0:Ft)+"ms",animationDuration:Ft+"ms"},onAnimationEnd:De}),m&&qt.createElement("div",{className:"PhotoView-Slider__BannerWrap"},qt.createElement("div",{className:"PhotoView-Slider__Counter"},ze+1," / ",lt),qt.createElement("div",{className:"PhotoView-Slider__BannerRight"},w&&Tt&&w(Tt),qt.createElement(pxe,{className:"PhotoView-Slider__toolbarIcon",onClick:pt}))),Qt.map(function(fe,Pe){var rt=re||ze!==0?Et.current-1+Pe:ze+Pe;return qt.createElement(Cxe,{key:re?fe.key+"/"+fe.src+"/"+rt:fe.key,item:fe,speed:Ft,easing:en,visible:L,onReachMove:nt,onReachUp:_t,onPhotoTap:function(){return Ye(s)},onMaskTap:function(){return Ye(a)},wrapClassName:x,className:_,style:{left:(innerWidth+20)*rt+"px",transform:"translate3d("+ne+"px, 0px, 0)",transition:de||_e?void 0:"transform "+pe+"ms "+st},loadingElement:S,brokenElement:D,onPhotoResize:Ke,isActive:Et.current===rt,expose:ee})}),!Ul&&m&&qt.createElement(qt.Fragment,null,(re||ze!==0)&&qt.createElement("div",{className:"PhotoView-Slider__ArrowLeft",onClick:function(){return Qe(ze-1,!0)}},qt.createElement(mxe,null)),(re||ze+1-1){var g=c.slice();return g.splice(y,1,w),void a({images:g})}a(function(_){return{images:_.images.concat(w)}})},remove:function(w){a(function(y){var g=y.images.filter(function(_){return _.key!==w});return{images:g,index:Math.min(g.length-1,f)}})},show:function(w){var y=c.findIndex(function(g){return g.key===w});a({visible:!0,index:y}),r&&r(!0,y,o)}}),m=id({close:function(){a({visible:!1}),r&&r(!1,f,o)},changeIndex:function(w){a({index:w}),n&&n(w,o)}}),v=I.useMemo(function(){return Si({},o,h)},[o,h]);return qt.createElement(H7.Provider,{value:v},e,qt.createElement(Exe,Si({images:c,visible:u,index:f,onIndexChange:m.changeIndex,onClose:m.close},i)))}var Lxe=function(t){var e,n,r=t.src,i=t.render,s=t.overlay,o=t.width,a=t.height,l=t.triggers,c=l===void 0?["onClick"]:l,u=t.children,f=I.useContext(H7),h=(e=function(){return f.nextId()},(n=I.useRef({sign:!1,fn:void 0}).current).sign||(n.sign=!0,n.fn=e()),n.fn),m=I.useRef(null);I.useImperativeHandle(u==null?void 0:u.ref,function(){return m.current}),I.useEffect(function(){return function(){f.remove(h)}},[]);var v=id({render:function(y){return i&&i(y)},show:function(y,g){f.show(h),function(_,x){if(u){var S=u.props[_];S&&S(x)}}(y,g)}}),w=I.useMemo(function(){var y={};return c.forEach(function(g){y[g]=v.show.bind(null,g)}),y},[]);return I.useEffect(function(){f.update({key:h,src:r,originRef:m,render:v.render,overlay:s,width:o,height:a})},[r]),u?I.Children.only(I.cloneElement(u,Si({},w,{ref:m}))):null};V7.propTypes={data:Cn.object,showAvatar:Cn.bool};function V7({data:t,showAvatar:e=!0}){const{user:n}=Fa(),{user:r}=Ms();return O.jsxs(Rxe,{children:[e&&O.jsx(mc,{size:45,user:r.uid!=t.userUid?n:r,alt:"avatar",adaptiv:!0}),O.jsxs(Pxe,{blue:r.uid==t.userUid,noAvatar:!e,children:[O.jsxs(Dxe,{blue:r.uid==t.userUid,children:[t.imgs&&O.jsx(Ixe,{children:t.imgs.map(i=>O.jsx(Lxe,{src:i,children:O.jsx(Bxe,{src:i})},i))}),t.media&&t.media.map(i=>O.jsxs(Oxe,{children:[O.jsx(Uxe,{href:i,download:!0,children:O.jsx(NR,{})}),i.split("name")[i.split("name").length-2]]},i)),t.text&&O.jsx(kxe,{children:t.text})]}),t.text&&e&&O.jsxs(Nxe,{className:"vector",xmlns:"http://www.w3.org/2000/svg",width:"28",height:"15",viewBox:"0 0 28 15",fill:"none",children:[O.jsx("link",{xmlns:"",type:"text/css",rel:"stylesheet",id:"dark-mode-custom-link"}),O.jsx("link",{xmlns:"",type:"text/css",rel:"stylesheet",id:"dark-mode-general-link"}),O.jsx("style",{xmlns:"",lang:"en",type:"text/css",id:"dark-mode-custom-style"}),O.jsx("style",{xmlns:"",lang:"en",type:"text/css",id:"dark-mode-native-style"}),O.jsx("style",{xmlns:"",lang:"en",type:"text/css",id:"dark-mode-native-sheet"}),O.jsx("script",{xmlns:""}),O.jsx("path",{d:"M0.936997 12.2567L14 0.5L27.5 14L1.60596 14C0.689477 14 0.255779 12.8698 0.936997 12.2567Z",fill:"white",stroke:"white"}),O.jsx("script",{xmlns:""}),O.jsx("script",{xmlns:""})]}),O.jsx(Fxe,{className:"time",children:t.date.toDate().toLocaleTimeString().split(":").slice(0,2).join(":")})]})]})}const Rxe=Be(l2)` + display: flex; + align-items: flex-end; + width: 100%; + max-width: 60%; + ${_l("padding",4,4,16,4)} +`,Pxe=Be.div` + /* padding: 9.5px 9px; */ + & .vector path { + ${t=>t.blue&&"fill: #85a7fc; stroke: #85a7fc;"} + } + position: relative; + min-height: 40px; + display: flex; + align-items: flex-end; + color: #000; + ${En("margin-left",20,15,1)} + ${En("font-size",17,14,1)} /* ${t=>t.noAvatar&&En("margin-left",70,60,1)} */ + ${t=>t.noAvatar&&"margin-left: 60px !important;"} + + @media (any-hover: hover) { + &:hover { + & .time { + opacity: 1; + } + } + } +`,Dxe=Be.div` + display: flex; + flex-direction: column; + border-radius: 14px; + overflow: hidden; + background: #fff; + ${t=>t.blue&&"background: #85a7fc;"} +`,Nxe=Be.svg` + position: absolute; + left: 0; + bottom: 3px; + transform: translateX(-50%); +`,kxe=Be.pre` + font-size: 16px; + padding: 7px 10px; + font-family: 'Roboto'; +`,Bxe=Be.img` + max-height: 30vh; + object-fit: cover; + cursor: grab; +`,Oxe=Be.div` + display: flex; + align-items: center; + font-size: 20px; + column-gap: 10px; + padding: 7px 10px; + + svg { + font-size: 30px; + cursor: pointer; + } +`,Uxe=Be.a` + display: inline-block; +`,Fxe=Be.span` + position: absolute; + color: #666; + right: 0%; + top: 50%; + transform: translateY(-50%) translateX(calc(100% + 10px)); + font-size: 12px; + opacity: 0; + user-select: none; +`;function jxe(){const{chat:t,messages:e,setMessages:n,chatScroll:r,setChatList:i,scrollDown:s,lastMessageDoc:o,setLastMessageDoc:a}=Fa(),l=I.useRef(),c=I.useRef(!1);return I.useEffect(()=>{l.current&&i(l.current)},[i]),I.useEffect(()=>{e.length&&l.current.scrollTop+l.current.offsetHeight==r&&s()},[r,s,e.length]),I.useEffect(()=>{const u=l.current;async function f(h){const m=h.target.scrollTop;if(o&&m<150&&!c.current){c.current=!0;const{data:v,last:w}=await tc(["chats",t.id,"messages"],{other:[nx("date","desc"),rx(30),yG(o)]},{last:!0,id:!0});n([...v.reverse(),...e]),a(w),c.current=!1}}return u.addEventListener("scroll",f),()=>{u.removeEventListener("scroll",f)}},[t,o,e,n,a]),O.jsx(O.Fragment,{children:O.jsx(zxe,{ref:l,className:"test",children:t&&(()=>{let u=!0;return e.map((f,h)=>(e[h+1]&&f.userUid==e[h+1].userUid?u=!1:u=!0,O.jsx(V7,{showAvatar:u,data:f},f.id)))})()})})}const zxe=Be(uv)` + display: flex; + flex-direction: column; + overflow: auto; + /* justify-content: flex-end; */ + flex: 1 1 auto; + ${xb(5,Dn.$colorMain,"#111")} + ${_l("padding",19,15,15,5)} +`;function WO(){const{user:t}=Fa();return O.jsx(Hxe,{children:t&&O.jsxs(O.Fragment,{children:[O.jsx(rye,{}),O.jsx(Gxe,{}),O.jsx(JMe,{})]})})}const Hxe=Be.div` + display: flex; + flex-direction: column; + flex: 1 1 auto; + overflow: hidden; + background: #161628; +`,Gxe=Be(jxe)` + flex: 1 1 auto; + max-height: 100vh; + overflow: auto; +`;function Vxe(){return O.jsx(Wxe,{children:"Choose who you would like to write to"})}const Wxe=Be.div` + flex: 1 1 auto; + display: flex; + align-items: center; + justify-content: center; + font-size: 25px; + color: ${Dn.$colorMain}; + + @media (max-width: 960px) { + display: none; + } +`;/** + * @license + * Copyright 2010-2024 Three.js Authors + * SPDX-License-Identifier: MIT + */const Wd="167",$xe={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Jxe={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},W7=0,DI=1,$7=2,Yxe=3,J7=0,X2=1,Fg=2,Sa=3,ml=0,Os=1,Ko=2,ul=0,sd=1,NI=2,kI=3,BI=4,Y7=5,eu=100,Q7=101,X7=102,K7=103,Z7=104,q7=200,eW=201,tW=202,nW=203,dx=204,hx=205,rW=206,iW=207,sW=208,oW=209,aW=210,lW=211,cW=212,uW=213,fW=214,dW=0,hW=1,pW=2,D1=3,mW=4,gW=5,vW=6,yW=7,Nv=0,wW=1,_W=2,fl=0,MW=1,xW=2,bW=3,BR=4,SW=5,CW=6,EW=7,OI="attached",AW="detached",Eu=300,gl=301,Au=302,um=303,N1=304,zm=306,Tu=1e3,qr=1001,fm=1002,ei=1003,K2=1004,Qxe=1004,$f=1005,Xxe=1005,qn=1006,Rp=1007,Kxe=1007,ta=1008,UI=1008,qs=1009,Z2=1010,q2=1011,dm=1012,kv=1013,vl=1014,Dr=1015,Ai=1016,eS=1017,tS=1018,Ed=1020,OR=35902,UR=1021,FR=1022,ti=1023,jR=1024,zR=1025,od=1026,Ad=1027,Bv=1028,Ov=1029,HR=1030,nS=1031,Zxe=1032,rS=1033,jg=33776,zg=33777,Hg=33778,Gg=33779,px=35840,mx=35841,gx=35842,vx=35843,yx=36196,wx=37492,_x=37496,Mx=37808,xx=37809,bx=37810,Sx=37811,Cx=37812,Ex=37813,Ax=37814,Tx=37815,Ix=37816,Lx=37817,Rx=37818,Px=37819,Dx=37820,Nx=37821,Vg=36492,kx=36494,Bx=36495,GR=36283,Ox=36284,Ux=36285,Fx=36286,TW=2200,IW=2201,LW=2202,hm=2300,pm=2301,Z_=2302,Jf=2400,Yf=2401,k1=2402,iS=2500,VR=2501,RW=0,WR=1,jx=2,PW=3200,DW=3201,qxe=3202,ebe=3203,Wu=0,NW=1,Gl="",ho="srgb",aa="srgb-linear",sS="display-p3",Uv="display-p3-linear",B1="linear",gr="srgb",O1="rec709",U1="p3",tbe=0,Pf=7680,nbe=7681,rbe=7682,ibe=7683,sbe=34055,obe=34056,abe=5386,lbe=512,cbe=513,ube=514,fbe=515,dbe=516,hbe=517,pbe=518,FI=519,kW=512,BW=513,OW=514,$R=515,UW=516,FW=517,jW=518,zW=519,F1=35044,mbe=35048,gbe=35040,vbe=35045,ybe=35049,wbe=35041,_be=35046,Mbe=35050,xbe=35042,bbe="100",jI="300 es",tl=2e3,j1=2001;class gc{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(n)===-1&&r[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const r=this._listeners[e.type];if(r!==void 0){e.target=this;const i=r.slice(0);for(let s=0,o=i.length;s>8&255]+us[t>>16&255]+us[t>>24&255]+"-"+us[e&255]+us[e>>8&255]+"-"+us[e>>16&15|64]+us[e>>24&255]+"-"+us[n&63|128]+us[n>>8&255]+"-"+us[n>>16&255]+us[n>>24&255]+us[r&255]+us[r>>8&255]+us[r>>16&255]+us[r>>24&255]).toLowerCase()}function Vr(t,e,n){return Math.max(e,Math.min(n,t))}function JR(t,e){return(t%e+e)%e}function Sbe(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function Cbe(t,e,n){return t!==e?(n-t)/(e-t):0}function Wg(t,e,n){return(1-n)*t+n*e}function Ebe(t,e,n,r){return Wg(t,e,1-Math.exp(-n*r))}function Abe(t,e=1){return e-Math.abs(JR(t,e*2)-e)}function Tbe(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function Ibe(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function Lbe(t,e){return t+Math.floor(Math.random()*(e-t+1))}function Rbe(t,e){return t+Math.random()*(e-t)}function Pbe(t){return t*(.5-Math.random())}function Dbe(t){t!==void 0&&($O=t);let e=$O+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function Nbe(t){return t*ad}function kbe(t){return t*mm}function Bbe(t){return(t&t-1)===0&&t!==0}function Obe(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function Ube(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function Fbe(t,e,n,r,i){const s=Math.cos,o=Math.sin,a=s(n/2),l=o(n/2),c=s((e+r)/2),u=o((e+r)/2),f=s((e-r)/2),h=o((e-r)/2),m=s((r-e)/2),v=o((r-e)/2);switch(i){case"XYX":t.set(a*u,l*f,l*h,a*c);break;case"YZY":t.set(l*h,a*u,l*f,a*c);break;case"ZXZ":t.set(l*f,l*h,a*u,a*c);break;case"XZX":t.set(a*u,l*v,l*m,a*c);break;case"YXY":t.set(l*m,a*u,l*v,a*c);break;case"ZYZ":t.set(l*v,l*m,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function Ps(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function _n(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const Pp={DEG2RAD:ad,RAD2DEG:mm,generateUUID:Eo,clamp:Vr,euclideanModulo:JR,mapLinear:Sbe,inverseLerp:Cbe,lerp:Wg,damp:Ebe,pingpong:Abe,smoothstep:Tbe,smootherstep:Ibe,randInt:Lbe,randFloat:Rbe,randFloatSpread:Pbe,seededRandom:Dbe,degToRad:Nbe,radToDeg:kbe,isPowerOfTwo:Bbe,ceilPowerOfTwo:Obe,floorPowerOfTwo:Ube,setQuaternionFromProperEuler:Fbe,normalize:_n,denormalize:Ps};class tt{constructor(e=0,n=0){tt.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Vr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const r=Math.cos(n),i=Math.sin(n),s=this.x-e.x,o=this.y-e.y;return this.x=s*r-o*i+e.x,this.y=s*i+o*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class wn{constructor(e,n,r,i,s,o,a,l,c){wn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,s,o,a,l,c)}set(e,n,r,i,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=s,u[5]=l,u[6]=r,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,s=this.elements,o=r[0],a=r[3],l=r[6],c=r[1],u=r[4],f=r[7],h=r[2],m=r[5],v=r[8],w=i[0],y=i[3],g=i[6],_=i[1],x=i[4],S=i[7],D=i[2],T=i[5],E=i[8];return s[0]=o*w+a*_+l*D,s[3]=o*y+a*x+l*T,s[6]=o*g+a*S+l*E,s[1]=c*w+u*_+f*D,s[4]=c*y+u*x+f*T,s[7]=c*g+u*S+f*E,s[2]=h*w+m*_+v*D,s[5]=h*y+m*x+v*T,s[8]=h*g+m*S+v*E,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*o*u-n*a*c-r*s*u+r*a*l+i*s*c-i*o*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=u*o-a*c,h=a*l-u*s,m=c*s-o*l,v=n*f+r*h+i*m;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const w=1/v;return e[0]=f*w,e[1]=(i*c-u*r)*w,e[2]=(a*r-i*o)*w,e[3]=h*w,e[4]=(u*n-i*l)*w,e[5]=(i*s-a*n)*w,e[6]=m*w,e[7]=(r*l-c*n)*w,e[8]=(o*n-r*s)*w,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,r,i,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(r*l,r*c,-r*(l*o+c*a)+o+e,-i*c,i*l,-i*(-c*o+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(NE.makeScale(e,n)),this}rotate(e){return this.premultiply(NE.makeRotation(-e)),this}translate(e,n){return this.premultiply(NE.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,r,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<9;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const NE=new wn;function HW(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const jbe={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function dp(t,e){return new jbe[t](e)}function z1(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function GW(){const t=z1("canvas");return t.style.display="block",t}const JO={};function Dp(t){t in JO||(JO[t]=!0,console.warn(t))}function zbe(t,e,n){return new Promise(function(r,i){function s(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:i();break;case t.TIMEOUT_EXPIRED:setTimeout(s,n);break;default:r()}}setTimeout(s,n)})}const YO=new wn().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),QO=new wn().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),O0={[aa]:{transfer:B1,primaries:O1,luminanceCoefficients:[.2126,.7152,.0722],toReference:t=>t,fromReference:t=>t},[ho]:{transfer:gr,primaries:O1,luminanceCoefficients:[.2126,.7152,.0722],toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[Uv]:{transfer:B1,primaries:U1,luminanceCoefficients:[.2289,.6917,.0793],toReference:t=>t.applyMatrix3(QO),fromReference:t=>t.applyMatrix3(YO)},[sS]:{transfer:gr,primaries:U1,luminanceCoefficients:[.2289,.6917,.0793],toReference:t=>t.convertSRGBToLinear().applyMatrix3(QO),fromReference:t=>t.applyMatrix3(YO).convertLinearToSRGB()}},Hbe=new Set([aa,Uv]),Zn={enabled:!0,_workingColorSpace:aa,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!Hbe.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const r=O0[e].toReference,i=O0[n].fromReference;return i(r(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return O0[t].primaries},getTransfer:function(t){return t===Gl?B1:O0[t].transfer},getLuminanceCoefficients:function(t,e=this._workingColorSpace){return t.fromArray(O0[e].luminanceCoefficients)}};function Np(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function kE(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let xh;class VW{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{xh===void 0&&(xh=z1("canvas")),xh.width=e.width,xh.height=e.height;const r=xh.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=xh}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=z1("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height),s=i.data;for(let o=0;o0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Eu)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Tu:e.x=e.x-Math.floor(e.x);break;case qr:e.x=e.x<0?0:1;break;case fm:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Tu:e.y=e.y-Math.floor(e.y);break;case qr:e.y=e.y<0?0:1;break;case fm:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}er.DEFAULT_IMAGE=null;er.DEFAULT_MAPPING=Eu;er.DEFAULT_ANISOTROPY=1;class or{constructor(e=0,n=0,r=0,i=1){or.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,r,i){return this.x=e,this.y=n,this.z=r,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,s=this.w,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i+o[12]*s,this.y=o[1]*n+o[5]*r+o[9]*i+o[13]*s,this.z=o[2]*n+o[6]*r+o[10]*i+o[14]*s,this.w=o[3]*n+o[7]*r+o[11]*i+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,r,i,s;const l=e.elements,c=l[0],u=l[4],f=l[8],h=l[1],m=l[5],v=l[9],w=l[2],y=l[6],g=l[10];if(Math.abs(u-h)<.01&&Math.abs(f-w)<.01&&Math.abs(v-y)<.01){if(Math.abs(u+h)<.1&&Math.abs(f+w)<.1&&Math.abs(v+y)<.1&&Math.abs(c+m+g-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const x=(c+1)/2,S=(m+1)/2,D=(g+1)/2,T=(u+h)/4,E=(f+w)/4,R=(v+y)/4;return x>S&&x>D?x<.01?(r=0,i=.707106781,s=.707106781):(r=Math.sqrt(x),i=T/r,s=E/r):S>D?S<.01?(r=.707106781,i=0,s=.707106781):(i=Math.sqrt(S),r=T/i,s=R/i):D<.01?(r=.707106781,i=.707106781,s=0):(s=Math.sqrt(D),r=E/s,i=R/s),this.set(r,i,s,n),this}let _=Math.sqrt((y-v)*(y-v)+(f-w)*(f-w)+(h-u)*(h-u));return Math.abs(_)<.001&&(_=1),this.x=(y-v)/_,this.y=(f-w)/_,this.z=(h-u)/_,this.w=Math.acos((c+m+g-1)/2),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this.w=n[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this.w=e.w+(n.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class WW extends gc{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new or(0,0,e,n),this.scissorTest=!1,this.viewport=new or(0,0,e,n);const i={width:e,height:n,depth:1};r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:qn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},r);const s=new er(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace);s.flipY=!1,s.generateMipmaps=r.generateMipmaps,s.internalFormat=r.internalFormat,this.textures=[];const o=r.count;for(let a=0;a=0?1:-1,x=1-g*g;if(x>Number.EPSILON){const D=Math.sqrt(x),T=Math.atan2(D,g*_);y=Math.sin(y*T)/D,a=Math.sin(a*T)/D}const S=a*_;if(l=l*y+h*S,c=c*y+m*S,u=u*y+v*S,f=f*y+w*S,y===1-a){const D=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=D,c*=D,u*=D,f*=D}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=f}static multiplyQuaternionsFlat(e,n,r,i,s,o){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],f=s[o],h=s[o+1],m=s[o+2],v=s[o+3];return e[n]=a*v+u*f+l*m-c*h,e[n+1]=l*v+u*h+c*f-a*m,e[n+2]=c*v+u*m+a*h-l*f,e[n+3]=u*v-a*f-l*h-c*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,r,i){return this._x=e,this._y=n,this._z=r,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n=!0){const r=e._x,i=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),f=a(s/2),h=l(r/2),m=l(i/2),v=l(s/2);switch(o){case"XYZ":this._x=h*u*f+c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f-h*m*v;break;case"YXZ":this._x=h*u*f+c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f+h*m*v;break;case"ZXY":this._x=h*u*f-c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f-h*m*v;break;case"ZYX":this._x=h*u*f-c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f+h*m*v;break;case"YZX":this._x=h*u*f+c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f-h*m*v;break;case"XZY":this._x=h*u*f-c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f+h*m*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,r=n[0],i=n[4],s=n[8],o=n[1],a=n[5],l=n[9],c=n[2],u=n[6],f=n[10],h=r+a+f;if(h>0){const m=.5/Math.sqrt(h+1);this._w=.25/m,this._x=(u-l)*m,this._y=(s-c)*m,this._z=(o-i)*m}else if(r>a&&r>f){const m=2*Math.sqrt(1+r-a-f);this._w=(u-l)/m,this._x=.25*m,this._y=(i+o)/m,this._z=(s+c)/m}else if(a>f){const m=2*Math.sqrt(1+a-r-f);this._w=(s-c)/m,this._x=(i+o)/m,this._y=.25*m,this._z=(l+u)/m}else{const m=2*Math.sqrt(1+f-r-a);this._w=(o-i)/m,this._x=(s+c)/m,this._y=(l+u)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Vr(this.dot(e),-1,1)))}rotateTowards(e,n){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,n/r);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const r=e._x,i=e._y,s=e._z,o=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+o*a+i*c-s*l,this._y=i*u+o*l+s*a-r*c,this._z=s*u+o*c+r*l-i*a,this._w=o*u-r*a-i*l-s*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,s=this._z,o=this._w;let a=o*e._w+r*e._x+i*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=r,this._y=i,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-n;return this._w=m*o+n*this._w,this._x=m*r+n*this._x,this._y=m*i+n*this._y,this._z=m*s+n*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),f=Math.sin((1-n)*u)/c,h=Math.sin(n*u)/c;return this._w=o*f+this._w*h,this._x=r*f+this._x*h,this._y=i*f+this._y*h,this._z=s*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){const e=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),r=Math.random(),i=Math.sqrt(1-r),s=Math.sqrt(r);return this.set(i*Math.sin(e),i*Math.cos(e),s*Math.sin(n),s*Math.cos(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Z{constructor(e=0,n=0,r=0){Z.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(XO.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(XO.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,s=e.elements;return this.x=s[0]*n+s[3]*r+s[6]*i,this.y=s[1]*n+s[4]*r+s[7]*i,this.z=s[2]*n+s[5]*r+s[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,s=e.elements,o=1/(s[3]*n+s[7]*r+s[11]*i+s[15]);return this.x=(s[0]*n+s[4]*r+s[8]*i+s[12])*o,this.y=(s[1]*n+s[5]*r+s[9]*i+s[13])*o,this.z=(s[2]*n+s[6]*r+s[10]*i+s[14])*o,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*i-a*r),u=2*(a*n-s*i),f=2*(s*r-o*n);return this.x=n+l*c+o*f-a*u,this.y=r+l*u+a*c-s*f,this.z=i+l*f+s*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,s=e.elements;return this.x=s[0]*n+s[4]*r+s[8]*i,this.y=s[1]*n+s[5]*r+s[9]*i,this.z=s[2]*n+s[6]*r+s[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const r=e.x,i=e.y,s=e.z,o=n.x,a=n.y,l=n.z;return this.x=i*l-s*a,this.y=s*o-r*l,this.z=r*a-i*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return OE.copy(this).projectOnVector(e),this.sub(OE)}reflect(e){return this.sub(OE.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Vr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,r){const i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,n=Math.random()*2-1,r=Math.sqrt(1-n*n);return this.x=r*Math.cos(e),this.y=n,this.z=r*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const OE=new Z,XO=new Ti;class Ui{constructor(e=new Z(1/0,1/0,1/0),n=new Z(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,r=e.length;n=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,wa),wa.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,r;return e.normal.x>0?(n=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),n<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(U0),bw.subVectors(this.max,U0),bh.subVectors(e.a,U0),Sh.subVectors(e.b,U0),Ch.subVectors(e.c,U0),Lc.subVectors(Sh,bh),Rc.subVectors(Ch,Sh),pf.subVectors(bh,Ch);let n=[0,-Lc.z,Lc.y,0,-Rc.z,Rc.y,0,-pf.z,pf.y,Lc.z,0,-Lc.x,Rc.z,0,-Rc.x,pf.z,0,-pf.x,-Lc.y,Lc.x,0,-Rc.y,Rc.x,0,-pf.y,pf.x,0];return!UE(n,bh,Sh,Ch,bw)||(n=[1,0,0,0,1,0,0,0,1],!UE(n,bh,Sh,Ch,bw))?!1:(Sw.crossVectors(Lc,Rc),n=[Sw.x,Sw.y,Sw.z],UE(n,bh,Sh,Ch,bw))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,wa).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(wa).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Pl[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Pl[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Pl[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Pl[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Pl[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Pl[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Pl[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Pl[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Pl),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const Pl=[new Z,new Z,new Z,new Z,new Z,new Z,new Z,new Z],wa=new Z,xw=new Ui,bh=new Z,Sh=new Z,Ch=new Z,Lc=new Z,Rc=new Z,pf=new Z,U0=new Z,bw=new Z,Sw=new Z,mf=new Z;function UE(t,e,n,r,i){for(let s=0,o=t.length-3;s<=o;s+=3){mf.fromArray(t,s);const a=i.x*Math.abs(mf.x)+i.y*Math.abs(mf.y)+i.z*Math.abs(mf.z),l=e.dot(mf),c=n.dot(mf),u=r.dot(mf);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const Jbe=new Ui,F0=new Z,FE=new Z;class Fi{constructor(e=new Z,n=-1){this.isSphere=!0,this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const r=this.center;n!==void 0?r.copy(n):Jbe.setFromPoints(e).getCenter(r);let i=0;for(let s=0,o=e.length;sthis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;F0.subVectors(e,this.center);const n=F0.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(F0,i/r),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(FE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(F0.copy(e.center).add(FE)),this.expandByPoint(F0.copy(e.center).sub(FE))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Dl=new Z,jE=new Z,Cw=new Z,Pc=new Z,zE=new Z,Ew=new Z,HE=new Z;class Hm{constructor(e=new Z,n=new Z(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Dl)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=Dl.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(Dl.copy(this.origin).addScaledVector(this.direction,n),Dl.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){jE.copy(e).add(n).multiplyScalar(.5),Cw.copy(n).sub(e).normalize(),Pc.copy(this.origin).sub(jE);const s=e.distanceTo(n)*.5,o=-this.direction.dot(Cw),a=Pc.dot(this.direction),l=-Pc.dot(Cw),c=Pc.lengthSq(),u=Math.abs(1-o*o);let f,h,m,v;if(u>0)if(f=o*l-a,h=o*a-l,v=s*u,f>=0)if(h>=-v)if(h<=v){const w=1/u;f*=w,h*=w,m=f*(f+o*h+2*a)+h*(o*f+h+2*l)+c}else h=s,f=Math.max(0,-(o*h+a)),m=-f*f+h*(h+2*l)+c;else h=-s,f=Math.max(0,-(o*h+a)),m=-f*f+h*(h+2*l)+c;else h<=-v?(f=Math.max(0,-(-o*s+a)),h=f>0?-s:Math.min(Math.max(-s,-l),s),m=-f*f+h*(h+2*l)+c):h<=v?(f=0,h=Math.min(Math.max(-s,-l),s),m=h*(h+2*l)+c):(f=Math.max(0,-(o*s+a)),h=f>0?s:Math.min(Math.max(-s,-l),s),m=-f*f+h*(h+2*l)+c);else h=o>0?-s:s,f=Math.max(0,-(o*h+a)),m=-f*f+h*(h+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,f),i&&i.copy(jE).addScaledVector(Cw,h),m}intersectSphere(e,n){Dl.subVectors(e.center,this.origin);const r=Dl.dot(this.direction),i=Dl.dot(Dl)-r*r,s=e.radius*e.radius;if(i>s)return null;const o=Math.sqrt(s-i),a=r-o,l=r+o;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/n;return r>=0?r:null}intersectPlane(e,n){const r=this.distanceToPlane(e);return r===null?null:this.at(r,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let r,i,s,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return c>=0?(r=(e.min.x-h.x)*c,i=(e.max.x-h.x)*c):(r=(e.max.x-h.x)*c,i=(e.min.x-h.x)*c),u>=0?(s=(e.min.y-h.y)*u,o=(e.max.y-h.y)*u):(s=(e.max.y-h.y)*u,o=(e.min.y-h.y)*u),r>o||s>i||((s>r||isNaN(r))&&(r=s),(o=0?(a=(e.min.z-h.z)*f,l=(e.max.z-h.z)*f):(a=(e.max.z-h.z)*f,l=(e.min.z-h.z)*f),r>l||a>i)||((a>r||r!==r)&&(r=a),(l=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,Dl)!==null}intersectTriangle(e,n,r,i,s){zE.subVectors(n,e),Ew.subVectors(r,e),HE.crossVectors(zE,Ew);let o=this.direction.dot(HE),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Pc.subVectors(this.origin,e);const l=a*this.direction.dot(Ew.crossVectors(Pc,Ew));if(l<0)return null;const c=a*this.direction.dot(zE.cross(Pc));if(c<0||l+c>o)return null;const u=-a*Pc.dot(HE);return u<0?null:this.at(u/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Kt{constructor(e,n,r,i,s,o,a,l,c,u,f,h,m,v,w,y){Kt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,r,i,s,o,a,l,c,u,f,h,m,v,w,y)}set(e,n,r,i,s,o,a,l,c,u,f,h,m,v,w,y){const g=this.elements;return g[0]=e,g[4]=n,g[8]=r,g[12]=i,g[1]=s,g[5]=o,g[9]=a,g[13]=l,g[2]=c,g[6]=u,g[10]=f,g[14]=h,g[3]=m,g[7]=v,g[11]=w,g[15]=y,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Kt().fromArray(this.elements)}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){const n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,r){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,r=e.elements,i=1/Eh.setFromMatrixColumn(e,0).length(),s=1/Eh.setFromMatrixColumn(e,1).length(),o=1/Eh.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*s,n[5]=r[5]*s,n[6]=r[6]*s,n[7]=0,n[8]=r[8]*o,n[9]=r[9]*o,n[10]=r[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,r=e.x,i=e.y,s=e.z,o=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=Math.cos(s),f=Math.sin(s);if(e.order==="XYZ"){const h=o*u,m=o*f,v=a*u,w=a*f;n[0]=l*u,n[4]=-l*f,n[8]=c,n[1]=m+v*c,n[5]=h-w*c,n[9]=-a*l,n[2]=w-h*c,n[6]=v+m*c,n[10]=o*l}else if(e.order==="YXZ"){const h=l*u,m=l*f,v=c*u,w=c*f;n[0]=h+w*a,n[4]=v*a-m,n[8]=o*c,n[1]=o*f,n[5]=o*u,n[9]=-a,n[2]=m*a-v,n[6]=w+h*a,n[10]=o*l}else if(e.order==="ZXY"){const h=l*u,m=l*f,v=c*u,w=c*f;n[0]=h-w*a,n[4]=-o*f,n[8]=v+m*a,n[1]=m+v*a,n[5]=o*u,n[9]=w-h*a,n[2]=-o*c,n[6]=a,n[10]=o*l}else if(e.order==="ZYX"){const h=o*u,m=o*f,v=a*u,w=a*f;n[0]=l*u,n[4]=v*c-m,n[8]=h*c+w,n[1]=l*f,n[5]=w*c+h,n[9]=m*c-v,n[2]=-c,n[6]=a*l,n[10]=o*l}else if(e.order==="YZX"){const h=o*l,m=o*c,v=a*l,w=a*c;n[0]=l*u,n[4]=w-h*f,n[8]=v*f+m,n[1]=f,n[5]=o*u,n[9]=-a*u,n[2]=-c*u,n[6]=m*f+v,n[10]=h-w*f}else if(e.order==="XZY"){const h=o*l,m=o*c,v=a*l,w=a*c;n[0]=l*u,n[4]=-f,n[8]=c*u,n[1]=h*f+w,n[5]=o*u,n[9]=m*f-v,n[2]=v*f-m,n[6]=a*u,n[10]=w*f+h}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Ybe,e,Qbe)}lookAt(e,n,r){const i=this.elements;return lo.subVectors(e,n),lo.lengthSq()===0&&(lo.z=1),lo.normalize(),Dc.crossVectors(r,lo),Dc.lengthSq()===0&&(Math.abs(r.z)===1?lo.x+=1e-4:lo.z+=1e-4,lo.normalize(),Dc.crossVectors(r,lo)),Dc.normalize(),Aw.crossVectors(lo,Dc),i[0]=Dc.x,i[4]=Aw.x,i[8]=lo.x,i[1]=Dc.y,i[5]=Aw.y,i[9]=lo.y,i[2]=Dc.z,i[6]=Aw.z,i[10]=lo.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,s=this.elements,o=r[0],a=r[4],l=r[8],c=r[12],u=r[1],f=r[5],h=r[9],m=r[13],v=r[2],w=r[6],y=r[10],g=r[14],_=r[3],x=r[7],S=r[11],D=r[15],T=i[0],E=i[4],R=i[8],C=i[12],L=i[1],P=i[5],z=i[9],B=i[13],Y=i[2],ie=i[6],ee=i[10],le=i[14],j=i[3],q=i[7],ne=i[11],de=i[15];return s[0]=o*T+a*L+l*Y+c*j,s[4]=o*E+a*P+l*ie+c*q,s[8]=o*R+a*z+l*ee+c*ne,s[12]=o*C+a*B+l*le+c*de,s[1]=u*T+f*L+h*Y+m*j,s[5]=u*E+f*P+h*ie+m*q,s[9]=u*R+f*z+h*ee+m*ne,s[13]=u*C+f*B+h*le+m*de,s[2]=v*T+w*L+y*Y+g*j,s[6]=v*E+w*P+y*ie+g*q,s[10]=v*R+w*z+y*ee+g*ne,s[14]=v*C+w*B+y*le+g*de,s[3]=_*T+x*L+S*Y+D*j,s[7]=_*E+x*P+S*ie+D*q,s[11]=_*R+x*z+S*ee+D*ne,s[15]=_*C+x*B+S*le+D*de,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[4],i=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],f=e[6],h=e[10],m=e[14],v=e[3],w=e[7],y=e[11],g=e[15];return v*(+s*l*f-i*c*f-s*a*h+r*c*h+i*a*m-r*l*m)+w*(+n*l*m-n*c*h+s*o*h-i*o*m+i*c*u-s*l*u)+y*(+n*c*f-n*a*m-s*o*f+r*o*m+s*a*u-r*c*u)+g*(-i*a*u-n*l*f+n*a*h+i*o*f-r*o*h+r*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,r){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],m=e[11],v=e[12],w=e[13],y=e[14],g=e[15],_=f*y*c-w*h*c+w*l*m-a*y*m-f*l*g+a*h*g,x=v*h*c-u*y*c-v*l*m+o*y*m+u*l*g-o*h*g,S=u*w*c-v*f*c+v*a*m-o*w*m-u*a*g+o*f*g,D=v*f*l-u*w*l-v*a*h+o*w*h+u*a*y-o*f*y,T=n*_+r*x+i*S+s*D;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const E=1/T;return e[0]=_*E,e[1]=(w*h*s-f*y*s-w*i*m+r*y*m+f*i*g-r*h*g)*E,e[2]=(a*y*s-w*l*s+w*i*c-r*y*c-a*i*g+r*l*g)*E,e[3]=(f*l*s-a*h*s-f*i*c+r*h*c+a*i*m-r*l*m)*E,e[4]=x*E,e[5]=(u*y*s-v*h*s+v*i*m-n*y*m-u*i*g+n*h*g)*E,e[6]=(v*l*s-o*y*s-v*i*c+n*y*c+o*i*g-n*l*g)*E,e[7]=(o*h*s-u*l*s+u*i*c-n*h*c-o*i*m+n*l*m)*E,e[8]=S*E,e[9]=(v*f*s-u*w*s-v*r*m+n*w*m+u*r*g-n*f*g)*E,e[10]=(o*w*s-v*a*s+v*r*c-n*w*c-o*r*g+n*a*g)*E,e[11]=(u*a*s-o*f*s-u*r*c+n*f*c+o*r*m-n*a*m)*E,e[12]=D*E,e[13]=(u*w*i-v*f*i+v*r*h-n*w*h-u*r*y+n*f*y)*E,e[14]=(v*a*i-o*w*i-v*r*l+n*w*l+o*r*y-n*a*y)*E,e[15]=(o*f*i-u*a*i+u*r*l-n*f*l-o*r*h+n*a*h)*E,this}scale(e){const n=this.elements,r=e.x,i=e.y,s=e.z;return n[0]*=r,n[4]*=i,n[8]*=s,n[1]*=r,n[5]*=i,n[9]*=s,n[2]*=r,n[6]*=i,n[10]*=s,n[3]*=r,n[7]*=i,n[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,r,i))}makeTranslation(e,n,r){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,r,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const r=Math.cos(n),i=Math.sin(n),s=1-r,o=e.x,a=e.y,l=e.z,c=s*o,u=s*a;return this.set(c*o+r,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+r,u*l-i*o,0,c*l-i*a,u*l+i*o,s*l*l+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,s,o){return this.set(1,r,s,0,e,1,o,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,s=n._x,o=n._y,a=n._z,l=n._w,c=s+s,u=o+o,f=a+a,h=s*c,m=s*u,v=s*f,w=o*u,y=o*f,g=a*f,_=l*c,x=l*u,S=l*f,D=r.x,T=r.y,E=r.z;return i[0]=(1-(w+g))*D,i[1]=(m+S)*D,i[2]=(v-x)*D,i[3]=0,i[4]=(m-S)*T,i[5]=(1-(h+g))*T,i[6]=(y+_)*T,i[7]=0,i[8]=(v+x)*E,i[9]=(y-_)*E,i[10]=(1-(h+w))*E,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){const i=this.elements;let s=Eh.set(i[0],i[1],i[2]).length();const o=Eh.set(i[4],i[5],i[6]).length(),a=Eh.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),e.x=i[12],e.y=i[13],e.z=i[14],_a.copy(this);const c=1/s,u=1/o,f=1/a;return _a.elements[0]*=c,_a.elements[1]*=c,_a.elements[2]*=c,_a.elements[4]*=u,_a.elements[5]*=u,_a.elements[6]*=u,_a.elements[8]*=f,_a.elements[9]*=f,_a.elements[10]*=f,n.setFromRotationMatrix(_a),r.x=s,r.y=o,r.z=a,this}makePerspective(e,n,r,i,s,o,a=tl){const l=this.elements,c=2*s/(n-e),u=2*s/(r-i),f=(n+e)/(n-e),h=(r+i)/(r-i);let m,v;if(a===tl)m=-(o+s)/(o-s),v=-2*o*s/(o-s);else if(a===j1)m=-o/(o-s),v=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=m,l[14]=v,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,s,o,a=tl){const l=this.elements,c=1/(n-e),u=1/(r-i),f=1/(o-s),h=(n+e)*c,m=(r+i)*u;let v,w;if(a===tl)v=(o+s)*f,w=-2*f;else if(a===j1)v=s*f,w=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=w,l[14]=-v,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}}const Eh=new Z,_a=new Kt,Ybe=new Z(0,0,0),Qbe=new Z(1,1,1),Dc=new Z,Aw=new Z,lo=new Z,KO=new Kt,ZO=new Ti;class To{constructor(e=0,n=0,r=0,i=To.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,r,i=this._order){return this._x=e,this._y=n,this._z=r,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,r=!0){const i=e.elements,s=i[0],o=i[4],a=i[8],l=i[1],c=i[5],u=i[9],f=i[2],h=i[6],m=i[10];switch(n){case"XYZ":this._y=Math.asin(Vr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Vr(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Vr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Vr(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,m),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Vr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-Vr(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-u,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return KO.makeRotationFromQuaternion(e),this.setFromRotationMatrix(KO,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return ZO.setFromEuler(this),this.setFromQuaternion(ZO,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}To.DEFAULT_ORDER="XYZ";class ld{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let r=0;r0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(r.geometries=a),l.length>0&&(r.materials=l),c.length>0&&(r.textures=c),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),m.length>0&&(r.animations=m),v.length>0&&(r.nodes=v)}return r.object=i,r;function o(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(e,n,r,i,s){Ma.subVectors(i,n),kl.subVectors(r,n),VE.subVectors(e,n);const o=Ma.dot(Ma),a=Ma.dot(kl),l=Ma.dot(VE),c=kl.dot(kl),u=kl.dot(VE),f=o*c-a*a;if(f===0)return s.set(0,0,0),null;const h=1/f,m=(c*l-a*u)*h,v=(o*u-a*l)*h;return s.set(1-m-v,v,m)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,Bl)===null?!1:Bl.x>=0&&Bl.y>=0&&Bl.x+Bl.y<=1}static getInterpolation(e,n,r,i,s,o,a,l){return this.getBarycoord(e,n,r,i,Bl)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Bl.x),l.addScaledVector(o,Bl.y),l.addScaledVector(a,Bl.z),l)}static isFrontFacing(e,n,r,i){return Ma.subVectors(r,n),kl.subVectors(e,n),Ma.cross(kl).dot(i)<0}set(e,n,r){return this.a.copy(e),this.b.copy(n),this.c.copy(r),this}setFromPointsAndIndices(e,n,r,i){return this.a.copy(e[n]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,r,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ma.subVectors(this.c,this.b),kl.subVectors(this.a,this.b),Ma.cross(kl).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return mo.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return mo.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,r,i,s){return mo.getInterpolation(e,this.a,this.b,this.c,n,r,i,s)}containsPoint(e){return mo.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return mo.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,s=this.c;let o,a;Ih.subVectors(i,r),Lh.subVectors(s,r),WE.subVectors(e,r);const l=Ih.dot(WE),c=Lh.dot(WE);if(l<=0&&c<=0)return n.copy(r);$E.subVectors(e,i);const u=Ih.dot($E),f=Lh.dot($E);if(u>=0&&f<=u)return n.copy(i);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return o=l/(l-u),n.copy(r).addScaledVector(Ih,o);JE.subVectors(e,s);const m=Ih.dot(JE),v=Lh.dot(JE);if(v>=0&&m<=v)return n.copy(s);const w=m*c-l*v;if(w<=0&&c>=0&&v<=0)return a=c/(c-v),n.copy(r).addScaledVector(Lh,a);const y=u*v-m*f;if(y<=0&&f-u>=0&&m-v>=0)return i9.subVectors(s,i),a=(f-u)/(f-u+(m-v)),n.copy(i).addScaledVector(i9,a);const g=1/(y+w+h);return o=w*g,a=h*g,n.copy(r).addScaledVector(Ih,o).addScaledVector(Lh,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const $W={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Nc={h:0,s:0,l:0},Iw={h:0,s:0,l:0};function YE(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class Lt{constructor(e,n,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,r)}set(e,n,r){if(n===void 0&&r===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,n,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=ho){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Zn.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=Zn.workingColorSpace){return this.r=e,this.g=n,this.b=r,Zn.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=Zn.workingColorSpace){if(e=JR(e,1),n=Vr(n,0,1),r=Vr(r,0,1),n===0)this.r=this.g=this.b=r;else{const s=r<=.5?r*(1+n):r+n-r*n,o=2*r-s;this.r=YE(o,s,e+1/3),this.g=YE(o,s,e),this.b=YE(o,s,e-1/3)}return Zn.toWorkingColorSpace(this,i),this}setStyle(e,n=ho){function r(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,n);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,n);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=i[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,n);if(o===6)return this.setHex(parseInt(s,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=ho){const r=$W[e.toLowerCase()];return r!==void 0?this.setHex(r,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Np(e.r),this.g=Np(e.g),this.b=Np(e.b),this}copyLinearToSRGB(e){return this.r=kE(e.r),this.g=kE(e.g),this.b=kE(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=ho){return Zn.fromWorkingColorSpace(fs.copy(this),e),Math.round(Vr(fs.r*255,0,255))*65536+Math.round(Vr(fs.g*255,0,255))*256+Math.round(Vr(fs.b*255,0,255))}getHexString(e=ho){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Zn.workingColorSpace){Zn.fromWorkingColorSpace(fs.copy(this),n);const r=fs.r,i=fs.g,s=fs.b,o=Math.max(r,i,s),a=Math.min(r,i,s);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const f=o-a;switch(c=u<=.5?f/(o+a):f/(2-o-a),o){case r:l=(i-s)/f+(i0!=e>0&&this.version++,this._alphaTest=e}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const r=e[n];if(r===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(r.dispersion=this.dispersion),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapRotation!==void 0&&(r.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==sd&&(r.blending=this.blending),this.side!==ml&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=!0),this.blendSrc!==dx&&(r.blendSrc=this.blendSrc),this.blendDst!==hx&&(r.blendDst=this.blendDst),this.blendEquation!==eu&&(r.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(r.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(r.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==D1&&(r.depthFunc=this.depthFunc),this.depthTest===!1&&(r.depthTest=this.depthTest),this.depthWrite===!1&&(r.depthWrite=this.depthWrite),this.colorWrite===!1&&(r.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==FI&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Pf&&(r.stencilFail=this.stencilFail),this.stencilZFail!==Pf&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==Pf&&(r.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(r.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(n){const s=i(e.textures),o=i(e.images);s.length>0&&(r.textures=s),o.length>0&&(r.images=o)}return r}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let r=null;if(n!==null){const i=n.length;r=new Array(i);for(let s=0;s!==i;++s)r[s]=n[s].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}onBeforeRender(){console.warn("Material: onBeforeRender() has been removed.")}}class Js extends Mi{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Lt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new To,this.combine=Nv,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const Vl=t2e();function t2e(){const t=new ArrayBuffer(4),e=new Float32Array(t),n=new Uint32Array(t),r=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(r[l]=0,r[l|256]=32768,i[l]=24,i[l|256]=24):c<-14?(r[l]=1024>>-c-14,r[l|256]=1024>>-c-14|32768,i[l]=-c-1,i[l|256]=-c-1):c<=15?(r[l]=c+15<<10,r[l|256]=c+15<<10|32768,i[l]=13,i[l|256]=13):c<128?(r[l]=31744,r[l|256]=64512,i[l]=24,i[l|256]=24):(r[l]=31744,r[l|256]=64512,i[l]=13,i[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;!(c&8388608);)c<<=1,u-=8388608;c&=-8388609,u+=947912704,s[l]=c|u}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:s,exponentTable:o,offsetTable:a}}function Gs(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Vr(t,-65504,65504),Vl.floatView[0]=t;const e=Vl.uint32View[0],n=e>>23&511;return Vl.baseTable[n]+((e&8388607)>>Vl.shiftTable[n])}function gg(t){const e=t>>10;return Vl.uint32View[0]=Vl.mantissaTable[Vl.offsetTable[e]+(t&1023)]+Vl.exponentTable[e],Vl.floatView[0]}const Xf={toHalfFloat:Gs,fromHalfFloat:gg},di=new Z,Lw=new tt;class Qn{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=F1,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Dr,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return Dp("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,r){e*=this.itemSize,r*=n.itemSize;for(let i=0,s=this.itemSize;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const c=r[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f0&&(i[l]=u,s=!0)}s&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const c in i){const u=i[c];this.setAttribute(c,u.clone(n))}const s=e.morphAttributes;for(const c in s){const u=[],f=s[c];for(let h=0,m=f.length;h0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s(e.far-e.near)**2))&&(s9.copy(s).invert(),gf.copy(e.ray).applyMatrix4(s9),!(r.boundingBox!==null&&gf.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,gf)))}_computeIntersections(e,n,r){let i;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,f=s.attributes.normal,h=s.groups,m=s.drawRange;if(a!==null)if(Array.isArray(o))for(let v=0,w=h.length;vn.far?null:{distance:c,point:Ow.clone(),object:t}}function Uw(t,e,n,r,i,s,o,a,l,c){t.getVertexPosition(a,Ph),t.getVertexPosition(l,Dh),t.getVertexPosition(c,Nh);const u=c2e(t,e,n,r,Ph,Dh,Nh,Bw);if(u){i&&(Dw.fromBufferAttribute(i,a),Nw.fromBufferAttribute(i,l),kw.fromBufferAttribute(i,c),u.uv=mo.getInterpolation(Bw,Ph,Dh,Nh,Dw,Nw,kw,new tt)),s&&(Dw.fromBufferAttribute(s,a),Nw.fromBufferAttribute(s,l),kw.fromBufferAttribute(s,c),u.uv1=mo.getInterpolation(Bw,Ph,Dh,Nh,Dw,Nw,kw,new tt)),o&&(a9.fromBufferAttribute(o,a),l9.fromBufferAttribute(o,l),c9.fromBufferAttribute(o,c),u.normal=mo.getInterpolation(Bw,Ph,Dh,Nh,a9,l9,c9,new Z),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const f={a,b:l,c,normal:new Z,materialIndex:0};mo.getNormal(Ph,Dh,Nh,f.normal),u.face=f}return u}class $d extends mn{constructor(e=1,n=1,r=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:s,depthSegments:o};const a=this;i=Math.floor(i),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],u=[],f=[];let h=0,m=0;v("z","y","x",-1,-1,r,n,e,o,s,0),v("z","y","x",1,-1,r,n,-e,o,s,1),v("x","z","y",1,1,e,r,n,i,o,2),v("x","z","y",1,-1,e,r,-n,i,o,3),v("x","y","z",1,-1,e,n,r,i,s,4),v("x","y","z",-1,-1,e,n,-r,i,s,5),this.setIndex(l),this.setAttribute("position",new $t(c,3)),this.setAttribute("normal",new $t(u,3)),this.setAttribute("uv",new $t(f,2));function v(w,y,g,_,x,S,D,T,E,R,C){const L=S/E,P=D/R,z=S/2,B=D/2,Y=T/2,ie=E+1,ee=R+1;let le=0,j=0;const q=new Z;for(let ne=0;ne0?1:-1,u.push(q.x,q.y,q.z),f.push(_e/E),f.push(1-ne/R),le+=1}}for(let ne=0;ne0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(n.extensions=r),n}}class Fv extends Vn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Kt,this.projectionMatrix=new Kt,this.projectionMatrixInverse=new Kt,this.coordinateSystem=tl}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const kc=new Z,u9=new tt,f9=new tt;class Ci extends Fv{constructor(e=50,n=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=mm*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(ad*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return mm*2*Math.atan(Math.tan(ad*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,n,r){kc.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(kc.x,kc.y).multiplyScalar(-e/kc.z),kc.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),r.set(kc.x,kc.y).multiplyScalar(-e/kc.z)}getViewSize(e,n){return this.getViewBounds(e,u9,f9),n.subVectors(f9,u9)}setViewOffset(e,n,r,i,s,o){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(ad*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,s=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*i/l,n-=o.offsetY*r/c,i*=o.width/l,r*=o.height/c}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+i,n,n-r,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const kh=-90,Bh=1;class YW extends Vn{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Ci(kh,Bh,e,n);i.layers=this.layers,this.add(i);const s=new Ci(kh,Bh,e,n);s.layers=this.layers,this.add(s);const o=new Ci(kh,Bh,e,n);o.layers=this.layers,this.add(o);const a=new Ci(kh,Bh,e,n);a.layers=this.layers,this.add(a);const l=new Ci(kh,Bh,e,n);l.layers=this.layers,this.add(l);const c=new Ci(kh,Bh,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,s,o,a,l]=n;for(const c of n)this.remove(c);if(e===tl)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===j1)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,u]=this.children,f=e.getRenderTarget(),h=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),v=e.xr.enabled;e.xr.enabled=!1;const w=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,s),e.setRenderTarget(r,1,i),e.render(n,o),e.setRenderTarget(r,2,i),e.render(n,a),e.setRenderTarget(r,3,i),e.render(n,l),e.setRenderTarget(r,4,i),e.render(n,c),r.texture.generateMipmaps=w,e.setRenderTarget(r,5,i),e.render(n,u),e.setRenderTarget(f,h,m),e.xr.enabled=v,r.texture.needsPMREMUpdate=!0}}class jv extends er{constructor(e,n,r,i,s,o,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:gl,super(e,n,r,i,s,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class ZR extends Zi{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];this.texture=new jv(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:qn}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `,fragmentShader:` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `},i=new $d(5,5,5),s=new qi({name:"CubemapFromEquirect",uniforms:gm(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:Os,blending:ul});s.uniforms.tEquirect.value=n;const o=new Cr(i,s),a=n.minFilter;return n.minFilter===ta&&(n.minFilter=qn),new YW(1,10,this).update(e,o),n.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,n,r,i){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(n,r,i);e.setRenderTarget(s)}}const KE=new Z,h2e=new Z,p2e=new wn;class Vc{constructor(e=new Z(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,r,i){return this.normal.set(e,n,r),this.constant=i,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,r){const i=KE.subVectors(r,n).cross(h2e.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const r=e.delta(KE),i=this.normal.dot(r);if(i===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/i;return s<0||s>1?null:n.copy(e.start).addScaledVector(r,s)}intersectsLine(e){const n=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return n<0&&r>0||r<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const r=n||p2e.getNormalMatrix(e),i=this.coplanarPoint(KE).applyMatrix4(e),s=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const vf=new Fi,Fw=new Z;class zv{constructor(e=new Vc,n=new Vc,r=new Vc,i=new Vc,s=new Vc,o=new Vc){this.planes=[e,n,r,i,s,o]}set(e,n,r,i,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(s),a[5].copy(o),this}copy(e){const n=this.planes;for(let r=0;r<6;r++)n[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e,n=tl){const r=this.planes,i=e.elements,s=i[0],o=i[1],a=i[2],l=i[3],c=i[4],u=i[5],f=i[6],h=i[7],m=i[8],v=i[9],w=i[10],y=i[11],g=i[12],_=i[13],x=i[14],S=i[15];if(r[0].setComponents(l-s,h-c,y-m,S-g).normalize(),r[1].setComponents(l+s,h+c,y+m,S+g).normalize(),r[2].setComponents(l+o,h+u,y+v,S+_).normalize(),r[3].setComponents(l-o,h-u,y-v,S-_).normalize(),r[4].setComponents(l-a,h-f,y-w,S-x).normalize(),n===tl)r[5].setComponents(l+a,h+f,y+w,S+x).normalize();else if(n===j1)r[5].setComponents(a,f,w,x).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),vf.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),vf.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(vf)}intersectsSprite(e){return vf.center.set(0,0,0),vf.radius=.7071067811865476,vf.applyMatrix4(e.matrixWorld),this.intersectsSphere(vf)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let s=0;s<6;s++)if(n[s].distanceToPoint(r)0?e.max.x:e.min.x,Fw.y=i.normal.y>0?e.max.y:e.min.y,Fw.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(Fw)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let r=0;r<6;r++)if(n[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function QW(){let t=null,e=!1,n=null,r=null;function i(s,o){n(s,o),r=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(s){n=s},setContext:function(s){t=s}}}function m2e(t){const e=new WeakMap;function n(a,l){const c=a.array,u=a.usage,f=c.byteLength,h=t.createBuffer();t.bindBuffer(l,h),t.bufferData(l,c,u),a.onUploadCallback();let m;if(c instanceof Float32Array)m=t.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?m=t.HALF_FLOAT:m=t.UNSIGNED_SHORT;else if(c instanceof Int16Array)m=t.SHORT;else if(c instanceof Uint32Array)m=t.UNSIGNED_INT;else if(c instanceof Int32Array)m=t.INT;else if(c instanceof Int8Array)m=t.BYTE;else if(c instanceof Uint8Array)m=t.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)m=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:h,type:m,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:f}}function r(a,l,c){const u=l.array,f=l._updateRange,h=l.updateRanges;if(t.bindBuffer(c,a),f.count===-1&&h.length===0&&t.bufferSubData(c,0,u),h.length!==0){for(let m=0,v=h.length;m 0 + vec4 plane; + #ifdef ALPHA_TO_COVERAGE + float distanceToPlane, distanceGradient; + float clipOpacity = 1.0; + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + if ( clipOpacity == 0.0 ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + float unionClipOpacity = 1.0; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + } + #pragma unroll_loop_end + clipOpacity *= 1.0 - unionClipOpacity; + #endif + diffuseColor.a *= clipOpacity; + if ( diffuseColor.a == 0.0 ) discard; + #else + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + bool clipped = true; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; + } + #pragma unroll_loop_end + if ( clipped ) discard; + #endif + #endif +#endif`,P2e=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; +#endif`,D2e=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,N2e=`#if NUM_CLIPPING_PLANES > 0 + vClipPosition = - mvPosition.xyz; +#endif`,k2e=`#if defined( USE_COLOR_ALPHA ) + diffuseColor *= vColor; +#elif defined( USE_COLOR ) + diffuseColor.rgb *= vColor; +#endif`,B2e=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) + varying vec3 vColor; +#endif`,O2e=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) + varying vec3 vColor; +#endif`,U2e=`#if defined( USE_COLOR_ALPHA ) + vColor = vec4( 1.0 ); +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) + vColor = vec3( 1.0 ); +#endif +#ifdef USE_COLOR + vColor *= color; +#endif +#ifdef USE_INSTANCING_COLOR + vColor.xyz *= instanceColor.xyz; +#endif +#ifdef USE_BATCHING_COLOR + vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); + vColor.xyz *= batchingColor.xyz; +#endif`,F2e=`#define PI 3.141592653589793 +#define PI2 6.283185307179586 +#define PI_HALF 1.5707963267948966 +#define RECIPROCAL_PI 0.3183098861837907 +#define RECIPROCAL_PI2 0.15915494309189535 +#define EPSILON 1e-6 +#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +#define whiteComplement( a ) ( 1.0 - saturate( a ) ) +float pow2( const in float x ) { return x*x; } +vec3 pow2( const in vec3 x ) { return x*x; } +float pow3( const in float x ) { return x*x*x; } +float pow4( const in float x ) { float x2 = x*x; return x2*x2; } +float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } +float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } +highp float rand( const in vec2 uv ) { + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); + return fract( sin( sn ) * c ); +} +#ifdef HIGH_PRECISION + float precisionSafeLength( vec3 v ) { return length( v ); } +#else + float precisionSafeLength( vec3 v ) { + float maxComponent = max3( abs( v ) ); + return length( v / maxComponent ) * maxComponent; + } +#endif +struct IncidentLight { + vec3 color; + vec3 direction; + bool visible; +}; +struct ReflectedLight { + vec3 directDiffuse; + vec3 directSpecular; + vec3 indirectDiffuse; + vec3 indirectSpecular; +}; +#ifdef USE_ALPHAHASH + varying vec3 vPosition; +#endif +vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); +} +vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); +} +mat3 transposeMat3( const in mat3 m ) { + mat3 tmp; + tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); + tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); + tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); + return tmp; +} +bool isPerspectiveMatrix( mat4 m ) { + return m[ 2 ][ 3 ] == - 1.0; +} +vec2 equirectUv( in vec3 dir ) { + float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; + float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; + return vec2( u, v ); +} +vec3 BRDF_Lambert( const in vec3 diffuseColor ) { + return RECIPROCAL_PI * diffuseColor; +} +vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} +float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} // validated`,j2e=`#ifdef ENVMAP_TYPE_CUBE_UV + #define cubeUV_minMipLevel 4.0 + #define cubeUV_minTileSize 16.0 + float getFace( vec3 direction ) { + vec3 absDirection = abs( direction ); + float face = - 1.0; + if ( absDirection.x > absDirection.z ) { + if ( absDirection.x > absDirection.y ) + face = direction.x > 0.0 ? 0.0 : 3.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } else { + if ( absDirection.z > absDirection.y ) + face = direction.z > 0.0 ? 2.0 : 5.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } + return face; + } + vec2 getUV( vec3 direction, float face ) { + vec2 uv; + if ( face == 0.0 ) { + uv = vec2( direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 1.0 ) { + uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); + } else if ( face == 2.0 ) { + uv = vec2( - direction.x, direction.y ) / abs( direction.z ); + } else if ( face == 3.0 ) { + uv = vec2( - direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 4.0 ) { + uv = vec2( - direction.x, direction.z ) / abs( direction.y ); + } else { + uv = vec2( direction.x, direction.y ) / abs( direction.z ); + } + return 0.5 * ( uv + 1.0 ); + } + vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { + float face = getFace( direction ); + float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); + mipInt = max( mipInt, cubeUV_minMipLevel ); + float faceSize = exp2( mipInt ); + highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; + if ( face > 2.0 ) { + uv.y += faceSize; + face -= 3.0; + } + uv.x += face * faceSize; + uv.x += filterInt * 3.0 * cubeUV_minTileSize; + uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); + uv.x *= CUBEUV_TEXEL_WIDTH; + uv.y *= CUBEUV_TEXEL_HEIGHT; + #ifdef texture2DGradEXT + return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; + #else + return texture2D( envMap, uv ).rgb; + #endif + } + #define cubeUV_r0 1.0 + #define cubeUV_m0 - 2.0 + #define cubeUV_r1 0.8 + #define cubeUV_m1 - 1.0 + #define cubeUV_r4 0.4 + #define cubeUV_m4 2.0 + #define cubeUV_r5 0.305 + #define cubeUV_m5 3.0 + #define cubeUV_r6 0.21 + #define cubeUV_m6 4.0 + float roughnessToMip( float roughness ) { + float mip = 0.0; + if ( roughness >= cubeUV_r1 ) { + mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; + } else if ( roughness >= cubeUV_r4 ) { + mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; + } else if ( roughness >= cubeUV_r5 ) { + mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; + } else if ( roughness >= cubeUV_r6 ) { + mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; + } else { + mip = - 2.0 * log2( 1.16 * roughness ); } + return mip; + } + vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { + float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); + float mipF = fract( mip ); + float mipInt = floor( mip ); + vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); + if ( mipF == 0.0 ) { + return vec4( color0, 1.0 ); + } else { + vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); + return vec4( mix( color0, color1, mipF ), 1.0 ); + } + } +#endif`,z2e=`vec3 transformedNormal = objectNormal; +#ifdef USE_TANGENT + vec3 transformedTangent = objectTangent; +#endif +#ifdef USE_BATCHING + mat3 bm = mat3( batchingMatrix ); + transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); + transformedNormal = bm * transformedNormal; + #ifdef USE_TANGENT + transformedTangent = bm * transformedTangent; + #endif +#endif +#ifdef USE_INSTANCING + mat3 im = mat3( instanceMatrix ); + transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); + transformedNormal = im * transformedNormal; + #ifdef USE_TANGENT + transformedTangent = im * transformedTangent; + #endif +#endif +transformedNormal = normalMatrix * transformedNormal; +#ifdef FLIP_SIDED + transformedNormal = - transformedNormal; +#endif +#ifdef USE_TANGENT + transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; + #ifdef FLIP_SIDED + transformedTangent = - transformedTangent; + #endif +#endif`,H2e=`#ifdef USE_DISPLACEMENTMAP + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; +#endif`,G2e=`#ifdef USE_DISPLACEMENTMAP + transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); +#endif`,V2e=`#ifdef USE_EMISSIVEMAP + vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); + totalEmissiveRadiance *= emissiveColor.rgb; +#endif`,W2e=`#ifdef USE_EMISSIVEMAP + uniform sampler2D emissiveMap; +#endif`,$2e="gl_FragColor = linearToOutputTexel( gl_FragColor );",J2e=` +const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( + vec3( 0.8224621, 0.177538, 0.0 ), + vec3( 0.0331941, 0.9668058, 0.0 ), + vec3( 0.0170827, 0.0723974, 0.9105199 ) +); +const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3( + vec3( 1.2249401, - 0.2249404, 0.0 ), + vec3( - 0.0420569, 1.0420571, 0.0 ), + vec3( - 0.0196376, - 0.0786361, 1.0982735 ) +); +vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) { + return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a ); +} +vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) { + return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a ); +} +vec4 LinearTransferOETF( in vec4 value ) { + return value; +} +vec4 sRGBTransferOETF( in vec4 value ) { + return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); +}`,Y2e=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vec3 cameraToFrag; + if ( isOrthographic ) { + cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToFrag = normalize( vWorldPosition - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vec3 reflectVec = reflect( cameraToFrag, worldNormal ); + #else + vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); + #endif + #else + vec3 reflectVec = vReflect; + #endif + #ifdef ENVMAP_TYPE_CUBE + vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); + #else + vec4 envColor = vec4( 0.0 ); + #endif + #ifdef ENVMAP_BLENDING_MULTIPLY + outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_MIX ) + outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_ADD ) + outgoingLight += envColor.xyz * specularStrength * reflectivity; + #endif +#endif`,Q2e=`#ifdef USE_ENVMAP + uniform float envMapIntensity; + uniform float flipEnvMap; + uniform mat3 envMapRotation; + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; + #else + uniform sampler2D envMap; + #endif + +#endif`,X2e=`#ifdef USE_ENVMAP + uniform float reflectivity; + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + varying vec3 vWorldPosition; + uniform float refractionRatio; + #else + varying vec3 vReflect; + #endif +#endif`,K2e=`#ifdef USE_ENVMAP + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + #else + varying vec3 vReflect; + uniform float refractionRatio; + #endif +#endif`,Z2e=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vWorldPosition = worldPosition.xyz; + #else + vec3 cameraToVertex; + if ( isOrthographic ) { + cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vReflect = reflect( cameraToVertex, worldNormal ); + #else + vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); + #endif + #endif +#endif`,q2e=`#ifdef USE_FOG + vFogDepth = - mvPosition.z; +#endif`,eSe=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,tSe=`#ifdef USE_FOG + #ifdef FOG_EXP2 + float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); + #else + float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); + #endif + gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); +#endif`,nSe=`#ifdef USE_FOG + uniform vec3 fogColor; + varying float vFogDepth; + #ifdef FOG_EXP2 + uniform float fogDensity; + #else + uniform float fogNear; + uniform float fogFar; + #endif +#endif`,rSe=`#ifdef USE_GRADIENTMAP + uniform sampler2D gradientMap; +#endif +vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { + float dotNL = dot( normal, lightDirection ); + vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); + #ifdef USE_GRADIENTMAP + return vec3( texture2D( gradientMap, coord ).r ); + #else + vec2 fw = fwidth( coord ) * 0.5; + return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); + #endif +}`,iSe=`#ifdef USE_LIGHTMAP + uniform sampler2D lightMap; + uniform float lightMapIntensity; +#endif`,sSe=`LambertMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularStrength = specularStrength;`,oSe=`varying vec3 vViewPosition; +struct LambertMaterial { + vec3 diffuseColor; + float specularStrength; +}; +void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Lambert +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,aSe=`uniform bool receiveShadow; +uniform vec3 ambientLightColor; +#if defined( USE_LIGHT_PROBES ) + uniform vec3 lightProbe[ 9 ]; +#endif +vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { + float x = normal.x, y = normal.y, z = normal.z; + vec3 result = shCoefficients[ 0 ] * 0.886227; + result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; + result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; + result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; + result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; + result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; + result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); + result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; + result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); + return result; +} +vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); + return irradiance; +} +vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { + vec3 irradiance = ambientLightColor; + return irradiance; +} +float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { + float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); + if ( cutoffDistance > 0.0 ) { + distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); + } + return distanceFalloff; +} +float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { + return smoothstep( coneCosine, penumbraCosine, angleCosine ); +} +#if NUM_DIR_LIGHTS > 0 + struct DirectionalLight { + vec3 direction; + vec3 color; + }; + uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; + void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { + light.color = directionalLight.color; + light.direction = directionalLight.direction; + light.visible = true; + } +#endif +#if NUM_POINT_LIGHTS > 0 + struct PointLight { + vec3 position; + vec3 color; + float distance; + float decay; + }; + uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; + void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { + vec3 lVector = pointLight.position - geometryPosition; + light.direction = normalize( lVector ); + float lightDistance = length( lVector ); + light.color = pointLight.color; + light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } +#endif +#if NUM_SPOT_LIGHTS > 0 + struct SpotLight { + vec3 position; + vec3 direction; + vec3 color; + float distance; + float decay; + float coneCos; + float penumbraCos; + }; + uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; + void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { + vec3 lVector = spotLight.position - geometryPosition; + light.direction = normalize( lVector ); + float angleCos = dot( light.direction, spotLight.direction ); + float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); + if ( spotAttenuation > 0.0 ) { + float lightDistance = length( lVector ); + light.color = spotLight.color * spotAttenuation; + light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } else { + light.color = vec3( 0.0 ); + light.visible = false; + } + } +#endif +#if NUM_RECT_AREA_LIGHTS > 0 + struct RectAreaLight { + vec3 color; + vec3 position; + vec3 halfWidth; + vec3 halfHeight; + }; + uniform sampler2D ltc_1; uniform sampler2D ltc_2; + uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; +#endif +#if NUM_HEMI_LIGHTS > 0 + struct HemisphereLight { + vec3 direction; + vec3 skyColor; + vec3 groundColor; + }; + uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; + vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { + float dotNL = dot( normal, hemiLight.direction ); + float hemiDiffuseWeight = 0.5 * dotNL + 0.5; + vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); + return irradiance; + } +#endif`,lSe=`#ifdef USE_ENVMAP + vec3 getIBLIrradiance( const in vec3 normal ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); + return PI * envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 reflectVec = reflect( - viewDir, normal ); + reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); + reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); + return envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + #ifdef USE_ANISOTROPY + vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 bentNormal = cross( bitangent, viewDir ); + bentNormal = normalize( cross( bentNormal, bitangent ) ); + bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); + return getIBLRadiance( viewDir, bentNormal, roughness ); + #else + return vec3( 0.0 ); + #endif + } + #endif +#endif`,cSe=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,uSe=`varying vec3 vViewPosition; +struct ToonMaterial { + vec3 diffuseColor; +}; +void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Toon +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,fSe=`BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength;`,dSe=`varying vec3 vViewPosition; +struct BlinnPhongMaterial { + vec3 diffuseColor; + vec3 specularColor; + float specularShininess; + float specularStrength; +}; +void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; +} +void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_BlinnPhong +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,hSe=`PhysicalMaterial material; +material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); +vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); +float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); +material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; +material.roughness = min( material.roughness, 1.0 ); +#ifdef IOR + material.ior = ior; + #ifdef USE_SPECULAR + float specularIntensityFactor = specularIntensity; + vec3 specularColorFactor = specularColor; + #ifdef USE_SPECULAR_COLORMAP + specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; + #endif + material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); + #else + float specularIntensityFactor = 1.0; + vec3 specularColorFactor = vec3( 1.0 ); + material.specularF90 = 1.0; + #endif + material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); +#else + material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); + material.specularF90 = 1.0; +#endif +#ifdef USE_CLEARCOAT + material.clearcoat = clearcoat; + material.clearcoatRoughness = clearcoatRoughness; + material.clearcoatF0 = vec3( 0.04 ); + material.clearcoatF90 = 1.0; + #ifdef USE_CLEARCOATMAP + material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; + #endif + #ifdef USE_CLEARCOAT_ROUGHNESSMAP + material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; + #endif + material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); + material.clearcoatRoughness += geometryRoughness; + material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); +#endif +#ifdef USE_DISPERSION + material.dispersion = dispersion; +#endif +#ifdef USE_IRIDESCENCE + material.iridescence = iridescence; + material.iridescenceIOR = iridescenceIOR; + #ifdef USE_IRIDESCENCEMAP + material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; + #endif + #ifdef USE_IRIDESCENCE_THICKNESSMAP + material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; + #else + material.iridescenceThickness = iridescenceThicknessMaximum; + #endif +#endif +#ifdef USE_SHEEN + material.sheenColor = sheenColor; + #ifdef USE_SHEEN_COLORMAP + material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; + #endif + material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); + #ifdef USE_SHEEN_ROUGHNESSMAP + material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; + #endif +#endif +#ifdef USE_ANISOTROPY + #ifdef USE_ANISOTROPYMAP + mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); + vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; + vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; + #else + vec2 anisotropyV = anisotropyVector; + #endif + material.anisotropy = length( anisotropyV ); + if( material.anisotropy == 0.0 ) { + anisotropyV = vec2( 1.0, 0.0 ); + } else { + anisotropyV /= material.anisotropy; + material.anisotropy = saturate( material.anisotropy ); + } + material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); + material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; + material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; +#endif`,pSe=`struct PhysicalMaterial { + vec3 diffuseColor; + float roughness; + vec3 specularColor; + float specularF90; + float dispersion; + #ifdef USE_CLEARCOAT + float clearcoat; + float clearcoatRoughness; + vec3 clearcoatF0; + float clearcoatF90; + #endif + #ifdef USE_IRIDESCENCE + float iridescence; + float iridescenceIOR; + float iridescenceThickness; + vec3 iridescenceFresnel; + vec3 iridescenceF0; + #endif + #ifdef USE_SHEEN + vec3 sheenColor; + float sheenRoughness; + #endif + #ifdef IOR + float ior; + #endif + #ifdef USE_TRANSMISSION + float transmission; + float transmissionAlpha; + float thickness; + float attenuationDistance; + vec3 attenuationColor; + #endif + #ifdef USE_ANISOTROPY + float anisotropy; + float alphaT; + vec3 anisotropyT; + vec3 anisotropyB; + #endif +}; +vec3 clearcoatSpecularDirect = vec3( 0.0 ); +vec3 clearcoatSpecularIndirect = vec3( 0.0 ); +vec3 sheenSpecularDirect = vec3( 0.0 ); +vec3 sheenSpecularIndirect = vec3(0.0 ); +vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { + float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); + float x2 = x * x; + float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); + return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); +} +float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { + float a2 = pow2( alpha ); + float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); + float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); + return 0.5 / max( gv + gl, EPSILON ); +} +float D_GGX( const in float alpha, const in float dotNH ) { + float a2 = pow2( alpha ); + float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; + return RECIPROCAL_PI * a2 / pow2( denom ); +} +#ifdef USE_ANISOTROPY + float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { + float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); + float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); + float v = 0.5 / ( gv + gl ); + return saturate(v); + } + float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { + float a2 = alphaT * alphaB; + highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); + highp float v2 = dot( v, v ); + float w2 = a2 / v2; + return RECIPROCAL_PI * a2 * pow2 ( w2 ); + } +#endif +#ifdef USE_CLEARCOAT + vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { + vec3 f0 = material.clearcoatF0; + float f90 = material.clearcoatF90; + float roughness = material.clearcoatRoughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + return F * ( V * D ); + } +#endif +vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { + vec3 f0 = material.specularColor; + float f90 = material.specularF90; + float roughness = material.roughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + #ifdef USE_IRIDESCENCE + F = mix( F, material.iridescenceFresnel, material.iridescence ); + #endif + #ifdef USE_ANISOTROPY + float dotTL = dot( material.anisotropyT, lightDir ); + float dotTV = dot( material.anisotropyT, viewDir ); + float dotTH = dot( material.anisotropyT, halfDir ); + float dotBL = dot( material.anisotropyB, lightDir ); + float dotBV = dot( material.anisotropyB, viewDir ); + float dotBH = dot( material.anisotropyB, halfDir ); + float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); + float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); + #else + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + #endif + return F * ( V * D ); +} +vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { + const float LUT_SIZE = 64.0; + const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; + const float LUT_BIAS = 0.5 / LUT_SIZE; + float dotNV = saturate( dot( N, V ) ); + vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); + uv = uv * LUT_SCALE + LUT_BIAS; + return uv; +} +float LTC_ClippedSphereFormFactor( const in vec3 f ) { + float l = length( f ); + return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); +} +vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { + float x = dot( v1, v2 ); + float y = abs( x ); + float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; + float b = 3.4175940 + ( 4.1616724 + y ) * y; + float v = a / b; + float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; + return cross( v1, v2 ) * theta_sintheta; +} +vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { + vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; + vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; + vec3 lightNormal = cross( v1, v2 ); + if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); + vec3 T1, T2; + T1 = normalize( V - N * dot( V, N ) ); + T2 = - cross( N, T1 ); + mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); + vec3 coords[ 4 ]; + coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); + coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); + coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); + coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); + coords[ 0 ] = normalize( coords[ 0 ] ); + coords[ 1 ] = normalize( coords[ 1 ] ); + coords[ 2 ] = normalize( coords[ 2 ] ); + coords[ 3 ] = normalize( coords[ 3 ] ); + vec3 vectorFormFactor = vec3( 0.0 ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); + float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); + return vec3( result ); +} +#if defined( USE_SHEEN ) +float D_Charlie( float roughness, float dotNH ) { + float alpha = pow2( roughness ); + float invAlpha = 1.0 / alpha; + float cos2h = dotNH * dotNH; + float sin2h = max( 1.0 - cos2h, 0.0078125 ); + return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); +} +float V_Neubelt( float dotNV, float dotNL ) { + return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); +} +vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float D = D_Charlie( sheenRoughness, dotNH ); + float V = V_Neubelt( dotNV, dotNL ); + return sheenColor * ( D * V ); +} +#endif +float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + float r2 = roughness * roughness; + float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; + float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; + float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); + return saturate( DG * RECIPROCAL_PI ); +} +vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); + const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); + vec4 r = roughness * c0 + c1; + float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; + vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; + return fab; +} +vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { + vec2 fab = DFGApprox( normal, viewDir, roughness ); + return specularColor * fab.x + specularF90 * fab.y; +} +#ifdef USE_IRIDESCENCE +void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#else +void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#endif + vec2 fab = DFGApprox( normal, viewDir, roughness ); + #ifdef USE_IRIDESCENCE + vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); + #else + vec3 Fr = specularColor; + #endif + vec3 FssEss = Fr * fab.x + specularF90 * fab.y; + float Ess = fab.x + fab.y; + float Ems = 1.0 - Ess; + vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); + singleScatter += FssEss; + multiScatter += Fms * Ems; +} +#if NUM_RECT_AREA_LIGHTS > 0 + void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + vec3 normal = geometryNormal; + vec3 viewDir = geometryViewDir; + vec3 position = geometryPosition; + vec3 lightPos = rectAreaLight.position; + vec3 halfWidth = rectAreaLight.halfWidth; + vec3 halfHeight = rectAreaLight.halfHeight; + vec3 lightColor = rectAreaLight.color; + float roughness = material.roughness; + vec3 rectCoords[ 4 ]; + rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; + rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; + rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; + vec2 uv = LTC_Uv( normal, viewDir, roughness ); + vec4 t1 = texture2D( ltc_1, uv ); + vec4 t2 = texture2D( ltc_2, uv ); + mat3 mInv = mat3( + vec3( t1.x, 0, t1.y ), + vec3( 0, 1, 0 ), + vec3( t1.z, 0, t1.w ) + ); + vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); + reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); + reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); + } +#endif +void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + #ifdef USE_CLEARCOAT + float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); + vec3 ccIrradiance = dotNLcc * directLight.color; + clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); + #endif + #ifdef USE_SHEEN + sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); + #endif + reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { + #ifdef USE_CLEARCOAT + clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + #endif + #ifdef USE_SHEEN + sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); + #endif + vec3 singleScattering = vec3( 0.0 ); + vec3 multiScattering = vec3( 0.0 ); + vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; + #ifdef USE_IRIDESCENCE + computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); + #else + computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); + #endif + vec3 totalScattering = singleScattering + multiScattering; + vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); + reflectedLight.indirectSpecular += radiance * singleScattering; + reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; + reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; +} +#define RE_Direct RE_Direct_Physical +#define RE_Direct_RectArea RE_Direct_RectArea_Physical +#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical +#define RE_IndirectSpecular RE_IndirectSpecular_Physical +float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { + return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); +}`,mSe=` +vec3 geometryPosition = - vViewPosition; +vec3 geometryNormal = normal; +vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); +vec3 geometryClearcoatNormal = vec3( 0.0 ); +#ifdef USE_CLEARCOAT + geometryClearcoatNormal = clearcoatNormal; +#endif +#ifdef USE_IRIDESCENCE + float dotNVi = saturate( dot( normal, geometryViewDir ) ); + if ( material.iridescenceThickness == 0.0 ) { + material.iridescence = 0.0; + } else { + material.iridescence = saturate( material.iridescence ); + } + if ( material.iridescence > 0.0 ) { + material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); + material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); + } +#endif +IncidentLight directLight; +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + PointLight pointLight; + #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + pointLight = pointLights[ i ]; + getPointLightInfo( pointLight, geometryPosition, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) + pointLightShadow = pointLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + SpotLight spotLight; + vec4 spotColor; + vec3 spotLightCoord; + bool inSpotLightMap; + #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + spotLight = spotLights[ i ]; + getSpotLightInfo( spotLight, geometryPosition, directLight ); + #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX + #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS + #else + #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #endif + #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) + spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; + inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); + spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); + directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; + #endif + #undef SPOT_LIGHT_MAP_INDEX + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + spotLightShadow = spotLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) + DirectionalLight directionalLight; + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + directionalLight = directionalLights[ i ]; + getDirectionalLightInfo( directionalLight, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + RectAreaLight rectAreaLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if defined( RE_IndirectDiffuse ) + vec3 iblIrradiance = vec3( 0.0 ); + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + #if defined( USE_LIGHT_PROBES ) + irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); + #endif + #if ( NUM_HEMI_LIGHTS > 0 ) + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); + } + #pragma unroll_loop_end + #endif +#endif +#if defined( RE_IndirectSpecular ) + vec3 radiance = vec3( 0.0 ); + vec3 clearcoatRadiance = vec3( 0.0 ); +#endif`,gSe=`#if defined( RE_IndirectDiffuse ) + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + irradiance += lightMapIrradiance; + #endif + #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) + iblIrradiance += getIBLIrradiance( geometryNormal ); + #endif +#endif +#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) + #ifdef USE_ANISOTROPY + radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); + #else + radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); + #endif + #ifdef USE_CLEARCOAT + clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); + #endif +#endif`,vSe=`#if defined( RE_IndirectDiffuse ) + RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); +#endif +#if defined( RE_IndirectSpecular ) + RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); +#endif`,ySe=`#if defined( USE_LOGDEPTHBUF ) + gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,wSe=`#if defined( USE_LOGDEPTHBUF ) + uniform float logDepthBufFC; + varying float vFragDepth; + varying float vIsPerspective; +#endif`,_Se=`#ifdef USE_LOGDEPTHBUF + varying float vFragDepth; + varying float vIsPerspective; +#endif`,MSe=`#ifdef USE_LOGDEPTHBUF + vFragDepth = 1.0 + gl_Position.w; + vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); +#endif`,xSe=`#ifdef USE_MAP + vec4 sampledDiffuseColor = texture2D( map, vMapUv ); + #ifdef DECODE_VIDEO_TEXTURE + sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); + + #endif + diffuseColor *= sampledDiffuseColor; +#endif`,bSe=`#ifdef USE_MAP + uniform sampler2D map; +#endif`,SSe=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + #if defined( USE_POINTS_UV ) + vec2 uv = vUv; + #else + vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; + #endif +#endif +#ifdef USE_MAP + diffuseColor *= texture2D( map, uv ); +#endif +#ifdef USE_ALPHAMAP + diffuseColor.a *= texture2D( alphaMap, uv ).g; +#endif`,CSe=`#if defined( USE_POINTS_UV ) + varying vec2 vUv; +#else + #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + uniform mat3 uvTransform; + #endif +#endif +#ifdef USE_MAP + uniform sampler2D map; +#endif +#ifdef USE_ALPHAMAP + uniform sampler2D alphaMap; +#endif`,ESe=`float metalnessFactor = metalness; +#ifdef USE_METALNESSMAP + vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); + metalnessFactor *= texelMetalness.b; +#endif`,ASe=`#ifdef USE_METALNESSMAP + uniform sampler2D metalnessMap; +#endif`,TSe=`#ifdef USE_INSTANCING_MORPH + float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; + } +#endif`,ISe=`#if defined( USE_MORPHCOLORS ) + vColor *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + #if defined( USE_COLOR_ALPHA ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; + #elif defined( USE_COLOR ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; + #endif + } +#endif`,LSe=`#ifdef USE_MORPHNORMALS + objectNormal *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; + } +#endif`,RSe=`#ifdef USE_MORPHTARGETS + #ifndef USE_INSTANCING_MORPH + uniform float morphTargetBaseInfluence; + uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + #endif + uniform sampler2DArray morphTargetsTexture; + uniform ivec2 morphTargetsTextureSize; + vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { + int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; + int y = texelIndex / morphTargetsTextureSize.x; + int x = texelIndex - y * morphTargetsTextureSize.x; + ivec3 morphUV = ivec3( x, y, morphTargetIndex ); + return texelFetch( morphTargetsTexture, morphUV, 0 ); + } +#endif`,PSe=`#ifdef USE_MORPHTARGETS + transformed *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; + } +#endif`,DSe=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#ifdef FLAT_SHADED + vec3 fdx = dFdx( vViewPosition ); + vec3 fdy = dFdy( vViewPosition ); + vec3 normal = normalize( cross( fdx, fdy ) ); +#else + vec3 normal = normalize( vNormal ); + #ifdef DOUBLE_SIDED + normal *= faceDirection; + #endif +#endif +#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) + #ifdef USE_TANGENT + mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn = getTangentFrame( - vViewPosition, normal, + #if defined( USE_NORMALMAP ) + vNormalMapUv + #elif defined( USE_CLEARCOAT_NORMALMAP ) + vClearcoatNormalMapUv + #else + vUv + #endif + ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn[0] *= faceDirection; + tbn[1] *= faceDirection; + #endif +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + #ifdef USE_TANGENT + mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn2[0] *= faceDirection; + tbn2[1] *= faceDirection; + #endif +#endif +vec3 nonPerturbedNormal = normal;`,NSe=`#ifdef USE_NORMALMAP_OBJECTSPACE + normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + #ifdef FLIP_SIDED + normal = - normal; + #endif + #ifdef DOUBLE_SIDED + normal = normal * faceDirection; + #endif + normal = normalize( normalMatrix * normal ); +#elif defined( USE_NORMALMAP_TANGENTSPACE ) + vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + mapN.xy *= normalScale; + normal = normalize( tbn * mapN ); +#elif defined( USE_BUMPMAP ) + normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); +#endif`,kSe=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,BSe=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,OSe=`#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); + #ifdef USE_TANGENT + vTangent = normalize( transformedTangent ); + vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); + #endif +#endif`,USe=`#ifdef USE_NORMALMAP + uniform sampler2D normalMap; + uniform vec2 normalScale; +#endif +#ifdef USE_NORMALMAP_OBJECTSPACE + uniform mat3 normalMatrix; +#endif +#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) + mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { + vec3 q0 = dFdx( eye_pos.xyz ); + vec3 q1 = dFdy( eye_pos.xyz ); + vec2 st0 = dFdx( uv.st ); + vec2 st1 = dFdy( uv.st ); + vec3 N = surf_norm; + vec3 q1perp = cross( q1, N ); + vec3 q0perp = cross( N, q0 ); + vec3 T = q1perp * st0.x + q0perp * st1.x; + vec3 B = q1perp * st0.y + q0perp * st1.y; + float det = max( dot( T, T ), dot( B, B ) ); + float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); + return mat3( T * scale, B * scale, N ); + } +#endif`,FSe=`#ifdef USE_CLEARCOAT + vec3 clearcoatNormal = nonPerturbedNormal; +#endif`,jSe=`#ifdef USE_CLEARCOAT_NORMALMAP + vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; + clearcoatMapN.xy *= clearcoatNormalScale; + clearcoatNormal = normalize( tbn2 * clearcoatMapN ); +#endif`,zSe=`#ifdef USE_CLEARCOATMAP + uniform sampler2D clearcoatMap; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform sampler2D clearcoatNormalMap; + uniform vec2 clearcoatNormalScale; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform sampler2D clearcoatRoughnessMap; +#endif`,HSe=`#ifdef USE_IRIDESCENCEMAP + uniform sampler2D iridescenceMap; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform sampler2D iridescenceThicknessMap; +#endif`,GSe=`#ifdef OPAQUE +diffuseColor.a = 1.0; +#endif +#ifdef USE_TRANSMISSION +diffuseColor.a *= material.transmissionAlpha; +#endif +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,VSe=`vec3 packNormalToRGB( const in vec3 normal ) { + return normalize( normal ) * 0.5 + 0.5; +} +vec3 unpackRGBToNormal( const in vec3 rgb ) { + return 2.0 * rgb.xyz - 1.0; +} +const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; +const float Inv255 = 1. / 255.; +const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); +const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); +const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); +const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); +vec4 packDepthToRGBA( const in float v ) { + if( v <= 0.0 ) + return vec4( 0., 0., 0., 0. ); + if( v >= 1.0 ) + return vec4( 1., 1., 1., 1. ); + float vuf; + float af = modf( v * PackFactors.a, vuf ); + float bf = modf( vuf * ShiftRight8, vuf ); + float gf = modf( vuf * ShiftRight8, vuf ); + return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); +} +vec3 packDepthToRGB( const in float v ) { + if( v <= 0.0 ) + return vec3( 0., 0., 0. ); + if( v >= 1.0 ) + return vec3( 1., 1., 1. ); + float vuf; + float bf = modf( v * PackFactors.b, vuf ); + float gf = modf( vuf * ShiftRight8, vuf ); + return vec3( vuf * Inv255, gf * PackUpscale, bf ); +} +vec2 packDepthToRG( const in float v ) { + if( v <= 0.0 ) + return vec2( 0., 0. ); + if( v >= 1.0 ) + return vec2( 1., 1. ); + float vuf; + float gf = modf( v * 256., vuf ); + return vec2( vuf * Inv255, gf ); +} +float unpackRGBAToDepth( const in vec4 v ) { + return dot( v, UnpackFactors4 ); +} +float unpackRGBToDepth( const in vec3 v ) { + return dot( v, UnpackFactors3 ); +} +float unpackRGToDepth( const in vec2 v ) { + return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; +} +vec4 pack2HalfToRGBA( const in vec2 v ) { + vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); + return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); +} +vec2 unpackRGBATo2Half( const in vec4 v ) { + return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); +} +float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { + return ( viewZ + near ) / ( near - far ); +} +float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { + return depth * ( near - far ) - near; +} +float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { + return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); +} +float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { + return ( near * far ) / ( ( far - near ) * depth - far ); +}`,WSe=`#ifdef PREMULTIPLIED_ALPHA + gl_FragColor.rgb *= gl_FragColor.a; +#endif`,$Se=`vec4 mvPosition = vec4( transformed, 1.0 ); +#ifdef USE_BATCHING + mvPosition = batchingMatrix * mvPosition; +#endif +#ifdef USE_INSTANCING + mvPosition = instanceMatrix * mvPosition; +#endif +mvPosition = modelViewMatrix * mvPosition; +gl_Position = projectionMatrix * mvPosition;`,JSe=`#ifdef DITHERING + gl_FragColor.rgb = dithering( gl_FragColor.rgb ); +#endif`,YSe=`#ifdef DITHERING + vec3 dithering( vec3 color ) { + float grid_position = rand( gl_FragCoord.xy ); + vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); + dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); + return color + dither_shift_RGB; + } +#endif`,QSe=`float roughnessFactor = roughness; +#ifdef USE_ROUGHNESSMAP + vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); + roughnessFactor *= texelRoughness.g; +#endif`,XSe=`#ifdef USE_ROUGHNESSMAP + uniform sampler2D roughnessMap; +#endif`,KSe=`#if NUM_SPOT_LIGHT_COORDS > 0 + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#if NUM_SPOT_LIGHT_MAPS > 0 + uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + struct SpotLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif + float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { + return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); + } + vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { + return unpackRGBATo2Half( texture2D( shadow, uv ) ); + } + float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ + float occlusion = 1.0; + vec2 distribution = texture2DDistribution( shadow, uv ); + float hard_shadow = step( compare , distribution.x ); + if (hard_shadow != 1.0 ) { + float distance = compare - distribution.x ; + float variance = max( 0.00000, distribution.y * distribution.y ); + float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); + } + return occlusion; + } + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + float shadow = 1.0; + shadowCoord.xyz /= shadowCoord.w; + shadowCoord.z += shadowBias; + bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; + bool frustumTest = inFrustum && shadowCoord.z <= 1.0; + if ( frustumTest ) { + #if defined( SHADOWMAP_TYPE_PCF ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + float dx2 = dx0 / 2.0; + float dy2 = dy0 / 2.0; + float dx3 = dx1 / 2.0; + float dy3 = dy1 / 2.0; + shadow = ( + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 17.0 ); + #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx = texelSize.x; + float dy = texelSize.y; + vec2 uv = shadowCoord.xy; + vec2 f = fract( uv * shadowMapSize + 0.5 ); + uv -= f * texelSize; + shadow = ( + texture2DCompare( shadowMap, uv, shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), + f.x ), + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), + f.x ), + f.y ) + ) * ( 1.0 / 9.0 ); + #elif defined( SHADOWMAP_TYPE_VSM ) + shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); + #else + shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); + #endif + } + return mix( 1.0, shadow, shadowIntensity ); + } + vec2 cubeToUV( vec3 v, float texelSizeY ) { + vec3 absV = abs( v ); + float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); + absV *= scaleToCube; + v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); + vec2 planar = v.xy; + float almostATexel = 1.5 * texelSizeY; + float almostOne = 1.0 - almostATexel; + if ( absV.z >= almostOne ) { + if ( v.z > 0.0 ) + planar.x = 4.0 - v.x; + } else if ( absV.x >= almostOne ) { + float signX = sign( v.x ); + planar.x = v.z * signX + 2.0 * signX; + } else if ( absV.y >= almostOne ) { + float signY = sign( v.y ); + planar.x = v.x + 2.0 * signY + 2.0; + planar.y = v.z * signY - 2.0; + } + return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); + } + float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + float shadow = 1.0; + vec3 lightToPosition = shadowCoord.xyz; + + float lightToPositionLength = length( lightToPosition ); + if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) { + float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; + vec3 bd3D = normalize( lightToPosition ); + vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); + #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) + vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; + shadow = ( + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) + ) * ( 1.0 / 9.0 ); + #else + shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); + #endif + } + return mix( 1.0, shadow, shadowIntensity ); + } +#endif`,ZSe=`#if NUM_SPOT_LIGHT_COORDS > 0 + uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + struct SpotLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowIntensity; + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif +#endif`,qSe=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) + vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + vec4 shadowWorldPosition; +#endif +#if defined( USE_SHADOWMAP ) + #if NUM_DIR_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); + vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); + vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif +#endif +#if NUM_SPOT_LIGHT_COORDS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { + shadowWorldPosition = worldPosition; + #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; + #endif + vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end +#endif`,eCe=`float getShadowMask() { + float shadow = 1.0; + #ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + directionalLight = directionalLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + spotLight = spotLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + pointLight = pointLightShadows[ i ]; + shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; + } + #pragma unroll_loop_end + #endif + #endif + return shadow; +}`,tCe=`#ifdef USE_SKINNING + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); +#endif`,nCe=`#ifdef USE_SKINNING + uniform mat4 bindMatrix; + uniform mat4 bindMatrixInverse; + uniform highp sampler2D boneTexture; + mat4 getBoneMatrix( const in float i ) { + int size = textureSize( boneTexture, 0 ).x; + int j = int( i ) * 4; + int x = j % size; + int y = j / size; + vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); + vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); + vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); + vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); + return mat4( v1, v2, v3, v4 ); + } +#endif`,rCe=`#ifdef USE_SKINNING + vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); + vec4 skinned = vec4( 0.0 ); + skinned += boneMatX * skinVertex * skinWeight.x; + skinned += boneMatY * skinVertex * skinWeight.y; + skinned += boneMatZ * skinVertex * skinWeight.z; + skinned += boneMatW * skinVertex * skinWeight.w; + transformed = ( bindMatrixInverse * skinned ).xyz; +#endif`,iCe=`#ifdef USE_SKINNING + mat4 skinMatrix = mat4( 0.0 ); + skinMatrix += skinWeight.x * boneMatX; + skinMatrix += skinWeight.y * boneMatY; + skinMatrix += skinWeight.z * boneMatZ; + skinMatrix += skinWeight.w * boneMatW; + skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; + objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; + #ifdef USE_TANGENT + objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #endif +#endif`,sCe=`float specularStrength; +#ifdef USE_SPECULARMAP + vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); + specularStrength = texelSpecular.r; +#else + specularStrength = 1.0; +#endif`,oCe=`#ifdef USE_SPECULARMAP + uniform sampler2D specularMap; +#endif`,aCe=`#if defined( TONE_MAPPING ) + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); +#endif`,lCe=`#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +uniform float toneMappingExposure; +vec3 LinearToneMapping( vec3 color ) { + return saturate( toneMappingExposure * color ); +} +vec3 ReinhardToneMapping( vec3 color ) { + color *= toneMappingExposure; + return saturate( color / ( vec3( 1.0 ) + color ) ); +} +vec3 OptimizedCineonToneMapping( vec3 color ) { + color *= toneMappingExposure; + color = max( vec3( 0.0 ), color - 0.004 ); + return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); +} +vec3 RRTAndODTFit( vec3 v ) { + vec3 a = v * ( v + 0.0245786 ) - 0.000090537; + vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; + return a / b; +} +vec3 ACESFilmicToneMapping( vec3 color ) { + const mat3 ACESInputMat = mat3( + vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), + vec3( 0.04823, 0.01566, 0.83777 ) + ); + const mat3 ACESOutputMat = mat3( + vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), + vec3( -0.07367, -0.00605, 1.07602 ) + ); + color *= toneMappingExposure / 0.6; + color = ACESInputMat * color; + color = RRTAndODTFit( color ); + color = ACESOutputMat * color; + return saturate( color ); +} +const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( + vec3( 1.6605, - 0.1246, - 0.0182 ), + vec3( - 0.5876, 1.1329, - 0.1006 ), + vec3( - 0.0728, - 0.0083, 1.1187 ) +); +const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( + vec3( 0.6274, 0.0691, 0.0164 ), + vec3( 0.3293, 0.9195, 0.0880 ), + vec3( 0.0433, 0.0113, 0.8956 ) +); +vec3 agxDefaultContrastApprox( vec3 x ) { + vec3 x2 = x * x; + vec3 x4 = x2 * x2; + return + 15.5 * x4 * x2 + - 40.14 * x4 * x + + 31.96 * x4 + - 6.868 * x2 * x + + 0.4298 * x2 + + 0.1191 * x + - 0.00232; +} +vec3 AgXToneMapping( vec3 color ) { + const mat3 AgXInsetMatrix = mat3( + vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), + vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), + vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) + ); + const mat3 AgXOutsetMatrix = mat3( + vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), + vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), + vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) + ); + const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; + color *= toneMappingExposure; + color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; + color = AgXInsetMatrix * color; + color = max( color, 1e-10 ); color = log2( color ); + color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); + color = clamp( color, 0.0, 1.0 ); + color = agxDefaultContrastApprox( color ); + color = AgXOutsetMatrix * color; + color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); + color = LINEAR_REC2020_TO_LINEAR_SRGB * color; + color = clamp( color, 0.0, 1.0 ); + return color; +} +vec3 NeutralToneMapping( vec3 color ) { + const float StartCompression = 0.8 - 0.04; + const float Desaturation = 0.15; + color *= toneMappingExposure; + float x = min( color.r, min( color.g, color.b ) ); + float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; + color -= offset; + float peak = max( color.r, max( color.g, color.b ) ); + if ( peak < StartCompression ) return color; + float d = 1. - StartCompression; + float newPeak = 1. - d * d / ( peak + d - StartCompression ); + color *= newPeak / peak; + float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); + return mix( color, vec3( newPeak ), g ); +} +vec3 CustomToneMapping( vec3 color ) { return color; }`,cCe=`#ifdef USE_TRANSMISSION + material.transmission = transmission; + material.transmissionAlpha = 1.0; + material.thickness = thickness; + material.attenuationDistance = attenuationDistance; + material.attenuationColor = attenuationColor; + #ifdef USE_TRANSMISSIONMAP + material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; + #endif + #ifdef USE_THICKNESSMAP + material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; + #endif + vec3 pos = vWorldPosition; + vec3 v = normalize( cameraPosition - pos ); + vec3 n = inverseTransformDirection( normal, viewMatrix ); + vec4 transmitted = getIBLVolumeRefraction( + n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, + pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, + material.attenuationColor, material.attenuationDistance ); + material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); + totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); +#endif`,uCe=`#ifdef USE_TRANSMISSION + uniform float transmission; + uniform float thickness; + uniform float attenuationDistance; + uniform vec3 attenuationColor; + #ifdef USE_TRANSMISSIONMAP + uniform sampler2D transmissionMap; + #endif + #ifdef USE_THICKNESSMAP + uniform sampler2D thicknessMap; + #endif + uniform vec2 transmissionSamplerSize; + uniform sampler2D transmissionSamplerMap; + uniform mat4 modelMatrix; + uniform mat4 projectionMatrix; + varying vec3 vWorldPosition; + float w0( float a ) { + return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); + } + float w1( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); + } + float w2( float a ){ + return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); + } + float w3( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * a ); + } + float g0( float a ) { + return w0( a ) + w1( a ); + } + float g1( float a ) { + return w2( a ) + w3( a ); + } + float h0( float a ) { + return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); + } + float h1( float a ) { + return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); + } + vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { + uv = uv * texelSize.zw + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + float g0x = g0( fuv.x ); + float g1x = g1( fuv.x ); + float h0x = h0( fuv.x ); + float h1x = h1( fuv.x ); + float h0y = h0( fuv.y ); + float h1y = h1( fuv.y ); + vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); + } + vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { + vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); + vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); + vec2 fLodSizeInv = 1.0 / fLodSize; + vec2 cLodSizeInv = 1.0 / cLodSize; + vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); + vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); + return mix( fSample, cSample, fract( lod ) ); + } + vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { + vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); + vec3 modelScale; + modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); + modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); + modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); + return normalize( refractionVector ) * thickness * modelScale; + } + float applyIorToRoughness( const in float roughness, const in float ior ) { + return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); + } + vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { + float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); + return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); + } + vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { + if ( isinf( attenuationDistance ) ) { + return vec3( 1.0 ); + } else { + vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; + vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; + } + } + vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, + const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, + const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, + const in vec3 attenuationColor, const in float attenuationDistance ) { + vec4 transmittedLight; + vec3 transmittance; + #ifdef USE_DISPERSION + float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; + vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); + for ( int i = 0; i < 3; i ++ ) { + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + + vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); + transmittedLight[ i ] = transmissionSample[ i ]; + transmittedLight.a += transmissionSample.a; + transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; + } + transmittedLight.a /= 3.0; + + #else + + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); + transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); + + #endif + vec3 attenuatedColor = transmittance * transmittedLight.rgb; + vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); + float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; + return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); + } +#endif`,fCe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + varying vec2 vUv; +#endif +#ifdef USE_MAP + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + varying vec2 vNormalMapUv; +#endif +#ifdef USE_EMISSIVEMAP + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_ANISOTROPYMAP + varying vec2 vAnisotropyMapUv; +#endif +#ifdef USE_CLEARCOATMAP + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_SPECULARMAP + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,dCe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + varying vec2 vUv; +#endif +#ifdef USE_MAP + uniform mat3 mapTransform; + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + uniform mat3 alphaMapTransform; + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + uniform mat3 lightMapTransform; + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + uniform mat3 aoMapTransform; + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + uniform mat3 bumpMapTransform; + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + uniform mat3 normalMapTransform; + varying vec2 vNormalMapUv; +#endif +#ifdef USE_DISPLACEMENTMAP + uniform mat3 displacementMapTransform; + varying vec2 vDisplacementMapUv; +#endif +#ifdef USE_EMISSIVEMAP + uniform mat3 emissiveMapTransform; + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + uniform mat3 metalnessMapTransform; + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + uniform mat3 roughnessMapTransform; + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_ANISOTROPYMAP + uniform mat3 anisotropyMapTransform; + varying vec2 vAnisotropyMapUv; +#endif +#ifdef USE_CLEARCOATMAP + uniform mat3 clearcoatMapTransform; + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform mat3 clearcoatNormalMapTransform; + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform mat3 clearcoatRoughnessMapTransform; + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + uniform mat3 sheenColorMapTransform; + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + uniform mat3 sheenRoughnessMapTransform; + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + uniform mat3 iridescenceMapTransform; + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform mat3 iridescenceThicknessMapTransform; + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SPECULARMAP + uniform mat3 specularMapTransform; + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + uniform mat3 specularColorMapTransform; + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + uniform mat3 specularIntensityMapTransform; + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,hCe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + vUv = vec3( uv, 1 ).xy; +#endif +#ifdef USE_MAP + vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ALPHAMAP + vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_LIGHTMAP + vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_AOMAP + vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_BUMPMAP + vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_NORMALMAP + vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_DISPLACEMENTMAP + vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_EMISSIVEMAP + vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_METALNESSMAP + vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ROUGHNESSMAP + vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ANISOTROPYMAP + vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOATMAP + vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCEMAP + vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_COLORMAP + vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULARMAP + vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_COLORMAP + vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_TRANSMISSIONMAP + vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_THICKNESSMAP + vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; +#endif`,pCe=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 + vec4 worldPosition = vec4( transformed, 1.0 ); + #ifdef USE_BATCHING + worldPosition = batchingMatrix * worldPosition; + #endif + #ifdef USE_INSTANCING + worldPosition = instanceMatrix * worldPosition; + #endif + worldPosition = modelMatrix * worldPosition; +#endif`;const mCe=`varying vec2 vUv; +uniform mat3 uvTransform; +void main() { + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + gl_Position = vec4( position.xy, 1.0, 1.0 ); +}`,gCe=`uniform sampler2D t2D; +uniform float backgroundIntensity; +varying vec2 vUv; +void main() { + vec4 texColor = texture2D( t2D, vUv ); + #ifdef DECODE_VIDEO_TEXTURE + texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,vCe=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,yCe=`#ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; +#elif defined( ENVMAP_TYPE_CUBE_UV ) + uniform sampler2D envMap; +#endif +uniform float flipEnvMap; +uniform float backgroundBlurriness; +uniform float backgroundIntensity; +uniform mat3 backgroundRotation; +varying vec3 vWorldDirection; +#include +void main() { + #ifdef ENVMAP_TYPE_CUBE + vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); + #elif defined( ENVMAP_TYPE_CUBE_UV ) + vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); + #else + vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,wCe=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,_Ce=`uniform samplerCube tCube; +uniform float tFlip; +uniform float opacity; +varying vec3 vWorldDirection; +void main() { + vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); + gl_FragColor = texColor; + gl_FragColor.a *= opacity; + #include + #include +}`,MCe=`#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + #include + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vHighPrecisionZW = gl_Position.zw; +}`,xCe=`#if DEPTH_PACKING == 3200 + uniform float opacity; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + vec4 diffuseColor = vec4( 1.0 ); + #include + #if DEPTH_PACKING == 3200 + diffuseColor.a = opacity; + #endif + #include + #include + #include + #include + #include + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + #if DEPTH_PACKING == 3200 + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); + #elif DEPTH_PACKING == 3201 + gl_FragColor = packDepthToRGBA( fragCoordZ ); + #elif DEPTH_PACKING == 3202 + gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); + #elif DEPTH_PACKING == 3203 + gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); + #endif +}`,bCe=`#define DISTANCE +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vWorldPosition = worldPosition.xyz; +}`,SCe=`#define DISTANCE +uniform vec3 referencePosition; +uniform float nearDistance; +uniform float farDistance; +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +#include +void main () { + vec4 diffuseColor = vec4( 1.0 ); + #include + #include + #include + #include + #include + float dist = length( vWorldPosition - referencePosition ); + dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); + dist = saturate( dist ); + gl_FragColor = packDepthToRGBA( dist ); +}`,CCe=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include +}`,ECe=`uniform sampler2D tEquirect; +varying vec3 vWorldDirection; +#include +void main() { + vec3 direction = normalize( vWorldDirection ); + vec2 sampleUV = equirectUv( direction ); + gl_FragColor = texture2D( tEquirect, sampleUV ); + #include + #include +}`,ACe=`uniform float scale; +attribute float lineDistance; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vLineDistance = scale * lineDistance; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,TCe=`uniform vec3 diffuse; +uniform float opacity; +uniform float dashSize; +uniform float totalSize; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + if ( mod( vLineDistance, totalSize ) > dashSize ) { + discard; + } + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,ICe=`#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) + #include + #include + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,LCe=`uniform vec3 diffuse; +uniform float opacity; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; + #else + reflectedLight.indirectDiffuse += vec3( 1.0 ); + #endif + #include + reflectedLight.indirectDiffuse *= diffuseColor.rgb; + vec3 outgoingLight = reflectedLight.indirectDiffuse; + #include + #include + #include + #include + #include + #include + #include +}`,RCe=`#define LAMBERT +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,PCe=`#define LAMBERT +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,DCe=`#define MATCAP +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; +}`,NCe=`#define MATCAP +uniform vec3 diffuse; +uniform float opacity; +uniform sampler2D matcap; +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 viewDir = normalize( vViewPosition ); + vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); + vec3 y = cross( viewDir, x ); + vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; + #ifdef USE_MATCAP + vec4 matcapColor = texture2D( matcap, uv ); + #else + vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); + #endif + vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; + #include + #include + #include + #include + #include + #include +}`,kCe=`#define NORMAL +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + vViewPosition = - mvPosition.xyz; +#endif +}`,BCe=`#define NORMAL +uniform float opacity; +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); + #include + #include + #include + #include + gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); + #ifdef OPAQUE + gl_FragColor.a = 1.0; + #endif +}`,OCe=`#define PHONG +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,UCe=`#define PHONG +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,FCe=`#define STANDARD +varying vec3 vViewPosition; +#ifdef USE_TRANSMISSION + varying vec3 vWorldPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +#ifdef USE_TRANSMISSION + vWorldPosition = worldPosition.xyz; +#endif +}`,jCe=`#define STANDARD +#ifdef PHYSICAL + #define IOR + #define USE_SPECULAR +#endif +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float roughness; +uniform float metalness; +uniform float opacity; +#ifdef IOR + uniform float ior; +#endif +#ifdef USE_SPECULAR + uniform float specularIntensity; + uniform vec3 specularColor; + #ifdef USE_SPECULAR_COLORMAP + uniform sampler2D specularColorMap; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + uniform sampler2D specularIntensityMap; + #endif +#endif +#ifdef USE_CLEARCOAT + uniform float clearcoat; + uniform float clearcoatRoughness; +#endif +#ifdef USE_DISPERSION + uniform float dispersion; +#endif +#ifdef USE_IRIDESCENCE + uniform float iridescence; + uniform float iridescenceIOR; + uniform float iridescenceThicknessMinimum; + uniform float iridescenceThicknessMaximum; +#endif +#ifdef USE_SHEEN + uniform vec3 sheenColor; + uniform float sheenRoughness; + #ifdef USE_SHEEN_COLORMAP + uniform sampler2D sheenColorMap; + #endif + #ifdef USE_SHEEN_ROUGHNESSMAP + uniform sampler2D sheenRoughnessMap; + #endif +#endif +#ifdef USE_ANISOTROPY + uniform vec2 anisotropyVector; + #ifdef USE_ANISOTROPYMAP + uniform sampler2D anisotropyMap; + #endif +#endif +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; + vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; + #include + vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; + #ifdef USE_SHEEN + float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); + outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; + #endif + #ifdef USE_CLEARCOAT + float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); + vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); + outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; + #endif + #include + #include + #include + #include + #include + #include +}`,zCe=`#define TOON +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +}`,HCe=`#define TOON +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include +}`,GCe=`uniform float size; +uniform float scale; +#include +#include +#include +#include +#include +#include +#ifdef USE_POINTS_UV + varying vec2 vUv; + uniform mat3 uvTransform; +#endif +void main() { + #ifdef USE_POINTS_UV + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + #endif + #include + #include + #include + #include + #include + #include + gl_PointSize = size; + #ifdef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); + #endif + #include + #include + #include + #include +}`,VCe=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,WCe=`#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,$Ce=`uniform vec3 color; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); + #include + #include + #include +}`,JCe=`uniform float rotation; +uniform vec2 center; +#include +#include +#include +#include +#include +void main() { + #include + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + #ifndef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + #endif + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + gl_Position = projectionMatrix * mvPosition; + #include + #include + #include +}`,YCe=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include +}`,xn={alphahash_fragment:g2e,alphahash_pars_fragment:v2e,alphamap_fragment:y2e,alphamap_pars_fragment:w2e,alphatest_fragment:_2e,alphatest_pars_fragment:M2e,aomap_fragment:x2e,aomap_pars_fragment:b2e,batching_pars_vertex:S2e,batching_vertex:C2e,begin_vertex:E2e,beginnormal_vertex:A2e,bsdfs:T2e,iridescence_fragment:I2e,bumpmap_pars_fragment:L2e,clipping_planes_fragment:R2e,clipping_planes_pars_fragment:P2e,clipping_planes_pars_vertex:D2e,clipping_planes_vertex:N2e,color_fragment:k2e,color_pars_fragment:B2e,color_pars_vertex:O2e,color_vertex:U2e,common:F2e,cube_uv_reflection_fragment:j2e,defaultnormal_vertex:z2e,displacementmap_pars_vertex:H2e,displacementmap_vertex:G2e,emissivemap_fragment:V2e,emissivemap_pars_fragment:W2e,colorspace_fragment:$2e,colorspace_pars_fragment:J2e,envmap_fragment:Y2e,envmap_common_pars_fragment:Q2e,envmap_pars_fragment:X2e,envmap_pars_vertex:K2e,envmap_physical_pars_fragment:lSe,envmap_vertex:Z2e,fog_vertex:q2e,fog_pars_vertex:eSe,fog_fragment:tSe,fog_pars_fragment:nSe,gradientmap_pars_fragment:rSe,lightmap_pars_fragment:iSe,lights_lambert_fragment:sSe,lights_lambert_pars_fragment:oSe,lights_pars_begin:aSe,lights_toon_fragment:cSe,lights_toon_pars_fragment:uSe,lights_phong_fragment:fSe,lights_phong_pars_fragment:dSe,lights_physical_fragment:hSe,lights_physical_pars_fragment:pSe,lights_fragment_begin:mSe,lights_fragment_maps:gSe,lights_fragment_end:vSe,logdepthbuf_fragment:ySe,logdepthbuf_pars_fragment:wSe,logdepthbuf_pars_vertex:_Se,logdepthbuf_vertex:MSe,map_fragment:xSe,map_pars_fragment:bSe,map_particle_fragment:SSe,map_particle_pars_fragment:CSe,metalnessmap_fragment:ESe,metalnessmap_pars_fragment:ASe,morphinstance_vertex:TSe,morphcolor_vertex:ISe,morphnormal_vertex:LSe,morphtarget_pars_vertex:RSe,morphtarget_vertex:PSe,normal_fragment_begin:DSe,normal_fragment_maps:NSe,normal_pars_fragment:kSe,normal_pars_vertex:BSe,normal_vertex:OSe,normalmap_pars_fragment:USe,clearcoat_normal_fragment_begin:FSe,clearcoat_normal_fragment_maps:jSe,clearcoat_pars_fragment:zSe,iridescence_pars_fragment:HSe,opaque_fragment:GSe,packing:VSe,premultiplied_alpha_fragment:WSe,project_vertex:$Se,dithering_fragment:JSe,dithering_pars_fragment:YSe,roughnessmap_fragment:QSe,roughnessmap_pars_fragment:XSe,shadowmap_pars_fragment:KSe,shadowmap_pars_vertex:ZSe,shadowmap_vertex:qSe,shadowmask_pars_fragment:eCe,skinbase_vertex:tCe,skinning_pars_vertex:nCe,skinning_vertex:rCe,skinnormal_vertex:iCe,specularmap_fragment:sCe,specularmap_pars_fragment:oCe,tonemapping_fragment:aCe,tonemapping_pars_fragment:lCe,transmission_fragment:cCe,transmission_pars_fragment:uCe,uv_pars_fragment:fCe,uv_pars_vertex:dCe,uv_vertex:hCe,worldpos_vertex:pCe,background_vert:mCe,background_frag:gCe,backgroundCube_vert:vCe,backgroundCube_frag:yCe,cube_vert:wCe,cube_frag:_Ce,depth_vert:MCe,depth_frag:xCe,distanceRGBA_vert:bCe,distanceRGBA_frag:SCe,equirect_vert:CCe,equirect_frag:ECe,linedashed_vert:ACe,linedashed_frag:TCe,meshbasic_vert:ICe,meshbasic_frag:LCe,meshlambert_vert:RCe,meshlambert_frag:PCe,meshmatcap_vert:DCe,meshmatcap_frag:NCe,meshnormal_vert:kCe,meshnormal_frag:BCe,meshphong_vert:OCe,meshphong_frag:UCe,meshphysical_vert:FCe,meshphysical_frag:jCe,meshtoon_vert:zCe,meshtoon_frag:HCe,points_vert:GCe,points_frag:VCe,shadow_vert:WCe,shadow_frag:$Ce,sprite_vert:JCe,sprite_frag:YCe},Dt={common:{diffuse:{value:new Lt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},envMapRotation:{value:new wn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new tt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Lt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Lt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new Lt(16777215)},opacity:{value:1},center:{value:new tt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},Ia={basic:{uniforms:Is([Dt.common,Dt.specularmap,Dt.envmap,Dt.aomap,Dt.lightmap,Dt.fog]),vertexShader:xn.meshbasic_vert,fragmentShader:xn.meshbasic_frag},lambert:{uniforms:Is([Dt.common,Dt.specularmap,Dt.envmap,Dt.aomap,Dt.lightmap,Dt.emissivemap,Dt.bumpmap,Dt.normalmap,Dt.displacementmap,Dt.fog,Dt.lights,{emissive:{value:new Lt(0)}}]),vertexShader:xn.meshlambert_vert,fragmentShader:xn.meshlambert_frag},phong:{uniforms:Is([Dt.common,Dt.specularmap,Dt.envmap,Dt.aomap,Dt.lightmap,Dt.emissivemap,Dt.bumpmap,Dt.normalmap,Dt.displacementmap,Dt.fog,Dt.lights,{emissive:{value:new Lt(0)},specular:{value:new Lt(1118481)},shininess:{value:30}}]),vertexShader:xn.meshphong_vert,fragmentShader:xn.meshphong_frag},standard:{uniforms:Is([Dt.common,Dt.envmap,Dt.aomap,Dt.lightmap,Dt.emissivemap,Dt.bumpmap,Dt.normalmap,Dt.displacementmap,Dt.roughnessmap,Dt.metalnessmap,Dt.fog,Dt.lights,{emissive:{value:new Lt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:xn.meshphysical_vert,fragmentShader:xn.meshphysical_frag},toon:{uniforms:Is([Dt.common,Dt.aomap,Dt.lightmap,Dt.emissivemap,Dt.bumpmap,Dt.normalmap,Dt.displacementmap,Dt.gradientmap,Dt.fog,Dt.lights,{emissive:{value:new Lt(0)}}]),vertexShader:xn.meshtoon_vert,fragmentShader:xn.meshtoon_frag},matcap:{uniforms:Is([Dt.common,Dt.bumpmap,Dt.normalmap,Dt.displacementmap,Dt.fog,{matcap:{value:null}}]),vertexShader:xn.meshmatcap_vert,fragmentShader:xn.meshmatcap_frag},points:{uniforms:Is([Dt.points,Dt.fog]),vertexShader:xn.points_vert,fragmentShader:xn.points_frag},dashed:{uniforms:Is([Dt.common,Dt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:xn.linedashed_vert,fragmentShader:xn.linedashed_frag},depth:{uniforms:Is([Dt.common,Dt.displacementmap]),vertexShader:xn.depth_vert,fragmentShader:xn.depth_frag},normal:{uniforms:Is([Dt.common,Dt.bumpmap,Dt.normalmap,Dt.displacementmap,{opacity:{value:1}}]),vertexShader:xn.meshnormal_vert,fragmentShader:xn.meshnormal_frag},sprite:{uniforms:Is([Dt.sprite,Dt.fog]),vertexShader:xn.sprite_vert,fragmentShader:xn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:xn.background_vert,fragmentShader:xn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new wn}},vertexShader:xn.backgroundCube_vert,fragmentShader:xn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:xn.cube_vert,fragmentShader:xn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:xn.equirect_vert,fragmentShader:xn.equirect_frag},distanceRGBA:{uniforms:Is([Dt.common,Dt.displacementmap,{referencePosition:{value:new Z},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:xn.distanceRGBA_vert,fragmentShader:xn.distanceRGBA_frag},shadow:{uniforms:Is([Dt.lights,Dt.fog,{color:{value:new Lt(0)},opacity:{value:1}}]),vertexShader:xn.shadow_vert,fragmentShader:xn.shadow_frag}};Ia.physical={uniforms:Is([Ia.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new tt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new Lt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new tt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new Lt(0)},specularColor:{value:new Lt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new tt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:xn.meshphysical_vert,fragmentShader:xn.meshphysical_frag};const jw={r:0,b:0,g:0},yf=new To,QCe=new Kt;function XCe(t,e,n,r,i,s,o){const a=new Lt(0);let l=s===!0?0:1,c,u,f=null,h=0,m=null;function v(_){let x=_.isScene===!0?_.background:null;return x&&x.isTexture&&(x=(_.backgroundBlurriness>0?n:e).get(x)),x}function w(_){let x=!1;const S=v(_);S===null?g(a,l):S&&S.isColor&&(g(S,1),x=!0);const D=t.xr.getEnvironmentBlendMode();D==="additive"?r.buffers.color.setClear(0,0,0,1,o):D==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,o),(t.autoClear||x)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function y(_,x){const S=v(x);S&&(S.isCubeTexture||S.mapping===zm)?(u===void 0&&(u=new Cr(new $d(1,1,1),new qi({name:"BackgroundCubeMaterial",uniforms:gm(Ia.backgroundCube.uniforms),vertexShader:Ia.backgroundCube.vertexShader,fragmentShader:Ia.backgroundCube.fragmentShader,side:Os,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(D,T,E){this.matrixWorld.copyPosition(E.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),yf.copy(x.backgroundRotation),yf.x*=-1,yf.y*=-1,yf.z*=-1,S.isCubeTexture&&S.isRenderTargetTexture===!1&&(yf.y*=-1,yf.z*=-1),u.material.uniforms.envMap.value=S,u.material.uniforms.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(QCe.makeRotationFromEuler(yf)),u.material.toneMapped=Zn.getTransfer(S.colorSpace)!==gr,(f!==S||h!==S.version||m!==t.toneMapping)&&(u.material.needsUpdate=!0,f=S,h=S.version,m=t.toneMapping),u.layers.enableAll(),_.unshift(u,u.geometry,u.material,0,0,null)):S&&S.isTexture&&(c===void 0&&(c=new Cr(new vc(2,2),new qi({name:"BackgroundMaterial",uniforms:gm(Ia.background.uniforms),vertexShader:Ia.background.vertexShader,fragmentShader:Ia.background.fragmentShader,side:ml,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=S,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.toneMapped=Zn.getTransfer(S.colorSpace)!==gr,S.matrixAutoUpdate===!0&&S.updateMatrix(),c.material.uniforms.uvTransform.value.copy(S.matrix),(f!==S||h!==S.version||m!==t.toneMapping)&&(c.material.needsUpdate=!0,f=S,h=S.version,m=t.toneMapping),c.layers.enableAll(),_.unshift(c,c.geometry,c.material,0,0,null))}function g(_,x){_.getRGB(jw,JW(t)),r.buffers.color.setClear(jw.r,jw.g,jw.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(_,x=1){a.set(_),l=x,g(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(_){l=_,g(a,l)},render:w,addToRenderList:y}}function KCe(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),r={},i=h(null);let s=i,o=!1;function a(L,P,z,B,Y){let ie=!1;const ee=f(B,z,P);s!==ee&&(s=ee,c(s.object)),ie=m(L,B,z,Y),ie&&v(L,B,z,Y),Y!==null&&e.update(Y,t.ELEMENT_ARRAY_BUFFER),(ie||o)&&(o=!1,S(L,P,z,B),Y!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(Y).buffer))}function l(){return t.createVertexArray()}function c(L){return t.bindVertexArray(L)}function u(L){return t.deleteVertexArray(L)}function f(L,P,z){const B=z.wireframe===!0;let Y=r[L.id];Y===void 0&&(Y={},r[L.id]=Y);let ie=Y[P.id];ie===void 0&&(ie={},Y[P.id]=ie);let ee=ie[B];return ee===void 0&&(ee=h(l()),ie[B]=ee),ee}function h(L){const P=[],z=[],B=[];for(let Y=0;Y=0){const ne=Y[j];let de=ie[j];if(de===void 0&&(j==="instanceMatrix"&&L.instanceMatrix&&(de=L.instanceMatrix),j==="instanceColor"&&L.instanceColor&&(de=L.instanceColor)),ne===void 0||ne.attribute!==de||de&&ne.data!==de.data)return!0;ee++}return s.attributesNum!==ee||s.index!==B}function v(L,P,z,B){const Y={},ie=P.attributes;let ee=0;const le=z.getAttributes();for(const j in le)if(le[j].location>=0){let ne=ie[j];ne===void 0&&(j==="instanceMatrix"&&L.instanceMatrix&&(ne=L.instanceMatrix),j==="instanceColor"&&L.instanceColor&&(ne=L.instanceColor));const de={};de.attribute=ne,ne&&ne.data&&(de.data=ne.data),Y[j]=de,ee++}s.attributes=Y,s.attributesNum=ee,s.index=B}function w(){const L=s.newAttributes;for(let P=0,z=L.length;P=0){let q=Y[le];if(q===void 0&&(le==="instanceMatrix"&&L.instanceMatrix&&(q=L.instanceMatrix),le==="instanceColor"&&L.instanceColor&&(q=L.instanceColor)),q!==void 0){const ne=q.normalized,de=q.itemSize,_e=e.get(q);if(_e===void 0)continue;const ge=_e.buffer,ce=_e.type,we=_e.bytesPerElement,he=ce===t.INT||ce===t.UNSIGNED_INT||q.gpuType===kv;if(q.isInterleavedBufferAttribute){const Ie=q.data,et=Ie.stride,ct=q.offset;if(Ie.isInstancedInterleavedBuffer){for(let it=0;it0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";T="mediump"}return T==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=n.precision!==void 0?n.precision:"highp";const u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const f=n.logarithmicDepthBuffer===!0,h=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),m=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),v=t.getParameter(t.MAX_TEXTURE_SIZE),w=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),y=t.getParameter(t.MAX_VERTEX_ATTRIBS),g=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),_=t.getParameter(t.MAX_VARYING_VECTORS),x=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),S=m>0,D=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,maxTextures:h,maxVertexTextures:m,maxTextureSize:v,maxCubemapSize:w,maxAttributes:y,maxVertexUniforms:g,maxVaryings:_,maxFragmentUniforms:x,vertexTextures:S,maxSamples:D}}function eEe(t){const e=this;let n=null,r=0,i=!1,s=!1;const o=new Vc,a=new wn,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){const m=f.length!==0||h||r!==0||i;return i=h,r=f.length,m},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(f,h){n=u(f,h,0)},this.setState=function(f,h,m){const v=f.clippingPlanes,w=f.clipIntersection,y=f.clipShadows,g=t.get(f);if(!i||v===null||v.length===0||s&&!y)s?u(null):c();else{const _=s?0:r,x=_*4;let S=g.clippingState||null;l.value=S,S=u(v,h,x,m);for(let D=0;D!==x;++D)S[D]=n[D];g.clippingState=S,this.numIntersection=w?this.numPlanes:0,this.numPlanes+=_}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function u(f,h,m,v){const w=f!==null?f.length:0;let y=null;if(w!==0){if(y=l.value,v!==!0||y===null){const g=m+w*4,_=h.matrixWorldInverse;a.getNormalMatrix(_),(y===null||y.length0){const c=new ZR(l.height);return c.fromEquirectangularTexture(t,o),e.set(o,c),o.addEventListener("dispose",i),n(c.texture,o.mapping)}else return null}}return o}function i(o){const a=o.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:r,dispose:s}}class Jd extends Fv{constructor(e=-1,n=1,r=1,i=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=r,this.bottom=i,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,r,i,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let s=r-e,o=r+e,a=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const hp=4,d9=[.125,.215,.35,.446,.526,.582],Of=20,ZE=new Jd,h9=new Lt;let qE=null,eA=0,tA=0,nA=!1;const Df=(1+Math.sqrt(5))/2,Oh=1/Df,p9=[new Z(-Df,Oh,0),new Z(Df,Oh,0),new Z(-Oh,0,Df),new Z(Oh,0,Df),new Z(0,Df,-Oh),new Z(0,Df,Oh),new Z(-1,1,-1),new Z(1,1,-1),new Z(-1,1,1),new Z(1,1,1)];class zI{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,r=.1,i=100){qE=this._renderer.getRenderTarget(),eA=this._renderer.getActiveCubeFace(),tA=this._renderer.getActiveMipmapLevel(),nA=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,r,i,s),n>0&&this._blur(s,0,0,n),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=v9(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=g9(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?x:0,x,x),u.setRenderTarget(i),w&&u.render(v,a),u.render(e,a)}v.geometry.dispose(),v.material.dispose(),u.toneMapping=h,u.autoClear=f,e.background=y}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===gl||e.mapping===Au;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=v9()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=g9());const s=i?this._cubemapMaterial:this._equirectMaterial,o=new Cr(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;zw(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(o,ZE)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;const i=this._lodPlanes.length;for(let s=1;sOf&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${y} samples when the maximum is set to ${Of}`);const g=[];let _=0;for(let E=0;Ex-hp?i-x+hp:0),T=4*(this._cubeSize-S);zw(n,D,T,3*S,2*S),l.setRenderTarget(n),l.render(f,ZE)}}function nEe(t){const e=[],n=[],r=[];let i=t;const s=t-hp+1+d9.length;for(let o=0;ot-hp?l=d9[o-t+hp-1]:o===0&&(l=0),r.push(l);const c=1/(a-2),u=-c,f=1+c,h=[u,u,f,u,f,f,u,u,f,f,u,f],m=6,v=6,w=3,y=2,g=1,_=new Float32Array(w*v*m),x=new Float32Array(y*v*m),S=new Float32Array(g*v*m);for(let T=0;T2?0:-1,C=[E,R,0,E+2/3,R,0,E+2/3,R+1,0,E,R,0,E+2/3,R+1,0,E,R+1,0];_.set(C,w*v*T),x.set(h,y*v*T);const L=[T,T,T,T,T,T];S.set(L,g*v*T)}const D=new mn;D.setAttribute("position",new Qn(_,w)),D.setAttribute("uv",new Qn(x,y)),D.setAttribute("faceIndex",new Qn(S,g)),e.push(D),i>hp&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function m9(t,e,n){const r=new Zi(t,e,n);return r.texture.mapping=zm,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function zw(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function rEe(t,e,n){const r=new Float32Array(Of),i=new Z(0,1,0);return new qi({name:"SphericalGaussianBlur",defines:{n:Of,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:qR(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + } + `,blending:ul,depthTest:!1,depthWrite:!1})}function g9(){return new qi({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:qR(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `,blending:ul,depthTest:!1,depthWrite:!1})}function v9(){return new qi({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:qR(),fragmentShader:` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `,blending:ul,depthTest:!1,depthWrite:!1})}function qR(){return` + + precision mediump float; + precision mediump int; + + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `}function iEe(t){let e=new WeakMap,n=null;function r(a){if(a&&a.isTexture){const l=a.mapping,c=l===um||l===N1,u=l===gl||l===Au;if(c||u){let f=e.get(a);const h=f!==void 0?f.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==h)return n===null&&(n=new zI(t)),f=c?n.fromEquirectangular(a,f):n.fromCubemap(a,f),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),f.texture;if(f!==void 0)return f.texture;{const m=a.image;return c&&m&&m.height>0||u&&m&&i(m)?(n===null&&(n=new zI(t)),f=c?n.fromEquirectangular(a):n.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",s),f.texture):null}}}return a}function i(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(T=Math.ceil(D/e.maxTextureSize),D=e.maxTextureSize);const E=new Float32Array(D*T*4*f),R=new oS(E,D,T,f);R.type=Dr,R.needsUpdate=!0;const C=S*4;for(let P=0;P0)return t;const i=e*n;let s=w9[i];if(s===void 0&&(s=new Float32Array(i),w9[i]=s),e!==0){r.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=n,t[o].toArray(s,a)}return s}function Ii(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n":" "} ${a}: ${n[o]}`)}return r.join(` +`)}function iAe(t){const e=Zn.getPrimaries(Zn.workingColorSpace),n=Zn.getPrimaries(t);let r;switch(e===n?r="":e===U1&&n===O1?r="LinearDisplayP3ToLinearSRGB":e===O1&&n===U1&&(r="LinearSRGBToLinearDisplayP3"),t){case aa:case Uv:return[r,"LinearTransferOETF"];case ho:case sS:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[r,"LinearTransferOETF"]}}function E9(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const s=/ERROR: 0:(\d+)/.exec(i);if(s){const o=parseInt(s[1]);return n.toUpperCase()+` + +`+i+` + +`+rAe(t.getShaderSource(e),o)}else return i}function sAe(t,e){const n=iAe(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function oAe(t,e){let n;switch(e){case MW:n="Linear";break;case xW:n="Reinhard";break;case bW:n="OptimizedCineon";break;case BR:n="ACESFilmic";break;case CW:n="AgX";break;case EW:n="Neutral";break;case SW:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}const Hw=new Z;function aAe(){Zn.getLuminanceCoefficients(Hw);const t=Hw.x.toFixed(4),e=Hw.y.toFixed(4),n=Hw.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${t}, ${e}, ${n} );`," return dot( weights, rgb );","}"].join(` +`)}function lAe(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(vg).join(` +`)}function cAe(t){const e=[];for(const n in t){const r=t[n];r!==!1&&e.push("#define "+n+" "+r)}return e.join(` +`)}function uAe(t,e){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function HI(t){return t.replace(fAe,hAe)}const dAe=new Map;function hAe(t,e){let n=xn[e];if(n===void 0){const r=dAe.get(e);if(r!==void 0)n=xn[r],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include <"+e+">")}return HI(n)}const pAe=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function I9(t){return t.replace(pAe,mAe)}function mAe(t,e,n,r){let i="";for(let s=parseInt(e);s0&&(y+=` +`),g=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(vg).join(` +`),g.length>0&&(g+=` +`)):(y=[L9(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(vg).join(` +`),g=[L9(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+f:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==fl?"#define TONE_MAPPING":"",n.toneMapping!==fl?xn.tonemapping_pars_fragment:"",n.toneMapping!==fl?oAe("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",xn.colorspace_pars_fragment,sAe("linearToOutputTexel",n.outputColorSpace),aAe(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` +`].filter(vg).join(` +`)),o=HI(o),o=A9(o,n),o=T9(o,n),a=HI(a),a=A9(a,n),a=T9(a,n),o=I9(o),a=I9(a),n.isRawShaderMaterial!==!0&&(_=`#version 300 es +`,y=[m,"#define attribute in","#define varying out","#define texture2D texture"].join(` +`)+` +`+y,g=["#define varying in",n.glslVersion===jI?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===jI?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`)+` +`+g);const x=_+y+o,S=_+g+a,D=C9(i,i.VERTEX_SHADER,x),T=C9(i,i.FRAGMENT_SHADER,S);i.attachShader(w,D),i.attachShader(w,T),n.index0AttributeName!==void 0?i.bindAttribLocation(w,0,n.index0AttributeName):n.morphTargets===!0&&i.bindAttribLocation(w,0,"position"),i.linkProgram(w);function E(P){if(t.debug.checkShaderErrors){const z=i.getProgramInfoLog(w).trim(),B=i.getShaderInfoLog(D).trim(),Y=i.getShaderInfoLog(T).trim();let ie=!0,ee=!0;if(i.getProgramParameter(w,i.LINK_STATUS)===!1)if(ie=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(i,w,D,T);else{const le=E9(i,D,"vertex"),j=E9(i,T,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(w,i.VALIDATE_STATUS)+` + +Material Name: `+P.name+` +Material Type: `+P.type+` + +Program Info Log: `+z+` +`+le+` +`+j)}else z!==""?console.warn("THREE.WebGLProgram: Program Info Log:",z):(B===""||Y==="")&&(ee=!1);ee&&(P.diagnostics={runnable:ie,programLog:z,vertexShader:{log:B,prefix:y},fragmentShader:{log:Y,prefix:g}})}i.deleteShader(D),i.deleteShader(T),R=new q_(i,w),C=uAe(i,w)}let R;this.getUniforms=function(){return R===void 0&&E(this),R};let C;this.getAttributes=function(){return C===void 0&&E(this),C};let L=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return L===!1&&(L=i.getProgramParameter(w,tAe)),L},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(w),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=nAe++,this.cacheKey=e,this.usedTimes=1,this.program=w,this.vertexShader=D,this.fragmentShader=T,this}let xAe=0;class bAe{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),s=this._getShaderStage(r),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const r of n)r.usedTimes--,r.usedTimes===0&&this.shaderCache.delete(r.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let r=n.get(e);return r===void 0&&(r=new Set,n.set(e,r)),r}_getShaderStage(e){const n=this.shaderCache;let r=n.get(e);return r===void 0&&(r=new SAe(e),n.set(e,r)),r}}class SAe{constructor(e){this.id=xAe++,this.code=e,this.usedTimes=0}}function CAe(t,e,n,r,i,s,o){const a=new ld,l=new bAe,c=new Set,u=[],f=i.logarithmicDepthBuffer,h=i.vertexTextures;let m=i.precision;const v={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function w(C){return c.add(C),C===0?"uv":`uv${C}`}function y(C,L,P,z,B){const Y=z.fog,ie=B.geometry,ee=C.isMeshStandardMaterial?z.environment:null,le=(C.isMeshStandardMaterial?n:e).get(C.envMap||ee),j=le&&le.mapping===zm?le.image.height:null,q=v[C.type];C.precision!==null&&(m=i.getMaxPrecision(C.precision),m!==C.precision&&console.warn("THREE.WebGLProgram.getParameters:",C.precision,"not supported, using",m,"instead."));const ne=ie.morphAttributes.position||ie.morphAttributes.normal||ie.morphAttributes.color,de=ne!==void 0?ne.length:0;let _e=0;ie.morphAttributes.position!==void 0&&(_e=1),ie.morphAttributes.normal!==void 0&&(_e=2),ie.morphAttributes.color!==void 0&&(_e=3);let ge,ce,we,he;if(q){const rn=Ia[q];ge=rn.vertexShader,ce=rn.fragmentShader}else ge=C.vertexShader,ce=C.fragmentShader,l.update(C),we=l.getVertexShaderID(C),he=l.getFragmentShaderID(C);const Ie=t.getRenderTarget(),et=B.isInstancedMesh===!0,ct=B.isBatchedMesh===!0,it=!!C.map,ut=!!C.matcap,$=!!le,Ce=!!C.aoMap,Ne=!!C.lightMap,ze=!!C.bumpMap,Ue=!!C.normalMap,Et=!!C.displacementMap,lt=!!C.emissiveMap,yt=!!C.metalnessMap,re=!!C.roughnessMap,V=C.anisotropy>0,Ee=C.clearcoat>0,je=C.dispersion>0,De=C.iridescence>0,He=C.sheen>0,pt=C.transmission>0,Qe=V&&!!C.anisotropyMap,Ye=Ee&&!!C.clearcoatMap,Ke=Ee&&!!C.clearcoatNormalMap,nt=Ee&&!!C.clearcoatRoughnessMap,_t=De&&!!C.iridescenceMap,Qt=De&&!!C.iridescenceThicknessMap,We=He&&!!C.sheenColorMap,Ze=He&&!!C.sheenRoughnessMap,Tt=!!C.specularMap,Ft=!!C.specularColorMap,en=!!C.specularIntensityMap,pe=pt&&!!C.transmissionMap,st=pt&&!!C.thicknessMap,fe=!!C.gradientMap,Pe=!!C.alphaMap,rt=C.alphaTest>0,It=!!C.alphaHash,Le=!!C.extensions;let At=fl;C.toneMapped&&(Ie===null||Ie.isXRRenderTarget===!0)&&(At=t.toneMapping);const Jt={shaderID:q,shaderType:C.type,shaderName:C.name,vertexShader:ge,fragmentShader:ce,defines:C.defines,customVertexShaderID:we,customFragmentShaderID:he,isRawShaderMaterial:C.isRawShaderMaterial===!0,glslVersion:C.glslVersion,precision:m,batching:ct,batchingColor:ct&&B._colorsTexture!==null,instancing:et,instancingColor:et&&B.instanceColor!==null,instancingMorph:et&&B.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:Ie===null?t.outputColorSpace:Ie.isXRRenderTarget===!0?Ie.texture.colorSpace:aa,alphaToCoverage:!!C.alphaToCoverage,map:it,matcap:ut,envMap:$,envMapMode:$&&le.mapping,envMapCubeUVHeight:j,aoMap:Ce,lightMap:Ne,bumpMap:ze,normalMap:Ue,displacementMap:h&&Et,emissiveMap:lt,normalMapObjectSpace:Ue&&C.normalMapType===NW,normalMapTangentSpace:Ue&&C.normalMapType===Wu,metalnessMap:yt,roughnessMap:re,anisotropy:V,anisotropyMap:Qe,clearcoat:Ee,clearcoatMap:Ye,clearcoatNormalMap:Ke,clearcoatRoughnessMap:nt,dispersion:je,iridescence:De,iridescenceMap:_t,iridescenceThicknessMap:Qt,sheen:He,sheenColorMap:We,sheenRoughnessMap:Ze,specularMap:Tt,specularColorMap:Ft,specularIntensityMap:en,transmission:pt,transmissionMap:pe,thicknessMap:st,gradientMap:fe,opaque:C.transparent===!1&&C.blending===sd&&C.alphaToCoverage===!1,alphaMap:Pe,alphaTest:rt,alphaHash:It,combine:C.combine,mapUv:it&&w(C.map.channel),aoMapUv:Ce&&w(C.aoMap.channel),lightMapUv:Ne&&w(C.lightMap.channel),bumpMapUv:ze&&w(C.bumpMap.channel),normalMapUv:Ue&&w(C.normalMap.channel),displacementMapUv:Et&&w(C.displacementMap.channel),emissiveMapUv:lt&&w(C.emissiveMap.channel),metalnessMapUv:yt&&w(C.metalnessMap.channel),roughnessMapUv:re&&w(C.roughnessMap.channel),anisotropyMapUv:Qe&&w(C.anisotropyMap.channel),clearcoatMapUv:Ye&&w(C.clearcoatMap.channel),clearcoatNormalMapUv:Ke&&w(C.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:nt&&w(C.clearcoatRoughnessMap.channel),iridescenceMapUv:_t&&w(C.iridescenceMap.channel),iridescenceThicknessMapUv:Qt&&w(C.iridescenceThicknessMap.channel),sheenColorMapUv:We&&w(C.sheenColorMap.channel),sheenRoughnessMapUv:Ze&&w(C.sheenRoughnessMap.channel),specularMapUv:Tt&&w(C.specularMap.channel),specularColorMapUv:Ft&&w(C.specularColorMap.channel),specularIntensityMapUv:en&&w(C.specularIntensityMap.channel),transmissionMapUv:pe&&w(C.transmissionMap.channel),thicknessMapUv:st&&w(C.thicknessMap.channel),alphaMapUv:Pe&&w(C.alphaMap.channel),vertexTangents:!!ie.attributes.tangent&&(Ue||V),vertexColors:C.vertexColors,vertexAlphas:C.vertexColors===!0&&!!ie.attributes.color&&ie.attributes.color.itemSize===4,pointsUvs:B.isPoints===!0&&!!ie.attributes.uv&&(it||Pe),fog:!!Y,useFog:C.fog===!0,fogExp2:!!Y&&Y.isFogExp2,flatShading:C.flatShading===!0,sizeAttenuation:C.sizeAttenuation===!0,logarithmicDepthBuffer:f,skinning:B.isSkinnedMesh===!0,morphTargets:ie.morphAttributes.position!==void 0,morphNormals:ie.morphAttributes.normal!==void 0,morphColors:ie.morphAttributes.color!==void 0,morphTargetsCount:de,morphTextureStride:_e,numDirLights:L.directional.length,numPointLights:L.point.length,numSpotLights:L.spot.length,numSpotLightMaps:L.spotLightMap.length,numRectAreaLights:L.rectArea.length,numHemiLights:L.hemi.length,numDirLightShadows:L.directionalShadowMap.length,numPointLightShadows:L.pointShadowMap.length,numSpotLightShadows:L.spotShadowMap.length,numSpotLightShadowsWithMaps:L.numSpotLightShadowsWithMaps,numLightProbes:L.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:C.dithering,shadowMapEnabled:t.shadowMap.enabled&&P.length>0,shadowMapType:t.shadowMap.type,toneMapping:At,decodeVideoTexture:it&&C.map.isVideoTexture===!0&&Zn.getTransfer(C.map.colorSpace)===gr,premultipliedAlpha:C.premultipliedAlpha,doubleSided:C.side===Ko,flipSided:C.side===Os,useDepthPacking:C.depthPacking>=0,depthPacking:C.depthPacking||0,index0AttributeName:C.index0AttributeName,extensionClipCullDistance:Le&&C.extensions.clipCullDistance===!0&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Le&&C.extensions.multiDraw===!0||ct)&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:C.customProgramCacheKey()};return Jt.vertexUv1s=c.has(1),Jt.vertexUv2s=c.has(2),Jt.vertexUv3s=c.has(3),c.clear(),Jt}function g(C){const L=[];if(C.shaderID?L.push(C.shaderID):(L.push(C.customVertexShaderID),L.push(C.customFragmentShaderID)),C.defines!==void 0)for(const P in C.defines)L.push(P),L.push(C.defines[P]);return C.isRawShaderMaterial===!1&&(_(L,C),x(L,C),L.push(t.outputColorSpace)),L.push(C.customProgramCacheKey),L.join()}function _(C,L){C.push(L.precision),C.push(L.outputColorSpace),C.push(L.envMapMode),C.push(L.envMapCubeUVHeight),C.push(L.mapUv),C.push(L.alphaMapUv),C.push(L.lightMapUv),C.push(L.aoMapUv),C.push(L.bumpMapUv),C.push(L.normalMapUv),C.push(L.displacementMapUv),C.push(L.emissiveMapUv),C.push(L.metalnessMapUv),C.push(L.roughnessMapUv),C.push(L.anisotropyMapUv),C.push(L.clearcoatMapUv),C.push(L.clearcoatNormalMapUv),C.push(L.clearcoatRoughnessMapUv),C.push(L.iridescenceMapUv),C.push(L.iridescenceThicknessMapUv),C.push(L.sheenColorMapUv),C.push(L.sheenRoughnessMapUv),C.push(L.specularMapUv),C.push(L.specularColorMapUv),C.push(L.specularIntensityMapUv),C.push(L.transmissionMapUv),C.push(L.thicknessMapUv),C.push(L.combine),C.push(L.fogExp2),C.push(L.sizeAttenuation),C.push(L.morphTargetsCount),C.push(L.morphAttributeCount),C.push(L.numDirLights),C.push(L.numPointLights),C.push(L.numSpotLights),C.push(L.numSpotLightMaps),C.push(L.numHemiLights),C.push(L.numRectAreaLights),C.push(L.numDirLightShadows),C.push(L.numPointLightShadows),C.push(L.numSpotLightShadows),C.push(L.numSpotLightShadowsWithMaps),C.push(L.numLightProbes),C.push(L.shadowMapType),C.push(L.toneMapping),C.push(L.numClippingPlanes),C.push(L.numClipIntersection),C.push(L.depthPacking)}function x(C,L){a.disableAll(),L.supportsVertexTextures&&a.enable(0),L.instancing&&a.enable(1),L.instancingColor&&a.enable(2),L.instancingMorph&&a.enable(3),L.matcap&&a.enable(4),L.envMap&&a.enable(5),L.normalMapObjectSpace&&a.enable(6),L.normalMapTangentSpace&&a.enable(7),L.clearcoat&&a.enable(8),L.iridescence&&a.enable(9),L.alphaTest&&a.enable(10),L.vertexColors&&a.enable(11),L.vertexAlphas&&a.enable(12),L.vertexUv1s&&a.enable(13),L.vertexUv2s&&a.enable(14),L.vertexUv3s&&a.enable(15),L.vertexTangents&&a.enable(16),L.anisotropy&&a.enable(17),L.alphaHash&&a.enable(18),L.batching&&a.enable(19),L.dispersion&&a.enable(20),L.batchingColor&&a.enable(21),C.push(a.mask),a.disableAll(),L.fog&&a.enable(0),L.useFog&&a.enable(1),L.flatShading&&a.enable(2),L.logarithmicDepthBuffer&&a.enable(3),L.skinning&&a.enable(4),L.morphTargets&&a.enable(5),L.morphNormals&&a.enable(6),L.morphColors&&a.enable(7),L.premultipliedAlpha&&a.enable(8),L.shadowMapEnabled&&a.enable(9),L.doubleSided&&a.enable(10),L.flipSided&&a.enable(11),L.useDepthPacking&&a.enable(12),L.dithering&&a.enable(13),L.transmission&&a.enable(14),L.sheen&&a.enable(15),L.opaque&&a.enable(16),L.pointsUvs&&a.enable(17),L.decodeVideoTexture&&a.enable(18),L.alphaToCoverage&&a.enable(19),C.push(a.mask)}function S(C){const L=v[C.type];let P;if(L){const z=Ia[L];P=KR.clone(z.uniforms)}else P=C.uniforms;return P}function D(C,L){let P;for(let z=0,B=u.length;z0?r.push(g):m.transparent===!0?i.push(g):n.push(g)}function l(f,h,m,v,w,y){const g=o(f,h,m,v,w,y);m.transmission>0?r.unshift(g):m.transparent===!0?i.unshift(g):n.unshift(g)}function c(f,h){n.length>1&&n.sort(f||AAe),r.length>1&&r.sort(h||R9),i.length>1&&i.sort(h||R9)}function u(){for(let f=e,h=t.length;f=s.length?(o=new P9,s.push(o)):o=s[i],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function IAe(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new Z,color:new Lt};break;case"SpotLight":n={position:new Z,direction:new Z,color:new Lt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Z,color:new Lt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Z,skyColor:new Lt,groundColor:new Lt};break;case"RectAreaLight":n={color:new Lt,position:new Z,halfWidth:new Z,halfHeight:new Z};break}return t[e.id]=n,n}}}function LAe(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new tt};break;case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new tt};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new tt,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let RAe=0;function PAe(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function DAe(t){const e=new IAe,n=LAe(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)r.probe.push(new Z);const i=new Z,s=new Kt,o=new Kt;function a(c){let u=0,f=0,h=0;for(let C=0;C<9;C++)r.probe[C].set(0,0,0);let m=0,v=0,w=0,y=0,g=0,_=0,x=0,S=0,D=0,T=0,E=0;c.sort(PAe);for(let C=0,L=c.length;C0&&(t.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Dt.LTC_FLOAT_1,r.rectAreaLTC2=Dt.LTC_FLOAT_2):(r.rectAreaLTC1=Dt.LTC_HALF_1,r.rectAreaLTC2=Dt.LTC_HALF_2)),r.ambient[0]=u,r.ambient[1]=f,r.ambient[2]=h;const R=r.hash;(R.directionalLength!==m||R.pointLength!==v||R.spotLength!==w||R.rectAreaLength!==y||R.hemiLength!==g||R.numDirectionalShadows!==_||R.numPointShadows!==x||R.numSpotShadows!==S||R.numSpotMaps!==D||R.numLightProbes!==E)&&(r.directional.length=m,r.spot.length=w,r.rectArea.length=y,r.point.length=v,r.hemi.length=g,r.directionalShadow.length=_,r.directionalShadowMap.length=_,r.pointShadow.length=x,r.pointShadowMap.length=x,r.spotShadow.length=S,r.spotShadowMap.length=S,r.directionalShadowMatrix.length=_,r.pointShadowMatrix.length=x,r.spotLightMatrix.length=S+D-T,r.spotLightMap.length=D,r.numSpotLightShadowsWithMaps=T,r.numLightProbes=E,R.directionalLength=m,R.pointLength=v,R.spotLength=w,R.rectAreaLength=y,R.hemiLength=g,R.numDirectionalShadows=_,R.numPointShadows=x,R.numSpotShadows=S,R.numSpotMaps=D,R.numLightProbes=E,r.version=RAe++)}function l(c,u){let f=0,h=0,m=0,v=0,w=0;const y=u.matrixWorldInverse;for(let g=0,_=c.length;g<_;g++){const x=c[g];if(x.isDirectionalLight){const S=r.directional[f];S.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),S.direction.sub(i),S.direction.transformDirection(y),f++}else if(x.isSpotLight){const S=r.spot[m];S.position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(y),S.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),S.direction.sub(i),S.direction.transformDirection(y),m++}else if(x.isRectAreaLight){const S=r.rectArea[v];S.position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(y),o.identity(),s.copy(x.matrixWorld),s.premultiply(y),o.extractRotation(s),S.halfWidth.set(x.width*.5,0,0),S.halfHeight.set(0,x.height*.5,0),S.halfWidth.applyMatrix4(o),S.halfHeight.applyMatrix4(o),v++}else if(x.isPointLight){const S=r.point[h];S.position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(y),h++}else if(x.isHemisphereLight){const S=r.hemi[w];S.direction.setFromMatrixPosition(x.matrixWorld),S.direction.transformDirection(y),w++}}}return{setup:a,setupView:l,state:r}}function D9(t){const e=new DAe(t),n=[],r=[];function i(u){c.camera=u,n.length=0,r.length=0}function s(u){n.push(u)}function o(u){r.push(u)}function a(){e.setup(n)}function l(u){e.setupView(n,u)}const c={lightsArray:n,shadowsArray:r,camera:null,lights:e,transmissionRenderTarget:{}};return{init:i,state:c,setupLights:a,setupLightsView:l,pushLight:s,pushShadow:o}}function NAe(t){let e=new WeakMap;function n(i,s=0){const o=e.get(i);let a;return o===void 0?(a=new D9(t),e.set(i,[a])):s>=o.length?(a=new D9(t),o.push(a)):a=o[s],a}function r(){e=new WeakMap}return{get:n,dispose:r}}class lS extends Mi{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=PW,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class tP extends Mi{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const kAe=`void main() { + gl_Position = vec4( position, 1.0 ); +}`,BAe=`uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; +#include +void main() { + const float samples = float( VSM_SAMPLES ); + float mean = 0.0; + float squared_mean = 0.0; + float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); + float uvStart = samples <= 1.0 ? 0.0 : - 1.0; + for ( float i = 0.0; i < samples; i ++ ) { + float uvOffset = uvStart + i * uvStride; + #ifdef HORIZONTAL_PASS + vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + #else + float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); + mean += depth; + squared_mean += depth * depth; + #endif + } + mean = mean / samples; + squared_mean = squared_mean / samples; + float std_dev = sqrt( squared_mean - mean * mean ); + gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); +}`;function OAe(t,e,n){let r=new zv;const i=new tt,s=new tt,o=new or,a=new lS({depthPacking:DW}),l=new tP,c={},u=n.maxTextureSize,f={[ml]:Os,[Os]:ml,[Ko]:Ko},h=new qi({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new tt},radius:{value:4}},vertexShader:kAe,fragmentShader:BAe}),m=h.clone();m.defines.HORIZONTAL_PASS=1;const v=new mn;v.setAttribute("position",new Qn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const w=new Cr(v,h),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=X2;let g=this.type;this.render=function(T,E,R){if(y.enabled===!1||y.autoUpdate===!1&&y.needsUpdate===!1||T.length===0)return;const C=t.getRenderTarget(),L=t.getActiveCubeFace(),P=t.getActiveMipmapLevel(),z=t.state;z.setBlending(ul),z.buffers.color.setClear(1,1,1,1),z.buffers.depth.setTest(!0),z.setScissorTest(!1);const B=g!==Sa&&this.type===Sa,Y=g===Sa&&this.type!==Sa;for(let ie=0,ee=T.length;ieu||i.y>u)&&(i.x>u&&(s.x=Math.floor(u/q.x),i.x=s.x*q.x,j.mapSize.x=s.x),i.y>u&&(s.y=Math.floor(u/q.y),i.y=s.y*q.y,j.mapSize.y=s.y)),j.map===null||B===!0||Y===!0){const de=this.type!==Sa?{minFilter:ei,magFilter:ei}:{};j.map!==null&&j.map.dispose(),j.map=new Zi(i.x,i.y,de),j.map.texture.name=le.name+".shadowMap",j.camera.updateProjectionMatrix()}t.setRenderTarget(j.map),t.clear();const ne=j.getViewportCount();for(let de=0;de0||E.map&&E.alphaTest>0){const z=L.uuid,B=E.uuid;let Y=c[z];Y===void 0&&(Y={},c[z]=Y);let ie=Y[B];ie===void 0&&(ie=L.clone(),Y[B]=ie,E.addEventListener("dispose",D)),L=ie}if(L.visible=E.visible,L.wireframe=E.wireframe,C===Sa?L.side=E.shadowSide!==null?E.shadowSide:E.side:L.side=E.shadowSide!==null?E.shadowSide:f[E.side],L.alphaMap=E.alphaMap,L.alphaTest=E.alphaTest,L.map=E.map,L.clipShadows=E.clipShadows,L.clippingPlanes=E.clippingPlanes,L.clipIntersection=E.clipIntersection,L.displacementMap=E.displacementMap,L.displacementScale=E.displacementScale,L.displacementBias=E.displacementBias,L.wireframeLinewidth=E.wireframeLinewidth,L.linewidth=E.linewidth,R.isPointLight===!0&&L.isMeshDistanceMaterial===!0){const z=t.properties.get(L);z.light=R}return L}function S(T,E,R,C,L){if(T.visible===!1)return;if(T.layers.test(E.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&L===Sa)&&(!T.frustumCulled||r.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(R.matrixWorldInverse,T.matrixWorld);const B=e.update(T),Y=T.material;if(Array.isArray(Y)){const ie=B.groups;for(let ee=0,le=ie.length;ee=1):le.indexOf("OpenGL ES")!==-1&&(ee=parseFloat(/^OpenGL ES (\d)/.exec(le)[1]),ie=ee>=2);let j=null,q={};const ne=t.getParameter(t.SCISSOR_BOX),de=t.getParameter(t.VIEWPORT),_e=new or().fromArray(ne),ge=new or().fromArray(de);function ce(pe,st,fe,Pe){const rt=new Uint8Array(4),It=t.createTexture();t.bindTexture(pe,It),t.texParameteri(pe,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(pe,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Le=0;Lee?(t.repeat.x=1,t.repeat.y=n/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2):(t.repeat.x=e/n,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0),t}function jAe(t,e){const n=t.image&&t.image.width?t.image.width/t.image.height:1;return n>e?(t.repeat.x=e/n,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0):(t.repeat.x=1,t.repeat.y=n/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2),t}function zAe(t){return t.repeat.x=1,t.repeat.y=1,t.offset.x=0,t.offset.y=0,t}function GI(t,e,n,r){const i=HAe(r);switch(n){case UR:return t*e;case jR:return t*e;case zR:return t*e*2;case Bv:return t*e/i.components*i.byteLength;case Ov:return t*e/i.components*i.byteLength;case HR:return t*e*2/i.components*i.byteLength;case nS:return t*e*2/i.components*i.byteLength;case FR:return t*e*3/i.components*i.byteLength;case ti:return t*e*4/i.components*i.byteLength;case rS:return t*e*4/i.components*i.byteLength;case jg:case zg:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Hg:case Gg:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case mx:case vx:return Math.max(t,16)*Math.max(e,8)/4;case px:case gx:return Math.max(t,8)*Math.max(e,8)/2;case yx:case wx:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case _x:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case Mx:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case xx:return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16;case bx:return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16;case Sx:return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16;case Cx:return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16;case Ex:return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16;case Ax:return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16;case Tx:return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16;case Ix:return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16;case Lx:return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16;case Rx:return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16;case Px:return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16;case Dx:return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16;case Nx:return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16;case Vg:case kx:case Bx:return Math.ceil(t/4)*Math.ceil(e/4)*16;case GR:case Ox:return Math.ceil(t/4)*Math.ceil(e/4)*8;case Ux:case Fx:return Math.ceil(t/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}function HAe(t){switch(t){case qs:case Z2:return{byteLength:1,components:1};case dm:case q2:case Ai:return{byteLength:2,components:1};case eS:case tS:return{byteLength:2,components:4};case vl:case kv:case Dr:return{byteLength:4,components:1};case OR:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${t}.`)}const GAe={contain:FAe,cover:jAe,fill:zAe,getByteLength:GI};function VAe(t,e,n,r,i,s,o){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new tt,u=new WeakMap;let f;const h=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(re,V){return m?new OffscreenCanvas(re,V):z1("canvas")}function w(re,V,Ee){let je=1;const De=yt(re);if((De.width>Ee||De.height>Ee)&&(je=Ee/Math.max(De.width,De.height)),je<1)if(typeof HTMLImageElement<"u"&&re instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&re instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&re instanceof ImageBitmap||typeof VideoFrame<"u"&&re instanceof VideoFrame){const He=Math.floor(je*De.width),pt=Math.floor(je*De.height);f===void 0&&(f=v(He,pt));const Qe=V?v(He,pt):f;return Qe.width=He,Qe.height=pt,Qe.getContext("2d").drawImage(re,0,0,He,pt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+He+"x"+pt+")."),Qe}else return"data"in re&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),re;return re}function y(re){return re.generateMipmaps&&re.minFilter!==ei&&re.minFilter!==qn}function g(re){t.generateMipmap(re)}function _(re,V,Ee,je,De=!1){if(re!==null){if(t[re]!==void 0)return t[re];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+re+"'")}let He=V;if(V===t.RED&&(Ee===t.FLOAT&&(He=t.R32F),Ee===t.HALF_FLOAT&&(He=t.R16F),Ee===t.UNSIGNED_BYTE&&(He=t.R8)),V===t.RED_INTEGER&&(Ee===t.UNSIGNED_BYTE&&(He=t.R8UI),Ee===t.UNSIGNED_SHORT&&(He=t.R16UI),Ee===t.UNSIGNED_INT&&(He=t.R32UI),Ee===t.BYTE&&(He=t.R8I),Ee===t.SHORT&&(He=t.R16I),Ee===t.INT&&(He=t.R32I)),V===t.RG&&(Ee===t.FLOAT&&(He=t.RG32F),Ee===t.HALF_FLOAT&&(He=t.RG16F),Ee===t.UNSIGNED_BYTE&&(He=t.RG8)),V===t.RG_INTEGER&&(Ee===t.UNSIGNED_BYTE&&(He=t.RG8UI),Ee===t.UNSIGNED_SHORT&&(He=t.RG16UI),Ee===t.UNSIGNED_INT&&(He=t.RG32UI),Ee===t.BYTE&&(He=t.RG8I),Ee===t.SHORT&&(He=t.RG16I),Ee===t.INT&&(He=t.RG32I)),V===t.RGB&&Ee===t.UNSIGNED_INT_5_9_9_9_REV&&(He=t.RGB9_E5),V===t.RGBA){const pt=De?B1:Zn.getTransfer(je);Ee===t.FLOAT&&(He=t.RGBA32F),Ee===t.HALF_FLOAT&&(He=t.RGBA16F),Ee===t.UNSIGNED_BYTE&&(He=pt===gr?t.SRGB8_ALPHA8:t.RGBA8),Ee===t.UNSIGNED_SHORT_4_4_4_4&&(He=t.RGBA4),Ee===t.UNSIGNED_SHORT_5_5_5_1&&(He=t.RGB5_A1)}return(He===t.R16F||He===t.R32F||He===t.RG16F||He===t.RG32F||He===t.RGBA16F||He===t.RGBA32F)&&e.get("EXT_color_buffer_float"),He}function x(re,V){let Ee;return re?V===null||V===vl||V===Ed?Ee=t.DEPTH24_STENCIL8:V===Dr?Ee=t.DEPTH32F_STENCIL8:V===dm&&(Ee=t.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):V===null||V===vl||V===Ed?Ee=t.DEPTH_COMPONENT24:V===Dr?Ee=t.DEPTH_COMPONENT32F:V===dm&&(Ee=t.DEPTH_COMPONENT16),Ee}function S(re,V){return y(re)===!0||re.isFramebufferTexture&&re.minFilter!==ei&&re.minFilter!==qn?Math.log2(Math.max(V.width,V.height))+1:re.mipmaps!==void 0&&re.mipmaps.length>0?re.mipmaps.length:re.isCompressedTexture&&Array.isArray(re.image)?V.mipmaps.length:1}function D(re){const V=re.target;V.removeEventListener("dispose",D),E(V),V.isVideoTexture&&u.delete(V)}function T(re){const V=re.target;V.removeEventListener("dispose",T),C(V)}function E(re){const V=r.get(re);if(V.__webglInit===void 0)return;const Ee=re.source,je=h.get(Ee);if(je){const De=je[V.__cacheKey];De.usedTimes--,De.usedTimes===0&&R(re),Object.keys(je).length===0&&h.delete(Ee)}r.remove(re)}function R(re){const V=r.get(re);t.deleteTexture(V.__webglTexture);const Ee=re.source,je=h.get(Ee);delete je[V.__cacheKey],o.memory.textures--}function C(re){const V=r.get(re);if(re.depthTexture&&re.depthTexture.dispose(),re.isWebGLCubeRenderTarget)for(let je=0;je<6;je++){if(Array.isArray(V.__webglFramebuffer[je]))for(let De=0;De=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+re+" texture units while this GPU supports only "+i.maxTextures),L+=1,re}function B(re){const V=[];return V.push(re.wrapS),V.push(re.wrapT),V.push(re.wrapR||0),V.push(re.magFilter),V.push(re.minFilter),V.push(re.anisotropy),V.push(re.internalFormat),V.push(re.format),V.push(re.type),V.push(re.generateMipmaps),V.push(re.premultiplyAlpha),V.push(re.flipY),V.push(re.unpackAlignment),V.push(re.colorSpace),V.join()}function Y(re,V){const Ee=r.get(re);if(re.isVideoTexture&&Et(re),re.isRenderTargetTexture===!1&&re.version>0&&Ee.__version!==re.version){const je=re.image;if(je===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(je.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ge(Ee,re,V);return}}n.bindTexture(t.TEXTURE_2D,Ee.__webglTexture,t.TEXTURE0+V)}function ie(re,V){const Ee=r.get(re);if(re.version>0&&Ee.__version!==re.version){ge(Ee,re,V);return}n.bindTexture(t.TEXTURE_2D_ARRAY,Ee.__webglTexture,t.TEXTURE0+V)}function ee(re,V){const Ee=r.get(re);if(re.version>0&&Ee.__version!==re.version){ge(Ee,re,V);return}n.bindTexture(t.TEXTURE_3D,Ee.__webglTexture,t.TEXTURE0+V)}function le(re,V){const Ee=r.get(re);if(re.version>0&&Ee.__version!==re.version){ce(Ee,re,V);return}n.bindTexture(t.TEXTURE_CUBE_MAP,Ee.__webglTexture,t.TEXTURE0+V)}const j={[Tu]:t.REPEAT,[qr]:t.CLAMP_TO_EDGE,[fm]:t.MIRRORED_REPEAT},q={[ei]:t.NEAREST,[K2]:t.NEAREST_MIPMAP_NEAREST,[$f]:t.NEAREST_MIPMAP_LINEAR,[qn]:t.LINEAR,[Rp]:t.LINEAR_MIPMAP_NEAREST,[ta]:t.LINEAR_MIPMAP_LINEAR},ne={[kW]:t.NEVER,[zW]:t.ALWAYS,[BW]:t.LESS,[$R]:t.LEQUAL,[OW]:t.EQUAL,[jW]:t.GEQUAL,[UW]:t.GREATER,[FW]:t.NOTEQUAL};function de(re,V){if(V.type===Dr&&e.has("OES_texture_float_linear")===!1&&(V.magFilter===qn||V.magFilter===Rp||V.magFilter===$f||V.magFilter===ta||V.minFilter===qn||V.minFilter===Rp||V.minFilter===$f||V.minFilter===ta)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(re,t.TEXTURE_WRAP_S,j[V.wrapS]),t.texParameteri(re,t.TEXTURE_WRAP_T,j[V.wrapT]),(re===t.TEXTURE_3D||re===t.TEXTURE_2D_ARRAY)&&t.texParameteri(re,t.TEXTURE_WRAP_R,j[V.wrapR]),t.texParameteri(re,t.TEXTURE_MAG_FILTER,q[V.magFilter]),t.texParameteri(re,t.TEXTURE_MIN_FILTER,q[V.minFilter]),V.compareFunction&&(t.texParameteri(re,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(re,t.TEXTURE_COMPARE_FUNC,ne[V.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(V.magFilter===ei||V.minFilter!==$f&&V.minFilter!==ta||V.type===Dr&&e.has("OES_texture_float_linear")===!1)return;if(V.anisotropy>1||r.get(V).__currentAnisotropy){const Ee=e.get("EXT_texture_filter_anisotropic");t.texParameterf(re,Ee.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(V.anisotropy,i.getMaxAnisotropy())),r.get(V).__currentAnisotropy=V.anisotropy}}}function _e(re,V){let Ee=!1;re.__webglInit===void 0&&(re.__webglInit=!0,V.addEventListener("dispose",D));const je=V.source;let De=h.get(je);De===void 0&&(De={},h.set(je,De));const He=B(V);if(He!==re.__cacheKey){De[He]===void 0&&(De[He]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,Ee=!0),De[He].usedTimes++;const pt=De[re.__cacheKey];pt!==void 0&&(De[re.__cacheKey].usedTimes--,pt.usedTimes===0&&R(V)),re.__cacheKey=He,re.__webglTexture=De[He].texture}return Ee}function ge(re,V,Ee){let je=t.TEXTURE_2D;(V.isDataArrayTexture||V.isCompressedArrayTexture)&&(je=t.TEXTURE_2D_ARRAY),V.isData3DTexture&&(je=t.TEXTURE_3D);const De=_e(re,V),He=V.source;n.bindTexture(je,re.__webglTexture,t.TEXTURE0+Ee);const pt=r.get(He);if(He.version!==pt.__version||De===!0){n.activeTexture(t.TEXTURE0+Ee);const Qe=Zn.getPrimaries(Zn.workingColorSpace),Ye=V.colorSpace===Gl?null:Zn.getPrimaries(V.colorSpace),Ke=V.colorSpace===Gl||Qe===Ye?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,V.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,V.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,V.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ke);let nt=w(V.image,!1,i.maxTextureSize);nt=lt(V,nt);const _t=s.convert(V.format,V.colorSpace),Qt=s.convert(V.type);let We=_(V.internalFormat,_t,Qt,V.colorSpace,V.isVideoTexture);de(je,V);let Ze;const Tt=V.mipmaps,Ft=V.isVideoTexture!==!0,en=pt.__version===void 0||De===!0,pe=He.dataReady,st=S(V,nt);if(V.isDepthTexture)We=x(V.format===Ad,V.type),en&&(Ft?n.texStorage2D(t.TEXTURE_2D,1,We,nt.width,nt.height):n.texImage2D(t.TEXTURE_2D,0,We,nt.width,nt.height,0,_t,Qt,null));else if(V.isDataTexture)if(Tt.length>0){Ft&&en&&n.texStorage2D(t.TEXTURE_2D,st,We,Tt[0].width,Tt[0].height);for(let fe=0,Pe=Tt.length;fe0){const rt=GI(Ze.width,Ze.height,V.format,V.type);for(const It of V.layerUpdates){const Le=Ze.data.subarray(It*rt/Ze.data.BYTES_PER_ELEMENT,(It+1)*rt/Ze.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,fe,0,0,It,Ze.width,Ze.height,1,_t,Le,0,0)}V.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,fe,0,0,0,Ze.width,Ze.height,nt.depth,_t,Ze.data,0,0)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,fe,We,Ze.width,Ze.height,nt.depth,0,Ze.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Ft?pe&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,fe,0,0,0,Ze.width,Ze.height,nt.depth,_t,Qt,Ze.data):n.texImage3D(t.TEXTURE_2D_ARRAY,fe,We,Ze.width,Ze.height,nt.depth,0,_t,Qt,Ze.data)}else{Ft&&en&&n.texStorage2D(t.TEXTURE_2D,st,We,Tt[0].width,Tt[0].height);for(let fe=0,Pe=Tt.length;fe0){const fe=GI(nt.width,nt.height,V.format,V.type);for(const Pe of V.layerUpdates){const rt=nt.data.subarray(Pe*fe/nt.data.BYTES_PER_ELEMENT,(Pe+1)*fe/nt.data.BYTES_PER_ELEMENT);n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,Pe,nt.width,nt.height,1,_t,Qt,rt)}V.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,nt.width,nt.height,nt.depth,_t,Qt,nt.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,We,nt.width,nt.height,nt.depth,0,_t,Qt,nt.data);else if(V.isData3DTexture)Ft?(en&&n.texStorage3D(t.TEXTURE_3D,st,We,nt.width,nt.height,nt.depth),pe&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,nt.width,nt.height,nt.depth,_t,Qt,nt.data)):n.texImage3D(t.TEXTURE_3D,0,We,nt.width,nt.height,nt.depth,0,_t,Qt,nt.data);else if(V.isFramebufferTexture){if(en)if(Ft)n.texStorage2D(t.TEXTURE_2D,st,We,nt.width,nt.height);else{let fe=nt.width,Pe=nt.height;for(let rt=0;rt>=1,Pe>>=1}}else if(Tt.length>0){if(Ft&&en){const fe=yt(Tt[0]);n.texStorage2D(t.TEXTURE_2D,st,We,fe.width,fe.height)}for(let fe=0,Pe=Tt.length;fe0&&st++;const Pe=yt(_t[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,st,Tt,Pe.width,Pe.height)}for(let Pe=0;Pe<6;Pe++)if(nt){Ft?pe&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,0,0,_t[Pe].width,_t[Pe].height,We,Ze,_t[Pe].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,Tt,_t[Pe].width,_t[Pe].height,0,We,Ze,_t[Pe].data);for(let rt=0;rt>He),_t=Math.max(1,V.height>>He);De===t.TEXTURE_3D||De===t.TEXTURE_2D_ARRAY?n.texImage3D(De,He,Ye,nt,_t,V.depth,0,pt,Qe,null):n.texImage2D(De,He,Ye,nt,_t,0,pt,Qe,null)}n.bindFramebuffer(t.FRAMEBUFFER,re),Ue(V)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,je,De,r.get(Ee).__webglTexture,0,ze(V)):(De===t.TEXTURE_2D||De>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,je,De,r.get(Ee).__webglTexture,He),n.bindFramebuffer(t.FRAMEBUFFER,null)}function he(re,V,Ee){if(t.bindRenderbuffer(t.RENDERBUFFER,re),V.depthBuffer){const je=V.depthTexture,De=je&&je.isDepthTexture?je.type:null,He=x(V.stencilBuffer,De),pt=V.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Qe=ze(V);Ue(V)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Qe,He,V.width,V.height):Ee?t.renderbufferStorageMultisample(t.RENDERBUFFER,Qe,He,V.width,V.height):t.renderbufferStorage(t.RENDERBUFFER,He,V.width,V.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,pt,t.RENDERBUFFER,re)}else{const je=V.textures;for(let De=0;De1;if(pt||(je.__webglTexture===void 0&&(je.__webglTexture=t.createTexture()),je.__version=V.version,o.memory.textures++),He){Ee.__webglFramebuffer=[];for(let Qe=0;Qe<6;Qe++)if(V.mipmaps&&V.mipmaps.length>0){Ee.__webglFramebuffer[Qe]=[];for(let Ye=0;Ye0){Ee.__webglFramebuffer=[];for(let Qe=0;Qe0&&Ue(re)===!1){Ee.__webglMultisampledFramebuffer=t.createFramebuffer(),Ee.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,Ee.__webglMultisampledFramebuffer);for(let Qe=0;Qe0)for(let Ye=0;Ye0)for(let Ye=0;Ye0){if(Ue(re)===!1){const V=re.textures,Ee=re.width,je=re.height;let De=t.COLOR_BUFFER_BIT;const He=re.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,pt=r.get(re),Qe=V.length>1;if(Qe)for(let Ye=0;Ye0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&V.__useRenderToTexture!==!1}function Et(re){const V=o.render.frame;u.get(re)!==V&&(u.set(re,V),re.update())}function lt(re,V){const Ee=re.colorSpace,je=re.format,De=re.type;return re.isCompressedTexture===!0||re.isVideoTexture===!0||Ee!==aa&&Ee!==Gl&&(Zn.getTransfer(Ee)===gr?(je!==ti||De!==qs)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Ee)),V}function yt(re){return typeof HTMLImageElement<"u"&&re instanceof HTMLImageElement?(c.width=re.naturalWidth||re.width,c.height=re.naturalHeight||re.height):typeof VideoFrame<"u"&&re instanceof VideoFrame?(c.width=re.displayWidth,c.height=re.displayHeight):(c.width=re.width,c.height=re.height),c}this.allocateTextureUnit=z,this.resetTextureUnits=P,this.setTexture2D=Y,this.setTexture2DArray=ie,this.setTexture3D=ee,this.setTextureCube=le,this.rebindTextures=ct,this.setupRenderTarget=it,this.updateRenderTargetMipmap=ut,this.updateMultisampleRenderTarget=Ne,this.setupDepthRenderbuffer=et,this.setupFrameBufferTexture=we,this.useMultisampledRTT=Ue}function e$(t,e){function n(r,i=Gl){let s;const o=Zn.getTransfer(i);if(r===qs)return t.UNSIGNED_BYTE;if(r===eS)return t.UNSIGNED_SHORT_4_4_4_4;if(r===tS)return t.UNSIGNED_SHORT_5_5_5_1;if(r===OR)return t.UNSIGNED_INT_5_9_9_9_REV;if(r===Z2)return t.BYTE;if(r===q2)return t.SHORT;if(r===dm)return t.UNSIGNED_SHORT;if(r===kv)return t.INT;if(r===vl)return t.UNSIGNED_INT;if(r===Dr)return t.FLOAT;if(r===Ai)return t.HALF_FLOAT;if(r===UR)return t.ALPHA;if(r===FR)return t.RGB;if(r===ti)return t.RGBA;if(r===jR)return t.LUMINANCE;if(r===zR)return t.LUMINANCE_ALPHA;if(r===od)return t.DEPTH_COMPONENT;if(r===Ad)return t.DEPTH_STENCIL;if(r===Bv)return t.RED;if(r===Ov)return t.RED_INTEGER;if(r===HR)return t.RG;if(r===nS)return t.RG_INTEGER;if(r===rS)return t.RGBA_INTEGER;if(r===jg||r===zg||r===Hg||r===Gg)if(o===gr)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(r===jg)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===zg)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===Hg)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===Gg)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(r===jg)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===zg)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===Hg)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===Gg)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===px||r===mx||r===gx||r===vx)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(r===px)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===mx)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===gx)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===vx)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===yx||r===wx||r===_x)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(r===yx||r===wx)return o===gr?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(r===_x)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===Mx||r===xx||r===bx||r===Sx||r===Cx||r===Ex||r===Ax||r===Tx||r===Ix||r===Lx||r===Rx||r===Px||r===Dx||r===Nx)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(r===Mx)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===xx)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===bx)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===Sx)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===Cx)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===Ex)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===Ax)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===Tx)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===Ix)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===Lx)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===Rx)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===Px)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===Dx)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===Nx)return o===gr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Vg||r===kx||r===Bx)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(r===Vg)return o===gr?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===kx)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===Bx)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===GR||r===Ox||r===Ux||r===Fx)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(r===Vg)return s.COMPRESSED_RED_RGTC1_EXT;if(r===Ox)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===Ux)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===Fx)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===Ed?t.UNSIGNED_INT_24_8:t[r]!==void 0?t[r]:null}return{convert:n}}class t$ extends Ci{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Xl extends Vn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const WAe={type:"move"};class iA{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Xl,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Xl,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Z,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Z),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Xl,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Z,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Z),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const r of e.hand.values())this._getHandJoint(n,r)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,r){let i=null,s=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const w of e.hand.values()){const y=n.getJointPose(w,r),g=this._getHandJoint(c,w);y!==null&&(g.matrix.fromArray(y.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=y.radius),g.visible=y!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],h=u.position.distanceTo(f.position),m=.02,v=.005;c.inputState.pinching&&h>m+v?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=m-v&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=n.getPose(e.gripSpace,r),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&s!==null&&(i=s),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(WAe)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new Xl;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}const $Ae=` +void main() { + + gl_Position = vec4( position, 1.0 ); + +}`,JAe=` +uniform sampler2DArray depthColor; +uniform float depthWidth; +uniform float depthHeight; + +void main() { + + vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); + + if ( coord.x >= 1.0 ) { + + gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; + + } else { + + gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; + + } + +}`;class YAe{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,n,r){if(this.texture===null){const i=new er,s=e.properties.get(i);s.__webglTexture=n.texture,(n.depthNear!=r.depthNear||n.depthFar!=r.depthFar)&&(this.depthNear=n.depthNear,this.depthFar=n.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){const n=e.cameras[0].viewport,r=new qi({vertexShader:$Ae,fragmentShader:JAe,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new Cr(new vc(20,20),r)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class QAe extends gc{constructor(e,n){super();const r=this;let i=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,f=null,h=null,m=null,v=null;const w=new YAe,y=n.getContextAttributes();let g=null,_=null;const x=[],S=[],D=new tt;let T=null;const E=new Ci;E.layers.enable(1),E.viewport=new or;const R=new Ci;R.layers.enable(2),R.viewport=new or;const C=[E,R],L=new t$;L.layers.enable(1),L.layers.enable(2);let P=null,z=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ce){let we=x[ce];return we===void 0&&(we=new iA,x[ce]=we),we.getTargetRaySpace()},this.getControllerGrip=function(ce){let we=x[ce];return we===void 0&&(we=new iA,x[ce]=we),we.getGripSpace()},this.getHand=function(ce){let we=x[ce];return we===void 0&&(we=new iA,x[ce]=we),we.getHandSpace()};function B(ce){const we=S.indexOf(ce.inputSource);if(we===-1)return;const he=x[we];he!==void 0&&(he.update(ce.inputSource,ce.frame,c||o),he.dispatchEvent({type:ce.type,data:ce.inputSource}))}function Y(){i.removeEventListener("select",B),i.removeEventListener("selectstart",B),i.removeEventListener("selectend",B),i.removeEventListener("squeeze",B),i.removeEventListener("squeezestart",B),i.removeEventListener("squeezeend",B),i.removeEventListener("end",Y),i.removeEventListener("inputsourceschange",ie);for(let ce=0;ce=0&&(S[Ie]=null,x[Ie].disconnect(he))}for(let we=0;we=S.length){S.push(he),Ie=ct;break}else if(S[ct]===null){S[ct]=he,Ie=ct;break}if(Ie===-1)break}const et=x[Ie];et&&et.connect(he)}}const ee=new Z,le=new Z;function j(ce,we,he){ee.setFromMatrixPosition(we.matrixWorld),le.setFromMatrixPosition(he.matrixWorld);const Ie=ee.distanceTo(le),et=we.projectionMatrix.elements,ct=he.projectionMatrix.elements,it=et[14]/(et[10]-1),ut=et[14]/(et[10]+1),$=(et[9]+1)/et[5],Ce=(et[9]-1)/et[5],Ne=(et[8]-1)/et[0],ze=(ct[8]+1)/ct[0],Ue=it*Ne,Et=it*ze,lt=Ie/(-Ne+ze),yt=lt*-Ne;we.matrixWorld.decompose(ce.position,ce.quaternion,ce.scale),ce.translateX(yt),ce.translateZ(lt),ce.matrixWorld.compose(ce.position,ce.quaternion,ce.scale),ce.matrixWorldInverse.copy(ce.matrixWorld).invert();const re=it+lt,V=ut+lt,Ee=Ue-yt,je=Et+(Ie-yt),De=$*ut/V*re,He=Ce*ut/V*re;ce.projectionMatrix.makePerspective(Ee,je,De,He,re,V),ce.projectionMatrixInverse.copy(ce.projectionMatrix).invert()}function q(ce,we){we===null?ce.matrixWorld.copy(ce.matrix):ce.matrixWorld.multiplyMatrices(we.matrixWorld,ce.matrix),ce.matrixWorldInverse.copy(ce.matrixWorld).invert()}this.updateCamera=function(ce){if(i===null)return;w.texture!==null&&(ce.near=w.depthNear,ce.far=w.depthFar),L.near=R.near=E.near=ce.near,L.far=R.far=E.far=ce.far,(P!==L.near||z!==L.far)&&(i.updateRenderState({depthNear:L.near,depthFar:L.far}),P=L.near,z=L.far,E.near=P,E.far=z,R.near=P,R.far=z,E.updateProjectionMatrix(),R.updateProjectionMatrix(),ce.updateProjectionMatrix());const we=ce.parent,he=L.cameras;q(L,we);for(let Ie=0;Ie0&&(y.alphaTest.value=g.alphaTest);const _=e.get(g),x=_.envMap,S=_.envMapRotation;x&&(y.envMap.value=x,wf.copy(S),wf.x*=-1,wf.y*=-1,wf.z*=-1,x.isCubeTexture&&x.isRenderTargetTexture===!1&&(wf.y*=-1,wf.z*=-1),y.envMapRotation.value.setFromMatrix4(XAe.makeRotationFromEuler(wf)),y.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,y.reflectivity.value=g.reflectivity,y.ior.value=g.ior,y.refractionRatio.value=g.refractionRatio),g.lightMap&&(y.lightMap.value=g.lightMap,y.lightMapIntensity.value=g.lightMapIntensity,n(g.lightMap,y.lightMapTransform)),g.aoMap&&(y.aoMap.value=g.aoMap,y.aoMapIntensity.value=g.aoMapIntensity,n(g.aoMap,y.aoMapTransform))}function o(y,g){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,g.map&&(y.map.value=g.map,n(g.map,y.mapTransform))}function a(y,g){y.dashSize.value=g.dashSize,y.totalSize.value=g.dashSize+g.gapSize,y.scale.value=g.scale}function l(y,g,_,x){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,y.size.value=g.size*_,y.scale.value=x*.5,g.map&&(y.map.value=g.map,n(g.map,y.uvTransform)),g.alphaMap&&(y.alphaMap.value=g.alphaMap,n(g.alphaMap,y.alphaMapTransform)),g.alphaTest>0&&(y.alphaTest.value=g.alphaTest)}function c(y,g){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,y.rotation.value=g.rotation,g.map&&(y.map.value=g.map,n(g.map,y.mapTransform)),g.alphaMap&&(y.alphaMap.value=g.alphaMap,n(g.alphaMap,y.alphaMapTransform)),g.alphaTest>0&&(y.alphaTest.value=g.alphaTest)}function u(y,g){y.specular.value.copy(g.specular),y.shininess.value=Math.max(g.shininess,1e-4)}function f(y,g){g.gradientMap&&(y.gradientMap.value=g.gradientMap)}function h(y,g){y.metalness.value=g.metalness,g.metalnessMap&&(y.metalnessMap.value=g.metalnessMap,n(g.metalnessMap,y.metalnessMapTransform)),y.roughness.value=g.roughness,g.roughnessMap&&(y.roughnessMap.value=g.roughnessMap,n(g.roughnessMap,y.roughnessMapTransform)),g.envMap&&(y.envMapIntensity.value=g.envMapIntensity)}function m(y,g,_){y.ior.value=g.ior,g.sheen>0&&(y.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),y.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(y.sheenColorMap.value=g.sheenColorMap,n(g.sheenColorMap,y.sheenColorMapTransform)),g.sheenRoughnessMap&&(y.sheenRoughnessMap.value=g.sheenRoughnessMap,n(g.sheenRoughnessMap,y.sheenRoughnessMapTransform))),g.clearcoat>0&&(y.clearcoat.value=g.clearcoat,y.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(y.clearcoatMap.value=g.clearcoatMap,n(g.clearcoatMap,y.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,n(g.clearcoatRoughnessMap,y.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(y.clearcoatNormalMap.value=g.clearcoatNormalMap,n(g.clearcoatNormalMap,y.clearcoatNormalMapTransform),y.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===Os&&y.clearcoatNormalScale.value.negate())),g.dispersion>0&&(y.dispersion.value=g.dispersion),g.iridescence>0&&(y.iridescence.value=g.iridescence,y.iridescenceIOR.value=g.iridescenceIOR,y.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],y.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(y.iridescenceMap.value=g.iridescenceMap,n(g.iridescenceMap,y.iridescenceMapTransform)),g.iridescenceThicknessMap&&(y.iridescenceThicknessMap.value=g.iridescenceThicknessMap,n(g.iridescenceThicknessMap,y.iridescenceThicknessMapTransform))),g.transmission>0&&(y.transmission.value=g.transmission,y.transmissionSamplerMap.value=_.texture,y.transmissionSamplerSize.value.set(_.width,_.height),g.transmissionMap&&(y.transmissionMap.value=g.transmissionMap,n(g.transmissionMap,y.transmissionMapTransform)),y.thickness.value=g.thickness,g.thicknessMap&&(y.thicknessMap.value=g.thicknessMap,n(g.thicknessMap,y.thicknessMapTransform)),y.attenuationDistance.value=g.attenuationDistance,y.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(y.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(y.anisotropyMap.value=g.anisotropyMap,n(g.anisotropyMap,y.anisotropyMapTransform))),y.specularIntensity.value=g.specularIntensity,y.specularColor.value.copy(g.specularColor),g.specularColorMap&&(y.specularColorMap.value=g.specularColorMap,n(g.specularColorMap,y.specularColorMapTransform)),g.specularIntensityMap&&(y.specularIntensityMap.value=g.specularIntensityMap,n(g.specularIntensityMap,y.specularIntensityMapTransform))}function v(y,g){g.matcap&&(y.matcap.value=g.matcap)}function w(y,g){const _=e.get(g).light;y.referencePosition.value.setFromMatrixPosition(_.matrixWorld),y.nearDistance.value=_.shadow.camera.near,y.farDistance.value=_.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function ZAe(t,e,n,r){let i={},s={},o=[];const a=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function l(_,x){const S=x.program;r.uniformBlockBinding(_,S)}function c(_,x){let S=i[_.id];S===void 0&&(v(_),S=u(_),i[_.id]=S,_.addEventListener("dispose",y));const D=x.program;r.updateUBOMapping(_,D);const T=e.render.frame;s[_.id]!==T&&(h(_),s[_.id]=T)}function u(_){const x=f();_.__bindingPointIndex=x;const S=t.createBuffer(),D=_.__size,T=_.usage;return t.bindBuffer(t.UNIFORM_BUFFER,S),t.bufferData(t.UNIFORM_BUFFER,D,T),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,x,S),S}function f(){for(let _=0;_0&&(S+=D-T),_.__size=S,_.__cache={},this}function w(_){const x={boundary:0,storage:0};return typeof _=="number"||typeof _=="boolean"?(x.boundary=4,x.storage=4):_.isVector2?(x.boundary=8,x.storage=8):_.isVector3||_.isColor?(x.boundary=16,x.storage=12):_.isVector4?(x.boundary=16,x.storage=16):_.isMatrix3?(x.boundary=48,x.storage=48):_.isMatrix4?(x.boundary=64,x.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),x}function y(_){const x=_.target;x.removeEventListener("dispose",y);const S=o.indexOf(x.__bindingPointIndex);o.splice(S,1),t.deleteBuffer(i[x.id]),delete i[x.id],delete s[x.id]}function g(){for(const _ in i)t.deleteBuffer(i[_]);o=[],i={},s={}}return{bind:l,update:c,dispose:g}}class nP{constructor(e={}){const{canvas:n=GW(),context:r=null,depth:i=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:f=!1}=e;this.isWebGLRenderer=!0;let h;if(r!==null){if(typeof WebGLRenderingContext<"u"&&r instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");h=r.getContextAttributes().alpha}else h=o;const m=new Uint32Array(4),v=new Int32Array(4);let w=null,y=null;const g=[],_=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=ho,this.toneMapping=fl,this.toneMappingExposure=1;const x=this;let S=!1,D=0,T=0,E=null,R=-1,C=null;const L=new or,P=new or;let z=null;const B=new Lt(0);let Y=0,ie=n.width,ee=n.height,le=1,j=null,q=null;const ne=new or(0,0,ie,ee),de=new or(0,0,ie,ee);let _e=!1;const ge=new zv;let ce=!1,we=!1;const he=new Kt,Ie=new Z,et=new or,ct={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let it=!1;function ut(){return E===null?le:1}let $=r;function Ce(U,J){return n.getContext(U,J)}try{const U={alpha:!0,depth:i,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${Wd}`),n.addEventListener("webglcontextlost",fe,!1),n.addEventListener("webglcontextrestored",Pe,!1),n.addEventListener("webglcontextcreationerror",rt,!1),$===null){const J="webgl2";if($=Ce(J,U),$===null)throw Ce(J)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(U){throw console.error("THREE.WebGLRenderer: "+U.message),U}let Ne,ze,Ue,Et,lt,yt,re,V,Ee,je,De,He,pt,Qe,Ye,Ke,nt,_t,Qt,We,Ze,Tt,Ft,en;function pe(){Ne=new sEe($),Ne.init(),Tt=new e$($,Ne),ze=new qCe($,Ne,e,Tt),Ue=new UAe($),Et=new lEe($),lt=new EAe,yt=new VAe($,Ne,Ue,lt,ze,Tt,Et),re=new tEe(x),V=new iEe(x),Ee=new m2e($),Ft=new KCe($,Ee),je=new oEe($,Ee,Et,Ft),De=new uEe($,je,Ee,Et),Qt=new cEe($,ze,yt),Ke=new eEe(lt),He=new CAe(x,re,V,Ne,ze,Ft,Ke),pt=new KAe(x,lt),Qe=new TAe,Ye=new NAe(Ne),_t=new XCe(x,re,V,Ue,De,h,l),nt=new OAe(x,De,ze),en=new ZAe($,Et,ze,Ue),We=new ZCe($,Ne,Et),Ze=new aEe($,Ne,Et),Et.programs=He.programs,x.capabilities=ze,x.extensions=Ne,x.properties=lt,x.renderLists=Qe,x.shadowMap=nt,x.state=Ue,x.info=Et}pe();const st=new QAe(x,$);this.xr=st,this.getContext=function(){return $},this.getContextAttributes=function(){return $.getContextAttributes()},this.forceContextLoss=function(){const U=Ne.get("WEBGL_lose_context");U&&U.loseContext()},this.forceContextRestore=function(){const U=Ne.get("WEBGL_lose_context");U&&U.restoreContext()},this.getPixelRatio=function(){return le},this.setPixelRatio=function(U){U!==void 0&&(le=U,this.setSize(ie,ee,!1))},this.getSize=function(U){return U.set(ie,ee)},this.setSize=function(U,J,K=!0){if(st.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}ie=U,ee=J,n.width=Math.floor(U*le),n.height=Math.floor(J*le),K===!0&&(n.style.width=U+"px",n.style.height=J+"px"),this.setViewport(0,0,U,J)},this.getDrawingBufferSize=function(U){return U.set(ie*le,ee*le).floor()},this.setDrawingBufferSize=function(U,J,K){ie=U,ee=J,le=K,n.width=Math.floor(U*K),n.height=Math.floor(J*K),this.setViewport(0,0,U,J)},this.getCurrentViewport=function(U){return U.copy(L)},this.getViewport=function(U){return U.copy(ne)},this.setViewport=function(U,J,K,se){U.isVector4?ne.set(U.x,U.y,U.z,U.w):ne.set(U,J,K,se),Ue.viewport(L.copy(ne).multiplyScalar(le).round())},this.getScissor=function(U){return U.copy(de)},this.setScissor=function(U,J,K,se){U.isVector4?de.set(U.x,U.y,U.z,U.w):de.set(U,J,K,se),Ue.scissor(P.copy(de).multiplyScalar(le).round())},this.getScissorTest=function(){return _e},this.setScissorTest=function(U){Ue.setScissorTest(_e=U)},this.setOpaqueSort=function(U){j=U},this.setTransparentSort=function(U){q=U},this.getClearColor=function(U){return U.copy(_t.getClearColor())},this.setClearColor=function(){_t.setClearColor.apply(_t,arguments)},this.getClearAlpha=function(){return _t.getClearAlpha()},this.setClearAlpha=function(){_t.setClearAlpha.apply(_t,arguments)},this.clear=function(U=!0,J=!0,K=!0){let se=0;if(U){let te=!1;if(E!==null){const ve=E.texture.format;te=ve===rS||ve===nS||ve===Ov}if(te){const ve=E.texture.type,xe=ve===qs||ve===vl||ve===dm||ve===Ed||ve===eS||ve===tS,Te=_t.getClearColor(),Ae=_t.getClearAlpha(),ht=Te.r,Ve=Te.g,$e=Te.b;xe?(m[0]=ht,m[1]=Ve,m[2]=$e,m[3]=Ae,$.clearBufferuiv($.COLOR,0,m)):(v[0]=ht,v[1]=Ve,v[2]=$e,v[3]=Ae,$.clearBufferiv($.COLOR,0,v))}else se|=$.COLOR_BUFFER_BIT}J&&(se|=$.DEPTH_BUFFER_BIT),K&&(se|=$.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),$.clear(se)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){n.removeEventListener("webglcontextlost",fe,!1),n.removeEventListener("webglcontextrestored",Pe,!1),n.removeEventListener("webglcontextcreationerror",rt,!1),Qe.dispose(),Ye.dispose(),lt.dispose(),re.dispose(),V.dispose(),De.dispose(),Ft.dispose(),en.dispose(),He.dispose(),st.dispose(),st.removeEventListener("sessionstart",jn),st.removeEventListener("sessionend",vn),ue.stop()};function fe(U){U.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),S=!0}function Pe(){console.log("THREE.WebGLRenderer: Context Restored."),S=!1;const U=Et.autoReset,J=nt.enabled,K=nt.autoUpdate,se=nt.needsUpdate,te=nt.type;pe(),Et.autoReset=U,nt.enabled=J,nt.autoUpdate=K,nt.needsUpdate=se,nt.type=te}function rt(U){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",U.statusMessage)}function It(U){const J=U.target;J.removeEventListener("dispose",It),Le(J)}function Le(U){At(U),lt.remove(U)}function At(U){const J=lt.get(U).programs;J!==void 0&&(J.forEach(function(K){He.releaseProgram(K)}),U.isShaderMaterial&&He.releaseShaderCache(U))}this.renderBufferDirect=function(U,J,K,se,te,ve){J===null&&(J=ct);const xe=te.isMesh&&te.matrixWorld.determinant()<0,Te=F(U,J,K,se,te);Ue.setMaterial(se,xe);let Ae=K.index,ht=1;if(se.wireframe===!0){if(Ae=je.getWireframeAttribute(K),Ae===void 0)return;ht=2}const Ve=K.drawRange,$e=K.attributes.position;let ft=Ve.start*ht,Mt=(Ve.start+Ve.count)*ht;ve!==null&&(ft=Math.max(ft,ve.start*ht),Mt=Math.min(Mt,(ve.start+ve.count)*ht)),Ae!==null?(ft=Math.max(ft,0),Mt=Math.min(Mt,Ae.count)):$e!=null&&(ft=Math.max(ft,0),Mt=Math.min(Mt,$e.count));const qe=Mt-ft;if(qe<0||qe===1/0)return;Ft.setup(te,se,Te,K,Ae);let St,at=We;if(Ae!==null&&(St=Ee.get(Ae),at=Ze,at.setIndex(St)),te.isMesh)se.wireframe===!0?(Ue.setLineWidth(se.wireframeLinewidth*ut()),at.setMode($.LINES)):at.setMode($.TRIANGLES);else if(te.isLine){let Oe=se.linewidth;Oe===void 0&&(Oe=1),Ue.setLineWidth(Oe*ut()),te.isLineSegments?at.setMode($.LINES):te.isLineLoop?at.setMode($.LINE_LOOP):at.setMode($.LINE_STRIP)}else te.isPoints?at.setMode($.POINTS):te.isSprite&&at.setMode($.TRIANGLES);if(te.isBatchedMesh)if(te._multiDrawInstances!==null)at.renderMultiDrawInstances(te._multiDrawStarts,te._multiDrawCounts,te._multiDrawCount,te._multiDrawInstances);else if(Ne.get("WEBGL_multi_draw"))at.renderMultiDraw(te._multiDrawStarts,te._multiDrawCounts,te._multiDrawCount);else{const Oe=te._multiDrawStarts,kt=te._multiDrawCounts,Pt=te._multiDrawCount,Ut=Ae?Ee.get(Ae).bytesPerElement:1,yn=lt.get(se).currentProgram.getUniforms();for(let Tn=0;Tn{function ve(){if(se.forEach(function(xe){lt.get(xe).currentProgram.isReady()&&se.delete(xe)}),se.size===0){te(U);return}setTimeout(ve,10)}Ne.get("KHR_parallel_shader_compile")!==null?ve():setTimeout(ve,10)})};let rn=null;function Jn(U){rn&&rn(U)}function jn(){ue.stop()}function vn(){ue.start()}const ue=new QW;ue.setAnimationLoop(Jn),typeof self<"u"&&ue.setContext(self),this.setAnimationLoop=function(U){rn=U,st.setAnimationLoop(U),U===null?ue.stop():ue.start()},st.addEventListener("sessionstart",jn),st.addEventListener("sessionend",vn),this.render=function(U,J){if(J!==void 0&&J.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(S===!0)return;if(U.matrixWorldAutoUpdate===!0&&U.updateMatrixWorld(),J.parent===null&&J.matrixWorldAutoUpdate===!0&&J.updateMatrixWorld(),st.enabled===!0&&st.isPresenting===!0&&(st.cameraAutoUpdate===!0&&st.updateCamera(J),J=st.getCamera()),U.isScene===!0&&U.onBeforeRender(x,U,J,E),y=Ye.get(U,_.length),y.init(J),_.push(y),he.multiplyMatrices(J.projectionMatrix,J.matrixWorldInverse),ge.setFromProjectionMatrix(he),we=this.localClippingEnabled,ce=Ke.init(this.clippingPlanes,we),w=Qe.get(U,g.length),w.init(),g.push(w),st.enabled===!0&&st.isPresenting===!0){const ve=x.xr.getDepthSensingMesh();ve!==null&&me(ve,J,-1/0,x.sortObjects)}me(U,J,0,x.sortObjects),w.finish(),x.sortObjects===!0&&w.sort(j,q),it=st.enabled===!1||st.isPresenting===!1||st.hasDepthSensing()===!1,it&&_t.addToRenderList(w,U),this.info.render.frame++,ce===!0&&Ke.beginShadows();const K=y.state.shadowsArray;nt.render(K,U,J),ce===!0&&Ke.endShadows(),this.info.autoReset===!0&&this.info.reset();const se=w.opaque,te=w.transmissive;if(y.setupLights(),J.isArrayCamera){const ve=J.cameras;if(te.length>0)for(let xe=0,Te=ve.length;xe0&&Ge(se,te,U,J),it&&_t.render(U),Se(w,U,J);E!==null&&(yt.updateMultisampleRenderTarget(E),yt.updateRenderTargetMipmap(E)),U.isScene===!0&&U.onAfterRender(x,U,J),Ft.resetDefaultState(),R=-1,C=null,_.pop(),_.length>0?(y=_[_.length-1],ce===!0&&Ke.setGlobalState(x.clippingPlanes,y.state.camera)):y=null,g.pop(),g.length>0?w=g[g.length-1]:w=null};function me(U,J,K,se){if(U.visible===!1)return;if(U.layers.test(J.layers)){if(U.isGroup)K=U.renderOrder;else if(U.isLOD)U.autoUpdate===!0&&U.update(J);else if(U.isLight)y.pushLight(U),U.castShadow&&y.pushShadow(U);else if(U.isSprite){if(!U.frustumCulled||ge.intersectsSprite(U)){se&&et.setFromMatrixPosition(U.matrixWorld).applyMatrix4(he);const xe=De.update(U),Te=U.material;Te.visible&&w.push(U,xe,Te,K,et.z,null)}}else if((U.isMesh||U.isLine||U.isPoints)&&(!U.frustumCulled||ge.intersectsObject(U))){const xe=De.update(U),Te=U.material;if(se&&(U.boundingSphere!==void 0?(U.boundingSphere===null&&U.computeBoundingSphere(),et.copy(U.boundingSphere.center)):(xe.boundingSphere===null&&xe.computeBoundingSphere(),et.copy(xe.boundingSphere.center)),et.applyMatrix4(U.matrixWorld).applyMatrix4(he)),Array.isArray(Te)){const Ae=xe.groups;for(let ht=0,Ve=Ae.length;ht0&&mt(te,J,K),ve.length>0&&mt(ve,J,K),xe.length>0&&mt(xe,J,K),Ue.buffers.depth.setTest(!0),Ue.buffers.depth.setMask(!0),Ue.buffers.color.setMask(!0),Ue.setPolygonOffset(!1)}function Ge(U,J,K,se){if((K.isScene===!0?K.overrideMaterial:null)!==null)return;y.state.transmissionRenderTarget[se.id]===void 0&&(y.state.transmissionRenderTarget[se.id]=new Zi(1,1,{generateMipmaps:!0,type:Ne.has("EXT_color_buffer_half_float")||Ne.has("EXT_color_buffer_float")?Ai:qs,minFilter:ta,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Zn.workingColorSpace}));const ve=y.state.transmissionRenderTarget[se.id],xe=se.viewport||L;ve.setSize(xe.z,xe.w);const Te=x.getRenderTarget();x.setRenderTarget(ve),x.getClearColor(B),Y=x.getClearAlpha(),Y<1&&x.setClearColor(16777215,.5),x.clear(),it&&_t.render(K);const Ae=x.toneMapping;x.toneMapping=fl;const ht=se.viewport;if(se.viewport!==void 0&&(se.viewport=void 0),y.setupLightsView(se),ce===!0&&Ke.setGlobalState(x.clippingPlanes,se),mt(U,K,se),yt.updateMultisampleRenderTarget(ve),yt.updateRenderTargetMipmap(ve),Ne.has("WEBGL_multisampled_render_to_texture")===!1){let Ve=!1;for(let $e=0,ft=J.length;$e0),$e=!!K.morphAttributes.position,ft=!!K.morphAttributes.normal,Mt=!!K.morphAttributes.color;let qe=fl;se.toneMapped&&(E===null||E.isXRRenderTarget===!0)&&(qe=x.toneMapping);const St=K.morphAttributes.position||K.morphAttributes.normal||K.morphAttributes.color,at=St!==void 0?St.length:0,Oe=lt.get(se),kt=y.state.lights;if(ce===!0&&(we===!0||U!==C)){const nn=U===C&&se.id===R;Ke.setState(se,U,nn)}let Pt=!1;se.version===Oe.__version?(Oe.needsLights&&Oe.lightsStateVersion!==kt.state.version||Oe.outputColorSpace!==Te||te.isBatchedMesh&&Oe.batching===!1||!te.isBatchedMesh&&Oe.batching===!0||te.isBatchedMesh&&Oe.batchingColor===!0&&te.colorTexture===null||te.isBatchedMesh&&Oe.batchingColor===!1&&te.colorTexture!==null||te.isInstancedMesh&&Oe.instancing===!1||!te.isInstancedMesh&&Oe.instancing===!0||te.isSkinnedMesh&&Oe.skinning===!1||!te.isSkinnedMesh&&Oe.skinning===!0||te.isInstancedMesh&&Oe.instancingColor===!0&&te.instanceColor===null||te.isInstancedMesh&&Oe.instancingColor===!1&&te.instanceColor!==null||te.isInstancedMesh&&Oe.instancingMorph===!0&&te.morphTexture===null||te.isInstancedMesh&&Oe.instancingMorph===!1&&te.morphTexture!==null||Oe.envMap!==Ae||se.fog===!0&&Oe.fog!==ve||Oe.numClippingPlanes!==void 0&&(Oe.numClippingPlanes!==Ke.numPlanes||Oe.numIntersection!==Ke.numIntersection)||Oe.vertexAlphas!==ht||Oe.vertexTangents!==Ve||Oe.morphTargets!==$e||Oe.morphNormals!==ft||Oe.morphColors!==Mt||Oe.toneMapping!==qe||Oe.morphTargetsCount!==at)&&(Pt=!0):(Pt=!0,Oe.__version=se.version);let Ut=Oe.currentProgram;Pt===!0&&(Ut=ot(se,J,te));let yn=!1,Tn=!1,ar=!1;const cn=Ut.getUniforms(),ln=Oe.uniforms;if(Ue.useProgram(Ut.program)&&(yn=!0,Tn=!0,ar=!0),se.id!==R&&(R=se.id,Tn=!0),yn||C!==U){cn.setValue($,"projectionMatrix",U.projectionMatrix),cn.setValue($,"viewMatrix",U.matrixWorldInverse);const nn=cn.map.cameraPosition;nn!==void 0&&nn.setValue($,Ie.setFromMatrixPosition(U.matrixWorld)),ze.logarithmicDepthBuffer&&cn.setValue($,"logDepthBufFC",2/(Math.log(U.far+1)/Math.LN2)),(se.isMeshPhongMaterial||se.isMeshToonMaterial||se.isMeshLambertMaterial||se.isMeshBasicMaterial||se.isMeshStandardMaterial||se.isShaderMaterial)&&cn.setValue($,"isOrthographic",U.isOrthographicCamera===!0),C!==U&&(C=U,Tn=!0,ar=!0)}if(te.isSkinnedMesh){cn.setOptional($,te,"bindMatrix"),cn.setOptional($,te,"bindMatrixInverse");const nn=te.skeleton;nn&&(nn.boneTexture===null&&nn.computeBoneTexture(),cn.setValue($,"boneTexture",nn.boneTexture,yt))}te.isBatchedMesh&&(cn.setOptional($,te,"batchingTexture"),cn.setValue($,"batchingTexture",te._matricesTexture,yt),cn.setOptional($,te,"batchingIdTexture"),cn.setValue($,"batchingIdTexture",te._indirectTexture,yt),cn.setOptional($,te,"batchingColorTexture"),te._colorsTexture!==null&&cn.setValue($,"batchingColorTexture",te._colorsTexture,yt));const dr=K.morphAttributes;if((dr.position!==void 0||dr.normal!==void 0||dr.color!==void 0)&&Qt.update(te,K,Ut),(Tn||Oe.receiveShadow!==te.receiveShadow)&&(Oe.receiveShadow=te.receiveShadow,cn.setValue($,"receiveShadow",te.receiveShadow)),se.isMeshGouraudMaterial&&se.envMap!==null&&(ln.envMap.value=Ae,ln.flipEnvMap.value=Ae.isCubeTexture&&Ae.isRenderTargetTexture===!1?-1:1),se.isMeshStandardMaterial&&se.envMap===null&&J.environment!==null&&(ln.envMapIntensity.value=J.environmentIntensity),Tn&&(cn.setValue($,"toneMappingExposure",x.toneMappingExposure),Oe.needsLights&&W(ln,ar),ve&&se.fog===!0&&pt.refreshFogUniforms(ln,ve),pt.refreshMaterialUniforms(ln,se,le,ee,y.state.transmissionRenderTarget[U.id]),q_.upload($,gt(Oe),ln,yt)),se.isShaderMaterial&&se.uniformsNeedUpdate===!0&&(q_.upload($,gt(Oe),ln,yt),se.uniformsNeedUpdate=!1),se.isSpriteMaterial&&cn.setValue($,"center",te.center),cn.setValue($,"modelViewMatrix",te.modelViewMatrix),cn.setValue($,"normalMatrix",te.normalMatrix),cn.setValue($,"modelMatrix",te.matrixWorld),se.isShaderMaterial||se.isRawShaderMaterial){const nn=se.uniformsGroups;for(let on=0,tr=nn.length;on0&&yt.useMultisampledRTT(U)===!1?te=lt.get(U).__webglMultisampledFramebuffer:Array.isArray(Ve)?te=Ve[K]:te=Ve,L.copy(U.viewport),P.copy(U.scissor),z=U.scissorTest}else L.copy(ne).multiplyScalar(le).floor(),P.copy(de).multiplyScalar(le).floor(),z=_e;if(Ue.bindFramebuffer($.FRAMEBUFFER,te)&&se&&Ue.drawBuffers(U,te),Ue.viewport(L),Ue.scissor(P),Ue.setScissorTest(z),ve){const Ae=lt.get(U.texture);$.framebufferTexture2D($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,$.TEXTURE_CUBE_MAP_POSITIVE_X+J,Ae.__webglTexture,K)}else if(xe){const Ae=lt.get(U.texture),ht=J||0;$.framebufferTextureLayer($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,Ae.__webglTexture,K||0,ht)}R=-1},this.readRenderTargetPixels=function(U,J,K,se,te,ve,xe){if(!(U&&U.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Te=lt.get(U).__webglFramebuffer;if(U.isWebGLCubeRenderTarget&&xe!==void 0&&(Te=Te[xe]),Te){Ue.bindFramebuffer($.FRAMEBUFFER,Te);try{const Ae=U.texture,ht=Ae.format,Ve=Ae.type;if(!ze.textureFormatReadable(ht)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!ze.textureTypeReadable(Ve)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}J>=0&&J<=U.width-se&&K>=0&&K<=U.height-te&&$.readPixels(J,K,se,te,Tt.convert(ht),Tt.convert(Ve),ve)}finally{const Ae=E!==null?lt.get(E).__webglFramebuffer:null;Ue.bindFramebuffer($.FRAMEBUFFER,Ae)}}},this.readRenderTargetPixelsAsync=async function(U,J,K,se,te,ve,xe){if(!(U&&U.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Te=lt.get(U).__webglFramebuffer;if(U.isWebGLCubeRenderTarget&&xe!==void 0&&(Te=Te[xe]),Te){Ue.bindFramebuffer($.FRAMEBUFFER,Te);try{const Ae=U.texture,ht=Ae.format,Ve=Ae.type;if(!ze.textureFormatReadable(ht))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!ze.textureTypeReadable(Ve))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(J>=0&&J<=U.width-se&&K>=0&&K<=U.height-te){const $e=$.createBuffer();$.bindBuffer($.PIXEL_PACK_BUFFER,$e),$.bufferData($.PIXEL_PACK_BUFFER,ve.byteLength,$.STREAM_READ),$.readPixels(J,K,se,te,Tt.convert(ht),Tt.convert(Ve),0),$.flush();const ft=$.fenceSync($.SYNC_GPU_COMMANDS_COMPLETE,0);await zbe($,ft,4);try{$.bindBuffer($.PIXEL_PACK_BUFFER,$e),$.getBufferSubData($.PIXEL_PACK_BUFFER,0,ve)}finally{$.deleteBuffer($e),$.deleteSync(ft)}return ve}}finally{const Ae=E!==null?lt.get(E).__webglFramebuffer:null;Ue.bindFramebuffer($.FRAMEBUFFER,Ae)}}},this.copyFramebufferToTexture=function(U,J=null,K=0){U.isTexture!==!0&&(Dp("WebGLRenderer: copyFramebufferToTexture function signature has changed."),J=arguments[0]||null,U=arguments[1]);const se=Math.pow(2,-K),te=Math.floor(U.image.width*se),ve=Math.floor(U.image.height*se),xe=J!==null?J.x:0,Te=J!==null?J.y:0;yt.setTexture2D(U,0),$.copyTexSubImage2D($.TEXTURE_2D,K,0,0,xe,Te,te,ve),Ue.unbindTexture()},this.copyTextureToTexture=function(U,J,K=null,se=null,te=0){U.isTexture!==!0&&(Dp("WebGLRenderer: copyTextureToTexture function signature has changed."),se=arguments[0]||null,U=arguments[1],J=arguments[2],te=arguments[3]||0,K=null);let ve,xe,Te,Ae,ht,Ve;K!==null?(ve=K.max.x-K.min.x,xe=K.max.y-K.min.y,Te=K.min.x,Ae=K.min.y):(ve=U.image.width,xe=U.image.height,Te=0,Ae=0),se!==null?(ht=se.x,Ve=se.y):(ht=0,Ve=0);const $e=Tt.convert(J.format),ft=Tt.convert(J.type);yt.setTexture2D(J,0),$.pixelStorei($.UNPACK_FLIP_Y_WEBGL,J.flipY),$.pixelStorei($.UNPACK_PREMULTIPLY_ALPHA_WEBGL,J.premultiplyAlpha),$.pixelStorei($.UNPACK_ALIGNMENT,J.unpackAlignment);const Mt=$.getParameter($.UNPACK_ROW_LENGTH),qe=$.getParameter($.UNPACK_IMAGE_HEIGHT),St=$.getParameter($.UNPACK_SKIP_PIXELS),at=$.getParameter($.UNPACK_SKIP_ROWS),Oe=$.getParameter($.UNPACK_SKIP_IMAGES),kt=U.isCompressedTexture?U.mipmaps[te]:U.image;$.pixelStorei($.UNPACK_ROW_LENGTH,kt.width),$.pixelStorei($.UNPACK_IMAGE_HEIGHT,kt.height),$.pixelStorei($.UNPACK_SKIP_PIXELS,Te),$.pixelStorei($.UNPACK_SKIP_ROWS,Ae),U.isDataTexture?$.texSubImage2D($.TEXTURE_2D,te,ht,Ve,ve,xe,$e,ft,kt.data):U.isCompressedTexture?$.compressedTexSubImage2D($.TEXTURE_2D,te,ht,Ve,kt.width,kt.height,$e,kt.data):$.texSubImage2D($.TEXTURE_2D,te,ht,Ve,ve,xe,$e,ft,kt),$.pixelStorei($.UNPACK_ROW_LENGTH,Mt),$.pixelStorei($.UNPACK_IMAGE_HEIGHT,qe),$.pixelStorei($.UNPACK_SKIP_PIXELS,St),$.pixelStorei($.UNPACK_SKIP_ROWS,at),$.pixelStorei($.UNPACK_SKIP_IMAGES,Oe),te===0&&J.generateMipmaps&&$.generateMipmap($.TEXTURE_2D),Ue.unbindTexture()},this.copyTextureToTexture3D=function(U,J,K=null,se=null,te=0){U.isTexture!==!0&&(Dp("WebGLRenderer: copyTextureToTexture3D function signature has changed."),K=arguments[0]||null,se=arguments[1]||null,U=arguments[2],J=arguments[3],te=arguments[4]||0);let ve,xe,Te,Ae,ht,Ve,$e,ft,Mt;const qe=U.isCompressedTexture?U.mipmaps[te]:U.image;K!==null?(ve=K.max.x-K.min.x,xe=K.max.y-K.min.y,Te=K.max.z-K.min.z,Ae=K.min.x,ht=K.min.y,Ve=K.min.z):(ve=qe.width,xe=qe.height,Te=qe.depth,Ae=0,ht=0,Ve=0),se!==null?($e=se.x,ft=se.y,Mt=se.z):($e=0,ft=0,Mt=0);const St=Tt.convert(J.format),at=Tt.convert(J.type);let Oe;if(J.isData3DTexture)yt.setTexture3D(J,0),Oe=$.TEXTURE_3D;else if(J.isDataArrayTexture||J.isCompressedArrayTexture)yt.setTexture2DArray(J,0),Oe=$.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}$.pixelStorei($.UNPACK_FLIP_Y_WEBGL,J.flipY),$.pixelStorei($.UNPACK_PREMULTIPLY_ALPHA_WEBGL,J.premultiplyAlpha),$.pixelStorei($.UNPACK_ALIGNMENT,J.unpackAlignment);const kt=$.getParameter($.UNPACK_ROW_LENGTH),Pt=$.getParameter($.UNPACK_IMAGE_HEIGHT),Ut=$.getParameter($.UNPACK_SKIP_PIXELS),yn=$.getParameter($.UNPACK_SKIP_ROWS),Tn=$.getParameter($.UNPACK_SKIP_IMAGES);$.pixelStorei($.UNPACK_ROW_LENGTH,qe.width),$.pixelStorei($.UNPACK_IMAGE_HEIGHT,qe.height),$.pixelStorei($.UNPACK_SKIP_PIXELS,Ae),$.pixelStorei($.UNPACK_SKIP_ROWS,ht),$.pixelStorei($.UNPACK_SKIP_IMAGES,Ve),U.isDataTexture||U.isData3DTexture?$.texSubImage3D(Oe,te,$e,ft,Mt,ve,xe,Te,St,at,qe.data):J.isCompressedArrayTexture?$.compressedTexSubImage3D(Oe,te,$e,ft,Mt,ve,xe,Te,St,qe.data):$.texSubImage3D(Oe,te,$e,ft,Mt,ve,xe,Te,St,at,qe),$.pixelStorei($.UNPACK_ROW_LENGTH,kt),$.pixelStorei($.UNPACK_IMAGE_HEIGHT,Pt),$.pixelStorei($.UNPACK_SKIP_PIXELS,Ut),$.pixelStorei($.UNPACK_SKIP_ROWS,yn),$.pixelStorei($.UNPACK_SKIP_IMAGES,Tn),te===0&&J.generateMipmaps&&$.generateMipmap(Oe),Ue.unbindTexture()},this.initRenderTarget=function(U){lt.get(U).__webglFramebuffer===void 0&&yt.setupRenderTarget(U)},this.initTexture=function(U){U.isCubeTexture?yt.setTextureCube(U,0):U.isData3DTexture?yt.setTexture3D(U,0):U.isDataArrayTexture||U.isCompressedArrayTexture?yt.setTexture2DArray(U,0):yt.setTexture2D(U,0),Ue.unbindTexture()},this.resetState=function(){D=0,T=0,E=null,Ue.reset(),Ft.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return tl}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===sS?"display-p3":"srgb",n.unpackColorSpace=Zn.workingColorSpace===Uv?"display-p3":"srgb"}}class cS{constructor(e,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new Lt(e),this.density=n}clone(){return new cS(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class uS{constructor(e,n=1,r=1e3){this.isFog=!0,this.name="",this.color=new Lt(e),this.near=n,this.far=r}clone(){return new uS(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class vm extends Vn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new To,this.environmentIntensity=1,this.environmentRotation=new To,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(n.object.environmentIntensity=this.environmentIntensity),n.object.environmentRotation=this.environmentRotation.toArray(),n}}class Hv{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=F1,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Eo()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return Dp("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,r){e*=this.stride,r*=n.stride;for(let i=0,s=this.stride;ie.far||n.push({distance:l,point:H0.clone(),uv:mo.getInterpolation(H0,Gw,V0,Vw,N9,sA,k9,new tt),face:null,object:this})}copy(e,n){return super.copy(e,n),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Ww(t,e,n,r,i,s){zh.subVectors(t,n).addScalar(.5).multiply(r),i!==void 0?(G0.x=s*zh.x-i*zh.y,G0.y=i*zh.x+s*zh.y):G0.copy(zh),t.copy(e),t.x+=G0.x,t.y+=G0.y,t.applyMatrix4(n$)}const $w=new Z,B9=new Z;class i$ extends Vn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const n=e.levels;for(let r=0,i=n.length;r0){let r,i;for(r=1,i=n.length;r0){$w.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo($w);this.getObjectForDistance(i).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){$w.setFromMatrixPosition(e.matrixWorld),B9.setFromMatrixPosition(this.matrixWorld);const r=$w.distanceTo(B9)/e.zoom;n[0].object.visible=!0;let i,s;for(i=1,s=n.length;i=o)n[i-1].object.visible=!1,n[i].object.visible=!0;else break}for(this._currentLevel=i-1;i=i.length&&i.push({start:-1,count:-1,z:-1,index:-1});const o=i[this.index];s.push(o),this.index++,o.start=e.start,o.count=e.count,o.z=n,o.index=r}reset(){this.list.length=0,this.index=0}}const Bc=new Kt,lA=new Kt,sTe=new Kt,oTe=new Lt(1,1,1),W9=new Kt,cA=new zv,Qw=new Ui,_f=new Fi,J0=new Z,$9=new Z,aTe=new Z,uA=new iTe,ds=new Cr,Xw=[];function lTe(t,e,n=0){const r=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const i=t.count;for(let s=0;s65535?new Uint32Array(i):new Uint16Array(i);n.setIndex(new Qn(s,1))}this._geometryInitialized=!0}}_validateGeometry(e){const n=this.geometry;if(!!e.getIndex()!=!!n.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const r in n.attributes){if(!e.hasAttribute(r))throw new Error(`BatchedMesh: Added geometry missing "${r}". All geometries must have consistent attributes.`);const i=e.getAttribute(r),s=n.getAttribute(r);if(i.itemSize!==s.itemSize||i.normalized!==s.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Ui);const e=this._geometryCount,n=this.boundingBox,r=this._drawInfo;n.makeEmpty();for(let i=0;i=this._maxInstanceCount)throw new Error("BatchedMesh: Maximum item count reached.");this._drawInfo.push({visible:!0,active:!0,geometryIndex:e});const n=this._drawInfo.length-1,r=this._matricesTexture,i=r.image.data;sTe.toArray(i,n*16),r.needsUpdate=!0;const s=this._colorsTexture;return s&&(oTe.toArray(s.image.data,n*4),s.needsUpdate=!0),n}addGeometry(e,n=-1,r=-1){if(this._initializeGeometry(e),this._validateGeometry(e),this._drawInfo.length>=this._maxInstanceCount)throw new Error("BatchedMesh: Maximum item count reached.");const i={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let s=null;const o=this._reservedRanges,a=this._drawRanges,l=this._bounds;this._geometryCount!==0&&(s=o[o.length-1]),n===-1?i.vertexCount=e.getAttribute("position").count:i.vertexCount=n,s===null?i.vertexStart=0:i.vertexStart=s.vertexStart+s.vertexCount;const c=e.getIndex(),u=c!==null;if(u&&(r===-1?i.indexCount=c.count:i.indexCount=r,s===null?i.indexStart=0:i.indexStart=s.indexStart+s.indexCount),i.indexStart!==-1&&i.indexStart+i.indexCount>this._maxIndexCount||i.vertexStart+i.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const f=this._geometryCount;return this._geometryCount++,o.push(i),a.push({start:u?i.indexStart:i.vertexStart,count:-1}),l.push({boxInitialized:!1,box:new Ui,sphereInitialized:!1,sphere:new Fi}),this.setGeometryAt(f,e),f}setGeometryAt(e,n){if(e>=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(n);const r=this.geometry,i=r.getIndex()!==null,s=r.getIndex(),o=n.getIndex(),a=this._reservedRanges[e];if(i&&o.count>a.indexCount||n.attributes.position.count>a.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.vertexCount;for(const m in r.attributes){const v=n.getAttribute(m),w=r.getAttribute(m);lTe(v,w,l);const y=v.itemSize;for(let g=v.count,_=c;g<_;g++){const x=l+g;for(let S=0;S=this._geometryCount)return null;const r=this._bounds[e],i=r.box,s=this.geometry;if(r.boxInitialized===!1){i.makeEmpty();const o=s.index,a=s.attributes.position,l=this._drawRanges[e];for(let c=l.start,u=l.start+l.count;c=this._geometryCount)return null;const r=this._bounds[e],i=r.sphere,s=this.geometry;if(r.sphereInitialized===!1){i.makeEmpty(),this.getBoundingBoxAt(e,Qw),Qw.getCenter(i.center);const o=s.index,a=s.attributes.position,l=this._drawRanges[e];let c=0;for(let u=l.start,f=l.start+l.count;u=r.length||r[e].active===!1?this:(n.toArray(s,e*16),i.needsUpdate=!0,this)}getMatrixAt(e,n){const r=this._drawInfo,i=this._matricesTexture.image.data;return e>=r.length||r[e].active===!1?null:n.fromArray(i,e*16)}setColorAt(e,n){this._colorsTexture===null&&this._initColorsTexture();const r=this._colorsTexture,i=this._colorsTexture.image.data,s=this._drawInfo;return e>=s.length||s[e].active===!1?this:(n.toArray(i,e*4),r.needsUpdate=!0,this)}getColorAt(e,n){const r=this._colorsTexture.image.data,i=this._drawInfo;return e>=i.length||i[e].active===!1?null:n.fromArray(r,e*4)}setVisibleAt(e,n){const r=this._drawInfo;return e>=r.length||r[e].active===!1||r[e].visible===n?this:(r[e].visible=n,this._visibilityChanged=!0,this)}getVisibleAt(e){const n=this._drawInfo;return e>=n.length||n[e].active===!1?!1:n[e].visible}raycast(e,n){const r=this._drawInfo,i=this._drawRanges,s=this.matrixWorld,o=this.geometry;ds.material=this.material,ds.geometry.index=o.index,ds.geometry.attributes=o.attributes,ds.geometry.boundingBox===null&&(ds.geometry.boundingBox=new Ui),ds.geometry.boundingSphere===null&&(ds.geometry.boundingSphere=new Fi);for(let a=0,l=r.length;a({...n})),this._reservedRanges=e._reservedRanges.map(n=>({...n})),this._drawInfo=e._drawInfo.map(n=>({...n})),this._bounds=e._bounds.map(n=>({boxInitialized:n.boxInitialized,box:n.box.clone(),sphereInitialized:n.sphereInitialized,sphere:n.sphere.clone()})),this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null),this}onBeforeRender(e,n,r,i,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=i.getIndex(),a=o===null?1:o.array.BYTES_PER_ELEMENT,l=this._drawInfo,c=this._multiDrawStarts,u=this._multiDrawCounts,f=this._drawRanges,h=this.perObjectFrustumCulled,m=this._indirectTexture,v=m.image.data;h&&(W9.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse).multiply(this.matrixWorld),cA.setFromProjectionMatrix(W9,e.coordinateSystem));let w=0;if(this.sortObjects){lA.copy(this.matrixWorld).invert(),J0.setFromMatrixPosition(r.matrixWorld).applyMatrix4(lA),$9.set(0,0,-1).transformDirection(r.matrixWorld).transformDirection(lA);for(let _=0,x=l.length;_0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;sr)return;fA.applyMatrix4(t.matrixWorld);const l=e.ray.origin.distanceTo(fA);if(!(le.far))return{distance:l,point:Y9.clone().applyMatrix4(t.matrixWorld),index:i,face:null,faceIndex:null,object:t}}const Q9=new Z,X9=new Z;class ja extends dc{constructor(e,n){super(e,n),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,r=[];for(let i=0,s=n.count;i0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;si.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class cTe extends er{constructor(e,n,r,i,s,o,a,l,c){super(e,n,r,i,s,o,a,l,c),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:qn,this.magFilter=s!==void 0?s:qn,this.generateMipmaps=!1;const u=this;function f(){u.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class uTe extends er{constructor(e,n){super({width:e,height:n}),this.isFramebufferTexture=!0,this.magFilter=ei,this.minFilter=ei,this.generateMipmaps=!1,this.needsUpdate=!0}}class hS extends er{constructor(e,n,r,i,s,o,a,l,c,u,f,h){super(null,o,a,l,c,u,i,s,f,h),this.isCompressedTexture=!0,this.image={width:n,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class fTe extends hS{constructor(e,n,r,i,s,o){super(e,n,r,s,o),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=qr,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class dTe extends hS{constructor(e,n,r){super(void 0,e[0].width,e[0].height,n,r,gl),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class hTe extends er{constructor(e,n,r,i,s,o,a,l,c){super(e,n,r,i,s,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class za{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const r=this.getUtoTmapping(e);return this.getPoint(r,n)}getPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPoint(r/e));return n}getSpacedPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPointAt(r/e));return n}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const n=[];let r,i=this.getPoint(0),s=0;n.push(0);for(let o=1;o<=e;o++)r=this.getPoint(o/e),s+=r.distanceTo(i),n.push(s),i=r;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const r=this.getLengths();let i=0;const s=r.length;let o;n?o=n:o=e*r[s-1];let a=0,l=s-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=r[i]-o,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,r[i]===o)return i/(s-1);const u=r[i],h=r[i+1]-u,m=(o-u)/h;return(i+m)/(s-1)}getTangent(e,n){let i=e-1e-4,s=e+1e-4;i<0&&(i=0),s>1&&(s=1);const o=this.getPoint(i),a=this.getPoint(s),l=n||(o.isVector2?new tt:new Z);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,n){const r=this.getUtoTmapping(e);return this.getTangent(r,n)}computeFrenetFrames(e,n){const r=new Z,i=[],s=[],o=[],a=new Z,l=new Kt;for(let m=0;m<=e;m++){const v=m/e;i[m]=this.getTangentAt(v,new Z)}s[0]=new Z,o[0]=new Z;let c=Number.MAX_VALUE;const u=Math.abs(i[0].x),f=Math.abs(i[0].y),h=Math.abs(i[0].z);u<=c&&(c=u,r.set(1,0,0)),f<=c&&(c=f,r.set(0,1,0)),h<=c&&r.set(0,0,1),a.crossVectors(i[0],r).normalize(),s[0].crossVectors(i[0],a),o[0].crossVectors(i[0],s[0]);for(let m=1;m<=e;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(i[m-1],i[m]),a.length()>Number.EPSILON){a.normalize();const v=Math.acos(Vr(i[m-1].dot(i[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,v))}o[m].crossVectors(i[m],s[m])}if(n===!0){let m=Math.acos(Vr(s[0].dot(s[e]),-1,1));m/=e,i[0].dot(a.crossVectors(s[0],s[e]))>0&&(m=-m);for(let v=1;v<=e;v++)s[v].applyMatrix4(l.makeRotationAxis(i[v],m*v)),o[v].crossVectors(i[v],s[v])}return{tangents:i,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class pS extends za{constructor(e=0,n=0,r=1,i=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=r,this.yRadius=i,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,n=new tt){const r=n,i=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)i;)s-=i;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let c,u;this.closed||a>0?c=i[(a-1)%s]:(t_.subVectors(i[0],i[1]).add(i[0]),c=t_);const f=i[a%s],h=i[(a+1)%s];if(this.closed||a+2i.length-2?i.length-1:o+1],f=i[o>i.length-3?i.length-1:o+2];return r.set(q9(a,l.x,c.x,u.x,f.x),q9(a,l.y,c.y,u.y,f.y)),r}copy(e){super.copy(e),this.points=[];for(let n=0,r=e.points.length;n=r){const o=i[s]-r,a=this.curves[s],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,n)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let n=0;for(let r=0,i=this.curves.length;r1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,r=e.curves.length;n0){const f=c.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Vv extends mn{constructor(e=[new tt(0,-.5),new tt(.5,0),new tt(0,.5)],n=12,r=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:n,phiStart:r,phiLength:i},n=Math.floor(n),i=Vr(i,0,Math.PI*2);const s=[],o=[],a=[],l=[],c=[],u=1/n,f=new Z,h=new tt,m=new Z,v=new Z,w=new Z;let y=0,g=0;for(let _=0;_<=e.length-1;_++)switch(_){case 0:y=e[_+1].x-e[_].x,g=e[_+1].y-e[_].y,m.x=g*1,m.y=-y,m.z=g*0,w.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(w.x,w.y,w.z);break;default:y=e[_+1].x-e[_].x,g=e[_+1].y-e[_].y,m.x=g*1,m.y=-y,m.z=g*0,v.copy(m),m.x+=w.x,m.y+=w.y,m.z+=w.z,m.normalize(),l.push(m.x,m.y,m.z),w.copy(v)}for(let _=0;_<=n;_++){const x=r+_*u*i,S=Math.sin(x),D=Math.cos(x);for(let T=0;T<=e.length-1;T++){f.x=e[T].x*S,f.y=e[T].y,f.z=e[T].x*D,o.push(f.x,f.y,f.z),h.x=_/n,h.y=T/(e.length-1),a.push(h.x,h.y);const E=l[3*T+0]*S,R=l[3*T+1],C=l[3*T+0]*D;c.push(E,R,C)}}for(let _=0;_0&&x(!0),n>0&&x(!1)),this.setIndex(u),this.setAttribute("position",new $t(f,3)),this.setAttribute("normal",new $t(h,3)),this.setAttribute("uv",new $t(m,2));function _(){const S=new Z,D=new Z;let T=0;const E=(n-e)/r;for(let R=0;R<=s;R++){const C=[],L=R/s,P=L*(n-e)+e;for(let z=0;z<=i;z++){const B=z/i,Y=B*l+a,ie=Math.sin(Y),ee=Math.cos(Y);D.x=P*ie,D.y=-L*r+y,D.z=P*ee,f.push(D.x,D.y,D.z),S.set(ie,E,ee).normalize(),h.push(S.x,S.y,S.z),m.push(B,1-L),C.push(v++)}w.push(C)}for(let R=0;R.9&&E<.1&&(x<.2&&(o[_+0]+=1),S<.2&&(o[_+2]+=1),D<.2&&(o[_+4]+=1))}}function h(_){s.push(_.x,_.y,_.z)}function m(_,x){const S=_*3;x.x=e[S+0],x.y=e[S+1],x.z=e[S+2]}function v(){const _=new Z,x=new Z,S=new Z,D=new Z,T=new tt,E=new tt,R=new tt;for(let C=0,L=0;C80*n){a=c=t[0],l=u=t[1];for(let v=n;vc&&(c=f),h>u&&(u=h);m=Math.max(c-a,u-l),m=m!==0?32767/m:0}return G1(s,o,n,a,l,m,0),o}};function d$(t,e,n,r,i){let s,o;if(i===OTe(t,e,n,r)>0)for(s=e;s=e;s-=r)o=eU(s,t[s],t[s+1],o);return o&&wS(o,o.next)&&(W1(o),o=o.next),o}function Id(t,e){if(!t)return t;e||(e=t);let n=t,r;do if(r=!1,!n.steiner&&(wS(n,n.next)||Pr(n.prev,n,n.next)===0)){if(W1(n),n=e=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function G1(t,e,n,r,i,s,o){if(!t)return;!o&&s&&RTe(t,r,i,s);let a=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,s?bTe(t,r,i,s):xTe(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),W1(t),t=c.next,a=c.next;continue}if(t=c,t===a){o?o===1?(t=STe(Id(t),e,n),G1(t,e,n,r,i,s,2)):o===2&&CTe(t,e,n,r,i,s):G1(Id(t),e,n,r,i,s,1);break}}}function xTe(t){const e=t.prev,n=t,r=t.next;if(Pr(e,n,r)>=0)return!1;const i=e.x,s=n.x,o=r.x,a=e.y,l=n.y,c=r.y,u=is?i>o?i:o:s>o?s:o,m=a>l?a>c?a:c:l>c?l:c;let v=r.next;for(;v!==e;){if(v.x>=u&&v.x<=h&&v.y>=f&&v.y<=m&&pp(i,a,s,l,o,c,v.x,v.y)&&Pr(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function bTe(t,e,n,r){const i=t.prev,s=t,o=t.next;if(Pr(i,s,o)>=0)return!1;const a=i.x,l=s.x,c=o.x,u=i.y,f=s.y,h=o.y,m=al?a>c?a:c:l>c?l:c,y=u>f?u>h?u:h:f>h?f:h,g=WI(m,v,e,n,r),_=WI(w,y,e,n,r);let x=t.prevZ,S=t.nextZ;for(;x&&x.z>=g&&S&&S.z<=_;){if(x.x>=m&&x.x<=w&&x.y>=v&&x.y<=y&&x!==i&&x!==o&&pp(a,u,l,f,c,h,x.x,x.y)&&Pr(x.prev,x,x.next)>=0||(x=x.prevZ,S.x>=m&&S.x<=w&&S.y>=v&&S.y<=y&&S!==i&&S!==o&&pp(a,u,l,f,c,h,S.x,S.y)&&Pr(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;x&&x.z>=g;){if(x.x>=m&&x.x<=w&&x.y>=v&&x.y<=y&&x!==i&&x!==o&&pp(a,u,l,f,c,h,x.x,x.y)&&Pr(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;S&&S.z<=_;){if(S.x>=m&&S.x<=w&&S.y>=v&&S.y<=y&&S!==i&&S!==o&&pp(a,u,l,f,c,h,S.x,S.y)&&Pr(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function STe(t,e,n){let r=t;do{const i=r.prev,s=r.next.next;!wS(i,s)&&h$(i,r,r.next,s)&&V1(i,s)&&V1(s,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(s.i/n|0),W1(r),W1(r.next),r=t=s),r=r.next}while(r!==t);return Id(r)}function CTe(t,e,n,r,i,s){let o=t;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&NTe(o,a)){let l=p$(o,a);o=Id(o,o.next),l=Id(l,l.next),G1(o,e,n,r,i,s,0),G1(l,e,n,r,i,s,0);return}a=a.next}o=o.next}while(o!==t)}function ETe(t,e,n,r){const i=[];let s,o,a,l,c;for(s=0,o=e.length;s=n.next.y&&n.next.y!==n.y){const h=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(h<=s&&h>r&&(r=h,i=n.x=n.x&&n.x>=l&&s!==n.x&&pp(oi.x||n.x===i.x&<e(i,n)))&&(i=n,u=f)),n=n.next;while(n!==a);return i}function LTe(t,e){return Pr(t.prev,t,e.prev)<0&&Pr(e.next,t,t.next)<0}function RTe(t,e,n,r){let i=t;do i.z===0&&(i.z=WI(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,PTe(i)}function PTe(t){let e,n,r,i,s,o,a,l,c=1;do{for(n=t,t=null,s=null,o=0;n;){for(o++,r=n,a=0,e=0;e0||l>0&&r;)a!==0&&(l===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),s?s.nextZ=i:t=i,i.prevZ=s,s=i;n=r}s.nextZ=null,c*=2}while(o>1);return t}function WI(t,e,n,r,i){return t=(t-n)*i|0,e=(e-r)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function DTe(t){let e=t,n=t;do(e.x=(t-o)*(s-a)&&(t-o)*(r-a)>=(n-o)*(e-a)&&(n-o)*(s-a)>=(i-o)*(r-a)}function NTe(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!kTe(t,e)&&(V1(t,e)&&V1(e,t)&&BTe(t,e)&&(Pr(t.prev,t,e.prev)||Pr(t,e.prev,e))||wS(t,e)&&Pr(t.prev,t,t.next)>0&&Pr(e.prev,e,e.next)>0)}function Pr(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function wS(t,e){return t.x===e.x&&t.y===e.y}function h$(t,e,n,r){const i=o_(Pr(t,e,n)),s=o_(Pr(t,e,r)),o=o_(Pr(n,r,t)),a=o_(Pr(n,r,e));return!!(i!==s&&o!==a||i===0&&s_(t,n,e)||s===0&&s_(t,r,e)||o===0&&s_(n,t,r)||a===0&&s_(n,e,r))}function s_(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function o_(t){return t>0?1:t<0?-1:0}function kTe(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&h$(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function V1(t,e){return Pr(t.prev,t,t.next)<0?Pr(t,e,t.next)>=0&&Pr(t,t.prev,e)>=0:Pr(t,e,t.prev)<0||Pr(t,t.next,e)<0}function BTe(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,s=(t.y+e.y)/2;do n.y>s!=n.next.y>s&&n.next.y!==n.y&&i<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==t);return r}function p$(t,e){const n=new $I(t.i,t.x,t.y),r=new $I(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,s.next=r,r.prev=s,r}function eU(t,e,n,r){const i=new $I(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function W1(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function $I(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function OTe(t,e,n,r){let i=0;for(let s=e,o=n-r;s2&&t[e-1].equals(t[0])&&t.pop()}function nU(t,e){for(let n=0;nNumber.EPSILON){const De=Math.sqrt(Ee),He=Math.sqrt(re*re+V*V),pt=Ce.x-yt/De,Qe=Ce.y+lt/De,Ye=Ne.x-V/He,Ke=Ne.y+re/He,nt=((Ye-pt)*V-(Ke-Qe)*re)/(lt*V-yt*re);ze=pt+lt*nt-$.x,Ue=Qe+yt*nt-$.y;const _t=ze*ze+Ue*Ue;if(_t<=2)return new tt(ze,Ue);Et=Math.sqrt(_t/2)}else{let De=!1;lt>Number.EPSILON?re>Number.EPSILON&&(De=!0):lt<-Number.EPSILON?re<-Number.EPSILON&&(De=!0):Math.sign(yt)===Math.sign(V)&&(De=!0),De?(ze=-yt,Ue=lt,Et=Math.sqrt(Ee)):(ze=lt,Ue=yt,Et=Math.sqrt(Ee/2))}return new tt(ze/Et,Ue/Et)}const q=[];for(let $=0,Ce=Y.length,Ne=Ce-1,ze=$+1;$=0;$--){const Ce=$/y,Ne=m*Math.cos(Ce*Math.PI/2),ze=v*Math.sin(Ce*Math.PI/2)+w;for(let Ue=0,Et=Y.length;Ue=0;){const ze=Ne;let Ue=Ne-1;Ue<0&&(Ue=$.length-1);for(let Et=0,lt=u+y*2;Et0)&&m.push(x,S,T),(g!==r-1||l0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class y$ extends Mi{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Lt(16777215),this.specular=new Lt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Lt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wu,this.normalScale=new tt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new To,this.combine=Nv,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class w$ extends Mi{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Lt(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Lt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wu,this.normalScale=new tt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class _$ extends Mi{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wu,this.normalScale=new tt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class pP extends Mi{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Lt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Lt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wu,this.normalScale=new tt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new To,this.combine=Nv,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class M$ extends Mi{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Lt(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wu,this.normalScale=new tt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class x$ extends xs{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function Kf(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function b$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function S$(t){function e(i,s){return t[i]-t[s]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function JI(t,e,n){const r=t.length,i=new t.constructor(r);for(let s=0,o=0;o!==r;++s){const a=n[s]*e;for(let l=0;l!==e;++l)i[o++]=t[a+l]}return i}function mP(t,e,n,r){let i=1,s=t[0];for(;s!==void 0&&s[r]===void 0;)s=t[i++];if(s===void 0)return;let o=s[r];if(o!==void 0)if(Array.isArray(o))do o=s[r],o!==void 0&&(e.push(s.time),n.push.apply(n,o)),s=t[i++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[r],o!==void 0&&(e.push(s.time),o.toArray(n,n.length)),s=t[i++];while(s!==void 0);else do o=s[r],o!==void 0&&(e.push(s.time),n.push(o)),s=t[i++];while(s!==void 0)}function zTe(t,e,n,r,i=30){const s=t.clone();s.name=e;const o=[];for(let l=0;l=r)){f.push(c.times[m]);for(let w=0;ws.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[v]){const g=v*f+u,_=g+f-u;w=a.values.slice(g,_)}else{const g=a.createInterpolant(),_=u,x=f-u;g.evaluate(s),w=g.resultBuffer.slice(_,x)}l==="quaternion"&&new Ti().fromArray(w).normalize().conjugate().toArray(w);const y=c.times.length;for(let g=0;g=s)){const a=n[1];e=s)break t}o=r,r=0;break n}break e}for(;r>>1;en;)--o;if(++o,s!==0||o!==i){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=r.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,s=r.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=r[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(i!==void 0&&b$(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),r=this.getValueSize(),i=this.getInterpolation()===Z_,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*r,l=o*r,c=0;c!==r;++c)n[l+c]=n[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=n.slice(0,o*r)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}Ha.prototype.TimeBufferType=Float32Array;Ha.prototype.ValueBufferType=Float32Array;Ha.prototype.DefaultInterpolation=pm;class Yd extends Ha{constructor(e,n,r){super(e,n,r)}}Yd.prototype.ValueTypeName="bool";Yd.prototype.ValueBufferType=Array;Yd.prototype.DefaultInterpolation=hm;Yd.prototype.InterpolantFactoryMethodLinear=void 0;Yd.prototype.InterpolantFactoryMethodSmooth=void 0;class vP extends Ha{}vP.prototype.ValueTypeName="color";class Ld extends Ha{}Ld.prototype.ValueTypeName="number";class A$ extends Wm{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(r-n)/(i-n);let c=e*a;for(let u=c+a;c!==u;c+=4)Ti.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Rd extends Ha{InterpolantFactoryMethodLinear(e){return new A$(this.times,this.values,this.getValueSize(),e)}}Rd.prototype.ValueTypeName="quaternion";Rd.prototype.InterpolantFactoryMethodSmooth=void 0;class Qd extends Ha{constructor(e,n,r){super(e,n,r)}}Qd.prototype.ValueTypeName="string";Qd.prototype.ValueBufferType=Array;Qd.prototype.DefaultInterpolation=hm;Qd.prototype.InterpolantFactoryMethodLinear=void 0;Qd.prototype.InterpolantFactoryMethodSmooth=void 0;class Pd extends Ha{}Pd.prototype.ValueTypeName="vector";class ym{constructor(e="",n=-1,r=[],i=iS){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=Eo(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let o=0,a=r.length;o!==a;++o)n.push(WTe(r[o]).scale(i));const s=new this(e.name,e.duration,n,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const n=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=r.length;s!==o;++s)n.push(Ha.toJSON(r[s]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const s=n.length,o=[];for(let a=0;a1){const f=u[1];let h=i[f];h||(i[f]=h=[]),h.push(c)}}const o=[];for(const a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],n,r));return o}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(f,h,m,v,w){if(m.length!==0){const y=[],g=[];mP(m,y,g,v),y.length!==0&&w.push(new f(h,y,g))}},i=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let f=0;f{n&&n(s),this.manager.itemEnd(e)},0),s;if(Ol[e]!==void 0){Ol[e].push({onLoad:n,onProgress:r,onError:i});return}Ol[e]=[],Ol[e].push({onLoad:n,onProgress:r,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=Ol[e],f=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),m=h?parseInt(h):0,v=m!==0;let w=0;const y=new ReadableStream({start(g){_();function _(){f.read().then(({done:x,value:S})=>{if(x)g.close();else{w+=S.byteLength;const D=new ProgressEvent("progress",{lengthComputable:v,loaded:w,total:m});for(let T=0,E=u.length;T{g.error(x)})}}});return new Response(y)}else throw new $Te(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const f=/charset="?([^;"\s]*)"?/i.exec(a),h=f&&f[1]?f[1].toLowerCase():void 0,m=new TextDecoder(h);return c.arrayBuffer().then(v=>m.decode(v))}}}).then(c=>{Kl.add(e,c);const u=Ol[e];delete Ol[e];for(let f=0,h=u.length;f{const u=Ol[e];if(u===void 0)throw this.manager.itemError(e),c;delete Ol[e];for(let f=0,h=u.length;f{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class JTe extends es{constructor(e){super(e)}load(e,n,r,i){const s=this,o=new Qi(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{n(s.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),s.manager.itemError(e)}},r,i)}parse(e){const n=[];for(let r=0;r0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(i.uniforms[s]={},o.type){case"t":i.uniforms[s].value=r(o.value);break;case"c":i.uniforms[s].value=new Lt().setHex(o.value);break;case"v2":i.uniforms[s].value=new tt().fromArray(o.value);break;case"v3":i.uniforms[s].value=new Z().fromArray(o.value);break;case"v4":i.uniforms[s].value=new or().fromArray(o.value);break;case"m3":i.uniforms[s].value=new wn().fromArray(o.value);break;case"m4":i.uniforms[s].value=new Kt().fromArray(o.value);break;default:i.uniforms[s].value=o.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(i.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)i.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(i.lights=e.lights),e.clipping!==void 0&&(i.clipping=e.clipping),e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=r(e.map)),e.matcap!==void 0&&(i.matcap=r(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=r(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=r(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=r(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),i.normalScale=new tt().fromArray(s)}return e.displacementMap!==void 0&&(i.displacementMap=r(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=r(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=r(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=r(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=r(e.specularMap)),e.specularIntensityMap!==void 0&&(i.specularIntensityMap=r(e.specularIntensityMap)),e.specularColorMap!==void 0&&(i.specularColorMap=r(e.specularColorMap)),e.envMap!==void 0&&(i.envMap=r(e.envMap)),e.envMapRotation!==void 0&&i.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=r(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=r(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=r(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=r(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=r(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=r(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new tt().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(i.iridescenceMap=r(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=r(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(i.transmissionMap=r(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=r(e.thicknessMap)),e.anisotropyMap!==void 0&&(i.anisotropyMap=r(e.anisotropyMap)),e.sheenColorMap!==void 0&&(i.sheenColorMap=r(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=r(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const n={ShadowMaterial:g$,SpriteMaterial:rP,RawShaderMaterial:v$,ShaderMaterial:qi,PointsMaterial:dS,MeshPhysicalMaterial:pa,MeshStandardMaterial:Yv,MeshPhongMaterial:y$,MeshToonMaterial:w$,MeshNormalMaterial:_$,MeshLambertMaterial:pP,MeshDepthMaterial:lS,MeshDistanceMaterial:tP,MeshBasicMaterial:Js,MeshMatcapMaterial:M$,LineDashedMaterial:x$,LineBasicMaterial:xs,Material:Mi};return new n[e]}}class vu{static decodeText(e){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let r=0,i=e.length;r0){const l=new AS(n);s=new $1(l),s.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){i=new $1(this.manager),i.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{const y=new Ui;y.min.fromArray(w.boxMin),y.max.fromArray(w.boxMax);const g=new Fi;return g.radius=w.sphereRadius,g.center.fromArray(w.sphereCenter),{boxInitialized:w.boxInitialized,box:y,sphereInitialized:w.sphereInitialized,sphere:g}}),o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._geometryCount=e.geometryCount,o._matricesTexture=c(e.matricesTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=c(e.colorsTexture.uuid));break;case"LOD":o=new i$;break;case"Line":o=new dc(a(e.geometry),l(e.material));break;case"LineLoop":o=new oP(a(e.geometry),l(e.material));break;case"LineSegments":o=new ja(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new aP(a(e.geometry),l(e.material));break;case"Sprite":o=new r$(l(e.material));break;case"Group":o=new Xl;break;case"Bone":o=new fS;break;default:o=new Vn}if(o.uuid=e.uuid,e.name!==void 0&&(o.name=e.name),e.matrix!==void 0?(o.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(e.position!==void 0&&o.position.fromArray(e.position),e.rotation!==void 0&&o.rotation.fromArray(e.rotation),e.quaternion!==void 0&&o.quaternion.fromArray(e.quaternion),e.scale!==void 0&&o.scale.fromArray(e.scale)),e.up!==void 0&&o.up.fromArray(e.up),e.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(o.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(o.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(o.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(o.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(o.visible=e.visible),e.frustumCulled!==void 0&&(o.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(o.renderOrder=e.renderOrder),e.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const h=e.children;for(let m=0;m"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Kl.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(c=>{n&&n(c),s.manager.itemEnd(e)}).catch(c=>{i&&i(c)});return}return setTimeout(function(){n&&n(o),s.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return Kl.add(e,c),n&&n(c),s.manager.itemEnd(e),c}).catch(function(c){i&&i(c),Kl.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});Kl.add(e,l),s.manager.itemStart(e)}}let a_;class bP{static getContext(){return a_===void 0&&(a_=new(window.AudioContext||window.webkitAudioContext)),a_}static setContext(e){a_=e}}class eIe extends es{constructor(e){super(e)}load(e,n,r,i){const s=this,o=new Qi(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const c=l.slice(0);bP.getContext().decodeAudioData(c,function(f){n(f)}).catch(a)}catch(c){a(c)}},r,i);function a(l){i?i(l):console.error(l),s.manager.itemError(e)}}}const uU=new Kt,fU=new Kt,Mf=new Kt;class tIe{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Ci,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Ci,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const n=this._cache;if(n.focus!==e.focus||n.fov!==e.fov||n.aspect!==e.aspect*this.aspect||n.near!==e.near||n.far!==e.far||n.zoom!==e.zoom||n.eyeSep!==this.eyeSep){n.focus=e.focus,n.fov=e.fov,n.aspect=e.aspect*this.aspect,n.near=e.near,n.far=e.far,n.zoom=e.zoom,n.eyeSep=this.eyeSep,Mf.copy(e.projectionMatrix);const i=n.eyeSep/2,s=i*n.near/n.focus,o=n.near*Math.tan(ad*n.fov*.5)/n.zoom;let a,l;fU.elements[12]=-i,uU.elements[12]=i,a=-o*n.aspect+s,l=o*n.aspect+s,Mf.elements[0]=2*n.near/(l-a),Mf.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(Mf),a=-o*n.aspect-s,l=o*n.aspect-s,Mf.elements[0]=2*n.near/(l-a),Mf.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(Mf)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(fU),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(uU)}}class SP{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=dU(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const n=dU();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function dU(){return(typeof performance>"u"?Date:performance).now()}const xf=new Z,hU=new Ti,nIe=new Z,bf=new Z;class rIe extends Vn{constructor(){super(),this.type="AudioListener",this.context=bP.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new SP}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const n=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(xf,hU,nIe),bf.set(0,0,-1).applyQuaternion(hU),n.positionX){const i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(xf.x,i),n.positionY.linearRampToValueAtTime(xf.y,i),n.positionZ.linearRampToValueAtTime(xf.z,i),n.forwardX.linearRampToValueAtTime(bf.x,i),n.forwardY.linearRampToValueAtTime(bf.y,i),n.forwardZ.linearRampToValueAtTime(bf.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(xf.x,xf.y,xf.z),n.setOrientation(bf.x,bf.y,bf.z,r.x,r.y,r.z)}}class F$ extends Vn{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const n=this.context.createBufferSource();return n.buffer=this.buffer,n.loop=this.loop,n.loopStart=this.loopStart,n.loopEnd=this.loopEnd,n.onended=this.onEnded.bind(this),n.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=n,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,n=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,n=this.filters.length;e0&&this._mixBufferRegionAdditive(r,i,this._addIndex*n,1,n);for(let l=n,c=n+n;l!==c;++l)if(r[l]!==r[l+n]){a.setValue(r,i);break}}saveOriginalState(){const e=this.binding,n=this.buffer,r=this.valueSize,i=r*this._origIndex;e.getValue(n,i);for(let s=r,o=i;s!==o;++s)n[s]=n[i+s%r];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,n=e+this.valueSize;for(let r=e;r=.5)for(let o=0;o!==s;++o)e[n+o]=e[r+o]}_slerp(e,n,r,i){Ti.slerpFlat(e,n,e,n,e,r,i)}_slerpAdditive(e,n,r,i,s){const o=this._workIndex*s;Ti.multiplyQuaternionsFlat(e,o,e,n,e,r),Ti.slerpFlat(e,n,e,n,e,o,i)}_lerp(e,n,r,i,s){const o=1-i;for(let a=0;a!==s;++a){const l=n+a;e[l]=e[l]*o+e[r+a]*i}}_lerpAdditive(e,n,r,i,s){for(let o=0;o!==s;++o){const a=n+o;e[a]=e[a]+e[r+o]*i}}}const CP="\\[\\]\\.:\\/",aIe=new RegExp("["+CP+"]","g"),EP="[^"+CP+"]",lIe="[^"+CP.replace("\\.","")+"]",cIe=/((?:WC+[\/:])*)/.source.replace("WC",EP),uIe=/(WCOD+)?/.source.replace("WCOD",lIe),fIe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",EP),dIe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",EP),hIe=new RegExp("^"+cIe+uIe+fIe+dIe+"$"),pIe=["material","materials","bones","map"];class mIe{constructor(e,n,r){const i=r||$n.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=r.length;i!==s;++i)r[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}}class $n{constructor(e,n,r){this.path=n,this.parsedPath=r||$n.parseTrackName(n),this.node=$n.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new $n.Composite(e,n,r):new $n(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(aIe,"")}static parseTrackName(e){const n=hIe.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const s=r.nodeName.substring(i+1);pIe.indexOf(s)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=s)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){const r=function(s){for(let o=0;o=s){const f=s++,h=e[f];n[h.uuid]=u,e[u]=h,n[c]=f,e[f]=l;for(let m=0,v=i;m!==v;++m){const w=r[m],y=w[f],g=w[u];w[u]=y,w[f]=g}}}this.nCachedObjects_=s}uncache(){const e=this._objects,n=this._indicesByUUID,r=this._bindings,i=r.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,f=n[u];if(f!==void 0)if(delete n[u],f0&&(n[m.uuid]=f),e[f]=m,e.pop();for(let v=0,w=i;v!==w;++v){const y=r[v];y[f]=y[h],y.pop()}}}this.nCachedObjects_=s}subscribe_(e,n){const r=this._bindingsIndicesByPath;let i=r[e];const s=this._bindings;if(i!==void 0)return s[i];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,f=new Array(c);i=s.length,r[e]=i,o.push(e),a.push(n),s.push(f);for(let h=u,m=l.length;h!==m;++h){const v=l[h];f[h]=new $n(v,e,n)}return f}unsubscribe_(e){const n=this._bindingsIndicesByPath,r=n[e];if(r!==void 0){const i=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];n[c]=r,o[r]=l,o.pop(),s[r]=s[a],s.pop(),i[r]=i[a],i.pop()}}}class z${constructor(e,n,r=null,i=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=r,this.blendMode=i;const s=n.tracks,o=s.length,a=new Array(o),l={endingStart:Jf,endingEnd:Jf};for(let c=0;c!==o;++c){const u=s[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=IW,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,n){return this.loop=e,this.repetitions=n,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,n,r){if(e.fadeOut(n),this.fadeIn(n),r){const i=this._clip.duration,s=e._clip.duration,o=s/i,a=i/s;e.warp(1,o,n),this.warp(a,1,n)}return this}crossFadeTo(e,n,r){return e.crossFadeFrom(this,n,r)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,n,r){const i=this._mixer,s=i.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=s,l[1]=s+r,c[0]=e/o,c[1]=n/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,n,r,i){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*r;l<0||r===0?n=0:(this._startTime=null,n=r*l)}n*=this._updateTimeScale(e);const o=this._updateTime(n),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case VR:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulateAdditive(a);break;case iS:default:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulate(i,a)}}}_updateWeight(e){let n=0;if(this.enabled){n=this.weight;const r=this._weightInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=n,n}_updateTimeScale(e){let n=0;if(!this.paused){n=this.timeScale;const r=this._timeScaleInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopWarping(),n===0?this.paused=!0:this.timeScale=n)}}return this._effectiveTimeScale=n,n}_updateTime(e){const n=this._clip.duration,r=this.loop;let i=this.time+e,s=this._loopCount;const o=r===LW;if(e===0)return s===-1?i:o&&(s&1)===1?n-i:i;if(r===TW){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=n)i=n;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),i>=n||i<0){const a=Math.floor(i/n);i-=n*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?n:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=i;if(o&&(s&1)===1)return n-i}return i}_setEndings(e,n,r){const i=this._interpolantSettings;r?(i.endingStart=Yf,i.endingEnd=Yf):(e?i.endingStart=this.zeroSlopeAtStart?Yf:Jf:i.endingStart=k1,n?i.endingEnd=this.zeroSlopeAtEnd?Yf:Jf:i.endingEnd=k1)}_scheduleFading(e,n,r){const i=this._mixer,s=i.time;let o=this._weightInterpolant;o===null&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=n,a[1]=s+e,l[1]=r,this}}const vIe=new Float32Array(1);class yIe extends gc{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const r=e._localRoot||this._root,i=e._clip.tracks,s=i.length,o=e._propertyBindings,a=e._interpolants,l=r.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let f=0;f!==s;++f){const h=i[f],m=h.name;let v=u[m];if(v!==void 0)++v.referenceCount,o[f]=v;else{if(v=o[f],v!==void 0){v._cacheIndex===null&&(++v.referenceCount,this._addInactiveBinding(v,l,m));continue}const w=n&&n._propertyBindings[f].binding.parsedPath;v=new j$($n.create(r,m,w),h.ValueTypeName,h.getValueSize()),++v.referenceCount,this._addInactiveBinding(v,l,m),o[f]=v}a[f].resultBuffer=v.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const r=(e._localRoot||this._root).uuid,i=e._clip.uuid,s=this._actionsByClip[i];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,i,r)}const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const s=n[r];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const s=n[r];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const n=e._cacheIndex;return n!==null&&n=0;--r)e[r].stop();return this}update(e){e*=this.timeScale;const n=this._actions,r=this._nActiveActions,i=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==r;++c)n[c]._update(i,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(o);return this}setTime(e){this.time=0;for(let n=0;n=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,vU).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const yU=new Z,l_=new Z;class EIe{constructor(e=new Z,n=new Z){this.start=e,this.end=n}set(e,n){return this.start.copy(e),this.end.copy(n),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,n){return this.delta(n).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,n){yU.subVectors(e,this.start),l_.subVectors(this.end,this.start);const r=l_.dot(l_);let s=l_.dot(yU)/r;return n&&(s=Vr(s,0,1)),s}closestPointToPoint(e,n,r){const i=this.closestPointToPointParameter(e,n);return this.delta(r).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const wU=new Z;class AIe extends Vn{constructor(e,n){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const r=new mn,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o1)for(let f=0;f.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{SU.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(SU,n)}}setLength(e,n=e*.2,r=n*.2){this.line.scale.set(1,Math.max(1e-4,e-n),1),this.line.updateMatrix(),this.cone.scale.set(r,n,r),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class jIe extends ja{constructor(e=1){const n=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],r=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new mn;i.setAttribute("position",new $t(n,3)),i.setAttribute("color",new $t(r,3));const s=new xs({vertexColors:!0,toneMapped:!1});super(i,s),this.type="AxesHelper"}setColors(e,n,r){const i=new Lt,s=this.geometry.attributes.color.array;return i.set(e),i.toArray(s,0),i.toArray(s,3),i.set(n),i.toArray(s,6),i.toArray(s,9),i.set(r),i.toArray(s,12),i.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class zIe{constructor(){this.type="ShapePath",this.color=new Lt,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new H1,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,r,i){return this.currentPath.quadraticCurveTo(e,n,r,i),this}bezierCurveTo(e,n,r,i,s,o){return this.currentPath.bezierCurveTo(e,n,r,i,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(g){const _=[];for(let x=0,S=g.length;xNumber.EPSILON){if(L<0&&(E=_[T],C=-C,R=_[D],L=-L),g.yR.y)continue;if(g.y===E.y){if(g.x===E.x)return!0}else{const P=L*(g.x-E.x)-C*(g.y-E.y);if(P===0)return!0;if(P<0)continue;S=!S}}else{if(g.y!==E.y)continue;if(R.x<=g.x&&g.x<=E.x||E.x<=g.x&&g.x<=R.x)return!0}}return S}const i=dl.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const c=[];if(s.length===1)return a=s[0],l=new cd,l.curves=a.curves,c.push(l),c;let u=!i(s[0].getPoints());u=e?!u:u;const f=[],h=[];let m=[],v=0,w;h[v]=void 0,m[v]=[];for(let g=0,_=s.length;g<_;g++)a=s[g],w=a.getPoints(),o=i(w),o=e?!o:o,o?(!u&&h[v]&&v++,h[v]={s:new cd,p:w},h[v].s.curves=a.curves,u&&v++,m[v]=[]):m[v].push({h:a,p:w[0]});if(!h[0])return n(s);if(h.length>1){let g=!1,_=0;for(let x=0,S=h.length;x0&&g===!1&&(m=f)}let y;for(let g=0,_=h.length;g<_;g++){l=h[g].s,c.push(l),y=m[g];for(let x=0,S=y.length;x{const f=typeof c=="function"?c(e):c;if(f!==e){const h=e;e=u?f:Object.assign({},e,f),n.forEach(m=>m(e,h))}},i=()=>e,s=(c,u=i,f=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let h=u(e);function m(){const v=u(e);if(!f(h,v)){const w=h;c(h=v,w)}}return n.add(m),()=>n.delete(m)},l={setState:r,getState:i,subscribe:(c,u,f)=>u||f?s(c,u,f):(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return e=t(r,i,l),l}const WIe=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),CU=WIe?I.useEffect:I.useLayoutEffect;function V$(t){const e=typeof t=="function"?VIe(t):t,n=(r=e.getState,i=Object.is)=>{const[,s]=I.useReducer(y=>y+1,0),o=e.getState(),a=I.useRef(o),l=I.useRef(r),c=I.useRef(i),u=I.useRef(!1),f=I.useRef();f.current===void 0&&(f.current=r(o));let h,m=!1;(a.current!==o||l.current!==r||c.current!==i||u.current)&&(h=r(o),m=!i(f.current,h)),CU(()=>{m&&(f.current=h),a.current=o,l.current=r,c.current=i,u.current=!1});const v=I.useRef(o);CU(()=>{const y=()=>{try{const _=e.getState(),x=l.current(_);c.current(f.current,x)||(a.current=_,f.current=x,s())}catch{u.current=!0,s()}},g=e.subscribe(y);return e.getState()!==v.current&&y(),g},[]);const w=m?h:f.current;return I.useDebugValue(w),w};return Object.assign(n,e),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,e];return{next(){const i=r.length<=0;return{value:r.shift(),done:i}}}},n}var W$={exports:{}},_A={exports:{}},MA={};/** + * @license React + * scheduler.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 EU;function $Ie(){return EU||(EU=1,function(t){function e(j,q){var ne=j.length;j.push(q);e:for(;0>>1,_e=j[de];if(0>>1;dei(we,ne))he<_e&&0>i(Ie,we)?(j[de]=Ie,j[he]=ne,de=he):(j[de]=we,j[ce]=ne,de=ce);else if(he<_e&&0>i(Ie,ne))j[de]=Ie,j[he]=ne,de=he;else break e}}return q}function i(j,q){var ne=j.sortIndex-q.sortIndex;return ne!==0?ne:j.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,v=!1,w=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(j){for(var q=n(c);q!==null;){if(q.callback===null)r(c);else if(q.startTime<=j)r(c),q.sortIndex=q.expirationTime,e(l,q);else break;q=n(c)}}function S(j){if(w=!1,x(j),!v)if(n(l)!==null)v=!0,ee(D);else{var q=n(c);q!==null&&le(S,q.startTime-j)}}function D(j,q){v=!1,w&&(w=!1,g(R),R=-1),m=!0;var ne=h;try{for(x(q),f=n(l);f!==null&&(!(f.expirationTime>q)||j&&!P());){var de=f.callback;if(typeof de=="function"){f.callback=null,h=f.priorityLevel;var _e=de(f.expirationTime<=q);q=t.unstable_now(),typeof _e=="function"?f.callback=_e:f===n(l)&&r(l),x(q)}else r(l);f=n(l)}if(f!==null)var ge=!0;else{var ce=n(c);ce!==null&&le(S,ce.startTime-q),ge=!1}return ge}finally{f=null,h=ne,m=!1}}var T=!1,E=null,R=-1,C=5,L=-1;function P(){return!(t.unstable_now()-Lj||125de?(j.sortIndex=ne,e(c,j),n(l)===null&&j===n(c)&&(w?(g(R),R=-1):w=!0,le(S,ne-de))):(j.sortIndex=_e,e(l,j),v||m||(v=!0,ee(D))),j},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(j){var q=h;return function(){var ne=h;h=q;try{return j.apply(this,arguments)}finally{h=ne}}}}(MA)),MA}var AU;function JIe(){return AU||(AU=1,_A.exports=$Ie()),_A.exports}/** + * @license React + * react-reconciler.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 YIe=function(e){var n={},r=I,i=JIe(),s=Object.assign;function o(d){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+d,b=1;bye||N[oe]!==G[ye]){var Je=` +`+N[oe].replace(" at new "," at ");return d.displayName&&Je.includes("")&&(Je=Je.replace("",d.displayName)),Je}while(1<=oe&&0<=ye);break}}}finally{Ve=!1,Error.prepareStackTrace=b}return(d=d?d.displayName||d.name:"")?ht(d):""}var ft=Object.prototype.hasOwnProperty,Mt=[],qe=-1;function St(d){return{current:d}}function at(d){0>qe||(d.current=Mt[qe],Mt[qe]=null,qe--)}function Oe(d,p){qe++,Mt[qe]=d.current,d.current=p}var kt={},Pt=St(kt),Ut=St(!1),yn=kt;function Tn(d,p){var b=d.type.contextTypes;if(!b)return kt;var A=d.stateNode;if(A&&A.__reactInternalMemoizedUnmaskedChildContext===p)return A.__reactInternalMemoizedMaskedChildContext;var N={},G;for(G in b)N[G]=p[G];return A&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=p,d.__reactInternalMemoizedMaskedChildContext=N),N}function ar(d){return d=d.childContextTypes,d!=null}function cn(){at(Ut),at(Pt)}function ln(d,p,b){if(Pt.current!==kt)throw Error(o(168));Oe(Pt,p),Oe(Ut,b)}function dr(d,p,b){var A=d.stateNode;if(p=p.childContextTypes,typeof A.getChildContext!="function")return b;A=A.getChildContext();for(var N in A)if(!(N in p))throw Error(o(108,R(d)||"Unknown",N));return s({},b,A)}function nn(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||kt,yn=Pt.current,Oe(Pt,d),Oe(Ut,Ut.current),!0}function on(d,p,b){var A=d.stateNode;if(!A)throw Error(o(169));b?(d=dr(d,p,yn),A.__reactInternalMemoizedMergedChildContext=d,at(Ut),at(Pt),Oe(Pt,d)):at(Ut),Oe(Ut,b)}var tr=Math.clz32?Math.clz32:kn,zi=Math.log,Ri=Math.LN2;function kn(d){return d>>>=0,d===0?32:31-(zi(d)/Ri|0)|0}var bl=64,Ga=4194304;function ma(d){switch(d&-d){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 d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Kd(d,p){var b=d.pendingLanes;if(b===0)return 0;var A=0,N=d.suspendedLanes,G=d.pingedLanes,oe=b&268435455;if(oe!==0){var ye=oe&~N;ye!==0?A=ma(ye):(G&=oe,G!==0&&(A=ma(G)))}else oe=b&~N,oe!==0?A=ma(oe):G!==0&&(A=ma(G));if(A===0)return 0;if(p!==0&&p!==A&&!(p&N)&&(N=A&-A,G=p&-p,N>=G||N===16&&(G&4194240)!==0))return p;if(A&4&&(A|=b&16),p=d.entangledLanes,p!==0)for(d=d.entanglements,p&=A;0b;b++)p.push(d);return p}function Yu(d,p,b){d.pendingLanes|=p,p!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,p=31-tr(p),d[p]=b}function Qu(d,p){var b=d.pendingLanes&~p;d.pendingLanes=p,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=p,d.mutableReadLanes&=p,d.entangledLanes&=p,p=d.entanglements;var A=d.eventTimes;for(d=d.expirationTimes;0>=oe,N-=oe,ke=1<<32-tr(p)+N|b<Xn?(Di=hn,hn=null):Di=hn.sibling;var Kn=tn(Re,hn,Fe[Xn],Ot);if(Kn===null){hn===null&&(hn=Di);break}d&&hn&&Kn.alternate===null&&p(Re,hn),Me=G(Kn,Me,Xn),Sn===null?Yt=Kn:Sn.sibling=Kn,Sn=Kn,hn=Di}if(Xn===Fe.length)return b(Re,hn),On&&Hn(Re,Xn),Yt;if(hn===null){for(;XnXn?(Di=hn,hn=null):Di=hn.sibling;var Cc=tn(Re,hn,Kn.value,Ot);if(Cc===null){hn===null&&(hn=Di);break}d&&hn&&Cc.alternate===null&&p(Re,hn),Me=G(Cc,Me,Xn),Sn===null?Yt=Cc:Sn.sibling=Cc,Sn=Cc,hn=Di}if(Kn.done)return b(Re,hn),On&&Hn(Re,Xn),Yt;if(hn===null){for(;!Kn.done;Xn++,Kn=Fe.next())Kn=dn(Re,Kn.value,Ot),Kn!==null&&(Me=G(Kn,Me,Xn),Sn===null?Yt=Kn:Sn.sibling=Kn,Sn=Kn);return On&&Hn(Re,Xn),Yt}for(hn=A(Re,hn);!Kn.done;Xn++,Kn=Fe.next())Kn=pr(hn,Re,Xn,Kn.value,Ot),Kn!==null&&(d&&Kn.alternate!==null&&hn.delete(Kn.key===null?Xn:Kn.key),Me=G(Kn,Me,Xn),Sn===null?Yt=Kn:Sn.sibling=Kn,Sn=Kn);return d&&hn.forEach(function(lY){return p(Re,lY)}),On&&Hn(Re,Xn),Yt}function zo(Re,Me,Fe,Ot){if(typeof Fe=="object"&&Fe!==null&&Fe.type===u&&Fe.key===null&&(Fe=Fe.props.children),typeof Fe=="object"&&Fe!==null){switch(Fe.$$typeof){case l:e:{for(var Yt=Fe.key,Sn=Me;Sn!==null;){if(Sn.key===Yt){if(Yt=Fe.type,Yt===u){if(Sn.tag===7){b(Re,Sn.sibling),Me=N(Sn,Fe.props.children),Me.return=Re,Re=Me;break e}}else if(Sn.elementType===Yt||typeof Yt=="object"&&Yt!==null&&Yt.$$typeof===x&&HP(Yt)===Sn.type){b(Re,Sn.sibling),Me=N(Sn,Fe.props),Me.ref=t0(Re,Sn,Fe),Me.return=Re,Re=Me;break e}b(Re,Sn);break}else p(Re,Sn);Sn=Sn.sibling}Fe.type===u?(Me=df(Fe.props.children,Re.mode,Ot,Fe.key),Me.return=Re,Re=Me):(Ot=ky(Fe.type,Fe.key,Fe.props,null,Re.mode,Ot),Ot.ref=t0(Re,Me,Fe),Ot.return=Re,Re=Ot)}return oe(Re);case c:e:{for(Sn=Fe.key;Me!==null;){if(Me.key===Sn)if(Me.tag===4&&Me.stateNode.containerInfo===Fe.containerInfo&&Me.stateNode.implementation===Fe.implementation){b(Re,Me.sibling),Me=N(Me,Fe.children||[]),Me.return=Re,Re=Me;break e}else{b(Re,Me);break}else p(Re,Me);Me=Me.sibling}Me=wC(Fe,Re.mode,Ot),Me.return=Re,Re=Me}return oe(Re);case x:return Sn=Fe._init,zo(Re,Me,Sn(Fe._payload),Ot)}if(ie(Fe))return Xt(Re,Me,Fe,Ot);if(T(Fe))return os(Re,Me,Fe,Ot);iy(Re,Fe)}return typeof Fe=="string"&&Fe!==""||typeof Fe=="number"?(Fe=""+Fe,Me!==null&&Me.tag===6?(b(Re,Me.sibling),Me=N(Me,Fe),Me.return=Re,Re=Me):(b(Re,Me),Me=yC(Fe,Re.mode,Ot),Me.return=Re,Re=Me),oe(Re)):b(Re,Me)}return zo}var ah=GP(!0),VP=GP(!1),n0={},Oo=St(n0),r0=St(n0),lh=St(n0);function $a(d){if(d===n0)throw Error(o(174));return d}function BS(d,p){Oe(lh,p),Oe(r0,d),Oe(Oo,n0),d=le(p),at(Oo),Oe(Oo,d)}function ch(){at(Oo),at(r0),at(lh)}function WP(d){var p=$a(lh.current),b=$a(Oo.current);p=j(b,d.type,p),b!==p&&(Oe(r0,d),Oe(Oo,p))}function OS(d){r0.current===d&&(at(Oo),at(r0))}var Ir=St(0);function sy(d){for(var p=d;p!==null;){if(p.tag===13){var b=p.memoizedState;if(b!==null&&(b=b.dehydrated,b===null||Se(b)||Ge(b)))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if(p.flags&128)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===d)break;for(;p.sibling===null;){if(p.return===null||p.return===d)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var US=[];function FS(){for(var d=0;db?b:4,d(!0);var A=Uo.transition;Uo.transition={};try{d(!1),p()}finally{zn=b,Uo.transition=A}}function sD(){return Ja().memoizedState}function kJ(d,p,b){var A=xc(d);b={lane:A,action:b,hasEagerState:!1,eagerState:null,next:null},oD(d)?aD(p,b):(lD(d,p,b),b=Es(),d=Fo(d,A,b),d!==null&&cD(d,p,A))}function BJ(d,p,b){var A=xc(d),N={lane:A,action:b,hasEagerState:!1,eagerState:null,next:null};if(oD(d))aD(p,N);else{lD(d,p,N);var G=d.alternate;if(d.lanes===0&&(G===null||G.lanes===0)&&(G=p.lastRenderedReducer,G!==null))try{var oe=p.lastRenderedState,ye=G(oe,b);if(N.hasEagerState=!0,N.eagerState=ye,to(ye,oe))return}catch{}finally{}b=Es(),d=Fo(d,A,b),d!==null&&cD(d,p,A)}}function oD(d){var p=d.alternate;return d===Fr||p!==null&&p===Fr}function aD(d,p){i0=ay=!0;var b=d.pending;b===null?p.next=p:(p.next=b.next,b.next=p),d.pending=p}function lD(d,p,b){ui!==null&&d.mode&1&&!(An&2)?(d=p.interleaved,d===null?(b.next=b,ts===null?ts=[p]:ts.push(p)):(b.next=d.next,d.next=b),p.interleaved=b):(d=p.pending,d===null?b.next=b:(b.next=d.next,d.next=b),p.pending=b)}function cD(d,p,b){if(b&4194240){var A=p.lanes;A&=d.pendingLanes,b|=A,p.lanes=b,No(d,b)}}var dy={readContext:bs,useCallback:is,useContext:is,useEffect:is,useImperativeHandle:is,useInsertionEffect:is,useLayoutEffect:is,useMemo:is,useReducer:is,useRef:is,useState:is,useDebugValue:is,useDeferredValue:is,useTransition:is,useMutableSource:is,useSyncExternalStore:is,useId:is,unstable_isNewReconciler:!1},OJ={readContext:bs,useCallback:function(d,p){return Il().memoizedState=[d,p===void 0?null:p],d},useContext:bs,useEffect:VS,useImperativeHandle:function(d,p,b){return b=b!=null?b.concat([d]):null,uy(4194308,4,tD.bind(null,p,d),b)},useLayoutEffect:function(d,p){return uy(4194308,4,d,p)},useInsertionEffect:function(d,p){return uy(4,2,d,p)},useMemo:function(d,p){var b=Il();return p=p===void 0?null:p,d=d(),b.memoizedState=[d,p],d},useReducer:function(d,p,b){var A=Il();return p=b!==void 0?b(p):p,A.memoizedState=A.baseState=p,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:p},A.queue=d,d=d.dispatch=kJ.bind(null,Fr,d),[A.memoizedState,d]},useRef:function(d){var p=Il();return d={current:d},p.memoizedState=d},useState:GS,useDebugValue:WS,useDeferredValue:function(d){var p=GS(d),b=p[0],A=p[1];return VS(function(){var N=Uo.transition;Uo.transition={};try{A(d)}finally{Uo.transition=N}},[d]),b},useTransition:function(){var d=GS(!1),p=d[0];return d=NJ.bind(null,d[1]),Il().memoizedState=d,[p,d]},useMutableSource:function(){},useSyncExternalStore:function(d,p,b){var A=Fr,N=Il();if(On){if(b===void 0)throw Error(o(407));b=b()}else{if(b=p(),ui===null)throw Error(o(349));uh&30||YP(A,p,b)}N.memoizedState=b;var G={value:b,getSnapshot:p};return N.queue=G,VS(XP.bind(null,A,G,d),[d]),A.flags|=2048,o0(9,QP.bind(null,A,G,b,p),void 0,null),b},useId:function(){var d=Il(),p=ui.identifierPrefix;if(On){var b=wt,A=ke;b=(A&~(1<<32-tr(A)-1)).toString(32)+b,p=":"+p+"R"+b,b=s0++,0uC&&(p.flags|=128,A=!0,u0(N,!1),p.lanes=4194304)}else{if(!A)if(d=sy(G),d!==null){if(p.flags|=128,A=!0,d=d.updateQueue,d!==null&&(p.updateQueue=d,p.flags|=4),u0(N,!0),N.tail===null&&N.tailMode==="hidden"&&!G.alternate&&!On)return ss(p),null}else 2*oi()-N.renderingStartTime>uC&&b!==1073741824&&(p.flags|=128,A=!0,u0(N,!1),p.lanes=4194304);N.isBackwards?(G.sibling=p.child,p.child=G):(d=N.last,d!==null?d.sibling=G:p.child=G,N.last=G)}return N.tail!==null?(p=N.tail,N.rendering=p,N.tail=p.sibling,N.renderingStartTime=oi(),p.sibling=null,d=Ir.current,Oe(Ir,A?d&1|2:d&1),p):(ss(p),null);case 22:case 23:return mC(),A=p.memoizedState!==null,d!==null&&d.memoizedState!==null!==A&&(p.flags|=8192),A&&p.mode&1?ao&1073741824&&(ss(p),ut&&p.subtreeFlags&6&&(p.flags|=8192)):ss(p),null;case 24:return null;case 25:return null}throw Error(o(156,p.tag))}var HJ=a.ReactCurrentOwner,oo=!1;function Cs(d,p,b,A){p.child=d===null?VP(p,null,b,A):ah(p,d.child,b,A)}function vD(d,p,b,A,N){b=b.render;var G=p.ref;return wc(p,N),A=zS(d,p,b,A,G,N),b=HS(),d!==null&&!oo?(p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~N,Ll(d,p,N)):(On&&b&&Bn(p),p.flags|=1,Cs(d,p,A,N),p.child)}function yD(d,p,b,A,N){if(d===null){var G=b.type;return typeof G=="function"&&!vC(G)&&G.defaultProps===void 0&&b.compare===null&&b.defaultProps===void 0?(p.tag=15,p.type=G,wD(d,p,G,A,N)):(d=ky(b.type,null,A,p,p.mode,N),d.ref=p.ref,d.return=p,p.child=d)}if(G=d.child,!(d.lanes&N)){var oe=G.memoizedProps;if(b=b.compare,b=b!==null?b:El,b(oe,A)&&d.ref===p.ref)return Ll(d,p,N)}return p.flags|=1,d=Sc(G,A),d.ref=p.ref,d.return=p,p.child=d}function wD(d,p,b,A,N){if(d!==null&&El(d.memoizedProps,A)&&d.ref===p.ref)if(oo=!1,(d.lanes&N)!==0)d.flags&131072&&(oo=!0);else return p.lanes=d.lanes,Ll(d,p,N);return YS(d,p,b,A,N)}function _D(d,p,b){var A=p.pendingProps,N=A.children,G=d!==null?d.memoizedState:null;if(A.mode==="hidden")if(!(p.mode&1))p.memoizedState={baseLanes:0,cachePool:null},Oe(fh,ao),ao|=b;else if(b&1073741824)p.memoizedState={baseLanes:0,cachePool:null},A=G!==null?G.baseLanes:b,Oe(fh,ao),ao|=A;else return d=G!==null?G.baseLanes|b:b,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:d,cachePool:null},p.updateQueue=null,Oe(fh,ao),ao|=d,null;else G!==null?(A=G.baseLanes|b,p.memoizedState=null):A=b,Oe(fh,ao),ao|=A;return Cs(d,p,N,b),p.child}function MD(d,p){var b=p.ref;(d===null&&b!==null||d!==null&&d.ref!==b)&&(p.flags|=512,p.flags|=2097152)}function YS(d,p,b,A,N){var G=ar(b)?yn:Pt.current;return G=Tn(p,G),wc(p,N),b=zS(d,p,b,A,G,N),A=HS(),d!==null&&!oo?(p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~N,Ll(d,p,N)):(On&&A&&Bn(p),p.flags|=1,Cs(d,p,b,N),p.child)}function xD(d,p,b,A,N){if(ar(b)){var G=!0;nn(p)}else G=!1;if(wc(p,N),p.stateNode===null)d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),sf(p,b,A),sh(p,b,A,N),A=!0;else if(d===null){var oe=p.stateNode,ye=p.memoizedProps;oe.props=ye;var Je=oe.context,xt=b.contextType;typeof xt=="object"&&xt!==null?xt=bs(xt):(xt=ar(b)?yn:Pt.current,xt=Tn(p,xt));var Ht=b.getDerivedStateFromProps,dn=typeof Ht=="function"||typeof oe.getSnapshotBeforeUpdate=="function";dn||typeof oe.UNSAFE_componentWillReceiveProps!="function"&&typeof oe.componentWillReceiveProps!="function"||(ye!==A||Je!==xt)&&ns(p,oe,A,xt),ga=!1;var tn=p.memoizedState;oe.state=tn,nf(p,A,oe,N),Je=p.memoizedState,ye!==A||tn!==Je||Ut.current||ga?(typeof Ht=="function"&&(ih(p,b,Ht,A),Je=p.memoizedState),(ye=ga||qm(p,b,ye,A,tn,Je,xt))?(dn||typeof oe.UNSAFE_componentWillMount!="function"&&typeof oe.componentWillMount!="function"||(typeof oe.componentWillMount=="function"&&oe.componentWillMount(),typeof oe.UNSAFE_componentWillMount=="function"&&oe.UNSAFE_componentWillMount()),typeof oe.componentDidMount=="function"&&(p.flags|=4194308)):(typeof oe.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=A,p.memoizedState=Je),oe.props=A,oe.state=Je,oe.context=xt,A=ye):(typeof oe.componentDidMount=="function"&&(p.flags|=4194308),A=!1)}else{oe=p.stateNode,rh(d,p),ye=p.memoizedProps,xt=p.type===p.elementType?ye:Yr(p.type,ye),oe.props=xt,dn=p.pendingProps,tn=oe.context,Je=b.contextType,typeof Je=="object"&&Je!==null?Je=bs(Je):(Je=ar(b)?yn:Pt.current,Je=Tn(p,Je));var pr=b.getDerivedStateFromProps;(Ht=typeof pr=="function"||typeof oe.getSnapshotBeforeUpdate=="function")||typeof oe.UNSAFE_componentWillReceiveProps!="function"&&typeof oe.componentWillReceiveProps!="function"||(ye!==dn||tn!==Je)&&ns(p,oe,A,Je),ga=!1,tn=p.memoizedState,oe.state=tn,nf(p,A,oe,N);var Xt=p.memoizedState;ye!==dn||tn!==Xt||Ut.current||ga?(typeof pr=="function"&&(ih(p,b,pr,A),Xt=p.memoizedState),(xt=ga||qm(p,b,xt,A,tn,Xt,Je)||!1)?(Ht||typeof oe.UNSAFE_componentWillUpdate!="function"&&typeof oe.componentWillUpdate!="function"||(typeof oe.componentWillUpdate=="function"&&oe.componentWillUpdate(A,Xt,Je),typeof oe.UNSAFE_componentWillUpdate=="function"&&oe.UNSAFE_componentWillUpdate(A,Xt,Je)),typeof oe.componentDidUpdate=="function"&&(p.flags|=4),typeof oe.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof oe.componentDidUpdate!="function"||ye===d.memoizedProps&&tn===d.memoizedState||(p.flags|=4),typeof oe.getSnapshotBeforeUpdate!="function"||ye===d.memoizedProps&&tn===d.memoizedState||(p.flags|=1024),p.memoizedProps=A,p.memoizedState=Xt),oe.props=A,oe.state=Xt,oe.context=Je,A=xt):(typeof oe.componentDidUpdate!="function"||ye===d.memoizedProps&&tn===d.memoizedState||(p.flags|=4),typeof oe.getSnapshotBeforeUpdate!="function"||ye===d.memoizedProps&&tn===d.memoizedState||(p.flags|=1024),A=!1)}return QS(d,p,b,A,G,N)}function QS(d,p,b,A,N,G){MD(d,p);var oe=(p.flags&128)!==0;if(!A&&!oe)return N&&on(p,b,!1),Ll(d,p,G);A=p.stateNode,HJ.current=p;var ye=oe&&typeof b.getDerivedStateFromError!="function"?null:A.render();return p.flags|=1,d!==null&&oe?(p.child=ah(p,d.child,null,G),p.child=ah(p,null,ye,G)):Cs(d,p,ye,G),p.memoizedState=A.state,N&&on(p,b,!0),p.child}function bD(d){var p=d.stateNode;p.pendingContext?ln(d,p.pendingContext,p.pendingContext!==p.context):p.context&&ln(d,p.context,!1),BS(d,p.containerInfo)}function SD(d,p,b,A,N){return oh(),kS(N),p.flags|=256,Cs(d,p,b,A),p.child}var my={dehydrated:null,treeContext:null,retryLane:0};function gy(d){return{baseLanes:d,cachePool:null}}function CD(d,p,b){var A=p.pendingProps,N=Ir.current,G=!1,oe=(p.flags&128)!==0,ye;if((ye=oe)||(ye=d!==null&&d.memoizedState===null?!1:(N&2)!==0),ye?(G=!0,p.flags&=-129):(d===null||d.memoizedState!==null)&&(N|=1),Oe(Ir,N&1),d===null)return NS(p),d=p.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?(p.mode&1?Ge(d)?p.lanes=8:p.lanes=1073741824:p.lanes=1,null):(N=A.children,d=A.fallback,G?(A=p.mode,G=p.child,N={mode:"hidden",children:N},!(A&1)&&G!==null?(G.childLanes=0,G.pendingProps=N):G=By(N,A,0,null),d=df(d,A,b,null),G.return=p,d.return=p,G.sibling=d,p.child=G,p.child.memoizedState=gy(b),p.memoizedState=my,d):XS(p,N));if(N=d.memoizedState,N!==null){if(ye=N.dehydrated,ye!==null){if(oe)return p.flags&256?(p.flags&=-257,vy(d,p,b,Error(o(422)))):p.memoizedState!==null?(p.child=d.child,p.flags|=128,null):(G=A.fallback,N=p.mode,A=By({mode:"visible",children:A.children},N,0,null),G=df(G,N,b,null),G.flags|=2,A.return=p,G.return=p,A.sibling=G,p.child=A,p.mode&1&&ah(p,d.child,null,b),p.child.memoizedState=gy(b),p.memoizedState=my,G);if(!(p.mode&1))p=vy(d,p,b,null);else if(Ge(ye))p=vy(d,p,b,Error(o(419)));else if(A=(b&d.childLanes)!==0,oo||A){if(A=ui,A!==null){switch(b&-b){case 4:G=2;break;case 16:G=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:G=32;break;case 536870912:G=268435456;break;default:G=0}A=G&(A.suspendedLanes|b)?0:G,A!==0&&A!==N.retryLane&&(N.retryLane=A,Fo(d,A,-1))}gC(),p=vy(d,p,b,Error(o(421)))}else Se(ye)?(p.flags|=128,p.child=d.child,p=tY.bind(null,d),mt(ye,p),p=null):(b=N.treeContext,Ce&&(ci=Gt(ye),sr=p,On=!0,Ss=null,Wa=!1,b!==null&&(H[Q++]=ke,H[Q++]=wt,H[Q++]=be,ke=b.id,wt=b.overflow,be=p)),p=XS(p,p.pendingProps.children),p.flags|=4096);return p}return G?(A=AD(d,p,A.children,A.fallback,b),G=p.child,N=d.child.memoizedState,G.memoizedState=N===null?gy(b):{baseLanes:N.baseLanes|b,cachePool:null},G.childLanes=d.childLanes&~b,p.memoizedState=my,A):(b=ED(d,p,A.children,b),p.memoizedState=null,b)}return G?(A=AD(d,p,A.children,A.fallback,b),G=p.child,N=d.child.memoizedState,G.memoizedState=N===null?gy(b):{baseLanes:N.baseLanes|b,cachePool:null},G.childLanes=d.childLanes&~b,p.memoizedState=my,A):(b=ED(d,p,A.children,b),p.memoizedState=null,b)}function XS(d,p){return p=By({mode:"visible",children:p},d.mode,0,null),p.return=d,d.child=p}function ED(d,p,b,A){var N=d.child;return d=N.sibling,b=Sc(N,{mode:"visible",children:b}),!(p.mode&1)&&(b.lanes=A),b.return=p,b.sibling=null,d!==null&&(A=p.deletions,A===null?(p.deletions=[d],p.flags|=16):A.push(d)),p.child=b}function AD(d,p,b,A,N){var G=p.mode;d=d.child;var oe=d.sibling,ye={mode:"hidden",children:b};return!(G&1)&&p.child!==d?(b=p.child,b.childLanes=0,b.pendingProps=ye,p.deletions=null):(b=Sc(d,ye),b.subtreeFlags=d.subtreeFlags&14680064),oe!==null?A=Sc(oe,A):(A=df(A,G,N,null),A.flags|=2),A.return=p,b.return=p,b.sibling=A,p.child=b,A}function vy(d,p,b,A){return A!==null&&kS(A),ah(p,d.child,null,b),d=XS(p,p.pendingProps.children),d.flags|=2,p.memoizedState=null,d}function TD(d,p,b){d.lanes|=p;var A=d.alternate;A!==null&&(A.lanes|=p),yc(d.return,p,b)}function KS(d,p,b,A,N){var G=d.memoizedState;G===null?d.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:A,tail:b,tailMode:N}:(G.isBackwards=p,G.rendering=null,G.renderingStartTime=0,G.last=A,G.tail=b,G.tailMode=N)}function ID(d,p,b){var A=p.pendingProps,N=A.revealOrder,G=A.tail;if(Cs(d,p,A.children,b),A=Ir.current,A&2)A=A&1|2,p.flags|=128;else{if(d!==null&&d.flags&128)e:for(d=p.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&TD(d,b,p);else if(d.tag===19)TD(d,b,p);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===p)break e;for(;d.sibling===null;){if(d.return===null||d.return===p)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}A&=1}if(Oe(Ir,A),!(p.mode&1))p.memoizedState=null;else switch(N){case"forwards":for(b=p.child,N=null;b!==null;)d=b.alternate,d!==null&&sy(d)===null&&(N=b),b=b.sibling;b=N,b===null?(N=p.child,p.child=null):(N=b.sibling,b.sibling=null),KS(p,!1,N,b,G);break;case"backwards":for(b=null,N=p.child,p.child=null;N!==null;){if(d=N.alternate,d!==null&&sy(d)===null){p.child=N;break}d=N.sibling,N.sibling=b,b=N,N=d}KS(p,!0,b,null,G);break;case"together":KS(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function Ll(d,p,b){if(d!==null&&(p.dependencies=d.dependencies),dh|=p.lanes,!(b&p.childLanes))return null;if(d!==null&&p.child!==d.child)throw Error(o(153));if(p.child!==null){for(d=p.child,b=Sc(d,d.pendingProps),p.child=b,b.return=p;d.sibling!==null;)d=d.sibling,b=b.sibling=Sc(d,d.pendingProps),b.return=p;b.sibling=null}return p.child}function GJ(d,p,b){switch(p.tag){case 3:bD(p),oh();break;case 5:WP(p);break;case 1:ar(p.type)&&nn(p);break;case 4:BS(p,p.stateNode.containerInfo);break;case 10:tf(p,p.type._context,p.memoizedProps.value);break;case 13:var A=p.memoizedState;if(A!==null)return A.dehydrated!==null?(Oe(Ir,Ir.current&1),p.flags|=128,null):b&p.child.childLanes?CD(d,p,b):(Oe(Ir,Ir.current&1),d=Ll(d,p,b),d!==null?d.sibling:null);Oe(Ir,Ir.current&1);break;case 19:if(A=(b&p.childLanes)!==0,d.flags&128){if(A)return ID(d,p,b);p.flags|=128}var N=p.memoizedState;if(N!==null&&(N.rendering=null,N.tail=null,N.lastEffect=null),Oe(Ir,Ir.current),A)break;return null;case 22:case 23:return p.lanes=0,_D(d,p,b)}return Ll(d,p,b)}function VJ(d,p){switch(li(p),p.tag){case 1:return ar(p.type)&&cn(),d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 3:return ch(),at(Ut),at(Pt),FS(),d=p.flags,d&65536&&!(d&128)?(p.flags=d&-65537|128,p):null;case 5:return OS(p),null;case 13:if(at(Ir),d=p.memoizedState,d!==null&&d.dehydrated!==null){if(p.alternate===null)throw Error(o(340));oh()}return d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 19:return at(Ir),null;case 4:return ch(),null;case 10:return th(p.type._context),null;case 22:case 23:return mC(),null;case 24:return null;default:return null}}var yy=!1,af=!1,WJ=typeof WeakSet=="function"?WeakSet:Set,Bt=null;function wy(d,p){var b=d.ref;if(b!==null)if(typeof b=="function")try{b(null)}catch(A){Hs(d,p,A)}else b.current=null}function ZS(d,p,b){try{b()}catch(A){Hs(d,p,A)}}var LD=!1;function $J(d,p){for(q(d.containerInfo),Bt=p;Bt!==null;)if(d=Bt,p=d.child,(d.subtreeFlags&1028)!==0&&p!==null)p.return=d,Bt=p;else for(;Bt!==null;){d=Bt;try{var b=d.alternate;if(d.flags&1024)switch(d.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var A=b.memoizedProps,N=b.memoizedState,G=d.stateNode,oe=G.getSnapshotBeforeUpdate(d.elementType===d.type?A:Yr(d.type,A),N);G.__reactInternalSnapshotBeforeUpdate=oe}break;case 3:ut&&rt(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(ye){Hs(d,d.return,ye)}if(p=d.sibling,p!==null){p.return=d.return,Bt=p;break}Bt=d.return}return b=LD,LD=!1,b}function lf(d,p,b){var A=p.updateQueue;if(A=A!==null?A.lastEffect:null,A!==null){var N=A=A.next;do{if((N.tag&d)===d){var G=N.destroy;N.destroy=void 0,G!==void 0&&ZS(p,b,G)}N=N.next}while(N!==A)}}function f0(d,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var b=p=p.next;do{if((b.tag&d)===d){var A=b.create;b.destroy=A()}b=b.next}while(b!==p)}}function qS(d){var p=d.ref;if(p!==null){var b=d.stateNode;switch(d.tag){case 5:d=ee(b);break;default:d=b}typeof p=="function"?p(d):p.current=d}}function RD(d,p,b){if(eo&&typeof eo.onCommitFiberUnmount=="function")try{eo.onCommitFiberUnmount(Cl,p)}catch{}switch(p.tag){case 0:case 11:case 14:case 15:if(d=p.updateQueue,d!==null&&(d=d.lastEffect,d!==null)){var A=d=d.next;do{var N=A,G=N.destroy;N=N.tag,G!==void 0&&(N&2||N&4)&&ZS(p,b,G),A=A.next}while(A!==d)}break;case 1:if(wy(p,b),d=p.stateNode,typeof d.componentWillUnmount=="function")try{d.props=p.memoizedProps,d.state=p.memoizedState,d.componentWillUnmount()}catch(oe){Hs(p,b,oe)}break;case 5:wy(p,b);break;case 4:ut?OD(d,p,b):$&&$&&(p=p.stateNode.containerInfo,b=Le(p),rn(p,b))}}function PD(d,p,b){for(var A=p;;)if(RD(d,A,b),A.child===null||ut&&A.tag===4){if(A===p)break;for(;A.sibling===null;){if(A.return===null||A.return===p)return;A=A.return}A.sibling.return=A.return,A=A.sibling}else A.child.return=A,A=A.child}function DD(d){var p=d.alternate;p!==null&&(d.alternate=null,DD(p)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(p=d.stateNode,p!==null&&Et(p)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function ND(d){return d.tag===5||d.tag===3||d.tag===4}function kD(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||ND(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function BD(d){if(ut){e:{for(var p=d.return;p!==null;){if(ND(p))break e;p=p.return}throw Error(o(160))}var b=p;switch(b.tag){case 5:p=b.stateNode,b.flags&32&&(en(p),b.flags&=-33),b=kD(d),tC(d,b,p);break;case 3:case 4:p=b.stateNode.containerInfo,b=kD(d),eC(d,b,p);break;default:throw Error(o(161))}}}function eC(d,p,b){var A=d.tag;if(A===5||A===6)d=d.stateNode,p?Ze(b,d,p):Ke(b,d);else if(A!==4&&(d=d.child,d!==null))for(eC(d,p,b),d=d.sibling;d!==null;)eC(d,p,b),d=d.sibling}function tC(d,p,b){var A=d.tag;if(A===5||A===6)d=d.stateNode,p?We(b,d,p):Ye(b,d);else if(A!==4&&(d=d.child,d!==null))for(tC(d,p,b),d=d.sibling;d!==null;)tC(d,p,b),d=d.sibling}function OD(d,p,b){for(var A=p,N=!1,G,oe;;){if(!N){N=A.return;e:for(;;){if(N===null)throw Error(o(160));switch(G=N.stateNode,N.tag){case 5:oe=!1;break e;case 3:G=G.containerInfo,oe=!0;break e;case 4:G=G.containerInfo,oe=!0;break e}N=N.return}N=!0}if(A.tag===5||A.tag===6)PD(d,A,b),oe?Ft(G,A.stateNode):Tt(G,A.stateNode);else if(A.tag===18)oe?te(G,A.stateNode):se(G,A.stateNode);else if(A.tag===4){if(A.child!==null){G=A.stateNode.containerInfo,oe=!0,A.child.return=A,A=A.child;continue}}else if(RD(d,A,b),A.child!==null){A.child.return=A,A=A.child;continue}if(A===p)break;for(;A.sibling===null;){if(A.return===null||A.return===p)return;A=A.return,A.tag===4&&(N=!1)}A.sibling.return=A.return,A=A.sibling}}function nC(d,p){if(ut){switch(p.tag){case 0:case 11:case 14:case 15:lf(3,p,p.return),f0(3,p),lf(5,p,p.return);return;case 1:return;case 5:var b=p.stateNode;if(b!=null){var A=p.memoizedProps;d=d!==null?d.memoizedProps:A;var N=p.type,G=p.updateQueue;p.updateQueue=null,G!==null&&Qt(b,G,N,d,A,p)}return;case 6:if(p.stateNode===null)throw Error(o(162));b=p.memoizedProps,nt(p.stateNode,d!==null?d.memoizedProps:b,b);return;case 3:Ce&&d!==null&&d.memoizedState.isDehydrated&&J(p.stateNode.containerInfo);return;case 12:return;case 13:_y(p);return;case 19:_y(p);return;case 17:return}throw Error(o(163))}switch(p.tag){case 0:case 11:case 14:case 15:lf(3,p,p.return),f0(3,p),lf(5,p,p.return);return;case 12:return;case 13:_y(p);return;case 19:_y(p);return;case 3:Ce&&d!==null&&d.memoizedState.isDehydrated&&J(p.stateNode.containerInfo);break;case 22:case 23:return}e:if($){switch(p.tag){case 1:case 5:case 6:break e;case 3:case 4:p=p.stateNode,rn(p.containerInfo,p.pendingChildren);break e}throw Error(o(163))}}function _y(d){var p=d.updateQueue;if(p!==null){d.updateQueue=null;var b=d.stateNode;b===null&&(b=d.stateNode=new WJ),p.forEach(function(A){var N=nY.bind(null,d,A);b.has(A)||(b.add(A),A.then(N,N))})}}function JJ(d,p){for(Bt=p;Bt!==null;){p=Bt;var b=p.deletions;if(b!==null)for(var A=0;A";case xy:return":has("+(sC(d)||"")+")";case by:return'[role="'+d.value+'"]';case Cy:return'"'+d.value+'"';case Sy:return'[data-testname="'+d.value+'"]';default:throw Error(o(365))}}function HD(d,p){var b=[];d=[d,0];for(var A=0;AN&&(N=oe),A&=~G}if(A=N,A=oi()-A,A=(120>A?120:480>A?480:1080>A?1080:1920>A?1920:3e3>A?3e3:4320>A?4320:1960*QJ(A/1960))-A,10d?16:d,Mc===null)var A=!1;else{if(d=Mc,Mc=null,Ly=0,An&6)throw Error(o(331));var N=An;for(An|=4,Bt=d.current;Bt!==null;){var G=Bt,oe=G.child;if(Bt.flags&16){var ye=G.deletions;if(ye!==null){for(var Je=0;Jeoi()-cC?cf(d,0):lC|=b),zs(d,p)}function KD(d,p){p===0&&(d.mode&1?(p=Ga,Ga<<=1,!(Ga&130023424)&&(Ga=4194304)):p=1);var b=Es();d=Dy(d,p),d!==null&&(Yu(d,p,b),zs(d,b))}function tY(d){var p=d.memoizedState,b=0;p!==null&&(b=p.retryLane),KD(d,b)}function nY(d,p){var b=0;switch(d.tag){case 13:var A=d.stateNode,N=d.memoizedState;N!==null&&(b=N.retryLane);break;case 19:A=d.stateNode;break;default:throw Error(o(314))}A!==null&&A.delete(p),KD(d,b)}var ZD;ZD=function(d,p,b){if(d!==null)if(d.memoizedProps!==p.pendingProps||Ut.current)oo=!0;else{if(!(d.lanes&b)&&!(p.flags&128))return oo=!1,GJ(d,p,b);oo=!!(d.flags&131072)}else oo=!1,On&&p.flags&1048576&&ai(p,k,p.index);switch(p.lanes=0,p.tag){case 2:var A=p.type;d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),d=p.pendingProps;var N=Tn(p,Pt.current);wc(p,b),N=zS(null,p,A,d,N,b);var G=HS();return p.flags|=1,typeof N=="object"&&N!==null&&typeof N.render=="function"&&N.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,ar(A)?(G=!0,nn(p)):G=!1,p.memoizedState=N.state!==null&&N.state!==void 0?N.state:null,nh(p),N.updater=rf,p.stateNode=N,N._reactInternals=p,sh(p,A,d,b),p=QS(null,p,A,!0,G,b)):(p.tag=0,On&&G&&Bn(p),Cs(null,p,N,b),p=p.child),p;case 16:A=p.elementType;e:{switch(d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),d=p.pendingProps,N=A._init,A=N(A._payload),p.type=A,N=p.tag=iY(A),d=Yr(A,d),N){case 0:p=YS(null,p,A,d,b);break e;case 1:p=xD(null,p,A,d,b);break e;case 11:p=vD(null,p,A,d,b);break e;case 14:p=yD(null,p,A,Yr(A.type,d),b);break e}throw Error(o(306,A,""))}return p;case 0:return A=p.type,N=p.pendingProps,N=p.elementType===A?N:Yr(A,N),YS(d,p,A,N,b);case 1:return A=p.type,N=p.pendingProps,N=p.elementType===A?N:Yr(A,N),xD(d,p,A,N,b);case 3:e:{if(bD(p),d===null)throw Error(o(387));A=p.pendingProps,G=p.memoizedState,N=G.element,rh(d,p),nf(p,A,null,b);var oe=p.memoizedState;if(A=oe.element,Ce&&G.isDehydrated)if(G={element:A,isDehydrated:!1,cache:oe.cache,transitions:oe.transitions},p.updateQueue.baseState=G,p.memoizedState=G,p.flags&256){N=Error(o(423)),p=SD(d,p,A,b,N);break e}else if(A!==N){N=Error(o(424)),p=SD(d,p,A,b,N);break e}else for(Ce&&(ci=gt(p.stateNode.containerInfo),sr=p,On=!0,Ss=null,Wa=!1),b=VP(p,null,A,b),p.child=b;b;)b.flags=b.flags&-3|4096,b=b.sibling;else{if(oh(),A===N){p=Ll(d,p,b);break e}Cs(d,p,A,b)}p=p.child}return p;case 5:return WP(p),d===null&&NS(p),A=p.type,N=p.pendingProps,G=d!==null?d.memoizedProps:null,oe=N.children,we(A,N)?oe=null:G!==null&&we(A,G)&&(p.flags|=32),MD(d,p),Cs(d,p,oe,b),p.child;case 6:return d===null&&NS(p),null;case 13:return CD(d,p,b);case 4:return BS(p,p.stateNode.containerInfo),A=p.pendingProps,d===null?p.child=ah(p,null,A,b):Cs(d,p,A,b),p.child;case 11:return A=p.type,N=p.pendingProps,N=p.elementType===A?N:Yr(A,N),vD(d,p,A,N,b);case 7:return Cs(d,p,p.pendingProps,b),p.child;case 8:return Cs(d,p,p.pendingProps.children,b),p.child;case 12:return Cs(d,p,p.pendingProps.children,b),p.child;case 10:e:{if(A=p.type._context,N=p.pendingProps,G=p.memoizedProps,oe=N.value,tf(p,A,oe),G!==null)if(to(G.value,oe)){if(G.children===N.children&&!Ut.current){p=Ll(d,p,b);break e}}else for(G=p.child,G!==null&&(G.return=p);G!==null;){var ye=G.dependencies;if(ye!==null){oe=G.child;for(var Je=ye.firstContext;Je!==null;){if(Je.context===A){if(G.tag===1){Je=io(-1,b&-b),Je.tag=2;var xt=G.updateQueue;if(xt!==null){xt=xt.shared;var Ht=xt.pending;Ht===null?Je.next=Je:(Je.next=Ht.next,Ht.next=Je),xt.pending=Je}}G.lanes|=b,Je=G.alternate,Je!==null&&(Je.lanes|=b),yc(G.return,b,p),ye.lanes|=b;break}Je=Je.next}}else if(G.tag===10)oe=G.type===p.type?null:G.child;else if(G.tag===18){if(oe=G.return,oe===null)throw Error(o(341));oe.lanes|=b,ye=oe.alternate,ye!==null&&(ye.lanes|=b),yc(oe,b,p),oe=G.sibling}else oe=G.child;if(oe!==null)oe.return=G;else for(oe=G;oe!==null;){if(oe===p){oe=null;break}if(G=oe.sibling,G!==null){G.return=oe.return,oe=G;break}oe=oe.return}G=oe}Cs(d,p,N.children,b),p=p.child}return p;case 9:return N=p.type,A=p.pendingProps.children,wc(p,b),N=bs(N),A=A(N),p.flags|=1,Cs(d,p,A,b),p.child;case 14:return A=p.type,N=Yr(A,p.pendingProps),N=Yr(A.type,N),yD(d,p,A,N,b);case 15:return wD(d,p,p.type,p.pendingProps,b);case 17:return A=p.type,N=p.pendingProps,N=p.elementType===A?N:Yr(A,N),d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),p.tag=1,ar(A)?(d=!0,nn(p)):d=!1,wc(p,b),sf(p,A,N),sh(p,A,N,b),QS(null,p,A,!0,d,b);case 19:return ID(d,p,b);case 22:return _D(d,p,b)}throw Error(o(156,p.tag))};function qD(d,p){return Zd(d,p)}function rY(d,p,b,A){this.tag=d,this.key=b,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=A,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jo(d,p,b,A){return new rY(d,p,b,A)}function vC(d){return d=d.prototype,!(!d||!d.isReactComponent)}function iY(d){if(typeof d=="function")return vC(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===_)return 14}return 2}function Sc(d,p){var b=d.alternate;return b===null?(b=jo(d.tag,p,d.key,d.mode),b.elementType=d.elementType,b.type=d.type,b.stateNode=d.stateNode,b.alternate=d,d.alternate=b):(b.pendingProps=p,b.type=d.type,b.flags=0,b.subtreeFlags=0,b.deletions=null),b.flags=d.flags&14680064,b.childLanes=d.childLanes,b.lanes=d.lanes,b.child=d.child,b.memoizedProps=d.memoizedProps,b.memoizedState=d.memoizedState,b.updateQueue=d.updateQueue,p=d.dependencies,b.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},b.sibling=d.sibling,b.index=d.index,b.ref=d.ref,b}function ky(d,p,b,A,N,G){var oe=2;if(A=d,typeof d=="function")vC(d)&&(oe=1);else if(typeof d=="string")oe=5;else e:switch(d){case u:return df(b.children,N,G,p);case f:oe=8,N|=8;break;case h:return d=jo(12,b,p,N|2),d.elementType=h,d.lanes=G,d;case y:return d=jo(13,b,p,N),d.elementType=y,d.lanes=G,d;case g:return d=jo(19,b,p,N),d.elementType=g,d.lanes=G,d;case S:return By(b,N,G,p);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case m:oe=10;break e;case v:oe=9;break e;case w:oe=11;break e;case _:oe=14;break e;case x:oe=16,A=null;break e}throw Error(o(130,d==null?d:typeof d,""))}return p=jo(oe,b,p,N),p.elementType=d,p.type=A,p.lanes=G,p}function df(d,p,b,A){return d=jo(7,d,A,p),d.lanes=b,d}function By(d,p,b,A){return d=jo(22,d,A,p),d.elementType=S,d.lanes=b,d.stateNode={},d}function yC(d,p,b){return d=jo(6,d,null,p),d.lanes=b,d}function wC(d,p,b){return p=jo(4,d.children!==null?d.children:[],d.key,p),p.lanes=b,p.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},p}function sY(d,p,b,A,N){this.tag=p,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ct,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jm(0),this.expirationTimes=Jm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jm(0),this.identifierPrefix=A,this.onRecoverableError=N,Ce&&(this.mutableSourceEagerHydrationData=null)}function eN(d,p,b,A,N,G,oe,ye,Je){return d=new sY(d,p,b,ye,Je),p===1?(p=1,G===!0&&(p|=8)):p=0,G=jo(3,null,null,p),d.current=G,G.stateNode=d,G.memoizedState={element:A,isDehydrated:b,cache:null,transitions:null},nh(G),d}function tN(d){if(!d)return kt;d=d._reactInternals;e:{if(C(d)!==d||d.tag!==1)throw Error(o(170));var p=d;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(ar(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(o(171))}if(d.tag===1){var b=d.type;if(ar(b))return dr(d,b,p)}return p}function nN(d){var p=d._reactInternals;if(p===void 0)throw typeof d.render=="function"?Error(o(188)):(d=Object.keys(d).join(","),Error(o(268,d)));return d=z(p),d===null?null:d.stateNode}function rN(d,p){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var b=d.retryLane;d.retryLane=b!==0&&b=xt&&G>=dn&&N<=Ht&&oe<=tn){d.splice(p,1);break}else if(A!==xt||b.width!==Je.width||tnoe){if(!(G!==dn||b.height!==Je.height||HtN)){xt>A&&(Je.width+=xt-A,Je.x=A),HtG&&(Je.height+=dn-G,Je.y=G),tnb&&(b=oe)),oe ")+` + +No matching component was found for: + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return ee(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:oY,findFiberByHostInstance:d.findFiberByHostInstance||aY,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var p=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(p.isDisabled||!p.supportsFiber)d=!0;else{try{Cl=p.inject(d),eo=p}catch{}d=!!p.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,p,b,A){if(!re)throw Error(o(363));d=oC(d,p);var N=Qe(d,b,A).disconnect;return{disconnect:function(){N()}}},n.registerMutableSourceForHydration=function(d,p){var b=p._getVersion;b=b(p._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[p,b]:d.mutableSourceEagerHydrationData.push(p,b)},n.runWithPriority=function(d,p){var b=zn;try{return zn=d,p()}finally{zn=b}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,p,b,A){var N=p.current,G=Es(),oe=xc(N);return b=tN(b),p.context===null?p.context=b:p.pendingContext=b,p=io(G,oe),p.payload={element:d},A=A===void 0?null:A,A!==null&&(p.callback=A),va(N,p),d=Fo(N,oe,G),d!==null&&Al(d,N,oe),oe},n};W$.exports=YIe;var QIe=W$.exports;const XIe=_m(QIe);var $$={exports:{}},J$={};/** + * @license React + * scheduler.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. + */(function(t){function e(j,q){var ne=j.length;j.push(q);e:for(;0>>1,_e=j[de];if(0>>1;dei(we,ne))he<_e&&0>i(Ie,we)?(j[de]=Ie,j[he]=ne,de=he):(j[de]=we,j[ce]=ne,de=ce);else if(he<_e&&0>i(Ie,ne))j[de]=Ie,j[he]=ne,de=he;else break e}}return q}function i(j,q){var ne=j.sortIndex-q.sortIndex;return ne!==0?ne:j.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,v=!1,w=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(j){for(var q=n(c);q!==null;){if(q.callback===null)r(c);else if(q.startTime<=j)r(c),q.sortIndex=q.expirationTime,e(l,q);else break;q=n(c)}}function S(j){if(w=!1,x(j),!v)if(n(l)!==null)v=!0,ee(D);else{var q=n(c);q!==null&&le(S,q.startTime-j)}}function D(j,q){v=!1,w&&(w=!1,g(R),R=-1),m=!0;var ne=h;try{for(x(q),f=n(l);f!==null&&(!(f.expirationTime>q)||j&&!P());){var de=f.callback;if(typeof de=="function"){f.callback=null,h=f.priorityLevel;var _e=de(f.expirationTime<=q);q=t.unstable_now(),typeof _e=="function"?f.callback=_e:f===n(l)&&r(l),x(q)}else r(l);f=n(l)}if(f!==null)var ge=!0;else{var ce=n(c);ce!==null&&le(S,ce.startTime-q),ge=!1}return ge}finally{f=null,h=ne,m=!1}}var T=!1,E=null,R=-1,C=5,L=-1;function P(){return!(t.unstable_now()-Lj||125de?(j.sortIndex=ne,e(c,j),n(l)===null&&j===n(c)&&(w?(g(R),R=-1):w=!0,le(S,ne-de))):(j.sortIndex=_e,e(l,j),v||m||(v=!0,ee(D))),j},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(j){var q=h;return function(){var ne=h;h=q;try{return j.apply(this,arguments)}finally{h=ne}}}})(J$);$$.exports=J$;var TU=$$.exports;const KIe=t=>typeof t=="object"&&typeof t.then=="function",Zf=[];function Y$(t,e,n=(r,i)=>r===i){if(t===e)return!0;if(!t||!e)return!1;const r=t.length;if(e.length!==r)return!1;for(let i=0;i0&&(s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(s.remove,r.lifespan)),s.response;if(!n)throw s.promise}const i={keys:e,equal:r.equal,remove:()=>{const s=Zf.indexOf(i);s!==-1&&Zf.splice(s,1)},promise:(KIe(t)?t:t(...e)).then(s=>{i.response=s,r.lifespan&&r.lifespan>0&&(i.timeout=setTimeout(i.remove,r.lifespan))}).catch(s=>i.error=s)};if(Zf.push(i),!n)throw i.promise}const ZIe=(t,e,n)=>Q$(t,e,!1,n),qIe=(t,e,n)=>void Q$(t,e,!0,n),eLe=t=>{if(t===void 0||t.length===0)Zf.splice(0,Zf.length);else{const e=Zf.find(n=>Y$(t,n.keys,n.equal));e&&e.remove()}},LP={},RP=t=>void Object.assign(LP,t);function tLe(t,e){function n(u,{args:f=[],attach:h,...m},v){let w=`${u[0].toUpperCase()}${u.slice(1)}`,y;if(u==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=m.object;y=Kh(g,{type:u,root:v,attach:h,primitive:!0})}else{const g=LP[w];if(!g)throw new Error(`R3F: ${w} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(f))throw new Error("R3F: The args prop must be an array!");y=Kh(new g(...f),{type:u,root:v,attach:h,memoizedProps:{args:f}})}return y.__r3f.attach===void 0&&(y instanceof mn?y.__r3f.attach="geometry":y instanceof Mi&&(y.__r3f.attach="material")),w!=="inject"&&SA(y,m),y}function r(u,f){let h=!1;if(f){var m,v;(m=f.__r3f)!=null&&m.attach?bA(u,f,f.__r3f.attach):f.isObject3D&&u.isObject3D&&(u.add(f),h=!0),h||(v=u.__r3f)==null||v.objects.push(f),f.__r3f||Kh(f,{}),f.__r3f.parent=u,XI(f),Zh(f)}}function i(u,f,h){let m=!1;if(f){var v,w;if((v=f.__r3f)!=null&&v.attach)bA(u,f,f.__r3f.attach);else if(f.isObject3D&&u.isObject3D){f.parent=u,f.dispatchEvent({type:"added"}),u.dispatchEvent({type:"childadded",child:f});const y=u.children.filter(_=>_!==f),g=y.indexOf(h);u.children=[...y.slice(0,g),f,...y.slice(g)],m=!0}m||(w=u.__r3f)==null||w.objects.push(f),f.__r3f||Kh(f,{}),f.__r3f.parent=u,XI(f),Zh(f)}}function s(u,f,h=!1){u&&[...u].forEach(m=>o(f,m,h))}function o(u,f,h){if(f){var m,v,w;if(f.__r3f&&(f.__r3f.parent=null),(m=u.__r3f)!=null&&m.objects&&(u.__r3f.objects=u.__r3f.objects.filter(S=>S!==f)),(v=f.__r3f)!=null&&v.attach)DU(u,f,f.__r3f.attach);else if(f.isObject3D&&u.isObject3D){var y;u.remove(f),(y=f.__r3f)!=null&&y.root&&cLe(eM(f),f)}const _=(w=f.__r3f)==null?void 0:w.primitive,x=!_&&(h===void 0?f.dispose!==null:h);if(!_){var g;s((g=f.__r3f)==null?void 0:g.objects,f,x),s(f.children,f,x)}if(delete f.__r3f,x&&f.dispose&&f.type!=="Scene"){const S=()=>{try{f.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?TU.unstable_scheduleCallback(TU.unstable_IdlePriority,S):S()}Zh(u)}}function a(u,f,h,m){var v;const w=(v=u.__r3f)==null?void 0:v.parent;if(!w)return;const y=n(f,h,u.__r3f.root);if(u.children){for(const g of u.children)g.__r3f&&r(y,g);u.children=u.children.filter(g=>!g.__r3f)}u.__r3f.objects.forEach(g=>r(y,g)),u.__r3f.objects=[],u.__r3f.autoRemovedBeforeAppend||o(w,u),y.parent&&(y.__r3f.autoRemovedBeforeAppend=!0),r(w,y),y.raycast&&y.__r3f.eventCount&&eM(y).getState().internal.interaction.push(y),[m,m.alternate].forEach(g=>{g!==null&&(g.stateNode=y,g.ref&&(typeof g.ref=="function"?g.ref(y):g.ref.current=y))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:XIe({createInstance:n,removeChild:o,appendChild:r,appendInitialChild:r,insertBefore:i,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(u,f)=>{if(!f)return;const h=u.getState().scene;h.__r3f&&(h.__r3f.root=u,r(h,f))},removeChildFromContainer:(u,f)=>{f&&o(u.getState().scene,f)},insertInContainerBefore:(u,f,h)=>{if(!f||!h)return;const m=u.getState().scene;m.__r3f&&i(m,f,h)},getRootHostContext:()=>null,getChildHostContext:u=>u,finalizeInitialChildren(u){var f;return!!((f=u==null?void 0:u.__r3f)!=null?f:{}).handlers},prepareUpdate(u,f,h,m){var v;if(((v=u==null?void 0:u.__r3f)!=null?v:{}).primitive&&m.object&&m.object!==u)return[!0];{const{args:y=[],children:g,..._}=m,{args:x=[],children:S,...D}=h;if(!Array.isArray(y))throw new Error("R3F: the args prop must be an array!");if(y.some((E,R)=>E!==x[R]))return[!0];const T=nJ(u,_,D,!0);return T.changes.length?[!1,T]:null}},commitUpdate(u,[f,h],m,v,w,y){f?a(u,m,w,y):SA(u,h)},commitMount(u,f,h,m){var v;const w=(v=u.__r3f)!=null?v:{};u.raycast&&w.handlers&&w.eventCount&&eM(u).getState().internal.interaction.push(u)},getPublicInstance:u=>u,prepareForCommit:()=>null,preparePortalMount:u=>Kh(u.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(u){var f;const{attach:h,parent:m}=(f=u.__r3f)!=null?f:{};h&&m&&DU(m,u,h),u.isObject3D&&(u.visible=!1),Zh(u)},unhideInstance(u,f){var h;const{attach:m,parent:v}=(h=u.__r3f)!=null?h:{};m&&v&&bA(v,u,m),(u.isObject3D&&f.visible==null||f.visible)&&(u.visible=!0),Zh(u)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():mp.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&vr.fun(performance.now)?performance.now:vr.fun(Date.now)?Date.now:()=>0,scheduleTimeout:vr.fun(setTimeout)?setTimeout:void 0,cancelTimeout:vr.fun(clearTimeout)?clearTimeout:void 0}),applyProps:SA}}var IU,LU;const xA=t=>"colorSpace"in t||"outputColorSpace"in t,X$=()=>{var t;return(t=LP.ColorManagement)!=null?t:null},K$=t=>t&&t.isOrthographicCamera,nLe=t=>t&&t.hasOwnProperty("current"),Qv=typeof window<"u"&&((IU=window.document)!=null&&IU.createElement||((LU=window.navigator)==null?void 0:LU.product)==="ReactNative")?I.useLayoutEffect:I.useEffect;function Z$(t){const e=I.useRef(t);return Qv(()=>void(e.current=t),[t]),e}function rLe({set:t}){return Qv(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}class q$ extends I.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}q$.getDerivedStateFromError=()=>({error:!0});const eJ="__default",RU=new Map,iLe=t=>t&&!!t.memoized&&!!t.changes;function tJ(t){var e;const n=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(t)?Math.min(Math.max(t[0],n),t[1]):t}const X0=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()};function eM(t){let e=t.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const vr={obj:t=>t===Object(t)&&!vr.arr(t)&&typeof t!="function",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",boo:t=>typeof t=="boolean",und:t=>t===void 0,arr:t=>Array.isArray(t),equ(t,e,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof t!=typeof e||!!t!=!!e)return!1;if(vr.str(t)||vr.num(t)||vr.boo(t))return t===e;const s=vr.obj(t);if(s&&r==="reference")return t===e;const o=vr.arr(t);if(o&&n==="reference")return t===e;if((o||s)&&t===e)return!0;let a;for(a in t)if(!(a in e))return!1;if(s&&n==="shallow"&&r==="shallow"){for(a in i?e:t)if(!vr.equ(t[a],e[a],{strict:i,objects:"reference"}))return!1}else for(a in i?e:t)if(t[a]!==e[a])return!1;if(vr.und(a)){if(o&&t.length===0&&e.length===0||s&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function sLe(t){const e={nodes:{},materials:{}};return t&&t.traverse(n=>{n.name&&(e.nodes[n.name]=n),n.material&&!e.materials[n.material.name]&&(e.materials[n.material.name]=n.material)}),e}function oLe(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function Kh(t,e){const n=t;return n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},t}function QI(t,e){let n=t;if(e.includes("-")){const r=e.split("-"),i=r.pop();return n=r.reduce((s,o)=>s[o],t),{target:n,key:i}}else return{target:n,key:e}}const PU=/-\d+$/;function bA(t,e,n){if(vr.str(n)){if(PU.test(n)){const s=n.replace(PU,""),{target:o,key:a}=QI(t,s);Array.isArray(o[a])||(o[a]=[])}const{target:r,key:i}=QI(t,n);e.__r3f.previousAttach=r[i],r[i]=e}else e.__r3f.previousAttach=n(t,e)}function DU(t,e,n){var r,i;if(vr.str(n)){const{target:s,key:o}=QI(t,n),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(r=e.__r3f)==null||r.previousAttach==null||r.previousAttach(t,e);(i=e.__r3f)==null||delete i.previousAttach}function nJ(t,{children:e,key:n,ref:r,...i},{children:s,key:o,ref:a,...l}={},c=!1){const u=t.__r3f,f=Object.entries(i),h=[];if(c){const v=Object.keys(l);for(let w=0;w{var y;if((y=t.__r3f)!=null&&y.primitive&&v==="object"||vr.equ(w,l[v]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(v))return h.push([v,w,!0,[]]);let g=[];v.includes("-")&&(g=v.split("-")),h.push([v,w,!1,g]);for(const _ in i){const x=i[_];_.startsWith(`${v}-`)&&h.push([_,x,!1,_.split("-")])}});const m={...i};return u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.args&&(m.args=u.memoizedProps.args),u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.attach&&(m.attach=u.memoizedProps.attach),{memoized:m,changes:h}}const aLe=typeof process<"u"&&!1;function SA(t,e){var n;const r=t.__r3f,i=r==null?void 0:r.root,s=i==null||i.getState==null?void 0:i.getState(),{memoized:o,changes:a}=iLe(e)?e:nJ(t,e),l=r==null?void 0:r.eventCount;t.__r3f&&(t.__r3f.memoizedProps=o);for(let u=0;ug[_],t),!(y&&y.set))){const[g,..._]=v.reverse();w=_.reverse().reduce((x,S)=>x[S],t),f=g}if(h===eJ+"remove")if(w.constructor){let g=RU.get(w.constructor);g||(g=new w.constructor,RU.set(w.constructor,g)),h=g[f]}else h=0;if(m&&r)h?r.handlers[f]=h:delete r.handlers[f],r.eventCount=Object.keys(r.handlers).length;else if(y&&y.set&&(y.copy||y instanceof ld)){if(Array.isArray(h))y.fromArray?y.fromArray(h):y.set(...h);else if(y.copy&&h&&h.constructor&&(aLe?y.constructor.name===h.constructor.name:y.constructor===h.constructor))y.copy(h);else if(h!==void 0){const g=y instanceof Lt;!g&&y.setScalar?y.setScalar(h):y instanceof ld&&h instanceof ld?y.mask=h.mask:y.set(h),!X$()&&s&&!s.linear&&g&&y.convertSRGBToLinear()}}else if(w[f]=h,w[f]instanceof er&&w[f].format===ti&&w[f].type===qs&&s){const g=w[f];xA(g)&&xA(s.gl)?g.colorSpace=s.gl.outputColorSpace:g.encoding=s.gl.outputEncoding}Zh(t)}if(r&&r.parent&&t.raycast&&l!==r.eventCount){const u=eM(t).getState().internal,f=u.interaction.indexOf(t);f>-1&&u.interaction.splice(f,1),r.eventCount&&u.interaction.push(t)}return!(a.length===1&&a[0][0]==="onUpdate")&&a.length&&(n=t.__r3f)!=null&&n.parent&&XI(t),t}function Zh(t){var e,n;const r=(e=t.__r3f)==null||(n=e.root)==null||n.getState==null?void 0:n.getState();r&&r.internal.frames===0&&r.invalidate()}function XI(t){t.onUpdate==null||t.onUpdate(t)}function rJ(t,e){t.manual||(K$(t)?(t.left=e.width/-2,t.right=e.width/2,t.top=e.height/2,t.bottom=e.height/-2):t.aspect=e.width/e.height,t.updateProjectionMatrix(),t.updateMatrixWorld())}function p_(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function lLe(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return mp.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return mp.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return mp.ContinuousEventPriority;default:return mp.DefaultEventPriority}}function iJ(t,e,n,r){const i=n.get(e);i&&(n.delete(e),n.size===0&&(t.delete(r),i.target.releasePointerCapture(r)))}function cLe(t,e){const{internal:n}=t.getState();n.interaction=n.interaction.filter(r=>r!==e),n.initialHits=n.initialHits.filter(r=>r!==e),n.hovered.forEach((r,i)=>{(r.eventObject===e||r.object===e)&&n.hovered.delete(i)}),n.capturedMap.forEach((r,i)=>{iJ(n.capturedMap,e,r,i)})}function uLe(t){function e(l){const{internal:c}=t.getState(),u=l.offsetX-c.initialClick[0],f=l.offsetY-c.initialClick[1];return Math.round(Math.sqrt(u*u+f*f))}function n(l){return l.filter(c=>["Move","Over","Enter","Out","Leave"].some(u=>{var f;return(f=c.__r3f)==null?void 0:f.handlers["onPointer"+u]}))}function r(l,c){const u=t.getState(),f=new Set,h=[],m=c?c(u.internal.interaction):u.internal.interaction;for(let g=0;g{const x=X0(g.object),S=X0(_.object);return!x||!S?g.distance-_.distance:S.events.priority-x.events.priority||g.distance-_.distance}).filter(g=>{const _=p_(g);return f.has(_)?!1:(f.add(_),!0)});u.events.filter&&(w=u.events.filter(w,u));for(const g of w){let _=g.object;for(;_;){var y;(y=_.__r3f)!=null&&y.eventCount&&h.push({...g,eventObject:_}),_=_.parent}}if("pointerId"in l&&u.internal.capturedMap.has(l.pointerId))for(let g of u.internal.capturedMap.get(l.pointerId).values())f.has(p_(g.intersection))||h.push(g.intersection);return h}function i(l,c,u,f){const h=t.getState();if(l.length){const m={stopped:!1};for(const v of l){const w=X0(v.object)||h,{raycaster:y,pointer:g,camera:_,internal:x}=w,S=new Z(g.x,g.y,0).unproject(_),D=L=>{var P,z;return(P=(z=x.capturedMap.get(L))==null?void 0:z.has(v.eventObject))!=null?P:!1},T=L=>{const P={intersection:v,target:c.target};x.capturedMap.has(L)?x.capturedMap.get(L).set(v.eventObject,P):x.capturedMap.set(L,new Map([[v.eventObject,P]])),c.target.setPointerCapture(L)},E=L=>{const P=x.capturedMap.get(L);P&&iJ(x.capturedMap,v.eventObject,P,L)};let R={};for(let L in c){let P=c[L];typeof P!="function"&&(R[L]=P)}let C={...v,...R,pointer:g,intersections:l,stopped:m.stopped,delta:u,unprojectedPoint:S,ray:y.ray,camera:_,stopPropagation(){const L="pointerId"in c&&x.capturedMap.get(c.pointerId);if((!L||L.has(v.eventObject))&&(C.stopped=m.stopped=!0,x.hovered.size&&Array.from(x.hovered.values()).find(P=>P.eventObject===v.eventObject))){const P=l.slice(0,l.indexOf(v));s([...P,v])}},target:{hasPointerCapture:D,setPointerCapture:T,releasePointerCapture:E},currentTarget:{hasPointerCapture:D,setPointerCapture:T,releasePointerCapture:E},nativeEvent:c};if(f(C),m.stopped===!0)break}}return l}function s(l){const{internal:c}=t.getState();for(const u of c.hovered.values())if(!l.length||!l.find(f=>f.object===u.object&&f.index===u.index&&f.instanceId===u.instanceId)){const h=u.eventObject.__r3f,m=h==null?void 0:h.handlers;if(c.hovered.delete(p_(u)),h!=null&&h.eventCount){const v={...u,intersections:l};m.onPointerOut==null||m.onPointerOut(v),m.onPointerLeave==null||m.onPointerLeave(v)}}}function o(l,c){for(let u=0;us([]);case"onLostPointerCapture":return c=>{const{internal:u}=t.getState();"pointerId"in c&&u.capturedMap.has(c.pointerId)&&requestAnimationFrame(()=>{u.capturedMap.has(c.pointerId)&&(u.capturedMap.delete(c.pointerId),s([]))})}}return function(u){const{onPointerMissed:f,internal:h}=t.getState();h.lastEvent.current=u;const m=l==="onPointerMove",v=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",y=r(u,m?n:void 0),g=v?e(u):0;l==="onPointerDown"&&(h.initialClick=[u.offsetX,u.offsetY],h.initialHits=y.map(x=>x.eventObject)),v&&!y.length&&g<=2&&(o(u,h.interaction),f&&f(u)),m&&s(y);function _(x){const S=x.eventObject,D=S.__r3f,T=D==null?void 0:D.handlers;if(D!=null&&D.eventCount)if(m){if(T.onPointerOver||T.onPointerEnter||T.onPointerOut||T.onPointerLeave){const E=p_(x),R=h.hovered.get(E);R?R.stopped&&x.stopPropagation():(h.hovered.set(E,x),T.onPointerOver==null||T.onPointerOver(x),T.onPointerEnter==null||T.onPointerEnter(x))}T.onPointerMove==null||T.onPointerMove(x)}else{const E=T[l];E?(!v||h.initialHits.includes(S))&&(o(u,h.interaction.filter(R=>!h.initialHits.includes(R))),E(x)):v&&h.initialHits.includes(S)&&o(u,h.interaction.filter(R=>!h.initialHits.includes(R)))}}i(y,u,g,_)}}return{handlePointer:a}}const fLe=["set","get","setSize","setFrameloop","setDpr","events","invalidate","advance","size","viewport"],sJ=t=>!!(t!=null&&t.render),PP=I.createContext(null),dLe=(t,e)=>{const n=V$((a,l)=>{const c=new Z,u=new Z,f=new Z;function h(g=l().camera,_=u,x=l().size){const{width:S,height:D,top:T,left:E}=x,R=S/D;_ instanceof Z?f.copy(_):f.set(..._);const C=g.getWorldPosition(c).distanceTo(f);if(K$(g))return{width:S/g.zoom,height:D/g.zoom,top:T,left:E,factor:1,distance:C,aspect:R};{const L=g.fov*Math.PI/180,P=2*Math.tan(L/2)*C,z=P*(S/D);return{width:z,height:P,top:T,left:E,factor:S/z,distance:C,aspect:R}}}let m;const v=g=>a(_=>({performance:{..._.performance,current:g}})),w=new tt;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(g=1)=>t(l(),g),advance:(g,_)=>e(g,_,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new SP,pointer:w,mouse:w,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const g=l();m&&clearTimeout(m),g.performance.current!==g.performance.min&&v(g.performance.min),m=setTimeout(()=>v(l().performance.max),g.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:h},setEvents:g=>a(_=>({..._,events:{..._.events,...g}})),setSize:(g,_,x,S,D)=>{const T=l().camera,E={width:g,height:_,top:S||0,left:D||0,updateStyle:x};a(R=>({size:E,viewport:{...R.viewport,...h(T,u,E)}}))},setDpr:g=>a(_=>{const x=tJ(g);return{viewport:{..._.viewport,dpr:x,initialDpr:_.viewport.initialDpr||x}}}),setFrameloop:(g="always")=>{const _=l().clock;_.stop(),_.elapsedTime=0,g!=="never"&&(_.start(),_.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:I.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,_,x)=>{const S=l().internal;return S.priority=S.priority+(_>0?1:0),S.subscribers.push({ref:g,priority:_,store:x}),S.subscribers=S.subscribers.sort((D,T)=>D.priority-T.priority),()=>{const D=l().internal;D!=null&&D.subscribers&&(D.priority=D.priority-(_>0?1:0),D.subscribers=D.subscribers.filter(T=>T.ref!==g))}}}}}),r=n.getState();let i=r.size,s=r.viewport.dpr,o=r.camera;return n.subscribe(()=>{const{camera:a,size:l,viewport:c,gl:u,set:f}=n.getState();if(l.width!==i.width||l.height!==i.height||c.dpr!==s){var h;i=l,s=c.dpr,rJ(a,l),u.setPixelRatio(c.dpr);const m=(h=l.updateStyle)!=null?h:typeof HTMLCanvasElement<"u"&&u.domElement instanceof HTMLCanvasElement;u.setSize(l.width,l.height,m)}a!==o&&(o=a,f(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),n.subscribe(a=>t(a)),n};let m_,hLe=new Set,pLe=new Set,mLe=new Set;function CA(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function K0(t,e){switch(t){case"before":return CA(hLe,e);case"after":return CA(pLe,e);case"tail":return CA(mLe,e)}}let EA,AA;function TA(t,e,n){let r=e.clock.getDelta();for(e.frameloop==="never"&&typeof t=="number"&&(r=t-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=t),EA=e.internal.subscribers,m_=0;m_0)&&!((u=s.gl.xr)!=null&&u.isPresenting)&&(r+=TA(c,s))}if(n=!1,K0("after",c),r===0)return K0("tail",c),e=!1,cancelAnimationFrame(i)}function a(c,u=1){var f;if(!c)return t.forEach(h=>a(h.store.getState(),u));(f=c.gl.xr)!=null&&f.isPresenting||!c.internal.active||c.frameloop==="never"||(u>1?c.internal.frames=Math.min(60,c.internal.frames+u):n?c.internal.frames=2:c.internal.frames=1,e||(e=!0,requestAnimationFrame(o)))}function l(c,u=!0,f,h){if(u&&K0("before",c),f)TA(c,f,h);else for(const m of t.values())TA(c,m.store.getState());u&&K0("after",c)}return{loop:o,invalidate:a,advance:l}}function DP(){const t=I.useContext(PP);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function xo(t=n=>n,e){return DP()(t,e)}function Xv(t,e=0){const n=DP(),r=n.getState().internal.subscribe,i=Z$(t);return Qv(()=>r(i,e,n),[e,r,n]),null}const NU=new WeakMap;function oJ(t,e){return function(n,...r){let i=NU.get(n);return i||(i=new n,NU.set(n,i)),t&&t(i),Promise.all(r.map(s=>new Promise((o,a)=>i.load(s,l=>{l.scene&&Object.assign(l,sLe(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l==null?void 0:l.message}`))))))}}function Dd(t,e,n,r){const i=Array.isArray(e)?e:[e],s=ZIe(oJ(n,r),[t,...i],{equal:vr.equ});return Array.isArray(e)?s:s[0]}Dd.preload=function(t,e,n){const r=Array.isArray(e)?e:[e];return qIe(oJ(n),[t,...r])};Dd.clear=function(t,e){const n=Array.isArray(e)?e:[e];return eLe([t,...n])};const wm=new Map,{invalidate:kU,advance:BU}=gLe(wm),{reconciler:J1,applyProps:Wc}=tLe(wm,lLe),Gh={objects:"shallow",strict:!1},vLe=(t,e)=>{const n=typeof t=="function"?t(e):t;return sJ(n)?n:new nP({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function yLe(t,e){const n=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement;if(e){const{width:r,height:i,top:s,left:o,updateStyle:a=n}=e;return{width:r,height:i,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:r,height:i,top:s,left:o}=t.parentElement.getBoundingClientRect();return{width:r,height:i,top:s,left:o,updateStyle:n}}else if(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas)return{width:t.width,height:t.height,top:0,left:0,updateStyle:n};return{width:0,height:0,top:0,left:0}}function wLe(t){const e=wm.get(t),n=e==null?void 0:e.fiber,r=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const i=typeof reportError=="function"?reportError:console.error,s=r||dLe(kU,BU),o=n||J1.createContainer(s,mp.ConcurrentRoot,null,!1,null,"",i,null);e||wm.set(t,{fiber:o,store:s});let a,l=!1,c;return{configure(u={}){let{gl:f,size:h,scene:m,events:v,onCreated:w,shadows:y=!1,linear:g=!1,flat:_=!1,legacy:x=!1,orthographic:S=!1,frameloop:D="always",dpr:T=[1,2],performance:E,raycaster:R,camera:C,onPointerMissed:L}=u,P=s.getState(),z=P.gl;P.gl||P.set({gl:z=vLe(f,t)});let B=P.raycaster;B||P.set({raycaster:B=new TP});const{params:Y,...ie}=R||{};if(vr.equ(ie,B,Gh)||Wc(B,{...ie}),vr.equ(Y,B.params,Gh)||Wc(B,{params:{...B.params,...Y}}),!P.camera||P.camera===c&&!vr.equ(c,C,Gh)){c=C;const ne=C instanceof Fv,de=ne?C:S?new Jd(0,0,0,0,.1,1e3):new Ci(75,0,.1,1e3);ne||(de.position.z=5,C&&(Wc(de,C),("aspect"in C||"left"in C||"right"in C||"bottom"in C||"top"in C)&&(de.manual=!0,de.updateProjectionMatrix())),!P.camera&&!(C!=null&&C.rotation)&&de.lookAt(0,0,0)),P.set({camera:de}),B.camera=de}if(!P.scene){let ne;m instanceof vm?ne=m:(ne=new vm,m&&Wc(ne,m)),P.set({scene:Kh(ne)})}if(!P.xr){var ee;const ne=(ge,ce)=>{const we=s.getState();we.frameloop!=="never"&&BU(ge,!0,we,ce)},de=()=>{const ge=s.getState();ge.gl.xr.enabled=ge.gl.xr.isPresenting,ge.gl.xr.setAnimationLoop(ge.gl.xr.isPresenting?ne:null),ge.gl.xr.isPresenting||kU(ge)},_e={connect(){const ge=s.getState().gl;ge.xr.addEventListener("sessionstart",de),ge.xr.addEventListener("sessionend",de)},disconnect(){const ge=s.getState().gl;ge.xr.removeEventListener("sessionstart",de),ge.xr.removeEventListener("sessionend",de)}};typeof((ee=z.xr)==null?void 0:ee.addEventListener)=="function"&&_e.connect(),P.set({xr:_e})}if(z.shadowMap){const ne=z.shadowMap.enabled,de=z.shadowMap.type;if(z.shadowMap.enabled=!!y,vr.boo(y))z.shadowMap.type=Fg;else if(vr.str(y)){var le;const _e={basic:J7,percentage:X2,soft:Fg,variance:Sa};z.shadowMap.type=(le=_e[y])!=null?le:Fg}else vr.obj(y)&&Object.assign(z.shadowMap,y);(ne!==z.shadowMap.enabled||de!==z.shadowMap.type)&&(z.shadowMap.needsUpdate=!0)}const j=X$();j&&("enabled"in j?j.enabled=!x:"legacyMode"in j&&(j.legacyMode=x)),l||Wc(z,{outputEncoding:g?3e3:3001,toneMapping:_?fl:BR}),P.legacy!==x&&P.set(()=>({legacy:x})),P.linear!==g&&P.set(()=>({linear:g})),P.flat!==_&&P.set(()=>({flat:_})),f&&!vr.fun(f)&&!sJ(f)&&!vr.equ(f,z,Gh)&&Wc(z,f),v&&!P.events.handlers&&P.set({events:v(s)});const q=yLe(t,h);return vr.equ(q,P.size,Gh)||P.setSize(q.width,q.height,q.updateStyle,q.top,q.left),T&&P.viewport.dpr!==tJ(T)&&P.setDpr(T),P.frameloop!==D&&P.setFrameloop(D),P.onPointerMissed||P.set({onPointerMissed:L}),E&&!vr.equ(E,P.performance,Gh)&&P.set(ne=>({performance:{...ne.performance,...E}})),a=w,l=!0,this},render(u){return l||this.configure(),J1.updateContainer(O.jsx(_Le,{store:s,children:u,onCreated:a,rootElement:t}),o,null,()=>{}),s},unmount(){aJ(t)}}}function _Le({store:t,children:e,onCreated:n,rootElement:r}){return Qv(()=>{const i=t.getState();i.set(s=>({internal:{...s.internal,active:!0}})),n&&n(i),t.getState().events.connected||i.events.connect==null||i.events.connect(r)},[]),O.jsx(PP.Provider,{value:t,children:e})}function aJ(t,e){const n=wm.get(t),r=n==null?void 0:n.fiber;if(r){const i=n==null?void 0:n.store.getState();i&&(i.internal.active=!1),J1.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var s,o,a,l;i.events.disconnect==null||i.events.disconnect(),(s=i.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=i.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=i.gl)!=null&&l.xr&&i.xr.disconnect(),oLe(i),wm.delete(t)}catch{}},500)})}}function MLe(t,e,n){return O.jsx(xLe,{children:t,container:e,state:n},e.uuid)}function xLe({state:t={},children:e,container:n}){const{events:r,size:i,...s}=t,o=DP(),[a]=I.useState(()=>new TP),[l]=I.useState(()=>new tt),c=I.useCallback((f,h)=>{const m={...f};Object.keys(f).forEach(w=>{(fLe.includes(w)||f[w]!==h[w]&&h[w])&&delete m[w]});let v;if(h&&i){const w=h.camera;v=f.viewport.getCurrentViewport(w,new Z,i),w!==f.camera&&rJ(w,i)}return{...m,scene:n,raycaster:a,pointer:l,mouse:l,previousRoot:o,events:{...f.events,...h==null?void 0:h.events,...r},size:{...f.size,...i},viewport:{...f.viewport,...v},...s}},[t]),[u]=I.useState(()=>{const f=o.getState();return V$((m,v)=>({...f,scene:n,raycaster:a,pointer:l,mouse:l,previousRoot:o,events:{...f.events,...r},size:{...f.size,...i},...s,set:m,get:v,setEvents:w=>m(y=>({...y,events:{...y.events,...w}}))}))});return I.useEffect(()=>{const f=o.subscribe(h=>u.setState(m=>c(h,m)));return()=>{f()}},[c]),I.useEffect(()=>{u.setState(f=>c(o.getState(),f))},[c]),I.useEffect(()=>()=>{u.destroy()},[]),O.jsx(O.Fragment,{children:J1.createPortal(O.jsx(PP.Provider,{value:u,children:e}),u,null)})}J1.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:I.version});function KI(t,e,n){var r,i,s,o,a;e==null&&(e=100);function l(){var u=Date.now()-o;u=0?r=setTimeout(l,e-u):(r=null,n||(a=t.apply(s,i),s=i=null))}var c=function(){s=this,i=arguments,o=Date.now();var u=n&&!r;return r||(r=setTimeout(l,e)),u&&(a=t.apply(s,i),s=i=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=t.apply(s,i),s=i=null,clearTimeout(r),r=null)},c}KI.debounce=KI;var bLe=KI;const OU=_m(bLe);function SLe(t){let{debounce:e,scroll:n,polyfill:r,offsetSize:i}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const s=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,a]=I.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=I.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),c=e?typeof e=="number"?e:e.scroll:null,u=e?typeof e=="number"?e:e.resize:null,f=I.useRef(!1);I.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[h,m,v]=I.useMemo(()=>{const _=()=>{if(!l.current.element)return;const{left:x,top:S,width:D,height:T,bottom:E,right:R,x:C,y:L}=l.current.element.getBoundingClientRect(),P={left:x,top:S,width:D,height:T,bottom:E,right:R,x:C,y:L};l.current.element instanceof HTMLElement&&i&&(P.height=l.current.element.offsetHeight,P.width=l.current.element.offsetWidth),Object.freeze(P),f.current&&!TLe(l.current.lastBounds,P)&&a(l.current.lastBounds=P)};return[_,u?OU(_,u):_,c?OU(_,c):_]},[a,i,c,u]);function w(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(_=>_.removeEventListener("scroll",v,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function y(){l.current.element&&(l.current.resizeObserver=new s(v),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(_=>_.addEventListener("scroll",v,{capture:!0,passive:!0})))}const g=_=>{!_||_===l.current.element||(w(),l.current.element=_,l.current.scrollContainers=lJ(_),y())};return ELe(v,!!n),CLe(m),I.useEffect(()=>{w(),y()},[n,v,m]),I.useEffect(()=>w,[]),[g,o,h]}function CLe(t){I.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function ELe(t,e){I.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function lJ(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(t);return[n,r,i].some(s=>s==="auto"||s==="scroll")&&e.push(t),[...e,...lJ(t.parentElement)]}const ALe=["x","y","top","bottom","left","right","width","height"],TLe=(t,e)=>ALe.every(n=>t[n]===e[n]);var ILe=Object.defineProperty,LLe=Object.defineProperties,RLe=Object.getOwnPropertyDescriptors,UU=Object.getOwnPropertySymbols,PLe=Object.prototype.hasOwnProperty,DLe=Object.prototype.propertyIsEnumerable,FU=(t,e,n)=>e in t?ILe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jU=(t,e)=>{for(var n in e||(e={}))PLe.call(e,n)&&FU(t,n,e[n]);if(UU)for(var n of UU(e))DLe.call(e,n)&&FU(t,n,e[n]);return t},NLe=(t,e)=>LLe(t,RLe(e)),zU,HU;typeof window<"u"&&((zU=window.document)!=null&&zU.createElement||((HU=window.navigator)==null?void 0:HU.product)==="ReactNative")?I.useLayoutEffect:I.useEffect;function cJ(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=t.child;for(;r;){const i=cJ(r,e,n);if(i)return i;r=r.sibling}}function uJ(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const GU=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=GU;return}return GU.apply(this,arguments)};const NP=uJ(I.createContext(null));class fJ extends I.Component{render(){return I.createElement(NP.Provider,{value:this._reactInternals},this.props.children)}}function kLe(){const t=I.useContext(NP);if(t===null)throw new Error("its-fine: useFiber must be called within a !");const e=I.useId();return I.useMemo(()=>{for(const r of[t,t==null?void 0:t.alternate]){if(!r)continue;const i=cJ(r,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(i)return i}},[t,e])}function BLe(){const t=kLe(),[e]=I.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&typeof n.type=="object"){const i=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;i&&i!==NP&&!e.has(i)&&e.set(i,I.useContext(uJ(i)))}n=n.return}return e}function OLe(){const t=BLe();return I.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>I.createElement(e,null,I.createElement(n.Provider,NLe(jU({},r),{value:t.get(n)}))),e=>I.createElement(fJ,jU({},e))),[t])}const IA={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function ULe(t){const{handlePointer:e}=uLe(t);return{priority:1,enabled:!0,compute(n,r,i){r.pointer.set(n.offsetX/r.size.width*2-1,-(n.offsetY/r.size.height)*2+1),r.raycaster.setFromCamera(r.pointer,r.camera)},connected:void 0,handlers:Object.keys(IA).reduce((n,r)=>({...n,[r]:e(r)}),{}),update:()=>{var n;const{events:r,internal:i}=t.getState();(n=i.lastEvent)!=null&&n.current&&r.handlers&&r.handlers.onPointerMove(i.lastEvent.current)},connect:n=>{var r;const{set:i,events:s}=t.getState();s.disconnect==null||s.disconnect(),i(o=>({events:{...o.events,connected:n}})),Object.entries((r=s.handlers)!=null?r:[]).forEach(([o,a])=>{const[l,c]=IA[o];n.addEventListener(l,a,{passive:c})})},disconnect:()=>{const{set:n,events:r}=t.getState();if(r.connected){var i;Object.entries((i=r.handlers)!=null?i:[]).forEach(([s,o])=>{if(r&&r.connected instanceof HTMLElement){const[a]=IA[s];r.connected.removeEventListener(a,o)}}),n(s=>({events:{...s.events,connected:void 0}}))}}}}const FLe=I.forwardRef(function({children:e,fallback:n,resize:r,style:i,gl:s,events:o=ULe,eventSource:a,eventPrefix:l,shadows:c,linear:u,flat:f,legacy:h,orthographic:m,frameloop:v,dpr:w,performance:y,raycaster:g,camera:_,scene:x,onPointerMissed:S,onCreated:D,...T},E){I.useMemo(()=>RP(GIe),[]);const R=OLe(),[C,L]=SLe({scroll:!0,debounce:{scroll:50,resize:0},...r}),P=I.useRef(null),z=I.useRef(null);I.useImperativeHandle(E,()=>P.current);const B=Z$(S),[Y,ie]=I.useState(!1),[ee,le]=I.useState(!1);if(Y)throw Y;if(ee)throw ee;const j=I.useRef(null);Qv(()=>{const ne=P.current;L.width>0&&L.height>0&&ne&&(j.current||(j.current=wLe(ne)),j.current.configure({gl:s,events:o,shadows:c,linear:u,flat:f,legacy:h,orthographic:m,frameloop:v,dpr:w,performance:y,raycaster:g,camera:_,scene:x,size:L,onPointerMissed:(...de)=>B.current==null?void 0:B.current(...de),onCreated:de=>{de.events.connect==null||de.events.connect(a?nLe(a)?a.current:a:z.current),l&&de.setEvents({compute:(_e,ge)=>{const ce=_e[l+"X"],we=_e[l+"Y"];ge.pointer.set(ce/ge.size.width*2-1,-(we/ge.size.height)*2+1),ge.raycaster.setFromCamera(ge.pointer,ge.camera)}}),D==null||D(de)}}),j.current.render(O.jsx(R,{children:O.jsx(q$,{set:le,children:O.jsx(I.Suspense,{fallback:O.jsx(rLe,{set:ie}),children:e})})})))}),I.useEffect(()=>{const ne=P.current;if(ne)return()=>aJ(ne)},[]);const q=a?"none":"auto";return O.jsx("div",{ref:z,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:q,...i},...T,children:O.jsx("div",{ref:C,style:{width:"100%",height:"100%"},children:O.jsx("canvas",{ref:P,style:{display:"block"},children:n})})})}),jLe=I.forwardRef(function(e,n){return O.jsx(fJ,{children:O.jsx(FLe,{...e,ref:n})})});function VU(t,e){if(e===RW)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===jx||e===WR){let n=t.getIndex();if(n===null){const o=[],a=t.getAttribute("position");if(a!==void 0){for(let l=0;l>>1|(br&21845)<<1;Uc=(Uc&52428)>>>2|(Uc&13107)<<2,Uc=(Uc&61680)>>>4|(Uc&3855)<<4,qI[br]=((Uc&65280)>>>8|(Uc&255)<<8)>>>1}var Yg=function(t,e,n){for(var r=t.length,i=0,s=new iu(e);i>>l]=c}else for(a=new iu(r),i=0;i>>15-t[i]);return a},Kv=new Zo(288);for(var br=0;br<144;++br)Kv[br]=8;for(var br=144;br<256;++br)Kv[br]=9;for(var br=256;br<280;++br)Kv[br]=7;for(var br=280;br<288;++br)Kv[br]=8;var vJ=new Zo(32);for(var br=0;br<32;++br)vJ[br]=5;var $Le=Yg(Kv,9,1),JLe=Yg(vJ,5,1),LA=function(t){for(var e=t[0],n=1;ne&&(e=t[n]);return e},xa=function(t,e,n){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(e&7)&n},RA=function(t,e){var n=e/8|0;return(t[n]|t[n+1]<<8|t[n+2]<<16)>>(e&7)},YLe=function(t){return(t/8|0)+(t&7&&1)},QLe=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var r=new(t instanceof iu?iu:t instanceof ZI?ZI:Zo)(n-e);return r.set(t.subarray(e,n)),r},XLe=function(t,e,n){var r=t.length;if(!r||n&&!n.l&&r<5)return e||new Zo(0);var i=!e||n,s=!n||n.i;n||(n={}),e||(e=new Zo(r*3));var o=function(he){var Ie=e.length;if(he>Ie){var et=new Zo(Math.max(Ie*2,he));et.set(e),e=et}},a=n.f||0,l=n.p||0,c=n.b||0,u=n.l,f=n.d,h=n.m,m=n.n,v=r*8;do{if(!u){n.f=a=xa(t,l,1);var w=xa(t,l+1,3);if(l+=3,w)if(w==1)u=$Le,f=JLe,h=9,m=5;else if(w==2){var x=xa(t,l,31)+257,S=xa(t,l+10,15)+4,D=x+xa(t,l+5,31)+1;l+=14;for(var T=new Zo(D),E=new Zo(19),R=0;R>>4;if(y<16)T[R++]=y;else{var B=0,Y=0;for(y==16?(Y=3+xa(t,l,3),l+=2,B=T[R-1]):y==17?(Y=3+xa(t,l,7),l+=3):y==18&&(Y=11+xa(t,l,127),l+=7);Y--;)T[R++]=B}}var ie=T.subarray(0,x),ee=T.subarray(x);h=LA(ie),m=LA(ee),u=Yg(ie,h,1),f=Yg(ee,m,1)}else throw"invalid block type";else{var y=YLe(l)+4,g=t[y-4]|t[y-3]<<8,_=y+g;if(_>r){if(s)throw"unexpected EOF";break}i&&o(c+g),e.set(t.subarray(y,_),c),n.b=c+=g,n.p=l=_*8;continue}if(l>v){if(s)throw"unexpected EOF";break}}i&&o(c+131072);for(var le=(1<>>4;if(l+=B&15,l>v){if(s)throw"unexpected EOF";break}if(!B)throw"invalid length/literal";if(ne<256)e[c++]=ne;else if(ne==256){q=l,u=null;break}else{var de=ne-254;if(ne>264){var R=ne-257,_e=dJ[R];de=xa(t,l,(1<<_e)-1)+gJ[R],l+=_e}var ge=f[RA(t,l)&j],ce=ge>>>4;if(!ge)throw"invalid distance";l+=ge&15;var ee=WLe[ce];if(ce>3){var _e=hJ[ce];ee+=RA(t,l)&(1<<_e)-1,l+=_e}if(l>v){if(s)throw"unexpected EOF";break}i&&o(c+131072);for(var we=c+de;c>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(t[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function g_(t,e){return XLe((ZLe(t),t.subarray(2,-4)),e)}var qLe=typeof TextDecoder<"u"&&new TextDecoder,e4e=0;try{qLe.decode(KLe,{stream:!0}),e4e=1}catch{}const t4e=t=>t&&t.isCubeTexture;class n4e extends Cr{constructor(e,n){var r,i;const s=t4e(e),a=((i=s?(r=e.image[0])==null?void 0:r.width:e.image.width)!=null?i:1024)/4,l=Math.floor(Math.log2(a)),c=Math.pow(2,l),u=3*Math.max(c,16*7),f=4*c,h=[s?"#define ENVMAP_TYPE_CUBE":"",`#define CUBEUV_TEXEL_WIDTH ${1/u}`,`#define CUBEUV_TEXEL_HEIGHT ${1/f}`,`#define CUBEUV_MAX_MIP ${l}.0`],m=` + varying vec3 vWorldPosition; + void main() + { + vec4 worldPosition = ( modelMatrix * vec4( position, 1.0 ) ); + vWorldPosition = worldPosition.xyz; + + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); + } + `,v=h.join(` +`)+` + #define ENVMAP_TYPE_CUBE_UV + varying vec3 vWorldPosition; + uniform float radius; + uniform float height; + uniform float angle; + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube map; + #else + uniform sampler2D map; + #endif + // From: https://www.shadertoy.com/view/4tsBD7 + float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) + { + float d = dot ( rd, n ); + + if( d > 0.0 ) { return 1e6; } + + vec3 o = ro - c; + float t = - dot( n, o ) / d; + vec3 q = o + rd * t; + + return ( dot( q, q ) < r * r ) ? t : 1e6; + } + // From: https://www.iquilezles.org/www/articles/intersectors/intersectors.htm + float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) + { + vec3 oc = ro - ce; + float b = dot( oc, rd ); + float c = dot( oc, oc ) - ra * ra; + float h = b * b - c; + + if( h < 0.0 ) { return -1.0; } + + h = sqrt( h ); + + return - b + h; + } + vec3 project() + { + vec3 p = normalize( vWorldPosition ); + vec3 camPos = cameraPosition; + camPos.y -= height; + float intersection = sphereIntersect( camPos, p, vec3( 0.0 ), radius ); + if( intersection > 0.0 ) { + + vec3 h = vec3( 0.0, - height, 0.0 ); + float intersection2 = diskIntersectWithBackFaceCulling( camPos, p, h, vec3( 0.0, 1.0, 0.0 ), radius ); + p = ( camPos + min( intersection, intersection2 ) * p ) / radius; + } else { + p = vec3( 0.0, 1.0, 0.0 ); + } + return p; + } + #include + #include + void main() + { + vec3 projectedWorldPosition = project(); + + #ifdef ENVMAP_TYPE_CUBE + vec3 outcolor = textureCube( map, projectedWorldPosition ).rgb; + #else + vec3 direction = normalize( projectedWorldPosition ); + vec2 uv = equirectUv( direction ); + vec3 outcolor = texture2D( map, uv ).rgb; + #endif + gl_FragColor = vec4( outcolor, 1.0 ); + #include + #include <${parseInt(Wd.replace(/\D+/g,""))>=154?"colorspace_fragment":"encodings_fragment"}> + } + `,w={map:{value:e},height:{value:(n==null?void 0:n.height)||15},radius:{value:(n==null?void 0:n.radius)||100}},y=new Wv(1,16),g=new qi({uniforms:w,fragmentShader:v,vertexShader:m,side:Ko});super(y,g)}set radius(e){this.material.uniforms.radius.value=e}get radius(){return this.material.uniforms.radius.value}set height(e){this.material.uniforms.height.value=e}get height(){return this.material.uniforms.height.value}}function Vx(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);let e="";for(let n=0,r=t.length;n=2.0 are supported."));return}const l=new B4e(s,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c=0&&a[u]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+u+'".')}}l.setExtensions(o),l.setPlugins(a),l.parse(r,i)}parseAsync(e,n){const r=this;return new Promise(function(i,s){r.parse(e,n,i,s)})}}function i4e(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const Pn={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class s4e{constructor(e){this.parser=e,this.name=Pn.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let r=0,i=n.length;r=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,s.source,o)}}class w4e{constructor(e){this.parser=e,this.name=Pn.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,r=this.parser,i=r.json,s=i.textures[e];if(!s.extensions||!s.extensions[n])return null;const o=s.extensions[n],a=i.images[o.source];let l=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(e,o.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class _4e{constructor(e){this.parser=e,this.name=Pn.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,r=this.parser,i=r.json,s=i.textures[e];if(!s.extensions||!s.extensions[n])return null;const o=s.extensions[n],a=i.images[o.source];let l=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(e,o.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class M4e{constructor(e){this.name=Pn.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,r=n.bufferViews[e];if(r.extensions&&r.extensions[this.name]){const i=r.extensions[this.name],s=this.parser.getDependency("buffer",i.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const l=i.byteOffset||0,c=i.byteLength||0,u=i.count,f=i.byteStride,h=new Uint8Array(a,l,c);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(u,f,h,i.mode,i.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(u*f);return o.decodeGltfBuffer(new Uint8Array(m),u,f,h,i.mode,i.filter),m})})}else return null}}class x4e{constructor(e){this.name=Pn.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,r=n.nodes[e];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const i=n.meshes[r.mesh];for(const c of i.primitives)if(c.mode!==Wo.TRIANGLES&&c.mode!==Wo.TRIANGLE_STRIP&&c.mode!==Wo.TRIANGLE_FAN&&c.mode!==void 0)return null;const o=r.extensions[this.name].attributes,a=[],l={};for(const c in o)a.push(this.parser.getDependency("accessor",o[c]).then(u=>(l[c]=u,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const u=c.pop(),f=u.isGroup?u.children:[u],h=c[0].count,m=[];for(const v of f){const w=new Kt,y=new Z,g=new Ti,_=new Z(1,1,1),x=new sP(v.geometry,v.material,h);for(let S=0;S=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Fc={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},I4e={CUBICSPLINE:void 0,LINEAR:pm,STEP:hm},DA={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function L4e(t){return t.DefaultMaterial===void 0&&(t.DefaultMaterial=new Yv({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:ml})),t.DefaultMaterial}function Ef(t,e,n){for(const r in n.extensions)t[r]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[r]=n.extensions[r])}function jl(t,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(t.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function R4e(t,e,n){let r=!1,i=!1,s=!1;for(let c=0,u=e.length;c0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const k4e=new Kt;class B4e{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new i4e,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,i=!1,s=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,s=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||r||i&&s<98?this.textureLoader=new L$(this.options.manager):this.textureLoader=new U$(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Qi(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,n){const r=this,i=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(o){const a={scene:o[0][i.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:i.asset,parser:r,userData:{}};return Ef(s,a,i),jl(a,i),Promise.all(r._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){for(const l of a.scenes)l.updateMatrixWorld();e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],r=this.json.meshes||[];for(let i=0,s=n.length;i{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[c,u]of o.children.entries())s(u,a.children[c])};return s(r,i),i.name+="_instance_"+e.uses[n]++,i}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let r=0;r=2&&y.setY(C,T[E*l+1]),l>=3&&y.setZ(C,T[E*l+2]),l>=4&&y.setW(C,T[E*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return y})}loadTexture(e){const n=this.json,r=this.options,s=n.textures[e].source,o=n.images[s];let a=this.textureLoader;if(o.uri){const l=r.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,n,r){const i=this,s=this.json,o=s.textures[e],a=s.images[n],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(n,r).then(function(u){u.flipY=!1,u.name=o.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(s.samplers||{})[o.sampler]||{};return u.magFilter=JU[h.magFilter]||qn,u.minFilter=JU[h.minFilter]||ta,u.wrapS=YU[h.wrapS]||Tu,u.wrapT=YU[h.wrapT]||Tu,i.associations.set(u,{textures:e}),u}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,n){const r=this,i=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(f=>f.clone());const o=i.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",c=!1;if(o.bufferView!==void 0)l=r.getDependency("bufferView",o.bufferView).then(function(f){c=!0;const h=new Blob([f],{type:o.mimeType});return l=a.createObjectURL(h),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(l).then(function(f){return new Promise(function(h,m){let v=h;n.isImageBitmapLoader===!0&&(v=function(w){const y=new er(w);y.needsUpdate=!0,h(y)}),n.load(vu.resolveURL(f,s.path),v,void 0,m)})}).then(function(f){return c===!0&&a.revokeObjectURL(l),jl(f,o),f.userData.mimeType=o.mimeType||N4e(o.uri),f}).catch(function(f){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),f});return this.sourceCache[e]=u,u}assignTexture(e,n,r,i){const s=this;return this.getDependency("texture",r.index).then(function(o){if(!o)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(o=o.clone(),o.channel=r.texCoord),s.extensions[Pn.KHR_TEXTURE_TRANSFORM]){const a=r.extensions!==void 0?r.extensions[Pn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Pn.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return i!==void 0&&(typeof i=="number"&&(i=i===WU?qf:nc),"colorSpace"in o?o.colorSpace=i:o.encoding=i===qf?WU:r4e),e[n]=o,o})}assignFinalMaterial(e){const n=e.geometry;let r=e.material;const i=n.attributes.tangent===void 0,s=n.attributes.color!==void 0,o=n.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new dS,Mi.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,l.sizeAttenuation=!1,this.cache.add(a,l)),r=l}else if(e.isLine){const a="LineBasicMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new xs,Mi.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,this.cache.add(a,l)),r=l}if(i||s||o){let a="ClonedMaterial:"+r.uuid+":";i&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=r.clone(),s&&(l.vertexColors=!0),o&&(l.flatShading=!0),i&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(r))),r=l}e.material=r}getMaterialType(){return Yv}loadMaterial(e){const n=this,r=this.json,i=this.extensions,s=r.materials[e];let o;const a={},l=s.extensions||{},c=[];if(l[Pn.KHR_MATERIALS_UNLIT]){const f=i[Pn.KHR_MATERIALS_UNLIT];o=f.getMaterialType(),c.push(f.extendParams(a,s,n))}else{const f=s.pbrMetallicRoughness||{};if(a.color=new Lt(1,1,1),a.opacity=1,Array.isArray(f.baseColorFactor)){const h=f.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],nc),a.opacity=h[3]}f.baseColorTexture!==void 0&&c.push(n.assignTexture(a,"map",f.baseColorTexture,qf)),a.metalness=f.metallicFactor!==void 0?f.metallicFactor:1,a.roughness=f.roughnessFactor!==void 0?f.roughnessFactor:1,f.metallicRoughnessTexture!==void 0&&(c.push(n.assignTexture(a,"metalnessMap",f.metallicRoughnessTexture)),c.push(n.assignTexture(a,"roughnessMap",f.metallicRoughnessTexture))),o=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(e,a)})))}s.doubleSided===!0&&(a.side=Ko);const u=s.alphaMode||DA.OPAQUE;if(u===DA.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===DA.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==Js&&(c.push(n.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new tt(1,1),s.normalTexture.scale!==void 0)){const f=s.normalTexture.scale;a.normalScale.set(f,f)}if(s.occlusionTexture!==void 0&&o!==Js&&(c.push(n.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==Js){const f=s.emissiveFactor;a.emissive=new Lt().setRGB(f[0],f[1],f[2],nc)}return s.emissiveTexture!==void 0&&o!==Js&&c.push(n.assignTexture(a,"emissiveMap",s.emissiveTexture,qf)),Promise.all(c).then(function(){const f=new o(a);return s.name&&(f.name=s.name),jl(f,s),n.associations.set(f,{materials:e}),s.extensions&&Ef(i,f,s),f})}createUniqueName(e){const n=$n.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,r=this.extensions,i=this.primitiveCache;function s(a){return r[Pn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(l){return QU(l,a,n)})}const o=[];for(let a=0,l=e.length;a0&&P4e(g,s),g.name=n.createUniqueName(s.name||"mesh_"+e),jl(g,s),y.extensions&&Ef(i,g,y),n.assignFinalMaterial(g),f.push(g)}for(let m=0,v=f.length;m1?u=new Xl:c.length===1?u=c[0]:u=new Vn,u!==c[0])for(let f=0,h=c.length;f{const f=new Map;for(const[h,m]of i.associations)(h instanceof Mi||h instanceof er)&&f.set(h,m);return u.traverse(h=>{const m=i.associations.get(h);m!=null&&f.set(h,m)}),f};return i.associations=c(s),s})}_createAnimationTracks(e,n,r,i,s){const o=[],a=e.name?e.name:e.uuid,l=[];Fc[s.path]===Fc.weights?e.traverse(function(h){h.morphTargetInfluences&&l.push(h.name?h.name:h.uuid)}):l.push(a);let c;switch(Fc[s.path]){case Fc.weights:c=Ld;break;case Fc.rotation:c=Rd;break;case Fc.position:case Fc.scale:c=Pd;break;default:switch(r.itemSize){case 1:c=Ld;break;case 2:case 3:default:c=Pd;break}break}const u=i.interpolation!==void 0?I4e[i.interpolation]:pm,f=this._getArrayFromAccessor(r);for(let h=0,m=l.length;h(B=ee.indexOf(u))&&Y=R.byteLength||!(ie=f(R)))&&o(1,"no header found"),(ee=ie.match(C))||o(3,"bad initial token"),Y.valid|=1,Y.programtype=ee[1],Y.string+=ie+` +`;ie=f(R),ie!==!1;){if(Y.string+=ie+` +`,ie.charAt(0)==="#"){Y.comments+=ie+` +`;continue}if((ee=ie.match(L))&&(Y.gamma=parseFloat(ee[1])),(ee=ie.match(P))&&(Y.exposure=parseFloat(ee[1])),(ee=ie.match(z))&&(Y.valid|=2,Y.format=ee[1]),(ee=ie.match(B))&&(Y.valid|=4,Y.height=parseInt(ee[1],10),Y.width=parseInt(ee[2],10)),Y.valid&2&&Y.valid&4)break}return Y.valid&2||o(3,"missing format specifier"),Y.valid&4||o(3,"missing image size specifier"),Y},m=function(R,C,L){const P=C;if(P<8||P>32767||R[0]!==2||R[1]!==2||R[2]&128)return new Uint8Array(R);P!==(R[2]<<8|R[3])&&o(3,"wrong scanline width");const z=new Uint8Array(4*C*L);z.length||o(4,"unable to allocate buffer space");let B=0,Y=0;const ie=4*P,ee=new Uint8Array(4),le=new Uint8Array(ie);let j=L;for(;j>0&&YR.byteLength&&o(1),ee[0]=R[Y++],ee[1]=R[Y++],ee[2]=R[Y++],ee[3]=R[Y++],(ee[0]!=2||ee[1]!=2||(ee[2]<<8|ee[3])!=P)&&o(3,"bad rgbe scanline format");let q=0,ne;for(;q128;if(_e&&(ne-=128),(ne===0||q+ne>ie)&&o(3,"bad scanline data"),_e){const ge=R[Y++];for(let ce=0;ce>3]&1<<(U&7))&&(W[ae++]=U);for(var J=ae-1;ae<65536;)W[ae++]=0;return J}function P(F){for(var W=0;W<16384;W++)F[W]={},F[W].len=0,F[W].lit=0,F[W].p=null}const z={l:0,c:0,lc:0};function B(F,W,ae,U,J){for(;ae>ae&(1<0;--W){var U=ae+Y[W]>>1;Y[W]=ae,ae=U}for(var W=0;W<65537;++W){var J=F[W];J>0&&(F[W]=J|Y[J]++<<6)}}function ee(F,W,ae,U,J,K,se){for(var te=ae,ve=0,xe=0;J<=K;J++){if(te.value-ae.value>U)return!1;B(6,ve,xe,F,te);var Te=z.l;if(ve=z.c,xe=z.lc,se[J]=Te,Te==63){if(te.value-ae.value>U)throw"Something wrong with hufUnpackEncTable";B(8,ve,xe,F,te);var Ae=z.l+6;if(ve=z.c,xe=z.lc,J+Ae>K+1)throw"Something wrong with hufUnpackEncTable";for(;Ae--;)se[J++]=0;J--}else if(Te>=59){var Ae=Te-59+2;if(J+Ae>K+1)throw"Something wrong with hufUnpackEncTable";for(;Ae--;)se[J++]=0;J--}}ie(se)}function le(F){return F&63}function j(F){return F>>6}function q(F,W,ae,U){for(;W<=ae;W++){var J=j(F[W]),K=le(F[W]);if(J>>K)throw"Invalid table entry";if(K>14){var se=U[J>>K-14];if(se.len)throw"Invalid table entry";if(se.lit++,se.p){var te=se.p;se.p=new Array(se.lit);for(var ve=0;ve0;ve--){var se=U[(J<<14-K)+xe];if(se.len||se.p)throw"Invalid table entry";se.len=K,se.lit=W,xe++}}return!0}const ne={c:0,lc:0};function de(F,W,ae,U){F=F<<8|Tt(ae,U),W+=8,ne.c=F,ne.lc=W}const _e={c:0,lc:0};function ge(F,W,ae,U,J,K,se,te,ve,xe){if(F==W){U<8&&(de(ae,U,J,se),ae=ne.c,U=ne.lc),U-=8;var Te=ae>>U,Te=new Uint8Array([Te])[0];if(ve.value+Te>xe)return!1;for(var Ae=te[ve.value-1];Te-- >0;)te[ve.value++]=Ae}else if(ve.value32767?W-65536:W}const he={a:0,b:0};function Ie(F,W){var ae=we(F),U=we(W),J=U,K=ae+(J&1)+(J>>1),se=K,te=K-J;he.a=se,he.b=te}function et(F,W){var ae=ce(F),U=ce(W),J=ae-(U>>1)&65535,K=U+J-32768&65535;he.a=K,he.b=J}function ct(F,W,ae,U,J,K,se){for(var te=se<16384,ve=ae>J?J:ae,xe=1,Te;xe<=ve;)xe<<=1;for(xe>>=1,Te=xe,xe>>=1;xe>=1;){for(var Ae=0,ht=Ae+K*(J-Te),Ve=K*xe,$e=K*Te,ft=U*xe,Mt=U*Te,qe,St,at,Oe;Ae<=ht;Ae+=$e){for(var kt=Ae,Pt=Ae+U*(ae-Te);kt<=Pt;kt+=Mt){var Ut=kt+ft,yn=kt+Ve,Tn=yn+ft;te?(Ie(F[kt+W],F[yn+W]),qe=he.a,at=he.b,Ie(F[Ut+W],F[Tn+W]),St=he.a,Oe=he.b,Ie(qe,St),F[kt+W]=he.a,F[Ut+W]=he.b,Ie(at,Oe),F[yn+W]=he.a,F[Tn+W]=he.b):(et(F[kt+W],F[yn+W]),qe=he.a,at=he.b,et(F[Ut+W],F[Tn+W]),St=he.a,Oe=he.b,et(qe,St),F[kt+W]=he.a,F[Ut+W]=he.b,et(at,Oe),F[yn+W]=he.a,F[Tn+W]=he.b)}if(ae&xe){var yn=kt+Ve;te?Ie(F[kt+W],F[yn+W]):et(F[kt+W],F[yn+W]),qe=he.a,F[yn+W]=he.b,F[kt+W]=qe}}if(J&xe)for(var kt=Ae,Pt=Ae+U*(ae-Te);kt<=Pt;kt+=Mt){var Ut=kt+ft;te?Ie(F[kt+W],F[Ut+W]):et(F[kt+W],F[Ut+W]),qe=he.a,F[Ut+W]=he.b,F[kt+W]=qe}Te=xe,xe>>=1}return Ae}function it(F,W,ae,U,J,K,se,te,ve,xe){for(var Te=0,Ae=0,ht=te,Ve=Math.trunc(J.value+(K+7)/8);J.value=14;){var $e=Te>>Ae-14&16383,ft=W[$e];if(ft.len)Ae-=ft.len,ge(ft.lit,se,Te,Ae,ae,U,J,ve,xe,ht),Te=_e.c,Ae=_e.lc;else{if(!ft.p)throw"hufDecode issues";var Mt;for(Mt=0;Mt=qe&&j(F[ft.p[Mt]])==(Te>>Ae-qe&(1<>=St,Ae-=St;Ae>0;){var ft=W[Te<<14-Ae&16383];if(ft.len)Ae-=ft.len,ge(ft.lit,se,Te,Ae,ae,U,J,ve,xe,ht),Te=_e.c,Ae=_e.lc;else throw"hufDecode issues"}return!0}function ut(F,W,ae,U,J,K){var se={value:0},te=ae.value,ve=Ze(W,ae),xe=Ze(W,ae);ae.value+=4;var Te=Ze(W,ae);if(ae.value+=4,ve<0||ve>=65537||xe<0||xe>=65537)throw"Something wrong with HUF_ENCSIZE";var Ae=new Array(65537),ht=new Array(16384);P(ht);var Ve=U-(ae.value-te);if(ee(F,W,ae,Ve,ve,xe,Ae),Te>8*(U-(ae.value-te)))throw"Something wrong with hufUncompress";q(Ae,ve,xe,ht),it(Ae,ht,F,W,ae,Te,xe,K,J,se)}function $(F,W,ae){for(var U=0;UK||(W[J++]=F[ae++],J>K));)W[J++]=F[U++]}function ze(F){for(var W=F.byteLength,ae=new Array,U=0,J=new DataView(F);W>0;){var K=J.getInt8(U++);if(K<0){var se=-K;W-=se+1;for(var te=0;te>8==255?J+=U&255:(ae[J]=U,J++),F.value++}function lt(F,W){W[0]=fe(F[0]),W[1]=fe(F[1]),W[2]=fe(F[5]),W[3]=fe(F[6]),W[4]=fe(F[14]),W[5]=fe(F[15]),W[6]=fe(F[27]),W[7]=fe(F[28]),W[8]=fe(F[2]),W[9]=fe(F[4]),W[10]=fe(F[7]),W[11]=fe(F[13]),W[12]=fe(F[16]),W[13]=fe(F[26]),W[14]=fe(F[29]),W[15]=fe(F[42]),W[16]=fe(F[3]),W[17]=fe(F[8]),W[18]=fe(F[12]),W[19]=fe(F[17]),W[20]=fe(F[25]),W[21]=fe(F[30]),W[22]=fe(F[41]),W[23]=fe(F[43]),W[24]=fe(F[9]),W[25]=fe(F[11]),W[26]=fe(F[18]),W[27]=fe(F[24]),W[28]=fe(F[31]),W[29]=fe(F[40]),W[30]=fe(F[44]),W[31]=fe(F[53]),W[32]=fe(F[10]),W[33]=fe(F[19]),W[34]=fe(F[23]),W[35]=fe(F[32]),W[36]=fe(F[39]),W[37]=fe(F[45]),W[38]=fe(F[52]),W[39]=fe(F[54]),W[40]=fe(F[20]),W[41]=fe(F[22]),W[42]=fe(F[33]),W[43]=fe(F[38]),W[44]=fe(F[46]),W[45]=fe(F[51]),W[46]=fe(F[55]),W[47]=fe(F[60]),W[48]=fe(F[21]),W[49]=fe(F[34]),W[50]=fe(F[37]),W[51]=fe(F[47]),W[52]=fe(F[50]),W[53]=fe(F[56]),W[54]=fe(F[59]),W[55]=fe(F[61]),W[56]=fe(F[35]),W[57]=fe(F[36]),W[58]=fe(F[48]),W[59]=fe(F[49]),W[60]=fe(F[57]),W[61]=fe(F[58]),W[62]=fe(F[62]),W[63]=fe(F[63])}function yt(F){const W=.5*Math.cos(.7853975),ae=.5*Math.cos(3.14159/16),U=.5*Math.cos(3.14159/8),J=.5*Math.cos(3*3.14159/16),K=.5*Math.cos(5*3.14159/16),se=.5*Math.cos(3*3.14159/8),te=.5*Math.cos(7*3.14159/16);for(var ve=new Array(4),xe=new Array(4),Te=new Array(4),Ae=new Array(4),ht=0;ht<8;++ht){var Ve=ht*8;ve[0]=U*F[Ve+2],ve[1]=se*F[Ve+2],ve[2]=U*F[Ve+6],ve[3]=se*F[Ve+6],xe[0]=ae*F[Ve+1]+J*F[Ve+3]+K*F[Ve+5]+te*F[Ve+7],xe[1]=J*F[Ve+1]-te*F[Ve+3]-ae*F[Ve+5]-K*F[Ve+7],xe[2]=K*F[Ve+1]-ae*F[Ve+3]+te*F[Ve+5]+J*F[Ve+7],xe[3]=te*F[Ve+1]-K*F[Ve+3]+J*F[Ve+5]-ae*F[Ve+7],Te[0]=W*(F[Ve+0]+F[Ve+4]),Te[3]=W*(F[Ve+0]-F[Ve+4]),Te[1]=ve[0]+ve[3],Te[2]=ve[1]-ve[2],Ae[0]=Te[0]+Te[1],Ae[1]=Te[3]+Te[2],Ae[2]=Te[3]-Te[2],Ae[3]=Te[0]-Te[1],F[Ve+0]=Ae[0]+xe[0],F[Ve+1]=Ae[1]+xe[1],F[Ve+2]=Ae[2]+xe[2],F[Ve+3]=Ae[3]+xe[3],F[Ve+4]=Ae[3]-xe[3],F[Ve+5]=Ae[2]-xe[2],F[Ve+6]=Ae[1]-xe[1],F[Ve+7]=Ae[0]-xe[0]}for(var $e=0;$e<8;++$e)ve[0]=U*F[16+$e],ve[1]=se*F[16+$e],ve[2]=U*F[48+$e],ve[3]=se*F[48+$e],xe[0]=ae*F[8+$e]+J*F[24+$e]+K*F[40+$e]+te*F[56+$e],xe[1]=J*F[8+$e]-te*F[24+$e]-ae*F[40+$e]-K*F[56+$e],xe[2]=K*F[8+$e]-ae*F[24+$e]+te*F[40+$e]+J*F[56+$e],xe[3]=te*F[8+$e]-K*F[24+$e]+J*F[40+$e]-ae*F[56+$e],Te[0]=W*(F[$e]+F[32+$e]),Te[3]=W*(F[$e]-F[32+$e]),Te[1]=ve[0]+ve[3],Te[2]=ve[1]-ve[2],Ae[0]=Te[0]+Te[1],Ae[1]=Te[3]+Te[2],Ae[2]=Te[3]-Te[2],Ae[3]=Te[0]-Te[1],F[0+$e]=Ae[0]+xe[0],F[8+$e]=Ae[1]+xe[1],F[16+$e]=Ae[2]+xe[2],F[24+$e]=Ae[3]+xe[3],F[32+$e]=Ae[3]-xe[3],F[40+$e]=Ae[2]-xe[2],F[48+$e]=Ae[1]-xe[1],F[56+$e]=Ae[0]-xe[0]}function re(F){for(var W=0;W<64;++W){var ae=F[0][W],U=F[1][W],J=F[2][W];F[0][W]=ae+1.5747*J,F[1][W]=ae-.1873*U-.4682*J,F[2][W]=ae+1.8556*U}}function V(F,W,ae){for(var U=0;U<64;++U)W[ae+U]=Xf.toHalfFloat(Ee(F[U]))}function Ee(F){return F<=1?Math.sign(F)*Math.pow(Math.abs(F),2.2):Math.sign(F)*Math.pow(C,Math.abs(F)-1)}function je(F){return new DataView(F.array.buffer,F.offset.value,F.size)}function De(F){var W=F.viewer.buffer.slice(F.offset.value,F.offset.value+F.size),ae=new Uint8Array(ze(W)),U=new Uint8Array(ae.length);return Ce(ae),Ne(ae,U),new DataView(U.buffer)}function He(F){var W=F.array.slice(F.offset.value,F.offset.value+F.size),ae=g_(W),U=new Uint8Array(ae.length);return Ce(ae),Ne(ae,U),new DataView(U.buffer)}function pt(F){for(var W=F.viewer,ae={value:F.offset.value},U=new Uint16Array(F.width*F.scanlineBlockSize*(F.channels*F.type)),J=new Uint8Array(8192),K=0,se=new Array(F.channels),te=0;te=8192)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if(ve<=xe)for(var te=0;te0;){var te=Ke(W.buffer,ae),ve=Ft(W,ae),xe=ve>>2&3,Te=(ve>>4)-1,Ae=new Int8Array([Te])[0],ht=Ft(W,ae);K.push({name:te,index:Ae,type:ht,compression:xe}),se-=te.length+3}for(var Ve=bt.channels,$e=new Array(F.channels),ft=0;ft=0&&(St.idx[Oe.index]=at),Mt.offset=at)}if(J.acCompressedSize>0)switch(J.acCompression){case 0:var Ut=new Uint16Array(J.totalAcUncompressedCount);ut(F.array,W,ae,J.acCompressedSize,Ut,J.totalAcUncompressedCount);break;case 1:var kt=F.array.slice(ae.value,ae.value+J.totalAcUncompressedCount),Pt=g_(kt),Ut=new Uint16Array(Pt.buffer);ae.value+=J.totalAcUncompressedCount;break}if(J.dcCompressedSize>0){var yn={array:F.array,offset:ae,size:J.dcCompressedSize},Tn=new Uint16Array(He(yn).buffer);ae.value+=J.dcCompressedSize}if(J.rleRawSize>0){var kt=F.array.slice(ae.value,ae.value+J.rleCompressedSize),Pt=g_(kt),ar=ze(Pt.buffer);ae.value+=J.rleCompressedSize}for(var cn=0,ln=new Array($e.length),ft=0;ft>10,ae=F&1023;return(F>>15?-1:1)*(W?W===31?ae?NaN:1/0:Math.pow(2,W-15)*(1+ae/1024):6103515625e-14*(ae/1024))}function Pe(F,W){var ae=F.getUint16(W.value,!0);return W.value+=2,ae}function rt(F,W){return fe(Pe(F,W))}function It(F,W,ae,U){for(var J=ae.value,K=[];ae.valueot.height?ot.height-W:ot.scanlineBlockSize;const U=ot.size=ot.height)break;for(let se=0;se{const a={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(o,a).then(n).catch(i)},r,i)}decodeDracoFile(e,n,r,i){const s={attributeIDs:r||this.defaultAttributeIDs,attributeTypes:i||this.defaultAttributeTypes,useUniqueIDs:!!r};this.decodeGeometry(e,s).then(n)}decodeGeometry(e,n){for(const l in n.attributeTypes){const c=n.attributeTypes[l];c.BYTES_PER_ELEMENT!==void 0&&(n.attributeTypes[l]=c.name)}const r=JSON.stringify(n);if(kA.has(e)){const l=kA.get(e);if(l.key===r)return l.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let i;const s=this.workerNextTaskID++,o=e.byteLength,a=this._getWorker(s,o).then(l=>(i=l,new Promise((c,u)=>{i._callbacks[s]={resolve:c,reject:u},i.postMessage({type:"decode",id:s,taskConfig:n,buffer:e},[e])}))).then(l=>this._createGeometry(l.geometry));return a.catch(()=>!0).then(()=>{i&&s&&this._releaseTask(i,s)}),kA.set(e,{key:r,promise:a}),a}_createGeometry(e){const n=new mn;e.index&&n.setIndex(new Qn(e.index.array,1));for(let r=0;r{r.load(e,i,void 0,s)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",n=[];return e?n.push(this._loadLibrary("draco_decoder.js","text")):(n.push(this._loadLibrary("draco_wasm_wrapper.js","text")),n.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(n).then(r=>{const i=r[0];e||(this.decoderConfig.wasmBinary=r[1]);const s=G4e.toString(),o=["/* draco decoder */",i,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join(` +`);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(e,n){return this._initDecoder().then(()=>{if(this.workerPool.lengths._taskLoad?-1:1});const r=this.workerPool[this.workerPool.length-1];return r._taskCosts[e]=n,r._taskLoad+=n,r})}_releaseTask(e,n){e._taskLoad-=e._taskCosts[n],delete e._callbacks[n],delete e._taskCosts[n]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e{const f=u.draco,h=new f.Decoder,m=new f.DecoderBuffer;m.Init(new Int8Array(l),l.byteLength);try{const v=n(f,h,m,c),w=v.attributes.map(y=>y.array.buffer);v.index&&w.push(v.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:v},w)}catch(v){console.error(v),self.postMessage({type:"error",id:a.id,error:v.message})}finally{f.destroy(m),f.destroy(h)}});break}};function n(o,a,l,c){const u=c.attributeIDs,f=c.attributeTypes;let h,m;const v=a.GetEncodedGeometryType(l);if(v===o.TRIANGULAR_MESH)h=new o.Mesh,m=a.DecodeBufferToMesh(l,h);else if(v===o.POINT_CLOUD)h=new o.PointCloud,m=a.DecodeBufferToPointCloud(l,h);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!m.ok()||h.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+m.error_msg());const w={index:null,attributes:[]};for(const y in u){const g=self[f[y]];let _,x;if(c.useUniqueIDs)x=u[y],_=a.GetAttributeByUniqueId(h,x);else{if(x=a.GetAttributeId(h,o[u[y]]),x===-1)continue;_=a.GetAttribute(h,x)}w.attributes.push(i(o,a,h,y,g,_))}return v===o.TRIANGULAR_MESH&&(w.index=r(o,a,h)),o.destroy(h),w}function r(o,a,l){const u=l.num_faces()*3,f=u*4,h=o._malloc(f);a.GetTrianglesUInt32Array(l,f,h);const m=new Uint32Array(o.HEAPF32.buffer,h,u).slice();return o._free(h),{array:m,itemSize:1}}function i(o,a,l,c,u,f){const h=f.num_components(),v=l.num_points()*h,w=v*u.BYTES_PER_ELEMENT,y=s(o,u),g=o._malloc(w);a.GetAttributeDataArrayForAllPoints(l,f,y,w,g);const _=new u(o.HEAPF32.buffer,g,v).slice();return o._free(g),{name:c,array:_,itemSize:h}}function s(o,a){switch(a){case Float32Array:return o.DT_FLOAT32;case Int8Array:return o.DT_INT8;case Int16Array:return o.DT_INT16;case Int32Array:return o.DT_INT32;case Uint8Array:return o.DT_UINT8;case Uint16Array:return o.DT_UINT16;case Uint32Array:return o.DT_UINT32}}}let v_;const BA=()=>{if(v_)return v_;const t="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB",e="B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",n=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),r=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if(typeof WebAssembly!="object")return{supported:!1};let i=t;WebAssembly.validate(n)&&(i=e);let s;const o=WebAssembly.instantiate(a(i),{}).then(f=>{s=f.instance,s.exports.__wasm_call_ctors()});function a(f){const h=new Uint8Array(f.length);for(let v=0;v96?w-71:w>64?w-65:w>47?w+4:w>46?63:62}let m=0;for(let v=0;v{const f=KR.clone({[c]:{value:u}});return{...l,...f}},{}),vertexShader:e,fragmentShader:n}),this.key="",a.forEach(([l])=>Object.defineProperty(this,l,{get:()=>this.uniforms[l].value,set:c=>this.uniforms[l].value=c})),Object.assign(this,o)}};return i.key=Pp.generateUUID(),i}const V4e=()=>parseInt(Wd.replace(/\D+/g,"")),MJ=V4e();let y_=null,xJ="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function bJ(t,e,n){return r=>{n&&n(r),t&&(y_||(y_=new H4e),y_.setDecoderPath(typeof t=="string"?t:xJ),r.setDRACOLoader(y_)),e&&r.setMeshoptDecoder(typeof BA=="function"?BA():BA)}}function Zv(t,e=!0,n=!0,r){return Dd(kP,t,bJ(e,n,r))}Zv.preload=(t,e=!0,n=!0,r)=>Dd.preload(kP,t,bJ(e,n,r));Zv.clear=t=>Dd.clear(kP,t);Zv.setDecoderPath=t=>{xJ=t};const W4e=I.forwardRef(function({children:e,disable:n,disableX:r,disableY:i,disableZ:s,left:o,right:a,top:l,bottom:c,front:u,back:f,onCentered:h,precise:m=!0,cacheKey:v=0,...w},y){const g=I.useRef(null),_=I.useRef(null),x=I.useRef(null);return I.useLayoutEffect(()=>{_.current.matrixWorld.identity();const S=new Ui().setFromObject(x.current,m),D=new Z,T=new Fi,E=S.max.x-S.min.x,R=S.max.y-S.min.y,C=S.max.z-S.min.z;S.getCenter(D),S.getBoundingSphere(T);const L=l?R/2:c?-R/2:0,P=o?-E/2:a?E/2:0,z=u?C/2:f?-C/2:0;_.current.position.set(n||r?0:-D.x+P,n||i?0:-D.y+L,n||s?0:-D.z+z),typeof h<"u"&&h({parent:g.current.parent,container:g.current,width:E,height:R,depth:C,boundingBox:S,boundingSphere:T,center:D,verticalAlignment:L,horizontalAlignment:P,depthAlignment:z})},[v,h,l,o,u,n,r,i,s,m,a,c,f]),I.useImperativeHandle(y,()=>g.current,[]),I.createElement("group",X({ref:g},w),I.createElement("group",{ref:_},I.createElement("group",{ref:x},e)))}),$4e=3e3,J4e=3001,Y4e=_J({},"void main() { }","void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); discard; }");var Vo=function(t){return t[t.NONE=0]="NONE",t[t.START=1]="START",t[t.ACTIVE=2]="ACTIVE",t}(Vo||{});const Vh=t=>t&&t.isOrthographicCamera,Q4e=t=>t&&t.isBox3,X4e=t=>1-Math.exp(-5*t)+.007*t,SJ=I.createContext(null);function K4e({children:t,maxDuration:e=1,margin:n=1.2,observe:r,fit:i,clip:s,interpolateFunc:o=X4e,onFit:a}){const l=I.useRef(null),{camera:c,size:u,invalidate:f}=xo(),h=xo(D=>D.controls),m=I.useRef(a);m.current=a;const v=I.useRef({camPos:new Z,camRot:new Ti,camZoom:1}),w=I.useRef({camPos:void 0,camRot:void 0,camZoom:void 0,camUp:void 0,target:void 0}),y=I.useRef(Vo.NONE),g=I.useRef(0),[_]=I.useState(()=>new Ui),x=I.useMemo(()=>{function D(){const T=_.getSize(new Z),E=_.getCenter(new Z),R=Math.max(T.x,T.y,T.z),C=Vh(c)?R*4:R/(2*Math.atan(Math.PI*c.fov/360)),L=Vh(c)?R*4:C/c.aspect,P=n*Math.max(C,L);return{box:_,size:T,center:E,distance:P}}return{getSize:D,refresh(T){if(Q4e(T))_.copy(T);else{const E=T||l.current;if(!E)return this;E.updateWorldMatrix(!0,!0),_.setFromObject(E)}if(_.isEmpty()){const E=c.position.length()||10;_.setFromCenterAndSize(new Z,new Z(E,E,E))}return v.current.camPos.copy(c.position),v.current.camRot.copy(c.quaternion),Vh(c)&&(v.current.camZoom=c.zoom),w.current.camPos=void 0,w.current.camRot=void 0,w.current.camZoom=void 0,w.current.camUp=void 0,w.current.target=void 0,this},reset(){const{center:T,distance:E}=D(),R=c.position.clone().sub(T).normalize();w.current.camPos=T.clone().addScaledVector(R,E),w.current.target=T.clone();const C=new Kt().lookAt(w.current.camPos,w.current.target,c.up);return w.current.camRot=new Ti().setFromRotationMatrix(C),y.current=Vo.START,g.current=0,this},moveTo(T){return w.current.camPos=Array.isArray(T)?new Z(...T):T.clone(),y.current=Vo.START,g.current=0,this},lookAt({target:T,up:E}){w.current.target=Array.isArray(T)?new Z(...T):T.clone(),E?w.current.camUp=Array.isArray(E)?new Z(...E):E.clone():w.current.camUp=c.up.clone();const R=new Kt().lookAt(w.current.camPos||c.position,w.current.target,w.current.camUp);return w.current.camRot=new Ti().setFromRotationMatrix(R),y.current=Vo.START,g.current=0,this},to({position:T,target:E}){return this.moveTo(T).lookAt({target:E})},fit(){if(!Vh(c))return this.reset();let T=0,E=0;const R=[new Z(_.min.x,_.min.y,_.min.z),new Z(_.min.x,_.max.y,_.min.z),new Z(_.min.x,_.min.y,_.max.z),new Z(_.min.x,_.max.y,_.max.z),new Z(_.max.x,_.max.y,_.max.z),new Z(_.max.x,_.max.y,_.min.z),new Z(_.max.x,_.min.y,_.max.z),new Z(_.max.x,_.min.y,_.min.z)],C=w.current.camPos||c.position,L=w.current.target||(h==null?void 0:h.target),P=w.current.camUp||c.up,z=L?new Kt().lookAt(C,L,P).setPosition(C).invert():c.matrixWorldInverse;for(const ie of R)ie.applyMatrix4(z),T=Math.max(T,Math.abs(ie.y)),E=Math.max(E,Math.abs(ie.x));T*=2,E*=2;const B=(c.top-c.bottom)/T,Y=(c.right-c.left)/E;return w.current.camZoom=Math.min(B,Y)/n,y.current=Vo.START,g.current=0,m.current&&m.current(this.getSize()),this},clip(){const{distance:T}=D();return c.near=T/100,c.far=T*100,c.updateProjectionMatrix(),h&&(h.maxDistance=T*10,h.update()),f(),this}}},[_,c,h,n,f]);I.useLayoutEffect(()=>{if(h){const D=()=>{if(h&&w.current.target&&y.current!==Vo.NONE){const T=new Z().setFromMatrixColumn(c.matrix,2),E=v.current.camPos.distanceTo(h.target),R=(w.current.camPos||v.current.camPos).distanceTo(w.current.target),C=(1-g.current)*E+g.current*R;h.target.copy(c.position).addScaledVector(T,-C),h.update()}y.current=Vo.NONE};return h.addEventListener("start",D),()=>h.removeEventListener("start",D)}},[h]);const S=I.useRef(0);return I.useLayoutEffect(()=>{(r||S.current++===0)&&(x.refresh(),i&&x.reset().fit(),s&&x.clip())},[u,s,i,r,c,h]),Xv((D,T)=>{if(y.current===Vo.START)y.current=Vo.ACTIVE,f();else if(y.current===Vo.ACTIVE){if(g.current+=T/e,g.current>=1)w.current.camPos&&c.position.copy(w.current.camPos),w.current.camRot&&c.quaternion.copy(w.current.camRot),w.current.camUp&&c.up.copy(w.current.camUp),w.current.camZoom&&Vh(c)&&(c.zoom=w.current.camZoom),c.updateMatrixWorld(),c.updateProjectionMatrix(),h&&w.current.target&&(h.target.copy(w.current.target),h.update()),y.current=Vo.NONE;else{const E=o(g.current);w.current.camPos&&c.position.lerpVectors(v.current.camPos,w.current.camPos,E),w.current.camRot&&c.quaternion.slerpQuaternions(v.current.camRot,w.current.camRot,E),w.current.camUp&&c.up.set(0,1,0).applyQuaternion(c.quaternion),w.current.camZoom&&Vh(c)&&(c.zoom=(1-E)*v.current.camZoom+E*w.current.camZoom),c.updateMatrixWorld(),c.updateProjectionMatrix()}f()}}),I.createElement("group",{ref:l},I.createElement(SJ.Provider,{value:x},t))}function Z4e(){return I.useContext(SJ)}const CJ=(t,e,n)=>{let r;switch(t){case qs:r=new Uint8ClampedArray(e*n*4);break;case Ai:r=new Uint16Array(e*n*4);break;case vl:r=new Uint32Array(e*n*4);break;case Z2:r=new Int8Array(e*n*4);break;case q2:r=new Int16Array(e*n*4);break;case kv:r=new Int32Array(e*n*4);break;case Dr:r=new Float32Array(e*n*4);break;default:throw new Error("Unsupported data type")}return r};let w_;const q4e=(t,e,n,r)=>{if(w_!==void 0)return w_;const i=new Zi(1,1,r);e.setRenderTarget(i);const s=new Cr(new vc,new Js({color:16777215}));e.render(s,n),e.setRenderTarget(null);const o=CJ(t,i.width,i.height);return e.readRenderTargetPixels(i,0,0,i.width,i.height,o),i.dispose(),s.geometry.dispose(),s.material.dispose(),w_=o[0]!==0,w_};class BP{constructor(e){var n,r,i,s,o,a,l,c,u,f,h,m,v,w,y,g;this._rendererIsDisposable=!1,this._supportsReadPixels=!0,this.render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(x){throw this._renderer.setRenderTarget(null),x}this._renderer.setRenderTarget(null)},this._width=e.width,this._height=e.height,this._type=e.type,this._colorSpace=e.colorSpace;const _={format:ti,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:((n=e.renderTargetOptions)===null||n===void 0?void 0:n.anisotropy)!==void 0?(r=e.renderTargetOptions)===null||r===void 0?void 0:r.anisotropy:1,generateMipmaps:((i=e.renderTargetOptions)===null||i===void 0?void 0:i.generateMipmaps)!==void 0?(s=e.renderTargetOptions)===null||s===void 0?void 0:s.generateMipmaps:!1,magFilter:((o=e.renderTargetOptions)===null||o===void 0?void 0:o.magFilter)!==void 0?(a=e.renderTargetOptions)===null||a===void 0?void 0:a.magFilter:qn,minFilter:((l=e.renderTargetOptions)===null||l===void 0?void 0:l.minFilter)!==void 0?(c=e.renderTargetOptions)===null||c===void 0?void 0:c.minFilter:qn,samples:((u=e.renderTargetOptions)===null||u===void 0?void 0:u.samples)!==void 0?(f=e.renderTargetOptions)===null||f===void 0?void 0:f.samples:void 0,wrapS:((h=e.renderTargetOptions)===null||h===void 0?void 0:h.wrapS)!==void 0?(m=e.renderTargetOptions)===null||m===void 0?void 0:m.wrapS:qr,wrapT:((v=e.renderTargetOptions)===null||v===void 0?void 0:v.wrapT)!==void 0?(w=e.renderTargetOptions)===null||w===void 0?void 0:w.wrapT:qr};if(this._material=e.material,e.renderer?this._renderer=e.renderer:(this._renderer=BP.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new vm,this._camera=new Jd,this._camera.position.set(0,0,10),this._camera.left=-.5,this._camera.right=.5,this._camera.top=.5,this._camera.bottom=-.5,this._camera.updateProjectionMatrix(),!q4e(this._type,this._renderer,this._camera,_)){let x;switch(this._type){case Ai:x=this._renderer.extensions.has("EXT_color_buffer_float")?Dr:void 0;break}x!==void 0?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to ${Dr}`),this._type=x):(this._supportsReadPixels=!1,console.warn("This browser dos not support toArray or toDataTexture, calls to those methods will result in an error thrown"))}this._quad=new Cr(new vc,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new Zi(this.width,this.height,_),this._renderTarget.texture.mapping=((y=e.renderTargetOptions)===null||y===void 0?void 0:y.mapping)!==void 0?(g=e.renderTargetOptions)===null||g===void 0?void 0:g.mapping:Eu}static instantiateRenderer(){const e=new nP;return e.setSize(128,128),e}toArray(){if(!this._supportsReadPixels)throw new Error("Can't read pixels in this browser");const e=CJ(this._type,this._width,this._height);return this._renderer.readRenderTargetPixels(this._renderTarget,0,0,this._width,this._height,e),e}toDataTexture(e){const n=new ka(this.toArray(),this.width,this.height,ti,this._type,(e==null?void 0:e.mapping)||Eu,(e==null?void 0:e.wrapS)||qr,(e==null?void 0:e.wrapT)||qr,(e==null?void 0:e.magFilter)||qn,(e==null?void 0:e.minFilter)||qn,(e==null?void 0:e.anisotropy)||1,aa);return n.generateMipmaps=(e==null?void 0:e.generateMipmaps)!==void 0?e==null?void 0:e.generateMipmaps:!1,n}disposeOnDemandRenderer(){this._renderer.setRenderTarget(null),this._rendererIsDisposable&&(this._renderer.dispose(),this._renderer.forceContextLoss())}dispose(e){this.disposeOnDemandRenderer(),e&&this.renderTarget.dispose(),this.material instanceof qi&&Object.values(this.material.uniforms).forEach(n=>{n.value instanceof er&&n.value.dispose()}),Object.values(this.material).forEach(n=>{n instanceof er&&n.dispose()}),this.material.dispose(),this._quad.geometry.dispose()}get width(){return this._width}set width(e){this._width=e,this._renderTarget.setSize(this._width,this._height)}get height(){return this._height}set height(e){this._height=e,this._renderTarget.setSize(this._width,this._height)}get renderer(){return this._renderer}get renderTarget(){return this._renderTarget}set renderTarget(e){this._renderTarget=e,this._width=e.width,this._height=e.height}get material(){return this._material}get type(){return this._type}get colorSpace(){return this._colorSpace}}const e3e=` +varying vec2 vUv; + +void main() { + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); +} +`,t3e=` +// min half float value +#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 ) +// max half float value +#define HALF_FLOAT_MAX vec3( 65504, 65504, 65504 ) + +uniform sampler2D sdr; +uniform sampler2D gainMap; +uniform vec3 gamma; +uniform vec3 offsetHdr; +uniform vec3 offsetSdr; +uniform vec3 gainMapMin; +uniform vec3 gainMapMax; +uniform float weightFactor; + +varying vec2 vUv; + +void main() { + vec3 rgb = texture2D( sdr, vUv ).rgb; + vec3 recovery = texture2D( gainMap, vUv ).rgb; + vec3 logRecovery = pow( recovery, gamma ); + vec3 logBoost = gainMapMin * ( 1.0 - logRecovery ) + gainMapMax * logRecovery; + vec3 hdrColor = (rgb + offsetSdr) * exp2( logBoost * weightFactor ) - offsetHdr; + vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor )); + gl_FragColor = vec4( clampedHdrColor , 1.0 ); +} +`;class n3e extends qi{constructor({gamma:e,offsetHdr:n,offsetSdr:r,gainMapMin:i,gainMapMax:s,maxDisplayBoost:o,hdrCapacityMin:a,hdrCapacityMax:l,sdr:c,gainMap:u}){super({name:"GainMapDecoderMaterial",vertexShader:e3e,fragmentShader:t3e,uniforms:{sdr:{value:c},gainMap:{value:u},gamma:{value:new Z(1/e[0],1/e[1],1/e[2])},offsetHdr:{value:new Z().fromArray(n)},offsetSdr:{value:new Z().fromArray(r)},gainMapMin:{value:new Z().fromArray(i)},gainMapMax:{value:new Z().fromArray(s)},weightFactor:{value:(Math.log2(o)-a)/(l-a)}},blending:ul,depthTest:!1,depthWrite:!1}),this._maxDisplayBoost=o,this._hdrCapacityMin=a,this._hdrCapacityMax=l,this.needsUpdate=!0,this.uniformsNeedUpdate=!0}get sdr(){return this.uniforms.sdr.value}set sdr(e){this.uniforms.sdr.value=e}get gainMap(){return this.uniforms.gainMap.value}set gainMap(e){this.uniforms.gainMap.value=e}get offsetHdr(){return this.uniforms.offsetHdr.value.toArray()}set offsetHdr(e){this.uniforms.offsetHdr.value.fromArray(e)}get offsetSdr(){return this.uniforms.offsetSdr.value.toArray()}set offsetSdr(e){this.uniforms.offsetSdr.value.fromArray(e)}get gainMapMin(){return this.uniforms.gainMapMin.value.toArray()}set gainMapMin(e){this.uniforms.gainMapMin.value.fromArray(e)}get gainMapMax(){return this.uniforms.gainMapMax.value.toArray()}set gainMapMax(e){this.uniforms.gainMapMax.value.fromArray(e)}get gamma(){const e=this.uniforms.gamma.value;return[1/e.x,1/e.y,1/e.z]}set gamma(e){const n=this.uniforms.gamma.value;n.x=1/e[0],n.y=1/e[1],n.z=1/e[2]}get hdrCapacityMin(){return this._hdrCapacityMin}set hdrCapacityMin(e){this._hdrCapacityMin=e,this.calculateWeight()}get hdrCapacityMax(){return this._hdrCapacityMax}set hdrCapacityMax(e){this._hdrCapacityMax=e,this.calculateWeight()}get maxDisplayBoost(){return this._maxDisplayBoost}set maxDisplayBoost(e){this._maxDisplayBoost=Math.max(1,Math.min(65504,e)),this.calculateWeight()}calculateWeight(){const e=(Math.log2(this._maxDisplayBoost)-this._hdrCapacityMin)/(this._hdrCapacityMax-this._hdrCapacityMin);this.uniforms.weightFactor.value=Math.max(0,Math.min(1,e))}}class EJ extends Error{}class AJ extends Error{}const eg=(t,e,n)=>{var r;let i;const s=(r=t.attributes.getNamedItem(e))===null||r===void 0?void 0:r.nodeValue;if(s)i=s;else{const o=t.getElementsByTagName(e)[0];if(o){const a=o.getElementsByTagName("rdf:li");if(a.length===3)i=Array.from(a).map(l=>l.innerHTML);else throw new Error(`Gainmap metadata contains an array of items for ${e} but its length is not 3`)}else{if(n)return n;throw new Error(`Can't find ${e} in gainmap metadata`)}}return i},r3e=t=>{var e,n;let r;typeof TextDecoder<"u"?r=new TextDecoder().decode(t):r=t.toString();let i=r.indexOf("",i);r.slice(i,o+10);const a=r.slice(i,o+10);try{const c=s.parseFromString(a,"text/xml").getElementsByTagName("rdf:Description")[0],u=eg(c,"hdrgm:GainMapMin","0"),f=eg(c,"hdrgm:GainMapMax"),h=eg(c,"hdrgm:Gamma","1"),m=eg(c,"hdrgm:OffsetSDR","0.015625"),v=eg(c,"hdrgm:OffsetHDR","0.015625");let w=(e=c.attributes.getNamedItem("hdrgm:HDRCapacityMin"))===null||e===void 0?void 0:e.nodeValue;w||(w="0");const y=(n=c.attributes.getNamedItem("hdrgm:HDRCapacityMax"))===null||n===void 0?void 0:n.nodeValue;if(!y)throw new Error("Incomplete gainmap metadata");return{gainMapMin:Array.isArray(u)?u.map(g=>parseFloat(g)):[parseFloat(u),parseFloat(u),parseFloat(u)],gainMapMax:Array.isArray(f)?f.map(g=>parseFloat(g)):[parseFloat(f),parseFloat(f),parseFloat(f)],gamma:Array.isArray(h)?h.map(g=>parseFloat(g)):[parseFloat(h),parseFloat(h),parseFloat(h)],offsetSdr:Array.isArray(m)?m.map(g=>parseFloat(g)):[parseFloat(m),parseFloat(m),parseFloat(m)],offsetHdr:Array.isArray(v)?v.map(g=>parseFloat(g)):[parseFloat(v),parseFloat(v),parseFloat(v)],hdrCapacityMin:parseFloat(w),hdrCapacityMax:parseFloat(y)}}catch{}i=r.indexOf("{const i=this.options.debug,s=new DataView(e.buffer);if(s.getUint16(0)!==65496){r(new Error("Not a valid jpeg"));return}const o=s.byteLength;let a=2,l=0,c;for(;a250){r(new Error(`Found no marker after ${l} loops 😵`));return}if(s.getUint8(a)!==255){r(new Error(`Not a valid marker at offset 0x${a.toString(16)}, found: 0x${s.getUint8(a).toString(16)}`));return}if(c=s.getUint8(a+1),i&&console.log(`Marker: ${c.toString(16)}`),c===226){i&&console.log("Found APP2 marker (0xffe2)");const u=a+4;if(s.getUint32(u)===1297106432){const f=u+4;let h;if(s.getUint16(f)===18761)h=!1;else if(s.getUint16(f)===19789)h=!0;else{r(new Error("No valid endianness marker found in TIFF header"));return}if(s.getUint16(f+2,!h)!==42){r(new Error("Not valid TIFF data! (no 0x002A marker)"));return}const m=s.getUint32(f+4,!h);if(m<8){r(new Error("Not valid TIFF data! (First offset less than 8)"));return}const v=f+m,w=s.getUint16(v,!h),y=v+2;let g=0;for(let D=y;D{const e=r3e(t);if(!e)throw new AJ("Gain map XMP metadata not found");const r=await new i3e({extractFII:!0,extractNonFII:!0}).extract(t);if(r.length!==2)throw new EJ("Gain map recovery image not found");return{sdr:new Uint8Array(await r[0].arrayBuffer()),gainMap:new Uint8Array(await r[1].arrayBuffer()),metadata:e}},XU=t=>new Promise((e,n)=>{const r=document.createElement("img");r.onload=()=>{e(r)},r.onerror=i=>{n(i)},r.src=URL.createObjectURL(t)});class TJ extends es{constructor(e,n){super(n),e&&(this._renderer=e),this._internalLoadingManager=new AS}setRenderer(e){return this._renderer=e,this}setRenderTargetOptions(e){return this._renderTargetOptions=e,this}prepareQuadRenderer(){this._renderer||console.warn("WARNING: An existing WebGL Renderer was not passed to this Loader constructor or in setRenderer, the result of this Loader will need to be converted to a Data Texture with toDataTexture() before you can use it in your renderer.");const e=new n3e({gainMapMax:[1,1,1],gainMapMin:[0,0,0],gamma:[1,1,1],offsetHdr:[1,1,1],offsetSdr:[1,1,1],hdrCapacityMax:1,hdrCapacityMin:0,maxDisplayBoost:1,gainMap:new er,sdr:new er});return new BP({width:16,height:16,type:Ai,colorSpace:aa,material:e,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async render(e,n,r,i){const s=i?new Blob([i],{type:"image/jpeg"}):void 0,o=new Blob([r],{type:"image/jpeg"});let a,l,c=!1;if(typeof createImageBitmap>"u"){const h=await Promise.all([s?XU(s):Promise.resolve(void 0),XU(o)]);l=h[0],a=h[1],c=!0}else{const h=await Promise.all([s?createImageBitmap(s,{imageOrientation:"flipY"}):Promise.resolve(void 0),createImageBitmap(o,{imageOrientation:"flipY"})]);l=h[0],a=h[1]}const u=new er(l||new ImageData(2,2),Eu,qr,qr,qn,UI,ti,qs,1,aa);u.flipY=c,u.needsUpdate=!0;const f=new er(a,Eu,qr,qr,qn,UI,ti,qs,1,ho);f.flipY=c,f.needsUpdate=!0,e.width=a.width,e.height=a.height,e.material.gainMap=u,e.material.sdr=f,e.material.gainMapMin=n.gainMapMin,e.material.gainMapMax=n.gainMapMax,e.material.offsetHdr=n.offsetHdr,e.material.offsetSdr=n.offsetSdr,e.material.gamma=n.gamma,e.material.hdrCapacityMin=n.hdrCapacityMin,e.material.hdrCapacityMax=n.hdrCapacityMax,e.material.maxDisplayBoost=Math.pow(2,n.hdrCapacityMax),e.material.needsUpdate=!0,e.render()}}class o3e extends TJ{load([e,n,r],i,s,o){const a=this.prepareQuadRenderer();let l,c,u;const f=async()=>{if(l&&c&&u){try{await this.render(a,u,l,c)}catch(C){this.manager.itemError(e),this.manager.itemError(n),this.manager.itemError(r),typeof o=="function"&&o(C),a.disposeOnDemandRenderer();return}typeof i=="function"&&i(a),this.manager.itemEnd(e),this.manager.itemEnd(n),this.manager.itemEnd(r),a.disposeOnDemandRenderer()}};let h=!0,m=0,v=0,w=!0,y=0,g=0,_=!0,x=0,S=0;const D=()=>{if(typeof s=="function"){const C=m+y+x,L=v+g+S,P=h&&w&&_;s(new ProgressEvent("progress",{lengthComputable:P,loaded:L,total:C}))}};this.manager.itemStart(e),this.manager.itemStart(n),this.manager.itemStart(r);const T=new Qi(this._internalLoadingManager);T.setResponseType("arraybuffer"),T.setRequestHeader(this.requestHeader),T.setPath(this.path),T.setWithCredentials(this.withCredentials),T.load(e,async C=>{if(typeof C=="string")throw new Error("Invalid sdr buffer");l=C,await f()},C=>{h=C.lengthComputable,v=C.loaded,m=C.total,D()},C=>{this.manager.itemError(e),typeof o=="function"&&o(C)});const E=new Qi(this._internalLoadingManager);E.setResponseType("arraybuffer"),E.setRequestHeader(this.requestHeader),E.setPath(this.path),E.setWithCredentials(this.withCredentials),E.load(n,async C=>{if(typeof C=="string")throw new Error("Invalid gainmap buffer");c=C,await f()},C=>{w=C.lengthComputable,g=C.loaded,y=C.total,D()},C=>{this.manager.itemError(n),typeof o=="function"&&o(C)});const R=new Qi(this._internalLoadingManager);return R.setRequestHeader(this.requestHeader),R.setPath(this.path),R.setWithCredentials(this.withCredentials),R.load(r,async C=>{if(typeof C!="string")throw new Error("Invalid metadata string");u=JSON.parse(C),await f()},C=>{_=C.lengthComputable,S=C.loaded,x=C.total,D()},C=>{this.manager.itemError(r),typeof o=="function"&&o(C)}),a}}class a3e extends TJ{load(e,n,r,i){const s=this.prepareQuadRenderer(),o=new Qi(this._internalLoadingManager);return o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setPath(this.path),o.setWithCredentials(this.withCredentials),this.manager.itemStart(e),o.load(e,async a=>{if(typeof a=="string")throw new Error("Invalid buffer, received [string], was expecting [ArrayBuffer]");const l=new Uint8Array(a);let c,u,f;try{const h=await s3e(l);c=h.sdr,u=h.gainMap,f=h.metadata}catch(h){if(h instanceof AJ||h instanceof EJ)console.warn(`Failure to reconstruct an HDR image from ${e}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),f={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},c=l;else throw h}try{await this.render(s,f,c,u)}catch(h){this.manager.itemError(e),typeof i=="function"&&i(h),s.disposeOnDemandRenderer();return}typeof n=="function"&&n(s),this.manager.itemEnd(e),s.disposeOnDemandRenderer()},r,a=>{this.manager.itemError(e),typeof i=="function"&&i(a)}),s}}const OA={apartment:"lebombo_1k.hdr",city:"potsdamer_platz_1k.hdr",dawn:"kiara_1_dawn_1k.hdr",forest:"forest_slope_1k.hdr",lobby:"st_fagans_interior_1k.hdr",night:"dikhololo_night_1k.hdr",park:"rooitou_park_1k.hdr",studio:"studio_small_03_1k.hdr",sunset:"venice_sunset_1k.hdr",warehouse:"empty_warehouse_01_1k.hdr"},l3e="https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/",__=t=>Array.isArray(t);function IJ({files:t=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"],path:e="",preset:n=void 0,encoding:r=void 0,extensions:i}={}){var s;let o=null,a=!1;if(n){if(!(n in OA))throw new Error("Preset must be one of: "+Object.keys(OA).join(", "));t=OA[n],e=l3e}const l=__(t)&&t.length===6,c=__(t)&&t.length===3&&t.some(y=>y.endsWith("json")),u=__(t)?t[0]:t;a=__(t);const f=l?"cube":c?"webp":u.startsWith("data:application/exr")?"exr":u.startsWith("data:application/hdr")?"hdr":u.startsWith("data:image/jpeg")?"jpg":(s=u.split(".").pop())==null||(s=s.split("?"))==null||(s=s.shift())==null?void 0:s.toLowerCase();if(o=f==="cube"?I$:f==="hdr"?j4e:f==="exr"?z4e:f==="jpg"||f==="jpeg"?a3e:f==="webp"?o3e:null,!o)throw new Error("useEnvironment: Unrecognized file extension: "+t);const h=xo(y=>y.gl);I.useLayoutEffect(()=>{if(f!=="webp"&&f!=="jpg"&&f!=="jpeg")return;function y(){Dd.clear(o,a?[t]:t)}h.domElement.addEventListener("webglcontextlost",y,{once:!0})},[t,h.domElement]);const m=Dd(o,a?[t]:t,y=>{(f==="webp"||f==="jpg"||f==="jpeg")&&y.setRenderer(h),y.setPath==null||y.setPath(e),i&&i(y)});let v=a?m[0]:m;if(f==="jpg"||f==="jpeg"||f==="webp"){var w;v=(w=v.renderTarget)==null?void 0:w.texture}return v.mapping=l?gl:um,"colorSpace"in v?v.colorSpace=r??l?"srgb":"srgb-linear":v.encoding=r??l?J4e:$4e,v}const c3e=t=>t.current&&t.current.isScene,u3e=t=>c3e(t)?t.current:t;function OP(t,e,n,r,i={}){var s,o,a,l,c;i={backgroundBlurriness:(s=i.blur)!==null&&s!==void 0?s:0,backgroundIntensity:1,backgroundRotation:[0,0,0],environmentIntensity:1,environmentRotation:[0,0,0],...i};const u=u3e(e||n),f=u.background,h=u.environment,m={backgroundBlurriness:u.backgroundBlurriness,backgroundIntensity:u.backgroundIntensity,backgroundRotation:(o=(a=u.backgroundRotation)==null||a.clone==null?void 0:a.clone())!==null&&o!==void 0?o:[0,0,0],environmentIntensity:u.environmentIntensity,environmentRotation:(l=(c=u.environmentRotation)==null||c.clone==null?void 0:c.clone())!==null&&l!==void 0?l:[0,0,0]};return t!=="only"&&(u.environment=r),t&&(u.background=r),Wc(u,i),()=>{t!=="only"&&(u.environment=h),t&&(u.background=f),Wc(u,m)}}function UP({scene:t,background:e=!1,map:n,...r}){const i=xo(s=>s.scene);return I.useLayoutEffect(()=>{if(n)return OP(e,t,i,n,r)}),null}function LJ({background:t=!1,scene:e,blur:n,backgroundBlurriness:r,backgroundIntensity:i,backgroundRotation:s,environmentIntensity:o,environmentRotation:a,...l}){const c=IJ(l),u=xo(f=>f.scene);return I.useLayoutEffect(()=>OP(t,e,u,c,{blur:n,backgroundBlurriness:r,backgroundIntensity:i,backgroundRotation:s,environmentIntensity:o,environmentRotation:a})),null}function f3e({children:t,near:e=1,far:n=1e3,resolution:r=256,frames:i=1,map:s,background:o=!1,blur:a,backgroundBlurriness:l,backgroundIntensity:c,backgroundRotation:u,environmentIntensity:f,environmentRotation:h,scene:m,files:v,path:w,preset:y=void 0,extensions:g}){const _=xo(R=>R.gl),x=xo(R=>R.scene),S=I.useRef(null),[D]=I.useState(()=>new vm),T=I.useMemo(()=>{const R=new ZR(r);return R.texture.type=Ai,R},[r]);I.useLayoutEffect(()=>(i===1&&S.current.update(_,D),OP(o,m,x,T.texture,{blur:a,backgroundBlurriness:l,backgroundIntensity:c,backgroundRotation:u,environmentIntensity:f,environmentRotation:h})),[t,D,T.texture,m,x,o,i,_]);let E=1;return Xv(()=>{(i===1/0||ERP({GroundProjectedEnvImpl:n4e}),[]);const a=I.useMemo(()=>[o],[o]),l=(e=t.ground)==null?void 0:e.height,c=(n=t.ground)==null?void 0:n.radius,u=(r=(i=t.ground)==null?void 0:i.scale)!==null&&r!==void 0?r:1e3;return I.createElement(I.Fragment,null,I.createElement(UP,X({},t,{map:o})),I.createElement("groundProjectedEnvImpl",{args:a,scale:u,height:l,radius:c}))}function h3e(t){return t.ground?I.createElement(d3e,t):t.map?I.createElement(UP,t):t.children?I.createElement(f3e,t):I.createElement(LJ,t)}const p3e=I.forwardRef(({scale:t=10,frames:e=1/0,opacity:n=1,width:r=1,height:i=1,blur:s=1,near:o=0,far:a=10,resolution:l=512,smooth:c=!0,color:u="#000000",depthWrite:f=!1,renderOrder:h,...m},v)=>{const w=I.useRef(null),y=xo(Y=>Y.scene),g=xo(Y=>Y.gl),_=I.useRef(null);r=r*(Array.isArray(t)?t[0]:t||1),i=i*(Array.isArray(t)?t[1]:t||1);const[x,S,D,T,E,R,C]=I.useMemo(()=>{const Y=new Zi(l,l),ie=new Zi(l,l);ie.texture.generateMipmaps=Y.texture.generateMipmaps=!1;const ee=new vc(r,i).rotateX(Math.PI/2),le=new Cr(ee),j=new lS;j.depthTest=j.depthWrite=!1,j.onBeforeCompile=de=>{de.uniforms={...de.uniforms,ucolor:{value:new Lt(u)}},de.fragmentShader=de.fragmentShader.replace("void main() {",`uniform vec3 ucolor; + void main() { + `),de.fragmentShader=de.fragmentShader.replace("vec4( vec3( 1.0 - fragCoordZ ), opacity );","vec4( ucolor * fragCoordZ * 2.0, ( 1.0 - fragCoordZ ) * 1.0 );")};const q=new qi(U4e),ne=new qi(F4e);return ne.depthTest=q.depthTest=!1,[Y,ee,j,le,q,ne,ie]},[l,r,i,t,u]),L=Y=>{T.visible=!0,T.material=E,E.uniforms.tDiffuse.value=x.texture,E.uniforms.h.value=Y*1/256,g.setRenderTarget(C),g.render(T,_.current),T.material=R,R.uniforms.tDiffuse.value=C.texture,R.uniforms.v.value=Y*1/256,g.setRenderTarget(x),g.render(T,_.current),T.visible=!1};let P=0,z,B;return Xv(()=>{_.current&&(e===1/0||Pw.current,[]),I.createElement("group",X({"rotation-x":Math.PI/2},m,{ref:w}),I.createElement("mesh",{renderOrder:h,geometry:S,scale:[1,-1,1],rotation:[-Math.PI/2,0,0]},I.createElement("meshBasicMaterial",{transparent:!0,map:x.texture,opacity:n,depthWrite:f})),I.createElement("orthographicCamera",{ref:_,args:[-r/2,r/2,i/2,-i/2,o,a]}))});function m3e(t){return t.isLight}function g3e(t){return!!t.geometry}const RJ=I.createContext(null),v3e=_J({color:new Lt,blend:2,alphaTest:.75,opacity:0,map:null},`varying vec2 vUv; + void main() { + gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.); + vUv = uv; + }`,`varying vec2 vUv; + uniform sampler2D map; + uniform vec3 color; + uniform float opacity; + uniform float alphaTest; + uniform float blend; + void main() { + vec4 sampledDiffuseColor = texture2D(map, vUv); + gl_FragColor = vec4(color * sampledDiffuseColor.r * blend, max(0.0, (1.0 - (sampledDiffuseColor.r + sampledDiffuseColor.g + sampledDiffuseColor.b) / alphaTest)) * opacity); + #include + #include <${MJ>=154?"colorspace_fragment":"encodings_fragment"}> + }`),y3e=I.forwardRef(({children:t,temporal:e,frames:n=40,limit:r=1/0,blend:i=20,scale:s=10,opacity:o=1,alphaTest:a=.75,color:l="black",colorBlend:c=2,resolution:u=1024,toneMapped:f=!0,...h},m)=>{RP({SoftShadowMaterial:v3e});const v=xo(T=>T.gl),w=xo(T=>T.scene),y=xo(T=>T.camera),g=xo(T=>T.invalidate),_=I.useRef(null),x=I.useRef(null),[S]=I.useState(()=>new _3e(v,w,u));I.useLayoutEffect(()=>{S.configure(_.current)},[]);const D=I.useMemo(()=>({lights:new Map,temporal:!!e,frames:Math.max(2,n),blend:Math.max(2,n===1/0?i:n),count:0,getMesh:()=>_.current,reset:()=>{S.clear();const T=_.current.material;T.opacity=0,T.alphaTest=0,D.count=0},update:(T=1)=>{const E=_.current.material;D.temporal?(E.opacity=Math.min(o,E.opacity+o/D.blend),E.alphaTest=Math.min(a,E.alphaTest+a/D.blend)):(E.opacity=o,E.alphaTest=a),x.current.visible=!0,S.prepare();for(let R=0;RC.update()),S.update(y,D.blend);x.current.visible=!1,S.finish()}}),[S,y,w,e,n,i,o,a]);return I.useLayoutEffect(()=>{D.reset(),!D.temporal&&D.frames!==1/0&&D.update(D.blend)}),I.useImperativeHandle(m,()=>D,[D]),Xv(()=>{(D.temporal||D.frames===1/0)&&D.countnull,ref:x},I.createElement(RJ.Provider,{value:D},t)),I.createElement("mesh",{receiveShadow:!0,ref:_,scale:s,rotation:[-Math.PI/2,0,0]},I.createElement("planeGeometry",null),I.createElement("softShadowMaterial",{transparent:!0,depthWrite:!1,toneMapped:f,color:l,blend:c,map:S.progressiveLightMap2.texture})))}),w3e=I.forwardRef(({castShadow:t=!0,bias:e=.001,mapSize:n=512,size:r=5,near:i=.5,far:s=500,frames:o=1,position:a=[0,0,0],radius:l=1,amount:c=8,intensity:u=MJ>=155?Math.PI:1,ambient:f=.5,...h},m)=>{const v=I.useRef(null),w=new Z(...a).length(),y=I.useContext(RJ),g=I.useCallback(()=>{let x;if(v.current)for(let S=0;Sf)x.position.set(a[0]+Pp.randFloatSpread(l),a[1]+Pp.randFloatSpread(l),a[2]+Pp.randFloatSpread(l));else{let D=Math.acos(2*Math.random()-1)-Math.PI/2,T=2*Math.PI*Math.random();x.position.set(Math.cos(D)*Math.cos(T)*w,Math.abs(Math.cos(D)*Math.sin(T)*w),Math.sin(D)*w)}},[l,f,w,...a]),_=I.useMemo(()=>({update:g}),[g]);return I.useImperativeHandle(m,()=>_,[_]),I.useLayoutEffect(()=>{var x;const S=v.current;return y&&((x=y.lights)==null||x.set(S.uuid,_)),()=>{var D;return void(y==null||(D=y.lights)==null?void 0:D.delete(S.uuid))}},[y,_]),I.createElement("group",X({ref:v},h),Array.from({length:c},(x,S)=>I.createElement("directionalLight",{key:S,castShadow:t,"shadow-bias":e,"shadow-mapSize":[n,n],intensity:u/c},I.createElement("orthographicCamera",{attach:"shadow-camera",args:[-r,r,r,-r,i,s]}))))});class _3e{constructor(e,n,r=1024){this.renderer=e,this.res=r,this.scene=n,this.buffer1Active=!1,this.lights=[],this.meshes=[],this.object=null,this.clearColor=new Lt,this.clearAlpha=0;const i={type:Ai,magFilter:ei,minFilter:ei};this.progressiveLightMap1=new Zi(this.res,this.res,i),this.progressiveLightMap2=new Zi(this.res,this.res,i),this.discardMat=new Y4e,this.targetMat=new pP({fog:!1}),this.previousShadowMap={value:this.progressiveLightMap1.texture},this.averagingWindow={value:100},this.targetMat.onBeforeCompile=s=>{s.vertexShader=`varying vec2 vUv; +`+s.vertexShader.slice(0,-1)+"vUv = uv; gl_Position = vec4((uv - 0.5) * 2.0, 1.0, 1.0); }";const o=s.fragmentShader.indexOf("void main() {");s.fragmentShader=`varying vec2 vUv; +`+s.fragmentShader.slice(0,o)+`uniform sampler2D previousShadowMap; + uniform float averagingWindow; +`+s.fragmentShader.slice(o-1,-1)+` +vec3 texelOld = texture2D(previousShadowMap, vUv).rgb; + gl_FragColor.rgb = mix(texelOld, gl_FragColor.rgb, 1.0/ averagingWindow); + }`,s.uniforms.previousShadowMap=this.previousShadowMap,s.uniforms.averagingWindow=this.averagingWindow}}clear(){this.renderer.getClearColor(this.clearColor),this.clearAlpha=this.renderer.getClearAlpha(),this.renderer.setClearColor("black",1),this.renderer.setRenderTarget(this.progressiveLightMap1),this.renderer.clear(),this.renderer.setRenderTarget(this.progressiveLightMap2),this.renderer.clear(),this.renderer.setRenderTarget(null),this.renderer.setClearColor(this.clearColor,this.clearAlpha),this.lights=[],this.meshes=[],this.scene.traverse(e=>{g3e(e)?this.meshes.push({object:e,material:e.material}):m3e(e)&&this.lights.push({object:e,intensity:e.intensity})})}prepare(){this.lights.forEach(e=>e.object.intensity=0),this.meshes.forEach(e=>e.object.material=this.discardMat)}finish(){this.lights.forEach(e=>e.object.intensity=e.intensity),this.meshes.forEach(e=>e.object.material=e.material)}configure(e){this.object=e}update(e,n=100){if(!this.object)return;this.averagingWindow.value=n,this.object.material=this.targetMat;const r=this.buffer1Active?this.progressiveLightMap1:this.progressiveLightMap2,i=this.buffer1Active?this.progressiveLightMap2:this.progressiveLightMap1,s=this.scene.background;this.scene.background=null,this.renderer.setRenderTarget(r),this.previousShadowMap.value=i.texture,this.buffer1Active=!this.buffer1Active,this.renderer.render(this.scene,e),this.renderer.setRenderTarget(null),this.scene.background=s}}const M3e={rembrandt:{main:[1,2,1],fill:[-2,-.5,-2]},portrait:{main:[-1,2,.5],fill:[-1,.5,-1.5]},upfront:{main:[0,2,1],fill:[-1,.5,-1.5]},soft:{main:[-2,4,4],fill:[-1,.5,-1.5]}};function x3e({radius:t,adjustCamera:e}){const n=Z4e();return I.useEffect(()=>{e&&n.refresh().clip().fit()},[t,e]),null}function b3e({children:t,center:e,adjustCamera:n=!0,intensity:r=.5,shadows:i="contact",environment:s="city",preset:o="rembrandt",...a}){var l,c,u,f,h,m,v,w;const y=typeof o=="string"?M3e[o]:o,[{radius:g,height:_},x]=I.useState({radius:0,width:0,height:0,depth:0}),S=(l=i==null?void 0:i.bias)!==null&&l!==void 0?l:-1e-4,D=(c=i==null?void 0:i.normalBias)!==null&&c!==void 0?c:0,T=(u=i==null?void 0:i.size)!==null&&u!==void 0?u:1024,E=(f=i==null?void 0:i.offset)!==null&&f!==void 0?f:0,R=i==="contact"||(i==null?void 0:i.type)==="contact",C=i==="accumulative"||(i==null?void 0:i.type)==="accumulative",L={...typeof i=="object"?i:{}},P=s?typeof s=="string"?{preset:s}:s:null,z=I.useCallback(B=>{const{width:Y,height:ie,depth:ee,boundingSphere:le}=B;x({radius:le.radius,width:Y,height:ie,depth:ee}),e!=null&&e.onCentered&&e.onCentered(B)},[]);return I.createElement(I.Fragment,null,I.createElement("ambientLight",{intensity:r/3}),I.createElement("spotLight",{penumbra:1,position:[y.main[0]*g,y.main[1]*g,y.main[2]*g],intensity:r*2,castShadow:!!i,"shadow-bias":S,"shadow-normalBias":D,"shadow-mapSize":T}),I.createElement("pointLight",{position:[y.fill[0]*g,y.fill[1]*g,y.fill[2]*g],intensity:r}),I.createElement(K4e,X({fit:!!n,clip:!!n,margin:Number(n),observe:!0},a),I.createElement(x3e,{radius:g,adjustCamera:n}),I.createElement(W4e,X({},e,{position:[0,E/2,0],onCentered:z}),t)),I.createElement("group",{position:[0,-_/2-E/2,0]},R&&I.createElement(p3e,X({scale:g*4,far:g,blur:2},L)),C&&I.createElement(y3e,X({temporal:!0,frames:100,alphaTest:.9,toneMapped:!0,scale:g*4},L),I.createElement(w3e,{amount:(h=L.amount)!==null&&h!==void 0?h:8,radius:(m=L.radius)!==null&&m!==void 0?m:g,ambient:(v=L.ambient)!==null&&v!==void 0?v:.5,intensity:(w=L.intensity)!==null&&w!==void 0?w:1,position:[y.main[0]*g,y.main[1]*g,y.main[2]*g],size:g*4,bias:-S,mapSize:T}))),s&&I.createElement(h3e,P))}function S3e(t){const{nodes:e,materials:n}=Zv("/models/logo.glb"),r=I.useRef(null);return Xv((i,s)=>{r.current.rotation.x+=s*.5,r.current.rotation.y+=s*.5,r.current.rotation.z+=s*.5}),O.jsx("group",{...t,dispose:null,ref:r,children:O.jsx("group",{scale:1,children:O.jsx("mesh",{castShadow:!0,receiveShadow:!0,geometry:e.mesh_0.geometry,material:n.Mat_1,scale:1})})})}Zv.preload("/logo.glb");function C3e(){const t=yl();function e(){LG(()=>t("/"))}return O.jsxs(E3e,{children:[O.jsx(A3e,{children:O.jsx(UA,{children:O.jsx(T3e,{children:O.jsxs(I3e,{children:[O.jsx(L3e,{src:PG,alt:"logo"}),O.jsx(R3e,{children:"Connection"})]})})})}),O.jsx(P3e,{children:O.jsx(UA,{children:O.jsx(D3e,{children:O.jsxs(N3e,{children:[O.jsx(k3e,{children:O.jsx(jLe,{shadows:!0,dpr:[1,2],camera:{fov:50},children:O.jsx(I.Suspense,{fallback:null,children:O.jsxs(b3e,{preset:"rembrandt",intensity:1,environment:"city",children:["false",O.jsx(S3e,{}),"false"]})})})}),O.jsxs(B3e,{children:[O.jsx(O3e,{children:"Connection. Have a convenient connection with everyone!"}),O.jsx(U3e,{children:"Join us:"}),O.jsxs(F3e,{children:[O.jsxs(KU,{onClick:e,children:["Google Auth ",O.jsx(j3e,{src:_V,alt:"google"})]}),O.jsx(z3e,{children:"or"}),O.jsx(KU,{onClick:()=>t("/authentication"),children:"Sign up"})]})]})]})})})}),O.jsx(H3e,{children:O.jsx(UA,{children:O.jsx(G3e,{children:O.jsxs(V3e,{children:["© 2024",O.jsx("a",{target:"_blank",href:"https://github.com/darkoton",children:"Darkoto"})]})})})})]})}const E3e=Be.div` + display: flex; + flex-direction: column; + flex: 1 1 auto; +`,UA=Be.div` + width: 100%; + height: 100%; + max-width: 1140px; + margin: 0 auto; + padding: 0 15px; + flex: 1 1 auto; + display: flex; +`,A3e=Be.header` + padding: 8px 10px; + background: #191935; +`,T3e=Be.div` + display: flex; + align-items: center; +`,I3e=Be.div` + display: flex; + align-items: center; + column-gap: 15px; +`,L3e=Be.img` + width: 50px; + max-width: 100%; +`,R3e=Be.span` + ${En("font-size",30,20)} + font-weight: bold; +`,P3e=Be.div` + flex: 1 1 auto; +`,D3e=Be.div` + display: flex; + flex-direction: column; + padding-bottom: 20px; +`,N3e=Be.div` + flex: 1 1 auto; + display: flex; + align-items: center; + justify-content: space-between; + row-gap: 20px; + ${En("margin-top",50,20,1)} + + @media (max-width: 680px) { + flex-direction: column; + } +`,PJ=wl` + @media (max-width: 680px) { + width: 100%; + } +`,k3e=Be.div` + width: 50%; + height: 100%; + max-height: 100%; + ${PJ} +`,B3e=Be.div` + width: 50%; + display: flex; + flex-direction: column; + + ${PJ} +`,O3e=Be.div` + ${En("font-size",40,25,1)} + ${En("line-height",40,30,1)} + font-weight: bold; + margin-bottom: 20px; +`,U3e=Be.div` + ${En("font-size",30,25,1)} + ${En("line-height",30,25,1)} + margin-bottom: 10px; +`,F3e=Be.div` + display: flex; + flex-direction: column; + align-items: center; + row-gap: 5px; + width: 100%; + max-width: 300px; +`,KU=Be.button` + width: 100%; + border: 2px solid ${Dn.$colorMain}; + border-radius: 1000px; + padding: 5px 20px; + font-size: 22px; + display: flex; + align-items: center; + justify-content: center; + column-gap: 15px; + + @media (any-hover: hover) { + & { + cursor: pointer; + transition: all 0.3s ease 0s; + } + &:hover { + box-shadow: inset 0 0 10px 0 ${Dn.$colorMain}; + } + } +`,j3e=Be.img` + width: 100%; + max-width: 35px; +`,z3e=Be.span` + font-size: 24px; +`,H3e=Be.footer` + background: #0f0f1f; +`,G3e=Be.div` + padding: 30px 0; + ${_l("padding",30,15,0,0)} + display: flex; + justify-content: center; + width: 100%; +`,V3e=Be.div` + color: #9e9e9e; + display: flex; + column-gap: 5px; + + & a { + color: #fff; + @media (any-hover: hover) { + & { + cursor: pointer; + } + &:hover { + text-decoration: underline; + } + } + } +`;async function W3e({params:t}){const e=Fa.getState();if(e.chat)return null;const n=localStorage.getItem("uid"),r=await om(["chats",t.id]);if(!r)return null;e.setChat(r);const i=r.users[r.pair.filter(s=>s!=n)[0]];return e.setUser(i),null}const $3e=[{path:"/",element:O.jsx(jve,{}),children:[{path:"/",element:O.jsx(Vxe,{})},{path:"/chat/:id",loader:W3e,element:O.jsx(WO,{})},{path:"/friend/:id",element:O.jsx(WO,{})}]},{path:"authentication",element:O.jsx(Qve,{})},{path:"home",element:O.jsx(C3e,{})}],J3e=$3e.map(t=>(t.errorElement=O.jsx(zve,{}),t));function Y3e(){return QK(J3e)}const Q3e=b4({palette:{mode:"dark"}});FA.createRoot(document.getElementById("root")).render(O.jsx(qt.StrictMode,{children:O.jsxs(dne,{theme:Q3e,children:[O.jsx(lse,{}),O.jsx(Lz,{router:Y3e()})]})})); diff --git a/assets/index-s_oqLzD1.css b/assets/index-s_oqLzD1.css new file mode 100644 index 0000000..f56bbef --- /dev/null +++ b/assets/index-s_oqLzD1.css @@ -0,0 +1 @@ +@charset "UTF-8";.error{flex:1 1 auto;box-sizing:border-box;background-color:#000;background-image:radial-gradient(#112258,#041607),url(/Connection/oldTV.gif);background-repeat:no-repeat;background-size:cover;font-family:Inconsolata,Helvetica,sans-serif;font-size:1.5rem;color:#298ce8cc;text-shadow:0 0 1ex #3593eb,0 0 2px rgba(255,255,255,.8)}.noise{pointer-events:none;position:absolute;width:100%;height:100%;background-image:url(/Connection/oldTV.gif);background-repeat:no-repeat;background-size:cover;z-index:-1;opacity:.02}.overlay{pointer-events:none;position:absolute;width:100%;height:100%;background:repeating-linear-gradient(180deg,#0000 0,#0000004d,#0000);background-size:auto 4px;z-index:1}.overlay:before{content:"";pointer-events:none;position:absolute;display:block;top:0;left:0;right:0;bottom:0;width:100%;height:100%;background-image:linear-gradient(0deg,transparent 0%,rgba(32,85,128,.2) 2%,rgba(32,90,128,.8) 3%,rgba(32,62,128,.2) 3%,transparent 100%);background-repeat:no-repeat;animation:scan 7.5s linear 0s infinite}@keyframes scan{0%{background-position:0 -100vh}35%,to{background-position:0 100vh}}.terminal{box-sizing:inherit;height:100%;width:1000px;max-width:100%;padding:calc(20px + .0225*(100vw - 320px));text-transform:uppercase;font-size:calc(17px + 5 * (100vw - 320px) / 1600)}.output{color:#298ce8cc;text-shadow:0 0 1px rgba(51,116,255,.4),0 0 2px rgba(255,255,255,.8);margin:15px 0}.output:before{content:"> "}.link{color:#fff;text-decoration:none;cursor:pointer}.link:hover,.link:focus{text-decoration:underline!important}.link:before{content:"["}.link:after{content:"]"}.errorcode{color:#fff}.PhotoView-Portal{height:100%;left:0;overflow:hidden;position:fixed;top:0;touch-action:none;width:100%;z-index:2000}@keyframes PhotoView__rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes PhotoView__delayIn{0%,50%{opacity:0}to{opacity:1}}.PhotoView__Spinner{animation:PhotoView__delayIn .4s linear both}.PhotoView__Spinner svg{animation:PhotoView__rotate .6s linear infinite}.PhotoView__Photo{-webkit-user-drag:none;cursor:grab;max-width:none}.PhotoView__Photo:active{cursor:grabbing}.PhotoView__icon{display:inline-block;left:0;position:absolute;top:0;transform:translate(-50%,-50%)}.PhotoView__PhotoBox,.PhotoView__PhotoWrap{bottom:0;direction:ltr;left:0;position:absolute;right:0;top:0;touch-action:none;width:100%}.PhotoView__PhotoWrap{overflow:hidden;z-index:10}.PhotoView__PhotoBox{transform-origin:left top}@keyframes PhotoView__fade{0%{opacity:0}to{opacity:1}}.PhotoView-Slider__clean .PhotoView-Slider__ArrowLeft,.PhotoView-Slider__clean .PhotoView-Slider__ArrowRight,.PhotoView-Slider__clean .PhotoView-Slider__BannerWrap,.PhotoView-Slider__clean .PhotoView-Slider__Overlay,.PhotoView-Slider__willClose .PhotoView-Slider__BannerWrap:hover{opacity:0}.PhotoView-Slider__Backdrop{background:#000;height:100%;left:0;position:absolute;top:0;transition-property:background-color;width:100%;z-index:-1}.PhotoView-Slider__fadeIn{animation:PhotoView__fade linear both;opacity:0}.PhotoView-Slider__fadeOut{animation:PhotoView__fade linear reverse both;opacity:0}.PhotoView-Slider__BannerWrap{align-items:center;background-color:#00000080;color:#fff;display:flex;height:44px;justify-content:space-between;left:0;position:absolute;top:0;transition:opacity .2s ease-out;width:100%;z-index:20}.PhotoView-Slider__BannerWrap:hover{opacity:1}.PhotoView-Slider__Counter{font-size:14px;opacity:.75;padding:0 10px}.PhotoView-Slider__BannerRight{align-items:center;display:flex;height:100%}.PhotoView-Slider__toolbarIcon{fill:#fff;box-sizing:border-box;cursor:pointer;opacity:.75;padding:10px;transition:opacity .2s linear}.PhotoView-Slider__toolbarIcon:hover{opacity:1}.PhotoView-Slider__ArrowLeft,.PhotoView-Slider__ArrowRight{align-items:center;bottom:0;cursor:pointer;display:flex;height:100px;justify-content:center;margin:auto;opacity:.75;position:absolute;top:0;transition:opacity .2s linear;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:70px;z-index:20}.PhotoView-Slider__ArrowLeft:hover,.PhotoView-Slider__ArrowRight:hover{opacity:1}.PhotoView-Slider__ArrowLeft svg,.PhotoView-Slider__ArrowRight svg{fill:#fff;background:#0000004d;box-sizing:content-box;height:24px;padding:10px;width:24px}.PhotoView-Slider__ArrowLeft{left:0}.PhotoView-Slider__ArrowRight{right:0}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:300;src:url(/Connection/assets/roboto-cyrillic-ext-300-normal-TzZWIuiO.woff2) format("woff2"),url(/Connection/assets/roboto-cyrillic-ext-300-normal-C7AGhuC_.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:300;src:url(/Connection/assets/roboto-cyrillic-300-normal-D6mjswgs.woff2) format("woff2"),url(/Connection/assets/roboto-cyrillic-300-normal-UX5PCucy.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:300;src:url(data:font/woff2;base64,d09GMgABAAAAAAXIABIAAAAACfAAAAVrAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGiYbIBw2BmAANAhYCYM8EQwKg3yDWwsQABIUATYCJAMcBCAFgnwHIAyCOhuKCFFUkNIAfhzkZNGn0qdP43KKULZY+sdzG0Q8m/mz8ICIX02oaFIVOdFc1ZzS76IBcWPjIIKlGKNV/3O6DmGQY/0cOocGnZS5fphLIQxybKVfXZEOY7haU7u7F7IfFUso/CdW3X0AsQAwPhW2Tv1UAStAFdXxNaLOVQhbV3MjxjWbYEg6T29vAH0LBI0IAFAOwUQQBA0IASEEECBAgjJIz94DRxICQAF43hlrbeqi1KrNWDS7iJq5s7MLu6lo2twSDwB8MeX1ukpLCgOMw0YLkOr9kP4yOQFmBnaVs6/PDelD1x3k7zLJIKcPa9jICQDV3nCwsdHToL5UBh0xSWGjAuGt7HnRX/rR3QgADckz3lSjnWSwElt5isGm6u0xoExmKmW0I8S8LOHMARJ6DYKqPWXUNmKGQxmzAmXNh4hpE0hYCsN8GxMgAKTK8A9lX+RjAvHOUAnfr08nEpIi0nsFmSqhpSANhYSeIg96Ha/FaUMP+9Fv9bA92s1XUHVeYvNR68e4DIERvCcwkgW6mthy89qYnIRKxVT+MQ4VOiRhB1Fc/hJGqqyu121wk7FSxdBV2XohSOOhBgkPxcWXl5x5TxG3T/vwjcHKmw1L2pcl3vZ41zJm3GMz008LrPS52KOW6UEeOjUQ3gFd+9Dr6Fpa2diNrwySMeOd17yJTSpKwp8qt1krwiDMfCCFhtogiMn7hVJ+PftGjxH87Wopy8DHbWSbp6H7O2bIo9beHti3u0IWr/zSfjiFrp/9ZA3YT1oqtgvJuPKpWAVBw4fmeUQBsACIAH6gEzCTw5D5cwxogqYrKHf4V8Qipj8eWRJduCSvwFc4MVoghZElK9/6KLD5C11Wvfvpto/fHjVyzTuBzW9prH47uOVdfcmEIGNnfJDXRw194w2p/xiG85iePRHDiq/uNf/H4IJPT+kyaaNM0tODH9n09OYmcuaS166o9f4ntzaXs0M5taWe9sjiqPV9gxef/alh6KD+Y+MXXv66YbBv2dd2r+u0suwDLfv832/WNFkyoY/0rzV8zdDG1EX1BgsjUxs0ILPG+85obrzkhmLxeKKdE4o5vBQxk/mvDL+EQ693tCaVb2rVOo8jEAORgas01GXXCDUW8y07gffcEKkJn6XFnMh7TZu5qlp1B5XJegAGdUFUqM5xgrGbWeIEkmNrvFX5N4CSVWo0bYZ03rFecqwIBIRr8o4yUJuNlyo6RpMKNRFYQkAofjkgQMhvKtBM3QQQQKuVWDf4wowp0Y6/+yr6AHjsp3hjgNdl+Kf/2P+/7q/kmwP40QAQsIoyIfC3+cfO9PJXQhj8LH0rM10pv8AoYFnuYEo5mTWYrsUOyjGOgQAQAQ1tNiYC+MihI8oPTMbaLlRgsl0jwvxJfW9SwW5Ql7UJE9rLz40w0iP0kFZqkdny5cozl01zmtJsNNv0keaQimS791NihsaJbiwW5YYrU3OYz2abI9ts82WbqTHDpU2XNleazUCFcnpjrnmKTAOONs82R36q5A7YeK0Fbehwo5Nt8skbKfPGuUq1p4mzBV/XmGlKTTNDnmyNSZstVxOK5JshW4k5ss3RhIH66aGXwUbopdHzf6gpOgB4BWZqFzqhpEMSV0JaUtywRA+4M9y+aYNqCXxJ7pTicb2aV11uuVNbnju0bbHq86cOaG1Va2YObt80+rSXCXiYuxZMbF8rZ+k9fMO6t6xT3sPfrkntSrFc4GwumNMtdGptbv/UMdxIxEo6/IGvd52EzHGHBsa57kooHcxzu1Tik1NAK6CJca47hNK0g26QB9VDKpqH8wQK0WrSeBqCUlbJHwHVm3PdKUY76EXyEl3OSm4TO5EGt2Z9mQMAAA==) format("woff2"),url(data:font/woff;base64,d09GRgABAAAAAATkAA4AAAAABWQAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHREVGAAABRAAAAB8AAAAmAEYABkdQT1MAAAFkAAAAIAAAACBEcExrR1NVQgAAAYQAAAA2AAAANpMNggRPUy8yAAABvAAAAE0AAABgku/g4WNtYXAAAAIMAAAAKQAAADQAER+gZ2FzcAAAAjgAAAAMAAAADAAIABNnbHlmAAACRAAAAREAAAEUGjc/4GhlYWQAAANYAAAANgAAADb8WdJpaGhlYQAAA5AAAAAfAAAAJAqpBZBobXR4AAADsAAAABwAAAAcE07/w2xvY2EAAAPMAAAAEAAAABAA0AE8bWF4cAAAA9wAAAAgAAAAIAI3A1xuYW1lAAAD/AAAANEAAAF8Gwg553Bvc3QAAATQAAAAEwAAACD/bQBkeNpjYGRgYuBjgAAxII8NiEGQCcjnAWEgmwEABhIATQAAAQAAAAoAEgAUAAFERkxUAAwAAAAAAAQAAAAA//8AAAABAAAACgAkACYABERGTFQAHmN5cmwAImdyZWsAImxhdG4AIgAAAAAACAAAAAAAAAAA//8AAAAAeNpjYGbJZ9RhYGVgYJ3FaszAwCgPoZkvMqQxMTAwADEUODCgAnd/f3cGB3lfeV82hn8MDGnss5gYFBgY54PkWKxYNzAoACEzAMRwCjwAAAB42mNgYGACYmYgFgGSjGCahUEBSLMAIZAv7/v/P4R8sBMszwAAVmAGzQAAAAABAAIACAAC//8AD3jaDcwBRANRGAfw//e99zppau/qGohum5kC7dpAAlQKRgC1pABCoFIjSkoFIQHIQsAABKEpGbUhAkAgZ4pAue8aAH4/GKwDKm/qUOhBLxIYAHzf+soSWVI+FclX+WiKGyXpyB0lPliJEEeRqf/WjBNVeevP8nZU4coxVwBGNQ51aBrdaQSgIdaZNGxx0s2OajflJDmTZusl3aDgWh2eitzG8nhOTGWiM7XbeW1+f720P/nkWVo12qDS5RMFN9fy/pAkh8bkTX6uJJI2jVMfGCt6h9dMCwb9AA0GnsqowBtOOblckZaP9u9nZZOXJhYW9QVNe9Kk+dW9uUL2sBzHchCHptC1OegZwIGRLPAPx7pVLQAAAAABAAAAAiMS7qbXil8PPPUAGQgAAAAAAMTwES4AAAAA1QFS4/og/dUJGghzAAAACQACAAAAAAAAeNpjYGRgYM/5x8PAwGn+S+GfK6cUUAQVsAMAbCsERwADjABkAAAAAAAAAAAB8gAABWoAfQK2AF8FsP6DAAAAKQApACkAKQBgAH4AigABAAAABwCPABYAWQAFAAEAAAAAAA4AAAIAAnIABgABeNpNjrkKwkAURY8r2lhbTmVn3ApBKxERQSxULAWXGIWQCYkL9n6Nn+GXeYshhMsdzrwdqHGhRKFcB/bguECTveMiDZ6OS7l4OccVWnwcVxX/Om6w5ccUS8ybhBsBV+4Y+nTpSYY5VgoI8TEsiDjhiSaEkmGddaXoh08qJzz1nvEUsRzlu2xYZtWqFD0IOZCwQz2kyloitB+PHgOGjHHXiPOz2rlZshQzoiO9kPA4EMsnZX39LAmBsiE3xXwidKfcYcmCKTNWbPS20W66fypGNRAAAAB42mNgZgCD/1kMKQxYAAAqHwHRAA==) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:300;src:url(/Connection/assets/roboto-greek-300-normal-ndiuWqED.woff2) format("woff2"),url(/Connection/assets/roboto-greek-300-normal-Dgbe-dnN.woff) format("woff");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:300;src:url(/Connection/assets/roboto-vietnamese-300-normal-CnPrVvBs.woff2) format("woff2"),url(/Connection/assets/roboto-vietnamese-300-normal-DOxDZ6bW.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:300;src:url(/Connection/assets/roboto-latin-ext-300-normal-DEsNdRC-.woff2) format("woff2"),url(/Connection/assets/roboto-latin-ext-300-normal-CaUuWeqj.woff) format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:300;src:url(/Connection/assets/roboto-latin-300-normal-ThHrQhYb.woff2) format("woff2"),url(/Connection/assets/roboto-latin-300-normal-lq7MgJXa.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(/Connection/assets/roboto-cyrillic-ext-400-normal-DORK9bGA.woff2) format("woff2"),url(/Connection/assets/roboto-cyrillic-ext-400-normal--KougVX-.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(/Connection/assets/roboto-cyrillic-400-normal-DVDTZtmW.woff2) format("woff2"),url(/Connection/assets/roboto-cyrillic-400-normal-DCQqOlfN.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAAXMABIAAAAACeAAAAVwAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGiYbIBw2BmAANAhUCYM8EQwKg2iDSgsQABIUATYCJAMcBCAFgnQHIAyCSRt8CAieB2WbnmbLuYAwwpK8+iIe4P3r89wHDZaakNWCmB8R66SEWr+ILhpijnTqf6QAyyF8GVAOAPOWtmNg6llFXANTaQXCgXMubThOj6JRPCJsEWW3o1/4wX411uruvta/9FF8Zz50qenu3hVxmf4QIi1dRSzhkcR0SqA1QoiwzI2uAUbffgtBpA0YCssEQRChiaaAgMpAFvDsmKQshIEEer1l/u1J0Sbi8P6OJsQc3VHd6N0nlHe1MAhFbvPNcXJVWKNNekPqCYVx/lj8nqMi5BY4Pd6hectSY5E2Lll8SMf/HJXfEKEOfCtEMjEFBEHtpSkbjBK4aB1MIEjT/t9z/+W3j8FgVyeNWdDn7wh7b19l7pQoyFW8FXcx+P9D4NE2ErMMk4kskmVMCiwyG5ZhhyC7qZ19JoMatwj00/I0GG/uexT/v7K+Ysx9JXVwiRoC1yHR9VGAy9QQcXVQbqOGmOvEACWZm5EnyicLnfULjlggc0ldeRXQEqImnlS9kL8XAZndegKyuixM77OP24/Mzw9QQ7Kfha4v9OEOadjJ0qBYxN896pRbZI6ly/PS82Bs9iiYPpuaWJZEw83lXbg5G5JRslr2VFWPDtfbPBryeqZk5eKg/CqRD2Oz8tcvgJMiFi4RC6PWb9fnkzx74cWAeELYJFCSObI1tnxBfqwo2lPppazn26eGKDWU3KLMvOioppPNX6y4euc5FBq4y6Emd99OYa6zfpnpUhjE4Y/qoWtWQ4tIHr845ZA6bDc+AOSaR/sb6c9Otrh6uj3cUdDVKESNWgCK/GzxKQiLFKJeTz+QgzZKTIUcA2Nz9h2ppBhtbSQxfsjAtk4xoD1oes5gXYPe8UWmx+HjwQeNPfi2Wv/952vDpV/80Njw3WfWXv5IL3662ucz8dd9se78QkPd6ihDH61ZfS/s/KK0fjE+sgih+YDL5pz1vnH249tjfOAcLqZOTdvY/3jL1Hy3vqvcu358ODj2/etmVHfcdW+1t2X6R08H6p3BTzz87uDo6/H/vD/2scffaEf/ThphsXX6jLtDvp7cx6bvFUbnpWbFBWgOekJEip6LgFz63wtE+H/fXrpM++P7m8wAgZk/NJnacWXJLOW1rWO16C5ouY7SRE5T8x0iJ7MpntZyQJtPS2tuKXZpKqNf728OLK1FiJj72rq99z4Ho7G9hTQm0sqlhiEBKlWXfTDq1zbQcaP1HosN1zo/TqWGAGGywdQJhaSfHo9wDdfhs78cJKBZ5glRluQQEG030P7t9IdL+03+rRhRIHjxxwF7IsRHYeWXv0f991G5d9GJAKUIBPIT/jUpF/wa9f/Ccm9YiMnjjap8MPxDeomeuKM1ffn/fWHktrCSBT3iY20i0fZ0BBSOAgtJiYMAUDBoOigYaTtuMB4PJjiY2lFfMDPaqZe2rfYTKVcYVUK+QIPiwY175iFi5Yq4Em50vIyNq4cbYFLL2Fyqwbe4aq5Kx+XgZMhZco180ZCv3b5iqtyXD9VCUsquRpcNT74CH3LW95hzWKkvV3KxoHLNhF5fxylXMNkCLk6rio/XJGRzZWquGi/JysTM3sUM+4wfckMBveM4zKV1U1VT4QMTqQI/IFSPuDBgopvEnkF6u7kQ4gJdWIvWjkeivDg/OWNxRqSXxIolJclBKluW+uwutDVlWXtxjIc9y9fPPiBAxIqR2jR/O1ZmRftILVjVU5bo4zjbmDxi6XLWfHj/+sMns5ZFfyP9jLWD9pU5CFi/MC+Fo8Vo/+XhjzuFH9jQ3a32p2/nQ0fiTr60oFFwFV18KrXSKp2m/+AsuvlQKqXRIVOncITG9B6cRRdfSqt0RP8hVHTzrZOuHdwJDHdwJwA=) format("woff2"),url(data:font/woff;base64,d09GRgABAAAAAATgAA4AAAAABVwAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHREVGAAABRAAAAB8AAAAmAEYABkdQT1MAAAFkAAAAIAAAACBEcExrR1NVQgAAAYQAAAA2AAAANpMNggRPUy8yAAABvAAAAE0AAABgk1Pg+GNtYXAAAAIMAAAAKQAAADQAER+gZ2FzcAAAAjgAAAAMAAAADAAIABNnbHlmAAACRAAAARQAAAEUnMv0r2hlYWQAAANYAAAANgAAADb8atJ6aGhlYQAAA5AAAAAfAAAAJAq6BadobXR4AAADsAAAABwAAAAcE+3/e2xvY2EAAAPMAAAAEAAAABAA0AE9bWF4cAAAA9wAAAAgAAAAIAI3AwluYW1lAAAD/AAAAM0AAAF0GlU5EHBvc3QAAATMAAAAEwAAACD/bQBkeNpjYGRgYuBjgAAxII8NiEGQCcjnAWEgmwEABhIATQAAAQAAAAoAEgAUAAFERkxUAAwAAAAAAAQAAAAA//8AAAABAAAACgAkACYABERGTFQAHmN5cmwAImdyZWsAImxhdG4AIgAAAAAACAAAAAAAAAAA//8AAAAAeNpjYGZpY5zAwMrAwDqL1ZiBgVEeQjNfZEhjYmBgAGIocGBABe7+/u4MDvK+8r5sDP8YGNLYZzExKDAwzgfJsVixbmBQAEJmAPBXCrcAAAB42mNgYGACYmYgFgGSjGCahUEBSLMAIZAv7/v/P4R8sBMszwAAVmAGzQAAAAABAAIACAAC//8ADwAFAGQAAAMoBbAAAwAGAAkADAAPAAAhIREhAxEBAREBAyEBNQEhAyj9PALENv7u/roBDOQCA/7+AQL9/QWw+qQFB/19Anf7EQJ4/V4CXogCXgAAAgB2/+wFCQXEABEAHwAAARQCBCMiJAInNTQSJDMyBBIVJxACIyICBxUUEjMyEjcFCZD++LCs/vaTApIBC6yvAQuQv9C7ttED07m6zAMCqdb+waipATnOadIBQqup/r/VAgEDARX+6/Zr+/7hAQ/9AAIAbwRwAskF1gAFAA0AAAETMxUDIwEzFRYXByY1AZF0xN9Z/t6oA1BJsgSUAUIV/sMBUlt7VTtfu////jL/7AVPBdYAJgAERgAABwAF/cMAAAABAAAAAiMS6JlwgF8PPPUAGQgAAAAAAMTwES4AAAAA1QFS9Pob/dUJMAhzAAAACQACAAAAAAAAeNpjYGRgYM/5x8PAwOn5S/qfF6cBUAQVsAMAb4UEbwADjABkAAAAAAAAAAAB+wAABYAAdgMgAG8Fxv4yAAAAKQApACkAKQBhAH4AigABAAAABwCPABYAVAAFAAEAAAAAAA4AAAIAAiQABgABeNpdjgNyAwAURF/tXqAcdVQbgzo2hrFtXSYHyemyMeabu8A2SdZYWd8BgjDOV9gnOM5XOSQ7ztfm+utz+QYXtMf5Jsd0x/khXnr8UKJMhyoZUqSpc849t9xJzjFQkqTIk1BlokiMa2Vf5CXnuKdXtWGVoCar0pSPc61OiaisLtOUFA3yRKjiH+7VyFCiOMS85o4HXviYMnhZuL9a+iBUSZl3biStoVxrUpbFNE2oKlElpWmejHoJitRIyG6wYuKHP+x45K+G+Ld9LnwzhgAAAHjaY2BmAIP/WQwpDFgAACofAdEA) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(/Connection/assets/roboto-greek-400-normal-BRWHCUYo.woff2) format("woff2"),url(/Connection/assets/roboto-greek-400-normal-BnGNaKeW.woff) format("woff");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(/Connection/assets/roboto-vietnamese-400-normal-kCRe3VZk.woff2) format("woff2"),url(/Connection/assets/roboto-vietnamese-400-normal-BkEBOAV9.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(/Connection/assets/roboto-latin-ext-400-normal-4bLplyDh.woff2) format("woff2"),url(/Connection/assets/roboto-latin-ext-400-normal-DloBNwoc.woff) format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(/Connection/assets/roboto-latin-400-normal-mTIRXP6Y.woff2) format("woff2"),url(/Connection/assets/roboto-latin-400-normal-BU1SoK4h.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:500;src:url(/Connection/assets/roboto-cyrillic-ext-500-normal-G9W8hgzQ.woff2) format("woff2"),url(/Connection/assets/roboto-cyrillic-ext-500-normal-sraxM_lR.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:500;src:url(/Connection/assets/roboto-cyrillic-500-normal-DAkZhMOh.woff2) format("woff2"),url(/Connection/assets/roboto-cyrillic-500-normal-QpWeYsca.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:500;src:url(data:font/woff2;base64,d09GMgABAAAAAAXcABIAAAAACgQAAAWAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGiYbIBw2BmAANAhcCYM8EQwKg3CDUwsQABIUATYCJAMcBCAFgwAHIAyCUxujCACOlC5DNsHD//+2fp8bhJS6mMR5XowEcaqZN2A2Ro6RTES+6DzyOr4qW4h/b/eZ2YQqiFF9MYvJ1Zra3Q07UJHAOxPhwaq7T9LeXwlxfCpsnCqiKkuSQEZUWFndRCS169iOrLNRew/wX4FAwQkATEdgQiAQKIAdsCMAASSQjBsRKqpowA6ABhCPx4QyyELb7KS+HRvHSBvc2D+qvrGezRMMAEtp5umqdpH4DR30S/T5IFJ1lfoyAw14W8BgKsuKb3UxwVM5HmViCgbmJQoG4koAbZkuMTBQt5HCcaMi8GgYqIEQd308bv23Hz2AACCP5zibKzib79goxh5NulTpLo1beBpwT3XjVi4lMb4Ux9SFJKtebNoy3NrpJOoSt2km00yPk6i0kWzW0E0fIAAkvnJprWmZFOKMyP0ifkSG5kxa1a5OvxQ+wwgPh6To9kvFJ0We1y9Vn1Ek1cyiupb0iHGKcUrpulOMImOoZ53UMpt0Xqv/lEjAkNRn2JA0xCuDEc8zuz8SWeaX2lYWrfqUCBqMkU0sI7LH/e+Xuq98czWrpqW2Re4PeWQwJNO9XiMsH68h4XHlfUSvMtUp7fY9wzMrBvO4Kc8vLbuo+qGCvZ/IO4XpTvfK/WPIc0p6RDM8XvR+wZEWFEZ1Zljr9td41f6mPaRQcVZHPK9NQ35p9ZXXt4RDHq9M98sEn/SFBWzoX2b3TWaL48YpMZs9EESj71s43rBejk/9an3EI9N9S6Rx/P5EeOOXdjt8MvhZbtCaST+h7QW/Co0nQaBgQYnHcQFgBsAJWIGVwCCH9v530Jm0klejqehOcpos1+a7XNt3DY1YRttdI2KUucz+tz5KOOWTd5rEgXc/Pf3jtxsbDrxzvpm3Gtj/tu3UN8WuNhsta8DG640Nb4icp9Hl02p/O7o56WB464+2bZ9erYqO46JDjdZ+Envj3JOTb7tr0n3bBat5qe71C8L4yOuSbzk/yGv/ab/cK2667n7ENw0/PajfcNPd8T9KZi24KLrq1Wmfr+rIr5/sUnaWh6uL74w8mk4WWhGY0f+/BxRgKiX+nb5OfzNmT0xKSl4q7YmSlyyLyWI90fESknCkEvBMKsaqyI04SeyJaQrZ9THdtJotlnGZ8F7MTlod2ymJ0vle4dyYlmoM0CrcX4B2ux011A6R9sRJt5AJ+S3etzy/AbQUz8rCuUhbQGov5SyTvDRLEpip7kRpBrMSVo0IhJ0NArBbzRooJs0M+7pKevLPn7z/Q5drxe+WWRYAnv4pqQDgdVH33T8Z/79ubbdsAqwoAAgwj03ZwToa4ZxaUwTBlGRWT2OdR4op0I8y0H0MjuemUhCAmTOZThU9/3FOUFAKMSEACwNUhGYFOrGOCGbTGVFwsr1Q9RVqiOhkcdQ0wXbbbZ00eJa1otbbYaNhg4ZsZjCPQubOfoNiUQnPmP7EUhP6FJhrWByrqsss28Tct98m/Tbaqt86BdSJ6hW1WZRBpWds2Bbj8TsN2mJMj42apHuTYSibqAILpuazmOU1bVy8Y7rfaDM3W28ZgZm2dSugh5U6s8+QfgWSuNGgAGNmX9MT9Uo5OUCFUmuFVakX5q/gjwpRASA+wjrTkdKeL8knJpxKvoi5hHWF+1zLCjM9iVjyuU8sKciYnbScfZ9SFZyXPq0ztWR5gdddpfFML8xJne5kpr7a1X5Phzm4IJ9Z2sqW5c5i1kPrqpals4RtvRWLvP22s7e1g9m3dpcvmsMcvowUtz3BuXZxfmryOmKJTnO+5A99dmy/W2yKSQNqvJtj+2tWpzTdBdoHAQFdDYrSmXQnxSHVuyW2mrpoX43LSFVRSMpY6R8Bqa2bY11CZ9KLFNerY12BNB2FM5An+NY8sQkA) format("woff2"),url(data:font/woff;base64,d09GRgABAAAAAAToAA4AAAAABWgAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHREVGAAABRAAAAB8AAAAmAEYABkdQT1MAAAFkAAAAIAAAACBEcExrR1NVQgAAAYQAAAA2AAAANpMNggRPUy8yAAABvAAAAE0AAABgk7fhCmNtYXAAAAIMAAAAKQAAADQAER+gZ2FzcAAAAjgAAAAMAAAADAAIABNnbHlmAAACRAAAARAAAAESY95A8mhlYWQAAANUAAAANgAAADb8n9JyaGhlYQAAA4wAAAAfAAAAJArvBcBobXR4AAADrAAAABwAAAAcFAj/TWxvY2EAAAPIAAAAEAAAABAAzwE7bWF4cAAAA9gAAAAgAAAAIAI3Aw9uYW1lAAAD+AAAANkAAAGAG8c6DHBvc3QAAATUAAAAEwAAACD/bQBkeNpjYGRgYuBjgAAxII8NiEGQCcjnAWEgmwEABhIATQAAAQAAAAoAEgAUAAFERkxUAAwAAAAAAAQAAAAA//8AAAABAAAACgAkACYABERGTFQAHmN5cmwAImdyZWsAImxhdG4AIgAAAAAACAAAAAAAAAAA//8AAAAAeNpjYGaZwfiFgZWBgXUWqzEDA6M8hGa+yJDGxMDAAMRQ4MCACtz9/d0ZHOR95X3ZGP4xMKSxz2JiUGBgnA+SY7Fi3cCgAITMABp8Cy0AAAB42mNgYGACYmYgFgGSjGCahUEBSLMAIZAv7/v/P4R8sBMszwAAVmAGzQAAAAABAAIACAAC//8AD3jaDY8lWARRFEbvfTOPwd1tXepqQQvuUnCHCAmnk/GOu7tL/3D6h7s785btv5wDFEoBOC2dAA5swA4cwQVAJnOTcW6IbsjJ0IQyTiuGkh0ze2BL6HhGOMaQiCKd+OmhgthEan7dSK2YT/KbST4AgXLLHQ2mO+AKwQDoSXiFXEk0JqO7Usq7+whGopATwcvT3aB3N9HgNnY/PcluO7ETPbAUPTpQnB/oWSTLfQOzZOqYrY6OYuRe+hFGjw6z9SP6goRZbjOf2A/Ch/Wtgq8kx/TEauIEgB4GL06BBi9vH0Ftwtaqg4s8djjJJaZO8F0Y4cU2MbOgITo2e81iYYFWzlJrUw18NIAAVJwF+AfCKlcxAAEAAAACIxJVwNXKXw889QAZCAAAAAAAxPARLgAAAADVAVLs+iT91QlcCHMAAAAJAAIAAAAAAAB42mNgZGBgz/nHw8DAmf1L5Z8jZwxQBBWwAwB2LQS9AAOMAGQAAAAAAAAAAAH+AAAFhgBmAywAZwXM/hwAAAApACkAKQApAGAAfQCJAAEAAAAHAI8AFgBOAAUAAQAAAAAADgAAAgACMAAGAAF42mJgYOBgSGNgZmBk4QSy44AYwmZkkALyIGwmBj6GCiibGUmcBYnNyqDG0AZlswHF10DYQJ0hDMcAVc5DdkQBFATQu5S/gNiYxLbGUdvu3n1qEp16ZjnU0TXTV1NRNVRYsWQ5KJzqBBVNJYVzbR8WFPY1g8LDz9ZAMiWDaN849tNCKh3v0WG0cC1VNSMtmVVJ1PSm70UpdqCmoy0MLFi2atPuD5/Nf9fm/10Lg6Brx2IwEVjwphv9SLeUrKOvkm5TLbWStnCNLrpy7tCxG4+x8/Ld0hcoDzX0AAAAeNpjYGYAg/9ZDCkMWAAAKh8B0QA=) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:500;src:url(/Connection/assets/roboto-greek-500-normal-CpESfwfG.woff2) format("woff2"),url(/Connection/assets/roboto-greek-500-normal-CVjdsdX9.woff) format("woff");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:500;src:url(/Connection/assets/roboto-vietnamese-500-normal-CcijQRVW.woff2) format("woff2"),url(/Connection/assets/roboto-vietnamese-500-normal-Bwg8Dbh6.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:500;src:url(/Connection/assets/roboto-latin-ext-500-normal-BWKy6SgX.woff2) format("woff2"),url(/Connection/assets/roboto-latin-ext-500-normal-B9pAx_JH.woff) format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:500;src:url(/Connection/assets/roboto-latin-500-normal-Dxdx3aXO.woff2) format("woff2"),url(/Connection/assets/roboto-latin-500-normal-Dcm-rhWF.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:700;src:url(/Connection/assets/roboto-cyrillic-ext-700-normal-CsrCEJIc.woff2) format("woff2"),url(/Connection/assets/roboto-cyrillic-ext-700-normal-dDOtDc5i.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:700;src:url(/Connection/assets/roboto-cyrillic-700-normal-B5ZBKWCH.woff2) format("woff2"),url(/Connection/assets/roboto-cyrillic-700-normal-DAIxw5xX.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:700;src:url(data:font/woff2;base64,d09GMgABAAAAAAWYABIAAAAACaAAAAU6AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGiYbIBw2BmAANAhICYM8EQwKg0iDLwsQABIUATYCJAMcBCAFgn4HIAyCKRs/CCCOk6WSgeIPHr5v07+zgm5MOS1LaB1tnYpB0tQU4l4R44nbhKf+Z+rA83jrYWYTqhht1N+qejHd/3+v6r03UxOKrgn+E6X7M/bo3iAFjdE7pc3d2I0bvEIF4uomIlFn2f7i2quz7wH+LRAoZAMAxQgsCAQCBTAAAwEIwEE+hYho5bJ1GABoAJnMI+ZRjEETjWzdtbmPis7N7b3d0Ne8dcAFAFu08HxVu0l5BB30S/XJINx9j/oyHRWYFOB8KTuq7soqTPdyvZeFNDrGpQom4ioALaJLTEzUVVCdL0RFsE7DRA0EX6VM5v2fffQgAoAJfM31pDmaSpjbeZbX2MsPFKabKFQuw1Q9OLUIhdoZ5OqSQkspReJG8ixPkG35EAVA4lsq7aviw0KcmXhAZI7J6Ihhu9rY4JfCZ5qx7qgUTX6p+KSY4PFL1WdWSnV05Zq4N2EmzWR1W9KsNLua26Q2muTcpdqTiaApWZtuU7IuHjk/4bK17YlExC+1lRRaLplA2exZQ9Eji8P/fqn7lorVMaviq+PyYNQl50dZ5PGYMfnEqrh8IuqysWQt25Q/tvZ1l24YrDnLBEnZFomt1dh8GZH4koGe1yMP6rQr6U10P09MfEBw+MzvSXV0rBUPrkrGDs4JF3Pnlku4RmHUL+2+pWvjsajLwyv90uGTFTEGJ3p3GL7hseKkmXxE9OB8NFp/GyfXuTupUL8aSrikN7VNmicfyCUc+KG9LJ+c/9ppUpNhL9GVBG8sqg+CQMGGksmQA4AVgGzADswFukNojO5G504oZXlNRS8v22I/f9yenJ17unpsvXU5PaI3e8/Btz5yJD95Z4M49O6nZ3z8Ni3vDUfytXUcfN152psb99Q6ic8OJ6+vX/fGG2LcM+jyGbW9Dt2adzi2/Ufnjk+vUUX9SVGvrlrzyf1vXrSo/K7773XdcdlCXl785qWV5Xf2Cdv7fSPI59d9f/FF133DJ1UfXvf7pRdd8x2fLC49/7KBWa8WfT63zr/2jgb27Olr1ldX1J2sdzEGrRKs6P8/AgqQLsl8p2/V30QSi1SCrmGldG7CR7QYB1OaQl7+zJQOpVVhW5CO91JGTJl1lJIrs98LhVOa21TQSoUvrY+G2kANtWOkkTtcKKRjYtzzlus3gCZx7QyFkc6gtL408gkCRM+ZK3XK68HsxSAAw27VQLFoVux5FW/+rrcHH2nMmf27rcwGwDM/5QUAXhdr3vgn9P/r9hO2LQjsKAAIsPalDbAnTZueOgHB7WVVT6fNPUUa+nE2NDe1/bl0CQKwchbFrKCXQ/Y9FJRJWBCAjQ4qQrMDDXCtAoMGq4KNHqtKMZulmlVnDCetFoq587rZrPMMiwwasstm3Tp12cpkEiHCg9GkyiCndH3anasNaBXILRDEvuyawuSWwF9st0W7zbZr1ybAGoNaDNpq0EKD+rSFs2ZLbiitb9GN5MA2MLA8menM2tTh6eVqf3ALq7caEiE4KHa8XYBmQ5q16tIuwKDNOgXp061VuwFbtNsiyDLVFolZYa0Y/5f/RggVADI92oAbSmOiZCIp4VQmcr8Ij3MXZ2ObeL8SjfjMfCerhl20c3bURbwu+vampdNGuFhGu0vznC7WhdMmjMx3sUWCFaU5bfs0H1wctUsjE8qcnP8+f/Xm2AFShtM6UfLXuysVyhZbUjJ3hlX6ramDMNTflppXyIlG0AEI6remVtIgnUV3UQbcwSLaRtsY+ZzSyvxgqUMHEj8SuJkSjaCz6EXKwDxGPVguigKkDZocbphiCwAAAA==) format("woff2"),url(data:font/woff;base64,d09GRgABAAAAAATgAA4AAAAABWgAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHREVGAAABRAAAAB8AAAAmAEYABkdQT1MAAAFkAAAAIAAAACBEcExrR1NVQgAAAYQAAAA2AAAANpMNggRPUy8yAAABvAAAAE0AAABglH/g+WNtYXAAAAIMAAAAKQAAADQAER+gZ2FzcAAAAjgAAAAMAAAADAAIABNnbHlmAAACRAAAARQAAAEUTyuJzWhlYWQAAANYAAAANgAAADb819JcaGhlYQAAA5AAAAAfAAAAJAsmBdNobXR4AAADsAAAABwAAAAcE/v/LGxvY2EAAAPMAAAAEAAAABAA0AE7bWF4cAAAA9wAAAAgAAAAIAI3AxFuYW1lAAAD/AAAANAAAAF+G545lXBvc3QAAATMAAAAEwAAACD/bQBkeNpjYGRgYuBjgAAxII8NiEGQCcjnAWEgmwEABhIATQAAAQAAAAoAEgAUAAFERkxUAAwAAAAAAAQAAAAA//8AAAABAAAACgAkACYABERGTFQAHmN5cmwAImdyZWsAImxhdG4AIgAAAAAACAAAAAAAAAAA//8AAAAAeNpjYGZZzrSHgZWBgXUWqzEDA6M8hGa+yJDGxMDAAMRQ4MCACtz9/d0ZFOR95X3ZGP4xMKSxz2JiUGBgnA+SY7Fi3cCgAITMAAhDCuUAAAB42mNgYGACYmYgFgGSjGCahUEBSLMAIZAv7/v/P4R8sBMszwAAVmAGzQAAAAABAAIACAAC//8ADwAFAGQAAAMoBbAAAwAGAAkADAAPAAAhIREhAxEBAREBAyEBNQEhAyj9PALENv7u/roBDOQCA/7+AQL9/QWw+qQFB/19Anf7EQJ4/V4CXogCXgAAAgBW/+wFLgXEABAAHgAAARQCBCMiJAInNTQSJCAEEhUlNCYjIgYHFRQWMzI2NwUumP7lt7X+5JwBmwEbAWwBG5v+0KSYl6QBpJqXogECt9f+vLCuAUPSSNcBR6+v/rnWAeXu6+NH3/bt4wAAAgBbBG8CywXXAAUADgAAARMzFQMjATMVFhcHJiY1AYlv0+Zc/tKtAUxTSl0EmwE8Ff7BAVRefDhWI4ldAP///hf/7AV0BdcAJgAERgAABwAF/bwAAAABAAAAAiMSfSJFaF8PPPUAGQgAAAAAAMTwES4AAAAA1QFS1vow/dUJhwhzAAEACQACAAAAAAAAeNpjYGRgYM/5x8PAwNn1y+CfKWc7UAQVsAMAfH0FBwADjABkAAAAAAAAAAAB/gAABYYAVgMfAFsFzP4XAAAAKQApACkAKQBfAH4AigABAAAABwCPABYATgAFAAEAAAAAAA4AAAIAAjIABgABeNpNjoEGwmAUhb+qUiRAAAYCalWIApUkEioBomqtZbbZpvQGPU1P0YN18Js5zvXdw3EvUONGiUK5DhzBcIEGR8NFajwMl2gRGy7nuEKbj+Gq8q/hJnt+zAmJeBPj4XInxWJAj75ksSSUXHwcbSsCLnRFU3zJYpu1ErThkMgxT80rXSUhZzmVZ7KvNJ9ZWXpAPbU97QH6Qe0+Q0ZMMB+J891O1tV9KWKMLb2Q1D4RyRfuONpCYlxsfDxlDgH6VLZZs2LOgg07zQ66TO8Pnw41VHjaY2BmAIP/WQwpDFgAACofAdEA) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:700;src:url(/Connection/assets/roboto-greek-700-normal-Cc2Tq8FV.woff2) format("woff2"),url(/Connection/assets/roboto-greek-700-normal-CjuTpGfE.woff) format("woff");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:700;src:url(/Connection/assets/roboto-vietnamese-700-normal-SekShQfT.woff2) format("woff2"),url(/Connection/assets/roboto-vietnamese-700-normal-Mc0c6qif.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:700;src:url(/Connection/assets/roboto-latin-ext-700-normal-BYGCo3Go.woff2) format("woff2"),url(/Connection/assets/roboto-latin-ext-700-normal-DwUXTeTv.woff) format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Roboto;font-style:normal;font-display:swap;font-weight:700;src:url(/Connection/assets/roboto-latin-700-normal-CeM5gOv8.woff2) format("woff2"),url(/Connection/assets/roboto-latin-700-normal-Bh431LEL.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}*{padding:0;margin:0;border:0;-webkit-tap-highlight-color:transparent}*,*:before,*:after{box-sizing:border-box}:focus,:active{outline:none}a:focus,a:active{outline:none}nav,footer,header,aside{display:block}html,body{height:100%;width:100%;font-size:100%;line-height:1;font-size:14px;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}input,button,textarea{font-family:inherit}input::-ms-clear{display:none}button{cursor:pointer}button::-moz-focus-inner{padding:0;border:0}a,a:visited,a:hover{text-decoration:none}ul li{list-style:none}img{vertical-align:top}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:400}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-webkit-appearance:textfield;appearance:textfield;-moz-appearance:textfield}input{border-radius:0}input:-webkit-autofill{-webkit-transition:background-color 0s 600000s,color 0s 600000s;transition:background-color 0s 600000s,color 0s 600000s}input:autofill,input:-internal-autofill-selected,input:-webkit-autofill,input:-webkit-autofill:focus{-webkit-transition:background-color 0s 600000s,color 0s 600000s;transition:background-color 0s 600000s,color 0s 600000s}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.block{display:block}.flex{display:flex}.hidden{display:none}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.border{border-width:1px}.underline{text-decoration-line:underline}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}body{font-family:Roboto;color:#fff;font-size:14px}body::-webkit-scrollbar{width:7px;height:7px}body::-webkit-scrollbar-thumb{background:#298ce8;border-radius:6px}body::-webkit-scrollbar-track{background:#1d2436}@-moz-document url-prefix(){body{scrollbar-color:#298ce8 #1d2436}}body._lock-scroll{overflow:hidden}#root{min-height:100%;width:100%;background-color:#161628;display:flex}.wrapper{width:100%;min-height:100%;display:flex;flex-direction:column;overflow:hidden}.content{flex:1 1 auto;display:flex;flex-direction:column}.app{flex:1 1 auto;display:flex;justify-content:space-between;max-height:100vh}._container{width:100%;padding:0;margin:0 auto;max-width:100wvpx} diff --git a/public/favicons/favicon.png b/assets/logo-BAk-MPAP.png similarity index 100% rename from public/favicons/favicon.png rename to assets/logo-BAk-MPAP.png diff --git a/assets/roboto-cyrillic-300-normal-D6mjswgs.woff2 b/assets/roboto-cyrillic-300-normal-D6mjswgs.woff2 new file mode 100644 index 0000000..9d7fb7f Binary files /dev/null and b/assets/roboto-cyrillic-300-normal-D6mjswgs.woff2 differ diff --git a/assets/roboto-cyrillic-300-normal-UX5PCucy.woff b/assets/roboto-cyrillic-300-normal-UX5PCucy.woff new file mode 100644 index 0000000..d8b12c2 Binary files /dev/null and b/assets/roboto-cyrillic-300-normal-UX5PCucy.woff differ diff --git a/assets/roboto-cyrillic-400-normal-DCQqOlfN.woff b/assets/roboto-cyrillic-400-normal-DCQqOlfN.woff new file mode 100644 index 0000000..a846f89 Binary files /dev/null and b/assets/roboto-cyrillic-400-normal-DCQqOlfN.woff differ diff --git a/assets/roboto-cyrillic-400-normal-DVDTZtmW.woff2 b/assets/roboto-cyrillic-400-normal-DVDTZtmW.woff2 new file mode 100644 index 0000000..47da362 Binary files /dev/null and b/assets/roboto-cyrillic-400-normal-DVDTZtmW.woff2 differ diff --git a/assets/roboto-cyrillic-500-normal-DAkZhMOh.woff2 b/assets/roboto-cyrillic-500-normal-DAkZhMOh.woff2 new file mode 100644 index 0000000..cb5834f Binary files /dev/null and b/assets/roboto-cyrillic-500-normal-DAkZhMOh.woff2 differ diff --git a/assets/roboto-cyrillic-500-normal-QpWeYsca.woff b/assets/roboto-cyrillic-500-normal-QpWeYsca.woff new file mode 100644 index 0000000..4c8f963 Binary files /dev/null and b/assets/roboto-cyrillic-500-normal-QpWeYsca.woff differ diff --git a/assets/roboto-cyrillic-700-normal-B5ZBKWCH.woff2 b/assets/roboto-cyrillic-700-normal-B5ZBKWCH.woff2 new file mode 100644 index 0000000..1bb7737 Binary files /dev/null and b/assets/roboto-cyrillic-700-normal-B5ZBKWCH.woff2 differ diff --git a/assets/roboto-cyrillic-700-normal-DAIxw5xX.woff b/assets/roboto-cyrillic-700-normal-DAIxw5xX.woff new file mode 100644 index 0000000..91386e6 Binary files /dev/null and b/assets/roboto-cyrillic-700-normal-DAIxw5xX.woff differ diff --git a/assets/roboto-cyrillic-ext-300-normal-C7AGhuC_.woff b/assets/roboto-cyrillic-ext-300-normal-C7AGhuC_.woff new file mode 100644 index 0000000..9209306 Binary files /dev/null and b/assets/roboto-cyrillic-ext-300-normal-C7AGhuC_.woff differ diff --git a/assets/roboto-cyrillic-ext-300-normal-TzZWIuiO.woff2 b/assets/roboto-cyrillic-ext-300-normal-TzZWIuiO.woff2 new file mode 100644 index 0000000..0f6e60b Binary files /dev/null and b/assets/roboto-cyrillic-ext-300-normal-TzZWIuiO.woff2 differ diff --git a/assets/roboto-cyrillic-ext-400-normal--KougVX-.woff b/assets/roboto-cyrillic-ext-400-normal--KougVX-.woff new file mode 100644 index 0000000..0f4a8aa Binary files /dev/null and b/assets/roboto-cyrillic-ext-400-normal--KougVX-.woff differ diff --git a/assets/roboto-cyrillic-ext-400-normal-DORK9bGA.woff2 b/assets/roboto-cyrillic-ext-400-normal-DORK9bGA.woff2 new file mode 100644 index 0000000..22ddee9 Binary files /dev/null and b/assets/roboto-cyrillic-ext-400-normal-DORK9bGA.woff2 differ diff --git a/assets/roboto-cyrillic-ext-500-normal-G9W8hgzQ.woff2 b/assets/roboto-cyrillic-ext-500-normal-G9W8hgzQ.woff2 new file mode 100644 index 0000000..8571683 Binary files /dev/null and b/assets/roboto-cyrillic-ext-500-normal-G9W8hgzQ.woff2 differ diff --git a/assets/roboto-cyrillic-ext-500-normal-sraxM_lR.woff b/assets/roboto-cyrillic-ext-500-normal-sraxM_lR.woff new file mode 100644 index 0000000..7223257 Binary files /dev/null and b/assets/roboto-cyrillic-ext-500-normal-sraxM_lR.woff differ diff --git a/assets/roboto-cyrillic-ext-700-normal-CsrCEJIc.woff2 b/assets/roboto-cyrillic-ext-700-normal-CsrCEJIc.woff2 new file mode 100644 index 0000000..6399552 Binary files /dev/null and b/assets/roboto-cyrillic-ext-700-normal-CsrCEJIc.woff2 differ diff --git a/assets/roboto-cyrillic-ext-700-normal-dDOtDc5i.woff b/assets/roboto-cyrillic-ext-700-normal-dDOtDc5i.woff new file mode 100644 index 0000000..0bd1b47 Binary files /dev/null and b/assets/roboto-cyrillic-ext-700-normal-dDOtDc5i.woff differ diff --git a/assets/roboto-greek-300-normal-Dgbe-dnN.woff b/assets/roboto-greek-300-normal-Dgbe-dnN.woff new file mode 100644 index 0000000..04a5b7d Binary files /dev/null and b/assets/roboto-greek-300-normal-Dgbe-dnN.woff differ diff --git a/assets/roboto-greek-300-normal-ndiuWqED.woff2 b/assets/roboto-greek-300-normal-ndiuWqED.woff2 new file mode 100644 index 0000000..b289f00 Binary files /dev/null and b/assets/roboto-greek-300-normal-ndiuWqED.woff2 differ diff --git a/assets/roboto-greek-400-normal-BRWHCUYo.woff2 b/assets/roboto-greek-400-normal-BRWHCUYo.woff2 new file mode 100644 index 0000000..fc71d94 Binary files /dev/null and b/assets/roboto-greek-400-normal-BRWHCUYo.woff2 differ diff --git a/assets/roboto-greek-400-normal-BnGNaKeW.woff b/assets/roboto-greek-400-normal-BnGNaKeW.woff new file mode 100644 index 0000000..e93ee93 Binary files /dev/null and b/assets/roboto-greek-400-normal-BnGNaKeW.woff differ diff --git a/assets/roboto-greek-500-normal-CVjdsdX9.woff b/assets/roboto-greek-500-normal-CVjdsdX9.woff new file mode 100644 index 0000000..9be8310 Binary files /dev/null and b/assets/roboto-greek-500-normal-CVjdsdX9.woff differ diff --git a/assets/roboto-greek-500-normal-CpESfwfG.woff2 b/assets/roboto-greek-500-normal-CpESfwfG.woff2 new file mode 100644 index 0000000..0933dfe Binary files /dev/null and b/assets/roboto-greek-500-normal-CpESfwfG.woff2 differ diff --git a/assets/roboto-greek-700-normal-Cc2Tq8FV.woff2 b/assets/roboto-greek-700-normal-Cc2Tq8FV.woff2 new file mode 100644 index 0000000..cb9bfa7 Binary files /dev/null and b/assets/roboto-greek-700-normal-Cc2Tq8FV.woff2 differ diff --git a/assets/roboto-greek-700-normal-CjuTpGfE.woff b/assets/roboto-greek-700-normal-CjuTpGfE.woff new file mode 100644 index 0000000..a8ca4fc Binary files /dev/null and b/assets/roboto-greek-700-normal-CjuTpGfE.woff differ diff --git a/assets/roboto-latin-300-normal-ThHrQhYb.woff2 b/assets/roboto-latin-300-normal-ThHrQhYb.woff2 new file mode 100644 index 0000000..6068138 Binary files /dev/null and b/assets/roboto-latin-300-normal-ThHrQhYb.woff2 differ diff --git a/assets/roboto-latin-300-normal-lq7MgJXa.woff b/assets/roboto-latin-300-normal-lq7MgJXa.woff new file mode 100644 index 0000000..f8ed3c1 Binary files /dev/null and b/assets/roboto-latin-300-normal-lq7MgJXa.woff differ diff --git a/assets/roboto-latin-400-normal-BU1SoK4h.woff b/assets/roboto-latin-400-normal-BU1SoK4h.woff new file mode 100644 index 0000000..297c0ba Binary files /dev/null and b/assets/roboto-latin-400-normal-BU1SoK4h.woff differ diff --git a/assets/roboto-latin-400-normal-mTIRXP6Y.woff2 b/assets/roboto-latin-400-normal-mTIRXP6Y.woff2 new file mode 100644 index 0000000..020729e Binary files /dev/null and b/assets/roboto-latin-400-normal-mTIRXP6Y.woff2 differ diff --git a/assets/roboto-latin-500-normal-Dcm-rhWF.woff b/assets/roboto-latin-500-normal-Dcm-rhWF.woff new file mode 100644 index 0000000..82437c1 Binary files /dev/null and b/assets/roboto-latin-500-normal-Dcm-rhWF.woff differ diff --git a/assets/roboto-latin-500-normal-Dxdx3aXO.woff2 b/assets/roboto-latin-500-normal-Dxdx3aXO.woff2 new file mode 100644 index 0000000..29342a8 Binary files /dev/null and b/assets/roboto-latin-500-normal-Dxdx3aXO.woff2 differ diff --git a/assets/roboto-latin-700-normal-Bh431LEL.woff b/assets/roboto-latin-700-normal-Bh431LEL.woff new file mode 100644 index 0000000..754cd83 Binary files /dev/null and b/assets/roboto-latin-700-normal-Bh431LEL.woff differ diff --git a/assets/roboto-latin-700-normal-CeM5gOv8.woff2 b/assets/roboto-latin-700-normal-CeM5gOv8.woff2 new file mode 100644 index 0000000..771fbec Binary files /dev/null and b/assets/roboto-latin-700-normal-CeM5gOv8.woff2 differ diff --git a/assets/roboto-latin-ext-300-normal-CaUuWeqj.woff b/assets/roboto-latin-ext-300-normal-CaUuWeqj.woff new file mode 100644 index 0000000..7c4c1d6 Binary files /dev/null and b/assets/roboto-latin-ext-300-normal-CaUuWeqj.woff differ diff --git a/assets/roboto-latin-ext-300-normal-DEsNdRC-.woff2 b/assets/roboto-latin-ext-300-normal-DEsNdRC-.woff2 new file mode 100644 index 0000000..91231c9 Binary files /dev/null and b/assets/roboto-latin-ext-300-normal-DEsNdRC-.woff2 differ diff --git a/assets/roboto-latin-ext-400-normal-4bLplyDh.woff2 b/assets/roboto-latin-ext-400-normal-4bLplyDh.woff2 new file mode 100644 index 0000000..8a8de61 Binary files /dev/null and b/assets/roboto-latin-ext-400-normal-4bLplyDh.woff2 differ diff --git a/assets/roboto-latin-ext-400-normal-DloBNwoc.woff b/assets/roboto-latin-ext-400-normal-DloBNwoc.woff new file mode 100644 index 0000000..594549d Binary files /dev/null and b/assets/roboto-latin-ext-400-normal-DloBNwoc.woff differ diff --git a/assets/roboto-latin-ext-500-normal-B9pAx_JH.woff b/assets/roboto-latin-ext-500-normal-B9pAx_JH.woff new file mode 100644 index 0000000..04f853a Binary files /dev/null and b/assets/roboto-latin-ext-500-normal-B9pAx_JH.woff differ diff --git a/assets/roboto-latin-ext-500-normal-BWKy6SgX.woff2 b/assets/roboto-latin-ext-500-normal-BWKy6SgX.woff2 new file mode 100644 index 0000000..68f094c Binary files /dev/null and b/assets/roboto-latin-ext-500-normal-BWKy6SgX.woff2 differ diff --git a/assets/roboto-latin-ext-700-normal-BYGCo3Go.woff2 b/assets/roboto-latin-ext-700-normal-BYGCo3Go.woff2 new file mode 100644 index 0000000..94ab5fb Binary files /dev/null and b/assets/roboto-latin-ext-700-normal-BYGCo3Go.woff2 differ diff --git a/assets/roboto-latin-ext-700-normal-DwUXTeTv.woff b/assets/roboto-latin-ext-700-normal-DwUXTeTv.woff new file mode 100644 index 0000000..29ec516 Binary files /dev/null and b/assets/roboto-latin-ext-700-normal-DwUXTeTv.woff differ diff --git a/assets/roboto-vietnamese-300-normal-CnPrVvBs.woff2 b/assets/roboto-vietnamese-300-normal-CnPrVvBs.woff2 new file mode 100644 index 0000000..c009987 Binary files /dev/null and b/assets/roboto-vietnamese-300-normal-CnPrVvBs.woff2 differ diff --git a/assets/roboto-vietnamese-300-normal-DOxDZ6bW.woff b/assets/roboto-vietnamese-300-normal-DOxDZ6bW.woff new file mode 100644 index 0000000..3cb04e5 Binary files /dev/null and b/assets/roboto-vietnamese-300-normal-DOxDZ6bW.woff differ diff --git a/assets/roboto-vietnamese-400-normal-BkEBOAV9.woff b/assets/roboto-vietnamese-400-normal-BkEBOAV9.woff new file mode 100644 index 0000000..e65d4a9 Binary files /dev/null and b/assets/roboto-vietnamese-400-normal-BkEBOAV9.woff differ diff --git a/assets/roboto-vietnamese-400-normal-kCRe3VZk.woff2 b/assets/roboto-vietnamese-400-normal-kCRe3VZk.woff2 new file mode 100644 index 0000000..6284d2e Binary files /dev/null and b/assets/roboto-vietnamese-400-normal-kCRe3VZk.woff2 differ diff --git a/assets/roboto-vietnamese-500-normal-Bwg8Dbh6.woff b/assets/roboto-vietnamese-500-normal-Bwg8Dbh6.woff new file mode 100644 index 0000000..0292e04 Binary files /dev/null and b/assets/roboto-vietnamese-500-normal-Bwg8Dbh6.woff differ diff --git a/assets/roboto-vietnamese-500-normal-CcijQRVW.woff2 b/assets/roboto-vietnamese-500-normal-CcijQRVW.woff2 new file mode 100644 index 0000000..6b0b4af Binary files /dev/null and b/assets/roboto-vietnamese-500-normal-CcijQRVW.woff2 differ diff --git a/assets/roboto-vietnamese-700-normal-Mc0c6qif.woff b/assets/roboto-vietnamese-700-normal-Mc0c6qif.woff new file mode 100644 index 0000000..4574ed4 Binary files /dev/null and b/assets/roboto-vietnamese-700-normal-Mc0c6qif.woff differ diff --git a/assets/roboto-vietnamese-700-normal-SekShQfT.woff2 b/assets/roboto-vietnamese-700-normal-SekShQfT.woff2 new file mode 100644 index 0000000..3c45011 Binary files /dev/null and b/assets/roboto-vietnamese-700-normal-SekShQfT.woff2 differ diff --git a/src/assets/img/logo.png b/favicons/favicon.png similarity index 100% rename from src/assets/img/logo.png rename to favicons/favicon.png diff --git a/firebase.json b/firebase.json deleted file mode 100644 index 5ad338e..0000000 --- a/firebase.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "database": { - "rules": "./firebase/database.rules.json" - }, - "firestore": { - "rules": "./firebase/firestore.rules", - "indexes": "./firebase/firestore.indexes.json" - }, - "storage": { - "rules": "./firebase/storage.rules" - } -} diff --git a/firebase/database.rules.json b/firebase/database.rules.json deleted file mode 100644 index 6a3df97..0000000 --- a/firebase/database.rules.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - // Visit https://firebase.google.com/docs/database/security to learn more about security rules. - "rules": { - ".write": false, - ".read": false, - "chats": { - ".write": "auth != null", - ".read": "auth != null" - } - } -} diff --git a/firebase/firestore.indexes.json b/firebase/firestore.indexes.json deleted file mode 100644 index 415027e..0000000 --- a/firebase/firestore.indexes.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "indexes": [], - "fieldOverrides": [] -} diff --git a/firebase/firestore.rules b/firebase/firestore.rules deleted file mode 100644 index 2163074..0000000 --- a/firebase/firestore.rules +++ /dev/null @@ -1,9 +0,0 @@ -rules_version = '2'; - -service cloud.firestore { - match /databases/{database}/documents { - match /{document=**} { - allow read, write: if request.auth != null; - } - } -} \ No newline at end of file diff --git a/firebase/storage.rules b/firebase/storage.rules deleted file mode 100644 index 659b4ca..0000000 --- a/firebase/storage.rules +++ /dev/null @@ -1,12 +0,0 @@ -rules_version = '2'; - -// Craft rules based on data in your Firestore database -// allow write: if firestore.get( -// /databases/(default)/documents/users/$(request.auth.uid)).data.isAdmin; -service firebase.storage { - match /b/{bucket}/o { - match /{allPaths=**} { - allow read, write: if request.auth != null; - } - } -} \ No newline at end of file diff --git a/index.html b/index.html index 1e74731..16584c7 100644 --- a/index.html +++ b/index.html @@ -4,15 +4,16 @@ - + Connection + +
- \ No newline at end of file diff --git a/public/models/logo.glb b/models/logo.glb similarity index 100% rename from public/models/logo.glb rename to models/logo.glb diff --git a/public/models/logo.vox b/models/logo.vox similarity index 100% rename from public/models/logo.vox rename to models/logo.vox diff --git a/public/oldTV.gif b/oldTV.gif similarity index 100% rename from public/oldTV.gif rename to oldTV.gif diff --git a/public/oldTV.webp b/oldTV.webp similarity index 100% rename from public/oldTV.webp rename to oldTV.webp diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 0960803..0000000 --- a/package-lock.json +++ /dev/null @@ -1,7518 +0,0 @@ -{ - "name": "connection", - "version": "0.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "connection", - "version": "0.0.0", - "dependencies": { - "@emotion/react": "^11.11.4", - "@emotion/styled": "^11.11.5", - "@fontsource/roboto": "^5.0.13", - "@mui/icons-material": "^5.16.1", - "@mui/material": "^5.16.1", - "@react-three/drei": "^9.109.2", - "@react-three/fiber": "^8.16.8", - "axios": "^1.7.2", - "classnames": "^2.5.1", - "emoji-picker-react": "^4.11.1", - "favicons": "^7.2.0", - "firebase": "^10.12.3", - "prop-types": "^15.8.1", - "react": "^18.2.0", - "react-copy-to-clipboard": "^5.1.0", - "react-dom": "^18.2.0", - "react-photo-view": "^1.2.6", - "react-router-dom": "^6.24.0", - "three": "^0.167.1", - "zustand": "^4.5.4" - }, - "devDependencies": { - "@types/react": "^18.2.66", - "@types/react-dom": "^18.2.22", - "@vitejs/plugin-react": "^4.2.1", - "autoprefixer": "^10.4.19", - "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-react": "^7.34.1", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-react-refresh": "^0.4.6", - "postcss": "^8.4.38", - "prettier": "^3.3.2", - "tailwindcss": "^3.4.4", - "vite": "^5.2.0" - } - }, - "node_modules/@alloc/quick-lru": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", - "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", - "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", - "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", - "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helpers": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", - "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", - "dependencies": { - "@babel/types": "^7.24.7", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", - "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "browserslist": "^4.22.2", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", - "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", - "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", - "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", - "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", - "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", - "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", - "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", - "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", - "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", - "dev": true, - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-self": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.24.7.tgz", - "integrity": "sha512-fOPQYbGSgH0HUp4UJO4sMBFjY6DuWq+2i8rixyUMb3CdGixs/gccURvYOAhajBdKDoGajFr3mUq5rH3phtkGzw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-source": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.24.7.tgz", - "integrity": "sha512-J2z+MWzZHVOemyLweMqngXrgGC42jQ//R0KdxqkIz/OrbVIIlhFI3WigZ5fO+nwFvBlncr4MGapd8vTyc7RPNQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.8.tgz", - "integrity": "sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA==", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", - "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", - "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", - "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@emotion/babel-plugin": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", - "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==", - "dependencies": { - "@babel/helper-module-imports": "^7.16.7", - "@babel/runtime": "^7.18.3", - "@emotion/hash": "^0.9.1", - "@emotion/memoize": "^0.8.1", - "@emotion/serialize": "^1.1.2", - "babel-plugin-macros": "^3.1.0", - "convert-source-map": "^1.5.0", - "escape-string-regexp": "^4.0.0", - "find-root": "^1.1.0", - "source-map": "^0.5.7", - "stylis": "4.2.0" - } - }, - "node_modules/@emotion/babel-plugin/node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" - }, - "node_modules/@emotion/babel-plugin/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@emotion/babel-plugin/node_modules/stylis": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", - "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==" - }, - "node_modules/@emotion/cache": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz", - "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==", - "dependencies": { - "@emotion/memoize": "^0.8.1", - "@emotion/sheet": "^1.2.2", - "@emotion/utils": "^1.2.1", - "@emotion/weak-memoize": "^0.3.1", - "stylis": "4.2.0" - } - }, - "node_modules/@emotion/cache/node_modules/stylis": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", - "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==" - }, - "node_modules/@emotion/hash": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz", - "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==" - }, - "node_modules/@emotion/is-prop-valid": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", - "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==", - "dependencies": { - "@emotion/memoize": "^0.8.1" - } - }, - "node_modules/@emotion/memoize": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", - "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" - }, - "node_modules/@emotion/react": { - "version": "11.11.4", - "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.4.tgz", - "integrity": "sha512-t8AjMlF0gHpvvxk5mAtCqR4vmxiGHCeJBaQO6gncUSdklELOgtwjerNY2yuJNfwnc6vi16U/+uMF+afIawJ9iw==", - "dependencies": { - "@babel/runtime": "^7.18.3", - "@emotion/babel-plugin": "^11.11.0", - "@emotion/cache": "^11.11.0", - "@emotion/serialize": "^1.1.3", - "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", - "@emotion/utils": "^1.2.1", - "@emotion/weak-memoize": "^0.3.1", - "hoist-non-react-statics": "^3.3.1" - }, - "peerDependencies": { - "react": ">=16.8.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@emotion/serialize": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.4.tgz", - "integrity": "sha512-RIN04MBT8g+FnDwgvIUi8czvr1LU1alUMI05LekWB5DGyTm8cCBMCRpq3GqaiyEDRptEXOyXnvZ58GZYu4kBxQ==", - "dependencies": { - "@emotion/hash": "^0.9.1", - "@emotion/memoize": "^0.8.1", - "@emotion/unitless": "^0.8.1", - "@emotion/utils": "^1.2.1", - "csstype": "^3.0.2" - } - }, - "node_modules/@emotion/sheet": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz", - "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==" - }, - "node_modules/@emotion/styled": { - "version": "11.11.5", - "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.11.5.tgz", - "integrity": "sha512-/ZjjnaNKvuMPxcIiUkf/9SHoG4Q196DRl1w82hQ3WCsjo1IUR8uaGWrC6a87CrYAW0Kb/pK7hk8BnLgLRi9KoQ==", - "dependencies": { - "@babel/runtime": "^7.18.3", - "@emotion/babel-plugin": "^11.11.0", - "@emotion/is-prop-valid": "^1.2.2", - "@emotion/serialize": "^1.1.4", - "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", - "@emotion/utils": "^1.2.1" - }, - "peerDependencies": { - "@emotion/react": "^11.0.0-rc.0", - "react": ">=16.8.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@emotion/unitless": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", - "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==" - }, - "node_modules/@emotion/use-insertion-effect-with-fallbacks": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz", - "integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==", - "peerDependencies": { - "react": ">=16.8.0" - } - }, - "node_modules/@emotion/utils": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz", - "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==" - }, - "node_modules/@emotion/weak-memoize": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz", - "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", - "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@fastify/busboy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", - "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", - "engines": { - "node": ">=14" - } - }, - "node_modules/@firebase/analytics": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.5.tgz", - "integrity": "sha512-d0X2ksTOKHMf5zFAMKFZWXa8hSbgohsG507xFsGhF4Uet2b8uEUL/YLrEth67jXEbGEi1UQZX4AaGBxKNiDzjw==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/installations": "0.6.8", - "@firebase/logger": "0.4.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/analytics-compat": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.2.11.tgz", - "integrity": "sha512-wmXxJ49pEY7H549Pa4CDPOTzkPJnfG2Yolptg72ntTgSrbKVq+Eg9cAQY6Z5Kn9ATSQRX5oGXKlNfEk5DJBvvA==", - "dependencies": { - "@firebase/analytics": "0.10.5", - "@firebase/analytics-types": "0.8.2", - "@firebase/component": "0.6.8", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/analytics-types": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.8.2.tgz", - "integrity": "sha512-EnzNNLh+9/sJsimsA/FGqzakmrAUKLeJvjRHlg8df1f97NLUlFidk9600y0ZgWOp3CAxn6Hjtk+08tixlUOWyw==" - }, - "node_modules/@firebase/app": { - "version": "0.10.6", - "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.10.6.tgz", - "integrity": "sha512-/r8Ikp7TOrIIdp7v2adD2kg9SqIXMGOoJXJB1HsX7LjpjWdsoy1fMkP0HlI7GQqqRxDueHNhETx5Zn5E8HyVAQ==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/logger": "0.4.2", - "@firebase/util": "1.9.7", - "idb": "7.1.1", - "tslib": "^2.1.0" - } - }, - "node_modules/@firebase/app-check": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.8.5.tgz", - "integrity": "sha512-WyIckkVYAfnzsPIw6EAt/qBUANkUAVl6irF0xuJ1R9ISNyUT1h7dPAwvs/g3rsx0fpBWaHRAH0IFiN6zO6yLqQ==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/logger": "0.4.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/app-check-compat": { - "version": "0.3.12", - "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.3.12.tgz", - "integrity": "sha512-p/5w3pMih3JVT6u7g04KXgSZr6HDsQXyeWZkIe0+r71dPOlcKyUooe9/feTc8BWpjha3rUOkqQ7+JXZObwvYoQ==", - "dependencies": { - "@firebase/app-check": "0.8.5", - "@firebase/app-check-types": "0.5.2", - "@firebase/component": "0.6.8", - "@firebase/logger": "0.4.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/app-check-interop-types": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.3.2.tgz", - "integrity": "sha512-LMs47Vinv2HBMZi49C09dJxp0QT5LwDzFaVGf/+ITHe3BlIhUiLNttkATSXplc89A2lAaeTqjgqVkiRfUGyQiQ==" - }, - "node_modules/@firebase/app-check-types": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@firebase/app-check-types/-/app-check-types-0.5.2.tgz", - "integrity": "sha512-FSOEzTzL5bLUbD2co3Zut46iyPWML6xc4x+78TeaXMSuJap5QObfb+rVvZJtla3asN4RwU7elaQaduP+HFizDA==" - }, - "node_modules/@firebase/app-compat": { - "version": "0.2.36", - "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.36.tgz", - "integrity": "sha512-qsf+pllpgy1IGe2f5vfenOHSX8Cs58sVR5L6h/zBlNy9Yo54B2jy61KxLpSOgyRZb18IlnLLGjo7VtGU1CHvHA==", - "dependencies": { - "@firebase/app": "0.10.6", - "@firebase/component": "0.6.8", - "@firebase/logger": "0.4.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - } - }, - "node_modules/@firebase/app-types": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.9.2.tgz", - "integrity": "sha512-oMEZ1TDlBz479lmABwWsWjzHwheQKiAgnuKxE0pz0IXCVx7/rtlkx1fQ6GfgK24WCrxDKMplZrT50Kh04iMbXQ==" - }, - "node_modules/@firebase/auth-compat": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.5.10.tgz", - "integrity": "sha512-epDhgNIXmhl9DPuTW9Ec5NDJJKMFIdXBXiQI9O0xNHveow/ETtBCY86srzF7iCacqsd30CcpLwwXlhk8Y19Olg==", - "dependencies": { - "@firebase/auth": "1.7.5", - "@firebase/auth-types": "0.12.2", - "@firebase/component": "0.6.8", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0", - "undici": "5.28.4" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/auth-compat/node_modules/@firebase/auth": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.7.5.tgz", - "integrity": "sha512-DMFR1OA/f1/voeuFbSORg9AP36pMgOoSb/DRgiDalLmIJsDTlQNMCu+givjMP4s/XL85+tBk2MerYnK/AscJjw==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/logger": "0.4.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0", - "undici": "5.28.4" - }, - "peerDependencies": { - "@firebase/app": "0.x", - "@react-native-async-storage/async-storage": "^1.18.1" - }, - "peerDependenciesMeta": { - "@react-native-async-storage/async-storage": { - "optional": true - } - } - }, - "node_modules/@firebase/auth-interop-types": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.3.tgz", - "integrity": "sha512-Fc9wuJGgxoxQeavybiuwgyi+0rssr76b+nHpj+eGhXFYAdudMWyfBHvFL/I5fEHniUM/UQdFzi9VXJK2iZF7FQ==" - }, - "node_modules/@firebase/auth-types": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.12.2.tgz", - "integrity": "sha512-qsEBaRMoGvHO10unlDJhaKSuPn4pyoTtlQuP1ghZfzB6rNQPuhp/N/DcFZxm9i4v0SogjCbf9reWupwIvfmH6w==", - "peerDependencies": { - "@firebase/app-types": "0.x", - "@firebase/util": "1.x" - } - }, - "node_modules/@firebase/component": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.6.8.tgz", - "integrity": "sha512-LcNvxGLLGjBwB0dJUsBGCej2fqAepWyBubs4jt1Tiuns7QLbXHuyObZ4aMeBjZjWx4m8g1LoVI9QFpSaq/k4/g==", - "dependencies": { - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - } - }, - "node_modules/@firebase/database": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@firebase/database/-/database-1.0.6.tgz", - "integrity": "sha512-nrexUEG/fpVlHtWKkyfhTC3834kZ1WS7voNyqbBsBCqHXQOvznN5Z0L3nxBqdXSJyltNAf4ndFlQqm5gZiEczQ==", - "dependencies": { - "@firebase/app-check-interop-types": "0.3.2", - "@firebase/auth-interop-types": "0.2.3", - "@firebase/component": "0.6.8", - "@firebase/logger": "0.4.2", - "@firebase/util": "1.9.7", - "faye-websocket": "0.11.4", - "tslib": "^2.1.0" - } - }, - "node_modules/@firebase/database-compat": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-1.0.6.tgz", - "integrity": "sha512-1OGA0sLY47mkXjhICCrUTXEYFnSSXoiXWm1SHsN62b+Lzs5aKA3aWTjTUmYIoK93kDAMPkYpulSv8jcbH4Hwew==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/database": "1.0.6", - "@firebase/database-types": "1.0.4", - "@firebase/logger": "0.4.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - } - }, - "node_modules/@firebase/database-types": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-1.0.4.tgz", - "integrity": "sha512-mz9ZzbH6euFXbcBo+enuJ36I5dR5w+enJHHjy9Y5ThCdKUseqfDjW3vCp1YxE9zygFCSjJJ/z1cQ+zodvUcwPQ==", - "dependencies": { - "@firebase/app-types": "0.9.2", - "@firebase/util": "1.9.7" - } - }, - "node_modules/@firebase/firestore": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.6.4.tgz", - "integrity": "sha512-vk2MoH5HxYEhiNg1l+yBXq1Fkhue/11bFg4HdlTv6BJHcTnnAj2a+/afPpatcW4MOdYA3Tv+d5nGzWbbOC1SHw==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/logger": "0.4.2", - "@firebase/util": "1.9.7", - "@firebase/webchannel-wrapper": "1.0.1", - "@grpc/grpc-js": "~1.9.0", - "@grpc/proto-loader": "^0.7.8", - "tslib": "^2.1.0", - "undici": "5.28.4" - }, - "engines": { - "node": ">=10.10.0" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/firestore-compat": { - "version": "0.3.33", - "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.33.tgz", - "integrity": "sha512-i42a2l31N95CwYEB7zmfK0FS1mrO6pwOLwxavCrwu1BCFrVVVQhUheTPIda/iGguK/2Nog0RaIR1bo7QkZEz3g==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/firestore": "4.6.4", - "@firebase/firestore-types": "3.0.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/firestore-types": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-3.0.2.tgz", - "integrity": "sha512-wp1A+t5rI2Qc/2q7r2ZpjUXkRVPtGMd6zCLsiWurjsQpqPgFin3AhNibKcIzoF2rnToNa/XYtyWXuifjOOwDgg==", - "peerDependencies": { - "@firebase/app-types": "0.x", - "@firebase/util": "1.x" - } - }, - "node_modules/@firebase/functions": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.11.6.tgz", - "integrity": "sha512-GPfIBPtpwQvsC7SQbgaUjLTdja0CsNwMoKSgrzA1FGGRk4NX6qO7VQU6XCwBiAFWbpbQex6QWkSMsCzLx1uibQ==", - "dependencies": { - "@firebase/app-check-interop-types": "0.3.2", - "@firebase/auth-interop-types": "0.2.3", - "@firebase/component": "0.6.8", - "@firebase/messaging-interop-types": "0.2.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0", - "undici": "5.28.4" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/functions-compat": { - "version": "0.3.12", - "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.12.tgz", - "integrity": "sha512-r3XUb5VlITWpML46JymfJPkK6I9j4SNlO7qWIXUc0TUmkv0oAfVoiIt1F83/NuMZXaGr4YWA/794nVSy4GV8tw==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/functions": "0.11.6", - "@firebase/functions-types": "0.6.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/functions-types": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.6.2.tgz", - "integrity": "sha512-0KiJ9lZ28nS2iJJvimpY4nNccV21rkQyor5Iheu/nq8aKXJqtJdeSlZDspjPSBBiHRzo7/GMUttegnsEITqR+w==" - }, - "node_modules/@firebase/installations": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.8.tgz", - "integrity": "sha512-57V374qdb2+wT5v7+ntpLXBjZkO6WRgmAUbVkRfFTM/4t980p0FesbqTAcOIiM8U866UeuuuF8lYH70D3jM/jQ==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/util": "1.9.7", - "idb": "7.1.1", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/installations-compat": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@firebase/installations-compat/-/installations-compat-0.2.8.tgz", - "integrity": "sha512-pI2q8JFHB7yIq/szmhzGSWXtOvtzl6tCUmyykv5C8vvfOVJUH6mP4M4iwjbK8S1JotKd/K70+JWyYlxgQ0Kpyw==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/installations": "0.6.8", - "@firebase/installations-types": "0.5.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/installations-types": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@firebase/installations-types/-/installations-types-0.5.2.tgz", - "integrity": "sha512-que84TqGRZJpJKHBlF2pkvc1YcXrtEDOVGiDjovP/a3s6W4nlbohGXEsBJo0JCeeg/UG9A+DEZVDUV9GpklUzA==", - "peerDependencies": { - "@firebase/app-types": "0.x" - } - }, - "node_modules/@firebase/logger": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.4.2.tgz", - "integrity": "sha512-Q1VuA5M1Gjqrwom6I6NUU4lQXdo9IAQieXlujeHZWvRt1b7qQ0KwBaNAjgxG27jgF9/mUwsNmO8ptBCGVYhB0A==", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/@firebase/messaging": { - "version": "0.12.10", - "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.10.tgz", - "integrity": "sha512-fGbxJPKpl2DIKNJGhbk4mYPcM+qE2gl91r6xPoiol/mN88F5Ym6UeRdMVZah+pijh9WxM55alTYwXuW40r1Y2Q==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/installations": "0.6.8", - "@firebase/messaging-interop-types": "0.2.2", - "@firebase/util": "1.9.7", - "idb": "7.1.1", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/messaging-compat": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.10.tgz", - "integrity": "sha512-FXQm7rcowkDm8kFLduHV35IRYCRo+Ng0PIp/t1+EBuEbyplaKkGjZ932pE+owf/XR+G/60ku2QRBptRGLXZydg==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/messaging": "0.12.10", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/messaging-interop-types": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.2.tgz", - "integrity": "sha512-l68HXbuD2PPzDUOFb3aG+nZj5KA3INcPwlocwLZOzPp9rFM9yeuI9YLl6DQfguTX5eAGxO0doTR+rDLDvQb5tA==" - }, - "node_modules/@firebase/performance": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.6.8.tgz", - "integrity": "sha512-F+alziiIZ6Yn8FG47mxwljq+4XkgkT2uJIFRlkyViUQRLzrogaUJW6u/+6ZrePXnouKlKIwzqos3PVJraPEcCA==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/installations": "0.6.8", - "@firebase/logger": "0.4.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/performance-compat": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.8.tgz", - "integrity": "sha512-o7TFClRVJd3VIBoY7KZQqtCeW0PC6v9uBzM6Lfw3Nc9D7hM6OonqecYvh7NwJ6R14k+xM27frLS4BcCvFHKw2A==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/logger": "0.4.2", - "@firebase/performance": "0.6.8", - "@firebase/performance-types": "0.2.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/performance-types": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@firebase/performance-types/-/performance-types-0.2.2.tgz", - "integrity": "sha512-gVq0/lAClVH5STrIdKnHnCo2UcPLjJlDUoEB/tB4KM+hAeHUxWKnpT0nemUPvxZ5nbdY/pybeyMe8Cs29gEcHA==" - }, - "node_modules/@firebase/remote-config": { - "version": "0.4.8", - "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.4.8.tgz", - "integrity": "sha512-AMLqe6wfIRnjc6FkCWOSUjhc1fSTEf8o+cv1NolFvbiJ/tU+TqN4pI7pT+MIKQzNiq5fxLehkOx+xtAQBxPJKQ==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/installations": "0.6.8", - "@firebase/logger": "0.4.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/remote-config-compat": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.2.8.tgz", - "integrity": "sha512-UxSFOp6dzFj2AHB8Bq/BYtbq5iFyizKx4Rd6WxAdaKYM8cnPMeK+l2v+Oogtjae+AeyHRI+MfL2acsfVe5cd2A==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/logger": "0.4.2", - "@firebase/remote-config": "0.4.8", - "@firebase/remote-config-types": "0.3.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/remote-config-types": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.3.2.tgz", - "integrity": "sha512-0BC4+Ud7y2aPTyhXJTMTFfrGGLqdYXrUB9sJVAB8NiqJswDTc4/2qrE/yfUbnQJhbSi6ZaTTBKyG3n1nplssaA==" - }, - "node_modules/@firebase/storage": { - "version": "0.12.6", - "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.12.6.tgz", - "integrity": "sha512-Zgb9WuehJxzhj7pGXUvkAEaH+3HvLjD9xSZ9nepuXf5f8378xME7oGJtREr/RnepdDA5YW0XIxe0QQBNHpe1nw==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0", - "undici": "5.28.4" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/storage-compat": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.9.tgz", - "integrity": "sha512-WWgAp5bTW961oIsCc9+98m4MIVKpEqztAlIngfHfwO/x3DYoBPRl/awMRG3CAXyVxG+7B7oHC5IsnqM+vTwx2A==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/storage": "0.12.6", - "@firebase/storage-types": "0.8.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/storage-types": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/@firebase/storage-types/-/storage-types-0.8.2.tgz", - "integrity": "sha512-0vWu99rdey0g53lA7IShoA2Lol1jfnPovzLDUBuon65K7uKG9G+L5uO05brD9pMw+l4HRFw23ah3GwTGpEav6g==", - "peerDependencies": { - "@firebase/app-types": "0.x", - "@firebase/util": "1.x" - } - }, - "node_modules/@firebase/util": { - "version": "1.9.7", - "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.9.7.tgz", - "integrity": "sha512-fBVNH/8bRbYjqlbIhZ+lBtdAAS4WqZumx03K06/u7fJSpz1TGjEMm1ImvKD47w+xaFKIP2ori6z8BrbakRfjJA==", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/@firebase/vertexai-preview": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@firebase/vertexai-preview/-/vertexai-preview-0.0.3.tgz", - "integrity": "sha512-KVtUWLp+ScgiwkDKAvNkVucAyhLVQp6C6lhnVEuIg4mWhWcS3oerjAeVhZT4uNofKwWxRsOaB2Yec7DMTXlQPQ==", - "dependencies": { - "@firebase/app-check-interop-types": "0.3.2", - "@firebase/component": "0.6.8", - "@firebase/logger": "0.4.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0" - }, - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "@firebase/app": "0.x", - "@firebase/app-types": "0.x" - } - }, - "node_modules/@firebase/webchannel-wrapper": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-1.0.1.tgz", - "integrity": "sha512-jmEnr/pk0yVkA7mIlHNnxCi+wWzOFUg0WyIotgkKAb2u1J7fAeDBcVNSTjTihbAYNusCLQdW5s9IJ5qwnEufcQ==" - }, - "node_modules/@floating-ui/core": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.4.tgz", - "integrity": "sha512-a4IowK4QkXl4SCWTGUR0INAfEOX3wtsYw3rKK5InQEHMGObkR8Xk44qYQD9P4r6HHw0iIfK6GUKECmY8sTkqRA==", - "dependencies": { - "@floating-ui/utils": "^0.2.4" - } - }, - "node_modules/@floating-ui/dom": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.7.tgz", - "integrity": "sha512-wmVfPG5o2xnKDU4jx/m4w5qva9FWHcnZ8BvzEe90D/RpwsJaTAVYPEPdQ8sbr/N8zZTAHlZUTQdqg8ZUbzHmng==", - "dependencies": { - "@floating-ui/core": "^1.6.0", - "@floating-ui/utils": "^0.2.4" - } - }, - "node_modules/@floating-ui/react-dom": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.1.tgz", - "integrity": "sha512-4h84MJt3CHrtG18mGsXuLCHMrug49d7DFkU0RMIyshRveBeyV2hmV/pDaF2Uxtu8kgq5r46llp5E5FQiR0K2Yg==", - "dependencies": { - "@floating-ui/dom": "^1.0.0" - }, - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0" - } - }, - "node_modules/@floating-ui/utils": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.4.tgz", - "integrity": "sha512-dWO2pw8hhi+WrXq1YJy2yCuWoL20PddgGaqTgVe4cOS9Q6qklXCiA1tJEqX6BEwRNSCP84/afac9hd4MS+zEUA==" - }, - "node_modules/@fontsource/roboto": { - "version": "5.0.13", - "resolved": "https://registry.npmjs.org/@fontsource/roboto/-/roboto-5.0.13.tgz", - "integrity": "sha512-j61DHjsdUCKMXSdNLTOxcG701FWnF0jcqNNQi2iPCDxU8seN/sMxeh62dC++UiagCWq9ghTypX+Pcy7kX+QOeQ==" - }, - "node_modules/@grpc/grpc-js": { - "version": "1.9.15", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.15.tgz", - "integrity": "sha512-nqE7Hc0AzI+euzUwDAy0aY5hCp10r734gMGRdU+qOPX0XSceI2ULrcXB5U2xSc5VkWwalCj4M7GzCAygZl2KoQ==", - "dependencies": { - "@grpc/proto-loader": "^0.7.8", - "@types/node": ">=12.12.47" - }, - "engines": { - "node": "^8.13.0 || >=10.10.0" - } - }, - "node_modules/@grpc/proto-loader": { - "version": "0.7.13", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz", - "integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==", - "dependencies": { - "lodash.camelcase": "^4.3.0", - "long": "^5.0.0", - "protobufjs": "^7.2.5", - "yargs": "^17.7.2" - }, - "bin": { - "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "deprecated": "Use @eslint/config-array instead", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true - }, - "node_modules/@img/sharp-win32-x64": { - "version": "0.33.4", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.4.tgz", - "integrity": "sha512-3QLocdTRVIrFNye5YocZl+KKpYKP+fksi1QhmOArgx7GyhIbQp/WrJRu176jm8IxromS7RIkzMiMINVdBtC8Aw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0", - "npm": ">=9.6.5", - "pnpm": ">=7.1.0", - "yarn": ">=3.2.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@mediapipe/tasks-vision": { - "version": "0.10.8", - "resolved": "https://registry.npmjs.org/@mediapipe/tasks-vision/-/tasks-vision-0.10.8.tgz", - "integrity": "sha512-Rp7ll8BHrKB3wXaRFKhrltwZl1CiXGdibPxuWXvqGnKTnv8fqa/nvftYNuSbf+pbJWKYCXdBtYTITdAUTGGh0Q==" - }, - "node_modules/@monogrid/gainmap-js": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@monogrid/gainmap-js/-/gainmap-js-3.0.5.tgz", - "integrity": "sha512-53sCTG4FaJBaAq/tcufARtVYDMDGqyBT9i7F453pWGhZ5LqubDHDWtYoHo9VhQqMcHTEexdJqSsR58y+9HVmQA==", - "dependencies": { - "promise-worker-transferable": "^1.0.4" - }, - "peerDependencies": { - "three": ">= 0.159.0" - } - }, - "node_modules/@mui/base": { - "version": "5.0.0-beta.40", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.40.tgz", - "integrity": "sha512-I/lGHztkCzvwlXpjD2+SNmvNQvB4227xBXhISPjEaJUXGImOQ9f3D2Yj/T3KasSI/h0MLWy74X0J6clhPmsRbQ==", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@floating-ui/react-dom": "^2.0.8", - "@mui/types": "^7.2.14", - "@mui/utils": "^5.15.14", - "@popperjs/core": "^2.11.8", - "clsx": "^2.1.0", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/core-downloads-tracker": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.16.1.tgz", - "integrity": "sha512-62Jq7ACYi/55Kjkh/nVfEL3F3ytTYTsdB8MGJ9iI+eRQv+Aoem5CPUAzQihUo25qqh1VkVu9/jQn3dFbyrXHgw==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - } - }, - "node_modules/@mui/icons-material": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.16.1.tgz", - "integrity": "sha512-ogQPweYba4+5XZykilwxn2/oS78uwoQ0BVBpOhhCJo0ooZsqTTsalhzP2qD/RdGqMQ8xyXPz1sYM2djTruVVVA==", - "dependencies": { - "@babel/runtime": "^7.23.9" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@mui/material": "^5.0.0", - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/material": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.16.1.tgz", - "integrity": "sha512-BGTgJRb0d/hX9tus5CEb6N/Fo8pE4tYA+s9r4/S0PCrtZ3urCLXlTH4qrAvggQbiF1cYRAbHCkVHoQ+4Pdxl+w==", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/base": "5.0.0-beta.40", - "@mui/core-downloads-tracker": "^5.16.1", - "@mui/system": "^5.16.1", - "@mui/types": "^7.2.15", - "@mui/utils": "^5.16.1", - "@types/react-transition-group": "^4.4.10", - "clsx": "^2.1.0", - "csstype": "^3.1.3", - "prop-types": "^15.8.1", - "react-is": "^18.3.1", - "react-transition-group": "^4.4.5" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@emotion/react": "^11.5.0", - "@emotion/styled": "^11.3.0", - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@emotion/react": { - "optional": true - }, - "@emotion/styled": { - "optional": true - }, - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/material/node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" - }, - "node_modules/@mui/private-theming": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.16.1.tgz", - "integrity": "sha512-2EGCKnAlq9vRIFj61jNWNXlKAxXp56577OVvsts7fAqRx+G1y6F+N7Q198SBaz8jYQeGKSz8ZMXK/M3FqjdEyw==", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/utils": "^5.16.1", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/styled-engine": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.16.1.tgz", - "integrity": "sha512-JwWUBaYR8HHCFefSeos0z6JoTbu0MnjAuNHu4QoDgPxl2EE70XH38CsKay66Iy0QkNWmGTRXVU2sVFgUOPL/Dw==", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@emotion/cache": "^11.11.0", - "csstype": "^3.1.3", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@emotion/react": "^11.4.1", - "@emotion/styled": "^11.3.0", - "react": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@emotion/react": { - "optional": true - }, - "@emotion/styled": { - "optional": true - } - } - }, - "node_modules/@mui/system": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.16.1.tgz", - "integrity": "sha512-VaFcClC+uhvIEzhzcNmh9FRBvrG9IPjsOokhj6U1HPZsFnLzHV7AD7dJcT6LxWoiIZj9Ej0GK+MGh/b8+BtSlQ==", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/private-theming": "^5.16.1", - "@mui/styled-engine": "^5.16.1", - "@mui/types": "^7.2.15", - "@mui/utils": "^5.16.1", - "clsx": "^2.1.0", - "csstype": "^3.1.3", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@emotion/react": "^11.5.0", - "@emotion/styled": "^11.3.0", - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@emotion/react": { - "optional": true - }, - "@emotion/styled": { - "optional": true - }, - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/types": { - "version": "7.2.15", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.15.tgz", - "integrity": "sha512-nbo7yPhtKJkdf9kcVOF8JZHPZTmqXjJ/tI0bdWgHg5tp9AnIN4Y7f7wm9T+0SyGYJk76+GYZ8Q5XaTYAsUHN0Q==", - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/utils": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.16.1.tgz", - "integrity": "sha512-4UQzK46tAEYs2xZv79hRiIc3GxZScd00kGPDadNrGztAEZlmSaUY8cb9ITd2xCiTfzsx5AN6DH8aaQ8QEKJQeQ==", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@types/prop-types": "^15.7.12", - "prop-types": "^15.8.1", - "react-is": "^18.3.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/utils/node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@pkgr/core": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", - "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "node_modules/@popperjs/core": { - "version": "2.11.8", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", - "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" - }, - "node_modules/@react-spring/animated": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/@react-spring/animated/-/animated-9.6.1.tgz", - "integrity": "sha512-ls/rJBrAqiAYozjLo5EPPLLOb1LM0lNVQcXODTC1SMtS6DbuBCPaKco5svFUQFMP2dso3O+qcC4k9FsKc0KxMQ==", - "dependencies": { - "@react-spring/shared": "~9.6.1", - "@react-spring/types": "~9.6.1" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/@react-spring/core": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/@react-spring/core/-/core-9.6.1.tgz", - "integrity": "sha512-3HAAinAyCPessyQNNXe5W0OHzRfa8Yo5P748paPcmMowZ/4sMfaZ2ZB6e5x5khQI8NusOHj8nquoutd6FRY5WQ==", - "dependencies": { - "@react-spring/animated": "~9.6.1", - "@react-spring/rafz": "~9.6.1", - "@react-spring/shared": "~9.6.1", - "@react-spring/types": "~9.6.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/react-spring/donate" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/@react-spring/rafz": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/@react-spring/rafz/-/rafz-9.6.1.tgz", - "integrity": "sha512-v6qbgNRpztJFFfSE3e2W1Uz+g8KnIBs6SmzCzcVVF61GdGfGOuBrbjIcp+nUz301awVmREKi4eMQb2Ab2gGgyQ==" - }, - "node_modules/@react-spring/shared": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/@react-spring/shared/-/shared-9.6.1.tgz", - "integrity": "sha512-PBFBXabxFEuF8enNLkVqMC9h5uLRBo6GQhRMQT/nRTnemVENimgRd+0ZT4yFnAQ0AxWNiJfX3qux+bW2LbG6Bw==", - "dependencies": { - "@react-spring/rafz": "~9.6.1", - "@react-spring/types": "~9.6.1" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/@react-spring/three": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/@react-spring/three/-/three-9.6.1.tgz", - "integrity": "sha512-Tyw2YhZPKJAX3t2FcqvpLRb71CyTe1GvT3V+i+xJzfALgpk10uPGdGaQQ5Xrzmok1340DAeg2pR/MCfaW7b8AA==", - "dependencies": { - "@react-spring/animated": "~9.6.1", - "@react-spring/core": "~9.6.1", - "@react-spring/shared": "~9.6.1", - "@react-spring/types": "~9.6.1" - }, - "peerDependencies": { - "@react-three/fiber": ">=6.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "three": ">=0.126" - } - }, - "node_modules/@react-spring/types": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/@react-spring/types/-/types-9.6.1.tgz", - "integrity": "sha512-POu8Mk0hIU3lRXB3bGIGe4VHIwwDsQyoD1F394OK7STTiX9w4dG3cTLljjYswkQN+hDSHRrj4O36kuVa7KPU8Q==" - }, - "node_modules/@react-three/drei": { - "version": "9.109.2", - "resolved": "https://registry.npmjs.org/@react-three/drei/-/drei-9.109.2.tgz", - "integrity": "sha512-oUbfjiyPQeQch4Mi3jZvFKigMlc97/xvazxyjPBCGa8RP8cHZJl187eZI9Ha1WwkVaX80DfgN7bYAWXS4ywxmw==", - "dependencies": { - "@babel/runtime": "^7.11.2", - "@mediapipe/tasks-vision": "0.10.8", - "@monogrid/gainmap-js": "^3.0.5", - "@react-spring/three": "~9.6.1", - "@use-gesture/react": "^10.2.24", - "camera-controls": "^2.4.2", - "cross-env": "^7.0.3", - "detect-gpu": "^5.0.28", - "glsl-noise": "^0.0.0", - "hls.js": "1.3.5", - "maath": "^0.10.7", - "meshline": "^3.1.6", - "react-composer": "^5.0.3", - "stats-gl": "^2.0.0", - "stats.js": "^0.17.0", - "suspend-react": "^0.1.3", - "three-mesh-bvh": "^0.7.0", - "three-stdlib": "^2.29.9", - "troika-three-text": "^0.49.0", - "tunnel-rat": "^0.1.2", - "utility-types": "^3.10.0", - "uuid": "^9.0.1", - "zustand": "^3.7.1" - }, - "peerDependencies": { - "@react-three/fiber": ">=8.0", - "react": ">=18.0", - "react-dom": ">=18.0", - "three": ">=0.137" - }, - "peerDependenciesMeta": { - "react-dom": { - "optional": true - } - } - }, - "node_modules/@react-three/drei/node_modules/zustand": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/zustand/-/zustand-3.7.2.tgz", - "integrity": "sha512-PIJDIZKtokhof+9+60cpockVOq05sJzHCriyvaLBmEJixseQ1a5Kdov6fWZfWOu5SK9c+FhH1jU0tntLxRJYMA==", - "engines": { - "node": ">=12.7.0" - }, - "peerDependencies": { - "react": ">=16.8" - }, - "peerDependenciesMeta": { - "react": { - "optional": true - } - } - }, - "node_modules/@react-three/fiber": { - "version": "8.16.8", - "resolved": "https://registry.npmjs.org/@react-three/fiber/-/fiber-8.16.8.tgz", - "integrity": "sha512-Lc8fjATtvQEfSd8d5iKdbpHtRm/aPMeFj7jQvp6TNHfpo8IQTW3wwcE1ZMrGGoUH+w2mnyS+0MK1NLPLnuzGkQ==", - "dependencies": { - "@babel/runtime": "^7.17.8", - "@types/react-reconciler": "^0.26.7", - "@types/webxr": "*", - "base64-js": "^1.5.1", - "buffer": "^6.0.3", - "its-fine": "^1.0.6", - "react-reconciler": "^0.27.0", - "react-use-measure": "^2.1.1", - "scheduler": "^0.21.0", - "suspend-react": "^0.1.3", - "zustand": "^3.7.1" - }, - "peerDependencies": { - "expo": ">=43.0", - "expo-asset": ">=8.4", - "expo-file-system": ">=11.0", - "expo-gl": ">=11.0", - "react": ">=18.0", - "react-dom": ">=18.0", - "react-native": ">=0.64", - "three": ">=0.133" - }, - "peerDependenciesMeta": { - "expo": { - "optional": true - }, - "expo-asset": { - "optional": true - }, - "expo-file-system": { - "optional": true - }, - "expo-gl": { - "optional": true - }, - "react-dom": { - "optional": true - }, - "react-native": { - "optional": true - } - } - }, - "node_modules/@react-three/fiber/node_modules/scheduler": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.21.0.tgz", - "integrity": "sha512-1r87x5fz9MXqswA2ERLo0EbOAU74DpIUO090gIasYTqlVoJeMcl+Z1Rg7WHz+qtPujhS/hGIt9kxZOYBV3faRQ==", - "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/@react-three/fiber/node_modules/zustand": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/zustand/-/zustand-3.7.2.tgz", - "integrity": "sha512-PIJDIZKtokhof+9+60cpockVOq05sJzHCriyvaLBmEJixseQ1a5Kdov6fWZfWOu5SK9c+FhH1jU0tntLxRJYMA==", - "engines": { - "node": ">=12.7.0" - }, - "peerDependencies": { - "react": ">=16.8" - }, - "peerDependenciesMeta": { - "react": { - "optional": true - } - } - }, - "node_modules/@remix-run/router": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.17.0.tgz", - "integrity": "sha512-2D6XaHEVvkCn682XBnipbJjgZUU7xjLtA4dGJRBVUKpEaDYOZMENZoZjAOSb7qirxt5RupjzZxz4fK2FO+EFPw==", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", - "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@tweenjs/tween.js": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-23.1.3.tgz", - "integrity": "sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA==" - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.8", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", - "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", - "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/draco3d": { - "version": "1.4.10", - "resolved": "https://registry.npmjs.org/@types/draco3d/-/draco3d-1.4.10.tgz", - "integrity": "sha512-AX22jp8Y7wwaBgAixaSvkoG4M/+PlAcm3Qs4OW8yT9DM4xUpWKeFhLueTAyZF39pviAdcDdeJoACapiAceqNcw==" - }, - "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.14.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.10.tgz", - "integrity": "sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/offscreencanvas": { - "version": "2019.7.3", - "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.3.tgz", - "integrity": "sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A==" - }, - "node_modules/@types/parse-json": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", - "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==" - }, - "node_modules/@types/prop-types": { - "version": "15.7.12", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", - "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==" - }, - "node_modules/@types/react": { - "version": "18.3.3", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz", - "integrity": "sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==", - "dependencies": { - "@types/prop-types": "*", - "csstype": "^3.0.2" - } - }, - "node_modules/@types/react-dom": { - "version": "18.3.0", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz", - "integrity": "sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==", - "dev": true, - "dependencies": { - "@types/react": "*" - } - }, - "node_modules/@types/react-reconciler": { - "version": "0.26.7", - "resolved": "https://registry.npmjs.org/@types/react-reconciler/-/react-reconciler-0.26.7.tgz", - "integrity": "sha512-mBDYl8x+oyPX/VBb3E638N0B7xG+SPk/EAMcVPeexqus/5aTpTphQi0curhhshOqRrc9t6OPoJfEUkbymse/lQ==", - "dependencies": { - "@types/react": "*" - } - }, - "node_modules/@types/react-transition-group": { - "version": "4.4.10", - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", - "integrity": "sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==", - "dependencies": { - "@types/react": "*" - } - }, - "node_modules/@types/stats.js": { - "version": "0.17.3", - "resolved": "https://registry.npmjs.org/@types/stats.js/-/stats.js-0.17.3.tgz", - "integrity": "sha512-pXNfAD3KHOdif9EQXZ9deK82HVNaXP5ZIF5RP2QG6OQFNTaY2YIetfrE9t528vEreGQvEPRDDc8muaoYeK0SxQ==" - }, - "node_modules/@types/three": { - "version": "0.167.1", - "resolved": "https://registry.npmjs.org/@types/three/-/three-0.167.1.tgz", - "integrity": "sha512-OCd2Uv/8/4TbmSaIRFawrCOnDMLdpaa+QGJdhlUBmdfbHjLY8k6uFc0tde2/UvcaHQ6NtLl28onj/vJfofV+Tg==", - "peer": true, - "dependencies": { - "@tweenjs/tween.js": "~23.1.2", - "@types/stats.js": "*", - "@types/webxr": "*", - "fflate": "~0.8.2", - "meshoptimizer": "~0.18.1" - } - }, - "node_modules/@types/webxr": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.19.tgz", - "integrity": "sha512-4hxA+NwohSgImdTSlPXEqDqqFktNgmTXQ05ff1uWam05tNGroCMp4G+4XVl6qWm1p7GQ/9oD41kAYsSssF6Mzw==" - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, - "node_modules/@use-gesture/core": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/@use-gesture/core/-/core-10.3.1.tgz", - "integrity": "sha512-WcINiDt8WjqBdUXye25anHiNxPc0VOrlT8F6LLkU6cycrOGUDyY/yyFmsg3k8i5OLvv25llc0QC45GhR/C8llw==" - }, - "node_modules/@use-gesture/react": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/@use-gesture/react/-/react-10.3.1.tgz", - "integrity": "sha512-Yy19y6O2GJq8f7CHf7L0nxL8bf4PZCPaVOCgJrusOeFHY1LvHgYXnmnXg6N5iwAnbgbZCDjo60SiM6IPJi9C5g==", - "dependencies": { - "@use-gesture/core": "10.3.1" - }, - "peerDependencies": { - "react": ">= 16.8.0" - } - }, - "node_modules/@vitejs/plugin-react": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.1.tgz", - "integrity": "sha512-m/V2syj5CuVnaxcUJOQRel/Wr31FFXRFlnOoq1TVtkCxsY5veGMTEmpWHndrhB2U8ScHtCQB1e+4hWYExQc6Lg==", - "dev": true, - "dependencies": { - "@babel/core": "^7.24.5", - "@babel/plugin-transform-react-jsx-self": "^7.24.5", - "@babel/plugin-transform-react-jsx-source": "^7.24.1", - "@types/babel__core": "^7.20.5", - "react-refresh": "^0.14.2" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "peerDependencies": { - "vite": "^4.2.0 || ^5.0.0" - } - }, - "node_modules/acorn": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", - "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", - "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlast": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", - "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.toreversed": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz", - "integrity": "sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - } - }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", - "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/autoprefixer": { - "version": "10.4.19", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz", - "integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/autoprefixer" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "browserslist": "^4.23.0", - "caniuse-lite": "^1.0.30001599", - "fraction.js": "^4.3.7", - "normalize-range": "^0.1.2", - "picocolors": "^1.0.0", - "postcss-value-parser": "^4.2.0" - }, - "bin": { - "autoprefixer": "bin/autoprefixer" - }, - "engines": { - "node": "^10 || ^12 || >=14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/axios": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", - "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/babel-plugin-macros": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", - "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", - "dependencies": { - "@babel/runtime": "^7.12.5", - "cosmiconfig": "^7.0.0", - "resolve": "^1.19.0" - }, - "engines": { - "node": ">=10", - "npm": ">=6" - } - }, - "node_modules/babel-plugin-macros/node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bidi-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz", - "integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==", - "dependencies": { - "require-from-string": "^2.0.2" - } - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.23.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", - "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001629", - "electron-to-chromium": "^1.4.796", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.16" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/camera-controls": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/camera-controls/-/camera-controls-2.8.5.tgz", - "integrity": "sha512-7VTwRk7Nu1nRKsY7bEt9HVBfKt8DETvzyYhLN4OW26OByBayMDB5fUaNcPI+z++vG23RH5yqn6ZRhZcgLQy2rA==", - "peerDependencies": { - "three": ">=0.126.1" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001636", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", - "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/classnames": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", - "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cliui/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/cliui/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/color": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", - "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", - "dependencies": { - "color-convert": "^2.0.1", - "color-string": "^1.9.0" - }, - "engines": { - "node": ">=12.5.0" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" - }, - "node_modules/color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "node_modules/color/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/copy-to-clipboard": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz", - "integrity": "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==", - "dependencies": { - "toggle-selection": "^1.0.6" - } - }, - "node_modules/cosmiconfig": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", - "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", - "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/cosmiconfig/node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "engines": { - "node": ">= 6" - } - }, - "node_modules/cross-env": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", - "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", - "dependencies": { - "cross-spawn": "^7.0.1" - }, - "bin": { - "cross-env": "src/bin/cross-env.js", - "cross-env-shell": "src/bin/cross-env-shell.js" - }, - "engines": { - "node": ">=10.14", - "npm": ">=6", - "yarn": ">=1" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" - }, - "node_modules/data-view-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==" - }, - "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/detect-gpu": { - "version": "5.0.41", - "resolved": "https://registry.npmjs.org/detect-gpu/-/detect-gpu-5.0.41.tgz", - "integrity": "sha512-0avjQwm8zyDPLmmp2PlaUxOWp/CNLbOU4t61x1IOTmBvC7UO+NMWDlEJcIjtbRBSnulC2ote81Xyillssam0CA==", - "dependencies": { - "webgl-constants": "^1.1.1" - } - }, - "node_modules/detect-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", - "engines": { - "node": ">=8" - } - }, - "node_modules/didyoumean": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", - "dev": true - }, - "node_modules/dlv": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", - "dev": true - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/dom-helpers": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", - "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", - "dependencies": { - "@babel/runtime": "^7.8.7", - "csstype": "^3.0.2" - } - }, - "node_modules/draco3d": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/draco3d/-/draco3d-1.5.7.tgz", - "integrity": "sha512-m6WCKt/erDXcw+70IJXnG7M3awwQPAsZvJGX5zY7beBqpELw6RDGkYVU0W43AFxye4pDZ5i2Lbyc/NNGqwjUVQ==" - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "node_modules/electron-to-chromium": { - "version": "1.4.805", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.805.tgz", - "integrity": "sha512-8W4UJwX/w9T0QSzINJckTKG6CYpAUTqsaWcWIsdud3I1FYJcMgW9QqT1/4CBff/pP/TihWh13OmiyY8neto6vw==", - "dev": true - }, - "node_modules/emoji-picker-react": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/emoji-picker-react/-/emoji-picker-react-4.11.1.tgz", - "integrity": "sha512-e3vhGcZyyNu7GqJaXzgoVxtASXs97duAP/vh7aL88dHJcW72DjuwYMjipzNBCjPFxXwUiQas483SKCAxPwwaUQ==", - "dependencies": { - "flairup": "1.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "react": ">=16" - } - }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/error-ex/node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" - }, - "node_modules/es-abstract": { - "version": "1.23.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", - "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "data-view-buffer": "^1.0.1", - "data-view-byte-length": "^1.0.1", - "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "hasown": "^2.0.2", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", - "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.6", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-iterator-helpers": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", - "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", - "iterator.prototype": "^1.1.2", - "safe-array-concat": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.4", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", - "dev": true, - "dependencies": { - "hasown": "^2.0.0" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" - } - }, - "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-prettier": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", - "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", - "dev": true, - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-plugin-prettier": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", - "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", - "dev": true, - "dependencies": { - "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.8.6" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint-plugin-prettier" - }, - "peerDependencies": { - "@types/eslint": ">=8.0.0", - "eslint": ">=8.0.0", - "eslint-config-prettier": "*", - "prettier": ">=3.0.0" - }, - "peerDependenciesMeta": { - "@types/eslint": { - "optional": true - }, - "eslint-config-prettier": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-react": { - "version": "7.34.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.2.tgz", - "integrity": "sha512-2HCmrU+/JNigDN6tg55cRDKCQWicYAPB38JGSFDQt95jDm8rrvSUo7YPkOIm5l6ts1j1zCvysNcasvfTMQzUOw==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.8", - "array.prototype.findlast": "^1.2.5", - "array.prototype.flatmap": "^1.3.2", - "array.prototype.toreversed": "^1.1.2", - "array.prototype.tosorted": "^1.1.3", - "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.0.19", - "estraverse": "^5.3.0", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.8", - "object.fromentries": "^2.0.8", - "object.hasown": "^1.1.4", - "object.values": "^1.2.0", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.5", - "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.11" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" - } - }, - "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", - "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" - } - }, - "node_modules/eslint-plugin-react-refresh": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.7.tgz", - "integrity": "sha512-yrj+KInFmwuQS2UQcg1SF83ha1tuHC1jMQbRNyuWtlEzzKRDgAl7L4Yp4NlDUZTZNlWvHEzOtJhMi40R7JxcSw==", - "dev": true, - "peerDependencies": { - "eslint": ">=7" - } - }, - "node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/favicons": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/favicons/-/favicons-7.2.0.tgz", - "integrity": "sha512-k/2rVBRIRzOeom3wI9jBPaSEvoTSQEW4iM0EveBmBBKFxO8mSyyRWtDlfC3VnEfu0avmjrMzy8/ZFPSe6F71Hw==", - "dependencies": { - "escape-html": "^1.0.3", - "sharp": "^0.33.1", - "xml2js": "^0.6.1" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/faye-websocket": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", - "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", - "dependencies": { - "websocket-driver": ">=0.5.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/fflate": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", - "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==" - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-root": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/firebase": { - "version": "10.12.3", - "resolved": "https://registry.npmjs.org/firebase/-/firebase-10.12.3.tgz", - "integrity": "sha512-dO2cQ8eP6RnM2wcGzbxnoljjjMBf1suUrHYFftjSpbPn/8bEx959cwTRDHqBx3MwSzNsg6zZV/wiWydJPhUKgw==", - "dependencies": { - "@firebase/analytics": "0.10.5", - "@firebase/analytics-compat": "0.2.11", - "@firebase/app": "0.10.6", - "@firebase/app-check": "0.8.5", - "@firebase/app-check-compat": "0.3.12", - "@firebase/app-compat": "0.2.36", - "@firebase/app-types": "0.9.2", - "@firebase/auth": "1.7.5", - "@firebase/auth-compat": "0.5.10", - "@firebase/database": "1.0.6", - "@firebase/database-compat": "1.0.6", - "@firebase/firestore": "4.6.4", - "@firebase/firestore-compat": "0.3.33", - "@firebase/functions": "0.11.6", - "@firebase/functions-compat": "0.3.12", - "@firebase/installations": "0.6.8", - "@firebase/installations-compat": "0.2.8", - "@firebase/messaging": "0.12.10", - "@firebase/messaging-compat": "0.2.10", - "@firebase/performance": "0.6.8", - "@firebase/performance-compat": "0.2.8", - "@firebase/remote-config": "0.4.8", - "@firebase/remote-config-compat": "0.2.8", - "@firebase/storage": "0.12.6", - "@firebase/storage-compat": "0.3.9", - "@firebase/util": "1.9.7", - "@firebase/vertexai-preview": "0.0.3" - } - }, - "node_modules/firebase/node_modules/@firebase/auth": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.7.5.tgz", - "integrity": "sha512-DMFR1OA/f1/voeuFbSORg9AP36pMgOoSb/DRgiDalLmIJsDTlQNMCu+givjMP4s/XL85+tBk2MerYnK/AscJjw==", - "dependencies": { - "@firebase/component": "0.6.8", - "@firebase/logger": "0.4.2", - "@firebase/util": "1.9.7", - "tslib": "^2.1.0", - "undici": "5.28.4" - }, - "peerDependencies": { - "@firebase/app": "0.x", - "@react-native-async-storage/async-storage": "^1.18.1" - }, - "peerDependenciesMeta": { - "@react-native-async-storage/async-storage": { - "optional": true - } - } - }, - "node_modules/flairup": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/flairup/-/flairup-1.0.0.tgz", - "integrity": "sha512-IKlE+pNvL2R+kVL1kEhUYqRxVqeFnjiIvHWDMLFXNaqyUdFXQM2wte44EfMYJNHkW16X991t2Zg8apKkhv7OBA==" - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true - }, - "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.3" - } - }, - "node_modules/foreground-child": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", - "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fraction.js": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", - "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", - "dev": true, - "engines": { - "node": "*" - }, - "funding": { - "type": "patreon", - "url": "https://github.com/sponsors/rawify" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "engines": { - "node": ">=4" - } - }, - "node_modules/globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "dev": true, - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glsl-noise": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/glsl-noise/-/glsl-noise-0.0.0.tgz", - "integrity": "sha512-b/ZCF6amfAUb7dJM/MxRs7AetQEahYzJ8PtgfrmEdtw6uyGOr+ZSGtgjFm6mfsBkxJ4d2W7kg+Nlqzqvn3Bc0w==" - }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "engines": { - "node": ">=4" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/hls.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.3.5.tgz", - "integrity": "sha512-uybAvKS6uDe0MnWNEPnO0krWVr+8m2R0hJ/viql8H3MVK+itq8gGQuIYoFHL3rECkIpNH98Lw8YuuWMKZxp3Ew==" - }, - "node_modules/hoist-non-react-statics": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", - "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", - "dependencies": { - "react-is": "^16.7.0" - } - }, - "node_modules/http-parser-js": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", - "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==" - }, - "node_modules/idb": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz", - "integrity": "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==" - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" - }, - "node_modules/immutable": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.6.tgz", - "integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==", - "dev": true, - "optional": true, - "peer": true - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" - }, - "node_modules/is-async-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", - "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "dependencies": { - "hasown": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-view": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", - "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", - "dev": true, - "dependencies": { - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-finalizationregistry": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", - "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" - }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", - "dev": true, - "dependencies": { - "which-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", - "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" - }, - "node_modules/iterator.prototype": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", - "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", - "dev": true, - "dependencies": { - "define-properties": "^1.2.1", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "reflect.getprototypeof": "^1.0.4", - "set-function-name": "^2.0.1" - } - }, - "node_modules/its-fine": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/its-fine/-/its-fine-1.2.5.tgz", - "integrity": "sha512-fXtDA0X0t0eBYAGLVM5YsgJGsJ5jEmqZEPrGbzdf5awjv0xE7nqv3TVnvtUF060Tkes15DbDAKW/I48vsb6SyA==", - "dependencies": { - "@types/react-reconciler": "^0.28.0" - }, - "peerDependencies": { - "react": ">=18.0" - } - }, - "node_modules/its-fine/node_modules/@types/react-reconciler": { - "version": "0.28.8", - "resolved": "https://registry.npmjs.org/@types/react-reconciler/-/react-reconciler-0.28.8.tgz", - "integrity": "sha512-SN9c4kxXZonFhbX4hJrZy37yw9e7EIxcpHCxQv5JUS18wDE5ovkQKlqQEkufdJCCMfuI9BnjUJvhYeJ9x5Ra7g==", - "dependencies": { - "@types/react": "*" - } - }, - "node_modules/jackspeak": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", - "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", - "dev": true, - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/jiti": { - "version": "1.21.6", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz", - "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==", - "dev": true, - "bin": { - "jiti": "bin/jiti.js" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsx-ast-utils": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", - "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lie": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", - "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "dependencies": { - "immediate": "~3.0.5" - } - }, - "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/maath": { - "version": "0.10.8", - "resolved": "https://registry.npmjs.org/maath/-/maath-0.10.8.tgz", - "integrity": "sha512-tRvbDF0Pgqz+9XUa4jjfgAQ8/aPKmQdWXilFu2tMy4GWj4NOsx99HlULO4IeREfbO3a0sA145DZYyvXPkybm0g==", - "peerDependencies": { - "@types/three": ">=0.134.0", - "three": ">=0.134.0" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/meshline": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/meshline/-/meshline-3.3.1.tgz", - "integrity": "sha512-/TQj+JdZkeSUOl5Mk2J7eLcYTLiQm2IDzmlSvYm7ov15anEcDJ92GHqqazxTSreeNgfnYu24kiEvvv0WlbCdFQ==", - "peerDependencies": { - "three": ">=0.137" - } - }, - "node_modules/meshoptimizer": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/meshoptimizer/-/meshoptimizer-0.18.1.tgz", - "integrity": "sha512-ZhoIoL7TNV4s5B6+rx5mC//fw8/POGyNxS/DZyCJeiZ12ScLfVwRE/GfsxwiTkMYYD5DmK2/JXnEVXqL4rF+Sw==" - }, - "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", - "dev": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.entries": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", - "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.hasown": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.4.tgz", - "integrity": "sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==", - "dev": true, - "dependencies": { - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.values": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", - "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/package-json-from-dist": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", - "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", - "dev": true - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", - "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", - "dev": true, - "engines": { - "node": "14 || >=16.14" - } - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "engines": { - "node": ">=8" - } - }, - "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/postcss-import": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", - "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.0.0", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "node_modules/postcss-import/node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/postcss-js": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", - "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", - "dev": true, - "dependencies": { - "camelcase-css": "^2.0.1" - }, - "engines": { - "node": "^12 || ^14 || >= 16" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.4.21" - } - }, - "node_modules/postcss-load-config": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", - "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "lilconfig": "^3.0.0", - "yaml": "^2.3.4" - }, - "engines": { - "node": ">= 14" - }, - "peerDependencies": { - "postcss": ">=8.0.9", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "postcss": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/postcss-load-config/node_modules/lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, - "node_modules/postcss-nested": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", - "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.11" - }, - "engines": { - "node": ">=12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.2.14" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.0.tgz", - "integrity": "sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ==", - "dev": true, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true - }, - "node_modules/potpack": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/potpack/-/potpack-1.0.2.tgz", - "integrity": "sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ==" - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", - "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", - "dev": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/promise-worker-transferable": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/promise-worker-transferable/-/promise-worker-transferable-1.0.4.tgz", - "integrity": "sha512-bN+0ehEnrXfxV2ZQvU2PetO0n4gqBD4ulq3MI1WOPLgr7/Mg9yRQkX5+0v1vagr74ZTsl7XtzlaYDo2EuCeYJw==", - "dependencies": { - "is-promise": "^2.1.0", - "lie": "^3.0.2" - } - }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/protobufjs": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.2.tgz", - "integrity": "sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-composer": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/react-composer/-/react-composer-5.0.3.tgz", - "integrity": "sha512-1uWd07EME6XZvMfapwZmc7NgCZqDemcvicRi3wMJzXsQLvZ3L7fTHVyPy1bZdnWXM4iPjYuNE+uJ41MLKeTtnA==", - "dependencies": { - "prop-types": "^15.6.0" - }, - "peerDependencies": { - "react": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/react-copy-to-clipboard": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", - "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", - "dependencies": { - "copy-to-clipboard": "^3.3.1", - "prop-types": "^15.8.1" - }, - "peerDependencies": { - "react": "^15.3.0 || 16 || 17 || 18" - } - }, - "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" - }, - "peerDependencies": { - "react": "^18.3.1" - } - }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "node_modules/react-photo-view": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/react-photo-view/-/react-photo-view-1.2.6.tgz", - "integrity": "sha512-Fq17yxkMIv0oFp7HOJr39HgCZRP6A9K5T5rixJ4flSUYT2OO3V8vNxEExjhIKgIrfmTu+mDnHYEsI9RRWi1JHw==", - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0" - } - }, - "node_modules/react-reconciler": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.27.0.tgz", - "integrity": "sha512-HmMDKciQjYmBRGuuhIaKA1ba/7a+UsM5FzOZsMO2JYHt9Jh8reCb7j1eDC95NOyUlKM9KRyvdx0flBuDvYSBoA==", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.21.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "react": "^18.0.0" - } - }, - "node_modules/react-reconciler/node_modules/scheduler": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.21.0.tgz", - "integrity": "sha512-1r87x5fz9MXqswA2ERLo0EbOAU74DpIUO090gIasYTqlVoJeMcl+Z1Rg7WHz+qtPujhS/hGIt9kxZOYBV3faRQ==", - "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/react-refresh": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", - "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-router": { - "version": "6.24.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.24.0.tgz", - "integrity": "sha512-sQrgJ5bXk7vbcC4BxQxeNa5UmboFm35we1AFK0VvQaz9g0LzxEIuLOhHIoZ8rnu9BO21ishGeL9no1WB76W/eg==", - "dependencies": { - "@remix-run/router": "1.17.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "react": ">=16.8" - } - }, - "node_modules/react-router-dom": { - "version": "6.24.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.24.0.tgz", - "integrity": "sha512-960sKuau6/yEwS8e+NVEidYQb1hNjAYM327gjEyXlc6r3Skf2vtwuJ2l7lssdegD2YjoKG5l8MsVyeTDlVeY8g==", - "dependencies": { - "@remix-run/router": "1.17.0", - "react-router": "6.24.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" - } - }, - "node_modules/react-transition-group": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", - "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", - "dependencies": { - "@babel/runtime": "^7.5.5", - "dom-helpers": "^5.0.1", - "loose-envify": "^1.4.0", - "prop-types": "^15.6.2" - }, - "peerDependencies": { - "react": ">=16.6.0", - "react-dom": ">=16.6.0" - } - }, - "node_modules/react-use-measure": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/react-use-measure/-/react-use-measure-2.1.1.tgz", - "integrity": "sha512-nocZhN26cproIiIduswYpV5y5lQpSQS1y/4KuvUCjSKmw7ZWIS/+g3aFnX3WdBkyuGUtTLif3UTqnLLhbDoQig==", - "dependencies": { - "debounce": "^1.2.1" - }, - "peerDependencies": { - "react": ">=16.13", - "react-dom": ">=16.13" - } - }, - "node_modules/read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "dev": true, - "dependencies": { - "pify": "^2.3.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", - "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.1", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", - "which-builtin-type": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", - "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.6", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "set-function-name": "^2.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rollup": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", - "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", - "dev": true, - "dependencies": { - "@types/estree": "1.0.5" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.18.0", - "@rollup/rollup-android-arm64": "4.18.0", - "@rollup/rollup-darwin-arm64": "4.18.0", - "@rollup/rollup-darwin-x64": "4.18.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", - "@rollup/rollup-linux-arm-musleabihf": "4.18.0", - "@rollup/rollup-linux-arm64-gnu": "4.18.0", - "@rollup/rollup-linux-arm64-musl": "4.18.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", - "@rollup/rollup-linux-riscv64-gnu": "4.18.0", - "@rollup/rollup-linux-s390x-gnu": "4.18.0", - "@rollup/rollup-linux-x64-gnu": "4.18.0", - "@rollup/rollup-linux-x64-musl": "4.18.0", - "@rollup/rollup-win32-arm64-msvc": "4.18.0", - "@rollup/rollup-win32-ia32-msvc": "4.18.0", - "@rollup/rollup-win32-x64-msvc": "4.18.0", - "fsevents": "~2.3.2" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-array-concat": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", - "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-regex": "^1.1.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/sass": { - "version": "1.77.6", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.6.tgz", - "integrity": "sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0", - "source-map-js": ">=0.6.2 <2.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sax": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==" - }, - "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/sharp": { - "version": "0.33.4", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.4.tgz", - "integrity": "sha512-7i/dt5kGl7qR4gwPRD2biwD2/SvBn3O04J77XKFgL2OnZtQw+AG9wnuS/csmu80nPRHLYE9E41fyEiG8nhH6/Q==", - "hasInstallScript": true, - "dependencies": { - "color": "^4.2.3", - "detect-libc": "^2.0.3", - "semver": "^7.6.0" - }, - "engines": { - "libvips": ">=8.15.2", - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-darwin-arm64": "0.33.4", - "@img/sharp-darwin-x64": "0.33.4", - "@img/sharp-libvips-darwin-arm64": "1.0.2", - "@img/sharp-libvips-darwin-x64": "1.0.2", - "@img/sharp-libvips-linux-arm": "1.0.2", - "@img/sharp-libvips-linux-arm64": "1.0.2", - "@img/sharp-libvips-linux-s390x": "1.0.2", - "@img/sharp-libvips-linux-x64": "1.0.2", - "@img/sharp-libvips-linuxmusl-arm64": "1.0.2", - "@img/sharp-libvips-linuxmusl-x64": "1.0.2", - "@img/sharp-linux-arm": "0.33.4", - "@img/sharp-linux-arm64": "0.33.4", - "@img/sharp-linux-s390x": "0.33.4", - "@img/sharp-linux-x64": "0.33.4", - "@img/sharp-linuxmusl-arm64": "0.33.4", - "@img/sharp-linuxmusl-x64": "0.33.4", - "@img/sharp-wasm32": "0.33.4", - "@img/sharp-win32-ia32": "0.33.4", - "@img/sharp-win32-x64": "0.33.4" - } - }, - "node_modules/sharp/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" - } - }, - "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stats-gl": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/stats-gl/-/stats-gl-2.2.8.tgz", - "integrity": "sha512-94G5nZvduDmzxBS7K0lYnynYwreZpkknD8g5dZmU6mpwIhy3caCrjAm11Qm1cbyx7mqix7Fp00RkbsonzKWnoQ==", - "dependencies": { - "@types/three": "^0.163.0" - } - }, - "node_modules/stats-gl/node_modules/@types/three": { - "version": "0.163.0", - "resolved": "https://registry.npmjs.org/@types/three/-/three-0.163.0.tgz", - "integrity": "sha512-uIdDhsXRpQiBUkflBS/i1l3JX14fW6Ot9csed60nfbZNXHDTRsnV2xnTVwXcgbvTiboAR4IW+t+lTL5f1rqIqA==", - "dependencies": { - "@tweenjs/tween.js": "~23.1.1", - "@types/stats.js": "*", - "@types/webxr": "*", - "fflate": "~0.8.2", - "meshoptimizer": "~0.18.1" - } - }, - "node_modules/stats.js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/stats.js/-/stats.js-0.17.0.tgz", - "integrity": "sha512-hNKz8phvYLPEcRkeG1rsGmV5ChMjKDAWU7/OJJdDErPBNChQXxCo3WZurGpnWc6gZhAzEPFad1aVgyOANH1sMw==" - }, - "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/string.prototype.matchall": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz", - "integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", - "regexp.prototype.flags": "^1.5.2", - "set-function-name": "^2.0.2", - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", - "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", - "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/sucrase": { - "version": "3.35.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", - "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.2", - "commander": "^4.0.0", - "glob": "^10.3.10", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "ts-interface-checker": "^0.1.9" - }, - "bin": { - "sucrase": "bin/sucrase", - "sucrase-node": "bin/sucrase-node" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/sucrase/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/sucrase/node_modules/glob": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.2.tgz", - "integrity": "sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sucrase/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/suspend-react": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/suspend-react/-/suspend-react-0.1.3.tgz", - "integrity": "sha512-aqldKgX9aZqpoDp3e8/BZ8Dm7x1pJl+qI3ZKxDN0i/IQTWUwBx/ManmlVJ3wowqbno6c2bmiIfs+Um6LbsjJyQ==", - "peerDependencies": { - "react": ">=17.0" - } - }, - "node_modules/synckit": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz", - "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==", - "dev": true, - "dependencies": { - "@pkgr/core": "^0.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "node_modules/tailwindcss": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.4.tgz", - "integrity": "sha512-ZoyXOdJjISB7/BcLTR6SEsLgKtDStYyYZVLsUtWChO4Ps20CBad7lfJKVDiejocV4ME1hLmyY0WJE3hSDcmQ2A==", - "dev": true, - "dependencies": { - "@alloc/quick-lru": "^5.2.0", - "arg": "^5.0.2", - "chokidar": "^3.5.3", - "didyoumean": "^1.2.2", - "dlv": "^1.1.3", - "fast-glob": "^3.3.0", - "glob-parent": "^6.0.2", - "is-glob": "^4.0.3", - "jiti": "^1.21.0", - "lilconfig": "^2.1.0", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "object-hash": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.23", - "postcss-import": "^15.1.0", - "postcss-js": "^4.0.1", - "postcss-load-config": "^4.0.1", - "postcss-nested": "^6.0.1", - "postcss-selector-parser": "^6.0.11", - "resolve": "^1.22.2", - "sucrase": "^3.32.0" - }, - "bin": { - "tailwind": "lib/cli.js", - "tailwindcss": "lib/cli.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tailwindcss/node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dev": true, - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/three": { - "version": "0.167.1", - "resolved": "https://registry.npmjs.org/three/-/three-0.167.1.tgz", - "integrity": "sha512-gYTLJA/UQip6J/tJvl91YYqlZF47+D/kxiWrbTon35ZHlXEN0VOo+Qke2walF1/x92v55H6enomymg4Dak52kw==" - }, - "node_modules/three-mesh-bvh": { - "version": "0.7.6", - "resolved": "https://registry.npmjs.org/three-mesh-bvh/-/three-mesh-bvh-0.7.6.tgz", - "integrity": "sha512-rCjsnxEqR9r1/C/lCqzGLS67NDty/S/eT6rAJfDvsanrIctTWdNoR4ZOGWewCB13h1QkVo2BpmC0wakj1+0m8A==", - "peerDependencies": { - "three": ">= 0.151.0" - } - }, - "node_modules/three-stdlib": { - "version": "2.30.5", - "resolved": "https://registry.npmjs.org/three-stdlib/-/three-stdlib-2.30.5.tgz", - "integrity": "sha512-BBZkKnTDmUacXU9mv7fA5R7Brb89uUbOUWXXZKNrzdx6JEozJt3e6I5zPMRbb1FC2aw/2QFtgwPi1PI8VjX6FQ==", - "dependencies": { - "@types/draco3d": "^1.4.0", - "@types/offscreencanvas": "^2019.6.4", - "@types/webxr": "^0.5.2", - "draco3d": "^1.4.1", - "fflate": "^0.6.9", - "potpack": "^1.0.1" - }, - "peerDependencies": { - "three": ">=0.128.0" - } - }, - "node_modules/three-stdlib/node_modules/fflate": { - "version": "0.6.10", - "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.6.10.tgz", - "integrity": "sha512-IQrh3lEPM93wVCEczc9SaAOvkmcoQn/G8Bo1e8ZPlY3X3bnAxWaBdvTdvM1hP62iZp0BXWDy4vTAy4fF0+Dlpg==" - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toggle-selection": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", - "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==" - }, - "node_modules/troika-three-text": { - "version": "0.49.1", - "resolved": "https://registry.npmjs.org/troika-three-text/-/troika-three-text-0.49.1.tgz", - "integrity": "sha512-lXGWxgjJP9kw4i4Wh+0k0Q/7cRfS6iOME4knKht/KozPu9GcFA9NnNpRvehIhrUawq9B0ZRw+0oiFHgRO+4Wig==", - "dependencies": { - "bidi-js": "^1.0.2", - "troika-three-utils": "^0.49.0", - "troika-worker-utils": "^0.49.0", - "webgl-sdf-generator": "1.1.1" - }, - "peerDependencies": { - "three": ">=0.125.0" - } - }, - "node_modules/troika-three-utils": { - "version": "0.49.0", - "resolved": "https://registry.npmjs.org/troika-three-utils/-/troika-three-utils-0.49.0.tgz", - "integrity": "sha512-umitFL4cT+Fm/uONmaQEq4oZlyRHWwVClaS6ZrdcueRvwc2w+cpNQ47LlJKJswpqtMFWbEhOLy0TekmcPZOdYA==", - "peerDependencies": { - "three": ">=0.125.0" - } - }, - "node_modules/troika-worker-utils": { - "version": "0.49.0", - "resolved": "https://registry.npmjs.org/troika-worker-utils/-/troika-worker-utils-0.49.0.tgz", - "integrity": "sha512-1xZHoJrG0HFfCvT/iyN41DvI/nRykiBtHqFkGaGgJwq5iXfIZFBiPPEHFpPpgyKM3Oo5ITHXP5wM2TNQszYdVg==" - }, - "node_modules/ts-interface-checker": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", - "dev": true - }, - "node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/tunnel-rat": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/tunnel-rat/-/tunnel-rat-0.1.2.tgz", - "integrity": "sha512-lR5VHmkPhzdhrM092lI2nACsLO4QubF0/yoOhzX7c+wIpbN1GjHNzCc91QlpxBi+cnx8vVJ+Ur6vL5cEoQPFpQ==", - "dependencies": { - "zustand": "^4.3.2" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", - "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", - "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/undici": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", - "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" - }, - "node_modules/update-browserslist-db": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", - "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/use-sync-external-store": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/utility-types": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.11.0.tgz", - "integrity": "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==", - "engines": { - "node": ">= 4" - } - }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/vite": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.1.tgz", - "integrity": "sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==", - "dev": true, - "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.38", - "rollup": "^4.13.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "node_modules/webgl-constants": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/webgl-constants/-/webgl-constants-1.1.1.tgz", - "integrity": "sha512-LkBXKjU5r9vAW7Gcu3T5u+5cvSvh5WwINdr0C+9jpzVB41cjQAP5ePArDtk/WHYdVj0GefCgM73BA7FlIiNtdg==" - }, - "node_modules/webgl-sdf-generator": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/webgl-sdf-generator/-/webgl-sdf-generator-1.1.1.tgz", - "integrity": "sha512-9Z0JcMTFxeE+b2x1LJTdnaT8rT8aEp7MVxkNwoycNmJWwPdzoXzMh0BjJSh/AEFP+KPYZUli814h8bJZFIZ2jA==" - }, - "node_modules/websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", - "dependencies": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", - "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", - "dev": true, - "dependencies": { - "function.prototype.name": "^1.1.5", - "has-tostringtag": "^1.0.0", - "is-async-function": "^2.0.0", - "is-date-object": "^1.0.5", - "is-finalizationregistry": "^1.0.2", - "is-generator-function": "^1.0.10", - "is-regex": "^1.1.4", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/xml2js": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", - "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "node_modules/yaml": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", - "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", - "dev": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/zustand": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.4.tgz", - "integrity": "sha512-/BPMyLKJPtFEvVL0E9E9BTUM63MNyhPGlvxk1XjrfWTUlV+BR8jufjsovHzrtR6YNcBEcL7cMHovL1n9xHawEg==", - "dependencies": { - "use-sync-external-store": "1.2.0" - }, - "engines": { - "node": ">=12.7.0" - }, - "peerDependencies": { - "@types/react": ">=16.8", - "immer": ">=9.0.6", - "react": ">=16.8" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "immer": { - "optional": true - }, - "react": { - "optional": true - } - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 548f93c..0000000 --- a/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "connection", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build", - "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" - }, - "dependencies": { - "@emotion/react": "^11.11.4", - "@emotion/styled": "^11.11.5", - "@fontsource/roboto": "^5.0.13", - "@mui/icons-material": "^5.16.1", - "@mui/material": "^5.16.1", - "@react-three/drei": "^9.109.2", - "@react-three/fiber": "^8.16.8", - "axios": "^1.7.2", - "classnames": "^2.5.1", - "emoji-picker-react": "^4.11.1", - "favicons": "^7.2.0", - "firebase": "^10.12.3", - "prop-types": "^15.8.1", - "react": "^18.2.0", - "react-copy-to-clipboard": "^5.1.0", - "react-dom": "^18.2.0", - "react-photo-view": "^1.2.6", - "react-router-dom": "^6.24.0", - "three": "^0.167.1", - "zustand": "^4.5.4" - }, - "devDependencies": { - "@types/react": "^18.2.66", - "@types/react-dom": "^18.2.22", - "@vitejs/plugin-react": "^4.2.1", - "autoprefixer": "^10.4.19", - "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-react": "^7.34.1", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-react-refresh": "^0.4.6", - "postcss": "^8.4.38", - "prettier": "^3.3.2", - "tailwindcss": "^3.4.4", - "vite": "^5.2.0" - } -} diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index 2aa7205..0000000 --- a/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -}; diff --git a/scripts/favicons.js b/scripts/favicons.js deleted file mode 100644 index 7ee6b4c..0000000 --- a/scripts/favicons.js +++ /dev/null @@ -1,53 +0,0 @@ -import favicons from 'favicons'; -import { readdirSync } from 'fs'; -import fs from 'fs/promises'; -import path from 'path'; - -const __dirname = path.resolve(); - -generateFavicon(); -export default async function generateFavicon() { - console.log('Generate favicons...'); - - const files = await readdirSync(path.join(__dirname, 'public', 'favicons')); - - const image = files.find(name => { - return new RegExp( - '^' + 'favicon' + '(?=\\.(png|jpg|jpeg|bmp|svg|webp))', - ).test(name); - }); - - const src = path.join(__dirname, 'public', 'favicons', image); // Icon source file path. - const dest = path.join(__dirname, 'dist', 'favicons'); // Output directory path. - const htmlBasename = 'index.html'; // HTML file basename. - - // Configuration (see above in the README file). - const configuration = { - path: '/favicons', - appName: null, - appShortName: null, - appDescription: null, - }; - - // Below is the processing. - const response = await favicons(src, configuration); - await fs.mkdir(dest, { recursive: true }); - await Promise.all( - response.images.map(async image => { - await fs.writeFile(path.join(dest, image.name), image.contents); - }), - ); - await Promise.all( - response.files.map(async file => { - await fs.writeFile(path.join(dest, file.name), file.contents); - }), - ); - - const fileHtml = String( - (await fs.readFile(path.join(dest, '../', htmlBasename))).toString(), - ); - - const fileChunks = fileHtml.split(''); - fileChunks[1] = response.html.join('\n'); - await fs.writeFile(path.join(dest, '../', htmlBasename), fileChunks.join('')); -} diff --git a/public/site.webmanifest b/site.webmanifest similarity index 100% rename from public/site.webmanifest rename to site.webmanifest diff --git a/src/App.jsx b/src/App.jsx deleted file mode 100644 index a8acc36..0000000 --- a/src/App.jsx +++ /dev/null @@ -1,18 +0,0 @@ -import '@/assets/style/components/app.scss'; -import { RouterProvider } from 'react-router-dom'; -import PropTypes from 'prop-types'; -App.propTypes = { - router: PropTypes.object, -}; - -function App({ router }) { - return ( -
-
- -
-
- ); -} - -export default App; diff --git a/src/assets/img/avatar.png b/src/assets/img/avatar.png deleted file mode 100644 index b9b4d75..0000000 Binary files a/src/assets/img/avatar.png and /dev/null differ diff --git a/src/assets/img/google.svg b/src/assets/img/google.svg deleted file mode 100644 index 088288f..0000000 --- a/src/assets/img/google.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/img/message-element.svg b/src/assets/img/message-element.svg deleted file mode 100644 index 75facf8..0000000 --- a/src/assets/img/message-element.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/assets/style/components/app.scss b/src/assets/style/components/app.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/assets/style/components/footer.scss b/src/assets/style/components/footer.scss deleted file mode 100644 index ee9fb41..0000000 --- a/src/assets/style/components/footer.scss +++ /dev/null @@ -1,2 +0,0 @@ -.footer { -} diff --git a/src/assets/style/components/header.scss b/src/assets/style/components/header.scss deleted file mode 100644 index 75001c2..0000000 --- a/src/assets/style/components/header.scss +++ /dev/null @@ -1,2 +0,0 @@ -.header { -} diff --git a/src/assets/style/config/production.scss b/src/assets/style/config/production.scss deleted file mode 100644 index 0719a85..0000000 --- a/src/assets/style/config/production.scss +++ /dev/null @@ -1,7 +0,0 @@ -$NODE_ENV: production; - -//< " МИКСИНЫ " >=============================================================================================================>// -@import "../modules/_mixins"; - -//< " ФАЙЛ С ПЕРЕМЕННЫМИ " >=============================================================================================================>// -@import "../modules/_vars"; diff --git a/src/assets/style/main.scss b/src/assets/style/main.scss deleted file mode 100644 index a67ed3d..0000000 --- a/src/assets/style/main.scss +++ /dev/null @@ -1,66 +0,0 @@ -//< " ФАЙЛ С ОБНУЛЯЮЩИМИ СТИЛЯМИ " >=============================================================================================================>// -@import "./modules/_nullstyle"; - -// TAILWIND // -@import "./modules/_tailwind"; - -//< " ПОДКЛЮЧАЕМ ФАЙЛ С ШРИФТАМИ " >=============================================================================================================>// -@import "./modules/_fonts"; - -//< " ПОДКЛЮЧАЕМ ФАЙЛ С ИКОНКАМИ " >=============================================================================================================>// -// @import "./modules/_iconfonts"; - -//< " ФАЙЛ С ОТДЕЛЬНЫМИ БЛОКАМИ " >=============================================================================================================>// -// @import "./modules/_ui"; - -body { - font-family: $fontRoboto; - color: $colorWhite; - font-size: 14px; - @include scrollbars(7px, $colorMain, $colorChat, 6px); - - // ._lock-scroll - &._lock-scroll { - overflow: hidden; - } -} - -#root { - min-height: 100%; - width: 100%; - background-color: $colorBg; - display: flex; -} - -//< " ОБОЛОЧКА " >=============================================================================================================>// -.wrapper { - width: 100%; - min-height: 100%; - display: flex; - flex-direction: column; - overflow: hidden; -} - -//< " СЕТКА " >=============================================================================================================>// - -// .content -.content { - flex: 1 1 auto; - display: flex; - flex-direction: column; -} - -.app { - flex: 1 1 auto; - display: flex; - justify-content: space-between; - max-height: 100vh; -} - -// ._container -._container { - width: 100%; - padding: 0px #{calc($containerPadding / 2) + px} 0px #{calc($containerPadding / 2) + px}; - margin: 0px auto; - max-width: $maxWidthContainer + px; -} diff --git a/src/assets/style/modules/_fonts.scss b/src/assets/style/modules/_fonts.scss deleted file mode 100644 index bdf79fb..0000000 --- a/src/assets/style/modules/_fonts.scss +++ /dev/null @@ -1,11 +0,0 @@ -//< " INCLUDE FILE WITH FONTS " >=============================================================================================================>// - -// 01 -@import "@fontsource/roboto/300.css"; -@import "@fontsource/roboto/400.css"; -@import "@fontsource/roboto/500.css"; -@import "@fontsource/roboto/700.css"; - -// 02 - -// 03 diff --git a/src/assets/style/modules/_iconfonts.scss b/src/assets/style/modules/_iconfonts.scss deleted file mode 100644 index 231555b..0000000 --- a/src/assets/style/modules/_iconfonts.scss +++ /dev/null @@ -1,28 +0,0 @@ -// @font-face { -// font-family: "icomoon"; -// src: url("../iconfonts/icomoon.eot"); -// src: -// url("../iconfonts/icomoon.eot") format("embedded-opentype"), -// url("../iconfonts/icomoon.ttf") format("truetype"), -// url("../iconfonts/icomoon.woff") format("woff"), -// url("../iconfonts/icomoon.svg") format("svg"); -// font-weight: normal; -// font-style: normal; -// font-display: block; -// } - -[class^="icon-"], -[class*=" icon-"] { - /* use !important to prevent issues with browser extensions that change fonts */ - font-family: "icomoon" !important; - speak: never; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} diff --git a/src/assets/style/modules/_mixins.scss b/src/assets/style/modules/_mixins.scss deleted file mode 100644 index f2cdb37..0000000 --- a/src/assets/style/modules/_mixins.scss +++ /dev/null @@ -1,141 +0,0 @@ -//< " RESPONSIVE VALUE " >=============================================================================================================>// -@mixin adaptiv-value($property, $startSize, $minSize, $type, $direction: null, $width: null) { - $addSize: $startSize - $minSize; - - @if $direction== "vertical" { - /* If responsive vertical */ - #{$property}: calc(#{$minSize + px} + #{$addSize} * ((100vh - 640px) / #{$maxHeight - 640})); - } @else if $type==1 { - /* If less than container */ - #{$property}: $startSize + px; - - @media (max-width: #{($width or $maxWidthContainer) + px}) { - #{$property}: calc(#{$minSize + px} + #{$addSize} * ((100vw - 320px) / #{($width or $maxWidthContainer) - 320})); - } - } @else if $type==2 { - /* If there is more container */ - #{$property}: $startSize + px; - - @media (min-width: #{($width or $maxWidthContainer) + px}) { - #{$property}: calc(#{$minSize + px} + #{$addSize} * ((100vw - 320px) / #{$maxWidth - 320})); - } - } @else { - /* Always */ - #{$property}: calc(#{$minSize + px} + #{$addSize} * ((100vw - 320px) / #{$maxWidth - 320})); - } -} - -//< " RESPONSIVE VALUE WITH OF A SPECIFIC SCREEN WIDTH " >=============================================================================================================>// - -//< " RESPONSIVE PROPERY WITH DOUBLE PARAMS" >=============================================================================================================>// -// H - horizontal -// V - vertical -@mixin adaptiv-indent($property, $startSizeV, $minSizeV, $startSizeH, $minSizeH, $type) { - $addSizeV: $startSizeV - $minSizeV; - $addSizeH: $startSizeH - $minSizeH; - - @if $type==1 { - /* If less than container */ - #{property}: $startSizeV + px $startSizeH + px; - - @media (max-width: #{$maxWidthContainer + px}) { - #{property}: calc(#{$minSizeV + px} + #{$addSizeV} * ((100vw - 320px) / #{$maxWidthContainer - 320})) - calc(#{$minSizeH + px} + #{$addSizeH} * ((100vw - 320px) / #{$maxWidthContainer - 320})); - } - } @else if $type==2 { - /* If there is more container */ - #{property}: $startSizeV + px $startSizeH + px; - - @media (min-width: #{$maxWidthContainer + px}) { - #{property}: calc(#{$minSizeV + px} + #{$addSizeV} * ((100vw - 320px) / #{$maxWidth - 320})) - calc(#{$minSizeH + px} + #{$addSizeH} * ((100vw - 320px) / #{$maxWidth - 320})); - } - } @else { - /* Always */ - #{property}: calc(#{$minSizeV + px} + #{$addSizeV} * ((100vw - 320px) / #{$maxWidth - 320})) - calc(#{$minSizeH + px} + #{$addSizeH} * ((100vw - 320px) / #{$maxWidth - 320})); - } -} - -//< " BUTTON GRADIENT " > -@mixin button-gradient($dir: 0deg, $from, $to, $borderRadius: 0px, $opacity: 1) { - position: relative; - background: transparent; - overflow: hidden; - z-index: 0; - border-radius: $borderRadius; - - &::before { - content: ""; - position: absolute; - z-index: -1; - inset: 0px; - background: linear-gradient($dir, $from 2.29%, color-mix(in srgb, $from, $to), 49.7%, $to 68.56%); - padding: 2px; - border-radius: $borderRadius; - // -webkit-mask: linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0px) content-box content-box, linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0px); - // -webkit-mask-composite: xor; - transition: all 0.3s ease 0s; - } - &::after { - content: ""; - background: linear-gradient($dir, $from 2.29%, color-mix(in srgb, $from, $to) 49.7%, $to 68.56%); - -webkit-mask: - linear-gradient(#fff 0 0) content-box, - linear-gradient(#fff 0 0); - mask: - linear-gradient(#fff 0 0) content-box, - linear-gradient(#fff 0 0); - position: absolute; - width: 100%; - height: 100%; - left: 0; - top: 0; - z-index: -1; - transition: all 0.3s ease 0s; - opacity: $opacity; - } - - @media (any-hover: hover) { - cursor: pointer; - transition: all 0.3s ease 0s; - &:hover { - &::after { - @if $opacity==1 { - opacity: 0; - } @else if $opacity==0 { - opacity: 1; - } - } - } - } -} - -//< " FONT GRADIENT " > -@mixin font-gradient($dir, $colors...) { - background: -webkit-linear-gradient($dir, $colors); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; -} - -//< " STYLE SCROLLBAR " > -@mixin scrollbars($size: 10px, $foreground-color: #999, $background-color: #333, $border-radius: 0px) { - // For Chrome & Safari - - &::-webkit-scrollbar { - width: $size; - height: $size; - } - &::-webkit-scrollbar-thumb { - background: $foreground-color; - border-radius: $border-radius; - } - &::-webkit-scrollbar-track { - background: $background-color; - } - - // Standard version (Firefox only for now) - @-moz-document url-prefix() { - scrollbar-color: $foreground-color $background-color; - } -} diff --git a/src/assets/style/modules/_nullstyle.scss b/src/assets/style/modules/_nullstyle.scss deleted file mode 100644 index e81c204..0000000 --- a/src/assets/style/modules/_nullstyle.scss +++ /dev/null @@ -1,114 +0,0 @@ -/* Обнуление =============================================================================================================*/ -* { - padding: 0; - margin: 0; - border: 0; - -webkit-tap-highlight-color: transparent; -} - -*, -*:before, -*:after { - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -:focus, -:active { - outline: none; -} - -a:focus, -a:active { - outline: none; -} - -nav, -footer, -header, -aside { - display: block; -} - -html, -body { - height: 100%; - width: 100%; - font-size: 100%; - line-height: 1; - font-size: 14px; - -ms-text-size-adjust: 100%; - -moz-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; -} - -input, -button, -textarea { - font-family: inherit; -} - -input::-ms-clear { - display: none; -} - -button { - cursor: pointer; -} - -button::-moz-focus-inner { - padding: 0; - border: 0; -} - -a, -a:visited { - text-decoration: none; -} - -a:hover { - text-decoration: none; -} - -ul li { - list-style: none; -} - -img { - vertical-align: top; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - font-size: inherit; - font-weight: 400; -} - -input::-webkit-outer-spin-button, -input::-webkit-inner-spin-button { - -webkit-appearance: none; - margin: 0; -} - -input[type="number"] { - appearance: textfield; - -moz-appearance: textfield; -} - -input { - border-radius: 0; -} - -input:autofill, -input:-internal-autofill-selected, -input:-webkit-autofill, -input:-webkit-autofill:focus { - transition: - background-color 0s 600000s, - color 0s 600000s; -} \ No newline at end of file diff --git a/src/assets/style/modules/_tailwind.css b/src/assets/style/modules/_tailwind.css deleted file mode 100644 index bd6213e..0000000 --- a/src/assets/style/modules/_tailwind.css +++ /dev/null @@ -1,3 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; \ No newline at end of file diff --git a/src/assets/style/modules/_ui.scss b/src/assets/style/modules/_ui.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/assets/style/modules/_vars.scss b/src/assets/style/modules/_vars.scss deleted file mode 100644 index de975d9..0000000 --- a/src/assets/style/modules/_vars.scss +++ /dev/null @@ -1,25 +0,0 @@ -//< " ПЕРЕМЕННЫЕ " >=============================================================================================================>// - -// ОБЩИЕ НАСТРОЙКИ СТРАНИЦЫ -$minWidth: 320; -// ШИРИНА ПОЛОТНА -$maxWidth: 1920; -// ВЫСОТА ПОЛОТНА -$maxHeight: 1080; -// РАЗМЕР КОНТЕЙНЕРА -$maxWidthContainer: 100wv; - -$containerPadding: 0; - -// ЦВЕТА -$colorWhite: #fff; -$colorDark: #000; - -// СТАНДАРТНЫЕ НАСТРОЙКИ СТРАНИЦЫ -$colorBg: #161628; -$colorAside: #181c27; -$colorMain: #298ce8; -$colorChat: #1d2436; -$colorError: #ce3f3f; -$colorSuccess: #23b323; -$fontRoboto: "Roboto"; diff --git a/src/assets/style/modules/mixins.js b/src/assets/style/modules/mixins.js deleted file mode 100644 index 9bcbc7c..0000000 --- a/src/assets/style/modules/mixins.js +++ /dev/null @@ -1,100 +0,0 @@ -import vars from './vars'; - -//< " RESPONSIVE VALUE " >=============================================================================================================>// -export function adaptivValue( - $property, - $startSize, - $minSize, - $type, - $direction = null, - $width = null, -) { - const $addSize = $startSize - $minSize; - - if ($direction == 'vertical') { - return `${$property}: calc(${$minSize + 'px'} + ${$addSize} * ((100vh - 640px) / ${vars.$maxHeight - 640}))`; - } else if ($type == 1) { - return ` - ${$property}: ${$startSize + 'px'}; - - @media (max-width: ${($width || vars.$maxWidthContainer) + 'px'}) { - ${$property}: calc(${$minSize + 'px'} + ${$addSize} * ((100vw - 320px) / ${($width || vars.$maxWidthContainer) - 320})); - }`; - } else if ($type == 2) { - /* If there is more container */ - return ` ${$property}: ${$startSize + 'px'}; - - @media (min-width: ${($width || vars.$maxWidthContainer) + 'px'}) { - ${$property}: calc(${$minSize + 'px'} + ${$addSize} * ((100vw - 320px) / ${vars.$maxWidth - 320})); - }`; - } else { - /* Always */ - return `${$property}: calc(${$minSize + 'px'} + ${$addSize} * ((100vw - 320px) / ${vars.$maxWidth - 320}));`; - } -} - -//< " STYLE SCROLLBAR " > -export function scrollbars( - $size = 10, - $foregroundColor = '#999', - $backgroundColor = '#333', - $borderRadius = 0, -) { - // For Chrome & Safari - return ` - &::-webkit-scrollbar { - width: ${$size}px; - height: ${$size}px; - } - &::-webkit-scrollbar-thumb { - background: ${$foregroundColor}; - border-radius: ${$borderRadius}px; - } - &::-webkit-scrollbar-track { - background: ${$backgroundColor}; - } - // Standard version (Firefox only for now) - @-moz-document url-prefix() { - scrollbar-color: ${$foregroundColor} ${$backgroundColor}; - }`; -} - -export function adaptivIndent( - $property, - $startSizeV, - $minSizeV, - $startSizeH, - $minSizeH, - $type, -) { - const $addSizeV = $startSizeV - $minSizeV; - const $addSizeH = $startSizeH - $minSizeH; - - if ($type == 1) { - /* If less than container */ - return ` - ${$property}: ${$startSizeV + 'px'} ${$startSizeH + 'px'}; - - @media (max-width: ${vars.$maxWidthContainer + 'px'}) { - ${$property}: calc(${$minSizeV + 'px'} + ${$addSizeV} * ((100vw - 320px) / ${vars.$maxWidthContainer - 320})) - calc(${$minSizeH + 'px'} + ${$addSizeH} * ((100vw - 320px) / ${vars.$maxWidthContainer - 320})); - } - `; - } else if ($type == 2) { - /* If there is more container */ - return ` - ${$property}: ${$startSizeV + 'px'} ${$startSizeH + 'px'}; - - @media (min-width: ${vars.$maxWidthContainer + 'px'}) { - ${$property}: calc(${$minSizeV + 'px'} + ${$addSizeV} * ((100vw - 320px) / ${vars.$maxWidth - 320})) - calc(${$minSizeH + 'px'} + ${$addSizeH} * ((100vw - 320px) / ${vars.$maxWidth - 320})); - } - `; - } else { - /* Always */ - return ` - ${$property}: calc(${$minSizeV + 'px'} + ${$addSizeV} * ((100vw - 320px) / ${vars.$maxWidth - 320})) - calc(${$minSizeH + 'px'} + ${$addSizeH} * ((100vw - 320px) / ${vars.$maxWidth - 320})); - `; - } -} diff --git a/src/assets/style/modules/vars.js b/src/assets/style/modules/vars.js deleted file mode 100644 index 37f4ff7..0000000 --- a/src/assets/style/modules/vars.js +++ /dev/null @@ -1,20 +0,0 @@ -//< " ПЕРЕМЕННЫЕ " >=============================================================================================================>// - -const vars = { - // ОБЩИЕ НАСТРОЙКИ СТРАНИЦЫ - $minWidth: 320, - // ШИРИНА ПОЛОТНА - $maxWidth: 1920, - // ВЫСОТА ПОЛОТНА - $maxHeight: 1080, - // РАЗМЕР КОНТЕЙНЕРА - $maxWidthContainer: 1920, - - $colorAside: '#181c27', - $colorMain: '#298CE8', - $colorChat: '#1D2436', - $colorError: '#ce3f3f', - $colorSuccess: '#23b323', -}; - -export default vars; diff --git a/src/axios/index.js b/src/axios/index.js deleted file mode 100644 index 1ef888b..0000000 --- a/src/axios/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import axios from 'axios'; - -export default (path, ...args) => axios(path, ...args).then(r => r); diff --git a/src/components/Auth/Form.jsx b/src/components/Auth/Form.jsx deleted file mode 100644 index 8715ec1..0000000 --- a/src/components/Auth/Form.jsx +++ /dev/null @@ -1,223 +0,0 @@ -import styled from '@emotion/styled'; -import * as mixins from '@/assets/style/modules/mixins'; -import googleImg from '@/assets/img/google.svg'; -import Input from '@/components/ui/Input'; -import Button from '@/components/ui/Button'; -import { useState } from 'react'; -import { signIn, signUp, googleAuth } from '@/utils/auth'; -import { useNavigate } from 'react-router-dom'; - -export default function Form() { - const [isLogin, setIsLogin] = useState(true); - const [email, setEmail] = useState(''); - const [password, setPassword] = useState(''); - const [confirmPassword, setConfirmPassword] = useState(''); - const [errors, setErrors] = useState({}); - const navigate = useNavigate(); - - function switchAction(v) { - setIsLogin(v); - reset(); - } - - function reset() { - setEmail(''); - setPassword(''); - setErrors({}); - setConfirmPassword(''); - } - - const disable = !(email.trim() && password.trim()); - - async function login() { - setErrors({}); - - const data = await signIn( - { - email, - password, - }, - () => navigate('/'), - ); - if (data && data.type == 'error') { - setErrors(data.errors); - } - } - - async function register() { - setErrors({}); - - const data = await signUp( - { - email, - password, - confirmPassword, - }, - () => navigate('/'), - ); - - if (data && data.type == 'error') { - setErrors(data.errors); - } - } - - function google() { - googleAuth(() => navigate('/')); - } - - // console.log(errors); - return ( - - - switchAction(true)}>Log in - switchAction(false)}>Sig up - - - Authentication with Google - - - {isLogin ? ( - - setEmail(e.target.value)} - /> - setPassword(e.target.value)} - /> - - - ) : ( - - setEmail(e.target.value)} - /> - setPassword(e.target.value)} - /> - setConfirmPassword(e.target.value)} - /> - - - - )} - - ); -} - -const Body = styled.div` - display: flex; - flex-direction: column; - width: 100%; - max-width: 400px; - ${mixins.adaptivValue('padding', 30, 6, 1)} - background-color:#1d1d38; - border-radius: 10px; -`; - -const Switch = styled.div( - props => ` - display: flex; - align-items: center; - justify-content: space-between; - width: 100%; - padding: 5px; - background-color: #16162b; - border-radius: 5px; - overflow: hidden; - position: relative; - ${mixins.adaptivValue('margin-bottom', 15, 10, 1)} - - &::before { - content: ''; - position: absolute; - z-index: 1; - background: #252544; - width: calc(50% - 10px); - height: calc(100% - 4px * 2); - left: 5px; - top: 4px; - border-radius: 5px; - transition: all 0.3s ease 0s; - ${!props.login && 'left: calc(50% + 5px)'} - } -`, -); - -const SwitchItem = styled.div` - text-align: center; - ${mixins.adaptivValue('font-size', 25, 20, 1)} - position: relative; - z-index: 2; - width: 100%; - cursor: pointer; -`; - -const GoogleAuthButton = styled.button` - align-self: center; - width: 100%; - max-width: 300px; - background: #303055; - border-radius: 10px; - padding: 6px 10px; - display: flex; - align-items: center; - justify-content: center; - column-gap: 20px; - margin-bottom: 10px; - - @media (any-hover: hover) { - & { - cursor: pointer; - transition: all 0.3s ease 0s; - } - &:hover { - transform: translateY(3px); - } - } -`; - -const GoogleText = styled.span` - ${mixins.adaptivValue('font-size', 18, 16, 1)} -`; - -const GoogleAuth = styled.img` - width: 100%; - max-width: 30px; -`; - -const FormStyled = styled.form` - display: flex; - flex-direction: column; - row-gap: 10px; -`; diff --git a/src/components/Chat/Chat.jsx b/src/components/Chat/Chat.jsx deleted file mode 100644 index 4ec47b1..0000000 --- a/src/components/Chat/Chat.jsx +++ /dev/null @@ -1,35 +0,0 @@ -import styled from '@emotion/styled'; -import Header from '@/components/Chat/Header'; -import Field from '@/components/Chat/Field'; -import ListMessages from '@/components/Chat/ListMessages'; -import useChatStore from '@/stores/chat'; - -export default function Chat() { - const { user: userChat } = useChatStore(); - - return ( - - {userChat && ( - <> -
- - - - )} - - ); -} - -const ChatStyled = styled.div` - display: flex; - flex-direction: column; - flex: 1 1 auto; - overflow: hidden; - background: #161628; -`; - -const Messages = styled(ListMessages)` - flex: 1 1 auto; - max-height: 100vh; - overflow: auto; -`; diff --git a/src/components/Chat/Empty.jsx b/src/components/Chat/Empty.jsx deleted file mode 100644 index 4e072bd..0000000 --- a/src/components/Chat/Empty.jsx +++ /dev/null @@ -1,19 +0,0 @@ -import vars from '@/assets/style/modules/vars'; -import styled from '@emotion/styled'; - -export default function Empty() { - return Choose who you would like to write to; -} - -const EmptyStyled = styled.div` - flex: 1 1 auto; - display: flex; - align-items: center; - justify-content: center; - font-size: 25px; - color: ${vars.$colorMain}; - - @media (max-width: 960px) { - display: none; - } -`; diff --git a/src/components/Chat/Field.jsx b/src/components/Chat/Field.jsx deleted file mode 100644 index 8177fba..0000000 --- a/src/components/Chat/Field.jsx +++ /dev/null @@ -1,344 +0,0 @@ -import styled from '@emotion/styled'; -import { css } from '@emotion/react'; -import * as mixins from '@/assets/style/modules/mixins'; -import vars from '@/assets/style/modules/vars'; -import AttachFileOutlinedIcon from '@mui/icons-material/AttachFileOutlined'; -import SentimentSatisfiedOutlinedIcon from '@mui/icons-material/SentimentSatisfiedOutlined'; -// import MicNoneOutlinedIcon from '@mui/icons-material/MicNoneOutlined'; -import { useState, useRef } from 'react'; -import SendOutlinedIcon from '@mui/icons-material/SendOutlined'; -import EmojiPicker from 'emoji-picker-react'; -import { scrollbars } from '@/assets/style/modules/mixins'; -import TextField from '@mui/material/TextField'; -import useChatStore from '@/stores/chat'; -import useUserStore from '@/stores/user'; -import { addData, updateData, getData } from '@/utils/firestore'; -import { uploadFile } from '@/utils/storage'; -import { Timestamp } from 'firebase/firestore'; -import InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile'; -import CloseIcon from '@mui/icons-material/Close'; - -export default function Field() { - const [text, setText] = useState(''); - const [files, setFiles] = useState([]); - const [previewImg, setPreviewImg] = useState(null); - const [emojiOpen, setEmojiOpen] = useState(false); - const { chat, user: chatUser, setChat, scrollDown } = useChatStore(); - const { user } = useUserStore(); - const fileInput = useRef(null); - - function selectEmoji(e) { - setText(text + e.emoji); - } - - function selectFiles(e) { - setFiles(e.target.files); - getImgLink(e.target.files[0]); - } - - function resetFiles() { - fileInput.current.value = ''; - setFiles([]); - } - - function onEnterPress(e) { - if (e.keyCode == 13) { - e.preventDefault(); - - if (e.shiftKey == true) { - setText(text + '\n'); - } else { - send(); - } - } - } - - async function send() { - let id; - - if (!text.trim() && !files.length) { - return; - } - - if (!chat) { - id = ( - await addData(['chats'], { - pair: [user.uid, chatUser.uid], - users: { - [user.uid]: user, - [chatUser.uid]: chatUser, - }, - }) - ).id; - - await updateData(['chats', id], { id }); - setChat(await getData(['chats', id])); - } - - const imageUrls = []; - const urls = []; - if (files.length) { - const filesArray = Array.from(files); - - imageUrls.push( - ...(await uploadFile( - ['chats', chat.id], - filesArray.filter(file => file.type.includes('image')), - )), - ); - - urls.push( - ...(await uploadFile( - ['chats', chat.id], - filesArray.filter(file => !file.type.includes('image')), - )), - ); - } - - setText(''); - setFiles([]); - const message = { - text, - date: Timestamp.fromDate(new Date()), - check: false, - userUid: user.uid, - media: urls, - imgs: imageUrls, - }; - - await updateData(['chats', id || chat.id], { lastMessage: message }); - - await addData(['chats', id || chat.id, 'messages'], message); - - scrollDown(); - } - - function getImgLink(file) { - const fileReader = new FileReader(); - - fileReader.onload = () => { - setPreviewImg(fileReader.result); - }; - - fileReader.readAsDataURL(file); - } - - return ( - - {!!files.length && ( - - - - {files[0].type.includes('image') ? ( - - ) : ( - - - {files[0].name} - - )} - {!!(files.length - 1) && ( - +{files.length - 1} files - )} - - - - - - )} - -
- - - setText(e.target.value)} - placeholder="Input message..." - multiline - maxRows={4} - onKeyDown={onEnterPress} - /> - - setEmojiOpen(false)}> - setEmojiOpen(!emojiOpen)} - onMouseMove={() => setEmojiOpen(true)} - /> - - - - - - - -
- - ); -} - -const Body = styled.div` - display: flex; - flex-direction: column; - row-gap: 10px; - - background: ${vars.$colorChat}; - ${mixins.adaptivIndent('padding', 17, 12, 20, 16, 1)} -`; - -const Top = styled.div` - display: flex; - align-items: center; -`; - -const Main = styled.div` - display: flex; - align-items: flex-end; -`; - -const Icon = css` - ${mixins.adaptivValue('font-size', 30, 25, 1)} - - @media (any-hover:hover) { - & { - cursor: pointer; - transition: all 0.3s ease 0s; - } - &:hover { - color: ${vars.$colorMain}; - } - } -`; - -const Clip = styled(AttachFileOutlinedIcon)` - ${Icon} -`; - -const Emoji = styled(SentimentSatisfiedOutlinedIcon)` - ${Icon} -`; - -// const Mic = styled(MicNoneOutlinedIcon)` -// ${Icon} -// `; - -const Send = styled(SendOutlinedIcon)` - ${Icon} - - &[disabled] { - color: #838383; - pointer-events: none; - } -`; - -const Input = styled(TextField)` - flex: 1 1 auto; - background: transparent; - margin-right: 10px; - margin-left: 10px; - - & .MuiInputBase-root { - padding: 0; - } - - & textarea { - ${mixins.adaptivValue('font-size', 21, 18, 1)} - ${scrollbars(5, vars.$colorMain, '#334881', 5)} - } - - & * { - border: none; - border-color: transparent !important; - } -`; - -const Actions = styled.div` - display: flex; - align-items: center; - column-gap: 10px; -`; - -const EmojiBody = styled.div` - position: relative; -`; - -const EmojiPickerBody = styled.div` - position: absolute; - right: -20px; - bottom: calc(100% - 5px); - padding: 10px; -`; - -const EmojiPickerStyled = styled(EmojiPicker)` - & * { - ${scrollbars(5, vars.$colorMain, '#334881', 5)} - } -`; - -const FileInput = styled.input` - display: none; -`; - -const FilesOutput = styled.div` - display: flex; - align-items: center; - justify-content: space-between; - width: 100%; -`; - -const FilesOutputLeft = styled.div` - display: flex; - align-items: center; - column-gap: 5px; -`; - -const OtherFiles = styled.span` - color: #fff; -`; - -const ImgPreview = styled.img` - width: 50px; - height: 50px; - object-fit: contain; -`; - -const FilePreview = styled.div` - display: flex; - align-items: center; -`; - -const ResetFile = styled(CloseIcon)` - font-size: 30px; - @media (any-hover: hover) { - & { - cursor: pointer; - transition: all 0.3s ease 0s; - } - &:hover { - color: ${vars.$colorMain}; - } - } -`; diff --git a/src/components/Chat/Header.jsx b/src/components/Chat/Header.jsx deleted file mode 100644 index 1efc1e9..0000000 --- a/src/components/Chat/Header.jsx +++ /dev/null @@ -1,112 +0,0 @@ -import { css } from '@emotion/react'; -import styled from '@emotion/styled'; -import vars from '@/assets/style/modules/vars'; -import * as mixins from '@/assets/style/modules/mixins'; -import StartOutlinedIcon from '@mui/icons-material/StartOutlined'; -import Avatar from '@/components/User/Avatar'; -import useChatStore from '@/stores/chat'; -import useUiStore from '@/stores/ui'; -import KeyboardBackspaceIcon from '@mui/icons-material/KeyboardBackspace'; -import { useNavigate } from 'react-router-dom'; - -export default function Header() { - const { user, setChat, setUser } = useChatStore(); - const { userSidebar, setUserSidebar, setSidebar } = useUiStore(); - const navigate = useNavigate(); - - function closeChat() { - setChat(null); - setUser(null); - setSidebar(true); - navigate('/'); - } - - return ( - - - setUserSidebar(!userSidebar)}> - - - {user.displayName} - {/* is only */} - - - setUserSidebar(!userSidebar)} - sx={{ transform: !userSidebar && 'scaleX(-1)' }} - /> - - ); -} - -const Body = styled.div` - user-select: none; - background-color: ${vars.$colorChat}; - display: flex; - align-items: center; - justify-content: space-between; - ${mixins.adaptivIndent('padding', 10, 6, 20, 10, 1)} - column-gap: 10px; -`; - -const User = styled.div` - display: flex; - ${mixins.adaptivValue('column-gap', 20, 5, 1)} - align-items: center; - width: 100%; - overflow: hidden; - @media (any-hover: hover) { - & { - cursor: pointer; - } - } -`; - -const Info = styled.div` - display: flex; - flex-direction: column; - overflow: hidden; -`; - -const Text = css` - ${mixins.adaptivValue('font-size', 18, 16, 1)} -`; - -const Username = styled.span` - ${Text} - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; -`; - -// const Status = styled.span` -// ${Text} -// color: ${vars.$colorMain}; -// `; - -const Icon = styled(StartOutlinedIcon)` - ${mixins.adaptivValue('font-size', 30, 25, 1)} - - @media (any-hover:hover) { - & { - cursor: pointer; - transition: color 0.3s ease 0s; - } - &:hover { - color: ${vars.$colorMain}; - } - } - - @media (max-width: 1140px) { - display: none; - } -`; - -const Back = styled(KeyboardBackspaceIcon)` - display: none; - ${mixins.adaptivValue('font-size', 35, 27, 1, null, 960)} - - @media (max-width: 960px) { - display: block; - } -`; diff --git a/src/components/Chat/ListMessages.jsx b/src/components/Chat/ListMessages.jsx deleted file mode 100644 index c7e57b9..0000000 --- a/src/components/Chat/ListMessages.jsx +++ /dev/null @@ -1,110 +0,0 @@ -import styled from '@emotion/styled'; -import * as mixins from '@/assets/style/modules/mixins'; -import vars from '@/assets/style/modules/vars'; -import { List } from '@mui/material'; -import Message from '@/components/Chat/Message'; -import useChatStore from '@/stores/chat'; -import { useRef, useEffect } from 'react'; -import { getDatas } from '@/utils/firestore'; -import { orderBy, limit, startAfter } from 'firebase/firestore'; - -export default function ListMessages() { - const { - chat, - messages, - setMessages, - chatScroll, - setChatList, - scrollDown, - lastMessageDoc, - setLastMessageDoc, - } = useChatStore(); - const listRef = useRef(); - const isLoad = useRef(false); - - useEffect(() => { - if (listRef.current) { - setChatList(listRef.current); - } - }, [setChatList]); - - useEffect(() => { - if ( - messages.length && - listRef.current.scrollTop + listRef.current.offsetHeight == chatScroll - ) { - scrollDown(); - } - }, [chatScroll, scrollDown, messages.length]); - - useEffect(() => { - const list = listRef.current; - async function scrollLoadHandle(e) { - const y = e.target.scrollTop; - - if (!lastMessageDoc) { - return; - } - - if (y < 150 && !isLoad.current) { - isLoad.current = true; - const { data, last } = await getDatas( - ['chats', chat.id, 'messages'], - { - other: [ - orderBy('date', 'desc'), - limit(30), - startAfter(lastMessageDoc), - ], - }, - { last: true, id: true }, - ); - setMessages([...data.reverse(), ...messages]); - setLastMessageDoc(last); - isLoad.current = false; - } - } - - list.addEventListener('scroll', scrollLoadHandle); - - return () => { - list.removeEventListener('scroll', scrollLoadHandle); - }; - }, [chat, lastMessageDoc, messages, setMessages, setLastMessageDoc]); - - return ( - <> - - {chat && - (() => { - let showAvatar = true; - return messages.map((mess, i) => { - if (messages[i + 1] && mess.userUid == messages[i + 1].userUid) { - showAvatar = false; - } else { - showAvatar = true; - } - - return ( - - ); - }); - })()} - - - ); -} - -const ListStyled = styled(List)` - display: flex; - flex-direction: column; - overflow: auto; - /* justify-content: flex-end; */ - flex: 1 1 auto; - ${mixins.scrollbars(5, vars.$colorMain, '#111')} - ${mixins.adaptivIndent('padding', 19, 15, 15, 5, 1)} -`; diff --git a/src/components/Chat/Message.jsx b/src/components/Chat/Message.jsx deleted file mode 100644 index ca0da78..0000000 --- a/src/components/Chat/Message.jsx +++ /dev/null @@ -1,211 +0,0 @@ -import styled from '@emotion/styled'; -import { ListItem } from '@mui/material'; -import * as mixins from '@/assets/style/modules/mixins'; -import propTypes from 'prop-types'; -import useChatStore from '@/stores/chat'; -import useUserStore from '@/stores/user'; -import Avatar from '@/components/User/Avatar'; -import InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile'; -import { PhotoProvider, PhotoView } from 'react-photo-view'; -import 'react-photo-view/dist/react-photo-view.css'; - -Message.propTypes = { - // children: propTypes.oneOfType([ - // propTypes.string, - // propTypes.element, - // propTypes.number, - // ]), - data: propTypes.object, - showAvatar: propTypes.bool, -}; - -export default function Message({ data, showAvatar = true }) { - const { user: chatUser } = useChatStore(); - const { user } = useUserStore(); - - return ( - - {showAvatar && ( - - )} - - - {data.imgs && ( - - {data.imgs.map(img => { - return ( - - - - ); - })} - - )} - - {data.media && - data.media.map(file => ( - - - - - - {file.split('name')[file.split('name').length - 2]} - - ))} - - {data.text && {data.text}} - - {data.text && showAvatar && ( - - - -