@revisium/admin 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-CmC9MURU.js +1494 -0
- package/dist/index.html +1 -1
- package/package.json +5 -2
- package/dist/assets/index-vp7bw8y4.js +0 -1466
@@ -1,1466 +0,0 @@
|
|
1
|
-
var C6=Object.defineProperty;var E6=(e,t,r)=>t in e?C6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var T6=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Pe=(e,t,r)=>E6(e,typeof t!="symbol"?t+"":t,r);var oxe=T6((hxe,XP)=>{function o0(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var ig=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var JS={exports:{}},Sh={},ZS={exports:{}},zt={};/**
|
2
|
-
* @license React
|
3
|
-
* react.production.min.js
|
4
|
-
*
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
6
|
-
*
|
7
|
-
* This source code is licensed under the MIT license found in the
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
9
|
-
*/var qR;function O6(){if(qR)return zt;qR=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;function m(j){return j===null||typeof j!="object"?null:(j=p&&j[p]||j["@@iterator"],typeof j=="function"?j:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,y={};function w(j,U,q){this.props=j,this.context=U,this.refs=y,this.updater=q||g}w.prototype.isReactComponent={},w.prototype.setState=function(j,U){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,U,"setState")},w.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function _(){}_.prototype=w.prototype;function S(j,U,q){this.props=j,this.context=U,this.refs=y,this.updater=q||g}var C=S.prototype=new _;C.constructor=S,b(C,w.prototype),C.isPureReactComponent=!0;var k=Array.isArray,E=Object.prototype.hasOwnProperty,R={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function A(j,U,q){var $,F={},V=null,de=null;if(U!=null)for($ in U.ref!==void 0&&(de=U.ref),U.key!==void 0&&(V=""+U.key),U)E.call(U,$)&&!T.hasOwnProperty($)&&(F[$]=U[$]);var pe=arguments.length-2;if(pe===1)F.children=q;else if(1<pe){for(var Ee=Array(pe),Me=0;Me<pe;Me++)Ee[Me]=arguments[Me+2];F.children=Ee}if(j&&j.defaultProps)for($ in pe=j.defaultProps,pe)F[$]===void 0&&(F[$]=pe[$]);return{$$typeof:e,type:j,key:V,ref:de,props:F,_owner:R.current}}function M(j,U){return{$$typeof:e,type:j.type,key:U,ref:j.ref,props:j.props,_owner:j._owner}}function B(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function Q(j){var U={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(q){return U[q]})}var se=/\/+/g;function ie(j,U){return typeof j=="object"&&j!==null&&j.key!=null?Q(""+j.key):U.toString(36)}function N(j,U,q,$,F){var V=typeof j;(V==="undefined"||V==="boolean")&&(j=null);var de=!1;if(j===null)de=!0;else switch(V){case"string":case"number":de=!0;break;case"object":switch(j.$$typeof){case e:case t:de=!0}}if(de)return de=j,F=F(de),j=$===""?"."+ie(de,0):$,k(F)?(q="",j!=null&&(q=j.replace(se,"$&/")+"/"),N(F,U,q,"",function(Me){return Me})):F!=null&&(B(F)&&(F=M(F,q+(!F.key||de&&de.key===F.key?"":(""+F.key).replace(se,"$&/")+"/")+j)),U.push(F)),1;if(de=0,$=$===""?".":$+":",k(j))for(var pe=0;pe<j.length;pe++){V=j[pe];var Ee=$+ie(V,pe);de+=N(V,U,q,Ee,F)}else if(Ee=m(j),typeof Ee=="function")for(j=Ee.call(j),pe=0;!(V=j.next()).done;)V=V.value,Ee=$+ie(V,pe++),de+=N(V,U,q,Ee,F);else if(V==="object")throw U=String(j),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return de}function X(j,U,q){if(j==null)return j;var $=[],F=0;return N(j,$,"","",function(V){return U.call(q,V,F++)}),$}function ce(j){if(j._status===-1){var U=j._result;U=U(),U.then(function(q){(j._status===0||j._status===-1)&&(j._status=1,j._result=q)},function(q){(j._status===0||j._status===-1)&&(j._status=2,j._result=q)}),j._status===-1&&(j._status=0,j._result=U)}if(j._status===1)return j._result.default;throw j._result}var ne={current:null},ee={transition:null},ge={ReactCurrentDispatcher:ne,ReactCurrentBatchConfig:ee,ReactCurrentOwner:R};function Z(){throw Error("act(...) is not supported in production builds of React.")}return zt.Children={map:X,forEach:function(j,U,q){X(j,function(){U.apply(this,arguments)},q)},count:function(j){var U=0;return X(j,function(){U++}),U},toArray:function(j){return X(j,function(U){return U})||[]},only:function(j){if(!B(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},zt.Component=w,zt.Fragment=r,zt.Profiler=i,zt.PureComponent=S,zt.StrictMode=n,zt.Suspense=c,zt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ge,zt.act=Z,zt.cloneElement=function(j,U,q){if(j==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var $=b({},j.props),F=j.key,V=j.ref,de=j._owner;if(U!=null){if(U.ref!==void 0&&(V=U.ref,de=R.current),U.key!==void 0&&(F=""+U.key),j.type&&j.type.defaultProps)var pe=j.type.defaultProps;for(Ee in U)E.call(U,Ee)&&!T.hasOwnProperty(Ee)&&($[Ee]=U[Ee]===void 0&&pe!==void 0?pe[Ee]:U[Ee])}var Ee=arguments.length-2;if(Ee===1)$.children=q;else if(1<Ee){pe=Array(Ee);for(var Me=0;Me<Ee;Me++)pe[Me]=arguments[Me+2];$.children=pe}return{$$typeof:e,type:j.type,key:F,ref:V,props:$,_owner:de}},zt.createContext=function(j){return j={$$typeof:a,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},j.Provider={$$typeof:o,_context:j},j.Consumer=j},zt.createElement=A,zt.createFactory=function(j){var U=A.bind(null,j);return U.type=j,U},zt.createRef=function(){return{current:null}},zt.forwardRef=function(j){return{$$typeof:l,render:j}},zt.isValidElement=B,zt.lazy=function(j){return{$$typeof:f,_payload:{_status:-1,_result:j},_init:ce}},zt.memo=function(j,U){return{$$typeof:d,type:j,compare:U===void 0?null:U}},zt.startTransition=function(j){var U=ee.transition;ee.transition={};try{j()}finally{ee.transition=U}},zt.unstable_act=Z,zt.useCallback=function(j,U){return ne.current.useCallback(j,U)},zt.useContext=function(j){return ne.current.useContext(j)},zt.useDebugValue=function(){},zt.useDeferredValue=function(j){return ne.current.useDeferredValue(j)},zt.useEffect=function(j,U){return ne.current.useEffect(j,U)},zt.useId=function(){return ne.current.useId()},zt.useImperativeHandle=function(j,U,q){return ne.current.useImperativeHandle(j,U,q)},zt.useInsertionEffect=function(j,U){return ne.current.useInsertionEffect(j,U)},zt.useLayoutEffect=function(j,U){return ne.current.useLayoutEffect(j,U)},zt.useMemo=function(j,U){return ne.current.useMemo(j,U)},zt.useReducer=function(j,U,q){return ne.current.useReducer(j,U,q)},zt.useRef=function(j){return ne.current.useRef(j)},zt.useState=function(j){return ne.current.useState(j)},zt.useSyncExternalStore=function(j,U,q){return ne.current.useSyncExternalStore(j,U,q)},zt.useTransition=function(){return ne.current.useTransition()},zt.version="18.3.1",zt}var UR;function wm(){return UR||(UR=1,ZS.exports=O6()),ZS.exports}/**
|
10
|
-
* @license React
|
11
|
-
* react-jsx-runtime.production.min.js
|
12
|
-
*
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
14
|
-
*
|
15
|
-
* This source code is licensed under the MIT license found in the
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
17
|
-
*/var HR;function R6(){if(HR)return Sh;HR=1;var e=wm(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(l,c,d){var f,p={},m=null,g=null;d!==void 0&&(m=""+d),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(g=c.ref);for(f in c)n.call(c,f)&&!o.hasOwnProperty(f)&&(p[f]=c[f]);if(l&&l.defaultProps)for(f in c=l.defaultProps,c)p[f]===void 0&&(p[f]=c[f]);return{$$typeof:t,type:l,key:m,ref:g,props:p,_owner:i.current}}return Sh.Fragment=r,Sh.jsx=a,Sh.jsxs=a,Sh}var WR;function I6(){return WR||(WR=1,JS.exports=R6()),JS.exports}var x=I6(),O=wm();const Re=mc(O),ex=o0({__proto__:null,default:Re},[O]);var og={},e1={exports:{}},Ai={},t1={exports:{}},r1={};/**
|
18
|
-
* @license React
|
19
|
-
* scheduler.production.min.js
|
20
|
-
*
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
22
|
-
*
|
23
|
-
* This source code is licensed under the MIT license found in the
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
25
|
-
*/var KR;function k6(){return KR||(KR=1,function(e){function t(ee,ge){var Z=ee.length;ee.push(ge);e:for(;0<Z;){var j=Z-1>>>1,U=ee[j];if(0<i(U,ge))ee[j]=ge,ee[Z]=U,Z=j;else break e}}function r(ee){return ee.length===0?null:ee[0]}function n(ee){if(ee.length===0)return null;var ge=ee[0],Z=ee.pop();if(Z!==ge){ee[0]=Z;e:for(var j=0,U=ee.length,q=U>>>1;j<q;){var $=2*(j+1)-1,F=ee[$],V=$+1,de=ee[V];if(0>i(F,Z))V<U&&0>i(de,F)?(ee[j]=de,ee[V]=Z,j=V):(ee[j]=F,ee[$]=Z,j=$);else if(V<U&&0>i(de,Z))ee[j]=de,ee[V]=Z,j=V;else break e}}return ge}function i(ee,ge){var Z=ee.sortIndex-ge.sortIndex;return Z!==0?Z:ee.id-ge.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],d=[],f=1,p=null,m=3,g=!1,b=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(ee){for(var ge=r(d);ge!==null;){if(ge.callback===null)n(d);else if(ge.startTime<=ee)n(d),ge.sortIndex=ge.expirationTime,t(c,ge);else break;ge=r(d)}}function k(ee){if(y=!1,C(ee),!b)if(r(c)!==null)b=!0,ce(E);else{var ge=r(d);ge!==null&&ne(k,ge.startTime-ee)}}function E(ee,ge){b=!1,y&&(y=!1,_(A),A=-1),g=!0;var Z=m;try{for(C(ge),p=r(c);p!==null&&(!(p.expirationTime>ge)||ee&&!Q());){var j=p.callback;if(typeof j=="function"){p.callback=null,m=p.priorityLevel;var U=j(p.expirationTime<=ge);ge=e.unstable_now(),typeof U=="function"?p.callback=U:p===r(c)&&n(c),C(ge)}else n(c);p=r(c)}if(p!==null)var q=!0;else{var $=r(d);$!==null&&ne(k,$.startTime-ge),q=!1}return q}finally{p=null,m=Z,g=!1}}var R=!1,T=null,A=-1,M=5,B=-1;function Q(){return!(e.unstable_now()-B<M)}function se(){if(T!==null){var ee=e.unstable_now();B=ee;var ge=!0;try{ge=T(!0,ee)}finally{ge?ie():(R=!1,T=null)}}else R=!1}var ie;if(typeof S=="function")ie=function(){S(se)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,X=N.port2;N.port1.onmessage=se,ie=function(){X.postMessage(null)}}else ie=function(){w(se,0)};function ce(ee){T=ee,R||(R=!0,ie())}function ne(ee,ge){A=w(function(){ee(e.unstable_now())},ge)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(ee){ee.callback=null},e.unstable_continueExecution=function(){b||g||(b=!0,ce(E))},e.unstable_forceFrameRate=function(ee){0>ee||125<ee?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<ee?Math.floor(1e3/ee):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(ee){switch(m){case 1:case 2:case 3:var ge=3;break;default:ge=m}var Z=m;m=ge;try{return ee()}finally{m=Z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(ee,ge){switch(ee){case 1:case 2:case 3:case 4:case 5:break;default:ee=3}var Z=m;m=ee;try{return ge()}finally{m=Z}},e.unstable_scheduleCallback=function(ee,ge,Z){var j=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?j+Z:j):Z=j,ee){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=Z+U,ee={id:f++,callback:ge,priorityLevel:ee,startTime:Z,expirationTime:U,sortIndex:-1},Z>j?(ee.sortIndex=Z,t(d,ee),r(c)===null&&ee===r(d)&&(y?(_(A),A=-1):y=!0,ne(k,Z-j))):(ee.sortIndex=U,t(c,ee),b||g||(b=!0,ce(E))),ee},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(ee){var ge=m;return function(){var Z=m;m=ge;try{return ee.apply(this,arguments)}finally{m=Z}}}}(r1)),r1}var GR;function j6(){return GR||(GR=1,t1.exports=k6()),t1.exports}/**
|
26
|
-
* @license React
|
27
|
-
* react-dom.production.min.js
|
28
|
-
*
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
30
|
-
*
|
31
|
-
* This source code is licensed under the MIT license found in the
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
33
|
-
*/var QR;function $6(){if(QR)return Ai;QR=1;var e=wm(),t=j6();function r(s){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+s,h=1;h<arguments.length;h++)u+="&args[]="+encodeURIComponent(arguments[h]);return"Minified React error #"+s+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function o(s,u){a(s,u),a(s+"Capture",u)}function a(s,u){for(i[s]=u,s=0;s<u.length;s++)n.add(u[s])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,d=/^[: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]*$/,f={},p={};function m(s){return c.call(p,s)?!0:c.call(f,s)?!1:d.test(s)?p[s]=!0:(f[s]=!0,!1)}function g(s,u,h,v){if(h!==null&&h.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return v?!1:h!==null?!h.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function b(s,u,h,v){if(u===null||typeof u>"u"||g(s,u,h,v))return!0;if(v)return!1;if(h!==null)switch(h.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function y(s,u,h,v,P,I,D){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=v,this.attributeNamespace=P,this.mustUseProperty=h,this.propertyName=s,this.type=u,this.sanitizeURL=I,this.removeEmptyString=D}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){w[s]=new y(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var u=s[0];w[u]=new y(u,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){w[s]=new y(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){w[s]=new y(s,2,!1,s,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(s){w[s]=new y(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){w[s]=new y(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){w[s]=new y(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){w[s]=new y(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){w[s]=new y(s,5,!1,s.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function S(s){return s[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(s){var u=s.replace(_,S);w[u]=new y(u,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var u=s.replace(_,S);w[u]=new y(u,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var u=s.replace(_,S);w[u]=new y(u,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){w[s]=new y(s,1,!1,s.toLowerCase(),null,!1,!1)}),w.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){w[s]=new y(s,1,!1,s.toLowerCase(),null,!0,!0)});function C(s,u,h,v){var P=w.hasOwnProperty(u)?w[u]:null;(P!==null?P.type!==0:v||!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(b(u,h,P,v)&&(h=null),v||P===null?m(u)&&(h===null?s.removeAttribute(u):s.setAttribute(u,""+h)):P.mustUseProperty?s[P.propertyName]=h===null?P.type===3?!1:"":h:(u=P.attributeName,v=P.attributeNamespace,h===null?s.removeAttribute(u):(P=P.type,h=P===3||P===4&&h===!0?"":""+h,v?s.setAttributeNS(v,u,h):s.setAttribute(u,h))))}var k=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=Symbol.for("react.element"),R=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),B=Symbol.for("react.provider"),Q=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),ie=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),ce=Symbol.for("react.lazy"),ne=Symbol.for("react.offscreen"),ee=Symbol.iterator;function ge(s){return s===null||typeof s!="object"?null:(s=ee&&s[ee]||s["@@iterator"],typeof s=="function"?s:null)}var Z=Object.assign,j;function U(s){if(j===void 0)try{throw Error()}catch(h){var u=h.stack.trim().match(/\n( *(at )?)/);j=u&&u[1]||""}return`
|
34
|
-
`+j+s}var q=!1;function $(s,u){if(!s||q)return"";q=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(Se){var v=Se}Reflect.construct(s,[],u)}else{try{u.call()}catch(Se){v=Se}s.call(u.prototype)}else{try{throw Error()}catch(Se){v=Se}s()}}catch(Se){if(Se&&v&&typeof Se.stack=="string"){for(var P=Se.stack.split(`
|
35
|
-
`),I=v.stack.split(`
|
36
|
-
`),D=P.length-1,W=I.length-1;1<=D&&0<=W&&P[D]!==I[W];)W--;for(;1<=D&&0<=W;D--,W--)if(P[D]!==I[W]){if(D!==1||W!==1)do if(D--,W--,0>W||P[D]!==I[W]){var J=`
|
37
|
-
`+P[D].replace(" at new "," at ");return s.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",s.displayName)),J}while(1<=D&&0<=W);break}}}finally{q=!1,Error.prepareStackTrace=h}return(s=s?s.displayName||s.name:"")?U(s):""}function F(s){switch(s.tag){case 5:return U(s.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return s=$(s.type,!1),s;case 11:return s=$(s.type.render,!1),s;case 1:return s=$(s.type,!0),s;default:return""}}function V(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case T:return"Fragment";case R:return"Portal";case M:return"Profiler";case A:return"StrictMode";case ie:return"Suspense";case N:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case Q:return(s.displayName||"Context")+".Consumer";case B:return(s._context.displayName||"Context")+".Provider";case se:var u=s.render;return s=s.displayName,s||(s=u.displayName||u.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case X:return u=s.displayName||null,u!==null?u:V(s.type)||"Memo";case ce:u=s._payload,s=s._init;try{return V(s(u))}catch{}}return null}function de(s){var u=s.type;switch(s.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=u.render,s=s.displayName||s.name||"",u.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return V(u);case 8:return u===A?"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 u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function pe(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Ee(s){var u=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function Me(s){var u=Ee(s)?"checked":"value",h=Object.getOwnPropertyDescriptor(s.constructor.prototype,u),v=""+s[u];if(!s.hasOwnProperty(u)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var P=h.get,I=h.set;return Object.defineProperty(s,u,{configurable:!0,get:function(){return P.call(this)},set:function(D){v=""+D,I.call(this,D)}}),Object.defineProperty(s,u,{enumerable:h.enumerable}),{getValue:function(){return v},setValue:function(D){v=""+D},stopTracking:function(){s._valueTracker=null,delete s[u]}}}}function Y(s){s._valueTracker||(s._valueTracker=Me(s))}function K(s){if(!s)return!1;var u=s._valueTracker;if(!u)return!0;var h=u.getValue(),v="";return s&&(v=Ee(s)?s.checked?"true":"false":s.value),s=v,s!==h?(u.setValue(s),!0):!1}function we(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Te(s,u){var h=u.checked;return Z({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:h??s._wrapperState.initialChecked})}function he(s,u){var h=u.defaultValue==null?"":u.defaultValue,v=u.checked!=null?u.checked:u.defaultChecked;h=pe(u.value!=null?u.value:h),s._wrapperState={initialChecked:v,initialValue:h,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function Ce(s,u){u=u.checked,u!=null&&C(s,"checked",u,!1)}function Ge(s,u){Ce(s,u);var h=pe(u.value),v=u.type;if(h!=null)v==="number"?(h===0&&s.value===""||s.value!=h)&&(s.value=""+h):s.value!==""+h&&(s.value=""+h);else if(v==="submit"||v==="reset"){s.removeAttribute("value");return}u.hasOwnProperty("value")?Kt(s,u.type,h):u.hasOwnProperty("defaultValue")&&Kt(s,u.type,pe(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(s.defaultChecked=!!u.defaultChecked)}function $t(s,u,h){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var v=u.type;if(!(v!=="submit"&&v!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+s._wrapperState.initialValue,h||u===s.value||(s.value=u),s.defaultValue=u}h=s.name,h!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,h!==""&&(s.name=h)}function Kt(s,u,h){(u!=="number"||we(s.ownerDocument)!==s)&&(h==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+h&&(s.defaultValue=""+h))}var It=Array.isArray;function jt(s,u,h,v){if(s=s.options,u){u={};for(var P=0;P<h.length;P++)u["$"+h[P]]=!0;for(h=0;h<s.length;h++)P=u.hasOwnProperty("$"+s[h].value),s[h].selected!==P&&(s[h].selected=P),P&&v&&(s[h].defaultSelected=!0)}else{for(h=""+pe(h),u=null,P=0;P<s.length;P++){if(s[P].value===h){s[P].selected=!0,v&&(s[P].defaultSelected=!0);return}u!==null||s[P].disabled||(u=s[P])}u!==null&&(u.selected=!0)}}function Lt(s,u){if(u.dangerouslySetInnerHTML!=null)throw Error(r(91));return Z({},u,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function ht(s,u){var h=u.value;if(h==null){if(h=u.children,u=u.defaultValue,h!=null){if(u!=null)throw Error(r(92));if(It(h)){if(1<h.length)throw Error(r(93));h=h[0]}u=h}u==null&&(u=""),h=u}s._wrapperState={initialValue:pe(h)}}function on(s,u){var h=pe(u.value),v=pe(u.defaultValue);h!=null&&(h=""+h,h!==s.value&&(s.value=h),u.defaultValue==null&&s.defaultValue!==h&&(s.defaultValue=h)),v!=null&&(s.defaultValue=""+v)}function mn(s){var u=s.textContent;u===s._wrapperState.initialValue&&u!==""&&u!==null&&(s.value=u)}function Ir(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Jr(s,u){return s==null||s==="http://www.w3.org/1999/xhtml"?Ir(u):s==="http://www.w3.org/2000/svg"&&u==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var vn,Nr=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(u,h,v,P){MSApp.execUnsafeLocalFunction(function(){return s(u,h,v,P)})}:s}(function(s,u){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=u;else{for(vn=vn||document.createElement("div"),vn.innerHTML="<svg>"+u.valueOf().toString()+"</svg>",u=vn.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;u.firstChild;)s.appendChild(u.firstChild)}});function an(s,u){if(u){var h=s.firstChild;if(h&&h===s.lastChild&&h.nodeType===3){h.nodeValue=u;return}}s.textContent=u}var sn={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},_a=["Webkit","ms","Moz","O"];Object.keys(sn).forEach(function(s){_a.forEach(function(u){u=u+s.charAt(0).toUpperCase()+s.substring(1),sn[u]=sn[s]})});function Yi(s,u,h){return u==null||typeof u=="boolean"||u===""?"":h||typeof u!="number"||u===0||sn.hasOwnProperty(s)&&sn[s]?(""+u).trim():u+"px"}function xa(s,u){s=s.style;for(var h in u)if(u.hasOwnProperty(h)){var v=h.indexOf("--")===0,P=Yi(h,u[h],v);h==="float"&&(h="cssFloat"),v?s.setProperty(h,P):s[h]=P}}var Xi=Z({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 Oi(s,u){if(u){if(Xi[s]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(r(137,s));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(r(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(r(61))}if(u.style!=null&&typeof u.style!="object")throw Error(r(62))}}function gn(s,u){if(s.indexOf("-")===-1)return typeof u.is=="string";switch(s){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 Wo=null;function Ko(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Pa=null,qn=null,vo=null;function pi(s){if(s=ah(s)){if(typeof Pa!="function")throw Error(r(280));var u=s.stateNode;u&&(u=bv(u),Pa(s.stateNode,s.type,u))}}function Ji(s){qn?vo?vo.push(s):vo=[s]:qn=s}function le(){if(qn){var s=qn,u=vo;if(vo=qn=null,pi(s),u)for(s=0;s<u.length;s++)pi(u[s])}}function ye(s,u){return s(u)}function xe(){}var $e=!1;function Be(s,u,h){if($e)return s(u,h);$e=!0;try{return ye(s,u,h)}finally{$e=!1,(qn!==null||vo!==null)&&(xe(),le())}}function pt(s,u){var h=s.stateNode;if(h===null)return null;var v=bv(h);if(v===null)return null;h=v[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(s=s.type,v=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!v;break e;default:s=!1}if(s)return null;if(h&&typeof h!="function")throw Error(r(231,u,typeof h));return h}var tt=!1;if(l)try{var Ue={};Object.defineProperty(Ue,"passive",{get:function(){tt=!0}}),window.addEventListener("test",Ue,Ue),window.removeEventListener("test",Ue,Ue)}catch{tt=!1}function xt(s,u,h,v,P,I,D,W,J){var Se=Array.prototype.slice.call(arguments,3);try{u.apply(h,Se)}catch(ke){this.onError(ke)}}var H=!1,L=null,G=!1,te=null,ue={onError:function(s){H=!0,L=s}};function ze(s,u,h,v,P,I,D,W,J){H=!1,L=null,xt.apply(ue,arguments)}function Ye(s,u,h,v,P,I,D,W,J){if(ze.apply(this,arguments),H){if(H){var Se=L;H=!1,L=null}else throw Error(r(198));G||(G=!0,te=Se)}}function ot(s){var u=s,h=s;if(s.alternate)for(;u.return;)u=u.return;else{s=u;do u=s,(u.flags&4098)!==0&&(h=u.return),s=u.return;while(s)}return u.tag===3?h:null}function Wt(s){if(s.tag===13){var u=s.memoizedState;if(u===null&&(s=s.alternate,s!==null&&(u=s.memoizedState)),u!==null)return u.dehydrated}return null}function nr(s){if(ot(s)!==s)throw Error(r(188))}function Pt(s){var u=s.alternate;if(!u){if(u=ot(s),u===null)throw Error(r(188));return u!==s?null:s}for(var h=s,v=u;;){var P=h.return;if(P===null)break;var I=P.alternate;if(I===null){if(v=P.return,v!==null){h=v;continue}break}if(P.child===I.child){for(I=P.child;I;){if(I===h)return nr(P),s;if(I===v)return nr(P),u;I=I.sibling}throw Error(r(188))}if(h.return!==v.return)h=P,v=I;else{for(var D=!1,W=P.child;W;){if(W===h){D=!0,h=P,v=I;break}if(W===v){D=!0,v=P,h=I;break}W=W.sibling}if(!D){for(W=I.child;W;){if(W===h){D=!0,h=I,v=P;break}if(W===v){D=!0,v=I,h=P;break}W=W.sibling}if(!D)throw Error(r(189))}}if(h.alternate!==v)throw Error(r(190))}if(h.tag!==3)throw Error(r(188));return h.stateNode.current===h?s:u}function At(s){return s=Pt(s),s!==null?cr(s):null}function cr(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var u=cr(s);if(u!==null)return u;s=s.sibling}return null}var ft=t.unstable_scheduleCallback,Gt=t.unstable_cancelCallback,it=t.unstable_shouldYield,Ct=t.unstable_requestPaint,Et=t.unstable_now,ar=t.unstable_getCurrentPriorityLevel,Fr=t.unstable_ImmediatePriority,mi=t.unstable_UserBlockingPriority,ei=t.unstable_NormalPriority,ti=t.unstable_LowPriority,vi=t.unstable_IdlePriority,gi=null,ln=null;function as(s){if(ln&&typeof ln.onCommitFiberRoot=="function")try{ln.onCommitFiberRoot(gi,s,void 0,(s.current.flags&128)===128)}catch{}}var ri=Math.clz32?Math.clz32:Xs,jc=Math.log,Ys=Math.LN2;function Xs(s){return s>>>=0,s===0?32:31-(jc(s)/Ys|0)|0}var Go=64,ss=4194304;function Ca(s){switch(s&-s){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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function go(s,u){var h=s.pendingLanes;if(h===0)return 0;var v=0,P=s.suspendedLanes,I=s.pingedLanes,D=h&268435455;if(D!==0){var W=D&~P;W!==0?v=Ca(W):(I&=D,I!==0&&(v=Ca(I)))}else D=h&~P,D!==0?v=Ca(D):I!==0&&(v=Ca(I));if(v===0)return 0;if(u!==0&&u!==v&&(u&P)===0&&(P=v&-v,I=u&-u,P>=I||P===16&&(I&4194240)!==0))return u;if((v&4)!==0&&(v|=h&16),u=s.entangledLanes,u!==0)for(s=s.entanglements,u&=v;0<u;)h=31-ri(u),P=1<<h,v|=s[h],u&=~P;return v}function $c(s,u){switch(s){case 1:case 2:case 4:return u+250;case 8:case 16:case 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 u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function zf(s,u){for(var h=s.suspendedLanes,v=s.pingedLanes,P=s.expirationTimes,I=s.pendingLanes;0<I;){var D=31-ri(I),W=1<<D,J=P[D];J===-1?((W&h)===0||(W&v)!==0)&&(P[D]=$c(W,u)):J<=u&&(s.expiredLanes|=W),I&=~W}}function qf(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function ov(){var s=Go;return Go<<=1,(Go&4194240)===0&&(Go=64),s}function Ac(s){for(var u=[],h=0;31>h;h++)u.push(s);return u}function du(s,u,h){s.pendingLanes|=u,u!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,u=31-ri(u),s[u]=h}function Pw(s,u){var h=s.pendingLanes&~u;s.pendingLanes=u,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=u,s.mutableReadLanes&=u,s.entangledLanes&=u,u=s.entanglements;var v=s.eventTimes;for(s=s.expirationTimes;0<h;){var P=31-ri(h),I=1<<P;u[P]=0,v[P]=-1,s[P]=-1,h&=~I}}function Uf(s,u){var h=s.entangledLanes|=u;for(s=s.entanglements;h;){var v=31-ri(h),P=1<<v;P&u|s[v]&u&&(s[v]|=u),h&=~P}}var sr=0;function av(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var sv,Hf,Dc,lv,uv,Wf=!1,ls=[],yo=null,bo=null,wo=null,fu=new Map,Js=new Map,So=[],cv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ea(s,u){switch(s){case"focusin":case"focusout":yo=null;break;case"dragenter":case"dragleave":bo=null;break;case"mouseover":case"mouseout":wo=null;break;case"pointerover":case"pointerout":fu.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":Js.delete(u.pointerId)}}function Qo(s,u,h,v,P,I){return s===null||s.nativeEvent!==I?(s={blockedOn:u,domEventName:h,eventSystemFlags:v,nativeEvent:I,targetContainers:[P]},u!==null&&(u=ah(u),u!==null&&Hf(u)),s):(s.eventSystemFlags|=v,u=s.targetContainers,P!==null&&u.indexOf(P)===-1&&u.push(P),s)}function Cw(s,u,h,v,P){switch(u){case"focusin":return yo=Qo(yo,s,u,h,v,P),!0;case"dragenter":return bo=Qo(bo,s,u,h,v,P),!0;case"mouseover":return wo=Qo(wo,s,u,h,v,P),!0;case"pointerover":var I=P.pointerId;return fu.set(I,Qo(fu.get(I)||null,s,u,h,v,P)),!0;case"gotpointercapture":return I=P.pointerId,Js.set(I,Qo(Js.get(I)||null,s,u,h,v,P)),!0}return!1}function Kf(s){var u=pu(s.target);if(u!==null){var h=ot(u);if(h!==null){if(u=h.tag,u===13){if(u=Wt(h),u!==null){s.blockedOn=u,uv(s.priority,function(){Dc(h)});return}}else if(u===3&&h.stateNode.current.memoizedState.isDehydrated){s.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Mc(s){if(s.blockedOn!==null)return!1;for(var u=s.targetContainers;0<u.length;){var h=dr(s.domEventName,s.eventSystemFlags,u[0],s.nativeEvent);if(h===null){h=s.nativeEvent;var v=new h.constructor(h.type,h);Wo=v,h.target.dispatchEvent(v),Wo=null}else return u=ah(h),u!==null&&Hf(u),s.blockedOn=h,!1;u.shift()}return!0}function Gf(s,u,h){Mc(s)&&h.delete(u)}function Ew(){Wf=!1,yo!==null&&Mc(yo)&&(yo=null),bo!==null&&Mc(bo)&&(bo=null),wo!==null&&Mc(wo)&&(wo=null),fu.forEach(Gf),Js.forEach(Gf)}function hu(s,u){s.blockedOn===u&&(s.blockedOn=null,Wf||(Wf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ew)))}function Zs(s){function u(P){return hu(P,s)}if(0<ls.length){hu(ls[0],s);for(var h=1;h<ls.length;h++){var v=ls[h];v.blockedOn===s&&(v.blockedOn=null)}}for(yo!==null&&hu(yo,s),bo!==null&&hu(bo,s),wo!==null&&hu(wo,s),fu.forEach(u),Js.forEach(u),h=0;h<So.length;h++)v=So[h],v.blockedOn===s&&(v.blockedOn=null);for(;0<So.length&&(h=So[0],h.blockedOn===null);)Kf(h),h.blockedOn===null&&So.shift()}var el=k.ReactCurrentBatchConfig,z=!0;function oe(s,u,h,v){var P=sr,I=el.transition;el.transition=null;try{sr=1,We(s,u,h,v)}finally{sr=P,el.transition=I}}function _e(s,u,h,v){var P=sr,I=el.transition;el.transition=null;try{sr=4,We(s,u,h,v)}finally{sr=P,el.transition=I}}function We(s,u,h,v){if(z){var P=dr(s,u,h,v);if(P===null)zw(s,u,v,Bt,h),Ea(s,v);else if(Cw(P,s,u,h,v))v.stopPropagation();else if(Ea(s,v),u&4&&-1<cv.indexOf(s)){for(;P!==null;){var I=ah(P);if(I!==null&&sv(I),I=dr(s,u,h,v),I===null&&zw(s,u,v,Bt,h),I===P)break;P=I}P!==null&&v.stopPropagation()}else zw(s,u,v,null,h)}}var Bt=null;function dr(s,u,h,v){if(Bt=null,s=Ko(v),s=pu(s),s!==null)if(u=ot(s),u===null)s=null;else if(h=u.tag,h===13){if(s=Wt(u),s!==null)return s;s=null}else if(h===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;s=null}else u!==s&&(s=null);return Bt=s,null}function kr(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ar()){case Fr:return 1;case mi:return 4;case ei:case ti:return 16;case vi:return 536870912;default:return 16}default:return 16}}var Mt=null,Tr=null,ni=null;function ii(){if(ni)return ni;var s,u=Tr,h=u.length,v,P="value"in Mt?Mt.value:Mt.textContent,I=P.length;for(s=0;s<h&&u[s]===P[s];s++);var D=h-s;for(v=1;v<=D&&u[h-v]===P[I-v];v++);return ni=P.slice(s,1<v?1-v:void 0)}function Ta(s){var u=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&u===13&&(s=13)):s=u,s===10&&(s=13),32<=s||s===13?s:0}function tl(){return!0}function Nc(){return!1}function oi(s){function u(h,v,P,I,D){this._reactName=h,this._targetInst=P,this.type=v,this.nativeEvent=I,this.target=D,this.currentTarget=null;for(var W in s)s.hasOwnProperty(W)&&(h=s[W],this[W]=h?h(I):I[W]);return this.isDefaultPrevented=(I.defaultPrevented!=null?I.defaultPrevented:I.returnValue===!1)?tl:Nc,this.isPropagationStopped=Nc,this}return Z(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=tl)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=tl)},persist:function(){},isPersistent:tl}),u}var Fc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tw=oi(Fc),Qf=Z({},Fc,{view:0,detail:0}),J3=oi(Qf),Ow,Rw,Yf,dv=Z({},Qf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kw,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Yf&&(Yf&&s.type==="mousemove"?(Ow=s.screenX-Yf.screenX,Rw=s.screenY-Yf.screenY):Rw=Ow=0,Yf=s),Ow)},movementY:function(s){return"movementY"in s?s.movementY:Rw}}),jT=oi(dv),Z3=Z({},dv,{dataTransfer:0}),ez=oi(Z3),tz=Z({},Qf,{relatedTarget:0}),Iw=oi(tz),rz=Z({},Fc,{animationName:0,elapsedTime:0,pseudoElement:0}),nz=oi(rz),iz=Z({},Fc,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),oz=oi(iz),az=Z({},Fc,{data:0}),$T=oi(az),sz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lz={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},uz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cz(s){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(s):(s=uz[s])?!!u[s]:!1}function kw(){return cz}var dz=Z({},Qf,{key:function(s){if(s.key){var u=sz[s.key]||s.key;if(u!=="Unidentified")return u}return s.type==="keypress"?(s=Ta(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?lz[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kw,charCode:function(s){return s.type==="keypress"?Ta(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Ta(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),fz=oi(dz),hz=Z({},dv,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),AT=oi(hz),pz=Z({},Qf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kw}),mz=oi(pz),vz=Z({},Fc,{propertyName:0,elapsedTime:0,pseudoElement:0}),gz=oi(vz),yz=Z({},dv,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),bz=oi(yz),wz=[9,13,27,32],jw=l&&"CompositionEvent"in window,Xf=null;l&&"documentMode"in document&&(Xf=document.documentMode);var Sz=l&&"TextEvent"in window&&!Xf,DT=l&&(!jw||Xf&&8<Xf&&11>=Xf),MT=" ",NT=!1;function FT(s,u){switch(s){case"keyup":return wz.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function LT(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Lc=!1;function _z(s,u){switch(s){case"compositionend":return LT(u);case"keypress":return u.which!==32?null:(NT=!0,MT);case"textInput":return s=u.data,s===MT&&NT?null:s;default:return null}}function xz(s,u){if(Lc)return s==="compositionend"||!jw&&FT(s,u)?(s=ii(),ni=Tr=Mt=null,Lc=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return DT&&u.locale!=="ko"?null:u.data;default:return null}}var Pz={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function BT(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u==="input"?!!Pz[s.type]:u==="textarea"}function VT(s,u,h,v){Ji(v),u=vv(u,"onChange"),0<u.length&&(h=new Tw("onChange","change",null,h,v),s.push({event:h,listeners:u}))}var Jf=null,Zf=null;function Cz(s){oO(s,0)}function fv(s){var u=Uc(s);if(K(u))return s}function Ez(s,u){if(s==="change")return u}var zT=!1;if(l){var $w;if(l){var Aw="oninput"in document;if(!Aw){var qT=document.createElement("div");qT.setAttribute("oninput","return;"),Aw=typeof qT.oninput=="function"}$w=Aw}else $w=!1;zT=$w&&(!document.documentMode||9<document.documentMode)}function UT(){Jf&&(Jf.detachEvent("onpropertychange",HT),Zf=Jf=null)}function HT(s){if(s.propertyName==="value"&&fv(Zf)){var u=[];VT(u,Zf,s,Ko(s)),Be(Cz,u)}}function Tz(s,u,h){s==="focusin"?(UT(),Jf=u,Zf=h,Jf.attachEvent("onpropertychange",HT)):s==="focusout"&&UT()}function Oz(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return fv(Zf)}function Rz(s,u){if(s==="click")return fv(u)}function Iz(s,u){if(s==="input"||s==="change")return fv(u)}function kz(s,u){return s===u&&(s!==0||1/s===1/u)||s!==s&&u!==u}var Yo=typeof Object.is=="function"?Object.is:kz;function eh(s,u){if(Yo(s,u))return!0;if(typeof s!="object"||s===null||typeof u!="object"||u===null)return!1;var h=Object.keys(s),v=Object.keys(u);if(h.length!==v.length)return!1;for(v=0;v<h.length;v++){var P=h[v];if(!c.call(u,P)||!Yo(s[P],u[P]))return!1}return!0}function WT(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function KT(s,u){var h=WT(s);s=0;for(var v;h;){if(h.nodeType===3){if(v=s+h.textContent.length,s<=u&&v>=u)return{node:h,offset:u-s};s=v}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=WT(h)}}function GT(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?GT(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function QT(){for(var s=window,u=we();u instanceof s.HTMLIFrameElement;){try{var h=typeof u.contentWindow.location.href=="string"}catch{h=!1}if(h)s=u.contentWindow;else break;u=we(s.document)}return u}function Dw(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}function jz(s){var u=QT(),h=s.focusedElem,v=s.selectionRange;if(u!==h&&h&&h.ownerDocument&>(h.ownerDocument.documentElement,h)){if(v!==null&&Dw(h)){if(u=v.start,s=v.end,s===void 0&&(s=u),"selectionStart"in h)h.selectionStart=u,h.selectionEnd=Math.min(s,h.value.length);else if(s=(u=h.ownerDocument||document)&&u.defaultView||window,s.getSelection){s=s.getSelection();var P=h.textContent.length,I=Math.min(v.start,P);v=v.end===void 0?I:Math.min(v.end,P),!s.extend&&I>v&&(P=v,v=I,I=P),P=KT(h,I);var D=KT(h,v);P&&D&&(s.rangeCount!==1||s.anchorNode!==P.node||s.anchorOffset!==P.offset||s.focusNode!==D.node||s.focusOffset!==D.offset)&&(u=u.createRange(),u.setStart(P.node,P.offset),s.removeAllRanges(),I>v?(s.addRange(u),s.extend(D.node,D.offset)):(u.setEnd(D.node,D.offset),s.addRange(u)))}}for(u=[],s=h;s=s.parentNode;)s.nodeType===1&&u.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<u.length;h++)s=u[h],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var $z=l&&"documentMode"in document&&11>=document.documentMode,Bc=null,Mw=null,th=null,Nw=!1;function YT(s,u,h){var v=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;Nw||Bc==null||Bc!==we(v)||(v=Bc,"selectionStart"in v&&Dw(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),th&&eh(th,v)||(th=v,v=vv(Mw,"onSelect"),0<v.length&&(u=new Tw("onSelect","select",null,u,h),s.push({event:u,listeners:v}),u.target=Bc)))}function hv(s,u){var h={};return h[s.toLowerCase()]=u.toLowerCase(),h["Webkit"+s]="webkit"+u,h["Moz"+s]="moz"+u,h}var Vc={animationend:hv("Animation","AnimationEnd"),animationiteration:hv("Animation","AnimationIteration"),animationstart:hv("Animation","AnimationStart"),transitionend:hv("Transition","TransitionEnd")},Fw={},XT={};l&&(XT=document.createElement("div").style,"AnimationEvent"in window||(delete Vc.animationend.animation,delete Vc.animationiteration.animation,delete Vc.animationstart.animation),"TransitionEvent"in window||delete Vc.transitionend.transition);function pv(s){if(Fw[s])return Fw[s];if(!Vc[s])return s;var u=Vc[s],h;for(h in u)if(u.hasOwnProperty(h)&&h in XT)return Fw[s]=u[h];return s}var JT=pv("animationend"),ZT=pv("animationiteration"),eO=pv("animationstart"),tO=pv("transitionend"),rO=new Map,nO="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function rl(s,u){rO.set(s,u),o(u,[s])}for(var Lw=0;Lw<nO.length;Lw++){var Bw=nO[Lw],Az=Bw.toLowerCase(),Dz=Bw[0].toUpperCase()+Bw.slice(1);rl(Az,"on"+Dz)}rl(JT,"onAnimationEnd"),rl(ZT,"onAnimationIteration"),rl(eO,"onAnimationStart"),rl("dblclick","onDoubleClick"),rl("focusin","onFocus"),rl("focusout","onBlur"),rl(tO,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rh="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Mz=new Set("cancel close invalid load scroll toggle".split(" ").concat(rh));function iO(s,u,h){var v=s.type||"unknown-event";s.currentTarget=h,Ye(v,u,void 0,s),s.currentTarget=null}function oO(s,u){u=(u&4)!==0;for(var h=0;h<s.length;h++){var v=s[h],P=v.event;v=v.listeners;e:{var I=void 0;if(u)for(var D=v.length-1;0<=D;D--){var W=v[D],J=W.instance,Se=W.currentTarget;if(W=W.listener,J!==I&&P.isPropagationStopped())break e;iO(P,W,Se),I=J}else for(D=0;D<v.length;D++){if(W=v[D],J=W.instance,Se=W.currentTarget,W=W.listener,J!==I&&P.isPropagationStopped())break e;iO(P,W,Se),I=J}}}if(G)throw s=te,G=!1,te=null,s}function Lr(s,u){var h=u[Gw];h===void 0&&(h=u[Gw]=new Set);var v=s+"__bubble";h.has(v)||(aO(u,s,2,!1),h.add(v))}function Vw(s,u,h){var v=0;u&&(v|=4),aO(h,s,v,u)}var mv="_reactListening"+Math.random().toString(36).slice(2);function nh(s){if(!s[mv]){s[mv]=!0,n.forEach(function(h){h!=="selectionchange"&&(Mz.has(h)||Vw(h,!1,s),Vw(h,!0,s))});var u=s.nodeType===9?s:s.ownerDocument;u===null||u[mv]||(u[mv]=!0,Vw("selectionchange",!1,u))}}function aO(s,u,h,v){switch(kr(u)){case 1:var P=oe;break;case 4:P=_e;break;default:P=We}h=P.bind(null,u,h,s),P=void 0,!tt||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(P=!0),v?P!==void 0?s.addEventListener(u,h,{capture:!0,passive:P}):s.addEventListener(u,h,!0):P!==void 0?s.addEventListener(u,h,{passive:P}):s.addEventListener(u,h,!1)}function zw(s,u,h,v,P){var I=v;if((u&1)===0&&(u&2)===0&&v!==null)e:for(;;){if(v===null)return;var D=v.tag;if(D===3||D===4){var W=v.stateNode.containerInfo;if(W===P||W.nodeType===8&&W.parentNode===P)break;if(D===4)for(D=v.return;D!==null;){var J=D.tag;if((J===3||J===4)&&(J=D.stateNode.containerInfo,J===P||J.nodeType===8&&J.parentNode===P))return;D=D.return}for(;W!==null;){if(D=pu(W),D===null)return;if(J=D.tag,J===5||J===6){v=I=D;continue e}W=W.parentNode}}v=v.return}Be(function(){var Se=I,ke=Ko(h),Ae=[];e:{var Ie=rO.get(s);if(Ie!==void 0){var He=Tw,Xe=s;switch(s){case"keypress":if(Ta(h)===0)break e;case"keydown":case"keyup":He=fz;break;case"focusin":Xe="focus",He=Iw;break;case"focusout":Xe="blur",He=Iw;break;case"beforeblur":case"afterblur":He=Iw;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":He=jT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":He=ez;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":He=mz;break;case JT:case ZT:case eO:He=nz;break;case tO:He=gz;break;case"scroll":He=J3;break;case"wheel":He=bz;break;case"copy":case"cut":case"paste":He=oz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":He=AT}var et=(u&4)!==0,yn=!et&&s==="scroll",fe=et?Ie!==null?Ie+"Capture":null:Ie;et=[];for(var re=Se,me;re!==null;){me=re;var Fe=me.stateNode;if(me.tag===5&&Fe!==null&&(me=Fe,fe!==null&&(Fe=pt(re,fe),Fe!=null&&et.push(ih(re,Fe,me)))),yn)break;re=re.return}0<et.length&&(Ie=new He(Ie,Xe,null,h,ke),Ae.push({event:Ie,listeners:et}))}}if((u&7)===0){e:{if(Ie=s==="mouseover"||s==="pointerover",He=s==="mouseout"||s==="pointerout",Ie&&h!==Wo&&(Xe=h.relatedTarget||h.fromElement)&&(pu(Xe)||Xe[us]))break e;if((He||Ie)&&(Ie=ke.window===ke?ke:(Ie=ke.ownerDocument)?Ie.defaultView||Ie.parentWindow:window,He?(Xe=h.relatedTarget||h.toElement,He=Se,Xe=Xe?pu(Xe):null,Xe!==null&&(yn=ot(Xe),Xe!==yn||Xe.tag!==5&&Xe.tag!==6)&&(Xe=null)):(He=null,Xe=Se),He!==Xe)){if(et=jT,Fe="onMouseLeave",fe="onMouseEnter",re="mouse",(s==="pointerout"||s==="pointerover")&&(et=AT,Fe="onPointerLeave",fe="onPointerEnter",re="pointer"),yn=He==null?Ie:Uc(He),me=Xe==null?Ie:Uc(Xe),Ie=new et(Fe,re+"leave",He,h,ke),Ie.target=yn,Ie.relatedTarget=me,Fe=null,pu(ke)===Se&&(et=new et(fe,re+"enter",Xe,h,ke),et.target=me,et.relatedTarget=yn,Fe=et),yn=Fe,He&&Xe)t:{for(et=He,fe=Xe,re=0,me=et;me;me=zc(me))re++;for(me=0,Fe=fe;Fe;Fe=zc(Fe))me++;for(;0<re-me;)et=zc(et),re--;for(;0<me-re;)fe=zc(fe),me--;for(;re--;){if(et===fe||fe!==null&&et===fe.alternate)break t;et=zc(et),fe=zc(fe)}et=null}else et=null;He!==null&&sO(Ae,Ie,He,et,!1),Xe!==null&&yn!==null&&sO(Ae,yn,Xe,et,!0)}}e:{if(Ie=Se?Uc(Se):window,He=Ie.nodeName&&Ie.nodeName.toLowerCase(),He==="select"||He==="input"&&Ie.type==="file")var nt=Ez;else if(BT(Ie))if(zT)nt=Iz;else{nt=Oz;var mt=Tz}else(He=Ie.nodeName)&&He.toLowerCase()==="input"&&(Ie.type==="checkbox"||Ie.type==="radio")&&(nt=Rz);if(nt&&(nt=nt(s,Se))){VT(Ae,nt,h,ke);break e}mt&&mt(s,Ie,Se),s==="focusout"&&(mt=Ie._wrapperState)&&mt.controlled&&Ie.type==="number"&&Kt(Ie,"number",Ie.value)}switch(mt=Se?Uc(Se):window,s){case"focusin":(BT(mt)||mt.contentEditable==="true")&&(Bc=mt,Mw=Se,th=null);break;case"focusout":th=Mw=Bc=null;break;case"mousedown":Nw=!0;break;case"contextmenu":case"mouseup":case"dragend":Nw=!1,YT(Ae,h,ke);break;case"selectionchange":if($z)break;case"keydown":case"keyup":YT(Ae,h,ke)}var vt;if(jw)e:{switch(s){case"compositionstart":var Tt="onCompositionStart";break e;case"compositionend":Tt="onCompositionEnd";break e;case"compositionupdate":Tt="onCompositionUpdate";break e}Tt=void 0}else Lc?FT(s,h)&&(Tt="onCompositionEnd"):s==="keydown"&&h.keyCode===229&&(Tt="onCompositionStart");Tt&&(DT&&h.locale!=="ko"&&(Lc||Tt!=="onCompositionStart"?Tt==="onCompositionEnd"&&Lc&&(vt=ii()):(Mt=ke,Tr="value"in Mt?Mt.value:Mt.textContent,Lc=!0)),mt=vv(Se,Tt),0<mt.length&&(Tt=new $T(Tt,s,null,h,ke),Ae.push({event:Tt,listeners:mt}),vt?Tt.data=vt:(vt=LT(h),vt!==null&&(Tt.data=vt)))),(vt=Sz?_z(s,h):xz(s,h))&&(Se=vv(Se,"onBeforeInput"),0<Se.length&&(ke=new $T("onBeforeInput","beforeinput",null,h,ke),Ae.push({event:ke,listeners:Se}),ke.data=vt))}oO(Ae,u)})}function ih(s,u,h){return{instance:s,listener:u,currentTarget:h}}function vv(s,u){for(var h=u+"Capture",v=[];s!==null;){var P=s,I=P.stateNode;P.tag===5&&I!==null&&(P=I,I=pt(s,h),I!=null&&v.unshift(ih(s,I,P)),I=pt(s,u),I!=null&&v.push(ih(s,I,P))),s=s.return}return v}function zc(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function sO(s,u,h,v,P){for(var I=u._reactName,D=[];h!==null&&h!==v;){var W=h,J=W.alternate,Se=W.stateNode;if(J!==null&&J===v)break;W.tag===5&&Se!==null&&(W=Se,P?(J=pt(h,I),J!=null&&D.unshift(ih(h,J,W))):P||(J=pt(h,I),J!=null&&D.push(ih(h,J,W)))),h=h.return}D.length!==0&&s.push({event:u,listeners:D})}var Nz=/\r\n?/g,Fz=/\u0000|\uFFFD/g;function lO(s){return(typeof s=="string"?s:""+s).replace(Nz,`
|
38
|
-
`).replace(Fz,"")}function gv(s,u,h){if(u=lO(u),lO(s)!==u&&h)throw Error(r(425))}function yv(){}var qw=null,Uw=null;function Hw(s,u){return s==="textarea"||s==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var Ww=typeof setTimeout=="function"?setTimeout:void 0,Lz=typeof clearTimeout=="function"?clearTimeout:void 0,uO=typeof Promise=="function"?Promise:void 0,Bz=typeof queueMicrotask=="function"?queueMicrotask:typeof uO<"u"?function(s){return uO.resolve(null).then(s).catch(Vz)}:Ww;function Vz(s){setTimeout(function(){throw s})}function Kw(s,u){var h=u,v=0;do{var P=h.nextSibling;if(s.removeChild(h),P&&P.nodeType===8)if(h=P.data,h==="/$"){if(v===0){s.removeChild(P),Zs(u);return}v--}else h!=="$"&&h!=="$?"&&h!=="$!"||v++;h=P}while(h);Zs(u)}function nl(s){for(;s!=null;s=s.nextSibling){var u=s.nodeType;if(u===1||u===3)break;if(u===8){if(u=s.data,u==="$"||u==="$!"||u==="$?")break;if(u==="/$")return null}}return s}function cO(s){s=s.previousSibling;for(var u=0;s;){if(s.nodeType===8){var h=s.data;if(h==="$"||h==="$!"||h==="$?"){if(u===0)return s;u--}else h==="/$"&&u++}s=s.previousSibling}return null}var qc=Math.random().toString(36).slice(2),Oa="__reactFiber$"+qc,oh="__reactProps$"+qc,us="__reactContainer$"+qc,Gw="__reactEvents$"+qc,zz="__reactListeners$"+qc,qz="__reactHandles$"+qc;function pu(s){var u=s[Oa];if(u)return u;for(var h=s.parentNode;h;){if(u=h[us]||h[Oa]){if(h=u.alternate,u.child!==null||h!==null&&h.child!==null)for(s=cO(s);s!==null;){if(h=s[Oa])return h;s=cO(s)}return u}s=h,h=s.parentNode}return null}function ah(s){return s=s[Oa]||s[us],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Uc(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(r(33))}function bv(s){return s[oh]||null}var Qw=[],Hc=-1;function il(s){return{current:s}}function Br(s){0>Hc||(s.current=Qw[Hc],Qw[Hc]=null,Hc--)}function $r(s,u){Hc++,Qw[Hc]=s.current,s.current=u}var ol={},ai=il(ol),Ri=il(!1),mu=ol;function Wc(s,u){var h=s.type.contextTypes;if(!h)return ol;var v=s.stateNode;if(v&&v.__reactInternalMemoizedUnmaskedChildContext===u)return v.__reactInternalMemoizedMaskedChildContext;var P={},I;for(I in h)P[I]=u[I];return v&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=u,s.__reactInternalMemoizedMaskedChildContext=P),P}function Ii(s){return s=s.childContextTypes,s!=null}function wv(){Br(Ri),Br(ai)}function dO(s,u,h){if(ai.current!==ol)throw Error(r(168));$r(ai,u),$r(Ri,h)}function fO(s,u,h){var v=s.stateNode;if(u=u.childContextTypes,typeof v.getChildContext!="function")return h;v=v.getChildContext();for(var P in v)if(!(P in u))throw Error(r(108,de(s)||"Unknown",P));return Z({},h,v)}function Sv(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||ol,mu=ai.current,$r(ai,s),$r(Ri,Ri.current),!0}function hO(s,u,h){var v=s.stateNode;if(!v)throw Error(r(169));h?(s=fO(s,u,mu),v.__reactInternalMemoizedMergedChildContext=s,Br(Ri),Br(ai),$r(ai,s)):Br(Ri),$r(Ri,h)}var cs=null,_v=!1,Yw=!1;function pO(s){cs===null?cs=[s]:cs.push(s)}function Uz(s){_v=!0,pO(s)}function al(){if(!Yw&&cs!==null){Yw=!0;var s=0,u=sr;try{var h=cs;for(sr=1;s<h.length;s++){var v=h[s];do v=v(!0);while(v!==null)}cs=null,_v=!1}catch(P){throw cs!==null&&(cs=cs.slice(s+1)),ft(Fr,al),P}finally{sr=u,Yw=!1}}return null}var Kc=[],Gc=0,xv=null,Pv=0,_o=[],xo=0,vu=null,ds=1,fs="";function gu(s,u){Kc[Gc++]=Pv,Kc[Gc++]=xv,xv=s,Pv=u}function mO(s,u,h){_o[xo++]=ds,_o[xo++]=fs,_o[xo++]=vu,vu=s;var v=ds;s=fs;var P=32-ri(v)-1;v&=~(1<<P),h+=1;var I=32-ri(u)+P;if(30<I){var D=P-P%5;I=(v&(1<<D)-1).toString(32),v>>=D,P-=D,ds=1<<32-ri(u)+P|h<<P|v,fs=I+s}else ds=1<<I|h<<P|v,fs=s}function Xw(s){s.return!==null&&(gu(s,1),mO(s,1,0))}function Jw(s){for(;s===xv;)xv=Kc[--Gc],Kc[Gc]=null,Pv=Kc[--Gc],Kc[Gc]=null;for(;s===vu;)vu=_o[--xo],_o[xo]=null,fs=_o[--xo],_o[xo]=null,ds=_o[--xo],_o[xo]=null}var Zi=null,eo=null,Gr=!1,Xo=null;function vO(s,u){var h=To(5,null,null,0);h.elementType="DELETED",h.stateNode=u,h.return=s,u=s.deletions,u===null?(s.deletions=[h],s.flags|=16):u.push(h)}function gO(s,u){switch(s.tag){case 5:var h=s.type;return u=u.nodeType!==1||h.toLowerCase()!==u.nodeName.toLowerCase()?null:u,u!==null?(s.stateNode=u,Zi=s,eo=nl(u.firstChild),!0):!1;case 6:return u=s.pendingProps===""||u.nodeType!==3?null:u,u!==null?(s.stateNode=u,Zi=s,eo=null,!0):!1;case 13:return u=u.nodeType!==8?null:u,u!==null?(h=vu!==null?{id:ds,overflow:fs}:null,s.memoizedState={dehydrated:u,treeContext:h,retryLane:1073741824},h=To(18,null,null,0),h.stateNode=u,h.return=s,s.child=h,Zi=s,eo=null,!0):!1;default:return!1}}function Zw(s){return(s.mode&1)!==0&&(s.flags&128)===0}function eS(s){if(Gr){var u=eo;if(u){var h=u;if(!gO(s,u)){if(Zw(s))throw Error(r(418));u=nl(h.nextSibling);var v=Zi;u&&gO(s,u)?vO(v,h):(s.flags=s.flags&-4097|2,Gr=!1,Zi=s)}}else{if(Zw(s))throw Error(r(418));s.flags=s.flags&-4097|2,Gr=!1,Zi=s}}}function yO(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Zi=s}function Cv(s){if(s!==Zi)return!1;if(!Gr)return yO(s),Gr=!0,!1;var u;if((u=s.tag!==3)&&!(u=s.tag!==5)&&(u=s.type,u=u!=="head"&&u!=="body"&&!Hw(s.type,s.memoizedProps)),u&&(u=eo)){if(Zw(s))throw bO(),Error(r(418));for(;u;)vO(s,u),u=nl(u.nextSibling)}if(yO(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));e:{for(s=s.nextSibling,u=0;s;){if(s.nodeType===8){var h=s.data;if(h==="/$"){if(u===0){eo=nl(s.nextSibling);break e}u--}else h!=="$"&&h!=="$!"&&h!=="$?"||u++}s=s.nextSibling}eo=null}}else eo=Zi?nl(s.stateNode.nextSibling):null;return!0}function bO(){for(var s=eo;s;)s=nl(s.nextSibling)}function Qc(){eo=Zi=null,Gr=!1}function tS(s){Xo===null?Xo=[s]:Xo.push(s)}var Hz=k.ReactCurrentBatchConfig;function sh(s,u,h){if(s=h.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(h._owner){if(h=h._owner,h){if(h.tag!==1)throw Error(r(309));var v=h.stateNode}if(!v)throw Error(r(147,s));var P=v,I=""+s;return u!==null&&u.ref!==null&&typeof u.ref=="function"&&u.ref._stringRef===I?u.ref:(u=function(D){var W=P.refs;D===null?delete W[I]:W[I]=D},u._stringRef=I,u)}if(typeof s!="string")throw Error(r(284));if(!h._owner)throw Error(r(290,s))}return s}function Ev(s,u){throw s=Object.prototype.toString.call(u),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":s))}function wO(s){var u=s._init;return u(s._payload)}function SO(s){function u(fe,re){if(s){var me=fe.deletions;me===null?(fe.deletions=[re],fe.flags|=16):me.push(re)}}function h(fe,re){if(!s)return null;for(;re!==null;)u(fe,re),re=re.sibling;return null}function v(fe,re){for(fe=new Map;re!==null;)re.key!==null?fe.set(re.key,re):fe.set(re.index,re),re=re.sibling;return fe}function P(fe,re){return fe=pl(fe,re),fe.index=0,fe.sibling=null,fe}function I(fe,re,me){return fe.index=me,s?(me=fe.alternate,me!==null?(me=me.index,me<re?(fe.flags|=2,re):me):(fe.flags|=2,re)):(fe.flags|=1048576,re)}function D(fe){return s&&fe.alternate===null&&(fe.flags|=2),fe}function W(fe,re,me,Fe){return re===null||re.tag!==6?(re=WS(me,fe.mode,Fe),re.return=fe,re):(re=P(re,me),re.return=fe,re)}function J(fe,re,me,Fe){var nt=me.type;return nt===T?ke(fe,re,me.props.children,Fe,me.key):re!==null&&(re.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===ce&&wO(nt)===re.type)?(Fe=P(re,me.props),Fe.ref=sh(fe,re,me),Fe.return=fe,Fe):(Fe=Yv(me.type,me.key,me.props,null,fe.mode,Fe),Fe.ref=sh(fe,re,me),Fe.return=fe,Fe)}function Se(fe,re,me,Fe){return re===null||re.tag!==4||re.stateNode.containerInfo!==me.containerInfo||re.stateNode.implementation!==me.implementation?(re=KS(me,fe.mode,Fe),re.return=fe,re):(re=P(re,me.children||[]),re.return=fe,re)}function ke(fe,re,me,Fe,nt){return re===null||re.tag!==7?(re=Cu(me,fe.mode,Fe,nt),re.return=fe,re):(re=P(re,me),re.return=fe,re)}function Ae(fe,re,me){if(typeof re=="string"&&re!==""||typeof re=="number")return re=WS(""+re,fe.mode,me),re.return=fe,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case E:return me=Yv(re.type,re.key,re.props,null,fe.mode,me),me.ref=sh(fe,null,re),me.return=fe,me;case R:return re=KS(re,fe.mode,me),re.return=fe,re;case ce:var Fe=re._init;return Ae(fe,Fe(re._payload),me)}if(It(re)||ge(re))return re=Cu(re,fe.mode,me,null),re.return=fe,re;Ev(fe,re)}return null}function Ie(fe,re,me,Fe){var nt=re!==null?re.key:null;if(typeof me=="string"&&me!==""||typeof me=="number")return nt!==null?null:W(fe,re,""+me,Fe);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case E:return me.key===nt?J(fe,re,me,Fe):null;case R:return me.key===nt?Se(fe,re,me,Fe):null;case ce:return nt=me._init,Ie(fe,re,nt(me._payload),Fe)}if(It(me)||ge(me))return nt!==null?null:ke(fe,re,me,Fe,null);Ev(fe,me)}return null}function He(fe,re,me,Fe,nt){if(typeof Fe=="string"&&Fe!==""||typeof Fe=="number")return fe=fe.get(me)||null,W(re,fe,""+Fe,nt);if(typeof Fe=="object"&&Fe!==null){switch(Fe.$$typeof){case E:return fe=fe.get(Fe.key===null?me:Fe.key)||null,J(re,fe,Fe,nt);case R:return fe=fe.get(Fe.key===null?me:Fe.key)||null,Se(re,fe,Fe,nt);case ce:var mt=Fe._init;return He(fe,re,me,mt(Fe._payload),nt)}if(It(Fe)||ge(Fe))return fe=fe.get(me)||null,ke(re,fe,Fe,nt,null);Ev(re,Fe)}return null}function Xe(fe,re,me,Fe){for(var nt=null,mt=null,vt=re,Tt=re=0,Mn=null;vt!==null&&Tt<me.length;Tt++){vt.index>Tt?(Mn=vt,vt=null):Mn=vt.sibling;var lr=Ie(fe,vt,me[Tt],Fe);if(lr===null){vt===null&&(vt=Mn);break}s&&vt&&lr.alternate===null&&u(fe,vt),re=I(lr,re,Tt),mt===null?nt=lr:mt.sibling=lr,mt=lr,vt=Mn}if(Tt===me.length)return h(fe,vt),Gr&&gu(fe,Tt),nt;if(vt===null){for(;Tt<me.length;Tt++)vt=Ae(fe,me[Tt],Fe),vt!==null&&(re=I(vt,re,Tt),mt===null?nt=vt:mt.sibling=vt,mt=vt);return Gr&&gu(fe,Tt),nt}for(vt=v(fe,vt);Tt<me.length;Tt++)Mn=He(vt,fe,Tt,me[Tt],Fe),Mn!==null&&(s&&Mn.alternate!==null&&vt.delete(Mn.key===null?Tt:Mn.key),re=I(Mn,re,Tt),mt===null?nt=Mn:mt.sibling=Mn,mt=Mn);return s&&vt.forEach(function(ml){return u(fe,ml)}),Gr&&gu(fe,Tt),nt}function et(fe,re,me,Fe){var nt=ge(me);if(typeof nt!="function")throw Error(r(150));if(me=nt.call(me),me==null)throw Error(r(151));for(var mt=nt=null,vt=re,Tt=re=0,Mn=null,lr=me.next();vt!==null&&!lr.done;Tt++,lr=me.next()){vt.index>Tt?(Mn=vt,vt=null):Mn=vt.sibling;var ml=Ie(fe,vt,lr.value,Fe);if(ml===null){vt===null&&(vt=Mn);break}s&&vt&&ml.alternate===null&&u(fe,vt),re=I(ml,re,Tt),mt===null?nt=ml:mt.sibling=ml,mt=ml,vt=Mn}if(lr.done)return h(fe,vt),Gr&&gu(fe,Tt),nt;if(vt===null){for(;!lr.done;Tt++,lr=me.next())lr=Ae(fe,lr.value,Fe),lr!==null&&(re=I(lr,re,Tt),mt===null?nt=lr:mt.sibling=lr,mt=lr);return Gr&&gu(fe,Tt),nt}for(vt=v(fe,vt);!lr.done;Tt++,lr=me.next())lr=He(vt,fe,Tt,lr.value,Fe),lr!==null&&(s&&lr.alternate!==null&&vt.delete(lr.key===null?Tt:lr.key),re=I(lr,re,Tt),mt===null?nt=lr:mt.sibling=lr,mt=lr);return s&&vt.forEach(function(P6){return u(fe,P6)}),Gr&&gu(fe,Tt),nt}function yn(fe,re,me,Fe){if(typeof me=="object"&&me!==null&&me.type===T&&me.key===null&&(me=me.props.children),typeof me=="object"&&me!==null){switch(me.$$typeof){case E:e:{for(var nt=me.key,mt=re;mt!==null;){if(mt.key===nt){if(nt=me.type,nt===T){if(mt.tag===7){h(fe,mt.sibling),re=P(mt,me.props.children),re.return=fe,fe=re;break e}}else if(mt.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===ce&&wO(nt)===mt.type){h(fe,mt.sibling),re=P(mt,me.props),re.ref=sh(fe,mt,me),re.return=fe,fe=re;break e}h(fe,mt);break}else u(fe,mt);mt=mt.sibling}me.type===T?(re=Cu(me.props.children,fe.mode,Fe,me.key),re.return=fe,fe=re):(Fe=Yv(me.type,me.key,me.props,null,fe.mode,Fe),Fe.ref=sh(fe,re,me),Fe.return=fe,fe=Fe)}return D(fe);case R:e:{for(mt=me.key;re!==null;){if(re.key===mt)if(re.tag===4&&re.stateNode.containerInfo===me.containerInfo&&re.stateNode.implementation===me.implementation){h(fe,re.sibling),re=P(re,me.children||[]),re.return=fe,fe=re;break e}else{h(fe,re);break}else u(fe,re);re=re.sibling}re=KS(me,fe.mode,Fe),re.return=fe,fe=re}return D(fe);case ce:return mt=me._init,yn(fe,re,mt(me._payload),Fe)}if(It(me))return Xe(fe,re,me,Fe);if(ge(me))return et(fe,re,me,Fe);Ev(fe,me)}return typeof me=="string"&&me!==""||typeof me=="number"?(me=""+me,re!==null&&re.tag===6?(h(fe,re.sibling),re=P(re,me),re.return=fe,fe=re):(h(fe,re),re=WS(me,fe.mode,Fe),re.return=fe,fe=re),D(fe)):h(fe,re)}return yn}var Yc=SO(!0),_O=SO(!1),Tv=il(null),Ov=null,Xc=null,rS=null;function nS(){rS=Xc=Ov=null}function iS(s){var u=Tv.current;Br(Tv),s._currentValue=u}function oS(s,u,h){for(;s!==null;){var v=s.alternate;if((s.childLanes&u)!==u?(s.childLanes|=u,v!==null&&(v.childLanes|=u)):v!==null&&(v.childLanes&u)!==u&&(v.childLanes|=u),s===h)break;s=s.return}}function Jc(s,u){Ov=s,rS=Xc=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&u)!==0&&(ki=!0),s.firstContext=null)}function Po(s){var u=s._currentValue;if(rS!==s)if(s={context:s,memoizedValue:u,next:null},Xc===null){if(Ov===null)throw Error(r(308));Xc=s,Ov.dependencies={lanes:0,firstContext:s}}else Xc=Xc.next=s;return u}var yu=null;function aS(s){yu===null?yu=[s]:yu.push(s)}function xO(s,u,h,v){var P=u.interleaved;return P===null?(h.next=h,aS(u)):(h.next=P.next,P.next=h),u.interleaved=h,hs(s,v)}function hs(s,u){s.lanes|=u;var h=s.alternate;for(h!==null&&(h.lanes|=u),h=s,s=s.return;s!==null;)s.childLanes|=u,h=s.alternate,h!==null&&(h.childLanes|=u),h=s,s=s.return;return h.tag===3?h.stateNode:null}var sl=!1;function sS(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function PO(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function ps(s,u){return{eventTime:s,lane:u,tag:0,payload:null,callback:null,next:null}}function ll(s,u,h){var v=s.updateQueue;if(v===null)return null;if(v=v.shared,(ir&2)!==0){var P=v.pending;return P===null?u.next=u:(u.next=P.next,P.next=u),v.pending=u,hs(s,h)}return P=v.interleaved,P===null?(u.next=u,aS(v)):(u.next=P.next,P.next=u),v.interleaved=u,hs(s,h)}function Rv(s,u,h){if(u=u.updateQueue,u!==null&&(u=u.shared,(h&4194240)!==0)){var v=u.lanes;v&=s.pendingLanes,h|=v,u.lanes=h,Uf(s,h)}}function CO(s,u){var h=s.updateQueue,v=s.alternate;if(v!==null&&(v=v.updateQueue,h===v)){var P=null,I=null;if(h=h.firstBaseUpdate,h!==null){do{var D={eventTime:h.eventTime,lane:h.lane,tag:h.tag,payload:h.payload,callback:h.callback,next:null};I===null?P=I=D:I=I.next=D,h=h.next}while(h!==null);I===null?P=I=u:I=I.next=u}else P=I=u;h={baseState:v.baseState,firstBaseUpdate:P,lastBaseUpdate:I,shared:v.shared,effects:v.effects},s.updateQueue=h;return}s=h.lastBaseUpdate,s===null?h.firstBaseUpdate=u:s.next=u,h.lastBaseUpdate=u}function Iv(s,u,h,v){var P=s.updateQueue;sl=!1;var I=P.firstBaseUpdate,D=P.lastBaseUpdate,W=P.shared.pending;if(W!==null){P.shared.pending=null;var J=W,Se=J.next;J.next=null,D===null?I=Se:D.next=Se,D=J;var ke=s.alternate;ke!==null&&(ke=ke.updateQueue,W=ke.lastBaseUpdate,W!==D&&(W===null?ke.firstBaseUpdate=Se:W.next=Se,ke.lastBaseUpdate=J))}if(I!==null){var Ae=P.baseState;D=0,ke=Se=J=null,W=I;do{var Ie=W.lane,He=W.eventTime;if((v&Ie)===Ie){ke!==null&&(ke=ke.next={eventTime:He,lane:0,tag:W.tag,payload:W.payload,callback:W.callback,next:null});e:{var Xe=s,et=W;switch(Ie=u,He=h,et.tag){case 1:if(Xe=et.payload,typeof Xe=="function"){Ae=Xe.call(He,Ae,Ie);break e}Ae=Xe;break e;case 3:Xe.flags=Xe.flags&-65537|128;case 0:if(Xe=et.payload,Ie=typeof Xe=="function"?Xe.call(He,Ae,Ie):Xe,Ie==null)break e;Ae=Z({},Ae,Ie);break e;case 2:sl=!0}}W.callback!==null&&W.lane!==0&&(s.flags|=64,Ie=P.effects,Ie===null?P.effects=[W]:Ie.push(W))}else He={eventTime:He,lane:Ie,tag:W.tag,payload:W.payload,callback:W.callback,next:null},ke===null?(Se=ke=He,J=Ae):ke=ke.next=He,D|=Ie;if(W=W.next,W===null){if(W=P.shared.pending,W===null)break;Ie=W,W=Ie.next,Ie.next=null,P.lastBaseUpdate=Ie,P.shared.pending=null}}while(!0);if(ke===null&&(J=Ae),P.baseState=J,P.firstBaseUpdate=Se,P.lastBaseUpdate=ke,u=P.shared.interleaved,u!==null){P=u;do D|=P.lane,P=P.next;while(P!==u)}else I===null&&(P.shared.lanes=0);Su|=D,s.lanes=D,s.memoizedState=Ae}}function EO(s,u,h){if(s=u.effects,u.effects=null,s!==null)for(u=0;u<s.length;u++){var v=s[u],P=v.callback;if(P!==null){if(v.callback=null,v=h,typeof P!="function")throw Error(r(191,P));P.call(v)}}}var lh={},Ra=il(lh),uh=il(lh),ch=il(lh);function bu(s){if(s===lh)throw Error(r(174));return s}function lS(s,u){switch($r(ch,u),$r(uh,s),$r(Ra,lh),s=u.nodeType,s){case 9:case 11:u=(u=u.documentElement)?u.namespaceURI:Jr(null,"");break;default:s=s===8?u.parentNode:u,u=s.namespaceURI||null,s=s.tagName,u=Jr(u,s)}Br(Ra),$r(Ra,u)}function Zc(){Br(Ra),Br(uh),Br(ch)}function TO(s){bu(ch.current);var u=bu(Ra.current),h=Jr(u,s.type);u!==h&&($r(uh,s),$r(Ra,h))}function uS(s){uh.current===s&&(Br(Ra),Br(uh))}var Zr=il(0);function kv(s){for(var u=s;u!==null;){if(u.tag===13){var h=u.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||h.data==="$?"||h.data==="$!"))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var cS=[];function dS(){for(var s=0;s<cS.length;s++)cS[s]._workInProgressVersionPrimary=null;cS.length=0}var jv=k.ReactCurrentDispatcher,fS=k.ReactCurrentBatchConfig,wu=0,en=null,Tn=null,An=null,$v=!1,dh=!1,fh=0,Wz=0;function si(){throw Error(r(321))}function hS(s,u){if(u===null)return!1;for(var h=0;h<u.length&&h<s.length;h++)if(!Yo(s[h],u[h]))return!1;return!0}function pS(s,u,h,v,P,I){if(wu=I,en=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,jv.current=s===null||s.memoizedState===null?Yz:Xz,s=h(v,P),dh){I=0;do{if(dh=!1,fh=0,25<=I)throw Error(r(301));I+=1,An=Tn=null,u.updateQueue=null,jv.current=Jz,s=h(v,P)}while(dh)}if(jv.current=Mv,u=Tn!==null&&Tn.next!==null,wu=0,An=Tn=en=null,$v=!1,u)throw Error(r(300));return s}function mS(){var s=fh!==0;return fh=0,s}function Ia(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return An===null?en.memoizedState=An=s:An=An.next=s,An}function Co(){if(Tn===null){var s=en.alternate;s=s!==null?s.memoizedState:null}else s=Tn.next;var u=An===null?en.memoizedState:An.next;if(u!==null)An=u,Tn=s;else{if(s===null)throw Error(r(310));Tn=s,s={memoizedState:Tn.memoizedState,baseState:Tn.baseState,baseQueue:Tn.baseQueue,queue:Tn.queue,next:null},An===null?en.memoizedState=An=s:An=An.next=s}return An}function hh(s,u){return typeof u=="function"?u(s):u}function vS(s){var u=Co(),h=u.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=s;var v=Tn,P=v.baseQueue,I=h.pending;if(I!==null){if(P!==null){var D=P.next;P.next=I.next,I.next=D}v.baseQueue=P=I,h.pending=null}if(P!==null){I=P.next,v=v.baseState;var W=D=null,J=null,Se=I;do{var ke=Se.lane;if((wu&ke)===ke)J!==null&&(J=J.next={lane:0,action:Se.action,hasEagerState:Se.hasEagerState,eagerState:Se.eagerState,next:null}),v=Se.hasEagerState?Se.eagerState:s(v,Se.action);else{var Ae={lane:ke,action:Se.action,hasEagerState:Se.hasEagerState,eagerState:Se.eagerState,next:null};J===null?(W=J=Ae,D=v):J=J.next=Ae,en.lanes|=ke,Su|=ke}Se=Se.next}while(Se!==null&&Se!==I);J===null?D=v:J.next=W,Yo(v,u.memoizedState)||(ki=!0),u.memoizedState=v,u.baseState=D,u.baseQueue=J,h.lastRenderedState=v}if(s=h.interleaved,s!==null){P=s;do I=P.lane,en.lanes|=I,Su|=I,P=P.next;while(P!==s)}else P===null&&(h.lanes=0);return[u.memoizedState,h.dispatch]}function gS(s){var u=Co(),h=u.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=s;var v=h.dispatch,P=h.pending,I=u.memoizedState;if(P!==null){h.pending=null;var D=P=P.next;do I=s(I,D.action),D=D.next;while(D!==P);Yo(I,u.memoizedState)||(ki=!0),u.memoizedState=I,u.baseQueue===null&&(u.baseState=I),h.lastRenderedState=I}return[I,v]}function OO(){}function RO(s,u){var h=en,v=Co(),P=u(),I=!Yo(v.memoizedState,P);if(I&&(v.memoizedState=P,ki=!0),v=v.queue,yS(jO.bind(null,h,v,s),[s]),v.getSnapshot!==u||I||An!==null&&An.memoizedState.tag&1){if(h.flags|=2048,ph(9,kO.bind(null,h,v,P,u),void 0,null),Dn===null)throw Error(r(349));(wu&30)!==0||IO(h,u,P)}return P}function IO(s,u,h){s.flags|=16384,s={getSnapshot:u,value:h},u=en.updateQueue,u===null?(u={lastEffect:null,stores:null},en.updateQueue=u,u.stores=[s]):(h=u.stores,h===null?u.stores=[s]:h.push(s))}function kO(s,u,h,v){u.value=h,u.getSnapshot=v,$O(u)&&AO(s)}function jO(s,u,h){return h(function(){$O(u)&&AO(s)})}function $O(s){var u=s.getSnapshot;s=s.value;try{var h=u();return!Yo(s,h)}catch{return!0}}function AO(s){var u=hs(s,1);u!==null&&ta(u,s,1,-1)}function DO(s){var u=Ia();return typeof s=="function"&&(s=s()),u.memoizedState=u.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:hh,lastRenderedState:s},u.queue=s,s=s.dispatch=Qz.bind(null,en,s),[u.memoizedState,s]}function ph(s,u,h,v){return s={tag:s,create:u,destroy:h,deps:v,next:null},u=en.updateQueue,u===null?(u={lastEffect:null,stores:null},en.updateQueue=u,u.lastEffect=s.next=s):(h=u.lastEffect,h===null?u.lastEffect=s.next=s:(v=h.next,h.next=s,s.next=v,u.lastEffect=s)),s}function MO(){return Co().memoizedState}function Av(s,u,h,v){var P=Ia();en.flags|=s,P.memoizedState=ph(1|u,h,void 0,v===void 0?null:v)}function Dv(s,u,h,v){var P=Co();v=v===void 0?null:v;var I=void 0;if(Tn!==null){var D=Tn.memoizedState;if(I=D.destroy,v!==null&&hS(v,D.deps)){P.memoizedState=ph(u,h,I,v);return}}en.flags|=s,P.memoizedState=ph(1|u,h,I,v)}function NO(s,u){return Av(8390656,8,s,u)}function yS(s,u){return Dv(2048,8,s,u)}function FO(s,u){return Dv(4,2,s,u)}function LO(s,u){return Dv(4,4,s,u)}function BO(s,u){if(typeof u=="function")return s=s(),u(s),function(){u(null)};if(u!=null)return s=s(),u.current=s,function(){u.current=null}}function VO(s,u,h){return h=h!=null?h.concat([s]):null,Dv(4,4,BO.bind(null,u,s),h)}function bS(){}function zO(s,u){var h=Co();u=u===void 0?null:u;var v=h.memoizedState;return v!==null&&u!==null&&hS(u,v[1])?v[0]:(h.memoizedState=[s,u],s)}function qO(s,u){var h=Co();u=u===void 0?null:u;var v=h.memoizedState;return v!==null&&u!==null&&hS(u,v[1])?v[0]:(s=s(),h.memoizedState=[s,u],s)}function UO(s,u,h){return(wu&21)===0?(s.baseState&&(s.baseState=!1,ki=!0),s.memoizedState=h):(Yo(h,u)||(h=ov(),en.lanes|=h,Su|=h,s.baseState=!0),u)}function Kz(s,u){var h=sr;sr=h!==0&&4>h?h:4,s(!0);var v=fS.transition;fS.transition={};try{s(!1),u()}finally{sr=h,fS.transition=v}}function HO(){return Co().memoizedState}function Gz(s,u,h){var v=fl(s);if(h={lane:v,action:h,hasEagerState:!1,eagerState:null,next:null},WO(s))KO(u,h);else if(h=xO(s,u,h,v),h!==null){var P=bi();ta(h,s,v,P),GO(h,u,v)}}function Qz(s,u,h){var v=fl(s),P={lane:v,action:h,hasEagerState:!1,eagerState:null,next:null};if(WO(s))KO(u,P);else{var I=s.alternate;if(s.lanes===0&&(I===null||I.lanes===0)&&(I=u.lastRenderedReducer,I!==null))try{var D=u.lastRenderedState,W=I(D,h);if(P.hasEagerState=!0,P.eagerState=W,Yo(W,D)){var J=u.interleaved;J===null?(P.next=P,aS(u)):(P.next=J.next,J.next=P),u.interleaved=P;return}}catch{}finally{}h=xO(s,u,P,v),h!==null&&(P=bi(),ta(h,s,v,P),GO(h,u,v))}}function WO(s){var u=s.alternate;return s===en||u!==null&&u===en}function KO(s,u){dh=$v=!0;var h=s.pending;h===null?u.next=u:(u.next=h.next,h.next=u),s.pending=u}function GO(s,u,h){if((h&4194240)!==0){var v=u.lanes;v&=s.pendingLanes,h|=v,u.lanes=h,Uf(s,h)}}var Mv={readContext:Po,useCallback:si,useContext:si,useEffect:si,useImperativeHandle:si,useInsertionEffect:si,useLayoutEffect:si,useMemo:si,useReducer:si,useRef:si,useState:si,useDebugValue:si,useDeferredValue:si,useTransition:si,useMutableSource:si,useSyncExternalStore:si,useId:si,unstable_isNewReconciler:!1},Yz={readContext:Po,useCallback:function(s,u){return Ia().memoizedState=[s,u===void 0?null:u],s},useContext:Po,useEffect:NO,useImperativeHandle:function(s,u,h){return h=h!=null?h.concat([s]):null,Av(4194308,4,BO.bind(null,u,s),h)},useLayoutEffect:function(s,u){return Av(4194308,4,s,u)},useInsertionEffect:function(s,u){return Av(4,2,s,u)},useMemo:function(s,u){var h=Ia();return u=u===void 0?null:u,s=s(),h.memoizedState=[s,u],s},useReducer:function(s,u,h){var v=Ia();return u=h!==void 0?h(u):u,v.memoizedState=v.baseState=u,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:u},v.queue=s,s=s.dispatch=Gz.bind(null,en,s),[v.memoizedState,s]},useRef:function(s){var u=Ia();return s={current:s},u.memoizedState=s},useState:DO,useDebugValue:bS,useDeferredValue:function(s){return Ia().memoizedState=s},useTransition:function(){var s=DO(!1),u=s[0];return s=Kz.bind(null,s[1]),Ia().memoizedState=s,[u,s]},useMutableSource:function(){},useSyncExternalStore:function(s,u,h){var v=en,P=Ia();if(Gr){if(h===void 0)throw Error(r(407));h=h()}else{if(h=u(),Dn===null)throw Error(r(349));(wu&30)!==0||IO(v,u,h)}P.memoizedState=h;var I={value:h,getSnapshot:u};return P.queue=I,NO(jO.bind(null,v,I,s),[s]),v.flags|=2048,ph(9,kO.bind(null,v,I,h,u),void 0,null),h},useId:function(){var s=Ia(),u=Dn.identifierPrefix;if(Gr){var h=fs,v=ds;h=(v&~(1<<32-ri(v)-1)).toString(32)+h,u=":"+u+"R"+h,h=fh++,0<h&&(u+="H"+h.toString(32)),u+=":"}else h=Wz++,u=":"+u+"r"+h.toString(32)+":";return s.memoizedState=u},unstable_isNewReconciler:!1},Xz={readContext:Po,useCallback:zO,useContext:Po,useEffect:yS,useImperativeHandle:VO,useInsertionEffect:FO,useLayoutEffect:LO,useMemo:qO,useReducer:vS,useRef:MO,useState:function(){return vS(hh)},useDebugValue:bS,useDeferredValue:function(s){var u=Co();return UO(u,Tn.memoizedState,s)},useTransition:function(){var s=vS(hh)[0],u=Co().memoizedState;return[s,u]},useMutableSource:OO,useSyncExternalStore:RO,useId:HO,unstable_isNewReconciler:!1},Jz={readContext:Po,useCallback:zO,useContext:Po,useEffect:yS,useImperativeHandle:VO,useInsertionEffect:FO,useLayoutEffect:LO,useMemo:qO,useReducer:gS,useRef:MO,useState:function(){return gS(hh)},useDebugValue:bS,useDeferredValue:function(s){var u=Co();return Tn===null?u.memoizedState=s:UO(u,Tn.memoizedState,s)},useTransition:function(){var s=gS(hh)[0],u=Co().memoizedState;return[s,u]},useMutableSource:OO,useSyncExternalStore:RO,useId:HO,unstable_isNewReconciler:!1};function Jo(s,u){if(s&&s.defaultProps){u=Z({},u),s=s.defaultProps;for(var h in s)u[h]===void 0&&(u[h]=s[h]);return u}return u}function wS(s,u,h,v){u=s.memoizedState,h=h(v,u),h=h==null?u:Z({},u,h),s.memoizedState=h,s.lanes===0&&(s.updateQueue.baseState=h)}var Nv={isMounted:function(s){return(s=s._reactInternals)?ot(s)===s:!1},enqueueSetState:function(s,u,h){s=s._reactInternals;var v=bi(),P=fl(s),I=ps(v,P);I.payload=u,h!=null&&(I.callback=h),u=ll(s,I,P),u!==null&&(ta(u,s,P,v),Rv(u,s,P))},enqueueReplaceState:function(s,u,h){s=s._reactInternals;var v=bi(),P=fl(s),I=ps(v,P);I.tag=1,I.payload=u,h!=null&&(I.callback=h),u=ll(s,I,P),u!==null&&(ta(u,s,P,v),Rv(u,s,P))},enqueueForceUpdate:function(s,u){s=s._reactInternals;var h=bi(),v=fl(s),P=ps(h,v);P.tag=2,u!=null&&(P.callback=u),u=ll(s,P,v),u!==null&&(ta(u,s,v,h),Rv(u,s,v))}};function QO(s,u,h,v,P,I,D){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(v,I,D):u.prototype&&u.prototype.isPureReactComponent?!eh(h,v)||!eh(P,I):!0}function YO(s,u,h){var v=!1,P=ol,I=u.contextType;return typeof I=="object"&&I!==null?I=Po(I):(P=Ii(u)?mu:ai.current,v=u.contextTypes,I=(v=v!=null)?Wc(s,P):ol),u=new u(h,I),s.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Nv,s.stateNode=u,u._reactInternals=s,v&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=P,s.__reactInternalMemoizedMaskedChildContext=I),u}function XO(s,u,h,v){s=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(h,v),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(h,v),u.state!==s&&Nv.enqueueReplaceState(u,u.state,null)}function SS(s,u,h,v){var P=s.stateNode;P.props=h,P.state=s.memoizedState,P.refs={},sS(s);var I=u.contextType;typeof I=="object"&&I!==null?P.context=Po(I):(I=Ii(u)?mu:ai.current,P.context=Wc(s,I)),P.state=s.memoizedState,I=u.getDerivedStateFromProps,typeof I=="function"&&(wS(s,u,I,h),P.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof P.getSnapshotBeforeUpdate=="function"||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(u=P.state,typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount(),u!==P.state&&Nv.enqueueReplaceState(P,P.state,null),Iv(s,h,P,v),P.state=s.memoizedState),typeof P.componentDidMount=="function"&&(s.flags|=4194308)}function ed(s,u){try{var h="",v=u;do h+=F(v),v=v.return;while(v);var P=h}catch(I){P=`
|
39
|
-
Error generating stack: `+I.message+`
|
40
|
-
`+I.stack}return{value:s,source:u,stack:P,digest:null}}function _S(s,u,h){return{value:s,source:null,stack:h??null,digest:u??null}}function xS(s,u){try{console.error(u.value)}catch(h){setTimeout(function(){throw h})}}var Zz=typeof WeakMap=="function"?WeakMap:Map;function JO(s,u,h){h=ps(-1,h),h.tag=3,h.payload={element:null};var v=u.value;return h.callback=function(){Uv||(Uv=!0,FS=v),xS(s,u)},h}function ZO(s,u,h){h=ps(-1,h),h.tag=3;var v=s.type.getDerivedStateFromError;if(typeof v=="function"){var P=u.value;h.payload=function(){return v(P)},h.callback=function(){xS(s,u)}}var I=s.stateNode;return I!==null&&typeof I.componentDidCatch=="function"&&(h.callback=function(){xS(s,u),typeof v!="function"&&(cl===null?cl=new Set([this]):cl.add(this));var D=u.stack;this.componentDidCatch(u.value,{componentStack:D!==null?D:""})}),h}function eR(s,u,h){var v=s.pingCache;if(v===null){v=s.pingCache=new Zz;var P=new Set;v.set(u,P)}else P=v.get(u),P===void 0&&(P=new Set,v.set(u,P));P.has(h)||(P.add(h),s=h6.bind(null,s,u,h),u.then(s,s))}function tR(s){do{var u;if((u=s.tag===13)&&(u=s.memoizedState,u=u!==null?u.dehydrated!==null:!0),u)return s;s=s.return}while(s!==null);return null}function rR(s,u,h,v,P){return(s.mode&1)===0?(s===u?s.flags|=65536:(s.flags|=128,h.flags|=131072,h.flags&=-52805,h.tag===1&&(h.alternate===null?h.tag=17:(u=ps(-1,1),u.tag=2,ll(h,u,1))),h.lanes|=1),s):(s.flags|=65536,s.lanes=P,s)}var e6=k.ReactCurrentOwner,ki=!1;function yi(s,u,h,v){u.child=s===null?_O(u,null,h,v):Yc(u,s.child,h,v)}function nR(s,u,h,v,P){h=h.render;var I=u.ref;return Jc(u,P),v=pS(s,u,h,v,I,P),h=mS(),s!==null&&!ki?(u.updateQueue=s.updateQueue,u.flags&=-2053,s.lanes&=~P,ms(s,u,P)):(Gr&&h&&Xw(u),u.flags|=1,yi(s,u,v,P),u.child)}function iR(s,u,h,v,P){if(s===null){var I=h.type;return typeof I=="function"&&!HS(I)&&I.defaultProps===void 0&&h.compare===null&&h.defaultProps===void 0?(u.tag=15,u.type=I,oR(s,u,I,v,P)):(s=Yv(h.type,null,v,u,u.mode,P),s.ref=u.ref,s.return=u,u.child=s)}if(I=s.child,(s.lanes&P)===0){var D=I.memoizedProps;if(h=h.compare,h=h!==null?h:eh,h(D,v)&&s.ref===u.ref)return ms(s,u,P)}return u.flags|=1,s=pl(I,v),s.ref=u.ref,s.return=u,u.child=s}function oR(s,u,h,v,P){if(s!==null){var I=s.memoizedProps;if(eh(I,v)&&s.ref===u.ref)if(ki=!1,u.pendingProps=v=I,(s.lanes&P)!==0)(s.flags&131072)!==0&&(ki=!0);else return u.lanes=s.lanes,ms(s,u,P)}return PS(s,u,h,v,P)}function aR(s,u,h){var v=u.pendingProps,P=v.children,I=s!==null?s.memoizedState:null;if(v.mode==="hidden")if((u.mode&1)===0)u.memoizedState={baseLanes:0,cachePool:null,transitions:null},$r(rd,to),to|=h;else{if((h&1073741824)===0)return s=I!==null?I.baseLanes|h:h,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:s,cachePool:null,transitions:null},u.updateQueue=null,$r(rd,to),to|=s,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},v=I!==null?I.baseLanes:h,$r(rd,to),to|=v}else I!==null?(v=I.baseLanes|h,u.memoizedState=null):v=h,$r(rd,to),to|=v;return yi(s,u,P,h),u.child}function sR(s,u){var h=u.ref;(s===null&&h!==null||s!==null&&s.ref!==h)&&(u.flags|=512,u.flags|=2097152)}function PS(s,u,h,v,P){var I=Ii(h)?mu:ai.current;return I=Wc(u,I),Jc(u,P),h=pS(s,u,h,v,I,P),v=mS(),s!==null&&!ki?(u.updateQueue=s.updateQueue,u.flags&=-2053,s.lanes&=~P,ms(s,u,P)):(Gr&&v&&Xw(u),u.flags|=1,yi(s,u,h,P),u.child)}function lR(s,u,h,v,P){if(Ii(h)){var I=!0;Sv(u)}else I=!1;if(Jc(u,P),u.stateNode===null)Lv(s,u),YO(u,h,v),SS(u,h,v,P),v=!0;else if(s===null){var D=u.stateNode,W=u.memoizedProps;D.props=W;var J=D.context,Se=h.contextType;typeof Se=="object"&&Se!==null?Se=Po(Se):(Se=Ii(h)?mu:ai.current,Se=Wc(u,Se));var ke=h.getDerivedStateFromProps,Ae=typeof ke=="function"||typeof D.getSnapshotBeforeUpdate=="function";Ae||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(W!==v||J!==Se)&&XO(u,D,v,Se),sl=!1;var Ie=u.memoizedState;D.state=Ie,Iv(u,v,D,P),J=u.memoizedState,W!==v||Ie!==J||Ri.current||sl?(typeof ke=="function"&&(wS(u,h,ke,v),J=u.memoizedState),(W=sl||QO(u,h,W,v,Ie,J,Se))?(Ae||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount()),typeof D.componentDidMount=="function"&&(u.flags|=4194308)):(typeof D.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=v,u.memoizedState=J),D.props=v,D.state=J,D.context=Se,v=W):(typeof D.componentDidMount=="function"&&(u.flags|=4194308),v=!1)}else{D=u.stateNode,PO(s,u),W=u.memoizedProps,Se=u.type===u.elementType?W:Jo(u.type,W),D.props=Se,Ae=u.pendingProps,Ie=D.context,J=h.contextType,typeof J=="object"&&J!==null?J=Po(J):(J=Ii(h)?mu:ai.current,J=Wc(u,J));var He=h.getDerivedStateFromProps;(ke=typeof He=="function"||typeof D.getSnapshotBeforeUpdate=="function")||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(W!==Ae||Ie!==J)&&XO(u,D,v,J),sl=!1,Ie=u.memoizedState,D.state=Ie,Iv(u,v,D,P);var Xe=u.memoizedState;W!==Ae||Ie!==Xe||Ri.current||sl?(typeof He=="function"&&(wS(u,h,He,v),Xe=u.memoizedState),(Se=sl||QO(u,h,Se,v,Ie,Xe,J)||!1)?(ke||typeof D.UNSAFE_componentWillUpdate!="function"&&typeof D.componentWillUpdate!="function"||(typeof D.componentWillUpdate=="function"&&D.componentWillUpdate(v,Xe,J),typeof D.UNSAFE_componentWillUpdate=="function"&&D.UNSAFE_componentWillUpdate(v,Xe,J)),typeof D.componentDidUpdate=="function"&&(u.flags|=4),typeof D.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof D.componentDidUpdate!="function"||W===s.memoizedProps&&Ie===s.memoizedState||(u.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||W===s.memoizedProps&&Ie===s.memoizedState||(u.flags|=1024),u.memoizedProps=v,u.memoizedState=Xe),D.props=v,D.state=Xe,D.context=J,v=Se):(typeof D.componentDidUpdate!="function"||W===s.memoizedProps&&Ie===s.memoizedState||(u.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||W===s.memoizedProps&&Ie===s.memoizedState||(u.flags|=1024),v=!1)}return CS(s,u,h,v,I,P)}function CS(s,u,h,v,P,I){sR(s,u);var D=(u.flags&128)!==0;if(!v&&!D)return P&&hO(u,h,!1),ms(s,u,I);v=u.stateNode,e6.current=u;var W=D&&typeof h.getDerivedStateFromError!="function"?null:v.render();return u.flags|=1,s!==null&&D?(u.child=Yc(u,s.child,null,I),u.child=Yc(u,null,W,I)):yi(s,u,W,I),u.memoizedState=v.state,P&&hO(u,h,!0),u.child}function uR(s){var u=s.stateNode;u.pendingContext?dO(s,u.pendingContext,u.pendingContext!==u.context):u.context&&dO(s,u.context,!1),lS(s,u.containerInfo)}function cR(s,u,h,v,P){return Qc(),tS(P),u.flags|=256,yi(s,u,h,v),u.child}var ES={dehydrated:null,treeContext:null,retryLane:0};function TS(s){return{baseLanes:s,cachePool:null,transitions:null}}function dR(s,u,h){var v=u.pendingProps,P=Zr.current,I=!1,D=(u.flags&128)!==0,W;if((W=D)||(W=s!==null&&s.memoizedState===null?!1:(P&2)!==0),W?(I=!0,u.flags&=-129):(s===null||s.memoizedState!==null)&&(P|=1),$r(Zr,P&1),s===null)return eS(u),s=u.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((u.mode&1)===0?u.lanes=1:s.data==="$!"?u.lanes=8:u.lanes=1073741824,null):(D=v.children,s=v.fallback,I?(v=u.mode,I=u.child,D={mode:"hidden",children:D},(v&1)===0&&I!==null?(I.childLanes=0,I.pendingProps=D):I=Xv(D,v,0,null),s=Cu(s,v,h,null),I.return=u,s.return=u,I.sibling=s,u.child=I,u.child.memoizedState=TS(h),u.memoizedState=ES,s):OS(u,D));if(P=s.memoizedState,P!==null&&(W=P.dehydrated,W!==null))return t6(s,u,D,v,W,P,h);if(I){I=v.fallback,D=u.mode,P=s.child,W=P.sibling;var J={mode:"hidden",children:v.children};return(D&1)===0&&u.child!==P?(v=u.child,v.childLanes=0,v.pendingProps=J,u.deletions=null):(v=pl(P,J),v.subtreeFlags=P.subtreeFlags&14680064),W!==null?I=pl(W,I):(I=Cu(I,D,h,null),I.flags|=2),I.return=u,v.return=u,v.sibling=I,u.child=v,v=I,I=u.child,D=s.child.memoizedState,D=D===null?TS(h):{baseLanes:D.baseLanes|h,cachePool:null,transitions:D.transitions},I.memoizedState=D,I.childLanes=s.childLanes&~h,u.memoizedState=ES,v}return I=s.child,s=I.sibling,v=pl(I,{mode:"visible",children:v.children}),(u.mode&1)===0&&(v.lanes=h),v.return=u,v.sibling=null,s!==null&&(h=u.deletions,h===null?(u.deletions=[s],u.flags|=16):h.push(s)),u.child=v,u.memoizedState=null,v}function OS(s,u){return u=Xv({mode:"visible",children:u},s.mode,0,null),u.return=s,s.child=u}function Fv(s,u,h,v){return v!==null&&tS(v),Yc(u,s.child,null,h),s=OS(u,u.pendingProps.children),s.flags|=2,u.memoizedState=null,s}function t6(s,u,h,v,P,I,D){if(h)return u.flags&256?(u.flags&=-257,v=_S(Error(r(422))),Fv(s,u,D,v)):u.memoizedState!==null?(u.child=s.child,u.flags|=128,null):(I=v.fallback,P=u.mode,v=Xv({mode:"visible",children:v.children},P,0,null),I=Cu(I,P,D,null),I.flags|=2,v.return=u,I.return=u,v.sibling=I,u.child=v,(u.mode&1)!==0&&Yc(u,s.child,null,D),u.child.memoizedState=TS(D),u.memoizedState=ES,I);if((u.mode&1)===0)return Fv(s,u,D,null);if(P.data==="$!"){if(v=P.nextSibling&&P.nextSibling.dataset,v)var W=v.dgst;return v=W,I=Error(r(419)),v=_S(I,v,void 0),Fv(s,u,D,v)}if(W=(D&s.childLanes)!==0,ki||W){if(v=Dn,v!==null){switch(D&-D){case 4:P=2;break;case 16:P=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:P=32;break;case 536870912:P=268435456;break;default:P=0}P=(P&(v.suspendedLanes|D))!==0?0:P,P!==0&&P!==I.retryLane&&(I.retryLane=P,hs(s,P),ta(v,s,P,-1))}return US(),v=_S(Error(r(421))),Fv(s,u,D,v)}return P.data==="$?"?(u.flags|=128,u.child=s.child,u=p6.bind(null,s),P._reactRetry=u,null):(s=I.treeContext,eo=nl(P.nextSibling),Zi=u,Gr=!0,Xo=null,s!==null&&(_o[xo++]=ds,_o[xo++]=fs,_o[xo++]=vu,ds=s.id,fs=s.overflow,vu=u),u=OS(u,v.children),u.flags|=4096,u)}function fR(s,u,h){s.lanes|=u;var v=s.alternate;v!==null&&(v.lanes|=u),oS(s.return,u,h)}function RS(s,u,h,v,P){var I=s.memoizedState;I===null?s.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:v,tail:h,tailMode:P}:(I.isBackwards=u,I.rendering=null,I.renderingStartTime=0,I.last=v,I.tail=h,I.tailMode=P)}function hR(s,u,h){var v=u.pendingProps,P=v.revealOrder,I=v.tail;if(yi(s,u,v.children,h),v=Zr.current,(v&2)!==0)v=v&1|2,u.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=u.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&fR(s,h,u);else if(s.tag===19)fR(s,h,u);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===u)break e;for(;s.sibling===null;){if(s.return===null||s.return===u)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}v&=1}if($r(Zr,v),(u.mode&1)===0)u.memoizedState=null;else switch(P){case"forwards":for(h=u.child,P=null;h!==null;)s=h.alternate,s!==null&&kv(s)===null&&(P=h),h=h.sibling;h=P,h===null?(P=u.child,u.child=null):(P=h.sibling,h.sibling=null),RS(u,!1,P,h,I);break;case"backwards":for(h=null,P=u.child,u.child=null;P!==null;){if(s=P.alternate,s!==null&&kv(s)===null){u.child=P;break}s=P.sibling,P.sibling=h,h=P,P=s}RS(u,!0,h,null,I);break;case"together":RS(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function Lv(s,u){(u.mode&1)===0&&s!==null&&(s.alternate=null,u.alternate=null,u.flags|=2)}function ms(s,u,h){if(s!==null&&(u.dependencies=s.dependencies),Su|=u.lanes,(h&u.childLanes)===0)return null;if(s!==null&&u.child!==s.child)throw Error(r(153));if(u.child!==null){for(s=u.child,h=pl(s,s.pendingProps),u.child=h,h.return=u;s.sibling!==null;)s=s.sibling,h=h.sibling=pl(s,s.pendingProps),h.return=u;h.sibling=null}return u.child}function r6(s,u,h){switch(u.tag){case 3:uR(u),Qc();break;case 5:TO(u);break;case 1:Ii(u.type)&&Sv(u);break;case 4:lS(u,u.stateNode.containerInfo);break;case 10:var v=u.type._context,P=u.memoizedProps.value;$r(Tv,v._currentValue),v._currentValue=P;break;case 13:if(v=u.memoizedState,v!==null)return v.dehydrated!==null?($r(Zr,Zr.current&1),u.flags|=128,null):(h&u.child.childLanes)!==0?dR(s,u,h):($r(Zr,Zr.current&1),s=ms(s,u,h),s!==null?s.sibling:null);$r(Zr,Zr.current&1);break;case 19:if(v=(h&u.childLanes)!==0,(s.flags&128)!==0){if(v)return hR(s,u,h);u.flags|=128}if(P=u.memoizedState,P!==null&&(P.rendering=null,P.tail=null,P.lastEffect=null),$r(Zr,Zr.current),v)break;return null;case 22:case 23:return u.lanes=0,aR(s,u,h)}return ms(s,u,h)}var pR,IS,mR,vR;pR=function(s,u){for(var h=u.child;h!==null;){if(h.tag===5||h.tag===6)s.appendChild(h.stateNode);else if(h.tag!==4&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===u)break;for(;h.sibling===null;){if(h.return===null||h.return===u)return;h=h.return}h.sibling.return=h.return,h=h.sibling}},IS=function(){},mR=function(s,u,h,v){var P=s.memoizedProps;if(P!==v){s=u.stateNode,bu(Ra.current);var I=null;switch(h){case"input":P=Te(s,P),v=Te(s,v),I=[];break;case"select":P=Z({},P,{value:void 0}),v=Z({},v,{value:void 0}),I=[];break;case"textarea":P=Lt(s,P),v=Lt(s,v),I=[];break;default:typeof P.onClick!="function"&&typeof v.onClick=="function"&&(s.onclick=yv)}Oi(h,v);var D;h=null;for(Se in P)if(!v.hasOwnProperty(Se)&&P.hasOwnProperty(Se)&&P[Se]!=null)if(Se==="style"){var W=P[Se];for(D in W)W.hasOwnProperty(D)&&(h||(h={}),h[D]="")}else Se!=="dangerouslySetInnerHTML"&&Se!=="children"&&Se!=="suppressContentEditableWarning"&&Se!=="suppressHydrationWarning"&&Se!=="autoFocus"&&(i.hasOwnProperty(Se)?I||(I=[]):(I=I||[]).push(Se,null));for(Se in v){var J=v[Se];if(W=P!=null?P[Se]:void 0,v.hasOwnProperty(Se)&&J!==W&&(J!=null||W!=null))if(Se==="style")if(W){for(D in W)!W.hasOwnProperty(D)||J&&J.hasOwnProperty(D)||(h||(h={}),h[D]="");for(D in J)J.hasOwnProperty(D)&&W[D]!==J[D]&&(h||(h={}),h[D]=J[D])}else h||(I||(I=[]),I.push(Se,h)),h=J;else Se==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,W=W?W.__html:void 0,J!=null&&W!==J&&(I=I||[]).push(Se,J)):Se==="children"?typeof J!="string"&&typeof J!="number"||(I=I||[]).push(Se,""+J):Se!=="suppressContentEditableWarning"&&Se!=="suppressHydrationWarning"&&(i.hasOwnProperty(Se)?(J!=null&&Se==="onScroll"&&Lr("scroll",s),I||W===J||(I=[])):(I=I||[]).push(Se,J))}h&&(I=I||[]).push("style",h);var Se=I;(u.updateQueue=Se)&&(u.flags|=4)}},vR=function(s,u,h,v){h!==v&&(u.flags|=4)};function mh(s,u){if(!Gr)switch(s.tailMode){case"hidden":u=s.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?s.tail=null:h.sibling=null;break;case"collapsed":h=s.tail;for(var v=null;h!==null;)h.alternate!==null&&(v=h),h=h.sibling;v===null?u||s.tail===null?s.tail=null:s.tail.sibling=null:v.sibling=null}}function li(s){var u=s.alternate!==null&&s.alternate.child===s.child,h=0,v=0;if(u)for(var P=s.child;P!==null;)h|=P.lanes|P.childLanes,v|=P.subtreeFlags&14680064,v|=P.flags&14680064,P.return=s,P=P.sibling;else for(P=s.child;P!==null;)h|=P.lanes|P.childLanes,v|=P.subtreeFlags,v|=P.flags,P.return=s,P=P.sibling;return s.subtreeFlags|=v,s.childLanes=h,u}function n6(s,u,h){var v=u.pendingProps;switch(Jw(u),u.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return li(u),null;case 1:return Ii(u.type)&&wv(),li(u),null;case 3:return v=u.stateNode,Zc(),Br(Ri),Br(ai),dS(),v.pendingContext&&(v.context=v.pendingContext,v.pendingContext=null),(s===null||s.child===null)&&(Cv(u)?u.flags|=4:s===null||s.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Xo!==null&&(VS(Xo),Xo=null))),IS(s,u),li(u),null;case 5:uS(u);var P=bu(ch.current);if(h=u.type,s!==null&&u.stateNode!=null)mR(s,u,h,v,P),s.ref!==u.ref&&(u.flags|=512,u.flags|=2097152);else{if(!v){if(u.stateNode===null)throw Error(r(166));return li(u),null}if(s=bu(Ra.current),Cv(u)){v=u.stateNode,h=u.type;var I=u.memoizedProps;switch(v[Oa]=u,v[oh]=I,s=(u.mode&1)!==0,h){case"dialog":Lr("cancel",v),Lr("close",v);break;case"iframe":case"object":case"embed":Lr("load",v);break;case"video":case"audio":for(P=0;P<rh.length;P++)Lr(rh[P],v);break;case"source":Lr("error",v);break;case"img":case"image":case"link":Lr("error",v),Lr("load",v);break;case"details":Lr("toggle",v);break;case"input":he(v,I),Lr("invalid",v);break;case"select":v._wrapperState={wasMultiple:!!I.multiple},Lr("invalid",v);break;case"textarea":ht(v,I),Lr("invalid",v)}Oi(h,I),P=null;for(var D in I)if(I.hasOwnProperty(D)){var W=I[D];D==="children"?typeof W=="string"?v.textContent!==W&&(I.suppressHydrationWarning!==!0&&gv(v.textContent,W,s),P=["children",W]):typeof W=="number"&&v.textContent!==""+W&&(I.suppressHydrationWarning!==!0&&gv(v.textContent,W,s),P=["children",""+W]):i.hasOwnProperty(D)&&W!=null&&D==="onScroll"&&Lr("scroll",v)}switch(h){case"input":Y(v),$t(v,I,!0);break;case"textarea":Y(v),mn(v);break;case"select":case"option":break;default:typeof I.onClick=="function"&&(v.onclick=yv)}v=P,u.updateQueue=v,v!==null&&(u.flags|=4)}else{D=P.nodeType===9?P:P.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=Ir(h)),s==="http://www.w3.org/1999/xhtml"?h==="script"?(s=D.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof v.is=="string"?s=D.createElement(h,{is:v.is}):(s=D.createElement(h),h==="select"&&(D=s,v.multiple?D.multiple=!0:v.size&&(D.size=v.size))):s=D.createElementNS(s,h),s[Oa]=u,s[oh]=v,pR(s,u,!1,!1),u.stateNode=s;e:{switch(D=gn(h,v),h){case"dialog":Lr("cancel",s),Lr("close",s),P=v;break;case"iframe":case"object":case"embed":Lr("load",s),P=v;break;case"video":case"audio":for(P=0;P<rh.length;P++)Lr(rh[P],s);P=v;break;case"source":Lr("error",s),P=v;break;case"img":case"image":case"link":Lr("error",s),Lr("load",s),P=v;break;case"details":Lr("toggle",s),P=v;break;case"input":he(s,v),P=Te(s,v),Lr("invalid",s);break;case"option":P=v;break;case"select":s._wrapperState={wasMultiple:!!v.multiple},P=Z({},v,{value:void 0}),Lr("invalid",s);break;case"textarea":ht(s,v),P=Lt(s,v),Lr("invalid",s);break;default:P=v}Oi(h,P),W=P;for(I in W)if(W.hasOwnProperty(I)){var J=W[I];I==="style"?xa(s,J):I==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,J!=null&&Nr(s,J)):I==="children"?typeof J=="string"?(h!=="textarea"||J!=="")&&an(s,J):typeof J=="number"&&an(s,""+J):I!=="suppressContentEditableWarning"&&I!=="suppressHydrationWarning"&&I!=="autoFocus"&&(i.hasOwnProperty(I)?J!=null&&I==="onScroll"&&Lr("scroll",s):J!=null&&C(s,I,J,D))}switch(h){case"input":Y(s),$t(s,v,!1);break;case"textarea":Y(s),mn(s);break;case"option":v.value!=null&&s.setAttribute("value",""+pe(v.value));break;case"select":s.multiple=!!v.multiple,I=v.value,I!=null?jt(s,!!v.multiple,I,!1):v.defaultValue!=null&&jt(s,!!v.multiple,v.defaultValue,!0);break;default:typeof P.onClick=="function"&&(s.onclick=yv)}switch(h){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}}v&&(u.flags|=4)}u.ref!==null&&(u.flags|=512,u.flags|=2097152)}return li(u),null;case 6:if(s&&u.stateNode!=null)vR(s,u,s.memoizedProps,v);else{if(typeof v!="string"&&u.stateNode===null)throw Error(r(166));if(h=bu(ch.current),bu(Ra.current),Cv(u)){if(v=u.stateNode,h=u.memoizedProps,v[Oa]=u,(I=v.nodeValue!==h)&&(s=Zi,s!==null))switch(s.tag){case 3:gv(v.nodeValue,h,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&gv(v.nodeValue,h,(s.mode&1)!==0)}I&&(u.flags|=4)}else v=(h.nodeType===9?h:h.ownerDocument).createTextNode(v),v[Oa]=u,u.stateNode=v}return li(u),null;case 13:if(Br(Zr),v=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(Gr&&eo!==null&&(u.mode&1)!==0&&(u.flags&128)===0)bO(),Qc(),u.flags|=98560,I=!1;else if(I=Cv(u),v!==null&&v.dehydrated!==null){if(s===null){if(!I)throw Error(r(318));if(I=u.memoizedState,I=I!==null?I.dehydrated:null,!I)throw Error(r(317));I[Oa]=u}else Qc(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;li(u),I=!1}else Xo!==null&&(VS(Xo),Xo=null),I=!0;if(!I)return u.flags&65536?u:null}return(u.flags&128)!==0?(u.lanes=h,u):(v=v!==null,v!==(s!==null&&s.memoizedState!==null)&&v&&(u.child.flags|=8192,(u.mode&1)!==0&&(s===null||(Zr.current&1)!==0?On===0&&(On=3):US())),u.updateQueue!==null&&(u.flags|=4),li(u),null);case 4:return Zc(),IS(s,u),s===null&&nh(u.stateNode.containerInfo),li(u),null;case 10:return iS(u.type._context),li(u),null;case 17:return Ii(u.type)&&wv(),li(u),null;case 19:if(Br(Zr),I=u.memoizedState,I===null)return li(u),null;if(v=(u.flags&128)!==0,D=I.rendering,D===null)if(v)mh(I,!1);else{if(On!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(D=kv(s),D!==null){for(u.flags|=128,mh(I,!1),v=D.updateQueue,v!==null&&(u.updateQueue=v,u.flags|=4),u.subtreeFlags=0,v=h,h=u.child;h!==null;)I=h,s=v,I.flags&=14680066,D=I.alternate,D===null?(I.childLanes=0,I.lanes=s,I.child=null,I.subtreeFlags=0,I.memoizedProps=null,I.memoizedState=null,I.updateQueue=null,I.dependencies=null,I.stateNode=null):(I.childLanes=D.childLanes,I.lanes=D.lanes,I.child=D.child,I.subtreeFlags=0,I.deletions=null,I.memoizedProps=D.memoizedProps,I.memoizedState=D.memoizedState,I.updateQueue=D.updateQueue,I.type=D.type,s=D.dependencies,I.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),h=h.sibling;return $r(Zr,Zr.current&1|2),u.child}s=s.sibling}I.tail!==null&&Et()>nd&&(u.flags|=128,v=!0,mh(I,!1),u.lanes=4194304)}else{if(!v)if(s=kv(D),s!==null){if(u.flags|=128,v=!0,h=s.updateQueue,h!==null&&(u.updateQueue=h,u.flags|=4),mh(I,!0),I.tail===null&&I.tailMode==="hidden"&&!D.alternate&&!Gr)return li(u),null}else 2*Et()-I.renderingStartTime>nd&&h!==1073741824&&(u.flags|=128,v=!0,mh(I,!1),u.lanes=4194304);I.isBackwards?(D.sibling=u.child,u.child=D):(h=I.last,h!==null?h.sibling=D:u.child=D,I.last=D)}return I.tail!==null?(u=I.tail,I.rendering=u,I.tail=u.sibling,I.renderingStartTime=Et(),u.sibling=null,h=Zr.current,$r(Zr,v?h&1|2:h&1),u):(li(u),null);case 22:case 23:return qS(),v=u.memoizedState!==null,s!==null&&s.memoizedState!==null!==v&&(u.flags|=8192),v&&(u.mode&1)!==0?(to&1073741824)!==0&&(li(u),u.subtreeFlags&6&&(u.flags|=8192)):li(u),null;case 24:return null;case 25:return null}throw Error(r(156,u.tag))}function i6(s,u){switch(Jw(u),u.tag){case 1:return Ii(u.type)&&wv(),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return Zc(),Br(Ri),Br(ai),dS(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 5:return uS(u),null;case 13:if(Br(Zr),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(r(340));Qc()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return Br(Zr),null;case 4:return Zc(),null;case 10:return iS(u.type._context),null;case 22:case 23:return qS(),null;case 24:return null;default:return null}}var Bv=!1,ui=!1,o6=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function td(s,u){var h=s.ref;if(h!==null)if(typeof h=="function")try{h(null)}catch(v){un(s,u,v)}else h.current=null}function kS(s,u,h){try{h()}catch(v){un(s,u,v)}}var gR=!1;function a6(s,u){if(qw=z,s=QT(),Dw(s)){if("selectionStart"in s)var h={start:s.selectionStart,end:s.selectionEnd};else e:{h=(h=s.ownerDocument)&&h.defaultView||window;var v=h.getSelection&&h.getSelection();if(v&&v.rangeCount!==0){h=v.anchorNode;var P=v.anchorOffset,I=v.focusNode;v=v.focusOffset;try{h.nodeType,I.nodeType}catch{h=null;break e}var D=0,W=-1,J=-1,Se=0,ke=0,Ae=s,Ie=null;t:for(;;){for(var He;Ae!==h||P!==0&&Ae.nodeType!==3||(W=D+P),Ae!==I||v!==0&&Ae.nodeType!==3||(J=D+v),Ae.nodeType===3&&(D+=Ae.nodeValue.length),(He=Ae.firstChild)!==null;)Ie=Ae,Ae=He;for(;;){if(Ae===s)break t;if(Ie===h&&++Se===P&&(W=D),Ie===I&&++ke===v&&(J=D),(He=Ae.nextSibling)!==null)break;Ae=Ie,Ie=Ae.parentNode}Ae=He}h=W===-1||J===-1?null:{start:W,end:J}}else h=null}h=h||{start:0,end:0}}else h=null;for(Uw={focusedElem:s,selectionRange:h},z=!1,Ke=u;Ke!==null;)if(u=Ke,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,Ke=s;else for(;Ke!==null;){u=Ke;try{var Xe=u.alternate;if((u.flags&1024)!==0)switch(u.tag){case 0:case 11:case 15:break;case 1:if(Xe!==null){var et=Xe.memoizedProps,yn=Xe.memoizedState,fe=u.stateNode,re=fe.getSnapshotBeforeUpdate(u.elementType===u.type?et:Jo(u.type,et),yn);fe.__reactInternalSnapshotBeforeUpdate=re}break;case 3:var me=u.stateNode.containerInfo;me.nodeType===1?me.textContent="":me.nodeType===9&&me.documentElement&&me.removeChild(me.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(Fe){un(u,u.return,Fe)}if(s=u.sibling,s!==null){s.return=u.return,Ke=s;break}Ke=u.return}return Xe=gR,gR=!1,Xe}function vh(s,u,h){var v=u.updateQueue;if(v=v!==null?v.lastEffect:null,v!==null){var P=v=v.next;do{if((P.tag&s)===s){var I=P.destroy;P.destroy=void 0,I!==void 0&&kS(u,h,I)}P=P.next}while(P!==v)}}function Vv(s,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var h=u=u.next;do{if((h.tag&s)===s){var v=h.create;h.destroy=v()}h=h.next}while(h!==u)}}function jS(s){var u=s.ref;if(u!==null){var h=s.stateNode;switch(s.tag){case 5:s=h;break;default:s=h}typeof u=="function"?u(s):u.current=s}}function yR(s){var u=s.alternate;u!==null&&(s.alternate=null,yR(u)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(u=s.stateNode,u!==null&&(delete u[Oa],delete u[oh],delete u[Gw],delete u[zz],delete u[qz])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function bR(s){return s.tag===5||s.tag===3||s.tag===4}function wR(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||bR(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function $S(s,u,h){var v=s.tag;if(v===5||v===6)s=s.stateNode,u?h.nodeType===8?h.parentNode.insertBefore(s,u):h.insertBefore(s,u):(h.nodeType===8?(u=h.parentNode,u.insertBefore(s,h)):(u=h,u.appendChild(s)),h=h._reactRootContainer,h!=null||u.onclick!==null||(u.onclick=yv));else if(v!==4&&(s=s.child,s!==null))for($S(s,u,h),s=s.sibling;s!==null;)$S(s,u,h),s=s.sibling}function AS(s,u,h){var v=s.tag;if(v===5||v===6)s=s.stateNode,u?h.insertBefore(s,u):h.appendChild(s);else if(v!==4&&(s=s.child,s!==null))for(AS(s,u,h),s=s.sibling;s!==null;)AS(s,u,h),s=s.sibling}var Un=null,Zo=!1;function ul(s,u,h){for(h=h.child;h!==null;)SR(s,u,h),h=h.sibling}function SR(s,u,h){if(ln&&typeof ln.onCommitFiberUnmount=="function")try{ln.onCommitFiberUnmount(gi,h)}catch{}switch(h.tag){case 5:ui||td(h,u);case 6:var v=Un,P=Zo;Un=null,ul(s,u,h),Un=v,Zo=P,Un!==null&&(Zo?(s=Un,h=h.stateNode,s.nodeType===8?s.parentNode.removeChild(h):s.removeChild(h)):Un.removeChild(h.stateNode));break;case 18:Un!==null&&(Zo?(s=Un,h=h.stateNode,s.nodeType===8?Kw(s.parentNode,h):s.nodeType===1&&Kw(s,h),Zs(s)):Kw(Un,h.stateNode));break;case 4:v=Un,P=Zo,Un=h.stateNode.containerInfo,Zo=!0,ul(s,u,h),Un=v,Zo=P;break;case 0:case 11:case 14:case 15:if(!ui&&(v=h.updateQueue,v!==null&&(v=v.lastEffect,v!==null))){P=v=v.next;do{var I=P,D=I.destroy;I=I.tag,D!==void 0&&((I&2)!==0||(I&4)!==0)&&kS(h,u,D),P=P.next}while(P!==v)}ul(s,u,h);break;case 1:if(!ui&&(td(h,u),v=h.stateNode,typeof v.componentWillUnmount=="function"))try{v.props=h.memoizedProps,v.state=h.memoizedState,v.componentWillUnmount()}catch(W){un(h,u,W)}ul(s,u,h);break;case 21:ul(s,u,h);break;case 22:h.mode&1?(ui=(v=ui)||h.memoizedState!==null,ul(s,u,h),ui=v):ul(s,u,h);break;default:ul(s,u,h)}}function _R(s){var u=s.updateQueue;if(u!==null){s.updateQueue=null;var h=s.stateNode;h===null&&(h=s.stateNode=new o6),u.forEach(function(v){var P=m6.bind(null,s,v);h.has(v)||(h.add(v),v.then(P,P))})}}function ea(s,u){var h=u.deletions;if(h!==null)for(var v=0;v<h.length;v++){var P=h[v];try{var I=s,D=u,W=D;e:for(;W!==null;){switch(W.tag){case 5:Un=W.stateNode,Zo=!1;break e;case 3:Un=W.stateNode.containerInfo,Zo=!0;break e;case 4:Un=W.stateNode.containerInfo,Zo=!0;break e}W=W.return}if(Un===null)throw Error(r(160));SR(I,D,P),Un=null,Zo=!1;var J=P.alternate;J!==null&&(J.return=null),P.return=null}catch(Se){un(P,u,Se)}}if(u.subtreeFlags&12854)for(u=u.child;u!==null;)xR(u,s),u=u.sibling}function xR(s,u){var h=s.alternate,v=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(ea(u,s),ka(s),v&4){try{vh(3,s,s.return),Vv(3,s)}catch(et){un(s,s.return,et)}try{vh(5,s,s.return)}catch(et){un(s,s.return,et)}}break;case 1:ea(u,s),ka(s),v&512&&h!==null&&td(h,h.return);break;case 5:if(ea(u,s),ka(s),v&512&&h!==null&&td(h,h.return),s.flags&32){var P=s.stateNode;try{an(P,"")}catch(et){un(s,s.return,et)}}if(v&4&&(P=s.stateNode,P!=null)){var I=s.memoizedProps,D=h!==null?h.memoizedProps:I,W=s.type,J=s.updateQueue;if(s.updateQueue=null,J!==null)try{W==="input"&&I.type==="radio"&&I.name!=null&&Ce(P,I),gn(W,D);var Se=gn(W,I);for(D=0;D<J.length;D+=2){var ke=J[D],Ae=J[D+1];ke==="style"?xa(P,Ae):ke==="dangerouslySetInnerHTML"?Nr(P,Ae):ke==="children"?an(P,Ae):C(P,ke,Ae,Se)}switch(W){case"input":Ge(P,I);break;case"textarea":on(P,I);break;case"select":var Ie=P._wrapperState.wasMultiple;P._wrapperState.wasMultiple=!!I.multiple;var He=I.value;He!=null?jt(P,!!I.multiple,He,!1):Ie!==!!I.multiple&&(I.defaultValue!=null?jt(P,!!I.multiple,I.defaultValue,!0):jt(P,!!I.multiple,I.multiple?[]:"",!1))}P[oh]=I}catch(et){un(s,s.return,et)}}break;case 6:if(ea(u,s),ka(s),v&4){if(s.stateNode===null)throw Error(r(162));P=s.stateNode,I=s.memoizedProps;try{P.nodeValue=I}catch(et){un(s,s.return,et)}}break;case 3:if(ea(u,s),ka(s),v&4&&h!==null&&h.memoizedState.isDehydrated)try{Zs(u.containerInfo)}catch(et){un(s,s.return,et)}break;case 4:ea(u,s),ka(s);break;case 13:ea(u,s),ka(s),P=s.child,P.flags&8192&&(I=P.memoizedState!==null,P.stateNode.isHidden=I,!I||P.alternate!==null&&P.alternate.memoizedState!==null||(NS=Et())),v&4&&_R(s);break;case 22:if(ke=h!==null&&h.memoizedState!==null,s.mode&1?(ui=(Se=ui)||ke,ea(u,s),ui=Se):ea(u,s),ka(s),v&8192){if(Se=s.memoizedState!==null,(s.stateNode.isHidden=Se)&&!ke&&(s.mode&1)!==0)for(Ke=s,ke=s.child;ke!==null;){for(Ae=Ke=ke;Ke!==null;){switch(Ie=Ke,He=Ie.child,Ie.tag){case 0:case 11:case 14:case 15:vh(4,Ie,Ie.return);break;case 1:td(Ie,Ie.return);var Xe=Ie.stateNode;if(typeof Xe.componentWillUnmount=="function"){v=Ie,h=Ie.return;try{u=v,Xe.props=u.memoizedProps,Xe.state=u.memoizedState,Xe.componentWillUnmount()}catch(et){un(v,h,et)}}break;case 5:td(Ie,Ie.return);break;case 22:if(Ie.memoizedState!==null){ER(Ae);continue}}He!==null?(He.return=Ie,Ke=He):ER(Ae)}ke=ke.sibling}e:for(ke=null,Ae=s;;){if(Ae.tag===5){if(ke===null){ke=Ae;try{P=Ae.stateNode,Se?(I=P.style,typeof I.setProperty=="function"?I.setProperty("display","none","important"):I.display="none"):(W=Ae.stateNode,J=Ae.memoizedProps.style,D=J!=null&&J.hasOwnProperty("display")?J.display:null,W.style.display=Yi("display",D))}catch(et){un(s,s.return,et)}}}else if(Ae.tag===6){if(ke===null)try{Ae.stateNode.nodeValue=Se?"":Ae.memoizedProps}catch(et){un(s,s.return,et)}}else if((Ae.tag!==22&&Ae.tag!==23||Ae.memoizedState===null||Ae===s)&&Ae.child!==null){Ae.child.return=Ae,Ae=Ae.child;continue}if(Ae===s)break e;for(;Ae.sibling===null;){if(Ae.return===null||Ae.return===s)break e;ke===Ae&&(ke=null),Ae=Ae.return}ke===Ae&&(ke=null),Ae.sibling.return=Ae.return,Ae=Ae.sibling}}break;case 19:ea(u,s),ka(s),v&4&&_R(s);break;case 21:break;default:ea(u,s),ka(s)}}function ka(s){var u=s.flags;if(u&2){try{e:{for(var h=s.return;h!==null;){if(bR(h)){var v=h;break e}h=h.return}throw Error(r(160))}switch(v.tag){case 5:var P=v.stateNode;v.flags&32&&(an(P,""),v.flags&=-33);var I=wR(s);AS(s,I,P);break;case 3:case 4:var D=v.stateNode.containerInfo,W=wR(s);$S(s,W,D);break;default:throw Error(r(161))}}catch(J){un(s,s.return,J)}s.flags&=-3}u&4096&&(s.flags&=-4097)}function s6(s,u,h){Ke=s,PR(s)}function PR(s,u,h){for(var v=(s.mode&1)!==0;Ke!==null;){var P=Ke,I=P.child;if(P.tag===22&&v){var D=P.memoizedState!==null||Bv;if(!D){var W=P.alternate,J=W!==null&&W.memoizedState!==null||ui;W=Bv;var Se=ui;if(Bv=D,(ui=J)&&!Se)for(Ke=P;Ke!==null;)D=Ke,J=D.child,D.tag===22&&D.memoizedState!==null?TR(P):J!==null?(J.return=D,Ke=J):TR(P);for(;I!==null;)Ke=I,PR(I),I=I.sibling;Ke=P,Bv=W,ui=Se}CR(s)}else(P.subtreeFlags&8772)!==0&&I!==null?(I.return=P,Ke=I):CR(s)}}function CR(s){for(;Ke!==null;){var u=Ke;if((u.flags&8772)!==0){var h=u.alternate;try{if((u.flags&8772)!==0)switch(u.tag){case 0:case 11:case 15:ui||Vv(5,u);break;case 1:var v=u.stateNode;if(u.flags&4&&!ui)if(h===null)v.componentDidMount();else{var P=u.elementType===u.type?h.memoizedProps:Jo(u.type,h.memoizedProps);v.componentDidUpdate(P,h.memoizedState,v.__reactInternalSnapshotBeforeUpdate)}var I=u.updateQueue;I!==null&&EO(u,I,v);break;case 3:var D=u.updateQueue;if(D!==null){if(h=null,u.child!==null)switch(u.child.tag){case 5:h=u.child.stateNode;break;case 1:h=u.child.stateNode}EO(u,D,h)}break;case 5:var W=u.stateNode;if(h===null&&u.flags&4){h=W;var J=u.memoizedProps;switch(u.type){case"button":case"input":case"select":case"textarea":J.autoFocus&&h.focus();break;case"img":J.src&&(h.src=J.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(u.memoizedState===null){var Se=u.alternate;if(Se!==null){var ke=Se.memoizedState;if(ke!==null){var Ae=ke.dehydrated;Ae!==null&&Zs(Ae)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}ui||u.flags&512&&jS(u)}catch(Ie){un(u,u.return,Ie)}}if(u===s){Ke=null;break}if(h=u.sibling,h!==null){h.return=u.return,Ke=h;break}Ke=u.return}}function ER(s){for(;Ke!==null;){var u=Ke;if(u===s){Ke=null;break}var h=u.sibling;if(h!==null){h.return=u.return,Ke=h;break}Ke=u.return}}function TR(s){for(;Ke!==null;){var u=Ke;try{switch(u.tag){case 0:case 11:case 15:var h=u.return;try{Vv(4,u)}catch(J){un(u,h,J)}break;case 1:var v=u.stateNode;if(typeof v.componentDidMount=="function"){var P=u.return;try{v.componentDidMount()}catch(J){un(u,P,J)}}var I=u.return;try{jS(u)}catch(J){un(u,I,J)}break;case 5:var D=u.return;try{jS(u)}catch(J){un(u,D,J)}}}catch(J){un(u,u.return,J)}if(u===s){Ke=null;break}var W=u.sibling;if(W!==null){W.return=u.return,Ke=W;break}Ke=u.return}}var l6=Math.ceil,zv=k.ReactCurrentDispatcher,DS=k.ReactCurrentOwner,Eo=k.ReactCurrentBatchConfig,ir=0,Dn=null,Sn=null,Hn=0,to=0,rd=il(0),On=0,gh=null,Su=0,qv=0,MS=0,yh=null,ji=null,NS=0,nd=1/0,vs=null,Uv=!1,FS=null,cl=null,Hv=!1,dl=null,Wv=0,bh=0,LS=null,Kv=-1,Gv=0;function bi(){return(ir&6)!==0?Et():Kv!==-1?Kv:Kv=Et()}function fl(s){return(s.mode&1)===0?1:(ir&2)!==0&&Hn!==0?Hn&-Hn:Hz.transition!==null?(Gv===0&&(Gv=ov()),Gv):(s=sr,s!==0||(s=window.event,s=s===void 0?16:kr(s.type)),s)}function ta(s,u,h,v){if(50<bh)throw bh=0,LS=null,Error(r(185));du(s,h,v),((ir&2)===0||s!==Dn)&&(s===Dn&&((ir&2)===0&&(qv|=h),On===4&&hl(s,Hn)),$i(s,v),h===1&&ir===0&&(u.mode&1)===0&&(nd=Et()+500,_v&&al()))}function $i(s,u){var h=s.callbackNode;zf(s,u);var v=go(s,s===Dn?Hn:0);if(v===0)h!==null&&Gt(h),s.callbackNode=null,s.callbackPriority=0;else if(u=v&-v,s.callbackPriority!==u){if(h!=null&&Gt(h),u===1)s.tag===0?Uz(RR.bind(null,s)):pO(RR.bind(null,s)),Bz(function(){(ir&6)===0&&al()}),h=null;else{switch(av(v)){case 1:h=Fr;break;case 4:h=mi;break;case 16:h=ei;break;case 536870912:h=vi;break;default:h=ei}h=NR(h,OR.bind(null,s))}s.callbackPriority=u,s.callbackNode=h}}function OR(s,u){if(Kv=-1,Gv=0,(ir&6)!==0)throw Error(r(327));var h=s.callbackNode;if(id()&&s.callbackNode!==h)return null;var v=go(s,s===Dn?Hn:0);if(v===0)return null;if((v&30)!==0||(v&s.expiredLanes)!==0||u)u=Qv(s,v);else{u=v;var P=ir;ir|=2;var I=kR();(Dn!==s||Hn!==u)&&(vs=null,nd=Et()+500,xu(s,u));do try{d6();break}catch(W){IR(s,W)}while(!0);nS(),zv.current=I,ir=P,Sn!==null?u=0:(Dn=null,Hn=0,u=On)}if(u!==0){if(u===2&&(P=qf(s),P!==0&&(v=P,u=BS(s,P))),u===1)throw h=gh,xu(s,0),hl(s,v),$i(s,Et()),h;if(u===6)hl(s,v);else{if(P=s.current.alternate,(v&30)===0&&!u6(P)&&(u=Qv(s,v),u===2&&(I=qf(s),I!==0&&(v=I,u=BS(s,I))),u===1))throw h=gh,xu(s,0),hl(s,v),$i(s,Et()),h;switch(s.finishedWork=P,s.finishedLanes=v,u){case 0:case 1:throw Error(r(345));case 2:Pu(s,ji,vs);break;case 3:if(hl(s,v),(v&130023424)===v&&(u=NS+500-Et(),10<u)){if(go(s,0)!==0)break;if(P=s.suspendedLanes,(P&v)!==v){bi(),s.pingedLanes|=s.suspendedLanes&P;break}s.timeoutHandle=Ww(Pu.bind(null,s,ji,vs),u);break}Pu(s,ji,vs);break;case 4:if(hl(s,v),(v&4194240)===v)break;for(u=s.eventTimes,P=-1;0<v;){var D=31-ri(v);I=1<<D,D=u[D],D>P&&(P=D),v&=~I}if(v=P,v=Et()-v,v=(120>v?120:480>v?480:1080>v?1080:1920>v?1920:3e3>v?3e3:4320>v?4320:1960*l6(v/1960))-v,10<v){s.timeoutHandle=Ww(Pu.bind(null,s,ji,vs),v);break}Pu(s,ji,vs);break;case 5:Pu(s,ji,vs);break;default:throw Error(r(329))}}}return $i(s,Et()),s.callbackNode===h?OR.bind(null,s):null}function BS(s,u){var h=yh;return s.current.memoizedState.isDehydrated&&(xu(s,u).flags|=256),s=Qv(s,u),s!==2&&(u=ji,ji=h,u!==null&&VS(u)),s}function VS(s){ji===null?ji=s:ji.push.apply(ji,s)}function u6(s){for(var u=s;;){if(u.flags&16384){var h=u.updateQueue;if(h!==null&&(h=h.stores,h!==null))for(var v=0;v<h.length;v++){var P=h[v],I=P.getSnapshot;P=P.value;try{if(!Yo(I(),P))return!1}catch{return!1}}}if(h=u.child,u.subtreeFlags&16384&&h!==null)h.return=u,u=h;else{if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function hl(s,u){for(u&=~MS,u&=~qv,s.suspendedLanes|=u,s.pingedLanes&=~u,s=s.expirationTimes;0<u;){var h=31-ri(u),v=1<<h;s[h]=-1,u&=~v}}function RR(s){if((ir&6)!==0)throw Error(r(327));id();var u=go(s,0);if((u&1)===0)return $i(s,Et()),null;var h=Qv(s,u);if(s.tag!==0&&h===2){var v=qf(s);v!==0&&(u=v,h=BS(s,v))}if(h===1)throw h=gh,xu(s,0),hl(s,u),$i(s,Et()),h;if(h===6)throw Error(r(345));return s.finishedWork=s.current.alternate,s.finishedLanes=u,Pu(s,ji,vs),$i(s,Et()),null}function zS(s,u){var h=ir;ir|=1;try{return s(u)}finally{ir=h,ir===0&&(nd=Et()+500,_v&&al())}}function _u(s){dl!==null&&dl.tag===0&&(ir&6)===0&&id();var u=ir;ir|=1;var h=Eo.transition,v=sr;try{if(Eo.transition=null,sr=1,s)return s()}finally{sr=v,Eo.transition=h,ir=u,(ir&6)===0&&al()}}function qS(){to=rd.current,Br(rd)}function xu(s,u){s.finishedWork=null,s.finishedLanes=0;var h=s.timeoutHandle;if(h!==-1&&(s.timeoutHandle=-1,Lz(h)),Sn!==null)for(h=Sn.return;h!==null;){var v=h;switch(Jw(v),v.tag){case 1:v=v.type.childContextTypes,v!=null&&wv();break;case 3:Zc(),Br(Ri),Br(ai),dS();break;case 5:uS(v);break;case 4:Zc();break;case 13:Br(Zr);break;case 19:Br(Zr);break;case 10:iS(v.type._context);break;case 22:case 23:qS()}h=h.return}if(Dn=s,Sn=s=pl(s.current,null),Hn=to=u,On=0,gh=null,MS=qv=Su=0,ji=yh=null,yu!==null){for(u=0;u<yu.length;u++)if(h=yu[u],v=h.interleaved,v!==null){h.interleaved=null;var P=v.next,I=h.pending;if(I!==null){var D=I.next;I.next=P,v.next=D}h.pending=v}yu=null}return s}function IR(s,u){do{var h=Sn;try{if(nS(),jv.current=Mv,$v){for(var v=en.memoizedState;v!==null;){var P=v.queue;P!==null&&(P.pending=null),v=v.next}$v=!1}if(wu=0,An=Tn=en=null,dh=!1,fh=0,DS.current=null,h===null||h.return===null){On=1,gh=u,Sn=null;break}e:{var I=s,D=h.return,W=h,J=u;if(u=Hn,W.flags|=32768,J!==null&&typeof J=="object"&&typeof J.then=="function"){var Se=J,ke=W,Ae=ke.tag;if((ke.mode&1)===0&&(Ae===0||Ae===11||Ae===15)){var Ie=ke.alternate;Ie?(ke.updateQueue=Ie.updateQueue,ke.memoizedState=Ie.memoizedState,ke.lanes=Ie.lanes):(ke.updateQueue=null,ke.memoizedState=null)}var He=tR(D);if(He!==null){He.flags&=-257,rR(He,D,W,I,u),He.mode&1&&eR(I,Se,u),u=He,J=Se;var Xe=u.updateQueue;if(Xe===null){var et=new Set;et.add(J),u.updateQueue=et}else Xe.add(J);break e}else{if((u&1)===0){eR(I,Se,u),US();break e}J=Error(r(426))}}else if(Gr&&W.mode&1){var yn=tR(D);if(yn!==null){(yn.flags&65536)===0&&(yn.flags|=256),rR(yn,D,W,I,u),tS(ed(J,W));break e}}I=J=ed(J,W),On!==4&&(On=2),yh===null?yh=[I]:yh.push(I),I=D;do{switch(I.tag){case 3:I.flags|=65536,u&=-u,I.lanes|=u;var fe=JO(I,J,u);CO(I,fe);break e;case 1:W=J;var re=I.type,me=I.stateNode;if((I.flags&128)===0&&(typeof re.getDerivedStateFromError=="function"||me!==null&&typeof me.componentDidCatch=="function"&&(cl===null||!cl.has(me)))){I.flags|=65536,u&=-u,I.lanes|=u;var Fe=ZO(I,W,u);CO(I,Fe);break e}}I=I.return}while(I!==null)}$R(h)}catch(nt){u=nt,Sn===h&&h!==null&&(Sn=h=h.return);continue}break}while(!0)}function kR(){var s=zv.current;return zv.current=Mv,s===null?Mv:s}function US(){(On===0||On===3||On===2)&&(On=4),Dn===null||(Su&268435455)===0&&(qv&268435455)===0||hl(Dn,Hn)}function Qv(s,u){var h=ir;ir|=2;var v=kR();(Dn!==s||Hn!==u)&&(vs=null,xu(s,u));do try{c6();break}catch(P){IR(s,P)}while(!0);if(nS(),ir=h,zv.current=v,Sn!==null)throw Error(r(261));return Dn=null,Hn=0,On}function c6(){for(;Sn!==null;)jR(Sn)}function d6(){for(;Sn!==null&&!it();)jR(Sn)}function jR(s){var u=MR(s.alternate,s,to);s.memoizedProps=s.pendingProps,u===null?$R(s):Sn=u,DS.current=null}function $R(s){var u=s;do{var h=u.alternate;if(s=u.return,(u.flags&32768)===0){if(h=n6(h,u,to),h!==null){Sn=h;return}}else{if(h=i6(h,u),h!==null){h.flags&=32767,Sn=h;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{On=6,Sn=null;return}}if(u=u.sibling,u!==null){Sn=u;return}Sn=u=s}while(u!==null);On===0&&(On=5)}function Pu(s,u,h){var v=sr,P=Eo.transition;try{Eo.transition=null,sr=1,f6(s,u,h,v)}finally{Eo.transition=P,sr=v}return null}function f6(s,u,h,v){do id();while(dl!==null);if((ir&6)!==0)throw Error(r(327));h=s.finishedWork;var P=s.finishedLanes;if(h===null)return null;if(s.finishedWork=null,s.finishedLanes=0,h===s.current)throw Error(r(177));s.callbackNode=null,s.callbackPriority=0;var I=h.lanes|h.childLanes;if(Pw(s,I),s===Dn&&(Sn=Dn=null,Hn=0),(h.subtreeFlags&2064)===0&&(h.flags&2064)===0||Hv||(Hv=!0,NR(ei,function(){return id(),null})),I=(h.flags&15990)!==0,(h.subtreeFlags&15990)!==0||I){I=Eo.transition,Eo.transition=null;var D=sr;sr=1;var W=ir;ir|=4,DS.current=null,a6(s,h),xR(h,s),jz(Uw),z=!!qw,Uw=qw=null,s.current=h,s6(h),Ct(),ir=W,sr=D,Eo.transition=I}else s.current=h;if(Hv&&(Hv=!1,dl=s,Wv=P),I=s.pendingLanes,I===0&&(cl=null),as(h.stateNode),$i(s,Et()),u!==null)for(v=s.onRecoverableError,h=0;h<u.length;h++)P=u[h],v(P.value,{componentStack:P.stack,digest:P.digest});if(Uv)throw Uv=!1,s=FS,FS=null,s;return(Wv&1)!==0&&s.tag!==0&&id(),I=s.pendingLanes,(I&1)!==0?s===LS?bh++:(bh=0,LS=s):bh=0,al(),null}function id(){if(dl!==null){var s=av(Wv),u=Eo.transition,h=sr;try{if(Eo.transition=null,sr=16>s?16:s,dl===null)var v=!1;else{if(s=dl,dl=null,Wv=0,(ir&6)!==0)throw Error(r(331));var P=ir;for(ir|=4,Ke=s.current;Ke!==null;){var I=Ke,D=I.child;if((Ke.flags&16)!==0){var W=I.deletions;if(W!==null){for(var J=0;J<W.length;J++){var Se=W[J];for(Ke=Se;Ke!==null;){var ke=Ke;switch(ke.tag){case 0:case 11:case 15:vh(8,ke,I)}var Ae=ke.child;if(Ae!==null)Ae.return=ke,Ke=Ae;else for(;Ke!==null;){ke=Ke;var Ie=ke.sibling,He=ke.return;if(yR(ke),ke===Se){Ke=null;break}if(Ie!==null){Ie.return=He,Ke=Ie;break}Ke=He}}}var Xe=I.alternate;if(Xe!==null){var et=Xe.child;if(et!==null){Xe.child=null;do{var yn=et.sibling;et.sibling=null,et=yn}while(et!==null)}}Ke=I}}if((I.subtreeFlags&2064)!==0&&D!==null)D.return=I,Ke=D;else e:for(;Ke!==null;){if(I=Ke,(I.flags&2048)!==0)switch(I.tag){case 0:case 11:case 15:vh(9,I,I.return)}var fe=I.sibling;if(fe!==null){fe.return=I.return,Ke=fe;break e}Ke=I.return}}var re=s.current;for(Ke=re;Ke!==null;){D=Ke;var me=D.child;if((D.subtreeFlags&2064)!==0&&me!==null)me.return=D,Ke=me;else e:for(D=re;Ke!==null;){if(W=Ke,(W.flags&2048)!==0)try{switch(W.tag){case 0:case 11:case 15:Vv(9,W)}}catch(nt){un(W,W.return,nt)}if(W===D){Ke=null;break e}var Fe=W.sibling;if(Fe!==null){Fe.return=W.return,Ke=Fe;break e}Ke=W.return}}if(ir=P,al(),ln&&typeof ln.onPostCommitFiberRoot=="function")try{ln.onPostCommitFiberRoot(gi,s)}catch{}v=!0}return v}finally{sr=h,Eo.transition=u}}return!1}function AR(s,u,h){u=ed(h,u),u=JO(s,u,1),s=ll(s,u,1),u=bi(),s!==null&&(du(s,1,u),$i(s,u))}function un(s,u,h){if(s.tag===3)AR(s,s,h);else for(;u!==null;){if(u.tag===3){AR(u,s,h);break}else if(u.tag===1){var v=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(cl===null||!cl.has(v))){s=ed(h,s),s=ZO(u,s,1),u=ll(u,s,1),s=bi(),u!==null&&(du(u,1,s),$i(u,s));break}}u=u.return}}function h6(s,u,h){var v=s.pingCache;v!==null&&v.delete(u),u=bi(),s.pingedLanes|=s.suspendedLanes&h,Dn===s&&(Hn&h)===h&&(On===4||On===3&&(Hn&130023424)===Hn&&500>Et()-NS?xu(s,0):MS|=h),$i(s,u)}function DR(s,u){u===0&&((s.mode&1)===0?u=1:(u=ss,ss<<=1,(ss&130023424)===0&&(ss=4194304)));var h=bi();s=hs(s,u),s!==null&&(du(s,u,h),$i(s,h))}function p6(s){var u=s.memoizedState,h=0;u!==null&&(h=u.retryLane),DR(s,h)}function m6(s,u){var h=0;switch(s.tag){case 13:var v=s.stateNode,P=s.memoizedState;P!==null&&(h=P.retryLane);break;case 19:v=s.stateNode;break;default:throw Error(r(314))}v!==null&&v.delete(u),DR(s,h)}var MR;MR=function(s,u,h){if(s!==null)if(s.memoizedProps!==u.pendingProps||Ri.current)ki=!0;else{if((s.lanes&h)===0&&(u.flags&128)===0)return ki=!1,r6(s,u,h);ki=(s.flags&131072)!==0}else ki=!1,Gr&&(u.flags&1048576)!==0&&mO(u,Pv,u.index);switch(u.lanes=0,u.tag){case 2:var v=u.type;Lv(s,u),s=u.pendingProps;var P=Wc(u,ai.current);Jc(u,h),P=pS(null,u,v,s,P,h);var I=mS();return u.flags|=1,typeof P=="object"&&P!==null&&typeof P.render=="function"&&P.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,Ii(v)?(I=!0,Sv(u)):I=!1,u.memoizedState=P.state!==null&&P.state!==void 0?P.state:null,sS(u),P.updater=Nv,u.stateNode=P,P._reactInternals=u,SS(u,v,s,h),u=CS(null,u,v,!0,I,h)):(u.tag=0,Gr&&I&&Xw(u),yi(null,u,P,h),u=u.child),u;case 16:v=u.elementType;e:{switch(Lv(s,u),s=u.pendingProps,P=v._init,v=P(v._payload),u.type=v,P=u.tag=g6(v),s=Jo(v,s),P){case 0:u=PS(null,u,v,s,h);break e;case 1:u=lR(null,u,v,s,h);break e;case 11:u=nR(null,u,v,s,h);break e;case 14:u=iR(null,u,v,Jo(v.type,s),h);break e}throw Error(r(306,v,""))}return u;case 0:return v=u.type,P=u.pendingProps,P=u.elementType===v?P:Jo(v,P),PS(s,u,v,P,h);case 1:return v=u.type,P=u.pendingProps,P=u.elementType===v?P:Jo(v,P),lR(s,u,v,P,h);case 3:e:{if(uR(u),s===null)throw Error(r(387));v=u.pendingProps,I=u.memoizedState,P=I.element,PO(s,u),Iv(u,v,null,h);var D=u.memoizedState;if(v=D.element,I.isDehydrated)if(I={element:v,isDehydrated:!1,cache:D.cache,pendingSuspenseBoundaries:D.pendingSuspenseBoundaries,transitions:D.transitions},u.updateQueue.baseState=I,u.memoizedState=I,u.flags&256){P=ed(Error(r(423)),u),u=cR(s,u,v,h,P);break e}else if(v!==P){P=ed(Error(r(424)),u),u=cR(s,u,v,h,P);break e}else for(eo=nl(u.stateNode.containerInfo.firstChild),Zi=u,Gr=!0,Xo=null,h=_O(u,null,v,h),u.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(Qc(),v===P){u=ms(s,u,h);break e}yi(s,u,v,h)}u=u.child}return u;case 5:return TO(u),s===null&&eS(u),v=u.type,P=u.pendingProps,I=s!==null?s.memoizedProps:null,D=P.children,Hw(v,P)?D=null:I!==null&&Hw(v,I)&&(u.flags|=32),sR(s,u),yi(s,u,D,h),u.child;case 6:return s===null&&eS(u),null;case 13:return dR(s,u,h);case 4:return lS(u,u.stateNode.containerInfo),v=u.pendingProps,s===null?u.child=Yc(u,null,v,h):yi(s,u,v,h),u.child;case 11:return v=u.type,P=u.pendingProps,P=u.elementType===v?P:Jo(v,P),nR(s,u,v,P,h);case 7:return yi(s,u,u.pendingProps,h),u.child;case 8:return yi(s,u,u.pendingProps.children,h),u.child;case 12:return yi(s,u,u.pendingProps.children,h),u.child;case 10:e:{if(v=u.type._context,P=u.pendingProps,I=u.memoizedProps,D=P.value,$r(Tv,v._currentValue),v._currentValue=D,I!==null)if(Yo(I.value,D)){if(I.children===P.children&&!Ri.current){u=ms(s,u,h);break e}}else for(I=u.child,I!==null&&(I.return=u);I!==null;){var W=I.dependencies;if(W!==null){D=I.child;for(var J=W.firstContext;J!==null;){if(J.context===v){if(I.tag===1){J=ps(-1,h&-h),J.tag=2;var Se=I.updateQueue;if(Se!==null){Se=Se.shared;var ke=Se.pending;ke===null?J.next=J:(J.next=ke.next,ke.next=J),Se.pending=J}}I.lanes|=h,J=I.alternate,J!==null&&(J.lanes|=h),oS(I.return,h,u),W.lanes|=h;break}J=J.next}}else if(I.tag===10)D=I.type===u.type?null:I.child;else if(I.tag===18){if(D=I.return,D===null)throw Error(r(341));D.lanes|=h,W=D.alternate,W!==null&&(W.lanes|=h),oS(D,h,u),D=I.sibling}else D=I.child;if(D!==null)D.return=I;else for(D=I;D!==null;){if(D===u){D=null;break}if(I=D.sibling,I!==null){I.return=D.return,D=I;break}D=D.return}I=D}yi(s,u,P.children,h),u=u.child}return u;case 9:return P=u.type,v=u.pendingProps.children,Jc(u,h),P=Po(P),v=v(P),u.flags|=1,yi(s,u,v,h),u.child;case 14:return v=u.type,P=Jo(v,u.pendingProps),P=Jo(v.type,P),iR(s,u,v,P,h);case 15:return oR(s,u,u.type,u.pendingProps,h);case 17:return v=u.type,P=u.pendingProps,P=u.elementType===v?P:Jo(v,P),Lv(s,u),u.tag=1,Ii(v)?(s=!0,Sv(u)):s=!1,Jc(u,h),YO(u,v,P),SS(u,v,P,h),CS(null,u,v,!0,s,h);case 19:return hR(s,u,h);case 22:return aR(s,u,h)}throw Error(r(156,u.tag))};function NR(s,u){return ft(s,u)}function v6(s,u,h,v){this.tag=s,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function To(s,u,h,v){return new v6(s,u,h,v)}function HS(s){return s=s.prototype,!(!s||!s.isReactComponent)}function g6(s){if(typeof s=="function")return HS(s)?1:0;if(s!=null){if(s=s.$$typeof,s===se)return 11;if(s===X)return 14}return 2}function pl(s,u){var h=s.alternate;return h===null?(h=To(s.tag,u,s.key,s.mode),h.elementType=s.elementType,h.type=s.type,h.stateNode=s.stateNode,h.alternate=s,s.alternate=h):(h.pendingProps=u,h.type=s.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=s.flags&14680064,h.childLanes=s.childLanes,h.lanes=s.lanes,h.child=s.child,h.memoizedProps=s.memoizedProps,h.memoizedState=s.memoizedState,h.updateQueue=s.updateQueue,u=s.dependencies,h.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},h.sibling=s.sibling,h.index=s.index,h.ref=s.ref,h}function Yv(s,u,h,v,P,I){var D=2;if(v=s,typeof s=="function")HS(s)&&(D=1);else if(typeof s=="string")D=5;else e:switch(s){case T:return Cu(h.children,P,I,u);case A:D=8,P|=8;break;case M:return s=To(12,h,u,P|2),s.elementType=M,s.lanes=I,s;case ie:return s=To(13,h,u,P),s.elementType=ie,s.lanes=I,s;case N:return s=To(19,h,u,P),s.elementType=N,s.lanes=I,s;case ne:return Xv(h,P,I,u);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case B:D=10;break e;case Q:D=9;break e;case se:D=11;break e;case X:D=14;break e;case ce:D=16,v=null;break e}throw Error(r(130,s==null?s:typeof s,""))}return u=To(D,h,u,P),u.elementType=s,u.type=v,u.lanes=I,u}function Cu(s,u,h,v){return s=To(7,s,v,u),s.lanes=h,s}function Xv(s,u,h,v){return s=To(22,s,v,u),s.elementType=ne,s.lanes=h,s.stateNode={isHidden:!1},s}function WS(s,u,h){return s=To(6,s,null,u),s.lanes=h,s}function KS(s,u,h){return u=To(4,s.children!==null?s.children:[],s.key,u),u.lanes=h,u.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},u}function y6(s,u,h,v,P){this.tag=u,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ac(0),this.expirationTimes=Ac(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ac(0),this.identifierPrefix=v,this.onRecoverableError=P,this.mutableSourceEagerHydrationData=null}function GS(s,u,h,v,P,I,D,W,J){return s=new y6(s,u,h,W,J),u===1?(u=1,I===!0&&(u|=8)):u=0,I=To(3,null,null,u),s.current=I,I.stateNode=s,I.memoizedState={element:v,isDehydrated:h,cache:null,transitions:null,pendingSuspenseBoundaries:null},sS(I),s}function b6(s,u,h){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:v==null?null:""+v,children:s,containerInfo:u,implementation:h}}function FR(s){if(!s)return ol;s=s._reactInternals;e:{if(ot(s)!==s||s.tag!==1)throw Error(r(170));var u=s;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(Ii(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(r(171))}if(s.tag===1){var h=s.type;if(Ii(h))return fO(s,h,u)}return u}function LR(s,u,h,v,P,I,D,W,J){return s=GS(h,v,!0,s,P,I,D,W,J),s.context=FR(null),h=s.current,v=bi(),P=fl(h),I=ps(v,P),I.callback=u??null,ll(h,I,P),s.current.lanes=P,du(s,P,v),$i(s,v),s}function Jv(s,u,h,v){var P=u.current,I=bi(),D=fl(P);return h=FR(h),u.context===null?u.context=h:u.pendingContext=h,u=ps(I,D),u.payload={element:s},v=v===void 0?null:v,v!==null&&(u.callback=v),s=ll(P,u,D),s!==null&&(ta(s,P,D,I),Rv(s,P,D)),D}function Zv(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function BR(s,u){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<u?h:u}}function QS(s,u){BR(s,u),(s=s.alternate)&&BR(s,u)}function w6(){return null}var VR=typeof reportError=="function"?reportError:function(s){console.error(s)};function YS(s){this._internalRoot=s}eg.prototype.render=YS.prototype.render=function(s){var u=this._internalRoot;if(u===null)throw Error(r(409));Jv(s,u,null,null)},eg.prototype.unmount=YS.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var u=s.containerInfo;_u(function(){Jv(null,s,null,null)}),u[us]=null}};function eg(s){this._internalRoot=s}eg.prototype.unstable_scheduleHydration=function(s){if(s){var u=lv();s={blockedOn:null,target:s,priority:u};for(var h=0;h<So.length&&u!==0&&u<So[h].priority;h++);So.splice(h,0,s),h===0&&Kf(s)}};function XS(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function tg(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function zR(){}function S6(s,u,h,v,P){if(P){if(typeof v=="function"){var I=v;v=function(){var Se=Zv(D);I.call(Se)}}var D=LR(u,v,s,0,null,!1,!1,"",zR);return s._reactRootContainer=D,s[us]=D.current,nh(s.nodeType===8?s.parentNode:s),_u(),D}for(;P=s.lastChild;)s.removeChild(P);if(typeof v=="function"){var W=v;v=function(){var Se=Zv(J);W.call(Se)}}var J=GS(s,0,!1,null,null,!1,!1,"",zR);return s._reactRootContainer=J,s[us]=J.current,nh(s.nodeType===8?s.parentNode:s),_u(function(){Jv(u,J,h,v)}),J}function rg(s,u,h,v,P){var I=h._reactRootContainer;if(I){var D=I;if(typeof P=="function"){var W=P;P=function(){var J=Zv(D);W.call(J)}}Jv(u,D,s,P)}else D=S6(h,u,s,P,v);return Zv(D)}sv=function(s){switch(s.tag){case 3:var u=s.stateNode;if(u.current.memoizedState.isDehydrated){var h=Ca(u.pendingLanes);h!==0&&(Uf(u,h|1),$i(u,Et()),(ir&6)===0&&(nd=Et()+500,al()))}break;case 13:_u(function(){var v=hs(s,1);if(v!==null){var P=bi();ta(v,s,1,P)}}),QS(s,1)}},Hf=function(s){if(s.tag===13){var u=hs(s,134217728);if(u!==null){var h=bi();ta(u,s,134217728,h)}QS(s,134217728)}},Dc=function(s){if(s.tag===13){var u=fl(s),h=hs(s,u);if(h!==null){var v=bi();ta(h,s,u,v)}QS(s,u)}},lv=function(){return sr},uv=function(s,u){var h=sr;try{return sr=s,u()}finally{sr=h}},Pa=function(s,u,h){switch(u){case"input":if(Ge(s,h),u=h.name,h.type==="radio"&&u!=null){for(h=s;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll("input[name="+JSON.stringify(""+u)+'][type="radio"]'),u=0;u<h.length;u++){var v=h[u];if(v!==s&&v.form===s.form){var P=bv(v);if(!P)throw Error(r(90));K(v),Ge(v,P)}}}break;case"textarea":on(s,h);break;case"select":u=h.value,u!=null&&jt(s,!!h.multiple,u,!1)}},ye=zS,xe=_u;var _6={usingClientEntryPoint:!1,Events:[ah,Uc,bv,Ji,le,zS]},wh={findFiberByHostInstance:pu,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},x6={bundleType:wh.bundleType,version:wh.version,rendererPackageName:wh.rendererPackageName,rendererConfig:wh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=At(s),s===null?null:s.stateNode},findFiberByHostInstance:wh.findFiberByHostInstance||w6,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ng=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ng.isDisabled&&ng.supportsFiber)try{gi=ng.inject(x6),ln=ng}catch{}}return Ai.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_6,Ai.createPortal=function(s,u){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!XS(u))throw Error(r(200));return b6(s,u,null,h)},Ai.createRoot=function(s,u){if(!XS(s))throw Error(r(299));var h=!1,v="",P=VR;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onRecoverableError!==void 0&&(P=u.onRecoverableError)),u=GS(s,1,!1,null,null,h,!1,v,P),s[us]=u.current,nh(s.nodeType===8?s.parentNode:s),new YS(u)},Ai.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var u=s._reactInternals;if(u===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=At(u),s=s===null?null:s.stateNode,s},Ai.flushSync=function(s){return _u(s)},Ai.hydrate=function(s,u,h){if(!tg(u))throw Error(r(200));return rg(null,s,u,!0,h)},Ai.hydrateRoot=function(s,u,h){if(!XS(s))throw Error(r(405));var v=h!=null&&h.hydratedSources||null,P=!1,I="",D=VR;if(h!=null&&(h.unstable_strictMode===!0&&(P=!0),h.identifierPrefix!==void 0&&(I=h.identifierPrefix),h.onRecoverableError!==void 0&&(D=h.onRecoverableError)),u=LR(u,null,s,1,h??null,P,!1,I,D),s[us]=u.current,nh(s),v)for(s=0;s<v.length;s++)h=v[s],P=h._getVersion,P=P(h._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[h,P]:u.mutableSourceEagerHydrationData.push(h,P);return new eg(u)},Ai.render=function(s,u,h){if(!tg(u))throw Error(r(200));return rg(null,s,u,!1,h)},Ai.unmountComponentAtNode=function(s){if(!tg(s))throw Error(r(40));return s._reactRootContainer?(_u(function(){rg(null,null,s,!1,function(){s._reactRootContainer=null,s[us]=null})}),!0):!1},Ai.unstable_batchedUpdates=zS,Ai.unstable_renderSubtreeIntoContainer=function(s,u,h,v){if(!tg(h))throw Error(r(200));if(s==null||s._reactInternals===void 0)throw Error(r(38));return rg(s,u,h,!1,v)},Ai.version="18.3.1-next-f1338f8080-20240426",Ai}var YR;function cM(){if(YR)return e1.exports;YR=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),e1.exports=$6(),e1.exports}var XR;function A6(){if(XR)return og;XR=1;var e=cM();return og.createRoot=e.createRoot,og.hydrateRoot=e.hydrateRoot,og}var D6=A6();const M6={BASE_URL:"/",DEV:!1,GIT_BRANCH_NAME:"HEAD",GIT_COMMIT_HASH:"712ebec",MODE:"production",PACKAGE_VERSION:"1.0.1",PROD:!0,REACT_APP_ENDPOINT_HOST:"",REACT_APP_ENDPOINT_PORT:"",REACT_APP_ENDPOINT_SERVER_URL:"/endpoint",REACT_APP_GRAPHQL_SERVER_URL:"/graphql",REACT_APP_SWAGGER_SERVER_URL:"/api",SSR:!1},Oy=e=>{var n;const t=M6[e];return((n=window.__env__)==null?void 0:n[e])||t};function N6(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function F6(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var L6=function(){function e(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(F6(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=N6(i);try{o.insertRule(n,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0},e}(),ci="-ms-",ib="-moz-",hr="-webkit-",dM="comm",JP="rule",ZP="decl",B6="@import",fM="@keyframes",V6="@layer",z6=Math.abs,a0=String.fromCharCode,q6=Object.assign;function U6(e,t){return Yn(e,0)^45?(((t<<2^Yn(e,0))<<2^Yn(e,1))<<2^Yn(e,2))<<2^Yn(e,3):0}function hM(e){return e.trim()}function H6(e,t){return(e=t.exec(e))?e[0]:e}function pr(e,t,r){return e.replace(t,r)}function tx(e,t){return e.indexOf(t)}function Yn(e,t){return e.charCodeAt(t)|0}function Op(e,t,r){return e.slice(t,r)}function Ma(e){return e.length}function eC(e){return e.length}function ag(e,t){return t.push(e),e}function W6(e,t){return e.map(t).join("")}var s0=1,Zd=1,pM=0,Vi=0,Cn=0,_f="";function l0(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:s0,column:Zd,length:a,return:""}}function _h(e,t){return q6(l0("",null,null,"",null,null,0),e,{length:-e.length},t)}function K6(){return Cn}function G6(){return Cn=Vi>0?Yn(_f,--Vi):0,Zd--,Cn===10&&(Zd=1,s0--),Cn}function so(){return Cn=Vi<pM?Yn(_f,Vi++):0,Zd++,Cn===10&&(Zd=1,s0++),Cn}function Ua(){return Yn(_f,Vi)}function Ry(){return Vi}function Sm(e,t){return Op(_f,e,t)}function Rp(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function mM(e){return s0=Zd=1,pM=Ma(_f=e),Vi=0,[]}function vM(e){return _f="",e}function Iy(e){return hM(Sm(Vi-1,rx(e===91?e+2:e===40?e+1:e)))}function Q6(e){for(;(Cn=Ua())&&Cn<33;)so();return Rp(e)>2||Rp(Cn)>3?"":" "}function Y6(e,t){for(;--t&&so()&&!(Cn<48||Cn>102||Cn>57&&Cn<65||Cn>70&&Cn<97););return Sm(e,Ry()+(t<6&&Ua()==32&&so()==32))}function rx(e){for(;so();)switch(Cn){case e:return Vi;case 34:case 39:e!==34&&e!==39&&rx(Cn);break;case 40:e===41&&rx(e);break;case 92:so();break}return Vi}function X6(e,t){for(;so()&&e+Cn!==57;)if(e+Cn===84&&Ua()===47)break;return"/*"+Sm(t,Vi-1)+"*"+a0(e===47?e:so())}function J6(e){for(;!Rp(Ua());)so();return Sm(e,Vi)}function Z6(e){return vM(ky("",null,null,null,[""],e=mM(e),0,[0],e))}function ky(e,t,r,n,i,o,a,l,c){for(var d=0,f=0,p=a,m=0,g=0,b=0,y=1,w=1,_=1,S=0,C="",k=i,E=o,R=n,T=C;w;)switch(b=S,S=so()){case 40:if(b!=108&&Yn(T,p-1)==58){tx(T+=pr(Iy(S),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:T+=Iy(S);break;case 9:case 10:case 13:case 32:T+=Q6(b);break;case 92:T+=Y6(Ry()-1,7);continue;case 47:switch(Ua()){case 42:case 47:ag(e8(X6(so(),Ry()),t,r),c);break;default:T+="/"}break;case 123*y:l[d++]=Ma(T)*_;case 125*y:case 59:case 0:switch(S){case 0:case 125:w=0;case 59+f:_==-1&&(T=pr(T,/\f/g,"")),g>0&&Ma(T)-p&&ag(g>32?ZR(T+";",n,r,p-1):ZR(pr(T," ","")+";",n,r,p-2),c);break;case 59:T+=";";default:if(ag(R=JR(T,t,r,d,f,i,l,C,k=[],E=[],p),o),S===123)if(f===0)ky(T,t,R,R,k,o,p,l,E);else switch(m===99&&Yn(T,3)===110?100:m){case 100:case 108:case 109:case 115:ky(e,R,R,n&&ag(JR(e,R,R,0,0,i,l,C,i,k=[],p),E),i,E,p,l,n?k:E);break;default:ky(T,R,R,R,[""],E,0,l,E)}}d=f=g=0,y=_=1,C=T="",p=a;break;case 58:p=1+Ma(T),g=b;default:if(y<1){if(S==123)--y;else if(S==125&&y++==0&&G6()==125)continue}switch(T+=a0(S),S*y){case 38:_=f>0?1:(T+="\f",-1);break;case 44:l[d++]=(Ma(T)-1)*_,_=1;break;case 64:Ua()===45&&(T+=Iy(so())),m=Ua(),f=p=Ma(C=T+=J6(Ry())),S++;break;case 45:b===45&&Ma(T)==2&&(y=0)}}return o}function JR(e,t,r,n,i,o,a,l,c,d,f){for(var p=i-1,m=i===0?o:[""],g=eC(m),b=0,y=0,w=0;b<n;++b)for(var _=0,S=Op(e,p+1,p=z6(y=a[b])),C=e;_<g;++_)(C=hM(y>0?m[_]+" "+S:pr(S,/&\f/g,m[_])))&&(c[w++]=C);return l0(e,t,r,i===0?JP:l,c,d,f)}function e8(e,t,r){return l0(e,t,r,dM,a0(K6()),Op(e,2,-2),0)}function ZR(e,t,r,n){return l0(e,t,r,ZP,Op(e,0,n),Op(e,n+1,-1),n)}function qd(e,t){for(var r="",n=eC(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function t8(e,t,r,n){switch(e.type){case V6:if(e.children.length)break;case B6:case ZP:return e.return=e.return||e.value;case dM:return"";case fM:return e.return=e.value+"{"+qd(e.children,n)+"}";case JP:e.value=e.props.join(",")}return Ma(r=qd(e.children,n))?e.return=e.value+"{"+r+"}":""}function r8(e){var t=eC(e);return function(r,n,i,o){for(var a="",l=0;l<t;l++)a+=e[l](r,n,i,o)||"";return a}}function n8(e){return function(t){t.root||(t=t.return)&&e(t)}}var eI=function(t){var r=new WeakMap;return function(n){if(r.has(n))return r.get(n);var i=t(n);return r.set(n,i),i}};function gM(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var i8=function(t,r,n){for(var i=0,o=0;i=o,o=Ua(),i===38&&o===12&&(r[n]=1),!Rp(o);)so();return Sm(t,Vi)},o8=function(t,r){var n=-1,i=44;do switch(Rp(i)){case 0:i===38&&Ua()===12&&(r[n]=1),t[n]+=i8(Vi-1,r,n);break;case 2:t[n]+=Iy(i);break;case 4:if(i===44){t[++n]=Ua()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=a0(i)}while(i=so());return t},a8=function(t,r){return vM(o8(mM(t),r))},tI=new WeakMap,s8=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!tI.get(n))&&!i){tI.set(t,!0);for(var o=[],a=a8(r,o),l=n.props,c=0,d=0;c<a.length;c++)for(var f=0;f<l.length;f++,d++)t.props[d]=o[c]?a[c].replace(/&\f/g,l[f]):l[f]+" "+a[c]}}},l8=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function yM(e,t){switch(U6(e,t)){case 5103:return hr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return hr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return hr+e+ib+e+ci+e+e;case 6828:case 4268:return hr+e+ci+e+e;case 6165:return hr+e+ci+"flex-"+e+e;case 5187:return hr+e+pr(e,/(\w+).+(:[^]+)/,hr+"box-$1$2"+ci+"flex-$1$2")+e;case 5443:return hr+e+ci+"flex-item-"+pr(e,/flex-|-self/,"")+e;case 4675:return hr+e+ci+"flex-line-pack"+pr(e,/align-content|flex-|-self/,"")+e;case 5548:return hr+e+ci+pr(e,"shrink","negative")+e;case 5292:return hr+e+ci+pr(e,"basis","preferred-size")+e;case 6060:return hr+"box-"+pr(e,"-grow","")+hr+e+ci+pr(e,"grow","positive")+e;case 4554:return hr+pr(e,/([^-])(transform)/g,"$1"+hr+"$2")+e;case 6187:return pr(pr(pr(e,/(zoom-|grab)/,hr+"$1"),/(image-set)/,hr+"$1"),e,"")+e;case 5495:case 3959:return pr(e,/(image-set\([^]*)/,hr+"$1$`$1");case 4968:return pr(pr(e,/(.+:)(flex-)?(.*)/,hr+"box-pack:$3"+ci+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+hr+e+e;case 4095:case 3583:case 4068:case 2532:return pr(e,/(.+)-inline(.+)/,hr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ma(e)-1-t>6)switch(Yn(e,t+1)){case 109:if(Yn(e,t+4)!==45)break;case 102:return pr(e,/(.+:)(.+)-([^]+)/,"$1"+hr+"$2-$3$1"+ib+(Yn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~tx(e,"stretch")?yM(pr(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Yn(e,t+1)!==115)break;case 6444:switch(Yn(e,Ma(e)-3-(~tx(e,"!important")&&10))){case 107:return pr(e,":",":"+hr)+e;case 101:return pr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+hr+(Yn(e,14)===45?"inline-":"")+"box$3$1"+hr+"$2$3$1"+ci+"$2box$3")+e}break;case 5936:switch(Yn(e,t+11)){case 114:return hr+e+ci+pr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return hr+e+ci+pr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return hr+e+ci+pr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return hr+e+ci+e+e}return e}var u8=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case ZP:t.return=yM(t.value,t.length);break;case fM:return qd([_h(t,{value:pr(t.value,"@","@"+hr)})],i);case JP:if(t.length)return W6(t.props,function(o){switch(H6(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return qd([_h(t,{props:[pr(o,/:(read-\w+)/,":"+ib+"$1")]})],i);case"::placeholder":return qd([_h(t,{props:[pr(o,/:(plac\w+)/,":"+hr+"input-$1")]}),_h(t,{props:[pr(o,/:(plac\w+)/,":"+ib+"$1")]}),_h(t,{props:[pr(o,/:(plac\w+)/,ci+"input-$1")]})],i)}return""})}},c8=[u8],d8=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(y){var w=y.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=t.stylisPlugins||c8,o={},a,l=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var w=y.getAttribute("data-emotion").split(" "),_=1;_<w.length;_++)o[w[_]]=!0;l.push(y)});var c,d=[s8,l8];{var f,p=[t8,n8(function(y){f.insert(y)})],m=r8(d.concat(i,p)),g=function(w){return qd(Z6(w),m)};c=function(w,_,S,C){f=S,g(w?w+"{"+_.styles+"}":_.styles),C&&(b.inserted[_.name]=!0)}}var b={key:r,sheet:new L6({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:c};return b.sheet.hydrate(l),b};function ob(){return ob=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ob.apply(null,arguments)}var n1={exports:{}},br={};/** @license React v16.13.1
|
41
|
-
* react-is.production.min.js
|
42
|
-
*
|
43
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
44
|
-
*
|
45
|
-
* This source code is licensed under the MIT license found in the
|
46
|
-
* LICENSE file in the root directory of this source tree.
|
47
|
-
*/var rI;function f8(){if(rI)return br;rI=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function C(E){if(typeof E=="object"&&E!==null){var R=E.$$typeof;switch(R){case t:switch(E=E.type,E){case c:case d:case n:case o:case i:case p:return E;default:switch(E=E&&E.$$typeof,E){case l:case f:case b:case g:case a:return E;default:return R}}case r:return R}}}function k(E){return C(E)===d}return br.AsyncMode=c,br.ConcurrentMode=d,br.ContextConsumer=l,br.ContextProvider=a,br.Element=t,br.ForwardRef=f,br.Fragment=n,br.Lazy=b,br.Memo=g,br.Portal=r,br.Profiler=o,br.StrictMode=i,br.Suspense=p,br.isAsyncMode=function(E){return k(E)||C(E)===c},br.isConcurrentMode=k,br.isContextConsumer=function(E){return C(E)===l},br.isContextProvider=function(E){return C(E)===a},br.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},br.isForwardRef=function(E){return C(E)===f},br.isFragment=function(E){return C(E)===n},br.isLazy=function(E){return C(E)===b},br.isMemo=function(E){return C(E)===g},br.isPortal=function(E){return C(E)===r},br.isProfiler=function(E){return C(E)===o},br.isStrictMode=function(E){return C(E)===i},br.isSuspense=function(E){return C(E)===p},br.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===d||E===o||E===i||E===p||E===m||typeof E=="object"&&E!==null&&(E.$$typeof===b||E.$$typeof===g||E.$$typeof===a||E.$$typeof===l||E.$$typeof===f||E.$$typeof===w||E.$$typeof===_||E.$$typeof===S||E.$$typeof===y)},br.typeOf=C,br}var nI;function h8(){return nI||(nI=1,n1.exports=f8()),n1.exports}var i1,iI;function p8(){if(iI)return i1;iI=1;var e=h8(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=n,o[e.Memo]=i;function a(b){return e.isMemo(b)?i:o[b.$$typeof]||t}var l=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function g(b,y,w){if(typeof y!="string"){if(m){var _=p(y);_&&_!==m&&g(b,_,w)}var S=c(y);d&&(S=S.concat(d(y)));for(var C=a(b),k=a(y),E=0;E<S.length;++E){var R=S[E];if(!r[R]&&!(w&&w[R])&&!(k&&k[R])&&!(C&&C[R])){var T=f(y,R);try{l(b,R,T)}catch{}}}}return b}return i1=g,i1}p8();var m8=!0;function v8(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):n+=i+" "}),n}var bM=function(t,r,n){var i=t.key+"-"+r.name;(n===!1||m8===!1)&&t.registered[i]===void 0&&(t.registered[i]=r.styles)},wM=function(t,r,n){bM(t,r,n);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var o=r;do t.insert(r===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function g8(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var y8={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},b8=/[A-Z]|^ms/g,w8=/_EMO_([^_]+?)_([^]*?)_EMO_/g,SM=function(t){return t.charCodeAt(1)===45},oI=function(t){return t!=null&&typeof t!="boolean"},o1=gM(function(e){return SM(e)?e:e.replace(b8,"-$&").toLowerCase()}),aI=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(w8,function(n,i,o){return Na={name:i,styles:o,next:Na},i})}return y8[t]!==1&&!SM(t)&&typeof r=="number"&&r!==0?r+"px":r};function Ip(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return Na={name:r.name,styles:r.styles,next:Na},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)Na={name:n.name,styles:n.styles,next:Na},n=n.next;var i=r.styles+";";return i}return S8(e,t,r)}case"function":{if(e!==void 0){var o=Na,a=r(e);return Na=o,Ip(e,t,a)}break}}if(t==null)return r;var l=t[r];return l!==void 0?l:r}function S8(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Ip(e,t,r[i])+";";else for(var o in r){var a=r[o];if(typeof a!="object")t!=null&&t[a]!==void 0?n+=o+"{"+t[a]+"}":oI(a)&&(n+=o1(o)+":"+aI(o,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)oI(a[l])&&(n+=o1(o)+":"+aI(o,a[l])+";");else{var c=Ip(e,t,a);switch(o){case"animation":case"animationName":{n+=o1(o)+":"+c+";";break}default:n+=o+"{"+c+"}"}}}return n}var sI=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Na,tC=function(t,r,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";Na=void 0;var a=t[0];a==null||a.raw===void 0?(i=!1,o+=Ip(n,r,a)):o+=a[0];for(var l=1;l<t.length;l++)o+=Ip(n,r,t[l]),i&&(o+=a[l]);sI.lastIndex=0;for(var c="",d;(d=sI.exec(o))!==null;)c+="-"+d[1];var f=g8(o)+c;return{name:f,styles:o,next:Na}},_8=function(t){return t()},_M=ex.useInsertionEffect?ex.useInsertionEffect:!1,x8=_M||_8,lI=_M||O.useLayoutEffect,xM=O.createContext(typeof HTMLElement<"u"?d8({key:"css"}):null);xM.Provider;var PM=function(t){return O.forwardRef(function(r,n){var i=O.useContext(xM);return t(r,i,n)})},kp=O.createContext({}),P8=function(t,r){if(typeof r=="function"){var n=r(t);return n}return ob({},t,r)},C8=eI(function(e){return eI(function(t){return P8(e,t)})}),E8=function(t){var r=O.useContext(kp);return t.theme!==r&&(r=C8(r)(t.theme)),O.createElement(kp.Provider,{value:r},t.children)},u0=PM(function(e,t){var r=e.styles,n=tC([r],void 0,O.useContext(kp)),i=O.useRef();return lI(function(){var o=t.key+"-global",a=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),l=!1,c=document.querySelector('style[data-emotion="'+o+" "+n.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),c!==null&&(l=!0,c.setAttribute("data-emotion",o),a.hydrate([c])),i.current=[a,l],function(){a.flush()}},[t]),lI(function(){var o=i.current,a=o[0],l=o[1];if(l){o[1]=!1;return}if(n.next!==void 0&&wM(t,n.next,!0),a.tags.length){var c=a.tags[a.tags.length-1].nextElementSibling;a.before=c,a.flush()}t.insert("",n,a,!1)},[t,n.name]),null});function T8(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return tC(t)}var O8=function(){var t=T8.apply(void 0,arguments),r="animation-"+t.name;return{name:r,styles:"@keyframes "+r+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},CM=String.raw,EM=CM`
|
48
|
-
:root,
|
49
|
-
:host {
|
50
|
-
--chakra-vh: 100vh;
|
51
|
-
}
|
52
|
-
|
53
|
-
@supports (height: -webkit-fill-available) {
|
54
|
-
:root,
|
55
|
-
:host {
|
56
|
-
--chakra-vh: -webkit-fill-available;
|
57
|
-
}
|
58
|
-
}
|
59
|
-
|
60
|
-
@supports (height: -moz-fill-available) {
|
61
|
-
:root,
|
62
|
-
:host {
|
63
|
-
--chakra-vh: -moz-fill-available;
|
64
|
-
}
|
65
|
-
}
|
66
|
-
|
67
|
-
@supports (height: 100dvh) {
|
68
|
-
:root,
|
69
|
-
:host {
|
70
|
-
--chakra-vh: 100dvh;
|
71
|
-
}
|
72
|
-
}
|
73
|
-
`,R8=()=>x.jsx(u0,{styles:EM}),I8=({scope:e=""})=>x.jsx(u0,{styles:CM`
|
74
|
-
html {
|
75
|
-
line-height: 1.5;
|
76
|
-
-webkit-text-size-adjust: 100%;
|
77
|
-
font-family: system-ui, sans-serif;
|
78
|
-
-webkit-font-smoothing: antialiased;
|
79
|
-
text-rendering: optimizeLegibility;
|
80
|
-
-moz-osx-font-smoothing: grayscale;
|
81
|
-
touch-action: manipulation;
|
82
|
-
}
|
83
|
-
|
84
|
-
body {
|
85
|
-
position: relative;
|
86
|
-
min-height: 100%;
|
87
|
-
margin: 0;
|
88
|
-
font-feature-settings: "kern";
|
89
|
-
}
|
90
|
-
|
91
|
-
${e} :where(*, *::before, *::after) {
|
92
|
-
border-width: 0;
|
93
|
-
border-style: solid;
|
94
|
-
box-sizing: border-box;
|
95
|
-
word-wrap: break-word;
|
96
|
-
}
|
97
|
-
|
98
|
-
main {
|
99
|
-
display: block;
|
100
|
-
}
|
101
|
-
|
102
|
-
${e} hr {
|
103
|
-
border-top-width: 1px;
|
104
|
-
box-sizing: content-box;
|
105
|
-
height: 0;
|
106
|
-
overflow: visible;
|
107
|
-
}
|
108
|
-
|
109
|
-
${e} :where(pre, code, kbd,samp) {
|
110
|
-
font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
111
|
-
font-size: 1em;
|
112
|
-
}
|
113
|
-
|
114
|
-
${e} a {
|
115
|
-
background-color: transparent;
|
116
|
-
color: inherit;
|
117
|
-
text-decoration: inherit;
|
118
|
-
}
|
119
|
-
|
120
|
-
${e} abbr[title] {
|
121
|
-
border-bottom: none;
|
122
|
-
text-decoration: underline;
|
123
|
-
-webkit-text-decoration: underline dotted;
|
124
|
-
text-decoration: underline dotted;
|
125
|
-
}
|
126
|
-
|
127
|
-
${e} :where(b, strong) {
|
128
|
-
font-weight: bold;
|
129
|
-
}
|
130
|
-
|
131
|
-
${e} small {
|
132
|
-
font-size: 80%;
|
133
|
-
}
|
134
|
-
|
135
|
-
${e} :where(sub,sup) {
|
136
|
-
font-size: 75%;
|
137
|
-
line-height: 0;
|
138
|
-
position: relative;
|
139
|
-
vertical-align: baseline;
|
140
|
-
}
|
141
|
-
|
142
|
-
${e} sub {
|
143
|
-
bottom: -0.25em;
|
144
|
-
}
|
145
|
-
|
146
|
-
${e} sup {
|
147
|
-
top: -0.5em;
|
148
|
-
}
|
149
|
-
|
150
|
-
${e} img {
|
151
|
-
border-style: none;
|
152
|
-
}
|
153
|
-
|
154
|
-
${e} :where(button, input, optgroup, select, textarea) {
|
155
|
-
font-family: inherit;
|
156
|
-
font-size: 100%;
|
157
|
-
line-height: 1.15;
|
158
|
-
margin: 0;
|
159
|
-
}
|
160
|
-
|
161
|
-
${e} :where(button, input) {
|
162
|
-
overflow: visible;
|
163
|
-
}
|
164
|
-
|
165
|
-
${e} :where(button, select) {
|
166
|
-
text-transform: none;
|
167
|
-
}
|
168
|
-
|
169
|
-
${e} :where(
|
170
|
-
button::-moz-focus-inner,
|
171
|
-
[type="button"]::-moz-focus-inner,
|
172
|
-
[type="reset"]::-moz-focus-inner,
|
173
|
-
[type="submit"]::-moz-focus-inner
|
174
|
-
) {
|
175
|
-
border-style: none;
|
176
|
-
padding: 0;
|
177
|
-
}
|
178
|
-
|
179
|
-
${e} fieldset {
|
180
|
-
padding: 0.35em 0.75em 0.625em;
|
181
|
-
}
|
182
|
-
|
183
|
-
${e} legend {
|
184
|
-
box-sizing: border-box;
|
185
|
-
color: inherit;
|
186
|
-
display: table;
|
187
|
-
max-width: 100%;
|
188
|
-
padding: 0;
|
189
|
-
white-space: normal;
|
190
|
-
}
|
191
|
-
|
192
|
-
${e} progress {
|
193
|
-
vertical-align: baseline;
|
194
|
-
}
|
195
|
-
|
196
|
-
${e} textarea {
|
197
|
-
overflow: auto;
|
198
|
-
}
|
199
|
-
|
200
|
-
${e} :where([type="checkbox"], [type="radio"]) {
|
201
|
-
box-sizing: border-box;
|
202
|
-
padding: 0;
|
203
|
-
}
|
204
|
-
|
205
|
-
${e} input[type="number"]::-webkit-inner-spin-button,
|
206
|
-
${e} input[type="number"]::-webkit-outer-spin-button {
|
207
|
-
-webkit-appearance: none !important;
|
208
|
-
}
|
209
|
-
|
210
|
-
${e} input[type="number"] {
|
211
|
-
-moz-appearance: textfield;
|
212
|
-
}
|
213
|
-
|
214
|
-
${e} input[type="search"] {
|
215
|
-
-webkit-appearance: textfield;
|
216
|
-
outline-offset: -2px;
|
217
|
-
}
|
218
|
-
|
219
|
-
${e} input[type="search"]::-webkit-search-decoration {
|
220
|
-
-webkit-appearance: none !important;
|
221
|
-
}
|
222
|
-
|
223
|
-
${e} ::-webkit-file-upload-button {
|
224
|
-
-webkit-appearance: button;
|
225
|
-
font: inherit;
|
226
|
-
}
|
227
|
-
|
228
|
-
${e} details {
|
229
|
-
display: block;
|
230
|
-
}
|
231
|
-
|
232
|
-
${e} summary {
|
233
|
-
display: list-item;
|
234
|
-
}
|
235
|
-
|
236
|
-
template {
|
237
|
-
display: none;
|
238
|
-
}
|
239
|
-
|
240
|
-
[hidden] {
|
241
|
-
display: none !important;
|
242
|
-
}
|
243
|
-
|
244
|
-
${e} :where(
|
245
|
-
blockquote,
|
246
|
-
dl,
|
247
|
-
dd,
|
248
|
-
h1,
|
249
|
-
h2,
|
250
|
-
h3,
|
251
|
-
h4,
|
252
|
-
h5,
|
253
|
-
h6,
|
254
|
-
hr,
|
255
|
-
figure,
|
256
|
-
p,
|
257
|
-
pre
|
258
|
-
) {
|
259
|
-
margin: 0;
|
260
|
-
}
|
261
|
-
|
262
|
-
${e} button {
|
263
|
-
background: transparent;
|
264
|
-
padding: 0;
|
265
|
-
}
|
266
|
-
|
267
|
-
${e} fieldset {
|
268
|
-
margin: 0;
|
269
|
-
padding: 0;
|
270
|
-
}
|
271
|
-
|
272
|
-
${e} :where(ol, ul) {
|
273
|
-
margin: 0;
|
274
|
-
padding: 0;
|
275
|
-
}
|
276
|
-
|
277
|
-
${e} textarea {
|
278
|
-
resize: vertical;
|
279
|
-
}
|
280
|
-
|
281
|
-
${e} :where(button, [role="button"]) {
|
282
|
-
cursor: pointer;
|
283
|
-
}
|
284
|
-
|
285
|
-
${e} button::-moz-focus-inner {
|
286
|
-
border: 0 !important;
|
287
|
-
}
|
288
|
-
|
289
|
-
${e} table {
|
290
|
-
border-collapse: collapse;
|
291
|
-
}
|
292
|
-
|
293
|
-
${e} :where(h1, h2, h3, h4, h5, h6) {
|
294
|
-
font-size: inherit;
|
295
|
-
font-weight: inherit;
|
296
|
-
}
|
297
|
-
|
298
|
-
${e} :where(button, input, optgroup, select, textarea) {
|
299
|
-
padding: 0;
|
300
|
-
line-height: inherit;
|
301
|
-
color: inherit;
|
302
|
-
}
|
303
|
-
|
304
|
-
${e} :where(img, svg, video, canvas, audio, iframe, embed, object) {
|
305
|
-
display: block;
|
306
|
-
}
|
307
|
-
|
308
|
-
${e} :where(img, video) {
|
309
|
-
max-width: 100%;
|
310
|
-
height: auto;
|
311
|
-
}
|
312
|
-
|
313
|
-
[data-js-focus-visible]
|
314
|
-
:focus:not([data-focus-visible-added]):not(
|
315
|
-
[data-focus-visible-disabled]
|
316
|
-
) {
|
317
|
-
outline: none;
|
318
|
-
box-shadow: none;
|
319
|
-
}
|
320
|
-
|
321
|
-
${e} select::-ms-expand {
|
322
|
-
display: none;
|
323
|
-
}
|
324
|
-
|
325
|
-
${EM}
|
326
|
-
`});function k8(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Wi(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:i="Provider",errorMessage:o,defaultValue:a}=e,l=O.createContext(a);l.displayName=t;function c(){var d;const f=O.useContext(l);if(!f&&r){const p=new Error(o??k8(n,i));throw p.name="ContextError",(d=Error.captureStackTrace)==null||d.call(Error,p,c),p}return f}return[l.Provider,c,l]}var[j8,$8]=Wi({strict:!1,name:"PortalManagerContext"});function TM(e){const{children:t,zIndex:r}=e;return x.jsx(j8,{value:{zIndex:r},children:t})}TM.displayName="PortalManager";var $l=globalThis!=null&&globalThis.document?O.useLayoutEffect:O.useEffect,_m=cM();const OM=mc(_m),A8=o0({__proto__:null,default:OM},[_m]);var[RM,D8]=Wi({strict:!1,name:"PortalContext"}),rC="chakra-portal",M8=".chakra-portal",N8=e=>x.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),F8=e=>{const{appendToParentPortal:t,children:r}=e,[n,i]=O.useState(null),o=O.useRef(null),[,a]=O.useState({});O.useEffect(()=>a({}),[]);const l=D8(),c=$8();$l(()=>{if(!n)return;const f=n.ownerDocument,p=t?l??f.body:f.body;if(!p)return;o.current=f.createElement("div"),o.current.className=rC,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[n]);const d=c!=null&&c.zIndex?x.jsx(N8,{zIndex:c==null?void 0:c.zIndex,children:r}):r;return o.current?_m.createPortal(x.jsx(RM,{value:o.current,children:d}),o.current):x.jsx("span",{ref:f=>{f&&i(f)}})},L8=e=>{const{children:t,containerRef:r,appendToParentPortal:n}=e,i=r.current,o=i??(typeof window<"u"?document.body:void 0),a=O.useMemo(()=>{const c=i==null?void 0:i.ownerDocument.createElement("div");return c&&(c.className=rC),c},[i]),[,l]=O.useState({});return $l(()=>l({}),[]),$l(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?_m.createPortal(x.jsx(RM,{value:n?a:null,children:t}),a):null};function xf(e){const t={appendToParentPortal:!0,...e},{containerRef:r,...n}=t;return r?x.jsx(L8,{containerRef:r,...n}):x.jsx(F8,{...n})}xf.className=rC;xf.selector=M8;xf.displayName="Portal";function c0(){const e=O.useContext(kp);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}var d0=O.createContext({});d0.displayName="ColorModeContext";function nC(){const e=O.useContext(d0);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var sg={light:"chakra-ui-light",dark:"chakra-ui-dark"};function B8(e={}){const{preventTransition:t=!0}=e,r={setDataset:n=>{const i=t?r.preventTransition():void 0;document.documentElement.dataset.theme=n,document.documentElement.style.colorScheme=n,i==null||i()},setClassName(n){document.body.classList.add(n?sg.dark:sg.light),document.body.classList.remove(n?sg.light:sg.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(n){var i;return((i=r.query().matches)!=null?i:n==="dark")?"dark":"light"},addListener(n){const i=r.query(),o=a=>{n(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const n=document.createElement("style");return n.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(n),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(n)})})}}};return r}var V8="chakra-ui-color-mode";function z8(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let r;try{r=localStorage.getItem(e)||t}catch{}return r||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var q8=z8(V8),uI=()=>{};function cI(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function IM(e){const{value:t,children:r,options:{useSystemColorMode:n,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=q8}=e,l=i==="dark"?"dark":"light",[c,d]=O.useState(()=>cI(a,l)),[f,p]=O.useState(()=>cI(a)),{getSystemTheme:m,setClassName:g,setDataset:b,addListener:y}=O.useMemo(()=>B8({preventTransition:o}),[o]),w=i==="system"&&!c?f:c,_=O.useCallback(k=>{const E=k==="system"?m():k;d(E),g(E==="dark"),b(E),a.set(E)},[a,m,g,b]);$l(()=>{i==="system"&&p(m())},[]),O.useEffect(()=>{const k=a.get();if(k){_(k);return}if(i==="system"){_("system");return}_(l)},[a,l,i,_]);const S=O.useCallback(()=>{_(w==="dark"?"light":"dark")},[w,_]);O.useEffect(()=>{if(n)return y(_)},[n,y,_]);const C=O.useMemo(()=>({colorMode:t??w,toggleColorMode:t?uI:S,setColorMode:t?uI:_,forced:t!==void 0}),[w,S,_,t]);return x.jsx(d0.Provider,{value:C,children:r})}IM.displayName="ColorModeProvider";function U8(){const e=nC(),t=c0();return{...e,theme:t}}var or=(...e)=>e.filter(Boolean).join(" ");function ua(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Do(e,...t){return H8(e)?e(...t):e}var H8=e=>typeof e=="function",Yt=e=>e?"":void 0,a1=e=>e?!0:void 0;function mr(...e){return function(r){e.some(n=>(n==null||n(r),r==null?void 0:r.defaultPrevented))}}function kM(...e){return function(r){e.forEach(n=>{n==null||n(r)})}}var Uh={exports:{}};Uh.exports;var dI;function W8(){return dI||(dI=1,function(e,t){var r=200,n="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,l="[object Arguments]",c="[object Array]",d="[object AsyncFunction]",f="[object Boolean]",p="[object Date]",m="[object Error]",g="[object Function]",b="[object GeneratorFunction]",y="[object Map]",w="[object Number]",_="[object Null]",S="[object Object]",C="[object Proxy]",k="[object RegExp]",E="[object Set]",R="[object String]",T="[object Undefined]",A="[object WeakMap]",M="[object ArrayBuffer]",B="[object DataView]",Q="[object Float32Array]",se="[object Float64Array]",ie="[object Int8Array]",N="[object Int16Array]",X="[object Int32Array]",ce="[object Uint8Array]",ne="[object Uint8ClampedArray]",ee="[object Uint16Array]",ge="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,j=/^\[object .+?Constructor\]$/,U=/^(?:0|[1-9]\d*)$/,q={};q[Q]=q[se]=q[ie]=q[N]=q[X]=q[ce]=q[ne]=q[ee]=q[ge]=!0,q[l]=q[c]=q[M]=q[f]=q[B]=q[p]=q[m]=q[g]=q[y]=q[w]=q[S]=q[k]=q[E]=q[R]=q[A]=!1;var $=typeof ig=="object"&&ig&&ig.Object===Object&&ig,F=typeof self=="object"&&self&&self.Object===Object&&self,V=$||F||Function("return this")(),de=t&&!t.nodeType&&t,pe=de&&!0&&e&&!e.nodeType&&e,Ee=pe&&pe.exports===de,Me=Ee&&$.process,Y=function(){try{var z=pe&&pe.require&&pe.require("util").types;return z||Me&&Me.binding&&Me.binding("util")}catch{}}(),K=Y&&Y.isTypedArray;function we(z,oe,_e){switch(_e.length){case 0:return z.call(oe);case 1:return z.call(oe,_e[0]);case 2:return z.call(oe,_e[0],_e[1]);case 3:return z.call(oe,_e[0],_e[1],_e[2])}return z.apply(oe,_e)}function Te(z,oe){for(var _e=-1,We=Array(z);++_e<z;)We[_e]=oe(_e);return We}function he(z){return function(oe){return z(oe)}}function Ce(z,oe){return z==null?void 0:z[oe]}function Ge(z,oe){return function(_e){return z(oe(_e))}}var $t=Array.prototype,Kt=Function.prototype,It=Object.prototype,jt=V["__core-js_shared__"],Lt=Kt.toString,ht=It.hasOwnProperty,on=function(){var z=/[^.]+$/.exec(jt&&jt.keys&&jt.keys.IE_PROTO||"");return z?"Symbol(src)_1."+z:""}(),mn=It.toString,Ir=Lt.call(Object),Jr=RegExp("^"+Lt.call(ht).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vn=Ee?V.Buffer:void 0,Nr=V.Symbol,an=V.Uint8Array;vn&&vn.allocUnsafe;var sn=Ge(Object.getPrototypeOf,Object),_a=Object.create,Yi=It.propertyIsEnumerable,xa=$t.splice,Xi=Nr?Nr.toStringTag:void 0,Oi=function(){try{var z=zf(Object,"defineProperty");return z({},"",{}),z}catch{}}(),gn=vn?vn.isBuffer:void 0,Wo=Math.max,Ko=Date.now,Pa=zf(V,"Map"),qn=zf(Object,"create"),vo=function(){function z(){}return function(oe){if(!Ea(oe))return{};if(_a)return _a(oe);z.prototype=oe;var _e=new z;return z.prototype=void 0,_e}}();function pi(z){var oe=-1,_e=z==null?0:z.length;for(this.clear();++oe<_e;){var We=z[oe];this.set(We[0],We[1])}}function Ji(){this.__data__=qn?qn(null):{},this.size=0}function le(z){var oe=this.has(z)&&delete this.__data__[z];return this.size-=oe?1:0,oe}function ye(z){var oe=this.__data__;if(qn){var _e=oe[z];return _e===n?void 0:_e}return ht.call(oe,z)?oe[z]:void 0}function xe(z){var oe=this.__data__;return qn?oe[z]!==void 0:ht.call(oe,z)}function $e(z,oe){var _e=this.__data__;return this.size+=this.has(z)?0:1,_e[z]=qn&&oe===void 0?n:oe,this}pi.prototype.clear=Ji,pi.prototype.delete=le,pi.prototype.get=ye,pi.prototype.has=xe,pi.prototype.set=$e;function Be(z){var oe=-1,_e=z==null?0:z.length;for(this.clear();++oe<_e;){var We=z[oe];this.set(We[0],We[1])}}function pt(){this.__data__=[],this.size=0}function tt(z){var oe=this.__data__,_e=Ct(oe,z);if(_e<0)return!1;var We=oe.length-1;return _e==We?oe.pop():xa.call(oe,_e,1),--this.size,!0}function Ue(z){var oe=this.__data__,_e=Ct(oe,z);return _e<0?void 0:oe[_e][1]}function xt(z){return Ct(this.__data__,z)>-1}function H(z,oe){var _e=this.__data__,We=Ct(_e,z);return We<0?(++this.size,_e.push([z,oe])):_e[We][1]=oe,this}Be.prototype.clear=pt,Be.prototype.delete=tt,Be.prototype.get=Ue,Be.prototype.has=xt,Be.prototype.set=H;function L(z){var oe=-1,_e=z==null?0:z.length;for(this.clear();++oe<_e;){var We=z[oe];this.set(We[0],We[1])}}function G(){this.size=0,this.__data__={hash:new pi,map:new(Pa||Be),string:new pi}}function te(z){var oe=$c(this,z).delete(z);return this.size-=oe?1:0,oe}function ue(z){return $c(this,z).get(z)}function ze(z){return $c(this,z).has(z)}function Ye(z,oe){var _e=$c(this,z),We=_e.size;return _e.set(z,oe),this.size+=_e.size==We?0:1,this}L.prototype.clear=G,L.prototype.delete=te,L.prototype.get=ue,L.prototype.has=ze,L.prototype.set=Ye;function ot(z){var oe=this.__data__=new Be(z);this.size=oe.size}function Wt(){this.__data__=new Be,this.size=0}function nr(z){var oe=this.__data__,_e=oe.delete(z);return this.size=oe.size,_e}function Pt(z){return this.__data__.get(z)}function At(z){return this.__data__.has(z)}function cr(z,oe){var _e=this.__data__;if(_e instanceof Be){var We=_e.__data__;if(!Pa||We.length<r-1)return We.push([z,oe]),this.size=++_e.size,this;_e=this.__data__=new L(We)}return _e.set(z,oe),this.size=_e.size,this}ot.prototype.clear=Wt,ot.prototype.delete=nr,ot.prototype.get=Pt,ot.prototype.has=At,ot.prototype.set=cr;function ft(z,oe){var _e=bo(z),We=!_e&&yo(z),Bt=!_e&&!We&&Js(z),dr=!_e&&!We&&!Bt&&Kf(z),kr=_e||We||Bt||dr,Mt=kr?Te(z.length,String):[],Tr=Mt.length;for(var ni in z)kr&&(ni=="length"||Bt&&(ni=="offset"||ni=="parent")||dr&&(ni=="buffer"||ni=="byteLength"||ni=="byteOffset")||Ac(ni,Tr))||Mt.push(ni);return Mt}function Gt(z,oe,_e){(_e!==void 0&&!ls(z[oe],_e)||_e===void 0&&!(oe in z))&&Et(z,oe,_e)}function it(z,oe,_e){var We=z[oe];(!(ht.call(z,oe)&&ls(We,_e))||_e===void 0&&!(oe in z))&&Et(z,oe,_e)}function Ct(z,oe){for(var _e=z.length;_e--;)if(ls(z[_e][0],oe))return _e;return-1}function Et(z,oe,_e){oe=="__proto__"&&Oi?Oi(z,oe,{configurable:!0,enumerable:!0,value:_e,writable:!0}):z[oe]=_e}var ar=go();function Fr(z){return z==null?z===void 0?T:_:Xi&&Xi in Object(z)?qf(z):sv(z)}function mi(z){return Qo(z)&&Fr(z)==l}function ei(z){if(!Ea(z)||Uf(z))return!1;var oe=So(z)?Jr:j;return oe.test(Wf(z))}function ti(z){return Qo(z)&&cv(z.length)&&!!q[Fr(z)]}function vi(z){if(!Ea(z))return av(z);var oe=sr(z),_e=[];for(var We in z)We=="constructor"&&(oe||!ht.call(z,We))||_e.push(We);return _e}function gi(z,oe,_e,We,Bt){z!==oe&&ar(oe,function(dr,kr){if(Bt||(Bt=new ot),Ea(dr))ln(z,oe,kr,_e,gi,We,Bt);else{var Mt=We?We(Dc(z,kr),dr,kr+"",z,oe,Bt):void 0;Mt===void 0&&(Mt=dr),Gt(z,kr,Mt)}},Gf)}function ln(z,oe,_e,We,Bt,dr,kr){var Mt=Dc(z,_e),Tr=Dc(oe,_e),ni=kr.get(Tr);if(ni){Gt(z,_e,ni);return}var ii=dr?dr(Mt,Tr,_e+"",z,oe,kr):void 0,Ta=ii===void 0;if(Ta){var tl=bo(Tr),Nc=!tl&&Js(Tr),oi=!tl&&!Nc&&Kf(Tr);ii=Tr,tl||Nc||oi?bo(Mt)?ii=Mt:fu(Mt)?ii=Go(Mt):Nc?(Ta=!1,ii=jc(Tr)):oi?(Ta=!1,ii=Xs(Tr)):ii=[]:Cw(Tr)||yo(Tr)?(ii=Mt,yo(Mt)?ii=Mc(Mt):(!Ea(Mt)||So(Mt))&&(ii=ov(Tr))):Ta=!1}Ta&&(kr.set(Tr,ii),Bt(ii,Tr,We,dr,kr),kr.delete(Tr)),Gt(z,_e,ii)}function as(z,oe){return lv(Hf(z,oe,Zs),z+"")}var ri=Oi?function(z,oe){return Oi(z,"toString",{configurable:!0,enumerable:!1,value:hu(oe),writable:!0})}:Zs;function jc(z,oe){return z.slice()}function Ys(z){var oe=new z.constructor(z.byteLength);return new an(oe).set(new an(z)),oe}function Xs(z,oe){var _e=Ys(z.buffer);return new z.constructor(_e,z.byteOffset,z.length)}function Go(z,oe){var _e=-1,We=z.length;for(oe||(oe=Array(We));++_e<We;)oe[_e]=z[_e];return oe}function ss(z,oe,_e,We){var Bt=!_e;_e||(_e={});for(var dr=-1,kr=oe.length;++dr<kr;){var Mt=oe[dr],Tr=void 0;Tr===void 0&&(Tr=z[Mt]),Bt?Et(_e,Mt,Tr):it(_e,Mt,Tr)}return _e}function Ca(z){return as(function(oe,_e){var We=-1,Bt=_e.length,dr=Bt>1?_e[Bt-1]:void 0,kr=Bt>2?_e[2]:void 0;for(dr=z.length>3&&typeof dr=="function"?(Bt--,dr):void 0,kr&&du(_e[0],_e[1],kr)&&(dr=Bt<3?void 0:dr,Bt=1),oe=Object(oe);++We<Bt;){var Mt=_e[We];Mt&&z(oe,Mt,We,dr)}return oe})}function go(z){return function(oe,_e,We){for(var Bt=-1,dr=Object(oe),kr=We(oe),Mt=kr.length;Mt--;){var Tr=kr[++Bt];if(_e(dr[Tr],Tr,dr)===!1)break}return oe}}function $c(z,oe){var _e=z.__data__;return Pw(oe)?_e[typeof oe=="string"?"string":"hash"]:_e.map}function zf(z,oe){var _e=Ce(z,oe);return ei(_e)?_e:void 0}function qf(z){var oe=ht.call(z,Xi),_e=z[Xi];try{z[Xi]=void 0;var We=!0}catch{}var Bt=mn.call(z);return We&&(oe?z[Xi]=_e:delete z[Xi]),Bt}function ov(z){return typeof z.constructor=="function"&&!sr(z)?vo(sn(z)):{}}function Ac(z,oe){var _e=typeof z;return oe=oe??a,!!oe&&(_e=="number"||_e!="symbol"&&U.test(z))&&z>-1&&z%1==0&&z<oe}function du(z,oe,_e){if(!Ea(_e))return!1;var We=typeof oe;return(We=="number"?wo(_e)&&Ac(oe,_e.length):We=="string"&&oe in _e)?ls(_e[oe],z):!1}function Pw(z){var oe=typeof z;return oe=="string"||oe=="number"||oe=="symbol"||oe=="boolean"?z!=="__proto__":z===null}function Uf(z){return!!on&&on in z}function sr(z){var oe=z&&z.constructor,_e=typeof oe=="function"&&oe.prototype||It;return z===_e}function av(z){var oe=[];if(z!=null)for(var _e in Object(z))oe.push(_e);return oe}function sv(z){return mn.call(z)}function Hf(z,oe,_e){return oe=Wo(oe===void 0?z.length-1:oe,0),function(){for(var We=arguments,Bt=-1,dr=Wo(We.length-oe,0),kr=Array(dr);++Bt<dr;)kr[Bt]=We[oe+Bt];Bt=-1;for(var Mt=Array(oe+1);++Bt<oe;)Mt[Bt]=We[Bt];return Mt[oe]=_e(kr),we(z,this,Mt)}}function Dc(z,oe){if(!(oe==="constructor"&&typeof z[oe]=="function")&&oe!="__proto__")return z[oe]}var lv=uv(ri);function uv(z){var oe=0,_e=0;return function(){var We=Ko(),Bt=o-(We-_e);if(_e=We,Bt>0){if(++oe>=i)return arguments[0]}else oe=0;return z.apply(void 0,arguments)}}function Wf(z){if(z!=null){try{return Lt.call(z)}catch{}try{return z+""}catch{}}return""}function ls(z,oe){return z===oe||z!==z&&oe!==oe}var yo=mi(function(){return arguments}())?mi:function(z){return Qo(z)&&ht.call(z,"callee")&&!Yi.call(z,"callee")},bo=Array.isArray;function wo(z){return z!=null&&cv(z.length)&&!So(z)}function fu(z){return Qo(z)&&wo(z)}var Js=gn||el;function So(z){if(!Ea(z))return!1;var oe=Fr(z);return oe==g||oe==b||oe==d||oe==C}function cv(z){return typeof z=="number"&&z>-1&&z%1==0&&z<=a}function Ea(z){var oe=typeof z;return z!=null&&(oe=="object"||oe=="function")}function Qo(z){return z!=null&&typeof z=="object"}function Cw(z){if(!Qo(z)||Fr(z)!=S)return!1;var oe=sn(z);if(oe===null)return!0;var _e=ht.call(oe,"constructor")&&oe.constructor;return typeof _e=="function"&&_e instanceof _e&&Lt.call(_e)==Ir}var Kf=K?he(K):ti;function Mc(z){return ss(z,Gf(z))}function Gf(z){return wo(z)?ft(z):vi(z)}var Ew=Ca(function(z,oe,_e,We){gi(z,oe,_e,We)});function hu(z){return function(){return z}}function Zs(z){return z}function el(){return!1}e.exports=Ew}(Uh,Uh.exports)),Uh.exports}var K8=W8();const Va=mc(K8);var G8=e=>/!(important)?$/.test(e),fI=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Q8=(e,t)=>r=>{const n=String(t),i=G8(n),o=fI(n),a=e?`${e}.${o}`:o;let l=ua(r.__cssMap)&&a in r.__cssMap?r.__cssMap[a].varRef:t;return l=fI(l),i?`${l} !important`:l};function iC(e){const{scale:t,transform:r,compose:n}=e;return(o,a)=>{var l;const c=Q8(t,o)(a);let d=(l=r==null?void 0:r(c,a))!=null?l:c;return n&&(d=n(d,a)),d}}var lg=(...e)=>t=>e.reduce((r,n)=>n(r),t);function Oo(e,t){return r=>{const n={property:r,scale:e};return n.transform=iC({scale:e,transform:t}),n}}var Y8=({rtl:e,ltr:t})=>r=>r.direction==="rtl"?e:t;function X8(e){const{property:t,scale:r,transform:n}=e;return{scale:r,property:Y8(t),transform:r?iC({scale:r,compose:n}):n}}var jM=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function J8(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...jM].join(" ")}function Z8(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...jM].join(" ")}var eq={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},tq={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function rq(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var nq={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},nx={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},iq=new Set(Object.values(nx)),ix=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),oq=e=>e.trim();function aq(e,t){if(e==null||ix.has(e))return e;if(!(ox(e)||ix.has(e)))return`url('${e}')`;const i=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),o=i==null?void 0:i[1],a=i==null?void 0:i[2];if(!o||!a)return e;const l=o.includes("-gradient")?o:`${o}-gradient`,[c,...d]=a.split(",").map(oq).filter(Boolean);if((d==null?void 0:d.length)===0)return e;const f=c in nx?nx[c]:c;d.unshift(f);const p=d.map(m=>{if(iq.has(m))return m;const g=m.indexOf(" "),[b,y]=g!==-1?[m.substr(0,g),m.substr(g+1)]:[m],w=ox(y)?y:y&&y.split(" "),_=`colors.${b}`,S=_ in t.__cssMap?t.__cssMap[_].varRef:b;return w?[S,...Array.isArray(w)?w:[w]].join(" "):S});return`${l}(${p.join(", ")})`}var ox=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),sq=(e,t)=>aq(e,t??{});function lq(e){return/^var\(--.+\)$/.test(e)}var uq=e=>{const t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}},ja=e=>t=>`${e}(${t})`,Zt={filter(e){return e!=="auto"?e:eq},backdropFilter(e){return e!=="auto"?e:tq},ring(e){return rq(Zt.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?J8():e==="auto-gpu"?Z8():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=uq(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const r={left:"right",right:"left"};return t.direction==="rtl"?r[e]:e},degree(e){if(lq(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:sq,blur:ja("blur"),opacity:ja("opacity"),brightness:ja("brightness"),contrast:ja("contrast"),dropShadow:ja("drop-shadow"),grayscale:ja("grayscale"),hueRotate:e=>ja("hue-rotate")(Zt.degree(e)),invert:ja("invert"),saturate:ja("saturate"),sepia:ja("sepia"),bgImage(e){return e==null||ox(e)||ix.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:r,divide:n}=(t=nq[e])!=null?t:{},i={flexDirection:e};return r&&(i[r]=1),n&&(i[n]=1),i}},ae={borderWidths:Oo("borderWidths"),borderStyles:Oo("borderStyles"),colors:Oo("colors"),borders:Oo("borders"),gradients:Oo("gradients",Zt.gradient),radii:Oo("radii",Zt.px),space:Oo("space",lg(Zt.vh,Zt.px)),spaceT:Oo("space",lg(Zt.vh,Zt.px)),degreeT(e){return{property:e,transform:Zt.degree}},prop(e,t,r){return{property:e,scale:t,...t&&{transform:iC({scale:t,transform:r})}}},propT(e,t){return{property:e,transform:t}},sizes:Oo("sizes",lg(Zt.vh,Zt.px)),sizesT:Oo("sizes",lg(Zt.vh,Zt.fraction)),shadows:Oo("shadows"),logical:X8,blur:Oo("blur",Zt.blur)},jy={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:Zt.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.gradients("backgroundImage"),bgClip:{transform:Zt.bgClip}};Object.assign(jy,{bgImage:jy.backgroundImage,bgImg:jy.backgroundImage});var fr={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(fr,{rounded:fr.borderRadius,roundedTop:fr.borderTopRadius,roundedTopLeft:fr.borderTopLeftRadius,roundedTopRight:fr.borderTopRightRadius,roundedTopStart:fr.borderStartStartRadius,roundedTopEnd:fr.borderStartEndRadius,roundedBottom:fr.borderBottomRadius,roundedBottomLeft:fr.borderBottomLeftRadius,roundedBottomRight:fr.borderBottomRightRadius,roundedBottomStart:fr.borderEndStartRadius,roundedBottomEnd:fr.borderEndEndRadius,roundedLeft:fr.borderLeftRadius,roundedRight:fr.borderRightRadius,roundedStart:fr.borderInlineStartRadius,roundedEnd:fr.borderInlineEndRadius,borderStart:fr.borderInlineStart,borderEnd:fr.borderInlineEnd,borderTopStartRadius:fr.borderStartStartRadius,borderTopEndRadius:fr.borderStartEndRadius,borderBottomStartRadius:fr.borderEndStartRadius,borderBottomEndRadius:fr.borderEndEndRadius,borderStartRadius:fr.borderInlineStartRadius,borderEndRadius:fr.borderInlineEndRadius,borderStartWidth:fr.borderInlineStartWidth,borderEndWidth:fr.borderInlineEndWidth,borderStartColor:fr.borderInlineStartColor,borderEndColor:fr.borderInlineEndColor,borderStartStyle:fr.borderInlineStartStyle,borderEndStyle:fr.borderInlineEndStyle});var cq={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},ax={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(ax,{shadow:ax.boxShadow});var dq={filter:{transform:Zt.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",Zt.brightness),contrast:ae.propT("--chakra-contrast",Zt.contrast),hueRotate:ae.propT("--chakra-hue-rotate",Zt.hueRotate),invert:ae.propT("--chakra-invert",Zt.invert),saturate:ae.propT("--chakra-saturate",Zt.saturate),dropShadow:ae.propT("--chakra-drop-shadow",Zt.dropShadow),backdropFilter:{transform:Zt.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",Zt.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",Zt.contrast),backdropHueRotate:ae.propT("--chakra-backdrop-hue-rotate",Zt.hueRotate),backdropInvert:ae.propT("--chakra-backdrop-invert",Zt.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",Zt.saturate)},ab={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:Zt.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(ab,{flexDir:ab.flexDirection});var $M={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},fq={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:Zt.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Io={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var r,n,i;return{[`@media screen and (min-width: ${(i=(n=(r=t.__breakpoints)==null?void 0:r.get(e))==null?void 0:n.minW)!=null?i:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var r,n,i;return{[`@media screen and (max-width: ${(i=(n=(r=t.__breakpoints)==null?void 0:r.get(e))==null?void 0:n._minW)!=null?i:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",Zt.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Io,{w:Io.width,h:Io.height,minW:Io.minWidth,maxW:Io.maxWidth,minH:Io.minHeight,maxH:Io.maxHeight,overscroll:Io.overscrollBehavior,overscrollX:Io.overscrollBehaviorX,overscrollY:Io.overscrollBehaviorY});var hq={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function pq(e,t,r,n){const i=typeof t=="string"?t.split("."):[t];for(n=0;n<i.length&&e;n+=1)e=e[i[n]];return e===void 0?r:e}var mq=e=>{const t=new WeakMap;return(n,i,o,a)=>{if(typeof n>"u")return e(n,i,o);t.has(n)||t.set(n,new Map);const l=t.get(n);if(l.has(i))return l.get(i);const c=e(n,i,o,a);return l.set(i,c),c}},vq=mq(pq),gq={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},yq={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},s1=(e,t,r)=>{const n={},i=vq(e,t,{});for(const o in i)o in r&&r[o]!=null||(n[o]=i[o]);return n},bq={srOnly:{transform(e){return e===!0?gq:e==="focusable"?yq:{}}},layerStyle:{processResult:!0,transform:(e,t,r)=>s1(t,`layerStyles.${e}`,r)},textStyle:{processResult:!0,transform:(e,t,r)=>s1(t,`textStyles.${e}`,r)},apply:{processResult:!0,transform:(e,t,r)=>s1(t,e,r)}},tp={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(tp,{insetStart:tp.insetInlineStart,insetEnd:tp.insetInlineEnd});var wq={ring:{transform:Zt.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Vr={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Vr,{m:Vr.margin,mt:Vr.marginTop,mr:Vr.marginRight,me:Vr.marginInlineEnd,marginEnd:Vr.marginInlineEnd,mb:Vr.marginBottom,ml:Vr.marginLeft,ms:Vr.marginInlineStart,marginStart:Vr.marginInlineStart,mx:Vr.marginX,my:Vr.marginY,p:Vr.padding,pt:Vr.paddingTop,py:Vr.paddingY,px:Vr.paddingX,pb:Vr.paddingBottom,pl:Vr.paddingLeft,ps:Vr.paddingInlineStart,paddingStart:Vr.paddingInlineStart,pr:Vr.paddingRight,pe:Vr.paddingInlineEnd,paddingEnd:Vr.paddingInlineEnd});var Sq={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},_q={clipPath:!0,transform:ae.propT("transform",Zt.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},xq={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},Pq={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",Zt.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},Cq={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function AM(e){return ua(e)&&e.reference?e.reference:String(e)}var f0=(e,...t)=>t.map(AM).join(` ${e} `).replace(/calc/g,""),hI=(...e)=>`calc(${f0("+",...e)})`,pI=(...e)=>`calc(${f0("-",...e)})`,sx=(...e)=>`calc(${f0("*",...e)})`,mI=(...e)=>`calc(${f0("/",...e)})`,vI=e=>{const t=AM(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:sx(t,-1)},Mu=Object.assign(e=>({add:(...t)=>Mu(hI(e,...t)),subtract:(...t)=>Mu(pI(e,...t)),multiply:(...t)=>Mu(sx(e,...t)),divide:(...t)=>Mu(mI(e,...t)),negate:()=>Mu(vI(e)),toString:()=>e.toString()}),{add:hI,subtract:pI,multiply:sx,divide:mI,negate:vI});function Eq(e,t="-"){return e.replace(/\s+/g,t)}function Tq(e){const t=Eq(e.toString());return Rq(Oq(t))}function Oq(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function Rq(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function Iq(e,t=""){return[t,e].filter(Boolean).join("-")}function kq(e,t){return`var(${e}${t?`, ${t}`:""})`}function jq(e,t=""){return Tq(`--${Iq(e,t)}`)}function yt(e,t,r){const n=jq(e,r);return{variable:n,reference:kq(n,t)}}function $q(e,t){const r={};for(const n of t){if(Array.isArray(n)){const[i,o]=n;r[i]=yt(`${e}-${i}`,o);continue}r[n]=yt(`${e}-${n}`)}return r}function Aq(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function Dq(e){const t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}}function lx(e){if(e==null)return e;const{unitless:t}=Dq(e);return t||typeof e=="number"?`${e}px`:e}var DM=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,oC=e=>Object.fromEntries(Object.entries(e).sort(DM));function gI(e){const t=oC(e);return Object.assign(Object.values(t),t)}function Mq(e){const t=Object.keys(oC(e));return new Set(t)}function yI(e){var t;if(!e)return e;e=(t=lx(e))!=null?t:e;const r=-.02;return typeof e=="number"?`${e+r}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+r}`)}function Hh(e,t){const r=["@media screen"];return e&&r.push("and",`(min-width: ${lx(e)})`),t&&r.push("and",`(max-width: ${lx(t)})`),r.join(" ")}function Nq(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const r=gI(e),n=Object.entries(e).sort(DM).map(([a,l],c,d)=>{var f;let[,p]=(f=d[c+1])!=null?f:[];return p=parseFloat(p)>0?yI(p):void 0,{_minW:yI(l),breakpoint:a,minW:l,maxW:p,maxWQuery:Hh(null,p),minWQuery:Hh(l),minMaxQuery:Hh(l,p)}}),i=Mq(e),o=Array.from(i.values());return{keys:i,normalized:r,isResponsive(a){const l=Object.keys(a);return l.length>0&&l.every(c=>i.has(c))},asObject:oC(e),asArray:gI(e),details:n,get(a){return n.find(l=>l.breakpoint===a)},media:[null,...r.map(a=>Hh(a)).slice(1)],toArrayValue(a){if(!ua(a))throw new Error("toArrayValue: value must be an object");const l=o.map(c=>{var d;return(d=a[c])!=null?d:null});for(;Aq(l)===null;)l.pop();return l},toObjectValue(a){if(!Array.isArray(a))throw new Error("toObjectValue: value must be an array");return a.reduce((l,c,d)=>{const f=o[d];return f!=null&&c!=null&&(l[f]=c),l},{})}}}var Wn={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},vl=e=>MM(t=>e(t,"&"),"[role=group]","[data-group]",".group"),gs=e=>MM(t=>e(t,"~ &"),"[data-peer]",".peer"),MM=(e,...t)=>t.map(e).join(", "),h0={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:vl(Wn.hover),_peerHover:gs(Wn.hover),_groupFocus:vl(Wn.focus),_peerFocus:gs(Wn.focus),_groupFocusVisible:vl(Wn.focusVisible),_peerFocusVisible:gs(Wn.focusVisible),_groupActive:vl(Wn.active),_peerActive:gs(Wn.active),_groupDisabled:vl(Wn.disabled),_peerDisabled:gs(Wn.disabled),_groupInvalid:vl(Wn.invalid),_peerInvalid:gs(Wn.invalid),_groupChecked:vl(Wn.checked),_peerChecked:gs(Wn.checked),_groupFocusWithin:vl(Wn.focusWithin),_peerFocusWithin:gs(Wn.focusWithin),_peerPlaceholderShown:gs(Wn.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},NM=Object.keys(h0);function bI(e,t){return yt(String(e).replace(/\./g,"-"),void 0,t)}function Fq(e,t){let r={};const n={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:l}=o,{variable:c,reference:d}=bI(i,t==null?void 0:t.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[g,...b]=m,y=`${g}.-${b.join(".")}`,w=Mu.negate(l),_=Mu.negate(d);n[y]={value:w,var:c,varRef:_}}r[c]=l,n[i]={value:l,var:c,varRef:d};continue}const f=m=>{const b=[String(i).split(".")[0],m].join(".");if(!e[b])return m;const{reference:w}=bI(b,t==null?void 0:t.cssVarPrefix);return w},p=ua(l)?l:{default:l};r=Va(r,Object.entries(p).reduce((m,[g,b])=>{var y,w;if(!b)return m;const _=f(`${b}`);if(g==="default")return m[c]=_,m;const S=(w=(y=h0)==null?void 0:y[g])!=null?w:g;return m[S]={[c]:_},m},{})),n[i]={value:d,var:c,varRef:d}}return{cssVars:r,cssMap:n}}function Lq(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}function Bq(e,t){const r={};for(const n of t)n in e&&(r[n]=e[n]);return r}function Vq(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function wI(e,t,r={}){const{stop:n,getKey:i}=r;function o(a,l=[]){var c;if(Vq(a)||Array.isArray(a)){const d={};for(const[f,p]of Object.entries(a)){const m=(c=i==null?void 0:i(f))!=null?c:f,g=[...l,m];if(n!=null&&n(a,g))return t(a,l);d[m]=o(p,g)}return d}return t(a,l)}return o(e)}var zq=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function qq(e){return Bq(e,zq)}function Uq(e){return e.semanticTokens}function Hq(e){const{__cssMap:t,__cssVars:r,__breakpoints:n,...i}=e;return i}var Wq=e=>NM.includes(e)||e==="default";function Kq({tokens:e,semanticTokens:t}){const r={};return wI(e,(n,i)=>{n!=null&&(r[i.join(".")]={isSemantic:!1,value:n})}),wI(t,(n,i)=>{n!=null&&(r[i.join(".")]={isSemantic:!0,value:n})},{stop:n=>Object.keys(n).every(Wq)}),r}function Gq(e){var t;const r=Hq(e),n=qq(r),i=Uq(r),o=Kq({tokens:n,semanticTokens:i}),a=(t=r.config)==null?void 0:t.cssVarPrefix,{cssMap:l,cssVars:c}=Fq(o,{cssVarPrefix:a});return Object.assign(r,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...c},__cssMap:l,__breakpoints:Nq(r.breakpoints)}),r}var aC=Va({},jy,fr,cq,ab,Io,dq,wq,fq,$M,bq,tp,ax,Vr,Cq,Pq,Sq,_q,hq,xq);Object.assign({},Vr,Io,ab,$M,tp);var Qq=[...Object.keys(aC),...NM],Yq={...aC,...h0},Xq=e=>e in Yq,Jq=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:r,toArrayValue:n,media:i}=t.__breakpoints,o={};for(const a in e){let l=Do(e[a],t);if(l==null)continue;if(l=ua(l)&&r(l)?n(l):l,!Array.isArray(l)){o[a]=l;continue}const c=l.slice(0,i.length).length;for(let d=0;d<c;d+=1){const f=i==null?void 0:i[d];if(!f){o[a]=l[d];continue}o[f]=o[f]||{},l[d]!=null&&(o[f][a]=l[d])}}return o};function Zq(e){const t=[];let r="",n=!1;for(let i=0;i<e.length;i++){const o=e[i];o==="("?(n=!0,r+=o):o===")"?(n=!1,r+=o):o===","&&!n?(t.push(r),r=""):r+=o}return r=r.trim(),r&&t.push(r),t}function eU(e){return/^var\(--.+\)$/.test(e)}var tU=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!eU(t),rU=(e,t)=>{var r,n;if(t==null)return t;const i=c=>{var d,f;return(f=(d=e.__cssMap)==null?void 0:d[c])==null?void 0:f.varRef},o=c=>{var d;return(d=i(c))!=null?d:c},[a,l]=Zq(t);return t=(n=(r=i(a))!=null?r:o(l))!=null?n:o(t),t};function nU(e){const{configs:t={},pseudos:r={},theme:n}=e,i=(o,a=!1)=>{var l,c,d;const f=Do(o,n),p=Jq(f)(n);let m={};for(let g in p){const b=p[g];let y=Do(b,n);g in r&&(g=r[g]),tU(g,y)&&(y=rU(n,y));let w=t[g];if(w===!0&&(w={property:g}),ua(y)){m[g]=(l=m[g])!=null?l:{},m[g]=Va({},m[g],i(y,!0));continue}let _=(d=(c=w==null?void 0:w.transform)==null?void 0:c.call(w,y,n,f))!=null?d:y;_=w!=null&&w.processResult?i(_,!0):_;const S=Do(w==null?void 0:w.property,n);if(!a&&(w!=null&&w.static)){const C=Do(w.static,n);m=Va({},m,C)}if(S&&Array.isArray(S)){for(const C of S)m[C]=_;continue}if(S){S==="&"&&ua(_)?m=Va({},m,_):m[S]=_;continue}if(ua(_)){m=Va({},m,_);continue}m[g]=_}return m};return i}var FM=e=>t=>nU({theme:t,pseudos:h0,configs:aC})(e);function Dr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function iU(e,t){if(Array.isArray(e))return e;if(ua(e))return t(e);if(e!=null)return[e]}function oU(e,t){for(let r=t+1;r<e.length;r++)if(e[r]!=null)return r;return-1}function aU(e){const t=e.__breakpoints;return function(n,i,o,a){var l,c;if(!t)return;const d={},f=iU(o,t.toArrayValue);if(!f)return d;const p=f.length,m=p===1,g=!!n.parts;for(let b=0;b<p;b++){const y=t.details[b],w=t.details[oU(f,b)],_=Hh(y.minW,w==null?void 0:w._minW),S=Do((l=n[i])==null?void 0:l[f[b]],a);if(S){if(g){(c=n.parts)==null||c.forEach(C=>{Va(d,{[C]:m?S[C]:{[_]:S[C]}})});continue}if(!g){m?Va(d,S):d[_]=S;continue}d[_]=S}}return d}}function sU(e){return t=>{var r;const{variant:n,size:i,theme:o}=t,a=aU(o);return Va({},Do((r=e.baseStyle)!=null?r:{},t),a(e,"sizes",i,t),a(e,"variants",n,t))}}function lU(e,t,r){var n,i,o;return(o=(i=(n=e.__cssMap)==null?void 0:n[`${t}.${r}`])==null?void 0:i.varRef)!=null?o:r}function hi(e){return Lq(e,["styleConfig","size","variant","colorScheme"])}var uU={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},cU={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},dU={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},fU={property:uU,easing:cU,duration:dU},hU=fU,pU={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},mU=pU,vU={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},gU=vU,yU={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},bU=yU,wU={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},SU=wU,_U={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},xU=_U,PU={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},CU=PU,EU={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},TU=EU,OU={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},LM=OU,BM={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},RU={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},IU={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},kU={...BM,...RU,container:IU},VM=kU,jU={breakpoints:bU,zIndices:mU,radii:xU,blur:TU,colors:SU,...LM,sizes:VM,shadows:CU,space:BM,borders:gU,transition:hU},{defineMultiStyleConfig:$U,definePartsStyle:Wh}=Dr(["stepper","step","title","description","indicator","separator","icon","number"]),Ss=yt("stepper-indicator-size"),Cd=yt("stepper-icon-size"),Ed=yt("stepper-title-font-size"),Kh=yt("stepper-description-font-size"),xh=yt("stepper-accent-color"),AU=Wh(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[xh.variable]:`colors.${e}.500`,_dark:{[xh.variable]:`colors.${e}.200`}},title:{fontSize:Ed.reference,fontWeight:"medium"},description:{fontSize:Kh.reference,color:"chakra-subtle-text"},number:{fontSize:Ed.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:Cd.reference,height:Cd.reference},indicator:{flexShrink:0,borderRadius:"full",width:Ss.reference,height:Ss.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:xh.reference},"&[data-status=complete]":{bg:xh.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:xh.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${Ss.reference} - 8px)`,top:`calc(${Ss.reference} + 4px)`,insetStart:`calc(${Ss.reference} / 2 - 1px)`}}})),DU=$U({baseStyle:AU,sizes:{xs:Wh({stepper:{[Ss.variable]:"sizes.4",[Cd.variable]:"sizes.3",[Ed.variable]:"fontSizes.xs",[Kh.variable]:"fontSizes.xs"}}),sm:Wh({stepper:{[Ss.variable]:"sizes.6",[Cd.variable]:"sizes.4",[Ed.variable]:"fontSizes.sm",[Kh.variable]:"fontSizes.xs"}}),md:Wh({stepper:{[Ss.variable]:"sizes.8",[Cd.variable]:"sizes.5",[Ed.variable]:"fontSizes.md",[Kh.variable]:"fontSizes.sm"}}),lg:Wh({stepper:{[Ss.variable]:"sizes.10",[Cd.variable]:"sizes.6",[Ed.variable]:"fontSizes.lg",[Kh.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function gr(e,t={}){let r=!1;function n(){if(!r){r=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...f){n();for(const p of f)t[p]=c(p);return gr(e,t)}function o(...f){for(const p of f)p in t||(t[p]=c(p));return gr(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.selector]))}function l(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function c(f){const g=`chakra-${(["container","root"].includes(f??"")?[e]:[e,f]).filter(Boolean).join("__")}`;return{className:g,selector:`.${g}`,toString:()=>f}}return{parts:i,toPart:c,extend:o,selectors:a,classnames:l,get keys(){return Object.keys(t)},__type:{}}}var MU=gr("accordion").parts("root","container","button","panel").extend("icon"),NU=gr("alert").parts("title","description","container").extend("icon","spinner"),FU=gr("avatar").parts("label","badge","container").extend("excessLabel","group"),LU=gr("breadcrumb").parts("link","item","container").extend("separator");gr("button").parts();var BU=gr("checkbox").parts("control","icon","container").extend("label");gr("progress").parts("track","filledTrack").extend("label");var VU=gr("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),zU=gr("editable").parts("preview","input","textarea"),qU=gr("form").parts("container","requiredIndicator","helperText"),UU=gr("formError").parts("text","icon"),HU=gr("input").parts("addon","field","element","group"),WU=gr("list").parts("container","item","icon"),KU=gr("menu").parts("button","list","item").extend("groupTitle","icon","command","divider"),GU=gr("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),QU=gr("numberinput").parts("root","field","stepperGroup","stepper");gr("pininput").parts("field");var YU=gr("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),XU=gr("progress").parts("label","filledTrack","track"),JU=gr("radio").parts("container","control","label"),ZU=gr("select").parts("field","icon"),e7=gr("slider").parts("container","track","thumb","filledTrack","mark"),t7=gr("stat").parts("container","label","helpText","number","icon"),r7=gr("switch").parts("container","track","thumb","label"),n7=gr("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),i7=gr("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),o7=gr("tag").parts("container","label","closeButton"),a7=gr("card").parts("container","header","body","footer");gr("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");function Bu(e,t,r){return Math.min(Math.max(e,r),t)}class s7 extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var Gh=s7;function sC(e){if(typeof e!="string")throw new Gh(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=m7.test(e)?c7(e):e;const r=d7.exec(t);if(r){const a=Array.from(r).slice(1);return[...a.slice(0,3).map(l=>parseInt(jp(l,2),16)),parseInt(jp(a[3]||"f",2),16)/255]}const n=f7.exec(t);if(n){const a=Array.from(n).slice(1);return[...a.slice(0,3).map(l=>parseInt(l,16)),parseInt(a[3]||"ff",16)/255]}const i=h7.exec(t);if(i){const a=Array.from(i).slice(1);return[...a.slice(0,3).map(l=>parseInt(l,10)),parseFloat(a[3]||"1")]}const o=p7.exec(t);if(o){const[a,l,c,d]=Array.from(o).slice(1).map(parseFloat);if(Bu(0,100,l)!==l)throw new Gh(e);if(Bu(0,100,c)!==c)throw new Gh(e);return[...v7(a,l,c),Number.isNaN(d)?1:d]}throw new Gh(e)}function l7(e){let t=5381,r=e.length;for(;r;)t=t*33^e.charCodeAt(--r);return(t>>>0)%2341}const SI=e=>parseInt(e.replace(/_/g,""),36),u7="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const r=SI(t.substring(0,3)),n=SI(t.substring(3)).toString(16);let i="";for(let o=0;o<6-n.length;o++)i+="0";return e[r]=`${i}${n}`,e},{});function c7(e){const t=e.toLowerCase().trim(),r=u7[l7(t)];if(!r)throw new Gh(e);return`#${r}`}const jp=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),d7=new RegExp(`^#${jp("([a-f0-9])",3)}([a-f0-9])?$`,"i"),f7=new RegExp(`^#${jp("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),h7=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${jp(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),p7=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,m7=/^[a-z]+$/i,_I=e=>Math.round(e*255),v7=(e,t,r)=>{let n=r/100;if(t===0)return[n,n,n].map(_I);const i=(e%360+360)%360/60,o=(1-Math.abs(2*n-1))*(t/100),a=o*(1-Math.abs(i%2-1));let l=0,c=0,d=0;i>=0&&i<1?(l=o,c=a):i>=1&&i<2?(l=a,c=o):i>=2&&i<3?(c=o,d=a):i>=3&&i<4?(c=a,d=o):i>=4&&i<5?(l=a,d=o):i>=5&&i<6&&(l=o,d=a);const f=n-o/2,p=l+f,m=c+f,g=d+f;return[p,m,g].map(_I)};function g7(e,t,r,n){return`rgba(${Bu(0,255,e).toFixed()}, ${Bu(0,255,t).toFixed()}, ${Bu(0,255,r).toFixed()}, ${parseFloat(Bu(0,1,n).toFixed(3))})`}function y7(e,t){const[r,n,i,o]=sC(e);return g7(r,n,i,o-t)}function b7(e){const[t,r,n,i]=sC(e);let o=a=>{const l=Bu(0,255,a).toString(16);return l.length===1?`0${l}`:l};return`#${o(t)}${o(r)}${o(n)}${i<1?o(Math.round(i*255)):""}`}function w7(e,t,r,n,i){for(t=t.split?t.split("."):t,n=0;n<t.length;n++)e=e?e[t[n]]:i;return e===i?r:e}var S7=e=>Object.keys(e).length===0,xi=(e,t,r)=>{const n=w7(e,`colors.${t}`,t);try{return b7(n),n}catch{return r??"#000000"}},_7=e=>{const[t,r,n]=sC(e);return(t*299+r*587+n*114)/1e3},x7=e=>t=>{const r=xi(t,e);return _7(r)<128?"dark":"light"},P7=e=>t=>x7(e)(t)==="dark",ef=(e,t)=>r=>{const n=xi(r,e);return y7(n,1-t)};function xI(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
|
327
|
-
45deg,
|
328
|
-
${t} 25%,
|
329
|
-
transparent 25%,
|
330
|
-
transparent 50%,
|
331
|
-
${t} 50%,
|
332
|
-
${t} 75%,
|
333
|
-
transparent 75%,
|
334
|
-
transparent
|
335
|
-
)`,backgroundSize:`${e} ${e}`}}var C7=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function E7(e){const t=C7();return!e||S7(e)?t:e.string&&e.colors?O7(e.string,e.colors):e.string&&!e.colors?T7(e.string):e.colors&&!e.string?R7(e.colors):t}function T7(e){let t=0;if(e.length===0)return t.toString();for(let n=0;n<e.length;n+=1)t=e.charCodeAt(n)+((t<<5)-t),t=t&t;let r="#";for(let n=0;n<3;n+=1){const i=t>>n*8&255;r+=`00${i.toString(16)}`.substr(-2)}return r}function O7(e,t){let r=0;if(e.length===0)return t[0];for(let n=0;n<e.length;n+=1)r=e.charCodeAt(n)+((r<<5)-r),r=r&r;return r=(r%t.length+t.length)%t.length,t[r]}function R7(e){return e[Math.floor(Math.random()*e.length)]}function gt(e,t){return r=>r.colorMode==="dark"?t:e}function lC(e){const{orientation:t,vertical:r,horizontal:n}=e;return t?t==="vertical"?r:n:{}}function zM(e){return ua(e)&&e.reference?e.reference:String(e)}var p0=(e,...t)=>t.map(zM).join(` ${e} `).replace(/calc/g,""),PI=(...e)=>`calc(${p0("+",...e)})`,CI=(...e)=>`calc(${p0("-",...e)})`,ux=(...e)=>`calc(${p0("*",...e)})`,EI=(...e)=>`calc(${p0("/",...e)})`,TI=e=>{const t=zM(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:ux(t,-1)},_s=Object.assign(e=>({add:(...t)=>_s(PI(e,...t)),subtract:(...t)=>_s(CI(e,...t)),multiply:(...t)=>_s(ux(e,...t)),divide:(...t)=>_s(EI(e,...t)),negate:()=>_s(TI(e)),toString:()=>e.toString()}),{add:PI,subtract:CI,multiply:ux,divide:EI,negate:TI});function I7(e){return!Number.isInteger(parseFloat(e.toString()))}function k7(e,t="-"){return e.replace(/\s+/g,t)}function qM(e){const t=k7(e.toString());return t.includes("\\.")?e:I7(e)?t.replace(".","\\."):e}function j7(e,t=""){return[t,qM(e)].filter(Boolean).join("-")}function $7(e,t){return`var(${qM(e)}${t?`, ${t}`:""})`}function A7(e,t=""){return`--${j7(e,t)}`}function $n(e,t){const r=A7(e,void 0);return{variable:r,reference:$7(r,D7(void 0))}}function D7(e){return e==null?void 0:e.reference}var{defineMultiStyleConfig:M7,definePartsStyle:$y}=Dr(r7.keys),rp=$n("switch-track-width"),Hu=$n("switch-track-height"),l1=$n("switch-track-diff"),N7=_s.subtract(rp,Hu),cx=$n("switch-thumb-x"),Ph=$n("switch-bg"),F7=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[rp.reference],height:[Hu.reference],transitionProperty:"common",transitionDuration:"fast",[Ph.variable]:"colors.gray.300",_dark:{[Ph.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Ph.variable]:`colors.${t}.500`,_dark:{[Ph.variable]:`colors.${t}.200`}},bg:Ph.reference}},L7={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Hu.reference],height:[Hu.reference],_checked:{transform:`translateX(${cx.reference})`}},B7=$y(e=>({container:{[l1.variable]:N7,[cx.variable]:l1.reference,_rtl:{[cx.variable]:_s(l1).negate().toString()}},track:F7(e),thumb:L7})),V7={sm:$y({container:{[rp.variable]:"1.375rem",[Hu.variable]:"sizes.3"}}),md:$y({container:{[rp.variable]:"1.875rem",[Hu.variable]:"sizes.4"}}),lg:$y({container:{[rp.variable]:"2.875rem",[Hu.variable]:"sizes.6"}})},z7=M7({baseStyle:B7,sizes:V7,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:q7,definePartsStyle:Ud}=Dr(n7.keys),U7=Ud({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),sb={"&[data-is-numeric=true]":{textAlign:"end"}},H7=Ud(e=>{const{colorScheme:t}=e;return{th:{color:gt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:gt(`${t}.100`,`${t}.700`)(e),...sb},td:{borderBottom:"1px",borderColor:gt(`${t}.100`,`${t}.700`)(e),...sb},caption:{color:gt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),W7=Ud(e=>{const{colorScheme:t}=e;return{th:{color:gt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:gt(`${t}.100`,`${t}.700`)(e),...sb},td:{borderBottom:"1px",borderColor:gt(`${t}.100`,`${t}.700`)(e),...sb},caption:{color:gt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:gt(`${t}.100`,`${t}.700`)(e)},td:{background:gt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),K7={simple:H7,striped:W7,unstyled:{}},G7={sm:Ud({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:Ud({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:Ud({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Q7=q7({baseStyle:U7,variants:K7,sizes:G7,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Di=yt("tabs-color"),sa=yt("tabs-bg"),ug=yt("tabs-border-color"),{defineMultiStyleConfig:Y7,definePartsStyle:Ha}=Dr(i7.keys),X7=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},J7=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Z7=e=>{const{align:t="start",orientation:r}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:r==="vertical"?"column":"row"}},e9={p:4},t9=Ha(e=>({root:X7(e),tab:J7(e),tablist:Z7(e),tabpanel:e9})),r9={sm:Ha({tab:{py:1,px:4,fontSize:"sm"}}),md:Ha({tab:{fontSize:"md",py:2,px:4}}),lg:Ha({tab:{fontSize:"lg",py:3,px:4}})},n9=Ha(e=>{const{colorScheme:t,orientation:r}=e,n=r==="vertical",i=n?"borderStart":"borderBottom",o=n?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[Di.variable]:`colors.${t}.600`,_dark:{[Di.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[sa.variable]:"colors.gray.200",_dark:{[sa.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:Di.reference,bg:sa.reference}}}),i9=Ha(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[ug.variable]:"transparent",_selected:{[Di.variable]:`colors.${t}.600`,[ug.variable]:"colors.white",_dark:{[Di.variable]:`colors.${t}.300`,[ug.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:ug.reference},color:Di.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),o9=Ha(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[sa.variable]:"colors.gray.50",_dark:{[sa.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[sa.variable]:"colors.white",[Di.variable]:`colors.${t}.600`,_dark:{[sa.variable]:"colors.gray.800",[Di.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:Di.reference,bg:sa.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),a9=Ha(e=>{const{colorScheme:t,theme:r}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:xi(r,`${t}.700`),bg:xi(r,`${t}.100`)}}}}),s9=Ha(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[Di.variable]:"colors.gray.600",_dark:{[Di.variable]:"inherit"},_selected:{[Di.variable]:"colors.white",[sa.variable]:`colors.${t}.600`,_dark:{[Di.variable]:"colors.gray.800",[sa.variable]:`colors.${t}.300`}},color:Di.reference,bg:sa.reference}}}),l9=Ha({}),u9={line:n9,enclosed:i9,"enclosed-colored":o9,"soft-rounded":a9,"solid-rounded":s9,unstyled:l9},c9=Y7({baseStyle:t9,sizes:r9,variants:u9,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),wn=$q("badge",["bg","color","shadow"]),d9={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:wn.bg.reference,color:wn.color.reference,boxShadow:wn.shadow.reference},f9=e=>{const{colorScheme:t,theme:r}=e,n=ef(`${t}.500`,.6)(r);return{[wn.bg.variable]:`colors.${t}.500`,[wn.color.variable]:"colors.white",_dark:{[wn.bg.variable]:n,[wn.color.variable]:"colors.whiteAlpha.800"}}},h9=e=>{const{colorScheme:t,theme:r}=e,n=ef(`${t}.200`,.16)(r);return{[wn.bg.variable]:`colors.${t}.100`,[wn.color.variable]:`colors.${t}.800`,_dark:{[wn.bg.variable]:n,[wn.color.variable]:`colors.${t}.200`}}},p9=e=>{const{colorScheme:t,theme:r}=e,n=ef(`${t}.200`,.8)(r);return{[wn.color.variable]:`colors.${t}.500`,_dark:{[wn.color.variable]:n},[wn.shadow.variable]:`inset 0 0 0px 1px ${wn.color.reference}`}},m9={solid:f9,subtle:h9,outline:p9},np={baseStyle:d9,variants:m9,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:v9,definePartsStyle:Wu}=Dr(o7.keys),OI=yt("tag-bg"),RI=yt("tag-color"),u1=yt("tag-shadow"),Ay=yt("tag-min-height"),Dy=yt("tag-min-width"),My=yt("tag-font-size"),Ny=yt("tag-padding-inline"),g9={fontWeight:"medium",lineHeight:1.2,outline:0,[RI.variable]:wn.color.reference,[OI.variable]:wn.bg.reference,[u1.variable]:wn.shadow.reference,color:RI.reference,bg:OI.reference,boxShadow:u1.reference,borderRadius:"md",minH:Ay.reference,minW:Dy.reference,fontSize:My.reference,px:Ny.reference,_focusVisible:{[u1.variable]:"shadows.outline"}},y9={lineHeight:1.2,overflow:"visible"},b9={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},w9=Wu({container:g9,label:y9,closeButton:b9}),S9={sm:Wu({container:{[Ay.variable]:"sizes.5",[Dy.variable]:"sizes.5",[My.variable]:"fontSizes.xs",[Ny.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Wu({container:{[Ay.variable]:"sizes.6",[Dy.variable]:"sizes.6",[My.variable]:"fontSizes.sm",[Ny.variable]:"space.2"}}),lg:Wu({container:{[Ay.variable]:"sizes.8",[Dy.variable]:"sizes.8",[My.variable]:"fontSizes.md",[Ny.variable]:"space.3"}})},_9={subtle:Wu(e=>{var t;return{container:(t=np.variants)==null?void 0:t.subtle(e)}}),solid:Wu(e=>{var t;return{container:(t=np.variants)==null?void 0:t.solid(e)}}),outline:Wu(e=>{var t;return{container:(t=np.variants)==null?void 0:t.outline(e)}})},x9=v9({variants:_9,baseStyle:w9,sizes:S9,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:xs,defineMultiStyleConfig:P9}=Dr(HU.keys),Td=yt("input-height"),Od=yt("input-font-size"),Rd=yt("input-padding"),Id=yt("input-border-radius"),C9=xs({addon:{height:Td.reference,fontSize:Od.reference,px:Rd.reference,borderRadius:Id.reference},field:{width:"100%",height:Td.reference,fontSize:Od.reference,px:Rd.reference,borderRadius:Id.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),gl={lg:{[Od.variable]:"fontSizes.lg",[Rd.variable]:"space.4",[Id.variable]:"radii.md",[Td.variable]:"sizes.12"},md:{[Od.variable]:"fontSizes.md",[Rd.variable]:"space.4",[Id.variable]:"radii.md",[Td.variable]:"sizes.10"},sm:{[Od.variable]:"fontSizes.sm",[Rd.variable]:"space.3",[Id.variable]:"radii.sm",[Td.variable]:"sizes.8"},xs:{[Od.variable]:"fontSizes.xs",[Rd.variable]:"space.2",[Id.variable]:"radii.sm",[Td.variable]:"sizes.6"}},E9={lg:xs({field:gl.lg,group:gl.lg}),md:xs({field:gl.md,group:gl.md}),sm:xs({field:gl.sm,group:gl.sm}),xs:xs({field:gl.xs,group:gl.xs})};function uC(e){const{focusBorderColor:t,errorBorderColor:r}=e;return{focusBorderColor:t||gt("blue.500","blue.300")(e),errorBorderColor:r||gt("red.500","red.300")(e)}}var T9=xs(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=uC(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:gt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:xi(t,n),boxShadow:`0 0 0 1px ${xi(t,n)}`},_focusVisible:{zIndex:1,borderColor:xi(t,r),boxShadow:`0 0 0 1px ${xi(t,r)}`}},addon:{border:"1px solid",borderColor:gt("inherit","whiteAlpha.50")(e),bg:gt("gray.100","whiteAlpha.300")(e)}}}),O9=xs(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=uC(e);return{field:{border:"2px solid",borderColor:"transparent",bg:gt("gray.100","whiteAlpha.50")(e),_hover:{bg:gt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:xi(t,n)},_focusVisible:{bg:"transparent",borderColor:xi(t,r)}},addon:{border:"2px solid",borderColor:"transparent",bg:gt("gray.100","whiteAlpha.50")(e)}}}),R9=xs(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=uC(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:xi(t,n),boxShadow:`0px 1px 0px 0px ${xi(t,n)}`},_focusVisible:{borderColor:xi(t,r),boxShadow:`0px 1px 0px 0px ${xi(t,r)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),I9=xs({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),k9={outline:T9,filled:O9,flushed:R9,unstyled:I9},vr=P9({baseStyle:C9,sizes:E9,variants:k9,defaultProps:{size:"md",variant:"outline"}}),II,j9={...(II=vr.baseStyle)==null?void 0:II.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},kI,jI,$9={outline:e=>{var t,r;return(r=(t=vr.variants)==null?void 0:t.outline(e).field)!=null?r:{}},flushed:e=>{var t,r;return(r=(t=vr.variants)==null?void 0:t.flushed(e).field)!=null?r:{}},filled:e=>{var t,r;return(r=(t=vr.variants)==null?void 0:t.filled(e).field)!=null?r:{}},unstyled:(jI=(kI=vr.variants)==null?void 0:kI.unstyled.field)!=null?jI:{}},$I,AI,DI,MI,NI,FI,LI,BI,A9={xs:(AI=($I=vr.sizes)==null?void 0:$I.xs.field)!=null?AI:{},sm:(MI=(DI=vr.sizes)==null?void 0:DI.sm.field)!=null?MI:{},md:(FI=(NI=vr.sizes)==null?void 0:NI.md.field)!=null?FI:{},lg:(BI=(LI=vr.sizes)==null?void 0:LI.lg.field)!=null?BI:{}},D9={baseStyle:j9,sizes:A9,variants:$9,defaultProps:{size:"md",variant:"outline"}},cg=$n("tooltip-bg"),c1=$n("tooltip-fg"),M9=$n("popper-arrow-bg"),N9={bg:cg.reference,color:c1.reference,[cg.variable]:"colors.gray.700",[c1.variable]:"colors.whiteAlpha.900",_dark:{[cg.variable]:"colors.gray.300",[c1.variable]:"colors.gray.900"},[M9.variable]:cg.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},F9={baseStyle:N9},{defineMultiStyleConfig:L9,definePartsStyle:Qh}=Dr(XU.keys),B9=e=>{const{colorScheme:t,theme:r,isIndeterminate:n,hasStripe:i}=e,o=gt(xI(),xI("1rem","rgba(0,0,0,0.1)"))(e),a=gt(`${t}.500`,`${t}.200`)(e),l=`linear-gradient(
|
336
|
-
to right,
|
337
|
-
transparent 0%,
|
338
|
-
${xi(r,a)} 50%,
|
339
|
-
transparent 100%
|
340
|
-
)`;return{...!n&&i&&o,...n?{bgImage:l}:{bgColor:a}}},V9={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},z9=e=>({bg:gt("gray.100","whiteAlpha.300")(e)}),q9=e=>({transitionProperty:"common",transitionDuration:"slow",...B9(e)}),U9=Qh(e=>({label:V9,filledTrack:q9(e),track:z9(e)})),H9={xs:Qh({track:{h:"1"}}),sm:Qh({track:{h:"2"}}),md:Qh({track:{h:"3"}}),lg:Qh({track:{h:"4"}})},W9=L9({sizes:H9,baseStyle:U9,defaultProps:{size:"md",colorScheme:"blue"}}),K9=e=>typeof e=="function";function Pi(e,...t){return K9(e)?e(...t):e}var{definePartsStyle:Fy,defineMultiStyleConfig:G9}=Dr(BU.keys),ip=yt("checkbox-size"),Q9=e=>{const{colorScheme:t}=e;return{w:ip.reference,h:ip.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:gt(`${t}.500`,`${t}.200`)(e),borderColor:gt(`${t}.500`,`${t}.200`)(e),color:gt("white","gray.900")(e),_hover:{bg:gt(`${t}.600`,`${t}.300`)(e),borderColor:gt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:gt("gray.200","transparent")(e),bg:gt("gray.200","whiteAlpha.300")(e),color:gt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:gt(`${t}.500`,`${t}.200`)(e),borderColor:gt(`${t}.500`,`${t}.200`)(e),color:gt("white","gray.900")(e)},_disabled:{bg:gt("gray.100","whiteAlpha.100")(e),borderColor:gt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:gt("red.500","red.300")(e)}}},Y9={_disabled:{cursor:"not-allowed"}},X9={userSelect:"none",_disabled:{opacity:.4}},J9={transitionProperty:"transform",transitionDuration:"normal"},Z9=Fy(e=>({icon:J9,container:Y9,control:Pi(Q9,e),label:X9})),eH={sm:Fy({control:{[ip.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:Fy({control:{[ip.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:Fy({control:{[ip.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},lb=G9({baseStyle:Z9,sizes:eH,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:tH,definePartsStyle:Ly}=Dr(JU.keys),rH=e=>{var t;const r=(t=Pi(lb.baseStyle,e))==null?void 0:t.control;return{...r,borderRadius:"full",_checked:{...r==null?void 0:r._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},nH=Ly(e=>{var t,r,n,i;return{label:(r=(t=lb).baseStyle)==null?void 0:r.call(t,e).label,container:(i=(n=lb).baseStyle)==null?void 0:i.call(n,e).container,control:rH(e)}}),iH={md:Ly({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:Ly({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:Ly({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},oH=tH({baseStyle:nH,sizes:iH,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:aH,definePartsStyle:sH}=Dr(ZU.keys),dg=yt("select-bg"),VI,lH={...(VI=vr.baseStyle)==null?void 0:VI.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:dg.reference,[dg.variable]:"colors.white",_dark:{[dg.variable]:"colors.gray.700"},"> option, > optgroup":{bg:dg.reference}},uH={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},cH=sH({field:lH,icon:uH}),fg={paddingInlineEnd:"8"},zI,qI,UI,HI,WI,KI,GI,QI,dH={lg:{...(zI=vr.sizes)==null?void 0:zI.lg,field:{...(qI=vr.sizes)==null?void 0:qI.lg.field,...fg}},md:{...(UI=vr.sizes)==null?void 0:UI.md,field:{...(HI=vr.sizes)==null?void 0:HI.md.field,...fg}},sm:{...(WI=vr.sizes)==null?void 0:WI.sm,field:{...(KI=vr.sizes)==null?void 0:KI.sm.field,...fg}},xs:{...(GI=vr.sizes)==null?void 0:GI.xs,field:{...(QI=vr.sizes)==null?void 0:QI.xs.field,...fg},icon:{insetEnd:"1"}}},fH=aH({baseStyle:cH,sizes:dH,variants:vr.variants,defaultProps:vr.defaultProps}),d1=yt("skeleton-start-color"),f1=yt("skeleton-end-color"),hH={[d1.variable]:"colors.gray.100",[f1.variable]:"colors.gray.400",_dark:{[d1.variable]:"colors.gray.800",[f1.variable]:"colors.gray.600"},background:d1.reference,borderColor:f1.reference,opacity:.7,borderRadius:"sm"},pH={baseStyle:hH},h1=yt("skip-link-bg"),mH={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[h1.variable]:"colors.white",_dark:{[h1.variable]:"colors.gray.700"},bg:h1.reference}},vH={baseStyle:mH},{defineMultiStyleConfig:gH,definePartsStyle:m0}=Dr(e7.keys),$p=yt("slider-thumb-size"),Ap=yt("slider-track-size"),Ol=yt("slider-bg"),yH=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...lC({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},bH=e=>({...lC({orientation:e.orientation,horizontal:{h:Ap.reference},vertical:{w:Ap.reference}}),overflow:"hidden",borderRadius:"sm",[Ol.variable]:"colors.gray.200",_dark:{[Ol.variable]:"colors.whiteAlpha.200"},_disabled:{[Ol.variable]:"colors.gray.300",_dark:{[Ol.variable]:"colors.whiteAlpha.300"}},bg:Ol.reference}),wH=e=>{const{orientation:t}=e;return{...lC({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:$p.reference,h:$p.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},SH=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Ol.variable]:`colors.${t}.500`,_dark:{[Ol.variable]:`colors.${t}.200`},bg:Ol.reference}},_H=m0(e=>({container:yH(e),track:bH(e),thumb:wH(e),filledTrack:SH(e)})),xH=m0({container:{[$p.variable]:"sizes.4",[Ap.variable]:"sizes.1"}}),PH=m0({container:{[$p.variable]:"sizes.3.5",[Ap.variable]:"sizes.1"}}),CH=m0({container:{[$p.variable]:"sizes.2.5",[Ap.variable]:"sizes.0.5"}}),EH={lg:xH,md:PH,sm:CH},TH=gH({baseStyle:_H,sizes:EH,defaultProps:{size:"md",colorScheme:"blue"}}),Nu=$n("spinner-size"),OH={width:[Nu.reference],height:[Nu.reference]},RH={xs:{[Nu.variable]:"sizes.3"},sm:{[Nu.variable]:"sizes.4"},md:{[Nu.variable]:"sizes.6"},lg:{[Nu.variable]:"sizes.8"},xl:{[Nu.variable]:"sizes.12"}},IH={baseStyle:OH,sizes:RH,defaultProps:{size:"md"}},{defineMultiStyleConfig:kH,definePartsStyle:UM}=Dr(t7.keys),jH={fontWeight:"medium"},$H={opacity:.8,marginBottom:"2"},AH={verticalAlign:"baseline",fontWeight:"semibold"},DH={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},MH=UM({container:{},label:jH,helpText:$H,number:AH,icon:DH}),NH={md:UM({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},FH=kH({baseStyle:MH,sizes:NH,defaultProps:{size:"md"}}),p1=yt("kbd-bg"),LH={[p1.variable]:"colors.gray.100",_dark:{[p1.variable]:"colors.whiteAlpha.100"},bg:p1.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},BH={baseStyle:LH},VH={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},zH={baseStyle:VH},{defineMultiStyleConfig:qH,definePartsStyle:UH}=Dr(WU.keys),HH={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},WH=UH({icon:HH}),KH=qH({baseStyle:WH}),{defineMultiStyleConfig:GH,definePartsStyle:QH}=Dr(KU.keys),Da=yt("menu-bg"),m1=yt("menu-shadow"),YH={[Da.variable]:"#fff",[m1.variable]:"shadows.sm",_dark:{[Da.variable]:"colors.gray.700",[m1.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:Da.reference,boxShadow:m1.reference},XH={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Da.variable]:"colors.gray.100",_dark:{[Da.variable]:"colors.whiteAlpha.100"}},_active:{[Da.variable]:"colors.gray.200",_dark:{[Da.variable]:"colors.whiteAlpha.200"}},_expanded:{[Da.variable]:"colors.gray.100",_dark:{[Da.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Da.reference},JH={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},ZH={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},eW={opacity:.6},tW={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},rW={transitionProperty:"common",transitionDuration:"normal"},nW=QH({button:rW,list:YH,item:XH,groupTitle:JH,icon:ZH,command:eW,divider:tW}),iW=GH({baseStyle:nW}),{defineMultiStyleConfig:oW,definePartsStyle:dx}=Dr(GU.keys),v1=yt("modal-bg"),g1=yt("modal-shadow"),aW={bg:"blackAlpha.600",zIndex:"modal"},sW=e=>{const{isCentered:t,scrollBehavior:r}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:r==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},lW=e=>{const{isCentered:t,scrollBehavior:r}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:r==="inside"?"calc(100% - 7.5rem)":void 0,[v1.variable]:"colors.white",[g1.variable]:"shadows.lg",_dark:{[v1.variable]:"colors.gray.700",[g1.variable]:"shadows.dark-lg"},bg:v1.reference,boxShadow:g1.reference}},uW={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},cW={position:"absolute",top:"2",insetEnd:"3"},dW=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},fW={px:"6",py:"4"},hW=dx(e=>({overlay:aW,dialogContainer:Pi(sW,e),dialog:Pi(lW,e),header:uW,closeButton:cW,body:Pi(dW,e),footer:fW}));function ra(e){return dx(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var pW={xs:ra("xs"),sm:ra("sm"),md:ra("md"),lg:ra("lg"),xl:ra("xl"),"2xl":ra("2xl"),"3xl":ra("3xl"),"4xl":ra("4xl"),"5xl":ra("5xl"),"6xl":ra("6xl"),full:ra("full")},mW=oW({baseStyle:hW,sizes:pW,defaultProps:{size:"md"}}),{defineMultiStyleConfig:vW,definePartsStyle:HM}=Dr(QU.keys),cC=$n("number-input-stepper-width"),WM=$n("number-input-input-padding"),gW=_s(cC).add("0.5rem").toString(),y1=$n("number-input-bg"),b1=$n("number-input-color"),w1=$n("number-input-border-color"),yW={[cC.variable]:"sizes.6",[WM.variable]:gW},bW=e=>{var t,r;return(r=(t=Pi(vr.baseStyle,e))==null?void 0:t.field)!=null?r:{}},wW={width:cC.reference},SW={borderStart:"1px solid",borderStartColor:w1.reference,color:b1.reference,bg:y1.reference,[b1.variable]:"colors.chakra-body-text",[w1.variable]:"colors.chakra-border-color",_dark:{[b1.variable]:"colors.whiteAlpha.800",[w1.variable]:"colors.whiteAlpha.300"},_active:{[y1.variable]:"colors.gray.200",_dark:{[y1.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},_W=HM(e=>{var t;return{root:yW,field:(t=Pi(bW,e))!=null?t:{},stepperGroup:wW,stepper:SW}});function hg(e){var t,r,n;const i=(t=vr.sizes)==null?void 0:t[e],o={lg:"md",md:"md",sm:"sm",xs:"sm"},a=(n=(r=i.field)==null?void 0:r.fontSize)!=null?n:"md",l=LM.fontSizes[a];return HM({field:{...i.field,paddingInlineEnd:WM.reference,verticalAlign:"top"},stepper:{fontSize:_s(l).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var xW={xs:hg("xs"),sm:hg("sm"),md:hg("md"),lg:hg("lg")},PW=vW({baseStyle:_W,sizes:xW,variants:vr.variants,defaultProps:vr.defaultProps}),YI,CW={...(YI=vr.baseStyle)==null?void 0:YI.field,textAlign:"center"},EW={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},XI,JI,TW={outline:e=>{var t,r,n;return(n=(r=Pi((t=vr.variants)==null?void 0:t.outline,e))==null?void 0:r.field)!=null?n:{}},flushed:e=>{var t,r,n;return(n=(r=Pi((t=vr.variants)==null?void 0:t.flushed,e))==null?void 0:r.field)!=null?n:{}},filled:e=>{var t,r,n;return(n=(r=Pi((t=vr.variants)==null?void 0:t.filled,e))==null?void 0:r.field)!=null?n:{}},unstyled:(JI=(XI=vr.variants)==null?void 0:XI.unstyled.field)!=null?JI:{}},OW={baseStyle:CW,sizes:EW,variants:TW,defaultProps:vr.defaultProps},{defineMultiStyleConfig:RW,definePartsStyle:IW}=Dr(YU.keys),pg=$n("popper-bg"),kW=$n("popper-arrow-bg"),ZI=$n("popper-arrow-shadow-color"),jW={zIndex:10},$W={[pg.variable]:"colors.white",bg:pg.reference,[kW.variable]:pg.reference,[ZI.variable]:"colors.gray.200",_dark:{[pg.variable]:"colors.gray.700",[ZI.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},AW={px:3,py:2,borderBottomWidth:"1px"},DW={px:3,py:2},MW={px:3,py:2,borderTopWidth:"1px"},NW={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},FW=IW({popper:jW,content:$W,header:AW,body:DW,footer:MW,closeButton:NW}),LW=RW({baseStyle:FW}),{definePartsStyle:fx,defineMultiStyleConfig:BW}=Dr(VU.keys),S1=yt("drawer-bg"),_1=yt("drawer-box-shadow");function od(e){return fx(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var VW={bg:"blackAlpha.600",zIndex:"modal"},zW={display:"flex",zIndex:"modal",justifyContent:"center"},qW=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[S1.variable]:"colors.white",[_1.variable]:"shadows.lg",_dark:{[S1.variable]:"colors.gray.700",[_1.variable]:"shadows.dark-lg"},bg:S1.reference,boxShadow:_1.reference}},UW={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},HW={position:"absolute",top:"2",insetEnd:"3"},WW={px:"6",py:"2",flex:"1",overflow:"auto"},KW={px:"6",py:"4"},GW=fx(e=>({overlay:VW,dialogContainer:zW,dialog:Pi(qW,e),header:UW,closeButton:HW,body:WW,footer:KW})),QW={xs:od("xs"),sm:od("md"),md:od("lg"),lg:od("2xl"),xl:od("4xl"),full:od("full")},YW=BW({baseStyle:GW,sizes:QW,defaultProps:{size:"xs"}}),{definePartsStyle:XW,defineMultiStyleConfig:JW}=Dr(zU.keys),ZW={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},eK={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},tK={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},rK=XW({preview:ZW,input:eK,textarea:tK}),nK=JW({baseStyle:rK}),{definePartsStyle:iK,defineMultiStyleConfig:oK}=Dr(qU.keys),Hd=yt("form-control-color"),aK={marginStart:"1",[Hd.variable]:"colors.red.500",_dark:{[Hd.variable]:"colors.red.300"},color:Hd.reference},sK={mt:"2",[Hd.variable]:"colors.gray.600",_dark:{[Hd.variable]:"colors.whiteAlpha.600"},color:Hd.reference,lineHeight:"normal",fontSize:"sm"},lK=iK({container:{width:"100%",position:"relative"},requiredIndicator:aK,helperText:sK}),uK=oK({baseStyle:lK}),{definePartsStyle:cK,defineMultiStyleConfig:dK}=Dr(UU.keys),Wd=yt("form-error-color"),fK={[Wd.variable]:"colors.red.500",_dark:{[Wd.variable]:"colors.red.300"},color:Wd.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},hK={marginEnd:"0.5em",[Wd.variable]:"colors.red.500",_dark:{[Wd.variable]:"colors.red.300"},color:Wd.reference},pK=cK({text:fK,icon:hK}),mK=dK({baseStyle:pK}),vK={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},gK={baseStyle:vK},yK={fontFamily:"heading",fontWeight:"bold"},bK={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},wK={baseStyle:yK,sizes:bK,defaultProps:{size:"xl"}},{defineMultiStyleConfig:SK,definePartsStyle:_K}=Dr(LU.keys),x1=yt("breadcrumb-link-decor"),xK={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:x1.reference,[x1.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[x1.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},PK=_K({link:xK}),CK=SK({baseStyle:PK}),EK={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},KM=e=>{const{colorScheme:t,theme:r}=e;if(t==="gray")return{color:gt("gray.800","whiteAlpha.900")(e),_hover:{bg:gt("gray.100","whiteAlpha.200")(e)},_active:{bg:gt("gray.200","whiteAlpha.300")(e)}};const n=ef(`${t}.200`,.12)(r),i=ef(`${t}.200`,.24)(r);return{color:gt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:gt(`${t}.50`,n)(e)},_active:{bg:gt(`${t}.100`,i)(e)}}},TK=e=>{const{colorScheme:t}=e,r=gt("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?r:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...Pi(KM,e)}},OK={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},RK=e=>{var t;const{colorScheme:r}=e;if(r==="gray"){const c=gt("gray.100","whiteAlpha.200")(e);return{bg:c,color:gt("gray.800","whiteAlpha.900")(e),_hover:{bg:gt("gray.200","whiteAlpha.300")(e),_disabled:{bg:c}},_active:{bg:gt("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${r}.500`,color:i="white",hoverBg:o=`${r}.600`,activeBg:a=`${r}.700`}=(t=OK[r])!=null?t:{},l=gt(n,`${r}.200`)(e);return{bg:l,color:gt(i,"gray.800")(e),_hover:{bg:gt(o,`${r}.300`)(e),_disabled:{bg:l}},_active:{bg:gt(a,`${r}.400`)(e)}}},IK=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:gt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:gt(`${t}.700`,`${t}.500`)(e)}}},kK={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},jK={ghost:KM,outline:TK,solid:RK,link:IK,unstyled:kK},$K={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},AK={baseStyle:EK,variants:jK,sizes:$K,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Ku,defineMultiStyleConfig:DK}=Dr(a7.keys),ub=yt("card-bg"),Cs=yt("card-padding"),GM=yt("card-shadow"),By=yt("card-radius"),QM=yt("card-border-width","0"),YM=yt("card-border-color"),MK=Ku({container:{[ub.variable]:"colors.chakra-body-bg",backgroundColor:ub.reference,boxShadow:GM.reference,borderRadius:By.reference,color:"chakra-body-text",borderWidth:QM.reference,borderColor:YM.reference},body:{padding:Cs.reference,flex:"1 1 0%"},header:{padding:Cs.reference},footer:{padding:Cs.reference}}),NK={sm:Ku({container:{[By.variable]:"radii.base",[Cs.variable]:"space.3"}}),md:Ku({container:{[By.variable]:"radii.md",[Cs.variable]:"space.5"}}),lg:Ku({container:{[By.variable]:"radii.xl",[Cs.variable]:"space.7"}})},FK={elevated:Ku({container:{[GM.variable]:"shadows.base",_dark:{[ub.variable]:"colors.gray.700"}}}),outline:Ku({container:{[QM.variable]:"1px",[YM.variable]:"colors.chakra-border-color"}}),filled:Ku({container:{[ub.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[Cs.variable]:0},header:{[Cs.variable]:0},footer:{[Cs.variable]:0}}},LK=DK({baseStyle:MK,variants:FK,sizes:NK,defaultProps:{variant:"elevated",size:"md"}}),op=$n("close-button-size"),Ch=$n("close-button-bg"),BK={w:[op.reference],h:[op.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Ch.variable]:"colors.blackAlpha.100",_dark:{[Ch.variable]:"colors.whiteAlpha.100"}},_active:{[Ch.variable]:"colors.blackAlpha.200",_dark:{[Ch.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Ch.reference},VK={lg:{[op.variable]:"sizes.10",fontSize:"md"},md:{[op.variable]:"sizes.8",fontSize:"xs"},sm:{[op.variable]:"sizes.6",fontSize:"2xs"}},zK={baseStyle:BK,sizes:VK,defaultProps:{size:"md"}},{variants:qK,defaultProps:UK}=np,HK={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:wn.bg.reference,color:wn.color.reference,boxShadow:wn.shadow.reference},WK={baseStyle:HK,variants:qK,defaultProps:UK},KK={w:"100%",mx:"auto",maxW:"prose",px:"4"},GK={baseStyle:KK},QK={opacity:.6,borderColor:"inherit"},YK={borderStyle:"solid"},XK={borderStyle:"dashed"},JK={solid:YK,dashed:XK},ZK={baseStyle:QK,variants:JK,defaultProps:{variant:"solid"}},{definePartsStyle:eG,defineMultiStyleConfig:tG}=Dr(MU.keys),rG={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},nG={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},iG={pt:"2",px:"4",pb:"5"},oG={fontSize:"1.25em"},aG=eG({container:rG,button:nG,panel:iG,icon:oG}),sG=tG({baseStyle:aG}),{definePartsStyle:xm,defineMultiStyleConfig:lG}=Dr(NU.keys),lo=yt("alert-fg"),As=yt("alert-bg"),uG=xm({container:{bg:As.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:lo.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:lo.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function dC(e){const{theme:t,colorScheme:r}=e,n=ef(`${r}.200`,.16)(t);return{light:`colors.${r}.100`,dark:n}}var cG=xm(e=>{const{colorScheme:t}=e,r=dC(e);return{container:{[lo.variable]:`colors.${t}.600`,[As.variable]:r.light,_dark:{[lo.variable]:`colors.${t}.200`,[As.variable]:r.dark}}}}),dG=xm(e=>{const{colorScheme:t}=e,r=dC(e);return{container:{[lo.variable]:`colors.${t}.600`,[As.variable]:r.light,_dark:{[lo.variable]:`colors.${t}.200`,[As.variable]:r.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:lo.reference}}}),fG=xm(e=>{const{colorScheme:t}=e,r=dC(e);return{container:{[lo.variable]:`colors.${t}.600`,[As.variable]:r.light,_dark:{[lo.variable]:`colors.${t}.200`,[As.variable]:r.dark},pt:"2",borderTopWidth:"4px",borderTopColor:lo.reference}}}),hG=xm(e=>{const{colorScheme:t}=e;return{container:{[lo.variable]:"colors.white",[As.variable]:`colors.${t}.600`,_dark:{[lo.variable]:"colors.gray.900",[As.variable]:`colors.${t}.200`},color:lo.reference}}}),pG={subtle:cG,"left-accent":dG,"top-accent":fG,solid:hG},mG=lG({baseStyle:uG,variants:pG,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:XM,defineMultiStyleConfig:vG}=Dr(FU.keys),Kd=yt("avatar-border-color"),ap=yt("avatar-bg"),Dp=yt("avatar-font-size"),tf=yt("avatar-size"),gG={borderRadius:"full",border:"0.2em solid",borderColor:Kd.reference,[Kd.variable]:"white",_dark:{[Kd.variable]:"colors.gray.800"}},yG={bg:ap.reference,fontSize:Dp.reference,width:tf.reference,height:tf.reference,lineHeight:"1",[ap.variable]:"colors.gray.200",_dark:{[ap.variable]:"colors.whiteAlpha.400"}},bG=e=>{const{name:t,theme:r}=e,n=t?E7({string:t}):"colors.gray.400",i=P7(n)(r);let o="white";return i||(o="gray.800"),{bg:ap.reference,fontSize:Dp.reference,color:o,borderColor:Kd.reference,verticalAlign:"top",width:tf.reference,height:tf.reference,"&:not([data-loaded])":{[ap.variable]:n},[Kd.variable]:"colors.white",_dark:{[Kd.variable]:"colors.gray.800"}}},wG={fontSize:Dp.reference,lineHeight:"1"},SG=XM(e=>({badge:Pi(gG,e),excessLabel:Pi(yG,e),container:Pi(bG,e),label:wG}));function yl(e){const t=e!=="100%"?VM[e]:void 0;return XM({container:{[tf.variable]:t??e,[Dp.variable]:`calc(${t??e} / 2.5)`},excessLabel:{[tf.variable]:t??e,[Dp.variable]:`calc(${t??e} / 2.5)`}})}var _G={"2xs":yl(4),xs:yl(6),sm:yl(8),md:yl(12),lg:yl(16),xl:yl(24),"2xl":yl(32),full:yl("100%")},xG=vG({baseStyle:SG,sizes:_G,defaultProps:{size:"md"}}),PG={Accordion:sG,Alert:mG,Avatar:xG,Badge:np,Breadcrumb:CK,Button:AK,Checkbox:lb,CloseButton:zK,Code:WK,Container:GK,Divider:ZK,Drawer:YW,Editable:nK,Form:uK,FormError:mK,FormLabel:gK,Heading:wK,Input:vr,Kbd:BH,Link:zH,List:KH,Menu:iW,Modal:mW,NumberInput:PW,PinInput:OW,Popover:LW,Progress:W9,Radio:oH,Select:fH,Skeleton:pH,SkipLink:vH,Slider:TH,Spinner:IH,Stat:FH,Switch:z7,Table:Q7,Tabs:c9,Tag:x9,Textarea:D9,Tooltip:F9,Card:LK,Stepper:DU},CG={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},EG={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},TG="ltr",OG={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},JM={semanticTokens:CG,direction:TG,...jU,components:PG,styles:EG,config:OG};function RG(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var IG=RG();function kG(e,t){const r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}function jG(e,t,r,n){const i=typeof t=="string"?t.split("."):[t];for(n=0;n<i.length&&e;n+=1)e=e[i[n]];return e===void 0?r:e}var $G=e=>{const t=new WeakMap;return(n,i,o,a)=>{if(typeof n>"u")return e(n,i,o);t.has(n)||t.set(n,new Map);const l=t.get(n);if(l.has(i))return l.get(i);const c=e(n,i,o,a);return l.set(i,c),c}},ZM=$G(jG);function eN(e,t){const r={};return Object.keys(e).forEach(n=>{const i=e[n];t(i,n,e)&&(r[n]=i)}),r}var tN=e=>eN(e,t=>t!=null);function AG(e){return typeof e=="function"}function rN(e,...t){return AG(e)?e(...t):e}function DG(...e){return function(r){e.some(n=>(n==null||n(r),r==null?void 0:r.defaultPrevented))}}var P1,ek;function MG(){if(ek)return P1;ek=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",n=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(o,a){if(o===a)return!0;if(o&&a&&typeof o=="object"&&typeof a=="object"){if(o.constructor!==a.constructor)return!1;var l,c,d;if(Array.isArray(o)){if(l=o.length,l!=a.length)return!1;for(c=l;c--!==0;)if(!i(o[c],a[c]))return!1;return!0}var f;if(t&&o instanceof Map&&a instanceof Map){if(o.size!==a.size)return!1;for(f=o.entries();!(c=f.next()).done;)if(!a.has(c.value[0]))return!1;for(f=o.entries();!(c=f.next()).done;)if(!i(c.value[1],a.get(c.value[0])))return!1;return!0}if(r&&o instanceof Set&&a instanceof Set){if(o.size!==a.size)return!1;for(f=o.entries();!(c=f.next()).done;)if(!a.has(c.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(a)){if(l=o.length,l!=a.length)return!1;for(c=l;c--!==0;)if(o[c]!==a[c])return!1;return!0}if(o.constructor===RegExp)return o.source===a.source&&o.flags===a.flags;if(o.valueOf!==Object.prototype.valueOf&&typeof o.valueOf=="function"&&typeof a.valueOf=="function")return o.valueOf()===a.valueOf();if(o.toString!==Object.prototype.toString&&typeof o.toString=="function"&&typeof a.toString=="function")return o.toString()===a.toString();if(d=Object.keys(o),l=d.length,l!==Object.keys(a).length)return!1;for(c=l;c--!==0;)if(!Object.prototype.hasOwnProperty.call(a,d[c]))return!1;if(e&&o instanceof Element)return!1;for(c=l;c--!==0;)if(!((d[c]==="_owner"||d[c]==="__v"||d[c]==="__o")&&o.$$typeof)&&!i(o[d[c]],a[d[c]]))return!1;return!0}return o!==o&&a!==a}return P1=function(a,l){try{return i(a,l)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},P1}var NG=MG();const FG=mc(NG);function nN(e,t={}){var r;const{styleConfig:n,...i}=t,{theme:o,colorMode:a}=U8(),l=e?ZM(o,`components.${e}`):void 0,c=n||l,d=Va({theme:o,colorMode:a},(r=c==null?void 0:c.defaultProps)!=null?r:{},tN(kG(i,["children"]))),f=O.useRef({});if(c){const m=sU(c)(d);FG(f.current,m)||(f.current=m)}return f.current}function rs(e,t={}){return nN(e,t)}function vc(e,t={}){return nN(e,t)}var LG=new Set([...Qq,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),BG=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function VG(e){return BG.has(e)||!LG.has(e)}function zG(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const r={...e};for(const n of t)if(n!=null)for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(i in r&&delete r[i],r[i]=n[i]);return r}function qG(e){const t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}var UG=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,HG=gM(function(e){return UG.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),WG=HG,KG=function(t){return t!=="theme"},tk=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?WG:KG},rk=function(t,r,n){var i;if(r){var o=r.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&n&&(i=t.__emotion_forwardProp),i},GG=function(t){var r=t.cache,n=t.serialized,i=t.isStringTag;return bM(r,n,i),x8(function(){return wM(r,n,i)}),null},QG=function e(t,r){var n=t.__emotion_real===t,i=n&&t.__emotion_base||t,o,a;r!==void 0&&(o=r.label,a=r.target);var l=rk(t,r,n),c=l||tk(i),d=!c("as");return function(){var f=arguments,p=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),f[0]==null||f[0].raw===void 0)p.push.apply(p,f);else{p.push(f[0][0]);for(var m=f.length,g=1;g<m;g++)p.push(f[g],f[0][g])}var b=PM(function(y,w,_){var S=d&&y.as||i,C="",k=[],E=y;if(y.theme==null){E={};for(var R in y)E[R]=y[R];E.theme=O.useContext(kp)}typeof y.className=="string"?C=v8(w.registered,k,y.className):y.className!=null&&(C=y.className+" ");var T=tC(p.concat(k),w.registered,E);C+=w.key+"-"+T.name,a!==void 0&&(C+=" "+a);var A=d&&l===void 0?tk(S):c,M={};for(var B in y)d&&B==="as"||A(B)&&(M[B]=y[B]);return M.className=C,M.ref=_,O.createElement(O.Fragment,null,O.createElement(GG,{cache:w,serialized:T,isStringTag:typeof S=="string"}),O.createElement(S,M))});return b.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",b.defaultProps=t.defaultProps,b.__emotion_real=b,b.__emotion_base=i,b.__emotion_styles=p,b.__emotion_forwardProp=l,Object.defineProperty(b,"toString",{value:function(){return"."+a}}),b.withComponent=function(y,w){return e(y,ob({},r,w,{shouldForwardProp:rk(b,w,!0)})).apply(void 0,p)},b}},YG=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],cb=QG.bind();YG.forEach(function(e){cb[e]=cb(e)});var nk,XG=(nk=cb.default)!=null?nk:cb,JG=({baseStyle:e})=>t=>{const{theme:r,css:n,__css:i,sx:o,...a}=t,l=eN(a,(p,m)=>Xq(m)),c=rN(e,t),d=zG({},i,c,tN(l),o),f=FM(d)(t.theme);return n?[f,n]:f};function C1(e,t){const{baseStyle:r,...n}=t??{};n.shouldForwardProp||(n.shouldForwardProp=VG);const i=JG({baseStyle:r}),o=XG(e,n)(i);return Re.forwardRef(function(c,d){const{colorMode:f,forced:p}=nC();return Re.createElement(o,{ref:d,"data-theme":p?f:void 0,...c})})}function ZG(){const e=new Map;return new Proxy(C1,{apply(t,r,n){return C1(...n)},get(t,r){return e.has(r)||e.set(r,C1(r)),e.get(r)}})}var at=ZG();function Ht(e){return O.forwardRef(e)}function eQ(e={}){const{strict:t=!0,errorMessage:r="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:n}=e,i=O.createContext(void 0);i.displayName=n;function o(){var a;const l=O.useContext(i);if(!l&&t){const c=new Error(r);throw c.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,c,o),c}return l}return[i.Provider,o,i]}function iN(e){const{cssVarsRoot:t,theme:r,children:n}=e,i=O.useMemo(()=>Gq(r),[r]);return x.jsxs(E8,{theme:i,children:[x.jsx(tQ,{root:t}),n]})}function tQ({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x.jsx(u0,{styles:r=>({[t]:r.__cssVars})})}eQ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function rQ(){const{colorMode:e}=nC();return x.jsx(u0,{styles:t=>{const r=ZM(t,"styles.global"),n=rN(r,{theme:t,colorMode:e});return n?FM(n)(t):void 0}})}var oN=O.createContext({getDocument(){return document},getWindow(){return window}});oN.displayName="EnvironmentContext";function aN(e){const{children:t,environment:r,disabled:n}=e,i=O.useRef(null),o=O.useMemo(()=>r||{getDocument:()=>{var l,c;return(c=(l=i.current)==null?void 0:l.ownerDocument)!=null?c:document},getWindow:()=>{var l,c;return(c=(l=i.current)==null?void 0:l.ownerDocument.defaultView)!=null?c:window}},[r]),a=!n||!r;return x.jsxs(oN.Provider,{value:o,children:[t,a&&x.jsx("span",{id:"__chakra_env",hidden:!0,ref:i})]})}aN.displayName="EnvironmentProvider";var nQ=e=>{const{children:t,colorModeManager:r,portalZIndex:n,resetScope:i,resetCSS:o=!0,theme:a={},environment:l,cssVarsRoot:c,disableEnvironment:d,disableGlobalStyle:f}=e,p=x.jsx(aN,{environment:l,disabled:d,children:t});return x.jsx(iN,{theme:a,cssVarsRoot:c,children:x.jsxs(IM,{colorModeManager:r,options:a.config,children:[o?x.jsx(I8,{scope:i}):x.jsx(R8,{}),!f&&x.jsx(rQ,{}),n?x.jsx(TM,{zIndex:n,children:p}):p]})})},iQ=(e,t)=>e.find(r=>r.id===t);function ik(e,t){const r=sN(e,t),n=r?e[r].findIndex(i=>i.id===t):-1;return{position:r,index:n}}function sN(e,t){for(const[r,n]of Object.entries(e))if(iQ(n,t))return r}function oQ(e){const t=e.includes("right"),r=e.includes("left");let n="center";return t&&(n="flex-end"),r&&(n="flex-start"),{display:"flex",flexDirection:"column",alignItems:n}}function aQ(e){const r=e==="top"||e==="bottom"?"0 auto":void 0,n=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:r,top:n,bottom:i,right:o,left:a}}function ca(e,t=[]){const r=O.useRef(e);return O.useEffect(()=>{r.current=e}),O.useCallback((...n)=>{var i;return(i=r.current)==null?void 0:i.call(r,...n)},t)}function sQ(e,t){const r=ca(e);O.useEffect(()=>{if(t==null)return;let n=null;return n=window.setTimeout(()=>{r()},t),()=>{n&&window.clearTimeout(n)}},[t,r])}function tc(e,t){const r=O.useRef(!1),n=O.useRef(!1);O.useEffect(()=>{if(r.current&&n.current)return e();n.current=!0},t),O.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])}const lN=O.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),v0=O.createContext({}),Pm=O.createContext(null),g0=typeof document<"u",fC=g0?O.useLayoutEffect:O.useEffect,uN=O.createContext({strict:!1});function lQ(e,t,r,n){const{visualElement:i}=O.useContext(v0),o=O.useContext(uN),a=O.useContext(Pm),l=O.useContext(lN).reducedMotion,c=O.useRef();n=n||o.renderer,!c.current&&n&&(c.current=n(e,{visualState:t,parent:i,props:r,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const d=c.current;O.useInsertionEffect(()=>{d&&d.update(r,a)});const f=O.useRef(!!window.HandoffAppearAnimations);return fC(()=>{d&&(d.render(),f.current&&d.animationState&&d.animationState.animateChanges())}),O.useEffect(()=>{d&&(d.updateFeatures(),!f.current&&d.animationState&&d.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,f.current=!1)}),d}function kd(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function uQ(e,t,r){return O.useCallback(n=>{n&&e.mount&&e.mount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):kd(r)&&(r.current=n))},[t])}function Mp(e){return typeof e=="string"||Array.isArray(e)}function y0(e){return typeof e=="object"&&typeof e.start=="function"}const hC=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],pC=["initial",...hC];function b0(e){return y0(e.animate)||pC.some(t=>Mp(e[t]))}function cN(e){return!!(b0(e)||e.variants)}function cQ(e,t){if(b0(e)){const{initial:r,animate:n}=e;return{initial:r===!1||Mp(r)?r:void 0,animate:Mp(n)?n:void 0}}return e.inherit!==!1?t:{}}function dQ(e){const{initial:t,animate:r}=cQ(e,O.useContext(v0));return O.useMemo(()=>({initial:t,animate:r}),[ok(t),ok(r)])}function ok(e){return Array.isArray(e)?e.join(" "):e}const ak={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Np={};for(const e in ak)Np[e]={isEnabled:t=>ak[e].some(r=>!!t[r])};function fQ(e){for(const t in e)Np[t]={...Np[t],...e[t]}}const mC=O.createContext({}),dN=O.createContext({}),hQ=Symbol.for("motionComponentSymbol");function pQ({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:i}){e&&fQ(e);function o(l,c){let d;const f={...O.useContext(lN),...l,layoutId:mQ(l)},{isStatic:p}=f,m=dQ(l),g=n(l,p);if(!p&&g0){m.visualElement=lQ(i,g,f,t);const b=O.useContext(dN),y=O.useContext(uN).strict;m.visualElement&&(d=m.visualElement.loadFeatures(f,y,e,b))}return O.createElement(v0.Provider,{value:m},d&&m.visualElement?O.createElement(d,{visualElement:m.visualElement,...f}):null,r(i,l,uQ(g,m.visualElement,c),g,p,m.visualElement))}const a=O.forwardRef(o);return a[hQ]=i,a}function mQ({layoutId:e}){const t=O.useContext(mC).id;return t&&e!==void 0?t+"-"+e:e}function vQ(e){function t(n,i={}){return pQ(e(n,i))}if(typeof Proxy>"u")return t;const r=new Map;return new Proxy(t,{get:(n,i)=>(r.has(i)||r.set(i,t(i)),r.get(i))})}const gQ=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function vC(e){return typeof e!="string"||e.includes("-")?!1:!!(gQ.indexOf(e)>-1||/[A-Z]/.test(e))}const db={};function yQ(e){Object.assign(db,e)}const Cm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gc=new Set(Cm);function fN(e,{layout:t,layoutId:r}){return gc.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!db[e]||e==="opacity")}const zi=e=>!!(e&&e.getVelocity),bQ={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},wQ=Cm.length;function SQ(e,{enableHardwareAcceleration:t=!0,allowTransformNone:r=!0},n,i){let o="";for(let a=0;a<wQ;a++){const l=Cm[a];if(e[l]!==void 0){const c=bQ[l]||l;o+=`${c}(${e[l]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,n?"":o):r&&n&&(o="none"),o}const hN=e=>t=>typeof t=="string"&&t.startsWith(e),pN=hN("--"),hx=hN("var(--"),_Q=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,xQ=(e,t)=>t&&typeof e=="number"?t.transform(e):e,zl=(e,t,r)=>Math.min(Math.max(r,e),t),yc={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},sp={...yc,transform:e=>zl(0,1,e)},mg={...yc,default:1},lp=e=>Math.round(e*1e5)/1e5,w0=/(-)?([\d]*\.?[\d])+/g,mN=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,PQ=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Em(e){return typeof e=="string"}const Tm=e=>({test:t=>Em(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sl=Tm("deg"),Wa=Tm("%"),St=Tm("px"),CQ=Tm("vh"),EQ=Tm("vw"),sk={...Wa,parse:e=>Wa.parse(e)/100,transform:e=>Wa.transform(e*100)},lk={...yc,transform:Math.round},vN={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,radius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,size:St,top:St,right:St,bottom:St,left:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,rotate:Sl,rotateX:Sl,rotateY:Sl,rotateZ:Sl,scale:mg,scaleX:mg,scaleY:mg,scaleZ:mg,skew:Sl,skewX:Sl,skewY:Sl,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:sp,originX:sk,originY:sk,originZ:St,zIndex:lk,fillOpacity:sp,strokeOpacity:sp,numOctaves:lk};function gC(e,t,r,n){const{style:i,vars:o,transform:a,transformOrigin:l}=e;let c=!1,d=!1,f=!0;for(const p in t){const m=t[p];if(pN(p)){o[p]=m;continue}const g=vN[p],b=xQ(m,g);if(gc.has(p)){if(c=!0,a[p]=b,!f)continue;m!==(g.default||0)&&(f=!1)}else p.startsWith("origin")?(d=!0,l[p]=b):i[p]=b}if(t.transform||(c||n?i.transform=SQ(e.transform,r,f,n):i.transform&&(i.transform="none")),d){const{originX:p="50%",originY:m="50%",originZ:g=0}=l;i.transformOrigin=`${p} ${m} ${g}`}}const yC=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gN(e,t,r){for(const n in t)!zi(t[n])&&!fN(n,r)&&(e[n]=t[n])}function TQ({transformTemplate:e},t,r){return O.useMemo(()=>{const n=yC();return gC(n,t,{enableHardwareAcceleration:!r},e),Object.assign({},n.vars,n.style)},[t])}function OQ(e,t,r){const n=e.style||{},i={};return gN(i,n,e),Object.assign(i,TQ(e,t,r)),e.transformValues?e.transformValues(i):i}function RQ(e,t,r){const n={},i=OQ(e,t,r);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const IQ=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function fb(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||IQ.has(e)}let yN=e=>!fb(e);function kQ(e){e&&(yN=t=>t.startsWith("on")?!fb(t):e(t))}try{kQ(require("@emotion/is-prop-valid").default)}catch{}function jQ(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||(yN(i)||r===!0&&fb(i)||!t&&!fb(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}function uk(e,t,r){return typeof e=="string"?e:St.transform(t+r*e)}function $Q(e,t,r){const n=uk(t,e.x,e.width),i=uk(r,e.y,e.height);return`${n} ${i}`}const AQ={offset:"stroke-dashoffset",array:"stroke-dasharray"},DQ={offset:"strokeDashoffset",array:"strokeDasharray"};function MQ(e,t,r=1,n=0,i=!0){e.pathLength=1;const o=i?AQ:DQ;e[o.offset]=St.transform(-n);const a=St.transform(t),l=St.transform(r);e[o.array]=`${a} ${l}`}function bC(e,{attrX:t,attrY:r,attrScale:n,originX:i,originY:o,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...d},f,p,m){if(gC(e,d,f,m),p){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:b,dimensions:y}=e;g.transform&&(y&&(b.transform=g.transform),delete g.transform),y&&(i!==void 0||o!==void 0||b.transform)&&(b.transformOrigin=$Q(y,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(g.x=t),r!==void 0&&(g.y=r),n!==void 0&&(g.scale=n),a!==void 0&&MQ(g,a,l,c,!1)}const bN=()=>({...yC(),attrs:{}}),wC=e=>typeof e=="string"&&e.toLowerCase()==="svg";function NQ(e,t,r,n){const i=O.useMemo(()=>{const o=bN();return bC(o,t,{enableHardwareAcceleration:!1},wC(n),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};gN(o,e.style,e),i.style={...o,...i.style}}return i}function FQ(e=!1){return(r,n,i,{latestValues:o},a)=>{const c=(vC(r)?NQ:RQ)(n,o,a,r),f={...jQ(n,typeof r=="string",e),...c,ref:i},{children:p}=n,m=O.useMemo(()=>zi(p)?p.get():p,[p]);return O.createElement(r,{...f,children:m})}}const SC=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function wN(e,{style:t,vars:r},n,i){Object.assign(e.style,t,i&&i.getProjectionStyles(n));for(const o in r)e.style.setProperty(o,r[o])}const SN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function _N(e,t,r,n){wN(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(SN.has(i)?i:SC(i),t.attrs[i])}function _C(e,t){const{style:r}=e,n={};for(const i in r)(zi(r[i])||t.style&&zi(t.style[i])||fN(i,e))&&(n[i]=r[i]);return n}function xN(e,t){const r=_C(e,t);for(const n in e)if(zi(e[n])||zi(t[n])){const i=Cm.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[i]=e[n]}return r}function xC(e,t,r,n={},i={}){return typeof t=="function"&&(t=t(r!==void 0?r:e.custom,n,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(r!==void 0?r:e.custom,n,i)),t}function PN(e){const t=O.useRef(null);return t.current===null&&(t.current=e()),t.current}const hb=e=>Array.isArray(e),LQ=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),BQ=e=>hb(e)?e[e.length-1]||0:e;function Vy(e){const t=zi(e)?e.get():e;return LQ(t)?t.toValue():t}function VQ({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:r},n,i,o){const a={latestValues:zQ(n,i,o,e),renderState:t()};return r&&(a.mount=l=>r(n,l,a)),a}const CN=e=>(t,r)=>{const n=O.useContext(v0),i=O.useContext(Pm),o=()=>VQ(e,t,n,i);return r?o():PN(o)};function zQ(e,t,r,n){const i={},o=n(e,{});for(const m in o)i[m]=Vy(o[m]);let{initial:a,animate:l}=e;const c=b0(e),d=cN(e);t&&d&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let f=r?r.initial===!1:!1;f=f||a===!1;const p=f?l:a;return p&&typeof p!="boolean"&&!y0(p)&&(Array.isArray(p)?p:[p]).forEach(g=>{const b=xC(e,g);if(!b)return;const{transitionEnd:y,transition:w,..._}=b;for(const S in _){let C=_[S];if(Array.isArray(C)){const k=f?C.length-1:0;C=C[k]}C!==null&&(i[S]=C)}for(const S in y)i[S]=y[S]}),i}const bn=e=>e;class ck{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const r=this.order.indexOf(t);r!==-1&&(this.order.splice(r,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function qQ(e){let t=new ck,r=new ck,n=0,i=!1,o=!1;const a=new WeakSet,l={schedule:(c,d=!1,f=!1)=>{const p=f&&i,m=p?t:r;return d&&a.add(c),m.add(c)&&p&&i&&(n=t.order.length),c},cancel:c=>{r.remove(c),a.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[t,r]=[r,t],r.clear(),n=t.order.length,n)for(let d=0;d<n;d++){const f=t.order[d];f(c),a.has(f)&&(l.schedule(f),e())}i=!1,o&&(o=!1,l.process(c))}};return l}const vg=["prepare","read","update","preRender","render","postRender"],UQ=40;function HQ(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=vg.reduce((p,m)=>(p[m]=qQ(()=>r=!0),p),{}),a=p=>o[p].process(i),l=()=>{const p=performance.now();r=!1,i.delta=n?1e3/60:Math.max(Math.min(p-i.timestamp,UQ),1),i.timestamp=p,i.isProcessing=!0,vg.forEach(a),i.isProcessing=!1,r&&t&&(n=!1,e(l))},c=()=>{r=!0,n=!0,i.isProcessing||e(l)};return{schedule:vg.reduce((p,m)=>{const g=o[m];return p[m]=(b,y=!1,w=!1)=>(r||c(),g.schedule(b,y,w)),p},{}),cancel:p=>vg.forEach(m=>o[m].cancel(p)),state:i,steps:o}}const{schedule:Ar,cancel:Ds,state:Nn,steps:E1}=HQ(typeof requestAnimationFrame<"u"?requestAnimationFrame:bn,!0),WQ={useVisualState:CN({scrapeMotionValuesFromProps:xN,createRenderState:bN,onMount:(e,t,{renderState:r,latestValues:n})=>{Ar.read(()=>{try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),Ar.render(()=>{bC(r,n,{enableHardwareAcceleration:!1},wC(t.tagName),e.transformTemplate),_N(t,r)})}})},KQ={useVisualState:CN({scrapeMotionValuesFromProps:_C,createRenderState:yC})};function GQ(e,{forwardMotionProps:t=!1},r,n){return{...vC(e)?WQ:KQ,preloadedFeatures:r,useRender:FQ(t),createVisualElement:n,Component:e}}function Ps(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}const EN=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function S0(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const QQ=e=>t=>EN(t)&&e(t,S0(t));function Es(e,t,r,n){return Ps(e,t,QQ(r),n)}const YQ=(e,t)=>r=>t(e(r)),Al=(...e)=>e.reduce(YQ);function TN(e){let t=null;return()=>{const r=()=>{t=null};return t===null?(t=e,r):!1}}const dk=TN("dragHorizontal"),fk=TN("dragVertical");function ON(e){let t=!1;if(e==="y")t=fk();else if(e==="x")t=dk();else{const r=dk(),n=fk();r&&n?t=()=>{r(),n()}:(r&&r(),n&&n())}return t}function RN(){const e=ON(!0);return e?(e(),!1):!0}class eu{constructor(t){this.isMounted=!1,this.node=t}update(){}}function hk(e,t){const r="pointer"+(t?"enter":"leave"),n="onHover"+(t?"Start":"End"),i=(o,a)=>{if(o.type==="touch"||RN())return;const l=e.getProps();e.animationState&&l.whileHover&&e.animationState.setActive("whileHover",t),l[n]&&Ar.update(()=>l[n](o,a))};return Es(e.current,r,i,{passive:!e.getProps()[n]})}class XQ extends eu{mount(){this.unmount=Al(hk(this.node,!0),hk(this.node,!1))}unmount(){}}class JQ extends eu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Al(Ps(this.node.current,"focus",()=>this.onFocus()),Ps(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const IN=(e,t)=>t?e===t?!0:IN(e,t.parentElement):!1;function T1(e,t){if(!t)return;const r=new PointerEvent("pointer"+e);t(r,S0(r))}class ZQ extends eu{constructor(){super(...arguments),this.removeStartListeners=bn,this.removeEndListeners=bn,this.removeAccessibleListeners=bn,this.startPointerPress=(t,r)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),o=Es(window,"pointerup",(l,c)=>{if(!this.checkPressEnd())return;const{onTap:d,onTapCancel:f}=this.node.getProps();Ar.update(()=>{IN(this.node.current,l.target)?d&&d(l,c):f&&f(l,c)})},{passive:!(n.onTap||n.onPointerUp)}),a=Es(window,"pointercancel",(l,c)=>this.cancelPress(l,c),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Al(o,a),this.startPress(t,r)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=l=>{l.key!=="Enter"||!this.checkPressEnd()||T1("up",(c,d)=>{const{onTap:f}=this.node.getProps();f&&Ar.update(()=>f(c,d))})};this.removeEndListeners(),this.removeEndListeners=Ps(this.node.current,"keyup",a),T1("down",(l,c)=>{this.startPress(l,c)})},r=Ps(this.node.current,"keydown",t),n=()=>{this.isPressing&&T1("cancel",(o,a)=>this.cancelPress(o,a))},i=Ps(this.node.current,"blur",n);this.removeAccessibleListeners=Al(r,i)}}startPress(t,r){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Ar.update(()=>n(t,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!RN()}cancelPress(t,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Ar.update(()=>n(t,r))}mount(){const t=this.node.getProps(),r=Es(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Ps(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Al(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const px=new WeakMap,O1=new WeakMap,eY=e=>{const t=px.get(e.target);t&&t(e)},tY=e=>{e.forEach(eY)};function rY({root:e,...t}){const r=e||document;O1.has(r)||O1.set(r,{});const n=O1.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(tY,{root:e,...t})),n[i]}function nY(e,t,r){const n=rY(t);return px.set(e,r),n.observe(e),()=>{px.delete(e),n.unobserve(e)}}const iY={some:0,all:1};class oY extends eu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:o}=t,a={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:iY[i]},l=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:f,onViewportLeave:p}=this.node.getProps(),m=d?f:p;m&&m(c)};return nY(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(aY(t,r))&&this.startObserver()}unmount(){}}function aY({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const sY={inView:{Feature:oY},tap:{Feature:ZQ},focus:{Feature:JQ},hover:{Feature:XQ}};function kN(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function lY(e){const t={};return e.values.forEach((r,n)=>t[n]=r.get()),t}function uY(e){const t={};return e.values.forEach((r,n)=>t[n]=r.getVelocity()),t}function _0(e,t,r){const n=e.getProps();return xC(n,t,r!==void 0?r:n.custom,lY(e),uY(e))}const cY="framerAppearId",dY="data-"+SC(cY);let PC=bn;const Gu=e=>e*1e3,Ts=e=>e/1e3,fY={current:!1},jN=e=>Array.isArray(e)&&typeof e[0]=="number";function $N(e){return!!(!e||typeof e=="string"&&AN[e]||jN(e)||Array.isArray(e)&&e.every($N))}const Yh=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,AN={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Yh([0,.65,.55,1]),circOut:Yh([.55,0,1,.45]),backIn:Yh([.31,.01,.66,-.59]),backOut:Yh([.33,1.53,.69,.99])};function DN(e){if(e)return jN(e)?Yh(e):Array.isArray(e)?e.map(DN):AN[e]}function hY(e,t,r,{delay:n=0,duration:i,repeat:o=0,repeatType:a="loop",ease:l,times:c}={}){const d={[t]:r};c&&(d.offset=c);const f=DN(l);return Array.isArray(f)&&(d.easing=f),e.animate(d,{delay:n,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}function pY(e,{repeat:t,repeatType:r="loop"}){const n=t&&r!=="loop"&&t%2===1?0:e.length-1;return e[n]}const MN=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,mY=1e-7,vY=12;function gY(e,t,r,n,i){let o,a,l=0;do a=t+(r-t)/2,o=MN(a,n,i)-e,o>0?r=a:t=a;while(Math.abs(o)>mY&&++l<vY);return a}function Om(e,t,r,n){if(e===t&&r===n)return bn;const i=o=>gY(o,0,1,e,r);return o=>o===0||o===1?o:MN(i(o),t,n)}const yY=Om(.42,0,1,1),bY=Om(0,0,.58,1),NN=Om(.42,0,.58,1),wY=e=>Array.isArray(e)&&typeof e[0]!="number",FN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,LN=e=>t=>1-e(1-t),BN=e=>1-Math.sin(Math.acos(e)),CC=LN(BN),SY=FN(CC),VN=Om(.33,1.53,.69,.99),EC=LN(VN),_Y=FN(EC),xY=e=>(e*=2)<1?.5*EC(e):.5*(2-Math.pow(2,-10*(e-1))),PY={linear:bn,easeIn:yY,easeInOut:NN,easeOut:bY,circIn:BN,circInOut:SY,circOut:CC,backIn:EC,backInOut:_Y,backOut:VN,anticipate:xY},pk=e=>{if(Array.isArray(e)){PC(e.length===4);const[t,r,n,i]=e;return Om(t,r,n,i)}else if(typeof e=="string")return PY[e];return e},TC=(e,t)=>r=>!!(Em(r)&&PQ.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),zN=(e,t,r)=>n=>{if(!Em(n))return n;const[i,o,a,l]=n.match(w0);return{[e]:parseFloat(i),[t]:parseFloat(o),[r]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},CY=e=>zl(0,255,e),R1={...yc,transform:e=>Math.round(CY(e))},Vu={test:TC("rgb","red"),parse:zN("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+R1.transform(e)+", "+R1.transform(t)+", "+R1.transform(r)+", "+lp(sp.transform(n))+")"};function EY(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const mx={test:TC("#"),parse:EY,transform:Vu.transform},jd={test:TC("hsl","hue"),parse:zN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Wa.transform(lp(t))+", "+Wa.transform(lp(r))+", "+lp(sp.transform(n))+")"},Si={test:e=>Vu.test(e)||mx.test(e)||jd.test(e),parse:e=>Vu.test(e)?Vu.parse(e):jd.test(e)?jd.parse(e):mx.parse(e),transform:e=>Em(e)?e:e.hasOwnProperty("red")?Vu.transform(e):jd.transform(e)},rn=(e,t,r)=>-r*e+r*t+e;function I1(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function TY({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,o=0,a=0;if(!t)i=o=a=r;else{const l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;i=I1(c,l,e+1/3),o=I1(c,l,e),a=I1(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:n}}const k1=(e,t,r)=>{const n=e*e;return Math.sqrt(Math.max(0,r*(t*t-n)+n))},OY=[mx,Vu,jd],RY=e=>OY.find(t=>t.test(e));function mk(e){const t=RY(e);let r=t.parse(e);return t===jd&&(r=TY(r)),r}const qN=(e,t)=>{const r=mk(e),n=mk(t),i={...r};return o=>(i.red=k1(r.red,n.red,o),i.green=k1(r.green,n.green,o),i.blue=k1(r.blue,n.blue,o),i.alpha=rn(r.alpha,n.alpha,o),Vu.transform(i))};function IY(e){var t,r;return isNaN(e)&&Em(e)&&(((t=e.match(w0))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(mN))===null||r===void 0?void 0:r.length)||0)>0}const UN={regex:_Q,countKey:"Vars",token:"${v}",parse:bn},HN={regex:mN,countKey:"Colors",token:"${c}",parse:Si.parse},WN={regex:w0,countKey:"Numbers",token:"${n}",parse:yc.parse};function j1(e,{regex:t,countKey:r,token:n,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+r]=o.length,e.tokenised=e.tokenised.replace(t,n),e.values.push(...o.map(i)))}function pb(e){const t=e.toString(),r={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return r.value.includes("var(--")&&j1(r,UN),j1(r,HN),j1(r,WN),r}function KN(e){return pb(e).values}function GN(e){const{values:t,numColors:r,numVars:n,tokenised:i}=pb(e),o=t.length;return a=>{let l=i;for(let c=0;c<o;c++)c<n?l=l.replace(UN.token,a[c]):c<n+r?l=l.replace(HN.token,Si.transform(a[c])):l=l.replace(WN.token,lp(a[c]));return l}}const kY=e=>typeof e=="number"?0:e;function jY(e){const t=KN(e);return GN(e)(t.map(kY))}const ql={test:IY,parse:KN,createTransformer:GN,getAnimatableNone:jY},QN=(e,t)=>r=>`${r>0?t:e}`;function YN(e,t){return typeof e=="number"?r=>rn(e,t,r):Si.test(e)?qN(e,t):e.startsWith("var(")?QN(e,t):JN(e,t)}const XN=(e,t)=>{const r=[...e],n=r.length,i=e.map((o,a)=>YN(o,t[a]));return o=>{for(let a=0;a<n;a++)r[a]=i[a](o);return r}},$Y=(e,t)=>{const r={...e,...t},n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=YN(e[i],t[i]));return i=>{for(const o in n)r[o]=n[o](i);return r}},JN=(e,t)=>{const r=ql.createTransformer(t),n=pb(e),i=pb(t);return n.numVars===i.numVars&&n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?Al(XN(n.values,i.values),r):QN(e,t)},Fp=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},vk=(e,t)=>r=>rn(e,t,r);function AY(e){return typeof e=="number"?vk:typeof e=="string"?Si.test(e)?qN:JN:Array.isArray(e)?XN:typeof e=="object"?$Y:vk}function DY(e,t,r){const n=[],i=r||AY(e[0]),o=e.length-1;for(let a=0;a<o;a++){let l=i(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||bn:t;l=Al(c,l)}n.push(l)}return n}function ZN(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const o=e.length;if(PC(o===t.length),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=DY(t,n,i),l=a.length,c=d=>{let f=0;if(l>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const p=Fp(e[f],e[f+1],d);return a[f](p)};return r?d=>c(zl(e[0],e[o-1],d)):c}function MY(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=Fp(0,t,n);e.push(rn(r,1,i))}}function NY(e){const t=[0];return MY(t,e.length-1),t}function FY(e,t){return e.map(r=>r*t)}function LY(e,t){return e.map(()=>t||NN).splice(0,e.length-1)}function mb({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=wY(n)?n.map(pk):pk(n),o={done:!1,value:t[0]},a=FY(r&&r.length===t.length?r:NY(t),e),l=ZN(a,t,{ease:Array.isArray(i)?i:LY(t,i)});return{calculatedDuration:e,next:c=>(o.value=l(c),o.done=c>=e,o)}}function e4(e,t){return t?e*(1e3/t):0}const BY=5;function t4(e,t,r){const n=Math.max(t-BY,0);return e4(r-e(n),t-n)}const gk=.001,VY=.01,zY=10,qY=.05,UY=1;function HY({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let i,o,a=1-t;a=zl(qY,UY,a),e=zl(VY,zY,Ts(e)),a<1?(i=d=>{const f=d*a,p=f*e,m=f-r,g=vx(d,a),b=Math.exp(-p);return gk-m/g*b},o=d=>{const p=d*a*e,m=p*r+r,g=Math.pow(a,2)*Math.pow(d,2)*e,b=Math.exp(-p),y=vx(Math.pow(d,2),a);return(-i(d)+gk>0?-1:1)*((m-g)*b)/y}):(i=d=>{const f=Math.exp(-d*e),p=(d-r)*e+1;return-.001+f*p},o=d=>{const f=Math.exp(-d*e),p=(r-d)*(e*e);return f*p});const l=5/e,c=KY(i,o,l);if(e=Gu(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const d=Math.pow(c,2)*n;return{stiffness:d,damping:a*2*Math.sqrt(n*d),duration:e}}}const WY=12;function KY(e,t,r){let n=r;for(let i=1;i<WY;i++)n=n-e(n)/t(n);return n}function vx(e,t){return e*Math.sqrt(1-t*t)}const GY=["duration","bounce"],QY=["stiffness","damping","mass"];function yk(e,t){return t.some(r=>e[r]!==void 0)}function YY(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!yk(e,QY)&&yk(e,GY)){const r=HY(e);t={...t,...r,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function r4({keyframes:e,restDelta:t,restSpeed:r,...n}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:d,velocity:f,duration:p,isResolvedFromDuration:m}=YY(n),g=f?-Ts(f):0,b=c/(2*Math.sqrt(l*d)),y=o-i,w=Ts(Math.sqrt(l/d)),_=Math.abs(y)<5;r||(r=_?.01:2),t||(t=_?.005:.5);let S;if(b<1){const C=vx(w,b);S=k=>{const E=Math.exp(-b*w*k);return o-E*((g+b*w*y)/C*Math.sin(C*k)+y*Math.cos(C*k))}}else if(b===1)S=C=>o-Math.exp(-w*C)*(y+(g+w*y)*C);else{const C=w*Math.sqrt(b*b-1);S=k=>{const E=Math.exp(-b*w*k),R=Math.min(C*k,300);return o-E*((g+b*w*y)*Math.sinh(R)+C*y*Math.cosh(R))/C}}return{calculatedDuration:m&&p||null,next:C=>{const k=S(C);if(m)a.done=C>=p;else{let E=g;C!==0&&(b<1?E=t4(S,C,k):E=0);const R=Math.abs(E)<=r,T=Math.abs(o-k)<=t;a.done=R&&T}return a.value=a.done?o:k,a}}}function bk({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:l,max:c,restDelta:d=.5,restSpeed:f}){const p=e[0],m={done:!1,value:p},g=A=>l!==void 0&&A<l||c!==void 0&&A>c,b=A=>l===void 0?c:c===void 0||Math.abs(l-A)<Math.abs(c-A)?l:c;let y=r*t;const w=p+y,_=a===void 0?w:a(w);_!==w&&(y=_-p);const S=A=>-y*Math.exp(-A/n),C=A=>_+S(A),k=A=>{const M=S(A),B=C(A);m.done=Math.abs(M)<=d,m.value=m.done?_:B};let E,R;const T=A=>{g(m.value)&&(E=A,R=r4({keyframes:[m.value,b(m.value)],velocity:t4(C,A,m.value),damping:i,stiffness:o,restDelta:d,restSpeed:f}))};return T(0),{calculatedDuration:null,next:A=>{let M=!1;return!R&&E===void 0&&(M=!0,k(A),T(A)),E!==void 0&&A>E?R.next(A-E):(!M&&k(A),m)}}}const XY=e=>{const t=({timestamp:r})=>e(r);return{start:()=>Ar.update(t,!0),stop:()=>Ds(t),now:()=>Nn.isProcessing?Nn.timestamp:performance.now()}},wk=2e4;function Sk(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<wk;)t+=r,n=e.next(t);return t>=wk?1/0:t}const JY={decay:bk,inertia:bk,tween:mb,keyframes:mb,spring:r4};function vb({autoplay:e=!0,delay:t=0,driver:r=XY,keyframes:n,type:i="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:l="loop",onPlay:c,onStop:d,onComplete:f,onUpdate:p,...m}){let g=1,b=!1,y,w;const _=()=>{w=new Promise(j=>{y=j})};_();let S;const C=JY[i]||mb;let k;C!==mb&&typeof n[0]!="number"&&(k=ZN([0,100],n,{clamp:!1}),n=[0,100]);const E=C({...m,keyframes:n});let R;l==="mirror"&&(R=C({...m,keyframes:[...n].reverse(),velocity:-(m.velocity||0)}));let T="idle",A=null,M=null,B=null;E.calculatedDuration===null&&o&&(E.calculatedDuration=Sk(E));const{calculatedDuration:Q}=E;let se=1/0,ie=1/0;Q!==null&&(se=Q+a,ie=se*(o+1)-a);let N=0;const X=j=>{if(M===null)return;g>0&&(M=Math.min(M,j)),g<0&&(M=Math.min(j-ie/g,M)),A!==null?N=A:N=Math.round(j-M)*g;const U=N-t*(g>=0?1:-1),q=g>=0?U<0:U>ie;N=Math.max(U,0),T==="finished"&&A===null&&(N=ie);let $=N,F=E;if(o){const Ee=N/se;let Me=Math.floor(Ee),Y=Ee%1;!Y&&Ee>=1&&(Y=1),Y===1&&Me--,Me=Math.min(Me,o+1);const K=!!(Me%2);K&&(l==="reverse"?(Y=1-Y,a&&(Y-=a/se)):l==="mirror"&&(F=R));let we=zl(0,1,Y);N>ie&&(we=l==="reverse"&&K?1:0),$=we*se}const V=q?{done:!1,value:n[0]}:F.next($);k&&(V.value=k(V.value));let{done:de}=V;!q&&Q!==null&&(de=g>=0?N>=ie:N<=0);const pe=A===null&&(T==="finished"||T==="running"&&de);return p&&p(V.value),pe&&ee(),V},ce=()=>{S&&S.stop(),S=void 0},ne=()=>{T="idle",ce(),y(),_(),M=B=null},ee=()=>{T="finished",f&&f(),ce(),y()},ge=()=>{if(b)return;S||(S=r(X));const j=S.now();c&&c(),A!==null?M=j-A:(!M||T==="finished")&&(M=j),T==="finished"&&_(),B=M,A=null,T="running",S.start()};e&&ge();const Z={then(j,U){return w.then(j,U)},get time(){return Ts(N)},set time(j){j=Gu(j),N=j,A!==null||!S||g===0?A=j:M=S.now()-j/g},get duration(){const j=E.calculatedDuration===null?Sk(E):E.calculatedDuration;return Ts(j)},get speed(){return g},set speed(j){j===g||!S||(g=j,Z.time=Ts(N))},get state(){return T},play:ge,pause:()=>{T="paused",A=N},stop:()=>{b=!0,T!=="idle"&&(T="idle",d&&d(),ne())},cancel:()=>{B!==null&&X(B),ne()},complete:()=>{T="finished"},sample:j=>(M=0,X(j))};return Z}function ZY(e){let t;return()=>(t===void 0&&(t=e()),t)}const eX=ZY(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),tX=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),gg=10,rX=2e4,nX=(e,t)=>t.type==="spring"||e==="backgroundColor"||!$N(t.ease);function iX(e,t,{onUpdate:r,onComplete:n,...i}){if(!(eX()&&tX.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let a=!1,l,c;const d=()=>{c=new Promise(S=>{l=S})};d();let{keyframes:f,duration:p=300,ease:m,times:g}=i;if(nX(t,i)){const S=vb({...i,repeat:0,delay:0});let C={done:!1,value:f[0]};const k=[];let E=0;for(;!C.done&&E<rX;)C=S.sample(E),k.push(C.value),E+=gg;g=void 0,f=k,p=E-gg,m="linear"}const b=hY(e.owner.current,t,f,{...i,duration:p,ease:m,times:g});i.syncStart&&(b.startTime=Nn.isProcessing?Nn.timestamp:document.timeline?document.timeline.currentTime:performance.now());const y=()=>b.cancel(),w=()=>{Ar.update(y),l(),d()};return b.onfinish=()=>{e.set(pY(f,i)),n&&n(),w()},{then(S,C){return c.then(S,C)},attachTimeline(S){return b.timeline=S,b.onfinish=null,bn},get time(){return Ts(b.currentTime||0)},set time(S){b.currentTime=Gu(S)},get speed(){return b.playbackRate},set speed(S){b.playbackRate=S},get duration(){return Ts(p)},play:()=>{a||(b.play(),Ds(y))},pause:()=>b.pause(),stop:()=>{if(a=!0,b.playState==="idle")return;const{currentTime:S}=b;if(S){const C=vb({...i,autoplay:!1});e.setWithVelocity(C.sample(S-gg).value,C.sample(S).value,gg)}w()},complete:()=>b.finish(),cancel:w}}function oX({keyframes:e,delay:t,onUpdate:r,onComplete:n}){const i=()=>(r&&r(e[e.length-1]),n&&n(),{time:0,speed:1,duration:0,play:bn,pause:bn,stop:bn,then:o=>(o(),Promise.resolve()),cancel:bn,complete:bn});return t?vb({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const aX={type:"spring",stiffness:500,damping:25,restSpeed:10},sX=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lX={type:"keyframes",duration:.8},uX={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},cX=(e,{keyframes:t})=>t.length>2?lX:gc.has(e)?e.startsWith("scale")?sX(t[1]):aX:uX,gx=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ql.test(t)||t==="0")&&!t.startsWith("url(")),dX=new Set(["brightness","contrast","saturate","opacity"]);function fX(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(w0)||[];if(!n)return e;const i=r.replace(n,"");let o=dX.has(t)?1:0;return n!==r&&(o*=100),t+"("+o+i+")"}const hX=/([a-z-]*)\(.*?\)/g,yx={...ql,getAnimatableNone:e=>{const t=e.match(hX);return t?t.map(fX).join(" "):e}},pX={...vN,color:Si,backgroundColor:Si,outlineColor:Si,fill:Si,stroke:Si,borderColor:Si,borderTopColor:Si,borderRightColor:Si,borderBottomColor:Si,borderLeftColor:Si,filter:yx,WebkitFilter:yx},OC=e=>pX[e];function n4(e,t){let r=OC(e);return r!==yx&&(r=ql),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const i4=e=>/^0[^.\s]+$/.test(e);function mX(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||i4(e)}function vX(e,t,r,n){const i=gx(t,r);let o;Array.isArray(r)?o=[...r]:o=[null,r];const a=n.from!==void 0?n.from:e.get();let l;const c=[];for(let d=0;d<o.length;d++)o[d]===null&&(o[d]=d===0?a:o[d-1]),mX(o[d])&&c.push(d),typeof o[d]=="string"&&o[d]!=="none"&&o[d]!=="0"&&(l=o[d]);if(i&&c.length&&l)for(let d=0;d<c.length;d++){const f=c[d];o[f]=n4(t,l)}return o}function gX({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:l,from:c,elapsed:d,...f}){return!!Object.keys(f).length}function o4(e,t){return e[t]||e.default||e}const RC=(e,t,r,n={})=>i=>{const o=o4(n,e)||{},a=o.delay||n.delay||0;let{elapsed:l=0}=n;l=l-Gu(a);const c=vX(t,e,r,o),d=c[0],f=c[c.length-1],p=gx(e,d),m=gx(e,f);let g={keyframes:c,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-l,onUpdate:b=>{t.set(b),o.onUpdate&&o.onUpdate(b)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(gX(o)||(g={...g,...cX(e,g)}),g.duration&&(g.duration=Gu(g.duration)),g.repeatDelay&&(g.repeatDelay=Gu(g.repeatDelay)),!p||!m||fY.current||o.type===!1)return oX(g);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const b=iX(t,e,g);if(b)return b}return vb(g)};function gb(e){return!!(zi(e)&&e.add)}const a4=e=>/^\-?\d*\.?\d+$/.test(e);function IC(e,t){e.indexOf(t)===-1&&e.push(t)}function kC(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}class jC{constructor(){this.subscriptions=[]}add(t){return IC(this.subscriptions,t),()=>kC(this.subscriptions,t)}notify(t,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const yX=e=>!isNaN(parseFloat(e));class bX{constructor(t,r={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,i=!0)=>{this.prev=this.current,this.current=n;const{delta:o,timestamp:a}=Nn;this.lastUpdated!==a&&(this.timeDelta=o,this.lastUpdated=a,Ar.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Ar.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=yX(this.current),this.owner=r.owner}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new jC);const n=this.events[t].add(r);return t==="change"?()=>{n(),Ar.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,n){this.set(r),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?e4(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function rf(e,t){return new bX(e,t)}const s4=e=>t=>t.test(e),wX={test:e=>e==="auto",parse:e=>e},l4=[yc,St,Wa,Sl,EQ,CQ,wX],Eh=e=>l4.find(s4(e)),SX=[...l4,Si,ql],_X=e=>SX.find(s4(e));function xX(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,rf(r))}function PX(e,t){const r=_0(e,t);let{transitionEnd:n={},transition:i={},...o}=r?e.makeTargetAnimatable(r,!1):{};o={...o,...n};for(const a in o){const l=BQ(o[a]);xX(e,a,l)}}function CX(e,t,r){var n,i;const o=Object.keys(t).filter(l=>!e.hasValue(l)),a=o.length;if(a)for(let l=0;l<a;l++){const c=o[l],d=t[c];let f=null;Array.isArray(d)&&(f=d[0]),f===null&&(f=(i=(n=r[c])!==null&&n!==void 0?n:e.readValue(c))!==null&&i!==void 0?i:t[c]),f!=null&&(typeof f=="string"&&(a4(f)||i4(f))?f=parseFloat(f):!_X(f)&&ql.test(d)&&(f=n4(c,d)),e.addValue(c,rf(f,{owner:e})),r[c]===void 0&&(r[c]=f),f!==null&&e.setBaseTarget(c,f))}}function EX(e,t){return t?(t[e]||t.default||t).from:void 0}function TX(e,t,r){const n={};for(const i in e){const o=EX(i,t);if(o!==void 0)n[i]=o;else{const a=r.getValue(i);a&&(n[i]=a.get())}}return n}function OX({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function u4(e,t,{delay:r=0,transitionOverride:n,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");n&&(o=n);const d=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const p in l){const m=e.getValue(p),g=l[p];if(!m||g===void 0||f&&OX(f,p))continue;const b={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!m.hasAnimated){const w=e.getProps()[dY];w&&(b.elapsed=window.HandoffAppearAnimations(w,p,m,Ar),b.syncStart=!0)}m.start(RC(p,m,g,e.shouldReduceMotion&&gc.has(p)?{type:!1}:b));const y=m.animation;gb(c)&&(c.add(p),y.then(()=>c.remove(p))),d.push(y)}return a&&Promise.all(d).then(()=>{a&&PX(e,a)}),d}function bx(e,t,r={}){const n=_0(e,t,r.custom);let{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);const o=n?()=>Promise.all(u4(e,n,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:p}=i;return RX(e,t,d+c,f,p,r)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,d]=l==="beforeChildren"?[o,a]:[a,o];return c().then(()=>d())}else return Promise.all([o(),a(r.delay)])}function RX(e,t,r=0,n=0,i=1,o){const a=[],l=(e.variantChildren.size-1)*n,c=i===1?(d=0)=>d*n:(d=0)=>l-d*n;return Array.from(e.variantChildren).sort(IX).forEach((d,f)=>{d.notify("AnimationStart",t),a.push(bx(d,t,{...o,delay:r+c(f)}).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(a)}function IX(e,t){return e.sortNodePosition(t)}function kX(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const i=t.map(o=>bx(e,o,r));n=Promise.all(i)}else if(typeof t=="string")n=bx(e,t,r);else{const i=typeof t=="function"?_0(e,t,r.custom):t;n=Promise.all(u4(e,i,r))}return n.then(()=>e.notify("AnimationComplete",t))}const jX=[...hC].reverse(),$X=hC.length;function AX(e){return t=>Promise.all(t.map(({animation:r,options:n})=>kX(e,r,n)))}function DX(e){let t=AX(e);const r=NX();let n=!0;const i=(c,d)=>{const f=_0(e,d);if(f){const{transition:p,transitionEnd:m,...g}=f;c={...c,...g,...m}}return c};function o(c){t=c(e)}function a(c,d){const f=e.getProps(),p=e.getVariantContext(!0)||{},m=[],g=new Set;let b={},y=1/0;for(let _=0;_<$X;_++){const S=jX[_],C=r[S],k=f[S]!==void 0?f[S]:p[S],E=Mp(k),R=S===d?C.isActive:null;R===!1&&(y=_);let T=k===p[S]&&k!==f[S]&&E;if(T&&n&&e.manuallyAnimateOnMount&&(T=!1),C.protectedKeys={...b},!C.isActive&&R===null||!k&&!C.prevProp||y0(k)||typeof k=="boolean")continue;const A=MX(C.prevProp,k);let M=A||S===d&&C.isActive&&!T&&E||_>y&&E;const B=Array.isArray(k)?k:[k];let Q=B.reduce(i,{});R===!1&&(Q={});const{prevResolvedValues:se={}}=C,ie={...se,...Q},N=X=>{M=!0,g.delete(X),C.needsAnimating[X]=!0};for(const X in ie){const ce=Q[X],ne=se[X];b.hasOwnProperty(X)||(ce!==ne?hb(ce)&&hb(ne)?!kN(ce,ne)||A?N(X):C.protectedKeys[X]=!0:ce!==void 0?N(X):g.add(X):ce!==void 0&&g.has(X)?N(X):C.protectedKeys[X]=!0)}C.prevProp=k,C.prevResolvedValues=Q,C.isActive&&(b={...b,...Q}),n&&e.blockInitialAnimation&&(M=!1),M&&!T&&m.push(...B.map(X=>({animation:X,options:{type:S,...c}})))}if(g.size){const _={};g.forEach(S=>{const C=e.getBaseTarget(S);C!==void 0&&(_[S]=C)}),m.push({animation:_})}let w=!!m.length;return n&&f.initial===!1&&!e.manuallyAnimateOnMount&&(w=!1),n=!1,w?t(m):Promise.resolve()}function l(c,d,f){var p;if(r[c].isActive===d)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(g=>{var b;return(b=g.animationState)===null||b===void 0?void 0:b.setActive(c,d)}),r[c].isActive=d;const m=a(f,c);for(const g in r)r[g].protectedKeys={};return m}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>r}}function MX(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!kN(t,e):!1}function Eu(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function NX(){return{animate:Eu(!0),whileInView:Eu(),whileHover:Eu(),whileTap:Eu(),whileDrag:Eu(),whileFocus:Eu(),exit:Eu()}}class FX extends eu{constructor(t){super(t),t.animationState||(t.animationState=DX(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),y0(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){}}let LX=0;class BX extends eu{constructor(){super(...arguments),this.id=LX++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r,custom:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:n??this.node.getProps().custom});r&&!t&&o.then(()=>r(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const VX={animation:{Feature:FX},exit:{Feature:BX}},_k=(e,t)=>Math.abs(e-t);function zX(e,t){const r=_k(e.x,t.x),n=_k(e.y,t.y);return Math.sqrt(r**2+n**2)}class c4{constructor(t,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=A1(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=zX(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:g}=Nn;this.history.push({...m,timestamp:g});const{onStart:b,onMove:y}=this.handlers;f||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=$1(f,this.transformPagePoint),Ar.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:p,onSessionEnd:m}=this.handlers,g=A1(d.type==="pointercancel"?this.lastMoveEventInfo:$1(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,g),m&&m(d,g)},!EN(t))return;this.handlers=r,this.transformPagePoint=n;const i=S0(t),o=$1(i,this.transformPagePoint),{point:a}=o,{timestamp:l}=Nn;this.history=[{...a,timestamp:l}];const{onSessionStart:c}=r;c&&c(t,A1(o,this.history)),this.removeListeners=Al(Es(window,"pointermove",this.handlePointerMove),Es(window,"pointerup",this.handlePointerUp),Es(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ds(this.updatePoint)}}function $1(e,t){return t?{point:t(e.point)}:e}function xk(e,t){return{x:e.x-t.x,y:e.y-t.y}}function A1({point:e},t){return{point:e,delta:xk(e,d4(t)),offset:xk(e,qX(t)),velocity:UX(t,.1)}}function qX(e){return e[0]}function d4(e){return e[e.length-1]}function UX(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=d4(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>Gu(t)));)r--;if(!n)return{x:0,y:0};const o=Ts(i.timestamp-n.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function fo(e){return e.max-e.min}function wx(e,t=0,r=.01){return Math.abs(e-t)<=r}function Pk(e,t,r,n=.5){e.origin=n,e.originPoint=rn(t.min,t.max,e.origin),e.scale=fo(r)/fo(t),(wx(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=rn(r.min,r.max,e.origin)-e.originPoint,(wx(e.translate)||isNaN(e.translate))&&(e.translate=0)}function up(e,t,r,n){Pk(e.x,t.x,r.x,n?n.originX:void 0),Pk(e.y,t.y,r.y,n?n.originY:void 0)}function Ck(e,t,r){e.min=r.min+t.min,e.max=e.min+fo(t)}function HX(e,t,r){Ck(e.x,t.x,r.x),Ck(e.y,t.y,r.y)}function Ek(e,t,r){e.min=t.min-r.min,e.max=e.min+fo(t)}function cp(e,t,r){Ek(e.x,t.x,r.x),Ek(e.y,t.y,r.y)}function WX(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?rn(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?rn(r,e,n.max):Math.min(e,r)),e}function Tk(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function KX(e,{top:t,left:r,bottom:n,right:i}){return{x:Tk(e.x,r,i),y:Tk(e.y,t,n)}}function Ok(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function GX(e,t){return{x:Ok(e.x,t.x),y:Ok(e.y,t.y)}}function QX(e,t){let r=.5;const n=fo(e),i=fo(t);return i>n?r=Fp(t.min,t.max-n,e.min):n>i&&(r=Fp(e.min,e.max-i,t.min)),zl(0,1,r)}function YX(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const Sx=.35;function XX(e=Sx){return e===!1?e=0:e===!0&&(e=Sx),{x:Rk(e,"left","right"),y:Rk(e,"top","bottom")}}function Rk(e,t,r){return{min:Ik(e,t),max:Ik(e,r)}}function Ik(e,t){return typeof e=="number"?e:e[t]||0}const kk=()=>({translate:0,scale:1,origin:0,originPoint:0}),$d=()=>({x:kk(),y:kk()}),jk=()=>({min:0,max:0}),_n=()=>({x:jk(),y:jk()});function Aa(e){return[e("x"),e("y")]}function f4({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function JX({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ZX(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function D1(e){return e===void 0||e===1}function _x({scale:e,scaleX:t,scaleY:r}){return!D1(e)||!D1(t)||!D1(r)}function ju(e){return _x(e)||h4(e)||e.z||e.rotate||e.rotateX||e.rotateY}function h4(e){return $k(e.x)||$k(e.y)}function $k(e){return e&&e!=="0%"}function yb(e,t,r){const n=e-r,i=t*n;return r+i}function Ak(e,t,r,n,i){return i!==void 0&&(e=yb(e,i,n)),yb(e,r,n)+t}function xx(e,t=0,r=1,n,i){e.min=Ak(e.min,t,r,n,i),e.max=Ak(e.max,t,r,n,i)}function p4(e,{x:t,y:r}){xx(e.x,t.translate,t.scale,t.originPoint),xx(e.y,r.translate,r.scale,r.originPoint)}function eJ(e,t,r,n=!1){const i=r.length;if(!i)return;t.x=t.y=1;let o,a;for(let l=0;l<i;l++){o=r[l],a=o.projectionDelta;const c=o.instance;c&&c.style&&c.style.display==="contents"||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ad(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,p4(e,a)),n&&ju(o.latestValues)&&Ad(e,o.latestValues))}t.x=Dk(t.x),t.y=Dk(t.y)}function Dk(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Pl(e,t){e.min=e.min+t,e.max=e.max+t}function Mk(e,t,[r,n,i]){const o=t[i]!==void 0?t[i]:.5,a=rn(e.min,e.max,o);xx(e,t[r],t[n],a,t.scale)}const tJ=["x","scaleX","originX"],rJ=["y","scaleY","originY"];function Ad(e,t){Mk(e.x,t,tJ),Mk(e.y,t,rJ)}function m4(e,t){return f4(ZX(e.getBoundingClientRect(),t))}function nJ(e,t,r){const n=m4(e,r),{scroll:i}=t;return i&&(Pl(n.x,i.offset.x),Pl(n.y,i.offset.y)),n}const iJ=new WeakMap;class oJ{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_n(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=c=>{this.stopAnimation(),r&&this.snapToCursor(S0(c,"page").point)},o=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ON(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Aa(b=>{let y=this.getAxisMotionValue(b).get()||0;if(Wa.test(y)){const{projection:w}=this.visualElement;if(w&&w.layout){const _=w.layout.layoutBox[b];_&&(y=fo(_)*(parseFloat(y)/100))}}this.originPoint[b]=y}),m&&Ar.update(()=>m(c,d),!1,!0);const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:b}=d;if(p&&this.currentDirection===null){this.currentDirection=aJ(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),g&&g(c,d)},l=(c,d)=>this.stop(c,d);this.panSession=new c4(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Ar.update(()=>o(t,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){const{drag:i}=this.getProps();if(!n||!yg(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(a=WX(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;t&&kd(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=KX(n.layoutBox,t):this.constraints=!1,this.elastic=XX(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Aa(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=YX(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!kd(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=nJ(n,i.root,this.visualElement.getTransformPagePoint());let a=GX(i.layout.layoutBox,o);if(r){const l=r(JX(a));this.hasMutatedConstraints=!!l,l&&(a=f4(l))}return a}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},d=Aa(f=>{if(!yg(f,r,this.currentDirection))return;let p=c&&c[f]||{};a&&(p={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,b={type:"inertia",velocity:n?t[f]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...p};return this.startAxisValueAnimation(f,b)});return Promise.all(d).then(l)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return n.start(RC(t,n,0,r))}stopAnimation(){Aa(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const r="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[r];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Aa(r=>{const{drag:n}=this.getProps();if(!yg(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(r);if(i&&i.layout){const{min:a,max:l}=i.layout.layoutBox[r];o.set(t[r]-rn(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!kd(r)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Aa(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();i[a]=QX({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Aa(a=>{if(!yg(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:d}=this.constraints[a];l.set(rn(c,d,i[a]))})}addListeners(){if(!this.visualElement.current)return;iJ.set(this.visualElement,this);const t=this.visualElement.current,r=Es(t,"pointerdown",c=>{const{drag:d,dragListener:f=!0}=this.getProps();d&&f&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();kd(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),n();const a=Ps(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(Aa(f=>{const p=this.getAxisMotionValue(f);p&&(this.originPoint[f]+=c[f].translate,p.set(p.get()+c[f].translate))}),this.visualElement.render())});return()=>{a(),r(),o(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=Sx,dragMomentum:l=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:l}}}function yg(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function aJ(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class sJ extends eu{constructor(t){super(t),this.removeGroupControls=bn,this.removeListeners=bn,this.controls=new oJ(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||bn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Nk=e=>(t,r)=>{e&&Ar.update(()=>e(t,r))};class lJ extends eu{constructor(){super(...arguments),this.removePointerDownListener=bn}onPointerDown(t){this.session=new c4(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Nk(t),onStart:Nk(r),onMove:n,onEnd:(o,a)=>{delete this.session,i&&Ar.update(()=>i(o,a))}}}mount(){this.removePointerDownListener=Es(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function uJ(){const e=O.useContext(Pm);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:r,register:n}=e,i=O.useId();return O.useEffect(()=>n(i),[]),!t&&r?[!1,()=>r&&r(i)]:[!0]}function cJ(){return dJ(O.useContext(Pm))}function dJ(e){return e===null?!0:e.isPresent}const zy={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Fk(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Th={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(St.test(e))e=parseFloat(e);else return e;const r=Fk(e,t.target.x),n=Fk(e,t.target.y);return`${r}% ${n}%`}},fJ={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,i=ql.parse(e);if(i.length>5)return n;const o=ql.createTransformer(e),a=typeof i[0]!="number"?1:0,l=r.x.scale*t.x,c=r.y.scale*t.y;i[0+a]/=l,i[1+a]/=c;const d=rn(l,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=d),typeof i[3+a]=="number"&&(i[3+a]/=d),o(i)}};class hJ extends Re.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=t;yQ(pJ),o&&(r.group&&r.group.add(o),n&&n.register&&i&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),zy.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:i,isPresent:o}=this.props,a=n.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==r||r===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Ar.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function v4(e){const[t,r]=uJ(),n=O.useContext(mC);return Re.createElement(hJ,{...e,layoutGroup:n,switchLayoutGroup:O.useContext(dN),isPresent:t,safeToRemove:r})}const pJ={borderRadius:{...Th,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Th,borderTopRightRadius:Th,borderBottomLeftRadius:Th,borderBottomRightRadius:Th,boxShadow:fJ},g4=["TopLeft","TopRight","BottomLeft","BottomRight"],mJ=g4.length,Lk=e=>typeof e=="string"?parseFloat(e):e,Bk=e=>typeof e=="number"||St.test(e);function vJ(e,t,r,n,i,o){i?(e.opacity=rn(0,r.opacity!==void 0?r.opacity:1,gJ(n)),e.opacityExit=rn(t.opacity!==void 0?t.opacity:1,0,yJ(n))):o&&(e.opacity=rn(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let a=0;a<mJ;a++){const l=`border${g4[a]}Radius`;let c=Vk(t,l),d=Vk(r,l);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||Bk(c)===Bk(d)?(e[l]=Math.max(rn(Lk(c),Lk(d),n),0),(Wa.test(d)||Wa.test(c))&&(e[l]+="%")):e[l]=d}(t.rotate||r.rotate)&&(e.rotate=rn(t.rotate||0,r.rotate||0,n))}function Vk(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const gJ=y4(0,.5,CC),yJ=y4(.5,.95,bn);function y4(e,t,r){return n=>n<e?0:n>t?1:r(Fp(e,t,n))}function zk(e,t){e.min=t.min,e.max=t.max}function Ro(e,t){zk(e.x,t.x),zk(e.y,t.y)}function qk(e,t,r,n,i){return e-=t,e=yb(e,1/r,n),i!==void 0&&(e=yb(e,1/i,n)),e}function bJ(e,t=0,r=1,n=.5,i,o=e,a=e){if(Wa.test(t)&&(t=parseFloat(t),t=rn(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=rn(o.min,o.max,n);e===o&&(l-=t),e.min=qk(e.min,t,r,l,i),e.max=qk(e.max,t,r,l,i)}function Uk(e,t,[r,n,i],o,a){bJ(e,t[r],t[n],t[i],t.scale,o,a)}const wJ=["x","scaleX","originX"],SJ=["y","scaleY","originY"];function Hk(e,t,r,n){Uk(e.x,t,wJ,r?r.x:void 0,n?n.x:void 0),Uk(e.y,t,SJ,r?r.y:void 0,n?n.y:void 0)}function Wk(e){return e.translate===0&&e.scale===1}function b4(e){return Wk(e.x)&&Wk(e.y)}function _J(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function w4(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Kk(e){return fo(e.x)/fo(e.y)}class xJ{constructor(){this.members=[]}add(t){IC(this.members,t),t.scheduleRender()}remove(t){if(kC(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(i=>t===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){n=o;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Gk(e,t,r){let n="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(n=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{rotate:c,rotateX:d,rotateY:f}=r;c&&(n+=`rotate(${c}deg) `),d&&(n+=`rotateX(${d}deg) `),f&&(n+=`rotateY(${f}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(n+=`scale(${a}, ${l})`),n||"none"}const PJ=(e,t)=>e.depth-t.depth;class CJ{constructor(){this.children=[],this.isDirty=!1}add(t){IC(this.children,t),this.isDirty=!0}remove(t){kC(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(PJ),this.isDirty=!1,this.children.forEach(t)}}function EJ(e,t){const r=performance.now(),n=({timestamp:i})=>{const o=i-r;o>=t&&(Ds(n),e(o-t))};return Ar.read(n,!0),()=>Ds(n)}function TJ(e){window.MotionDebug&&window.MotionDebug.record(e)}function OJ(e){return e instanceof SVGElement&&e.tagName!=="svg"}function RJ(e,t,r){const n=zi(e)?e:rf(e);return n.start(RC("",n,t,r)),n.animation}const Qk=["","X","Y","Z"],Yk=1e3;let IJ=0;const $u={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function S4({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(a={},l=t==null?void 0:t()){this.id=IJ++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{$u.totalNodes=$u.resolvedTargetDeltas=$u.recalculatedProjection=0,this.nodes.forEach($J),this.nodes.forEach(FJ),this.nodes.forEach(LJ),this.nodes.forEach(AJ),TJ($u)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new CJ)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new jC),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=OJ(a),this.instance=a;const{layoutId:c,layout:d,visualElement:f}=this.options;if(f&&!f.current&&f.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(d||c)&&(this.isLayoutDirty=!0),e){let p;const m=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=EJ(m,250),zy.hasAnimatedSinceResize&&(zy.hasAnimatedSinceResize=!1,this.nodes.forEach(Jk))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||d)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:m,hasRelativeTargetChanged:g,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||f.getDefaultTransition()||UJ,{onLayoutAnimationStart:w,onLayoutAnimationComplete:_}=f.getProps(),S=!this.targetLayout||!w4(this.targetLayout,b)||g,C=!m&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||C||m&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,C);const k={...o4(y,"layout"),onPlay:w,onComplete:_};(f.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else m||Jk(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ds(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(BJ),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const p=this.path[f];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Xk);return}this.isUpdating||this.nodes.forEach(MJ),this.isUpdating=!1,this.nodes.forEach(NJ),this.nodes.forEach(kJ),this.nodes.forEach(jJ),this.clearAllSnapshots();const l=performance.now();Nn.delta=zl(0,1e3/60,l-Nn.timestamp),Nn.timestamp=l,Nn.isProcessing=!0,E1.update.process(Nn),E1.preRender.process(Nn),E1.render.process(Nn),Nn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(DJ),this.sharedNodes.forEach(VJ)}scheduleUpdateProjection(){Ar.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Ar.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=_n(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l&&(this.scroll={animationId:this.root.animationId,phase:a,isRoot:n(this.instance),offset:r(this.instance)})}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!b4(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,f=d!==this.prevTransformTemplateValue;a&&(l||ju(this.latestValues)||f)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),HJ(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return _n();const l=a.measureViewportBox(),{scroll:c}=this.root;return c&&(Pl(l.x,c.offset.x),Pl(l.y,c.offset.y)),l}removeElementScroll(a){const l=_n();Ro(l,a);for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:f,options:p}=d;if(d!==this.root&&f&&p.layoutScroll){if(f.isRoot){Ro(l,a);const{scroll:m}=this.root;m&&(Pl(l.x,-m.offset.x),Pl(l.y,-m.offset.y))}Pl(l.x,f.offset.x),Pl(l.y,f.offset.y)}}return l}applyTransform(a,l=!1){const c=_n();Ro(c,a);for(let d=0;d<this.path.length;d++){const f=this.path[d];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&&Ad(c,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ju(f.latestValues)&&Ad(c,f.latestValues)}return ju(this.latestValues)&&Ad(c,this.latestValues),c}removeTransform(a){const l=_n();Ro(l,a);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!ju(d.latestValues))continue;_x(d.latestValues)&&d.updateSnapshot();const f=_n(),p=d.measurePageBox();Ro(f,p),Hk(l,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,f)}return ju(this.latestValues)&&Hk(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Nn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==c;if(!(a||d&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:p,layoutId:m}=this.options;if(!(!this.layout||!(p||m))){if(this.resolvedRelativeTargetAt=Nn.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_n(),this.relativeTargetOrigin=_n(),cp(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Ro(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=_n(),this.targetWithTransforms=_n()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),HX(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ro(this.target,this.layout.layoutBox),p4(this.target,this.targetDelta)):Ro(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_n(),this.relativeTargetOrigin=_n(),cp(this.relativeTargetOrigin,this.target,g.target),Ro(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}$u.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||_x(this.parent.latestValues)||h4(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(d=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===Nn.timestamp&&(d=!1),d)return;const{layout:f,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||p))return;Ro(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,g=this.treeScale.y;eJ(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox);const{target:b}=l;if(!b){this.projectionTransform&&(this.projectionDelta=$d(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=$d(),this.projectionDeltaWithTransform=$d());const y=this.projectionTransform;up(this.projectionDelta,this.layoutCorrected,b,this.latestValues),this.projectionTransform=Gk(this.projectionDelta,this.treeScale),(this.projectionTransform!==y||this.treeScale.x!==m||this.treeScale.y!==g)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b)),$u.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(a,l=!1){const c=this.snapshot,d=c?c.latestValues:{},f={...this.latestValues},p=$d();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=_n(),g=c?c.source:void 0,b=this.layout?this.layout.source:void 0,y=g!==b,w=this.getStack(),_=!w||w.members.length<=1,S=!!(y&&!_&&this.options.crossfade===!0&&!this.path.some(qJ));this.animationProgress=0;let C;this.mixTargetDelta=k=>{const E=k/1e3;Zk(p.x,a.x,E),Zk(p.y,a.y,E),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(cp(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),zJ(this.relativeTarget,this.relativeTargetOrigin,m,E),C&&_J(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=_n()),Ro(C,this.relativeTarget)),y&&(this.animationValues=f,vJ(f,d,this.latestValues,E,S,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ds(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ar.update(()=>{zy.hasAnimatedSinceResize=!0,this.currentAnimation=RJ(0,Yk,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Yk),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:d,latestValues:f}=a;if(!(!l||!c||!d)){if(this!==a&&this.layout&&d&&_4(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||_n();const p=fo(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+p;const m=fo(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+m}Ro(l,c),Ad(l,f),up(this.projectionDeltaWithTransform,this.layoutCorrected,l,f)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new xJ),this.sharedNodes.get(a).add(l);const d=l.options.initialPromotionConfig;l.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:l}=this.options;return l?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:l}=this.options;return l?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(l=!0),!l)return;const d={};for(let f=0;f<Qk.length;f++){const p="rotate"+Qk[f];c[p]&&(d[p]=c[p],a.setStaticValue(p,0))}a.render();for(const f in d)a.setStaticValue(f,d[f]);a.scheduleRender()}getProjectionStyles(a={}){var l,c;const d={};if(!this.instance||this.isSVG)return d;if(this.isVisible)d.visibility="";else return{visibility:"hidden"};const f=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,d.opacity="",d.pointerEvents=Vy(a.pointerEvents)||"",d.transform=f?f(this.latestValues,""):"none",d;const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=Vy(a.pointerEvents)||""),this.hasProjected&&!ju(this.latestValues)&&(y.transform=f?f({},""):"none",this.hasProjected=!1),y}const m=p.animationValues||p.latestValues;this.applyTransformsToTarget(),d.transform=Gk(this.projectionDeltaWithTransform,this.treeScale,m),f&&(d.transform=f(m,d.transform));const{x:g,y:b}=this.projectionDelta;d.transformOrigin=`${g.origin*100}% ${b.origin*100}% 0`,p.animationValues?d.opacity=p===this?(c=(l=m.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:d.opacity=p===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const y in db){if(m[y]===void 0)continue;const{correct:w,applyTo:_}=db[y],S=d.transform==="none"?m[y]:w(m[y],p);if(_){const C=_.length;for(let k=0;k<C;k++)d[_[k]]=S}else d[y]=S}return this.options.layoutId&&(d.pointerEvents=p===this?Vy(a.pointerEvents)||"":"none"),d}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(Xk),this.root.sharedNodes.clear()}}}function kJ(e){e.updateLayout()}function jJ(e){var t;const r=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:o}=e.options,a=r.source!==e.layout.source;o==="size"?Aa(p=>{const m=a?r.measuredBox[p]:r.layoutBox[p],g=fo(m);m.min=n[p].min,m.max=m.min+g}):_4(o,r.layoutBox,n)&&Aa(p=>{const m=a?r.measuredBox[p]:r.layoutBox[p],g=fo(n[p]);m.max=m.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+g)});const l=$d();up(l,n,r.layoutBox);const c=$d();a?up(c,e.applyTransform(i,!0),r.measuredBox):up(c,n,r.layoutBox);const d=!b4(l);let f=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:m,layout:g}=p;if(m&&g){const b=_n();cp(b,r.layoutBox,m.layoutBox);const y=_n();cp(y,n,g.layoutBox),w4(b,y)||(f=!0),p.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=b,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:c,layoutDelta:l,hasLayoutChanged:d,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function $J(e){$u.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function AJ(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function DJ(e){e.clearSnapshot()}function Xk(e){e.clearMeasurements()}function MJ(e){e.isLayoutDirty=!1}function NJ(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Jk(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function FJ(e){e.resolveTargetDelta()}function LJ(e){e.calcProjection()}function BJ(e){e.resetRotation()}function VJ(e){e.removeLeadSnapshot()}function Zk(e,t,r){e.translate=rn(t.translate,0,r),e.scale=rn(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function ej(e,t,r,n){e.min=rn(t.min,r.min,n),e.max=rn(t.max,r.max,n)}function zJ(e,t,r,n){ej(e.x,t.x,r.x,n),ej(e.y,t.y,r.y,n)}function qJ(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const UJ={duration:.45,ease:[.4,0,.1,1]},tj=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),rj=tj("applewebkit/")&&!tj("chrome/")?Math.round:bn;function nj(e){e.min=rj(e.min),e.max=rj(e.max)}function HJ(e){nj(e.x),nj(e.y)}function _4(e,t,r){return e==="position"||e==="preserve-aspect"&&!wx(Kk(t),Kk(r),.2)}const WJ=S4({attachResizeListener:(e,t)=>Ps(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),M1={current:void 0},x4=S4({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!M1.current){const e=new WJ({});e.mount(window),e.setOptions({layoutScroll:!0}),M1.current=e}return M1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),KJ={pan:{Feature:lJ},drag:{Feature:sJ,ProjectionNode:x4,MeasureLayout:v4}},GJ=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function QJ(e){const t=GJ.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]}function Px(e,t,r=1){const[n,i]=QJ(e);if(!n)return;const o=window.getComputedStyle(t).getPropertyValue(n);if(o){const a=o.trim();return a4(a)?parseFloat(a):a}else return hx(i)?Px(i,t,r+1):i}function YJ(e,{...t},r){const n=e.current;if(!(n instanceof Element))return{target:t,transitionEnd:r};r&&(r={...r}),e.values.forEach(i=>{const o=i.get();if(!hx(o))return;const a=Px(o,n);a&&i.set(a)});for(const i in t){const o=t[i];if(!hx(o))continue;const a=Px(o,n);a&&(t[i]=a,r||(r={}),r[i]===void 0&&(r[i]=o))}return{target:t,transitionEnd:r}}const XJ=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),P4=e=>XJ.has(e),JJ=e=>Object.keys(e).some(P4),ij=e=>e===yc||e===St,oj=(e,t)=>parseFloat(e.split(", ")[t]),aj=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return oj(i[1],t);{const o=n.match(/^matrix\((.+)\)$/);return o?oj(o[1],e):0}},ZJ=new Set(["x","y","z"]),eZ=Cm.filter(e=>!ZJ.has(e));function tZ(e){const t=[];return eZ.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t.length&&e.render(),t}const nf={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:aj(4,13),y:aj(5,14)};nf.translateX=nf.x;nf.translateY=nf.y;const rZ=(e,t,r)=>{const n=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,l={};a==="none"&&t.setStaticValue("display",e.display||"block"),r.forEach(d=>{l[d]=nf[d](n,o)}),t.render();const c=t.measureViewportBox();return r.forEach(d=>{const f=t.getValue(d);f&&f.jump(l[d]),e[d]=nf[d](c,o)}),e},nZ=(e,t,r={},n={})=>{t={...t},n={...n};const i=Object.keys(t).filter(P4);let o=[],a=!1;const l=[];if(i.forEach(c=>{const d=e.getValue(c);if(!e.hasValue(c))return;let f=r[c],p=Eh(f);const m=t[c];let g;if(hb(m)){const b=m.length,y=m[0]===null?1:0;f=m[y],p=Eh(f);for(let w=y;w<b&&m[w]!==null;w++)g?PC(Eh(m[w])===g):g=Eh(m[w])}else g=Eh(m);if(p!==g)if(ij(p)&&ij(g)){const b=d.get();typeof b=="string"&&d.set(parseFloat(b)),typeof m=="string"?t[c]=parseFloat(m):Array.isArray(m)&&g===St&&(t[c]=m.map(parseFloat))}else p!=null&&p.transform&&(g!=null&&g.transform)&&(f===0||m===0)?f===0?d.set(g.transform(f)):t[c]=p.transform(m):(a||(o=tZ(e),a=!0),l.push(c),n[c]=n[c]!==void 0?n[c]:t[c],d.jump(m))}),l.length){const c=l.indexOf("height")>=0?window.pageYOffset:null,d=rZ(t,e,l);return o.length&&o.forEach(([f,p])=>{e.getValue(f).set(p)}),e.render(),g0&&c!==null&&window.scrollTo({top:c}),{target:d,transitionEnd:n}}else return{target:t,transitionEnd:n}};function iZ(e,t,r,n){return JJ(t)?nZ(e,t,r,n):{target:t,transitionEnd:n}}const oZ=(e,t,r,n)=>{const i=YJ(e,t,n);return t=i.target,n=i.transitionEnd,iZ(e,t,r,n)},Cx={current:null},C4={current:!1};function aZ(){if(C4.current=!0,!!g0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Cx.current=e.matches;e.addListener(t),t()}else Cx.current=!1}function sZ(e,t,r){const{willChange:n}=t;for(const i in t){const o=t[i],a=r[i];if(zi(o))e.addValue(i,o),gb(n)&&n.add(i);else if(zi(a))e.addValue(i,rf(o,{owner:e})),gb(n)&&n.remove(i);else if(a!==o)if(e.hasValue(i)){const l=e.getValue(i);!l.hasAnimated&&l.set(o)}else{const l=e.getStaticValue(i);e.addValue(i,rf(l!==void 0?l:o,{owner:e}))}}for(const i in r)t[i]===void 0&&e.removeValue(i);return t}const sj=new WeakMap,E4=Object.keys(Np),lZ=E4.length,lj=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],uZ=pC.length;class cZ{constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Ar.render(this.render,!1,!0);const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.isControllingVariants=b0(r),this.isVariantNode=cN(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(r,{});for(const p in f){const m=f[p];l[p]!==void 0&&zi(m)&&(m.set(l[p],!1),gb(d)&&d.add(p))}}scrapeMotionValuesFromProps(t,r){return{}}mount(t){this.current=t,sj.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),C4.current||aZ(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Cx.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){sj.delete(this.current),this.projection&&this.projection.unmount(),Ds(this.notifyUpdate),Ds(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,r){const n=gc.has(t),i=r.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Ar.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...r},n,i,o){let a,l;for(let c=0;c<lZ;c++){const d=E4[c],{isEnabled:f,Feature:p,ProjectionNode:m,MeasureLayout:g}=Np[d];m&&(a=m),f(r)&&(!this.features[d]&&p&&(this.features[d]=new p(this)),g&&(l=g))}if(!this.projection&&a){this.projection=new a(this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:d,drag:f,dragConstraints:p,layoutScroll:m,layoutRoot:g}=r;this.projection.setOptions({layoutId:c,layout:d,alwaysMeasureLayout:!!f||p&&kd(p),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof d=="string"?d:"both",initialPromotionConfig:o,layoutScroll:m,layoutRoot:g})}return l}updateFeatures(){for(const t in this.features){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_n()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}makeTargetAnimatable(t,r=!0){return this.makeTargetAnimatableFromInstance(t,this.props,r)}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<lj.length;n++){const i=lj[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=sZ(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const n=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(n.initial=this.props.initial),n}const r={};for(let n=0;n<uZ;n++){const i=pC[n],o=this.props[i];(Mp(o)||o===!1)&&(r[i]=o)}return r}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){r!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,r)),this.values.set(t,r),this.latestValues[t]=r.get()}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=rf(r,{owner:this}),this.addValue(t,n)),n}readValue(t){var r;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;const{initial:n}=this.props,i=typeof n=="string"||typeof n=="object"?(r=xC(this.props,n))===null||r===void 0?void 0:r[t]:void 0;if(n&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!zi(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new jC),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}}class T4 extends cZ{sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:r,...n},{transformValues:i},o){let a=TX(n,t||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),a&&(a=i(a))),o){CX(this,n,a);const l=oZ(this,n,a,r);r=l.transitionEnd,n=l.target}return{transition:t,transitionEnd:r,...n}}}function dZ(e){return window.getComputedStyle(e)}class fZ extends T4{readValueFromInstance(t,r){if(gc.has(r)){const n=OC(r);return n&&n.default||0}else{const n=dZ(t),i=(pN(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:r}){return m4(t,r)}build(t,r,n,i){gC(t,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,r){return _C(t,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;zi(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(t,r,n,i){wN(t,r,n,i)}}class hZ extends T4{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(gc.has(r)){const n=OC(r);return n&&n.default||0}return r=SN.has(r)?r:SC(r),t.getAttribute(r)}measureInstanceViewportBox(){return _n()}scrapeMotionValuesFromProps(t,r){return xN(t,r)}build(t,r,n,i){bC(t,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,r,n,i){_N(t,r,n,i)}mount(t){this.isSVGTag=wC(t.tagName),super.mount(t)}}const pZ=(e,t)=>vC(e)?new hZ(t,{enableHardwareAcceleration:!1}):new fZ(t,{enableHardwareAcceleration:!0}),mZ={layout:{ProjectionNode:x4,MeasureLayout:v4}},vZ={...VX,...sY,...KJ,...mZ},x0=vQ((e,t)=>GQ(e,t,vZ,pZ));function O4(){const e=O.useRef(!1);return fC(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function gZ(){const e=O4(),[t,r]=O.useState(0),n=O.useCallback(()=>{e.current&&r(t+1)},[t]);return[O.useCallback(()=>Ar.postRender(n),[n]),t]}class yZ extends O.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function bZ({children:e,isPresent:t}){const r=O.useId(),n=O.useRef(null),i=O.useRef({width:0,height:0,top:0,left:0});return O.useInsertionEffect(()=>{const{width:o,height:a,top:l,left:c}=i.current;if(t||!n.current||!o||!a)return;n.current.dataset.motionPopId=r;const d=document.createElement("style");return document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`
|
341
|
-
[data-motion-pop-id="${r}"] {
|
342
|
-
position: absolute !important;
|
343
|
-
width: ${o}px !important;
|
344
|
-
height: ${a}px !important;
|
345
|
-
top: ${l}px !important;
|
346
|
-
left: ${c}px !important;
|
347
|
-
}
|
348
|
-
`),()=>{document.head.removeChild(d)}},[t]),O.createElement(yZ,{isPresent:t,childRef:n,sizeRef:i},O.cloneElement(e,{ref:n}))}const N1=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:o,mode:a})=>{const l=PN(wZ),c=O.useId(),d=O.useMemo(()=>({id:c,initial:t,isPresent:r,custom:i,onExitComplete:f=>{l.set(f,!0);for(const p of l.values())if(!p)return;n&&n()},register:f=>(l.set(f,!1),()=>l.delete(f))}),o?void 0:[r]);return O.useMemo(()=>{l.forEach((f,p)=>l.set(p,!1))},[r]),O.useEffect(()=>{!r&&!l.size&&n&&n()},[r]),a==="popLayout"&&(e=O.createElement(bZ,{isPresent:r},e)),O.createElement(Pm.Provider,{value:d},e)};function wZ(){return new Map}function SZ(e){return O.useEffect(()=>()=>e(),[])}const Sd=e=>e.key||"";function _Z(e,t){e.forEach(r=>{const n=Sd(r);t.set(n,r)})}function xZ(e){const t=[];return O.Children.forEach(e,r=>{O.isValidElement(r)&&t.push(r)}),t}const R4=({children:e,custom:t,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{const l=O.useContext(mC).forceRender||gZ()[0],c=O4(),d=xZ(e);let f=d;const p=O.useRef(new Map).current,m=O.useRef(f),g=O.useRef(new Map).current,b=O.useRef(!0);if(fC(()=>{b.current=!1,_Z(d,g),m.current=f}),SZ(()=>{b.current=!0,g.clear(),p.clear()}),b.current)return O.createElement(O.Fragment,null,f.map(S=>O.createElement(N1,{key:Sd(S),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:o,mode:a},S)));f=[...f];const y=m.current.map(Sd),w=d.map(Sd),_=y.length;for(let S=0;S<_;S++){const C=y[S];w.indexOf(C)===-1&&!p.has(C)&&p.set(C,void 0)}return a==="wait"&&p.size&&(f=[]),p.forEach((S,C)=>{if(w.indexOf(C)!==-1)return;const k=g.get(C);if(!k)return;const E=y.indexOf(C);let R=S;if(!R){const T=()=>{g.delete(C),p.delete(C);const A=m.current.findIndex(M=>M.key===C);if(m.current.splice(A,1),!p.size){if(m.current=d,c.current===!1)return;l(),n&&n()}};R=O.createElement(N1,{key:Sd(k),isPresent:!1,onExitComplete:T,custom:t,presenceAffectsLayout:o,mode:a},k),p.set(C,R)}f.splice(E,0,R)}),f=f.map(S=>{const C=S.key;return p.has(C)?S:O.createElement(N1,{key:Sd(S),isPresent:!0,presenceAffectsLayout:o,mode:a},S)}),O.createElement(O.Fragment,null,p.size?f:f.map(S=>O.cloneElement(S)))};var PZ={initial:e=>{const{position:t}=e,r=["top","bottom"].includes(t)?"y":"x";let n=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(n=1),{opacity:0,[r]:n*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},I4=O.memo(e=>{const{id:t,message:r,onCloseComplete:n,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:l=5e3,containerStyle:c,motionVariants:d=PZ,toastSpacing:f="0.5rem"}=e,[p,m]=O.useState(l),g=cJ();tc(()=>{g||n==null||n()},[g]),tc(()=>{m(l)},[l]);const b=()=>m(null),y=()=>m(l),w=()=>{g&&i()};O.useEffect(()=>{g&&o&&i()},[g,o,i]),sQ(w,p);const _=O.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:f,...c}),[c,f]),S=O.useMemo(()=>oQ(a),[a]);return x.jsx(x0.div,{layout:!0,className:"chakra-toast",variants:d,initial:"initial",animate:"animate",exit:"exit",onHoverStart:b,onHoverEnd:y,custom:{position:a},style:S,children:x.jsx(at.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:_,children:Do(r,{id:t,onClose:w})})})});I4.displayName="ToastComponent";function CZ(e,t){var r;const n=e??"bottom",o={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return(r=o==null?void 0:o[t])!=null?r:n}var uj={path:x.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Pf=Ht((e,t)=>{const{as:r,viewBox:n,color:i="currentColor",focusable:o=!1,children:a,className:l,__css:c,...d}=e,f=or("chakra-icon",l),p=rs("Icon",e),m={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...c,...p},g={ref:t,focusable:o,className:f,__css:m},b=n??uj.viewBox;if(r&&typeof r!="string")return x.jsx(at.svg,{as:r,...g,...d});const y=a??uj.path;return x.jsx(at.svg,{verticalAlign:"middle",viewBox:b,...g,...d,children:y})});Pf.displayName="Icon";function bc(e){const{viewBox:t="0 0 24 24",d:r,displayName:n,defaultProps:i={}}=e,o=O.Children.toArray(e.path),a=Ht((l,c)=>x.jsx(Pf,{ref:c,viewBox:t,...i,...l,children:o.length?o:x.jsx("path",{fill:"currentColor",d:r})}));return a.displayName=n,a}function EZ(e){return x.jsx(Pf,{viewBox:"0 0 24 24",...e,children:x.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function TZ(e){return x.jsx(Pf,{viewBox:"0 0 24 24",...e,children:x.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function cj(e){return x.jsx(Pf,{viewBox:"0 0 24 24",...e,children:x.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var OZ=O8({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Rm=Ht((e,t)=>{const r=rs("Spinner",e),{label:n="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:l,...c}=hi(e),d=or("chakra-spinner",l),f={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${OZ} ${o} linear infinite`,...r};return x.jsx(at.div,{ref:t,__css:f,className:d,...c,children:n&&x.jsx(at.span,{srOnly:!0,children:n})})});Rm.displayName="Spinner";var[RZ,$C]=Wi({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[IZ,AC]=Wi({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),k4={info:{icon:TZ,colorScheme:"blue"},warning:{icon:cj,colorScheme:"orange"},success:{icon:EZ,colorScheme:"green"},error:{icon:cj,colorScheme:"red"},loading:{icon:Rm,colorScheme:"blue"}};function kZ(e){return k4[e].colorScheme}function jZ(e){return k4[e].icon}var j4=Ht(function(t,r){const n=AC(),{status:i}=$C(),o={display:"inline",...n.description};return x.jsx(at.div,{ref:r,"data-status":i,...t,className:or("chakra-alert__desc",t.className),__css:o})});j4.displayName="AlertDescription";function $4(e){const{status:t}=$C(),r=jZ(t),n=AC(),i=t==="loading"?n.spinner:n.icon;return x.jsx(at.span,{display:"inherit","data-status":t,...e,className:or("chakra-alert__icon",e.className),__css:i,children:e.children||x.jsx(r,{h:"100%",w:"100%"})})}$4.displayName="AlertIcon";var A4=Ht(function(t,r){const n=AC(),{status:i}=$C();return x.jsx(at.div,{ref:r,"data-status":i,...t,className:or("chakra-alert__title",t.className),__css:n.title})});A4.displayName="AlertTitle";var D4=Ht(function(t,r){var n;const{status:i="info",addRole:o=!0,...a}=hi(t),l=(n=t.colorScheme)!=null?n:kZ(i),c=vc("Alert",{...t,colorScheme:l}),d={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...c.container};return x.jsx(RZ,{value:{status:i},children:x.jsx(IZ,{value:c,children:x.jsx(at.div,{"data-status":i,role:o?"alert":void 0,ref:r,...a,className:or("chakra-alert",t.className),__css:d})})})});D4.displayName="Alert";function $Z(e){return x.jsx(Pf,{focusable:"false","aria-hidden":!0,...e,children:x.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var M4=Ht(function(t,r){const n=rs("CloseButton",t),{children:i,isDisabled:o,__css:a,...l}=hi(t),c={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return x.jsx(at.button,{type:"button","aria-label":"Close",ref:r,disabled:o,__css:{...c,...n,...a},...l,children:i||x.jsx($Z,{width:"1em",height:"1em"})})});M4.displayName="CloseButton";var AZ={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},La=DZ(AZ);function DZ(e){let t=e;const r=new Set,n=i=>{t=i(t),r.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(r.add(i),()=>{n(()=>e),r.delete(i)}),removeToast:(i,o)=>{n(a=>({...a,[o]:a[o].filter(l=>l.id!=i)}))},notify:(i,o)=>{const a=MZ(i,o),{position:l,id:c}=a;return n(d=>{var f,p;const g=l.includes("top")?[a,...(f=d[l])!=null?f:[]]:[...(p=d[l])!=null?p:[],a];return{...d,[l]:g}}),c},update:(i,o)=>{i&&n(a=>{const l={...a},{position:c,index:d}=ik(l,i);return c&&d!==-1&&(l[c][d]={...l[c][d],...o,message:N4(o)}),l})},closeAll:({positions:i}={})=>{n(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((c,d)=>(c[d]=o[d].map(f=>({...f,requestClose:!0})),c),{...o}))},close:i=>{n(o=>{const a=sN(o,i);return a?{...o,[a]:o[a].map(l=>l.id==i?{...l,requestClose:!0}:l)}:o})},isActive:i=>!!ik(La.getState(),i).position}}var dj=0;function MZ(e,t={}){var r,n;dj+=1;const i=(r=t.id)!=null?r:dj,o=(n=t.position)!=null?n:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>La.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var NZ=e=>{const{status:t,variant:r="solid",id:n,title:i,isClosable:o,onClose:a,description:l,colorScheme:c,icon:d}=e,f=n?{root:`toast-${n}`,title:`toast-${n}-title`,description:`toast-${n}-description`}:void 0;return x.jsxs(D4,{addRole:!1,status:t,variant:r,id:f==null?void 0:f.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:c,children:[x.jsx($4,{children:d}),x.jsxs(at.div,{flex:"1",maxWidth:"100%",children:[i&&x.jsx(A4,{id:f==null?void 0:f.title,children:i}),l&&x.jsx(j4,{id:f==null?void 0:f.description,display:"block",children:l})]}),o&&x.jsx(M4,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1})]})};function N4(e={}){const{render:t,toastComponent:r=NZ}=e;return i=>typeof t=="function"?t({...i,...e}):x.jsx(r,{...i,...e})}function FZ(e,t){const r=i=>{var o;return{...t,...i,position:CZ((o=i==null?void 0:i.position)!=null?o:t==null?void 0:t.position,e)}},n=i=>{const o=r(i),a=N4(o);return La.notify(a,o)};return n.update=(i,o)=>{La.update(i,r(o))},n.promise=(i,o)=>{const a=n({...o.loading,status:"loading",duration:null});i.then(l=>n.update(a,{status:"success",duration:5e3,...Do(o.success,l)})).catch(l=>n.update(a,{status:"error",duration:5e3,...Do(o.error,l)}))},n.closeAll=La.closeAll,n.close=La.close,n.isActive=La.isActive,n}var[LZ,lxe]=Wi({name:"ToastOptionsContext",strict:!1}),F4=e=>{const t=O.useSyncExternalStore(La.subscribe,La.getState,La.getState),{motionVariants:r,component:n=I4,portalProps:i}=e,a=Object.keys(t).map(l=>{const c=t[l];return x.jsx("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${l}`,id:`chakra-toast-manager-${l}`,style:aQ(l),children:x.jsx(R4,{initial:!1,children:c.map(d=>x.jsx(n,{motionVariants:r,...d},d.id))})},l)});return x.jsx(xf,{...i,children:a})},BZ={duration:5e3,variant:"solid"},ad={theme:JM,colorMode:"light",toggleColorMode:()=>{},setColorMode:()=>{},defaultOptions:BZ,forced:!1};function VZ({theme:e=ad.theme,colorMode:t=ad.colorMode,toggleColorMode:r=ad.toggleColorMode,setColorMode:n=ad.setColorMode,defaultOptions:i=ad.defaultOptions,motionVariants:o,toastSpacing:a,component:l,forced:c}=ad){const d={colorMode:t,setColorMode:n,toggleColorMode:r,forced:c};return{ToastContainer:()=>x.jsx(iN,{theme:e,children:x.jsx(d0.Provider,{value:d,children:x.jsx(F4,{defaultOptions:i,motionVariants:o,toastSpacing:a,component:l})})}),toast:FZ(e.direction,i)}}var zZ=e=>function({children:r,theme:n=e,toastOptions:i,...o}){return x.jsxs(nQ,{theme:n,...o,children:[x.jsx(LZ,{value:i==null?void 0:i.defaultOptions,children:r}),x.jsx(F4,{...i})]})},fj=zZ(JM),qZ=Object.defineProperty,UZ=(e,t,r)=>t in e?qZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cn=(e,t,r)=>(UZ(e,typeof t!="symbol"?t+"":t,r),r);function hj(e){return e.sort((t,r)=>{const n=t.compareDocumentPosition(r);if(n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var HZ=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function pj(e,t,r){let n=e+1;return r&&n>=t&&(n=0),n}function mj(e,t,r){let n=e-1;return r&&n<0&&(n=t),n}var Ex=typeof window<"u"?O.useLayoutEffect:O.useEffect,bb=e=>e,WZ=class{constructor(){cn(this,"descendants",new Map),cn(this,"register",e=>{if(e!=null)return HZ(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),cn(this,"unregister",e=>{this.descendants.delete(e);const t=hj(Array.from(this.descendants.keys()));this.assignIndex(t)}),cn(this,"destroy",()=>{this.descendants.clear()}),cn(this,"assignIndex",e=>{this.descendants.forEach(t=>{const r=e.indexOf(t.node);t.index=r,t.node.dataset.index=t.index.toString()})}),cn(this,"count",()=>this.descendants.size),cn(this,"enabledCount",()=>this.enabledValues().length),cn(this,"values",()=>Array.from(this.descendants.values()).sort((t,r)=>t.index-r.index)),cn(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),cn(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),cn(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),cn(this,"first",()=>this.item(0)),cn(this,"firstEnabled",()=>this.enabledItem(0)),cn(this,"last",()=>this.item(this.descendants.size-1)),cn(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),cn(this,"indexOf",e=>{var t,r;return e&&(r=(t=this.descendants.get(e))==null?void 0:t.index)!=null?r:-1}),cn(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),cn(this,"next",(e,t=!0)=>{const r=pj(e,this.count(),t);return this.item(r)}),cn(this,"nextEnabled",(e,t=!0)=>{const r=this.item(e);if(!r)return;const n=this.enabledIndexOf(r.node),i=pj(n,this.enabledCount(),t);return this.enabledItem(i)}),cn(this,"prev",(e,t=!0)=>{const r=mj(e,this.count()-1,t);return this.item(r)}),cn(this,"prevEnabled",(e,t=!0)=>{const r=this.item(e);if(!r)return;const n=this.enabledIndexOf(r.node),i=mj(n,this.enabledCount()-1,t);return this.enabledItem(i)}),cn(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const r=Array.from(this.descendants.keys()).concat(e),n=hj(r);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(n)})}};function KZ(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Bn(...e){return t=>{e.forEach(r=>{KZ(r,t)})}}function GZ(...e){return O.useMemo(()=>Bn(...e),e)}function QZ(){const e=O.useRef(new WZ);return Ex(()=>()=>e.current.destroy()),e.current}var[YZ,L4]=Wi({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function XZ(e){const t=L4(),[r,n]=O.useState(-1),i=O.useRef(null);Ex(()=>()=>{i.current&&t.unregister(i.current)},[]),Ex(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);r!=a&&!Number.isNaN(a)&&n(a)});const o=bb(e?t.register(e):t.register);return{descendants:t,index:r,enabledIndex:t.enabledIndexOf(i.current),register:Bn(o,i)}}function JZ(){return[bb(YZ),()=>bb(L4()),()=>QZ(),i=>XZ(i)]}function ZZ(e){const{value:t,defaultValue:r,onChange:n,shouldUpdate:i=(m,g)=>m!==g}=e,o=ca(n),a=ca(i),[l,c]=O.useState(r),d=t!==void 0,f=d?t:l,p=ca(m=>{const b=typeof m=="function"?m(f):m;a(f,b)&&(d||c(b),o(b))},[d,o,f,a]);return[f,p]}function P0(e){return O.Children.toArray(e).filter(t=>O.isValidElement(t))}var[eee,DC]=Wi({name:"BreadcrumbStylesContext",errorMessage:`useBreadcrumbStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Breadcrumb />" `}),MC=Ht(function(t,r){const{isCurrentPage:n,as:i,className:o,href:a,...l}=t,c=DC(),d={ref:r,as:i,className:or("chakra-breadcrumb__link",o),...l};return n?x.jsx(at.span,{"aria-current":"page",__css:c.link,...d}):x.jsx(at.a,{__css:c.link,href:a,...d})});MC.displayName="BreadcrumbLink";var Tx=Ht(function(t,r){const{spacing:n,...i}=t,o=DC(),a={mx:n,...o.separator};return x.jsx(at.span,{ref:r,role:"presentation",...i,__css:a})});Tx.displayName="BreadcrumbSeparator";var B4=Ht(function(t,r){const{isCurrentPage:n,separator:i,isLastChild:o,spacing:a,children:l,className:c,...d}=t,p=P0(l).map(y=>y.type===MC?O.cloneElement(y,{isCurrentPage:n}):y.type===Tx?O.cloneElement(y,{spacing:a,children:y.props.children||i}):y),g={display:"inline-flex",alignItems:"center",...DC().item},b=or("chakra-breadcrumb__list-item",c);return x.jsxs(at.li,{ref:r,className:b,...d,__css:g,children:[p,!o&&x.jsx(Tx,{spacing:a,children:i})]})});B4.displayName="BreadcrumbItem";var V4=Ht(function(t,r){const n=vc("Breadcrumb",t),i=hi(t),{children:o,spacing:a="0.5rem",separator:l="/",className:c,listProps:d,...f}=i,p=P0(o),m=p.length,g=p.map((y,w)=>O.cloneElement(y,{separator:l,spacing:a,isLastChild:m===w+1})),b=or("chakra-breadcrumb",c);return x.jsx(at.nav,{ref:r,"aria-label":"breadcrumb",className:b,__css:n.container,...f,children:x.jsx(eee,{value:n,children:x.jsx(at.ol,{className:"chakra-breadcrumb__list",...d,__css:{display:"flex",alignItems:"center",...n.list},children:g})})})});V4.displayName="Breadcrumb";var[uxe,tee]=Wi({strict:!1,name:"ButtonGroupContext"});function ree(e){const[t,r]=O.useState(!e);return{ref:O.useCallback(o=>{o&&r(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}function Ox(e){const{children:t,className:r,...n}=e,i=O.isValidElement(t)?O.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=or("chakra-button__icon",r);return x.jsx(at.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...n,className:o,children:i})}Ox.displayName="ButtonIcon";function Rx(e){const{label:t,placement:r,spacing:n="0.5rem",children:i=x.jsx(Rm,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...l}=e,c=or("chakra-button__spinner",o),d=r==="start"?"marginEnd":"marginStart",f=O.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[d]:t?n:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,d,n]);return x.jsx(at.div,{className:c,...l,__css:f,children:i})}Rx.displayName="ButtonSpinner";var Lo=Ht((e,t)=>{const r=tee(),n=rs("Button",{...r,...e}),{isDisabled:i=r==null?void 0:r.isDisabled,isLoading:o,isActive:a,children:l,leftIcon:c,rightIcon:d,loadingText:f,iconSpacing:p="0.5rem",type:m,spinner:g,spinnerPlacement:b="start",className:y,as:w,..._}=hi(e),S=O.useMemo(()=>{const R={...n==null?void 0:n._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...n,...!!r&&{_focus:R}}},[n,r]),{ref:C,type:k}=ree(w),E={rightIcon:d,leftIcon:c,iconSpacing:p,children:l};return x.jsxs(at.button,{ref:GZ(t,C),as:w,type:m??k,"data-active":Yt(a),"data-loading":Yt(o),__css:S,className:or("chakra-button",y),..._,disabled:i||o,children:[o&&b==="start"&&x.jsx(Rx,{className:"chakra-button__spinner--start",label:f,placement:"start",spacing:p,children:g}),o?f||x.jsx(at.span,{opacity:0,children:x.jsx(vj,{...E})}):x.jsx(vj,{...E}),o&&b==="end"&&x.jsx(Rx,{className:"chakra-button__spinner--end",label:f,placement:"end",spacing:p,children:g})]})});Lo.displayName="Button";function vj(e){const{leftIcon:t,rightIcon:r,children:n,iconSpacing:i}=e;return x.jsxs(x.Fragment,{children:[t&&x.jsx(Ox,{marginEnd:i,children:t}),n,r&&x.jsx(Ox,{marginStart:i,children:r})]})}var Ci=Ht((e,t)=>{const{icon:r,children:n,isRound:i,"aria-label":o,...a}=e,l=r||n,c=O.isValidElement(l)?O.cloneElement(l,{"aria-hidden":!0,focusable:!1}):null;return x.jsx(Lo,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:c})});Ci.displayName="IconButton";var[nee,iee]=Wi({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `}),[oee,z4]=Wi({strict:!1,name:"FormControlContext"});function aee(e){const{id:t,isRequired:r,isInvalid:n,isDisabled:i,isReadOnly:o,...a}=e,l=O.useId(),c=t||`field-${l}`,d=`${c}-label`,f=`${c}-feedback`,p=`${c}-helptext`,[m,g]=O.useState(!1),[b,y]=O.useState(!1),[w,_]=O.useState(!1),S=O.useCallback((T={},A=null)=>({id:p,...T,ref:Bn(A,M=>{M&&y(!0)})}),[p]),C=O.useCallback((T={},A=null)=>({...T,ref:A,"data-focus":Yt(w),"data-disabled":Yt(i),"data-invalid":Yt(n),"data-readonly":Yt(o),id:T.id!==void 0?T.id:d,htmlFor:T.htmlFor!==void 0?T.htmlFor:c}),[c,i,w,n,o,d]),k=O.useCallback((T={},A=null)=>({id:f,...T,ref:Bn(A,M=>{M&&g(!0)}),"aria-live":"polite"}),[f]),E=O.useCallback((T={},A=null)=>({...T,...a,ref:A,role:"group","data-focus":Yt(w),"data-disabled":Yt(i),"data-invalid":Yt(n),"data-readonly":Yt(o)}),[a,i,w,n,o]),R=O.useCallback((T={},A=null)=>({...T,ref:A,role:"presentation","aria-hidden":!0,children:T.children||"*"}),[]);return{isRequired:!!r,isInvalid:!!n,isReadOnly:!!o,isDisabled:!!i,isFocused:!!w,onFocus:()=>_(!0),onBlur:()=>_(!1),hasFeedbackText:m,setHasFeedbackText:g,hasHelpText:b,setHasHelpText:y,id:c,labelId:d,feedbackId:f,helpTextId:p,htmlProps:a,getHelpTextProps:S,getErrorMessageProps:k,getRootProps:E,getLabelProps:C,getRequiredIndicatorProps:R}}var see=Ht(function(t,r){const n=vc("Form",t),i=hi(t),{getRootProps:o,htmlProps:a,...l}=aee(i),c=or("chakra-form-control",t.className);return x.jsx(oee,{value:l,children:x.jsx(nee,{value:n,children:x.jsx(at.div,{...o({},r),className:c,__css:n.container})})})});see.displayName="FormControl";var lee=Ht(function(t,r){const n=z4(),i=iee(),o=or("chakra-form__helper-text",t.className);return x.jsx(at.div,{...n==null?void 0:n.getHelpTextProps(t,r),__css:i.helperText,className:o})});lee.displayName="FormHelperText";function q4(e){const{isDisabled:t,isInvalid:r,isReadOnly:n,isRequired:i,...o}=U4(e);return{...o,disabled:t,readOnly:n,required:i,"aria-invalid":a1(r),"aria-required":a1(i),"aria-readonly":a1(n)}}function U4(e){var t,r,n;const i=z4(),{id:o,disabled:a,readOnly:l,required:c,isRequired:d,isInvalid:f,isReadOnly:p,isDisabled:m,onFocus:g,onBlur:b,...y}=e,w=e["aria-describedby"]?[e["aria-describedby"]]:[];return i!=null&&i.hasFeedbackText&&(i!=null&&i.isInvalid)&&w.push(i.feedbackId),i!=null&&i.hasHelpText&&w.push(i.helpTextId),{...y,"aria-describedby":w.join(" ")||void 0,id:o??(i==null?void 0:i.id),isDisabled:(t=a??m)!=null?t:i==null?void 0:i.isDisabled,isReadOnly:(r=l??p)!=null?r:i==null?void 0:i.isReadOnly,isRequired:(n=c??d)!=null?n:i==null?void 0:i.isRequired,isInvalid:f??(i==null?void 0:i.isInvalid),onFocus:mr(i==null?void 0:i.onFocus,g),onBlur:mr(i==null?void 0:i.onBlur,b)}}var uee={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},cee=()=>typeof document<"u",gj=!1,Im=null,rc=!1,Ix=!1,kx=new Set;function NC(e,t){kx.forEach(r=>r(e,t))}var dee=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function fee(e){return!(e.metaKey||!dee&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function yj(e){rc=!0,fee(e)&&(Im="keyboard",NC("keyboard",e))}function sd(e){if(Im="pointer",e.type==="mousedown"||e.type==="pointerdown"){rc=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let r=!1;try{r=t.matches(":focus-visible")}catch{}if(r)return;NC("pointer",e)}}function hee(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function pee(e){hee(e)&&(rc=!0,Im="virtual")}function mee(e){e.target===window||e.target===document||(!rc&&!Ix&&(Im="virtual",NC("virtual",e)),rc=!1,Ix=!1)}function vee(){rc=!1,Ix=!0}function bj(){return Im!=="pointer"}function gee(){if(!cee()||gj)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...r){rc=!0,e.apply(this,r)},document.addEventListener("keydown",yj,!0),document.addEventListener("keyup",yj,!0),document.addEventListener("click",pee,!0),window.addEventListener("focus",mee,!0),window.addEventListener("blur",vee,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",sd,!0),document.addEventListener("pointermove",sd,!0),document.addEventListener("pointerup",sd,!0)):(document.addEventListener("mousedown",sd,!0),document.addEventListener("mousemove",sd,!0),document.addEventListener("mouseup",sd,!0)),gj=!0}function yee(e){gee(),e(bj());const t=()=>e(bj());return kx.add(t),()=>{kx.delete(t)}}function bee(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}function wee(e={}){const t=U4(e),{isDisabled:r,isReadOnly:n,isRequired:i,isInvalid:o,id:a,onBlur:l,onFocus:c,"aria-describedby":d}=t,{defaultChecked:f,isChecked:p,isFocusable:m,onChange:g,isIndeterminate:b,name:y,value:w,tabIndex:_=void 0,"aria-label":S,"aria-labelledby":C,"aria-invalid":k,...E}=e,R=bee(E,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),T=ca(g),A=ca(l),M=ca(c),[B,Q]=O.useState(!1),[se,ie]=O.useState(!1),[N,X]=O.useState(!1),[ce,ne]=O.useState(!1);O.useEffect(()=>yee(Q),[]);const ee=O.useRef(null),[ge,Z]=O.useState(!0),[j,U]=O.useState(!!f),q=p!==void 0,$=q?p:j,F=O.useCallback(he=>{if(n||r){he.preventDefault();return}q||U($?he.target.checked:b?!0:he.target.checked),T==null||T(he)},[n,r,$,q,b,T]);$l(()=>{ee.current&&(ee.current.indeterminate=!!b)},[b]),tc(()=>{r&&ie(!1)},[r,ie]),$l(()=>{const he=ee.current;if(!(he!=null&&he.form))return;const Ce=()=>{U(!!f)};return he.form.addEventListener("reset",Ce),()=>{var Ge;return(Ge=he.form)==null?void 0:Ge.removeEventListener("reset",Ce)}},[]);const V=r&&!m,de=O.useCallback(he=>{he.key===" "&&ne(!0)},[ne]),pe=O.useCallback(he=>{he.key===" "&&ne(!1)},[ne]);$l(()=>{if(!ee.current)return;ee.current.checked!==$&&U(ee.current.checked)},[ee.current]);const Ee=O.useCallback((he={},Ce=null)=>{const Ge=$t=>{se&&$t.preventDefault(),ne(!0)};return{...he,ref:Ce,"data-active":Yt(ce),"data-hover":Yt(N),"data-checked":Yt($),"data-focus":Yt(se),"data-focus-visible":Yt(se&&B),"data-indeterminate":Yt(b),"data-disabled":Yt(r),"data-invalid":Yt(o),"data-readonly":Yt(n),"aria-hidden":!0,onMouseDown:mr(he.onMouseDown,Ge),onMouseUp:mr(he.onMouseUp,()=>ne(!1)),onMouseEnter:mr(he.onMouseEnter,()=>X(!0)),onMouseLeave:mr(he.onMouseLeave,()=>X(!1))}},[ce,$,r,se,B,N,b,o,n]),Me=O.useCallback((he={},Ce=null)=>({...he,ref:Ce,"data-active":Yt(ce),"data-hover":Yt(N),"data-checked":Yt($),"data-focus":Yt(se),"data-focus-visible":Yt(se&&B),"data-indeterminate":Yt(b),"data-disabled":Yt(r),"data-invalid":Yt(o),"data-readonly":Yt(n)}),[ce,$,r,se,B,N,b,o,n]),Y=O.useCallback((he={},Ce=null)=>({...R,...he,ref:Bn(Ce,Ge=>{Ge&&Z(Ge.tagName==="LABEL")}),onClick:mr(he.onClick,()=>{var Ge;ge||((Ge=ee.current)==null||Ge.click(),requestAnimationFrame(()=>{var $t;($t=ee.current)==null||$t.focus({preventScroll:!0})}))}),"data-disabled":Yt(r),"data-checked":Yt($),"data-invalid":Yt(o)}),[R,r,$,o,ge]),K=O.useCallback((he={},Ce=null)=>({...he,ref:Bn(ee,Ce),type:"checkbox",name:y,value:w,id:a,tabIndex:_,onChange:mr(he.onChange,F),onBlur:mr(he.onBlur,A,()=>ie(!1)),onFocus:mr(he.onFocus,M,()=>ie(!0)),onKeyDown:mr(he.onKeyDown,de),onKeyUp:mr(he.onKeyUp,pe),required:i,checked:$,disabled:V,readOnly:n,"aria-label":S,"aria-labelledby":C,"aria-invalid":k?!!k:o,"aria-describedby":d,"aria-disabled":r,style:uee}),[y,w,a,F,A,M,de,pe,i,$,V,n,S,C,k,o,d,r,_]),we=O.useCallback((he={},Ce=null)=>({...he,ref:Ce,onMouseDown:mr(he.onMouseDown,See),"data-disabled":Yt(r),"data-checked":Yt($),"data-invalid":Yt(o)}),[$,r,o]);return{state:{isInvalid:o,isFocused:se,isChecked:$,isActive:ce,isHovered:N,isIndeterminate:b,isDisabled:r,isReadOnly:n,isRequired:i},getRootProps:Y,getCheckboxProps:Ee,getIndicatorProps:Me,getInputProps:K,getLabelProps:we,htmlProps:R}}function See(e){e.preventDefault(),e.stopPropagation()}function Gd(e,t,r,n){const i=ca(r);return O.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!r||!o))return o.addEventListener(t,i,n),()=>{o.removeEventListener(t,i,n)}},[t,e,n,i,r]),()=>{const o=typeof e=="function"?e():e??document;o==null||o.removeEventListener(t,i,n)}}function _ee(e){return"current"in e}var H4=()=>typeof window<"u";function xee(){var e;const t=navigator.userAgentData;return(e=t==null?void 0:t.platform)!=null?e:navigator.platform}var Pee=e=>H4()&&e.test(navigator.vendor),Cee=e=>H4()&&e.test(xee()),Eee=()=>Cee(/mac|iphone|ipad|ipod/i),Tee=()=>Eee()&&Pee(/apple/i);function Oee(e){const{ref:t,elements:r,enabled:n}=e,i=()=>{var o,a;return(a=(o=t.current)==null?void 0:o.ownerDocument)!=null?a:document};Gd(i,"pointerdown",o=>{if(!Tee()||!n)return;const a=o.target,c=(r??[t]).some(d=>{const f=_ee(d)?d.current:d;return(f==null?void 0:f.contains(a))||f===a});i().activeElement!==a&&c&&(o.preventDefault(),a.focus())})}var jx=function(e,t){return jx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},jx(e,t)};function ga(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");jx(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var ve=function(){return ve=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},ve.apply(this,arguments)};function Ms(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Cl(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function l(f){try{d(n.next(f))}catch(p){a(p)}}function c(f){try{d(n.throw(f))}catch(p){a(p)}}function d(f){f.done?o(f.value):i(f.value).then(l,c)}d((n=n.apply(e,t||[])).next())})}function El(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(d){return function(f){return c([d,f])}}function c(d){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(r=0)),r;)try{if(n=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,i=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){r.label=d[1];break}if(d[0]===6&&r.label<o[1]){r.label=o[1],o=d;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(d);break}o[2]&&r.ops.pop(),r.trys.pop();continue}d=t.call(e,r)}catch(f){d=[6,f],i=0}finally{n=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function da(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function Lp(e){"@babel/helpers - typeof";return Lp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lp(e)}function Ree(e,t){if(Lp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Lp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Iee(e){var t=Ree(e,"string");return Lp(t)=="symbol"?t:t+""}function W4(e,t,r){return(t=Iee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K4(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function FC(e){var t;if(!K4(e))return!1;const r=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof r.HTMLElement}function kee(e){var t,r;return(r=(t=G4(e))==null?void 0:t.defaultView)!=null?r:window}function G4(e){return K4(e)?e.ownerDocument:document}function jee(e){return G4(e).activeElement}function $ee(e){const t=e.ownerDocument.defaultView||window,{overflow:r,overflowX:n,overflowY:i}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(r+i+n)}function Aee(e){return e.localName==="html"?e:e.assignedSlot||e.parentElement||e.ownerDocument.documentElement}function Q4(e){return["html","body","#document"].includes(e.localName)?e.ownerDocument.body:FC(e)&&$ee(e)?e:Q4(Aee(e))}var Y4=e=>e.hasAttribute("tabindex"),Dee=e=>Y4(e)&&e.tabIndex===-1;function Mee(e){return!!e.getAttribute("disabled")||!!e.getAttribute("aria-disabled")}function X4(e){return e.parentElement&&X4(e.parentElement)?!0:e.hidden}function Nee(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function J4(e){if(!FC(e)||X4(e)||Mee(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const n={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in n?n[t]():Nee(e)?!0:Y4(e)}function Fee(e){return e?FC(e)&&J4(e)&&!Dee(e):!1}var Lee=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Bee=Lee.join(),Vee=e=>e.offsetWidth>0&&e.offsetHeight>0;function zee(e){const t=Array.from(e.querySelectorAll(Bee));return t.unshift(e),t.filter(r=>J4(r)&&Vee(r))}var qee=IG?O.useLayoutEffect:O.useEffect;function wj(e,t=[]){const r=O.useRef(e);return qee(()=>{r.current=e}),O.useCallback((...n)=>{var i;return(i=r.current)==null?void 0:i.call(r,...n)},t)}function Uee(e,t){const r=O.useId();return O.useMemo(()=>e||[t,r].filter(Boolean).join("-"),[e,t,r])}function Hee(e,t){const r=e!==void 0;return[r,r&&typeof e<"u"?e:t]}function Z4(e={}){const{onClose:t,onOpen:r,isOpen:n,id:i}=e,o=wj(r),a=wj(t),[l,c]=O.useState(e.defaultIsOpen||!1),[d,f]=Hee(n,l),p=Uee(i,"disclosure"),m=O.useCallback(()=>{d||c(!1),a==null||a()},[d,a]),g=O.useCallback(()=>{d||c(!0),o==null||o()},[d,o]),b=O.useCallback(()=>{(f?m:g)()},[f,g,m]);return{isOpen:!!f,onOpen:g,onClose:m,onToggle:b,isControlled:d,getButtonProps:(y={})=>({...y,"aria-expanded":f,"aria-controls":p,onClick:DG(y.onClick,b)}),getDisclosureProps:(y={})=>({...y,hidden:!f,id:p})}}var C0=Ht(function(t,r){const{htmlSize:n,...i}=t,o=vc("Input",i),a=hi(i),l=q4(a),c=or("chakra-input",t.className);return x.jsx(at.input,{size:n,...l,__css:o.field,ref:r,className:c})});C0.displayName="Input";C0.id="Input";var Cf=Ht(function(t,r){const n=rs("Link",t),{className:i,isExternal:o,...a}=hi(t);return x.jsx(at.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:r,className:or("chakra-link",i),...a,__css:n})});Cf.displayName="Link";function Wee(e,t){return Array.isArray(e)?e.map(r=>r===null?null:t(r)):ua(e)?Object.keys(e).reduce((r,n)=>(r[n]=t(e[n]),r),{}):e!=null?t(e):null}var bt=Ht(function(t,r){const n=rs("Text",t),{className:i,align:o,decoration:a,casing:l,...c}=hi(t),d=qG({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return x.jsx(at.p,{ref:r,className:or("chakra-text",t.className),...d,...c,__css:n})});bt.displayName="Text";var eF=e=>x.jsx(at.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});eF.displayName="StackItem";function Kee(e){const{spacing:t,direction:r}=e,n={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":Wee(r,i=>n[i])}}var tF=Ht((e,t)=>{const{isInline:r,direction:n,align:i,justify:o,spacing:a="0.5rem",wrap:l,children:c,divider:d,className:f,shouldWrapChildren:p,...m}=e,g=r?"row":n??"column",b=O.useMemo(()=>Kee({spacing:a,direction:g}),[a,g]),y=!!d,w=!p&&!y,_=O.useMemo(()=>{const C=P0(c);return w?C:C.map((k,E)=>{const R=typeof k.key<"u"?k.key:E,T=E+1===C.length,M=p?x.jsx(eF,{children:k},R):k;if(!y)return M;const B=O.cloneElement(d,{__css:b}),Q=T?null:B;return x.jsxs(O.Fragment,{children:[M,Q]},R)})},[d,b,y,w,p,c]),S=or("chakra-stack",f);return x.jsx(at.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:g,flexWrap:l,gap:y?void 0:a,className:S,...m,children:_})});tF.displayName="Stack";var Bp=Ht((e,t)=>x.jsx(tF,{align:"center",...e,direction:"column",ref:t}));Bp.displayName="VStack";var rF=Ht(function(t,r){const n=rs("Heading",t),{className:i,...o}=hi(t);return x.jsx(at.h2,{ref:r,className:or("chakra-heading",t.className),...o,__css:n})});rF.displayName="Heading";var wt=at("div");wt.displayName="Box";var nF=Ht(function(t,r){const{size:n,centerContent:i=!0,...o}=t,a=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return x.jsx(wt,{ref:r,boxSize:n,__css:{...a,flexShrink:0,flexGrow:0},...o})});nF.displayName="Square";var Gee=Ht(function(t,r){const{size:n,...i}=t;return x.jsx(nF,{size:n,ref:r,borderRadius:"9999px",...i})});Gee.displayName="Circle";var LC=at("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});LC.displayName="Center";var Qee={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Ht(function(t,r){const{axis:n="both",...i}=t;return x.jsx(at.div,{ref:r,__css:Qee[n],...i,position:"absolute"})});var BC=Ht(function(t,r){const n=rs("Code",t),{className:i,...o}=hi(t);return x.jsx(at.code,{ref:r,className:or("chakra-code",t.className),...o,__css:{display:"inline-block",...n}})});BC.displayName="Code";var je=Ht(function(t,r){const{direction:n,align:i,justify:o,wrap:a,basis:l,grow:c,shrink:d,...f}=t,p={display:"flex",flexDirection:n,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:l,flexGrow:c,flexShrink:d};return x.jsx(at.div,{ref:r,__css:p,...f})});je.displayName="Flex";function Yee(e){const{key:t}=e;return t.length===1||t.length>1&&/[^a-zA-Z0-9]/.test(t)}function Xee(e={}){const{timeout:t=300,preventDefault:r=()=>!0}=e,[n,i]=O.useState([]),o=O.useRef(),a=()=>{o.current&&(clearTimeout(o.current),o.current=null)},l=()=>{a(),o.current=setTimeout(()=>{i([]),o.current=null},t)};O.useEffect(()=>a,[]);function c(d){return f=>{if(f.key==="Backspace"){const p=[...n];p.pop(),i(p);return}if(Yee(f)){const p=n.concat(f.key);r(f)&&(f.preventDefault(),f.stopPropagation()),i(p),d(p.join("")),l()}}}return c}function Jee(e,t,r,n){if(t==null)return n;if(!n)return e.find(a=>r(a).toLowerCase().startsWith(t.toLowerCase()));const i=e.filter(o=>r(o).toLowerCase().startsWith(t.toLowerCase()));if(i.length>0){let o;return i.includes(n)?(o=i.indexOf(n)+1,o===i.length&&(o=0),i[o]):(o=e.indexOf(i[0]),e[o])}return n}function Zee(){const e=O.useRef(new Map),t=e.current,r=O.useCallback((i,o,a,l)=>{e.current.set(a,{type:o,el:i,options:l}),i.addEventListener(o,a,l)},[]),n=O.useCallback((i,o,a,l)=>{i.removeEventListener(o,a,l),e.current.delete(a)},[]);return O.useEffect(()=>()=>{t.forEach((i,o)=>{n(i.el,i.type,o,i.options)})},[n,t]),{add:r,remove:n}}function F1(e){const t=e.target,{tagName:r,isContentEditable:n}=t;return r!=="INPUT"&&r!=="TEXTAREA"&&n!==!0}function ete(e={}){const{ref:t,isDisabled:r,isFocusable:n,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:l,onClick:c,onKeyDown:d,onKeyUp:f,tabIndex:p,onMouseOver:m,onMouseLeave:g,...b}=e,[y,w]=O.useState(!0),[_,S]=O.useState(!1),C=Zee(),k=ne=>{ne&&ne.tagName!=="BUTTON"&&w(!1)},E=y?p:p||0,R=r&&!n,T=O.useCallback(ne=>{if(r){ne.stopPropagation(),ne.preventDefault();return}ne.currentTarget.focus(),c==null||c(ne)},[r,c]),A=O.useCallback(ne=>{_&&F1(ne)&&(ne.preventDefault(),ne.stopPropagation(),S(!1),C.remove(document,"keyup",A,!1))},[_,C]),M=O.useCallback(ne=>{if(d==null||d(ne),r||ne.defaultPrevented||ne.metaKey||!F1(ne.nativeEvent)||y)return;const ee=i&&ne.key==="Enter";o&&ne.key===" "&&(ne.preventDefault(),S(!0)),ee&&(ne.preventDefault(),ne.currentTarget.click()),C.add(document,"keyup",A,!1)},[r,y,d,i,o,C,A]),B=O.useCallback(ne=>{if(f==null||f(ne),r||ne.defaultPrevented||ne.metaKey||!F1(ne.nativeEvent)||y)return;o&&ne.key===" "&&(ne.preventDefault(),S(!1),ne.currentTarget.click())},[o,y,r,f]),Q=O.useCallback(ne=>{ne.button===0&&(S(!1),C.remove(document,"mouseup",Q,!1))},[C]),se=O.useCallback(ne=>{if(ne.button!==0)return;if(r){ne.stopPropagation(),ne.preventDefault();return}y||S(!0),ne.currentTarget.focus({preventScroll:!0}),C.add(document,"mouseup",Q,!1),a==null||a(ne)},[r,y,a,C,Q]),ie=O.useCallback(ne=>{ne.button===0&&(y||S(!1),l==null||l(ne))},[l,y]),N=O.useCallback(ne=>{if(r){ne.preventDefault();return}m==null||m(ne)},[r,m]),X=O.useCallback(ne=>{_&&(ne.preventDefault(),S(!1)),g==null||g(ne)},[_,g]),ce=Bn(t,k);return y?{...b,ref:ce,type:"button","aria-disabled":R?void 0:r,disabled:R,onClick:T,onMouseDown:a,onMouseUp:l,onKeyUp:f,onKeyDown:d,onMouseOver:m,onMouseLeave:g}:{...b,ref:ce,role:"button","data-active":Yt(_),"aria-disabled":r?"true":void 0,tabIndex:R?void 0:E,onClick:T,onMouseDown:se,onMouseUp:ie,onKeyUp:B,onKeyDown:M,onMouseOver:N,onMouseLeave:X}}function tte(e){const t=e.current;if(!t)return!1;const r=jee(t);return!r||t.contains(r)?!1:!!Fee(r)}function iF(e,t){const{shouldFocus:r,visible:n,focusRef:i}=t,o=r&&!n;tc(()=>{if(!o||tte(e))return;const a=(i==null?void 0:i.current)||e.current;let l;if(a)return l=requestAnimationFrame(()=>{a.focus({preventScroll:!0})}),()=>{cancelAnimationFrame(l)}},[o,e,i])}var rte={preventScroll:!0,shouldFocus:!1};function nte(e,t=rte){const{focusRef:r,preventScroll:n,shouldFocus:i,visible:o}=t,a=ite(e)?e.current:e,l=i&&o,c=O.useRef(l),d=O.useRef(o);$l(()=>{!d.current&&o&&(c.current=l),d.current=o},[o,l]);const f=O.useCallback(()=>{if(!(!o||!a||!c.current)&&(c.current=!1,!a.contains(document.activeElement)))if(r!=null&&r.current)requestAnimationFrame(()=>{var p;(p=r.current)==null||p.focus({preventScroll:n})});else{const p=zee(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:n})})}},[o,n,a,r]);tc(()=>{f()},[f]),Gd(a,"transitionend",f)}function ite(e){return"current"in e}var ld=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),En={arrowShadowColor:ld("--popper-arrow-shadow-color"),arrowSize:ld("--popper-arrow-size","8px"),arrowSizeHalf:ld("--popper-arrow-size-half"),arrowBg:ld("--popper-arrow-bg"),transformOrigin:ld("--popper-transform-origin"),arrowOffset:ld("--popper-arrow-offset")};function ote(e){if(e.includes("top"))return"1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 0px 0 var(--popper-arrow-shadow-color)"}var ate={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},ste=e=>ate[e],Sj={scroll:!0,resize:!0};function lte(e){let t;return typeof e=="object"?t={enabled:!0,options:{...Sj,...e}}:t={enabled:e,options:Sj},t}var ute={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},cte={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{_j(e)},effect:({state:e})=>()=>{_j(e)}},_j=e=>{e.elements.popper.style.setProperty(En.transformOrigin.var,ste(e.placement))},dte={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{fte(e)}},fte=e=>{var t;if(!e.placement)return;const r=hte(e.placement);if((t=e.elements)!=null&&t.arrow&&r){Object.assign(e.elements.arrow.style,{[r.property]:r.value,width:En.arrowSize.varRef,height:En.arrowSize.varRef,zIndex:-1});const n={[En.arrowSizeHalf.var]:`calc(${En.arrowSize.varRef} / 2 - 1px)`,[En.arrowOffset.var]:`calc(${En.arrowSizeHalf.varRef} * -1)`};for(const i in n)e.elements.arrow.style.setProperty(i,n[i])}},hte=e=>{if(e.startsWith("top"))return{property:"bottom",value:En.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:En.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:En.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:En.arrowOffset.varRef}},pte={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{xj(e)},effect:({state:e})=>()=>{xj(e)}},xj=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const r=ote(e.placement);r&&t.style.setProperty("--popper-arrow-default-shadow",r),Object.assign(t.style,{transform:"rotate(45deg)",background:En.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},mte={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},vte={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function gte(e,t="ltr"){var r,n;const i=((r=mte[e])==null?void 0:r[t])||e;return t==="ltr"?i:(n=vte[e])!=null?n:i}var Li="top",Bo="bottom",Vo="right",Bi="left",VC="auto",km=[Li,Bo,Vo,Bi],of="start",Vp="end",yte="clippingParents",oF="viewport",Oh="popper",bte="reference",Pj=km.reduce(function(e,t){return e.concat([t+"-"+of,t+"-"+Vp])},[]),aF=[].concat(km,[VC]).reduce(function(e,t){return e.concat([t,t+"-"+of,t+"-"+Vp])},[]),wte="beforeRead",Ste="read",_te="afterRead",xte="beforeMain",Pte="main",Cte="afterMain",Ete="beforeWrite",Tte="write",Ote="afterWrite",Rte=[wte,Ste,_te,xte,Pte,Cte,Ete,Tte,Ote];function Ja(e){return e?(e.nodeName||"").toLowerCase():null}function ho(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function nc(e){var t=ho(e).Element;return e instanceof t||e instanceof Element}function Fo(e){var t=ho(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function zC(e){if(typeof ShadowRoot>"u")return!1;var t=ho(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Ite(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!Fo(o)||!Ja(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(a){var l=i[a];l===!1?o.removeAttribute(a):o.setAttribute(a,l===!0?"":l)}))})}function kte(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],o=t.attributes[n]||{},a=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),l=a.reduce(function(c,d){return c[d]="",c},{});!Fo(i)||!Ja(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const jte={name:"applyStyles",enabled:!0,phase:"write",fn:Ite,effect:kte,requires:["computeStyles"]};function Ka(e){return e.split("-")[0]}var Qu=Math.max,wb=Math.min,af=Math.round;function $x(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sF(){return!/^((?!chrome|android).)*safari/i.test($x())}function sf(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&Fo(e)&&(i=e.offsetWidth>0&&af(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&af(n.height)/e.offsetHeight||1);var a=nc(e)?ho(e):window,l=a.visualViewport,c=!sF()&&r,d=(n.left+(c&&l?l.offsetLeft:0))/i,f=(n.top+(c&&l?l.offsetTop:0))/o,p=n.width/i,m=n.height/o;return{width:p,height:m,top:f,right:d+p,bottom:f+m,left:d,x:d,y:f}}function qC(e){var t=sf(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function lF(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&zC(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ns(e){return ho(e).getComputedStyle(e)}function $te(e){return["table","td","th"].indexOf(Ja(e))>=0}function tu(e){return((nc(e)?e.ownerDocument:e.document)||window.document).documentElement}function E0(e){return Ja(e)==="html"?e:e.assignedSlot||e.parentNode||(zC(e)?e.host:null)||tu(e)}function Cj(e){return!Fo(e)||Ns(e).position==="fixed"?null:e.offsetParent}function Ate(e){var t=/firefox/i.test($x()),r=/Trident/i.test($x());if(r&&Fo(e)){var n=Ns(e);if(n.position==="fixed")return null}var i=E0(e);for(zC(i)&&(i=i.host);Fo(i)&&["html","body"].indexOf(Ja(i))<0;){var o=Ns(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function jm(e){for(var t=ho(e),r=Cj(e);r&&$te(r)&&Ns(r).position==="static";)r=Cj(r);return r&&(Ja(r)==="html"||Ja(r)==="body"&&Ns(r).position==="static")?t:r||Ate(e)||t}function UC(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function dp(e,t,r){return Qu(e,wb(t,r))}function Dte(e,t,r){var n=dp(e,t,r);return n>r?r:n}function uF(){return{top:0,right:0,bottom:0,left:0}}function cF(e){return Object.assign({},uF(),e)}function dF(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var Mte=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,cF(typeof t!="number"?t:dF(t,km))};function Nte(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,l=Ka(r.placement),c=UC(l),d=[Bi,Vo].indexOf(l)>=0,f=d?"height":"width";if(!(!o||!a)){var p=Mte(i.padding,r),m=qC(o),g=c==="y"?Li:Bi,b=c==="y"?Bo:Vo,y=r.rects.reference[f]+r.rects.reference[c]-a[c]-r.rects.popper[f],w=a[c]-r.rects.reference[c],_=jm(o),S=_?c==="y"?_.clientHeight||0:_.clientWidth||0:0,C=y/2-w/2,k=p[g],E=S-m[f]-p[b],R=S/2-m[f]/2+C,T=dp(k,R,E),A=c;r.modifiersData[n]=(t={},t[A]=T,t.centerOffset=T-R,t)}}function Fte(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||lF(t.elements.popper,i)&&(t.elements.arrow=i))}const Lte={name:"arrow",enabled:!0,phase:"main",fn:Nte,effect:Fte,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function lf(e){return e.split("-")[1]}var Bte={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vte(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:af(r*i)/i||0,y:af(n*i)/i||0}}function Ej(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,p=e.isFixed,m=a.x,g=m===void 0?0:m,b=a.y,y=b===void 0?0:b,w=typeof f=="function"?f({x:g,y}):{x:g,y};g=w.x,y=w.y;var _=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),C=Bi,k=Li,E=window;if(d){var R=jm(r),T="clientHeight",A="clientWidth";if(R===ho(r)&&(R=tu(r),Ns(R).position!=="static"&&l==="absolute"&&(T="scrollHeight",A="scrollWidth")),R=R,i===Li||(i===Bi||i===Vo)&&o===Vp){k=Bo;var M=p&&R===E&&E.visualViewport?E.visualViewport.height:R[T];y-=M-n.height,y*=c?1:-1}if(i===Bi||(i===Li||i===Bo)&&o===Vp){C=Vo;var B=p&&R===E&&E.visualViewport?E.visualViewport.width:R[A];g-=B-n.width,g*=c?1:-1}}var Q=Object.assign({position:l},d&&Bte),se=f===!0?Vte({x:g,y},ho(r)):{x:g,y};if(g=se.x,y=se.y,c){var ie;return Object.assign({},Q,(ie={},ie[k]=S?"0":"",ie[C]=_?"0":"",ie.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",ie))}return Object.assign({},Q,(t={},t[k]=S?y+"px":"",t[C]=_?g+"px":"",t.transform="",t))}function zte(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,a=o===void 0?!0:o,l=r.roundOffsets,c=l===void 0?!0:l,d={placement:Ka(t.placement),variation:lf(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ej(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ej(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const qte={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zte,data:{}};var bg={passive:!0};function Ute(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,a=n.resize,l=a===void 0?!0:a,c=ho(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",r.update,bg)}),l&&c.addEventListener("resize",r.update,bg),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",r.update,bg)}),l&&c.removeEventListener("resize",r.update,bg)}}const Hte={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ute,data:{}};var Wte={left:"right",right:"left",bottom:"top",top:"bottom"};function qy(e){return e.replace(/left|right|bottom|top/g,function(t){return Wte[t]})}var Kte={start:"end",end:"start"};function Tj(e){return e.replace(/start|end/g,function(t){return Kte[t]})}function HC(e){var t=ho(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function WC(e){return sf(tu(e)).left+HC(e).scrollLeft}function Gte(e,t){var r=ho(e),n=tu(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,l=0,c=0;if(i){o=i.width,a=i.height;var d=sF();(d||!d&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:l+WC(e),y:c}}function Qte(e){var t,r=tu(e),n=HC(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Qu(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Qu(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-n.scrollLeft+WC(e),c=-n.scrollTop;return Ns(i||r).direction==="rtl"&&(l+=Qu(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:l,y:c}}function KC(e){var t=Ns(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function fF(e){return["html","body","#document"].indexOf(Ja(e))>=0?e.ownerDocument.body:Fo(e)&&KC(e)?e:fF(E0(e))}function fp(e,t){var r;t===void 0&&(t=[]);var n=fF(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=ho(n),a=i?[o].concat(o.visualViewport||[],KC(n)?n:[]):n,l=t.concat(a);return i?l:l.concat(fp(E0(a)))}function Ax(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Yte(e,t){var r=sf(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function Oj(e,t,r){return t===oF?Ax(Gte(e,r)):nc(t)?Yte(t,r):Ax(Qte(tu(e)))}function Xte(e){var t=fp(E0(e)),r=["absolute","fixed"].indexOf(Ns(e).position)>=0,n=r&&Fo(e)?jm(e):e;return nc(n)?t.filter(function(i){return nc(i)&&lF(i,n)&&Ja(i)!=="body"}):[]}function Jte(e,t,r,n){var i=t==="clippingParents"?Xte(e):[].concat(t),o=[].concat(i,[r]),a=o[0],l=o.reduce(function(c,d){var f=Oj(e,d,n);return c.top=Qu(f.top,c.top),c.right=wb(f.right,c.right),c.bottom=wb(f.bottom,c.bottom),c.left=Qu(f.left,c.left),c},Oj(e,a,n));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function hF(e){var t=e.reference,r=e.element,n=e.placement,i=n?Ka(n):null,o=n?lf(n):null,a=t.x+t.width/2-r.width/2,l=t.y+t.height/2-r.height/2,c;switch(i){case Li:c={x:a,y:t.y-r.height};break;case Bo:c={x:a,y:t.y+t.height};break;case Vo:c={x:t.x+t.width,y:l};break;case Bi:c={x:t.x-r.width,y:l};break;default:c={x:t.x,y:t.y}}var d=i?UC(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case of:c[d]=c[d]-(t[f]/2-r[f]/2);break;case Vp:c[d]=c[d]+(t[f]/2-r[f]/2);break}}return c}function zp(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.strategy,a=o===void 0?e.strategy:o,l=r.boundary,c=l===void 0?yte:l,d=r.rootBoundary,f=d===void 0?oF:d,p=r.elementContext,m=p===void 0?Oh:p,g=r.altBoundary,b=g===void 0?!1:g,y=r.padding,w=y===void 0?0:y,_=cF(typeof w!="number"?w:dF(w,km)),S=m===Oh?bte:Oh,C=e.rects.popper,k=e.elements[b?S:m],E=Jte(nc(k)?k:k.contextElement||tu(e.elements.popper),c,f,a),R=sf(e.elements.reference),T=hF({reference:R,element:C,placement:i}),A=Ax(Object.assign({},C,T)),M=m===Oh?A:R,B={top:E.top-M.top+_.top,bottom:M.bottom-E.bottom+_.bottom,left:E.left-M.left+_.left,right:M.right-E.right+_.right},Q=e.modifiersData.offset;if(m===Oh&&Q){var se=Q[i];Object.keys(B).forEach(function(ie){var N=[Vo,Bo].indexOf(ie)>=0?1:-1,X=[Li,Bo].indexOf(ie)>=0?"y":"x";B[ie]+=se[X]*N})}return B}function Zte(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,l=r.flipVariations,c=r.allowedAutoPlacements,d=c===void 0?aF:c,f=lf(n),p=f?l?Pj:Pj.filter(function(b){return lf(b)===f}):km,m=p.filter(function(b){return d.indexOf(b)>=0});m.length===0&&(m=p);var g=m.reduce(function(b,y){return b[y]=zp(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[Ka(y)],b},{});return Object.keys(g).sort(function(b,y){return g[b]-g[y]})}function ere(e){if(Ka(e)===VC)return[];var t=qy(e);return[Tj(e),t,Tj(t)]}function tre(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,l=a===void 0?!0:a,c=r.fallbackPlacements,d=r.padding,f=r.boundary,p=r.rootBoundary,m=r.altBoundary,g=r.flipVariations,b=g===void 0?!0:g,y=r.allowedAutoPlacements,w=t.options.placement,_=Ka(w),S=_===w,C=c||(S||!b?[qy(w)]:ere(w)),k=[w].concat(C).reduce(function($,F){return $.concat(Ka(F)===VC?Zte(t,{placement:F,boundary:f,rootBoundary:p,padding:d,flipVariations:b,allowedAutoPlacements:y}):F)},[]),E=t.rects.reference,R=t.rects.popper,T=new Map,A=!0,M=k[0],B=0;B<k.length;B++){var Q=k[B],se=Ka(Q),ie=lf(Q)===of,N=[Li,Bo].indexOf(se)>=0,X=N?"width":"height",ce=zp(t,{placement:Q,boundary:f,rootBoundary:p,altBoundary:m,padding:d}),ne=N?ie?Vo:Bi:ie?Bo:Li;E[X]>R[X]&&(ne=qy(ne));var ee=qy(ne),ge=[];if(o&&ge.push(ce[se]<=0),l&&ge.push(ce[ne]<=0,ce[ee]<=0),ge.every(function($){return $})){M=Q,A=!1;break}T.set(Q,ge)}if(A)for(var Z=b?3:1,j=function(F){var V=k.find(function(de){var pe=T.get(de);if(pe)return pe.slice(0,F).every(function(Ee){return Ee})});if(V)return M=V,"break"},U=Z;U>0;U--){var q=j(U);if(q==="break")break}t.placement!==M&&(t.modifiersData[n]._skip=!0,t.placement=M,t.reset=!0)}}const rre={name:"flip",enabled:!0,phase:"main",fn:tre,requiresIfExists:["offset"],data:{_skip:!1}};function Rj(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Ij(e){return[Li,Vo,Bo,Bi].some(function(t){return e[t]>=0})}function nre(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=zp(t,{elementContext:"reference"}),l=zp(t,{altBoundary:!0}),c=Rj(a,n),d=Rj(l,i,o),f=Ij(c),p=Ij(d);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}const ire={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:nre};function ore(e,t,r){var n=Ka(e),i=[Bi,Li].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=o[0],l=o[1];return a=a||0,l=(l||0)*i,[Bi,Vo].indexOf(n)>=0?{x:l,y:a}:{x:a,y:l}}function are(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=aF.reduce(function(f,p){return f[p]=ore(p,t.rects,o),f},{}),l=a[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[n]=a}const sre={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:are};function lre(e){var t=e.state,r=e.name;t.modifiersData[r]=hF({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const ure={name:"popperOffsets",enabled:!0,phase:"read",fn:lre,data:{}};function cre(e){return e==="x"?"y":"x"}function dre(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,l=a===void 0?!1:a,c=r.boundary,d=r.rootBoundary,f=r.altBoundary,p=r.padding,m=r.tether,g=m===void 0?!0:m,b=r.tetherOffset,y=b===void 0?0:b,w=zp(t,{boundary:c,rootBoundary:d,padding:p,altBoundary:f}),_=Ka(t.placement),S=lf(t.placement),C=!S,k=UC(_),E=cre(k),R=t.modifiersData.popperOffsets,T=t.rects.reference,A=t.rects.popper,M=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,B=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),Q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,se={x:0,y:0};if(R){if(o){var ie,N=k==="y"?Li:Bi,X=k==="y"?Bo:Vo,ce=k==="y"?"height":"width",ne=R[k],ee=ne+w[N],ge=ne-w[X],Z=g?-A[ce]/2:0,j=S===of?T[ce]:A[ce],U=S===of?-A[ce]:-T[ce],q=t.elements.arrow,$=g&&q?qC(q):{width:0,height:0},F=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uF(),V=F[N],de=F[X],pe=dp(0,T[ce],$[ce]),Ee=C?T[ce]/2-Z-pe-V-B.mainAxis:j-pe-V-B.mainAxis,Me=C?-T[ce]/2+Z+pe+de+B.mainAxis:U+pe+de+B.mainAxis,Y=t.elements.arrow&&jm(t.elements.arrow),K=Y?k==="y"?Y.clientTop||0:Y.clientLeft||0:0,we=(ie=Q==null?void 0:Q[k])!=null?ie:0,Te=ne+Ee-we-K,he=ne+Me-we,Ce=dp(g?wb(ee,Te):ee,ne,g?Qu(ge,he):ge);R[k]=Ce,se[k]=Ce-ne}if(l){var Ge,$t=k==="x"?Li:Bi,Kt=k==="x"?Bo:Vo,It=R[E],jt=E==="y"?"height":"width",Lt=It+w[$t],ht=It-w[Kt],on=[Li,Bi].indexOf(_)!==-1,mn=(Ge=Q==null?void 0:Q[E])!=null?Ge:0,Ir=on?Lt:It-T[jt]-A[jt]-mn+B.altAxis,Jr=on?It+T[jt]+A[jt]-mn-B.altAxis:ht,vn=g&&on?Dte(Ir,It,Jr):dp(g?Ir:Lt,It,g?Jr:ht);R[E]=vn,se[E]=vn-It}t.modifiersData[n]=se}}const fre={name:"preventOverflow",enabled:!0,phase:"main",fn:dre,requiresIfExists:["offset"]};function hre(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function pre(e){return e===ho(e)||!Fo(e)?HC(e):hre(e)}function mre(e){var t=e.getBoundingClientRect(),r=af(t.width)/e.offsetWidth||1,n=af(t.height)/e.offsetHeight||1;return r!==1||n!==1}function vre(e,t,r){r===void 0&&(r=!1);var n=Fo(t),i=Fo(t)&&mre(t),o=tu(t),a=sf(e,i,r),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Ja(t)!=="body"||KC(o))&&(l=pre(t)),Fo(t)?(c=sf(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=WC(o))),{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function gre(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(l){if(!r.has(l)){var c=t.get(l);c&&i(c)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function yre(e){var t=gre(e);return Rte.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function bre(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function wre(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var kj={placement:"bottom",modifiers:[],strategy:"absolute"};function jj(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function Sre(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?kj:i;return function(l,c,d){d===void 0&&(d=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},kj,o),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},p=[],m=!1,g={state:f,setOptions:function(_){var S=typeof _=="function"?_(f.options):_;y(),f.options=Object.assign({},o,f.options,S),f.scrollParents={reference:nc(l)?fp(l):l.contextElement?fp(l.contextElement):[],popper:fp(c)};var C=yre(wre([].concat(n,f.options.modifiers)));return f.orderedModifiers=C.filter(function(k){return k.enabled}),b(),g.update()},forceUpdate:function(){if(!m){var _=f.elements,S=_.reference,C=_.popper;if(jj(S,C)){f.rects={reference:vre(S,jm(C),f.options.strategy==="fixed"),popper:qC(C)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(B){return f.modifiersData[B.name]=Object.assign({},B.data)});for(var k=0;k<f.orderedModifiers.length;k++){if(f.reset===!0){f.reset=!1,k=-1;continue}var E=f.orderedModifiers[k],R=E.fn,T=E.options,A=T===void 0?{}:T,M=E.name;typeof R=="function"&&(f=R({state:f,options:A,name:M,instance:g})||f)}}}},update:bre(function(){return new Promise(function(w){g.forceUpdate(),w(f)})}),destroy:function(){y(),m=!0}};if(!jj(l,c))return g;g.setOptions(d).then(function(w){!m&&d.onFirstUpdate&&d.onFirstUpdate(w)});function b(){f.orderedModifiers.forEach(function(w){var _=w.name,S=w.options,C=S===void 0?{}:S,k=w.effect;if(typeof k=="function"){var E=k({state:f,name:_,instance:g,options:C}),R=function(){};p.push(E||R)}})}function y(){p.forEach(function(w){return w()}),p=[]}return g}}var _re=[Hte,ure,qte,jte,sre,rre,fre,Lte,ire],xre=Sre({defaultModifiers:_re});function GC(e={}){const{enabled:t=!0,modifiers:r,placement:n="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:l,gutter:c=8,flip:d=!0,boundary:f="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:g="ltr"}=e,b=O.useRef(null),y=O.useRef(null),w=O.useRef(null),_=gte(n,g),S=O.useRef(()=>{}),C=O.useCallback(()=>{var B;!t||!b.current||!y.current||((B=S.current)==null||B.call(S),w.current=xre(b.current,y.current,{placement:_,modifiers:[pte,dte,cte,{...ute,enabled:!!m},{name:"eventListeners",...lte(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:l??[0,c]}},{name:"flip",enabled:!!d,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:f}},...r??[]],strategy:i}),w.current.forceUpdate(),S.current=w.current.destroy)},[_,t,r,m,a,o,l,c,d,p,f,i]);O.useEffect(()=>()=>{var B;!b.current&&!y.current&&((B=w.current)==null||B.destroy(),w.current=null)},[]);const k=O.useCallback(B=>{b.current=B,C()},[C]),E=O.useCallback((B={},Q=null)=>({...B,ref:Bn(k,Q)}),[k]),R=O.useCallback(B=>{y.current=B,C()},[C]),T=O.useCallback((B={},Q=null)=>({...B,ref:Bn(R,Q),style:{...B.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),A=O.useCallback((B={},Q=null)=>{const{size:se,shadowColor:ie,bg:N,style:X,...ce}=B;return{...ce,ref:Q,"data-popper-arrow":"",style:Pre(B)}},[]),M=O.useCallback((B={},Q=null)=>({...B,ref:Q,"data-popper-arrow-inner":""}),[]);return{update(){var B;(B=w.current)==null||B.update()},forceUpdate(){var B;(B=w.current)==null||B.forceUpdate()},transformOrigin:En.transformOrigin.varRef,referenceRef:k,popperRef:R,getPopperProps:T,getArrowProps:A,getArrowInnerProps:M,getReferenceProps:E}}function Pre(e){const{size:t,shadowColor:r,bg:n,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),r&&(o["--popper-arrow-shadow-color"]=r),n&&(o["--popper-arrow-bg"]=n),o}function QC(e={}){const{onClose:t,onOpen:r,isOpen:n,id:i}=e,o=ca(r),a=ca(t),[l,c]=O.useState(e.defaultIsOpen||!1),d=n!==void 0?n:l,f=n!==void 0,p=O.useId(),m=i??`disclosure-${p}`,g=O.useCallback(()=>{f||c(!1),a==null||a()},[f,a]),b=O.useCallback(()=>{f||c(!0),o==null||o()},[f,o]),y=O.useCallback(()=>{d?g():b()},[d,b,g]);function w(S={}){return{...S,"aria-expanded":d,"aria-controls":m,onClick(C){var k;(k=S.onClick)==null||k.call(S,C),y()}}}function _(S={}){return{...S,hidden:!d,id:m}}return{isOpen:d,onOpen:b,onClose:g,onToggle:y,isControlled:f,getButtonProps:w,getDisclosureProps:_}}function Cre(e){const{ref:t,handler:r,enabled:n=!0}=e,i=ca(r),a=O.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;O.useEffect(()=>{if(!n)return;const l=p=>{L1(p,t)&&(a.isPointerDown=!0)},c=p=>{if(a.ignoreEmulatedMouseEvents){a.ignoreEmulatedMouseEvents=!1;return}a.isPointerDown&&r&&L1(p,t)&&(a.isPointerDown=!1,i(p))},d=p=>{a.ignoreEmulatedMouseEvents=!0,r&&a.isPointerDown&&L1(p,t)&&(a.isPointerDown=!1,i(p))},f=pF(t.current);return f.addEventListener("mousedown",l,!0),f.addEventListener("mouseup",c,!0),f.addEventListener("touchstart",l,!0),f.addEventListener("touchend",d,!0),()=>{f.removeEventListener("mousedown",l,!0),f.removeEventListener("mouseup",c,!0),f.removeEventListener("touchstart",l,!0),f.removeEventListener("touchend",d,!0)}},[r,t,i,a,n])}function L1(e,t){var r;const n=e.target;return n&&!pF(n).contains(n)?!1:!((r=t.current)!=null&&r.contains(n))}function pF(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function mF(e){const{isOpen:t,ref:r}=e,[n,i]=O.useState(t),[o,a]=O.useState(!1);return O.useEffect(()=>{o||(i(t),a(!0))},[t,o,n]),Gd(()=>r.current,"animationend",()=>{i(t)}),{present:!(t?!1:!n),onComplete(){var c;const d=kee(r.current),f=new d.CustomEvent("animationend",{bubbles:!0});(c=r.current)==null||c.dispatchEvent(f)}}}function vF(e){const{wasSelected:t,enabled:r,isSelected:n,mode:i="unmount"}=e;return!!(!r||n||i==="keepMounted"&&t)}var[Ere,Tre,Ore,Rre]=JZ(),[Ire,$m]=Wi({strict:!1,name:"MenuContext"});function kre(e,...t){const r=O.useId(),n=e||r;return O.useMemo(()=>t.map(i=>`${i}-${n}`),[n,t])}function gF(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function $j(e){return gF(e).activeElement===e}function jre(e={}){const{id:t,closeOnSelect:r=!0,closeOnBlur:n=!0,initialFocusRef:i,autoSelect:o=!0,isLazy:a,isOpen:l,defaultIsOpen:c,onClose:d,onOpen:f,placement:p="bottom-start",lazyBehavior:m="unmount",direction:g,computePositionOnMount:b=!1,...y}=e,w=O.useRef(null),_=O.useRef(null),S=Ore(),C=O.useCallback(()=>{requestAnimationFrame(()=>{var q;(q=w.current)==null||q.focus({preventScroll:!1})})},[]),k=O.useCallback(()=>{const q=setTimeout(()=>{var $;if(i)($=i.current)==null||$.focus();else{const F=S.firstEnabled();F&&ie(F.index)}});ee.current.add(q)},[S,i]),E=O.useCallback(()=>{const q=setTimeout(()=>{const $=S.lastEnabled();$&&ie($.index)});ee.current.add(q)},[S]),R=O.useCallback(()=>{f==null||f(),o?k():C()},[o,k,C,f]),{isOpen:T,onOpen:A,onClose:M,onToggle:B}=QC({isOpen:l,defaultIsOpen:c,onClose:d,onOpen:R});Cre({enabled:T&&n,ref:w,handler:q=>{var $;($=_.current)!=null&&$.contains(q.target)||M()}});const Q=GC({...y,enabled:T||b,placement:p,direction:g}),[se,ie]=O.useState(-1);tc(()=>{T||ie(-1)},[T]),iF(w,{focusRef:_,visible:T,shouldFocus:!0});const N=mF({isOpen:T,ref:w}),[X,ce]=kre(t,"menu-button","menu-list"),ne=O.useCallback(()=>{A(),C()},[A,C]),ee=O.useRef(new Set([]));O.useEffect(()=>{const q=ee.current;return()=>{q.forEach($=>clearTimeout($)),q.clear()}},[]);const ge=O.useCallback(()=>{A(),k()},[k,A]),Z=O.useCallback(()=>{A(),E()},[A,E]),j=O.useCallback(()=>{var q,$;const F=gF(w.current),V=(q=w.current)==null?void 0:q.contains(F.activeElement);if(!(T&&!V))return;const pe=($=S.item(se))==null?void 0:$.node;pe==null||pe.focus({preventScroll:!0})},[T,se,S]),U=O.useRef(null);return{openAndFocusMenu:ne,openAndFocusFirstItem:ge,openAndFocusLastItem:Z,onTransitionEnd:j,unstable__animationState:N,descendants:S,popper:Q,buttonId:X,menuId:ce,forceUpdate:Q.forceUpdate,orientation:"vertical",isOpen:T,onToggle:B,onOpen:A,onClose:M,menuRef:w,buttonRef:_,focusedIndex:se,closeOnSelect:r,closeOnBlur:n,autoSelect:o,setFocusedIndex:ie,isLazy:a,lazyBehavior:m,initialFocusRef:i,rafId:U}}function $re(e={},t=null){const r=$m(),{onToggle:n,popper:i,openAndFocusFirstItem:o,openAndFocusLastItem:a}=r,l=O.useCallback(c=>{const d=c.key,p={Enter:o,ArrowDown:o,ArrowUp:a}[d];p&&(c.preventDefault(),c.stopPropagation(),p(c))},[o,a]);return{...e,ref:Bn(r.buttonRef,t,i.referenceRef),id:r.buttonId,"data-active":Yt(r.isOpen),"aria-expanded":r.isOpen,"aria-haspopup":"menu","aria-controls":r.menuId,onClick:mr(e.onClick,n),onKeyDown:mr(e.onKeyDown,l)}}function Dx(e){var t;return Lre(e)&&!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))}function Are(e={},t=null){const r=$m();if(!r)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within <Menu>");const{focusedIndex:n,setFocusedIndex:i,menuRef:o,isOpen:a,onClose:l,menuId:c,isLazy:d,lazyBehavior:f,unstable__animationState:p}=r,m=Tre(),g=Xee({preventDefault:_=>_.key!==" "&&Dx(_.target)}),b=O.useCallback(_=>{if(!_.currentTarget.contains(_.target))return;const S=_.key,k={Tab:R=>R.preventDefault(),Escape:l,ArrowDown:()=>{const R=m.nextEnabled(n);R&&i(R.index)},ArrowUp:()=>{const R=m.prevEnabled(n);R&&i(R.index)}}[S];if(k){_.preventDefault(),k(_);return}const E=g(R=>{const T=Jee(m.values(),R,A=>{var M,B;return(B=(M=A==null?void 0:A.node)==null?void 0:M.textContent)!=null?B:""},m.item(n));if(T){const A=m.indexOf(T.node);i(A)}});Dx(_.target)&&E(_)},[m,n,g,l,i]),y=O.useRef(!1);a&&(y.current=!0);const w=vF({wasSelected:y.current,enabled:d,mode:f,isSelected:p.present});return{...e,ref:Bn(o,t),children:w?e.children:null,tabIndex:-1,role:"menu",id:c,style:{...e.style,transformOrigin:"var(--popper-transform-origin)"},"aria-orientation":"vertical",onKeyDown:mr(e.onKeyDown,b)}}function Dre(e={}){const{popper:t,isOpen:r}=$m();return t.getPopperProps({...e,style:{visibility:r?"visible":"hidden",...e.style}})}function Mre(e={},t=null){const{onMouseEnter:r,onMouseMove:n,onMouseLeave:i,onClick:o,onFocus:a,isDisabled:l,isFocusable:c,closeOnSelect:d,type:f,...p}=e,m=$m(),{setFocusedIndex:g,focusedIndex:b,closeOnSelect:y,onClose:w,menuRef:_,isOpen:S,menuId:C,rafId:k}=m,E=O.useRef(null),R=`${C}-menuitem-${O.useId()}`,{index:T,register:A}=Rre({disabled:l&&!c}),M=O.useCallback(ne=>{r==null||r(ne),!l&&g(T)},[g,T,l,r]),B=O.useCallback(ne=>{n==null||n(ne),E.current&&!$j(E.current)&&M(ne)},[M,n]),Q=O.useCallback(ne=>{i==null||i(ne),!l&&g(-1)},[g,l,i]),se=O.useCallback(ne=>{o==null||o(ne),Dx(ne.currentTarget)&&(d??y)&&w()},[w,o,y,d]),ie=O.useCallback(ne=>{a==null||a(ne),g(T)},[g,a,T]),N=T===b,X=l&&!c;tc(()=>{if(S)return N&&!X&&E.current?(k.current&&cancelAnimationFrame(k.current),k.current=requestAnimationFrame(()=>{var ne;(ne=E.current)==null||ne.focus({preventScroll:!0}),k.current=null})):_.current&&!$j(_.current)&&_.current.focus({preventScroll:!0}),()=>{k.current&&cancelAnimationFrame(k.current)}},[N,X,_,S]);const ce=ete({onClick:se,onFocus:ie,onMouseEnter:M,onMouseMove:B,onMouseLeave:Q,ref:Bn(A,E,t),isDisabled:l,isFocusable:c});return{...p,...ce,type:f??ce.type,id:R,role:"menuitem",tabIndex:N?0:-1}}function Nre(e={},t=null){const{type:r="radio",isChecked:n,...i}=e;return{...Mre(i,t),role:`menuitem${r}`,"aria-checked":n}}function Fre(e={}){const{children:t,type:r="radio",value:n,defaultValue:i,onChange:o,...a}=e,c=r==="radio"?"":[],[d,f]=ZZ({defaultValue:i??c,value:n,onChange:o}),p=O.useCallback(b=>{if(r==="radio"&&typeof d=="string"&&f(b),r==="checkbox"&&Array.isArray(d)){const y=d.includes(b)?d.filter(w=>w!==b):d.concat(b);f(y)}},[d,f,r]),g=P0(t).map(b=>{if(b.type.id!=="MenuItemOption")return b;const y=_=>{var S,C;p(b.props.value),(C=(S=b.props).onClick)==null||C.call(S,_)},w=r==="radio"?b.props.value===d:d.includes(b.props.value);return O.cloneElement(b,{type:r,onClick:y,isChecked:w})});return{...a,children:g}}function Lre(e){var t;if(!Bre(e))return!1;const r=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof r.HTMLElement}function Bre(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}var[Vre,Am]=Wi({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Menu />" `}),yF=e=>{const{children:t}=e,r=vc("Menu",e),n=hi(e),{direction:i}=c0(),{descendants:o,...a}=jre({...n,direction:i}),l=O.useMemo(()=>a,[a]),{isOpen:c,onClose:d,forceUpdate:f}=l;return x.jsx(Ere,{value:o,children:x.jsx(Ire,{value:l,children:x.jsx(Vre,{value:r,children:Do(t,{isOpen:c,onClose:d,forceUpdate:f})})})})};yF.displayName="Menu";var zre=Ht((e,t)=>{const{type:r,...n}=e,i=Am(),o=n.as||r?r??void 0:"button",a=O.useMemo(()=>({textDecoration:"none",color:"inherit",userSelect:"none",display:"flex",width:"100%",alignItems:"center",textAlign:"start",flex:"0 0 auto",outline:0,...i.item}),[i.item]);return x.jsx(at.button,{ref:t,type:o,...n,__css:a})}),bF=e=>{const{className:t,children:r,...n}=e,i=Am(),o=O.Children.only(r),a=O.isValidElement(o)?O.cloneElement(o,{focusable:"false","aria-hidden":!0,className:or("chakra-menu__icon",o.props.className)}):null,l=or("chakra-menu__icon-wrapper",t);return x.jsx(at.span,{className:l,...n,__css:i.icon,children:a})};bF.displayName="MenuIcon";var qre={enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.1,easings:"easeOut"}}},Ure=at(x0.div),wF=Ht(function(t,r){var n,i;const{rootProps:o,motionProps:a,...l}=t,{isOpen:c,onTransitionEnd:d,unstable__animationState:f}=$m(),p=Are(l,r),m=Dre(o),g=Am();return x.jsx(at.div,{...m,__css:{zIndex:(i=t.zIndex)!=null?i:(n=g.list)==null?void 0:n.zIndex},children:x.jsx(Ure,{variants:qre,initial:!1,animate:c?"enter":"exit",__css:{outline:0,...g.list},...a,className:or("chakra-menu__menu-list",p.className),...p,onUpdate:d,onAnimationComplete:kM(f.onComplete,p.onAnimationComplete)})})});wF.displayName="MenuList";var SF=Ht((e,t)=>{const{title:r,children:n,className:i,...o}=e,a=or("chakra-menu__group__title",i),l=Am();return x.jsxs("div",{ref:t,className:"chakra-menu__group",role:"group",children:[r&&x.jsx(at.p,{className:a,...o,__css:l.groupTitle,children:r}),n]})});SF.displayName="MenuGroup";var _F=e=>{const{className:t,title:r,...n}=e,i=Fre(n);return x.jsx(SF,{title:r,className:or("chakra-menu__option-group",t),...i})};_F.displayName="MenuOptionGroup";var Hre=Ht((e,t)=>{const r=Am();return x.jsx(at.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...r.button}})}),YC=Ht((e,t)=>{const{children:r,as:n,...i}=e,o=$re(i,t),a=n||Hre;return x.jsx(a,{...o,className:or("chakra-menu__menu-button",e.className),children:x.jsx(at.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:e.children})})});YC.displayName="MenuButton";var Wre=e=>x.jsx("svg",{viewBox:"0 0 14 14",width:"1em",height:"1em",...e,children:x.jsx("polygon",{fill:"currentColor",points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})}),XC=Ht((e,t)=>{const{icon:r,iconSpacing:n="0.75rem",...i}=e,o=Nre(i,t);return x.jsxs(zre,{...o,className:or("chakra-menu__menuitem-option",i.className),children:[r!==null&&x.jsx(bF,{fontSize:"0.8em",marginEnd:n,opacity:e.isChecked?1:0,children:r||x.jsx(Wre,{})}),x.jsx("span",{style:{flex:1},children:o.children})]})});XC.id="MenuItemOption";XC.displayName="MenuItemOption";var[Kre,Dm]=Wi({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),[Gre,T0]=Wi({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Popover />" `});function JC(e){const t=O.Children.only(e.children),{getTriggerProps:r}=Dm();return O.cloneElement(t,r(t.props,t.ref))}JC.displayName="PopoverTrigger";var ud={click:"click",hover:"hover"};function Qre(e={}){const{closeOnBlur:t=!0,closeOnEsc:r=!0,initialFocusRef:n,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:l,arrowShadowColor:c,trigger:d=ud.click,openDelay:f=200,closeDelay:p=200,isLazy:m,lazyBehavior:g="unmount",computePositionOnMount:b,...y}=e,{isOpen:w,onClose:_,onOpen:S,onToggle:C}=QC(e),k=O.useRef(null),E=O.useRef(null),R=O.useRef(null),T=O.useRef(!1),A=O.useRef(!1);w&&(A.current=!0);const[M,B]=O.useState(!1),[Q,se]=O.useState(!1),ie=O.useId(),N=i??ie,[X,ce,ne,ee]=["popover-trigger","popover-content","popover-header","popover-body"].map(he=>`${he}-${N}`),{referenceRef:ge,getArrowProps:Z,getPopperProps:j,getArrowInnerProps:U,forceUpdate:q}=GC({...y,enabled:w||!!b}),$=mF({isOpen:w,ref:R});Oee({enabled:w,ref:E}),iF(R,{focusRef:E,visible:w,shouldFocus:o&&d===ud.click}),nte(R,{focusRef:n,visible:w,shouldFocus:a&&d===ud.click});const F=vF({wasSelected:A.current,enabled:m,mode:g,isSelected:$.present}),V=O.useCallback((he={},Ce=null)=>{const Ge={...he,style:{...he.style,transformOrigin:En.transformOrigin.varRef,[En.arrowSize.var]:l?`${l}px`:void 0,[En.arrowShadowColor.var]:c},ref:Bn(R,Ce),children:F?he.children:null,id:ce,tabIndex:-1,role:"dialog",onKeyDown:mr(he.onKeyDown,$t=>{r&&$t.key==="Escape"&&_()}),onBlur:mr(he.onBlur,$t=>{const Kt=Aj($t),It=B1(R.current,Kt),jt=B1(E.current,Kt);w&&t&&(!It&&!jt)&&_()}),"aria-labelledby":M?ne:void 0,"aria-describedby":Q?ee:void 0};return d===ud.hover&&(Ge.role="tooltip",Ge.onMouseEnter=mr(he.onMouseEnter,()=>{T.current=!0}),Ge.onMouseLeave=mr(he.onMouseLeave,$t=>{$t.nativeEvent.relatedTarget!==null&&(T.current=!1,setTimeout(()=>_(),p))})),Ge},[F,ce,M,ne,Q,ee,d,r,_,w,t,p,c,l]),de=O.useCallback((he={},Ce=null)=>j({...he,style:{visibility:w?"visible":"hidden",...he.style}},Ce),[w,j]),pe=O.useCallback((he,Ce=null)=>({...he,ref:Bn(Ce,k,ge)}),[k,ge]),Ee=O.useRef(),Me=O.useRef(),Y=O.useCallback(he=>{k.current==null&&ge(he)},[ge]),K=O.useCallback((he={},Ce=null)=>{const Ge={...he,ref:Bn(E,Ce,Y),id:X,"aria-haspopup":"dialog","aria-expanded":w,"aria-controls":ce};return d===ud.click&&(Ge.onClick=mr(he.onClick,C)),d===ud.hover&&(Ge.onFocus=mr(he.onFocus,()=>{Ee.current===void 0&&S()}),Ge.onBlur=mr(he.onBlur,$t=>{const Kt=Aj($t),It=!B1(R.current,Kt);w&&t&&It&&_()}),Ge.onKeyDown=mr(he.onKeyDown,$t=>{$t.key==="Escape"&&_()}),Ge.onMouseEnter=mr(he.onMouseEnter,()=>{T.current=!0,Ee.current=window.setTimeout(()=>S(),f)}),Ge.onMouseLeave=mr(he.onMouseLeave,()=>{T.current=!1,Ee.current&&(clearTimeout(Ee.current),Ee.current=void 0),Me.current=window.setTimeout(()=>{T.current===!1&&_()},p)})),Ge},[X,w,ce,d,Y,C,S,t,_,f,p]);O.useEffect(()=>()=>{Ee.current&&clearTimeout(Ee.current),Me.current&&clearTimeout(Me.current)},[]);const we=O.useCallback((he={},Ce=null)=>({...he,id:ne,ref:Bn(Ce,Ge=>{B(!!Ge)})}),[ne]),Te=O.useCallback((he={},Ce=null)=>({...he,id:ee,ref:Bn(Ce,Ge=>{se(!!Ge)})}),[ee]);return{forceUpdate:q,isOpen:w,onAnimationComplete:$.onComplete,onClose:_,getAnchorProps:pe,getArrowProps:Z,getArrowInnerProps:U,getPopoverPositionerProps:de,getPopoverProps:V,getTriggerProps:K,getHeaderProps:we,getBodyProps:Te}}function B1(e,t){return e===t||(e==null?void 0:e.contains(t))}function Aj(e){var t;const r=e.currentTarget.ownerDocument.activeElement;return(t=e.relatedTarget)!=null?t:r}function ZC(e){const t=vc("Popover",e),{children:r,...n}=hi(e),i=c0(),o=Qre({...n,direction:i.direction});return x.jsx(Kre,{value:o,children:x.jsx(Gre,{value:t,children:Do(r,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}ZC.displayName="Popover";var V1=(e,t)=>t?`${e}.${t}, ${t}`:void 0;function xF(e){var t;const{bg:r,bgColor:n,backgroundColor:i,shadow:o,boxShadow:a,shadowColor:l}=e,{getArrowProps:c,getArrowInnerProps:d}=Dm(),f=T0(),p=(t=r??n)!=null?t:i,m=o??a;return x.jsx(at.div,{...c(),className:"chakra-popover__arrow-positioner",children:x.jsx(at.div,{className:or("chakra-popover__arrow",e.className),...d(e),__css:{"--popper-arrow-shadow-color":V1("colors",l),"--popper-arrow-bg":V1("colors",p),"--popper-arrow-shadow":V1("shadows",m),...f.arrow}})})}xF.displayName="PopoverArrow";var eE=Ht(function(t,r){const{getBodyProps:n}=Dm(),i=T0();return x.jsx(at.div,{...n(t,r),className:or("chakra-popover__body",t.className),__css:i.body})});eE.displayName="PopoverBody";function Yre(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var Xre={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},Jre=at(x0.section),PF=Ht(function(t,r){const{variants:n=Xre,...i}=t,{isOpen:o}=Dm();return x.jsx(Jre,{ref:r,variants:Yre(n),initial:!1,animate:o?"enter":"exit",...i})});PF.displayName="PopoverTransition";var tE=Ht(function(t,r){const{rootProps:n,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:l,onAnimationComplete:c}=Dm(),d=T0(),f={position:"relative",display:"flex",flexDirection:"column",...d.content};return x.jsx(at.div,{...l(n),__css:d.popper,className:"chakra-popover__popper",children:x.jsx(PF,{...i,...a(o,r),onAnimationComplete:kM(c,o.onAnimationComplete),className:or("chakra-popover__content",t.className),__css:f})})});tE.displayName="PopoverContent";function CF(e){const t=T0();return x.jsx(at.footer,{...e,className:or("chakra-popover__footer",e.className),__css:t.footer})}CF.displayName="PopoverFooter";var EF=Ht(function(t,r){const n=vc("Switch",t),{spacing:i="0.5rem",children:o,...a}=hi(t),{getIndicatorProps:l,getInputProps:c,getCheckboxProps:d,getRootProps:f,getLabelProps:p}=wee(a),m=O.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...n.container}),[n.container]),g=O.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...n.track}),[n.track]),b=O.useMemo(()=>({userSelect:"none",marginStart:i,...n.label}),[i,n.label]);return x.jsxs(at.label,{...f(),className:or("chakra-switch",t.className),__css:m,children:[x.jsx("input",{className:"chakra-switch__input",...c({},r)}),x.jsx(at.span,{...d(),className:"chakra-switch__track",__css:g,children:x.jsx(at.span,{__css:n.thumb,className:"chakra-switch__thumb",...l()})}),o&&x.jsx(at.span,{className:"chakra-switch__label",...p(),__css:b,children:o})]})});EF.displayName="Switch";function Zre(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}var ene=["h","minH","height","minHeight"],TF=Ht((e,t)=>{const r=rs("Textarea",e),{className:n,rows:i,...o}=hi(e),a=q4(o),l=i?Zre(r,ene):r;return x.jsx(at.textarea,{ref:t,rows:i,...a,className:or("chakra-textarea",n),__css:l})});TF.displayName="Textarea";var tne={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},Mx=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},Uy=e=>{var t,r;return((r=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:r.defaultView)||window};function rne(e={}){const{openDelay:t=0,closeDelay:r=0,closeOnClick:n=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:l=!0,onOpen:c,onClose:d,placement:f,id:p,isOpen:m,defaultIsOpen:g,arrowSize:b=10,arrowShadowColor:y,arrowPadding:w,modifiers:_,isDisabled:S,gutter:C,offset:k,direction:E,...R}=e,{isOpen:T,onOpen:A,onClose:M}=QC({isOpen:m,defaultIsOpen:g,onOpen:c,onClose:d}),{referenceRef:B,getPopperProps:Q,getArrowInnerProps:se,getArrowProps:ie}=GC({enabled:T,placement:f,arrowPadding:w,modifiers:_,gutter:C,offset:k,direction:E}),N=O.useId(),ce=`tooltip-${p??N}`,ne=O.useRef(null),ee=O.useRef(),ge=O.useCallback(()=>{ee.current&&(clearTimeout(ee.current),ee.current=void 0)},[]),Z=O.useRef(),j=O.useCallback(()=>{Z.current&&(clearTimeout(Z.current),Z.current=void 0)},[]),U=O.useCallback(()=>{j(),M()},[M,j]),q=nne(ne,U),$=O.useCallback(()=>{if(!S&&!ee.current){T&&q();const K=Uy(ne);ee.current=K.setTimeout(A,t)}},[q,S,T,A,t]),F=O.useCallback(()=>{ge();const K=Uy(ne);Z.current=K.setTimeout(U,r)},[r,U,ge]),V=O.useCallback(()=>{T&&n&&F()},[n,F,T]),de=O.useCallback(()=>{T&&a&&F()},[a,F,T]),pe=O.useCallback(K=>{T&&K.key==="Escape"&&F()},[T,F]);Gd(()=>Mx(ne),"keydown",l?pe:void 0),Gd(()=>{if(!o)return null;const K=ne.current;if(!K)return null;const we=Q4(K);return we.localName==="body"?Uy(ne):we},"scroll",()=>{T&&o&&U()},{passive:!0,capture:!0}),O.useEffect(()=>{S&&(ge(),T&&M())},[S,T,M,ge]),O.useEffect(()=>()=>{ge(),j()},[ge,j]),Gd(()=>ne.current,"pointerleave",F);const Ee=O.useCallback((K={},we=null)=>({...K,ref:Bn(ne,we,B),onPointerEnter:mr(K.onPointerEnter,he=>{he.pointerType!=="touch"&&$()}),onClick:mr(K.onClick,V),onPointerDown:mr(K.onPointerDown,de),onFocus:mr(K.onFocus,$),onBlur:mr(K.onBlur,F),"aria-describedby":T?ce:void 0}),[$,F,de,T,ce,V,B]),Me=O.useCallback((K={},we=null)=>Q({...K,style:{...K.style,[En.arrowSize.var]:b?`${b}px`:void 0,[En.arrowShadowColor.var]:y}},we),[Q,b,y]),Y=O.useCallback((K={},we=null)=>{const Te={...K.style,position:"relative",transformOrigin:En.transformOrigin.varRef};return{ref:we,...R,...K,id:ce,role:"tooltip",style:Te}},[R,ce]);return{isOpen:T,show:$,hide:F,getTriggerProps:Ee,getTooltipProps:Y,getTooltipPositionerProps:Me,getArrowProps:ie,getArrowInnerProps:se}}var z1="chakra-ui:close-tooltip";function nne(e,t){return O.useEffect(()=>{const r=Mx(e);return r.addEventListener(z1,t),()=>r.removeEventListener(z1,t)},[t,e]),()=>{const r=Mx(e),n=Uy(e);r.dispatchEvent(new n.CustomEvent(z1))}}function ine(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}function one(e,t){const r={};for(const n of t)n in e&&(r[n]=e[n]);return r}var ane=at(x0.div),OF=Ht((e,t)=>{var r,n;const i=rs("Tooltip",e),o=hi(e),a=c0(),{children:l,label:c,shouldWrapChildren:d,"aria-label":f,hasArrow:p,bg:m,portalProps:g,background:b,backgroundColor:y,bgColor:w,motionProps:_,...S}=o,C=(n=(r=b??y)!=null?r:m)!=null?n:w;if(C){i.bg=C;const Q=lU(a,"colors",C);i[En.arrowBg.var]=Q}const k=rne({...S,direction:a.direction}),E=typeof l=="string"||d;let R;if(E)R=x.jsx(at.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps(),children:l});else{const Q=O.Children.only(l);R=O.cloneElement(Q,k.getTriggerProps(Q.props,Q.ref))}const T=!!f,A=k.getTooltipProps({},t),M=T?ine(A,["role","id"]):A,B=one(A,["role","id"]);return c?x.jsxs(x.Fragment,{children:[R,x.jsx(R4,{children:k.isOpen&&x.jsx(xf,{...g,children:x.jsx(at.div,{...k.getTooltipPositionerProps(),__css:{zIndex:i.zIndex,pointerEvents:"none"},children:x.jsxs(ane,{variants:tne,initial:"exit",animate:"enter",exit:"exit",..._,...M,__css:i,children:[c,T&&x.jsx(at.span,{srOnly:!0,...B,children:f}),p&&x.jsx(at.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:x.jsx(at.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:i.bg}})})]})})})})]}):x.jsx(x.Fragment,{children:l})});OF.displayName="Tooltip";function Ft(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(r.length?" "+r.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var sne={};function rE(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:sne}var RF=Object.assign,Sb=Object.getOwnPropertyDescriptor,Ga=Object.defineProperty,Mm=Object.prototype,Nx=[];Object.freeze(Nx);var nE={};Object.freeze(nE);var lne=typeof Proxy<"u",une=Object.toString();function IF(){lne||Ft("Proxy not available")}function kF(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Dd=function(){};function po(e){return typeof e=="function"}function ic(e){var t=typeof e;switch(t){case"string":case"symbol":case"number":return!0}return!1}function O0(e){return e!==null&&typeof e=="object"}function Fs(e){if(!O0(e))return!1;var t=Object.getPrototypeOf(e);if(t==null)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r.toString()===une}function jF(e){var t=e==null?void 0:e.constructor;return t?t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction":!1}function Nm(e,t,r){Ga(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function $F(e,t,r){Ga(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function ru(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(n){return O0(n)&&n[r]===!0}}function Ef(e){return e instanceof Map}function Fm(e){return e instanceof Set}var AF=typeof Object.getOwnPropertySymbols<"u";function cne(e){var t=Object.keys(e);if(!AF)return t;var r=Object.getOwnPropertySymbols(e);return r.length?[].concat(t,r.filter(function(n){return Mm.propertyIsEnumerable.call(e,n)})):t}var uf=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:AF?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function DF(e){return e===null?null:typeof e=="object"?""+e:e}function Os(e,t){return Mm.hasOwnProperty.call(e,t)}var dne=Object.getOwnPropertyDescriptors||function(t){var r={};return uf(t).forEach(function(n){r[n]=Sb(t,n)}),r};function fne(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mne(n.key),n)}}function iE(e,t,r){return t&&fne(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ul(){return Ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ul.apply(this,arguments)}function MF(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Fx(e,t)}function Fx(e,t){return Fx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Fx(e,t)}function q1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hne(e,t){if(e){if(typeof e=="string")return Dj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Dj(e,t)}}function Dj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Md(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=hne(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
349
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pne(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function mne(e){var t=pne(e,"string");return typeof t=="symbol"?t:String(t)}var za=Symbol("mobx-stored-annotations");function Qa(e){function t(r,n){if(Lm(n))return e.decorate_20223_(r,n);Tf(r,n,e)}return Object.assign(t,e)}function Tf(e,t,r){Os(e,za)||Nm(e,za,Ul({},e[za])),_ne(r)||(e[za][t]=r)}function vne(e){return Os(e,za)||Nm(e,za,Ul({},e[za])),e[za]}function Lm(e){return typeof e=="object"&&typeof e.kind=="string"}var ut=Symbol("mobx administration"),Bm=function(){function e(r){r===void 0&&(r="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=ur.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=r}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.reportObserved=function(){return rL(this)},t.reportChanged=function(){Mi(),nL(this),Ni()},t.toString=function(){return this.name_},e}(),oE=ru("Atom",Bm);function _b(e,t,r){t===void 0&&(t=Dd),r===void 0&&(r=Dd);var n=new Bm(e);return t!==Dd&&Pie(n,t),r!==Dd&&dL(n,r),n}function gne(e,t){return kL(e,t)}function yne(e,t){return Object.is?Object.is(e,t):e===t?e!==0||1/e===1/t:e!==e&&t!==t}var cf={structural:gne,default:yne};function oc(e,t,r){return cE(e)?e:Array.isArray(e)?er.array(e,{name:r}):Fs(e)?er.object(e,void 0,{name:r}):Ef(e)?er.map(e,{name:r}):Fm(e)?er.set(e,{name:r}):typeof e=="function"&&!$0(e)&&!Wp(e)?jF(e)?ff(e):Up(r,e):e}function bne(e,t,r){if(e==null||Gi(e)||Uo(e)||Ki(e)||zo(e))return e;if(Array.isArray(e))return er.array(e,{name:r,deep:!1});if(Fs(e))return er.object(e,void 0,{name:r,deep:!1});if(Ef(e))return er.map(e,{name:r,deep:!1});if(Fm(e))return er.set(e,{name:r,deep:!1})}function R0(e){return e}function wne(e,t){return kL(e,t)?t:e}var Sne="override";function _ne(e){return e.annotationType_===Sne}function Vm(e,t){return{annotationType_:e,options_:t,make_:xne,extend_:Pne,decorate_20223_:Cne}}function xne(e,t,r,n){var i;if((i=this.options_)!=null&&i.bound)return this.extend_(e,t,r,!1)===null?0:1;if(n===e.target_)return this.extend_(e,t,r,!1)===null?0:2;if($0(r.value))return 1;var o=NF(e,this,t,r,!1);return Ga(n,t,o),2}function Pne(e,t,r,n){var i=NF(e,this,t,r);return e.defineProperty_(t,i,n)}function Cne(e,t){var r=t.kind,n=t.name,i=t.addInitializer,o=this,a=function(d){var f,p,m,g;return Hl((f=(p=o.options_)==null?void 0:p.name)!=null?f:n.toString(),d,(m=(g=o.options_)==null?void 0:g.autoAction)!=null?m:!1)};if(r=="field"){i(function(){Tf(this,n,o)});return}if(r=="method"){var l;return $0(e)||(e=a(e)),(l=this.options_)!=null&&l.bound&&i(function(){var c=this,d=c[n].bind(c);d.isMobxAction=!0,c[n]=d}),e}Ft("Cannot apply '"+o.annotationType_+"' to '"+String(n)+"' (kind: "+r+"):"+(`
|
350
|
-
'`+o.annotationType_+"' can only be used on properties with a function value."))}function Ene(e,t,r,n){t.annotationType_,n.value}function NF(e,t,r,n,i){var o,a,l,c,d,f,p;i===void 0&&(i=qe.safeDescriptors),Ene(e,t,r,n);var m=n.value;if((o=t.options_)!=null&&o.bound){var g;m=m.bind((g=e.proxy_)!=null?g:e.target_)}return{value:Hl((a=(l=t.options_)==null?void 0:l.name)!=null?a:r.toString(),m,(c=(d=t.options_)==null?void 0:d.autoAction)!=null?c:!1,(f=t.options_)!=null&&f.bound?(p=e.proxy_)!=null?p:e.target_:void 0),configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:!i}}function FF(e,t){return{annotationType_:e,options_:t,make_:Tne,extend_:One,decorate_20223_:Rne}}function Tne(e,t,r,n){var i;if(n===e.target_)return this.extend_(e,t,r,!1)===null?0:2;if((i=this.options_)!=null&&i.bound&&(!Os(e.target_,t)||!Wp(e.target_[t]))&&this.extend_(e,t,r,!1)===null)return 0;if(Wp(r.value))return 1;var o=LF(e,this,t,r,!1,!1);return Ga(n,t,o),2}function One(e,t,r,n){var i,o=LF(e,this,t,r,(i=this.options_)==null?void 0:i.bound);return e.defineProperty_(t,o,n)}function Rne(e,t){var r,n=t.name,i=t.addInitializer;return Wp(e)||(e=ff(e)),(r=this.options_)!=null&&r.bound&&i(function(){var o=this,a=o[n].bind(o);a.isMobXFlow=!0,o[n]=a}),e}function Ine(e,t,r,n){t.annotationType_,n.value}function LF(e,t,r,n,i,o){o===void 0&&(o=qe.safeDescriptors),Ine(e,t,r,n);var a=n.value;if(Wp(a)||(a=ff(a)),i){var l;a=a.bind((l=e.proxy_)!=null?l:e.target_),a.isMobXFlow=!0}return{value:a,configurable:o?e.isPlainObject_:!0,enumerable:!1,writable:!o}}function aE(e,t){return{annotationType_:e,options_:t,make_:kne,extend_:jne,decorate_20223_:$ne}}function kne(e,t,r){return this.extend_(e,t,r,!1)===null?0:1}function jne(e,t,r,n){return Ane(e,this,t,r),e.defineComputedProperty_(t,Ul({},this.options_,{get:r.get,set:r.set}),n)}function $ne(e,t){var r=this,n=t.name,i=t.addInitializer;return i(function(){var o=Sc(this)[ut],a=Ul({},r.options_,{get:e,context:this});a.name||(a.name="ObservableObject."+n.toString()),o.values_.set(n,new df(a))}),function(){return this[ut].getObservablePropValue_(n)}}function Ane(e,t,r,n){t.annotationType_,n.get}function I0(e,t){return{annotationType_:e,options_:t,make_:Dne,extend_:Mne,decorate_20223_:Nne}}function Dne(e,t,r){return this.extend_(e,t,r,!1)===null?0:1}function Mne(e,t,r,n){var i,o;return Fne(e,this),e.defineObservableProperty_(t,r.value,(i=(o=this.options_)==null?void 0:o.enhancer)!=null?i:oc,n)}function Nne(e,t){var r=this,n=t.kind,i=t.name,o=new WeakSet;function a(l,c){var d,f,p=Sc(l)[ut],m=new Dl(c,(d=(f=r.options_)==null?void 0:f.enhancer)!=null?d:oc,"ObservableObject."+i.toString(),!1);p.values_.set(i,m),o.add(l)}if(n=="accessor")return{get:function(){return o.has(this)||a(this,e.get.call(this)),this[ut].getObservablePropValue_(i)},set:function(c){return o.has(this)||a(this,c),this[ut].setObservablePropValue_(i,c)},init:function(c){return o.has(this)||a(this,c),c}}}function Fne(e,t,r,n){t.annotationType_}var Lne="true",Bne=BF();function BF(e){return{annotationType_:Lne,options_:e,make_:Vne,extend_:zne,decorate_20223_:qne}}function Vne(e,t,r,n){var i,o;if(r.get)return dn.make_(e,t,r,n);if(r.set){var a=Hl(t.toString(),r.set);return n===e.target_?e.defineProperty_(t,{configurable:qe.safeDescriptors?e.isPlainObject_:!0,set:a})===null?0:2:(Ga(n,t,{configurable:!0,set:a}),2)}if(n!==e.target_&&typeof r.value=="function"){var l;if(jF(r.value)){var c,d=(c=this.options_)!=null&&c.autoBind?ff.bound:ff;return d.make_(e,t,r,n)}var f=(l=this.options_)!=null&&l.autoBind?Up.bound:Up;return f.make_(e,t,r,n)}var p=((i=this.options_)==null?void 0:i.deep)===!1?er.ref:er;if(typeof r.value=="function"&&(o=this.options_)!=null&&o.autoBind){var m;r.value=r.value.bind((m=e.proxy_)!=null?m:e.target_)}return p.make_(e,t,r,n)}function zne(e,t,r,n){var i,o;if(r.get)return dn.extend_(e,t,r,n);if(r.set)return e.defineProperty_(t,{configurable:qe.safeDescriptors?e.isPlainObject_:!0,set:Hl(t.toString(),r.set)},n);if(typeof r.value=="function"&&(i=this.options_)!=null&&i.autoBind){var a;r.value=r.value.bind((a=e.proxy_)!=null?a:e.target_)}var l=((o=this.options_)==null?void 0:o.deep)===!1?er.ref:er;return l.extend_(e,t,r,n)}function qne(e,t){Ft("'"+this.annotationType_+"' cannot be used as a decorator")}var Une="observable",Hne="observable.ref",Wne="observable.shallow",Kne="observable.struct",VF={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(VF);function wg(e){return e||VF}var Lx=I0(Une),Gne=I0(Hne,{enhancer:R0}),Qne=I0(Wne,{enhancer:bne}),Yne=I0(Kne,{enhancer:wne}),zF=Qa(Lx);function Sg(e){return e.deep===!0?oc:e.deep===!1?R0:Jne(e.defaultDecorator)}function Xne(e){var t;return e?(t=e.defaultDecorator)!=null?t:BF(e):void 0}function Jne(e){var t,r;return e&&(t=(r=e.options_)==null?void 0:r.enhancer)!=null?t:oc}function qF(e,t,r){if(Lm(t))return Lx.decorate_20223_(e,t);if(ic(t)){Tf(e,t,Lx);return}return cE(e)?e:Fs(e)?er.object(e,t,r):Array.isArray(e)?er.array(e,t):Ef(e)?er.map(e,t):Fm(e)?er.set(e,t):typeof e=="object"&&e!==null?e:er.box(e,t)}RF(qF,zF);var Zne={box:function(t,r){var n=wg(r);return new Dl(t,Sg(n),n.name,!0,n.equals)},array:function(t,r){var n=wg(r);return(qe.useProxies===!1||n.proxy===!1?toe:Hie)(t,Sg(n),n.name)},map:function(t,r){var n=wg(r);return new M0(t,Sg(n),n.name)},set:function(t,r){var n=wg(r);return new EL(t,Sg(n),n.name)},object:function(t,r,n){return nu(function(){return lE(qe.useProxies===!1||(n==null?void 0:n.proxy)===!1?Sc({},n):zie({},n),t,r)})},ref:Qa(Gne),shallow:Qa(Qne),deep:zF,struct:Qa(Yne)},er=RF(qF,Zne),UF="computed",eie="computed.struct",Bx=aE(UF),tie=aE(eie,{equals:cf.structural}),dn=function(t,r){if(Lm(r))return Bx.decorate_20223_(t,r);if(ic(r))return Tf(t,r,Bx);if(Fs(t))return Qa(aE(UF,t));var n=Fs(r)?r:{};return n.get=t,n.name||(n.name=t.name||""),new df(n)};Object.assign(dn,Bx);dn.struct=Qa(tie);var Mj,Nj,xb=0,rie=1,nie=(Mj=(Nj=Sb(function(){},"name"))==null?void 0:Nj.configurable)!=null?Mj:!1,Fj={value:"action",configurable:!0,writable:!1,enumerable:!1};function Hl(e,t,r,n){r===void 0&&(r=!1);function i(){return HF(e,r,t,n||this,arguments)}return i.isMobxAction=!0,i.toString=function(){return t.toString()},nie&&(Fj.value=e,Ga(i,"name",Fj)),i}function HF(e,t,r,n,i){var o=iie(e,t);try{return r.apply(n,i)}catch(a){throw o.error_=a,a}finally{oie(o)}}function iie(e,t,r,n){var i=!1,o=0,a=qe.trackingDerivation,l=!t||!a;Mi();var c=qe.allowStateChanges;l&&(wc(),c=k0(!0));var d=sE(!0),f={runAsAction_:l,prevDerivation_:a,prevAllowStateChanges_:c,prevAllowStateReads_:d,notifySpy_:i,startTime_:o,actionId_:rie++,parentActionId_:xb};return xb=f.actionId_,f}function oie(e){xb!==e.actionId_&&Ft(30),xb=e.parentActionId_,e.error_!==void 0&&(qe.suppressReactionErrors=!0),j0(e.prevAllowStateChanges_),hp(e.prevAllowStateReads_),Ni(),e.runAsAction_&&Rs(e.prevDerivation_),qe.suppressReactionErrors=!1}function WF(e,t){var r=k0(e);try{return t()}finally{j0(r)}}function k0(e){var t=qe.allowStateChanges;return qe.allowStateChanges=e,t}function j0(e){qe.allowStateChanges=e}var KF;KF=Symbol.toPrimitive;var Dl=function(e){MF(t,e);function t(n,i,o,a,l){var c;return o===void 0&&(o="ObservableValue"),l===void 0&&(l=cf.default),c=e.call(this,o)||this,c.enhancer=void 0,c.name_=void 0,c.equals=void 0,c.hasUnreportedChange_=!1,c.interceptors_=void 0,c.changeListeners_=void 0,c.value_=void 0,c.dehancer=void 0,c.enhancer=i,c.name_=o,c.equals=l,c.value_=i(n,void 0,o),c}var r=t.prototype;return r.dehanceValue=function(i){return this.dehancer!==void 0?this.dehancer(i):i},r.set=function(i){this.value_,i=this.prepareNewValue_(i),i!==qe.UNCHANGED&&this.setNewValue_(i)},r.prepareNewValue_=function(i){if($o(this)){var o=Ao(this,{object:this,type:Xa,newValue:i});if(!o)return qe.UNCHANGED;i=o.newValue}return i=this.enhancer(i,this.value_,this.name_),this.equals(this.value_,i)?qe.UNCHANGED:i},r.setNewValue_=function(i){var o=this.value_;this.value_=i,this.reportChanged(),fa(this)&&ha(this,{type:Xa,object:this,newValue:i,oldValue:o})},r.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},r.intercept_=function(i){return zm(this,i)},r.observe_=function(i,o){return o&&i({observableKind:"value",debugObjectName:this.name_,object:this,type:Xa,newValue:this.value_,oldValue:void 0}),qm(this,i)},r.raw=function(){return this.value_},r.toJSON=function(){return this.get()},r.toString=function(){return this.name_+"["+this.value_+"]"},r.valueOf=function(){return DF(this.get())},r[KF]=function(){return this.valueOf()},t}(Bm),GF=ru("ObservableValue",Dl),QF;QF=Symbol.toPrimitive;var df=function(){function e(r){this.dependenciesState_=ur.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=ur.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Cb(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Pb.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,r.get||Ft(31),this.derivation=r.get,this.name_=r.name||"ComputedValue",r.set&&(this.setter_=Hl("ComputedValue-setter",r.set)),this.equals_=r.equals||(r.compareStructural||r.struct?cf.structural:cf.default),this.scope_=r.context,this.requiresReaction_=r.requiresReaction,this.keepAlive_=!!r.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){die(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.get=function(){if(this.isComputing_&&Ft(32,this.name_,this.derivation),qe.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)Vx(this)&&(this.warnAboutUntrackedRead_(),Mi(),this.value_=this.computeValue_(!1),Ni());else if(rL(this),Vx(this)){var n=qe.trackingContext;this.keepAlive_&&!n&&(qe.trackingContext=this),this.trackAndCompute()&&cie(this),qe.trackingContext=n}var i=this.value_;if(Hy(i))throw i.cause;return i},t.set=function(n){if(this.setter_){this.isRunningSetter_&&Ft(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,n)}finally{this.isRunningSetter_=!1}}else Ft(34,this.name_)},t.trackAndCompute=function(){var n=this.value_,i=this.dependenciesState_===ur.NOT_TRACKING_,o=this.computeValue_(!0),a=i||Hy(n)||Hy(o)||!this.equals_(n,o);return a&&(this.value_=o),a},t.computeValue_=function(n){this.isComputing_=!0;var i=k0(!1),o;if(n)o=YF(this,this.derivation,this.scope_);else if(qe.disableErrorBoundaries===!0)o=this.derivation.call(this.scope_);else try{o=this.derivation.call(this.scope_)}catch(a){o=new Cb(a)}return j0(i),this.isComputing_=!1,o},t.suspend_=function(){this.keepAlive_||(zx(this),this.value_=void 0)},t.observe_=function(n,i){var o=this,a=!0,l=void 0;return uL(function(){var c=o.get();if(!a||i){var d=wc();n({observableKind:"computed",debugObjectName:o.name_,type:Xa,object:o,newValue:c,oldValue:l}),Rs(d)}a=!1,l=c})},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return DF(this.get())},t[QF]=function(){return this.valueOf()},e}(),ac=ru("ComputedValue",df),ur;(function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"})(ur||(ur={}));var Pb;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(Pb||(Pb={}));var Cb=function(t){this.cause=void 0,this.cause=t};function Hy(e){return e instanceof Cb}function Vx(e){switch(e.dependenciesState_){case ur.UP_TO_DATE_:return!1;case ur.NOT_TRACKING_:case ur.STALE_:return!0;case ur.POSSIBLY_STALE_:{for(var t=sE(!0),r=wc(),n=e.observing_,i=n.length,o=0;o<i;o++){var a=n[o];if(ac(a)){if(qe.disableErrorBoundaries)a.get();else try{a.get()}catch{return Rs(r),hp(t),!0}if(e.dependenciesState_===ur.STALE_)return Rs(r),hp(t),!0}}return JF(e),Rs(r),hp(t),!1}}}function YF(e,t,r){var n=sE(!0);JF(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++qe.runId;var i=qe.trackingDerivation;qe.trackingDerivation=e,qe.inBatch++;var o;if(qe.disableErrorBoundaries===!0)o=t.call(r);else try{o=t.call(r)}catch(a){o=new Cb(a)}return qe.inBatch--,qe.trackingDerivation=i,aie(e),hp(n),o}function aie(e){for(var t=e.observing_,r=e.observing_=e.newObserving_,n=ur.UP_TO_DATE_,i=0,o=e.unboundDepsCount_,a=0;a<o;a++){var l=r[a];l.diffValue_===0&&(l.diffValue_=1,i!==a&&(r[i]=l),i++),l.dependenciesState_>n&&(n=l.dependenciesState_)}for(r.length=i,e.newObserving_=null,o=t.length;o--;){var c=t[o];c.diffValue_===0&&eL(c,e),c.diffValue_=0}for(;i--;){var d=r[i];d.diffValue_===1&&(d.diffValue_=0,uie(d,e))}n!==ur.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function zx(e){var t=e.observing_;e.observing_=[];for(var r=t.length;r--;)eL(t[r],e);e.dependenciesState_=ur.NOT_TRACKING_}function XF(e){var t=wc();try{return e()}finally{Rs(t)}}function wc(){var e=qe.trackingDerivation;return qe.trackingDerivation=null,e}function Rs(e){qe.trackingDerivation=e}function sE(e){var t=qe.allowStateReads;return qe.allowStateReads=e,t}function hp(e){qe.allowStateReads=e}function JF(e){if(e.dependenciesState_!==ur.UP_TO_DATE_){e.dependenciesState_=ur.UP_TO_DATE_;for(var t=e.observing_,r=t.length;r--;)t[r].lowestObserverState_=ur.UP_TO_DATE_}}var Wy=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},Ky=!0,ZF=!1,qe=function(){var e=rE();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Ky=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new Wy().version&&(Ky=!1),Ky?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Wy):(setTimeout(function(){ZF||Ft(35)},1),new Wy)}();function sie(){if((qe.pendingReactions.length||qe.inBatch||qe.isRunningReactions)&&Ft(36),ZF=!0,Ky){var e=rE();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),qe=new Wy}}function lie(){return qe}function uie(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function eL(e,t){e.observers_.delete(t),e.observers_.size===0&&tL(e)}function tL(e){e.isPendingUnobservation_===!1&&(e.isPendingUnobservation_=!0,qe.pendingUnobservations.push(e))}function Mi(){qe.inBatch++}function Ni(){if(--qe.inBatch===0){iL();for(var e=qe.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation_=!1,r.observers_.size===0&&(r.isBeingObserved_&&(r.isBeingObserved_=!1,r.onBUO()),r instanceof df&&r.suspend_())}qe.pendingUnobservations=[]}}function rL(e){var t=qe.trackingDerivation;return t!==null?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&qe.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),e.isBeingObserved_):(e.observers_.size===0&&qe.inBatch>0&&tL(e),!1)}function nL(e){e.lowestObserverState_!==ur.STALE_&&(e.lowestObserverState_=ur.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===ur.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=ur.STALE_}))}function cie(e){e.lowestObserverState_!==ur.STALE_&&(e.lowestObserverState_=ur.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===ur.POSSIBLY_STALE_?t.dependenciesState_=ur.STALE_:t.dependenciesState_===ur.UP_TO_DATE_&&(e.lowestObserverState_=ur.UP_TO_DATE_)}))}function die(e){e.lowestObserverState_===ur.UP_TO_DATE_&&(e.lowestObserverState_=ur.POSSIBLY_STALE_,e.observers_.forEach(function(t){t.dependenciesState_===ur.UP_TO_DATE_&&(t.dependenciesState_=ur.POSSIBLY_STALE_,t.onBecomeStale_())}))}var qp=function(){function e(r,n,i,o){r===void 0&&(r="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=ur.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=Pb.NONE,this.name_=r,this.onInvalidate_=n,this.errorHandler_=i,this.requiresObservable_=o}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,qe.pendingReactions.push(this),iL())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){Mi(),this.isScheduled_=!1;var n=qe.trackingContext;if(qe.trackingContext=this,Vx(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(i){this.reportExceptionInDerivation_(i)}}qe.trackingContext=n,Ni()}},t.track=function(n){if(!this.isDisposed_){Mi(),this.isRunning_=!0;var i=qe.trackingContext;qe.trackingContext=this;var o=YF(this,n,void 0);qe.trackingContext=i,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&zx(this),Hy(o)&&this.reportExceptionInDerivation_(o.cause),Ni()}},t.reportExceptionInDerivation_=function(n){var i=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(qe.disableErrorBoundaries)throw n;var o="[mobx] uncaught error in '"+this+"'";qe.suppressReactionErrors||console.error(o,n),qe.globalReactionErrorHandlers.forEach(function(a){return a(n,i)})},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(Mi(),zx(this),Ni()))},t.getDisposer_=function(n){var i=this,o=function a(){i.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",a)};return n==null||n.addEventListener==null||n.addEventListener("abort",o),o[ut]=this,o},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(n){},e}(),fie=100,qx=function(t){return t()};function iL(){qe.inBatch>0||qe.isRunningReactions||qx(hie)}function hie(){qe.isRunningReactions=!0;for(var e=qe.pendingReactions,t=0;e.length>0;){++t===fie&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,i=r.length;n<i;n++)r[n].runReaction_()}qe.isRunningReactions=!1}var Eb=ru("Reaction",qp);function pie(e){var t=qx;qx=function(n){return e(function(){return t(n)})}}function pp(){return!1}function mie(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var oL="action",vie="action.bound",aL="autoAction",gie="autoAction.bound",sL="<unnamed action>",Ux=Vm(oL),yie=Vm(vie,{bound:!0}),Hx=Vm(aL,{autoAction:!0}),bie=Vm(gie,{autoAction:!0,bound:!0});function lL(e){var t=function(n,i){if(po(n))return Hl(n.name||sL,n,e);if(po(i))return Hl(n,i,e);if(Lm(i))return(e?Hx:Ux).decorate_20223_(n,i);if(ic(i))return Tf(n,i,e?Hx:Ux);if(ic(n))return Qa(Vm(e?aL:oL,{name:n,autoAction:e}))};return t}var Sr=lL(!1);Object.assign(Sr,Ux);var Up=lL(!0);Object.assign(Up,Hx);Sr.bound=Qa(yie);Up.bound=Qa(bie);function Hp(e){return HF(e.name||sL,!1,e,this,void 0)}function $0(e){return po(e)&&e.isMobxAction===!0}function uL(e,t){var r,n,i,o,a;t===void 0&&(t=nE);var l=(r=(n=t)==null?void 0:n.name)!=null?r:"Autorun",c=!t.scheduler&&!t.delay,d;if(c)d=new qp(l,function(){this.track(m)},t.onError,t.requiresObservable);else{var f=cL(t),p=!1;d=new qp(l,function(){p||(p=!0,f(function(){p=!1,d.isDisposed_||d.track(m)}))},t.onError,t.requiresObservable)}function m(){e(d)}return(i=t)!=null&&(o=i.signal)!=null&&o.aborted||d.schedule_(),d.getDisposer_((a=t)==null?void 0:a.signal)}var wie=function(t){return t()};function cL(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:wie}function Ya(e,t,r){var n,i,o,a;r===void 0&&(r=nE);var l=(n=r.name)!=null?n:"Reaction",c=Sr(l,r.onError?Sie(r.onError,t):t),d=!r.scheduler&&!r.delay,f=cL(r),p=!0,m=!1,g,b=r.compareStructural?cf.structural:r.equals||cf.default,y=new qp(l,function(){p||d?w():m||(m=!0,f(w))},r.onError,r.requiresObservable);function w(){if(m=!1,!y.isDisposed_){var _=!1,S=g;y.track(function(){var C=WF(!1,function(){return e(y)});_=p||!b(g,C),g=C}),(p&&r.fireImmediately||!p&&_)&&c(g,S,y),p=!1}}return(i=r)!=null&&(o=i.signal)!=null&&o.aborted||y.schedule_(),y.getDisposer_((a=r)==null?void 0:a.signal)}function Sie(e,t){return function(){try{return t.apply(this,arguments)}catch(r){e.call(this,r)}}}var _ie="onBO",xie="onBUO";function Pie(e,t,r){return fL(_ie,e,t,r)}function dL(e,t,r){return fL(xie,e,t,r)}function fL(e,t,r,n){var i=sc(t),o=po(n)?n:r,a=e+"L";return i[a]?i[a].add(o):i[a]=new Set([o]),function(){var l=i[a];l&&(l.delete(o),l.size===0&&delete i[a])}}var Cie="never",_g="always",Eie="observed";function Tie(e){e.isolateGlobalState===!0&&sie();var t=e.useProxies,r=e.enforceActions;if(t!==void 0&&(qe.useProxies=t===_g?!0:t===Cie?!1:typeof Proxy<"u"),t==="ifavailable"&&(qe.verifyProxies=!0),r!==void 0){var n=r===_g?_g:r===Eie;qe.enforceActions=n,qe.allowStateChanges=!(n===!0||n===_g)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(i){i in e&&(qe[i]=!!e[i])}),qe.allowStateReads=!qe.observableRequiresReaction,e.reactionScheduler&&pie(e.reactionScheduler)}function lE(e,t,r,n){var i=dne(t);return nu(function(){var o=Sc(e,n)[ut];uf(i).forEach(function(a){o.extend_(a,i[a],r&&a in r?r[a]:!0)})}),e}function Oie(e,t){return hL(sc(e,t))}function hL(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=Rie(e.observing_).map(hL)),t}function Rie(e){return Array.from(new Set(e))}var Iie=0;function pL(){this.message="FLOW_CANCELLED"}pL.prototype=Object.create(Error.prototype);var U1=FF("flow"),kie=FF("flow.bound",{bound:!0}),ff=Object.assign(function(t,r){if(Lm(r))return U1.decorate_20223_(t,r);if(ic(r))return Tf(t,r,U1);var n=t,i=n.name||"<unnamed flow>",o=function(){var l=this,c=arguments,d=++Iie,f=Sr(i+" - runid: "+d+" - init",n).apply(l,c),p,m=void 0,g=new Promise(function(b,y){var w=0;p=y;function _(k){m=void 0;var E;try{E=Sr(i+" - runid: "+d+" - yield "+w++,f.next).call(f,k)}catch(R){return y(R)}C(E)}function S(k){m=void 0;var E;try{E=Sr(i+" - runid: "+d+" - yield "+w++,f.throw).call(f,k)}catch(R){return y(R)}C(E)}function C(k){if(po(k==null?void 0:k.then)){k.then(C,y);return}return k.done?b(k.value):(m=Promise.resolve(k.value),m.then(_,S))}_(void 0)});return g.cancel=Sr(i+" - runid: "+d+" - cancel",function(){try{m&&Lj(m);var b=f.return(void 0),y=Promise.resolve(b.value);y.then(Dd,Dd),Lj(y),p(new pL)}catch(w){p(w)}}),g};return o.isMobXFlow=!0,o},U1);ff.bound=Qa(kie);function Lj(e){po(e.cancel)&&e.cancel()}function Wp(e){return(e==null?void 0:e.isMobXFlow)===!0}function mL(e,t,r){var n;return Ki(e)||Uo(e)||GF(e)?n=ma(e):Gi(e)&&(n=ma(e,t)),n.dehancer=typeof t=="function"?t:r,function(){n.dehancer=void 0}}function uE(e,t,r){return po(r)?$ie(e,t,r):jie(e,t)}function jie(e,t){return ma(e).intercept_(t)}function $ie(e,t,r){return ma(e,t).intercept_(r)}function vL(e,t){if(t===void 0)return ac(e);if(Gi(e)===!1||!e[ut].values_.has(t))return!1;var r=sc(e,t);return ac(r)}function Aie(e){return vL(e)}function H1(e,t){return vL(e,t)}function Die(e,t){return e?Gi(e)||!!e[ut]||oE(e)||Eb(e)||ac(e):!1}function cE(e){return Die(e)}function Kp(e){if(Gi(e))return e[ut].keys_();if(Ki(e)||zo(e))return Array.from(e.keys());if(Uo(e))return e.map(function(t,r){return r});Ft(5)}function gL(e){if(Gi(e))return Kp(e).map(function(t){return e[t]});if(Ki(e))return Kp(e).map(function(t){return e.get(t)});if(zo(e))return Array.from(e.values());if(Uo(e))return e.slice();Ft(6)}function Mie(e){if(Gi(e))return Kp(e).map(function(t){return[t,e[t]]});if(Ki(e))return Kp(e).map(function(t){return[t,e.get(t)]});if(zo(e))return Array.from(e.entries());if(Uo(e))return e.map(function(t,r){return[r,t]});Ft(7)}function yL(e,t,r){if(arguments.length===2&&!zo(e)){Mi();var n=t;try{for(var i in n)yL(e,i,n[i])}finally{Ni()}return}Gi(e)?e[ut].set_(t,r):Ki(e)?e.set(t,r):zo(e)?e.add(t):Uo(e)?(typeof t!="number"&&(t=parseInt(t,10)),t<0&&Ft("Invalid index: '"+t+"'"),Mi(),t>=e.length&&(e.length=t+1),e[t]=r,Ni()):Ft(8)}function bL(e,t,r){if(Gi(e))return e[ut].defineProperty_(t,r);Ft(39)}function Nie(e){if(Gi(e))return e[ut].ownKeys_();Ft(38)}function A0(e,t,r,n){return po(r)?Lie(e,t,r,n):Fie(e,t,r)}function Fie(e,t,r){return ma(e).observe_(t,r)}function Lie(e,t,r,n){return ma(e,t).observe_(r,n)}function xg(e,t,r){return e.set(t,r),r}function _d(e,t){if(e==null||typeof e!="object"||e instanceof Date||!cE(e))return e;if(GF(e)||ac(e))return _d(e.get(),t);if(t.has(e))return t.get(e);if(Uo(e)){var r=xg(t,e,new Array(e.length));return e.forEach(function(a,l){r[l]=_d(a,t)}),r}if(zo(e)){var n=xg(t,e,new Set);return e.forEach(function(a){n.add(_d(a,t))}),n}if(Ki(e)){var i=xg(t,e,new Map);return e.forEach(function(a,l){i.set(l,_d(a,t))}),i}else{var o=xg(t,e,{});return Nie(e).forEach(function(a){Mm.propertyIsEnumerable.call(e,a)&&(o[a]=_d(e[a],t))}),o}}function Wx(e,t){return _d(e,new Map)}function la(e,t){t===void 0&&(t=void 0),Mi();try{return e.apply(t)}finally{Ni()}}function Bj(e,t,r){return arguments.length===1||t&&typeof t=="object"?Bie(e,t):wL(e,t,{})}function wL(e,t,r){var n;if(typeof r.timeout=="number"){var i=new Error("WHEN_TIMEOUT");n=setTimeout(function(){if(!a[ut].isDisposed_)if(a(),r.onError)r.onError(i);else throw i},r.timeout)}r.name="When";var o=Hl("When-effect",t),a=uL(function(l){var c=WF(!1,e);c&&(l.dispose(),n&&clearTimeout(n),o())},r);return a}function Bie(e,t){var r;if(t!=null&&(r=t.signal)!=null&&r.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var n,i,o=new Promise(function(a,l){var c,d=wL(e,a,Ul({},t,{onError:l}));n=function(){d(),l(new Error("WHEN_CANCELLED"))},i=function(){d(),l(new Error("WHEN_ABORTED"))},t==null||(c=t.signal)==null||c.addEventListener==null||c.addEventListener("abort",i)}).finally(function(){var a;return t==null||(a=t.signal)==null||a.removeEventListener==null?void 0:a.removeEventListener("abort",i)});return o.cancel=n,o}function cd(e){return e[ut]}var Vie={has:function(t,r){return cd(t).has_(r)},get:function(t,r){return cd(t).get_(r)},set:function(t,r,n){var i;return ic(r)?(i=cd(t).set_(r,n,!0))!=null?i:!0:!1},deleteProperty:function(t,r){var n;return ic(r)?(n=cd(t).delete_(r,!0))!=null?n:!0:!1},defineProperty:function(t,r,n){var i;return(i=cd(t).defineProperty_(r,n))!=null?i:!0},ownKeys:function(t){return cd(t).ownKeys_()},preventExtensions:function(t){Ft(13)}};function zie(e,t){var r,n;return IF(),e=Sc(e,t),(n=(r=e[ut]).proxy_)!=null?n:r.proxy_=new Proxy(e,Vie)}function $o(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function zm(e,t){var r=e.interceptors_||(e.interceptors_=[]);return r.push(t),kF(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function Ao(e,t){var r=wc();try{for(var n=[].concat(e.interceptors_||[]),i=0,o=n.length;i<o&&(t=n[i](t),t&&!t.type&&Ft(14),!!t);i++);return t}finally{Rs(r)}}function fa(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function qm(e,t){var r=e.changeListeners_||(e.changeListeners_=[]);return r.push(t),kF(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function ha(e,t){var r=wc(),n=e.changeListeners_;if(n){n=n.slice();for(var i=0,o=n.length;i<o;i++)n[i](t);Rs(r)}}function D0(e,t,r){return nu(function(){var n,i=Sc(e,r)[ut];(n=t)!=null||(t=vne(e)),uf(t).forEach(function(o){return i.make_(o,t[o])})}),e}var W1=Symbol("mobx-keys");function st(e,t,r){return Fs(e)?lE(e,e,t,r):(nu(function(){var n=Sc(e,r)[ut];if(!e[W1]){var i=Object.getPrototypeOf(e),o=new Set([].concat(uf(e),uf(i)));o.delete("constructor"),o.delete(ut),Nm(i,W1,o)}e[W1].forEach(function(a){return n.make_(a,t&&a in t?t[a]:!0)})}),e)}var Vj="splice",Xa="update",qie=1e4,Uie={get:function(t,r){var n=t[ut];return r===ut?n:r==="length"?n.getArrayLength_():typeof r=="string"&&!isNaN(r)?n.get_(parseInt(r)):Os(Tb,r)?Tb[r]:t[r]},set:function(t,r,n){var i=t[ut];return r==="length"&&i.setArrayLength_(n),typeof r=="symbol"||isNaN(r)?t[r]=n:i.set_(parseInt(r),n),!0},preventExtensions:function(){Ft(15)}},dE=function(){function e(r,n,i,o){r===void 0&&(r="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=i,this.legacyMode_=o,this.atom_=new Bm(r),this.enhancer_=function(a,l){return n(a,l,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.dehanceValues_=function(n){return this.dehancer!==void 0&&n.length>0?n.map(this.dehancer):n},t.intercept_=function(n){return zm(this,n)},t.observe_=function(n,i){return i===void 0&&(i=!1),i&&n({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),qm(this,n)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&Ft("Out of range: "+n);var i=this.values_.length;if(n!==i)if(n>i){for(var o=new Array(n-i),a=0;a<n-i;a++)o[a]=void 0;this.spliceWithArray_(i,0,o)}else this.spliceWithArray_(n,i-n)},t.updateArrayLength_=function(n,i){n!==this.lastKnownLength_&&Ft(16),this.lastKnownLength_+=i,this.legacyMode_&&i>0&&IL(n+i+1)},t.spliceWithArray_=function(n,i,o){var a=this;this.atom_;var l=this.values_.length;if(n===void 0?n=0:n>l?n=l:n<0&&(n=Math.max(0,l+n)),arguments.length===1?i=l-n:i==null?i=0:i=Math.max(0,Math.min(i,l-n)),o===void 0&&(o=Nx),$o(this)){var c=Ao(this,{object:this.proxy_,type:Vj,index:n,removedCount:i,added:o});if(!c)return Nx;i=c.removedCount,o=c.added}if(o=o.length===0?o:o.map(function(p){return a.enhancer_(p,void 0)}),this.legacyMode_){var d=o.length-i;this.updateArrayLength_(l,d)}var f=this.spliceItemsIntoValues_(n,i,o);return(i!==0||o.length!==0)&&this.notifyArraySplice_(n,o,f),this.dehanceValues_(f)},t.spliceItemsIntoValues_=function(n,i,o){if(o.length<qie){var a;return(a=this.values_).splice.apply(a,[n,i].concat(o))}else{var l=this.values_.slice(n,n+i),c=this.values_.slice(n+i);this.values_.length+=o.length-i;for(var d=0;d<o.length;d++)this.values_[n+d]=o[d];for(var f=0;f<c.length;f++)this.values_[n+o.length+f]=c[f];return l}},t.notifyArrayChildUpdate_=function(n,i,o){var a=!this.owned_&&pp(),l=fa(this),c=l||a?{observableKind:"array",object:this.proxy_,type:Xa,debugObjectName:this.atom_.name_,index:n,newValue:i,oldValue:o}:null;this.atom_.reportChanged(),l&&ha(this,c)},t.notifyArraySplice_=function(n,i,o){var a=!this.owned_&&pp(),l=fa(this),c=l||a?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Vj,index:n,removed:o,added:i,removedCount:o.length,addedCount:i.length}:null;this.atom_.reportChanged(),l&&ha(this,c)},t.get_=function(n){if(this.legacyMode_&&n>=this.values_.length){console.warn("[mobx] Out of bounds read: "+n);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[n])},t.set_=function(n,i){var o=this.values_;if(this.legacyMode_&&n>o.length&&Ft(17,n,o.length),n<o.length){this.atom_;var a=o[n];if($o(this)){var l=Ao(this,{type:Xa,object:this.proxy_,index:n,newValue:i});if(!l)return;i=l.newValue}i=this.enhancer_(i,a);var c=i!==a;c&&(o[n]=i,this.notifyArrayChildUpdate_(n,i,a))}else{for(var d=new Array(n+1-o.length),f=0;f<d.length-1;f++)d[f]=void 0;d[d.length-1]=i,this.spliceWithArray_(o.length,0,d)}},e}();function Hie(e,t,r,n){return r===void 0&&(r="ObservableArray"),n===void 0&&(n=!1),IF(),nu(function(){var i=new dE(r,t,n,!1);$F(i.values_,ut,i);var o=new Proxy(i.values_,Uie);return i.proxy_=o,e&&e.length&&i.spliceWithArray_(0,0,e),o})}var Tb={clear:function(){return this.splice(0)},replace:function(t){var r=this[ut];return r.spliceWithArray_(0,r.values_.length,t)},toJSON:function(){return this.slice()},splice:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];var a=this[ut];switch(arguments.length){case 0:return[];case 1:return a.spliceWithArray_(t);case 2:return a.spliceWithArray_(t,r)}return a.spliceWithArray_(t,r,i)},spliceWithArray:function(t,r,n){return this[ut].spliceWithArray_(t,r,n)},push:function(){for(var t=this[ut],r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.spliceWithArray_(t.values_.length,0,n),t.values_.length},pop:function(){return this.splice(Math.max(this[ut].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[ut],r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.spliceWithArray_(0,0,n),t.values_.length},reverse:function(){return qe.trackingDerivation&&Ft(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){qe.trackingDerivation&&Ft(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var r=this[ut],n=r.dehanceValues_(r.values_).indexOf(t);return n>-1?(this.splice(n,1),!0):!1}};Mr("at",mo);Mr("concat",mo);Mr("flat",mo);Mr("includes",mo);Mr("indexOf",mo);Mr("join",mo);Mr("lastIndexOf",mo);Mr("slice",mo);Mr("toString",mo);Mr("toLocaleString",mo);Mr("toSorted",mo);Mr("toSpliced",mo);Mr("with",mo);Mr("every",ya);Mr("filter",ya);Mr("find",ya);Mr("findIndex",ya);Mr("findLast",ya);Mr("findLastIndex",ya);Mr("flatMap",ya);Mr("forEach",ya);Mr("map",ya);Mr("some",ya);Mr("toReversed",ya);Mr("reduce",SL);Mr("reduceRight",SL);function Mr(e,t){typeof Array.prototype[e]=="function"&&(Tb[e]=t(e))}function mo(e){return function(){var t=this[ut];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_);return r[e].apply(r,arguments)}}function ya(e){return function(t,r){var n=this,i=this[ut];i.atom_.reportObserved();var o=i.dehanceValues_(i.values_);return o[e](function(a,l){return t.call(r,a,l,n)})}}function SL(e){return function(){var t=this,r=this[ut];r.atom_.reportObserved();var n=r.dehanceValues_(r.values_),i=arguments[0];return arguments[0]=function(o,a,l){return i(o,a,l,t)},n[e].apply(n,arguments)}}var Wie=ru("ObservableArrayAdministration",dE);function Uo(e){return O0(e)&&Wie(e[ut])}var _L,xL,Kie={},kl="add",Ob="delete";_L=Symbol.iterator;xL=Symbol.toStringTag;var M0=function(){function e(r,n,i){var o=this;n===void 0&&(n=oc),i===void 0&&(i="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[ut]=Kie,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=n,this.name_=i,po(Map)||Ft(18),nu(function(){o.keysAtom_=_b("ObservableMap.keys()"),o.data_=new Map,o.hasMap_=new Map,r&&o.merge(r)})}var t=e.prototype;return t.has_=function(n){return this.data_.has(n)},t.has=function(n){var i=this;if(!qe.trackingDerivation)return this.has_(n);var o=this.hasMap_.get(n);if(!o){var a=o=new Dl(this.has_(n),R0,"ObservableMap.key?",!1);this.hasMap_.set(n,a),dL(a,function(){return i.hasMap_.delete(n)})}return o.get()},t.set=function(n,i){var o=this.has_(n);if($o(this)){var a=Ao(this,{type:o?Xa:kl,object:this,newValue:i,name:n});if(!a)return this;i=a.newValue}return o?this.updateValue_(n,i):this.addValue_(n,i),this},t.delete=function(n){var i=this;if(this.keysAtom_,$o(this)){var o=Ao(this,{type:Ob,object:this,name:n});if(!o)return!1}if(this.has_(n)){var a=pp(),l=fa(this),c=l||a?{observableKind:"map",debugObjectName:this.name_,type:Ob,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return la(function(){var d;i.keysAtom_.reportChanged(),(d=i.hasMap_.get(n))==null||d.setNewValue_(!1);var f=i.data_.get(n);f.setNewValue_(void 0),i.data_.delete(n)}),l&&ha(this,c),!0}return!1},t.updateValue_=function(n,i){var o=this.data_.get(n);if(i=o.prepareNewValue_(i),i!==qe.UNCHANGED){var a=pp(),l=fa(this),c=l||a?{observableKind:"map",debugObjectName:this.name_,type:Xa,object:this,oldValue:o.value_,name:n,newValue:i}:null;o.setNewValue_(i),l&&ha(this,c)}},t.addValue_=function(n,i){var o=this;this.keysAtom_,la(function(){var d,f=new Dl(i,o.enhancer_,"ObservableMap.key",!1);o.data_.set(n,f),i=f.value_,(d=o.hasMap_.get(n))==null||d.setNewValue_(!0),o.keysAtom_.reportChanged()});var a=pp(),l=fa(this),c=l||a?{observableKind:"map",debugObjectName:this.name_,type:kl,object:this,name:n,newValue:i}:null;l&&ha(this,c)},t.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var n=this,i=this.keys();return Gp({next:function(){var a=i.next(),l=a.done,c=a.value;return{done:l,value:l?void 0:n.get(c)}}})},t.entries=function(){var n=this,i=this.keys();return Gp({next:function(){var a=i.next(),l=a.done,c=a.value;return{done:l,value:l?void 0:[c,n.get(c)]}}})},t[_L]=function(){return this.entries()},t.forEach=function(n,i){for(var o=Md(this),a;!(a=o()).done;){var l=a.value,c=l[0],d=l[1];n.call(i,d,c,this)}},t.merge=function(n){var i=this;return Ki(n)&&(n=new Map(n)),la(function(){Fs(n)?cne(n).forEach(function(o){return i.set(o,n[o])}):Array.isArray(n)?n.forEach(function(o){var a=o[0],l=o[1];return i.set(a,l)}):Ef(n)?(n.constructor!==Map&&Ft(19,n),n.forEach(function(o,a){return i.set(a,o)})):n!=null&&Ft(20,n)}),this},t.clear=function(){var n=this;la(function(){XF(function(){for(var i=Md(n.keys()),o;!(o=i()).done;){var a=o.value;n.delete(a)}})})},t.replace=function(n){var i=this;return la(function(){for(var o=Gie(n),a=new Map,l=!1,c=Md(i.data_.keys()),d;!(d=c()).done;){var f=d.value;if(!o.has(f)){var p=i.delete(f);if(p)l=!0;else{var m=i.data_.get(f);a.set(f,m)}}}for(var g=Md(o.entries()),b;!(b=g()).done;){var y=b.value,w=y[0],_=y[1],S=i.data_.has(w);if(i.set(w,_),i.data_.has(w)){var C=i.data_.get(w);a.set(w,C),S||(l=!0)}}if(!l)if(i.data_.size!==a.size)i.keysAtom_.reportChanged();else for(var k=i.data_.keys(),E=a.keys(),R=k.next(),T=E.next();!R.done;){if(R.value!==T.value){i.keysAtom_.reportChanged();break}R=k.next(),T=E.next()}i.data_=a}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(n,i){return qm(this,n)},t.intercept_=function(n){return zm(this,n)},iE(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:xL,get:function(){return"Map"}}]),e}(),Ki=ru("ObservableMap",M0);function Gie(e){if(Ef(e)||Ki(e))return e;if(Array.isArray(e))return new Map(e);if(Fs(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}else return Ft(21,e)}var PL,CL,Qie={};PL=Symbol.iterator;CL=Symbol.toStringTag;var EL=function(){function e(r,n,i){var o=this;n===void 0&&(n=oc),i===void 0&&(i="ObservableSet"),this.name_=void 0,this[ut]=Qie,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=i,po(Set)||Ft(22),this.enhancer_=function(a,l){return n(a,l,i)},nu(function(){o.atom_=_b(o.name_),r&&o.replace(r)})}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.clear=function(){var n=this;la(function(){XF(function(){for(var i=Md(n.data_.values()),o;!(o=i()).done;){var a=o.value;n.delete(a)}})})},t.forEach=function(n,i){for(var o=Md(this),a;!(a=o()).done;){var l=a.value;n.call(i,l,l,this)}},t.add=function(n){var i=this;if(this.atom_,$o(this)){var o=Ao(this,{type:kl,object:this,newValue:n});if(!o)return this}if(!this.has(n)){la(function(){i.data_.add(i.enhancer_(n,void 0)),i.atom_.reportChanged()});var a=!1,l=fa(this),c=l||a?{observableKind:"set",debugObjectName:this.name_,type:kl,object:this,newValue:n}:null;l&&ha(this,c)}return this},t.delete=function(n){var i=this;if($o(this)){var o=Ao(this,{type:Ob,object:this,oldValue:n});if(!o)return!1}if(this.has(n)){var a=!1,l=fa(this),c=l||a?{observableKind:"set",debugObjectName:this.name_,type:Ob,object:this,oldValue:n}:null;return la(function(){i.atom_.reportChanged(),i.data_.delete(n)}),l&&ha(this,c),!0}return!1},t.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},t.entries=function(){var n=0,i=Array.from(this.keys()),o=Array.from(this.values());return Gp({next:function(){var l=n;return n+=1,l<o.length?{value:[i[l],o[l]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var n=this,i=0,o=Array.from(this.data_.values());return Gp({next:function(){return i<o.length?{value:n.dehanceValue_(o[i++]),done:!1}:{done:!0}}})},t.replace=function(n){var i=this;return zo(n)&&(n=new Set(n)),la(function(){Array.isArray(n)?(i.clear(),n.forEach(function(o){return i.add(o)})):Fm(n)?(i.clear(),n.forEach(function(o){return i.add(o)})):n!=null&&Ft("Cannot initialize set from "+n)}),this},t.observe_=function(n,i){return qm(this,n)},t.intercept_=function(n){return zm(this,n)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[PL]=function(){return this.values()},iE(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:CL,get:function(){return"Set"}}]),e}(),zo=ru("ObservableSet",EL),zj=Object.create(null),qj="remove",TL=function(){function e(r,n,i,o){n===void 0&&(n=new Map),o===void 0&&(o=Bne),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=r,this.values_=n,this.name_=i,this.defaultAnnotation_=o,this.keysAtom_=new Bm("ObservableObject.keys"),this.isPlainObject_=Fs(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(n){return this.values_.get(n).get()},t.setObservablePropValue_=function(n,i){var o=this.values_.get(n);if(o instanceof df)return o.set(i),!0;if($o(this)){var a=Ao(this,{type:Xa,object:this.proxy_||this.target_,name:n,newValue:i});if(!a)return null;i=a.newValue}if(i=o.prepareNewValue_(i),i!==qe.UNCHANGED){var l=fa(this),c=!1,d=l||c?{type:Xa,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:o.value_,name:n,newValue:i}:null;o.setNewValue_(i),l&&ha(this,d)}return!0},t.get_=function(n){return qe.trackingDerivation&&!Os(this.target_,n)&&this.has_(n),this.target_[n]},t.set_=function(n,i,o){return o===void 0&&(o=!1),Os(this.target_,n)?this.values_.has(n)?this.setObservablePropValue_(n,i):o?Reflect.set(this.target_,n,i):(this.target_[n]=i,!0):this.extend_(n,{value:i,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,o)},t.has_=function(n){if(!qe.trackingDerivation)return n in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var i=this.pendingKeys_.get(n);return i||(i=new Dl(n in this.target_,R0,"ObservableObject.key?",!1),this.pendingKeys_.set(n,i)),i.get()},t.make_=function(n,i){if(i===!0&&(i=this.defaultAnnotation_),i!==!1){if(!(n in this.target_)){var o;if((o=this.target_[za])!=null&&o[n])return;Ft(1,i.annotationType_,this.name_+"."+n.toString())}for(var a=this.target_;a&&a!==Mm;){var l=Sb(a,n);if(l){var c=i.make_(this,n,l,a);if(c===0)return;if(c===1)break}a=Object.getPrototypeOf(a)}Hj(this,i,n)}},t.extend_=function(n,i,o,a){if(a===void 0&&(a=!1),o===!0&&(o=this.defaultAnnotation_),o===!1)return this.defineProperty_(n,i,a);var l=o.extend_(this,n,i,a);return l&&Hj(this,o,n),l},t.defineProperty_=function(n,i,o){o===void 0&&(o=!1),this.keysAtom_;try{Mi();var a=this.delete_(n);if(!a)return a;if($o(this)){var l=Ao(this,{object:this.proxy_||this.target_,name:n,type:kl,newValue:i.value});if(!l)return null;var c=l.newValue;i.value!==c&&(i=Ul({},i,{value:c}))}if(o){if(!Reflect.defineProperty(this.target_,n,i))return!1}else Ga(this.target_,n,i);this.notifyPropertyAddition_(n,i.value)}finally{Ni()}return!0},t.defineObservableProperty_=function(n,i,o,a){a===void 0&&(a=!1),this.keysAtom_;try{Mi();var l=this.delete_(n);if(!l)return l;if($o(this)){var c=Ao(this,{object:this.proxy_||this.target_,name:n,type:kl,newValue:i});if(!c)return null;i=c.newValue}var d=Uj(n),f={configurable:qe.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:d.get,set:d.set};if(a){if(!Reflect.defineProperty(this.target_,n,f))return!1}else Ga(this.target_,n,f);var p=new Dl(i,o,"ObservableObject.key",!1);this.values_.set(n,p),this.notifyPropertyAddition_(n,p.value_)}finally{Ni()}return!0},t.defineComputedProperty_=function(n,i,o){o===void 0&&(o=!1),this.keysAtom_;try{Mi();var a=this.delete_(n);if(!a)return a;if($o(this)){var l=Ao(this,{object:this.proxy_||this.target_,name:n,type:kl,newValue:void 0});if(!l)return null}i.name||(i.name="ObservableObject.key"),i.context=this.proxy_||this.target_;var c=Uj(n),d={configurable:qe.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:c.get,set:c.set};if(o){if(!Reflect.defineProperty(this.target_,n,d))return!1}else Ga(this.target_,n,d);this.values_.set(n,new df(i)),this.notifyPropertyAddition_(n,void 0)}finally{Ni()}return!0},t.delete_=function(n,i){if(i===void 0&&(i=!1),this.keysAtom_,!Os(this.target_,n))return!0;if($o(this)){var o=Ao(this,{object:this.proxy_||this.target_,name:n,type:qj});if(!o)return null}try{var a,l;Mi();var c=fa(this),d=!1,f=this.values_.get(n),p=void 0;if(!f&&(c||d)){var m;p=(m=Sb(this.target_,n))==null?void 0:m.value}if(i){if(!Reflect.deleteProperty(this.target_,n))return!1}else delete this.target_[n];if(f&&(this.values_.delete(n),f instanceof Dl&&(p=f.value_),nL(f)),this.keysAtom_.reportChanged(),(a=this.pendingKeys_)==null||(l=a.get(n))==null||l.set(n in this.target_),c||d){var g={type:qj,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:p,name:n};c&&ha(this,g)}}finally{Ni()}return!0},t.observe_=function(n,i){return qm(this,n)},t.intercept_=function(n){return zm(this,n)},t.notifyPropertyAddition_=function(n,i){var o,a,l=fa(this),c=!1;if(l||c){var d=l||c?{type:kl,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:n,newValue:i}:null;l&&ha(this,d)}(o=this.pendingKeys_)==null||(a=o.get(n))==null||a.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),uf(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Sc(e,t){var r;if(Os(e,ut))return e;var n=(r=t==null?void 0:t.name)!=null?r:"ObservableObject",i=new TL(e,new Map,String(n),Xne(t));return Nm(e,ut,i),e}var Yie=ru("ObservableObjectAdministration",TL);function Uj(e){return zj[e]||(zj[e]={get:function(){return this[ut].getObservablePropValue_(e)},set:function(r){return this[ut].setObservablePropValue_(e,r)}})}function Gi(e){return O0(e)?Yie(e[ut]):!1}function Hj(e,t,r){var n;(n=e.target_[za])==null||delete n[r]}var Xie=RL(0),Jie=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),K1=0,OL=function(){};function Zie(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):e.prototype.__proto__!==void 0?e.prototype.__proto__=t:e.prototype=t}Zie(OL,Array.prototype);var fE=function(e,t,r){MF(n,e);function n(o,a,l,c){var d;return l===void 0&&(l="ObservableArray"),c===void 0&&(c=!1),d=e.call(this)||this,nu(function(){var f=new dE(l,a,c,!0);f.proxy_=q1(d),$F(q1(d),ut,f),o&&o.length&&d.spliceWithArray(0,0,o),Jie&&Object.defineProperty(q1(d),"0",Xie)}),d}var i=n.prototype;return i.concat=function(){this[ut].atom_.reportObserved();for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return Array.prototype.concat.apply(this.slice(),l.map(function(d){return Uo(d)?d.slice():d}))},i[r]=function(){var o=this,a=0;return Gp({next:function(){return a<o.length?{value:o[a++],done:!1}:{done:!0,value:void 0}}})},iE(n,[{key:"length",get:function(){return this[ut].getArrayLength_()},set:function(a){this[ut].setArrayLength_(a)}},{key:t,get:function(){return"Array"}}]),n}(OL,Symbol.toStringTag,Symbol.iterator);Object.entries(Tb).forEach(function(e){var t=e[0],r=e[1];t!=="concat"&&Nm(fE.prototype,t,r)});function RL(e){return{enumerable:!1,configurable:!0,get:function(){return this[ut].get_(e)},set:function(r){this[ut].set_(e,r)}}}function eoe(e){Ga(fE.prototype,""+e,RL(e))}function IL(e){if(e>K1){for(var t=K1;t<e+100;t++)eoe(t);K1=e}}IL(1e3);function toe(e,t,r){return new fE(e,t,r)}function sc(e,t){if(typeof e=="object"&&e!==null){if(Uo(e))return t!==void 0&&Ft(23),e[ut].atom_;if(zo(e))return e.atom_;if(Ki(e)){if(t===void 0)return e.keysAtom_;var r=e.data_.get(t)||e.hasMap_.get(t);return r||Ft(25,t,Kx(e)),r}if(Gi(e)){if(!t)return Ft(26);var n=e[ut].values_.get(t);return n||Ft(27,t,Kx(e)),n}if(oE(e)||ac(e)||Eb(e))return e}else if(po(e)&&Eb(e[ut]))return e[ut];Ft(28)}function ma(e,t){if(e||Ft(29),t!==void 0)return ma(sc(e,t));if(oE(e)||ac(e)||Eb(e)||Ki(e)||zo(e))return e;if(e[ut])return e[ut];Ft(24,e)}function Kx(e,t){var r;if(t!==void 0)r=sc(e,t);else{if($0(e))return e.name;Gi(e)||Ki(e)||zo(e)?r=ma(e):r=sc(e)}return r.name_}function nu(e){var t=wc(),r=k0(!0);Mi();try{return e()}finally{Ni(),j0(r),Rs(t)}}var Wj=Mm.toString;function kL(e,t,r){return r===void 0&&(r=-1),Gx(e,t,r)}function Gx(e,t,r,n,i){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var o=typeof e;if(o!=="function"&&o!=="object"&&typeof t!="object")return!1;var a=Wj.call(e);if(a!==Wj.call(t))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:+e==0?1/+e===1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":r>=0&&r++;break}e=Kj(e),t=Kj(t);var l=a==="[object Array]";if(!l){if(typeof e!="object"||typeof t!="object")return!1;var c=e.constructor,d=t.constructor;if(c!==d&&!(po(c)&&c instanceof c&&po(d)&&d instanceof d)&&"constructor"in e&&"constructor"in t)return!1}if(r===0)return!1;r<0&&(r=-1),n=n||[],i=i||[];for(var f=n.length;f--;)if(n[f]===e)return i[f]===t;if(n.push(e),i.push(t),l){if(f=e.length,f!==t.length)return!1;for(;f--;)if(!Gx(e[f],t[f],r-1,n,i))return!1}else{var p=Object.keys(e),m;if(f=p.length,Object.keys(t).length!==f)return!1;for(;f--;)if(m=p[f],!(Os(t,m)&&Gx(e[m],t[m],r-1,n,i)))return!1}return n.pop(),i.pop(),!0}function Kj(e){return Uo(e)?e.slice():Ef(e)||Ki(e)||Fm(e)||zo(e)?Array.from(e.entries()):e}function Gp(e){return e[Symbol.iterator]=roe,e}function roe(){return this}["Symbol","Map","Set"].forEach(function(e){var t=rE();typeof t[e]>"u"&&Ft("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:mie,extras:{getDebugName:Kx},$mobx:ut});if(!O.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!D0)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function noe(e){e()}function ioe(e){e||(e=noe),Tie({reactionScheduler:e})}function ooe(e){return Oie(e)}var aoe=1e4,soe=1e4,loe=function(){function e(t){var r=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(n){n===void 0&&(n=aoe),clearTimeout(r.sweepTimeout),r.sweepTimeout=void 0;var i=Date.now();r.registrations.forEach(function(o,a){i-o.registeredAt>=n&&(r.finalize(o.value),r.registrations.delete(a))}),r.registrations.size>0&&r.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,n){this.registrations.set(n,{value:r,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,soe))}}),e}(),uoe=typeof FinalizationRegistry<"u"?FinalizationRegistry:loe,Qx=new uoe(function(e){var t;(t=e.reaction)===null||t===void 0||t.dispose(),e.reaction=null}),G1={exports:{}},Q1={};/**
|
351
|
-
* @license React
|
352
|
-
* use-sync-external-store-shim.production.min.js
|
353
|
-
*
|
354
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
355
|
-
*
|
356
|
-
* This source code is licensed under the MIT license found in the
|
357
|
-
* LICENSE file in the root directory of this source tree.
|
358
|
-
*/var Gj;function coe(){if(Gj)return Q1;Gj=1;var e=wm();function t(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function l(p,m){var g=m(),b=n({inst:{value:g,getSnapshot:m}}),y=b[0].inst,w=b[1];return o(function(){y.value=g,y.getSnapshot=m,c(y)&&w({inst:y})},[p,g,m]),i(function(){return c(y)&&w({inst:y}),p(function(){c(y)&&w({inst:y})})},[p]),a(g),g}function c(p){var m=p.getSnapshot;p=p.value;try{var g=m();return!r(p,g)}catch{return!0}}function d(p,m){return m()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return Q1.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,Q1}var Qj;function doe(){return Qj||(Qj=1,G1.exports=coe()),G1.exports}var foe=doe();function Yj(e){e.reaction=new qp("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),(t=e.onStoreChange)===null||t===void 0||t.call(e)})}function hoe(e,t){t===void 0&&(t="observed");var r=Re.useRef(null);if(!r.current){var n={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(l){return Qx.unregister(n),n.onStoreChange=l,n.reaction||(Yj(n),n.stateVersion=Symbol()),function(){var c;n.onStoreChange=null,(c=n.reaction)===null||c===void 0||c.dispose(),n.reaction=null}},getSnapshot:function(){return n.stateVersion}};r.current=n}var i=r.current;i.reaction||(Yj(i),Qx.register(r,i,i)),Re.useDebugValue(i.reaction,ooe),foe.useSyncExternalStore(i.subscribe,i.getSnapshot,i.getSnapshot);var o,a;if(i.reaction.track(function(){try{o=e()}catch(l){a=l}}),a)throw a;return o}var Y1,X1,jL=typeof Symbol=="function"&&Symbol.for,poe=(X1=(Y1=Object.getOwnPropertyDescriptor(function(){},"name"))===null||Y1===void 0?void 0:Y1.configurable)!==null&&X1!==void 0?X1:!1,Xj=jL?Symbol.for("react.forward_ref"):typeof O.forwardRef=="function"&&O.forwardRef(function(e){return null}).$$typeof,Jj=jL?Symbol.for("react.memo"):typeof O.memo=="function"&&O.memo(function(e){return null}).$$typeof;function Ot(e,t){var r;if(Jj&&e.$$typeof===Jj)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var n=(r=void 0)!==null&&r!==void 0?r:!1,i=e,o=e.displayName||e.name;if(Xj&&e.$$typeof===Xj&&(n=!0,i=e.render,typeof i!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a=function(l,c){return hoe(function(){return i(l,c)},o)};return a.displayName=e.displayName,poe&&Object.defineProperty(a,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(a.contextTypes=e.contextTypes),n&&(a=O.forwardRef(a)),a=O.memo(a),voe(e,a),a}var moe={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function voe(e,t){Object.keys(e).forEach(function(r){moe[r]||Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}var J1;ioe(_m.unstable_batchedUpdates);J1=Qx.finalizeAllImmediately;/**
|
359
|
-
* @remix-run/router v1.16.1
|
360
|
-
*
|
361
|
-
* Copyright (c) Remix Software Inc.
|
362
|
-
*
|
363
|
-
* This source code is licensed under the MIT license found in the
|
364
|
-
* LICENSE.md file in the root directory of this source tree.
|
365
|
-
*
|
366
|
-
* @license MIT
|
367
|
-
*/function Qr(){return Qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qr.apply(this,arguments)}var Pn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Pn||(Pn={}));const Zj="popstate";function goe(e){e===void 0&&(e={});function t(n,i){let{pathname:o,search:a,hash:l}=n.location;return Qp("",{pathname:o,search:a,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:uc(i)}return boe(t,r,null,e)}function qt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function lc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function yoe(){return Math.random().toString(36).substr(2,8)}function e$(e,t){return{usr:e.state,key:e.key,idx:t}}function Qp(e,t,r,n){return r===void 0&&(r=null),Qr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?iu(t):t,{state:r,key:t&&t.key||n||yoe()})}function uc(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function iu(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function boe(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,l=Pn.Pop,c=null,d=f();d==null&&(d=0,a.replaceState(Qr({},a.state,{idx:d}),""));function f(){return(a.state||{idx:null}).idx}function p(){l=Pn.Pop;let w=f(),_=w==null?null:w-d;d=w,c&&c({action:l,location:y.location,delta:_})}function m(w,_){l=Pn.Push;let S=Qp(y.location,w,_);d=f()+1;let C=e$(S,d),k=y.createHref(S);try{a.pushState(C,"",k)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(k)}o&&c&&c({action:l,location:y.location,delta:1})}function g(w,_){l=Pn.Replace;let S=Qp(y.location,w,_);d=f();let C=e$(S,d),k=y.createHref(S);a.replaceState(C,"",k),o&&c&&c({action:l,location:y.location,delta:0})}function b(w){let _=i.location.origin!=="null"?i.location.origin:i.location.href,S=typeof w=="string"?w:uc(w);return S=S.replace(/ $/,"%20"),qt(_,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,_)}let y={get action(){return l},get location(){return e(i,a)},listen(w){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(Zj,p),c=w,()=>{i.removeEventListener(Zj,p),c=null}},createHref(w){return t(i,w)},createURL:b,encodeLocation(w){let _=b(w);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:m,replace:g,go(w){return a.go(w)}};return y}var Yr;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Yr||(Yr={}));const woe=new Set(["lazy","caseSensitive","path","id","index","children"]);function Soe(e){return e.index===!0}function Yx(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((i,o)=>{let a=[...r,o],l=typeof i.id=="string"?i.id:a.join("-");if(qt(i.index!==!0||!i.children,"Cannot specify children on an index route"),qt(!n[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),Soe(i)){let c=Qr({},i,t(i),{id:l});return n[l]=c,c}else{let c=Qr({},i,t(i),{id:l,children:void 0});return n[l]=c,i.children&&(c.children=Yx(i.children,t,a,n)),c}})}function Nd(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?iu(t):t,i=Of(n.pathname||"/",r);if(i==null)return null;let o=$L(e);xoe(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=Doe(i);a=joe(o[l],c)}return a}function _oe(e,t){let{route:r,pathname:n,params:i}=e;return{id:r.id,pathname:n,params:i,data:t[r.id],handle:r.handle}}function $L(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(o,a,l)=>{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};c.relativePath.startsWith("/")&&(qt(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let d=Is([n,c.relativePath]),f=r.concat(c);o.children&&o.children.length>0&&(qt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),$L(o.children,t,f,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:Ioe(d,o.index),routesMeta:f})};return e.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,a);else for(let c of AL(o.path))i(o,a,c)}),t}function AL(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let a=AL(n.join("/")),l=[];return l.push(...a.map(c=>c===""?o:[o,c].join("/"))),i&&l.push(...a),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function xoe(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:koe(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Poe=/^:[\w-]+$/,Coe=3,Eoe=2,Toe=1,Ooe=10,Roe=-2,t$=e=>e==="*";function Ioe(e,t){let r=e.split("/"),n=r.length;return r.some(t$)&&(n+=Roe),t&&(n+=Eoe),r.filter(i=>!t$(i)).reduce((i,o)=>i+(Poe.test(o)?Coe:o===""?Toe:Ooe),n)}function koe(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function joe(e,t){let{routesMeta:r}=e,n={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=$oe({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d);if(!f)return null;Object.assign(n,f.params);let p=l.route;o.push({params:n,pathname:Is([i,f.pathname]),pathnameBase:Foe(Is([i,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(i=Is([i,f.pathnameBase]))}return o}function ao(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(lc(!1,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".')),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",i=a=>a==null?"":typeof a=="string"?a:String(a),o=r.split(/\/+/).map((a,l,c)=>{if(l===c.length-1&&a==="*")return i(t["*"]);const f=a.match(/^:([\w-]+)(\??)$/);if(f){const[,p,m]=f;let g=t[p];return qt(m==="?"||g!=null,'Missing ":'+p+'" param'),i(g)}return a.replace(/\?$/g,"")}).filter(a=>!!a);return n+o.join("/")}function $oe(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Aoe(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:n.reduce((d,f,p)=>{let{paramName:m,isOptional:g}=f;if(m==="*"){let y=l[p]||"";a=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const b=l[p];return g&&!b?d[m]=void 0:d[m]=(b||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:a,pattern:e}}function Aoe(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),lc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function Doe(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return lc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Of(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Moe(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?iu(e):e;return{pathname:r?r.startsWith("/")?r:Noe(r,t):t,search:Loe(n),hash:Boe(i)}}function Noe(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Z1(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function DL(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function hE(e,t){let r=DL(e);return t?r.map((n,i)=>i===e.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function pE(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=iu(e):(i=Qr({},e),qt(!i.pathname||!i.pathname.includes("?"),Z1("?","pathname","search",i)),qt(!i.pathname||!i.pathname.includes("#"),Z1("#","pathname","hash",i)),qt(!i.search||!i.search.includes("#"),Z1("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,l;if(a==null)l=r;else{let p=t.length-1;if(!n&&a.startsWith("..")){let m=a.split("/");for(;m[0]==="..";)m.shift(),p-=1;i.pathname=m.join("/")}l=p>=0?t[p]:"/"}let c=Moe(i,l),d=a&&a!=="/"&&a.endsWith("/"),f=(o||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(d||f)&&(c.pathname+="/"),c}const Is=e=>e.join("/").replace(/\/\/+/g,"/"),Foe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Loe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Boe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,hf=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let i=new Headers(n.headers);return i.set("Location",t),new Response(null,Qr({},n,{headers:i}))};class mE{constructor(t,r,n,i){i===void 0&&(i=!1),this.status=t,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function vE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ML=["post","put","patch","delete"],Voe=new Set(ML),zoe=["get",...ML],qoe=new Set(zoe),Uoe=new Set([301,302,303,307,308]),Hoe=new Set([307,308]),e_={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Woe={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Rh={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},gE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Koe=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),NL="remix-router-transitions";function Goe(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;qt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let le=e.detectErrorBoundary;i=ye=>({hasErrorBoundary:le(ye)})}else i=Koe;let o={},a=Yx(e.routes,i,void 0,o),l,c=e.basename||"/",d=e.unstable_dataStrategy||Joe,f=Qr({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),p=null,m=new Set,g=null,b=null,y=null,w=e.hydrationData!=null,_=Nd(a,e.history.location,c),S=null;if(_==null){let le=ko(404,{pathname:e.history.location.pathname}),{matches:ye,route:xe}=d$(a);_=ye,S={[xe.id]:le}}let C,k=_.some(le=>le.route.lazy),E=_.some(le=>le.route.loader);if(k)C=!1;else if(!E)C=!0;else if(f.v7_partialHydration){let le=e.hydrationData?e.hydrationData.loaderData:null,ye=e.hydrationData?e.hydrationData.errors:null,xe=$e=>$e.route.loader?typeof $e.route.loader=="function"&&$e.route.loader.hydrate===!0?!1:le&&le[$e.route.id]!==void 0||ye&&ye[$e.route.id]!==void 0:!0;if(ye){let $e=_.findIndex(Be=>ye[Be.route.id]!==void 0);C=_.slice(0,$e+1).every(xe)}else C=_.every(xe)}else C=e.hydrationData!=null;let R,T={historyAction:e.history.action,location:e.history.location,matches:_,initialized:C,navigation:e_,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},A=Pn.Pop,M=!1,B,Q=!1,se=new Map,ie=null,N=!1,X=!1,ce=[],ne=[],ee=new Map,ge=0,Z=-1,j=new Map,U=new Set,q=new Map,$=new Map,F=new Set,V=new Map,de=new Map,pe=!1;function Ee(){if(p=e.history.listen(le=>{let{action:ye,location:xe,delta:$e}=le;if(pe){pe=!1;return}lc(de.size===0||$e!=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 Be=Wo({currentLocation:T.location,nextLocation:xe,historyAction:ye});if(Be&&$e!=null){pe=!0,e.history.go($e*-1),gn(Be,{state:"blocked",location:xe,proceed(){gn(Be,{state:"proceeding",proceed:void 0,reset:void 0,location:xe}),e.history.go($e)},reset(){let pt=new Map(T.blockers);pt.set(Be,Rh),K({blockers:pt})}});return}return Ce(ye,xe)}),r){cae(t,se);let le=()=>dae(t,se);t.addEventListener("pagehide",le),ie=()=>t.removeEventListener("pagehide",le)}return T.initialized||Ce(Pn.Pop,T.location,{initialHydration:!0}),R}function Me(){p&&p(),ie&&ie(),m.clear(),B&&B.abort(),T.fetchers.forEach((le,ye)=>Nr(ye)),T.blockers.forEach((le,ye)=>Oi(ye))}function Y(le){return m.add(le),()=>m.delete(le)}function K(le,ye){ye===void 0&&(ye={}),T=Qr({},T,le);let xe=[],$e=[];f.v7_fetcherPersist&&T.fetchers.forEach((Be,pt)=>{Be.state==="idle"&&(F.has(pt)?$e.push(pt):xe.push(pt))}),[...m].forEach(Be=>Be(T,{deletedFetchers:$e,unstable_viewTransitionOpts:ye.viewTransitionOpts,unstable_flushSync:ye.flushSync===!0})),f.v7_fetcherPersist&&(xe.forEach(Be=>T.fetchers.delete(Be)),$e.forEach(Be=>Nr(Be)))}function we(le,ye,xe){var $e,Be;let{flushSync:pt}=xe===void 0?{}:xe,tt=T.actionData!=null&&T.navigation.formMethod!=null&&oa(T.navigation.formMethod)&&T.navigation.state==="loading"&&(($e=le.state)==null?void 0:$e._isRedirect)!==!0,Ue;ye.actionData?Object.keys(ye.actionData).length>0?Ue=ye.actionData:Ue=null:tt?Ue=T.actionData:Ue=null;let xt=ye.loaderData?u$(T.loaderData,ye.loaderData,ye.matches||[],ye.errors):T.loaderData,H=T.blockers;H.size>0&&(H=new Map(H),H.forEach((te,ue)=>H.set(ue,Rh)));let L=M===!0||T.navigation.formMethod!=null&&oa(T.navigation.formMethod)&&((Be=le.state)==null?void 0:Be._isRedirect)!==!0;l&&(a=l,l=void 0),N||A===Pn.Pop||(A===Pn.Push?e.history.push(le,le.state):A===Pn.Replace&&e.history.replace(le,le.state));let G;if(A===Pn.Pop){let te=se.get(T.location.pathname);te&&te.has(le.pathname)?G={currentLocation:T.location,nextLocation:le}:se.has(le.pathname)&&(G={currentLocation:le,nextLocation:T.location})}else if(Q){let te=se.get(T.location.pathname);te?te.add(le.pathname):(te=new Set([le.pathname]),se.set(T.location.pathname,te)),G={currentLocation:T.location,nextLocation:le}}K(Qr({},ye,{actionData:Ue,loaderData:xt,historyAction:A,location:le,initialized:!0,navigation:e_,revalidation:"idle",restoreScrollPosition:pi(le,ye.matches||T.matches),preventScrollReset:L,blockers:H}),{viewTransitionOpts:G,flushSync:pt===!0}),A=Pn.Pop,M=!1,Q=!1,N=!1,X=!1,ce=[],ne=[]}async function Te(le,ye){if(typeof le=="number"){e.history.go(le);return}let xe=Xx(T.location,T.matches,c,f.v7_prependBasename,le,f.v7_relativeSplatPath,ye==null?void 0:ye.fromRouteId,ye==null?void 0:ye.relative),{path:$e,submission:Be,error:pt}=r$(f.v7_normalizeFormMethod,!1,xe,ye),tt=T.location,Ue=Qp(T.location,$e,ye&&ye.state);Ue=Qr({},Ue,e.history.encodeLocation(Ue));let xt=ye&&ye.replace!=null?ye.replace:void 0,H=Pn.Push;xt===!0?H=Pn.Replace:xt===!1||Be!=null&&oa(Be.formMethod)&&Be.formAction===T.location.pathname+T.location.search&&(H=Pn.Replace);let L=ye&&"preventScrollReset"in ye?ye.preventScrollReset===!0:void 0,G=(ye&&ye.unstable_flushSync)===!0,te=Wo({currentLocation:tt,nextLocation:Ue,historyAction:H});if(te){gn(te,{state:"blocked",location:Ue,proceed(){gn(te,{state:"proceeding",proceed:void 0,reset:void 0,location:Ue}),Te(le,ye)},reset(){let ue=new Map(T.blockers);ue.set(te,Rh),K({blockers:ue})}});return}return await Ce(H,Ue,{submission:Be,pendingError:pt,preventScrollReset:L,replace:ye&&ye.replace,enableViewTransition:ye&&ye.unstable_viewTransition,flushSync:G})}function he(){if(mn(),K({revalidation:"loading"}),T.navigation.state!=="submitting"){if(T.navigation.state==="idle"){Ce(T.historyAction,T.location,{startUninterruptedRevalidation:!0});return}Ce(A||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation})}}async function Ce(le,ye,xe){B&&B.abort(),B=null,A=le,N=(xe&&xe.startUninterruptedRevalidation)===!0,vo(T.location,T.matches),M=(xe&&xe.preventScrollReset)===!0,Q=(xe&&xe.enableViewTransition)===!0;let $e=l||a,Be=xe&&xe.overrideNavigation,pt=Nd($e,ye,c),tt=(xe&&xe.flushSync)===!0;if(!pt){let te=ko(404,{pathname:ye.pathname}),{matches:ue,route:ze}=d$($e);Ko(),we(ye,{matches:ue,loaderData:{},errors:{[ze.id]:te}},{flushSync:tt});return}if(T.initialized&&!X&&iae(T.location,ye)&&!(xe&&xe.submission&&oa(xe.submission.formMethod))){we(ye,{matches:pt},{flushSync:tt});return}B=new AbortController;let Ue=dd(e.history,ye,B.signal,xe&&xe.submission),xt;if(xe&&xe.pendingError)xt=[mp(pt).route.id,{type:Yr.error,error:xe.pendingError}];else if(xe&&xe.submission&&oa(xe.submission.formMethod)){let te=await Ge(Ue,ye,xe.submission,pt,{replace:xe.replace,flushSync:tt});if(te.shortCircuited)return;xt=te.pendingActionResult,Be=t_(ye,xe.submission),tt=!1,Ue=dd(e.history,Ue.url,Ue.signal)}let{shortCircuited:H,loaderData:L,errors:G}=await $t(Ue,ye,pt,Be,xe&&xe.submission,xe&&xe.fetcherSubmission,xe&&xe.replace,xe&&xe.initialHydration===!0,tt,xt);H||(B=null,we(ye,Qr({matches:pt},c$(xt),{loaderData:L,errors:G})))}async function Ge(le,ye,xe,$e,Be){Be===void 0&&(Be={}),mn();let pt=lae(ye,xe);K({navigation:pt},{flushSync:Be.flushSync===!0});let tt,Ue=Zx($e,ye);if(!Ue.route.action&&!Ue.route.lazy)tt={type:Yr.error,error:ko(405,{method:le.method,pathname:ye.pathname,routeId:Ue.route.id})};else if(tt=(await ht("action",le,[Ue],$e))[0],le.signal.aborted)return{shortCircuited:!0};if(qu(tt)){let xt;return Be&&Be.replace!=null?xt=Be.replace:xt=a$(tt.response.headers.get("Location"),new URL(le.url),c)===T.location.pathname+T.location.search,await Lt(le,tt,{submission:xe,replace:xt}),{shortCircuited:!0}}if(zu(tt))throw ko(400,{type:"defer-action"});if(jo(tt)){let xt=mp($e,Ue.route.id);return(Be&&Be.replace)!==!0&&(A=Pn.Push),{pendingActionResult:[xt.route.id,tt]}}return{pendingActionResult:[Ue.route.id,tt]}}async function $t(le,ye,xe,$e,Be,pt,tt,Ue,xt,H){let L=$e||t_(ye,Be),G=Be||pt||p$(L),te=l||a,[ue,ze]=n$(e.history,T,xe,G,ye,f.v7_partialHydration&&Ue===!0,f.unstable_skipActionErrorRevalidation,X,ce,ne,F,q,U,te,c,H);if(Ko(it=>!(xe&&xe.some(Ct=>Ct.route.id===it))||ue&&ue.some(Ct=>Ct.route.id===it)),Z=++ge,ue.length===0&&ze.length===0){let it=Yi();return we(ye,Qr({matches:xe,loaderData:{},errors:H&&jo(H[1])?{[H[0]]:H[1].error}:null},c$(H),it?{fetchers:new Map(T.fetchers)}:{}),{flushSync:xt}),{shortCircuited:!0}}if(!N&&(!f.v7_partialHydration||!Ue)){ze.forEach(Ct=>{let Et=T.fetchers.get(Ct.key),ar=Ih(void 0,Et?Et.data:void 0);T.fetchers.set(Ct.key,ar)});let it;H&&!jo(H[1])?it={[H[0]]:H[1].data}:T.actionData&&(Object.keys(T.actionData).length===0?it=null:it=T.actionData),K(Qr({navigation:L},it!==void 0?{actionData:it}:{},ze.length>0?{fetchers:new Map(T.fetchers)}:{}),{flushSync:xt})}ze.forEach(it=>{ee.has(it.key)&&sn(it.key),it.controller&&ee.set(it.key,it.controller)});let Ye=()=>ze.forEach(it=>sn(it.key));B&&B.signal.addEventListener("abort",Ye);let{loaderResults:ot,fetcherResults:Wt}=await on(T.matches,xe,ue,ze,le);if(le.signal.aborted)return{shortCircuited:!0};B&&B.signal.removeEventListener("abort",Ye),ze.forEach(it=>ee.delete(it.key));let nr=f$([...ot,...Wt]);if(nr){if(nr.idx>=ue.length){let it=ze[nr.idx-ue.length].key;U.add(it)}return await Lt(le,nr.result,{replace:tt}),{shortCircuited:!0}}let{loaderData:Pt,errors:At}=l$(T,xe,ue,ot,H,ze,Wt,V);V.forEach((it,Ct)=>{it.subscribe(Et=>{(Et||it.done)&&V.delete(Ct)})}),f.v7_partialHydration&&Ue&&T.errors&&Object.entries(T.errors).filter(it=>{let[Ct]=it;return!ue.some(Et=>Et.route.id===Ct)}).forEach(it=>{let[Ct,Et]=it;At=Object.assign(At||{},{[Ct]:Et})});let cr=Yi(),ft=xa(Z),Gt=cr||ft||ze.length>0;return Qr({loaderData:Pt,errors:At},Gt?{fetchers:new Map(T.fetchers)}:{})}function Kt(le,ye,xe,$e){if(n)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.");ee.has(le)&&sn(le);let Be=($e&&$e.unstable_flushSync)===!0,pt=l||a,tt=Xx(T.location,T.matches,c,f.v7_prependBasename,xe,f.v7_relativeSplatPath,ye,$e==null?void 0:$e.relative),Ue=Nd(pt,tt,c);if(!Ue){Jr(le,ye,ko(404,{pathname:tt}),{flushSync:Be});return}let{path:xt,submission:H,error:L}=r$(f.v7_normalizeFormMethod,!0,tt,$e);if(L){Jr(le,ye,L,{flushSync:Be});return}let G=Zx(Ue,xt);if(M=($e&&$e.preventScrollReset)===!0,H&&oa(H.formMethod)){It(le,ye,xt,G,Ue,Be,H);return}q.set(le,{routeId:ye,path:xt}),jt(le,ye,xt,G,Ue,Be,H)}async function It(le,ye,xe,$e,Be,pt,tt){if(mn(),q.delete(le),!$e.route.action&&!$e.route.lazy){let ar=ko(405,{method:tt.formMethod,pathname:xe,routeId:ye});Jr(le,ye,ar,{flushSync:pt});return}let Ue=T.fetchers.get(le);Ir(le,uae(tt,Ue),{flushSync:pt});let xt=new AbortController,H=dd(e.history,xe,xt.signal,tt);ee.set(le,xt);let L=ge,te=(await ht("action",H,[$e],Be))[0];if(H.signal.aborted){ee.get(le)===xt&&ee.delete(le);return}if(f.v7_fetcherPersist&&F.has(le)){if(qu(te)||jo(te)){Ir(le,_l(void 0));return}}else{if(qu(te))if(ee.delete(le),Z>L){Ir(le,_l(void 0));return}else return U.add(le),Ir(le,Ih(tt)),Lt(H,te,{fetcherSubmission:tt});if(jo(te)){Jr(le,ye,te.error);return}}if(zu(te))throw ko(400,{type:"defer-action"});let ue=T.navigation.location||T.location,ze=dd(e.history,ue,xt.signal),Ye=l||a,ot=T.navigation.state!=="idle"?Nd(Ye,T.navigation.location,c):T.matches;qt(ot,"Didn't find any matches after fetcher action");let Wt=++ge;j.set(le,Wt);let nr=Ih(tt,te.data);T.fetchers.set(le,nr);let[Pt,At]=n$(e.history,T,ot,tt,ue,!1,f.unstable_skipActionErrorRevalidation,X,ce,ne,F,q,U,Ye,c,[$e.route.id,te]);At.filter(ar=>ar.key!==le).forEach(ar=>{let Fr=ar.key,mi=T.fetchers.get(Fr),ei=Ih(void 0,mi?mi.data:void 0);T.fetchers.set(Fr,ei),ee.has(Fr)&&sn(Fr),ar.controller&&ee.set(Fr,ar.controller)}),K({fetchers:new Map(T.fetchers)});let cr=()=>At.forEach(ar=>sn(ar.key));xt.signal.addEventListener("abort",cr);let{loaderResults:ft,fetcherResults:Gt}=await on(T.matches,ot,Pt,At,ze);if(xt.signal.aborted)return;xt.signal.removeEventListener("abort",cr),j.delete(le),ee.delete(le),At.forEach(ar=>ee.delete(ar.key));let it=f$([...ft,...Gt]);if(it){if(it.idx>=Pt.length){let ar=At[it.idx-Pt.length].key;U.add(ar)}return Lt(ze,it.result)}let{loaderData:Ct,errors:Et}=l$(T,T.matches,Pt,ft,void 0,At,Gt,V);if(T.fetchers.has(le)){let ar=_l(te.data);T.fetchers.set(le,ar)}xa(Wt),T.navigation.state==="loading"&&Wt>Z?(qt(A,"Expected pending action"),B&&B.abort(),we(T.navigation.location,{matches:ot,loaderData:Ct,errors:Et,fetchers:new Map(T.fetchers)})):(K({errors:Et,loaderData:u$(T.loaderData,Ct,ot,Et),fetchers:new Map(T.fetchers)}),X=!1)}async function jt(le,ye,xe,$e,Be,pt,tt){let Ue=T.fetchers.get(le);Ir(le,Ih(tt,Ue?Ue.data:void 0),{flushSync:pt});let xt=new AbortController,H=dd(e.history,xe,xt.signal);ee.set(le,xt);let L=ge,te=(await ht("loader",H,[$e],Be))[0];if(zu(te)&&(te=await VL(te,H.signal,!0)||te),ee.get(le)===xt&&ee.delete(le),!H.signal.aborted){if(F.has(le)){Ir(le,_l(void 0));return}if(qu(te))if(Z>L){Ir(le,_l(void 0));return}else{U.add(le),await Lt(H,te);return}if(jo(te)){Jr(le,ye,te.error);return}qt(!zu(te),"Unhandled fetcher deferred data"),Ir(le,_l(te.data))}}async function Lt(le,ye,xe){let{submission:$e,fetcherSubmission:Be,replace:pt}=xe===void 0?{}:xe;ye.response.headers.has("X-Remix-Revalidate")&&(X=!0);let tt=ye.response.headers.get("Location");qt(tt,"Expected a Location header on the redirect Response"),tt=a$(tt,new URL(le.url),c);let Ue=Qp(T.location,tt,{_isRedirect:!0});if(r){let ue=!1;if(ye.response.headers.has("X-Remix-Reload-Document"))ue=!0;else if(gE.test(tt)){const ze=e.history.createURL(tt);ue=ze.origin!==t.location.origin||Of(ze.pathname,c)==null}if(ue){pt?t.location.replace(tt):t.location.assign(tt);return}}B=null;let xt=pt===!0?Pn.Replace:Pn.Push,{formMethod:H,formAction:L,formEncType:G}=T.navigation;!$e&&!Be&&H&&L&&G&&($e=p$(T.navigation));let te=$e||Be;if(Hoe.has(ye.response.status)&&te&&oa(te.formMethod))await Ce(xt,Ue,{submission:Qr({},te,{formAction:tt}),preventScrollReset:M});else{let ue=t_(Ue,$e);await Ce(xt,Ue,{overrideNavigation:ue,fetcherSubmission:Be,preventScrollReset:M})}}async function ht(le,ye,xe,$e){try{let Be=await Zoe(d,le,ye,xe,$e,o,i);return await Promise.all(Be.map((pt,tt)=>{if(oae(pt)){let Ue=pt.result;return{type:Yr.redirect,response:rae(Ue,ye,xe[tt].route.id,$e,c,f.v7_relativeSplatPath)}}return tae(pt)}))}catch(Be){return xe.map(()=>({type:Yr.error,error:Be}))}}async function on(le,ye,xe,$e,Be){let[pt,...tt]=await Promise.all([xe.length?ht("loader",Be,xe,ye):[],...$e.map(Ue=>{if(Ue.matches&&Ue.match&&Ue.controller){let xt=dd(e.history,Ue.path,Ue.controller.signal);return ht("loader",xt,[Ue.match],Ue.matches).then(H=>H[0])}else return Promise.resolve({type:Yr.error,error:ko(404,{pathname:Ue.path})})})]);return await Promise.all([h$(le,xe,pt,pt.map(()=>Be.signal),!1,T.loaderData),h$(le,$e.map(Ue=>Ue.match),tt,$e.map(Ue=>Ue.controller?Ue.controller.signal:null),!0)]),{loaderResults:pt,fetcherResults:tt}}function mn(){X=!0,ce.push(...Ko()),q.forEach((le,ye)=>{ee.has(ye)&&(ne.push(ye),sn(ye))})}function Ir(le,ye,xe){xe===void 0&&(xe={}),T.fetchers.set(le,ye),K({fetchers:new Map(T.fetchers)},{flushSync:(xe&&xe.flushSync)===!0})}function Jr(le,ye,xe,$e){$e===void 0&&($e={});let Be=mp(T.matches,ye);Nr(le),K({errors:{[Be.route.id]:xe},fetchers:new Map(T.fetchers)},{flushSync:($e&&$e.flushSync)===!0})}function vn(le){return f.v7_fetcherPersist&&($.set(le,($.get(le)||0)+1),F.has(le)&&F.delete(le)),T.fetchers.get(le)||Woe}function Nr(le){let ye=T.fetchers.get(le);ee.has(le)&&!(ye&&ye.state==="loading"&&j.has(le))&&sn(le),q.delete(le),j.delete(le),U.delete(le),F.delete(le),T.fetchers.delete(le)}function an(le){if(f.v7_fetcherPersist){let ye=($.get(le)||0)-1;ye<=0?($.delete(le),F.add(le)):$.set(le,ye)}else Nr(le);K({fetchers:new Map(T.fetchers)})}function sn(le){let ye=ee.get(le);qt(ye,"Expected fetch controller: "+le),ye.abort(),ee.delete(le)}function _a(le){for(let ye of le){let xe=vn(ye),$e=_l(xe.data);T.fetchers.set(ye,$e)}}function Yi(){let le=[],ye=!1;for(let xe of U){let $e=T.fetchers.get(xe);qt($e,"Expected fetcher: "+xe),$e.state==="loading"&&(U.delete(xe),le.push(xe),ye=!0)}return _a(le),ye}function xa(le){let ye=[];for(let[xe,$e]of j)if($e<le){let Be=T.fetchers.get(xe);qt(Be,"Expected fetcher: "+xe),Be.state==="loading"&&(sn(xe),j.delete(xe),ye.push(xe))}return _a(ye),ye.length>0}function Xi(le,ye){let xe=T.blockers.get(le)||Rh;return de.get(le)!==ye&&de.set(le,ye),xe}function Oi(le){T.blockers.delete(le),de.delete(le)}function gn(le,ye){let xe=T.blockers.get(le)||Rh;qt(xe.state==="unblocked"&&ye.state==="blocked"||xe.state==="blocked"&&ye.state==="blocked"||xe.state==="blocked"&&ye.state==="proceeding"||xe.state==="blocked"&&ye.state==="unblocked"||xe.state==="proceeding"&&ye.state==="unblocked","Invalid blocker state transition: "+xe.state+" -> "+ye.state);let $e=new Map(T.blockers);$e.set(le,ye),K({blockers:$e})}function Wo(le){let{currentLocation:ye,nextLocation:xe,historyAction:$e}=le;if(de.size===0)return;de.size>1&&lc(!1,"A router only supports one blocker at a time");let Be=Array.from(de.entries()),[pt,tt]=Be[Be.length-1],Ue=T.blockers.get(pt);if(!(Ue&&Ue.state==="proceeding")&&tt({currentLocation:ye,nextLocation:xe,historyAction:$e}))return pt}function Ko(le){let ye=[];return V.forEach((xe,$e)=>{(!le||le($e))&&(xe.cancel(),ye.push($e),V.delete($e))}),ye}function Pa(le,ye,xe){if(g=le,y=ye,b=xe||null,!w&&T.navigation===e_){w=!0;let $e=pi(T.location,T.matches);$e!=null&&K({restoreScrollPosition:$e})}return()=>{g=null,y=null,b=null}}function qn(le,ye){return b&&b(le,ye.map($e=>_oe($e,T.loaderData)))||le.key}function vo(le,ye){if(g&&y){let xe=qn(le,ye);g[xe]=y()}}function pi(le,ye){if(g){let xe=qn(le,ye),$e=g[xe];if(typeof $e=="number")return $e}return null}function Ji(le){o={},l=Yx(le,i,void 0,o)}return R={get basename(){return c},get future(){return f},get state(){return T},get routes(){return a},get window(){return t},initialize:Ee,subscribe:Y,enableScrollRestoration:Pa,navigate:Te,fetch:Kt,revalidate:he,createHref:le=>e.history.createHref(le),encodeLocation:le=>e.history.encodeLocation(le),getFetcher:vn,deleteFetcher:an,dispose:Me,getBlocker:Xi,deleteBlocker:Oi,_internalFetchControllers:ee,_internalActiveDeferreds:V,_internalSetRoutes:Ji},R}function Qoe(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Xx(e,t,r,n,i,o,a,l){let c,d;if(a){c=[];for(let p of t)if(c.push(p),p.route.id===a){d=p;break}}else c=t,d=t[t.length-1];let f=pE(i||".",hE(c,o),Of(e.pathname,r)||e.pathname,l==="path");return i==null&&(f.search=e.search,f.hash=e.hash),(i==null||i===""||i===".")&&d&&d.route.index&&!yE(f.search)&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(f.pathname=f.pathname==="/"?r:Is([r,f.pathname])),uc(f)}function r$(e,t,r,n){if(!n||!Qoe(n))return{path:r};if(n.formMethod&&!sae(n.formMethod))return{path:r,error:ko(405,{method:n.formMethod})};let i=()=>({path:r,error:ko(400,{type:"invalid-body"})}),o=n.formMethod||"get",a=e?o.toUpperCase():o.toLowerCase(),l=LL(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!oa(a))return i();let m=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((g,b)=>{let[y,w]=b;return""+g+y+"="+w+`
|
368
|
-
`},""):String(n.body);return{path:r,submission:{formMethod:a,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:m}}}else if(n.formEncType==="application/json"){if(!oa(a))return i();try{let m=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:a,formAction:l,formEncType:n.formEncType,formData:void 0,json:m,text:void 0}}}catch{return i()}}}qt(typeof FormData=="function","FormData is not available in this environment");let c,d;if(n.formData)c=Jx(n.formData),d=n.formData;else if(n.body instanceof FormData)c=Jx(n.body),d=n.body;else if(n.body instanceof URLSearchParams)c=n.body,d=s$(c);else if(n.body==null)c=new URLSearchParams,d=new FormData;else try{c=new URLSearchParams(n.body),d=s$(c)}catch{return i()}let f={formMethod:a,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:d,json:void 0,text:void 0};if(oa(f.formMethod))return{path:r,submission:f};let p=iu(r);return t&&p.search&&yE(p.search)&&c.append("index",""),p.search="?"+c,{path:uc(p),submission:f}}function Yoe(e,t){let r=e;if(t){let n=e.findIndex(i=>i.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function n$(e,t,r,n,i,o,a,l,c,d,f,p,m,g,b,y){let w=y?jo(y[1])?y[1].error:y[1].data:void 0,_=e.createURL(t.location),S=e.createURL(i),C=y&&jo(y[1])?y[0]:void 0,k=C?Yoe(r,C):r,E=y?y[1].statusCode:void 0,R=a&&E&&E>=400,T=k.filter((M,B)=>{let{route:Q}=M;if(Q.lazy)return!0;if(Q.loader==null)return!1;if(o)return typeof Q.loader!="function"||Q.loader.hydrate?!0:t.loaderData[Q.id]===void 0&&(!t.errors||t.errors[Q.id]===void 0);if(Xoe(t.loaderData,t.matches[B],M)||c.some(N=>N===M.route.id))return!0;let se=t.matches[B],ie=M;return i$(M,Qr({currentUrl:_,currentParams:se.params,nextUrl:S,nextParams:ie.params},n,{actionResult:w,unstable_actionStatus:E,defaultShouldRevalidate:R?!1:l||_.pathname+_.search===S.pathname+S.search||_.search!==S.search||FL(se,ie)}))}),A=[];return p.forEach((M,B)=>{if(o||!r.some(X=>X.route.id===M.routeId)||f.has(B))return;let Q=Nd(g,M.path,b);if(!Q){A.push({key:B,routeId:M.routeId,path:M.path,matches:null,match:null,controller:null});return}let se=t.fetchers.get(B),ie=Zx(Q,M.path),N=!1;m.has(B)?N=!1:d.includes(B)?N=!0:se&&se.state!=="idle"&&se.data===void 0?N=l:N=i$(ie,Qr({currentUrl:_,currentParams:t.matches[t.matches.length-1].params,nextUrl:S,nextParams:r[r.length-1].params},n,{actionResult:w,unstable_actionStatus:E,defaultShouldRevalidate:R?!1:l})),N&&A.push({key:B,routeId:M.routeId,path:M.path,matches:Q,match:ie,controller:new AbortController})}),[T,A]}function Xoe(e,t,r){let n=!t||r.route.id!==t.route.id,i=e[r.route.id]===void 0;return n||i}function FL(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function i$(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function o$(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let i=r[e.id];qt(i,"No route found in manifest");let o={};for(let a in n){let c=i[a]!==void 0&&a!=="hasErrorBoundary";lc(!c,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!c&&!woe.has(a)&&(o[a]=n[a])}Object.assign(i,o),Object.assign(i,Qr({},t(i),{lazy:void 0}))}function Joe(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function Zoe(e,t,r,n,i,o,a,l){let c=n.reduce((p,m)=>p.add(m.route.id),new Set),d=new Set,f=await e({matches:i.map(p=>{let m=c.has(p.route.id);return Qr({},p,{shouldLoad:m,resolve:b=>(d.add(p.route.id),m?eae(t,r,p,o,a,b,l):Promise.resolve({type:Yr.data,result:void 0}))})}),request:r,params:i[0].params,context:l});return i.forEach(p=>qt(d.has(p.route.id),'`match.resolve()` was not called for route id "'+p.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),f.filter((p,m)=>c.has(i[m].route.id))}async function eae(e,t,r,n,i,o,a){let l,c,d=f=>{let p,m=new Promise((y,w)=>p=w);c=()=>p(),t.signal.addEventListener("abort",c);let g=y=>typeof f!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):f({request:t,params:r.params,context:a},...y!==void 0?[y]:[]),b;return o?b=o(y=>g(y)):b=(async()=>{try{return{type:"data",result:await g()}}catch(y){return{type:"error",result:y}}})(),Promise.race([b,m])};try{let f=r.route[e];if(r.route.lazy)if(f){let p,[m]=await Promise.all([d(f).catch(g=>{p=g}),o$(r.route,i,n)]);if(p!==void 0)throw p;l=m}else if(await o$(r.route,i,n),f=r.route[e],f)l=await d(f);else if(e==="action"){let p=new URL(t.url),m=p.pathname+p.search;throw ko(405,{method:t.method,pathname:m,routeId:r.route.id})}else return{type:Yr.data,result:void 0};else if(f)l=await d(f);else{let p=new URL(t.url),m=p.pathname+p.search;throw ko(404,{pathname:m})}qt(l.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(f){return{type:Yr.error,result:f}}finally{c&&t.signal.removeEventListener("abort",c)}return l}async function tae(e){let{result:t,type:r,status:n}=e;if(BL(t)){let a;try{let l=t.headers.get("Content-Type");l&&/\bapplication\/json\b/.test(l)?t.body==null?a=null:a=await t.json():a=await t.text()}catch(l){return{type:Yr.error,error:l}}return r===Yr.error?{type:Yr.error,error:new mE(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:Yr.data,data:a,statusCode:t.status,headers:t.headers}}if(r===Yr.error)return{type:Yr.error,error:t,statusCode:vE(t)?t.status:n};if(aae(t)){var i,o;return{type:Yr.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:Yr.data,data:t,statusCode:n}}function rae(e,t,r,n,i,o){let a=e.headers.get("Location");if(qt(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!gE.test(a)){let l=n.slice(0,n.findIndex(c=>c.route.id===r)+1);a=Xx(new URL(t.url),l,i,!0,a,o),e.headers.set("Location",a)}return e}function a$(e,t,r){if(gE.test(e)){let n=e,i=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=Of(i.pathname,r)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function dd(e,t,r,n){let i=e.createURL(LL(t)).toString(),o={signal:r};if(n&&oa(n.formMethod)){let{formMethod:a,formEncType:l}=n;o.method=a.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(n.json)):l==="text/plain"?o.body=n.text:l==="application/x-www-form-urlencoded"&&n.formData?o.body=Jx(n.formData):o.body=n.formData}return new Request(i,o)}function Jx(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function s$(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function nae(e,t,r,n,i,o){let a={},l=null,c,d=!1,f={},p=n&&jo(n[1])?n[1].error:void 0;return r.forEach((m,g)=>{let b=t[g].route.id;if(qt(!qu(m),"Cannot handle redirect results in processLoaderData"),jo(m)){let y=m.error;p!==void 0&&(y=p,p=void 0),l=l||{};{let w=mp(e,b);l[w.route.id]==null&&(l[w.route.id]=y)}a[b]=void 0,d||(d=!0,c=vE(m.error)?m.error.status:500),m.headers&&(f[b]=m.headers)}else zu(m)?(i.set(b,m.deferredData),a[b]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!d&&(c=m.statusCode),m.headers&&(f[b]=m.headers)):(a[b]=m.data,m.statusCode&&m.statusCode!==200&&!d&&(c=m.statusCode),m.headers&&(f[b]=m.headers))}),p!==void 0&&n&&(l={[n[0]]:p},a[n[0]]=void 0),{loaderData:a,errors:l,statusCode:c||200,loaderHeaders:f}}function l$(e,t,r,n,i,o,a,l){let{loaderData:c,errors:d}=nae(t,r,n,i,l);for(let f=0;f<o.length;f++){let{key:p,match:m,controller:g}=o[f];qt(a!==void 0&&a[f]!==void 0,"Did not find corresponding fetcher result");let b=a[f];if(!(g&&g.signal.aborted))if(jo(b)){let y=mp(e.matches,m==null?void 0:m.route.id);d&&d[y.route.id]||(d=Qr({},d,{[y.route.id]:b.error})),e.fetchers.delete(p)}else if(qu(b))qt(!1,"Unhandled fetcher revalidation redirect");else if(zu(b))qt(!1,"Unhandled fetcher deferred data");else{let y=_l(b.data);e.fetchers.set(p,y)}}return{loaderData:c,errors:d}}function u$(e,t,r,n){let i=Qr({},t);for(let o of r){let a=o.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(i[a]=t[a]):e[a]!==void 0&&o.route.loader&&(i[a]=e[a]),n&&n.hasOwnProperty(a))break}return i}function c$(e){return e?jo(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function mp(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function d$(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ko(e,t){let{pathname:r,routeId:n,method:i,type:o}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",i&&r&&n?l="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(a="Not Found",l='No route matches URL "'+r+'"'):e===405&&(a="Method Not Allowed",i&&r&&n?l="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new mE(e||500,a,new Error(l),!0)}function f$(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(qu(r))return{result:r,idx:t}}}function LL(e){let t=typeof e=="string"?iu(e):e;return uc(Qr({},t,{hash:""}))}function iae(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function oae(e){return BL(e.result)&&Uoe.has(e.result.status)}function zu(e){return e.type===Yr.deferred}function jo(e){return e.type===Yr.error}function qu(e){return(e&&e.type)===Yr.redirect}function aae(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function BL(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function sae(e){return qoe.has(e.toLowerCase())}function oa(e){return Voe.has(e.toLowerCase())}async function h$(e,t,r,n,i,o){for(let a=0;a<r.length;a++){let l=r[a],c=t[a];if(!c)continue;let d=e.find(p=>p.route.id===c.route.id),f=d!=null&&!FL(d,c)&&(o&&o[c.route.id])!==void 0;if(zu(l)&&(i||f)){let p=n[a];qt(p,"Expected an AbortSignal for revalidating fetcher deferred result"),await VL(l,p,i).then(m=>{m&&(r[a]=m||r[a])})}}}async function VL(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:Yr.data,data:e.deferredData.unwrappedData}}catch(i){return{type:Yr.error,error:i}}return{type:Yr.data,data:e.deferredData.data}}}function yE(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Zx(e,t){let r=typeof t=="string"?iu(t).search:t.search;if(e[e.length-1].route.index&&yE(r||""))return e[e.length-1];let n=DL(e);return n[n.length-1]}function p$(e){let{formMethod:t,formAction:r,formEncType:n,text:i,formData:o,json:a}=e;if(!(!t||!r||!n)){if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:a,text:void 0}}}function t_(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function lae(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ih(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function uae(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function _l(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function cae(e,t){try{let r=e.sessionStorage.getItem(NL);if(r){let n=JSON.parse(r);for(let[i,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function dae(e,t){if(t.size>0){let r={};for(let[n,i]of t)r[n]=[...i];try{e.sessionStorage.setItem(NL,JSON.stringify(r))}catch(n){lc(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
|
369
|
-
* React Router v6.23.1
|
370
|
-
*
|
371
|
-
* Copyright (c) Remix Software Inc.
|
372
|
-
*
|
373
|
-
* This source code is licensed under the MIT license found in the
|
374
|
-
* LICENSE.md file in the root directory of this source tree.
|
375
|
-
*
|
376
|
-
* @license MIT
|
377
|
-
*/function Rb(){return Rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rb.apply(this,arguments)}const N0=O.createContext(null),zL=O.createContext(null),_c=O.createContext(null),bE=O.createContext(null),Hs=O.createContext({outlet:null,matches:[],isDataRoute:!1}),qL=O.createContext(null);function fae(e,t){let{relative:r}=t===void 0?{}:t;Um()||qt(!1);let{basename:n,navigator:i}=O.useContext(_c),{hash:o,pathname:a,search:l}=HL(e,{relative:r}),c=a;return n!=="/"&&(c=a==="/"?n:Is([n,a])),i.createHref({pathname:c,search:l,hash:o})}function Um(){return O.useContext(bE)!=null}function Rf(){return Um()||qt(!1),O.useContext(bE).location}function UL(e){O.useContext(_c).static||O.useLayoutEffect(e)}function ou(){let{isDataRoute:e}=O.useContext(Hs);return e?Eae():hae()}function hae(){Um()||qt(!1);let e=O.useContext(N0),{basename:t,future:r,navigator:n}=O.useContext(_c),{matches:i}=O.useContext(Hs),{pathname:o}=Rf(),a=JSON.stringify(hE(i,r.v7_relativeSplatPath)),l=O.useRef(!1);return UL(()=>{l.current=!0}),O.useCallback(function(d,f){if(f===void 0&&(f={}),!l.current)return;if(typeof d=="number"){n.go(d);return}let p=pE(d,JSON.parse(a),o,f.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Is([t,p.pathname])),(f.replace?n.replace:n.push)(p,f.state,f)},[t,n,a,o,e])}const pae=O.createContext(null);function mae(e){let t=O.useContext(Hs).outlet;return t&&O.createElement(pae.Provider,{value:e},t)}function vae(){let{matches:e}=O.useContext(Hs),t=e[e.length-1];return t?t.params:{}}function HL(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=O.useContext(_c),{matches:i}=O.useContext(Hs),{pathname:o}=Rf(),a=JSON.stringify(hE(i,n.v7_relativeSplatPath));return O.useMemo(()=>pE(e,JSON.parse(a),o,r==="path"),[e,a,o,r])}function gae(e,t,r,n){Um()||qt(!1);let{navigator:i}=O.useContext(_c),{matches:o}=O.useContext(Hs),a=o[o.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let d=Rf(),f;f=d;let p=f.pathname||"/",m=p;if(c!=="/"){let y=c.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(y.length).join("/")}let g=Nd(e,{pathname:m});return _ae(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:Is([c,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:Is([c,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,r,n)}function yae(){let e=wE(),t=vE(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},t),r?O.createElement("pre",{style:i},r):null,null)}const bae=O.createElement(yae,null);class wae extends O.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?O.createElement(Hs.Provider,{value:this.props.routeContext},O.createElement(qL.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Sae(e){let{routeContext:t,match:r,children:n}=e,i=O.useContext(N0);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),O.createElement(Hs.Provider,{value:t},n)}function _ae(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let a=e,l=(i=r)==null?void 0:i.errors;if(l!=null){let f=a.findIndex(p=>p.route.id&&(l==null?void 0:l[p.route.id])!==void 0);f>=0||qt(!1),a=a.slice(0,Math.min(a.length,f+1))}let c=!1,d=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f<a.length;f++){let p=a[f];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=f),p.route.id){let{loaderData:m,errors:g}=r,b=p.route.loader&&m[p.route.id]===void 0&&(!g||g[p.route.id]===void 0);if(p.route.lazy||b){c=!0,d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}return a.reduceRight((f,p,m)=>{let g,b=!1,y=null,w=null;r&&(g=l&&p.route.id?l[p.route.id]:void 0,y=p.route.errorElement||bae,c&&(d<0&&m===0?(Tae("route-fallback"),b=!0,w=null):d===m&&(b=!0,w=p.route.hydrateFallbackElement||null)));let _=t.concat(a.slice(0,m+1)),S=()=>{let C;return g?C=y:b?C=w:p.route.Component?C=O.createElement(p.route.Component,null):p.route.element?C=p.route.element:C=f,O.createElement(Sae,{match:p,routeContext:{outlet:f,matches:_,isDataRoute:r!=null},children:C})};return r&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?O.createElement(wae,{location:r.location,revalidation:r.revalidation,component:y,error:g,children:S(),routeContext:{outlet:null,matches:_,isDataRoute:!0}}):S()},null)}var WL=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(WL||{}),KL=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(KL||{});function GL(e){let t=O.useContext(N0);return t||qt(!1),t}function F0(e){let t=O.useContext(zL);return t||qt(!1),t}function xae(e){let t=O.useContext(Hs);return t||qt(!1),t}function QL(e){let t=xae(),r=t.matches[t.matches.length-1];return r.route.id||qt(!1),r.route.id}function Pae(){return F0().navigation}function Cae(){let e=GL(WL.UseRevalidator),t=F0(KL.UseRevalidator);return O.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function Ho(e){return F0().loaderData[e]}function wE(){var e;let t=O.useContext(qL),r=F0(),n=QL();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Eae(){let{router:e}=GL(),t=QL(),r=O.useRef(!1);return UL(()=>{r.current=!0}),O.useCallback(function(i,o){o===void 0&&(o={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Rb({fromRouteId:t},o)))},[e,t])}const m$={};function Tae(e,t,r){m$[e]||(m$[e]=!0)}function Ib(e){return mae(e.context)}function Oae(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Pn.Pop,navigator:o,static:a=!1,future:l}=e;Um()&&qt(!1);let c=t.replace(/^\/*/,"/"),d=O.useMemo(()=>({basename:c,navigator:o,static:a,future:Rb({v7_relativeSplatPath:!1},l)}),[c,l,o,a]);typeof n=="string"&&(n=iu(n));let{pathname:f="/",search:p="",hash:m="",state:g=null,key:b="default"}=n,y=O.useMemo(()=>{let w=Of(f,c);return w==null?null:{location:{pathname:w,search:p,hash:m,state:g,key:b},navigationType:i}},[c,f,p,m,g,b,i]);return y==null?null:O.createElement(_c.Provider,{value:d},O.createElement(bE.Provider,{children:r,value:y}))}new Promise(()=>{});function Rae(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:O.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:O.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:O.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
|
378
|
-
* React Router DOM v6.23.1
|
379
|
-
*
|
380
|
-
* Copyright (c) Remix Software Inc.
|
381
|
-
*
|
382
|
-
* This source code is licensed under the MIT license found in the
|
383
|
-
* LICENSE.md file in the root directory of this source tree.
|
384
|
-
*
|
385
|
-
* @license MIT
|
386
|
-
*/function Yp(){return Yp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yp.apply(this,arguments)}function Iae(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function kae(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function jae(e,t){return e.button===0&&(!t||t==="_self")&&!kae(e)}function eP(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function $ae(e,t){let r=eP(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(o=>{r.append(i,o)})}),r}const Aae=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Dae="6";try{window.__reactRouterVersion=Dae}catch{}function Mae(e,t){return Goe({basename:void 0,future:Yp({},void 0,{v7_prependBasename:!0}),history:goe({window:void 0}),hydrationData:Nae(),routes:e,mapRouteProperties:Rae,unstable_dataStrategy:void 0,window:void 0}).initialize()}function Nae(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Yp({},t,{errors:Fae(t.errors)})),t}function Fae(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,i]of t)if(i&&i.__type==="RouteErrorResponse")r[n]=new mE(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let a=new o(i.message);a.stack="",r[n]=a}catch{}}if(r[n]==null){let o=new Error(i.message);o.stack="",r[n]=o}}else r[n]=i;return r}const Lae=O.createContext({isTransitioning:!1}),Bae=O.createContext(new Map),Vae="startTransition",v$=ex[Vae],zae="flushSync",g$=A8[zae];function qae(e){v$?v$(e):e()}function kh(e){g$?g$(e):e()}class Uae{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function Hae(e){let{fallbackElement:t,router:r,future:n}=e,[i,o]=O.useState(r.state),[a,l]=O.useState(),[c,d]=O.useState({isTransitioning:!1}),[f,p]=O.useState(),[m,g]=O.useState(),[b,y]=O.useState(),w=O.useRef(new Map),{v7_startTransition:_}=n||{},S=O.useCallback(T=>{_?qae(T):T()},[_]),C=O.useCallback((T,A)=>{let{deletedFetchers:M,unstable_flushSync:B,unstable_viewTransitionOpts:Q}=A;M.forEach(ie=>w.current.delete(ie)),T.fetchers.forEach((ie,N)=>{ie.data!==void 0&&w.current.set(N,ie.data)});let se=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!Q||se){B?kh(()=>o(T)):S(()=>o(T));return}if(B){kh(()=>{m&&(f&&f.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation})});let ie=r.window.document.startViewTransition(()=>{kh(()=>o(T))});ie.finished.finally(()=>{kh(()=>{p(void 0),g(void 0),l(void 0),d({isTransitioning:!1})})}),kh(()=>g(ie));return}m?(f&&f.resolve(),m.skipTransition(),y({state:T,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation})):(l(T),d({isTransitioning:!0,flushSync:!1,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation}))},[r.window,m,f,w,S]);O.useLayoutEffect(()=>r.subscribe(C),[r,C]),O.useEffect(()=>{c.isTransitioning&&!c.flushSync&&p(new Uae)},[c]),O.useEffect(()=>{if(f&&a&&r.window){let T=a,A=f.promise,M=r.window.document.startViewTransition(async()=>{S(()=>o(T)),await A});M.finished.finally(()=>{p(void 0),g(void 0),l(void 0),d({isTransitioning:!1})}),g(M)}},[S,a,f,r.window]),O.useEffect(()=>{f&&a&&i.location.key===a.location.key&&f.resolve()},[f,m,i.location,a]),O.useEffect(()=>{!c.isTransitioning&&b&&(l(b.state),d({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}),y(void 0))},[c.isTransitioning,b]),O.useEffect(()=>{},[]);let k=O.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:T=>r.navigate(T),push:(T,A,M)=>r.navigate(T,{state:A,preventScrollReset:M==null?void 0:M.preventScrollReset}),replace:(T,A,M)=>r.navigate(T,{replace:!0,state:A,preventScrollReset:M==null?void 0:M.preventScrollReset})}),[r]),E=r.basename||"/",R=O.useMemo(()=>({router:r,navigator:k,static:!1,basename:E}),[r,k,E]);return O.createElement(O.Fragment,null,O.createElement(N0.Provider,{value:R},O.createElement(zL.Provider,{value:i},O.createElement(Bae.Provider,{value:w.current},O.createElement(Lae.Provider,{value:c},O.createElement(Oae,{basename:E,location:i.location,navigationType:i.historyAction,navigator:k,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},i.initialized||r.future.v7_partialHydration?O.createElement(Wae,{routes:r.routes,future:r.future,state:i}):t))))),null)}function Wae(e){let{routes:t,future:r,state:n}=e;return gae(t,void 0,n,r)}const Kae=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gae=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qo=O.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:o,replace:a,state:l,target:c,to:d,preventScrollReset:f,unstable_viewTransition:p}=t,m=Iae(t,Aae),{basename:g}=O.useContext(_c),b,y=!1;if(typeof d=="string"&&Gae.test(d)&&(b=d,Kae))try{let C=new URL(window.location.href),k=d.startsWith("//")?new URL(C.protocol+d):new URL(d),E=Of(k.pathname,g);k.origin===C.origin&&E!=null?d=E+k.search+k.hash:y=!0}catch{}let w=fae(d,{relative:i}),_=Qae(d,{replace:a,state:l,target:c,preventScrollReset:f,relative:i,unstable_viewTransition:p});function S(C){n&&n(C),C.defaultPrevented||_(C)}return O.createElement("a",Yp({},m,{href:b||w,onClick:y||o?n:S,ref:r,target:c}))});var y$;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(y$||(y$={}));var b$;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(b$||(b$={}));function Qae(e,t){let{target:r,replace:n,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:l}=t===void 0?{}:t,c=ou(),d=Rf(),f=HL(e,{relative:a});return O.useCallback(p=>{if(jae(p,r)){p.preventDefault();let m=n!==void 0?n:uc(d)===uc(f);c(e,{replace:m,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:l})}},[d,c,f,n,i,r,e,o,a,l])}function Yae(e){let t=O.useRef(eP(e)),r=O.useRef(!1),n=Rf(),i=O.useMemo(()=>$ae(n.search,r.current?null:t.current),[n.search]),o=ou(),a=O.useCallback((l,c)=>{const d=eP(typeof l=="function"?l(i):l);r.current=!0,o("?"+d,c)},[o,i]);return[i,a]}var r_="Invariant Violation",w$=Object.setPrototypeOf,Xae=w$===void 0?function(e,t){return e.__proto__=t,e}:w$,YL=function(e){ga(t,e);function t(r){r===void 0&&(r=r_);var n=e.call(this,typeof r=="number"?r_+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=r_,Xae(n,t.prototype),n}return t}(Error);function Fu(e,t){if(!e)throw new YL(t)}var XL=["debug","log","warn","error","silent"],Jae=XL.indexOf("log");function Pg(e){return function(){if(XL.indexOf(e)>=Jae){var t=console[e]||console.log;return t.apply(console,arguments)}}}(function(e){e.debug=Pg("debug"),e.log=Pg("log"),e.warn=Pg("warn"),e.error=Pg("error")})(Fu||(Fu={}));var SE="3.10.4";function aa(e){try{return e()}catch{}}const tP=aa(function(){return globalThis})||aa(function(){return window})||aa(function(){return self})||aa(function(){return global})||aa(function(){return aa.constructor("return this")()});var S$=new Map;function rP(e){var t=S$.get(e)||1;return S$.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function JL(e,t){t===void 0&&(t=0);var r=rP("stringifyForDisplay");return JSON.stringify(e,function(n,i){return i===void 0?r:i},t).split(JSON.stringify(r)).join("<undefined>")}function Cg(e){return function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(typeof t=="number"){var i=t;t=_E(i),t||(t=xE(i,r),r=[])}e.apply(void 0,[t].concat(r))}}var _t=Object.assign(function(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];t||Fu(t,_E(r,n)||xE(r,n))},{debug:Cg(Fu.debug),log:Cg(Fu.log),warn:Cg(Fu.warn),error:Cg(Fu.error)});function Ei(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new YL(_E(e,t)||xE(e,t))}var _$=Symbol.for("ApolloErrorMessageHandler_"+SE);function ZL(e){return typeof e=="string"?e:JL(e,2).slice(0,1e3)}function _E(e,t){if(t===void 0&&(t=[]),!!e)return tP[_$]&&tP[_$](e,t.map(ZL))}function xE(e,t){if(t===void 0&&(t=[]),!!e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:SE,message:e,args:t.map(ZL)})))}function Gy(e,t){if(!!!e)throw new Error(t)}function Zae(e){return typeof e=="object"&&e!==null}function ese(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const tse=/\r\n|[\n\r]/g;function nP(e,t){let r=0,n=1;for(const i of e.body.matchAll(tse)){if(typeof i.index=="number"||ese(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function rse(e){return e5(e.source,nP(e.source,e.start))}function e5(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,l=t.line===1?r:0,c=t.column+l,d=`${e.name}:${a}:${c}
|
387
|
-
`,f=n.split(/\r\n|[\n\r]/g),p=f[i];if(p.length>120){const m=Math.floor(c/80),g=c%80,b=[];for(let y=0;y<p.length;y+=80)b.push(p.slice(y,y+80));return d+x$([[`${a} |`,b[0]],...b.slice(1,m+1).map(y=>["|",y]),["|","^".padStart(g)],["|",b[m+1]]])}return d+x$([[`${a-1} |`,f[i-1]],[`${a} |`,p],["|","^".padStart(c)],[`${a+1} |`,f[i+1]]])}function x$(e){const t=e.filter(([n,i])=>i!==void 0),r=Math.max(...t.map(([n])=>n.length));return t.map(([n,i])=>n.padStart(r)+(i?" "+i:"")).join(`
|
388
|
-
`)}function nse(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class PE extends Error{constructor(t,...r){var n,i,o;const{nodes:a,source:l,positions:c,path:d,originalError:f,extensions:p}=nse(r);super(t),this.name="GraphQLError",this.path=d??void 0,this.originalError=f??void 0,this.nodes=P$(Array.isArray(a)?a:a?[a]:void 0);const m=P$((n=this.nodes)===null||n===void 0?void 0:n.map(b=>b.loc).filter(b=>b!=null));this.source=l??(m==null||(i=m[0])===null||i===void 0?void 0:i.source),this.positions=c??(m==null?void 0:m.map(b=>b.start)),this.locations=c&&l?c.map(b=>nP(l,b)):m==null?void 0:m.map(b=>nP(b.source,b.start));const g=Zae(f==null?void 0:f.extensions)?f==null?void 0:f.extensions:void 0;this.extensions=(o=p??g)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),f!=null&&f.stack?Object.defineProperty(this,"stack",{value:f.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,PE):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(t+=`
|
389
|
-
|
390
|
-
`+rse(r.loc));else if(this.source&&this.locations)for(const r of this.locations)t+=`
|
391
|
-
|
392
|
-
`+e5(this.source,r);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function P$(e){return e===void 0||e.length===0?void 0:e}function Ln(e,t,r){return new PE(`Syntax Error: ${r}`,{source:e,positions:[t]})}class ise{constructor(t,r,n){this.start=t.start,this.end=r.end,this.startToken=t,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class t5{constructor(t,r,n,i,o,a){this.kind=t,this.start=r,this.end=n,this.line=i,this.column=o,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const r5={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},ose=new Set(Object.keys(r5));function C$(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&ose.has(t)}var Fd;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Fd||(Fd={}));var iP;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(iP||(iP={}));var Je;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(Je||(Je={}));function oP(e){return e===9||e===32}function Xp(e){return e>=48&&e<=57}function n5(e){return e>=97&&e<=122||e>=65&&e<=90}function i5(e){return n5(e)||e===95}function ase(e){return n5(e)||Xp(e)||e===95}function sse(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let a=0;a<e.length;++a){var o;const l=e[a],c=lse(l);c!==l.length&&(n=(o=n)!==null&&o!==void 0?o:a,i=a,a!==0&&c<r&&(r=c))}return e.map((a,l)=>l===0?a:a.slice(r)).slice((t=n)!==null&&t!==void 0?t:0,i+1)}function lse(e){let t=0;for(;t<e.length&&oP(e.charCodeAt(t));)++t;return t}function use(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=n.length===1,o=n.length>1&&n.slice(1).every(g=>g.length===0||oP(g.charCodeAt(0))),a=r.endsWith('\\"""'),l=e.endsWith('"')&&!a,c=e.endsWith("\\"),d=l||c,f=!i||e.length>70||d||o||a;let p="";const m=i&&oP(e.charCodeAt(0));return(f&&!m||o)&&(p+=`
|
393
|
-
`),p+=r,(f||d)&&(p+=`
|
394
|
-
`),'"""'+p+'"""'}var Oe;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(Oe||(Oe={}));class cse{constructor(t){const r=new t5(Oe.SOF,0,0,0,0);this.source=t,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==Oe.EOF)do if(t.next)t=t.next;else{const r=fse(this,t.end);t.next=r,r.prev=t,t=r}while(t.kind===Oe.COMMENT);return t}}function dse(e){return e===Oe.BANG||e===Oe.DOLLAR||e===Oe.AMP||e===Oe.PAREN_L||e===Oe.PAREN_R||e===Oe.SPREAD||e===Oe.COLON||e===Oe.EQUALS||e===Oe.AT||e===Oe.BRACKET_L||e===Oe.BRACKET_R||e===Oe.BRACE_L||e===Oe.PIPE||e===Oe.BRACE_R}function If(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function L0(e,t){return o5(e.charCodeAt(t))&&a5(e.charCodeAt(t+1))}function o5(e){return e>=55296&&e<=56319}function a5(e){return e>=56320&&e<=57343}function cc(e,t){const r=e.source.body.codePointAt(t);if(r===void 0)return Oe.EOF;if(r>=32&&r<=126){const n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function xn(e,t,r,n,i){const o=e.line,a=1+r-e.lineStart;return new t5(t,r,n,o,a,i)}function fse(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const o=r.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:r.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return hse(e,i);case 33:return xn(e,Oe.BANG,i,i+1);case 36:return xn(e,Oe.DOLLAR,i,i+1);case 38:return xn(e,Oe.AMP,i,i+1);case 40:return xn(e,Oe.PAREN_L,i,i+1);case 41:return xn(e,Oe.PAREN_R,i,i+1);case 46:if(r.charCodeAt(i+1)===46&&r.charCodeAt(i+2)===46)return xn(e,Oe.SPREAD,i,i+3);break;case 58:return xn(e,Oe.COLON,i,i+1);case 61:return xn(e,Oe.EQUALS,i,i+1);case 64:return xn(e,Oe.AT,i,i+1);case 91:return xn(e,Oe.BRACKET_L,i,i+1);case 93:return xn(e,Oe.BRACKET_R,i,i+1);case 123:return xn(e,Oe.BRACE_L,i,i+1);case 124:return xn(e,Oe.PIPE,i,i+1);case 125:return xn(e,Oe.BRACE_R,i,i+1);case 34:return r.charCodeAt(i+1)===34&&r.charCodeAt(i+2)===34?bse(e,i):mse(e,i)}if(Xp(o)||o===45)return pse(e,i,o);if(i5(o))return wse(e,i);throw Ln(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:If(o)||L0(r,i)?`Unexpected character: ${cc(e,i)}.`:`Invalid character: ${cc(e,i)}.`)}return xn(e,Oe.EOF,n,n)}function hse(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const o=r.charCodeAt(i);if(o===10||o===13)break;if(If(o))++i;else if(L0(r,i))i+=2;else break}return xn(e,Oe.COMMENT,t,i,r.slice(t+1,i))}function pse(e,t,r){const n=e.source.body;let i=t,o=r,a=!1;if(o===45&&(o=n.charCodeAt(++i)),o===48){if(o=n.charCodeAt(++i),Xp(o))throw Ln(e.source,i,`Invalid number, unexpected digit after 0: ${cc(e,i)}.`)}else i=n_(e,i,o),o=n.charCodeAt(i);if(o===46&&(a=!0,o=n.charCodeAt(++i),i=n_(e,i,o),o=n.charCodeAt(i)),(o===69||o===101)&&(a=!0,o=n.charCodeAt(++i),(o===43||o===45)&&(o=n.charCodeAt(++i)),i=n_(e,i,o),o=n.charCodeAt(i)),o===46||i5(o))throw Ln(e.source,i,`Invalid number, expected digit but got: ${cc(e,i)}.`);return xn(e,a?Oe.FLOAT:Oe.INT,t,i,n.slice(t,i))}function n_(e,t,r){if(!Xp(r))throw Ln(e.source,t,`Invalid number, expected digit but got: ${cc(e,t)}.`);const n=e.source.body;let i=t+1;for(;Xp(n.charCodeAt(i));)++i;return i}function mse(e,t){const r=e.source.body,n=r.length;let i=t+1,o=i,a="";for(;i<n;){const l=r.charCodeAt(i);if(l===34)return a+=r.slice(o,i),xn(e,Oe.STRING,t,i+1,a);if(l===92){a+=r.slice(o,i);const c=r.charCodeAt(i+1)===117?r.charCodeAt(i+2)===123?vse(e,i):gse(e,i):yse(e,i);a+=c.value,i+=c.size,o=i;continue}if(l===10||l===13)break;if(If(l))++i;else if(L0(r,i))i+=2;else throw Ln(e.source,i,`Invalid character within String: ${cc(e,i)}.`)}throw Ln(e.source,i,"Unterminated string.")}function vse(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const o=r.charCodeAt(t+i++);if(o===125){if(i<5||!If(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|Xh(o),n<0)break}throw Ln(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function gse(e,t){const r=e.source.body,n=E$(r,t+2);if(If(n))return{value:String.fromCodePoint(n),size:6};if(o5(n)&&r.charCodeAt(t+6)===92&&r.charCodeAt(t+7)===117){const i=E$(r,t+8);if(a5(i))return{value:String.fromCodePoint(n,i),size:12}}throw Ln(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function E$(e,t){return Xh(e.charCodeAt(t))<<12|Xh(e.charCodeAt(t+1))<<8|Xh(e.charCodeAt(t+2))<<4|Xh(e.charCodeAt(t+3))}function Xh(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function yse(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
|
395
|
-
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Ln(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function bse(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,o=t+3,a=o,l="";const c=[];for(;o<n;){const d=r.charCodeAt(o);if(d===34&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34){l+=r.slice(a,o),c.push(l);const f=xn(e,Oe.BLOCK_STRING,t,o+3,sse(c).join(`
|
396
|
-
`));return e.line+=c.length-1,e.lineStart=i,f}if(d===92&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34&&r.charCodeAt(o+3)===34){l+=r.slice(a,o),a=o+1,o+=4;continue}if(d===10||d===13){l+=r.slice(a,o),c.push(l),d===13&&r.charCodeAt(o+1)===10?o+=2:++o,l="",a=o,i=o;continue}if(If(d))++o;else if(L0(r,o))o+=2;else throw Ln(e.source,o,`Invalid character within String: ${cc(e,o)}.`)}throw Ln(e.source,o,"Unterminated string.")}function wse(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const o=r.charCodeAt(i);if(ase(o))++i;else break}return xn(e,Oe.NAME,t,i,r.slice(t,i))}const Sse=10,s5=2;function CE(e){return B0(e,[])}function B0(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return _se(e,t);default:return String(e)}}function _se(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(xse(e)){const n=e.toJSON();if(n!==e)return typeof n=="string"?n:B0(n,r)}else if(Array.isArray(e))return Cse(e,r);return Pse(e,r)}function xse(e){return typeof e.toJSON=="function"}function Pse(e,t){const r=Object.entries(e);return r.length===0?"{}":t.length>s5?"["+Ese(e)+"]":"{ "+r.map(([i,o])=>i+": "+B0(o,t)).join(", ")+" }"}function Cse(e,t){if(e.length===0)return"[]";if(t.length>s5)return"[Array]";const r=Math.min(Sse,e.length),n=e.length-r,i=[];for(let o=0;o<r;++o)i.push(B0(e[o],t));return n===1?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}function Ese(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}const Tse=globalThis.process?function(t,r){return t instanceof r}:function(t,r){if(t instanceof r)return!0;if(typeof t=="object"&&t!==null){var n;const i=r.prototype[Symbol.toStringTag],o=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(i===o){const a=CE(t);throw new Error(`Cannot use ${i} "${a}" from another module or realm.
|
397
|
-
|
398
|
-
Ensure that there is only one instance of "graphql" in the node_modules
|
399
|
-
directory. If different versions of "graphql" are the dependencies of other
|
400
|
-
relied on modules, use "resolutions" to ensure only one version is installed.
|
401
|
-
|
402
|
-
https://yarnpkg.com/en/docs/selective-version-resolutions
|
403
|
-
|
404
|
-
Duplicate "graphql" modules cannot be used at the same time since different
|
405
|
-
versions may have different capabilities and behavior. The data from one
|
406
|
-
version used in the function from another could produce confusing and
|
407
|
-
spurious results.`)}}return!1};class l5{constructor(t,r="GraphQL request",n={line:1,column:1}){typeof t=="string"||Gy(!1,`Body must be a string. Received: ${CE(t)}.`),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||Gy(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Gy(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Ose(e){return Tse(e,l5)}function u5(e,t){return new Rse(e,t).parseDocument()}class Rse{constructor(t,r={}){const n=Ose(t)?t:new l5(t);this._lexer=new cse(n),this._options=r,this._tokenCounter=0}parseName(){const t=this.expectToken(Oe.NAME);return this.node(t,{kind:Je.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:Je.DOCUMENT,definitions:this.many(Oe.SOF,this.parseDefinition,Oe.EOF)})}parseDefinition(){if(this.peek(Oe.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),r=t?this._lexer.lookahead():this._lexer.token;if(r.kind===Oe.NAME){switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw Ln(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(Oe.BRACE_L))return this.node(t,{kind:Je.OPERATION_DEFINITION,operation:Fd.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(Oe.NAME)&&(n=this.parseName()),this.node(t,{kind:Je.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(Oe.NAME);switch(t.value){case"query":return Fd.QUERY;case"mutation":return Fd.MUTATION;case"subscription":return Fd.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Oe.PAREN_L,this.parseVariableDefinition,Oe.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Je.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Oe.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Oe.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(Oe.DOLLAR),this.node(t,{kind:Je.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Je.SELECTION_SET,selections:this.many(Oe.BRACE_L,this.parseSelection,Oe.BRACE_R)})}parseSelection(){return this.peek(Oe.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,r=this.parseName();let n,i;return this.expectOptionalToken(Oe.COLON)?(n=r,i=this.parseName()):i=r,this.node(t,{kind:Je.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Oe.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const r=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Oe.PAREN_L,r,Oe.PAREN_R)}parseArgument(t=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(Oe.COLON),this.node(r,{kind:Je.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(Oe.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(Oe.NAME)?this.node(t,{kind:Je.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:Je.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:Je.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:Je.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const r=this._lexer.token;switch(r.kind){case Oe.BRACKET_L:return this.parseList(t);case Oe.BRACE_L:return this.parseObject(t);case Oe.INT:return this.advanceLexer(),this.node(r,{kind:Je.INT,value:r.value});case Oe.FLOAT:return this.advanceLexer(),this.node(r,{kind:Je.FLOAT,value:r.value});case Oe.STRING:case Oe.BLOCK_STRING:return this.parseStringLiteral();case Oe.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:Je.BOOLEAN,value:!0});case"false":return this.node(r,{kind:Je.BOOLEAN,value:!1});case"null":return this.node(r,{kind:Je.NULL});default:return this.node(r,{kind:Je.ENUM,value:r.value})}case Oe.DOLLAR:if(t)if(this.expectToken(Oe.DOLLAR),this._lexer.token.kind===Oe.NAME){const n=this._lexer.token.value;throw Ln(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:Je.STRING,value:t.value,block:t.kind===Oe.BLOCK_STRING})}parseList(t){const r=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:Je.LIST,values:this.any(Oe.BRACKET_L,r,Oe.BRACKET_R)})}parseObject(t){const r=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:Je.OBJECT,fields:this.any(Oe.BRACE_L,r,Oe.BRACE_R)})}parseObjectField(t){const r=this._lexer.token,n=this.parseName();return this.expectToken(Oe.COLON),this.node(r,{kind:Je.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const r=[];for(;this.peek(Oe.AT);)r.push(this.parseDirective(t));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const r=this._lexer.token;return this.expectToken(Oe.AT),this.node(r,{kind:Je.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let r;if(this.expectOptionalToken(Oe.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(Oe.BRACKET_R),r=this.node(t,{kind:Je.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(Oe.BANG)?this.node(t,{kind:Je.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:Je.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Oe.STRING)||this.peek(Oe.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(Oe.BRACE_L,this.parseOperationTypeDefinition,Oe.BRACE_R);return this.node(t,{kind:Je.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,r=this.parseOperationType();this.expectToken(Oe.COLON);const n=this.parseNamedType();return this.node(t,{kind:Je.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:Je.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:Je.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Oe.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Oe.BRACE_L,this.parseFieldDefinition,Oe.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Oe.COLON);const o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:Je.FIELD_DEFINITION,description:r,name:n,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(Oe.PAREN_L,this.parseInputValueDef,Oe.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(Oe.COLON);const i=this.parseTypeReference();let o;this.expectOptionalToken(Oe.EQUALS)&&(o=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(t,{kind:Je.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:Je.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:Je.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(Oe.EQUALS)?this.delimitedMany(Oe.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:Je.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(Oe.BRACE_L,this.parseEnumValueDefinition,Oe.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:Je.ENUM_VALUE_DEFINITION,description:r,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw Ln(this._lexer.source,this._lexer.token.start,`${Eg(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:Je.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(Oe.BRACE_L,this.parseInputValueDef,Oe.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===Oe.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.optionalMany(Oe.BRACE_L,this.parseOperationTypeDefinition,Oe.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:Je.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:Je.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:Je.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:Je.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Je.UNION_TYPE_EXTENSION,name:r,directives:n,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Je.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Je.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Oe.AT);const n=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(t,{kind:Je.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(Oe.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(iP,r.value))return r;throw this.unexpected(t)}node(t,r){return this._options.noLocation!==!0&&(r.loc=new ise(t,this._lexer.lastToken,this._lexer.source)),r}peek(t){return this._lexer.token.kind===t}expectToken(t){const r=this._lexer.token;if(r.kind===t)return this.advanceLexer(),r;throw Ln(this._lexer.source,r.start,`Expected ${c5(t)}, found ${Eg(r)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const r=this._lexer.token;if(r.kind===Oe.NAME&&r.value===t)this.advanceLexer();else throw Ln(this._lexer.source,r.start,`Expected "${t}", found ${Eg(r)}.`)}expectOptionalKeyword(t){const r=this._lexer.token;return r.kind===Oe.NAME&&r.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const r=t??this._lexer.token;return Ln(this._lexer.source,r.start,`Unexpected ${Eg(r)}.`)}any(t,r,n){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(n);)i.push(r.call(this));return i}optionalMany(t,r,n){if(this.expectOptionalToken(t)){const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(t,r,n){this.expectToken(t);const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(t,r){this.expectOptionalToken(t);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,r=this._lexer.advance();if(t!==void 0&&r.kind!==Oe.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw Ln(this._lexer.source,r.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function Eg(e){const t=e.value;return c5(e.kind)+(t!=null?` "${t}"`:"")}function c5(e){return dse(e)?`"${e}"`:e}function Ise(e){return`"${e.replace(kse,jse)}"`}const kse=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function jse(e){return $se[e.charCodeAt(0)]}const $se=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],EE=Object.freeze({});function Ls(e,t,r=r5){const n=new Map;for(const _ of Object.values(Je))n.set(_,Ase(t,_));let i,o=Array.isArray(e),a=[e],l=-1,c=[],d=e,f,p;const m=[],g=[];do{l++;const _=l===a.length,S=_&&c.length!==0;if(_){if(f=g.length===0?void 0:m[m.length-1],d=p,p=g.pop(),S)if(o){d=d.slice();let k=0;for(const[E,R]of c){const T=E-k;R===null?(d.splice(T,1),k++):d[T]=R}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(const[k,E]of c)d[k]=E}l=i.index,a=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(p){if(f=o?l:a[l],d=p[f],d==null)continue;m.push(f)}let C;if(!Array.isArray(d)){var b,y;C$(d)||Gy(!1,`Invalid AST Node: ${CE(d)}.`);const k=_?(b=n.get(d.kind))===null||b===void 0?void 0:b.leave:(y=n.get(d.kind))===null||y===void 0?void 0:y.enter;if(C=k==null?void 0:k.call(t,d,f,p,m,g),C===EE)break;if(C===!1){if(!_){m.pop();continue}}else if(C!==void 0&&(c.push([f,C]),!_))if(C$(C))d=C;else{m.pop();continue}}if(C===void 0&&S&&c.push([f,d]),_)m.pop();else{var w;i={inArray:o,index:l,keys:a,edits:c,prev:i},o=Array.isArray(d),a=o?d:(w=r[d.kind])!==null&&w!==void 0?w:[],l=-1,c=[],p&&g.push(p),p=d}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:e}function Ase(e,t){const r=e[t];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function d5(e){return Ls(e,Mse)}const Dse=80,Mse={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Ze(e.definitions,`
|
408
|
-
|
409
|
-
`)},OperationDefinition:{leave(e){const t=Qt("(",Ze(e.variableDefinitions,", "),")"),r=Ze([e.operation,Ze([e.name,t]),Ze(e.directives," ")]," ");return(r==="query"?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+Qt(" = ",r)+Qt(" ",Ze(n," "))},SelectionSet:{leave:({selections:e})=>na(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const o=Qt("",e,": ")+t;let a=o+Qt("(",Ze(r,", "),")");return a.length>Dse&&(a=o+Qt(`(
|
410
|
-
`,Qy(Ze(r,`
|
411
|
-
`)),`
|
412
|
-
)`)),Ze([a,Ze(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Qt(" ",Ze(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>Ze(["...",Qt("on ",e),Ze(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${Qt("(",Ze(r,", "),")")} on ${t} ${Qt("",Ze(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?use(e):Ise(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Ze(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Ze(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Qt("(",Ze(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>Qt("",e,`
|
413
|
-
`)+Ze(["schema",Ze(t," "),na(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>Qt("",e,`
|
414
|
-
`)+Ze(["scalar",t,Ze(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>Qt("",e,`
|
415
|
-
`)+Ze(["type",t,Qt("implements ",Ze(r," & ")),Ze(n," "),na(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>Qt("",e,`
|
416
|
-
`)+t+(T$(r)?Qt(`(
|
417
|
-
`,Qy(Ze(r,`
|
418
|
-
`)),`
|
419
|
-
)`):Qt("(",Ze(r,", "),")"))+": "+n+Qt(" ",Ze(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>Qt("",e,`
|
420
|
-
`)+Ze([t+": "+r,Qt("= ",n),Ze(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>Qt("",e,`
|
421
|
-
`)+Ze(["interface",t,Qt("implements ",Ze(r," & ")),Ze(n," "),na(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>Qt("",e,`
|
422
|
-
`)+Ze(["union",t,Ze(r," "),Qt("= ",Ze(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>Qt("",e,`
|
423
|
-
`)+Ze(["enum",t,Ze(r," "),na(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>Qt("",e,`
|
424
|
-
`)+Ze([t,Ze(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>Qt("",e,`
|
425
|
-
`)+Ze(["input",t,Ze(r," "),na(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>Qt("",e,`
|
426
|
-
`)+"directive @"+t+(T$(r)?Qt(`(
|
427
|
-
`,Qy(Ze(r,`
|
428
|
-
`)),`
|
429
|
-
)`):Qt("(",Ze(r,", "),")"))+(n?" repeatable":"")+" on "+Ze(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Ze(["extend schema",Ze(e," "),na(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Ze(["extend scalar",e,Ze(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>Ze(["extend type",e,Qt("implements ",Ze(t," & ")),Ze(r," "),na(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>Ze(["extend interface",e,Qt("implements ",Ze(t," & ")),Ze(r," "),na(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>Ze(["extend union",e,Ze(t," "),Qt("= ",Ze(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>Ze(["extend enum",e,Ze(t," "),na(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>Ze(["extend input",e,Ze(t," "),na(r)]," ")}};function Ze(e,t=""){var r;return(r=e==null?void 0:e.filter(n=>n).join(t))!==null&&r!==void 0?r:""}function na(e){return Qt(`{
|
430
|
-
`,Qy(Ze(e,`
|
431
|
-
`)),`
|
432
|
-
}`)}function Qt(e,t,r=""){return t!=null&&t!==""?e+t+r:""}function Qy(e){return Qt(" ",e.replace(/\n/g,`
|
433
|
-
`))}function T$(e){var t;return(t=e==null?void 0:e.some(r=>r.includes(`
|
434
|
-
`)))!==null&&t!==void 0?t:!1}function O$(e){return e.kind===Je.FIELD||e.kind===Je.FRAGMENT_SPREAD||e.kind===Je.INLINE_FRAGMENT}function Hm(e,t){var r=e.directives;return!r||!r.length?!0:Lse(r).every(function(n){var i=n.directive,o=n.ifArgument,a=!1;return o.value.kind==="Variable"?(a=t&&t[o.value.name.value],_t(a!==void 0,68,i.name.value)):a=o.value.value,i.name.value==="skip"?!a:a})}function Jp(e,t,r){var n=new Set(e),i=n.size;return Ls(t,{Directive:function(o){if(n.delete(o.name.value)&&(!r||!n.size))return EE}}),r?!n.size:n.size<i}function Nse(e){return e&&Jp(["client","export"],e,!0)}function Fse(e){var t=e.name.value;return t==="skip"||t==="include"}function Lse(e){var t=[];return e&&e.length&&e.forEach(function(r){if(Fse(r)){var n=r.arguments,i=r.name.value;_t(n&&n.length===1,69,i);var o=n[0];_t(o.name&&o.name.value==="if",70,i);var a=o.value;_t(a&&(a.kind==="Variable"||a.kind==="BooleanValue"),71,i),t.push({directive:r,ifArgument:o})}}),t}const Bse=()=>Object.create(null),{forEach:Vse,slice:R$}=Array.prototype,{hasOwnProperty:zse}=Object.prototype;let kf=class f5{constructor(t=!0,r=Bse){this.weakness=t,this.makeData=r}lookup(){return this.lookupArray(arguments)}lookupArray(t){let r=this;return Vse.call(t,n=>r=r.getChildTrie(n)),zse.call(r,"data")?r.data:r.data=this.makeData(R$.call(t))}peek(){return this.peekArray(arguments)}peekArray(t){let r=this;for(let n=0,i=t.length;r&&n<i;++n){const o=r.mapFor(t[n],!1);r=o&&o.get(t[n])}return r&&r.data}remove(){return this.removeArray(arguments)}removeArray(t){let r;if(t.length){const n=t[0],i=this.mapFor(n,!1),o=i&&i.get(n);o&&(r=o.removeArray(R$.call(t,1)),!o.data&&!o.weak&&!(o.strong&&o.strong.size)&&i.delete(n))}else r=this.data,delete this.data;return r}getChildTrie(t){const r=this.mapFor(t,!0);let n=r.get(t);return n||r.set(t,n=new f5(this.weakness,this.makeData)),n}mapFor(t,r){return this.weakness&&qse(t)?this.weak||(r?this.weak=new WeakMap:void 0):this.strong||(r?this.strong=new Map:void 0)}};function qse(e){switch(typeof e){case"object":if(e===null)break;case"function":return!0}return!1}var jf=typeof WeakMap=="function"&&!aa(function(){return navigator.product=="ReactNative"&&!global.HermesInternal}),h5=typeof WeakSet=="function",TE=typeof Symbol=="function"&&typeof Symbol.for=="function",V0=TE&&Symbol.asyncIterator;aa(function(){return window.document.createElement});aa(function(){return navigator.userAgent.indexOf("jsdom")>=0});function fn(e){return e!==null&&typeof e=="object"}function Use(e,t){var r=t,n=[];e.definitions.forEach(function(o){if(o.kind==="OperationDefinition")throw Ei(72,o.operation,o.name?" named '".concat(o.name.value,"'"):"");o.kind==="FragmentDefinition"&&n.push(o)}),typeof r>"u"&&(_t(n.length===1,73,n.length),r=n[0].name.value);var i=ve(ve({},e),{definitions:da([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)});return i}function z0(e){e===void 0&&(e=[]);var t={};return e.forEach(function(r){t[r.name.value]=r}),t}function q0(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{var r=e.name.value;if(typeof t=="function")return t(r);var n=t&&t[r];return _t(n,74,r),n||null}default:return null}}function Hse(){}class aP{constructor(t=1/0,r=Hse){this.max=t,this.dispose=r,this.map=new Map,this.newest=null,this.oldest=null}has(t){return this.map.has(t)}get(t){const r=this.getNode(t);return r&&r.value}get size(){return this.map.size}getNode(t){const r=this.map.get(t);if(r&&r!==this.newest){const{older:n,newer:i}=r;i&&(i.older=n),n&&(n.newer=i),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=i)}return r}set(t,r){let n=this.getNode(t);return n?n.value=r:(n={key:t,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(t,n),n.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(t){const r=this.map.get(t);return r?(r===this.newest&&(this.newest=r.older),r===this.oldest&&(this.oldest=r.newer),r.newer&&(r.newer.older=r.older),r.older&&(r.older.newer=r.newer),this.map.delete(t),this.dispose(r.value,t),!0):!1}}function sP(){}const Wse=sP,Kse=typeof WeakRef<"u"?WeakRef:function(e){return{deref:()=>e}},Gse=typeof WeakMap<"u"?WeakMap:Map,Qse=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:sP,unregister:sP}},Yse=10024;class kb{constructor(t=1/0,r=Wse){this.max=t,this.dispose=r,this.map=new Gse,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const n=this.unfinalizedNodes.values();for(let i=0;i<Yse;i++){const o=n.next().value;if(!o)break;this.unfinalizedNodes.delete(o);const a=o.key;delete o.key,o.keyRef=new Kse(a),this.registry.register(a,o,o)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new Qse(this.deleteNode.bind(this))}has(t){return this.map.has(t)}get(t){const r=this.getNode(t);return r&&r.value}getNode(t){const r=this.map.get(t);if(r&&r!==this.newest){const{older:n,newer:i}=r;i&&(i.older=n),n&&(n.newer=i),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=i)}return r}set(t,r){let n=this.getNode(t);return n?n.value=r:(n={key:t,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(t,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(t){t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.size--;const r=t.key||t.keyRef&&t.keyRef.deref();this.dispose(t.value,r),t.keyRef?this.registry.unregister(t):this.unfinalizedNodes.delete(t),r&&this.map.delete(r)}delete(t){const r=this.map.get(t);return r?(this.deleteNode(r),!0):!1}scheduleFinalization(t){this.unfinalizedNodes.add(t),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}var i_=new WeakSet;function p5(e){e.size<=(e.max||-1)||i_.has(e)||(i_.add(e),setTimeout(function(){e.clean(),i_.delete(e)},100))}var m5=function(e,t){var r=new kb(e,t);return r.set=function(n,i){var o=kb.prototype.set.call(this,n,i);return p5(this),o},r},Xse=function(e,t){var r=new aP(e,t);return r.set=function(n,i){var o=aP.prototype.set.call(this,n,i);return p5(this),o},r},Jse=Symbol.for("apollo.cacheSize"),Bs=ve({},tP[Jse]),Au={};function v5(e,t){Au[e]=t}var Zse=globalThis.__DEV__!==!1?nle:void 0,ele=globalThis.__DEV__!==!1?ile:void 0,tle=globalThis.__DEV__!==!1?g5:void 0;function rle(){var e={parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4};return Object.fromEntries(Object.entries(e).map(function(t){var r=t[0],n=t[1];return[r,Bs[r]||n]}))}function nle(){var e,t,r,n,i;if(globalThis.__DEV__===!1)throw new Error("only supported in development mode");return{limits:rle(),sizes:ve({print:(e=Au.print)===null||e===void 0?void 0:e.call(Au),parser:(t=Au.parser)===null||t===void 0?void 0:t.call(Au),canonicalStringify:(r=Au.canonicalStringify)===null||r===void 0?void 0:r.call(Au),links:uP(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:b5(this.queryManager.documentTransform)}},(i=(n=this.cache).getMemoryInternals)===null||i===void 0?void 0:i.call(n))}}function g5(){return{cache:{fragmentQueryDocuments:Tl(this.getFragmentDoc)}}}function ile(){var e=this.config.fragments;return ve(ve({},g5.apply(this)),{addTypenameDocumentTransform:b5(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:Tl(this.storeReader.executeSelectionSet),executeSubSelectedArray:Tl(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:Tl(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:Tl(e==null?void 0:e.findFragmentSpreads),lookup:Tl(e==null?void 0:e.lookup),transform:Tl(e==null?void 0:e.transform)}})}function ole(e){return!!e&&"dirtyKey"in e}function Tl(e){return ole(e)?e.size:void 0}function y5(e){return e!=null}function b5(e){return lP(e).map(function(t){return{cache:t}})}function lP(e){return e?da(da([Tl(e==null?void 0:e.performWork)],lP(e==null?void 0:e.left),!0),lP(e==null?void 0:e.right),!0).filter(y5):[]}function uP(e){var t;return e?da(da([(t=e==null?void 0:e.getMemoryInternals)===null||t===void 0?void 0:t.call(e)],uP(e==null?void 0:e.left),!0),uP(e==null?void 0:e.right),!0).filter(y5):[]}var Ml=Object.assign(function(t){return JSON.stringify(t,ale)},{reset:function(){Ld=new Xse(Bs.canonicalStringify||1e3)}});globalThis.__DEV__!==!1&&v5("canonicalStringify",function(){return Ld.size});var Ld;Ml.reset();function ale(e,t){if(t&&typeof t=="object"){var r=Object.getPrototypeOf(t);if(r===Object.prototype||r===null){var n=Object.keys(t);if(n.every(sle))return t;var i=JSON.stringify(n),o=Ld.get(i);if(!o){n.sort();var a=JSON.stringify(n);o=Ld.get(a)||n,Ld.set(i,o),Ld.set(a,o)}var l=Object.create(r);return o.forEach(function(c){l[c]=t[c]}),l}}return t}function sle(e,t,r){return t===0||r[t-1]<=e}function Qd(e){return{__ref:String(e)}}function wr(e){return!!(e&&typeof e=="object"&&typeof e.__ref=="string")}function lle(e){return fn(e)&&e.kind==="Document"&&Array.isArray(e.definitions)}function ule(e){return e.kind==="StringValue"}function cle(e){return e.kind==="BooleanValue"}function dle(e){return e.kind==="IntValue"}function fle(e){return e.kind==="FloatValue"}function hle(e){return e.kind==="Variable"}function ple(e){return e.kind==="ObjectValue"}function mle(e){return e.kind==="ListValue"}function vle(e){return e.kind==="EnumValue"}function gle(e){return e.kind==="NullValue"}function pf(e,t,r,n){if(dle(r)||fle(r))e[t.value]=Number(r.value);else if(cle(r)||ule(r))e[t.value]=r.value;else if(ple(r)){var i={};r.fields.map(function(a){return pf(i,a.name,a.value,n)}),e[t.value]=i}else if(hle(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(mle(r))e[t.value]=r.values.map(function(a){var l={};return pf(l,t,a,n),l[t.value]});else if(vle(r))e[t.value]=r.value;else if(gle(r))e[t.value]=null;else throw Ei(83,t.value,r.kind)}function yle(e,t){var r=null;e.directives&&(r={},e.directives.forEach(function(i){r[i.name.value]={},i.arguments&&i.arguments.forEach(function(o){var a=o.name,l=o.value;return pf(r[i.name.value],a,l,t)})}));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach(function(i){var o=i.name,a=i.value;return pf(n,o,a,t)})),w5(e.name.value,n,r)}var ble=["connection","include","skip","client","rest","export","nonreactive"],jh=Ml,w5=Object.assign(function(e,t,r){if(t&&r&&r.connection&&r.connection.key)if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach(function(l){i[l]=t[l]}),"".concat(r.connection.key,"(").concat(jh(i),")")}else return r.connection.key;var o=e;if(t){var a=jh(t);o+="(".concat(a,")")}return r&&Object.keys(r).forEach(function(l){ble.indexOf(l)===-1&&(r[l]&&Object.keys(r[l]).length?o+="@".concat(l,"(").concat(jh(r[l]),")"):o+="@".concat(l))}),o},{setStringify:function(e){var t=jh;return jh=e,t}});function U0(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach(function(n){var i=n.name,o=n.value;return pf(r,i,o,t)}),r}return null}function Wl(e){return e.alias?e.alias.value:e.name.value}function cP(e,t,r){for(var n,i=0,o=t.selections;i<o.length;i++){var a=o[i];if(Kl(a)){if(a.name.value==="__typename")return e[Wl(a)]}else n?n.push(a):n=[a]}if(typeof e.__typename=="string")return e.__typename;if(n)for(var l=0,c=n;l<c.length;l++){var a=c[l],d=cP(e,q0(a,r).selectionSet,r);if(typeof d=="string")return d}}function Kl(e){return e.kind==="Field"}function wle(e){return e.kind==="InlineFragment"}function Wm(e){_t(e&&e.kind==="Document",75);var t=e.definitions.filter(function(r){return r.kind!=="FragmentDefinition"}).map(function(r){if(r.kind!=="OperationDefinition")throw Ei(76,r.kind);return r});return _t(t.length<=1,77,t.length),e}function Km(e){return Wm(e),e.definitions.filter(function(t){return t.kind==="OperationDefinition"})[0]}function dP(e){return e.definitions.filter(function(t){return t.kind==="OperationDefinition"&&!!t.name}).map(function(t){return t.name.value})[0]||null}function H0(e){return e.definitions.filter(function(t){return t.kind==="FragmentDefinition"})}function S5(e){var t=Km(e);return _t(t&&t.operation==="query",78),t}function Sle(e){_t(e.kind==="Document",79),_t(e.definitions.length<=1,80);var t=e.definitions[0];return _t(t.kind==="FragmentDefinition",81),t}function Gm(e){Wm(e);for(var t,r=0,n=e.definitions;r<n.length;r++){var i=n[r];if(i.kind==="OperationDefinition"){var o=i.operation;if(o==="query"||o==="mutation"||o==="subscription")return i}i.kind==="FragmentDefinition"&&!t&&(t=i)}if(t)return t;throw Ei(82)}function OE(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach(function(n){n.defaultValue&&pf(t,n.variable.name,n.defaultValue)}),t}const _le=()=>Object.create(null),{forEach:xle,slice:Ple}=Array.prototype,{hasOwnProperty:Cle}=Object.prototype;class RE{constructor(t=!0,r=_le){this.weakness=t,this.makeData=r}lookup(...t){return this.lookupArray(t)}lookupArray(t){let r=this;return xle.call(t,n=>r=r.getChildTrie(n)),Cle.call(r,"data")?r.data:r.data=this.makeData(Ple.call(t))}peek(...t){return this.peekArray(t)}peekArray(t){let r=this;for(let n=0,i=t.length;r&&n<i;++n){const o=this.weakness&&I$(t[n])?r.weak:r.strong;r=o&&o.get(t[n])}return r&&r.data}getChildTrie(t){const r=this.weakness&&I$(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map);let n=r.get(t);return n||r.set(t,n=new RE(this.weakness,this.makeData)),n}}function I$(e){switch(typeof e){case"object":if(e===null)break;case"function":return!0}return!1}let Kn=null;const k$={};let Ele=1;const Tle=()=>class{constructor(){this.id=["slot",Ele++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let t=Kn;t;t=t.parent)if(this.id in t.slots){const r=t.slots[this.id];if(r===k$)break;return t!==Kn&&(Kn.slots[this.id]=r),!0}return Kn&&(Kn.slots[this.id]=k$),!1}getValue(){if(this.hasValue())return Kn.slots[this.id]}withValue(t,r,n,i){const o={__proto__:null,[this.id]:t},a=Kn;Kn={parent:a,slots:o};try{return r.apply(i,n)}finally{Kn=a}}static bind(t){const r=Kn;return function(){const n=Kn;try{return Kn=r,t.apply(this,arguments)}finally{Kn=n}}}static noContext(t,r,n){if(Kn){const i=Kn;try{return Kn=null,t.apply(n,r)}finally{Kn=i}}else return t.apply(n,r)}};function j$(e){try{return e()}catch{}}const o_="@wry/context:Slot",Ole=j$(()=>globalThis)||j$(()=>global)||Object.create(null),$$=Ole,IE=$$[o_]||Array[o_]||function(e){try{Object.defineProperty($$,o_,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(Tle()),{bind:dxe,noContext:fxe}=IE,W0=new IE,{hasOwnProperty:Rle}=Object.prototype,kE=Array.from||function(e){const t=[];return e.forEach(r=>t.push(r)),t};function jE(e){const{unsubscribe:t}=e;typeof t=="function"&&(e.unsubscribe=void 0,t())}const Zp=[],Ile=100;function mf(e,t){if(!e)throw new Error(t||"assertion failure")}function _5(e,t){const r=e.length;return r>0&&r===t.length&&e[r-1]===t[r-1]}function x5(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function P5(e){return e.slice(0)}class K0{constructor(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++K0.count}peek(){if(this.value.length===1&&!Gl(this))return A$(this),this.value[0]}recompute(t){return mf(!this.recomputing,"already recomputing"),A$(this),Gl(this)?kle(this,t):x5(this.value)}setDirty(){this.dirty||(this.dirty=!0,C5(this),jE(this))}dispose(){this.setDirty(),I5(this),$E(this,(t,r)=>{t.setDirty(),k5(t,this)})}forget(){this.dispose()}dependOn(t){t.add(this),this.deps||(this.deps=Zp.pop()||new Set),this.deps.add(t)}forgetDeps(){this.deps&&(kE(this.deps).forEach(t=>t.delete(this)),this.deps.clear(),Zp.push(this.deps),this.deps=null)}}K0.count=0;function A$(e){const t=W0.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Gl(e)?T5(t,e):O5(t,e),t}function kle(e,t){return I5(e),W0.withValue(e,jle,[e,t]),Ale(e,t)&&$le(e),x5(e.value)}function jle(e,t){e.recomputing=!0;const{normalizeResult:r}=e;let n;r&&e.value.length===1&&(n=P5(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),r&&n&&!_5(n,e.value))try{e.value[0]=r(e.value[0],n[0])}catch{}}catch(i){e.value[1]=i}e.recomputing=!1}function Gl(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function $le(e){e.dirty=!1,!Gl(e)&&E5(e)}function C5(e){$E(e,T5)}function E5(e){$E(e,O5)}function $E(e,t){const r=e.parents.size;if(r){const n=kE(e.parents);for(let i=0;i<r;++i)t(n[i],e)}}function T5(e,t){mf(e.childValues.has(t)),mf(Gl(t));const r=!Gl(e);if(!e.dirtyChildren)e.dirtyChildren=Zp.pop()||new Set;else if(e.dirtyChildren.has(t))return;e.dirtyChildren.add(t),r&&C5(e)}function O5(e,t){mf(e.childValues.has(t)),mf(!Gl(t));const r=e.childValues.get(t);r.length===0?e.childValues.set(t,P5(t.value)):_5(r,t.value)||e.setDirty(),R5(e,t),!Gl(e)&&E5(e)}function R5(e,t){const r=e.dirtyChildren;r&&(r.delete(t),r.size===0&&(Zp.length<Ile&&Zp.push(r),e.dirtyChildren=null))}function I5(e){e.childValues.size>0&&e.childValues.forEach((t,r)=>{k5(e,r)}),e.forgetDeps(),mf(e.dirtyChildren===null)}function k5(e,t){t.parents.delete(e),e.childValues.delete(t),R5(e,t)}function Ale(e,t){if(typeof e.subscribe=="function")try{jE(e),e.unsubscribe=e.subscribe.apply(null,t)}catch{return e.setDirty(),!1}return!0}const Dle={setDirty:!0,dispose:!0,forget:!0};function j5(e){const t=new Map;function r(n){const i=W0.getValue();if(i){let o=t.get(n);o||t.set(n,o=new Set),i.dependOn(o)}}return r.dirty=function(i,o){const a=t.get(i);if(a){const l=o&&Rle.call(Dle,o)?o:"setDirty";kE(a).forEach(c=>c[l]()),t.delete(i),jE(a)}},r}let D$;function Mle(...e){return(D$||(D$=new RE(typeof WeakMap=="function"))).lookupArray(e)}const a_=new Set;function em(e,{max:t=Math.pow(2,16),keyArgs:r,makeCacheKey:n=Mle,normalizeResult:i,subscribe:o,cache:a=aP}=Object.create(null)){const l=typeof a=="function"?new a(t,m=>m.dispose()):a,c=function(){const m=n.apply(null,r?r.apply(null,arguments):arguments);if(m===void 0)return e.apply(null,arguments);let g=l.get(m);g||(l.set(m,g=new K0(e)),g.normalizeResult=i,g.subscribe=o,g.forget=()=>l.delete(m));const b=g.recompute(Array.prototype.slice.call(arguments));return l.set(m,g),a_.add(l),W0.hasValue()||(a_.forEach(y=>y.clean()),a_.clear()),b};Object.defineProperty(c,"size",{get:()=>l.size,configurable:!1,enumerable:!1}),Object.freeze(c.options={max:t,keyArgs:r,makeCacheKey:n,normalizeResult:i,subscribe:o,cache:l});function d(m){const g=m&&l.get(m);g&&g.setDirty()}c.dirtyKey=d,c.dirty=function(){d(n.apply(null,arguments))};function f(m){const g=m&&l.get(m);if(g)return g.peek()}c.peekKey=f,c.peek=function(){return f(n.apply(null,arguments))};function p(m){return m?l.delete(m):!1}return c.forgetKey=p,c.forget=function(){return p(n.apply(null,arguments))},c.makeCacheKey=n,c.getKey=r?function(){return n.apply(null,r.apply(null,arguments))}:n,Object.freeze(c)}function Nle(e){return e}var $5=function(){function e(t,r){r===void 0&&(r=Object.create(null)),this.resultCache=h5?new WeakSet:new Set,this.transform=t,r.getCacheKey&&(this.getCacheKey=r.getCacheKey),this.cached=r.cache!==!1,this.resetCache()}return e.prototype.getCacheKey=function(t){return[t]},e.identity=function(){return new e(Nle,{cache:!1})},e.split=function(t,r,n){return n===void 0&&(n=e.identity()),Object.assign(new e(function(i){var o=t(i)?r:n;return o.transformDocument(i)},{cache:!1}),{left:r,right:n})},e.prototype.resetCache=function(){var t=this;if(this.cached){var r=new kf(jf);this.performWork=em(e.prototype.performWork.bind(this),{makeCacheKey:function(n){var i=t.getCacheKey(n);if(i)return _t(Array.isArray(i),67),r.lookupArray(i)},max:Bs["documentTransform.cache"],cache:kb})}},e.prototype.performWork=function(t){return Wm(t),this.transform(t)},e.prototype.transformDocument=function(t){if(this.resultCache.has(t))return t;var r=this.performWork(t);return this.resultCache.add(r),r},e.prototype.concat=function(t){var r=this;return Object.assign(new e(function(n){return t.transformDocument(r.transformDocument(n))},{cache:!1}),{left:this,right:t})},e}(),vp,G0=Object.assign(function(e){var t=vp.get(e);return t||(t=d5(e),vp.set(e,t)),t},{reset:function(){vp=new m5(Bs.print||2e3)}});G0.reset();globalThis.__DEV__!==!1&&v5("print",function(){return vp?vp.size:0});var hn=Array.isArray;function Za(e){return Array.isArray(e)&&e.length>0}var M$={kind:Je.FIELD,name:{kind:Je.NAME,value:"__typename"}};function A5(e,t){return!e||e.selectionSet.selections.every(function(r){return r.kind===Je.FRAGMENT_SPREAD&&A5(t[r.name.value],t)})}function Fle(e){return A5(Km(e)||Sle(e),z0(H0(e)))?null:e}function Lle(e){var t=new Map,r=new Map;return e.forEach(function(n){n&&(n.name?t.set(n.name,n):n.test&&r.set(n.test,n))}),function(n){var i=t.get(n.name.value);return!i&&r.size&&r.forEach(function(o,a){a(n)&&(i=o)}),i}}function N$(e){var t=new Map;return function(n){n===void 0&&(n=e);var i=t.get(n);return i||t.set(n,i={variables:new Set,fragmentSpreads:new Set}),i}}function D5(e,t){Wm(t);for(var r=N$(""),n=N$(""),i=function(_){for(var S=0,C=void 0;S<_.length&&(C=_[S]);++S)if(!hn(C)){if(C.kind===Je.OPERATION_DEFINITION)return r(C.name&&C.name.value);if(C.kind===Je.FRAGMENT_DEFINITION)return n(C.name.value)}return globalThis.__DEV__!==!1&&_t.error(84),null},o=0,a=t.definitions.length-1;a>=0;--a)t.definitions[a].kind===Je.OPERATION_DEFINITION&&++o;var l=Lle(e),c=function(_){return Za(_)&&_.map(l).some(function(S){return S&&S.remove})},d=new Map,f=!1,p={enter:function(_){if(c(_.directives))return f=!0,null}},m=Ls(t,{Field:p,InlineFragment:p,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(_,S,C,k,E){var R=i(E);R&&R.variables.add(_.name.value)}},FragmentSpread:{enter:function(_,S,C,k,E){if(c(_.directives))return f=!0,null;var R=i(E);R&&R.fragmentSpreads.add(_.name.value)}},FragmentDefinition:{enter:function(_,S,C,k){d.set(JSON.stringify(k),_)},leave:function(_,S,C,k){var E=d.get(JSON.stringify(k));if(_===E)return _;if(o>0&&_.selectionSet.selections.every(function(R){return R.kind===Je.FIELD&&R.name.value==="__typename"}))return n(_.name.value).removed=!0,f=!0,null}},Directive:{leave:function(_){if(l(_))return f=!0,null}}});if(!f)return t;var g=function(_){return _.transitiveVars||(_.transitiveVars=new Set(_.variables),_.removed||_.fragmentSpreads.forEach(function(S){g(n(S)).transitiveVars.forEach(function(C){_.transitiveVars.add(C)})})),_},b=new Set;m.definitions.forEach(function(_){_.kind===Je.OPERATION_DEFINITION?g(r(_.name&&_.name.value)).fragmentSpreads.forEach(function(S){b.add(S)}):_.kind===Je.FRAGMENT_DEFINITION&&o===0&&!n(_.name.value).removed&&b.add(_.name.value)}),b.forEach(function(_){g(n(_)).fragmentSpreads.forEach(function(S){b.add(S)})});var y=function(_){return!!(!b.has(_)||n(_).removed)},w={enter:function(_){if(y(_.name.value))return null}};return Fle(Ls(m,{FragmentSpread:w,FragmentDefinition:w,OperationDefinition:{leave:function(_){if(_.variableDefinitions){var S=g(r(_.name&&_.name.value)).transitiveVars;if(S.size<_.variableDefinitions.length)return ve(ve({},_),{variableDefinitions:_.variableDefinitions.filter(function(C){return S.has(C.variable.name.value)})})}}}}))}var AE=Object.assign(function(e){return Ls(e,{SelectionSet:{enter:function(t,r,n){if(!(n&&n.kind===Je.OPERATION_DEFINITION)){var i=t.selections;if(i){var o=i.some(function(l){return Kl(l)&&(l.name.value==="__typename"||l.name.value.lastIndexOf("__",0)===0)});if(!o){var a=n;if(!(Kl(a)&&a.directives&&a.directives.some(function(l){return l.name.value==="export"})))return ve(ve({},t),{selections:da(da([],i,!0),[M$],!1)})}}}}}})},{added:function(e){return e===M$}});function Ble(e){var t=Gm(e),r=t.operation;if(r==="query")return e;var n=Ls(e,{OperationDefinition:{enter:function(i){return ve(ve({},i),{operation:"query"})}}});return n}function M5(e){Wm(e);var t=D5([{test:function(r){return r.name.value==="client"},remove:!0}],e);return t}var Vle=Object.prototype.hasOwnProperty;function F$(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Q0(e)}function Q0(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new Ql,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var zle=function(e,t,r){return this.merge(e[r],t[r])},Ql=function(){function e(t){t===void 0&&(t=zle),this.reconciler=t,this.isObject=fn,this.pastCopies=new Set}return e.prototype.merge=function(t,r){for(var n=this,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return fn(r)&&fn(t)?(Object.keys(r).forEach(function(a){if(Vle.call(t,a)){var l=t[a];if(r[a]!==l){var c=n.reconciler.apply(n,da([t,r,a],i,!1));c!==l&&(t=n.shallowCopyForMerge(t),t[a]=c)}}else t=n.shallowCopyForMerge(t),t[a]=r[a]}),t):r},e.prototype.shallowCopyForMerge=function(t){return fn(t)&&(this.pastCopies.has(t)||(Array.isArray(t)?t=t.slice(0):t=ve({__proto__:Object.getPrototypeOf(t)},t),this.pastCopies.add(t))),t},e}();function qle(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=Ule(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
435
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ule(e,t){if(e){if(typeof e=="string")return L$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return L$(e,t)}}function L$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function B$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function DE(e,t,r){return t&&B$(e.prototype,t),r&&B$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var ME=function(){return typeof Symbol=="function"},NE=function(e){return ME()&&!!Symbol[e]},FE=function(e){return NE(e)?Symbol[e]:"@@"+e};ME()&&!NE("observable")&&(Symbol.observable=Symbol("observable"));var Hle=FE("iterator"),fP=FE("observable"),N5=FE("species");function jb(e,t){var r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function $h(e){var t=e.constructor;return t!==void 0&&(t=t[N5],t===null&&(t=void 0)),t!==void 0?t:Rr}function Wle(e){return e instanceof Rr}function vf(e){vf.log?vf.log(e):setTimeout(function(){throw e})}function Yy(e){Promise.resolve().then(function(){try{e()}catch(t){vf(t)}})}function F5(e){var t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{var r=jb(t,"unsubscribe");r&&r.call(t)}}catch(n){vf(n)}}function hP(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function Kle(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(L5(e,t[r].type,t[r].value),e._state!=="closed");++r);}}function L5(e,t,r){e._state="running";var n=e._observer;try{var i=jb(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(hP(e),i)i.call(n,r);else throw r;break;case"complete":hP(e),i&&i.call(n);break}}catch(o){vf(o)}e._state==="closed"?F5(e):e._state==="running"&&(e._state="ready")}function s_(e,t,r){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:r});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:r}],Yy(function(){return Kle(e)});return}L5(e,t,r)}}var Gle=function(){function e(r,n){this._cleanup=void 0,this._observer=r,this._queue=void 0,this._state="initializing";var i=new Qle(this);try{this._cleanup=n.call(void 0,i)}catch(o){i.error(o)}this._state==="initializing"&&(this._state="ready")}var t=e.prototype;return t.unsubscribe=function(){this._state!=="closed"&&(hP(this),F5(this))},DE(e,[{key:"closed",get:function(){return this._state==="closed"}}]),e}(),Qle=function(){function e(r){this._subscription=r}var t=e.prototype;return t.next=function(n){s_(this._subscription,"next",n)},t.error=function(n){s_(this._subscription,"error",n)},t.complete=function(){s_(this._subscription,"complete")},DE(e,[{key:"closed",get:function(){return this._subscription._state==="closed"}}]),e}(),Rr=function(){function e(r){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if(typeof r!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=r}var t=e.prototype;return t.subscribe=function(n){return(typeof n!="object"||n===null)&&(n={next:n,error:arguments[1],complete:arguments[2]}),new Gle(n,this._subscriber)},t.forEach=function(n){var i=this;return new Promise(function(o,a){if(typeof n!="function"){a(new TypeError(n+" is not a function"));return}function l(){c.unsubscribe(),o()}var c=i.subscribe({next:function(d){try{n(d,l)}catch(f){a(f),c.unsubscribe()}},error:a,complete:o})})},t.map=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=$h(this);return new o(function(a){return i.subscribe({next:function(l){try{l=n(l)}catch(c){return a.error(c)}a.next(l)},error:function(l){a.error(l)},complete:function(){a.complete()}})})},t.filter=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=$h(this);return new o(function(a){return i.subscribe({next:function(l){try{if(!n(l))return}catch(c){return a.error(c)}a.next(l)},error:function(l){a.error(l)},complete:function(){a.complete()}})})},t.reduce=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=$h(this),a=arguments.length>1,l=!1,c=arguments[1],d=c;return new o(function(f){return i.subscribe({next:function(p){var m=!l;if(l=!0,!m||a)try{d=n(d,p)}catch(g){return f.error(g)}else d=p},error:function(p){f.error(p)},complete:function(){if(!l&&!a)return f.error(new TypeError("Cannot reduce an empty sequence"));f.next(d),f.complete()}})})},t.concat=function(){for(var n=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var l=$h(this);return new l(function(c){var d,f=0;function p(m){d=m.subscribe({next:function(g){c.next(g)},error:function(g){c.error(g)},complete:function(){f===o.length?(d=void 0,c.complete()):p(l.from(o[f++]))}})}return p(n),function(){d&&(d.unsubscribe(),d=void 0)}})},t.flatMap=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=$h(this);return new o(function(a){var l=[],c=i.subscribe({next:function(f){if(n)try{f=n(f)}catch(m){return a.error(m)}var p=o.from(f).subscribe({next:function(m){a.next(m)},error:function(m){a.error(m)},complete:function(){var m=l.indexOf(p);m>=0&&l.splice(m,1),d()}});l.push(p)},error:function(f){a.error(f)},complete:function(){d()}});function d(){c.closed&&l.length===0&&a.complete()}return function(){l.forEach(function(f){return f.unsubscribe()}),c.unsubscribe()}})},t[fP]=function(){return this},e.from=function(n){var i=typeof this=="function"?this:e;if(n==null)throw new TypeError(n+" is not an object");var o=jb(n,fP);if(o){var a=o.call(n);if(Object(a)!==a)throw new TypeError(a+" is not an object");return Wle(a)&&a.constructor===i?a:new i(function(l){return a.subscribe(l)})}if(NE("iterator")&&(o=jb(n,Hle),o))return new i(function(l){Yy(function(){if(!l.closed){for(var c=qle(o.call(n)),d;!(d=c()).done;){var f=d.value;if(l.next(f),l.closed)return}l.complete()}})});if(Array.isArray(n))return new i(function(l){Yy(function(){if(!l.closed){for(var c=0;c<n.length;++c)if(l.next(n[c]),l.closed)return;l.complete()}})});throw new TypeError(n+" is not observable")},e.of=function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=typeof this=="function"?this:e;return new a(function(l){Yy(function(){if(!l.closed){for(var c=0;c<i.length;++c)if(l.next(i[c]),l.closed)return;l.complete()}})})},DE(e,null,[{key:N5,get:function(){return this}}]),e}();ME()&&Object.defineProperty(Rr,Symbol("extensions"),{value:{symbol:fP,hostReportError:vf},configurable:!0});function Yle(e){var t,r=e.Symbol;if(typeof r=="function")if(r.observable)t=r.observable;else{typeof r.for=="function"?t=r.for("https://github.com/benlesh/symbol-observable"):t=r("https://github.com/benlesh/symbol-observable");try{r.observable=t}catch{}}else t="@@observable";return t}var xd;typeof self<"u"?xd=self:typeof window<"u"?xd=window:typeof global<"u"?xd=global:typeof XP<"u"?xd=XP:xd=Function("return this")();Yle(xd);var V$=Rr.prototype,z$="@@observable";V$[z$]||(V$[z$]=function(){return this});var Xle=Object.prototype.toString;function B5(e){return pP(e)}function pP(e,t){switch(Xle.call(e)){case"[object Array]":{if(t=t||new Map,t.has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach(function(i,o){r[o]=pP(i,t)}),r}case"[object Object]":{if(t=t||new Map,t.has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach(function(i){n[i]=pP(e[i],t)}),n}default:return e}}function Jle(e){var t=new Set([e]);return t.forEach(function(r){fn(r)&&Zle(r)===r&&Object.getOwnPropertyNames(r).forEach(function(n){fn(r[n])&&t.add(r[n])})}),e}function Zle(e){if(globalThis.__DEV__!==!1&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}function mP(e){return globalThis.__DEV__!==!1&&Jle(e),e}function gp(e,t,r){var n=[];e.forEach(function(i){return i[t]&&n.push(i)}),n.forEach(function(i){return i[t](r)})}function l_(e,t,r){return new Rr(function(n){var i={then:function(c){return new Promise(function(d){return d(c())})}};function o(c,d){return function(f){if(c){var p=function(){return n.closed?0:c(f)};i=i.then(p,p).then(function(m){return n.next(m)},function(m){return n.error(m)})}else n[d](f)}}var a={next:o(t,"next"),error:o(r,"error"),complete:function(){i.then(function(){return n.complete()})}},l=e.subscribe(a);return function(){return l.unsubscribe()}})}function V5(e){function t(r){Object.defineProperty(e,r,{value:Rr})}return TE&&Symbol.species&&t(Symbol.species),t("@@species"),e}function q$(e){return e&&typeof e.then=="function"}var Pd=function(e){ga(t,e);function t(r){var n=e.call(this,function(i){return n.addObserver(i),function(){return n.removeObserver(i)}})||this;return n.observers=new Set,n.promise=new Promise(function(i,o){n.resolve=i,n.reject=o}),n.handlers={next:function(i){n.sub!==null&&(n.latest=["next",i],n.notify("next",i),gp(n.observers,"next",i))},error:function(i){var o=n.sub;o!==null&&(o&&setTimeout(function(){return o.unsubscribe()}),n.sub=null,n.latest=["error",i],n.reject(i),n.notify("error",i),gp(n.observers,"error",i))},complete:function(){var i=n,o=i.sub,a=i.sources,l=a===void 0?[]:a;if(o!==null){var c=l.shift();c?q$(c)?c.then(function(d){return n.sub=d.subscribe(n.handlers)},n.handlers.error):n.sub=c.subscribe(n.handlers):(o&&setTimeout(function(){return o.unsubscribe()}),n.sub=null,n.latest&&n.latest[0]==="next"?n.resolve(n.latest[1]):n.resolve(),n.notify("complete"),gp(n.observers,"complete"))}}},n.nextResultListeners=new Set,n.cancel=function(i){n.reject(i),n.sources=[],n.handlers.complete()},n.promise.catch(function(i){}),typeof r=="function"&&(r=[new Rr(r)]),q$(r)?r.then(function(i){return n.start(i)},n.handlers.error):n.start(r),n}return t.prototype.start=function(r){this.sub===void 0&&(this.sources=Array.from(r),this.handlers.complete())},t.prototype.deliverLastMessage=function(r){if(this.latest){var n=this.latest[0],i=r[n];i&&i.call(r,this.latest[1]),this.sub===null&&n==="next"&&r.complete&&r.complete()}},t.prototype.addObserver=function(r){this.observers.has(r)||(this.deliverLastMessage(r),this.observers.add(r))},t.prototype.removeObserver=function(r){this.observers.delete(r)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(r,n){var i=this.nextResultListeners;i.size&&(this.nextResultListeners=new Set,i.forEach(function(o){return o(r,n)}))},t.prototype.beforeNext=function(r){var n=!1;this.nextResultListeners.add(function(i,o){n||(n=!0,r(i,o))})},t}(Rr);V5(Pd);function Yd(e){return"incremental"in e}function eue(e){return"hasNext"in e&&"data"in e}function tue(e){return Yd(e)||eue(e)}function rue(e){return fn(e)&&"payload"in e}function z5(e,t){var r=e,n=new Ql;return Yd(t)&&Za(t.incremental)&&t.incremental.forEach(function(i){for(var o=i.data,a=i.path,l=a.length-1;l>=0;--l){var c=a[l],d=!isNaN(+c),f=d?[]:{};f[c]=o,o=f}r=n.merge(r,o)}),r}function Xy(e){var t=vP(e);return Za(t)}function vP(e){var t=Za(e.errors)?e.errors.slice(0):[];return Yd(e)&&Za(e.incremental)&&e.incremental.forEach(function(r){r.errors&&t.push.apply(t,r.errors)}),t}function gf(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach(function(n){n&&Object.keys(n).forEach(function(i){var o=n[i];o!==void 0&&(r[i]=o)})}),r}function u_(e,t){return gf(e,t,t.variables&&{variables:gf(ve(ve({},e&&e.variables),t.variables))})}function c_(e){return new Rr(function(t){t.error(e)})}var q5=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n};function nue(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw Ei(43,i)}return e}function iue(e,t){var r=ve({},e),n=function(o){typeof o=="function"?r=ve(ve({},r),o(r)):r=ve(ve({},r),o)},i=function(){return ve({},r)};return Object.defineProperty(t,"setContext",{enumerable:!1,value:n}),Object.defineProperty(t,"getContext",{enumerable:!1,value:i}),t}function oue(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName=typeof t.query!="string"?dP(t.query)||void 0:""),t}function aue(e,t){var r=ve({},e),n=new Set(Object.keys(e));return Ls(t,{Variable:function(i,o,a){a&&a.kind!=="VariableDefinition"&&n.delete(i.name.value)}}),n.forEach(function(i){delete r[i]}),r}function U$(e,t){return t?t(e):Rr.of()}function Ah(e){return typeof e=="function"?new Ws(e):e}function Tg(e){return e.request.length<=1}var Ws=function(){function e(t){t&&(this.request=t)}return e.empty=function(){return new e(function(){return Rr.of()})},e.from=function(t){return t.length===0?e.empty():t.map(Ah).reduce(function(r,n){return r.concat(n)})},e.split=function(t,r,n){var i=Ah(r),o=Ah(n||new e(U$)),a;return Tg(i)&&Tg(o)?a=new e(function(l){return t(l)?i.request(l)||Rr.of():o.request(l)||Rr.of()}):a=new e(function(l,c){return t(l)?i.request(l,c)||Rr.of():o.request(l,c)||Rr.of()}),Object.assign(a,{left:i,right:o})},e.execute=function(t,r){return t.request(iue(r.context,oue(nue(r))))||Rr.of()},e.concat=function(t,r){var n=Ah(t);if(Tg(n))return globalThis.__DEV__!==!1&&_t.warn(35,n),n;var i=Ah(r),o;return Tg(i)?o=new e(function(a){return n.request(a,function(l){return i.request(l)||Rr.of()})||Rr.of()}):o=new e(function(a,l){return n.request(a,function(c){return i.request(c,l)||Rr.of()})||Rr.of()}),Object.assign(o,{left:n,right:i})},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(U$)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(t,r){throw Ei(36)},e.prototype.onError=function(t,r){if(r&&r.error)return r.error(t),!1;throw t},e.prototype.setOnError=function(t){return this.onError=t,this},e}(),sue=Ws.from,gP=Ws.execute;function lue(e){var t,r=e[Symbol.asyncIterator]();return t={next:function(){return r.next()}},t[Symbol.asyncIterator]=function(){return this},t}function uue(e){var t=null,r=null,n=!1,i=[],o=[];function a(p){if(!r){if(o.length){var m=o.shift();if(Array.isArray(m)&&m[0])return m[0]({value:p,done:!1})}i.push(p)}}function l(p){r=p;var m=o.slice();m.forEach(function(g){g[1](p)}),!t||t()}function c(){n=!0;var p=o.slice();p.forEach(function(m){m[0]({value:void 0,done:!0})}),!t||t()}t=function(){t=null,e.removeListener("data",a),e.removeListener("error",l),e.removeListener("end",c),e.removeListener("finish",c),e.removeListener("close",c)},e.on("data",a),e.on("error",l),e.on("end",c),e.on("finish",c),e.on("close",c);function d(){return new Promise(function(p,m){if(r)return m(r);if(i.length)return p({value:i.shift(),done:!1});if(n)return p({value:void 0,done:!0});o.push([p,m])})}var f={next:function(){return d()}};return V0&&(f[Symbol.asyncIterator]=function(){return this}),f}function cue(e){var t=!1,r={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise(function(n,i){e.then(function(o){n({value:o,done:!1})}).catch(i)}))}};return V0&&(r[Symbol.asyncIterator]=function(){return this}),r}function H$(e){var t={next:function(){return e.read()}};return V0&&(t[Symbol.asyncIterator]=function(){return this}),t}function due(e){return!!e.body}function fue(e){return!!e.getReader}function hue(e){return!!(V0&&e[Symbol.asyncIterator])}function pue(e){return!!e.stream}function mue(e){return!!e.arrayBuffer}function vue(e){return!!e.pipe}function gue(e){var t=e;if(due(e)&&(t=e.body),hue(t))return lue(t);if(fue(t))return H$(t.getReader());if(pue(t))return H$(t.stream().getReader());if(mue(t))return cue(t.arrayBuffer());if(vue(t))return uue(t);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var LE=Symbol();function yue(e){return e.extensions?Array.isArray(e.extensions[LE]):!1}function bue(e){return e.hasOwnProperty("graphQLErrors")}var wue=function(e){var t=da(da(da([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(r){return fn(r)&&r.message||"Error message not found."}).join(`
|
436
|
-
`)},fd=function(e){ga(t,e);function t(r){var n=r.graphQLErrors,i=r.protocolErrors,o=r.clientErrors,a=r.networkError,l=r.errorMessage,c=r.extraInfo,d=e.call(this,l)||this;return d.name="ApolloError",d.graphQLErrors=n||[],d.protocolErrors=i||[],d.clientErrors=o||[],d.networkError=a||null,d.message=l||wue(d),d.extraInfo=c,d.__proto__=t.prototype,d}return t}(Error),W$=Object.prototype.hasOwnProperty;function Sue(e,t){return Cl(this,void 0,void 0,function(){var r,n,i,o,a,l,c,d,f,p,m,g,b,y,w,_,S,C,k,E,R,T,A,M;return El(this,function(B){switch(B.label){case 0:if(TextDecoder===void 0)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");r=new TextDecoder("utf-8"),n=(M=e.headers)===null||M===void 0?void 0:M.get("content-type"),i="boundary=",o=n!=null&&n.includes(i)?n==null?void 0:n.substring((n==null?void 0:n.indexOf(i))+i.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",a=`\r
|
437
|
-
--`.concat(o),l="",c=gue(e),d=!0,B.label=1;case 1:return d?[4,c.next()]:[3,3];case 2:for(f=B.sent(),p=f.value,m=f.done,g=typeof p=="string"?p:r.decode(p),b=l.length-a.length+1,d=!m,l+=g,y=l.indexOf(a,b);y>-1;){if(w=void 0,T=[l.slice(0,y),l.slice(y+a.length)],w=T[0],l=T[1],_=w.indexOf(`\r
|
438
|
-
\r
|
439
|
-
`),S=_ue(w.slice(0,_)),C=S["content-type"],C&&C.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");if(k=w.slice(_),k){if(E=U5(e,k),Object.keys(E).length>1||"data"in E||"incremental"in E||"errors"in E||"payload"in E)if(rue(E)){if(R={},"payload"in E){if(Object.keys(E).length===1&&E.payload===null)return[2];R=ve({},E.payload)}"errors"in E&&(R=ve(ve({},R),{extensions:ve(ve({},"extensions"in R?R.extensions:null),(A={},A[LE]=E.errors,A))})),t(R)}else t(E);else if(Object.keys(E).length===1&&"hasNext"in E&&!E.hasNext)return[2]}y=l.indexOf(a)}return[3,1];case 3:return[2]}})})}function _ue(e){var t={};return e.split(`
|
440
|
-
`).forEach(function(r){var n=r.indexOf(":");if(n>-1){var i=r.slice(0,n).trim().toLowerCase(),o=r.slice(n+1).trim();t[i]=o}}),t}function U5(e,t){if(e.status>=300){var r=function(){try{return JSON.parse(t)}catch{return t}};q5(e,r(),"Response not successful: Received status code ".concat(e.status))}try{return JSON.parse(t)}catch(i){var n=i;throw n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,n}}function xue(e,t){e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}function Pue(e){return function(t){return t.text().then(function(r){return U5(t,r)}).then(function(r){return!Array.isArray(r)&&!W$.call(r,"data")&&!W$.call(r,"errors")&&q5(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(n){return n.operationName}):e.operationName,"'.")),r})}}var yP=function(e,t){var r;try{r=JSON.stringify(e)}catch(i){var n=Ei(39,t,i.message);throw n.parseError=i,n}return r},Cue={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},Eue={accept:"*/*","content-type":"application/json"},Tue={method:"POST"},Oue={http:Cue,headers:Eue,options:Tue},Rue=function(e,t){return t(e)};function Iue(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i={},o={};r.forEach(function(p){i=ve(ve(ve({},i),p.options),{headers:ve(ve({},i.headers),p.headers)}),p.credentials&&(i.credentials=p.credentials),o=ve(ve({},o),p.http)}),i.headers&&(i.headers=kue(i.headers,o.preserveHeaderCase));var a=e.operationName,l=e.extensions,c=e.variables,d=e.query,f={operationName:a,variables:c};return o.includeExtensions&&(f.extensions=l),o.includeQuery&&(f.query=t(d,G0)),{options:i,body:f}}function kue(e,t){if(!t){var r=Object.create(null);return Object.keys(Object(e)).forEach(function(o){r[o.toLowerCase()]=e[o]}),r}var n=Object.create(null);Object.keys(Object(e)).forEach(function(o){n[o.toLowerCase()]={originalName:o,value:e[o]}});var i=Object.create(null);return Object.keys(n).forEach(function(o){i[n[o].originalName]=n[o].value}),i}var jue=function(e){if(!e&&typeof fetch>"u")throw Ei(37)},$ue=function(e,t){var r=e.getContext(),n=r.uri;return n||(typeof t=="function"?t(e):t||"/graphql")};function Aue(e,t){var r=[],n=function(p,m){r.push("".concat(p,"=").concat(encodeURIComponent(m)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=yP(t.variables,"Variables map")}catch(p){return{parseError:p}}n("variables",i)}if(t.extensions){var o=void 0;try{o=yP(t.extensions,"Extensions map")}catch(p){return{parseError:p}}n("extensions",o)}var a="",l=e,c=e.indexOf("#");c!==-1&&(a=e.substr(c),l=e.substr(0,c));var d=l.indexOf("?")===-1?"?":"&",f=l+d+r.join("&")+a;return{newURI:f}}var K$=aa(function(){return fetch}),H5=function(e){e===void 0&&(e={});var t=e.uri,r=t===void 0?"/graphql":t,n=e.fetch,i=e.print,o=i===void 0?Rue:i,a=e.includeExtensions,l=e.preserveHeaderCase,c=e.useGETForQueries,d=e.includeUnusedVariables,f=d===void 0?!1:d,p=Ms(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);globalThis.__DEV__!==!1&&jue(n||K$);var m={http:{includeExtensions:a,preserveHeaderCase:l},options:p.fetchOptions,credentials:p.credentials,headers:p.headers};return new Ws(function(g){var b=$ue(g,r),y=g.getContext(),w={};if(y.clientAwareness){var _=y.clientAwareness,S=_.name,C=_.version;S&&(w["apollographql-client-name"]=S),C&&(w["apollographql-client-version"]=C)}var k=ve(ve({},w),y.headers),E={http:y.http,options:y.fetchOptions,credentials:y.credentials,headers:k};if(Jp(["client"],g.query)){var R=M5(g.query);if(!R)return c_(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));g.query=R}var T=Iue(g,o,Oue,m,E),A=T.options,M=T.body;M.variables&&!f&&(M.variables=aue(M.variables,g.query));var B;!A.signal&&typeof AbortController<"u"&&(B=new AbortController,A.signal=B.signal);var Q=function(ge){return ge.kind==="OperationDefinition"&&ge.operation==="mutation"},se=function(ge){return ge.kind==="OperationDefinition"&&ge.operation==="subscription"},ie=se(Gm(g.query)),N=Jp(["defer"],g.query);if(c&&!g.query.definitions.some(Q)&&(A.method="GET"),N||ie){A.headers=A.headers||{};var X="multipart/mixed;";ie&&N&&globalThis.__DEV__!==!1&&_t.warn(38),ie?X+="boundary=graphql;subscriptionSpec=1.0,application/json":N&&(X+="deferSpec=20220824,application/json"),A.headers.accept=X}if(A.method==="GET"){var ce=Aue(b,M),ne=ce.newURI,ee=ce.parseError;if(ee)return c_(ee);b=ne}else try{A.body=yP(M,"Payload")}catch(ge){return c_(ge)}return new Rr(function(ge){var Z=n||aa(function(){return fetch})||K$,j=ge.next.bind(ge);return Z(b,A).then(function(U){var q;g.setContext({response:U});var $=(q=U.headers)===null||q===void 0?void 0:q.get("content-type");return $!==null&&/^multipart\/mixed/i.test($)?Sue(U,j):Pue(g)(U).then(j)}).then(function(){B=void 0,ge.complete()}).catch(function(U){B=void 0,xue(U,ge)}),function(){B&&B.abort()}})})},Due=function(e){ga(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,H5(r).request)||this;return n.options=r,n}return t}(Ws);const{toString:G$,hasOwnProperty:Mue}=Object.prototype,Q$=Function.prototype.toString,bP=new Map;function qr(e,t){try{return wP(e,t)}finally{bP.clear()}}function wP(e,t){if(e===t)return!0;const r=G$.call(e),n=G$.call(t);if(r!==n)return!1;switch(r){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(X$(e,t))return!0;const i=Y$(e),o=Y$(t),a=i.length;if(a!==o.length)return!1;for(let l=0;l<a;++l)if(!Mue.call(t,i[l]))return!1;for(let l=0;l<a;++l){const c=i[l];if(!wP(e[c],t[c]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!==e)return t!==t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(X$(e,t))return!0;const i=e.entries(),o=r==="[object Map]";for(;;){const a=i.next();if(a.done)break;const[l,c]=a.value;if(!t.has(l)||o&&!wP(c,t.get(l)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let i=e.byteLength;if(i===t.byteLength)for(;i--&&e[i]===t[i];);return i===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const i=Q$.call(e);return i!==Q$.call(t)?!1:!Lue(i,Fue)}}return!1}function Y$(e){return Object.keys(e).filter(Nue,e)}function Nue(e){return this[e]!==void 0}const Fue="{ [native code] }";function Lue(e,t){const r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function X$(e,t){let r=bP.get(e);if(r){if(r.has(t))return!0}else bP.set(e,r=new Set);return r.add(t),!1}function W5(e,t,r,n){var i=t.data,o=Ms(t,["data"]),a=r.data,l=Ms(r,["data"]);return qr(o,l)&&Jy(Gm(e).selectionSet,i,a,{fragmentMap:z0(H0(e)),variables:n})}function Jy(e,t,r,n){if(t===r)return!0;var i=new Set;return e.selections.every(function(o){if(i.has(o)||(i.add(o),!Hm(o,n.variables))||J$(o))return!0;if(Kl(o)){var a=Wl(o),l=t&&t[a],c=r&&r[a],d=o.selectionSet;if(!d)return qr(l,c);var f=Array.isArray(l),p=Array.isArray(c);if(f!==p)return!1;if(f&&p){var m=l.length;if(c.length!==m)return!1;for(var g=0;g<m;++g)if(!Jy(d,l[g],c[g],n))return!1;return!0}return Jy(d,l,c,n)}else{var b=q0(o,n.fragmentMap);if(b)return J$(b)?!0:Jy(b.selectionSet,t,r,n)}})}function J$(e){return!!e.directives&&e.directives.some(Bue)}function Bue(e){return e.name.value==="nonreactive"}var K5=function(){function e(){this.assumeImmutableResults=!1,this.getFragmentDoc=em(Use,{max:Bs["cache.fragmentQueryDocuments"]||1e3,cache:kb})}return e.prototype.batch=function(t){var r=this,n=typeof t.optimistic=="string"?t.optimistic:t.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=t.update(r)},n),i},e.prototype.recordOptimisticTransaction=function(t,r){this.performTransaction(t,r)},e.prototype.transformDocument=function(t){return t},e.prototype.transformForLink=function(t){return t},e.prototype.identify=function(t){},e.prototype.gc=function(){return[]},e.prototype.modify=function(t){return!1},e.prototype.readQuery=function(t,r){return r===void 0&&(r=!!t.optimistic),this.read(ve(ve({},t),{rootId:t.id||"ROOT_QUERY",optimistic:r}))},e.prototype.watchFragment=function(t){var r=this,n=t.fragment,i=t.fragmentName,o=t.from,a=t.optimistic,l=a===void 0?!0:a,c=this.getFragmentDoc(n,i),d={returnPartialData:!0,id:typeof o=="string"?o:this.identify(o),query:c,optimistic:l},f;return new Rr(function(p){return r.watch(ve(ve({},d),{immediate:!0,callback:function(m){if(!(f&&W5(c,{data:f==null?void 0:f.result},{data:m.result}))){var g={data:m.result,complete:!!m.complete};m.missing&&(g.missing=Q0(m.missing.map(function(b){return b.missing}))),f=m,p.next(g)}}}))})},e.prototype.readFragment=function(t,r){return r===void 0&&(r=!!t.optimistic),this.read(ve(ve({},t),{query:this.getFragmentDoc(t.fragment,t.fragmentName),rootId:t.id,optimistic:r}))},e.prototype.writeQuery=function(t){var r=t.id,n=t.data,i=Ms(t,["id","data"]);return this.write(Object.assign(i,{dataId:r||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(t){var r=t.id,n=t.data,i=t.fragment,o=t.fragmentName,a=Ms(t,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(i,o),dataId:r,result:n}))},e.prototype.updateQuery=function(t,r){return this.batch({update:function(n){var i=n.readQuery(t),o=r(i);return o==null?i:(n.writeQuery(ve(ve({},t),{data:o})),o)}})},e.prototype.updateFragment=function(t,r){return this.batch({update:function(n){var i=n.readFragment(t),o=r(i);return o==null?i:(n.writeFragment(ve(ve({},t),{data:o})),o)}})},e}();globalThis.__DEV__!==!1&&(K5.prototype.getMemoryInternals=tle);var G5=function(e){ga(t,e);function t(r,n,i,o){var a,l=e.call(this,r)||this;if(l.message=r,l.path=n,l.query=i,l.variables=o,Array.isArray(l.path)){l.missing=l.message;for(var c=l.path.length-1;c>=0;--c)l.missing=(a={},a[l.path[c]]=l.missing,a)}else l.missing=l.path;return l.__proto__=t.prototype,l}return t}(Error),Fn=Object.prototype.hasOwnProperty;function Dh(e){return e==null}function Q5(e,t){var r=e.__typename,n=e.id,i=e._id;if(typeof r=="string"&&(t&&(t.keyObject=Dh(n)?Dh(i)?void 0:{_id:i}:{id:n}),Dh(n)&&!Dh(i)&&(n=i),!Dh(n)))return"".concat(r,":").concat(typeof n=="number"||typeof n=="string"?n:JSON.stringify(n))}var Y5={dataIdFromObject:Q5,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Vue(e){return gf(Y5,e)}function X5(e){var t=e.canonizeResults;return t===void 0?Y5.canonizeResults:t}function zue(e,t){return wr(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var J5=/^[_a-z][_0-9a-z]*/i;function Yl(e){var t=e.match(J5);return t?t[0]:e}function SP(e,t,r){return fn(t)?hn(t)?t.every(function(n){return SP(e,n,r)}):e.selections.every(function(n){if(Kl(n)&&Hm(n,r)){var i=Wl(n);return Fn.call(t,i)&&(!n.selectionSet||SP(n.selectionSet,t[i],r))}return!0}):!1}function Bd(e){return fn(e)&&!wr(e)&&!hn(e)}function que(){return new Ql}function Z5(e,t){var r=z0(H0(e));return{fragmentMap:r,lookupFragment:function(n){var i=r[n];return!i&&t&&(i=t.lookup(n)),i||null}}}var Zy=Object.create(null),d_=function(){return Zy},Z$=Object.create(null),tm=function(){function e(t,r){var n=this;this.policies=t,this.group=r,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,o){return mP(wr(i)?n.get(i.__ref,o):i&&i[o])},this.canRead=function(i){return wr(i)?n.has(i.__ref):typeof i=="object"},this.toReference=function(i,o){if(typeof i=="string")return Qd(i);if(wr(i))return i;var a=n.policies.identify(i)[0];if(a){var l=Qd(a);return o&&n.merge(a,i),l}}}return e.prototype.toObject=function(){return ve({},this.data)},e.prototype.has=function(t){return this.lookup(t,!0)!==void 0},e.prototype.get=function(t,r){if(this.group.depend(t,r),Fn.call(this.data,t)){var n=this.data[t];if(n&&Fn.call(n,r))return n[r]}if(r==="__typename"&&Fn.call(this.policies.rootTypenamesById,t))return this.policies.rootTypenamesById[t];if(this instanceof xl)return this.parent.get(t,r)},e.prototype.lookup=function(t,r){if(r&&this.group.depend(t,"__exists"),Fn.call(this.data,t))return this.data[t];if(this instanceof xl)return this.parent.lookup(t,r);if(this.policies.rootTypenamesById[t])return Object.create(null)},e.prototype.merge=function(t,r){var n=this,i;wr(t)&&(t=t.__ref),wr(r)&&(r=r.__ref);var o=typeof t=="string"?this.lookup(i=t):t,a=typeof r=="string"?this.lookup(i=r):r;if(a){_t(typeof i=="string",1);var l=new Ql(Hue).merge(o,a);if(this.data[i]=l,l!==o&&(delete this.refs[i],this.group.caching)){var c=Object.create(null);o||(c.__exists=1),Object.keys(a).forEach(function(d){if(!o||o[d]!==l[d]){c[d]=1;var f=Yl(d);f!==d&&!n.policies.hasKeyArgs(l.__typename,f)&&(c[f]=1),l[d]===void 0&&!(n instanceof xl)&&delete l[d]}}),c.__typename&&!(o&&o.__typename)&&this.policies.rootTypenamesById[i]===l.__typename&&delete c.__typename,Object.keys(c).forEach(function(d){return n.group.dirty(i,d)})}}},e.prototype.modify=function(t,r){var n=this,i=this.lookup(t);if(i){var o=Object.create(null),a=!1,l=!0,c={DELETE:Zy,INVALIDATE:Z$,isReference:wr,toReference:this.toReference,canRead:this.canRead,readField:function(d,f){return n.policies.readField(typeof d=="string"?{fieldName:d,from:f||Qd(t)}:d,{store:n})}};if(Object.keys(i).forEach(function(d){var f=Yl(d),p=i[d];if(p!==void 0){var m=typeof r=="function"?r:r[d]||r[f];if(m){var g=m===d_?Zy:m(mP(p),ve(ve({},c),{fieldName:f,storeFieldName:d,storage:n.getStorage(t,d)}));if(g===Z$)n.group.dirty(t,d);else if(g===Zy&&(g=void 0),g!==p&&(o[d]=g,a=!0,p=g,globalThis.__DEV__!==!1)){var b=function(E){if(n.lookup(E.__ref)===void 0)return globalThis.__DEV__!==!1&&_t.warn(2,E),!0};if(wr(g))b(g);else if(Array.isArray(g))for(var y=!1,w=void 0,_=0,S=g;_<S.length;_++){var C=S[_];if(wr(C)){if(y=!0,b(C))break}else if(typeof C=="object"&&C){var k=n.policies.identify(C)[0];k&&(w=C)}if(y&&w!==void 0){globalThis.__DEV__!==!1&&_t.warn(3,w);break}}}}p!==void 0&&(l=!1)}}),a)return this.merge(t,o),l&&(this instanceof xl?this.data[t]=void 0:delete this.data[t],this.group.dirty(t,"__exists")),!0}return!1},e.prototype.delete=function(t,r,n){var i,o=this.lookup(t);if(o){var a=this.getFieldValue(o,"__typename"),l=r&&n?this.policies.getStoreFieldName({typename:a,fieldName:r,args:n}):r;return this.modify(t,l?(i={},i[l]=d_,i):d_)}return!1},e.prototype.evict=function(t,r){var n=!1;return t.id&&(Fn.call(this.data,t.id)&&(n=this.delete(t.id,t.fieldName,t.args)),this instanceof xl&&this!==r&&(n=this.parent.evict(t,r)||n),(t.fieldName||n)&&this.group.dirty(t.id,t.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var t=this,r=this.toObject(),n=[];return this.getRootIdSet().forEach(function(i){Fn.call(t.policies.rootTypenamesById,i)||n.push(i)}),n.length&&(r.__META={extraRootIds:n.sort()}),r},e.prototype.replace=function(t){var r=this;if(Object.keys(this.data).forEach(function(o){t&&Fn.call(t,o)||r.delete(o)}),t){var n=t.__META,i=Ms(t,["__META"]);Object.keys(i).forEach(function(o){r.merge(o,i[o])}),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(t){return this.rootIds[t]=(this.rootIds[t]||0)+1},e.prototype.release=function(t){if(this.rootIds[t]>0){var r=--this.rootIds[t];return r||delete this.rootIds[t],r}return 0},e.prototype.getRootIdSet=function(t){return t===void 0&&(t=new Set),Object.keys(this.rootIds).forEach(t.add,t),this instanceof xl?this.parent.getRootIdSet(t):Object.keys(this.policies.rootTypenamesById).forEach(t.add,t),t},e.prototype.gc=function(){var t=this,r=this.getRootIdSet(),n=this.toObject();r.forEach(function(a){Fn.call(n,a)&&(Object.keys(t.findChildRefIds(a)).forEach(r.add,r),delete n[a])});var i=Object.keys(n);if(i.length){for(var o=this;o instanceof xl;)o=o.parent;i.forEach(function(a){return o.delete(a)})}return i},e.prototype.findChildRefIds=function(t){if(!Fn.call(this.refs,t)){var r=this.refs[t]=Object.create(null),n=this.data[t];if(!n)return r;var i=new Set([n]);i.forEach(function(o){wr(o)&&(r[o.__ref]=!0),fn(o)&&Object.keys(o).forEach(function(a){var l=o[a];fn(l)&&i.add(l)})})}return this.refs[t]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),eB=function(){function e(t,r){r===void 0&&(r=null),this.caching=t,this.parent=r,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?j5():null,this.keyMaker=new kf(jf)},e.prototype.depend=function(t,r){if(this.d){this.d(f_(t,r));var n=Yl(r);n!==r&&this.d(f_(t,n)),this.parent&&this.parent.depend(t,r)}},e.prototype.dirty=function(t,r){this.d&&this.d.dirty(f_(t,r),r==="__exists"?"forget":"setDirty")},e}();function f_(e,t){return t+"#"+e}function e2(e,t){yp(e)&&e.group.depend(t,"__exists")}(function(e){var t=function(r){ga(n,r);function n(i){var o=i.policies,a=i.resultCaching,l=a===void 0?!0:a,c=i.seed,d=r.call(this,o,new eB(l))||this;return d.stump=new Uue(d),d.storageTrie=new kf(jf),c&&d.replace(c),d}return n.prototype.addLayer=function(i,o){return this.stump.addLayer(i,o)},n.prototype.removeLayer=function(){return this},n.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},n}(e);e.Root=t})(tm||(tm={}));var xl=function(e){ga(t,e);function t(r,n,i,o){var a=e.call(this,n.policies,o)||this;return a.id=r,a.parent=n,a.replay=i,a.group=o,i(a),a}return t.prototype.addLayer=function(r,n){return new t(r,this,n,this.group)},t.prototype.removeLayer=function(r){var n=this,i=this.parent.removeLayer(r);return r===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(o){var a=n.data[o],l=i.lookup(o);l?a?a!==l&&Object.keys(a).forEach(function(c){qr(a[c],l[c])||n.group.dirty(o,c)}):(n.group.dirty(o,"__exists"),Object.keys(l).forEach(function(c){n.group.dirty(o,c)})):n.delete(o)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return ve(ve({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(r){var n=this.parent.findChildRefIds(r);return Fn.call(this.data,r)?ve(ve({},n),e.prototype.findChildRefIds.call(this,r)):n},t.prototype.getStorage=function(){for(var r=this.parent;r.parent;)r=r.parent;return r.getStorage.apply(r,arguments)},t}(tm),Uue=function(e){ga(t,e);function t(r){return e.call(this,"EntityStore.Stump",r,function(){},new eB(r.group.caching,r.group))||this}return t.prototype.removeLayer=function(){return this},t.prototype.merge=function(r,n){return this.parent.merge(r,n)},t}(xl);function Hue(e,t,r){var n=e[r],i=t[r];return qr(n,i)?n:i}function yp(e){return!!(e instanceof tm&&e.group.caching)}function Wue(e){return fn(e)?hn(e)?e.slice(0):ve({__proto__:Object.getPrototypeOf(e)},e):e}var t2=function(){function e(){this.known=new(h5?WeakSet:Set),this.pool=new kf(jf),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(t){return fn(t)&&this.known.has(t)},e.prototype.pass=function(t){if(fn(t)){var r=Wue(t);return this.passes.set(r,t),r}return t},e.prototype.admit=function(t){var r=this;if(fn(t)){var n=this.passes.get(t);if(n)return n;var i=Object.getPrototypeOf(t);switch(i){case Array.prototype:{if(this.known.has(t))return t;var o=t.map(this.admit,this),a=this.pool.lookupArray(o);return a.array||(this.known.add(a.array=o),globalThis.__DEV__!==!1&&Object.freeze(o)),a.array}case null:case Object.prototype:{if(this.known.has(t))return t;var l=Object.getPrototypeOf(t),c=[l],d=this.sortedKeys(t);c.push(d.json);var f=c.length;d.sorted.forEach(function(g){c.push(r.admit(t[g]))});var a=this.pool.lookupArray(c);if(!a.object){var p=a.object=Object.create(l);this.known.add(p),d.sorted.forEach(function(g,b){p[g]=c[f+b]}),globalThis.__DEV__!==!1&&Object.freeze(p)}return a.object}}}return t},e.prototype.sortedKeys=function(t){var r=Object.keys(t),n=this.pool.lookupArray(r);if(!n.keys){r.sort();var i=JSON.stringify(r);(n.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,n.keys={sorted:r,json:i})}return n.keys},e}();function r2(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var Kue=function(){function e(t){var r=this;this.knownResults=new(jf?WeakMap:Map),this.config=gf(t,{addTypename:t.addTypename!==!1,canonizeResults:X5(t)}),this.canon=t.canon||new t2,this.executeSelectionSet=em(function(n){var i,o=n.context.canonizeResults,a=r2(n);a[3]=!o;var l=(i=r.executeSelectionSet).peek.apply(i,a);return l?o?ve(ve({},l),{result:r.canon.admit(l.result)}):l:(e2(n.context.store,n.enclosingRef.__ref),r.execSelectionSetImpl(n))},{max:this.config.resultCacheMaxSize||Bs["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:r2,makeCacheKey:function(n,i,o,a){if(yp(o.store))return o.store.makeCacheKey(n,wr(i)?i.__ref:i,o.varString,a)}}),this.executeSubSelectedArray=em(function(n){return e2(n.context.store,n.enclosingRef.__ref),r.execSubSelectedArrayImpl(n)},{max:this.config.resultCacheMaxSize||Bs["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(n){var i=n.field,o=n.array,a=n.context;if(yp(a.store))return a.store.makeCacheKey(i,o,a.varString)}})}return e.prototype.resetCanon=function(){this.canon=new t2},e.prototype.diffQueryAgainstStore=function(t){var r=t.store,n=t.query,i=t.rootId,o=i===void 0?"ROOT_QUERY":i,a=t.variables,l=t.returnPartialData,c=l===void 0?!0:l,d=t.canonizeResults,f=d===void 0?this.config.canonizeResults:d,p=this.config.cache.policies;a=ve(ve({},OE(S5(n))),a);var m=Qd(o),g=this.executeSelectionSet({selectionSet:Gm(n).selectionSet,objectOrReference:m,enclosingRef:m,context:ve({store:r,query:n,policies:p,variables:a,varString:Ml(a),canonizeResults:f},Z5(n,this.config.fragments))}),b;if(g.missing&&(b=[new G5(Gue(g.missing),g.missing,n,a)],!c))throw b[0];return{result:g.result,complete:!b,missing:b}},e.prototype.isFresh=function(t,r,n,i){if(yp(i.store)&&this.knownResults.get(t)===n){var o=this.executeSelectionSet.peek(n,r,i,this.canon.isKnown(t));if(o&&t===o.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(t){var r=this,n=t.selectionSet,i=t.objectOrReference,o=t.enclosingRef,a=t.context;if(wr(i)&&!a.policies.rootTypenamesById[i.__ref]&&!a.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var l=a.variables,c=a.policies,d=a.store,f=d.getFieldValue(i,"__typename"),p=[],m,g=new Ql;this.config.addTypename&&typeof f=="string"&&!c.rootIdsByTypename[f]&&p.push({__typename:f});function b(C,k){var E;return C.missing&&(m=g.merge(m,(E={},E[k]=C.missing,E))),C.result}var y=new Set(n.selections);y.forEach(function(C){var k,E;if(Hm(C,l))if(Kl(C)){var R=c.readField({fieldName:C.name.value,field:C,variables:a.variables,from:i},a),T=Wl(C);R===void 0?AE.added(C)||(m=g.merge(m,(k={},k[T]="Can't find field '".concat(C.name.value,"' on ").concat(wr(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),k))):hn(R)?R.length>0&&(R=b(r.executeSubSelectedArray({field:C,array:R,enclosingRef:o,context:a}),T)):C.selectionSet?R!=null&&(R=b(r.executeSelectionSet({selectionSet:C.selectionSet,objectOrReference:R,enclosingRef:wr(R)?R:o,context:a}),T)):a.canonizeResults&&(R=r.canon.pass(R)),R!==void 0&&p.push((E={},E[T]=R,E))}else{var A=q0(C,a.lookupFragment);if(!A&&C.kind===Je.FRAGMENT_SPREAD)throw Ei(9,C.name.value);A&&c.fragmentMatches(A,f)&&A.selectionSet.selections.forEach(y.add,y)}});var w=Q0(p),_={result:w,missing:m},S=a.canonizeResults?this.canon.admit(_):mP(_);return S.result&&this.knownResults.set(S.result,n),S},e.prototype.execSubSelectedArrayImpl=function(t){var r=this,n=t.field,i=t.array,o=t.enclosingRef,a=t.context,l,c=new Ql;function d(f,p){var m;return f.missing&&(l=c.merge(l,(m={},m[p]=f.missing,m))),f.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map(function(f,p){return f===null?null:hn(f)?d(r.executeSubSelectedArray({field:n,array:f,enclosingRef:o,context:a}),p):n.selectionSet?d(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:f,enclosingRef:wr(f)?f:o,context:a}),p):(globalThis.__DEV__!==!1&&Que(a.store,n,f),f)}),{result:a.canonizeResults?this.canon.admit(i):i,missing:l}},e}();function Gue(e){try{JSON.stringify(e,function(t,r){if(typeof r=="string")throw r;return r})}catch(t){return t}}function Que(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach(function(i){fn(i)&&(_t(!wr(i),10,zue(e,i),t.name.value),Object.values(i).forEach(n.add,n))})}}var BE=new IE,n2=new WeakMap;function bp(e){var t=n2.get(e);return t||n2.set(e,t={vars:new Set,dep:j5()}),t}function i2(e){bp(e).vars.forEach(function(t){return t.forgetCache(e)})}function Yue(e){bp(e).vars.forEach(function(t){return t.attachCache(e)})}function Xue(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach(function(c){bp(c).dep.dirty(n),Jue(c)});var a=Array.from(r);r.clear(),a.forEach(function(c){return c(e)})}}else{var l=BE.getValue();l&&(i(l),bp(l).dep(n))}return e};n.onNextChange=function(o){return r.add(o),function(){r.delete(o)}};var i=n.attachCache=function(o){return t.add(o),bp(o).vars.add(n),n};return n.forgetCache=function(o){return t.delete(o)},n}function Jue(e){e.broadcastWatches&&e.broadcastWatches()}var o2=Object.create(null);function VE(e){var t=JSON.stringify(e);return o2[t]||(o2[t]=Object.create(null))}function a2(e){var t=VE(e);return t.keyFieldsFn||(t.keyFieldsFn=function(r,n){var i=function(a,l){return n.readField(l,a)},o=n.keyObject=zE(e,function(a){var l=Xd(n.storeObject,a,i);return l===void 0&&r!==n.storeObject&&Fn.call(r,a[0])&&(l=Xd(r,a,rB)),_t(l!==void 0,4,a.join("."),r),l});return"".concat(n.typename,":").concat(JSON.stringify(o))})}function s2(e){var t=VE(e);return t.keyArgsFn||(t.keyArgsFn=function(r,n){var i=n.field,o=n.variables,a=n.fieldName,l=zE(e,function(d){var f=d[0],p=f.charAt(0);if(p==="@"){if(i&&Za(i.directives)){var m=f.slice(1),g=i.directives.find(function(_){return _.name.value===m}),b=g&&U0(g,o);return b&&Xd(b,d.slice(1))}return}if(p==="$"){var y=f.slice(1);if(o&&Fn.call(o,y)){var w=d.slice(0);return w[0]=y,Xd(o,w)}return}if(r)return Xd(r,d)}),c=JSON.stringify(l);return(r||c!=="{}")&&(a+=":"+c),a})}function zE(e,t){var r=new Ql;return tB(e).reduce(function(n,i){var o,a=t(i);if(a!==void 0){for(var l=i.length-1;l>=0;--l)a=(o={},o[i[l]]=a,o);n=r.merge(n,a)}return n},Object.create(null))}function tB(e){var t=VE(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach(function(i,o){hn(i)?(tB(i).forEach(function(a){return r.push(n.concat(a))}),n.length=0):(n.push(i),hn(e[o+1])||(r.push(n.slice(0)),n.length=0))})}return t.paths}function rB(e,t){return e[t]}function Xd(e,t,r){return r=r||rB,nB(t.reduce(function n(i,o){return hn(i)?i.map(function(a){return n(a,o)}):i&&r(i,o)},e))}function nB(e){return fn(e)?hn(e)?e.map(nB):zE(Object.keys(e).sort(),function(t){return Xd(e,t)}):e}function _P(e){return e.args!==void 0?e.args:e.field?U0(e.field,e.variables):null}var Zue=function(){},l2=function(e,t){return t.fieldName},u2=function(e,t,r){var n=r.mergeObjects;return n(e,t)},c2=function(e,t){return t},ece=function(){function e(t){this.config=t,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=ve({dataIdFromObject:Q5},t),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),t.possibleTypes&&this.addPossibleTypes(t.possibleTypes),t.typePolicies&&this.addTypePolicies(t.typePolicies)}return e.prototype.identify=function(t,r){var n,i=this,o=r&&(r.typename||((n=r.storeObject)===null||n===void 0?void 0:n.__typename))||t.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a=r&&r.storeObject||t,l=ve(ve({},r),{typename:o,storeObject:a,readField:r&&r.readField||function(){var m=qE(arguments,a);return i.readField(m,{store:i.cache.data,variables:m.variables})}}),c,d=o&&this.getTypePolicy(o),f=d&&d.keyFn||this.config.dataIdFromObject;f;){var p=f(ve(ve({},t),a),l);if(hn(p))f=a2(p);else{c=p;break}}return c=c?String(c):void 0,l.keyObject?[c,l.keyObject]:[c]},e.prototype.addTypePolicies=function(t){var r=this;Object.keys(t).forEach(function(n){var i=t[n],o=i.queryType,a=i.mutationType,l=i.subscriptionType,c=Ms(i,["queryType","mutationType","subscriptionType"]);o&&r.setRootTypename("Query",n),a&&r.setRootTypename("Mutation",n),l&&r.setRootTypename("Subscription",n),Fn.call(r.toBeAdded,n)?r.toBeAdded[n].push(c):r.toBeAdded[n]=[c]})},e.prototype.updateTypePolicy=function(t,r){var n=this,i=this.getTypePolicy(t),o=r.keyFields,a=r.fields;function l(c,d){c.merge=typeof d=="function"?d:d===!0?u2:d===!1?c2:c.merge}l(i,r.merge),i.keyFn=o===!1?Zue:hn(o)?a2(o):typeof o=="function"?o:i.keyFn,a&&Object.keys(a).forEach(function(c){var d=n.getFieldPolicy(t,c,!0),f=a[c];if(typeof f=="function")d.read=f;else{var p=f.keyArgs,m=f.read,g=f.merge;d.keyFn=p===!1?l2:hn(p)?s2(p):typeof p=="function"?p:d.keyFn,typeof m=="function"&&(d.read=m),l(d,g)}d.read&&d.merge&&(d.keyFn=d.keyFn||l2)})},e.prototype.setRootTypename=function(t,r){r===void 0&&(r=t);var n="ROOT_"+t.toUpperCase(),i=this.rootTypenamesById[n];r!==i&&(_t(!i||i===t,5,t),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[r]=n,this.rootTypenamesById[n]=r)},e.prototype.addPossibleTypes=function(t){var r=this;this.usingPossibleTypes=!0,Object.keys(t).forEach(function(n){r.getSupertypeSet(n,!0),t[n].forEach(function(i){r.getSupertypeSet(i,!0).add(n);var o=i.match(J5);(!o||o[0]!==i)&&r.fuzzySubtypes.set(i,new RegExp(i))})})},e.prototype.getTypePolicy=function(t){var r=this;if(!Fn.call(this.typePolicies,t)){var n=this.typePolicies[t]=Object.create(null);n.fields=Object.create(null);var i=this.supertypeMap.get(t);!i&&this.fuzzySubtypes.size&&(i=this.getSupertypeSet(t,!0),this.fuzzySubtypes.forEach(function(a,l){if(a.test(t)){var c=r.supertypeMap.get(l);c&&c.forEach(function(d){return i.add(d)})}})),i&&i.size&&i.forEach(function(a){var l=r.getTypePolicy(a),c=l.fields,d=Ms(l,["fields"]);Object.assign(n,d),Object.assign(n.fields,c)})}var o=this.toBeAdded[t];return o&&o.length&&o.splice(0).forEach(function(a){r.updateTypePolicy(t,a)}),this.typePolicies[t]},e.prototype.getFieldPolicy=function(t,r,n){if(t){var i=this.getTypePolicy(t).fields;return i[r]||n&&(i[r]=Object.create(null))}},e.prototype.getSupertypeSet=function(t,r){var n=this.supertypeMap.get(t);return!n&&r&&this.supertypeMap.set(t,n=new Set),n},e.prototype.fragmentMatches=function(t,r,n,i){var o=this;if(!t.typeCondition)return!0;if(!r)return!1;var a=t.typeCondition.name.value;if(r===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var l=this.getSupertypeSet(r,!0),c=[l],d=function(b){var y=o.getSupertypeSet(b,!1);y&&y.size&&c.indexOf(y)<0&&c.push(y)},f=!!(n&&this.fuzzySubtypes.size),p=!1,m=0;m<c.length;++m){var g=c[m];if(g.has(a))return l.has(a)||(p&&globalThis.__DEV__!==!1&&_t.warn(6,r,a),l.add(a)),!0;g.forEach(d),f&&m===c.length-1&&SP(t.selectionSet,n,i)&&(f=!1,p=!0,this.fuzzySubtypes.forEach(function(b,y){var w=r.match(b);w&&w[0]===r&&d(y)}))}return!1},e.prototype.hasKeyArgs=function(t,r){var n=this.getFieldPolicy(t,r,!1);return!!(n&&n.keyFn)},e.prototype.getStoreFieldName=function(t){var r=t.typename,n=t.fieldName,i=this.getFieldPolicy(r,n,!1),o,a=i&&i.keyFn;if(a&&r)for(var l={typename:r,fieldName:n,field:t.field||null,variables:t.variables},c=_P(t);a;){var d=a(c,l);if(hn(d))a=s2(d);else{o=d||n;break}}return o===void 0&&(o=t.field?yle(t.field,t.variables):w5(n,_P(t))),o===!1?n:n===Yl(o)?o:n+":"+o},e.prototype.readField=function(t,r){var n=t.from;if(n){var i=t.field||t.fieldName;if(i){if(t.typename===void 0){var o=r.store.getFieldValue(n,"__typename");o&&(t.typename=o)}var a=this.getStoreFieldName(t),l=Yl(a),c=r.store.getFieldValue(n,a),d=this.getFieldPolicy(t.typename,l,!1),f=d&&d.read;if(f){var p=d2(this,n,t,r,r.store.getStorage(wr(n)?n.__ref:n,a));return BE.withValue(this.cache,f,[c,p])}return c}}},e.prototype.getReadFunction=function(t,r){var n=this.getFieldPolicy(t,r,!1);return n&&n.read},e.prototype.getMergeFunction=function(t,r,n){var i=this.getFieldPolicy(t,r,!1),o=i&&i.merge;return!o&&n&&(i=this.getTypePolicy(n),o=i&&i.merge),o},e.prototype.runMergeFunction=function(t,r,n,i,o){var a=n.field,l=n.typename,c=n.merge;return c===u2?iB(i.store)(t,r):c===c2?r:(i.overwrite&&(t=void 0),c(t,r,d2(this,void 0,{typename:l,fieldName:a.name.value,field:a,variables:i.variables},i,o||Object.create(null))))},e}();function d2(e,t,r,n,i){var o=e.getStoreFieldName(r),a=Yl(o),l=r.variables||n.variables,c=n.store,d=c.toReference,f=c.canRead;return{args:_P(r),field:r.field||null,fieldName:a,storeFieldName:o,variables:l,isReference:wr,toReference:d,storage:i,cache:e.cache,canRead:f,readField:function(){return e.readField(qE(arguments,t,l),n)},mergeObjects:iB(n.store)}}function qE(e,t,r){var n=e[0],i=e[1],o=e.length,a;return typeof n=="string"?a={fieldName:n,from:o>1?i:t}:(a=ve({},n),Fn.call(a,"from")||(a.from=t)),globalThis.__DEV__!==!1&&a.from===void 0&&globalThis.__DEV__!==!1&&_t.warn(7,JL(Array.from(e))),a.variables===void 0&&(a.variables=r),a}function iB(e){return function(r,n){if(hn(r)||hn(n))throw Ei(8);if(fn(r)&&fn(n)){var i=e.getFieldValue(r,"__typename"),o=e.getFieldValue(n,"__typename"),a=i&&o&&i!==o;if(a)return n;if(wr(r)&&Bd(n))return e.merge(r.__ref,n),r;if(Bd(r)&&wr(n))return e.merge(r,n.__ref),n;if(Bd(r)&&Bd(n))return ve(ve({},r),n)}return n}}function h_(e,t,r){var n="".concat(t).concat(r),i=e.flavors.get(n);return i||e.flavors.set(n,i=e.clientOnly===t&&e.deferred===r?e:ve(ve({},e),{clientOnly:t,deferred:r})),i}var tce=function(){function e(t,r,n){this.cache=t,this.reader=r,this.fragments=n}return e.prototype.writeToStore=function(t,r){var n=this,i=r.query,o=r.result,a=r.dataId,l=r.variables,c=r.overwrite,d=Km(i),f=que();l=ve(ve({},OE(d)),l);var p=ve(ve({store:t,written:Object.create(null),merge:function(g,b){return f.merge(g,b)},variables:l,varString:Ml(l)},Z5(i,this.fragments)),{overwrite:!!c,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),m=this.processSelectionSet({result:o||Object.create(null),dataId:a,selectionSet:d.selectionSet,mergeTree:{map:new Map},context:p});if(!wr(m))throw Ei(11,o);return p.incomingById.forEach(function(g,b){var y=g.storeObject,w=g.mergeTree,_=g.fieldNodeSet,S=Qd(b);if(w&&w.map.size){var C=n.applyMerges(w,S,y,p);if(wr(C))return;y=C}if(globalThis.__DEV__!==!1&&!p.overwrite){var k=Object.create(null);_.forEach(function(T){T.selectionSet&&(k[T.name.value]=!0)});var E=function(T){return k[Yl(T)]===!0},R=function(T){var A=w&&w.map.get(T);return!!(A&&A.info&&A.info.merge)};Object.keys(y).forEach(function(T){E(T)&&!R(T)&&rce(S,y,T,p.store)})}t.merge(b,y)}),t.retain(m.__ref),m},e.prototype.processSelectionSet=function(t){var r=this,n=t.dataId,i=t.result,o=t.selectionSet,a=t.context,l=t.mergeTree,c=this.cache.policies,d=Object.create(null),f=n&&c.rootTypenamesById[n]||cP(i,o,a.fragmentMap)||n&&a.store.get(n,"__typename");typeof f=="string"&&(d.__typename=f);var p=function(){var C=qE(arguments,d,a.variables);if(wr(C.from)){var k=a.incomingById.get(C.from.__ref);if(k){var E=c.readField(ve(ve({},C),{from:k.storeObject}),a);if(E!==void 0)return E}}return c.readField(C,a)},m=new Set;this.flattenFields(o,i,a,f).forEach(function(C,k){var E,R=Wl(k),T=i[R];if(m.add(k),T!==void 0){var A=c.getStoreFieldName({typename:f,fieldName:k.name.value,field:k,variables:C.variables}),M=f2(l,A),B=r.processFieldValue(T,k,k.selectionSet?h_(C,!1,!1):C,M),Q=void 0;k.selectionSet&&(wr(B)||Bd(B))&&(Q=p("__typename",B));var se=c.getMergeFunction(f,k.name.value,Q);se?M.info={field:k,typename:f,merge:se}:h2(l,A),d=C.merge(d,(E={},E[A]=B,E))}else globalThis.__DEV__!==!1&&!C.clientOnly&&!C.deferred&&!AE.added(k)&&!c.getReadFunction(f,k.name.value)&&globalThis.__DEV__!==!1&&_t.error(12,Wl(k),i)});try{var g=c.identify(i,{typename:f,selectionSet:o,fragmentMap:a.fragmentMap,storeObject:d,readField:p}),b=g[0],y=g[1];n=n||b,y&&(d=a.merge(d,y))}catch(C){if(!n)throw C}if(typeof n=="string"){var w=Qd(n),_=a.written[n]||(a.written[n]=[]);if(_.indexOf(o)>=0||(_.push(o),this.reader&&this.reader.isFresh(i,w,o,a)))return w;var S=a.incomingById.get(n);return S?(S.storeObject=a.merge(S.storeObject,d),S.mergeTree=xP(S.mergeTree,l),m.forEach(function(C){return S.fieldNodeSet.add(C)})):a.incomingById.set(n,{storeObject:d,mergeTree:$b(l)?void 0:l,fieldNodeSet:m}),w}return d},e.prototype.processFieldValue=function(t,r,n,i){var o=this;return!r.selectionSet||t===null?globalThis.__DEV__!==!1?B5(t):t:hn(t)?t.map(function(a,l){var c=o.processFieldValue(a,r,n,f2(i,l));return h2(i,l),c}):this.processSelectionSet({result:t,selectionSet:r.selectionSet,context:n,mergeTree:i})},e.prototype.flattenFields=function(t,r,n,i){i===void 0&&(i=cP(r,t,n.fragmentMap));var o=new Map,a=this.cache.policies,l=new kf(!1);return function c(d,f){var p=l.lookup(d,f.clientOnly,f.deferred);p.visited||(p.visited=!0,d.selections.forEach(function(m){if(Hm(m,n.variables)){var g=f.clientOnly,b=f.deferred;if(!(g&&b)&&Za(m.directives)&&m.directives.forEach(function(_){var S=_.name.value;if(S==="client"&&(g=!0),S==="defer"){var C=U0(_,n.variables);(!C||C.if!==!1)&&(b=!0)}}),Kl(m)){var y=o.get(m);y&&(g=g&&y.clientOnly,b=b&&y.deferred),o.set(m,h_(n,g,b))}else{var w=q0(m,n.lookupFragment);if(!w&&m.kind===Je.FRAGMENT_SPREAD)throw Ei(13,m.name.value);w&&a.fragmentMatches(w,i,r,n.variables)&&c(w.selectionSet,h_(n,g,b))}}}))}(t,n),o},e.prototype.applyMerges=function(t,r,n,i,o){var a,l=this;if(t.map.size&&!wr(n)){var c=!hn(n)&&(wr(r)||Bd(r))?r:void 0,d=n;c&&!o&&(o=[wr(c)?c.__ref:c]);var f,p=function(m,g){return hn(m)?typeof g=="number"?m[g]:void 0:i.store.getFieldValue(m,String(g))};t.map.forEach(function(m,g){var b=p(c,g),y=p(d,g);if(y!==void 0){o&&o.push(g);var w=l.applyMerges(m,b,y,i,o);w!==y&&(f=f||new Map,f.set(g,w)),o&&_t(o.pop()===g)}}),f&&(n=hn(d)?d.slice(0):ve({},d),f.forEach(function(m,g){n[g]=m}))}return t.info?this.cache.policies.runMergeFunction(r,n,t.info,i,o&&(a=i.store).getStorage.apply(a,o)):n},e}(),oB=[];function f2(e,t){var r=e.map;return r.has(t)||r.set(t,oB.pop()||{map:new Map}),r.get(t)}function xP(e,t){if(e===t||!t||$b(t))return e;if(!e||$b(e))return t;var r=e.info&&t.info?ve(ve({},e.info),t.info):e.info||t.info,n=e.map.size&&t.map.size,i=n?new Map:e.map.size?e.map:t.map,o={info:r,map:i};if(n){var a=new Set(t.map.keys());e.map.forEach(function(l,c){o.map.set(c,xP(l,t.map.get(c))),a.delete(c)}),a.forEach(function(l){o.map.set(l,xP(t.map.get(l),e.map.get(l)))})}return o}function $b(e){return!e||!(e.info||e.map.size)}function h2(e,t){var r=e.map,n=r.get(t);n&&$b(n)&&(oB.push(n),r.delete(t))}var p2=new Set;function rce(e,t,r,n){var i=function(p){var m=n.getFieldValue(p,r);return typeof m=="object"&&m},o=i(e);if(o){var a=i(t);if(a&&!wr(o)&&!qr(o,a)&&!Object.keys(o).every(function(p){return n.getFieldValue(a,p)!==void 0})){var l=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),c=Yl(r),d="".concat(l,".").concat(c);if(!p2.has(d)){p2.add(d);var f=[];!hn(o)&&!hn(a)&&[o,a].forEach(function(p){var m=n.getFieldValue(p,"__typename");typeof m=="string"&&!f.includes(m)&&f.push(m)}),globalThis.__DEV__!==!1&&_t.warn(14,c,l,f.length?"either ensure all objects of type "+f.join(" and ")+" have an ID or a custom merge function, or ":"",d,ve({},o),ve({},a))}}}}var aB=function(e){ga(t,e);function t(r){r===void 0&&(r={});var n=e.call(this)||this;return n.watches=new Set,n.addTypenameTransform=new $5(AE),n.assumeImmutableResults=!0,n.makeVar=Xue,n.txCount=0,n.config=Vue(r),n.addTypename=!!n.config.addTypename,n.policies=new ece({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return t.prototype.init=function(){var r=this.data=new tm.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=r.stump,this.resetResultCache()},t.prototype.resetResultCache=function(r){var n=this,i=this.storeReader,o=this.config.fragments;this.storeWriter=new tce(this,this.storeReader=new Kue({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:X5(this.config),canon:r?void 0:i&&i.canon,fragments:o}),o),this.maybeBroadcastWatch=em(function(a,l){return n.broadcastWatch(a,l)},{max:this.config.resultCacheMaxSize||Bs["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(a){var l=a.optimistic?n.optimisticData:n.data;if(yp(l)){var c=a.optimistic,d=a.id,f=a.variables;return l.makeCacheKey(a.query,a.callback,Ml({optimistic:c,id:d,variables:f}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(a){return a.resetCaching()})},t.prototype.restore=function(r){return this.init(),r&&this.data.replace(r),this},t.prototype.extract=function(r){return r===void 0&&(r=!1),(r?this.optimisticData:this.data).extract()},t.prototype.read=function(r){var n=r.returnPartialData,i=n===void 0?!1:n;try{return this.storeReader.diffQueryAgainstStore(ve(ve({},r),{store:r.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:i})).result||null}catch(o){if(o instanceof G5)return null;throw o}},t.prototype.write=function(r){try{return++this.txCount,this.storeWriter.writeToStore(this.data,r)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.modify=function(r){if(Fn.call(r,"id")&&!r.id)return!1;var n=r.optimistic?this.optimisticData:this.data;try{return++this.txCount,n.modify(r.id||"ROOT_QUERY",r.fields)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.diff=function(r){return this.storeReader.diffQueryAgainstStore(ve(ve({},r),{store:r.optimistic?this.optimisticData:this.data,rootId:r.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(r){var n=this;return this.watches.size||Yue(this),this.watches.add(r),r.immediate&&this.maybeBroadcastWatch(r),function(){n.watches.delete(r)&&!n.watches.size&&i2(n),n.maybeBroadcastWatch.forget(r)}},t.prototype.gc=function(r){var n;Ml.reset(),G0.reset(),this.addTypenameTransform.resetCache(),(n=this.config.fragments)===null||n===void 0||n.resetCaches();var i=this.optimisticData.gc();return r&&!this.txCount&&(r.resetResultCache?this.resetResultCache(r.resetResultIdentities):r.resetResultIdentities&&this.storeReader.resetCanon()),i},t.prototype.retain=function(r,n){return(n?this.optimisticData:this.data).retain(r)},t.prototype.release=function(r,n){return(n?this.optimisticData:this.data).release(r)},t.prototype.identify=function(r){if(wr(r))return r.__ref;try{return this.policies.identify(r)[0]}catch(n){globalThis.__DEV__!==!1&&_t.warn(n)}},t.prototype.evict=function(r){if(!r.id){if(Fn.call(r,"id"))return!1;r=ve(ve({},r),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(r,this.data)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.reset=function(r){var n=this;return this.init(),Ml.reset(),r&&r.discardWatches?(this.watches.forEach(function(i){return n.maybeBroadcastWatch.forget(i)}),this.watches.clear(),i2(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(r){var n=this.optimisticData.removeLayer(r);n!==this.optimisticData&&(this.optimisticData=n,this.broadcastWatches())},t.prototype.batch=function(r){var n=this,i=r.update,o=r.optimistic,a=o===void 0?!0:o,l=r.removeOptimistic,c=r.onWatchUpdated,d,f=function(m){var g=n,b=g.data,y=g.optimisticData;++n.txCount,m&&(n.data=n.optimisticData=m);try{return d=i(n)}finally{--n.txCount,n.data=b,n.optimisticData=y}},p=new Set;return c&&!this.txCount&&this.broadcastWatches(ve(ve({},r),{onWatchUpdated:function(m){return p.add(m),!1}})),typeof a=="string"?this.optimisticData=this.optimisticData.addLayer(a,f):a===!1?f(this.data):f(),typeof l=="string"&&(this.optimisticData=this.optimisticData.removeLayer(l)),c&&p.size?(this.broadcastWatches(ve(ve({},r),{onWatchUpdated:function(m,g){var b=c.call(this,m,g);return b!==!1&&p.delete(m),b}})),p.size&&p.forEach(function(m){return n.maybeBroadcastWatch.dirty(m)})):this.broadcastWatches(r),d},t.prototype.performTransaction=function(r,n){return this.batch({update:r,optimistic:n||n!==null})},t.prototype.transformDocument=function(r){return this.addTypenameToDocument(this.addFragmentsToDocument(r))},t.prototype.broadcastWatches=function(r){var n=this;this.txCount||this.watches.forEach(function(i){return n.maybeBroadcastWatch(i,r)})},t.prototype.addFragmentsToDocument=function(r){var n=this.config.fragments;return n?n.transform(r):r},t.prototype.addTypenameToDocument=function(r){return this.addTypename?this.addTypenameTransform.transformDocument(r):r},t.prototype.broadcastWatch=function(r,n){var i=r.lastDiff,o=this.diff(r);n&&(r.optimistic&&typeof n.optimistic=="string"&&(o.fromOptimisticTransaction=!0),n.onWatchUpdated&&n.onWatchUpdated.call(this,r,o,i)===!1)||(!i||!qr(i.result,o.result))&&r.callback(r.lastDiff=o,i)},t}(K5);globalThis.__DEV__!==!1&&(aB.prototype.getMemoryInternals=ele);var Or;(function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"})(Or||(Or={}));function rm(e){return e?e<7:!1}var m2=Object.assign,nce=Object.hasOwnProperty,PP=function(e){ga(t,e);function t(r){var n=r.queryManager,i=r.queryInfo,o=r.options,a=e.call(this,function(w){try{var _=w._subscription._observer;_&&!_.error&&(_.error=ice)}catch{}var S=!a.observers.size;a.observers.add(w);var C=a.last;return C&&C.error?w.error&&w.error(C.error):C&&C.result&&w.next&&w.next(C.result),S&&a.reobserve().catch(function(){}),function(){a.observers.delete(w)&&!a.observers.size&&a.tearDownQuery()}})||this;a.observers=new Set,a.subscriptions=new Set,a.queryInfo=i,a.queryManager=n,a.waitForOwnResult=p_(o.fetchPolicy),a.isTornDown=!1;var l=n.defaultOptions.watchQuery,c=l===void 0?{}:l,d=c.fetchPolicy,f=d===void 0?"cache-first":d,p=o.fetchPolicy,m=p===void 0?f:p,g=o.initialFetchPolicy,b=g===void 0?m==="standby"?f:m:g;a.options=ve(ve({},o),{initialFetchPolicy:b,fetchPolicy:m}),a.queryId=i.queryId||n.generateQueryId();var y=Km(a.query);return a.queryName=y&&y.name&&y.name.value,a}return Object.defineProperty(t.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var r=this;return new Promise(function(n,i){var o={next:function(l){n(l),r.observers.delete(o),r.observers.size||r.queryManager.removeQuery(r.queryId),setTimeout(function(){a.unsubscribe()},0)},error:i},a=r.subscribe(o)})},t.prototype.resetDiff=function(){this.queryInfo.resetDiff()},t.prototype.getCurrentResult=function(r){r===void 0&&(r=!0);var n=this.getLastResult(!0),i=this.queryInfo.networkStatus||n&&n.networkStatus||Or.ready,o=ve(ve({},n),{loading:rm(i),networkStatus:i}),a=this.options.fetchPolicy,l=a===void 0?"cache-first":a;if(!(p_(l)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers))if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var c=this.queryInfo.getDiff();(c.complete||this.options.returnPartialData)&&(o.data=c.result),qr(o.data,{})&&(o.data=void 0),c.complete?(delete o.partial,c.complete&&o.networkStatus===Or.loading&&(l==="cache-first"||l==="cache-only")&&(o.networkStatus=Or.ready,o.loading=!1)):o.partial=!0,globalThis.__DEV__!==!1&&!c.complete&&!this.options.partialRefetch&&!o.loading&&!o.data&&!o.error&&lB(c.missing)}return r&&this.updateLastResult(o),o},t.prototype.isDifferentFromLastResult=function(r,n){if(!this.last)return!0;var i=this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective?!W5(this.query,this.last.result,r,this.variables):!qr(this.last.result,r);return i||n&&!qr(this.last.variables,n)},t.prototype.getLast=function(r,n){var i=this.last;if(i&&i[r]&&(!n||qr(i.variables,this.variables)))return i[r]},t.prototype.getLastResult=function(r){return this.getLast("result",r)},t.prototype.getLastError=function(r){return this.getLast("error",r)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(r){var n,i={pollInterval:0},o=this.options.fetchPolicy;if(o==="cache-and-network"?i.fetchPolicy=o:o==="no-cache"?i.fetchPolicy="no-cache":i.fetchPolicy="network-only",globalThis.__DEV__!==!1&&r&&nce.call(r,"variables")){var a=S5(this.query),l=a.variableDefinitions;(!l||!l.some(function(c){return c.variable.name.value==="variables"}))&&globalThis.__DEV__!==!1&&_t.warn(20,r,((n=a.name)===null||n===void 0?void 0:n.value)||a)}return r&&!qr(this.options.variables,r)&&(i.variables=this.options.variables=ve(ve({},this.options.variables),r)),this.queryInfo.resetLastWrite(),this.reobserve(i,Or.refetch)},t.prototype.fetchMore=function(r){var n=this,i=ve(ve({},r.query?r:ve(ve(ve(ve({},this.options),{query:this.options.query}),r),{variables:ve(ve({},this.options.variables),r.variables)})),{fetchPolicy:"no-cache"});i.query=this.transformDocument(i.query);var o=this.queryManager.generateQueryId();this.lastQuery=r.query?this.transformDocument(this.options.query):i.query;var a=this.queryInfo,l=a.networkStatus;a.networkStatus=Or.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var c=new Set;return this.queryManager.fetchQuery(o,i,Or.fetchMore).then(function(d){return n.queryManager.removeQuery(o),a.networkStatus===Or.fetchMore&&(a.networkStatus=l),n.queryManager.cache.batch({update:function(f){var p=r.updateQuery;p?f.updateQuery({query:n.query,variables:n.variables,returnPartialData:!0,optimistic:!1},function(m){return p(m,{fetchMoreResult:d.data,variables:i.variables})}):f.writeQuery({query:i.query,variables:i.variables,data:d.data})},onWatchUpdated:function(f){c.add(f.query)}}),d}).finally(function(){c.has(n.query)||sB(n)})},t.prototype.subscribeToMore=function(r){var n=this,i=this.queryManager.startGraphQLSubscription({query:r.document,variables:r.variables,context:r.context}).subscribe({next:function(o){var a=r.updateQuery;a&&n.updateQuery(function(l,c){var d=c.variables;return a(l,{subscriptionData:o,variables:d})})},error:function(o){if(r.onError){r.onError(o);return}globalThis.__DEV__!==!1&&_t.error(21,o)}});return this.subscriptions.add(i),function(){n.subscriptions.delete(i)&&i.unsubscribe()}},t.prototype.setOptions=function(r){return this.reobserve(r)},t.prototype.silentSetOptions=function(r){var n=gf(this.options,r||{});m2(this.options,n)},t.prototype.setVariables=function(r){return qr(this.variables,r)?this.observers.size?this.result():Promise.resolve():(this.options.variables=r,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:r},Or.setVariables):Promise.resolve())},t.prototype.updateQuery=function(r){var n=this.queryManager,i=n.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,o=r(i,{variables:this.variables});o&&(n.cache.writeQuery({query:this.options.query,data:o,variables:this.variables}),n.broadcastQueries())},t.prototype.startPolling=function(r){this.options.pollInterval=r,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(r,n){if(n.nextFetchPolicy){var i=n.fetchPolicy,o=i===void 0?"cache-first":i,a=n.initialFetchPolicy,l=a===void 0?o:a;o==="standby"||(typeof n.nextFetchPolicy=="function"?n.fetchPolicy=n.nextFetchPolicy(o,{reason:r,options:n,observable:this,initialFetchPolicy:l}):r==="variables-changed"?n.fetchPolicy=l:n.fetchPolicy=n.nextFetchPolicy)}return n.fetchPolicy},t.prototype.fetch=function(r,n,i){return this.queryManager.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(this.queryId,r,n,i)},t.prototype.updatePolling=function(){var r=this;if(!this.queryManager.ssrMode){var n=this,i=n.pollingInfo,o=n.options.pollInterval;if(!o||!this.hasObservers()){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===o)){_t(o,22);var a=i||(this.pollingInfo={});a.interval=o;var l=function(){var d,f;r.pollingInfo&&(!rm(r.queryInfo.networkStatus)&&!(!((f=(d=r.options).skipPollAttempt)===null||f===void 0)&&f.call(d))?r.reobserve({fetchPolicy:r.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},Or.poll).then(c,c):c())},c=function(){var d=r.pollingInfo;d&&(clearTimeout(d.timeout),d.timeout=setTimeout(l,d.interval))};c()}}},t.prototype.updateLastResult=function(r,n){n===void 0&&(n=this.variables);var i=this.getLastError();return i&&this.last&&!qr(n,this.last.variables)&&(i=void 0),this.last=ve({result:this.queryManager.assumeImmutableResults?r:B5(r),variables:n},i?{error:i}:null)},t.prototype.reobserveAsConcast=function(r,n){var i=this;this.isTornDown=!1;var o=n===Or.refetch||n===Or.fetchMore||n===Or.poll,a=this.options.variables,l=this.options.fetchPolicy,c=gf(this.options,r||{}),d=o?c:m2(this.options,c),f=this.transformDocument(d.query);this.lastQuery=f,o||(this.updatePolling(),r&&r.variables&&!qr(r.variables,a)&&d.fetchPolicy!=="standby"&&d.fetchPolicy===l&&(this.applyNextFetchPolicy("variables-changed",d),n===void 0&&(n=Or.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=p_(d.fetchPolicy));var p=function(){i.concast===b&&(i.waitForOwnResult=!1)},m=d.variables&&ve({},d.variables),g=this.fetch(d,n,f),b=g.concast,y=g.fromLink,w={next:function(_){qr(i.variables,m)&&(p(),i.reportResult(_,m))},error:function(_){qr(i.variables,m)&&(p(),i.reportError(_,m))}};return!o&&(y||!this.concast)&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=b,this.observer=w),b.addObserver(w),b},t.prototype.reobserve=function(r,n){return this.reobserveAsConcast(r,n).promise},t.prototype.resubscribeAfterError=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=this.last;this.resetLastResults();var o=this.subscribe.apply(this,r);return this.last=i,o},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(r,n){var i=this.getLastError(),o=this.isDifferentFromLastResult(r,n);(i||!r.partial||this.options.returnPartialData)&&this.updateLastResult(r,n),(i||o)&&gp(this.observers,"next",r)},t.prototype.reportError=function(r,n){var i=ve(ve({},this.getLastResult()),{error:r,errors:r.graphQLErrors,networkStatus:Or.error,loading:!1});this.updateLastResult(i,n),gp(this.observers,"error",this.last.error=r)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(r){return r.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(r){return this.queryManager.transform(r)},t}(Rr);V5(PP);function sB(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return r==="cache-and-network"||r==="network-only"?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(i,o){return this.nextFetchPolicy=n,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(i,o):r}}):e.reobserve()}function ice(e){globalThis.__DEV__!==!1&&_t.error(23,e.message,e.stack)}function lB(e){globalThis.__DEV__!==!1&&e&&globalThis.__DEV__!==!1&&_t.debug(24,e)}function p_(e){return e==="network-only"||e==="no-cache"||e==="standby"}var uB=function(){function e(t){var r=t.cache,n=t.client,i=t.resolvers,o=t.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=r,n&&(this.client=n),i&&this.addResolvers(i),o&&this.setFragmentMatcher(o)}return e.prototype.addResolvers=function(t){var r=this;this.resolvers=this.resolvers||{},Array.isArray(t)?t.forEach(function(n){r.resolvers=F$(r.resolvers,n)}):this.resolvers=F$(this.resolvers,t)},e.prototype.setResolvers=function(t){this.resolvers={},this.addResolvers(t)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(t){return Cl(this,arguments,void 0,function(r){var n=r.document,i=r.remoteResult,o=r.context,a=r.variables,l=r.onlyRunForcedResolvers,c=l===void 0?!1:l;return El(this,function(d){return n?[2,this.resolveDocument(n,i.data,o,a,this.fragmentMatcher,c).then(function(f){return ve(ve({},i),{data:f.result})})]:[2,i]})})},e.prototype.setFragmentMatcher=function(t){this.fragmentMatcher=t},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(t){return Jp(["client"],t)&&this.resolvers?t:null},e.prototype.serverQuery=function(t){return M5(t)},e.prototype.prepareContext=function(t){var r=this.cache;return ve(ve({},t),{cache:r,getCacheKey:function(n){return r.identify(n)}})},e.prototype.addExportedVariables=function(t){return Cl(this,arguments,void 0,function(r,n,i){return n===void 0&&(n={}),i===void 0&&(i={}),El(this,function(o){return r?[2,this.resolveDocument(r,this.buildRootValueFromCache(r,n)||{},this.prepareContext(i),n).then(function(a){return ve(ve({},n),a.exportedVariables)})]:[2,ve({},n)]})})},e.prototype.shouldForceResolvers=function(t){var r=!1;return Ls(t,{Directive:{enter:function(n){if(n.name.value==="client"&&n.arguments&&(r=n.arguments.some(function(i){return i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0}),r))return EE}}}),r},e.prototype.buildRootValueFromCache=function(t,r){return this.cache.diff({query:Ble(t),variables:r,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(t,r){return Cl(this,arguments,void 0,function(n,i,o,a,l,c){var d,f,p,m,g,b,y,w,_,S,C;return o===void 0&&(o={}),a===void 0&&(a={}),l===void 0&&(l=function(){return!0}),c===void 0&&(c=!1),El(this,function(k){return d=Gm(n),f=H0(n),p=z0(f),m=this.collectSelectionsToResolve(d,p),g=d.operation,b=g?g.charAt(0).toUpperCase()+g.slice(1):"Query",y=this,w=y.cache,_=y.client,S={fragmentMap:p,context:ve(ve({},o),{cache:w,client:_}),variables:a,fragmentMatcher:l,defaultOperationType:b,exportedVariables:{},selectionsToResolve:m,onlyRunForcedResolvers:c},C=!1,[2,this.resolveSelectionSet(d.selectionSet,C,i,S).then(function(E){return{result:E,exportedVariables:S.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(t,r,n,i){return Cl(this,void 0,void 0,function(){var o,a,l,c,d,f=this;return El(this,function(p){return o=i.fragmentMap,a=i.context,l=i.variables,c=[n],d=function(m){return Cl(f,void 0,void 0,function(){var g,b;return El(this,function(y){return!r&&!i.selectionsToResolve.has(m)?[2]:Hm(m,l)?Kl(m)?[2,this.resolveField(m,r,n,i).then(function(w){var _;typeof w<"u"&&c.push((_={},_[Wl(m)]=w,_))})]:(wle(m)?g=m:(g=o[m.name.value],_t(g,18,m.name.value)),g&&g.typeCondition&&(b=g.typeCondition.name.value,i.fragmentMatcher(n,b,a))?[2,this.resolveSelectionSet(g.selectionSet,r,n,i).then(function(w){c.push(w)})]:[2]):[2]})})},[2,Promise.all(t.selections.map(d)).then(function(){return Q0(c)})]})})},e.prototype.resolveField=function(t,r,n,i){return Cl(this,void 0,void 0,function(){var o,a,l,c,d,f,p,m,g,b=this;return El(this,function(y){return n?(o=i.variables,a=t.name.value,l=Wl(t),c=a!==l,d=n[l]||n[a],f=Promise.resolve(d),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(t))&&(p=n.__typename||i.defaultOperationType,m=this.resolvers&&this.resolvers[p],m&&(g=m[c?a:l],g&&(f=Promise.resolve(BE.withValue(this.cache,g,[n,U0(t,o),i.context,{field:t,fragmentMap:i.fragmentMap}]))))),[2,f.then(function(w){var _,S;if(w===void 0&&(w=d),t.directives&&t.directives.forEach(function(k){k.name.value==="export"&&k.arguments&&k.arguments.forEach(function(E){E.name.value==="as"&&E.value.kind==="StringValue"&&(i.exportedVariables[E.value.value]=w)})}),!t.selectionSet||w==null)return w;var C=(S=(_=t.directives)===null||_===void 0?void 0:_.some(function(k){return k.name.value==="client"}))!==null&&S!==void 0?S:!1;if(Array.isArray(w))return b.resolveSubSelectedArray(t,r||C,w,i);if(t.selectionSet)return b.resolveSelectionSet(t.selectionSet,r||C,w,i)})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(t,r,n,i){var o=this;return Promise.all(n.map(function(a){if(a===null)return null;if(Array.isArray(a))return o.resolveSubSelectedArray(t,r,a,i);if(t.selectionSet)return o.resolveSelectionSet(t.selectionSet,r,a,i)}))},e.prototype.collectSelectionsToResolve=function(t,r){var n=function(a){return!Array.isArray(a)},i=this.selectionsToResolveCache;function o(a){if(!i.has(a)){var l=new Set;i.set(a,l),Ls(a,{Directive:function(c,d,f,p,m){c.name.value==="client"&&m.forEach(function(g){n(g)&&O$(g)&&l.add(g)})},FragmentSpread:function(c,d,f,p,m){var g=r[c.name.value];_t(g,19,c.name.value);var b=o(g);b.size>0&&(m.forEach(function(y){n(y)&&O$(y)&&l.add(y)}),l.add(c),b.forEach(function(y){l.add(y)}))}})}return i.get(a)}return o(t)},e}(),Vd=new(jf?WeakMap:Map);function m_(e,t){var r=e[t];typeof r=="function"&&(e[t]=function(){return Vd.set(e,(Vd.get(e)+1)%1e15),r.apply(this,arguments)})}function v2(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var v_=function(){function e(t,r){r===void 0&&(r=t.generateQueryId()),this.queryId=r,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=t.cache;Vd.has(n)||(Vd.set(n,0),m_(n,"evict"),m_(n,"modify"),m_(n,"reset"))}return e.prototype.init=function(t){var r=t.networkStatus||Or.loading;return this.variables&&this.networkStatus!==Or.loading&&!qr(this.variables,t.variables)&&(r=Or.setVariables),qr(t.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:t.document,variables:t.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:r}),t.observableQuery&&this.setObservableQuery(t.observableQuery),t.lastRequestId&&(this.lastRequestId=t.lastRequestId),this},e.prototype.reset=function(){v2(this),this.dirty=!1},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var t=this.getDiffOptions();if(this.lastDiff&&qr(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var r=this.observableQuery;if(r&&r.options.fetchPolicy==="no-cache")return{complete:!1};var n=this.cache.diff(t);return this.updateLastDiff(n,t),n},e.prototype.updateLastDiff=function(t,r){this.lastDiff=t?{diff:t,options:r||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(t){var r;return t===void 0&&(t=this.variables),{query:this.document,variables:t,returnPartialData:!0,optimistic:!0,canonizeResults:(r=this.observableQuery)===null||r===void 0?void 0:r.options.canonizeResults}},e.prototype.setDiff=function(t){var r=this,n,i=this.lastDiff&&this.lastDiff.diff;t&&!t.complete&&(!((n=this.observableQuery)===null||n===void 0)&&n.getLastError())||(this.updateLastDiff(t),!this.dirty&&!qr(i&&i.result,t&&t.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return r.notify()},0))))},e.prototype.setObservableQuery=function(t){var r=this;t!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=t,t?(t.queryInfo=this,this.listeners.add(this.oqListener=function(){var n=r.getDiff();n.fromOptimisticTransaction?t.observe():sB(t)})):delete this.oqListener)},e.prototype.notify=function(){var t=this;v2(this),this.shouldNotify()&&this.listeners.forEach(function(r){return r(t)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(rm(this.networkStatus)&&this.observableQuery){var t=this.observableQuery.options.fetchPolicy;if(t!=="cache-only"&&t!=="cache-and-network")return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel;var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(t){var r=this;t===void 0&&(t=this.variables);var n=this.observableQuery;if(!(n&&n.options.fetchPolicy==="no-cache")){var i=ve(ve({},this.getDiffOptions(t)),{watcher:this,callback:function(o){return r.setDiff(o)}});(!this.lastWatch||!qr(i,this.lastWatch))&&(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(t,r){var n=this.lastWrite;return!(n&&n.dmCount===Vd.get(this.cache)&&qr(r,n.variables)&&qr(t.data,n.result.data))},e.prototype.markResult=function(t,r,n,i){var o=this,a=new Ql,l=Za(t.errors)?t.errors.slice(0):[];if(this.reset(),"incremental"in t&&Za(t.incremental)){var c=z5(this.getDiff().result,t);t.data=c}else if("hasNext"in t&&t.hasNext){var d=this.getDiff();t.data=a.merge(d.result,t.data)}this.graphQLErrors=l,n.fetchPolicy==="no-cache"?this.updateLastDiff({result:t.data,complete:!0},this.getDiffOptions(n.variables)):i!==0&&(CP(t,n.errorPolicy)?this.cache.performTransaction(function(f){if(o.shouldWrite(t,n.variables))f.writeQuery({query:r,data:t.data,variables:n.variables,overwrite:i===1}),o.lastWrite={result:t,variables:n.variables,dmCount:Vd.get(o.cache)};else if(o.lastDiff&&o.lastDiff.diff.complete){t.data=o.lastDiff.diff.result;return}var p=o.getDiffOptions(n.variables),m=f.diff(p);!o.stopped&&qr(o.variables,n.variables)&&o.updateWatch(n.variables),o.updateLastDiff(m,p),m.complete&&(t.data=m.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=Or.ready},e.prototype.markError=function(t){return this.networkStatus=Or.error,this.lastWrite=void 0,this.reset(),t.graphQLErrors&&(this.graphQLErrors=t.graphQLErrors),t.networkError&&(this.networkError=t.networkError),t},e}();function CP(e,t){t===void 0&&(t="none");var r=t==="ignore"||t==="all",n=!Xy(e);return!n&&r&&e.data&&(n=!0),n}var oce=Object.prototype.hasOwnProperty,g2=Object.create(null),ace=function(){function e(t){var r=t.cache,n=t.link,i=t.defaultOptions,o=t.documentTransform,a=t.queryDeduplication,l=a===void 0?!1:a,c=t.onBroadcast,d=t.ssrMode,f=d===void 0?!1:d,p=t.clientAwareness,m=p===void 0?{}:p,g=t.localState,b=t.assumeImmutableResults,y=b===void 0?!!r.assumeImmutableResults:b,w=t.defaultContext,_=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new m5(Bs["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new kf(!1);var S=new $5(function(C){return _.cache.transformDocument(C)},{cache:!1});this.cache=r,this.link=n,this.defaultOptions=i||Object.create(null),this.queryDeduplication=l,this.clientAwareness=m,this.localState=g||new uB({cache:r}),this.ssrMode=f,this.assumeImmutableResults=y,this.documentTransform=o?S.concat(o).concat(S):S,this.defaultContext=w||Object.create(null),(this.onBroadcast=c)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var t=this;this.queries.forEach(function(r,n){t.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(Ei(25))},e.prototype.cancelPendingFetches=function(t){this.fetchCancelFns.forEach(function(r){return r(t)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(t){return Cl(this,arguments,void 0,function(r){var n,i,o,a,l,c,d,f=r.mutation,p=r.variables,m=r.optimisticResponse,g=r.updateQueries,b=r.refetchQueries,y=b===void 0?[]:b,w=r.awaitRefetchQueries,_=w===void 0?!1:w,S=r.update,C=r.onQueryUpdated,k=r.fetchPolicy,E=k===void 0?((c=this.defaultOptions.mutate)===null||c===void 0?void 0:c.fetchPolicy)||"network-only":k,R=r.errorPolicy,T=R===void 0?((d=this.defaultOptions.mutate)===null||d===void 0?void 0:d.errorPolicy)||"none":R,A=r.keepRootFields,M=r.context;return El(this,function(B){switch(B.label){case 0:return _t(f,26),_t(E==="network-only"||E==="no-cache",27),n=this.generateMutationId(),f=this.cache.transformForLink(this.transform(f)),i=this.getDocumentInfo(f).hasClientExports,p=this.getVariables(f,p),i?[4,this.localState.addExportedVariables(f,p,M)]:[3,2];case 1:p=B.sent(),B.label=2;case 2:return o=this.mutationStore&&(this.mutationStore[n]={mutation:f,variables:p,loading:!0,error:null}),a=m&&this.markMutationOptimistic(m,{mutationId:n,document:f,variables:p,fetchPolicy:E,errorPolicy:T,context:M,updateQueries:g,update:S,keepRootFields:A}),this.broadcastQueries(),l=this,[2,new Promise(function(Q,se){return l_(l.getObservableFromLink(f,ve(ve({},M),{optimisticResponse:a?m:void 0}),p,!1),function(ie){if(Xy(ie)&&T==="none")throw new fd({graphQLErrors:vP(ie)});o&&(o.loading=!1,o.error=null);var N=ve({},ie);return typeof y=="function"&&(y=y(N)),T==="ignore"&&Xy(N)&&delete N.errors,l.markMutationResult({mutationId:n,result:N,document:f,variables:p,fetchPolicy:E,errorPolicy:T,context:M,update:S,updateQueries:g,awaitRefetchQueries:_,refetchQueries:y,removeOptimistic:a?n:void 0,onQueryUpdated:C,keepRootFields:A})}).subscribe({next:function(ie){l.broadcastQueries(),(!("hasNext"in ie)||ie.hasNext===!1)&&Q(ie)},error:function(ie){o&&(o.loading=!1,o.error=ie),a&&l.cache.removeOptimistic(n),l.broadcastQueries(),se(ie instanceof fd?ie:new fd({networkError:ie}))}})})]}})})},e.prototype.markMutationResult=function(t,r){var n=this;r===void 0&&(r=this.cache);var i=t.result,o=[],a=t.fetchPolicy==="no-cache";if(!a&&CP(i,t.errorPolicy)){if(Yd(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}),Yd(i)&&Za(i.incremental)){var l=r.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}),c=void 0;l.result&&(c=z5(l.result,i)),typeof c<"u"&&(i.data=c,o.push({result:c,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}))}var d=t.updateQueries;d&&this.queries.forEach(function(p,m){var g=p.observableQuery,b=g&&g.queryName;if(!(!b||!oce.call(d,b))){var y=d[b],w=n.queries.get(m),_=w.document,S=w.variables,C=r.diff({query:_,variables:S,returnPartialData:!0,optimistic:!1}),k=C.result,E=C.complete;if(E&&k){var R=y(k,{mutationResult:i,queryName:_&&dP(_)||void 0,queryVariables:S});R&&o.push({result:R,dataId:"ROOT_QUERY",query:_,variables:S})}}})}if(o.length>0||(t.refetchQueries||"").length>0||t.update||t.onQueryUpdated||t.removeOptimistic){var f=[];if(this.refetchQueries({updateCache:function(p){a||o.forEach(function(y){return p.write(y)});var m=t.update,g=!tue(i)||Yd(i)&&!i.hasNext;if(m){if(!a){var b=p.diff({id:"ROOT_MUTATION",query:n.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});b.complete&&(i=ve(ve({},i),{data:b.result}),"incremental"in i&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}g&&m(p,i,{context:t.context,variables:t.variables})}!a&&!t.keepRootFields&&g&&p.modify({id:"ROOT_MUTATION",fields:function(y,w){var _=w.fieldName,S=w.DELETE;return _==="__typename"?y:S}})},include:t.refetchQueries,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(function(p){return f.push(p)}),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(f).then(function(){return i})}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(t,r){var n=this,i=typeof t=="function"?t(r.variables,{IGNORE:g2}):t;return i===g2?!1:(this.cache.recordOptimisticTransaction(function(o){try{n.markMutationResult(ve(ve({},r),{result:{data:i}}),o)}catch(a){globalThis.__DEV__!==!1&&_t.error(a)}},r.mutationId),!0)},e.prototype.fetchQuery=function(t,r,n){return this.fetchConcastWithInfo(t,r,n).concast.promise},e.prototype.getQueryStore=function(){var t=Object.create(null);return this.queries.forEach(function(r,n){t[n]={variables:r.variables,networkStatus:r.networkStatus,networkError:r.networkError,graphQLErrors:r.graphQLErrors}}),t},e.prototype.resetErrors=function(t){var r=this.queries.get(t);r&&(r.networkError=void 0,r.graphQLErrors=[])},e.prototype.transform=function(t){return this.documentTransform.transformDocument(t)},e.prototype.getDocumentInfo=function(t){var r=this.transformCache;if(!r.has(t)){var n={hasClientExports:Nse(t),hasForcedResolvers:this.localState.shouldForceResolvers(t),hasNonreactiveDirective:Jp(["nonreactive"],t),clientQuery:this.localState.clientQuery(t),serverQuery:D5([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"}],t),defaultVars:OE(Km(t)),asQuery:ve(ve({},t),{definitions:t.definitions.map(function(i){return i.kind==="OperationDefinition"&&i.operation!=="query"?ve(ve({},i),{operation:"query"}):i})})};r.set(t,n)}return r.get(t)},e.prototype.getVariables=function(t,r){return ve(ve({},this.getDocumentInfo(t).defaultVars),r)},e.prototype.watchQuery=function(t){var r=this.transform(t.query);t=ve(ve({},t),{variables:this.getVariables(r,t.variables)}),typeof t.notifyOnNetworkStatusChange>"u"&&(t.notifyOnNetworkStatusChange=!1);var n=new v_(this),i=new PP({queryManager:this,queryInfo:n,options:t});return i.lastQuery=r,this.queries.set(i.queryId,n),n.init({document:r,observableQuery:i,variables:i.variables}),i},e.prototype.query=function(t,r){var n=this;return r===void 0&&(r=this.generateQueryId()),_t(t.query,28),_t(t.query.kind==="Document",29),_t(!t.returnPartialData,30),_t(!t.pollInterval,31),this.fetchQuery(r,ve(ve({},t),{query:this.transform(t.query)})).finally(function(){return n.stopQuery(r)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(t){this.stopQueryInStoreNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(t){var r=this.queries.get(t);r&&r.stop()},e.prototype.clearStore=function(t){return t===void 0&&(t={discardWatches:!0}),this.cancelPendingFetches(Ei(32)),this.queries.forEach(function(r){r.observableQuery?r.networkStatus=Or.loading:r.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(t)},e.prototype.getObservableQueries=function(t){var r=this;t===void 0&&(t="active");var n=new Map,i=new Map,o=new Set;return Array.isArray(t)&&t.forEach(function(a){typeof a=="string"?i.set(a,!1):lle(a)?i.set(r.transform(a),!1):fn(a)&&a.query&&o.add(a)}),this.queries.forEach(function(a,l){var c=a.observableQuery,d=a.document;if(c){if(t==="all"){n.set(l,c);return}var f=c.queryName,p=c.options.fetchPolicy;if(p==="standby"||t==="active"&&!c.hasObservers())return;(t==="active"||f&&i.has(f)||d&&i.has(d))&&(n.set(l,c),f&&i.set(f,!0),d&&i.set(d,!0))}}),o.size&&o.forEach(function(a){var l=rP("legacyOneTimeQuery"),c=r.getQuery(l).init({document:a.query,variables:a.variables}),d=new PP({queryManager:r,queryInfo:c,options:ve(ve({},a),{fetchPolicy:"network-only"})});_t(d.queryId===l),c.setObservableQuery(d),n.set(l,d)}),globalThis.__DEV__!==!1&&i.size&&i.forEach(function(a,l){a||globalThis.__DEV__!==!1&&_t.warn(typeof l=="string"?33:34,l)}),n},e.prototype.reFetchObservableQueries=function(t){var r=this;t===void 0&&(t=!1);var n=[];return this.getObservableQueries(t?"all":"active").forEach(function(i,o){var a=i.options.fetchPolicy;i.resetLastResults(),(t||a!=="standby"&&a!=="cache-only")&&n.push(i.refetch()),r.getQuery(o).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(t){this.getQuery(t.queryId).setObservableQuery(t)},e.prototype.startGraphQLSubscription=function(t){var r=this,n=t.query,i=t.fetchPolicy,o=t.errorPolicy,a=o===void 0?"none":o,l=t.variables,c=t.context,d=c===void 0?{}:c;n=this.transform(n),l=this.getVariables(n,l);var f=function(m){return r.getObservableFromLink(n,d,m).map(function(g){i!=="no-cache"&&(CP(g,a)&&r.cache.write({query:n,result:g.data,dataId:"ROOT_SUBSCRIPTION",variables:m}),r.broadcastQueries());var b=Xy(g),y=yue(g);if(b||y){var w={};if(b&&(w.graphQLErrors=g.errors),y&&(w.protocolErrors=g.extensions[LE]),a==="none"||y)throw new fd(w)}return a==="ignore"&&delete g.errors,g})};if(this.getDocumentInfo(n).hasClientExports){var p=this.localState.addExportedVariables(n,l,d).then(f);return new Rr(function(m){var g=null;return p.then(function(b){return g=b.subscribe(m)},m.error),function(){return g&&g.unsubscribe()}})}return f(l)},e.prototype.stopQuery=function(t){this.stopQueryNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(t){this.stopQueryInStoreNoBroadcast(t),this.removeQuery(t)},e.prototype.removeQuery=function(t){this.fetchCancelFns.delete(t),this.queries.has(t)&&(this.getQuery(t).stop(),this.queries.delete(t))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(t){return t.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(t,r,n,i){var o=this,a;i===void 0&&(i=(a=r==null?void 0:r.queryDeduplication)!==null&&a!==void 0?a:this.queryDeduplication);var l,c=this.getDocumentInfo(t),d=c.serverQuery,f=c.clientQuery;if(d){var p=this,m=p.inFlightLinkObservables,g=p.link,b={query:d,variables:n,operationName:dP(d)||void 0,context:this.prepareContext(ve(ve({},r),{forceFetch:!i}))};if(r=b.context,i){var y=G0(d),w=Ml(n),_=m.lookup(y,w);if(l=_.observable,!l){var S=new Pd([gP(g,b)]);l=_.observable=S,S.beforeNext(function(){m.remove(y,w)})}}else l=new Pd([gP(g,b)])}else l=new Pd([Rr.of({data:{}})]),r=this.prepareContext(r);return f&&(l=l_(l,function(C){return o.localState.runResolvers({document:f,remoteResult:C,context:r,variables:n})})),l},e.prototype.getResultsFromLink=function(t,r,n){var i=t.lastRequestId=this.generateRequestId(),o=this.cache.transformForLink(n.query);return l_(this.getObservableFromLink(o,n.context,n.variables),function(a){var l=vP(a),c=l.length>0;if(i>=t.lastRequestId){if(c&&n.errorPolicy==="none")throw t.markError(new fd({graphQLErrors:l}));t.markResult(a,o,n,r),t.markReady()}var d={data:a.data,loading:!1,networkStatus:Or.ready};return c&&n.errorPolicy!=="ignore"&&(d.errors=l,d.networkStatus=Or.error),d},function(a){var l=bue(a)?a:new fd({networkError:a});throw i>=t.lastRequestId&&t.markError(l),l})},e.prototype.fetchConcastWithInfo=function(t,r,n,i){var o=this;n===void 0&&(n=Or.loading),i===void 0&&(i=r.query);var a=this.getVariables(i,r.variables),l=this.getQuery(t),c=this.defaultOptions.watchQuery,d=r.fetchPolicy,f=d===void 0?c&&c.fetchPolicy||"cache-first":d,p=r.errorPolicy,m=p===void 0?c&&c.errorPolicy||"none":p,g=r.returnPartialData,b=g===void 0?!1:g,y=r.notifyOnNetworkStatusChange,w=y===void 0?!1:y,_=r.context,S=_===void 0?{}:_,C=Object.assign({},r,{query:i,variables:a,fetchPolicy:f,errorPolicy:m,returnPartialData:b,notifyOnNetworkStatusChange:w,context:S}),k=function(M){C.variables=M;var B=o.fetchQueryByPolicy(l,C,n);return C.fetchPolicy!=="standby"&&B.sources.length>0&&l.observableQuery&&l.observableQuery.applyNextFetchPolicy("after-fetch",r),B},E=function(){return o.fetchCancelFns.delete(t)};this.fetchCancelFns.set(t,function(M){E(),setTimeout(function(){return R.cancel(M)})});var R,T;if(this.getDocumentInfo(C.query).hasClientExports)R=new Pd(this.localState.addExportedVariables(C.query,C.variables,C.context).then(k).then(function(M){return M.sources})),T=!0;else{var A=k(C.variables);T=A.fromLink,R=new Pd(A.sources)}return R.promise.then(E,E),{concast:R,fromLink:T}},e.prototype.refetchQueries=function(t){var r=this,n=t.updateCache,i=t.include,o=t.optimistic,a=o===void 0?!1:o,l=t.removeOptimistic,c=l===void 0?a?rP("refetchQueries"):void 0:l,d=t.onQueryUpdated,f=new Map;i&&this.getObservableQueries(i).forEach(function(m,g){f.set(g,{oq:m,lastDiff:r.getQuery(g).getDiff()})});var p=new Map;return n&&this.cache.batch({update:n,optimistic:a&&c||!1,removeOptimistic:c,onWatchUpdated:function(m,g,b){var y=m.watcher instanceof v_&&m.watcher.observableQuery;if(y){if(d){f.delete(y.queryId);var w=d(y,g,b);return w===!0&&(w=y.refetch()),w!==!1&&p.set(y,w),w}d!==null&&f.set(y.queryId,{oq:y,lastDiff:b,diff:g})}}}),f.size&&f.forEach(function(m,g){var b=m.oq,y=m.lastDiff,w=m.diff,_;if(d){if(!w){var S=b.queryInfo;S.reset(),w=S.getDiff()}_=d(b,w,y)}(!d||_===!0)&&(_=b.refetch()),_!==!1&&p.set(b,_),g.indexOf("legacyOneTimeQuery")>=0&&r.stopQueryNoBroadcast(g)}),c&&this.cache.removeOptimistic(c),p},e.prototype.fetchQueryByPolicy=function(t,r,n){var i=this,o=r.query,a=r.variables,l=r.fetchPolicy,c=r.refetchWritePolicy,d=r.errorPolicy,f=r.returnPartialData,p=r.context,m=r.notifyOnNetworkStatusChange,g=t.networkStatus;t.init({document:o,variables:a,networkStatus:n});var b=function(){return t.getDiff()},y=function(k,E){E===void 0&&(E=t.networkStatus||Or.loading);var R=k.result;globalThis.__DEV__!==!1&&!f&&!qr(R,{})&&lB(k.missing);var T=function(A){return Rr.of(ve({data:A,loading:rm(E),networkStatus:E},k.complete?null:{partial:!0}))};return R&&i.getDocumentInfo(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:R},context:p,variables:a,onlyRunForcedResolvers:!0}).then(function(A){return T(A.data||void 0)}):d==="none"&&E===Or.refetch&&Array.isArray(k.missing)?T(void 0):T(R)},w=l==="no-cache"?0:n===Or.refetch&&c!=="merge"?1:2,_=function(){return i.getResultsFromLink(t,w,{query:o,variables:a,context:p,fetchPolicy:l,errorPolicy:d})},S=m&&typeof g=="number"&&g!==n&&rm(n);switch(l){default:case"cache-first":{var C=b();return C.complete?{fromLink:!1,sources:[y(C,t.markReady())]}:f||S?{fromLink:!0,sources:[y(C),_()]}:{fromLink:!0,sources:[_()]}}case"cache-and-network":{var C=b();return C.complete||f||S?{fromLink:!0,sources:[y(C),_()]}:{fromLink:!0,sources:[_()]}}case"cache-only":return{fromLink:!1,sources:[y(b(),t.markReady())]};case"network-only":return S?{fromLink:!0,sources:[y(b()),_()]}:{fromLink:!0,sources:[_()]};case"no-cache":return S?{fromLink:!0,sources:[y(t.getDiff()),_()]}:{fromLink:!0,sources:[_()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(t){return t&&!this.queries.has(t)&&this.queries.set(t,new v_(this,t)),this.queries.get(t)},e.prototype.prepareContext=function(t){t===void 0&&(t={});var r=this.localState.prepareContext(t);return ve(ve(ve({},this.defaultContext),r),{clientAwareness:this.clientAwareness})},e}(),y2=!1,cB=function(){function e(t){var r=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!t.cache)throw Ei(15);var n=t.uri,i=t.credentials,o=t.headers,a=t.cache,l=t.documentTransform,c=t.ssrMode,d=c===void 0?!1:c,f=t.ssrForceFetchDelay,p=f===void 0?0:f,m=t.connectToDevTools,g=m===void 0?typeof window=="object"&&!window.__APOLLO_CLIENT__&&globalThis.__DEV__!==!1:m,b=t.queryDeduplication,y=b===void 0?!0:b,w=t.defaultOptions,_=t.defaultContext,S=t.assumeImmutableResults,C=S===void 0?a.assumeImmutableResults:S,k=t.resolvers,E=t.typeDefs,R=t.fragmentMatcher,T=t.name,A=t.version,M=t.link;M||(M=n?new Due({uri:n,credentials:i,headers:o}):Ws.empty()),this.link=M,this.cache=a,this.disableNetworkFetches=d||p>0,this.queryDeduplication=y,this.defaultOptions=w||Object.create(null),this.typeDefs=E,p&&setTimeout(function(){return r.disableNetworkFetches=!1},p),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=SE,this.localState=new uB({cache:a,client:this,resolvers:k,fragmentMatcher:R}),this.queryManager=new ace({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:_,documentTransform:l,queryDeduplication:y,ssrMode:d,clientAwareness:{name:T,version:A},localState:this.localState,assumeImmutableResults:C,onBroadcast:g?function(){r.devToolsHookCb&&r.devToolsHookCb({action:{},state:{queries:r.queryManager.getQueryStore(),mutations:r.queryManager.mutationStore||{}},dataWithOptimisticResults:r.cache.extract(!0)})}:void 0}),g&&this.connectToDevTools()}return e.prototype.connectToDevTools=function(){if(typeof window=="object"){var t=window,r=Symbol.for("apollo.devtools");(t[r]=t[r]||[]).push(this),t.__APOLLO_CLIENT__=this}!y2&&globalThis.__DEV__!==!1&&(y2=!0,setTimeout(function(){if(typeof window<"u"&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__&&/^(https?|file):$/.test(window.location.protocol)){var n=window.navigator,i=n&&n.userAgent,o=void 0;typeof i=="string"&&(i.indexOf("Chrome/")>-1?o="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":i.indexOf("Firefox/")>-1&&(o="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),o&&globalThis.__DEV__!==!1&&_t.log("Download the Apollo DevTools for a better development experience: %s",o)}},1e4))},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(t){return this.defaultOptions.watchQuery&&(t=u_(this.defaultOptions.watchQuery,t)),this.disableNetworkFetches&&(t.fetchPolicy==="network-only"||t.fetchPolicy==="cache-and-network")&&(t=ve(ve({},t),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(t)},e.prototype.query=function(t){return this.defaultOptions.query&&(t=u_(this.defaultOptions.query,t)),_t(t.fetchPolicy!=="cache-and-network",16),this.disableNetworkFetches&&t.fetchPolicy==="network-only"&&(t=ve(ve({},t),{fetchPolicy:"cache-first"})),this.queryManager.query(t)},e.prototype.mutate=function(t){return this.defaultOptions.mutate&&(t=u_(this.defaultOptions.mutate,t)),this.queryManager.mutate(t)},e.prototype.subscribe=function(t){return this.queryManager.startGraphQLSubscription(t)},e.prototype.readQuery=function(t,r){return r===void 0&&(r=!1),this.cache.readQuery(t,r)},e.prototype.watchFragment=function(t){return this.cache.watchFragment(t)},e.prototype.readFragment=function(t,r){return r===void 0&&(r=!1),this.cache.readFragment(t,r)},e.prototype.writeQuery=function(t){var r=this.cache.writeQuery(t);return t.broadcast!==!1&&this.queryManager.broadcastQueries(),r},e.prototype.writeFragment=function(t){var r=this.cache.writeFragment(t);return t.broadcast!==!1&&this.queryManager.broadcastQueries(),r},e.prototype.__actionHookForDevTools=function(t){this.devToolsHookCb=t},e.prototype.__requestRaw=function(t){return gP(this.link,t)},e.prototype.resetStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(t.resetStoreCallbacks.map(function(r){return r()}))}).then(function(){return t.reFetchObservableQueries()})},e.prototype.clearStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(t.clearStoreCallbacks.map(function(r){return r()}))})},e.prototype.onResetStore=function(t){var r=this;return this.resetStoreCallbacks.push(t),function(){r.resetStoreCallbacks=r.resetStoreCallbacks.filter(function(n){return n!==t})}},e.prototype.onClearStore=function(t){var r=this;return this.clearStoreCallbacks.push(t),function(){r.clearStoreCallbacks=r.clearStoreCallbacks.filter(function(n){return n!==t})}},e.prototype.reFetchObservableQueries=function(t){return this.queryManager.reFetchObservableQueries(t)},e.prototype.refetchQueries=function(t){var r=this.queryManager.refetchQueries(t),n=[],i=[];r.forEach(function(a,l){n.push(l),i.push(a)});var o=Promise.all(i);return o.queries=n,o.results=i,o.catch(function(a){globalThis.__DEV__!==!1&&_t.debug(17,a)}),o},e.prototype.getObservableQueries=function(t){return t===void 0&&(t="active"),this.queryManager.getObservableQueries(t)},e.prototype.extract=function(t){return this.cache.extract(t)},e.prototype.restore=function(t){return this.cache.restore(t)},e.prototype.addResolvers=function(t){this.localState.addResolvers(t)},e.prototype.setResolvers=function(t){this.localState.setResolvers(t)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(t){this.localState.setFragmentMatcher(t)},e.prototype.setLink=function(t){this.link=this.queryManager.link=t},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e}();globalThis.__DEV__!==!1&&(cB.prototype.getMemoryInternals=Zse);var eb=new Map,EP=new Map,dB=!0,Ab=!1;function fB(e){return e.replace(/[\s,]+/g," ").trim()}function sce(e){return fB(e.source.body.substring(e.start,e.end))}function lce(e){var t=new Set,r=[];return e.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,o=sce(n.loc),a=EP.get(i);a&&!a.has(o)?dB&&console.warn("Warning: fragment with name "+i+` already exists.
|
441
|
-
graphql-tag enforces all fragment names across your application to be unique; read more about
|
442
|
-
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||EP.set(i,a=new Set),a.add(o),t.has(o)||(t.add(o),r.push(n))}else r.push(n)}),ve(ve({},e),{definitions:r})}function uce(e){var t=new Set(e.definitions);t.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var o=n[i];o&&typeof o=="object"&&t.add(o)})});var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}function cce(e){var t=fB(e);if(!eb.has(t)){var r=u5(e,{experimentalFragmentVariables:Ab,allowLegacyFragmentVariables:Ab});if(!r||r.kind!=="Document")throw new Error("Not a valid GraphQL document.");eb.set(t,uce(lce(r)))}return eb.get(t)}function Ne(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];typeof e=="string"&&(e=[e]);var n=e[0];return t.forEach(function(i,o){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=e[o+1]}),cce(n)}function dce(){eb.clear(),EP.clear()}function fce(){dB=!1}function hce(){Ab=!0}function pce(){Ab=!1}var Mh={gql:Ne,resetCaches:dce,disableFragmentWarnings:fce,enableExperimentalFragmentVariables:hce,disableExperimentalFragmentVariables:pce};(function(e){e.gql=Mh.gql,e.resetCaches=Mh.resetCaches,e.disableFragmentWarnings=Mh.disableFragmentWarnings,e.enableExperimentalFragmentVariables=Mh.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=Mh.disableExperimentalFragmentVariables})(Ne||(Ne={}));Ne.default=Ne;var g_={exports:{}},b2;function mce(){return b2||(b2=1,function(e){e.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,e.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,e.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(e.exports,wm())}(g_)),g_.exports}var Nl=mce();const vce=mc(Nl),gce=o0({__proto__:null,default:vce},[Nl]);var w2=TE?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function yce(){_t("createContext"in gce,45);var e=Nl.createContext[w2];return e||(Object.defineProperty(Nl.createContext,w2,{value:e=Nl.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}var bce=function(e){var t=e.client,r=e.children,n=yce(),i=Nl.useContext(n),o=Nl.useMemo(function(){return ve(ve({},i),{client:t||i.client})},[i,t]);return _t(o.client,46),Nl.createElement(n.Provider,{value:o},r)};function wce(e){return new Ws(function(t,r){var n=Ms(t,[]);return new Rr(function(i){var o,a=!1;return Promise.resolve(n).then(function(l){return e(l,t.getContext())}).then(t.setContext).then(function(){a||(o=r(t).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){a=!0,o&&o.unsubscribe()}})})}function hB(e){return new Ws(function(t,r){return new Rr(function(n){var i,o,a;try{i=r(t).subscribe({next:function(l){if(l.errors&&(a=e({graphQLErrors:l.errors,response:l,operation:t,forward:r}),a)){o=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.next(l)},error:function(l){if(a=e({operation:t,networkError:l,graphQLErrors:l&&l.result&&l.result.errors,forward:r}),a){o=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.error(l)},complete:function(){a||n.complete.bind(n)()}})}catch(l){e({networkError:l,operation:t,forward:r}),n.error(l)}return function(){i&&i.unsubscribe(),o&&i.unsubscribe()}})})}(function(e){ga(t,e);function t(r){var n=e.call(this)||this;return n.link=hB(r),n}return t.prototype.request=function(r,n){return this.link.request(r,n)},t})(Ws);const Sce={BASE_URL:"/",DEV:!1,GIT_BRANCH_NAME:"HEAD",GIT_COMMIT_HASH:"712ebec",MODE:"production",PACKAGE_VERSION:"1.0.1",PROD:!0,REACT_APP_ENDPOINT_HOST:"",REACT_APP_ENDPOINT_PORT:"",REACT_APP_ENDPOINT_SERVER_URL:"/endpoint",REACT_APP_GRAPHQL_SERVER_URL:"/graphql",REACT_APP_SWAGGER_SERVER_URL:"/api",SSR:!1},_ce=e=>{var n;const t=(n=window.__env__)==null?void 0:n[e],r=Sce[e];return t||r},UE="/",xc="login",pB="logout",Y0="signup",mB="username",vB="github",gB="google",yB="completed",xce="confirm",Fl="app",Ll=":organizationId",Bl=":projectName",Vl=":branchName",X0="-/draft",bB="-/:revisionId",wp=":tableId",wB=":rowId";var zr=(e=>(e.Organization="organization",e.Project="project",e.Branch="branch",e.DraftRevision="draftRevision",e.HeadRevision="headRevision",e.SpecificRevision="specificRevision",e.DraftTable="draftTable",e.HeadTable="headTable",e.SpecificTable="specificTable",e.DraftRow="draftRow",e.HeadRow="headRow",e.SpecificRow="specificRow",e))(zr||{});const $f=({hideSidebar:e,sidebar:t,title:r,actions:n,children:i})=>x.jsxs(je,{minHeight:"100vh",children:[!e&&x.jsxs(je,{backgroundColor:"gray.50",borderRight:"1px solid",borderRightColor:"gray.200",flexDirection:"column",justifyContent:t?"space-between":"flex-end",padding:"1rem",width:"250px",height:"100vh",top:0,position:"sticky",children:[x.jsx(wt,{children:t}),x.jsx(Cf,{color:"gray.400",alignSelf:"center",as:qo,to:`/${pB}`,children:"Logout"})]}),x.jsxs(je,{alignItems:"center",flex:1,flexDirection:"column",width:"100%",children:[(r||n)&&x.jsxs(je,{alignItems:"center",backgroundColor:"white",borderBottom:"1px solid",borderBottomColor:"gray.50",justifyContent:"space-between",maxWidth:"900px",padding:"8px",width:"100%",position:"sticky",zIndex:1,top:0,children:[r,n]}),x.jsx(je,{flex:1,flexDirection:"column",maxWidth:"900px",padding:"1rem 1rem 0rem 1rem",width:"100%",children:i})]})]});var Pce=bc({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"}),Cce=bc({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),Ece=bc({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"}),J0=bc({displayName:"DeleteIcon",path:x.jsx("g",{fill:"currentColor",children:x.jsx("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})}),Tce=bc({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"}),SB=bc({viewBox:"0 0 14 14",path:x.jsx("g",{fill:"currentColor",children:x.jsx("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})}),Oce=bc({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});const ks=({height:e="2.5rem",title:t,onClick:r,isDisabled:n,isSelected:i,isLoading:o,icon:a,dataTestId:l})=>x.jsx(Lo,{"data-testid":l,_hover:{color:"gray.400"},_disabled:i?{backgroundColor:"gray.50",cursor:"not-allowed"}:void 0,alignSelf:"flex-start",color:"gray.300",fontWeight:"500",height:e,isDisabled:n||i,isLoading:o,variant:"ghost",onClick:r,children:x.jsxs(je,{alignItems:"center",gap:"0.5rem",children:[a,x.jsx(bt,{children:t})]})}),Af=e=>x.jsx(ks,{...e,icon:x.jsx(Oce,{boxSize:3})}),Qm=({height:e="2.5rem",loading:t,isDisabled:r,onClick:n,title:i,dataTestId:o})=>x.jsxs(Lo,{"data-testid":o,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",color:"gray.400",height:e,isLoading:t,isDisabled:r,variant:"ghost",onClick:n,width:"48px",children:[x.jsx(SB,{boxSize:3,mr:i?2:0}),i]}),Z0=({height:e="2.5rem",onClick:t,isDisabled:r,dataTestId:n})=>x.jsx(Lo,{"data-testid":n,isDisabled:r,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",color:"gray.400",height:e,variant:"ghost",onClick:t,width:"48px",children:x.jsx(Cce,{boxSize:3})});var _B={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},S2=Re.createContext&&Re.createContext(_B),Rce=["attr","size","title"];function Ice(e,t){if(e==null)return{};var r=kce(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kce(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Db(){return Db=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Db.apply(this,arguments)}function _2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_2(Object(r),!0).forEach(function(n){jce(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jce(e,t,r){return t=$ce(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $ce(e){var t=Ace(e,"string");return typeof t=="symbol"?t:t+""}function Ace(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xB(e){return e&&e.map((t,r)=>Re.createElement(t.tag,Mb({key:r},t.attr),xB(t.child)))}function Hr(e){return t=>Re.createElement(Dce,Db({attr:Mb({},e.attr)},t),xB(e.child))}function Dce(e){var t=r=>{var{attr:n,size:i,title:o}=e,a=Ice(e,Rce),l=i||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),Re.createElement("svg",Db({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,a,{className:c,style:Mb(Mb({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),o&&Re.createElement("title",null,o),e.children)};return S2!==void 0?Re.createElement(S2.Consumer,null,r=>t(r)):t(_B)}function PB(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"},child:[]}]})(e)}function HE(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128Z"},child:[]}]})(e)}function CB(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M216,104v8a56.06,56.06,0,0,1-48.44,55.47A39.8,39.8,0,0,1,176,192v40a8,8,0,0,1-8,8H104a8,8,0,0,1-8-8V216H72a40,40,0,0,1-40-40A24,24,0,0,0,8,152a8,8,0,0,1,0-16,40,40,0,0,1,40,40,24,24,0,0,0,24,24H96v-8a39.8,39.8,0,0,1,8.44-24.53A56.06,56.06,0,0,1,56,112v-8a58.14,58.14,0,0,1,7.69-28.32A59.78,59.78,0,0,1,69.07,28,8,8,0,0,1,76,24a59.75,59.75,0,0,1,48,24h24a59.75,59.75,0,0,1,48-24,8,8,0,0,1,6.93,4,59.74,59.74,0,0,1,5.37,47.68A58,58,0,0,1,216,104Z"},child:[]}]})(e)}function EB(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,24A104,104,0,1,0,232,128,104,104,0,0,0,128,24Zm0,184A80,80,0,1,1,181.34,68.37a8,8,0,0,1-10.67,11.92A64,64,0,1,0,191.5,136H128a8,8,0,0,1,0-16h72a8,8,0,0,1,8,8A80.09,80.09,0,0,1,128,208Z"},child:[]}]})(e)}function x2(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"},child:[]}]})(e)}function Mce(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm34.83-86.83a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L124,158.34V88a4,4,0,0,1,8,0v70.34l25.17-25.17A4,4,0,0,1,162.83,133.17Z"},child:[]}]})(e)}function Nce(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm42.83-94.83a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L158.34,132H88a4,4,0,0,1,0-8h70.34L133.17,98.83a4,4,0,0,1,5.66-5.66Z"},child:[]}]})(e)}function Fce(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M202.83,146.83l-72,72a4,4,0,0,1-5.66,0l-72-72a4,4,0,0,1,5.66-5.66L124,206.34V40a4,4,0,0,1,8,0V206.34l65.17-65.17a4,4,0,0,1,5.66,5.66Z"},child:[]}]})(e)}function Lce(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z"},child:[]}]})(e)}function Bce(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M35.89,128C52,136.23,52,155.64,52,172c0,24.8,1.35,40,28,40a4,4,0,0,1,0,8c-36,0-36-26.61-36-48,0-24.8-1.35-40-28-40a4,4,0,0,1,0-8c26.65,0,28-15.2,28-40,0-21.39,0-48,36-48a4,4,0,0,1,0,8C53.35,44,52,59.2,52,84,52,100.36,52,119.77,35.89,128ZM240,124c-26.65,0-28-15.2-28-40,0-21.39,0-48-36-48a4,4,0,0,0,0,8c26.65,0,28,15.2,28,40,0,16.36,0,35.77,16.11,44C204,136.23,204,155.64,204,172c0,24.8-1.35,40-28,40a4,4,0,0,0,0,8c36,0,36-26.61,36-48,0-24.8,1.35-40,28-40a4,4,0,0,0,0-8Z"},child:[]}]})(e)}function Vce(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"},child:[]}]})(e)}function zce(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M155.87,36.06a4,4,0,0,1-3.87,3,4.29,4.29,0,0,1-1-.13,92,92,0,0,0-46,0,4,4,0,0,1-2-7.74,100.09,100.09,0,0,1,50,0A4,4,0,0,1,155.87,36.06ZM56.65,57.94a100.18,100.18,0,0,0-25,43.29,4,4,0,0,0,7.71,2.14,92.06,92.06,0,0,1,23-39.82,4,4,0,1,0-5.7-5.61ZM39.36,152.62a4,4,0,0,0-7.71,2.14,100.08,100.08,0,0,0,25,43.31,4,4,0,1,0,5.71-5.61A91.91,91.91,0,0,1,39.36,152.62ZM151,217.09a92,92,0,0,1-46,0,4,4,0,0,0-2,7.75,100,100,0,0,0,50,0,4,4,0,1,0-2-7.74Zm70.58-67.25a4,4,0,0,0-4.92,2.79,92.12,92.12,0,0,1-23,39.82,4,4,0,1,0,5.7,5.61,100.18,100.18,0,0,0,25-43.29A4,4,0,0,0,221.58,149.84Zm-4.94-46.46a4,4,0,0,0,7.71-2.14,100.08,100.08,0,0,0-25-43.31,4,4,0,1,0-5.71,5.61A91.91,91.91,0,0,1,216.64,103.38Z"},child:[]}]})(e)}function P2(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z"},child:[]}]})(e)}function qce(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M192.14,42.55C174.94,33.17,152.16,28,128,28S81.06,33.17,63.86,42.55C45.89,52.35,36,65.65,36,80v96c0,14.35,9.89,27.65,27.86,37.45,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c18-9.8,27.86-23.1,27.86-37.45V80C220,65.65,210.11,52.35,192.14,42.55ZM212,176c0,11.29-8.41,22.1-23.69,30.43C172.27,215.18,150.85,220,128,220s-44.27-4.82-60.31-13.57C52.41,198.1,44,187.29,44,176V149.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm0-48c0,11.29-8.41,22.1-23.69,30.43C172.27,167.18,150.85,172,128,172s-44.27-4.82-60.31-13.57C52.41,150.1,44,139.29,44,128V101.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm-23.69-17.57C172.27,119.18,150.85,124,128,124s-44.27-4.82-60.31-13.57C52.41,102.1,44,91.29,44,80s8.41-22.1,23.69-30.43C83.73,40.82,105.15,36,128,36s44.27,4.82,60.31,13.57C203.59,57.9,212,68.71,212,80S203.59,102.1,188.31,110.43Z"},child:[]}]})(e)}function Uce(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,100a28,28,0,1,0,28,28A28,28,0,0,0,128,100Zm0,48a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"},child:[]}]})(e)}function TB(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"},child:[]}]})(e)}function OB(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M236,88.12a50.44,50.44,0,0,1-14.81,34.31l-34.75,34.74A50.33,50.33,0,0,1,150.62,172h-.05A50.63,50.63,0,0,1,100,120a4,4,0,0,1,4-3.89h.11a4,4,0,0,1,3.89,4.11A42.64,42.64,0,0,0,150.58,164h0a42.32,42.32,0,0,0,30.14-12.49l34.75-34.74a42.63,42.63,0,1,0-60.29-60.28l-11,11a4,4,0,0,1-5.66-5.65l11-11A50.64,50.64,0,0,1,236,88.12ZM111.78,188.49l-11,11A42.33,42.33,0,0,1,70.6,212h0a42.63,42.63,0,0,1-30.11-72.77l34.75-34.74A42.63,42.63,0,0,1,148,135.82a4,4,0,0,0,8,.23A50.64,50.64,0,0,0,69.55,98.83L34.8,133.57A50.63,50.63,0,0,0,70.56,220h0a50.33,50.33,0,0,0,35.81-14.83l11-11a4,4,0,1,0-5.65-5.66Z"},child:[]}]})(e)}function Hce(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M234.83,21.17a4,4,0,0,0-5.66,0L173.94,76.4l-8.2-8.2a28,28,0,0,0-39.6,0L100,94.34l-9.17-9.17a4,4,0,0,0-5.66,5.66L94.34,100,68.2,126.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L82.06,179.6l8.2,8.2a28,28,0,0,0,39.6,0L156,161.66l9.17,9.17a4,4,0,0,0,5.66-5.66L161.66,156l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,55.23-55.23A4,4,0,0,0,234.83,21.17Zm-110.63,161a20,20,0,0,1-28.28,0L73.86,160.08a20,20,0,0,1,0-28.28L100,105.66,150.34,156Zm57.94-57.94L156,150.34,105.66,100,131.8,73.86a20,20,0,0,1,28.28,0l22.06,22.06A20,20,0,0,1,182.14,124.2ZM92.29,33.49a4,4,0,1,1,7.42-3l8,20a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,104,56a4,4,0,0,1-3.71-2.51Zm-64,61a4,4,0,0,1,5.2-2.22l20,8A4,4,0,0,1,52,108a3.91,3.91,0,0,1-1.49-.29l-20-8A4,4,0,0,1,28.29,94.51Zm199.42,67A4,4,0,0,1,224,164a3.91,3.91,0,0,1-1.49-.29l-20-8a4,4,0,1,1,3-7.42l20,8A4,4,0,0,1,227.71,161.49Zm-64,61a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,160,228a4,4,0,0,1-3.71-2.51l-8-20a4,4,0,0,1,7.42-3Z"},child:[]}]})(e)}function Wce(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M146.83,141.17a4,4,0,0,0-5.66,0L120,162.34,93.66,136l21.17-21.17a4,4,0,0,0-5.66-5.66L88,130.34,66.83,109.17a4,4,0,0,0-5.66,5.66L70.34,124,44.2,150.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L58.06,203.6l8.2,8.2a28,28,0,0,0,39.6,0L132,185.66l9.17,9.17a4,4,0,0,0,5.66-5.66L125.66,168l21.17-21.17A4,4,0,0,0,146.83,141.17Zm-46.63,65a20,20,0,0,1-28.28,0L49.86,184.08a20,20,0,0,1,0-28.28L76,129.66,126.34,180Zm134.63-185a4,4,0,0,0-5.66,0L197.94,52.4l-8.2-8.2a28,28,0,0,0-39.6,0L124,70.34l-9.17-9.17a4,4,0,0,0-5.66,5.66l80,80a4,4,0,0,0,5.66-5.66L185.66,132l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,31.23-31.23A4,4,0,0,0,234.83,21.17ZM212,86.06a19.86,19.86,0,0,1-5.86,14.14L180,126.34,129.66,76,155.8,49.86a20,20,0,0,1,28.28,0l22.06,22.06A19.85,19.85,0,0,1,212,86.06Z"},child:[]}]})(e)}function Kce(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M234.83,109.17l-80-80A4,4,0,0,0,148,32V76.09c-54,2.44-120.43,53.55-127.94,119a7.87,7.87,0,0,0,4.58,8.16,8,8,0,0,0,3.41.77,7.9,7.9,0,0,0,5.79-2.55h0c11.53-12.27,53.29-51.73,114.16-53.4V192a4,4,0,0,0,6.83,2.83l80-80A4,4,0,0,0,234.83,109.17ZM156,182.33V144a4,4,0,0,0-4-4c-27.39,0-54.08,7.17-79.34,21.3A189.91,189.91,0,0,0,28,196l2.92,2.74L28,196c3.36-29.21,19.55-57.48,45.6-79.57C97.53,96.11,126.83,84,152,84a4,4,0,0,0,4-4V41.66L226.34,112Z"},child:[]}]})(e)}function Gce(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M176,148h32a12,12,0,0,0,12-12V104a12,12,0,0,0-12-12H176a12,12,0,0,0-12,12v12H84V76H96a12,12,0,0,0,12-12V32A12,12,0,0,0,96,20H64A12,12,0,0,0,52,32V64A12,12,0,0,0,64,76H76V192a20,20,0,0,0,20,20h68v12a12,12,0,0,0,12,12h32a12,12,0,0,0,12-12V192a12,12,0,0,0-12-12H176a12,12,0,0,0-12,12v12H96a12,12,0,0,1-12-12V124h80v12A12,12,0,0,0,176,148ZM60,64V32a4,4,0,0,1,4-4H96a4,4,0,0,1,4,4V64a4,4,0,0,1-4,4H64A4,4,0,0,1,60,64ZM172,192a4,4,0,0,1,4-4h32a4,4,0,0,1,4,4v32a4,4,0,0,1-4,4H176a4,4,0,0,1-4-4Zm0-88a4,4,0,0,1,4-4h32a4,4,0,0,1,4,4v32a4,4,0,0,1-4,4H176a4,4,0,0,1-4-4Z"},child:[]}]})(e)}function Qce(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H80a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H176a4,4,0,0,1,0-8h48A12,12,0,0,1,236,136ZM82.83,74.83,124,33.66V128a4,4,0,0,0,8,0V33.66l41.17,41.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z"},child:[]}]})(e)}function WE(e){return Hr({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"},child:[]}]})(e)}const js=({value:e,placeholder:t,autoFocus:r,onChange:n,onBlur:i,onEnter:o,width:a,height:l,type:c,dataTestId:d,autoComplete:f})=>{const p=RB();return x.jsx(C0,{autoComplete:f,"data-testid":d,borderColor:"gray.100",borderStyle:"solid",borderWidth:"1px",padding:"0 9px",placeholder:t,ref:r?p:void 0,value:e,variant:"unstyled",onChange:n,onBlur:i,width:a,height:l,type:c,onKeyDown:o?m=>{m.key==="Enter"&&o()}:void 0})},{ToastContainer:C2,toast:KE}=VZ(),Yce=H5({uri:_ce("REACT_APP_GRAPHQL_SERVER_URL")}),Xce=wce(async()=>({headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}})),Jce=hB(({graphQLErrors:e})=>{if(e)for(const t of e)KE({status:"error",variant:"left-accent",colorScheme:"red",duration:3e3,isClosable:!0,position:"top",description:t.message})}),xr=new cB({connectToDevTools:!0,link:sue([Xce,Jce,Yce]),cache:new aB({typePolicies:{TableModel:{keyFields:["versionId"]},RowModel:{keyFields:["versionId"]}}}),defaultOptions:{watchQuery:{fetchPolicy:"cache-and-network"}}});xr.cache;const RB=()=>O.useCallback(e=>{e&&e.focus()},[]),Df=(e,...t)=>{const r=O.useRef(null),[n,i]=O.useState(t),o=O.useMemo(()=>n.length!==t.length||n.some((a,l)=>a!==t[l])?(i(t),t):n,[t,n]);return r.current||(r.current=dt.get(e)),O.useEffect(()=>{var l;const a=r.current;return(l=a==null?void 0:a.init)==null||l.call(a,...o),()=>{var c;(c=a==null?void 0:a.dispose)==null||c.call(a)}},[o]),r.current};class Zce{constructor(){Pe(this,"registrations",new Map)}register(t,r,n){this.registrations.set(t,{factory:r,scope:n.scope})}get(t){const r=this.registrations.get(t);if(!r)throw new Error(`No provider found for ${t.name}`);return r.scope==="singleton"?(r.instance||(r.instance=r.factory()),r.instance):r.factory()}}const dt=new Zce;class GE{constructor(t){Pe(this,"values");this.values=t,st(this,{},{autoBind:!0})}setValue(t,r){this.values[t]=r}get isValid(){return Object.values(this.values).every(t=>!!t)}}const QE=JSON,ede=e=>e.toUpperCase(),tde=e=>{const t={};return e.forEach((r,n)=>{t[n]=r}),t},rde=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},nde=(e,t,r)=>e.query?e:{query:e,variables:t,requestHeaders:r,signal:void 0},ide=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},E2=e=>{var n,i;let t;const r=e.definitions.filter(o=>o.kind==="OperationDefinition");return r.length===1&&(t=(i=(n=r[0])==null?void 0:n.name)==null?void 0:i.value),t},y_=e=>{if(typeof e=="string"){let r;try{const n=u5(e);r=E2(n)}catch{}return{query:e,operationName:r}}const t=E2(e);return{query:d5(e),operationName:t}};class Sp extends Error{constructor(t,r){const n=`${Sp.extractMessage(t)}: ${JSON.stringify({response:t,request:r})}`;super(n),Object.setPrototypeOf(this,Sp.prototype),this.response=t,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Sp)}static extractMessage(t){var r,n;return((n=(r=t.errors)==null?void 0:r[0])==null?void 0:n.message)??`GraphQL Error (Code: ${t.status})`}}var Jh={exports:{}},ode=Jh.exports,T2;function ade(){return T2||(T2=1,function(e,t){var r=typeof self<"u"?self:ode,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return o.prototype=r,new o}();(function(o){(function(a){var l={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(N){return N&&DataView.prototype.isPrototypeOf(N)}if(l.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(N){return N&&d.indexOf(Object.prototype.toString.call(N))>-1};function p(N){if(typeof N!="string"&&(N=String(N)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(N))throw new TypeError("Invalid character in header field name");return N.toLowerCase()}function m(N){return typeof N!="string"&&(N=String(N)),N}function g(N){var X={next:function(){var ce=N.shift();return{done:ce===void 0,value:ce}}};return l.iterable&&(X[Symbol.iterator]=function(){return X}),X}function b(N){this.map={},N instanceof b?N.forEach(function(X,ce){this.append(ce,X)},this):Array.isArray(N)?N.forEach(function(X){this.append(X[0],X[1])},this):N&&Object.getOwnPropertyNames(N).forEach(function(X){this.append(X,N[X])},this)}b.prototype.append=function(N,X){N=p(N),X=m(X);var ce=this.map[N];this.map[N]=ce?ce+", "+X:X},b.prototype.delete=function(N){delete this.map[p(N)]},b.prototype.get=function(N){return N=p(N),this.has(N)?this.map[N]:null},b.prototype.has=function(N){return this.map.hasOwnProperty(p(N))},b.prototype.set=function(N,X){this.map[p(N)]=m(X)},b.prototype.forEach=function(N,X){for(var ce in this.map)this.map.hasOwnProperty(ce)&&N.call(X,this.map[ce],ce,this)},b.prototype.keys=function(){var N=[];return this.forEach(function(X,ce){N.push(ce)}),g(N)},b.prototype.values=function(){var N=[];return this.forEach(function(X){N.push(X)}),g(N)},b.prototype.entries=function(){var N=[];return this.forEach(function(X,ce){N.push([ce,X])}),g(N)},l.iterable&&(b.prototype[Symbol.iterator]=b.prototype.entries);function y(N){if(N.bodyUsed)return Promise.reject(new TypeError("Already read"));N.bodyUsed=!0}function w(N){return new Promise(function(X,ce){N.onload=function(){X(N.result)},N.onerror=function(){ce(N.error)}})}function _(N){var X=new FileReader,ce=w(X);return X.readAsArrayBuffer(N),ce}function S(N){var X=new FileReader,ce=w(X);return X.readAsText(N),ce}function C(N){for(var X=new Uint8Array(N),ce=new Array(X.length),ne=0;ne<X.length;ne++)ce[ne]=String.fromCharCode(X[ne]);return ce.join("")}function k(N){if(N.slice)return N.slice(0);var X=new Uint8Array(N.byteLength);return X.set(new Uint8Array(N)),X.buffer}function E(){return this.bodyUsed=!1,this._initBody=function(N){this._bodyInit=N,N?typeof N=="string"?this._bodyText=N:l.blob&&Blob.prototype.isPrototypeOf(N)?this._bodyBlob=N:l.formData&&FormData.prototype.isPrototypeOf(N)?this._bodyFormData=N:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(N)?this._bodyText=N.toString():l.arrayBuffer&&l.blob&&c(N)?(this._bodyArrayBuffer=k(N.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(N)||f(N))?this._bodyArrayBuffer=k(N):this._bodyText=N=Object.prototype.toString.call(N):this._bodyText="",this.headers.get("content-type")||(typeof N=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(N)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var N=y(this);if(N)return N;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(_)}),this.text=function(){var N=y(this);if(N)return N;if(this._bodyBlob)return S(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(C(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(M)}),this.json=function(){return this.text().then(JSON.parse)},this}var R=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function T(N){var X=N.toUpperCase();return R.indexOf(X)>-1?X:N}function A(N,X){X=X||{};var ce=X.body;if(N instanceof A){if(N.bodyUsed)throw new TypeError("Already read");this.url=N.url,this.credentials=N.credentials,X.headers||(this.headers=new b(N.headers)),this.method=N.method,this.mode=N.mode,this.signal=N.signal,!ce&&N._bodyInit!=null&&(ce=N._bodyInit,N.bodyUsed=!0)}else this.url=String(N);if(this.credentials=X.credentials||this.credentials||"same-origin",(X.headers||!this.headers)&&(this.headers=new b(X.headers)),this.method=T(X.method||this.method||"GET"),this.mode=X.mode||this.mode||null,this.signal=X.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&ce)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(ce)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})};function M(N){var X=new FormData;return N.trim().split("&").forEach(function(ce){if(ce){var ne=ce.split("="),ee=ne.shift().replace(/\+/g," "),ge=ne.join("=").replace(/\+/g," ");X.append(decodeURIComponent(ee),decodeURIComponent(ge))}}),X}function B(N){var X=new b,ce=N.replace(/\r?\n[\t ]+/g," ");return ce.split(/\r?\n/).forEach(function(ne){var ee=ne.split(":"),ge=ee.shift().trim();if(ge){var Z=ee.join(":").trim();X.append(ge,Z)}}),X}E.call(A.prototype);function Q(N,X){X||(X={}),this.type="default",this.status=X.status===void 0?200:X.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in X?X.statusText:"OK",this.headers=new b(X.headers),this.url=X.url||"",this._initBody(N)}E.call(Q.prototype),Q.prototype.clone=function(){return new Q(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},Q.error=function(){var N=new Q(null,{status:0,statusText:""});return N.type="error",N};var se=[301,302,303,307,308];Q.redirect=function(N,X){if(se.indexOf(X)===-1)throw new RangeError("Invalid status code");return new Q(null,{status:X,headers:{location:N}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(X,ce){this.message=X,this.name=ce;var ne=Error(X);this.stack=ne.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function ie(N,X){return new Promise(function(ce,ne){var ee=new A(N,X);if(ee.signal&&ee.signal.aborted)return ne(new a.DOMException("Aborted","AbortError"));var ge=new XMLHttpRequest;function Z(){ge.abort()}ge.onload=function(){var j={status:ge.status,statusText:ge.statusText,headers:B(ge.getAllResponseHeaders()||"")};j.url="responseURL"in ge?ge.responseURL:j.headers.get("X-Request-URL");var U="response"in ge?ge.response:ge.responseText;ce(new Q(U,j))},ge.onerror=function(){ne(new TypeError("Network request failed"))},ge.ontimeout=function(){ne(new TypeError("Network request failed"))},ge.onabort=function(){ne(new a.DOMException("Aborted","AbortError"))},ge.open(ee.method,ee.url,!0),ee.credentials==="include"?ge.withCredentials=!0:ee.credentials==="omit"&&(ge.withCredentials=!1),"responseType"in ge&&l.blob&&(ge.responseType="blob"),ee.headers.forEach(function(j,U){ge.setRequestHeader(U,j)}),ee.signal&&(ee.signal.addEventListener("abort",Z),ge.onreadystatechange=function(){ge.readyState===4&&ee.signal.removeEventListener("abort",Z)}),ge.send(typeof ee._bodyInit>"u"?null:ee._bodyInit)})}return ie.polyfill=!0,o.fetch||(o.fetch=ie,o.Headers=b,o.Request=A,o.Response=Q),a.Headers=b,a.Request=A,a.Response=Q,a.fetch=ie,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(Jh,Jh.exports)),Jh.exports}var Nb=ade();const tb=mc(Nb),sde=o0({__proto__:null,default:tb},[Nb]),hd=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||sde&&Nb.Headers&&e instanceof Nb.Headers?t=tde(e):Array.isArray(e)?e.forEach(([r,n])=>{r&&n!==void 0&&(t[r]=n)}):t=e),t},O2=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),lde=e=>{if(!Array.isArray(e.query)){const n=e,i=[`query=${encodeURIComponent(O2(n.query))}`];return e.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,r=e.query.reduce((n,i,o)=>(n.push({query:O2(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[o]):void 0}),n),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(r))}`},ude=e=>async t=>{const{url:r,query:n,variables:i,operationName:o,fetch:a,fetchOptions:l,middleware:c}=t,d={...t.headers};let f="",p;e==="POST"?(p=dde(n,i,o,l.jsonSerializer),typeof p=="string"&&(d["Content-Type"]="application/json")):f=lde({query:n,variables:i,operationName:o,jsonSerializer:l.jsonSerializer??QE});const m={method:e,headers:d,body:p,...l};let g=r,b=m;if(c){const y=await Promise.resolve(c({...m,url:r,operationName:o,variables:i})),{url:w,..._}=y;g=w,b=_}return f&&(g=`${g}?${f}`),await a(g,b)};class cde{constructor(t,r={}){this.url=t,this.requestConfig=r,this.rawRequest=async(...n)=>{const[i,o,a]=n,l=nde(i,o,a),{headers:c,fetch:d=tb,method:f="POST",requestMiddleware:p,responseMiddleware:m,...g}=this.requestConfig,{url:b}=this;l.signal!==void 0&&(g.signal=l.signal);const{operationName:y}=y_(l.query);return b_({url:b,query:l.query,variables:l.variables,headers:{...hd(w_(c)),...hd(l.requestHeaders)},operationName:y,fetch:d,method:f,fetchOptions:g,middleware:p}).then(w=>(m&&m(w),w)).catch(w=>{throw m&&m(w),w})}}async request(t,...r){const[n,i]=r,o=rde(t,n,i),{headers:a,fetch:l=tb,method:c="POST",requestMiddleware:d,responseMiddleware:f,...p}=this.requestConfig,{url:m}=this;o.signal!==void 0&&(p.signal=o.signal);const{query:g,operationName:b}=y_(o.document);return b_({url:m,query:g,variables:o.variables,headers:{...hd(w_(a)),...hd(o.requestHeaders)},operationName:b,fetch:l,method:c,fetchOptions:p,middleware:d}).then(y=>(f&&f(y),y.data)).catch(y=>{throw f&&f(y),y})}batchRequests(t,r){const n=ide(t,r),{headers:i,...o}=this.requestConfig;n.signal!==void 0&&(o.signal=n.signal);const a=n.documents.map(({document:c})=>y_(c).query),l=n.documents.map(({variables:c})=>c);return b_({url:this.url,query:a,variables:l,headers:{...hd(w_(i)),...hd(n.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??tb,method:this.requestConfig.method||"POST",fetchOptions:o,middleware:this.requestConfig.requestMiddleware}).then(c=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(c),c.data)).catch(c=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(c),c})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,r){const{headers:n}=this.requestConfig;return n?n[t]=r:this.requestConfig.headers={[t]:r},this}setEndpoint(t){return this.url=t,this}}const b_=async e=>{const{query:t,variables:r,fetchOptions:n}=e,i=ude(ede(e.method??"post")),o=Array.isArray(e.query),a=await i(e),l=await fde(a,n.jsonSerializer??QE),c=Array.isArray(l)?!l.some(({data:f})=>!f):!!l.data,d=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(a.ok&&d&&c){const{errors:f,...p}=(Array.isArray(l),l),m=n.errorPolicy==="ignore"?p:l;return{...o?{data:m}:m,headers:a.headers,status:a.status}}else{const f=typeof l=="string"?{error:l}:l;throw new Sp({...f,status:a.status,headers:a.headers},{query:t,variables:r})}},dde=(e,t,r,n)=>{const i=n??QE;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:r});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const o=e.reduce((a,l,c)=>(a.push({query:l,variables:t?t[c]:void 0}),a),[]);return i.stringify(o)},fde=async(e,t)=>{let r;return e.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(r=n)}),r&&(r.toLowerCase().startsWith("application/json")||r.toLowerCase().startsWith("application/graphql+json")||r.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(await e.text()):e.text()},w_=e=>typeof e=="function"?e():e;Ne`
|
443
|
-
fragment PageInfo on PageInfo {
|
444
|
-
startCursor
|
445
|
-
hasNextPage
|
446
|
-
hasPreviousPage
|
447
|
-
endCursor
|
448
|
-
}
|
449
|
-
`;const hde=Ne`
|
450
|
-
fragment User on UserModel {
|
451
|
-
id
|
452
|
-
username
|
453
|
-
email
|
454
|
-
organizationId
|
455
|
-
}
|
456
|
-
`,au=Ne`
|
457
|
-
fragment PageInfoMst on PageInfo {
|
458
|
-
startCursor
|
459
|
-
endCursor
|
460
|
-
hasPreviousPage
|
461
|
-
hasNextPage
|
462
|
-
}
|
463
|
-
`,Ym=Ne`
|
464
|
-
fragment EndpointMst on EndpointModel {
|
465
|
-
id
|
466
|
-
type
|
467
|
-
createdAt
|
468
|
-
}
|
469
|
-
`,pde=Ne`
|
470
|
-
fragment RevisionStartMst on RevisionModel {
|
471
|
-
id
|
472
|
-
createdAt
|
473
|
-
comment
|
474
|
-
child {
|
475
|
-
id
|
476
|
-
}
|
477
|
-
childBranches {
|
478
|
-
branch {
|
479
|
-
id
|
480
|
-
name
|
481
|
-
}
|
482
|
-
revision {
|
483
|
-
id
|
484
|
-
}
|
485
|
-
}
|
486
|
-
endpoints {
|
487
|
-
...EndpointMst
|
488
|
-
}
|
489
|
-
}
|
490
|
-
${Ym}
|
491
|
-
`,ew=Ne`
|
492
|
-
fragment RevisionMst on RevisionModel {
|
493
|
-
id
|
494
|
-
createdAt
|
495
|
-
comment
|
496
|
-
parent {
|
497
|
-
id
|
498
|
-
}
|
499
|
-
child {
|
500
|
-
id
|
501
|
-
}
|
502
|
-
childBranches {
|
503
|
-
branch {
|
504
|
-
id
|
505
|
-
name
|
506
|
-
}
|
507
|
-
revision {
|
508
|
-
id
|
509
|
-
}
|
510
|
-
}
|
511
|
-
endpoints {
|
512
|
-
...EndpointMst
|
513
|
-
}
|
514
|
-
}
|
515
|
-
${Ym}
|
516
|
-
`,mde=Ne`
|
517
|
-
fragment RevisionDraftMst on RevisionModel {
|
518
|
-
id
|
519
|
-
createdAt
|
520
|
-
comment
|
521
|
-
parent {
|
522
|
-
id
|
523
|
-
}
|
524
|
-
endpoints {
|
525
|
-
...EndpointMst
|
526
|
-
}
|
527
|
-
}
|
528
|
-
${Ym}
|
529
|
-
`,Ks=Ne`
|
530
|
-
fragment BranchMst on BranchModel {
|
531
|
-
id
|
532
|
-
createdAt
|
533
|
-
name
|
534
|
-
touched
|
535
|
-
projectId
|
536
|
-
parent {
|
537
|
-
branch {
|
538
|
-
id
|
539
|
-
name
|
540
|
-
}
|
541
|
-
revision {
|
542
|
-
id
|
543
|
-
}
|
544
|
-
}
|
545
|
-
start {
|
546
|
-
...RevisionStartMst
|
547
|
-
}
|
548
|
-
head {
|
549
|
-
...RevisionMst
|
550
|
-
}
|
551
|
-
draft {
|
552
|
-
...RevisionDraftMst
|
553
|
-
}
|
554
|
-
}
|
555
|
-
${pde}
|
556
|
-
${ew}
|
557
|
-
${mde}
|
558
|
-
`,tw=Ne`
|
559
|
-
fragment ProjectMst on ProjectModel {
|
560
|
-
id
|
561
|
-
organizationId
|
562
|
-
createdAt
|
563
|
-
name
|
564
|
-
isPublic
|
565
|
-
rootBranch {
|
566
|
-
...BranchMst
|
567
|
-
}
|
568
|
-
}
|
569
|
-
${Ks}
|
570
|
-
`,Mf=Ne`
|
571
|
-
fragment RowMst on RowModel {
|
572
|
-
createdId
|
573
|
-
id
|
574
|
-
versionId
|
575
|
-
createdAt
|
576
|
-
updatedAt
|
577
|
-
readonly
|
578
|
-
data
|
579
|
-
}
|
580
|
-
`,ns=Ne`
|
581
|
-
fragment TableMst on TableModel {
|
582
|
-
createdId
|
583
|
-
id
|
584
|
-
versionId
|
585
|
-
createdAt
|
586
|
-
updatedAt
|
587
|
-
readonly
|
588
|
-
count
|
589
|
-
schema
|
590
|
-
}
|
591
|
-
`,vde=Ne`
|
592
|
-
fragment BranchRevisionMst on RevisionModel {
|
593
|
-
...RevisionMst
|
594
|
-
endpoints {
|
595
|
-
...EndpointMst
|
596
|
-
}
|
597
|
-
}
|
598
|
-
${ew}
|
599
|
-
${Ym}
|
600
|
-
`,gde=Ne`
|
601
|
-
mutation confirmEmailCode($data: ConfirmEmailCodeInput!) {
|
602
|
-
confirmEmailCode(data: $data) {
|
603
|
-
accessToken
|
604
|
-
}
|
605
|
-
}
|
606
|
-
`,yde=Ne`
|
607
|
-
mutation loginGithub($data: LoginGithubInput!) {
|
608
|
-
loginGithub(data: $data) {
|
609
|
-
accessToken
|
610
|
-
}
|
611
|
-
}
|
612
|
-
`,bde=Ne`
|
613
|
-
mutation loginGoogle($data: LoginGoogleInput!) {
|
614
|
-
loginGoogle(data: $data) {
|
615
|
-
accessToken
|
616
|
-
}
|
617
|
-
}
|
618
|
-
`,wde=Ne`
|
619
|
-
mutation login($data: LoginInput!) {
|
620
|
-
login(data: $data) {
|
621
|
-
accessToken
|
622
|
-
}
|
623
|
-
}
|
624
|
-
`,Sde=Ne`
|
625
|
-
mutation signUp($data: SignUpInput!) {
|
626
|
-
signUp(data: $data)
|
627
|
-
}
|
628
|
-
`,_de=Ne`
|
629
|
-
mutation setUsername($data: SetUsernameInput!) {
|
630
|
-
setUsername(data: $data)
|
631
|
-
}
|
632
|
-
`,xde=Ne`
|
633
|
-
query configuration {
|
634
|
-
configuration {
|
635
|
-
availableEmailSignUp
|
636
|
-
google {
|
637
|
-
available
|
638
|
-
clientId
|
639
|
-
}
|
640
|
-
github {
|
641
|
-
available
|
642
|
-
clientId
|
643
|
-
}
|
644
|
-
plugins {
|
645
|
-
file
|
646
|
-
}
|
647
|
-
}
|
648
|
-
}
|
649
|
-
`,Pde=Ne`
|
650
|
-
query getMe {
|
651
|
-
me {
|
652
|
-
...User
|
653
|
-
}
|
654
|
-
}
|
655
|
-
${hde}
|
656
|
-
`,Cde=Ne`
|
657
|
-
mutation CreateBranchByRevisionIdMst($data: CreateBranchByRevisionIdInput!) {
|
658
|
-
createBranchByRevisionId(data: $data) {
|
659
|
-
...BranchMst
|
660
|
-
}
|
661
|
-
}
|
662
|
-
${Ks}
|
663
|
-
`,Ede=Ne`
|
664
|
-
mutation CreateEndpointMst($data: CreateEndpointInput!) {
|
665
|
-
createEndpoint(data: $data) {
|
666
|
-
...EndpointMst
|
667
|
-
}
|
668
|
-
}
|
669
|
-
${Ym}
|
670
|
-
`,Tde=Ne`
|
671
|
-
mutation CreateProjectMst($data: CreateProjectInput!) {
|
672
|
-
createProject(data: $data) {
|
673
|
-
...ProjectMst
|
674
|
-
}
|
675
|
-
}
|
676
|
-
${tw}
|
677
|
-
`,Ode=Ne`
|
678
|
-
mutation CreateRevisionMst($data: CreateRevisionInput!) {
|
679
|
-
createRevision(data: $data) {
|
680
|
-
...RevisionMst
|
681
|
-
branch {
|
682
|
-
...BranchMst
|
683
|
-
}
|
684
|
-
}
|
685
|
-
}
|
686
|
-
${ew}
|
687
|
-
${Ks}
|
688
|
-
`,Rde=Ne`
|
689
|
-
mutation CreateRowMst($data: CreateRowInput!) {
|
690
|
-
createRow(data: $data) {
|
691
|
-
table {
|
692
|
-
...TableMst
|
693
|
-
}
|
694
|
-
previousVersionTableId
|
695
|
-
row {
|
696
|
-
...RowMst
|
697
|
-
}
|
698
|
-
}
|
699
|
-
}
|
700
|
-
${ns}
|
701
|
-
${Mf}
|
702
|
-
`,Ide=Ne`
|
703
|
-
mutation CreateTableMst($data: CreateTableInput!) {
|
704
|
-
createTable(data: $data) {
|
705
|
-
branch {
|
706
|
-
...BranchMst
|
707
|
-
}
|
708
|
-
table {
|
709
|
-
...TableMst
|
710
|
-
}
|
711
|
-
}
|
712
|
-
}
|
713
|
-
${Ks}
|
714
|
-
${ns}
|
715
|
-
`,kde=Ne`
|
716
|
-
mutation DeleteEndpointMst($data: DeleteEndpointInput!) {
|
717
|
-
deleteEndpoint(data: $data)
|
718
|
-
}
|
719
|
-
`,jde=Ne`
|
720
|
-
mutation DeleteProjectMst($data: DeleteProjectInput!) {
|
721
|
-
deleteProject(data: $data)
|
722
|
-
}
|
723
|
-
`,$de=Ne`
|
724
|
-
mutation DeleteRowMst($data: RemoveRowInput!) {
|
725
|
-
removeRow(data: $data) {
|
726
|
-
branch {
|
727
|
-
...BranchMst
|
728
|
-
}
|
729
|
-
table {
|
730
|
-
...TableMst
|
731
|
-
}
|
732
|
-
previousVersionTableId
|
733
|
-
}
|
734
|
-
}
|
735
|
-
${Ks}
|
736
|
-
${ns}
|
737
|
-
`,Ade=Ne`
|
738
|
-
mutation DeleteTableMst($data: RemoveTableInput!) {
|
739
|
-
removeTable(data: $data) {
|
740
|
-
branch {
|
741
|
-
...BranchMst
|
742
|
-
}
|
743
|
-
}
|
744
|
-
}
|
745
|
-
${Ks}
|
746
|
-
`,Dde=Ne`
|
747
|
-
mutation RenameRowMst($data: RenameRowInput!) {
|
748
|
-
renameRow(data: $data) {
|
749
|
-
table {
|
750
|
-
...TableMst
|
751
|
-
}
|
752
|
-
previousVersionTableId
|
753
|
-
row {
|
754
|
-
...RowMst
|
755
|
-
}
|
756
|
-
previousVersionRowId
|
757
|
-
}
|
758
|
-
}
|
759
|
-
${ns}
|
760
|
-
${Mf}
|
761
|
-
`,Mde=Ne`
|
762
|
-
mutation RenameTableMst($data: RenameTableInput!) {
|
763
|
-
renameTable(data: $data) {
|
764
|
-
table {
|
765
|
-
...TableMst
|
766
|
-
}
|
767
|
-
previousVersionTableId
|
768
|
-
}
|
769
|
-
}
|
770
|
-
${ns}
|
771
|
-
`,Nde=Ne`
|
772
|
-
mutation RevertChangesMst($data: RevertChangesInput!) {
|
773
|
-
revertChanges(data: $data) {
|
774
|
-
...BranchMst
|
775
|
-
}
|
776
|
-
}
|
777
|
-
${Ks}
|
778
|
-
`,Fde=Ne`
|
779
|
-
mutation UpdateRowMst($data: UpdateRowInput!) {
|
780
|
-
updateRow(data: $data) {
|
781
|
-
table {
|
782
|
-
...TableMst
|
783
|
-
}
|
784
|
-
previousVersionTableId
|
785
|
-
row {
|
786
|
-
...RowMst
|
787
|
-
}
|
788
|
-
previousVersionRowId
|
789
|
-
}
|
790
|
-
}
|
791
|
-
${ns}
|
792
|
-
${Mf}
|
793
|
-
`,Lde=Ne`
|
794
|
-
mutation UpdateTableMst($data: UpdateTableInput!) {
|
795
|
-
updateTable(data: $data) {
|
796
|
-
table {
|
797
|
-
...TableMst
|
798
|
-
}
|
799
|
-
previousVersionTableId
|
800
|
-
}
|
801
|
-
}
|
802
|
-
${ns}
|
803
|
-
`,Bde=Ne`
|
804
|
-
query BranchMst($data: GetBranchInput!) {
|
805
|
-
branch(data: $data) {
|
806
|
-
...BranchMst
|
807
|
-
}
|
808
|
-
}
|
809
|
-
${Ks}
|
810
|
-
`,Vde=Ne`
|
811
|
-
query BranchesMst($data: GetBranchesInput!) {
|
812
|
-
branches(data: $data) {
|
813
|
-
totalCount
|
814
|
-
pageInfo {
|
815
|
-
...PageInfoMst
|
816
|
-
}
|
817
|
-
edges {
|
818
|
-
cursor
|
819
|
-
node {
|
820
|
-
...BranchMst
|
821
|
-
}
|
822
|
-
}
|
823
|
-
}
|
824
|
-
}
|
825
|
-
${au}
|
826
|
-
${Ks}
|
827
|
-
`,zde=Ne`
|
828
|
-
query GetRowCountForeignKeysTo($data: GetRowCountForeignKeysByInput!) {
|
829
|
-
getRowCountForeignKeysTo(data: $data)
|
830
|
-
}
|
831
|
-
`,qde=Ne`
|
832
|
-
query meProjectsMst($data: GetMeProjectsInput!) {
|
833
|
-
meProjects(data: $data) {
|
834
|
-
totalCount
|
835
|
-
pageInfo {
|
836
|
-
...PageInfoMst
|
837
|
-
}
|
838
|
-
edges {
|
839
|
-
cursor
|
840
|
-
node {
|
841
|
-
...ProjectMst
|
842
|
-
}
|
843
|
-
}
|
844
|
-
}
|
845
|
-
}
|
846
|
-
${au}
|
847
|
-
${tw}
|
848
|
-
`,Ude=Ne`
|
849
|
-
query ProjectMst($data: GetProjectInput!) {
|
850
|
-
project(data: $data) {
|
851
|
-
...ProjectMst
|
852
|
-
}
|
853
|
-
}
|
854
|
-
${tw}
|
855
|
-
`,Hde=Ne`
|
856
|
-
query ProjectsMst($data: GetProjectsInput!) {
|
857
|
-
projects(data: $data) {
|
858
|
-
totalCount
|
859
|
-
pageInfo {
|
860
|
-
...PageInfoMst
|
861
|
-
}
|
862
|
-
edges {
|
863
|
-
cursor
|
864
|
-
node {
|
865
|
-
...ProjectMst
|
866
|
-
}
|
867
|
-
}
|
868
|
-
}
|
869
|
-
}
|
870
|
-
${au}
|
871
|
-
${tw}
|
872
|
-
`,Wde=Ne`
|
873
|
-
query RevisionMst($data: GetRevisionInput!) {
|
874
|
-
revision(data: $data) {
|
875
|
-
...RevisionMst
|
876
|
-
branch {
|
877
|
-
id
|
878
|
-
}
|
879
|
-
}
|
880
|
-
}
|
881
|
-
${ew}
|
882
|
-
`,Kde=Ne`
|
883
|
-
query RevisionsMst($branch: GetBranchInput!, $revisions: GetBranchRevisionsInput!) {
|
884
|
-
branch(data: $branch) {
|
885
|
-
id
|
886
|
-
revisions(data: $revisions) {
|
887
|
-
totalCount
|
888
|
-
pageInfo {
|
889
|
-
...PageInfoMst
|
890
|
-
}
|
891
|
-
edges {
|
892
|
-
cursor
|
893
|
-
node {
|
894
|
-
...BranchRevisionMst
|
895
|
-
}
|
896
|
-
}
|
897
|
-
}
|
898
|
-
}
|
899
|
-
}
|
900
|
-
${au}
|
901
|
-
${vde}
|
902
|
-
`,Gde=Ne`
|
903
|
-
query RowForeignKeysBy($data: GetRowInput!, $foreignKeyData: GetRowForeignKeysInput!) {
|
904
|
-
row(data: $data) {
|
905
|
-
versionId
|
906
|
-
rowForeignKeysBy(data: $foreignKeyData) {
|
907
|
-
totalCount
|
908
|
-
pageInfo {
|
909
|
-
...PageInfoMst
|
910
|
-
}
|
911
|
-
edges {
|
912
|
-
cursor
|
913
|
-
node {
|
914
|
-
...RowMst
|
915
|
-
}
|
916
|
-
}
|
917
|
-
}
|
918
|
-
}
|
919
|
-
}
|
920
|
-
${au}
|
921
|
-
${Mf}
|
922
|
-
`,Qde=Ne`
|
923
|
-
query RowMst($data: GetRowInput!) {
|
924
|
-
row(data: $data) {
|
925
|
-
...RowMst
|
926
|
-
}
|
927
|
-
}
|
928
|
-
${Mf}
|
929
|
-
`,Yde=Ne`
|
930
|
-
query RowsMst($data: GetRowsInput!) {
|
931
|
-
rows(data: $data) {
|
932
|
-
totalCount
|
933
|
-
pageInfo {
|
934
|
-
...PageInfoMst
|
935
|
-
}
|
936
|
-
edges {
|
937
|
-
cursor
|
938
|
-
node {
|
939
|
-
...RowMst
|
940
|
-
}
|
941
|
-
}
|
942
|
-
}
|
943
|
-
}
|
944
|
-
${au}
|
945
|
-
${Mf}
|
946
|
-
`,Xde=Ne`
|
947
|
-
query TableForeignKeysBy($data: GetTableInput!, $foreignKeyData: GetTableForeignKeysInput!) {
|
948
|
-
table(data: $data) {
|
949
|
-
versionId
|
950
|
-
foreignKeysBy(data: $foreignKeyData) {
|
951
|
-
totalCount
|
952
|
-
pageInfo {
|
953
|
-
...PageInfoMst
|
954
|
-
}
|
955
|
-
edges {
|
956
|
-
cursor
|
957
|
-
node {
|
958
|
-
...TableMst
|
959
|
-
}
|
960
|
-
}
|
961
|
-
}
|
962
|
-
}
|
963
|
-
}
|
964
|
-
${au}
|
965
|
-
${ns}
|
966
|
-
`,Jde=Ne`
|
967
|
-
query TableMst($data: GetTableInput!) {
|
968
|
-
table(data: $data) {
|
969
|
-
...TableMst
|
970
|
-
}
|
971
|
-
}
|
972
|
-
${ns}
|
973
|
-
`,Zde=Ne`
|
974
|
-
query TablesMst($data: GetTablesInput!) {
|
975
|
-
tables(data: $data) {
|
976
|
-
totalCount
|
977
|
-
pageInfo {
|
978
|
-
...PageInfoMst
|
979
|
-
}
|
980
|
-
edges {
|
981
|
-
cursor
|
982
|
-
node {
|
983
|
-
...TableMst
|
984
|
-
}
|
985
|
-
}
|
986
|
-
}
|
987
|
-
}
|
988
|
-
${au}
|
989
|
-
${ns}
|
990
|
-
`,efe=(e,t,r,n)=>e();function tfe(e,t=efe){return{confirmEmailCode(r,n){return t(i=>e.request(gde,r,{...n,...i}),"confirmEmailCode","mutation",r)},loginGithub(r,n){return t(i=>e.request(yde,r,{...n,...i}),"loginGithub","mutation",r)},loginGoogle(r,n){return t(i=>e.request(bde,r,{...n,...i}),"loginGoogle","mutation",r)},login(r,n){return t(i=>e.request(wde,r,{...n,...i}),"login","mutation",r)},signUp(r,n){return t(i=>e.request(Sde,r,{...n,...i}),"signUp","mutation",r)},setUsername(r,n){return t(i=>e.request(_de,r,{...n,...i}),"setUsername","mutation",r)},configuration(r,n){return t(i=>e.request(xde,r,{...n,...i}),"configuration","query",r)},getMe(r,n){return t(i=>e.request(Pde,r,{...n,...i}),"getMe","query",r)},CreateBranchByRevisionIdMst(r,n){return t(i=>e.request(Cde,r,{...n,...i}),"CreateBranchByRevisionIdMst","mutation",r)},CreateEndpointMst(r,n){return t(i=>e.request(Ede,r,{...n,...i}),"CreateEndpointMst","mutation",r)},CreateProjectMst(r,n){return t(i=>e.request(Tde,r,{...n,...i}),"CreateProjectMst","mutation",r)},CreateRevisionMst(r,n){return t(i=>e.request(Ode,r,{...n,...i}),"CreateRevisionMst","mutation",r)},CreateRowMst(r,n){return t(i=>e.request(Rde,r,{...n,...i}),"CreateRowMst","mutation",r)},CreateTableMst(r,n){return t(i=>e.request(Ide,r,{...n,...i}),"CreateTableMst","mutation",r)},DeleteEndpointMst(r,n){return t(i=>e.request(kde,r,{...n,...i}),"DeleteEndpointMst","mutation",r)},DeleteProjectMst(r,n){return t(i=>e.request(jde,r,{...n,...i}),"DeleteProjectMst","mutation",r)},DeleteRowMst(r,n){return t(i=>e.request($de,r,{...n,...i}),"DeleteRowMst","mutation",r)},DeleteTableMst(r,n){return t(i=>e.request(Ade,r,{...n,...i}),"DeleteTableMst","mutation",r)},RenameRowMst(r,n){return t(i=>e.request(Dde,r,{...n,...i}),"RenameRowMst","mutation",r)},RenameTableMst(r,n){return t(i=>e.request(Mde,r,{...n,...i}),"RenameTableMst","mutation",r)},RevertChangesMst(r,n){return t(i=>e.request(Nde,r,{...n,...i}),"RevertChangesMst","mutation",r)},UpdateRowMst(r,n){return t(i=>e.request(Fde,r,{...n,...i}),"UpdateRowMst","mutation",r)},UpdateTableMst(r,n){return t(i=>e.request(Lde,r,{...n,...i}),"UpdateTableMst","mutation",r)},BranchMst(r,n){return t(i=>e.request(Bde,r,{...n,...i}),"BranchMst","query",r)},BranchesMst(r,n){return t(i=>e.request(Vde,r,{...n,...i}),"BranchesMst","query",r)},GetRowCountForeignKeysTo(r,n){return t(i=>e.request(zde,r,{...n,...i}),"GetRowCountForeignKeysTo","query",r)},meProjectsMst(r,n){return t(i=>e.request(qde,r,{...n,...i}),"meProjectsMst","query",r)},ProjectMst(r,n){return t(i=>e.request(Ude,r,{...n,...i}),"ProjectMst","query",r)},ProjectsMst(r,n){return t(i=>e.request(Hde,r,{...n,...i}),"ProjectsMst","query",r)},RevisionMst(r,n){return t(i=>e.request(Wde,r,{...n,...i}),"RevisionMst","query",r)},RevisionsMst(r,n){return t(i=>e.request(Kde,r,{...n,...i}),"RevisionsMst","query",r)},RowForeignKeysBy(r,n){return t(i=>e.request(Gde,r,{...n,...i}),"RowForeignKeysBy","query",r)},RowMst(r,n){return t(i=>e.request(Qde,r,{...n,...i}),"RowMst","query",r)},RowsMst(r,n){return t(i=>e.request(Yde,r,{...n,...i}),"RowsMst","query",r)},TableForeignKeysBy(r,n){return t(i=>e.request(Xde,r,{...n,...i}),"TableForeignKeysBy","query",r)},TableMst(r,n){return t(i=>e.request(Jde,r,{...n,...i}),"TableMst","query",r)},TablesMst(r,n){return t(i=>e.request(Zde,r,{...n,...i}),"TablesMst","query",r)}}}const rfe={BASE_URL:"/",DEV:!1,GIT_BRANCH_NAME:"HEAD",GIT_COMMIT_HASH:"712ebec",MODE:"production",PACKAGE_VERSION:"1.0.1",PROD:!0,REACT_APP_ENDPOINT_HOST:"",REACT_APP_ENDPOINT_PORT:"",REACT_APP_ENDPOINT_SERVER_URL:"/endpoint",REACT_APP_GRAPHQL_SERVER_URL:"/graphql",REACT_APP_SWAGGER_SERVER_URL:"/api",SSR:!1};class Fb{constructor(){}get(t){var i;const r=(i=window.__env__)==null?void 0:i[t],n=rfe[t];return r||n}}dt.register(Fb,()=>new Fb,{scope:"singleton"});class es{constructor(t){Pe(this,"graphQLClient");Pe(this,"client");this.environmentService=t;const r=this.environmentService.get("REACT_APP_GRAPHQL_SERVER_URL");if(!r)throw new Error("Invalid REACT_APP_GRAPHQL_SERVER_URL");this.graphQLClient=new cde(r,{responseMiddleware:n=>{var o;const i=(o=n.response)==null?void 0:o.errors[0].message;return i&&KE({status:"error",variant:"left-accent",colorScheme:"red",duration:3e3,isClosable:!0,position:"top",description:i}),n}}),this.client=tfe(this.graphQLClient)}setToken(t){this.graphQLClient.setHeaders(t?{Authorization:`Bearer ${t}`}:{})}}dt.register(es,()=>{const e=dt.get(Fb);return new es(e)},{scope:"singleton"});const S_="token";class qi{constructor(t,r){Pe(this,"isLoaded",!1);Pe(this,"user",null);Pe(this,"token",null);this.storage=t,this.apiService=r,st(this),this.init()}async setToken(t){this.token=t,this.apiService.setToken(this.token),this.token&&await this.fetchMe()}async init(){await this.setToken(this.loadToken()),this.signToToken(),this.setIsChecked(!0)}loadToken(){return this.storage.getItem(S_)}async fetchMe(){try{const t=await this.apiService.client.getMe();this.user=t.me}catch(t){console.error(t),Hp(()=>{this.token=null})}}setIsChecked(t){this.isLoaded=t}signToToken(){Ya(()=>this.token,t=>{t?this.storage.setItem(S_,t):this.storage.removeItem(S_)})}logout(){this.token=null,this.user=null,this.apiService.setToken(null)}}dt.register(qi,()=>{const e=dt.get(es);return new qi(localStorage,e)},{scope:"singleton"});class dc{constructor(t){Pe(this,"isLoaded",!1);Pe(this,"error",null);Pe(this,"data",null);this.apiService=t,st(this),this.init()}get availableSignUp(){return this.availableEmailSignUp||this.availableGoogleOauth||this.availableGithubOauth}get availableEmailSignUp(){var t;return(t=this.data)==null?void 0:t.availableEmailSignUp}get availableGoogleOauth(){var t;return!!((t=this.data)!=null&&t.google.available)}get googleOauthClientId(){var t,r;if(!((t=this.data)!=null&&t.google.clientId))throw new Error("Invalid Google client id");return(r=this.data)==null?void 0:r.google.clientId}get availableGithubOauth(){var t;return!!((t=this.data)!=null&&t.github.available)}get githubOauthClientId(){var t,r;if(!((t=this.data)!=null&&t.github.clientId))throw new Error("Invalid Github client id");return(r=this.data)==null?void 0:r.github.clientId}async init(){await this.request()}async request(){try{const t=await this.apiService.client.configuration();this.setData(t.configuration)}catch(t){this.setError(t),console.error(t)}finally{this.setIsLoaded(!0)}}setData(t){this.data=t}setError(t){this.error=t}setIsLoaded(t){this.isLoaded=t}}dt.register(dc,()=>{const e=dt.get(es);return new dc(e)},{scope:"singleton"});class Lb{constructor(t,r){this.authService=t,this.configurationService=r,st(this)}get isLoaded(){return this.authService.isLoaded&&this.configurationService.isLoaded}}dt.register(Lb,()=>{const e=dt.get(qi),t=dt.get(dc);return new Lb(e,t)},{scope:"singleton"});var R2={},nfe="warn";function ife(){return nfe}var jn;(function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"})(jn||(jn={}));/*! *****************************************************************************
|
991
|
-
Copyright (c) Microsoft Corporation.
|
992
|
-
|
993
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
994
|
-
purpose with or without fee is hereby granted.
|
995
|
-
|
996
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
997
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
998
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
999
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
1000
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
1001
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
1002
|
-
PERFORMANCE OF THIS SOFTWARE.
|
1003
|
-
***************************************************************************** */var TP=function(e,t){return TP=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},TP(e,t)};function Wr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");TP(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Fi=function(){return Fi=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Fi.apply(this,arguments)};function ofe(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function _p(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function YE(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(l){a={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function Pc(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(YE(arguments[t]));return e}function IB(e){return _r(e).type}function I2(e,t){_r(e).applyPatches(zB(t))}function kB(e,t){t===void 0&&(t=!0);var r=_r(e);return t?r.snapshot:r.type.getSnapshot(r,!1)}function afe(e){return _r(e).root.storedValue}function sfe(e){return _r(e).path}function lfe(e){return _r(e).identifier}function Og(e,t){t===void 0&&(t=!0);try{var r=e();if(r==null)return;if(Xr(r))return t?ufe(r)?r:void 0:r;throw rt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof iV)return;throw n}}function ufe(e){return _r(e).observableIsAlive}var jB=function(){function e(t,r,n,i){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"_escapedSubpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storedValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"aliveAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_state",{enumerable:!0,configurable:!0,writable:!0,value:Xn.INITIALIZING}),Object.defineProperty(this,"_hookSubscribers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.environment=i,this.baseSetParent(r,n)}return Object.defineProperty(e.prototype,"subpath",{get:function(){return this._subpath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subpathUponDeath",{get:function(){return this._subpathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pathUponDeath",{get:function(){return this._pathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.type.getValue(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(t){var r=this.isAlive;this._state=t;var n=this.isAlive;this.aliveAtom&&r!==n&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fireInternalHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._hookSubscribers&&this._hookSubscribers.emit(t,this,t)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return this._hookSubscribers||(this._hookSubscribers=new HB),this._hookSubscribers.register(t,r)}}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getReconciliationType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type}}),Object.defineProperty(e.prototype,"baseSetParent",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){this._parent=t,this._subpath=r,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()}}),Object.defineProperty(e.prototype,"path",{get:function(){return this.getEscapedPath(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getEscapedPath",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t&&(this.pathAtom||(this.pathAtom=_b("path")),this.pathAtom.reportObserved()),this.parent?(this._escapedSubpath===void 0&&(this._escapedSubpath=this._subpath?Xu(this._subpath):""),this.parent.getEscapedPath(t)+"/"+this._escapedSubpath):""}}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return this.parent===null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAlive",{get:function(){return this.state!==Xn.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===Xn.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=_b("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(this.state===Xn.CREATED){if(this.parent){if(this.parent.state!==Xn.FINALIZED)return;this.fireHook(jn.afterAttach)}this.state=Xn.FINALIZED,t&&t()}}}),Object.defineProperty(e.prototype,"baseFinalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=Xn.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(jn.beforeDestroy)}}),e}(),nm=function(e){Wr(t,e);function t(r,n,i,o,a){var l=e.call(this,r,n,i,o)||this;try{l.storedValue=r.createNewInstance(a)}catch(c){throw l.state=Xn.DEAD,c}return l.state=Xn.CREATED,l.finalizeCreation(),l}return Object.defineProperty(t.prototype,"root",{get:function(){if(!this.parent)throw rt("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this.parent!==r,o=this.subpath!==n;!i&&!o||(this.environment=void 0,this.baseSetParent(this.parent,n))}}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return this.getSnapshot()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(t.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return this.type.name+"@"+r+(this.isAlive?"":" [dead]")}}),Object.defineProperty(t.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===Xn.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(t.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(t.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(t.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(t.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.fireInternalHook(r)}}),t}(jB);nm.prototype.die=Sr(nm.prototype.die);var cfe=1,dfe={onError:function(e){throw e}},Ui=function(e){Wr(t,e);function t(r,n,i,o,a){var l=e.call(this,r,n,i,o)||this;if(Object.defineProperty(l,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++cfe}),Object.defineProperty(l,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(l,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"hasSnapshotPostProcessor",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(l,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(l,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(l,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(l,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(l,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(l,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),l._snapshotComputed=dn(function(){return l.getSnapshot()}),l.unbox=l.unbox.bind(l),l._initialSnapshot=a,l.identifierAttribute=r.identifierAttribute,n||(l.identifierCache=new _fe),l._childNodes=r.initializeChildNodes(l,l._initialSnapshot),l.identifier=null,l.unnormalizedIdentifier=null,l.identifierAttribute&&l._initialSnapshot){var c=l._initialSnapshot[l.identifierAttribute];if(c===void 0){var d=l._childNodes[l.identifierAttribute];d&&(c=d.value)}if(typeof c!="string"&&typeof c!="number")throw rt("Instance identifier '"+l.identifierAttribute+"' for type '"+l.type.name+"' must be a string or a number");l.identifier=Xm(c),l.unnormalizedIdentifier=c}return n?n.root.identifierCache.addNodeToCache(l):l.identifierCache.addNodeToCache(l),l}return Object.defineProperty(t.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.createObservableInstanceIfNeeded(),this._applyPatches(r)}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.createObservableInstanceIfNeeded(),this._applySnapshot(r)}}),Object.defineProperty(t.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(r){r===void 0&&(r=!0),this._observableInstanceState===0&&this.createObservableInstance(r)}}),Object.defineProperty(t.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n,i,o,a;r===void 0&&(r=!0),this._observableInstanceState=1;for(var l=[],c=this.parent;c&&c._observableInstanceState===0;)l.unshift(c),c=c.parent;try{for(var d=_p(l),f=d.next();!f.done;f=d.next()){var p=f.value;p.createObservableInstanceIfNeeded(!1)}}catch(y){n={error:y}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}var m=this.type;try{this.storedValue=m.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,m.finalizeNewInstance(this,this.storedValue)}catch(y){throw this.state=Xn.DEAD,y}finally{this._isRunningAction=!1}if(this._observableInstanceState=2,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=wf,this.state=Xn.CREATED,r){this.fireHook(jn.afterCreate),this.finalizeCreation();try{for(var g=_p(l.reverse()),b=g.next();!b.done;b=g.next()){var p=b.value;p.fireHook(jn.afterCreate),p.finalizeCreation()}}catch(y){o={error:y}}finally{try{b&&!b.done&&(a=g.return)&&a.call(g)}finally{if(o)throw o.error}}}}}),Object.defineProperty(t.prototype,"root",{get:function(){var r=this.parent;return r?r.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(jn.beforeDetach);var r=this.state;this.state=Xn.DETACHING;var n=this.root,i=n.environment,o=n.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=i,this.identifierCache=o}finally{this.state=r}}}}),Object.defineProperty(t.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=r!==this.parent,o=n!==this.subpath;!i&&!o||(i?(this.environment=void 0,r.root.identifierCache.mergeCache(this),this.baseSetParent(r,n),this.fireHook(jn.afterAttach)):o&&this.baseSetParent(this.parent,n))}}),Object.defineProperty(t.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this;this.fireInternalHook(r);var i=this.storedValue&&typeof this.storedValue=="object"&&this.storedValue[r];typeof i=="function"&&(Hp?Hp(function(){i.apply(n.storedValue)}):i.apply(this.storedValue))}}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return this.hasSnapshotPostProcessor&&this.createObservableInstanceIfNeeded(),this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?this._observableInstanceState===2?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(t.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(t.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var r=this.type,n=this._childNodes,i=this._initialSnapshot;this._cachedInitialSnapshot=r.processInitialSnapshot(n,i),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(t.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isRunningAction?!0:this.isRoot?!1:this.parent.isRunningAction()}}),Object.defineProperty(t.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=ife();if(!this.isAlive&&n!=="ignore"){var i=this._getAssertAliveError(r);switch(n){case"error":throw rt(i);case"warn":Afe(i)}}}}),Object.defineProperty(t.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.getEscapedPath(!1)||this.pathUponDeath||"",i=r.subpath&&Xu(r.subpath)||"",o=r.actionContext||DB();o&&o.type!=="action"&&o.parentActionEvent&&(o=o.parentActionEvent);var a="";if(o&&o.name!=null){var l=o&&o.context&&sfe(o.context)||n;a=l+"."+o.name+"()"}return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '"+this.type.name+"', Path upon death: '"+n+"', Subpath: '"+i+"', Action: '"+a+"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree."}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.assertAlive({subpath:r}),this._autoUnbox=!1;try{return this._observableInstanceState===2?this.type.getChildNode(this,r):this._childNodes[r]}finally{this._autoUnbox=!0}}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(wf),this._autoUnbox=!1;try{return this._observableInstanceState===2?this.type.getChildren(this):BB(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.type.getChildType(r)}}),Object.defineProperty(t.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(this.assertAlive(r),!this.isRunningAction()&&this.isProtected)throw rt("Cannot modify '"+this+"', the object is protected and can only be modified by using an action.")}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.type.removeChild(this,r)}}),Object.defineProperty(t.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r&&(this.assertAlive({subpath:r.subpath||r.subpathUponDeath}),this._autoUnbox?r.value:r)}}),Object.defineProperty(t.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=(this.isAlive?this.path:this.pathUponDeath)||"<root>",n=this.identifier?"(id: "+this.identifier+")":"";return this.type.name+"@"+r+n+(this.isAlive?"":" [dead]")}}),Object.defineProperty(t.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;this.baseFinalizeCreation(function(){var n,i;try{for(var o=_p(r.getChildren()),a=o.next();!a.done;a=o.next()){var l=a.value;l.finalizeCreation()}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}r.fireInternalHook(jn.afterCreationFinalization)})}}),Object.defineProperty(t.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw rt("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(t.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;this._applyPatches=im(this.storedValue,"@APPLY_PATCHES",function(n){n.forEach(function(i){if(!i.path){r.type.applySnapshot(r,i.value);return}var o=zfe(i.path),a=Cfe(r,o.slice(0,-1));a.applyPatchLocally(o[o.length-1],i)})}),this._applySnapshot=im(this.storedValue,"@APPLY_SNAPSHOT",function(n){if(n!==r.snapshot)return r.type.applySnapshot(r,n)}),Yu(this.storedValue,"$treenode",this),Yu(this.storedValue,"toJSON",Pfe)}}),Object.defineProperty(t.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===Xn.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(t.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._observableInstanceState!==0&&(this.getChildren().forEach(function(r){r.aboutToDie()}),this.baseAboutToDie(),this._internalEventsEmit("dispose"),this._internalEventsClear("dispose"))}}),Object.defineProperty(t.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach(function(n){n.finalizeDeath()}),this.root.identifierCache.notifyDied(this);var r=this.snapshot;this._snapshotUponDeath=r,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(t.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._addSnapshotReaction(),this._internalEventsRegister("snapshot",r)}}),Object.defineProperty(t.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this._internalEventsEmit("snapshot",r)}}),Object.defineProperty(t.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._internalEventsRegister("patch",r)}}),Object.defineProperty(t.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(this._internalEventsHasSubscribers("patch")){var i=kfe({},r,{path:n.path.substr(this.path.length)+"/"+r.path}),o=YE(Nfe(i),2),a=o[0],l=o[1];this._internalEventsEmit("patch",a,l)}this.parent&&this.parent.emitPatch(r,n)}}),Object.defineProperty(t.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._internalEventsHas("dispose",r)}}),Object.defineProperty(t.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(!this.hasDisposer(r)){this._internalEventsRegister("dispose",r,!0);return}throw rt("cannot add a disposer when it is already registered for execution")}}),Object.defineProperty(t.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(!this._internalEventsHas("dispose",r))throw rt("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister("dispose",r)}}),Object.defineProperty(t.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(this.middlewares){var n=this.middlewares.indexOf(r);n>=0&&this.middlewares.splice(n,1)}}}),Object.defineProperty(t.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this;n===void 0&&(n=!0);var o={handler:r,includeHooks:n};return this.middlewares?this.middlewares.push(o):this.middlewares=[o],function(){i.removeMiddleware(o)}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){this.assertWritable({subpath:r}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,r,n)}}),Object.defineProperty(t.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;if(!this._hasSnapshotReaction){var n=Ya(function(){return r.snapshot},function(i){return r.emitSnapshot(i)},dfe);this.addDisposer(n),this._hasSnapshotReaction=!0}}}),Object.defineProperty(t.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return!!this._internalEvents&&this._internalEvents.hasSubscribers(r)}}),Object.defineProperty(t.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){return i===void 0&&(i=!1),this._internalEvents||(this._internalEvents=new HB),this._internalEvents.register(r,n,i)}}),Object.defineProperty(t.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return!!this._internalEvents&&this._internalEvents.has(r,n)}}),Object.defineProperty(t.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){this._internalEvents&&this._internalEvents.unregister(r,n)}}),Object.defineProperty(t.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(r){for(var n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];this._internalEvents&&(n=this._internalEvents).emit.apply(n,Pc([r],i))}}),Object.defineProperty(t.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this._internalEvents&&this._internalEvents.clear(r)}}),Object.defineProperty(t.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),t}(jB);Ui.prototype.createObservableInstance=Sr(Ui.prototype.createObservableInstance);Ui.prototype.detach=Sr(Ui.prototype.detach);Ui.prototype.die=Sr(Ui.prototype.die);var $B,rr;(function(e){e[e.String=1]="String",e[e.Number=2]="Number",e[e.Boolean=4]="Boolean",e[e.Date=8]="Date",e[e.Literal=16]="Literal",e[e.Array=32]="Array",e[e.Map=64]="Map",e[e.Object=128]="Object",e[e.Frozen=256]="Frozen",e[e.Optional=512]="Optional",e[e.Reference=1024]="Reference",e[e.Identifier=2048]="Identifier",e[e.Late=4096]="Late",e[e.Refinement=8192]="Refinement",e[e.Union=16384]="Union",e[e.Null=32768]="Null",e[e.Undefined=65536]="Undefined",e[e.Integer=131072]="Integer",e[e.Custom=262144]="Custom",e[e.SnapshotProcessor=524288]="SnapshotProcessor",e[e.Lazy=1048576]="Lazy",e[e.Finite=2097152]="Finite",e[e.Float=4194304]="Float"})(rr||(rr={}));var AB="cannotDetermine",ffe=Symbol("$type"),Vs=function(){function e(t){Object.defineProperty(this,$B,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"C",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"S",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"T",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"N",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isType",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=t}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return $s(this,t),this.instantiate(null,"",r,t).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){throw rt("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=LB(t);if(n){var i=IB(t);return this.isAssignableFrom(i)?Hi():Qi(r,t)}return this.isValidSnapshot(t,r)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.validate(t,[{path:"",type:this}]).length===0}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw rt("Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"TypeWithoutSTN",{get:function(){throw rt("Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"SnapshotType",{get:function(){throw rt("Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CreationType",{get:function(){throw rt("Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`")},enumerable:!1,configurable:!0}),e}();$B=ffe;Vs.prototype.create=Sr(Vs.prototype.create);var yf=function(e){Wr(t,e);function t(r){var n=e.call(this,r)||this;return Object.defineProperty(n,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n}return Object.defineProperty(t.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return r===void 0&&(r=this.getDefaultSnapshot()),e.prototype.create.call(this,r,n)}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.createObservableInstanceIfNeeded(),r.storedValue}}),Object.defineProperty(t.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return!r.identifierAttribute||r.identifier===Xm(n[r.identifierAttribute])}}),Object.defineProperty(t.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return r.isDetaching?!1:r.snapshot===n||Xr(n)&&_r(n)===r?!0:r.type===this&&qB(n)&&!Xr(n)&&this.isMatchingSnapshotId(r,n)?(r.applySnapshot(n),!0):!1}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=this.tryToReconcileNode(r,n);if(a)return r.setParent(i,o),r;if(r.die(),Xr(n)&&this.isAssignableFrom(IB(n))){var l=_r(n);return l.setParent(i,o),l}return this.instantiate(i,o,void 0,n)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(Vs);yf.prototype.create=Sr(yf.prototype.create);var Cc=function(e){Wr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){if(!r.isDetaching&&r.type===this&&r.storedValue===n)return r;var a=this.instantiate(i,o,void 0,n);return r.die(),a}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(Vs);function Xl(e){return typeof e=="object"&&e&&e.isType===!0}var hfe=1,xp;function DB(){return xp}function MB(){return hfe++}function OP(e,t){var r=_r(e.context);e.type==="action"&&r.assertAlive({actionContext:e});var n=r._isRunningAction;r._isRunningAction=!0;var i=xp;xp=e;try{return mfe(r,e,t)}finally{xp=i,r._isRunningAction=n}}function NB(e){if(e)return e.type==="action"?e:e.parentActionEvent}function im(e,t,r){var n=function(){var i=MB(),o=xp,a=NB(o);return OP({type:"action",name:t,id:i,args:WB(arguments),context:e,tree:afe(e),rootId:o?o.rootId:i,parentId:o?o.id:0,allParentIds:o?Pc(o.allParentIds,[o.id]):[],parentEvent:o,parentActionEvent:a},r)};return n._isMSTAction=!0,n._isFlowAction=r._isFlowAction,n}var pfe=function(){function e(t,r){Object.defineProperty(this,"arrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"inArrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:[]}),r.$mst_middleware&&this.middlewares.push(r.$mst_middleware);for(var n=t;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getNextMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this.middlewares[this.arrayIndex];if(t){var r=t[this.inArrayIndex++];return r||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}}),e}();function mfe(e,t,r){var n=new pfe(e,r);if(n.isEmpty)return Sr(r).apply(null,t.args);var i=null;function o(a){var l=n.getNextMiddleware(),c=l&&l.handler;if(!c)return Sr(r).apply(null,a.args);if(!l.includeHooks&&jn[a.name])return o(a);function d(p,m){i=o(p),m&&(i=m(i))}function f(p){i=p}return c(a,d,f),i}return o(t)}function vfe(e){try{return JSON.stringify(e)}catch(t){return"<Unserializable: "+t+">"}}function FB(e){return typeof e=="function"?"<function"+(e.name?" "+e.name:"")+">":Xr(e)?"<"+e+">":"`"+vfe(e)+"`"}function gfe(e){return e.length<280?e:e.substring(0,272)+"......"+e.substring(e.length-8)}function yfe(e){var t=e.value,r=e.context[e.context.length-1].type,n=e.context.map(function(l){var c=l.path;return c}).filter(function(l){return l.length>0}).join("/"),i=n.length>0?'at path "/'+n+'" ':"",o=Xr(t)?"value of type "+_r(t).type.name+":":om(t)?"value":"snapshot",a=r&&Xr(t)&&r.is(_r(t).snapshot);return""+i+o+" "+FB(t)+" is not assignable "+(r?"to type: `"+r.name+"`":"")+(e.message?" ("+e.message+")":"")+(r?ihe(r)||om(t)?".":", expected an instance of `"+r.name+"` or a snapshot like `"+r.describe()+"` instead."+(a?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function XE(e,t,r){return e.concat([{path:t,type:r}])}function Hi(){return bf}function Qi(e,t,r){return[{context:e,value:t,message:r}]}function rw(e){return e.reduce(function(t,r){return t.concat(r)},[])}function $s(e,t){Dfe()&&bfe(e,t)}function bfe(e,t){var r=e.validate(t,[{path:"",type:e}]);if(r.length>0)throw rt(wfe(e,t,r))}function wfe(e,t,r){if(r.length!==0)return"Error while converting "+gfe(FB(t))+" to `"+e.name+`\`:
|
1004
|
-
|
1005
|
-
`+r.map(yfe).join(`
|
1006
|
-
`)}var Sfe=0,_fe=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:Sfe++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:er.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:er.map()})}return Object.defineProperty(e.prototype,"updateLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.lastCacheModificationPerId.get(t);this.lastCacheModificationPerId.set(t,r===void 0?1:r+1)}}),Object.defineProperty(e.prototype,"getLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.lastCacheModificationPerId.get(t)||0;return this.cacheId+"-"+r}}),Object.defineProperty(e.prototype,"addNodeToCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){if(r===void 0&&(r=!0),t.identifierAttribute){var n=t.identifier;this.cache.has(n)||this.cache.set(n,er.array([],nw));var i=this.cache.get(n);if(i.indexOf(t)!==-1)throw rt("Already registered");i.push(t),r&&this.updateLastCacheModificationPerId(n)}}}),Object.defineProperty(e.prototype,"mergeCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this;gL(t.identifierCache.cache).forEach(function(n){return n.forEach(function(i){r.addNodeToCache(i)})})}}),Object.defineProperty(e.prototype,"notifyDied",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(t.identifierAttribute){var r=t.identifier,n=this.cache.get(r);n&&(n.remove(t),n.length||this.cache.delete(r),this.updateLastCacheModificationPerId(t.identifier))}}}),Object.defineProperty(e.prototype,"splitCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this,n=new e,i=t.path+"/";return Mie(this.cache).forEach(function(o){for(var a=YE(o,2),l=a[0],c=a[1],d=!1,f=c.length-1;f>=0;f--){var p=c[f];(p===t||p.path.indexOf(i)===0)&&(n.addNodeToCache(p,!1),c.splice(f,1),c.length||r.cache.delete(l),d=!0)}d&&r.updateLastCacheModificationPerId(l)}),n}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=this.cache.get(r);return n?n.some(function(i){return t.isAssignableFrom(i.type)}):!1}}),Object.defineProperty(e.prototype,"resolve",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=this.cache.get(r);if(!n)return null;var i=n.filter(function(o){return t.isAssignableFrom(o.type)});switch(i.length){case 0:return null;case 1:return i[0];default:throw rt("Cannot resolve a reference to type '"+t.name+"' with id: '"+r+"' unambigously, there are multiple candidates: "+i.map(function(o){return o.path}).join(", "))}}}),e}();function JE(e,t,r,n,i){var o=LB(i);if(o){if(o.parent)throw rt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+(t?t.path:"")+"/"+r+"', but it lives already at '"+o.path+"'");return t&&o.setParent(t,r),o}return new Ui(e,t,r,n,i)}function su(e,t,r,n,i){return new nm(e,t,r,n,i)}function xfe(e){return e instanceof nm||e instanceof Ui}var Xn;(function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CREATED=1]="CREATED",e[e.FINALIZED=2]="FINALIZED",e[e.DETACHING=3]="DETACHING",e[e.DEAD=4]="DEAD"})(Xn||(Xn={}));function Xr(e){return!!(e&&e.$treenode)}function _r(e){if(!Xr(e))throw rt("Value "+e+" is no MST Node");return e.$treenode}function LB(e){return e&&e.$treenode||null}function Pfe(){return _r(this).snapshot}function Cfe(e,t,r){r===void 0&&(r=!0);var n=e;try{for(var i=0;i<t.length;i++){var o=t[i];if(o===".."){if(n=n.parent,n)continue}else{if(o===".")continue;if(n){if(n instanceof nm){var a=n.value;Xr(a)&&(n=_r(a))}if(n instanceof Ui){var l=n.getChildType(o);if(l&&(n=n.getChildNode(o),n))continue}}}throw rt("Could not resolve '"+o+"' in path '"+(k2(t.slice(0,i))||"/")+"' while resolving '"+k2(t)+"'")}}catch(c){if(!r)return;throw c}return n}function BB(e){if(!e)return bf;var t=Object.keys(e);if(!t.length)return bf;var r=new Array(t.length);return t.forEach(function(n,i){r[i]=e[n]}),r}var Efe=Object.toString(),bf=Object.freeze([]),wf=Object.freeze({}),nw=lie().useProxies?{deep:!1}:{deep:!1,proxy:!1};Object.freeze(nw);function rt(e){return e===void 0&&(e="Illegal state"),new Error("[mobx-state-tree] "+e)}function Tfe(e){return e}var Ofe=Number.isInteger;function Rfe(e){return Number(e)===e&&e%1!==0}function Ife(e){return Number.isFinite(e)}function VB(e){return Array.isArray(e)||Uo(e)}function zB(e){return e?VB(e)?e:[e]:bf}function kfe(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++){var i=t[n];for(var o in i)e[o]=i[o]}return e}function zd(e){var t;if(e===null||typeof e!="object")return!1;var r=Object.getPrototypeOf(e);return r==null?!0:((t=r.constructor)===null||t===void 0?void 0:t.toString())===Efe}function qB(e){return e!==null&&typeof e=="object"&&!(e instanceof Date)&&!(e instanceof RegExp)}function om(e,t){return t===void 0&&(t=!0),e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"||t&&e instanceof Date}function UB(e){return typeof e!="function"}function jfe(e,t,r){Gi(e)?bL(e,t,r):Object.defineProperty(e,t,r)}function Yu(e,t,r){jfe(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}var $fe=function(){function e(){Object.defineProperty(this,"handlers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}return Object.defineProperty(e.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=this;return r===void 0&&(r=!1),r?this.handlers.unshift(t):this.handlers.push(t),function(){n.unregister(t)}}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.handlers.indexOf(t)>=0}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.handlers.indexOf(t);r>=0&&this.handlers.splice(r,1)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.handlers.length=0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this.handlers.slice();n.forEach(function(i){return i.apply(void 0,Pc(t))})}}),e}(),HB=function(){function e(){Object.defineProperty(this,"eventHandlers",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return Object.defineProperty(e.prototype,"hasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.eventHandlers&&this.eventHandlers[t];return!!r&&r.hasSubscribers}}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,n){n===void 0&&(n=!1),this.eventHandlers||(this.eventHandlers={});var i=this.eventHandlers[t];return i||(i=this.eventHandlers[t]=new $fe),i.register(r,n)}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=this.eventHandlers&&this.eventHandlers[t];return!!n&&n.has(r)}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=this.eventHandlers&&this.eventHandlers[t];n&&n.unregister(r)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.eventHandlers&&delete this.eventHandlers[t]}}),Object.defineProperty(e.prototype,"clearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.eventHandlers=void 0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(t){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=this.eventHandlers&&this.eventHandlers[t];o&&(r=o).emit.apply(r,Pc(n))}}),e}();function WB(e){for(var t=new Array(e.length),r=0;r<e.length;r++)t[r]=e[r];return t}function __(e,t){return e.indexOf(t)===0}function Afe(e){console.warn(new Error("[mobx-state-tree] "+e))}function Dfe(){return typeof process<"u"&&R2&&R2.ENABLE_TYPE_CHECK==="true"}function x_(e){typeof queueMicrotask=="function"?queueMicrotask(e):typeof setImmediate=="function"?setImmediate(e):setTimeout(e,1)}function io(e){return Mfe(e.name,e)}function Mfe(e,t){var r=function(){var i=MB(),o=DB();if(!o)throw rt("a mst flow must always have a parent context");var a=NB(o);if(!a)throw rt("a mst flow must always have a parent action context");var l={name:e,id:i,tree:o.tree,context:o.context,parentId:o.id,allParentIds:Pc(o.allParentIds,[o.id]),rootId:o.rootId,parentEvent:o,parentActionEvent:a},c=arguments;function d(f,p,m){return f.$mst_middleware=r.$mst_middleware,OP(Fi(Fi({},l),{type:p,args:[m]}),f)}return new Promise(function(f,p){var m,g=function(){m=t.apply(null,arguments),b(void 0)};g.$mst_middleware=r.$mst_middleware,OP(Fi(Fi({},l),{type:"flow_spawn",args:WB(c)}),g);function b(_){var S;try{var C=d(function(k){S=m.next(k)},"flow_resume",_);C instanceof Error&&(S=m.throw(C))}catch(k){x_(function(){d(function(E){p(k)},"flow_throw",k)});return}w(S)}function y(_){var S;try{d(function(C){S=m.throw(C)},"flow_resume_error",_)}catch(C){x_(function(){d(function(k){p(C)},"flow_throw",C)});return}w(S)}function w(_){if(_.done){x_(function(){d(function(S){f(S)},"flow_return",_.value)});return}if(!_.value||typeof _.value.then!="function")throw rt("Only promises can be yielded to `async`, got: "+_);return _.value.then(b,y)}})};return r._isFlowAction=!0,r}function Nfe(e){if(!("oldValue"in e))throw rt("Patches without `oldValue` field cannot be inversed");return[Ffe(e),Lfe(e)]}function Ffe(e){switch(e.op){case"add":return{op:"add",path:e.path,value:e.value};case"remove":return{op:"remove",path:e.path};case"replace":return{op:"replace",path:e.path,value:e.value}}}function Lfe(e){switch(e.op){case"add":return{op:"remove",path:e.path};case"remove":return{op:"add",path:e.path,value:e.oldValue};case"replace":return{op:"replace",path:e.path,value:e.oldValue}}}function Bfe(e){return typeof e=="number"}function Xu(e){return Bfe(e)===!0?""+e:e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Vfe(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function k2(e){if(e.length===0)return"";var t=function(r){return r.map(Xu).join("/")};return e[0]==="."||e[0]===".."?t(e):"/"+t(e)}function zfe(e){var t=e.split("/").map(Vfe),r=e===""||e==="."||e===".."||__(e,"/")||__(e,"./")||__(e,"../");if(!r)throw rt("a json path must be either rooted, empty or relative, but got '"+e+"'");return t[0]===""&&t.shift(),t}var P_=Symbol("$preProcessorFailed"),qfe=function(e){Wr(t,e);function t(r,n,i){var o=e.call(this,i||r.name)||this;return Object.defineProperty(o,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"_processors",{enumerable:!0,configurable:!0,writable:!0,value:n}),o}return Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|rr.SnapshotProcessor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"snapshotProcessor("+this._subtype.describe()+")"}}),Object.defineProperty(t.prototype,"preProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._processors.preProcessor?this._processors.preProcessor.call(null,r):r}}),Object.defineProperty(t.prototype,"preProcessSnapshotSafe",{enumerable:!1,configurable:!0,writable:!0,value:function(r){try{return this.preProcessSnapshot(r)}catch{return P_}}}),Object.defineProperty(t.prototype,"postProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return this._processors.postProcessor?this._processors.postProcessor.call(null,r,n.storedValue):r}}),Object.defineProperty(t.prototype,"_fixNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this;Ufe(r.type,this,"create"),r instanceof Ui&&(r.hasSnapshotPostProcessor=!!this._processors.postProcessor);var i=r.getSnapshot;r.getSnapshot=function(){return n.postProcessSnapshot(i.call(r),r)},che(this._subtype)||(r.getReconciliationType=function(){return n})}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=Xr(o)?o:this.preProcessSnapshot(o),l=this._subtype.instantiate(r,n,i,a);return this._fixNode(l),l}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=this._subtype.reconcile(r,Xr(n)?n:this.preProcessSnapshot(n),i,o);return a!==r&&this._fixNode(a),a}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){n===void 0&&(n=!0);var i=this._subtype.getSnapshot(r);return n?this.postProcessSnapshot(i,r):i}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this.preProcessSnapshotSafe(r);return i===P_?Qi(n,r,"Failed to preprocess value"):this._subtype.validate(i,n)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),Object.defineProperty(t.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=Xl(r)?this._subtype:Xr(r)?kB(r,!1):this.preProcessSnapshotSafe(r);return n===P_?!1:this._subtype.validate(n,[{path:"",type:this._subtype}]).length===0}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._subtype.isAssignableFrom(r)}}),Object.defineProperty(t.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(!(this._subtype instanceof yf))return!1;var i=this.preProcessSnapshot(n);return this._subtype.isMatchingSnapshotId(r,i)}}),t}(Vs);function Ufe(e,t){for(var r,n,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];try{for(var a=_p(i),l=a.next();!l.done;l=a.next()){var c=l.value;e[c]=t[c].bind(t)}}catch(d){r={error:d}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}function Hfe(e,t,r){return new qfe(e,t,r)}var j2="Map.put can only be used to store complex values that have an identifier type attribute";function KB(e,t){var r,n,i=e.getSubTypes();if(i===AB)return!1;if(i){var o=zB(i);try{for(var a=_p(o),l=a.next();!l.done;l=a.next()){var c=l.value;if(!KB(c,t))return!1}}catch(d){r={error:d}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}return e instanceof am&&t.push(e),!0}var Rl;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"})(Rl||(Rl={}));var Wfe=function(e){Wr(t,e);function t(r,n){return e.call(this,r,er.ref.enhancer,n)||this}return Object.defineProperty(t.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return e.prototype.get.call(this,""+r)}}),Object.defineProperty(t.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return e.prototype.has.call(this,""+r)}}),Object.defineProperty(t.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return e.prototype.delete.call(this,""+r)}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return e.prototype.set.call(this,""+r,n)}}),Object.defineProperty(t.prototype,"put",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(!r)throw rt("Map.put cannot be used to set empty values");if(Xr(r)){var n=_r(r);if(n.identifier===null)throw rt(j2);return this.set(n.identifier,r),r}else if(qB(r)){var i=_r(this),o=i.type;if(o.identifierMode!==Rl.YES)throw rt(j2);var a=o.mapIdentifierAttribute,l=r[a];if(!ZE(l)){var c=this.put(o.getChildType().create(r,i.environment));return this.put(kB(c))}var d=Xm(l);return this.set(d,r),this.get(d)}else throw rt("Map.put can only be used to store complex values")}}),t}(M0),Bb=function(e){Wr(t,e);function t(r,n,i){i===void 0&&(i=[]);var o=e.call(this,r)||this;return Object.defineProperty(o,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"identifierMode",{enumerable:!0,configurable:!0,writable:!0,value:Rl.UNKNOWN}),Object.defineProperty(o,"mapIdentifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"flags",{enumerable:!0,configurable:!0,writable:!0,value:rr.Map}),Object.defineProperty(o,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),o._determineIdentifierMode(),o.hookInitializers=i,o}return Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.hookInitializers.length>0?this.hookInitializers.concat(r):[r];return new t(this.name,this._subType,n)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return this._determineIdentifierMode(),JE(this,r,n,i,o)}}),Object.defineProperty(t.prototype,"_determineIdentifierMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.identifierMode===Rl.UNKNOWN){var r=[];if(KB(this._subType,r)){var n=r.reduce(function(i,o){if(!o.identifierAttribute)return i;if(i&&i!==o.identifierAttribute)throw rt("The objects in a map should all have the same identifier attribute, expected '"+i+"', but child of type '"+o.name+"' declared attribute '"+o.identifierAttribute+"' as identifier");return o.identifierAttribute},void 0);n?(this.identifierMode=Rl.YES,this.mapIdentifierAttribute=n):this.identifierMode=Rl.NO}}}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){n===void 0&&(n={});var i=r.type._subType,o={};return Object.keys(n).forEach(function(a){o[a]=i.instantiate(r,a,void 0,n[a])}),o}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return new Wfe(r,this.name)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){mL(n,r.unbox);var i=r.type;i.hookInitializers.forEach(function(o){var a=o(n);Object.keys(a).forEach(function(l){var c=a[l],d=im(n,l,c);Yu(n,l,d)})}),uE(n,this.willChange),A0(n,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return gL(r.storedValue)}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=r.storedValue.get(""+n);if(!i)throw rt("Not a child "+n);return i}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=_r(r.object),i=r.name;n.assertWritable({subpath:i});var o=n.type,a=o._subType;switch(r.type){case"update":{var l=r.newValue,c=r.object.get(i);if(l===c)return null;$s(a,l),r.newValue=a.reconcile(n.getChildNode(i),r.newValue,n,i),o.processIdentifier(i,r.newValue)}break;case"add":$s(a,r.newValue),r.newValue=a.instantiate(n,i,void 0,r.newValue),o.processIdentifier(i,r.newValue);break}return r}}),Object.defineProperty(t.prototype,"processIdentifier",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(this.identifierMode===Rl.YES&&n instanceof Ui){var i=n.identifier;if(i!==r)throw rt("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '"+i+"', but expected: '"+r+"'")}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n={};return r.getChildren().forEach(function(i){n[i.subpath]=i.snapshot}),n}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n={};return Object.keys(r).forEach(function(i){n[i]=r[i].getSnapshot()}),n}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=_r(r.object);switch(r.type){case"update":return void n.emitPatch({op:"replace",path:Xu(r.name),value:r.newValue.snapshot,oldValue:r.oldValue?r.oldValue.snapshot:void 0},n);case"add":return void n.emitPatch({op:"add",path:Xu(r.name),value:r.newValue.snapshot,oldValue:void 0},n);case"delete":var i=r.oldValue.snapshot;return r.oldValue.die(),void n.emitPatch({op:"remove",path:Xu(r.name),oldValue:i},n)}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){var o=r.storedValue;switch(i.op){case"add":case"replace":o.set(n,i.value);break;case"remove":o.delete(n);break}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){$s(this,n);var i=r.storedValue,o={};if(Array.from(i.keys()).forEach(function(l){o[l]=!1}),n)for(var a in n)i.set(a,n[a]),o[""+a]=!0;Object.keys(o).forEach(function(l){o[l]===!1&&i.delete(l)})}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this;return zd(r)?rw(Object.keys(r).map(function(o){return i._subType.validate(r[o],XE(n,o,i._subType))})):Qi(n,r,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return wf}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){r.storedValue.delete(n)}}),t}(yf);Bb.prototype.applySnapshot=Sr(Bb.prototype.applySnapshot);function Kfe(e){return new Bb("Map<string, "+e.name+">",e)}var Vb=function(e){Wr(t,e);function t(r,n,i){i===void 0&&(i=[]);var o=e.call(this,r)||this;return Object.defineProperty(o,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"flags",{enumerable:!0,configurable:!0,writable:!0,value:rr.Array}),Object.defineProperty(o,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),o.hookInitializers=i,o}return Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.hookInitializers.length>0?this.hookInitializers.concat(r):[r];return new t(this.name,this._subType,n)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return JE(this,r,n,i,o)}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){n===void 0&&(n=[]);var i=r.type._subType,o={};return n.forEach(function(a,l){var c=""+l;o[c]=i.instantiate(r,c,void 0,a)}),o}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=Fi(Fi({},nw),{name:this.name});return er.array(BB(r),n)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){ma(n).dehancer=r.unbox;var i=r.type;i.hookInitializers.forEach(function(o){var a=o(n);Object.keys(a).forEach(function(l){var c=a[l],d=im(n,l,c);Yu(n,l,d)})}),uE(n,this.willChange),A0(n,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue.slice()}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=Number(n);if(i<r.storedValue.length)return r.storedValue[i];throw rt("Not a child: "+n)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=_r(r.object);n.assertWritable({subpath:""+r.index});var i=n.type._subType,o=n.getChildren();switch(r.type){case"update":{if(r.newValue===r.object[r.index])return null;var a=$2(n,i,[o[r.index]],[r.newValue],[r.index]);if(!a)return null;r.newValue=a[0]}break;case"splice":{var l=r.index,c=r.removedCount,d=r.added,f=$2(n,i,o.slice(l,l+c),d,d.map(function(m,g){return l+g}));if(!f)return null;r.added=f;for(var p=l+c;p<o.length;p++)o[p].setParent(n,""+(p+d.length-c))}break}return r}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.getChildren().map(function(n){return n.snapshot})}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=[];return Object.keys(r).forEach(function(i){n.push(r[i].getSnapshot())}),n}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=_r(r.object);switch(r.type){case"update":return void n.emitPatch({op:"replace",path:""+r.index,value:r.newValue.snapshot,oldValue:r.oldValue?r.oldValue.snapshot:void 0},n);case"splice":for(var i=r.removedCount-1;i>=0;i--)n.emitPatch({op:"remove",path:""+(r.index+i),oldValue:r.removed[i].snapshot},n);for(var i=0;i<r.addedCount;i++)n.emitPatch({op:"add",path:""+(r.index+i),value:n.getChildNode(""+(r.index+i)).snapshot,oldValue:void 0},n);return}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){var o=r.storedValue,a=n==="-"?o.length:Number(n);switch(i.op){case"replace":o[a]=i.value;break;case"add":o.splice(a,0,i.value);break;case"remove":o.splice(a,1);break}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){$s(this,n);var i=r.storedValue;i.replace(n)}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this;return VB(r)?rw(r.map(function(o,a){return i._subType.validate(o,XE(n,""+a,i._subType))})):Qi(n,r,"Value is not an array")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return bf}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){r.storedValue.splice(Number(n),1)}}),t}(yf);Vb.prototype.applySnapshot=Sr(Vb.prototype.applySnapshot);function Gfe(e){return new Vb(e.name+"[]",e)}function $2(e,t,r,n,i){for(var o=!0,a=0;;a++){var l=a<=n.length-1,c=r[a],d=l?n[a]:void 0,f=""+i[a];if(xfe(d)&&(d=d.storedValue),!c&&!l)break;if(!l)o=!1,r.splice(a,1),c instanceof Ui&&c.createObservableInstanceIfNeeded(),c.die(),a--;else if(c)if(A2(c,d))r[a]=C_(t,e,f,d,c);else{for(var m=void 0,g=a;g<r.length;g++)if(A2(r[g],d)){m=r.splice(g,1)[0];break}o=!1;var p=C_(t,e,f,d,m);r.splice(a,0,p)}else{if(Xr(d)&&_r(d).parent===e)throw rt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+e.path+"/"+f+"', but it lives already at '"+_r(d).path+"'");o=!1;var p=C_(t,e,f,d);r.splice(a,0,p)}}return o?null:r}function C_(e,t,r,n,i){$s(e,n);function o(){if(Xr(n)){var l=_r(n);if(l.assertAlive(wf),l.parent!==null&&l.parent===t)return l.setParent(t,r),l}return i?e.reconcile(i,n,t,r):e.instantiate(t,r,void 0,n)}var a=o();return i&&i!==a&&(i instanceof Ui&&i.createObservableInstanceIfNeeded(),i.die()),a}function A2(e,t){if(!e.isAlive)return!1;if(Xr(t)){var r=_r(t);return r.isAlive&&r===e}if(e.snapshot===t)return!0;if(!(e instanceof Ui))return!1;var n=e.getReconciliationType();return e.identifier!==null&&e.identifierAttribute&&zd(t)&&n.is(t)&&n.isMatchingSnapshotId(e,t)}var D2="preProcessSnapshot",M2="postProcessSnapshot";function Qfe(){return _r(this).toString()}var N2={name:"AnonymousModel",properties:{},initializers:bf};function Yfe(e){var t=Object.keys(e),r=new Set;return t.forEach(function(n){if(r.has(n))throw rt(n+" is declared twice in the model. Model should not contain the same keys");r.add(n)}),t.reduce(function(n,i){if(i in jn)throw rt("Hook '"+i+"' was defined as property. Hooks should be defined as part of the actions");var o=Object.getOwnPropertyDescriptor(e,i);if("get"in o)throw rt("Getters are not supported as properties. Please use views instead");var a=o.value;if(a==null)throw rt("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(om(a))n[i]=Ju(nhe(a),a);else if(a instanceof Bb)n[i]=Ju(a,{});else if(a instanceof Vb)n[i]=Ju(a,[]);else if(!Xl(a))throw rt("Invalid type definition for property '"+i+"', cannot infer a type from a value like '"+a+"' ("+typeof a+")");return n},Fi({},e))}var am=function(e){Wr(t,e);function t(r){var n=e.call(this,r.name||N2.name)||this;return Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:rr.Object}),Object.defineProperty(n,"initializers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"properties",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"preProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"postProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"propertyNames",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"named",{enumerable:!0,configurable:!0,writable:!0,value:function(i){return n.cloneAndEnhance({name:i})}}),Object.defineProperty(n,"props",{enumerable:!0,configurable:!0,writable:!0,value:function(i){return n.cloneAndEnhance({properties:i})}}),Object.defineProperty(n,"preProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(i){var o=n.preProcessor;return o?n.cloneAndEnhance({preProcessor:function(a){return o(i(a))}}):n.cloneAndEnhance({preProcessor:i})}}),Object.defineProperty(n,"postProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(i){var o=n.postProcessor;return o?n.cloneAndEnhance({postProcessor:function(a){return i(o(a))}}):n.cloneAndEnhance({postProcessor:i})}}),Object.assign(n,N2,r),n.properties=Yfe(n.properties),n.properties,n.propertyNames=Object.keys(n.properties),n.identifierAttribute=n._getIdentifierAttribute(),n}return Object.defineProperty(t.prototype,"_getIdentifierAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=void 0;return this.forAllProps(function(n,i){if(i.flags&rr.Identifier){if(r)throw rt("Cannot define property '"+n+"' as object identifier, property '"+r+"' is already defined as identifier property");r=n}}),r}}),Object.defineProperty(t.prototype,"cloneAndEnhance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return new t({name:r.name||this.name,properties:Object.assign({},this.properties,r.properties),initializers:this.initializers.concat(r.initializers||[]),preProcessor:r.preProcessor||this.preProcessor,postProcessor:r.postProcessor||this.postProcessor})}}),Object.defineProperty(t.prototype,"actions",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=function(o){return n.instantiateActions(o,r(o)),o};return this.cloneAndEnhance({initializers:[i]})}}),Object.defineProperty(t.prototype,"instantiateActions",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(!zd(n))throw rt("actions initializer should return a plain object containing actions");Object.keys(n).forEach(function(i){if(i===D2)throw rt("Cannot define action '"+D2+"', it should be defined using 'type.preProcessSnapshot(fn)' instead");if(i===M2)throw rt("Cannot define action '"+M2+"', it should be defined using 'type.postProcessSnapshot(fn)' instead");var o=n[i],a=r[i];if(i in jn&&a){var l=o;o=function(){a.apply(null,arguments),l.apply(null,arguments)}}var c=o.$mst_middleware,d=o.bind(n);d._isFlowAction=o._isFlowAction||!1,d.$mst_middleware=c;var f=im(r,i,d);n[i]=f,Yu(r,i,f)})}}),Object.defineProperty(t.prototype,"volatile",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this;if(typeof r!="function")throw rt("You passed an "+typeof r+" to volatile state as an argument, when function is expected");var i=function(o){return n.instantiateVolatileState(o,r(o)),o};return this.cloneAndEnhance({initializers:[i]})}}),Object.defineProperty(t.prototype,"instantiateVolatileState",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(!zd(n))throw rt("volatile state initializer should return a plain object containing state");yL(r,n)}}),Object.defineProperty(t.prototype,"extend",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=function(o){var a=r(o),l=a.actions,c=a.views,d=a.state,f=ofe(a,["actions","views","state"]);for(var p in f)throw rt("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '"+p+"'");return d&&n.instantiateVolatileState(o,d),c&&n.instantiateViews(o,c),l&&n.instantiateActions(o,l),o};return this.cloneAndEnhance({initializers:[i]})}}),Object.defineProperty(t.prototype,"views",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=function(o){return n.instantiateViews(o,r(o)),o};return this.cloneAndEnhance({initializers:[i]})}}),Object.defineProperty(t.prototype,"instantiateViews",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(!zd(n))throw rt("views initializer should return a plain object containing views");Object.getOwnPropertyNames(n).forEach(function(i){var o,a=Object.getOwnPropertyDescriptor(n,i);if("get"in a)bL(r,i,a),D0(r,(o={},o[i]=dn,o));else if(typeof a.value=="function")Yu(r,i,a.value);else throw rt("A view member should either be a function or getter based property")})}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=Xr(o)?o:this.applySnapshotPreProcessor(o);return JE(this,r,n,i,a)}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){n===void 0&&(n={});var i=r.type,o={};return i.forAllProps(function(a,l){o[a]=l.instantiate(r,a,void 0,n[a])}),o}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=Fi(Fi({},nw),{name:this.name});return er.object(r,wf,n)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){Yu(n,"toString",Qfe),this.forAllProps(function(i){mL(n,i,r.unbox)}),this.initializers.reduce(function(i,o){return o(i)},n),uE(n,this.willChange),A0(n,this.didChange)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=r,i=_r(n.object),o=n.name;i.assertWritable({subpath:o});var a=i.type.properties[o];return a&&($s(a,n.newValue),n.newValue=a.reconcile(i.getChildNode(o),n.newValue,i,o)),n}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=r,i=_r(n.object),o=i.type.properties[n.name];if(o){var a=n.oldValue?n.oldValue.snapshot:void 0;i.emitPatch({op:"replace",path:Xu(n.name),value:n.newValue.snapshot,oldValue:a},i)}}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=[];return this.forAllProps(function(o){i.push(n.getChildNode(r,o))}),i}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i;if(!(n in this.properties))throw rt("Not a value property: "+n);var o=ma(r.storedValue,n),a=(i=o.raw)===null||i===void 0?void 0:i.call(o);if(!a)throw rt("Node not available for property "+n);return a}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this;n===void 0&&(n=!0);var o={};return this.forAllProps(function(a,l){try{var c=sc(r.storedValue,a);c.reportObserved()}catch{throw rt(a+" property is declared twice")}o[a]=i.getChildNode(r,a).snapshot}),n?this.applySnapshotPostProcessor(o):o}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n={};return Object.keys(r).forEach(function(i){n[i]=r[i].getSnapshot()}),this.applySnapshotPostProcessor(n)}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){if(!(i.op==="replace"||i.op==="add"))throw rt("object does not support operation "+i.op);r.storedValue[n]=i.value}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){$s(this,n);var i=this.applySnapshotPreProcessor(n);this.forAllProps(function(o){r.storedValue[o]=i[o]})}}),Object.defineProperty(t.prototype,"applySnapshotPreProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.preProcessor;return n?n.call(null,r):r}}),Object.defineProperty(t.prototype,"applySnapshotPostProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.postProcessor;return n?n.call(null,r):r}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.properties[r]}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this,o=this.applySnapshotPreProcessor(r);return zd(o)?rw(this.propertyNames.map(function(a){return i.properties[a].validate(o[a],XE(n,a,i.properties[a]))})):Qi(n,o,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"forAllProps",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this;this.propertyNames.forEach(function(i){return r(i,n.properties[i])})}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;return"{ "+this.propertyNames.map(function(n){return n+": "+r.properties[n].describe()}).join("; ")+" }"}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return wf}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){r.storedValue[n]=void 0}}),t}(yf);am.prototype.applySnapshot=Sr(am.prototype.applySnapshot);function Xfe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=typeof e[0]=="string"?e.shift():"AnonymousModel",n=e.shift()||{};return new am({name:r,properties:n})}function Jfe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=typeof e[0]=="string",n=r?e[0]:"AnonymousModel";return r&&e.shift(),e.reduce(function(i,o){return i.cloneAndEnhance({name:i.name+"_"+o.name,properties:o.properties,initializers:o.initializers,preProcessor:function(a){return o.applySnapshotPreProcessor(i.applySnapshotPreProcessor(a))},postProcessor:function(a){return o.applySnapshotPostProcessor(i.applySnapshotPostProcessor(a))}})}).named(n)}function Zfe(e){return Xl(e)&&(e.flags&rr.Object)>0}var Gs=function(e){Wr(t,e);function t(r,n,i,o){o===void 0&&(o=Tfe);var a=e.call(this,r)||this;return Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"checker",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(a,"initializer",{enumerable:!0,configurable:!0,writable:!0,value:o}),a.flags=n,a}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return su(this,r,n,i,o)}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.initializer(r)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(om(r)&&this.checker(r))return Hi();var i=this.name==="Date"?"Date or a unix milliseconds timestamp":this.name;return Qi(n,r,"Value is not a "+i)}}),t}(Cc),GB=new Gs("string",rr.String,function(e){return typeof e=="string"}),QB=new Gs("number",rr.Number,function(e){return typeof e=="number"}),ehe=new Gs("integer",rr.Integer,function(e){return Ofe(e)}),the=new Gs("float",rr.Float,function(e){return Rfe(e)}),rhe=new Gs("finite",rr.Finite,function(e){return Ife(e)}),YB=new Gs("boolean",rr.Boolean,function(e){return typeof e=="boolean"}),XB=new Gs("null",rr.Null,function(e){return e===null}),JB=new Gs("undefined",rr.Undefined,function(e){return e===void 0}),ZB=new Gs("Date",rr.Date,function(e){return typeof e=="number"||e instanceof Date},function(e){return e instanceof Date?e:new Date(e)});ZB.getSnapshot=function(e){return e.storedValue.getTime()};var eV=ZB;function nhe(e){switch(typeof e){case"string":return GB;case"number":return QB;case"boolean":return YB;case"object":if(e instanceof Date)return eV}throw rt("Cannot determine primitive type from value "+e)}function ihe(e){return Xl(e)&&(e.flags&(rr.String|rr.Number|rr.Integer|rr.Boolean|rr.Date))>0}var ohe=function(e){Wr(t,e);function t(r){var n=e.call(this,JSON.stringify(r))||this;return Object.defineProperty(n,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:rr.Literal}),n.value=r,n}return Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return su(this,r,n,i,o)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return JSON.stringify(this.value)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return om(r)&&r===this.value?Hi():Qi(n,r,"Value is not a literal "+JSON.stringify(this.value))}}),t}(Cc);function tV(e){return new ohe(e)}var ahe=function(e){Wr(t,e);function t(r,n,i,o){var a=e.call(this,r)||this;return Object.defineProperty(a,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"_predicate",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(a,"_message",{enumerable:!0,configurable:!0,writable:!0,value:o}),a}return Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|rr.Refinement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return this._subtype.instantiate(r,n,i,o)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._subtype.isAssignableFrom(r)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this._subtype.validate(r,n);if(i.length>0)return i;var o=Xr(r)?_r(r).snapshot:r;return this._predicate(o)?Hi():Qi(n,r,this._message(r))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return this._subtype.reconcile(r,n,i,o)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(Vs);function she(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=typeof e[0]=="string"?e.shift():Xl(e[0])?e[0].name:null,n=e[0],i=e[1],o=e[2]?e[2]:function(a){return"Value does not respect the refinement predicate"};return new ahe(r,n,i,o)}function lhe(e,t){var r=typeof e=="string"?t:e,n=iw.apply(void 0,Pc(r.map(function(i){return tV(""+i)})));return typeof e=="string"&&(n.name=e),n}var uhe=function(e){Wr(t,e);function t(r,n,i){var o=e.call(this,r)||this;return Object.defineProperty(o,"_types",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"_dispatcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"_eager",{enumerable:!0,configurable:!0,writable:!0,value:!0}),i=Fi({eager:!0,dispatcher:void 0},i),o._dispatcher=i.dispatcher,i.eager||(o._eager=!1),o}return Object.defineProperty(t.prototype,"flags",{get:function(){var r=rr.Union;return this._types.forEach(function(n){r|=n.flags}),r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._types.some(function(n){return n.isAssignableFrom(r)})}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"("+this._types.map(function(r){return r.describe()}).join(" | ")+")"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=this.determineType(o,void 0);if(!a)throw rt("No matching type for union "+this.describe());return a.instantiate(r,n,i,o)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=this.determineType(n,r.getReconciliationType());if(!a)throw rt("No matching type for union "+this.describe());return a.reconcile(r,n,i,o)}}),Object.defineProperty(t.prototype,"determineType",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return this._dispatcher?this._dispatcher(r):n?n.is(r)?n:this._types.filter(function(i){return i!==n}).find(function(i){return i.is(r)}):this._types.find(function(i){return i.is(r)})}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(this._dispatcher)return this._dispatcher(r).validate(r,n);for(var i=[],o=0,a=0;a<this._types.length;a++){var l=this._types[a],c=l.validate(r,n);if(c.length===0){if(this._eager)return Hi();o++}else i.push(c)}return o===1?Hi():Qi(n,r,"No type is applicable for the union").concat(rw(i))}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),t}(Vs);function iw(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=Xl(e)?void 0:e,i=Xl(e)?Pc([e],t):t,o="("+i.map(function(a){return a.name}).join(" | ")+")";return new uhe(o,i,n)}function che(e){return(e.flags&rr.Union)>0}var dhe=function(e){Wr(t,e);function t(r,n,i){var o=e.call(this,r.name)||this;return Object.defineProperty(o,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"_defaultValue",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"optionalValues",{enumerable:!0,configurable:!0,writable:!0,value:i}),o}return Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|rr.Optional},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype.describe()+"?"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){if(this.optionalValues.indexOf(o)>=0){var a=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(r,n,i,a)}return this._subtype.instantiate(r,n,i,o)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return this._subtype.reconcile(r,this.optionalValues.indexOf(n)<0&&this._subtype.is(n)?n:this.getDefaultInstanceOrSnapshot(),i,o)}}),Object.defineProperty(t.prototype,"getDefaultInstanceOrSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=typeof this._defaultValue=="function"?this._defaultValue():this._defaultValue;return typeof this._defaultValue=="function"&&$s(this,r),r}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return this.optionalValues.indexOf(r)>=0?Hi():this._subtype.validate(r,n)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._subtype.isAssignableFrom(r)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(Vs);function fhe(e,t){if(typeof t!="function"&&Xr(t))throw rt("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead")}function Ju(e,t,r){return fhe(e,t),new dhe(e,t,r||hhe)}var hhe=[void 0],phe=Ju(JB,void 0),mhe=Ju(XB,null);function rV(e){return iw(e,phe)}function vhe(e){return iw(e,mhe)}var ghe=function(e){Wr(t,e);function t(r,n){var i=e.call(this,r)||this;return Object.defineProperty(i,"_definition",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),i}return Object.defineProperty(t.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|rr.Late},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSubType",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(!this._subType){var n=void 0;try{n=this._definition()}catch(i){if(i instanceof ReferenceError)n=void 0;else throw i}if(r&&n===void 0)throw rt("Late type seems to be used too early, the definition (still) returns undefined");n&&(this._subType=n)}return this._subType}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return this.getSubType(!0).instantiate(r,n,i,o)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return this.getSubType(!0).reconcile(r,n,i,o)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this.getSubType(!1);return r?r.name:"<uknown late type>"}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this.getSubType(!1);return i?i.validate(r,n):Hi()}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.getSubType(!1);return n?n.isAssignableFrom(r):!1}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this.getSubType(!1);return r||AB}}),t}(Vs);function yhe(e,t){var r=typeof e=="string"?e:"late("+e.toString()+")",n=typeof e=="string"?t:e;return new ghe(r,n)}function bhe(e,t){return new whe(e,t)}var whe=function(e){Wr(t,e);function t(r,n){var i=e.call(this,r)||this;return Object.defineProperty(i,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:rr.Lazy}),Object.defineProperty(i,"loadedType",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(i,"pendingNodeList",{enumerable:!0,configurable:!0,writable:!0,value:er.array()}),Bj(function(){return i.pendingNodeList.length>0&&i.pendingNodeList.some(function(o){return o.isAlive&&i.options.shouldLoadPredicate(o.parent?o.parent.value:null)})},function(){i.options.loadType().then(Sr(function(o){i.loadedType=o,i.pendingNodeList.forEach(function(a){a.parent&&i.loadedType&&a.parent.applyPatches([{op:"replace",path:"/"+a.subpath,value:a.snapshot}])})}))}),i}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<lazy "+this.name+">"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=this;if(this.loadedType)return this.loadedType.instantiate(r,n,i,o);var l=su(this,r,n,i,o);return this.pendingNodeList.push(l),Bj(function(){return!l.isAlive},function(){return a.pendingNodeList.splice(a.pendingNodeList.indexOf(l),1)}),l}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return this.loadedType?this.loadedType.validate(r,n):UB(r)?Hi():Qi(n,r,"Value is not serializable and cannot be lazy")}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return this.loadedType?(r.die(),this.loadedType.instantiate(i,o,i.environment,n)):e.prototype.reconcile.call(this,r,n,i,o)}}),t}(Cc),nV=function(e){Wr(t,e);function t(r){var n=e.call(this,r?"frozen("+r.name+")":"frozen")||this;return Object.defineProperty(n,"subType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:rr.Frozen}),n}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<any immutable value>"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return su(this,r,n,i,o)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return UB(r)?this.subType?this.subType.validate(r,n):Hi():Qi(n,r,"Value is not serializable and cannot be frozen")}}),t}(Cc),F2=new nV;function She(e){return arguments.length===0?F2:Xl(e)?new nV(e):Ju(F2,e)}function _he(e){switch(e){case jn.beforeDestroy:return"destroy";case jn.beforeDetach:return"detach";default:return}}var xhe=function(){function e(t,r){if(Object.defineProperty(this,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"node",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolvedReference",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),ZE(t))this.identifier=t;else if(Xr(t)){var n=_r(t);if(!n.identifierAttribute)throw rt("Can only store references with a defined identifier attribute.");var i=n.unnormalizedIdentifier;if(i==null)throw rt("Can only store references to tree nodes with a defined identifier.");this.identifier=i}else throw rt("Can only store references to tree nodes or identifiers, got: '"+t+"'")}return Object.defineProperty(e.prototype,"updateResolvedReference",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=Xm(this.identifier),n=t.root,i=n.identifierCache.getLastCacheModificationPerId(r);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==i){var o=this.targetType,a=n.identifierCache.resolve(o,r);if(!a)throw new iV("[mobx-state-tree] Failed to resolve reference '"+this.identifier+"' to type '"+this.targetType.name+"' (from node: "+t.path+")");this.resolvedReference={node:a,lastCacheModification:i}}}}),Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),iV=function(e){Wr(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return t}(Error),oV=function(e){Wr(t,e);function t(r,n){var i=e.call(this,"reference("+r.name+")")||this;return Object.defineProperty(i,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"onInvalidated",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:rr.Reference}),i}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.targetType.isAssignableFrom(r)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return ZE(r)?Hi():Qi(n,r,"Value is not a valid identifier, which is a string or a number")}}),Object.defineProperty(t.prototype,"fireInvalidated",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=n.parent;if(!(!a||!a.isAlive)){var l=a.storedValue;l&&this.onInvalidated({cause:r,parent:l,invalidTarget:o?o.storedValue:void 0,invalidId:i,replaceRef:function(c){I2(n.root.storedValue,{op:"replace",value:c,path:n.path})},removeRef:function(){Zfe(a.type)?this.replaceRef(void 0):I2(n.root.storedValue,{op:"remove",path:n.path})}})}}}),Object.defineProperty(t.prototype,"addTargetNodeWatcher",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this,o=this.getValue(r);if(o){var a=_r(o),l=function(f,p){var m=_he(p);m&&i.fireInvalidated(m,r,n,a)},c=a.registerHook(jn.beforeDetach,l),d=a.registerHook(jn.beforeDestroy,l);return function(){c(),d()}}}}),Object.defineProperty(t.prototype,"watchTargetNodeForInvalidations",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){var o=this;if(this.onInvalidated){var a;r.registerHook(jn.beforeDestroy,function(){a&&a()});var l=function(c){a&&a();var d=r.parent,f=d&&d.storedValue;if(d&&d.isAlive&&f){var p=void 0;i?p=!!i.get(n,f):p=r.root.identifierCache.has(o.targetType,Xm(n)),p?a=o.addTargetNodeWatcher(r,n):c||o.fireInvalidated("invalidSnapshotReference",r,n,null)}};r.state===Xn.FINALIZED?l(!0):(r.isRoot||r.root.registerHook(jn.afterCreationFinalization,function(){r.parent&&r.parent.createObservableInstanceIfNeeded()}),r.registerHook(jn.afterAttach,function(){l(!1)}))}}}),t}(Cc),Phe=function(e){Wr(t,e);function t(r,n){return e.call(this,r,n)||this}return Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(r.isAlive){var n=r.storedValue;return n.resolvedValue}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=r.storedValue;return n.identifier}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=Xr(o)?lfe(o):o,l=new xhe(o,this.targetType),c=su(this,r,n,i,l);return l.node=c,this.watchTargetNodeForInvalidations(c,a,void 0),c}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){if(!r.isDetaching&&r.type===this){var a=Xr(n),l=r.storedValue;if(!a&&l.identifier===n||a&&l.resolvedValue===n)return r.setParent(i,o),r}var c=this.instantiate(i,o,void 0,n);return r.die(),c}}),t}(oV),Che=function(e){Wr(t,e);function t(r,n,i){var o=e.call(this,r,i)||this;return Object.defineProperty(o,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),o}return Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(r.isAlive){var n=this.options.get(r.storedValue,r.parent?r.parent.storedValue:null);return n}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=Xr(o)?this.options.set(o,r?r.storedValue:null):o,l=su(this,r,n,i,a);return this.watchTargetNodeForInvalidations(l,a,this.options),l}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=Xr(n)?this.options.set(n,r?r.storedValue:null):n;if(!r.isDetaching&&r.type===this&&r.storedValue===a)return r.setParent(i,o),r;var l=this.instantiate(i,o,void 0,a);return r.die(),l}}),t}(oV);function aV(e,t){var r=t||void 0,n=t?t.onInvalidated:void 0;return r&&(r.get||r.set)?new Che(e,{get:r.get,set:r.set},n):new Phe(e,n)}function Ehe(e,t){var r=aV(e,Fi(Fi({},t),{onInvalidated:function(n){t&&t.onInvalidated&&t.onInvalidated(n),n.removeRef()}}));return t&&t.acceptsUndefined===!1?r:rV(r)}var sV=function(e){Wr(t,e);function t(r,n){var i=e.call(this,r)||this;return Object.defineProperty(i,"validType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:rr.Identifier}),i}return Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){if(!r||!(r.type instanceof am))throw rt("Identifier types can only be instantiated as direct child of a model type");return su(this,r,n,i,o)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){if(r.storedValue!==n)throw rt("Tried to change identifier from '"+r.storedValue+"' to '"+n+"'. Changing identifiers is not allowed.");return r.setParent(i,o),r}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return typeof r!==this.validType?Qi(n,r,"Value is not a valid "+this.describe()+", expected a "+this.validType):Hi()}}),t}(Cc),The=function(e){Wr(t,e);function t(){var r=e.call(this,"identifier","string")||this;return Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:rr.Identifier}),r}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),t}(sV),Ohe=function(e){Wr(t,e);function t(){return e.call(this,"identifierNumber","number")||this}return Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifierNumber"}}),t}(sV),Rhe=new The,Ihe=new Ohe;function Xm(e){return""+e}function ZE(e){return typeof e=="string"||typeof e=="number"}function khe(e){return new jhe(e)}var jhe=function(e){Wr(t,e);function t(r){var n=e.call(this,r.name)||this;return Object.defineProperty(n,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:rr.Custom}),n}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(this.options.isTargetType(r))return Hi();var i=this.options.getValidationMessage(r);return i?Qi(n,r,"Invalid value for type '"+this.name+"': "+i):Hi()}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.options.toSnapshot(r.storedValue)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=this.options.isTargetType(o)?o:this.options.fromSnapshot(o,r&&r.root.environment);return su(this,r,n,i,a)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=!this.options.isTargetType(n);if(!r.isDetaching){var l=r.type===this&&(a?n===r.snapshot:n===r.storedValue);if(l)return r.setParent(i,o),r}var c=a?this.options.fromSnapshot(n,i.root.environment):n,d=this.instantiate(i,o,void 0,c);return r.die(),d}}),t}(Cc),be={enumeration:lhe,model:Xfe,compose:Jfe,custom:khe,reference:aV,safeReference:Ehe,union:iw,optional:Ju,literal:tV,maybe:rV,maybeNull:vhe,refinement:she,string:GB,boolean:YB,number:QB,integer:ehe,float:the,finite:rhe,Date:eV,map:Kfe,array:Gfe,frozen:She,identifier:Rhe,identifierNumber:Ihe,late:yhe,lazy:bhe,undefined:JB,null:XB,snapshotProcessor:Hfe};const Ec=(e,t)=>be.model(e,{totalCount:0,hasNextPage:!1,countLoaded:0,edges:be.array(be.model({cursor:be.string,node:be.reference(t)}))}).views(r=>({get startCursor(){var n;return((n=r.edges[0])==null?void 0:n.cursor)||null},get endCursor(){var n;return((n=r.edges[r.edges.length-1])==null?void 0:n.cursor)||null},get availableNextPage(){return r.hasNextPage||r.countLoaded===0}})).actions(r=>({reset(){r.totalCount=0,r.countLoaded=0,r.hasNextPage=!1,r.edges=[]},onLoad(n){r.countLoaded+=1,r.totalCount=n.totalCount,r.hasNextPage=n.hasNextPage,r.edges.push(...n.edges)},removeEdge(n){const i=r.edges.find(o=>o.cursor===n);i&&(r.totalCount-=1,r.edges.remove(i))},replaceNode(n,i){const o=r.edges.find(a=>a.cursor===n);o&&(o.node=i)}})),$he=Ec("OrganizationProjectsConnection",be.late(()=>sm)),eT=be.model("OrganizationModel",{id:be.identifier,projectsConnection:be.optional($he,{})}),Ahe=Ec("ProjectBranchesConnection",be.late(()=>lm)),sm=be.model("ProjectModel",{id:be.identifier,organization:be.reference(be.late(()=>eT)),name:be.string,isPublic:be.boolean,createdAt:be.late(()=>Jl),rootBranch:be.reference(be.late(()=>lm)),branchesConnection:be.optional(Ahe,{})}),lm=be.model("BranchModel",{id:be.identifier,name:be.string,createdAt:be.late(()=>Jl),touched:be.boolean,start:be.reference(be.late(()=>Zu)),head:be.reference(be.late(()=>Zu)),draft:be.reference(be.late(()=>Zu)),parentBranch:be.maybe(be.model({branchName:be.string,fromRevisionId:be.string}))}).actions(e=>({updateTouched(t){e.touched=t}})),Dhe=Ec("RevisionTablesConnection",be.late(()=>um)),Zu=be.model("RevisionModel",{id:be.identifier,createdAt:be.late(()=>Jl),comment:"",parent:be.maybe(be.reference(be.late(()=>Zu))),isThereParent:be.optional(be.boolean,!1),child:be.maybe(be.reference(be.late(()=>Zu))),isThereChild:be.optional(be.boolean,!1),childBranches:be.array(be.model({branchName:be.string,revisionStartId:be.string})),endpoints:be.array(be.reference(be.late(()=>lV))),tablesConnection:be.optional(Dhe,{})}).actions(e=>({addEndpoint(t){e.endpoints.push(t)},removeEndpoint(t){const r=e.endpoints.find(n=>n.id===t);r&&e.endpoints.remove(r)},update(t){t.comment&&(e.comment=t.comment),t.parent&&(e.parent=t.parent),t.child&&(e.child=t.child),t.childBranches&&(e.childBranches=t.childBranches),t.endpoints&&(e.endpoints=[],e.endpoints.push(...t.endpoints))}})).views(e=>({getParentsDetails(t){const r=[];if(!e.isThereParent)return{isAllLoaded:!0,loadedSequence:r};let n=Og(()=>e.parent);if(!n)return{isAllLoaded:!1,loadedSequence:r};r.push(n);for(let i=1;i<t;i++){if(!n.isThereParent)return{isAllLoaded:!0,loadedSequence:r};if(n=Og(()=>n.parent),!n)return{isAllLoaded:!1,loadedSequence:r};r.push(n)}return{isAllLoaded:!0,loadedSequence:r}},getChildrenDetails(t){const r=[];if(!e.isThereChild)return{isAllLoaded:!0,loadedSequence:r};let n=Og(()=>e.child);if(!n)return{isAllLoaded:!1,loadedSequence:r};r.push(n);for(let i=1;i<t;i++){if(!n.isThereChild)return{isAllLoaded:!0,loadedSequence:r};if(n=Og(()=>n.child),!n)return{isAllLoaded:!1,loadedSequence:r};r.push(n)}return{isAllLoaded:!0,loadedSequence:r}}})),lV=be.model("EndpointModel",{id:be.identifier,createdAt:be.late(()=>Jl),type:be.enumeration("EndpointType",["GRAPHQL","REST_API"])}),Mhe=Ec("TableRowsConnection",be.late(()=>cm)),Nhe=Ec("foreignKeysByConnection",be.late(()=>um)),um=be.model("TableModel",{createdId:be.string,id:be.string,versionId:be.identifier,count:be.integer,readonly:be.boolean,createdAt:be.late(()=>Jl),updatedAt:be.late(()=>Jl),schema:be.frozen({}),rowsConnection:be.optional(Mhe,{}),foreignKeysByConnection:be.optional(Nhe,{})}).actions(e=>({update(t){for(const[r,n]of Object.entries(t))e[r]=n}})),L2=Ec("RowForeignKeysByConnection",be.late(()=>cm)),cm=be.model("RowModel",{createdId:be.string,id:be.string,versionId:be.identifier,createdAt:be.late(()=>Jl),updatedAt:be.late(()=>Jl),readonly:be.boolean,data:be.frozen({}),rowForeignKeysByConnection:be.map(be.optional(L2,{}))}).actions(e=>({update(t){for(const[r,n]of Object.entries(t))e[r]=n},getOrCreateRowForeignKeysByConnection(t){return e.rowForeignKeysByConnection.has(t)||e.rowForeignKeysByConnection.set(t,L2.create()),e.rowForeignKeysByConnection.get(t)}})),Jl=be.custom({name:"ISODate",fromSnapshot(e){return new Date(e)},toSnapshot(e){return e.toISOString()},isTargetType(e){return e instanceof Date},getValidationMessage(e){return typeof e=="string"&&!isNaN(Date.parse(e))?"":`'${e}' is not a valid ISO date string`}});be.frozen();let nn=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");be.model({startCursor:be.maybeNull(be.string),endCursor:be.maybeNull(be.string),hasNextPage:!1,hasPreviousPage:!1});const E_=be.model("RowForeignKeysByModel",{id:be.identifier,countForeignKeysBy:be.optional(be.integer,0)}).actions(e=>({update(t){for(const[r,n]of Object.entries(t))e[r]=n}})),$a=e=>JSON.stringify(e),Fhe=Ec("MeProjectsConnection",be.late(()=>sm)),uV=be.model({id:be.identifier,meProjectsConnection:be.optional(Fhe,{}),organization:be.map(be.late(()=>eT)),project:be.map(be.late(()=>sm)),projectByVariables:be.map(be.reference(be.late(()=>sm))),branch:be.map(be.late(()=>lm)),branchByVariables:be.map(be.reference(be.late(()=>lm))),revision:be.map(be.late(()=>Zu)),endpoint:be.map(be.late(()=>lV)),table:be.map(be.late(()=>um)),tableByVariables:be.map(be.reference(be.late(()=>um))),row:be.map(be.late(()=>cm)),rowByVariables:be.map(be.reference(be.late(()=>cm))),rowForeignKeysBy:be.map(be.late(()=>E_)),rowForeignKeysByByVariables:be.map(be.reference(be.late(()=>E_)))}).views(e=>({getOrganization(t){return dn(()=>e.organization.get(t)).get()},getProject(t){return dn(()=>e.project.get(t)).get()},getProjectByVariables({organizationId:t,projectName:r}){return dn(()=>e.projectByVariables.get($a({organizationId:t,projectName:r}))).get()},getBranch(t){return dn(()=>e.branch.get(t)).get()},getBranchByVariables({organizationId:t,projectName:r,branchName:n}){return dn(()=>e.branchByVariables.get($a({organizationId:t,projectName:r,branchName:n}))).get()},getRevision(t){return dn(()=>e.revision.get(t)).get()},getEndpoint(t){return dn(()=>e.endpoint.get(t)).get()},getTable(t){return dn(()=>e.table.get(t)).get()},getTableByVariables({revisionId:t,tableId:r}){return dn(()=>e.tableByVariables.get($a({revisionId:t,tableId:r}))).get()},getRow(t){return dn(()=>e.row.get(t)).get()},getRowByVariables({revisionId:t,tableId:r,rowId:n}){return dn(()=>e.rowByVariables.get($a({revisionId:t,tableId:r,rowId:n}))).get()},getRowForeignKeysByVariables({revisionId:t,tableId:r,rowId:n}){return dn(()=>e.rowForeignKeysByByVariables.get($a({revisionId:t,tableId:r,rowId:n}))).get()}})).actions(e=>({addOrganization(t){const r=e.organization.get(t.id);return r||e.organization.put(t)},addProject(t){const r=e.project.get(t.id);return r||e.project.put(t)},addProjectByVariables({organizationId:t,projectName:r},n){e.projectByVariables.set($a({organizationId:t,projectName:r}),n)},addOrUpdateBranch(t){const r=e.branch.get(t.id);return r?(r.touched=t.touched,r.start=t.start,r.head=t.head,r.draft=t.draft,r):e.branch.put(t)},addBranchByVariables({organizationId:t,projectName:r,branchName:n},i){e.branchByVariables.set($a({organizationId:t,projectName:r,branchName:n}),i)},addOrUpdateRevision(t){const r=e.revision.get(t.id);return r?(r.update(t),r):e.revision.put(t)},addEndpoint(t){const r=e.endpoint.get(t.id);return r||e.endpoint.put(t)},addOrTable(t){const r=e.table.get(t.versionId);return r?(r.readonly=t.readonly,r.createdAt=t.createdAt,r.id=t.id,t.count&&(r.count=t.count),t.schema&&(r.schema=t.schema),r):e.table.put(t)},addTableByVariables({revisionId:t,tableId:r},n){e.tableByVariables.set($a({revisionId:t,tableId:r}),n)},addRow(t){const r=e.row.get(t.versionId);return r?(r.update(t),r):e.row.put(t)},addRowByVariables({revisionId:t,tableId:r,rowId:n},i){e.rowByVariables.set($a({revisionId:t,tableId:r,rowId:n}),i)},createRowForeignKeysByByVariables({revisionId:t,tableId:r,rowId:n}){const i=E_.create({id:nn(),countForeignKeysBy:0});return e.rowForeignKeysBy.put(i),e.rowForeignKeysByByVariables.set($a({revisionId:t,tableId:r,rowId:n}),i.id),i}})),cV=e=>({id:e.id,createdAt:e.createdAt,type:e.type}),Lhe=e=>{var t,r,n,i;return{id:e.id,createdAt:e.createdAt,comment:e.comment,parent:(t=e.parent)==null?void 0:t.id,isThereParent:!!((r=e.parent)!=null&&r.id),child:(n=e.child)==null?void 0:n.id,isThereChild:!!((i=e.child)!=null&&i.id),childBranches:e.childBranches.map(o=>({branchName:o.branch.name,revisionStartId:o.revision.id})),endpoints:e.endpoints.map(o=>o.id)}},Pp=(e,t)=>(t.endpoints.map(r=>e.addEndpoint(cV(r))),e.addOrUpdateRevision(Lhe(t))),Bhe=(e,t)=>({id:e.id,name:e.name,touched:e.touched,createdAt:e.createdAt,start:e.start.id,head:e.head.id,draft:e.draft.id,parentBranch:t}),Jm=(e,t)=>{Pp(e,t.start),Pp(e,t.head),Pp(e,{...t.draft,childBranches:[]});const r=t.parent,n=r?{branchName:r.branch.name,fromRevisionId:r.revision.id}:void 0,i=Bhe(t,n);return e.addOrUpdateBranch(i)},dV=e=>({id:e.id,organization:e.organizationId,name:e.name,createdAt:e.createdAt,isPublic:e.isPublic,rootBranch:e.rootBranch.id}),fV=(e,t)=>(e.addOrganization({id:t.organizationId}),Jm(e,t.rootBranch),e.addProject(dV(t))),hV=e=>({startCursor:e.endCursor||null,endCursor:e.endCursor||null,hasPreviousPage:e.hasPreviousPage,hasNextPage:e.hasNextPage}),pV=e=>({totalCount:e.totalCount,pageInfo:hV(e.pageInfo),edges:e.edges.map(({cursor:t,node:r})=>({cursor:t,node:r.id}))}),ow=e=>({totalCount:e.totalCount,pageInfo:hV(e.pageInfo),edges:e.edges.map(({cursor:t,node:r})=>({cursor:t,node:r.versionId}))}),Vhe=dt.get(es);function zhe(e){return function*(r){const n=yield Vhe.client.meProjectsMst({data:r}),i=pV(n.meProjects);n.meProjects.edges.forEach(({node:o})=>{e.cache.addProjectByVariables({organizationId:o.organizationId,projectName:o.name},o.id),fV(e.cache,o)}),r.after||e.cache.meProjectsConnection.reset(),e.cache.meProjectsConnection.onLoad({edges:i.edges,hasNextPage:i.pageInfo.hasNextPage,totalCount:i.totalCount})}}const Zm=Ne`
|
1007
|
-
fragment EndpointMst on EndpointModel {
|
1008
|
-
id
|
1009
|
-
type
|
1010
|
-
createdAt
|
1011
|
-
}
|
1012
|
-
`,aw=Ne`
|
1013
|
-
fragment RevisionMst on RevisionModel {
|
1014
|
-
id
|
1015
|
-
createdAt
|
1016
|
-
comment
|
1017
|
-
parent {
|
1018
|
-
id
|
1019
|
-
}
|
1020
|
-
child {
|
1021
|
-
id
|
1022
|
-
}
|
1023
|
-
childBranches {
|
1024
|
-
branch {
|
1025
|
-
id
|
1026
|
-
name
|
1027
|
-
}
|
1028
|
-
revision {
|
1029
|
-
id
|
1030
|
-
}
|
1031
|
-
}
|
1032
|
-
endpoints {
|
1033
|
-
...EndpointMst
|
1034
|
-
}
|
1035
|
-
}
|
1036
|
-
${Zm}
|
1037
|
-
`,qhe=Ne`
|
1038
|
-
fragment RevisionStartMst on RevisionModel {
|
1039
|
-
id
|
1040
|
-
createdAt
|
1041
|
-
comment
|
1042
|
-
child {
|
1043
|
-
id
|
1044
|
-
}
|
1045
|
-
childBranches {
|
1046
|
-
branch {
|
1047
|
-
id
|
1048
|
-
name
|
1049
|
-
}
|
1050
|
-
revision {
|
1051
|
-
id
|
1052
|
-
}
|
1053
|
-
}
|
1054
|
-
endpoints {
|
1055
|
-
...EndpointMst
|
1056
|
-
}
|
1057
|
-
}
|
1058
|
-
${Zm}
|
1059
|
-
`,Uhe=Ne`
|
1060
|
-
fragment RevisionDraftMst on RevisionModel {
|
1061
|
-
id
|
1062
|
-
createdAt
|
1063
|
-
comment
|
1064
|
-
parent {
|
1065
|
-
id
|
1066
|
-
}
|
1067
|
-
endpoints {
|
1068
|
-
...EndpointMst
|
1069
|
-
}
|
1070
|
-
}
|
1071
|
-
${Zm}
|
1072
|
-
`,Nf=Ne`
|
1073
|
-
fragment PageInfoMst on PageInfo {
|
1074
|
-
startCursor
|
1075
|
-
endCursor
|
1076
|
-
hasPreviousPage
|
1077
|
-
hasNextPage
|
1078
|
-
}
|
1079
|
-
`,Hhe=Ne`
|
1080
|
-
fragment BranchRevisionMst on RevisionModel {
|
1081
|
-
...RevisionMst
|
1082
|
-
endpoints {
|
1083
|
-
...EndpointMst
|
1084
|
-
}
|
1085
|
-
}
|
1086
|
-
${aw}
|
1087
|
-
${Zm}
|
1088
|
-
`,Whe=Ne`
|
1089
|
-
query RevisionsMst($branch: GetBranchInput!, $revisions: GetBranchRevisionsInput!) {
|
1090
|
-
branch(data: $branch) {
|
1091
|
-
id
|
1092
|
-
revisions(data: $revisions) {
|
1093
|
-
totalCount
|
1094
|
-
pageInfo {
|
1095
|
-
...PageInfoMst
|
1096
|
-
}
|
1097
|
-
edges {
|
1098
|
-
cursor
|
1099
|
-
node {
|
1100
|
-
...BranchRevisionMst
|
1101
|
-
}
|
1102
|
-
}
|
1103
|
-
}
|
1104
|
-
}
|
1105
|
-
}
|
1106
|
-
${Nf}
|
1107
|
-
${Hhe}
|
1108
|
-
`,Khe=async e=>(await xr.query({query:Whe,variables:e})).data;class Ghe{constructor(t){this.store=t}async execute(t){(await Khe(t)).branch.revisions.edges.forEach(({node:n})=>{Pp(this.store.cache,n)})}}const is=Ne`
|
1109
|
-
fragment TableMst on TableModel {
|
1110
|
-
createdId
|
1111
|
-
id
|
1112
|
-
versionId
|
1113
|
-
createdAt
|
1114
|
-
updatedAt
|
1115
|
-
readonly
|
1116
|
-
count
|
1117
|
-
schema
|
1118
|
-
}
|
1119
|
-
`,Qhe=Ne`
|
1120
|
-
query TablesMst($data: GetTablesInput!) {
|
1121
|
-
tables(data: $data) {
|
1122
|
-
totalCount
|
1123
|
-
pageInfo {
|
1124
|
-
...PageInfoMst
|
1125
|
-
}
|
1126
|
-
edges {
|
1127
|
-
cursor
|
1128
|
-
node {
|
1129
|
-
...TableMst
|
1130
|
-
}
|
1131
|
-
}
|
1132
|
-
}
|
1133
|
-
}
|
1134
|
-
${Nf}
|
1135
|
-
${is}
|
1136
|
-
`,Yhe=async e=>(await xr.query({query:Qhe,variables:e})).data;class Xhe{constructor(t){this.store=t}async execute(t){const r=await Yhe({data:{...t}}),n=ow(r.tables);r.tables.edges.forEach(({node:o})=>{this.store.cache.addOrTable(o)});const i=this.store.cache.revision.get(t.revisionId);t.after||i==null||i.tablesConnection.reset(),i==null||i.tablesConnection.onLoad({edges:n.edges,hasNextPage:n.pageInfo.hasNextPage,totalCount:n.totalCount})}}const Qs=Ne`
|
1137
|
-
fragment BranchMst on BranchModel {
|
1138
|
-
id
|
1139
|
-
createdAt
|
1140
|
-
name
|
1141
|
-
touched
|
1142
|
-
projectId
|
1143
|
-
parent {
|
1144
|
-
branch {
|
1145
|
-
id
|
1146
|
-
name
|
1147
|
-
}
|
1148
|
-
revision {
|
1149
|
-
id
|
1150
|
-
}
|
1151
|
-
}
|
1152
|
-
start {
|
1153
|
-
...RevisionStartMst
|
1154
|
-
}
|
1155
|
-
head {
|
1156
|
-
...RevisionMst
|
1157
|
-
}
|
1158
|
-
draft {
|
1159
|
-
...RevisionDraftMst
|
1160
|
-
}
|
1161
|
-
}
|
1162
|
-
${qhe}
|
1163
|
-
${aw}
|
1164
|
-
${Uhe}
|
1165
|
-
`,Jhe=Ne`
|
1166
|
-
query BranchMst($data: GetBranchInput!) {
|
1167
|
-
branch(data: $data) {
|
1168
|
-
...BranchMst
|
1169
|
-
}
|
1170
|
-
}
|
1171
|
-
${Qs}
|
1172
|
-
`,Zhe=async e=>(await xr.query({query:Jhe,variables:e})).data;function epe(e){return function*(r){const{branch:n}=yield Zhe({data:r});return e.cache.addBranchByVariables(r,n.id),Jm(e.cache,n)}}const tpe=Ne`
|
1173
|
-
query BranchesMst($data: GetBranchesInput!) {
|
1174
|
-
branches(data: $data) {
|
1175
|
-
totalCount
|
1176
|
-
pageInfo {
|
1177
|
-
...PageInfoMst
|
1178
|
-
}
|
1179
|
-
edges {
|
1180
|
-
cursor
|
1181
|
-
node {
|
1182
|
-
...BranchMst
|
1183
|
-
}
|
1184
|
-
}
|
1185
|
-
}
|
1186
|
-
}
|
1187
|
-
${Nf}
|
1188
|
-
${Qs}
|
1189
|
-
`,rpe=async e=>(await xr.query({query:tpe,variables:e})).data;function npe(e){return function*(r){const n=yield rpe({data:r}),i=pV(n.branches);n.branches.edges.forEach(({node:a})=>{e.cache.addBranchByVariables({organizationId:r.organizationId,projectName:r.projectName,branchName:a.name},a.id),Jm(e.cache,a)});const o=e.cache.getProjectByVariables({organizationId:r.organizationId,projectName:r.projectName});r.after||o==null||o.branchesConnection.reset(),o==null||o.branchesConnection.onLoad({edges:i.edges,hasNextPage:i.pageInfo.hasNextPage,totalCount:i.totalCount})}}const mV=Ne`
|
1190
|
-
fragment ProjectMst on ProjectModel {
|
1191
|
-
id
|
1192
|
-
organizationId
|
1193
|
-
createdAt
|
1194
|
-
name
|
1195
|
-
isPublic
|
1196
|
-
rootBranch {
|
1197
|
-
...BranchMst
|
1198
|
-
}
|
1199
|
-
}
|
1200
|
-
${Qs}
|
1201
|
-
`,ipe=Ne`
|
1202
|
-
query ProjectMst($data: GetProjectInput!) {
|
1203
|
-
project(data: $data) {
|
1204
|
-
...ProjectMst
|
1205
|
-
}
|
1206
|
-
}
|
1207
|
-
${mV}
|
1208
|
-
`,ope=async e=>(await xr.query({query:ipe,variables:e})).data;function ape(e){return function*(r){const{project:n}=yield ope({data:r});return e.cache.addProjectByVariables(r,n.id),fV(e.cache,n)}}const spe=Ne`
|
1209
|
-
query RevisionMst($data: GetRevisionInput!) {
|
1210
|
-
revision(data: $data) {
|
1211
|
-
...RevisionMst
|
1212
|
-
branch {
|
1213
|
-
id
|
1214
|
-
}
|
1215
|
-
}
|
1216
|
-
}
|
1217
|
-
${aw}
|
1218
|
-
`,lpe=async e=>(await xr.query({query:spe,variables:e})).data;function upe(e){return function*(r){const{revision:n}=yield lpe({data:r});return Pp(e.cache,n)}}const cpe=be.model({cache:be.reference(uV)}).actions(e=>({queryMeProjects:io(zhe(e)),queryProject:io(ape(e)),queryBranches:io(npe(e)),queryBranch:io(epe(e)),queryRevision:io(upe(e))})),dpe=Ne`
|
1219
|
-
query GetRowCountForeignKeysTo($data: GetRowCountForeignKeysByInput!) {
|
1220
|
-
getRowCountForeignKeysTo(data: $data)
|
1221
|
-
}
|
1222
|
-
`,fpe=async e=>(await xr.query({query:dpe,variables:e,context:{}})).data;class hpe{constructor(t){this.store=t}async execute(t){const{getRowCountForeignKeysTo:r}=await fpe({data:t}),n={revisionId:t.revisionId,tableId:t.tableId,rowId:t.rowId},i=this.store.cache.getRowForeignKeysByVariables(n)||this.store.cache.createRowForeignKeysByByVariables(n);return i.update({countForeignKeysBy:r}),i}}const Ff=Ne`
|
1223
|
-
fragment RowMst on RowModel {
|
1224
|
-
createdId
|
1225
|
-
id
|
1226
|
-
versionId
|
1227
|
-
createdAt
|
1228
|
-
updatedAt
|
1229
|
-
readonly
|
1230
|
-
data
|
1231
|
-
}
|
1232
|
-
`,ppe=Ne`
|
1233
|
-
query RowMst($data: GetRowInput!) {
|
1234
|
-
row(data: $data) {
|
1235
|
-
...RowMst
|
1236
|
-
}
|
1237
|
-
}
|
1238
|
-
${Ff}
|
1239
|
-
`,mpe=async e=>(await xr.query({query:ppe,variables:e,context:{}})).data,tT=e=>({createdId:e.createdId,id:e.id,versionId:e.versionId,readonly:e.readonly,createdAt:e.createdAt,updatedAt:e.updatedAt,data:e.data});class vpe{constructor(t){this.store=t}async execute(t){const{row:r}=await mpe({data:t});if(r){const n={revisionId:t.revisionId,tableId:t.tableId,rowId:t.rowId},i=this.store.cache.addRow(tT(r));return this.store.cache.addRowByVariables(n,i.versionId),i}}}const gpe=Ne`
|
1240
|
-
query RowForeignKeysBy($data: GetRowInput!, $foreignKeyData: GetRowForeignKeysInput!) {
|
1241
|
-
row(data: $data) {
|
1242
|
-
versionId
|
1243
|
-
rowForeignKeysBy(data: $foreignKeyData) {
|
1244
|
-
totalCount
|
1245
|
-
pageInfo {
|
1246
|
-
...PageInfoMst
|
1247
|
-
}
|
1248
|
-
edges {
|
1249
|
-
cursor
|
1250
|
-
node {
|
1251
|
-
...RowMst
|
1252
|
-
}
|
1253
|
-
}
|
1254
|
-
}
|
1255
|
-
}
|
1256
|
-
}
|
1257
|
-
${Nf}
|
1258
|
-
${Ff}
|
1259
|
-
`,ype=async e=>(await xr.query({query:gpe,variables:e,context:{}})).data;class bpe{constructor(t){this.store=t}async execute(t){const r=await ype(t);if(!r.row)throw new Error("Invalid row");const n=ow(r.row.rowForeignKeysBy);r.row.rowForeignKeysBy.edges.forEach(({node:a})=>{const l=this.store.cache.addRow(a);this.store.cache.addRowByVariables({revisionId:t.data.revisionId,tableId:t.foreignKeyData.foreignKeyTableId,rowId:l.id},l.versionId)});const i=this.store.cache.getRowByVariables({revisionId:t.data.revisionId,tableId:t.data.tableId,rowId:t.data.rowId}),o=i==null?void 0:i.getOrCreateRowForeignKeysByConnection(t.foreignKeyData.foreignKeyTableId);t.foreignKeyData.after||o==null||o.reset(),o==null||o.onLoad({edges:n.edges,hasNextPage:n.pageInfo.hasNextPage,totalCount:n.totalCount})}}const wpe=Ne`
|
1260
|
-
query TableMst($data: GetTableInput!) {
|
1261
|
-
table(data: $data) {
|
1262
|
-
...TableMst
|
1263
|
-
}
|
1264
|
-
}
|
1265
|
-
${is}
|
1266
|
-
`,Spe=async e=>(await xr.query({query:wpe,variables:e,context:{}})).data,Lf=e=>({createdId:e.createdId,id:e.id,versionId:e.versionId,count:e.count,readonly:e.readonly,createdAt:e.createdAt,updatedAt:e.updatedAt,schema:e.schema});class _pe{constructor(t){this.store=t}async execute(t){const{table:r}=await Spe(t);if(r){const n=this.store.cache.addOrTable(Lf(r));return this.store.cache.addTableByVariables({revisionId:t.data.revisionId,tableId:t.data.tableId},n.versionId),n}}}const xpe=Ne`
|
1267
|
-
query TableForeignKeysBy($data: GetTableInput!, $foreignKeyData: GetTableForeignKeysInput!) {
|
1268
|
-
table(data: $data) {
|
1269
|
-
versionId
|
1270
|
-
foreignKeysBy(data: $foreignKeyData) {
|
1271
|
-
totalCount
|
1272
|
-
pageInfo {
|
1273
|
-
...PageInfoMst
|
1274
|
-
}
|
1275
|
-
edges {
|
1276
|
-
cursor
|
1277
|
-
node {
|
1278
|
-
...TableMst
|
1279
|
-
}
|
1280
|
-
}
|
1281
|
-
}
|
1282
|
-
}
|
1283
|
-
}
|
1284
|
-
${Nf}
|
1285
|
-
${is}
|
1286
|
-
`,Ppe=async e=>(await xr.query({query:xpe,variables:e,context:{}})).data;class Cpe{constructor(t){this.store=t}async execute(t){const r=await Ppe(t);if(!r.table)throw new Error("Invalid table");const n=ow(r.table.foreignKeysBy);r.table.foreignKeysBy.edges.forEach(({node:o})=>{this.store.cache.addOrTable(o)});const i=this.store.cache.getTableByVariables(t.data);t.foreignKeyData.after||i==null||i.foreignKeysByConnection.reset(),i==null||i.foreignKeysByConnection.onLoad({edges:n.edges,hasNextPage:n.pageInfo.hasNextPage,totalCount:n.totalCount})}}const Epe=Ne`
|
1287
|
-
query RowsMst($data: GetRowsInput!) {
|
1288
|
-
rows(data: $data) {
|
1289
|
-
totalCount
|
1290
|
-
pageInfo {
|
1291
|
-
...PageInfoMst
|
1292
|
-
}
|
1293
|
-
edges {
|
1294
|
-
cursor
|
1295
|
-
node {
|
1296
|
-
...RowMst
|
1297
|
-
}
|
1298
|
-
}
|
1299
|
-
}
|
1300
|
-
}
|
1301
|
-
${Nf}
|
1302
|
-
${Ff}
|
1303
|
-
`,Tpe=async e=>(await xr.query({query:Epe,variables:e})).data;class Ope{constructor(t){this.store=t}async execute(t){const r=await Tpe({data:{...t}}),n=ow(r.rows);r.rows.edges.forEach(({node:o})=>{const a=this.store.cache.addRow(o);this.store.cache.addRowByVariables({revisionId:t.revisionId,tableId:t.tableId,rowId:a.id},a.versionId)});const i=this.store.cache.getTableByVariables({revisionId:t.revisionId,tableId:t.tableId});t.after||i==null||i.rowsConnection.reset(),i==null||i.rowsConnection.onLoad({edges:n.edges,hasNextPage:n.pageInfo.hasNextPage,totalCount:n.totalCount})}}const vV=be.model({organization:be.maybeNull(be.reference(be.late(()=>eT))),project:be.maybeNull(be.reference(be.late(()=>sm))),branch:be.maybeNull(be.reference(be.late(()=>lm))),table:be.maybeNull(be.reference(be.late(()=>um))),row:be.maybeNull(be.reference(be.late(()=>cm))),revision:be.maybeNull(be.reference(be.late(()=>Zu))),cache:uV,backend:cpe}).views(e=>({get organizationOrThrow(){if(!e.organization)throw new Error("Not found organization");return e.organization},get projectOrThrow(){if(!e.project)throw new Error("Not found project");return e.project},get branchOrThrow(){if(!e.branch)throw new Error("Not found branch");return e.branch},get revisionOrThrow(){if(!e.revision)throw new Error("Not found revision");return e.revision},get tableOrThrow(){if(!e.table)throw new Error("Not found table");return e.table},get rowOrThrow(){if(!e.row)throw new Error("Not found row");return e.row}})).actions(e=>({selectOrganization(t){e.organization=t},selectProject(t){e.project=t},selectBranch(t){e.branch=t},selectRevision(t){e.revision=t},selectTable(t){e.table=t},selectRow(t){e.row=t}})).actions(e=>{const t=e,r={queryRevisions:new Ghe(t),queryTable:new _pe(t),queryTableForeignKeysBy:new Cpe(t),queryTables:new Xhe(t),queryRow:new vpe(t),queryRowForeignKeysBy:new bpe(t),queryGetRowCountForeignKeysBy:new hpe(t),queryRows:new Ope(t)};return{queryRevisions:io(function*(n){return yield r.queryRevisions.execute(n)}),queryTable:io(function*(n){return yield r.queryTable.execute(n)}),queryTableForeignKeysBy:io(function*(n){return yield r.queryTableForeignKeysBy.execute(n)}),queryTables:io(function*(n){return yield r.queryTables.execute(n)}),queryRow:io(function*(n){return yield r.queryRow.execute(n)}),queryRowForeignKeysBy:io(function*(n){return yield r.queryRowForeignKeysBy.execute(n)}),queryGetRowCountForeignKeysBy:io(function*(n){return yield r.queryGetRowCountForeignKeysBy.execute(n)}),queryRows:io(function*(n){return yield r.queryRows.execute(n)})}});let ct=vV.create({cache:{id:"1"},backend:{cache:"1"}});const Rpe=()=>{ct=vV.create({cache:{id:"1"},backend:{cache:"1"}})},Bf=async e=>_V(()=>ct.cache.getBranchByVariables(rT(e))),gV=async e=>_V(()=>ct.cache.getRevision(wV(e).revisionId)),yV=e=>{const{organizationId:t}=e;if(!t)throw new Error("Not found organizationId in route params");return{organizationId:t}},bV=e=>{const{projectName:t}=e;if(!t)throw new Error("Not found projectName in route params");return{...yV(e),projectName:t}},rT=e=>{const{branchName:t}=e;if(!t)throw new Error("Not found branchName in route params");return{...bV(e),branchName:t}},wV=e=>{const{revisionId:t}=e;if(!t)throw new Error("Not found revisionId in route params");return{revisionId:t}},SV=(e,t)=>{const{tableId:r}=e;if(!r)throw new Error("Not found tableId in route params");return{revisionId:t,tableId:r}},nT=(e,t)=>{const{rowId:r}=e;if(!r)throw new Error("Not found rowId in route params");return{...SV(e,t),rowId:r}},Ipe=e=>new Promise(t=>{const r=Ya(e,n=>{n&&(r(),t(n))})}),_V=async e=>{const t=e();return t||Ipe(e)},Mo=12,kpe=async({params:e})=>{const t=rT(e),r=ct.cache.getBranchByVariables(t)||await ct.backend.queryBranch(t);return r.start.getChildrenDetails(Mo).isAllLoaded||await ct.queryRevisions({branch:t,revisions:{first:Mo,after:r.start.id}}),r.head.getParentsDetails(Mo).isAllLoaded||await ct.queryRevisions({branch:t,revisions:{first:Mo,before:r.head.id}}),r},zb=async()=>{const e=dt.get(qi),t=dt.get(dc);return e.user?e.user.username?!0:hf(`/${mB}`):hf(t.availableSignUp?`/${Y0}`:`/${xc}`)},jpe=async()=>dt.get(qi).user?hf("/"):!0,$pe=async()=>{const e=dt.get(qi),t=dt.get(dc);return e.user||!t.availableSignUp?hf("/"):!0},RP=(...e)=>async t=>{let r;for(const n of e)if(r=await n(t),r&&typeof r=="object"&&"status"in r&&r.status===302)return r;return r},Ape=async()=>(ct.cache.meProjectsConnection.countLoaded||await ct.backend.queryMeProjects({first:100}),!0),Dpe=async({params:e})=>{const{organizationId:t}=yV(e);return ct.cache.getOrganization(t)||ct.cache.addOrganization({id:t})},Mpe=async({params:e})=>{const t=bV(e),r=ct.cache.getProjectByVariables(t)||await ct.backend.queryProject(t);return r.branchesConnection.countLoaded||await ct.backend.queryBranches({...t,first:100}),r},Npe=async({params:e})=>{const r=(await Bf(e)).draft;return r.tablesConnection.countLoaded===0&&await ct.queryTables({revisionId:r.id,first:50}),r},Fpe=async({params:e})=>{const r=(await Bf(e)).head;return r.tablesConnection.countLoaded===0&&await ct.queryTables({revisionId:r.id,first:50}),r},Lpe=async({params:e})=>{const t=wV(e),r=rT(e),n=ct.cache.getRevision(t.revisionId)||await ct.backend.queryRevision(t);return n.getChildrenDetails(Mo).isAllLoaded||await ct.queryRevisions({branch:r,revisions:{first:Mo,after:n.id}}),n.getParentsDetails(Mo).isAllLoaded||await ct.queryRevisions({branch:r,revisions:{first:Mo,before:n.id}}),n.tablesConnection.countLoaded===0&&await ct.queryTables({revisionId:n.id,first:50}),n},iT=async e=>{await ct.queryTableForeignKeysBy({data:{revisionId:e.revisionId,tableId:e.tableId},foreignKeyData:{first:100}});const t=ct.cache.getTableByVariables({revisionId:e.revisionId,tableId:e.tableId});for(const r of(t==null?void 0:t.foreignKeysByConnection.edges)||[])await ct.queryRowForeignKeysBy({data:e,foreignKeyData:{first:100,foreignKeyTableId:r.node.id}})};class sw extends Error{}const Bpe=async({params:e})=>{const r=(await Bf(e)).draft,n=nT(e,r.id),i=ct.cache.getRowByVariables(n)||await ct.queryRow(n);if(!i)throw new sw(e.rowId);return await ct.queryGetRowCountForeignKeysBy(n),await iT(n),i},Vpe=async({params:e})=>{const r=(await Bf(e)).head,n=nT(e,r.id),i=ct.cache.getRowByVariables(n)||await ct.queryRow(n);if(!i)throw new sw(e.rowId);return ct.cache.getRowForeignKeysByVariables(n)||await ct.queryGetRowCountForeignKeysBy(n),await iT(n),i},zpe=async({params:e})=>{const t=await gV(e),r=nT(e,t.id),n=ct.cache.getRowByVariables(r)||await ct.queryRow(r);if(!n)throw new sw(e.rowId);return ct.cache.getRowForeignKeysByVariables(r)||await ct.queryGetRowCountForeignKeysBy(r),await iT(r),n};class xV extends Error{}const oT=async(e,t)=>{const r=SV(e,t),n=ct.cache.getTableByVariables(r)||await ct.queryTable({data:r});if(!n)throw new xV(e.tableId);return n.rowsConnection.countLoaded||await ct.queryRows({revisionId:t,tableId:n.id,first:50}),n},qpe=async({params:e})=>{const t=await Bf(e);return oT(e,t.draft.id)},Upe=async({params:e})=>{const t=await Bf(e);return oT(e,t.head.id)},Hpe=async({params:e})=>{const t=await gV(e);return oT(e,t.id)};class Wpe{constructor(t){this.projectPageModel=t,st(this)}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}get currentBaseLink(){return B2(this.organization.id,this.project.name,this.branch.name,this.getCurrentOptions())}get parentForTableOrRow(){const t=this.currentBaseLink,r=this.projectPageModel.routeTableId,n=this.projectPageModel.routeRowId;if(r&&n)return ao(`${t}/${wp}`,{tableId:r});if(r)return ao(`${t}`)}getCurrentOptions(){return this.projectPageModel.isDraftRevision?{isDraft:!0}:this.projectPageModel.isHeadRevision?{isHead:!0}:{id:this.revision.id}}make(t){const r=t.tableId||this.projectPageModel.routeTableId,n=t.rowId||this.projectPageModel.routeRowId,i=B2(this.organization.id,this.project.name,this.branch.name,t);return r&&n?ao(`${i}/${wp}/${wB}`,{tableId:r,rowId:n}):r?ao(`${i}/${wp}`,{tableId:r}):i}init(){}dispose(){}}const B2=(e,t,r,n)=>n.isHead?ao(`/${Fl}/${Ll}/${Bl}/${Vl}`,{organizationId:e,projectName:t,branchName:r}):n.isDraft?ao(`/${Fl}/${Ll}/${Bl}/${Vl}/${X0}`,{organizationId:e,projectName:t,branchName:r}):ao(`/${Fl}/${Ll}/${Bl}/${Vl}/${bB}`,{organizationId:e,projectName:t,branchName:r,revisionId:n.id}),Kpe=()=>Ho(zr.DraftRow)||null,Gpe=()=>Ho(zr.HeadRow)||null,Qpe=()=>Ho(zr.SpecificRow)||null,Ype=()=>{const e=Kpe(),t=Gpe(),r=Qpe();return e||t||r},Xpe=()=>Ho(zr.Branch)||null,Jpe=()=>{const e=Ho(zr.Organization);if(!e)throw new Error("Not found organization from route loader");return e},Zpe=()=>{const e=Ho(zr.Project);if(!e)throw new Error("Not found project from route loader");return e},eme=()=>Ho(zr.DraftRevision)||null,tme=()=>Ho(zr.HeadRevision)||null,rme=()=>Ho(zr.SpecificRevision)||null,nme=()=>{const e=eme(),t=tme(),r=rme();return e||t||r},ime=()=>Ho(zr.DraftTable)||null,ome=()=>Ho(zr.HeadTable)||null,ame=()=>Ho(zr.SpecificTable)||null,sme=()=>{const e=ime(),t=ome(),r=ame();return e||t||r};class lme{constructor(t,r,n,i,o,a,l,c,d){this.cache=t,this.revalidateLoaders=r,this.params=n,this.organization=i,this.project=o,this.branch=a,this.revision=l,this.table=c,this.row=d,st(this)}get branchOrThrow(){if(!this.branch)throw new Error("Not found branch from route loader");return this.branch}get revisionOrThrow(){if(!this.revision)throw new Error("Not found revision from route loader");return this.revision}get tableOrThrow(){if(!this.table)throw new Error("Not found table from route loader");return this.table}get isStartRevision(){return this.branchOrThrow.start.id===this.revisionOrThrow.id}get isHeadRevision(){return this.branchOrThrow.head.id===this.revisionOrThrow.id}get isDraftRevision(){return this.branchOrThrow.draft.id===this.revisionOrThrow.id}get isStartAndHeadSameRevision(){return this.branchOrThrow.head.id===this.branchOrThrow.start.id}get isEditableRevision(){return this.isDraftRevision||!this.branchOrThrow.touched&&this.isHeadRevision}get rowOrThrow(){if(!this.row)throw new Error("Not found row from route loader");return this.row}get rowRefsBy(){if(this.revision&&this.table&&this.row)return this.cache.getRowForeignKeysByVariables({revisionId:this.revision.id,tableId:this.table.id,rowId:this.row.id})}get routeOrganizationId(){return this.params.organizationId}get routeProjectName(){return this.params.projectName}get routeBranchName(){return this.params.branchName}get routeRevisionId(){return this.params.revisionId}get routeTableId(){return this.params.tableId}get routeRowId(){return this.params.rowId}update(t){for(const[r,n]of Object.entries(t))this[r]!==n&&(this[r]=n)}init(){}dispose(){}}const Zn=()=>{const e=Cae(),t=vae(),r=Jpe(),n=Zpe(),i=Xpe(),o=nme(),a=sme(),l=Ype(),[c]=O.useState(()=>new lme(ct.cache,e.revalidate,t,r,n,i,o,a,l));return O.useEffect(()=>(c.init(),()=>c.dispose()),[c]),O.useEffect(()=>{c.update({params:t,organization:r,project:n,branch:i,revision:o,table:a,row:l})},[c,t,r,n,i,o,a,l]),c},Tc=()=>{const e=Zn(),[t]=O.useState(()=>new Wpe(e));return O.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t};class ume{constructor(t,r,n){Pe(this,"disposer",null);this.navigateFunction=t,this.linkMaker=r,this.projectPageModel=n,st(this)}toDraftRoute(){var t;(t=this.navigateFunction)==null||t.call(this,this.linkMaker.make({isDraft:!0}))}toHeadRoute(){var t;(t=this.navigateFunction)==null||t.call(this,this.linkMaker.make({isHead:!0}))}init(){this.listenToBranch()}dispose(){var t;(t=this.disposer)==null||t.call(this),this.disposer=null}listenToBranch(){this.disposer=Ya(()=>({branch:this.branch,touched:this.branch.touched}),(t,r)=>{t.branch&&r.branch&&t.branch.id===r.branch.id&&(t.branch.touched?this.toDraftRoute():this.toHeadRoute())})}get branch(){return this.projectPageModel.branchOrThrow}}const cme=()=>{const e=Tc(),t=ou(),r=Zn(),[n]=O.useState(()=>new ume(t,e,r));return O.useEffect(()=>(n.init(),()=>n.dispose()),[n]),n},dme=({onClick:e})=>{const[t,r]=O.useState(""),{onOpen:n,onClose:i,isOpen:o}=Z4(),[a,l]=O.useState(!1),c=O.useCallback(async()=>{l(!0),await(e==null?void 0:e(t)),l(!1)},[t,e]),d=O.useCallback(f=>{r(f.currentTarget.value)},[]);return x.jsxs(ZC,{isOpen:o,onOpen:n,onClose:i,children:[x.jsx(JC,{children:x.jsx(Ci,{"data-testid":"create-revision-button",_hover:{backgroundColor:"gray.50"},isLoading:a,"aria-label":"",icon:x.jsx(SB,{boxSize:3}),variant:"ghost",color:"gray.300"})}),x.jsx(tE,{children:x.jsx(eE,{p:"1rem",children:x.jsxs(je,{flexDirection:"column",alignItems:"end",justifyContent:"flex-start",gap:"0.5rem",children:[x.jsx(TF,{_placeholder:{color:"gray.300"},placeholder:"Comment (optional)",onChange:d}),x.jsx("div",{children:x.jsx(ks,{onClick:c,title:"Commit"})})]})})})]})},fme=({onClick:e})=>{const[t,r]=O.useState(!1),n=O.useCallback(async()=>{r(!0),await(e==null?void 0:e()),r(!1)},[e]);return x.jsx(Ci,{"data-testid":"revert-revision-button",_hover:{backgroundColor:"gray.50"},isLoading:t,"aria-label":"",icon:x.jsx(PB,{size:"16"}),variant:"ghost",onClick:n,color:"gray.300"})},hme=Ne`
|
1304
|
-
mutation CreateBranchByRevisionIdMst($data: CreateBranchByRevisionIdInput!) {
|
1305
|
-
createBranchByRevisionId(data: $data) {
|
1306
|
-
...BranchMst
|
1307
|
-
}
|
1308
|
-
}
|
1309
|
-
${Qs}
|
1310
|
-
`,pme=async e=>{const t=await xr.mutate({mutation:hme,variables:e});if(!t.data)throw t.errors;return t.data};class mme{constructor(t,r,n){this.rootStore=t,this.projectPageModel=r,this.branchName=n}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get revision(){return this.projectPageModel.revisionOrThrow}async execute(){const t=await this.createBranchByRevisionIdRequest();return await Promise.all([this.refetchBranchesConnection(),this.refetchRevision()]),t}async createBranchByRevisionIdRequest(){const t=await pme({data:{revisionId:this.revision.id,branchName:this.branchName}});return Jm(this.rootStore.cache,t.createBranchByRevisionId)}async refetchBranchesConnection(){await ct.backend.queryBranches({organizationId:this.organization.id,projectName:this.project.name,first:100})}async refetchRevision(){await ct.backend.queryRevision({revisionId:this.revision.id})}}const vme=Ne`
|
1311
|
-
mutation CreateRevisionMst($data: CreateRevisionInput!) {
|
1312
|
-
createRevision(data: $data) {
|
1313
|
-
...RevisionMst
|
1314
|
-
branch {
|
1315
|
-
...BranchMst
|
1316
|
-
}
|
1317
|
-
}
|
1318
|
-
}
|
1319
|
-
${aw}
|
1320
|
-
${Qs}
|
1321
|
-
`,gme=async e=>{const t=await xr.mutate({mutation:vme,variables:e});if(!t.data)throw t.errors;return t.data};class yme{constructor(t,r,n){this.rootStore=t,this.projectPageModel=r,this.comment=n}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branchOrThrow}async execute(){const t=await this.createRevisionRequest();this.lockTablesAndRowsInRevision();const r=Jm(this.rootStore.cache,t);return r.head.parent&&await this.queryPreviousHead(r.head.parent),!0}async createRevisionRequest(){return(await gme({data:{organizationId:this.organization.id,projectName:this.project.name,branchName:this.branch.name,comment:this.comment}})).createRevision.branch}lockTablesAndRowsInRevision(){this.branch.draft.tablesConnection.edges.forEach(({node:r})=>{r.update({readonly:!0}),r.rowsConnection.edges.forEach(({node:n})=>{n.update({readonly:!0})})})}queryPreviousHead(t){return this.rootStore.backend.queryRevision({revisionId:t.id})}}const bme=Ne`
|
1322
|
-
mutation RevertChangesMst($data: RevertChangesInput!) {
|
1323
|
-
revertChanges(data: $data) {
|
1324
|
-
...BranchMst
|
1325
|
-
}
|
1326
|
-
}
|
1327
|
-
${Qs}
|
1328
|
-
`,wme=async e=>{const t=await xr.mutate({mutation:bme,variables:e});if(!t.data)throw t.errors;return t.data};class Sme{constructor(t){this.projectPageModel=t}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branchOrThrow}async execute(){return await this.revertChangesRequest(),this.resetTablesConnection(),this.branch.updateTouched(!1),!0}revertChangesRequest(){return wme({data:{organizationId:this.organization.id,projectName:this.project.name,branchName:this.branch.name}})}resetTablesConnection(){this.branch.draft.tablesConnection.reset()}}class _me{constructor(t,r){this.rootStore=t,this.projectPageModel=r,st(this,{},{autoBind:!0})}get showCreateBranchCard(){if(this.revision){const t=this.branch.start.id!==this.branch.head.id,r=this.branch.touched;return(t||r)&&this.revision.id!==this.branch.draft.id}}get showActions(){if(this.revision)return this.branch.touched&&this.revision.id===this.branch.draft.id}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revision}init(){}dispose(){}async createBranchByRevisionId(t){if(!this.revision)throw new Error("Not found revision");try{await new mme(this.rootStore,this.projectPageModel,t).execute()}catch(r){console.error(r)}}async revertChanges(){try{await new Sme(this.projectPageModel).execute()}catch(t){console.log(t)}}async createRevision(t){try{await new yme(this.rootStore,this.projectPageModel,t).execute()}catch(r){console.error(r)}}}const xme=()=>{const e=Zn(),[t]=O.useState(()=>new _me(ct,e));return O.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t};function Pme(){var e=O.useRef(!0);return e.current?(e.current=!1,!0):e.current}var Cme=function(e,t){var r=Pme();O.useEffect(function(){if(!r)return e()},t)},V2=function(){},Eme=typeof window<"u",Tme=function(e,t){return typeof t=="boolean"?t:!e},PV=function(e){return O.useReducer(Tme,e)},CV=function(e){O.useEffect(e,[])},Ome=function(e,t,r){if(!Eme)return[t,V2,V2];var n=JSON.parse,i=O.useRef(function(f){try{var p=r?r.raw?String:r.serializer:JSON.stringify,m=localStorage.getItem(f);return m!==null?n(m):(t&&localStorage.setItem(f,p(t)),t)}catch{return t}}),o=O.useState(function(){return i.current(e)}),a=o[0],l=o[1];O.useLayoutEffect(function(){return l(i.current(e))},[e]);var c=O.useCallback(function(f){try{var p=typeof f=="function"?f(a):f;if(typeof p>"u")return;var m=void 0;r||(m=JSON.stringify(p)),localStorage.setItem(e,m),l(n(m))}catch{}},[e,l]),d=O.useCallback(function(){try{localStorage.removeItem(e),l(void 0)}catch{}},[e,l]);return[a,c,d]};const Rme=({onCancel:e,onAdd:t})=>{const[r,n]=O.useState(!1),i=RB(),[o,a]=O.useState(""),l=O.useCallback(async()=>{n(!0),await(t==null?void 0:t(o)),n(!1)},[o,t]),c=O.useCallback(d=>{a(d.currentTarget.value)},[]);return x.jsxs(je,{alignSelf:"flex-start",gap:"0.5rem",children:[x.jsx(C0,{"data-testid":"create-branch-name-input",borderColor:"gray.100",borderStyle:"solid",borderWidth:"1px",padding:"0 0.5rem",placeholder:"branch-name",ref:i,variant:"unstyled",onChange:c,onKeyDown:d=>{d.key==="Enter"&&l()}}),x.jsx(Z0,{dataTestId:"create-branch-close-button",onClick:e}),x.jsx(Qm,{dataTestId:"create-branch-approve-button",isDisabled:!o,loading:r,onClick:l})]})},Ime=({onCreate:e})=>{const[t,r]=PV(!1),n=O.useCallback(async i=>{await e(i),r()},[e,r]);return t?x.jsx(Rme,{onAdd:n,onCancel:r}):x.jsx(Af,{dataTestId:"create-branch-button",title:"Branch",onClick:r})},kme=Ot(()=>{const e=xme();return x.jsxs(je,{gap:"0.5rem",alignItems:"center",children:[e.showActions&&x.jsxs(x.Fragment,{children:[x.jsx(dme,{onClick:e.createRevision}),x.jsx(fme,{onClick:e.revertChanges})]}),e.showCreateBranchCard&&x.jsx(Ime,{onCreate:e.createBranchByRevisionId})]})});class jme{constructor(t,r){this.projectPageModel=t,this.linkMaker=r,st(this,{},{autoBind:!0})}get breadcrumbs(){const t=[];t.push({title:this.branch.name,href:this.linkMaker.currentBaseLink,isCurrentPage:!1,dataTestId:`breadcrumb-branch-${this.branch.name}`});const r=this.projectPageModel.routeTableId;r&&t.push({title:r,href:ao(`${this.linkMaker.currentBaseLink}/${wp}`,{tableId:r}),isCurrentPage:!1,dataTestId:`breadcrumb-table-${r}`});const n=this.projectPageModel.routeRowId;n&&t.push({title:n,href:"",isCurrentPage:!1,dataTestId:`breadcrumb-row-${n}`});const i=t.slice().pop();return i&&(i.isCurrentPage=!0),t}get branchName(){return this.branch.name}get title(){return this.isDraftRevision||this.isHeadRevision?"":`[${this.revision.id.slice(0,6)}]`}get isDraftRevision(){return this.projectPageModel.isDraftRevision}get isHeadRevision(){return this.projectPageModel.isHeadRevision}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}init(){}dispose(){}}const $me=()=>{const e=Zn(),t=Tc(),[r]=O.useState(()=>new jme(e,t));return O.useEffect(()=>(r.init(),()=>r.dispose()),[r]),r},Ame="_Root_t8kot_1",Dme={Root:Ame},Mme=Ot(()=>{const e=$me();return x.jsxs(je,{alignItems:"center",gap:"4px",flex:1,height:"40px",className:Dme.Root,children:[x.jsx(V4,{spacing:"8px",separator:"/",color:"gray",fontWeight:"600",fontSize:"16px",children:e.breadcrumbs.map(t=>x.jsx(B4,{isCurrentPage:t.isCurrentPage,children:x.jsx(MC,{"data-testid":t.dataTestId,to:t.href,as:t.isCurrentPage?void 0:qo,children:t.title})},t.href))}),e.title&&x.jsxs(bt,{color:"gray",opacity:"0.3",fontWeight:"400",fontSize:"16px",children:["- ",e.title]})]})});var zs=(e=>(e.GRAPHQL="GRAPHQL",e.REST_API="REST_API",e))(zs||{});class Nme{constructor(t){this.projectPageModel=t,st(this,{},{autoBind:!0})}get branchTitle(){const r=`Branch: ${this.projectPageModel.branchOrThrow.name}`;return this.projectPageModel.isHeadRevision?`${r}[head]`:this.projectPageModel.isDraftRevision?`${r}[draft]`:`${r}[${this.projectPageModel.revisionOrThrow.id.substring(0,6)}]`}get isThereEndpoint(){return!!this.projectPageModel.revisionOrThrow.endpoints.length}init(){}dispose(){}}const Fme=()=>{const e=Zn(),[t]=O.useState(()=>new Nme(e));return O.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t};function Lme(e){return Hr({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12,0C5.372,0 0,5.373 0,12 0,18.628 5.372,24 12,24 18.627,24 24,18.628 24,12A12.014,12.014 0 0 0 23.527,8.657 0.6,0.6 0 0 0 22.4,9.066H22.398C22.663,10.009 22.8,10.994 22.8,12A10.73,10.73 0 0 1 19.637,19.637 10.729,10.729 0 0 1 12,22.8 10.73,10.73 0 0 1 4.363,19.637 10.728,10.728 0 0 1 1.2,12 10.73,10.73 0 0 1 4.363,4.363 10.728,10.728 0 0 1 12,1.2C14.576,1.2 17.013,2.096 18.958,3.74A1.466,1.466 0 1 0 19.82,2.9 11.953,11.953 0 0 0 12,0ZM10.56,5.88 6.36,16.782H8.99L9.677,14.934H13.646L12.927,12.892H10.314L12.014,8.201 15.038,16.781H17.669L13.47,5.88Z"},child:[]}]})(e)}function Bme(e){return Hr({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"},child:[]}]})(e)}const Vme={[zs.GRAPHQL]:"GraphQL",[zs.REST_API]:"Swagger"},EV=e=>Vme[e],zme=Ne`
|
1329
|
-
mutation CreateEndpointMst($data: CreateEndpointInput!) {
|
1330
|
-
createEndpoint(data: $data) {
|
1331
|
-
...EndpointMst
|
1332
|
-
}
|
1333
|
-
}
|
1334
|
-
${Zm}
|
1335
|
-
`,qme=async e=>{const t=await xr.mutate({mutation:zme,variables:e});if(!t.data)throw t.errors;return t.data};class Ume{constructor(t,r,n){this.rootStore=t,this.projectPageModel=r,this.endpointType=n}get revision(){return this.projectPageModel.revisionOrThrow}async execute(){const t=await this.createEndpointRequest();return this.updateRevision(t),t}async createEndpointRequest(){const t=await qme({data:{revisionId:this.revision.id,type:this.endpointType}});return this.addEndpointToCache(t.createEndpoint)}addEndpointToCache(t){return this.rootStore.cache.addEndpoint(cV(t))}updateRevision(t){this.revision.addEndpoint(t)}}const Hme=Ne`
|
1336
|
-
mutation DeleteEndpointMst($data: DeleteEndpointInput!) {
|
1337
|
-
deleteEndpoint(data: $data)
|
1338
|
-
}
|
1339
|
-
`,Wme=async e=>{const t=await xr.mutate({mutation:Hme,variables:e});if(!t.data)throw t.errors;return t.data};class Kme{constructor(t,r){this.projectPageModel=t,this.endpointId=r}get revision(){return this.projectPageModel.revisionOrThrow}async execute(){const t=await this.deleteEndpointRequest();return this.updateRevision(),t}async deleteEndpointRequest(){return(await Wme({data:{endpointId:this.endpointId}})).deleteEndpoint}updateRevision(){this.revision.removeEndpoint(this.endpointId)}}const Gme=Oy("REACT_APP_ENDPOINT_SERVER_URL"),Qme={[zs.GRAPHQL]:"graphql",[zs.REST_API]:"swagger"};class Yme{constructor(t,r){this.projectPageModel=t,this.endpointType=r,st(this,{},{autoBind:!0})}get href(){if(!this.endpoint)return;const t=`${this.baseUrl}/${this.organization.id}/${this.project.name}/${this.branch.name}`;return this.projectPageModel.isDraftRevision?`${t}/draft`:this.projectPageModel.isHeadRevision?`${t}/head`:`${t}/${this.revision.id}`}async switch(){try{return this.endpoint?await new Kme(this.projectPageModel,this.endpoint.id).execute():new Ume(ct,this.projectPageModel,this.endpointType).execute()}catch(t){console.log(t)}}init(){}dispose(){}get endpoint(){return this.revision.endpoints.find(t=>t.type===this.endpointType)}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}get baseUrl(){return`${Gme}/${Qme[this.endpointType]}`}}const Xme=e=>{const t=Zn(),[r]=O.useState(()=>new Yme(t,e));return O.useEffect(()=>(r.init(),()=>r.dispose()),[r]),r},Jme={[zs.GRAPHQL]:x.jsx(Lme,{size:20}),[zs.REST_API]:x.jsx(Bme,{size:20})},z2=Ot(({type:e})=>{const t=Xme(e);return x.jsxs(je,{alignItems:"center",gap:"0.5rem",minWidth:"90px",height:"25px",children:[x.jsx(wt,{color:t.href?"gray.400":"gray.300",children:Jme[e]}),x.jsx(bt,{width:"140px",color:"gray.400",children:EV(e)}),x.jsxs(je,{width:"120px",gap:"0.5rem",alignItems:"center",children:[x.jsx(EF,{"data-testid":`endpoint-switch-${e}`,colorScheme:"gray",isChecked:!!t.href,onChange:t.switch}),t.href&&x.jsx(Cf,{isExternal:!0,href:t.href,children:x.jsx(Lo,{"data-testid":`endpoint-button-${e}`,size:"sm","aria-label":"removeRow",color:"gray.500",isDisabled:!t.href,variant:"ghost",padding:0,minWidth:"20px",minHeight:"20px",height:"20px",paddingBottom:"3px",children:x.jsx(Kce,{size:"20px"})})})]})]})}),Zme="_Root_t8kot_1",eve="_Action_t8kot_1",TV={Root:Zme,Action:eve},tve=Ot(()=>{const{onOpen:e,onClose:t,isOpen:r}=Z4(),n=Fme();return x.jsxs(ZC,{trigger:"click",isOpen:r,onOpen:e,onClose:t,children:[x.jsx(JC,{children:x.jsx(Ci,{"data-testid":"revision-endpoint-button",className:r?void 0:TV.Action,"aria-label":"",icon:n.isThereEndpoint?x.jsx(Hce,{size:"24"}):x.jsx(Wce,{size:"24"}),opacity:.5,_hover:{opacity:1},variant:"ghost"})}),x.jsxs(tE,{maxWidth:"240px",children:[x.jsx(xF,{}),x.jsx(eE,{children:x.jsxs(je,{flexDirection:"column",gap:"1rem",children:[x.jsx(z2,{type:zs.GRAPHQL}),x.jsx(z2,{type:zs.REST_API})]})}),x.jsx(CF,{justifyContent:"center",children:x.jsx(bt,{color:"gray.400",opacity:"0.7",fontSize:"xs",as:"samp",children:n.branchTitle})})]})]})});var In=(e=>(e.Revision="Revision",e.Parent="Parent",e.Draft="Draft",e.Start="Start",e.Head="Head",e.Child="Child",e.PreviousPage="PreviousPage",e.NextPage="NextPage",e))(In||{});const IP=["PreviousPage","NextPage"];class rve{constructor(t){this.projectPageModel=t,st(this)}async queryNextPage(t){t.getChildrenDetails(Mo).isAllLoaded||await ct.queryRevisions({branch:this.branchVariables,revisions:{first:Mo,after:t.id}})}async queryPreviousPage(t){t.getParentsDetails(Mo).isAllLoaded||await ct.queryRevisions({branch:this.branchVariables,revisions:{first:Mo,before:t.id}})}get branchVariables(){return{organizationId:this.projectPageModel.organization.id,projectName:this.projectPageModel.project.name,branchName:this.projectPageModel.branchOrThrow.name}}}var Il=(e=>(e.None="None",e.Left="Left",e.Right="Right",e))(Il||{});class nve{constructor(t,r,n,i,o){Pe(this,"disposers",[]);this.cache=t,this.projectPageModel=r,this.revisionsCardItemsModel=n,this.middleRevisions=i,this.revisionsPageQueries=o,st(this,{},{autoBind:!0}),this.updateWithDesiredCurrentRevision()}get items(){return this.revisionsCardItemsModel.items}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}init(){this.middleRevisions.resetDefaultMaxItems(),this.disposers.push(Ya(()=>this.projectPageModel.branch,this.onSelectBranch)),this.disposers.push(Ya(()=>{var t;return(t=this.projectPageModel.branch)==null?void 0:t.head},this.onCreatedNewRevision)),this.disposers.push(Ya(()=>this.projectPageModel.revision,this.onSelectRevision))}dispose(){for(const t of this.disposers)t();this.disposers=[]}async previousPage(t){var n;const r=(n=this.cache.revision.get(t))==null?void 0:n.child;if(!r)throw new Error(`Not found revision ${t}`);await this.revisionsPageQueries.queryPreviousPage(r),this.middleRevisions.select({desiredRevision:r,priority:Il.Left})}async nextPage(t){var n;const r=(n=this.cache.revision.get(t))==null?void 0:n.parent;if(!r)throw new Error(`Not found revision ${t}`);await this.revisionsPageQueries.queryNextPage(r),this.middleRevisions.select({desiredRevision:r,priority:Il.Right})}updateWithDesiredCurrentRevision(){this.middleRevisions.select({desiredRevision:this.revision,priority:Il.None})}onSelectBranch(){this.dispose(),this.init(),this.updateWithDesiredCurrentRevision()}onCreatedNewRevision(){this.middleRevisions.increaseMaxItemsForNewRevision(),this.middleRevisions.select({desiredRevision:this.branch.head,priority:Il.None})}onSelectRevision(t){(t===this.branch.start||t===this.branch.head||t===this.branch.draft)&&this.middleRevisions.select({desiredRevision:t,priority:Il.None})}}class ive{constructor(t){this.projectPageModel=t}get branch(){return this.projectPageModel.branchOrThrow}find({targetRevision:t,priority:r,maxItems:n}){const i=[],{rawRightPartRevisions:o,rawLeftPartRevisions:a}=this.getParts({targetRevision:t,priority:r,maxItems:n});return i.push(...a),i.push(t),i.push(...o),i}getParts({targetRevision:t,priority:r,maxItems:n}){const i=this.getLeftPartRevisions({targetRevision:t,maxLength:n+1}),o=this.getRightPartRevisions({targetRevision:t,maxLength:n+1}),a=[],l=[],c=i.slice(),d=o.slice().reverse();let f=0;for(;f<n;){const p=r===Il.Right&&d.length&&a.length>0?void 0:c.pop();if(p&&(a.unshift(p),f+=1),f>=n)break;const m=r===Il.Left&&c.length&&l.length>0?void 0:d.pop();if(m&&(l.push(m),f+=1),!c.length&&!d.length)break}return{rawLeftPartRevisions:a,rawRightPartRevisions:l}}getLeftPartRevisions({targetRevision:t,maxLength:r}){const n=[];if(t!==this.branch.start&&t.parent!==this.branch.start){let i=t.parent;for(;i&&(i!==this.branch.head&&n.push(i),i=i.parent,!(this.branch.start===i||n.length>=r)););}return n.reverse()}getRightPartRevisions({targetRevision:t,maxLength:r}){const n=[];if(t!==this.branch.head&&t!==this.branch.draft&&t.child!==this.branch.head){let i=t.child;for(;i&&(n.push(i),i=i.child,!(this.branch.head===i||n.length>=r)););}return n}}const ove={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ave=(e,t,r)=>{let n;const i=ove[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function T_(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const sve={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},lve={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},uve={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},cve={date:T_({formats:sve,defaultWidth:"full"}),time:T_({formats:lve,defaultWidth:"full"}),dateTime:T_({formats:uve,defaultWidth:"full"})},dve={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},fve=(e,t,r,n)=>dve[e];function Nh(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let i;if(n==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=r!=null&&r.width?String(r.width):a;i=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const hve={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},pve={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},mve={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},vve={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},gve={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},yve={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},bve=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},wve={ordinalNumber:bve,era:Nh({values:hve,defaultWidth:"wide"}),quarter:Nh({values:pve,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Nh({values:mve,defaultWidth:"wide"}),day:Nh({values:vve,defaultWidth:"wide"}),dayPeriod:Nh({values:gve,defaultWidth:"wide",formattingValues:yve,defaultFormattingWidth:"wide"})};function Fh(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?_ve(l,p=>p.test(a)):Sve(l,p=>p.test(a));let d;d=e.valueCallback?e.valueCallback(c):c,d=r.valueCallback?r.valueCallback(d):d;const f=t.slice(a.length);return{value:d,rest:f}}}function Sve(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function _ve(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function xve(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=r.valueCallback?r.valueCallback(a):a;const l=t.slice(i.length);return{value:a,rest:l}}}const Pve=/^(\d+)(th|st|nd|rd)?/i,Cve=/\d+/i,Eve={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Tve={any:[/^b/i,/^(a|c)/i]},Ove={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Rve={any:[/1/i,/2/i,/3/i,/4/i]},Ive={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},kve={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},jve={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},$ve={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Ave={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Dve={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Mve={ordinalNumber:xve({matchPattern:Pve,parsePattern:Cve,valueCallback:e=>parseInt(e,10)}),era:Fh({matchPatterns:Eve,defaultMatchWidth:"wide",parsePatterns:Tve,defaultParseWidth:"any"}),quarter:Fh({matchPatterns:Ove,defaultMatchWidth:"wide",parsePatterns:Rve,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Fh({matchPatterns:Ive,defaultMatchWidth:"wide",parsePatterns:kve,defaultParseWidth:"any"}),day:Fh({matchPatterns:jve,defaultMatchWidth:"wide",parsePatterns:$ve,defaultParseWidth:"any"}),dayPeriod:Fh({matchPatterns:Ave,defaultMatchWidth:"any",parsePatterns:Dve,defaultParseWidth:"any"})},Nve={code:"en-US",formatDistance:ave,formatLong:cve,formatRelative:fve,localize:wve,match:Mve,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Fve={};function lw(){return Fve}const OV=6048e5,Lve=864e5;function ba(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function q2(e){const t=ba(e);return t.setHours(0,0,0,0),t}function U2(e){const t=ba(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Bve(e,t){const r=q2(e),n=q2(t),i=+r-U2(r),o=+n-U2(n);return Math.round((i-o)/Lve)}function fc(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Vve(e){const t=ba(e),r=fc(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function zve(e){const t=ba(e);return Bve(t,Vve(t))+1}function dm(e,t){var l,c,d,f;const r=lw(),n=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((f=(d=r.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,i=ba(e),o=i.getDay(),a=(o<n?7:0)+o-n;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function qb(e){return dm(e,{weekStartsOn:1})}function RV(e){const t=ba(e),r=t.getFullYear(),n=fc(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const i=qb(n),o=fc(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=qb(o);return t.getTime()>=i.getTime()?r+1:t.getTime()>=a.getTime()?r:r-1}function qve(e){const t=RV(e),r=fc(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),qb(r)}function Uve(e){const t=ba(e),r=+qb(t)-+qve(t);return Math.round(r/OV)+1}function IV(e,t){var f,p,m,g;const r=ba(e),n=r.getFullYear(),i=lw(),o=(t==null?void 0:t.firstWeekContainsDate)??((p=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??i.firstWeekContainsDate??((g=(m=i.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,a=fc(e,0);a.setFullYear(n+1,0,o),a.setHours(0,0,0,0);const l=dm(a,t),c=fc(e,0);c.setFullYear(n,0,o),c.setHours(0,0,0,0);const d=dm(c,t);return r.getTime()>=l.getTime()?n+1:r.getTime()>=d.getTime()?n:n-1}function Hve(e,t){var l,c,d,f;const r=lw(),n=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(d=r.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,i=IV(e,t),o=fc(e,0);return o.setFullYear(i,0,n),o.setHours(0,0,0,0),dm(o,t)}function Wve(e,t){const r=ba(e),n=+dm(r,t)-+Hve(r,t);return Math.round(n/OV)+1}function Cr(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const bl={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Cr(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Cr(r+1,2)},d(e,t){return Cr(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Cr(e.getHours()%12||12,t.length)},H(e,t){return Cr(e.getHours(),t.length)},m(e,t){return Cr(e.getMinutes(),t.length)},s(e,t){return Cr(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return Cr(i,t.length)}},pd={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},H2={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return bl.y(e,t)},Y:function(e,t,r,n){const i=IV(e,n),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Cr(a,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):Cr(o,t.length)},R:function(e,t){const r=RV(e);return Cr(r,t.length)},u:function(e,t){const r=e.getFullYear();return Cr(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Cr(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Cr(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return bl.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Cr(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const i=Wve(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):Cr(i,t.length)},I:function(e,t,r){const n=Uve(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Cr(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):bl.d(e,t)},D:function(e,t,r){const n=zve(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Cr(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const i=e.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Cr(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const i=e.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Cr(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return Cr(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let i;switch(n===12?i=pd.noon:n===0?i=pd.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let i;switch(n>=17?i=pd.evening:n>=12?i=pd.afternoon:n>=4?i=pd.morning:i=pd.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return bl.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):bl.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Cr(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Cr(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):bl.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):bl.s(e,t)},S:function(e,t){return bl.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return K2(n);case"XXXX":case"XX":return Du(n);case"XXXXX":case"XXX":default:return Du(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return K2(n);case"xxxx":case"xx":return Du(n);case"xxxxx":case"xxx":default:return Du(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+W2(n,":");case"OOOO":default:return"GMT"+Du(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+W2(n,":");case"zzzz":default:return"GMT"+Du(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return Cr(n,t.length)},T:function(e,t,r){const n=e.getTime();return Cr(n,t.length)}};function W2(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),o=n%60;return o===0?r+String(i):r+String(i)+t+Cr(o,2)}function K2(e,t){return e%60===0?(e>0?"-":"+")+Cr(Math.abs(e)/60,2):Du(e,t)}function Du(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Cr(Math.trunc(n/60),2),o=Cr(n%60,2);return r+i+t+o}const G2=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},kV=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Kve=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return G2(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",G2(n,t)).replace("{{time}}",kV(i,t))},Gve={p:kV,P:Kve},Qve=/^D+$/,Yve=/^Y+$/,Xve=["D","DD","YY","YYYY"];function Jve(e){return Qve.test(e)}function Zve(e){return Yve.test(e)}function ege(e,t,r){const n=tge(e,t,r);if(console.warn(n),Xve.includes(e))throw new RangeError(n)}function tge(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function rge(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function nge(e){if(!rge(e)&&typeof e!="number")return!1;const t=ba(e);return!isNaN(Number(t))}const ige=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oge=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,age=/^'([^]*?)'?$/,sge=/''/g,lge=/[a-zA-Z]/;function uge(e,t,r){var f,p,m,g;const n=lw(),i=n.locale??Nve,o=n.firstWeekContainsDate??((p=(f=n.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,a=n.weekStartsOn??((g=(m=n.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??0,l=ba(e);if(!nge(l))throw new RangeError("Invalid time value");let c=t.match(oge).map(b=>{const y=b[0];if(y==="p"||y==="P"){const w=Gve[y];return w(b,i.formatLong)}return b}).join("").match(ige).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const y=b[0];if(y==="'")return{isToken:!1,value:cge(b)};if(H2[y])return{isToken:!0,value:b};if(y.match(lge))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:b}});i.localize.preprocessor&&(c=i.localize.preprocessor(l,c));const d={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return c.map(b=>{if(!b.isToken)return b.value;const y=b.value;(Zve(y)||Jve(y))&&ege(y,t,String(e));const w=H2[y[0]];return w(l,y,i.localize,d)}).join("")}function cge(e){const t=e.match(age);return t?t[1].replace(sge,"'"):e}class dge{constructor(t,r){Pe(this,"index",0);this.projectPageModel=t,this.childBranch=r,st(this)}get id(){return this.childBranch.branchName}get children(){return[]}get disabled(){return!1}get icon(){return In.Child}get dataTestId(){return`revision-child-branch-${this.childBranch.branchName}`}get link(){return ao(`/${Fl}/${Ll}/${Bl}/${Vl}/-/${this.childBranch.revisionStartId}`,{organizationId:this.projectPageModel.organization.id,projectName:this.projectPageModel.project.name,branchName:this.childBranch.branchName})}get tooltip(){return[`Branch: ${this.childBranch.branchName}`]}get hidden(){return!1}}class md{constructor(t,r,n){Pe(this,"index",0);this.projectPageModel=t,this.linkMaker=r,this.revision=n,st(this)}get id(){return this.revision.id}get isThereEndpoint(){return!!this.revision.endpoints.length}get children(){return this.revision.childBranches.map(t=>new dge(this.projectPageModel,t))}get disabled(){return this.revision.id===this.projectPageModel.revisionOrThrow.id}get icon(){return this.checkIsHeadRevision()?In.Head:this.checkIsStartRevision()?In.Start:this.checkIsDraftRevision()?In.Draft:In.Revision}get dataTestId(){return this.checkIsHeadRevision()?"revision-head":this.checkIsStartRevision()?"revision-start":this.checkIsDraftRevision()?"revision-draft":`revision_index_${this.index}`}get link(){return this.linkMaker.make(this.revisionLinkOption)}get tooltip(){if(this.checkIsDraftRevision())return["Draft revision"];const t=this.revision.comment?[this.revision.comment]:[],r=uge(new Date(this.revision.createdAt),"dd MMM yyyy, HH:mm:ss"),n=[...t,this.revision.id,r],i=this.revision.endpoints.map(o=>`${EV(o.type)}`);return i.length&&(n.push("".padEnd(25,"-")),n.push("Active endpoints:"),n.push(i.join(", "))),this.checkIsHeadRevision()&&n.unshift("Head revision:"),this.checkIsStartRevision()&&n.unshift("Init revision:"),n}get hidden(){return!1}get revisionLinkOption(){return this.checkIsHeadRevision()?{isHead:!0}:this.checkIsDraftRevision()?{isDraft:!0}:{id:this.revision.id}}checkIsStartRevision(){return this.projectPageModel.branchOrThrow.start.id===this.revision.id}checkIsDraftRevision(){return this.projectPageModel.branchOrThrow.draft.id===this.revision.id}checkIsHeadRevision(){return this.projectPageModel.branchOrThrow.head.id===this.revision.id}}class fge{constructor(t){Pe(this,"index",0);this.revision=t,st(this)}get id(){return this.revision.id}get children(){return[]}get disabled(){return!1}get icon(){return In.NextPage}get dataTestId(){return"revision-next-page"}get link(){return""}get tooltip(){return["Next page"]}get hidden(){return!1}}class hge{constructor(t,r){Pe(this,"index",0);this.projectPageModel=t,this.parentBranch=r,st(this)}get id(){return this.parentBranch.branchName}get children(){return[]}get disabled(){return!1}get icon(){return In.Parent}get dataTestId(){return`revision-parent-branch-${this.parentBranch.branchName}`}get link(){return ao(`/${Fl}/${Ll}/${Bl}/${Vl}/-/${this.parentBranch.fromRevisionId}`,{organizationId:this.projectPageModel.organization.id,projectName:this.projectPageModel.project.name,branchName:this.parentBranch.branchName})}get tooltip(){return[`Branch: ${this.parentBranch.branchName}`]}get hidden(){return!1}}class pge{constructor(t){Pe(this,"index",0);this.revision=t,st(this)}get id(){return this.revision.id}get children(){return[]}get disabled(){return!1}get icon(){return In.PreviousPage}get dataTestId(){return"revision-previous-page"}get link(){return""}get tooltip(){return["Previous page"]}get hidden(){return!1}}class mge{constructor(t,r,n){this.projectPageModel=t,this.linkMaker=r,this.middleRevisions=n,st(this,{},{autoBind:!0})}get items(){const t=[];this.branch.parentBranch&&t.push(this.createParentBranchItem(this.branch.parentBranch)),this.shouldAddStartRevision()&&t.push(this.createStartItem());const r=this.middleRevisions.data.slice(),n=r.shift(),i=r.pop();n&&t.push(this.createFirstMiddleItem(n));for(const o of r)t.push(this.createMiddleItem(o));return i&&t.push(this.createLastMiddleItem(i)),t.push(this.createHeadItem()),this.branch.touched&&t.push(this.createDraftItem()),t.length===1&&!this.branch.head.tablesConnection.totalCount?[]:(t.forEach((o,a)=>{o.index=a}),t)}get branch(){return this.projectPageModel.branchOrThrow}createParentBranchItem(t){return new hge(this.projectPageModel,t)}createStartItem(){return new md(this.projectPageModel,this.linkMaker,this.branch.start)}createFirstMiddleItem(t){return t.parent===this.branch.start?new md(this.projectPageModel,this.linkMaker,t):new pge(t)}createMiddleItem(t){return new md(this.projectPageModel,this.linkMaker,t)}createLastMiddleItem(t){return t.child===this.branch.head?new md(this.projectPageModel,this.linkMaker,t):new fge(t)}createHeadItem(){return new md(this.projectPageModel,this.linkMaker,this.branch.head)}createDraftItem(){return new md(this.projectPageModel,this.linkMaker,this.branch.draft)}shouldAddStartRevision(){return this.branch.start!==this.branch.head}}const O_=8;class vge{constructor(t,r){Pe(this,"data",[]);Pe(this,"currentDefaultMaxItems",O_);this.projectPageModel=t,this.middleRevisionsFinder=r,st(this)}get branch(){return this.projectPageModel.branchOrThrow}select({desiredRevision:t,priority:r}){this.shouldResetDefaultMaxItems(t)&&this.resetDefaultMaxItems(),this.isNoChangesForDefaultBranch()&&(this.data=[]);const n=[];if(this.shouldAddMiddleRevisions()){const i=this.middleRevisionsFinder.find({targetRevision:this.getTargetRevision(t),priority:r,maxItems:this.currentDefaultMaxItems});n.push(...i)}this.data=n}resetDefaultMaxItems(){this.currentDefaultMaxItems=O_}increaseMaxItemsForNewRevision(){this.currentDefaultMaxItems=O_+1}isNoChangesForDefaultBranch(){return!this.branch.parentBranch&&this.branch.start===this.branch.head&&!this.branch.touched}shouldAddMiddleRevisions(){return this.branch.start!==this.branch.head&&this.branch.start.child!==this.branch.head}getTargetRevision(t){return t===this.branch.start?this.branch.start.child:t===this.branch.head||t===this.branch.draft?this.branch.head.parent:t}shouldResetDefaultMaxItems(t){return t!==this.branch.head}}const gge=()=>{const e=Tc(),t=Zn(),[r]=O.useState(()=>{const n=new ive(t),i=new vge(t,n),o=new mge(t,e,i),a=new rve(t);return new nve(ct.cache,t,o,i,a)});return O.useEffect(()=>(r.init(),()=>r.dispose()),[r]),r},yge=e=>{switch(e){case In.Child:return x.jsx(Mce,{size:"24"});case In.Draft:return x.jsx(zce,{size:"24"});case In.Start:return x.jsx(P2,{size:"24"});case In.Head:return x.jsx(qce,{size:"24"});case In.Revision:return x.jsx(P2,{size:"24"});case In.Parent:return x.jsx(Nce,{size:"24"});case In.PreviousPage:return x.jsx(x2,{size:"24"});case In.NextPage:return x.jsx(x2,{size:"24"})}},jV=Ot(({data:e,onClick:t})=>{const[r,n]=O.useState(!1),i=O.useCallback(async()=>{IP.includes(e.icon)?(n(!0),await(t==null?void 0:t()),n(!1)):t==null||t()},[e.icon,t]);return x.jsx(OF,{textAlign:"center",label:x.jsx(Bp,{children:e.tooltip.map((o,a)=>x.jsx("span",{children:o},a))}),openDelay:750,children:x.jsxs(wt,{position:"relative",children:[x.jsx(Ci,{"data-testid":e.dataTestId,isLoading:r,onClick:i,_disabled:r?{opacity:.2}:{opacity:1},_hover:e.disabled?{opacity:1}:{opacity:.4},"aria-label":"",icon:yge(e.icon),isDisabled:e.disabled,opacity:IP.includes(e.icon)?.7:.2,variant:"ghost"}),e.isThereEndpoint&&x.jsx(wt,{position:"absolute",right:"0px",top:"0px",opacity:"0.4",children:x.jsx(Uce,{})})]})})}),Q2=Ot(({data:e})=>x.jsx(qo,{to:e.link,children:x.jsx(jV,{data:e})})),Y2=({data:e,onSelect:t})=>{const r=O.useCallback(async()=>{await t(e.id)},[e.id,t]);return x.jsx(jV,{data:e,onClick:r})},bge=Ot(({endpointSlot:e})=>{const t=gge();return t.items.length?x.jsxs(je,{alignItems:"flex-start",justifyContent:"space-between",paddingBottom:"1rem",children:[x.jsx(je,{flexDirection:"column",flex:1,gap:"1rem",children:x.jsx(je,{"data-testid":"revision-endpoint-widget",children:t.items.map((r,n)=>x.jsxs(Re.Fragment,{children:[x.jsxs(je,{alignItems:"center",flexDirection:"column",children:[r.icon===In.PreviousPage&&x.jsx(Y2,{data:r,onSelect:t.previousPage}),r.icon===In.NextPage&&x.jsx(Y2,{data:r,onSelect:t.nextPage}),!IP.includes(r.icon)&&x.jsx(Q2,{data:r}),r.children.length?x.jsx(Fce,{opacity:"0.15"}):null,r.children.map(i=>x.jsx(Q2,{data:i},i.id))]}),n!==t.items.length-1&&x.jsx(je,{alignItems:"center",height:"40px",children:x.jsx(Lce,{opacity:"0.15"})})]},r.id))})}),x.jsx(je,{children:e})]}):null}),wge=()=>x.jsx(wt,{className:TV.Root,children:x.jsx(bge,{endpointSlot:x.jsx(tve,{})})});class Sge{constructor(t){this.projectPageModel=t,st(this)}get hasNextPage(){return this.project.branchesConnection.availableNextPage}get organizationId(){return this.organization.id}get projectName(){return this.project.name}get items(){return this.project.branchesConnection.edges.map(({node:t})=>{var n;const r=t.name===((n=this.branch)==null?void 0:n.name);return{id:t.id,name:t.name,link:r?"":`${xge(this.organizationId,this.projectName,t.name)}${_ge(t)}`,title:`${t.name}`,isActive:r,touched:t.touched}})}init(){}dispose(){}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branch}}const _ge=e=>e.touched?ao(`/${X0}`):"",xge=(e,t,r)=>ao(`/${Fl}/${Ll}/${Bl}/${Vl}`,{organizationId:e,projectName:t,branchName:r}),Pge=()=>{const e=Zn(),[t]=O.useState(()=>new Sge(e));return O.useEffect(()=>(t.init(),()=>{t.dispose()}),[t]),t},Cge=Ot(()=>{const e=Pge();return x.jsxs(Bp,{alignItems:"flex-start",gap:"1rem",children:[x.jsx(qo,{to:"/",children:x.jsx(Lo,{variant:"link","data-testid":"sidebar-back-to-projects-button",children:x.jsx(rF,{color:"gray",size:"md",children:x.jsx("b",{children:e.projectName})})})}),x.jsxs(Bp,{alignItems:"flex-start",borderTop:"1px solid",borderTopColor:"gray.100",gap:"0.25rem",pb:"1rem",pt:"1rem",width:"100%",children:[x.jsx(bt,{color:"gray",fontSize:"sm",mb:"0.5rem",children:"Branches:"}),e.items.map(t=>x.jsxs(je,{_hover:t.isActive?{}:{backgroundColor:"gray.200"},alignItems:"center",backgroundColor:t.isActive?"gray.100":void 0,borderRadius:"0.25rem",height:"32px",paddingLeft:"0.5rem",width:"100%",children:[t.isActive?x.jsx(bt,{color:"gray.500",fontWeight:"600",children:t.title}):x.jsx(Lo,{minWidth:0,variant:"link",children:x.jsx(bt,{children:x.jsx(qo,{to:t.link,"data-testid":`sidebar-branch-${t.name}`,children:t.title},t.id)})}),t.touched&&x.jsx(bt,{color:"gray.600",children:"*"})]},t.id))]})]})});class Ege{constructor(t,r){this.projectPageModel=t,this.linkMaker=r,st(this)}get hasNextPage(){return this.project.branchesConnection.availableNextPage}get items(){return this.revision.tablesConnection.edges.map(({node:t})=>{var n;const r=t.id===((n=this.table)==null?void 0:n.id);return{id:t.id,versionId:t.versionId,link:r?"":`${this.linkMaker.currentBaseLink}/${t.id}`,isActive:r,touched:!t.readonly}})}get project(){return this.projectPageModel.project}get revision(){return this.projectPageModel.revisionOrThrow}get table(){return this.projectPageModel.table}init(){}dispose(){}}const Tge=()=>{const e=Zn(),t=Tc(),[r]=O.useState(()=>new Ege(e,t));return O.useEffect(()=>(r.init(),()=>{r.dispose()}),[r]),r},Oge=Ot(()=>{const e=Tge();return x.jsxs(Bp,{alignItems:"flex-start",gap:"0.25rem",width:"100%",children:[x.jsx(bt,{color:"gray",fontSize:"sm",mb:"0.5rem",children:"Tables:"}),e.items.map(t=>x.jsxs(je,{_hover:{backgroundColor:"gray.200"},alignItems:"center",backgroundColor:t.isActive?"gray.100":void 0,borderRadius:"0.25rem",height:"32px",paddingLeft:"0.5rem",paddingRight:"0.5rem",width:"100%",children:[t.isActive?x.jsx(bt,{color:"gray.500",fontWeight:"600",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:t.id}):x.jsx(Lo,{minWidth:0,variant:"link",children:x.jsx(bt,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:x.jsx(qo,{to:t.link,"data-testid":`sidebar-table-${t.id}`,children:t.id},t.id)})}),t.touched&&x.jsx(bt,{color:"gray.600",children:"*"})]},t.versionId))]})}),Rge=Ot(()=>{const e=Zn();return x.jsxs(x.Fragment,{children:[x.jsx(wt,{minHeight:"120px",children:x.jsx(Cge,{})}),e.table&&x.jsx(wt,{borderTop:"1px solid",borderTopColor:"gray.100",paddingTop:"1rem",children:x.jsx(Oge,{})})]})}),Ige=Ot(()=>(cme(),x.jsx($f,{actions:x.jsx(kme,{}),sidebar:x.jsx(Rge,{}),title:x.jsx(Mme,{}),children:x.jsxs(je,{flex:1,flexDirection:"column",gap:"1rem",children:[x.jsx(wge,{}),x.jsx(je,{flexDirection:"column",gap:"0.5rem",flex:1,children:x.jsx(Ib,{})})]})})));class kP{constructor(t,r,n){Pe(this,"isLoading",!1);this.authService=t,this.routerService=r,this.apiService=n,st(this)}async confirmEmailCode(t){t?(await this.request(t),await this.routerService.navigate(UE)):console.error("Invalid code")}init(){}dispose(){}async request(t){this.setIsLoading(!0);try{const r=await this.apiService.client.confirmEmailCode({data:{code:t}});return await this.authService.setToken(r.confirmEmailCode.accessToken),!0}catch(r){console.error(r)}finally{this.setIsLoading(!1)}}setIsLoading(t){this.isLoading=t}}dt.register(kP,()=>{const e=dt.get(qi),t=dt.get(Us),r=dt.get(es);return new kP(e,t,r)},{scope:"request"});const kge=Ot(()=>{const[e]=Yae({code:""}),t=Df(kP);return O.useEffect(()=>{t.confirmEmailCode(e.get("code"))},[t,e]),t.isLoading?x.jsx(LC,{w:"100%",h:"100%",children:x.jsx(Rm,{})}):null}),jge=()=>null;class jP{constructor(t,r,n){Pe(this,"isLoading",!1);this.routerService=t,this.apiService=r,this.authService=n,st(this)}async login(t){t?(await this.loginRequest(t),await this.routerService.navigate("/")):console.error("Invalid code")}dispose(){}init(){}async loginRequest(t){this.setIsLoading(!0);try{const r=await this.apiService.client.loginGithub({data:{code:t}});return await this.authService.setToken(r.loginGithub.accessToken),!0}catch(r){console.error(r)}finally{this.setIsLoading(!1)}}setIsLoading(t){this.isLoading=t}}dt.register(jP,()=>{const e=dt.get(Us),t=dt.get(es),r=dt.get(qi);return new jP(e,t,r)},{scope:"request"});const $ge=async({request:e})=>{const n=new URL(e.url).searchParams.get("code");if(!n)throw new Error("Invalid code");return await dt.get(jP).login(n),hf("/")},Age=Ne`
|
1340
|
-
mutation login($data: LoginInput!) {
|
1341
|
-
login(data: $data) {
|
1342
|
-
accessToken
|
1343
|
-
}
|
1344
|
-
}
|
1345
|
-
`,Dge=async e=>{const t=await xr.mutate({mutation:Age,variables:e});if(!t.data)throw t.errors;return t.data},Mge=()=>`${window.location.origin}/${xc}/${vB}`,$V=e=>{const t=Mge();window.location.href=`https://github.com/login/oauth/authorize?client_id=${e}&redirect_uri=${t}&scope=user:email`},AV=()=>`${window.location.origin}/${xc}/${gB}`,DV=e=>{const t=AV();window.location.href=`https://accounts.google.com/o/oauth2/v2/auth?client_id=${e}&redirect_uri=${t}&response_type=code&scope=profile email`};class $P{constructor(t,r,n){Pe(this,"isLoading",!1);Pe(this,"form",new GE({emailOrUsername:"",password:""}));this.authService=t,this.configurationService=r,this.routerService=n,st(this)}get availableSignUp(){return this.configurationService.availableSignUp}get disableSubmitButton(){return!this.form.isValid}get availableOauth(){return this.configurationService.availableGoogleOauth}get availableGoogleOauth(){return this.configurationService.availableGoogleOauth}get availableGithubOauth(){return this.configurationService.availableGithubOauth}toGoogleOauth(){DV(this.configurationService.googleOauthClientId)}toGithubOauth(){$V(this.configurationService.githubOauthClientId)}async submit(){await this.login()&&await this.routerService.navigate(UE)}dispose(){}init(){}async login(){this.setIsLoading(!0);try{const t=await Dge({data:this.form.values});return await this.authService.setToken(t.login.accessToken),!0}catch(t){console.error(t)}finally{this.setIsLoading(!1)}}setIsLoading(t){this.isLoading=t}}dt.register($P,()=>{const e=dt.get(qi),t=dt.get(dc),r=dt.get(Us);return new $P(e,t,r)},{scope:"request"});const Nge=Ot(()=>{const e=Df($P),t=O.useCallback(a=>{e.form.setValue("emailOrUsername",a.currentTarget.value)},[e.form]),r=O.useCallback(a=>{e.form.setValue("password",a.currentTarget.value)},[e.form]),n=O.useCallback(async()=>{await e.submit()},[e]),i=O.useCallback(()=>{e.toGithubOauth()},[e]),o=O.useCallback(()=>{e.toGoogleOauth()},[e]);return x.jsxs($f,{hideSidebar:!0,children:[e.availableSignUp&&x.jsxs(je,{width:"100%",gap:"8px",justifyContent:"flex-end",children:[x.jsx(bt,{color:"gray.300",children:"New to Revisium?"}),x.jsx(Cf,{color:"gray.300",alignSelf:"center",as:qo,to:`/${Y0}`,children:"Sign up"})]}),x.jsx(je,{alignItems:"center",justifyContent:"center",flex:1,children:x.jsxs(je,{flexDirection:"column",width:"16rem",gap:"1rem",alignItems:"center",children:[e.availableOauth&&x.jsxs(x.Fragment,{children:[x.jsxs(je,{flexDirection:"column",gap:"2px",children:[e.availableGithubOauth&&x.jsx(ks,{icon:x.jsx(CB,{}),onClick:i,title:"Continue with Github"}),e.availableGoogleOauth&&x.jsx(ks,{icon:x.jsx(EB,{}),onClick:o,title:"Continue with Google"})]}),x.jsxs(je,{width:"100%",alignItems:"center",gap:"16px",children:[x.jsx(wt,{backgroundColor:"gray.100",flex:1,height:"1px"}),x.jsx(bt,{color:"gray.300",fontSize:"12px",children:"OR"}),x.jsx(wt,{backgroundColor:"gray.100",flex:1,height:"1px"})]})]}),x.jsx(js,{dataTestId:"login-emailOrUsername-input",autoFocus:!0,height:"40px",placeholder:"username or email",value:e.form.values.emailOrUsername,onChange:t,onEnter:n}),x.jsx(js,{dataTestId:"login-password-input",height:"40px",placeholder:"password",type:"password",value:e.form.values.password,onChange:r,onEnter:n}),x.jsx(wt,{visibility:e.disableSubmitButton?"hidden":"visible",children:x.jsx(ks,{onClick:n,isLoading:e.isLoading,title:"Login"})})]})})]})});class AP{constructor(t){this.authService=t,st(this)}logout(){this.authService.logout(),Rpe()}dispose(){}init(){}}dt.register(AP,()=>{const e=dt.get(qi);return new AP(e)},{scope:"request"});const Fge=Ot(()=>{const e=Df(AP),t=ou();return O.useEffect(()=>{e.logout(),t(`/${xc}`)},[e,t]),null}),Lge=({onClick:e})=>x.jsx(Af,{dataTestId:"create-project-button",title:"Project",onClick:e}),Bge=Ne`
|
1346
|
-
mutation CreateProjectMst($data: CreateProjectInput!) {
|
1347
|
-
createProject(data: $data) {
|
1348
|
-
...ProjectMst
|
1349
|
-
}
|
1350
|
-
}
|
1351
|
-
${mV}
|
1352
|
-
`,Vge=async e=>{const t=await xr.mutate({mutation:Bge,variables:e});if(!t.data)throw t.errors;return t.data};class zge{constructor(t,r,n,i,o){this.rootStore=t,this.organizationId=r,this.projectName=n,this.branchName=i,this.fromRevisionId=o}get projectVariables(){return{organizationId:this.organizationId,projectName:this.projectName,branchName:this.branchName,fromRevisionId:this.fromRevisionId}}async execute(){const t=await this.createProjectRequest();return await this.refetchProjectsConnection(),t}async createProjectRequest(){const{createProject:t}=await Vge({data:this.projectVariables});return this.addProjectToCache(t)}addProjectToCache(t){const r=this.rootStore.cache.addProject(dV(t));return this.rootStore.cache.addProjectByVariables(this.projectVariables,r.id),r}async refetchProjectsConnection(){await this.rootStore.backend.queryMeProjects({first:100})}}class qge{constructor(t,r){Pe(this,"projectName","");Pe(this,"branchName","");Pe(this,"fromRevisionId","");Pe(this,"showingSettings",!1);this.rootStore=t,this.authService=r,st(this)}get organizationId(){var r;const t=(r=this.authService.user)==null?void 0:r.organizationId;if(!t)throw new Error("Not found organizationId");return t}setProjectName(t){this.projectName=t}setBranchName(t){this.branchName=t}setFromRevisionId(t){this.fromRevisionId=t}setShowingSettings(t){this.showingSettings=t}async create(){try{await new zge(this.rootStore,this.organizationId,this.projectName,this.branchName,this.fromRevisionId).execute()}catch(t){console.error(t)}}init(){}dispose(){}}const Uge=()=>{const[e]=O.useState(()=>{const t=dt.get(qi);return new qge(ct,t)});return O.useEffect(()=>(e.init(),()=>e.dispose()),[e]),e},MV=({onClick:e,color:t,dataTestId:r})=>{const[n,i]=O.useState(!1),o=O.useCallback(async()=>{i(!0),await(e==null?void 0:e()),i(!1)},[e]);return x.jsx(Ci,{_hover:{backgroundColor:"gray.100"},"data-testid":r,"aria-label":"",color:t||"gray.400",icon:x.jsx(Pce,{}),isLoading:n,variant:"ghost",onClick:o})},Hge=Ot(({onCancel:e,onAdd:t})=>{const r=Uge(),[n,i]=O.useState(!1),o=O.useCallback(async()=>{i(!0),await r.create(),i(!1),t==null||t()},[t,r]),a=O.useCallback(f=>{r.setProjectName(f.currentTarget.value)},[r]),l=O.useCallback(f=>{r.setBranchName(f.currentTarget.value)},[r]),c=O.useCallback(f=>{r.setFromRevisionId(f.currentTarget.value)},[r]),d=O.useCallback(()=>{r.setShowingSettings(!r.showingSettings)},[r]);return x.jsxs(je,{alignSelf:"flex-start",gap:"0.5rem",children:[x.jsx(Z0,{onClick:e}),x.jsxs(je,{flexDirection:"column",gap:"0.5rem",children:[x.jsx(js,{dataTestId:"create-project-name-input",autoFocus:!0,height:"40px",placeholder:"project name",value:r.projectName,onChange:a,onEnter:o}),r.projectName&&r.showingSettings&&x.jsxs(x.Fragment,{children:[x.jsx(js,{dataTestId:"create-project-branch-name-input",height:"40px",placeholder:"branch name",value:r.branchName,onChange:l,onEnter:o}),x.jsx(js,{dataTestId:"create-project-from-revision-id-input",height:"40px",placeholder:"from revisionId",value:r.fromRevisionId,onChange:c,onEnter:o})]})]}),r.projectName&&x.jsxs(x.Fragment,{children:[x.jsx(Qm,{dataTestId:"create-project-approve-button",loading:n,onClick:o}),x.jsx(MV,{dataTestId:"create-project-settings-button",color:r.showingSettings?"gray.400":"gray.200",onClick:d})]})]})}),uw=0,lu=1,Vf=2,NV=4;function FV(e,t){return r=>e(t(r))}function Wge(e,t){return t(e)}function LV(e,t){return r=>e(t,r)}function X2(e,t){return()=>e(t)}function cw(e,t){return t(e),e}function Kr(...e){return e}function Kge(e){e()}function J2(e){return()=>e}function Gge(...e){return()=>{e.map(Kge)}}function aT(e){return e!==void 0}function Oc(){}function Er(e,t){return e(lu,t)}function Nt(e,t){e(uw,t)}function sT(e){e(Vf)}function di(e){return e(NV)}function lt(e,t){return Er(e,LV(t,uw))}function ts(e,t){const r=e(lu,n=>{r(),t(n)});return r}function tr(){const e=[];return(t,r)=>{switch(t){case Vf:e.splice(0,e.length);return;case lu:return e.push(r),()=>{const n=e.indexOf(r);n>-1&&e.splice(n,1)};case uw:e.slice().forEach(n=>{n(r)});return;default:throw new Error(`unrecognized action ${t}`)}}}function Ve(e){let t=e;const r=tr();return(n,i)=>{switch(n){case lu:i(t);break;case uw:t=i;break;case NV:return t}return r(n,i)}}function Qge(e){let t,r;const n=()=>t&&t();return function(i,o){switch(i){case lu:return o?r===o?void 0:(n(),r=o,t=Er(e,o),t):(n(),Oc);case Vf:n(),r=null;return;default:throw new Error(`unrecognized action ${i}`)}}}function uo(e){return cw(tr(),t=>lt(e,t))}function fi(e,t){return cw(Ve(t),r=>lt(e,r))}function Yge(...e){return t=>e.reduceRight(Wge,t)}function De(e,...t){const r=Yge(...t);return(n,i)=>{switch(n){case lu:return Er(e,r(i));case Vf:sT(e);return}}}function BV(e,t){return e===t}function Ur(e=BV){let t;return r=>n=>{e(t,n)||(t=n,r(n))}}function Rt(e){return t=>r=>{e(r)&&t(r)}}function Qe(e){return t=>FV(t,e)}function Fa(e){return t=>()=>t(e)}function qa(e,t){return r=>n=>r(t=e(t,n))}function Sf(e){return t=>r=>{e>0?e--:t(r)}}function jl(e){let t=null,r;return n=>i=>{t=i,!r&&(r=setTimeout(()=>{r=void 0,n(t)},e))}}function Z2(e){let t,r;return n=>i=>{t=i,r&&clearTimeout(r),r=setTimeout(()=>{n(t)},e)}}function Ut(...e){const t=new Array(e.length);let r=0,n=null;const i=Math.pow(2,e.length)-1;return e.forEach((o,a)=>{const l=Math.pow(2,a);Er(o,c=>{const d=r;r=r|l,t[a]=c,d!==i&&r===i&&n&&(n(),n=null)})}),o=>a=>{const l=()=>o([a].concat(t));r===i?l():n=l}}function eA(...e){return function(t,r){switch(t){case lu:return Gge(...e.map(n=>Er(n,r)));case Vf:return;default:throw new Error(`unrecognized action ${t}`)}}}function kt(e,t=BV){return De(e,Ur(t))}function Vn(...e){const t=tr(),r=new Array(e.length);let n=0;const i=Math.pow(2,e.length)-1;return e.forEach((o,a)=>{const l=Math.pow(2,a);Er(o,c=>{r[a]=c,n=n|l,n===i&&Nt(t,r)})}),function(o,a){switch(o){case lu:return n===i&&a(r),Er(t,a);case Vf:return sT(t);default:throw new Error(`unrecognized action ${o}`)}}}function yr(e,t=[],{singleton:r}={singleton:!0}){return{id:Xge(),constructor:e,dependencies:t,singleton:r}}const Xge=()=>Symbol();function Jge(e){const t=new Map,r=({id:n,constructor:i,dependencies:o,singleton:a})=>{if(a&&t.has(n))return t.get(n);const l=i(o.map(c=>r(c)));return a&&t.set(n,l),l};return r(e)}function Zge(e,t){const r={},n={};let i=0;const o=e.length;for(;i<o;)n[e[i]]=1,i+=1;for(const a in t)n.hasOwnProperty(a)||(r[a]=t[a]);return r}const Rg=typeof document<"u"?Re.useLayoutEffect:Re.useEffect;function VV(e,t,r){const n=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),o=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),l=Re.createContext({});function c(_,S){_.propsReady&&Nt(_.propsReady,!1);for(const C of n){const k=_[t.required[C]];Nt(k,S[C])}for(const C of i)if(C in S){const k=_[t.optional[C]];Nt(k,S[C])}_.propsReady&&Nt(_.propsReady,!0)}function d(_){return o.reduce((S,C)=>(S[C]=k=>{const E=_[t.methods[C]];Nt(E,k)},S),{})}function f(_){return a.reduce((S,C)=>(S[C]=Qge(_[t.events[C]]),S),{})}const p=Re.forwardRef((_,S)=>{const{children:C,...k}=_,[E]=Re.useState(()=>cw(Jge(e),T=>c(T,k))),[R]=Re.useState(X2(f,E));return Rg(()=>{for(const T of a)T in k&&Er(R[T],k[T]);return()=>{Object.values(R).map(sT)}},[k,R,E]),Rg(()=>{c(E,k)}),Re.useImperativeHandle(S,J2(d(E))),Re.createElement(l.Provider,{value:E},r?Re.createElement(r,Zge([...n,...i,...a],k),C):C)}),m=_=>Re.useCallback(LV(Nt,Re.useContext(l)[_]),[_]),g=_=>{const C=Re.useContext(l)[_],k=Re.useCallback(E=>Er(C,E),[C]);return Re.useSyncExternalStore(k,()=>di(C),()=>di(C))},b=_=>{const C=Re.useContext(l)[_],[k,E]=Re.useState(X2(di,C));return Rg(()=>Er(C,R=>{R!==k&&E(J2(R))}),[C,k]),k},y=Re.version.startsWith("18")?g:b;return{Component:p,usePublisher:m,useEmitterValue:y,useEmitter:(_,S)=>{const k=Re.useContext(l)[_];Rg(()=>Er(k,S),[S,k])}}}const eye=typeof document<"u"?Re.useLayoutEffect:Re.useEffect,tye=eye;var co=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(co||{});const rye={0:"debug",1:"log",2:"warn",3:"error"},nye=()=>typeof globalThis>"u"?window:globalThis,uu=yr(()=>{const e=Ve(3);return{log:Ve((r,n,i=1)=>{var o;const a=(o=nye().VIRTUOSO_LOG_LEVEL)!=null?o:di(e);i>=a&&console[rye[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",r,n)}),logLevel:e}},[],{singleton:!0});function lT(e,t=!0){const r=Re.useRef(null);let n=i=>{};if(typeof ResizeObserver<"u"){const i=Re.useMemo(()=>new ResizeObserver(o=>{requestAnimationFrame(()=>{const a=o[0].target;a.offsetParent!==null&&e(a)})}),[e]);n=o=>{o&&t?(i.observe(o),r.current=o):(r.current&&i.unobserve(r.current),r.current=null)}}return{ref:r,callbackRef:n}}function Rc(e,t=!0){return lT(e,t).callbackRef}function iye(e,t,r,n,i,o,a){const l=Re.useCallback(c=>{const d=oye(c.children,t,"offsetHeight",i);let f=c.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const p=f.lastElementChild.dataset.viewportType==="window",m=a?a.scrollTop:p?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,g=a?a.scrollHeight:p?document.documentElement.scrollHeight:f.scrollHeight,b=a?a.offsetHeight:p?window.innerHeight:f.offsetHeight;n({scrollTop:Math.max(m,0),scrollHeight:g,viewportHeight:b}),o==null||o(aye("row-gap",getComputedStyle(c).rowGap,i)),d!==null&&e(d)},[e,t,i,o,a,n]);return lT(l,r)}function oye(e,t,r,n){const i=e.length;if(i===0)return null;const o=[];for(let a=0;a<i;a++){const l=e.item(a);if(!l||l.dataset.index===void 0)continue;const c=parseInt(l.dataset.index),d=parseFloat(l.dataset.knownSize),f=t(l,r);if(f===0&&n("Zero-sized element, this should not happen",{child:l},co.ERROR),f===d)continue;const p=o[o.length-1];o.length===0||p.size!==f||p.endIndex!==c-1?o.push({startIndex:c,endIndex:c,size:f}):o[o.length-1].endIndex++}return o}function aye(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,co.WARN),t==="normal"?0:parseInt(t??"0",10)}function Zl(e,t){return Math.round(e.getBoundingClientRect()[t])}function zV(e,t){return Math.abs(e-t)<1.01}function qV(e,t,r,n=Oc,i){const o=Re.useRef(null),a=Re.useRef(null),l=Re.useRef(null),c=Re.useCallback(p=>{const m=p.target,g=m===window||m===document,b=g?window.pageYOffset||document.documentElement.scrollTop:m.scrollTop,y=g?document.documentElement.scrollHeight:m.scrollHeight,w=g?window.innerHeight:m.offsetHeight,_=()=>{e({scrollTop:Math.max(b,0),scrollHeight:y,viewportHeight:w})};p.suppressFlushSync?_():OM.flushSync(_),a.current!==null&&(b===a.current||b<=0||b===y-w)&&(a.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);Re.useEffect(()=>{const p=i||o.current;return n(i||o.current),c({target:p,suppressFlushSync:!0}),p.addEventListener("scroll",c,{passive:!0}),()=>{n(null),p.removeEventListener("scroll",c)}},[o,c,r,n,i]);function d(p){const m=o.current;if(!m||"offsetHeight"in m&&m.offsetHeight===0)return;const g=p.behavior==="smooth";let b,y,w;m===window?(y=Math.max(Zl(document.documentElement,"height"),document.documentElement.scrollHeight),b=window.innerHeight,w=document.documentElement.scrollTop):(y=m.scrollHeight,b=Zl(m,"height"),w=m.scrollTop);const _=y-b;if(p.top=Math.ceil(Math.max(Math.min(_,p.top),0)),zV(b,y)||p.top===w){e({scrollTop:w,scrollHeight:y,viewportHeight:b}),g&&t(!0);return}g?(a.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,a.current=null,t(!0)},1e3)):a.current=null,m.scrollTo(p)}function f(p){o.current.scrollBy(p)}return{scrollerRef:o,scrollByCallback:f,scrollToCallback:d}}const Ti=yr(()=>{const e=tr(),t=tr(),r=Ve(0),n=tr(),i=Ve(0),o=tr(),a=tr(),l=Ve(0),c=Ve(0),d=Ve(0),f=Ve(0),p=tr(),m=tr(),g=Ve(!1);return lt(De(e,Qe(({scrollTop:b})=>b)),t),lt(De(e,Qe(({scrollHeight:b})=>b)),a),lt(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:o,headerHeight:l,fixedHeaderHeight:c,fixedFooterHeight:d,footerHeight:f,scrollHeight:a,smoothScrollTargetReached:n,scrollTo:p,scrollBy:m,statefulScrollTop:i,deviation:r,scrollingInProgress:g}},[],{singleton:!0}),fm={lvl:0};function UV(e,t,r,n=fm,i=fm){return{k:e,v:t,lvl:r,l:n,r:i}}function jr(e){return e===fm}function Jd(){return fm}function DP(e,t){if(jr(e))return fm;const{k:r,l:n,r:i}=e;if(t===r){if(jr(n))return i;if(jr(i))return n;{const[o,a]=HV(n);return rb(kn(e,{k:o,v:a,l:WV(n)}))}}else return t<r?rb(kn(e,{l:DP(n,t)})):rb(kn(e,{r:DP(i,t)}))}function hm(e,t){if(!jr(e))return t===e.k?e.v:t<e.k?hm(e.l,t):hm(e.r,t)}function va(e,t,r="k"){if(jr(e))return[-1/0,void 0];if(Number(e[r])===t)return[e.k,e.v];if(Number(e[r])<t){const n=va(e.r,t,r);return n[0]===-1/0?[e.k,e.v]:n}return va(e.l,t,r)}function oo(e,t,r){return jr(e)?UV(t,r,1):t===e.k?kn(e,{k:t,v:r}):t<e.k?tA(kn(e,{l:oo(e.l,t,r)})):tA(kn(e,{r:oo(e.r,t,r)}))}function MP(e,t,r){if(jr(e))return[];const{k:n,v:i,l:o,r:a}=e;let l=[];return n>t&&(l=l.concat(MP(o,t,r))),n>=t&&n<=r&&l.push({k:n,v:i}),n<=r&&(l=l.concat(MP(a,t,r))),l}function Uu(e){return jr(e)?[]:[...Uu(e.l),{k:e.k,v:e.v},...Uu(e.r)]}function HV(e){return jr(e.r)?[e.k,e.v]:HV(e.r)}function WV(e){return jr(e.r)?e.l:rb(kn(e,{r:WV(e.r)}))}function kn(e,t){return UV(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function R_(e){return jr(e)||e.lvl>e.r.lvl}function tA(e){return NP(GV(e))}function rb(e){const{l:t,r,lvl:n}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(R_(t))return GV(kn(e,{lvl:n-1}));if(!jr(t)&&!jr(t.r))return kn(t.r,{l:kn(t,{r:t.r.l}),r:kn(e,{l:t.r.r,lvl:n-1}),lvl:n});throw new Error("Unexpected empty nodes")}else{if(R_(e))return NP(kn(e,{lvl:n-1}));if(!jr(r)&&!jr(r.l)){const i=r.l,o=R_(i)?r.lvl-1:r.lvl;return kn(i,{l:kn(e,{r:i.l,lvl:n-1}),r:NP(kn(r,{l:i.r,lvl:o})),lvl:i.lvl+1})}else throw new Error("Unexpected empty nodes")}}function dw(e,t,r){if(jr(e))return[];const n=va(e,t)[0];return sye(MP(e,n,r))}function KV(e,t){const r=e.length;if(r===0)return[];let{index:n,value:i}=t(e[0]);const o=[];for(let a=1;a<r;a++){const{index:l,value:c}=t(e[a]);o.push({start:n,end:l-1,value:i}),n=l,i=c}return o.push({start:n,end:1/0,value:i}),o}function sye(e){return KV(e,({k:t,v:r})=>({index:t,value:r}))}function NP(e){const{r:t,lvl:r}=e;return!jr(t)&&!jr(t.r)&&t.lvl===r&&t.r.lvl===r?kn(t,{l:kn(e,{r:t.l}),lvl:r+1}):e}function GV(e){const{l:t}=e;return!jr(t)&&t.lvl===e.lvl?kn(t,{r:kn(e,{l:t.r})}):e}function Ub(e,t,r,n=0){let i=e.length-1;for(;n<=i;){const o=Math.floor((n+i)/2),a=e[o],l=r(a,t);if(l===0)return o;if(l===-1){if(i-n<2)return o-1;i=o-1}else{if(i===n)return o;n=o+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function QV(e,t,r){return e[Ub(e,t,r)]}function lye(e,t,r,n){const i=Ub(e,t,n),o=Ub(e,r,n,i);return e.slice(i,o+1)}const uT=yr(()=>({recalcInProgress:Ve(!1)}),[],{singleton:!0});function uye(e){const{size:t,startIndex:r,endIndex:n}=e;return i=>i.start===r&&(i.end===n||i.end===1/0)&&i.value===t}function rA(e,t){let r=0,n=0;for(;r<e;)r+=t[n+1]-t[n]-1,n++;return n-(r===e?0:1)}function cye(e,t){let r=jr(e)?0:1/0;for(const n of t){const{size:i,startIndex:o,endIndex:a}=n;if(r=Math.min(r,o),jr(e)){e=oo(e,0,i);continue}const l=dw(e,o-1,a+1);if(l.some(uye(n)))continue;let c=!1,d=!1;for(const{start:f,end:p,value:m}of l)c?(a>=f||i===m)&&(e=DP(e,f)):(d=m!==i,c=!0),p>a&&a>=f&&m!==i&&(e=oo(e,a+1,m));d&&(e=oo(e,o,i))}return[e,r]}function dye(){return{offsetTree:[],sizeTree:Jd(),groupOffsetTree:Jd(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function cT({index:e},t){return t===e?0:t<e?-1:1}function fye({offset:e},t){return t===e?0:t<e?-1:1}function hye(e){return{index:e.index,value:e}}function pye(e,t,r,n=0){return n>0&&(t=Math.max(t,QV(e,n,cT).offset)),KV(lye(e,t,r,fye),hye)}function FP(e,t,r,n){let i=e,o=0,a=0,l=0,c=0;if(t!==0){c=Ub(i,t-1,cT),l=i[c].offset;const f=va(r,t-1);o=f[0],a=f[1],i.length&&i[c].size===va(r,t)[1]&&(c-=1),i=i.slice(0,c+1)}else i=[];for(const{start:d,value:f}of dw(r,t,1/0)){const p=d-o,m=p*a+l+p*n;i.push({offset:m,size:f,index:d}),o=d,l=m,a=f}return{offsetTree:i,lastIndex:o,lastOffset:l,lastSize:a}}function mye(e,[t,r,n,i]){t.length>0&&n("received item sizes",t,co.DEBUG);const o=e.sizeTree;let a=o,l=0;if(r.length>0&&jr(o)&&t.length===2){const m=t[0].size,g=t[1].size;a=r.reduce((b,y)=>oo(oo(b,y,m),y+1,g),a)}else[a,l]=cye(a,t);if(a===o)return e;const{offsetTree:c,lastIndex:d,lastSize:f,lastOffset:p}=FP(e.offsetTree,l,a,i);return{sizeTree:a,offsetTree:c,lastIndex:d,lastOffset:p,lastSize:f,groupOffsetTree:r.reduce((m,g)=>oo(m,g,pm(g,c,i)),Jd()),groupIndices:r}}function pm(e,t,r){if(t.length===0)return 0;const{offset:n,index:i,size:o}=QV(t,e,cT),a=e-i,l=o*a+(a-1)*r+n;return l>0?l+r:l}function vye(e){return typeof e.groupIndex<"u"}function YV(e,t,r){if(vye(e))return t.groupIndices[e.groupIndex]+1;{const n=e.index==="LAST"?r:e.index;let i=XV(n,t);return i=Math.max(0,i,Math.min(r,i)),i}}function XV(e,t){if(!fw(t))return e;let r=0;for(;t.groupIndices[r]<=e+r;)r++;return e+r}function fw(e){return!jr(e.groupOffsetTree)}function gye(e){return Uu(e).map(({k:t,v:r},n,i)=>{const o=i[n+1],a=o?o.k-1:1/0;return{startIndex:t,endIndex:a,size:r}})}const yye={offsetHeight:"height",offsetWidth:"width"},os=yr(([{log:e},{recalcInProgress:t}])=>{const r=tr(),n=tr(),i=fi(n,0),o=tr(),a=tr(),l=Ve(0),c=Ve([]),d=Ve(void 0),f=Ve(void 0),p=Ve((E,R)=>Zl(E,yye[R])),m=Ve(void 0),g=Ve(0),b=dye(),y=fi(De(r,Ut(c,e,g),qa(mye,b),Ur()),b),w=fi(De(c,Ur(),qa((E,R)=>({prev:E.current,current:R}),{prev:[],current:[]}),Qe(({prev:E})=>E)),[]);lt(De(c,Rt(E=>E.length>0),Ut(y,g),Qe(([E,R,T])=>{const A=E.reduce((M,B,Q)=>oo(M,B,pm(B,R.offsetTree,T)||Q),Jd());return{...R,groupIndices:E,groupOffsetTree:A}})),y),lt(De(n,Ut(y),Rt(([E,{lastIndex:R}])=>E<R),Qe(([E,{lastIndex:R,lastSize:T}])=>[{startIndex:E,endIndex:R,size:T}])),r),lt(d,f);const _=fi(De(d,Qe(E=>E===void 0)),!0);lt(De(f,Rt(E=>E!==void 0&&jr(di(y).sizeTree)),Qe(E=>[{startIndex:0,endIndex:0,size:E}])),r);const S=uo(De(r,Ut(y),qa(({sizes:E},[R,T])=>({changed:T!==E,sizes:T}),{changed:!1,sizes:b}),Qe(E=>E.changed)));Er(De(l,qa((E,R)=>({diff:E.prev-R,prev:R}),{diff:0,prev:0}),Qe(E=>E.diff)),E=>{const{groupIndices:R}=di(y);if(E>0)Nt(t,!0),Nt(o,E+rA(E,R));else if(E<0){const T=di(w);T.length>0&&(E-=rA(-E,T)),Nt(a,E)}}),Er(De(l,Ut(e)),([E,R])=>{E<0&&R("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},co.ERROR)});const C=uo(o);lt(De(o,Ut(y),Qe(([E,R])=>{const T=R.groupIndices.length>0,A=[],M=R.lastSize;if(T){const B=hm(R.sizeTree,0);let Q=0,se=0;for(;Q<E;){const X=R.groupIndices[se],ce=R.groupIndices.length===se+1?1/0:R.groupIndices[se+1]-X-1;A.push({startIndex:X,endIndex:X,size:B}),A.push({startIndex:X+1,endIndex:X+1+ce-1,size:M}),se++,Q+=ce+1}const ie=Uu(R.sizeTree);return Q!==E&&ie.shift(),ie.reduce((X,{k:ce,v:ne})=>{let ee=X.ranges;return X.prevSize!==0&&(ee=[...X.ranges,{startIndex:X.prevIndex,endIndex:ce+E-1,size:X.prevSize}]),{ranges:ee,prevIndex:ce+E,prevSize:ne}},{ranges:A,prevIndex:E,prevSize:0}).ranges}return Uu(R.sizeTree).reduce((B,{k:Q,v:se})=>({ranges:[...B.ranges,{startIndex:B.prevIndex,endIndex:Q+E-1,size:B.prevSize}],prevIndex:Q+E,prevSize:se}),{ranges:[],prevIndex:0,prevSize:M}).ranges})),r);const k=uo(De(a,Ut(y,g),Qe(([E,{offsetTree:R},T])=>{const A=-E;return pm(A,R,T)})));return lt(De(a,Ut(y,g),Qe(([E,R,T])=>{if(R.groupIndices.length>0){if(jr(R.sizeTree))return R;let M=Jd();const B=di(w);let Q=0,se=0,ie=0;for(;Q<-E;){ie=B[se];const X=B[se+1]-ie-1;se++,Q+=X+1}if(M=Uu(R.sizeTree).reduce((X,{k:ce,v:ne})=>oo(X,Math.max(0,ce+E),ne),M),Q!==-E){const X=hm(R.sizeTree,ie);M=oo(M,0,X);const ce=va(R.sizeTree,-E+1)[1];M=oo(M,1,ce)}return{...R,sizeTree:M,...FP(R.offsetTree,0,M,T)}}else{const M=Uu(R.sizeTree).reduce((B,{k:Q,v:se})=>oo(B,Math.max(0,Q+E),se),Jd());return{...R,sizeTree:M,...FP(R.offsetTree,0,M,T)}}})),y),{data:m,totalCount:n,sizeRanges:r,groupIndices:c,defaultItemSize:f,fixedItemSize:d,unshiftWith:o,shiftWith:a,shiftWithOffset:k,beforeUnshiftWith:C,firstItemIndex:l,gap:g,sizes:y,listRefresh:S,statefulTotalCount:i,trackItemSizes:_,itemSize:p}},Kr(uu,uT),{singleton:!0}),bye=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function JV(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!bye)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const ev=yr(([{sizes:e,totalCount:t,listRefresh:r,gap:n},{scrollingInProgress:i,viewportHeight:o,scrollTo:a,smoothScrollTargetReached:l,headerHeight:c,footerHeight:d,fixedHeaderHeight:f,fixedFooterHeight:p},{log:m}])=>{const g=tr(),b=tr(),y=Ve(0);let w=null,_=null,S=null;function C(){w&&(w(),w=null),S&&(S(),S=null),_&&(clearTimeout(_),_=null),Nt(i,!1)}return lt(De(g,Ut(e,o,t,y,c,d,m),Ut(n,f,p),Qe(([[k,E,R,T,A,M,B,Q],se,ie,N])=>{const X=JV(k),{align:ce,behavior:ne,offset:ee}=X,ge=T-1,Z=YV(X,E,ge);let j=pm(Z,E.offsetTree,se)+M;ce==="end"?(j+=ie+va(E.sizeTree,Z)[1]-R+N,Z===ge&&(j+=B)):ce==="center"?j+=(ie+va(E.sizeTree,Z)[1]-R+N)/2:j-=A,ee&&(j+=ee);const U=q=>{C(),q?(Q("retrying to scroll to",{location:k},co.DEBUG),Nt(g,k)):(Nt(b,!0),Q("list did not change, scroll successful",{},co.DEBUG))};if(C(),ne==="smooth"){let q=!1;S=Er(r,$=>{q=q||$}),w=ts(l,()=>{U(q)})}else w=ts(De(r,wye(150)),U);return _=setTimeout(()=>{C()},1200),Nt(i,!0),Q("scrolling from index to",{index:Z,top:j,behavior:ne},co.DEBUG),{top:j,behavior:ne}})),a),{scrollToIndex:g,scrollTargetReached:b,topListHeight:y}},Kr(os,Ti,uu),{singleton:!0});function wye(e){return t=>{const r=setTimeout(()=>{t(!1)},e);return n=>{n&&(t(!0),clearTimeout(r))}}}const mm="up",Cp="down",Sye="none",_ye={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},xye=0,tv=yr(([{scrollContainerState:e,scrollTop:t,viewportHeight:r,headerHeight:n,footerHeight:i,scrollBy:o}])=>{const a=Ve(!1),l=Ve(!0),c=tr(),d=tr(),f=Ve(4),p=Ve(xye),m=fi(De(eA(De(kt(t),Sf(1),Fa(!0)),De(kt(t),Sf(1),Fa(!1),Z2(100))),Ur()),!1),g=fi(De(eA(De(o,Fa(!0)),De(o,Fa(!1),Z2(200))),Ur()),!1);lt(De(Vn(kt(t),kt(p)),Qe(([S,C])=>S<=C),Ur()),l),lt(De(l,jl(50)),d);const b=uo(De(Vn(e,kt(r),kt(n),kt(i),kt(f)),qa((S,[{scrollTop:C,scrollHeight:k},E,R,T,A])=>{const M=C+E-k>-A,B={viewportHeight:E,scrollTop:C,scrollHeight:k};if(M){let se,ie;return C>S.state.scrollTop?(se="SCROLLED_DOWN",ie=S.state.scrollTop-C):(se="SIZE_DECREASED",ie=S.state.scrollTop-C||S.scrollTopDelta),{atBottom:!0,state:B,atBottomBecause:se,scrollTopDelta:ie}}let Q;return B.scrollHeight>S.state.scrollHeight?Q="SIZE_INCREASED":E<S.state.viewportHeight?Q="VIEWPORT_HEIGHT_DECREASING":C<S.state.scrollTop?Q="SCROLLING_UPWARDS":Q="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:Q,state:B}},_ye),Ur((S,C)=>S&&S.atBottom===C.atBottom))),y=fi(De(e,qa((S,{scrollTop:C,scrollHeight:k,viewportHeight:E})=>{if(zV(S.scrollHeight,k))return{scrollTop:C,scrollHeight:k,jump:0,changed:!1};{const R=k-(C+E)<1;return S.scrollTop!==C&&R?{scrollHeight:k,scrollTop:C,jump:S.scrollTop-C,changed:!0}:{scrollHeight:k,scrollTop:C,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),Rt(S=>S.changed),Qe(S=>S.jump)),0);lt(De(b,Qe(S=>S.atBottom)),a),lt(De(a,jl(50)),c);const w=Ve(Cp);lt(De(e,Qe(({scrollTop:S})=>S),Ur(),qa((S,C)=>di(g)?{direction:S.direction,prevScrollTop:C}:{direction:C<S.prevScrollTop?mm:Cp,prevScrollTop:C},{direction:Cp,prevScrollTop:0}),Qe(S=>S.direction)),w),lt(De(e,jl(50),Fa(Sye)),w);const _=Ve(0);return lt(De(m,Rt(S=>!S),Fa(0)),_),lt(De(t,jl(100),Ut(m),Rt(([S,C])=>!!C),qa(([S,C],[k])=>[C,k],[0,0]),Qe(([S,C])=>C-S)),_),{isScrolling:m,isAtTop:l,isAtBottom:a,atBottomState:b,atTopStateChange:d,atBottomStateChange:c,scrollDirection:w,atBottomThreshold:f,atTopThreshold:p,scrollVelocity:_,lastJumpDueToItemResize:y}},Kr(Ti)),cu=yr(([{log:e}])=>{const t=Ve(!1),r=uo(De(t,Rt(n=>n),Ur()));return Er(t,n=>{n&&di(e)("props updated",{},co.DEBUG)}),{propsReady:t,didMount:r}},Kr(uu),{singleton:!0});function dT(e,t){e==0?t():requestAnimationFrame(()=>dT(e-1,t))}function fT(e,t){const r=t-1;return typeof e=="number"?e:e.index==="LAST"?r:e.index}const rv=yr(([{sizes:e,listRefresh:t,defaultItemSize:r},{scrollTop:n},{scrollToIndex:i,scrollTargetReached:o},{didMount:a}])=>{const l=Ve(!0),c=Ve(0),d=Ve(!0);return lt(De(a,Ut(c),Rt(([f,p])=>!!p),Fa(!1)),l),lt(De(a,Ut(c),Rt(([f,p])=>!!p),Fa(!1)),d),Er(De(Vn(t,a),Ut(l,e,r,d),Rt(([[,f],p,{sizeTree:m},g,b])=>f&&(!jr(m)||aT(g))&&!p&&!b),Ut(c)),([,f])=>{ts(o,()=>{Nt(d,!0)}),dT(4,()=>{ts(n,()=>{Nt(l,!0)}),Nt(i,f)})}),{scrolledToInitialItem:l,initialTopMostItemIndex:c,initialItemFinalLocationReached:d}},Kr(os,Ti,ev,cu),{singleton:!0});function nA(e){return e?e==="smooth"?"smooth":"auto":!1}const Pye=(e,t)=>typeof e=="function"?nA(e(t)):t&&nA(e),Cye=yr(([{totalCount:e,listRefresh:t},{isAtBottom:r,atBottomState:n},{scrollToIndex:i},{scrolledToInitialItem:o},{propsReady:a,didMount:l},{log:c},{scrollingInProgress:d}])=>{const f=Ve(!1),p=tr();let m=null;function g(y){Nt(i,{index:"LAST",align:"end",behavior:y})}Er(De(Vn(De(kt(e),Sf(1)),l),Ut(kt(f),r,o,d),Qe(([[y,w],_,S,C,k])=>{let E=w&&C,R="auto";return E&&(R=Pye(_,S||k),E=E&&!!R),{totalCount:y,shouldFollow:E,followOutputBehavior:R}}),Rt(({shouldFollow:y})=>y)),({totalCount:y,followOutputBehavior:w})=>{m&&(m(),m=null),m=ts(t,()=>{di(c)("following output to ",{totalCount:y},co.DEBUG),g(w),m=null})});function b(y){const w=ts(n,_=>{y&&!_.atBottom&&_.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(di(c)("scrolling to bottom due to increased size",{},co.DEBUG),g("auto"))});setTimeout(w,100)}return Er(De(Vn(kt(f),e,a),Rt(([y,,w])=>y&&w),qa(({value:y},[,w])=>({refreshed:y===w,value:w}),{refreshed:!1,value:0}),Rt(({refreshed:y})=>y),Ut(f,e)),([,y])=>{di(o)&&b(y!==!1)}),Er(p,()=>{b(di(f)!==!1)}),Er(Vn(kt(f),n),([y,w])=>{y&&!w.atBottom&&w.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&g("auto")}),{followOutput:f,autoscrollToBottom:p}},Kr(os,tv,ev,rv,cu,uu,Ti));function Eye(e){return e.reduce((t,r)=>(t.groupIndices.push(t.totalCount),t.totalCount+=r+1,t),{totalCount:0,groupIndices:[]})}const ZV=yr(([{totalCount:e,groupIndices:t,sizes:r},{scrollTop:n,headerHeight:i}])=>{const o=tr(),a=tr(),l=uo(De(o,Qe(Eye)));return lt(De(l,Qe(c=>c.totalCount)),e),lt(De(l,Qe(c=>c.groupIndices)),t),lt(De(Vn(n,r,i),Rt(([c,d])=>fw(d)),Qe(([c,d,f])=>va(d.groupOffsetTree,Math.max(c-f,0),"v")[0]),Ur(),Qe(c=>[c])),a),{groupCounts:o,topItemsIndexes:a}},Kr(os,Ti));function vm(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function e3(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Hb="top",Wb="bottom",iA="none";function oA(e,t,r){return typeof e=="number"?r===mm&&t===Hb||r===Cp&&t===Wb?e:0:r===mm?t===Hb?e.main:e.reverse:t===Wb?e.main:e.reverse}function aA(e,t){return typeof e=="number"?e:e[t]||0}const hT=yr(([{scrollTop:e,viewportHeight:t,deviation:r,headerHeight:n,fixedHeaderHeight:i}])=>{const o=tr(),a=Ve(0),l=Ve(0),c=Ve(0),d=fi(De(Vn(kt(e),kt(t),kt(n),kt(o,vm),kt(c),kt(a),kt(i),kt(r),kt(l)),Qe(([f,p,m,[g,b],y,w,_,S,C])=>{const k=f-S,E=w+_,R=Math.max(m-k,0);let T=iA;const A=aA(C,Hb),M=aA(C,Wb);return g-=S,g+=m+_,b+=m+_,b-=S,g>f+E-A&&(T=mm),b<f-R+p+M&&(T=Cp),T!==iA?[Math.max(k-m-oA(y,Hb,T)-A,0),k-R-_+p+oA(y,Wb,T)+M]:null}),Rt(f=>f!=null),Ur(vm)),[0,0]);return{listBoundary:o,overscan:c,topListHeight:a,increaseViewportBy:l,visibleRange:d}},Kr(Ti),{singleton:!0});function Tye(e,t,r){if(fw(t)){const n=XV(e,t);return[{index:va(t.groupOffsetTree,n)[0],size:0,offset:0},{index:n,size:0,offset:0,data:r&&r[0]}]}return[{index:e,size:0,offset:0,data:r&&r[0]}]}const I_={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function sA(e,t,r){if(e.length===0)return[];if(!fw(t))return e.map(d=>({...d,index:d.index+r,originalIndex:d.index}));const n=e[0].index,i=e[e.length-1].index,o=[],a=dw(t.groupOffsetTree,n,i);let l,c=0;for(const d of e){(!l||l.end<d.index)&&(l=a.shift(),c=t.groupIndices.indexOf(l.start));let f;d.index===l.start?f={type:"group",index:c}:f={index:d.index-(c+1)+r,groupIndex:c},o.push({...f,size:d.size,offset:d.offset,originalIndex:d.index,data:d.data})}return o}function nb(e,t,r,n,i,o){const{lastSize:a,lastOffset:l,lastIndex:c}=i;let d=0,f=0;if(e.length>0){d=e[0].offset;const y=e[e.length-1];f=y.offset+y.size}const p=r-c,m=l+p*a+(p-1)*n,g=d,b=m-f;return{items:sA(e,i,o),topItems:sA(t,i,o),topListHeight:t.reduce((y,w)=>w.size+y,0),offsetTop:d,offsetBottom:b,top:g,bottom:f,totalCount:r,firstItemIndex:o}}function t3(e,t,r,n,i,o){let a=0;if(r.groupIndices.length>0)for(const f of r.groupIndices){if(f-a>=e)break;a++}const l=e+a,c=fT(t,l),d=Array.from({length:l}).map((f,p)=>({index:p+c,size:0,offset:0,data:o[p+c]}));return nb(d,[],l,i,r,n)}const Ic=yr(([{sizes:e,totalCount:t,data:r,firstItemIndex:n,gap:i},o,{visibleRange:a,listBoundary:l,topListHeight:c},{scrolledToInitialItem:d,initialTopMostItemIndex:f},{topListHeight:p},m,{didMount:g},{recalcInProgress:b}])=>{const y=Ve([]),w=Ve(0),_=tr();lt(o.topItemsIndexes,y);const S=fi(De(Vn(g,b,kt(a,vm),kt(t),kt(e),kt(f),d,kt(y),kt(n),kt(i),r),Rt(([R,T,,A,,,,,,,M])=>{const B=M&&M.length!==A;return R&&!T&&!B}),Qe(([,,[R,T],A,M,B,Q,se,ie,N,X])=>{const ce=M,{sizeTree:ne,offsetTree:ee}=ce,ge=di(w);if(A===0)return{...I_,totalCount:A};if(R===0&&T===0)return ge===0?{...I_,totalCount:A}:t3(ge,B,M,ie,N,X||[]);if(jr(ne))return ge>0?null:nb(Tye(fT(B,A),ce,X),[],A,N,ce,ie);const Z=[];if(se.length>0){const F=se[0],V=se[se.length-1];let de=0;for(const pe of dw(ne,F,V)){const Ee=pe.value,Me=Math.max(pe.start,F),Y=Math.min(pe.end,V);for(let K=Me;K<=Y;K++)Z.push({index:K,size:Ee,offset:de,data:X&&X[K]}),de+=Ee}}if(!Q)return nb([],Z,A,N,ce,ie);const j=se.length>0?se[se.length-1]+1:0,U=pye(ee,R,T,j);if(U.length===0)return null;const q=A-1,$=cw([],F=>{for(const V of U){const de=V.value;let pe=de.offset,Ee=V.start;const Me=de.size;if(de.offset<R){Ee+=Math.floor((R-de.offset+N)/(Me+N));const K=Ee-V.start;pe+=K*Me+K*N}Ee<j&&(pe+=(j-Ee)*Me,Ee=j);const Y=Math.min(V.end,q);for(let K=Ee;K<=Y&&!(pe>=T);K++)F.push({index:K,size:Me,offset:pe,data:X&&X[K]}),pe+=Me+N}});return nb($,Z,A,N,ce,ie)}),Rt(R=>R!==null),Ur()),I_);lt(De(r,Rt(aT),Qe(R=>R==null?void 0:R.length)),t),lt(De(S,Qe(R=>R.topListHeight)),p),lt(p,c),lt(De(S,Qe(R=>[R.top,R.bottom])),l),lt(De(S,Qe(R=>R.items)),_);const C=uo(De(S,Rt(({items:R})=>R.length>0),Ut(t,r),Rt(([{items:R},T])=>R[R.length-1].originalIndex===T-1),Qe(([,R,T])=>[R-1,T]),Ur(vm),Qe(([R])=>R))),k=uo(De(S,jl(200),Rt(({items:R,topItems:T})=>R.length>0&&R[0].originalIndex===T.length),Qe(({items:R})=>R[0].index),Ur())),E=uo(De(S,Rt(({items:R})=>R.length>0),Qe(({items:R})=>{let T=0,A=R.length-1;for(;R[T].type==="group"&&T<A;)T++;for(;R[A].type==="group"&&A>T;)A--;return{startIndex:R[T].index,endIndex:R[A].index}}),Ur(e3)));return{listState:S,topItemsIndexes:y,endReached:C,startReached:k,rangeChanged:E,itemsRendered:_,initialItemCount:w,...m}},Kr(os,ZV,hT,rv,ev,tv,cu,uT),{singleton:!0}),Oye=yr(([{sizes:e,firstItemIndex:t,data:r,gap:n},{initialTopMostItemIndex:i},{initialItemCount:o,listState:a},{didMount:l}])=>(lt(De(l,Ut(o),Rt(([,c])=>c!==0),Ut(i,e,t,n,r),Qe(([[,c],d,f,p,m,g=[]])=>t3(c,d,f,p,m,g))),a),{}),Kr(os,rv,Ic,cu),{singleton:!0}),r3=yr(([{scrollVelocity:e}])=>{const t=Ve(!1),r=tr(),n=Ve(!1);return lt(De(e,Ut(n,t,r),Rt(([i,o])=>!!o),Qe(([i,o,a,l])=>{const{exit:c,enter:d}=o;if(a){if(c(i,l))return!1}else if(d(i,l))return!0;return a}),Ur()),t),Er(De(Vn(t,e,r),Ut(n)),([[i,o,a],l])=>i&&l&&l.change&&l.change(o,a)),{isSeeking:t,scrollSeekConfiguration:n,scrollVelocity:e,scrollSeekRangeChanged:r}},Kr(tv),{singleton:!0}),Rye=yr(([{topItemsIndexes:e}])=>{const t=Ve(0);return lt(De(t,Rt(r=>r>0),Qe(r=>Array.from({length:r}).map((n,i)=>i))),e),{topItemCount:t}},Kr(Ic)),n3=yr(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:r,fixedFooterHeight:n},{listState:i}])=>{const o=tr(),a=fi(De(Vn(e,n,t,r,i),Qe(([l,c,d,f,p])=>l+c+d+f+p.offsetBottom+p.bottom)),0);return lt(kt(a),o),{totalListHeight:a,totalListHeightChanged:o}},Kr(Ti,Ic),{singleton:!0});function i3(e){let t=!1,r;return()=>(t||(t=!0,r=e()),r)}const Iye=i3(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),kye=yr(([{scrollBy:e,scrollTop:t,deviation:r,scrollingInProgress:n},{isScrolling:i,isAtBottom:o,scrollDirection:a,lastJumpDueToItemResize:l},{listState:c},{beforeUnshiftWith:d,shiftWithOffset:f,sizes:p,gap:m},{log:g},{recalcInProgress:b}])=>{const y=uo(De(c,Ut(l),qa(([,_,S,C],[{items:k,totalCount:E,bottom:R,offsetBottom:T},A])=>{const M=R+T;let B=0;return S===E&&_.length>0&&k.length>0&&(k[0].originalIndex===0&&_[0].originalIndex===0||(B=M-C,B!==0&&(B+=A))),[B,k,E,M]},[0,[],0,0]),Rt(([_])=>_!==0),Ut(t,a,n,o,g,b),Rt(([,_,S,C,,,k])=>!k&&!C&&_!==0&&S===mm),Qe(([[_],,,,,S])=>(S("Upward scrolling compensation",{amount:_},co.DEBUG),_))));function w(_){_>0?(Nt(e,{top:-_,behavior:"auto"}),Nt(r,0)):(Nt(r,0),Nt(e,{top:-_,behavior:"auto"}))}return Er(De(y,Ut(r,i)),([_,S,C])=>{C&&Iye()?Nt(r,S-_):w(-_)}),Er(De(Vn(fi(i,!1),r,b),Rt(([_,S,C])=>!_&&!C&&S!==0),Qe(([_,S])=>S),jl(1)),w),lt(De(f,Qe(_=>({top:-_}))),e),Er(De(d,Ut(p,m),Qe(([_,{lastSize:S,groupIndices:C,sizeTree:k},E])=>{function R(T){return T*(S+E)}if(C.length===0)return R(_);{let T=0;const A=hm(k,0);let M=0,B=0;for(;M<_;){M++,T+=A;let Q=C.length===B+1?1/0:C[B+1]-C[B]-1;M+Q>_&&(T-=A,Q=_-M+1),M+=Q,T+=R(Q),B++}return T}})),_=>{Nt(r,_),requestAnimationFrame(()=>{Nt(e,{top:_}),requestAnimationFrame(()=>{Nt(r,0),Nt(b,!1)})})}),{deviation:r}},Kr(Ti,tv,Ic,os,uu,uT)),jye=yr(([{didMount:e},{scrollTo:t},{listState:r}])=>{const n=Ve(0);return Er(De(e,Ut(n),Rt(([,i])=>i!==0),Qe(([,i])=>({top:i}))),i=>{ts(De(r,Sf(1),Rt(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{Nt(t,i)})})}),{initialScrollTop:n}},Kr(cu,Ti,Ic),{singleton:!0}),$ye=yr(([{viewportHeight:e},{totalListHeight:t}])=>{const r=Ve(!1),n=fi(De(Vn(r,e,t),Rt(([i])=>i),Qe(([,i,o])=>Math.max(0,i-o)),jl(0),Ur()),0);return{alignToBottom:r,paddingTopAddition:n}},Kr(Ti,n3),{singleton:!0}),pT=yr(([{scrollTo:e,scrollContainerState:t}])=>{const r=tr(),n=tr(),i=tr(),o=Ve(!1),a=Ve(void 0);return lt(De(Vn(r,n),Qe(([{viewportHeight:l,scrollTop:c,scrollHeight:d},{offsetTop:f}])=>({scrollTop:Math.max(0,c-f),scrollHeight:d,viewportHeight:l}))),t),lt(De(e,Ut(n),Qe(([l,{offsetTop:c}])=>({...l,top:l.top+c}))),i),{useWindowScroll:o,customScrollParent:a,windowScrollContainerState:r,windowViewportRect:n,windowScrollTo:i}},Kr(Ti)),Aye=({itemTop:e,itemBottom:t,viewportTop:r,viewportBottom:n,locationParams:{behavior:i,align:o,...a}})=>e<r?{...a,behavior:i,align:o??"start"}:t>n?{...a,behavior:i,align:o??"end"}:null,Dye=yr(([{sizes:e,totalCount:t,gap:r},{scrollTop:n,viewportHeight:i,headerHeight:o,fixedHeaderHeight:a,fixedFooterHeight:l,scrollingInProgress:c},{scrollToIndex:d}])=>{const f=tr();return lt(De(f,Ut(e,i,t,o,a,l,n),Ut(r),Qe(([[p,m,g,b,y,w,_,S],C])=>{const{done:k,behavior:E,align:R,calculateViewLocation:T=Aye,...A}=p,M=YV(p,m,b-1),B=pm(M,m.offsetTree,C)+y+w,Q=B+va(m.sizeTree,M)[1],se=S+w,ie=S+g-_,N=T({itemTop:B,itemBottom:Q,viewportTop:se,viewportBottom:ie,locationParams:{behavior:E,align:R,...A}});return N?k&&ts(De(c,Rt(X=>X===!1),Sf(di(c)?1:2)),k):k&&k(),N}),Rt(p=>p!==null)),d),{scrollIntoView:f}},Kr(os,Ti,ev,Ic,uu),{singleton:!0}),Mye=yr(([{sizes:e,sizeRanges:t},{scrollTop:r},{initialTopMostItemIndex:n},{didMount:i},{useWindowScroll:o,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=tr(),d=Ve(void 0),f=Ve(null),p=Ve(null);return lt(a,f),lt(l,p),Er(De(c,Ut(e,r,o,f,p)),([m,g,b,y,w,_])=>{const S=gye(g.sizeTree);y&&w!==null&&_!==null&&(b=w.scrollTop-_.offsetTop),m({ranges:S,scrollTop:b})}),lt(De(d,Rt(aT),Qe(Nye)),n),lt(De(i,Ut(d),Rt(([,m])=>m!==void 0),Ur(),Qe(([,m])=>m.ranges)),t),{getState:c,restoreStateFrom:d}},Kr(os,Ti,rv,cu,pT));function Nye(e){return{offset:e.scrollTop,index:0,align:"start"}}const Fye=yr(([e,t,r,n,i,o,a,l,c,d])=>({...e,...t,...r,...n,...i,...o,...a,...l,...c,...d}),Kr(hT,Oye,cu,r3,n3,jye,$ye,pT,Dye,uu)),o3=yr(([{totalCount:e,sizeRanges:t,fixedItemSize:r,defaultItemSize:n,trackItemSizes:i,itemSize:o,data:a,firstItemIndex:l,groupIndices:c,statefulTotalCount:d,gap:f,sizes:p},{initialTopMostItemIndex:m,scrolledToInitialItem:g,initialItemFinalLocationReached:b},y,w,_,{listState:S,topItemsIndexes:C,...k},{scrollToIndex:E},R,{topItemCount:T},{groupCounts:A},M])=>(lt(k.rangeChanged,M.scrollSeekRangeChanged),lt(De(M.windowViewportRect,Qe(B=>B.visibleHeight)),y.viewportHeight),{totalCount:e,data:a,firstItemIndex:l,sizeRanges:t,initialTopMostItemIndex:m,scrolledToInitialItem:g,initialItemFinalLocationReached:b,topItemsIndexes:C,topItemCount:T,groupCounts:A,fixedItemHeight:r,defaultItemHeight:n,gap:f,..._,statefulTotalCount:d,listState:S,scrollToIndex:E,trackItemSizes:i,itemSize:o,groupIndices:c,...k,...M,...y,sizes:p,...w}),Kr(os,rv,Ti,Mye,Cye,Ic,ev,kye,Rye,ZV,Fye)),k_="-webkit-sticky",lA="sticky",a3=i3(()=>{if(typeof document>"u")return lA;const e=document.createElement("div");return e.style.position=k_,e.style.position===k_?k_:lA});function s3(e,t){const r=Re.useRef(null),n=Re.useCallback(l=>{if(l===null||!l.offsetParent)return;const c=l.getBoundingClientRect(),d=c.width;let f,p;if(t){const m=t.getBoundingClientRect(),g=c.top-m.top;f=m.height-Math.max(0,g),p=g+t.scrollTop}else f=window.innerHeight-Math.max(0,c.top),p=c.top+window.pageYOffset;r.current={offsetTop:p,visibleHeight:f,visibleWidth:d},e(r.current)},[e,t]),{callbackRef:i,ref:o}=lT(n),a=Re.useCallback(()=>{n(o.current)},[n,o]);return Re.useEffect(()=>{if(t){t.addEventListener("scroll",a);const l=new ResizeObserver(()=>{requestAnimationFrame(a)});return l.observe(t),()=>{t.removeEventListener("scroll",a),l.unobserve(t)}}else return window.addEventListener("scroll",a),window.addEventListener("resize",a),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}},[a,t]),i}const l3=Re.createContext(void 0),u3=Re.createContext(void 0);function mT(e){return e}const Lye=yr(()=>{const e=Ve(c=>`Item ${c}`),t=Ve(null),r=Ve(c=>`Group ${c}`),n=Ve({}),i=Ve(mT),o=Ve("div"),a=Ve(Oc),l=(c,d=null)=>fi(De(n,Qe(f=>f[c]),Ur()),d);return{context:t,itemContent:e,groupContent:r,components:n,computeItemKey:i,headerFooterTag:o,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),TopItemListComponent:l("TopItemList"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),GroupComponent:l("Group","div"),ScrollerComponent:l("Scroller","div"),EmptyPlaceholder:l("EmptyPlaceholder"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder")}}),Bye=yr(([e,t])=>({...e,...t}),Kr(o3,Lye)),Vye=({height:e})=>Re.createElement("div",{style:{height:e}}),zye={position:a3(),zIndex:1,overflowAnchor:"none"},qye={overflowAnchor:"none"},uA=Re.memo(function({showTopList:t=!1}){const r=Xt("listState"),n=No("sizeRanges"),i=Xt("useWindowScroll"),o=Xt("customScrollParent"),a=No("windowScrollContainerState"),l=No("scrollContainerState"),c=o||i?a:l,d=Xt("itemContent"),f=Xt("context"),p=Xt("groupContent"),m=Xt("trackItemSizes"),g=Xt("itemSize"),b=Xt("log"),y=No("gap"),{callbackRef:w}=iye(n,g,m,t?Oc:c,b,y,o),[_,S]=Re.useState(0);vT("deviation",N=>{_!==N&&S(N)});const C=Xt("EmptyPlaceholder"),k=Xt("ScrollSeekPlaceholder")||Vye,E=Xt("ListComponent"),R=Xt("ItemComponent"),T=Xt("GroupComponent"),A=Xt("computeItemKey"),M=Xt("isSeeking"),B=Xt("groupIndices").length>0,Q=Xt("alignToBottom"),se=Xt("initialItemFinalLocationReached"),ie=t?{}:{boxSizing:"border-box",paddingTop:r.offsetTop,paddingBottom:r.offsetBottom,marginTop:_!==0?_:Q?"auto":0,...se?{}:{visibility:"hidden"}};return!t&&r.totalCount===0&&C?Re.createElement(C,_i(C,f)):Re.createElement(E,{..._i(E,f),ref:w,style:ie,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?r.topItems:r.items).map(N=>{const X=N.originalIndex,ce=A(X+r.firstItemIndex,N.data,f);return M?Re.createElement(k,{..._i(k,f),key:ce,index:N.index,height:N.size,type:N.type||"item",...N.type==="group"?{}:{groupIndex:N.groupIndex}}):N.type==="group"?Re.createElement(T,{..._i(T,f),key:ce,"data-index":X,"data-known-size":N.size,"data-item-index":N.index,style:zye},p(N.index,f)):Re.createElement(R,{..._i(R,f),...Wye(R,N.data),key:ce,"data-index":X,"data-known-size":N.size,"data-item-index":N.index,"data-item-group-index":N.groupIndex,style:qye},B?d(N.index,N.groupIndex,N.data,f):d(N.index,N.data,f))}))}),Uye={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},hw=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),Hye={width:"100%",position:a3(),top:0,zIndex:1};function _i(e,t){if(typeof e!="string")return{context:t}}function Wye(e,t){return{item:typeof e=="string"?void 0:t}}const Kye=Re.memo(function(){const t=Xt("HeaderComponent"),r=No("headerHeight"),n=Xt("headerFooterTag"),i=Rc(a=>r(Zl(a,"height"))),o=Xt("context");return t?Re.createElement(n,{ref:i},Re.createElement(t,_i(t,o))):null}),Gye=Re.memo(function(){const t=Xt("FooterComponent"),r=No("footerHeight"),n=Xt("headerFooterTag"),i=Rc(a=>r(Zl(a,"height"))),o=Xt("context");return t?Re.createElement(n,{ref:i},Re.createElement(t,_i(t,o))):null});function c3({usePublisher:e,useEmitter:t,useEmitterValue:r}){return Re.memo(function({style:o,children:a,...l}){const c=e("scrollContainerState"),d=r("ScrollerComponent"),f=e("smoothScrollTargetReached"),p=r("scrollerRef"),m=r("context"),{scrollerRef:g,scrollByCallback:b,scrollToCallback:y}=qV(c,f,d,p);return t("scrollTo",y),t("scrollBy",b),Re.createElement(d,{ref:g,style:{...Uye,...o},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...l,..._i(d,m)},a)})}function d3({usePublisher:e,useEmitter:t,useEmitterValue:r}){return Re.memo(function({style:o,children:a,...l}){const c=e("windowScrollContainerState"),d=r("ScrollerComponent"),f=e("smoothScrollTargetReached"),p=r("totalListHeight"),m=r("deviation"),g=r("customScrollParent"),b=r("context"),{scrollerRef:y,scrollByCallback:w,scrollToCallback:_}=qV(c,f,d,Oc,g);return tye(()=>(y.current=g||window,()=>{y.current=null}),[y,g]),t("windowScrollTo",_),t("scrollBy",w),Re.createElement(d,{style:{position:"relative",...o,...p!==0?{height:p+m}:{}},"data-virtuoso-scroller":!0,...l,..._i(d,b)},a)})}const Qye=({children:e})=>{const t=Re.useContext(l3),r=No("viewportHeight"),n=No("fixedItemHeight"),i=Xt("alignToBottom"),o=Rc(FV(r,a=>Zl(a,"height")));return Re.useEffect(()=>{t&&(r(t.viewportHeight),n(t.itemHeight))},[t,r,n]),Re.createElement("div",{style:hw(i),ref:o,"data-viewport-type":"element"},e)},Yye=({children:e})=>{const t=Re.useContext(l3),r=No("windowViewportRect"),n=No("fixedItemHeight"),i=Xt("customScrollParent"),o=s3(r,i),a=Xt("alignToBottom");return Re.useEffect(()=>{t&&(n(t.itemHeight),r({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,r,n]),Re.createElement("div",{ref:o,style:hw(a),"data-viewport-type":"window"},e)},Xye=({children:e})=>{const t=Xt("TopItemListComponent")||"div",r=Xt("headerHeight"),n={...Hye,marginTop:`${r}px`},i=Xt("context");return Re.createElement(t,{style:n,..._i(t,i)},e)},Jye=Re.memo(function(t){const r=Xt("useWindowScroll"),n=Xt("topItemsIndexes").length>0,i=Xt("customScrollParent"),o=i||r?tbe:ebe,a=i||r?Yye:Qye;return Re.createElement(o,{...t},n&&Re.createElement(Xye,null,Re.createElement(uA,{showTopList:!0})),Re.createElement(a,null,Re.createElement(Kye,null),Re.createElement(uA,null),Re.createElement(Gye,null)))}),{Component:Zye,usePublisher:No,useEmitterValue:Xt,useEmitter:vT}=VV(Bye,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Jye),ebe=c3({usePublisher:No,useEmitterValue:Xt,useEmitter:vT}),tbe=d3({usePublisher:No,useEmitterValue:Xt,useEmitter:vT}),pw=Zye,cA={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},rbe={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:dA,ceil:fA,floor:Kb,min:j_,max:Ep}=Math;function nbe(e){return{...rbe,items:e}}function hA(e,t,r){return Array.from({length:t-e+1}).map((n,i)=>{const o=r===null?null:r[i+e];return{index:i+e,data:o}})}function ibe(e,t){return e&&e.column===t.column&&e.row===t.row}function Ig(e,t){return e&&e.width===t.width&&e.height===t.height}const obe=yr(([{overscan:e,visibleRange:t,listBoundary:r},{scrollTop:n,viewportHeight:i,scrollBy:o,scrollTo:a,smoothScrollTargetReached:l,scrollContainerState:c,footerHeight:d,headerHeight:f},p,m,{propsReady:g,didMount:b},{windowViewportRect:y,useWindowScroll:w,customScrollParent:_,windowScrollContainerState:S,windowScrollTo:C},k])=>{const E=Ve(0),R=Ve(0),T=Ve(cA),A=Ve({height:0,width:0}),M=Ve({height:0,width:0}),B=tr(),Q=tr(),se=Ve(0),ie=Ve(null),N=Ve({row:0,column:0}),X=tr(),ce=tr(),ne=Ve(!1),ee=Ve(0),ge=Ve(!0),Z=Ve(!1);Er(De(b,Ut(ee),Rt(([V,de])=>!!de)),()=>{Nt(ge,!1),Nt(R,0)}),Er(De(Vn(b,ge,M,A,ee,Z),Rt(([V,de,pe,Ee,,Me])=>V&&!de&&pe.height!==0&&Ee.height!==0&&!Me)),([,,,,V])=>{Nt(Z,!0),dT(1,()=>{Nt(B,V)}),ts(De(n),()=>{Nt(r,[0,0]),Nt(ge,!0)})}),lt(De(ce,Rt(V=>V!=null&&V.scrollTop>0),Fa(0)),R),Er(De(b,Ut(ce),Rt(([,V])=>V!=null)),([,V])=>{V&&(Nt(A,V.viewport),Nt(M,V==null?void 0:V.item),Nt(N,V.gap),V.scrollTop>0&&(Nt(ne,!0),ts(De(n,Sf(1)),de=>{Nt(ne,!1)}),Nt(a,{top:V.scrollTop})))}),lt(De(A,Qe(({height:V})=>V)),i),lt(De(Vn(kt(A,Ig),kt(M,Ig),kt(N,(V,de)=>V&&V.column===de.column&&V.row===de.row),kt(n)),Qe(([V,de,pe,Ee])=>({viewport:V,item:de,gap:pe,scrollTop:Ee}))),X),lt(De(Vn(kt(E),t,kt(N,ibe),kt(M,Ig),kt(A,Ig),kt(ie),kt(R),kt(ne),kt(ge),kt(ee)),Rt(([,,,,,,,V])=>!V),Qe(([V,[de,pe],Ee,Me,Y,K,we,,Te,he])=>{const{row:Ce,column:Ge}=Ee,{height:$t,width:Kt}=Me,{width:It}=Y;if(we===0&&(V===0||It===0))return cA;if(Kt===0){const an=fT(he,V),sn=an===0?Math.max(we-1,0):an;return nbe(hA(an,sn,K))}const jt=f3(It,Kt,Ge);let Lt,ht;Te?de===0&&pe===0&&we>0?(Lt=0,ht=we-1):(Lt=jt*Kb((de+Ce)/($t+Ce)),ht=jt*fA((pe+Ce)/($t+Ce))-1,ht=j_(V-1,Ep(ht,jt-1)),Lt=j_(ht,Ep(0,Lt))):(Lt=0,ht=-1);const on=hA(Lt,ht,K),{top:mn,bottom:Ir}=pA(Y,Ee,Me,on),Jr=fA(V/jt),Nr=Jr*$t+(Jr-1)*Ce-Ir;return{items:on,offsetTop:mn,offsetBottom:Nr,top:mn,bottom:Ir,itemHeight:$t,itemWidth:Kt}})),T),lt(De(ie,Rt(V=>V!==null),Qe(V=>V.length)),E),lt(De(Vn(A,M,T,N),Rt(([V,de,{items:pe}])=>pe.length>0&&de.height!==0&&V.height!==0),Qe(([V,de,{items:pe},Ee])=>{const{top:Me,bottom:Y}=pA(V,Ee,de,pe);return[Me,Y]}),Ur(vm)),r);const j=Ve(!1);lt(De(n,Ut(j),Qe(([V,de])=>de||V!==0)),j);const U=uo(De(kt(T),Rt(({items:V})=>V.length>0),Ut(E,j),Rt(([{items:V},de,pe])=>pe&&V[V.length-1].index===de-1),Qe(([,V])=>V-1),Ur())),q=uo(De(kt(T),Rt(({items:V})=>V.length>0&&V[0].index===0),Fa(0),Ur())),$=uo(De(kt(T),Ut(ne),Rt(([{items:V},de])=>V.length>0&&!de),Qe(([{items:V}])=>({startIndex:V[0].index,endIndex:V[V.length-1].index})),Ur(e3),jl(0)));lt($,m.scrollSeekRangeChanged),lt(De(B,Ut(A,M,E,N),Qe(([V,de,pe,Ee,Me])=>{const Y=JV(V),{align:K,behavior:we,offset:Te}=Y;let he=Y.index;he==="LAST"&&(he=Ee-1),he=Ep(0,he,j_(Ee-1,he));let Ce=LP(de,Me,pe,he);return K==="end"?Ce=dA(Ce-de.height+pe.height):K==="center"&&(Ce=dA(Ce-de.height/2+pe.height/2)),Te&&(Ce+=Te),{top:Ce,behavior:we}})),a);const F=fi(De(T,Qe(V=>V.offsetBottom+V.bottom)),0);return lt(De(y,Qe(V=>({width:V.visibleWidth,height:V.visibleHeight}))),A),{data:ie,totalCount:E,viewportDimensions:A,itemDimensions:M,scrollTop:n,scrollHeight:Q,overscan:e,scrollBy:o,scrollTo:a,scrollToIndex:B,smoothScrollTargetReached:l,windowViewportRect:y,windowScrollTo:C,useWindowScroll:w,customScrollParent:_,windowScrollContainerState:S,deviation:se,scrollContainerState:c,footerHeight:d,headerHeight:f,initialItemCount:R,gap:N,restoreStateFrom:ce,...m,initialTopMostItemIndex:ee,gridState:T,totalListHeight:F,...p,startReached:q,endReached:U,rangeChanged:$,stateChanged:X,propsReady:g,stateRestoreInProgress:ne,...k}},Kr(hT,Ti,tv,r3,cu,pT,uu));function pA(e,t,r,n){const{height:i}=r;if(i===void 0||n.length===0)return{top:0,bottom:0};const o=LP(e,t,r,n[0].index),a=LP(e,t,r,n[n.length-1].index)+i;return{top:o,bottom:a}}function LP(e,t,r,n){const i=f3(e.width,r.width,t.column),o=Kb(n/i),a=o*r.height+Ep(0,o-1)*t.row;return a>0?a+t.row:a}function f3(e,t,r){return Ep(1,Kb((e+r)/(Kb(t)+r)))}const abe=yr(()=>{const e=Ve(d=>`Item ${d}`),t=Ve({}),r=Ve(null),n=Ve("virtuoso-grid-item"),i=Ve("virtuoso-grid-list"),o=Ve(mT),a=Ve("div"),l=Ve(Oc),c=(d,f=null)=>fi(De(t,Qe(p=>p[d]),Ur()),f);return{context:r,itemContent:e,components:t,computeItemKey:o,itemClassName:n,listClassName:i,headerFooterTag:a,scrollerRef:l,FooterComponent:c("Footer"),HeaderComponent:c("Header"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),ScrollerComponent:c("Scroller","div"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),sbe=yr(([e,t])=>({...e,...t}),Kr(obe,abe)),lbe=Re.memo(function(){const t=tn("gridState"),r=tn("listClassName"),n=tn("itemClassName"),i=tn("itemContent"),o=tn("computeItemKey"),a=tn("isSeeking"),l=pa("scrollHeight"),c=tn("ItemComponent"),d=tn("ListComponent"),f=tn("ScrollSeekPlaceholder"),p=tn("context"),m=pa("itemDimensions"),g=pa("gap"),b=tn("log"),y=tn("stateRestoreInProgress"),w=Rc(_=>{const S=_.parentElement.parentElement.scrollHeight;l(S);const C=_.firstChild;if(C){const{width:k,height:E}=C.getBoundingClientRect();m({width:k,height:E})}g({row:mA("row-gap",getComputedStyle(_).rowGap,b),column:mA("column-gap",getComputedStyle(_).columnGap,b)})});return y?null:Re.createElement(d,{ref:w,className:r,..._i(d,p),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(_=>{const S=o(_.index,_.data,p);return a?Re.createElement(f,{key:S,..._i(f,p),index:_.index,height:t.itemHeight,width:t.itemWidth}):Re.createElement(c,{..._i(c,p),className:n,"data-index":_.index,key:S},i(_.index,_.data,p))}))}),ube=Re.memo(function(){const t=tn("HeaderComponent"),r=pa("headerHeight"),n=tn("headerFooterTag"),i=Rc(a=>r(Zl(a,"height"))),o=tn("context");return t?Re.createElement(n,{ref:i},Re.createElement(t,_i(t,o))):null}),cbe=Re.memo(function(){const t=tn("FooterComponent"),r=pa("footerHeight"),n=tn("headerFooterTag"),i=Rc(a=>r(Zl(a,"height"))),o=tn("context");return t?Re.createElement(n,{ref:i},Re.createElement(t,_i(t,o))):null}),dbe=({children:e})=>{const t=Re.useContext(u3),r=pa("itemDimensions"),n=pa("viewportDimensions"),i=Rc(o=>{n(o.getBoundingClientRect())});return Re.useEffect(()=>{t&&(n({height:t.viewportHeight,width:t.viewportWidth}),r({height:t.itemHeight,width:t.itemWidth}))},[t,n,r]),Re.createElement("div",{style:hw(!1),ref:i},e)},fbe=({children:e})=>{const t=Re.useContext(u3),r=pa("windowViewportRect"),n=pa("itemDimensions"),i=tn("customScrollParent"),o=s3(r,i);return Re.useEffect(()=>{t&&(n({height:t.itemHeight,width:t.itemWidth}),r({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,r,n]),Re.createElement("div",{ref:o,style:hw(!1)},e)},hbe=Re.memo(function({...t}){const r=tn("useWindowScroll"),n=tn("customScrollParent"),i=n||r?mbe:pbe,o=n||r?fbe:dbe;return Re.createElement(i,{...t},Re.createElement(o,null,Re.createElement(ube,null),Re.createElement(lbe,null),Re.createElement(cbe,null)))}),{usePublisher:pa,useEmitterValue:tn,useEmitter:h3}=VV(sbe,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},hbe),pbe=c3({usePublisher:pa,useEmitterValue:tn,useEmitter:h3}),mbe=d3({usePublisher:pa,useEmitterValue:tn,useEmitter:h3});function mA(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,co.WARN),t==="normal"?0:parseInt(t??"0",10)}const vbe=yr(()=>{const e=Ve(c=>Re.createElement("td",null,"Item $",c)),t=Ve(null),r=Ve(null),n=Ve(null),i=Ve({}),o=Ve(mT),a=Ve(Oc),l=(c,d=null)=>fi(De(i,Qe(f=>f[c]),Ur()),d);return{context:t,itemContent:e,fixedHeaderContent:r,fixedFooterContent:n,components:i,computeItemKey:o,scrollerRef:a,TableComponent:l("Table","table"),TableHeadComponent:l("TableHead","thead"),TableFooterComponent:l("TableFoot","tfoot"),TableBodyComponent:l("TableBody","tbody"),TableRowComponent:l("TableRow","tr"),ScrollerComponent:l("Scroller","div"),EmptyPlaceholder:l("EmptyPlaceholder"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),FillerRow:l("FillerRow")}});Kr(o3,vbe);const gbe=Ne`
|
1353
|
-
mutation DeleteProjectMst($data: DeleteProjectInput!) {
|
1354
|
-
deleteProject(data: $data)
|
1355
|
-
}
|
1356
|
-
`,ybe=async e=>{const t=await xr.mutate({mutation:gbe,variables:e});if(!t.data)throw t.errors;return t.data};class bbe{constructor(t,r,n){this.rootStore=t,this.organizationId=r,this.projectName=n}async execute(){const t=await this.deleteProjectRequest();return await this.updateProjectsConnection(),await this.updateMeProjectsConnection(),t}async deleteProjectRequest(){const{deleteProject:t}=await ybe({data:{organizationId:this.organizationId,projectName:this.projectName}});return t}async updateProjectsConnection(){const t=this.rootStore.cache.organization.get(this.organizationId),r=t==null?void 0:t.projectsConnection.edges.find(n=>n.node.name===this.projectName);t==null||t.projectsConnection.removeEdge(r==null?void 0:r.cursor)}async updateMeProjectsConnection(){const t=this.rootStore.cache.meProjectsConnection.edges.find(r=>r.node.name===this.projectName);this.rootStore.cache.meProjectsConnection.removeEdge(t==null?void 0:t.cursor)}}class wbe{constructor(t){this.rootStore=t}async delete(t,r){try{return await new bbe(this.rootStore,t,r).execute()}catch(n){return console.error(n),!1}}init(){}dispose(){}}const Sbe=()=>{const[e]=O.useState(()=>new wbe(ct));return O.useEffect(()=>(e.init(),()=>e.dispose()),[e]),e},_be=Ot(({organizationId:e,projectName:t})=>{const r=Sbe(),[n,i]=O.useState(!1),o=O.useCallback(async()=>{i(!0),await r.delete(e,t),i(!1)},[r,e,t]);return x.jsx(Ci,{"data-testid":`remove-project-${t}-button`,_hover:{backgroundColor:"gray.100"},"aria-label":"removeTable",color:"gray.400",icon:x.jsx(J0,{}),isLoading:n,variant:"ghost",onClick:o})});class xbe{constructor(t){this.rootStore=t,st(this,{},{autoBind:!0}),this.init()}get totalCount(){return this.meProjects.edges.length}get hasNextPage(){return this.meProjects.availableNextPage}get items(){return this.meProjects.edges.map(({node:t})=>({id:t.id,name:t.name,organizationId:t.organization.id,touched:t.rootBranch.touched,link:Pbe(t)}))}get meProjects(){return this.rootStore.cache.meProjectsConnection}tryToFetchNextPage(){this.hasNextPage&&this.rootStore.backend.queryMeProjects({first:100})}init(){}dispose(){}}const Pbe=e=>ao(`/${Fl}/${Ll}/${Bl}/${Vl}${e.rootBranch.touched?`/${X0}`:""}`,{organizationId:e.organization.id,projectName:e.name,branchName:e.rootBranch.name}),Cbe=()=>{const[e]=O.useState(()=>new xbe(ct));return O.useEffect(()=>(e.init(),()=>e.dispose()),[e]),e},Ebe="_Row_1lkxi_1",Tbe="_RemoveRowButton_1lkxi_1",vA={Row:Ebe,RemoveRowButton:Tbe},Obe=Ot(()=>{const e=Cbe();return x.jsx(pw,{useWindowScroll:!0,totalCount:e.totalCount,defaultItemHeight:40,endReached:e.hasNextPage?e.tryToFetchNextPage:void 0,itemContent:t=>{const r=e.items[t];return x.jsx(wt,{height:"2.5rem",width:"100%",children:x.jsx(je,{_hover:{backgroundColor:"gray.50"},alignItems:"center",className:vA.Row,gap:"4px",paddingLeft:"1rem","data-testid":`project-${r.name}`,children:x.jsxs(je,{alignItems:"center",flex:1,justifyContent:"space-between",minHeight:"40px",children:[x.jsxs(je,{minWidth:"150px",children:[x.jsxs(je,{gap:"4px",children:[x.jsx(bt,{color:"gray.300",children:r.organizationId}),x.jsx(bt,{color:"gray.300",children:"/"}),x.jsx(bt,{_hover:{textDecoration:"underline"},children:x.jsx(qo,{to:r.link,"data-testid":`project-${r.organizationId}-${r.name}-link`,children:r.name})})]}),r.touched?"*":""]}),x.jsx(wt,{className:vA.RemoveRowButton,children:x.jsx(_be,{organizationId:r.organizationId,projectName:r.name})})]})})},r.id)}})}),Rbe=()=>{const[e,t]=PV(!1),r=O.useCallback(()=>{t()},[t]);return x.jsx($f,{title:x.jsx(wt,{height:"40px"}),children:x.jsx(je,{flexDirection:"column",gap:"0.5rem",paddingBottom:"1rem",children:e?x.jsx(Hge,{onAdd:r,onCancel:t}):x.jsxs(x.Fragment,{children:[x.jsx(Lge,{onClick:t}),x.jsx(Obe,{})]})})})};var Le=(e=>(e.String="string",e.Number="number",e.Boolean="boolean",e.Object="object",e.Array="array",e))(Le||{}),zn=(e=>(e.Tree="Tree",e.Json="Json",e.RefBy="RefBy",e))(zn||{}),hc=(e=>(e.File="urn:jsonschema:io:revisium:file-schema:1.0.0",e))(hc||{});const nv=e=>{if(e==="urn:jsonschema:io:revisium:file-schema:1.0.0")return"File"},Ibe={type:Le.Object,properties:{status:{type:Le.String,default:"",readOnly:!0},fileId:{type:Le.String,default:"",readOnly:!0},url:{type:Le.String,default:"",readOnly:!0},fileName:{type:Le.String,default:""},hash:{type:Le.String,default:"",readOnly:!0},extension:{type:Le.String,default:"",readOnly:!0},mimeType:{type:Le.String,default:"",readOnly:!0},size:{type:Le.Number,default:0,readOnly:!0},width:{type:Le.Number,default:0,readOnly:!0},height:{type:Le.Number,default:0,readOnly:!0}},required:["status","fileId","url","fileName","hash","extension","mimeType","size","width","height"],additionalProperties:!1},p3={[hc.File]:Ibe};function kbe(e){throw new Error("[mobx-utils] "+e)}function Gb(e,t){t===void 0&&(t="Illegal state"),e||kbe(t)}var m3=function(e){return e&&e!==Object.prototype&&Object.getOwnPropertyNames(e).concat(m3(Object.getPrototypeOf(e))||[])},jbe=function(e){var t=m3(e),r=t.filter(function(n,i){return t.indexOf(n)===i});return r},gA=function(e){return jbe(e).filter(function(t){return t!=="constructor"&&!~t.indexOf("__")})},BP="pending",Qb="fulfilled",gT="rejected";function $be(e){switch(this.state){case BP:return e.pending&&e.pending(this.value);case gT:return e.rejected&&e.rejected(this.value);case Qb:return e.fulfilled?e.fulfilled(this.value):this.value}}function yA(e,t){if(Gb(arguments.length<=2,"fromPromise expects up to two arguments"),Gb(typeof e=="function"||typeof e=="object"&&e&&typeof e.then=="function","Please pass a promise or function to fromPromise"),e.isPromiseBasedObservable===!0)return e;typeof e=="function"&&(e=new Promise(e));var r=e;e.then(Sr("observableFromPromise-resolve",function(i){r.value=i,r.state=Qb}),Sr("observableFromPromise-reject",function(i){r.value=i,r.state=gT})),r.isPromiseBasedObservable=!0,r.case=$be;var n=t&&(t.state===Qb||t.state===BP)?t.value:void 0;return lE(r,{value:n,state:BP},{},{deep:!1}),r}(function(e){e.reject=Sr("fromPromise.reject",function(r){var n=e(Promise.reject(r));return n.state=gT,n.value=r,n});function t(r){r===void 0&&(r=void 0);var n=e(Promise.resolve(r));return n.state=Qb,n.value=r,n}e.resolve=Sr("fromPromise.resolve",t)})(yA||(yA={}));var kg=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o};(function(){function e(t,r){var n=this;Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"subscription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),D0(this),Hp(function(){n.current=r,n.subscription=t.subscribe(n)})}return Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.subscription&&this.subscription.unsubscribe()}}),Object.defineProperty(e.prototype,"next",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.current=t}}),Object.defineProperty(e.prototype,"complete",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.dispose()}}),Object.defineProperty(e.prototype,"error",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.current=t,this.dispose()}}),kg([er.ref],e.prototype,"current",void 0),kg([Sr.bound],e.prototype,"next",null),kg([Sr.bound],e.prototype,"complete",null),kg([Sr.bound],e.prototype,"error",null),e})();var Yb=function(){return Yb=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Yb.apply(this,arguments)},Lh=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Abe=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"],Dbe=function(){function e(t){var r=this;Object.defineProperty(this,"model",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"localValues",{enumerable:!0,configurable:!0,writable:!0,value:er.map({})}),Object.defineProperty(this,"localComputedValues",{enumerable:!0,configurable:!0,writable:!0,value:er.map({})}),Object.defineProperty(this,"isPropertyDirty",{enumerable:!0,configurable:!0,writable:!0,value:function(i){return r.localValues.has(i)}}),D0(this),Gb(Gi(t),"createViewModel expects an observable object");var n=gA(this);gA(t).forEach(function(i){var o;if(!n.includes(i)&&!(i===ut||i==="__mobxDidRunLazyInitializers")){if(Gb(Abe.indexOf(i)===-1,"The propertyname "+i+" is reserved and cannot be used with viewModels"),H1(t,i)){var a=ma(t,i),l=a.derivation.bind(r),c=(o=a.setter_)===null||o===void 0?void 0:o.bind(r);r.localComputedValues.set(i,dn(l,{set:c}))}var d=Object.getOwnPropertyDescriptor(t,i),f=d?{enumerable:d.enumerable}:{};Object.defineProperty(r,i,Yb(Yb({},f),{configurable:!0,get:function(){return H1(t,i)?r.localComputedValues.get(i).get():r.isPropertyDirty(i)?r.localValues.get(i):r.model[i]},set:Sr(function(p){H1(t,i)?r.localComputedValues.get(i).set(p):p!==r.model[i]?r.localValues.set(i,p):r.localValues.delete(i)})}))}})}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changedValues",{get:function(){return new Map(this.localValues)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"submit",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;Kp(this.localValues).forEach(function(r){var n=t.localValues.get(r),i=t.model[r];Uo(i)?i.replace(n):Ki(i)?(i.clear(),i.merge(n)):Aie(n)||(t.model[r]=n)}),this.localValues.clear()}}),Object.defineProperty(e.prototype,"reset",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.localValues.clear()}}),Object.defineProperty(e.prototype,"resetProperty",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.localValues.delete(t)}}),Lh([dn],e.prototype,"isDirty",null),Lh([dn],e.prototype,"changedValues",null),Lh([Sr.bound],e.prototype,"submit",null),Lh([Sr.bound],e.prototype,"reset",null),Lh([Sr.bound],e.prototype,"resetProperty",null),e}();function kc(e){return new Dbe(e)}var Mbe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(e){Mbe(t,e);function t(r,n,i){var o=i===void 0?{}:i,a=o.name,l=a===void 0?"ogm"+(Math.random()*1e3|0):a,c=o.keyToName,d=c===void 0?function(m){return""+m}:c,f=e.call(this)||this;Object.defineProperty(f,"_base",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(f,"_ogmInfoKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(f,"_groupBy",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(f,"_keyToName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(f,"_disposeBaseObserver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),f._keyToName=d,f._groupBy=n,f._ogmInfoKey=Symbol("ogmInfo"+l),f._base=r;for(var p=0;p<r.length;p++)f._addItem(r[p]);return f._disposeBaseObserver=A0(f._base,function(m){if(m.type==="splice")la(function(){for(var g=0,b=m.removed;g<b.length;g++){var y=b[g];f._removeItem(y)}for(var w=0,_=m.added;w<_.length;w++){var S=_[w];f._addItem(S)}});else if(m.type==="update")la(function(){f._removeItem(m.oldValue),f._addItem(m.newValue)});else throw new Error("illegal state")}),f}return Object.defineProperty(t.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){throw new Error("not supported")}}),Object.defineProperty(t.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(r){throw new Error("not supported")}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){throw new Error("not supported")}}),Object.defineProperty(t.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._disposeBaseObserver();for(var r=0;r<this._base.length;r++){var n=this._base[r],i=n[this._ogmInfoKey];i.reaction(),delete n[this._ogmInfoKey]}}}),Object.defineProperty(t.prototype,"_getGroupArr",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=e.prototype.get.call(this,r);return n===void 0&&(n=er([],{name:"GroupArray["+this._keyToName(r)+"]",deep:!1}),e.prototype.set.call(this,r,n)),n}}),Object.defineProperty(t.prototype,"_removeFromGroupArr",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=e.prototype.get.call(this,r);i.length===1?e.prototype.delete.call(this,r):(n===i.length-1||(i[n]=i[i.length-1],i[n][this._ogmInfoKey].groupArrIndex=n),i.length--)}}),Object.defineProperty(t.prototype,"_addItem",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=this._groupBy(r),o=this._getGroupArr(i),a={groupByValue:i,groupArrIndex:o.length,reaction:Ya(function(){return n._groupBy(r)},function(l,c){var d=r[n._ogmInfoKey];n._removeFromGroupArr(d.groupByValue,d.groupArrIndex);var f=n._getGroupArr(l),p=f.length;f.push(r),d.groupByValue=l,d.groupArrIndex=p})};Object.defineProperty(r,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:a}),o.push(r)}}),Object.defineProperty(t.prototype,"_removeItem",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=r[this._ogmInfoKey];this._removeFromGroupArr(n.groupByValue,n.groupArrIndex),n.reaction(),delete r[this._ogmInfoKey]}}),t})(M0);var qs=(e=>(e.Object="object",e.Array="array",e.String="string",e.StringForeignKey="stringForeignKey",e.Number="number",e.Boolean="boolean",e))(qs||{});class pn{constructor(){Pe(this,"nodeId",nn());Pe(this,"type",qs.Object);Pe(this,"$ref","");Pe(this,"state");st(this,{},{autoBind:!0}),this.state=kc(er({id:"",properties:[],parent:null,connectedToParent:!1}))}get isDisabled(){var t;return!!((t=this.draftParent)!=null&&t.$ref)}get label(){return nv(this.$ref)??this.type}setNodeId(t){this.nodeId=t}get id(){return this.state.model.id}get draftId(){return this.state.id}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}get properties(){return this.state.model.properties}get draftProperties(){return this.state.properties}get addedProperties(){return this.draftProperties.filter(t=>!t.parent&&!this.properties.find(r=>r.nodeId===t.nodeId))}get removedProperties(){return this.properties.filter(t=>{const r=!this.draftProperties.find(n=>n.nodeId===t.nodeId);return!t.draftConnectedToParent&&r})}get notChangedProperties(){return this.properties.filter(t=>this.draftProperties.find(r=>r===t))}get replacedProperties(){return this.properties.filter(t=>this.draftProperties.find(r=>r.nodeId===t.nodeId&&r!==t)).map(t=>{const r=this.draftProperties.find(n=>n.nodeId===t.nodeId);if(!r)throw new Error("Invalid replacedProperties");return{previousProperty:t,currentProperty:r}})}get movedProperties(){return this.draftProperties.filter(t=>t.parent&&t.parent!==this)}get changedIdProperties(){return this.draftProperties.filter(t=>{const r=this.properties.find(n=>n.nodeId===t.nodeId);return r&&t.draftId!==r.id}).map(t=>{const r=this.properties.find(n=>n.nodeId===t.nodeId);if(!r)throw new Error("Invalid replacedProperties");return{previousProperty:r,currentProperty:t}})}getSchema(t){if(this.$ref)return{$ref:this.$ref};const r={},n=[];t!=null&&t.skipObjectProperties||this.state.properties.forEach(o=>{t!=null&&t.skipMovedBetweenParentsNodes&&o.parent!==o.draftParent||(o instanceof Jn||o instanceof pn?r[o.draftId]=o.getSchema(t):r[o.draftId]=o.getSchema(),n.push(o.draftId))});const i=n.sort((o,a)=>o.localeCompare(a));return{type:Le.Object,additionalProperties:!1,required:i,properties:r}}get isValid(){const t=new Set(this.state.properties.map(n=>n.draftId)).size===this.state.properties.length,r=this.state.properties.every(n=>n.isValid&&!!n.draftId);return t&&r}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself||this.state.properties.some(t=>t.isDirty)}get showingCreateField(){return this.$ref?!1:!!this.state.id||!!this.state.parent}get isDisabledCreateField(){var n;const t=!!this.state.id||!this.state.id&&((n=this.state.parent)==null?void 0:n.type)===qs.Array,r=this.state.properties.every(i=>!!i.draftId);return!t||!r}setId(t){this.state.id=t}setParent(t){this.state.parent=t,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}removeProperty(t){const r=this.state.properties.findIndex(n=>n.nodeId===t);r!==-1&&(this.state.properties[r].onRemoveFromParent(),this.createIfNeededNextProperties(),this.state.properties.splice(r,1),this.resetIfNeededProperties())}addProperty(t,r=null){if(t.draftParent instanceof pn)t.draftParent.removeProperty(t.nodeId);else if(t.draftParent instanceof Jn)throw new Error("Invalid parent");t.setParent(this),this.createIfNeededNextProperties();const n=this.state.properties.findIndex(o=>o===(r==null?void 0:r.beforeNode)),i=this.state.properties.findIndex(o=>o===(r==null?void 0:r.afterNode));n!==-1?this.state.properties.splice(n,0,t):i!==-1?this.state.properties.splice(i+1,0,t):this.state.properties.push(t)}getProperty(t){const r=this.properties.find(n=>n.id===t);if(!r)throw new Error("Invalid id");return r}getDraftProperty(t){const r=this.draftProperties.find(n=>n.id===t);if(!r)throw new Error("Invalid id");return r}hasProperty(t){return!!this.state.properties.find(n=>n===t)}replaceProperty(t,r){const n=this.state.properties.findIndex(i=>i.nodeId===t.nodeId);n!==-1&&(t.onRemoveFromParent(),t.parent&&(r.setId(t.id),r.setParent(t.parent),r.submitChanges()),r.setId(t.draftId),r.setNodeId(t.nodeId),r.setParent(this),this.createIfNeededNextProperties(),this.state.properties.splice(n,1,r))}submitChanges(){this.state.submit();for(const t of this.state.properties)t.submitChanges()}resetChanges(){this.state.reset();for(const t of this.state.properties)t.resetChanges()}createIfNeededNextProperties(){this.state.isPropertyDirty("properties")||(this.state.properties=this.state.properties.slice())}resetIfNeededProperties(){const t=this.state.model.properties.map(n=>n.nodeId),r=this.state.properties.map(n=>n.nodeId);if(t.length===r.length){for(let n=0;n<t.length;n++)if(t[n]!==r[n])return;this.state.resetProperty("properties")}}}class Jn{constructor(t){Pe(this,"nodeId",nn());Pe(this,"type",qs.Array);Pe(this,"$ref","");Pe(this,"state");st(this,{},{autoBind:!0}),t.setParent(this),t.submitChanges(),this.state=kc(er({id:"",items:t,parent:null,connectedToParent:!1}))}get isDisabled(){var t;return!!((t=this.draftParent)!=null&&t.$ref)}get label(){return nv(this.$ref)??this.type}setNodeId(t){this.nodeId=t}get id(){return this.state.model.id}get draftId(){return this.state.id}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}get items(){return this.state.model.items}get draftItems(){return this.state.items}getSchema(t){return this.$ref?{$ref:this.$ref}:{type:Le.Array,items:this.getItemsSchema(t)}}getItemsSchema(t){return this.state.items instanceof Jn?this.state.items.getSchema(t):this.state.items instanceof pn?this.state.items.getSchema(t):this.state.items.getSchema()}get isValid(){return this.state.items.isValid}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself||this.state.items.isDirty}setId(t){this.state.id=t}setParent(t){this.state.parent=t,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}replaceItems(t){t.draftParent instanceof pn&&t.draftParent.removeProperty(t.nodeId),t.setNodeId(this.state.items.nodeId),t.setParent(this),this.state.items=t}submitChanges(){this.state.submit(),this.state.items.submitChanges()}resetChanges(){this.state.reset(),this.state.items.resetChanges()}}class Nbe{constructor(){Pe(this,"nodeId",nn());Pe(this,"type",qs.Boolean);Pe(this,"$ref","");Pe(this,"state");st(this,{},{autoBind:!0}),this.state=kc(er({id:"",parent:null,connectedToParent:!1}))}get isDisabled(){var t;return!!((t=this.draftParent)!=null&&t.$ref)}get label(){return nv(this.$ref)??this.type}setNodeId(t){this.nodeId=t}get id(){return this.state.model.id}get draftId(){return this.state.id}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}getSchema(){return this.$ref?{$ref:this.$ref}:{type:Le.Boolean,default:!1}}get isValid(){return!0}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself}setId(t){this.state.id=t}setParent(t){this.state.parent=t,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}submitChanges(){this.state.submit()}resetChanges(){this.state.reset()}}class Fbe{constructor(){Pe(this,"nodeId",nn());Pe(this,"type",qs.Number);Pe(this,"$ref","");Pe(this,"state");st(this,{},{autoBind:!0}),this.state=kc(er({id:"",parent:null,connectedToParent:!1}))}get isDisabled(){var t;return!!((t=this.draftParent)!=null&&t.$ref)}get label(){return nv(this.$ref)??this.type}setNodeId(t){this.nodeId=t}get id(){return this.state.model.id}get draftId(){return this.state.id}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}getSchema(){return this.$ref?{$ref:this.$ref}:{type:Le.Number,default:0}}get isValid(){return!0}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself}setId(t){this.state.id=t}setParent(t){this.state.parent=t,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}submitChanges(){this.state.submit()}resetChanges(){this.state.reset()}}class ec{constructor(){Pe(this,"nodeId",nn());Pe(this,"type",qs.String);Pe(this,"$ref","");Pe(this,"state");st(this,{},{autoBind:!0}),this.state=kc(er({id:"",foreignKey:null,parent:null,connectedToParent:!1}))}get isDisabled(){var t;return!!((t=this.draftParent)!=null&&t.$ref)}get label(){return this.draftForeignKey?"foreign key":nv(this.$ref)??this.type}setNodeId(t){this.nodeId=t}get id(){return this.state.model.id}get draftId(){return this.state.id}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}get foreignKey(){return this.state.model.foreignKey}get draftForeignKey(){return this.state.foreignKey}getSchema(){var r,n;if(this.$ref)return{$ref:this.$ref};const t={type:Le.String,default:""};return(r=this.state.foreignKey)!=null&&r.draftForeignKey&&(t.foreignKey=(n=this.state.foreignKey)==null?void 0:n.draftForeignKey),t}get isValid(){return!(this.state.foreignKey&&!this.state.foreignKey.draftForeignKey)}get isDirtyItself(){return this.state.isDirty||!!(this.state.foreignKey&&this.state.foreignKey.isDirtyItself)}get isDirty(){return this.isDirtyItself}setId(t){this.state.id=t}setParent(t){this.state.parent=t,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}setForeignKey(t){this.state.foreignKey=t,t&&t.setParent(this)}submitChanges(){this.state.submit(),this.state.foreignKey&&this.state.foreignKey.submitChanges()}resetChanges(){this.state.reset(),this.state.foreignKey&&this.state.foreignKey.resetChanges()}}class Lbe{constructor(){Pe(this,"nodeId",nn());Pe(this,"type",qs.StringForeignKey);Pe(this,"state");st(this,{},{autoBind:!0}),this.state=kc(er({foreignKey:null,parent:null,connectedToParent:!1}))}get isDisabled(){var t;return!!((t=this.draftParent)!=null&&t.$ref)}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}setNodeId(t){this.nodeId=t}get foreignKey(){return this.state.model.foreignKey}get draftForeignKey(){return this.state.foreignKey}get isDirtyItself(){return this.state.isDirty}setForeignKey(t){this.state.foreignKey=t}setParent(t){this.state.parent=t,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}submitChanges(){this.state.submit()}resetChanges(){this.state.reset()}}const v3=e=>{if("$ref"in e){const t=p3[e.$ref];if(!t)throw new Error(`Schema refs must be defined ref$=${e.$ref}`);const r=v3(t);return r.$ref=e.$ref,r}switch(e.type){case Le.Object:{const t=new pn;return Object.entries(e.properties).forEach(([r,n])=>{const i=Ba(n);i.setId(r),t.addProperty(i)}),t}case Le.Array:{const t=Ba(e.items);return new Jn(t)}case Le.String:{const t=new ec;if(e.foreignKey!==void 0){const r=new Lbe;r.setForeignKey(e.foreignKey),t.setForeignKey(r)}return t}case Le.Number:return new Fbe;case Le.Boolean:return new Nbe}},Ba=e=>v3(e),Bbe=(e,t=!1)=>{let r="",n=e;for(;n.draftParent;)n.draftParent instanceof pn?r=`/properties/${n===e&&t?n.id:n.draftId}${r}`:n.draftParent instanceof Jn&&(r=`/items${r}`),n=n.draftParent;return r};function*Xb(e,t,r){if(yield*t(e),e instanceof pn)for(const n of e.draftProperties)yield*Xb(n,t);else e instanceof Jn&&(yield*Xb(e.draftItems,t))}function VP(e,t,r){let n=!0;if(r||(n=t(e)),!n)return!1;if(e instanceof pn)for(const i of e.draftProperties)VP(i,t);else e instanceof Jn&&VP(e.draftItems,t)}const Vbe=e=>[...Xb(e,function*(t){(t instanceof pn||t instanceof Jn)&&(yield t)})],g3=(e,t)=>e.draftParent?e===t?!0:g3(e.draftParent,t):!1,bA=e=>{const t=[];let r=e.draftParent;for(;r;)t.push(r),r=r.draftParent;return t},zbe=(e,t)=>{const r=bA(t),n=bA(e),i=r.find(a=>a instanceof Jn);return i?!n.find(a=>a===i):!1},Zh=(e,t)=>!(!t.draftParent||e===t||e===t.draftParent||g3(e,t)||zbe(e,t)),Tu=(e,t)=>{const r=[e];let n=e,i=Jb(e,t==null?void 0:t.preferDraftParent);for(;i;)r.push(i),n=i,i=Jb(n,t==null?void 0:t.preferDraftParent);return r},Bh=e=>{let t="",r=e[0];for(let n=1;n<e.length;n++){const i=e[n];i instanceof pn?t=`/properties/${y3(r,!1)}${t}`:i instanceof Jn&&(t=`/items${t}`),r=i}return t},wA=(e,t)=>{let r="",n=e,i=Jb(e,t==null?void 0:t.preferDraftParent);for(;i;)i instanceof pn?r=`/properties/${n===e&&t.preferStartWithNotDraftId?n.id:y3(n,t==null?void 0:t.preferDraftId)}${r}`:i instanceof Jn&&(r=`/items${r}`),n=i,i=Jb(n,t==null?void 0:t.preferDraftParent);return r},Jb=(e,t)=>t?e.draftParent||e.parent:e.parent||e.draftParent,y3=(e,t)=>t?e.draftId||e.id:e.id||e.draftId;class qbe{constructor(){Pe(this,"stack",[]);Pe(this,"setIdMap",new Set)}add(t){this.stack.push({node:t,op:"add",sequence:Tu(t,{preferDraftParent:!0})})}remove(t){const r=this.stack.findIndex(n=>n.node===t&&n.op==="add");this.deepRemovePatches(t),r===-1&&this.stack.push({node:t,op:"remove",sequence:Tu(t,{preferDraftParent:!0})})}replace(t,r){if(this.checkIfStringDuplicationInReplace(r))return;this.stack.findIndex(i=>i.node.nodeId===r.nodeId&&i.op==="add")!==-1?(this.deepRemovePatches(t,!1),this.stack.push({node:r,op:"add",sequence:Tu(r,{preferDraftParent:!0})})):(this.deepRemovePatches(t,!0),this.stack.push({node:r,op:"replace",sequence:Tu(r,{preferDraftParent:!0})}))}move(t){const r=this.stack.findIndex(i=>i.node===t&&i.op==="move");r!==-1&&this.stack.splice(r,1),t.parent===t.draftParent&&t.id===t.draftId||this.stack.push({node:t,op:"move",fromSequence:Tu(t,{preferDraftParent:!1}),toSequence:Tu(t,{preferDraftParent:!0})})}reset(){this.stack.length=0,this.setIdMap.clear()}getPatches(t){return[...this.getStackPatches(),...this.getMoveIdPatches(t)]}setId(t){this.setIdMap.add(t.nodeId)}getMoveIdPatches(t){const r=this;return[...Xb(t,function*(i){r.setIdMap.has(i.nodeId)&&i.draftParent instanceof pn&&(yield{op:"move",from:wA(i,{preferDraftParent:!0,preferDraftId:!0,preferStartWithNotDraftId:!0}),path:wA(i,{preferDraftParent:!0,preferDraftId:!0})})})]}getStackPatches(){return this.stack.map(t=>{switch(t.op){case"add":return{op:"add",path:Bh(t.sequence),value:t.node.getSchema({skipMovedBetweenParentsNodes:!0})};case"replace":return{op:"replace",path:Bh(t.sequence),value:t.node.getSchema({skipMovedBetweenParentsNodes:!0})};case"remove":return{op:"remove",path:Bh(t.sequence)};case"move":return{op:"move",from:Bh(t.fromSequence),path:Bh(t.toSequence)}}})}checkIfStringDuplicationInReplace(t){return!!(t.type===qs.String&&this.stack.find(n=>n.node===t))}deepRemovePatches(t,r){VP(t,n=>{let i=this.stack.findIndex(a=>a.node.nodeId===n.nodeId&&a.op!=="move");for(;i!==-1;)this.stack.splice(i,1),i=this.stack.findIndex(a=>a.node.nodeId===n.nodeId&&a.op!=="move");const o=this.stack.findIndex(a=>a.node.nodeId===n.nodeId&&a.op==="move");return o!==-1?(this.stack.splice(o,1,{node:n,op:"remove",sequence:Tu(n,{preferDraftParent:!1})}),this.deepRemovePatches(n,!0),!1):!0},r)}}class SA{constructor(t=new pn,r=""){Pe(this,"viewMode",zn.Tree);Pe(this,"state");Pe(this,"history",new qbe);st(this,{},{autoBind:!0}),this.state=kc(er({node:t,tableId:r}))}get node(){return this.state.node}get tableId(){return this.state.tableId}get draftTableId(){return this.state.node.draftId}get isApproveDisabled(){return!this.state.node.isValid||!this.state.node.isDirty}get isDirty(){return this.state.node.isDirty}get isDirtyItself(){return this.state.node.isDirtyItself}getPlainSchema(){return this.state.node.getSchema()}setViewMode(t){this.viewMode=t}getPatches(){return this.state.node!==this.state.model.node?[{op:"replace",path:"",value:this.state.node.getSchema()}]:[...this.history.getPatches(this.state.node)]}areThereDropTargets(t){return dn(()=>!!Vbe(this.state.node).filter(n=>Zh(n,t)).length).get()}replaceNode(t){this.state.node=t}submitChanges(){this.node.submitChanges(),this.state.tableId=this.node.id,this.state.submit(),this.history.reset()}resetChanges(){this.node.resetChanges(),this.history.reset()}setId(t,r){t.setId(r),t.parent&&this.history.setId(t)}addProperty(t,r,n=null){t.addProperty(r,n),r.parent?this.history.move(r):this.history.add(r)}removeProperty(t,r){t.removeProperty(r.nodeId),this.history.remove(r)}replaceProperty(t,r,n){t.replaceProperty(r,n),this.history.replace(r,n)}replaceItems(t,r){const n=t.draftItems;t.replaceItems(r),r.parent?this.history.move(r):this.history.replace(n,r)}setForeignKey(t,r){t.setForeignKey(r),this.history.replace(t,t)}setForeignKeyValue(t,r){t&&t.draftParent&&(t.setForeignKey(r),this.history.replace(t.draftParent,t.draftParent))}}const Ube=Ne`
|
1357
|
-
mutation CreateTableMst($data: CreateTableInput!) {
|
1358
|
-
createTable(data: $data) {
|
1359
|
-
branch {
|
1360
|
-
...BranchMst
|
1361
|
-
}
|
1362
|
-
table {
|
1363
|
-
...TableMst
|
1364
|
-
}
|
1365
|
-
}
|
1366
|
-
}
|
1367
|
-
${Qs}
|
1368
|
-
${is}
|
1369
|
-
`,Hbe=async e=>{const t=await xr.mutate({mutation:Ube,variables:e});if(!t.data)throw t.errors;return t.data};class Wbe{constructor(t,r,n,i){this.rootStore=t,this.branch=r,this.tableId=n,this.schema=i}async execute(){const t=await this.createTableRequest();return await this.refetchTablesConnection(),this.branch.touched||this.branch.updateTouched(!0),t}async createTableRequest(){const{createTable:t}=await Hbe({data:{revisionId:this.branch.draft.id,tableId:this.tableId,schema:this.schema}});return this.addTableToCache(t.table)}addTableToCache(t){const r=this.rootStore.cache.addOrTable(Lf(t));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:r.id},r.versionId),r}async refetchTablesConnection(){await this.rootStore.queryTables({revisionId:this.branch.draft.id,first:50})}}const Kbe=Ne`
|
1370
|
-
mutation RenameTableMst($data: RenameTableInput!) {
|
1371
|
-
renameTable(data: $data) {
|
1372
|
-
table {
|
1373
|
-
...TableMst
|
1374
|
-
}
|
1375
|
-
previousVersionTableId
|
1376
|
-
}
|
1377
|
-
}
|
1378
|
-
${is}
|
1379
|
-
`,Gbe=async e=>{const t=await xr.mutate({mutation:Kbe,variables:e});if(!t.data)throw t.errors;return t.data},Qbe=Ne`
|
1380
|
-
mutation UpdateTableMst($data: UpdateTableInput!) {
|
1381
|
-
updateTable(data: $data) {
|
1382
|
-
table {
|
1383
|
-
...TableMst
|
1384
|
-
}
|
1385
|
-
previousVersionTableId
|
1386
|
-
}
|
1387
|
-
}
|
1388
|
-
${is}
|
1389
|
-
`,Ybe=async e=>{const t=await xr.mutate({mutation:Qbe,variables:e});if(!t.data)throw t.errors;return t.data};class Xbe{constructor(t,r,n){this.rootStore=t,this.branch=r,this.store=n}async execute(){const t=await this.updateTableRequest();this.resetRowsConnectionCache(),this.branch.touched||this.branch.updateTouched(!0),t&&await this.refetchTablesConnection()}async updateTableRequest(){let t=!1;if(this.store.tableId!==this.store.draftTableId){const n=await Gbe({data:{revisionId:this.branch.draft.id,tableId:this.store.tableId,nextTableId:this.store.draftTableId}});this.addVersionedTableToCache(n.renameTable.table),t=!0}if(this.store.getPatches().length){const n=await Ybe({data:{revisionId:this.branch.draft.id,tableId:this.store.draftTableId,patches:this.store.getPatches()}}),i=this.addVersionedTableToCache(n.updateTable.table),o=n.updateTable.previousVersionTableId;t=t||i.versionId!==o}return t}addVersionedTableToCache(t){return this.addTableToCache(t)}addTableToCache(t){const r=this.rootStore.cache.addOrTable(Lf(t));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:this.store.draftTableId},r.versionId),r}resetRowsConnectionCache(){const t=this.rootStore.cache.getTableByVariables({tableId:this.store.draftTableId,revisionId:this.branch.draft.id});t&&t.rowsConnection.reset()}async refetchTablesConnection(){await this.rootStore.queryTables({revisionId:this.branch.draft.id,first:50})}}var Qn=(e=>(e.List="List",e.CreatingTable="CreatingTable",e.ConnectingForeignKeyTable="ConnectingForeignKeyTable",e.UpdatingTable="UpdatingTable",e))(Qn||{});class _A{constructor(t,r,n){Pe(this,"id",nn());this.rootStore=t,this.projectPageModel=r,this.state=n,st(this,{},{autoBind:!0})}get currentForeignKeyPath(){return this.state.type==="ConnectingForeignKeyTable"&&this.state.foreignKeyNode.draftParent?Bbe(this.state.foreignKeyNode.draftParent):""}get title(){return this.revision.id===this.branch.draft.id?`Branch - ${this.branch.name}[draft]`:this.revision.id===this.branch.head.id?`Branch - ${this.branch.name}`:`Branch - ${this.branch.name}[rev:${this.revision.id.slice(0,6)}]`}toList(){this.state={type:"List",isSelectingForeignKey:this.state.isSelectingForeignKey}}toConnectingForeignKeyTable(t){if(this.state.type==="CreatingTable"||this.state.type==="UpdatingTable")this.state={type:"ConnectingForeignKeyTable",previousType:this.state.type,store:this.state.store,isSelectingForeignKey:this.state.isSelectingForeignKey,foreignKeyNode:t};else throw new Error("Invalid state")}toCreatingTable(){const t=this.state.type==="ConnectingForeignKeyTable"?this.state.store:new SA;this.state={type:"CreatingTable",store:t,isSelectingForeignKey:this.state.isSelectingForeignKey}}toUpdatingTableFromConnectingForeignKeyTable(){if(this.state.type!=="ConnectingForeignKeyTable")throw new Error("Invalid state");const t=this.state.store;this.state={type:"UpdatingTable",store:t,isSelectingForeignKey:this.state.isSelectingForeignKey}}toUpdatingTableFromCreatingTable(){if(this.state.type!=="CreatingTable")throw new Error("Invalid state");const t=this.state.store;this.state={type:"UpdatingTable",store:t,isSelectingForeignKey:!1}}toUpdatingTable(t){const r=this.rootStore.cache.getTable(t);if(!r)throw new Error(`Not found table.versionId ${t}`);const n=Ba(r.schema);n.setId(r.id),n.submitChanges();const i=new SA(n,r.id);this.state={type:"UpdatingTable",store:i,isSelectingForeignKey:this.state.isSelectingForeignKey}}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}init(){}dispose(){}async createTable(t,r){try{return await new Wbe(this.rootStore,this.branch,t,r).execute(),!0}catch(n){return console.log(n),!1}}async updateTable(t){try{return await new Xbe(this.rootStore,this.branch,t).execute(),!0}catch(r){return console.error(r),!1}}}class Jbe{constructor(t,r){Pe(this,"stack");this.rootStore=t,this.projectPageModel=r,st(this,{},{autoBind:!0}),this.stack=[this.createFirstStackItem()]}init(){}dispose(){}selectForeignKey(t,r){t.toConnectingForeignKeyTable(r),this.stack.push(new _A(this.rootStore,this.projectPageModel,{type:Qn.List,isSelectingForeignKey:!0}))}onSelectedForeignKey(t,r){const n=this.stack.findIndex(o=>o===t),i=this.stack[n-1];i.state.type===Qn.ConnectingForeignKeyTable&&(i.state.store.setForeignKeyValue(i.state.foreignKeyNode,r),i.state.previousType===Qn.CreatingTable?i.toCreatingTable():i.state.previousType===Qn.UpdatingTable&&i.toUpdatingTableFromConnectingForeignKeyTable()),this.stack.splice(n)}cancelSelectingForeignKey(t){const r=this.stack.findIndex(n=>n===t);r!==-1&&this.stack.splice(r+1),t.state.type===Qn.ConnectingForeignKeyTable&&(t.state.previousType===Qn.CreatingTable?t.toCreatingTable():t.state.previousType===Qn.UpdatingTable&&t.toUpdatingTableFromConnectingForeignKeyTable())}createFirstStackItem(){const t={type:Qn.List,isSelectingForeignKey:!1};return new _A(this.rootStore,this.projectPageModel,t)}}const Zbe=()=>{const e=Zn(),[t]=O.useState(()=>new Jbe(ct,e));return O.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t},b3=O.createContext(null),e0e=()=>{const e=O.useContext(b3);if(!e)throw new Error("Invalid TableStackModelContext");return e},t0e=Ot(({onClick:e})=>{const t=Zn();return x.jsx(Af,{dataTestId:"create-table-button",isDisabled:!t.isEditableRevision,title:"Table",onClick:e})});var pc=(e=>(e.Creating="Creating",e.Updating="Updating",e.Reading="Reading",e))(pc||{});const w3=O.createContext(null),mw=()=>{const e=O.useContext(w3);if(!e)throw new Error("Invalid SchemaEditorActions context");return e},r0e=({isSelected:e,onClick:t,icon:r,dataTestId:n})=>x.jsx(Lo,{"data-testid":n,_disabled:e?{backgroundColor:"gray.50",cursor:"not-allowed"}:void 0,_hover:{backgroundColor:"gray.50"},isDisabled:e,alignSelf:"flex-start",variant:"ghost",onClick:t,width:"48px",children:r}),n0e=[{mode:zn.Tree,icon:x.jsx(Gce,{}),dataTestId:"row-editor-mode-tree"},{mode:zn.Json,icon:x.jsx(Bce,{}),dataTestId:"row-editor-mode-json"},{mode:zn.RefBy,icon:x.jsx(OB,{}),dataTestId:"row-editor-mode-refs"}],yT=({mode:e,onChange:t,availableRefByMode:r})=>{const n=O.useMemo(()=>n0e.filter(i=>!(i.mode===zn.RefBy&&!r)),[r]);return x.jsx(je,{gap:"4px",children:n.map(i=>x.jsx(r0e,{dataTestId:i.dataTestId,isSelected:i.mode===e,onClick:()=>{t==null||t(i.mode)},icon:i.icon},i.mode))})};var $_={},Vh={},xA;function S3(){if(xA)return Vh;xA=1,Object.defineProperty(Vh,"__esModule",{value:!0}),Vh.bind=void 0;function e(t,r){var n=r.type,i=r.listener,o=r.options;return t.addEventListener(n,i,o),function(){t.removeEventListener(n,i,o)}}return Vh.bind=e,Vh}var Ou={},PA;function i0e(){if(PA)return Ou;PA=1;var e=Ou&&Ou.__assign||function(){return e=Object.assign||function(o){for(var a,l=1,c=arguments.length;l<c;l++){a=arguments[l];for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(o[d]=a[d])}return o},e.apply(this,arguments)};Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.bindAll=void 0;var t=S3();function r(o){if(!(typeof o>"u"))return typeof o=="boolean"?{capture:o}:o}function n(o,a){if(a==null)return o;var l=e(e({},o),{options:e(e({},r(a)),r(o.options))});return l}function i(o,a,l){var c=a.map(function(d){var f=n(d,l);return(0,t.bind)(o,f)});return function(){c.forEach(function(f){return f()})}}return Ou.bindAll=i,Ou}var CA;function o0e(){return CA||(CA=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bindAll=e.bind=void 0;var t=S3();Object.defineProperty(e,"bind",{enumerable:!0,get:function(){return t.bind}});var r=i0e();Object.defineProperty(e,"bindAll",{enumerable:!0,get:function(){return r.bindAll}})}($_)),$_}var vw=o0e(),Tp={isSafari:!1,leavingWindow:Symbol("leaving"),enteringWindow:Symbol("entering")};function a0e(e){var t=e.dragLeave;return t.type!=="dragleave"?!1:Tp.isSafari?t.hasOwnProperty(Tp.leavingWindow):t.relatedTarget==null}(function(){if(typeof window>"u")return;var t=navigator,r=t.userAgent,n=r.includes("AppleWebKit")&&!r.includes("Chrome");if(!n)return;Tp.isSafari=!0;function i(){return{enterCount:0,isOverWindow:!1}}var o=i();function a(){o=i()}vw.bindAll(window,[{type:"dragstart",listener:function(){o.enterCount=0,o.isOverWindow=!0}},{type:"drop",listener:a},{type:"dragend",listener:a},{type:"dragenter",listener:function(c){!o.isOverWindow&&o.enterCount===0&&(c[Tp.enteringWindow]=!0),o.isOverWindow=!0,o.enterCount++}},{type:"dragleave",listener:function(c){o.enterCount--,o.isOverWindow&&o.enterCount===0&&(c[Tp.leavingWindow]=!0,o.isOverWindow=!1)}}],{capture:!0})})();function s0e(e,t){var r=t.property,n=t.rule,i=t.priority,o=i===void 0?"":i,a=e.style.getPropertyValue(r),l=e.style.getPropertyPriority(r);return e.style.setProperty(r,n,o),function(){e.style.setProperty(r,a,l)}}function l0e(e){var t=e.current,r=document.elementFromPoint(t.input.clientX,t.input.clientY);return r instanceof HTMLElement?s0e(r,{property:"pointer-events",rule:"auto",priority:"important"}):null}function u0e(){var e,t=document.createElement("style");return t.setAttribute("pdnd-post-drag-fix","true"),document.head.appendChild(t),(e=t.sheet)===null||e===void 0||e.insertRule("* { pointer-events: none !important; }"),function(){document.head.removeChild(t)}}function EA(e){var t=e.current;queueMicrotask(function(){var r=l0e({current:t}),n=u0e();function i(){o(),r==null||r(),n()}var o=vw.bindAll(window,[{type:"pointerdown",listener:i},{type:"pointermove",listener:i},{type:"focusin",listener:i},{type:"focusout",listener:i},{type:"dragstart",listener:i}],{capture:!0})})}function bT(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var c0e=function(t){var r=[],n=null,i=function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];r=l,!n&&(n=requestAnimationFrame(function(){n=null,t.apply(void 0,r)}))};return i.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},i},A_=c0e(function(e){return e()}),jg=function(){var e=null;function t(n){var i=requestAnimationFrame(function(){e=null,n()});e={frameId:i,fn:n}}function r(){e&&(cancelAnimationFrame(e.frameId),e.fn(),e=null)}return{schedule:t,flush:r}}();function d0e(e){var t=e.source,r=e.initial,n=e.dispatchEvent,i={dropTargets:[]};function o(l){n(l),i={dropTargets:l.payload.location.current.dropTargets}}var a={start:function(c){var d=c.nativeSetDragImage,f={current:r,previous:i,initial:r};o({eventName:"onGenerateDragPreview",payload:{source:t,location:f,nativeSetDragImage:d}}),jg.schedule(function(){o({eventName:"onDragStart",payload:{source:t,location:f}})})},dragUpdate:function(c){var d=c.current;jg.flush(),A_.cancel(),o({eventName:"onDropTargetChange",payload:{source:t,location:{initial:r,previous:i,current:d}}})},drag:function(c){var d=c.current;A_(function(){jg.flush();var f={initial:r,previous:i,current:d};o({eventName:"onDrag",payload:{source:t,location:f}})})},drop:function(c){var d=c.current,f=c.updatedExternalPayload;jg.flush(),A_.cancel(),o({eventName:"onDrop",payload:{source:f??t,location:{current:d,previous:i,initial:r}}})}};return a}var zP=!1;function _3(){return!zP}function f0e(e){return e.dataTransfer?e.dataTransfer.setDragImage.bind(e.dataTransfer):null}function h0e(e){var t=e.current,r=e.next;if(t.length!==r.length)return!0;for(var n=0;n<t.length;n++)if(t[n].element!==r[n].element)return!0;return!1}function p0e(e){var t=e.event,r=e.dragInterface,n=e.getDropTargetsOver,i=e.dispatchEvent;if(!_3())return;zP=!0;var o=m0e({event:t,dragInterface:r,getDropTargetsOver:n}),a=o;D_({event:t,current:o.dropTargets});var l=d0e({source:r.payload,dispatchEvent:i,initial:o});function c(b){var y=h0e({current:a.dropTargets,next:b.dropTargets});a=b,y&&l.dragUpdate({current:a})}function d(b){var y=bT(b),w=n({target:b.target,input:y,source:r.payload,current:a.dropTargets});w.length&&(b.preventDefault(),D_({event:b,current:w})),c({dropTargets:w,input:y})}function f(b){var y=b.updatedExternalPayload;l.drop({current:a,updatedExternalPayload:y})}function p(){a.dropTargets.length&&c({dropTargets:[],input:a.input}),f({updatedExternalPayload:null}),m()}function m(){zP=!1,g()}var g=vw.bindAll(window,[{type:"dragover",listener:function(y){d(y),l.drag({current:a})}},{type:"dragenter",listener:d},{type:"dragleave",listener:function(y){a0e({dragLeave:y})&&(c({input:a.input,dropTargets:[]}),r.startedFrom==="external"&&p())}},{type:"drop",listener:function(y){var w;y.preventDefault(),D_({event:y,current:a.dropTargets}),f({updatedExternalPayload:r.startedFrom==="external"&&((w=r.getDropPayload)===null||w===void 0?void 0:w.call(r,y))||null}),m(),r.startedFrom==="internal"&&EA({current:a})}},{type:"dragend",listener:function(){p(),r.startedFrom==="internal"&&EA({current:a})}},{type:"pointermove",listener:function(){var b=0;return function(){if(b<20){b++;return}p()}}()},{type:"pointerdown",listener:p}],{capture:!0});l.start({nativeSetDragImage:f0e(t)})}function D_(e){var t,r=e.event,n=e.current,i=(t=n[0])===null||t===void 0?void 0:t.dropEffect;i!=null&&r.dataTransfer&&(r.dataTransfer.dropEffect=i)}function m0e(e){var t=e.event,r=e.dragInterface,n=e.getDropTargetsOver,i=bT(t);if(r.startedFrom==="external")return{input:i,dropTargets:[]};var o=n({input:i,source:r.payload,target:t.target,current:[]});return{input:i,dropTargets:o}}var TA={canStart:_3,start:p0e},qP=new Map;function v0e(e){var t=e.typeKey,r=e.mount,n=qP.get(t);if(n)return n.usageCount++,n;var i={typeKey:t,unmount:r(),usageCount:1};return qP.set(t,i),i}function g0e(e){var t=v0e(e);return function(){t.usageCount--,!(t.usageCount>0)&&(t.unmount(),qP.delete(e.typeKey))}}function UP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y0e(e){if(Array.isArray(e))return UP(e)}function b0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function w0e(e,t){if(e){if(typeof e=="string")return UP(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?UP(e,t):void 0}}function S0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
1390
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _0e(e){return y0e(e)||b0e(e)||w0e(e)||S0e()}function x3(e,t){var r=t.attribute,n=t.value;return e.setAttribute(r,n),function(){return e.removeAttribute(r)}}function P3(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(){t.forEach(function(i){return i()})}}function OA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OA(Object(r),!0).forEach(function(n){W4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M_(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=x0e(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(d){throw d},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
1391
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,l;return{s:function(){r=r.call(e)},n:function(){var d=r.next();return o=d.done,d},e:function(d){a=!0,l=d},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw l}}}}function x0e(e,t){if(e){if(typeof e=="string")return RA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return RA(e,t)}}function RA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function N_(e){return e.slice(0).reverse()}function P0e(e){var t=e.typeKey,r=e.defaultDropEffect,n=new WeakMap,i="data-drop-target-for-".concat(t),o="[".concat(i,"]");function a(g){return n.set(g.element,g),function(){return n.delete(g.element)}}function l(g){return P3(x3(g.element,{attribute:i,value:"true"}),a(g))}function c(g){var b,y,w,_,S,C=g.source,k=g.target,E=g.input,R=g.result,T=R===void 0?[]:R;if(!(k instanceof Element))return T;var A=k.closest(o);if(A==null)return T;var M=n.get(A);if(M==null)return T;var B={input:E,source:C,element:M.element};if(M.canDrop&&!M.canDrop(B))return c({source:C,target:M.element.parentElement,input:E,result:T});var Q=(b=(y=M.getData)===null||y===void 0?void 0:y.call(M,B))!==null&&b!==void 0?b:{},se=(w=(_=M.getDropEffect)===null||_===void 0?void 0:_.call(M,B))!==null&&w!==void 0?w:r,ie=!!(!((S=M.getIsSticky)===null||S===void 0)&&S.call(M,B)),N={data:Q,element:M.element,dropEffect:se,sticky:ie};return c({source:C,target:M.element.parentElement,input:E,result:[].concat(_0e(T),[N])})}function d(g){var b=g.eventName,y=g.payload,w=M_(y.location.current.dropTargets),_;try{for(w.s();!(_=w.n()).done;){var S,C=_.value,k=n.get(C.element),E=vd(vd({},y),{},{self:C});k==null||(S=k[b])===null||S===void 0||S.call(k,E)}}catch(R){w.e(R)}finally{w.f()}}var f={onGenerateDragPreview:d,onDrag:d,onDragStart:d,onDrop:d,onDropTargetChange:function(b){var y=b.payload,w=new Set(y.location.current.dropTargets.map(function(ne){return ne.element})),_=new Set,S=M_(y.location.previous.dropTargets),C;try{for(S.s();!(C=S.n()).done;){var k,E=C.value;_.add(E.element);var R=n.get(E.element),T=w.has(E.element),A=vd(vd({},y),{},{self:E});if(R==null||(k=R.onDropTargetChange)===null||k===void 0||k.call(R,A),!T){var M;R==null||(M=R.onDragLeave)===null||M===void 0||M.call(R,A)}}}catch(ne){S.e(ne)}finally{S.f()}var B=M_(y.location.current.dropTargets),Q;try{for(B.s();!(Q=B.n()).done;){var se,ie,N=Q.value;if(!_.has(N.element)){var X=vd(vd({},y),{},{self:N}),ce=n.get(N.element);ce==null||(se=ce.onDropTargetChange)===null||se===void 0||se.call(ce,X),ce==null||(ie=ce.onDragEnter)===null||ie===void 0||ie.call(ce,X)}}}catch(ne){B.e(ne)}finally{B.f()}}};function p(g){f[g.eventName](g)}function m(g){var b=g.source,y=g.target,w=g.input,_=g.current,S=c({source:b,target:y,input:w});if(S.length>=_.length)return S;for(var C=N_(_),k=N_(S),E=[],R=0;R<C.length;R++){var T=C[R],A=k[R];if(A!=null){E.push(A);continue}if(!T.sticky)break;var M=E[R-1],B=C[R-1];if((M==null?void 0:M.element)===(B==null?void 0:B.element)){E.push(T);continue}break}return N_(E)}return{dropTargetForConsumers:l,getIsOver:m,dispatchEvent:p}}function C0e(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=E0e(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(d){throw d},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
1392
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,l;return{s:function(){r=r.call(e)},n:function(){var d=r.next();return o=d.done,d},e:function(d){a=!0,l=d},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw l}}}}function E0e(e,t){if(e){if(typeof e=="string")return IA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return IA(e,t)}}function IA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function kA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function T0e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kA(Object(r),!0).forEach(function(n){W4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O0e(){var e=new Set,t=null;function r(o){t&&(!o.canMonitor||o.canMonitor(t.canMonitorArgs))&&t.active.add(o)}function n(o){var a=T0e({},o);return e.add(a),r(a),function(){e.delete(a),t&&t.active.delete(a)}}function i(o){var a=o.eventName,l=o.payload;if(a==="onGenerateDragPreview"){t={canMonitorArgs:{initial:l.location.initial,source:l.source},active:new Set};var c=C0e(e),d;try{for(c.s();!(d=c.n()).done;){var f=d.value;r(f)}}catch(w){c.e(w)}finally{c.f()}}if(t){for(var p=Array.from(t.active),m=0,g=p;m<g.length;m++){var b=g[m];if(t.active.has(b)){var y;(y=b[a])===null||y===void 0||y.call(b,l)}}a==="onDrop"&&(t.active.clear(),t=null)}}return{dispatchEvent:i,monitorForConsumers:n}}function R0e(e){var t=e.typeKey,r=e.mount,n=e.dispatchEventToSource,i=e.defaultDropEffect,o=O0e(),a=P0e({typeKey:t,defaultDropEffect:i});function l(f){n==null||n(f),a.dispatchEvent(f),o.dispatchEvent(f)}function c(f){var p=f.event,m=f.dragInterface;TA.start({event:p,dragInterface:m,getDropTargetsOver:a.getIsOver,dispatchEvent:l})}function d(){function f(){var p={canStart:TA.canStart,start:c};return r(p)}return g0e({typeKey:t,mount:f})}return{registerUsage:d,dropTarget:a.dropTargetForConsumers,monitor:o.monitorForConsumers}}var Zb=new WeakMap;function I0e(e){return Zb.set(e.element,e),function(){Zb.delete(e.element)}}var wT=R0e({typeKey:"element",defaultDropEffect:"move",mount:function(t){return vw.bind(window,{type:"dragstart",listener:function(n){var i,o,a,l;if(t.canStart(n)){var c=n.target;if(!(c instanceof HTMLElement))return null;var d=Zb.get(c);if(!d)return null;var f=bT(n),p={element:d.element,dragHandle:(i=d.dragHandle)!==null&&i!==void 0?i:null,input:f};if(d.canDrag&&!d.canDrag(p))return n.preventDefault(),null;if(d.dragHandle){var m=document.elementFromPoint(f.clientX,f.clientY);if(!d.dragHandle.contains(m))return n.preventDefault(),null}try{var g;(g=n.dataTransfer)===null||g===void 0||g.setData("application/vnd.pdnd","")}catch{}var b={element:d.element,dragHandle:(o=d.dragHandle)!==null&&o!==void 0?o:null,data:(a=(l=d.getInitialData)===null||l===void 0?void 0:l.call(d,p))!==null&&a!==void 0?a:{}},y={key:"element",startedFrom:"internal",payload:b};t.start({event:n,dragInterface:y})}}})},dispatchEventToSource:function(t){var r,n,i=t.eventName,o=t.payload;(r=Zb.get(o.source.element))===null||r===void 0||(n=r[i])===null||n===void 0||n.call(r,o)}}),k0e=wT.dropTarget,j0e=wT.monitor;function $0e(e){return P3(wT.registerUsage(),I0e(e),x3(e.element,{attribute:"draggable",value:"true"}))}const C3=(e,t,r)=>{const n=O.useRef(null),[i,o]=O.useState(!1),[a,l]=O.useState(!1),[c,d]=O.useState(!1);return O.useEffect(()=>{let f=null;if(t){if(!n.current)return;f=$0e({element:n.current,getInitialData:()=>({store:e})})}return()=>f==null?void 0:f()},[e,t]),O.useEffect(()=>{if(!n.current)return;let f=null;return(e instanceof pn||e instanceof Jn)&&(f=k0e({element:n.current,onDrop:p=>{const m=p.source.data.store;Zh(e,m)&&r(m),d(!1),o(!1)},onDragEnter:p=>{const m=p.source.data.store;d(Zh(e,m))},onDragLeave:()=>d(!1)})),()=>f==null?void 0:f()},[r,e]),O.useEffect(()=>j0e({onDragStart:f=>{const p=f.source.data.store;(e instanceof pn||e instanceof Jn)&&Zh(e,p)?o(Zh(e,p)):l(!0)},onDrop:()=>{o(!1),l(!1)}}),[e]),{dragAndDropRef:n,isDrop:i,isDisabledDrop:a,isDraggedOver:c}},A0e=[{id:"String",label:Le.String,getSchemaNode:()=>Ba({type:Le.String,default:""})},{id:"Number",label:Le.Number,getSchemaNode:()=>Ba({type:Le.Number,default:0})},{id:"Boolean",label:Le.Boolean,getSchemaNode:()=>Ba({type:Le.Boolean,default:!1})},{id:"Object",label:Le.Object,getSchemaNode:()=>Ba({type:Le.Object,properties:{},required:[],additionalProperties:!1})},{id:"Array",label:Le.Array,getSchemaNode:e=>{let t={type:Le.String,default:""};return"$ref"in e||(e.type===Le.Number||e.type===Le.Boolean||e.type===Le.String)&&(t=e),Ba({type:Le.Array,items:t})}}],D0e=[{id:"ForeignKeyString",label:Le.String,getSchemaNode:e=>{let t={type:Le.String,default:"",foreignKey:""};return!("$ref"in e)&&e.type===Le.Array&&!("$ref"in e.items)&&e.items.type===Le.String&&e.items.foreignKey!==void 0&&(t=e.items),Ba(t)}}],M0e=[{id:"File",label:"File",getSchemaNode:()=>{const e={$ref:hc.File};return Ba(e)}}],E3=[{id:nn(),label:"Types",options:A0e},{id:nn(),label:"Foreign key",options:D0e},{id:nn(),label:"Schemas",options:M0e}],N0e=(e,t)=>{var r;return(r=E3.flatMap(n=>n.options).find(n=>n.id===e))==null?void 0:r.getSchemaNode(t)},T3=Ot(({currentSchema:e,menuButton:t,onSelect:r,dataTestId:n})=>{const i=O.useCallback(async o=>{if(!Array.isArray(o)){const a=N0e(o,e);a&&r(a)}},[e,r]);return x.jsxs(yF,{children:[t,x.jsx(xf,{children:x.jsx(wF,{width:"100px",children:E3.map(o=>x.jsx(_F,{value:"",title:o.label,onChange:i,children:o.options.map(a=>x.jsx(XC,{"data-testid":`${n}-menu-type-${a.id}`,value:a.id,children:a.label},a.id))},o.id))})})]})}),F0e=["Backspace","Escape","Enter","ArrowRight","ArrowLeft","Delete"],gw=({initValue:e,placeholder:t,autoFocus:r,onBlur:n,onChange:i,onEscape:o,onEnter:a,onFocus:l,focusIfDependencyList:c,restrict:d,prefix:f,postfix:p,dataTestId:m})=>{const g=O.useRef(null),b=O.useRef(null);O.useEffect(()=>{var k;r&&((k=g.current)==null||k.focus())},[r]),O.useLayoutEffect(()=>{if(window.getSelection()&&b.current!==null&&g.current){const E=(g.current.textContent||"").length,R=Math.min(E,b.current),T=document.createRange(),A=window.getSelection(),M=g.current.childNodes.length?g.current.childNodes[0]:g.current;T.setStart(M,R),T.collapse(!0),A&&(A.removeAllRanges(),A.addRange(T))}}),Cme(()=>{var k;if(c){(k=g.current)==null||k.focus();const E=window.getSelection();if(g.current&&E){const R=document.createRange();R.selectNodeContents(g.current),R.collapse(!1),E.removeAllRanges(),E.addRange(R)}}},[...c||[]]);const y=O.useCallback(k=>{const E=window.getSelection();E&&E.rangeCount>0&&(b.current=E.getRangeAt(0).startOffset),i==null||i(k.currentTarget.innerText)},[i]),w=O.useCallback(()=>{n==null||n(),b.current=null},[n]),_=O.useCallback(k=>{var E,R;k.key==="Enter"&&(k.preventDefault(),e&&((E=g.current)==null||E.blur(),a==null||a())),k.key==="Escape"&&(k.preventDefault(),e&&((R=g.current)==null||R.blur()),o==null||o()),d&&!F0e.includes(k.key)&&!d.test(k.key)&&k.preventDefault()},[e,a,o,d]),S=O.useCallback(()=>{var k;(k=g.current)==null||k.focus()},[]),C=!e&&t;return x.jsxs(je,{minWidth:0,width:C?"100%":void 0,position:"relative",onClick:S,children:[!C&&f,x.jsx(wt,{"data-testid":m,autoFocus:!0,ref:g,contentEditable:!0,spellCheck:"false",dangerouslySetInnerHTML:{__html:e},outline:0,width:"100%",onBlur:w,onFocus:l,onChange:y,onInput:y,onKeyDown:_}),!C&&p,C&&x.jsx(bt,{cursor:"text",userSelect:"none",pointerEvents:"none",whiteSpace:"nowrap",color:"gray.400",position:"absolute",children:t})]})},O3=({dataTestId:e,...t})=>x.jsx(Ci,{"data-testid":e,_hover:{backgroundColor:"gray.50"},color:"gray.400",icon:x.jsx(J0,{}),variant:"ghost",...t}),R3=Ot(({store:e,typeClassName:t,onBlur:r,onEnter:n,onRemove:i,onSelect:o,dataTestId:a})=>{const{root:l,mode:c}=mw(),[d,f]=O.useState(!1),p=O.useCallback(A=>{e instanceof pn?l.addProperty(e,A,{beforeNode:e.draftProperties[0]}):e instanceof Jn&&l.replaceItems(e,A)},[l,e]),m=!!(l.areThereDropTargets(e)&&e.draftId),{dragAndDropRef:g,isDrop:b,isDraggedOver:y,isDisabledDrop:w}=C3(e,m,p),_=O.useCallback(()=>{f(!1),r==null||r(e)},[r,e]),S=O.useCallback(()=>{f(!0)},[]),C=O.useCallback(()=>{n==null||n(e)},[n,e]),k=O.useCallback(()=>{i==null||i(e)},[i,e]),E=O.useCallback(A=>{l.setId(e,A)},[l,e]),R=O.useCallback(A=>{o(e,A)},[o,e]),T=!d;return e.isDisabled?x.jsxs(je,{gap:"0.5rem",width:"100%",justifyContent:"flex-start",outline:0,children:[x.jsx(je,{flex:0,position:"relative",borderWidth:1,borderStyle:"dashed",borderColor:"#00000000",color:"gray.300",whiteSpace:"nowrap",children:x.jsx(wt,{userSelect:"none",children:e.draftId})}),x.jsx(bt,{color:"gray.300",className:t,children:e.label})]}):x.jsxs(je,{gap:"0.5rem",width:"100%",justifyContent:"flex-start",outline:0,children:[x.jsxs(je,{"data-testid":b&&`${a}-drop`,flex:e.draftId?0:1,ref:g,position:"relative",borderWidth:1,borderStyle:"dashed",borderColor:b?"gray.400":"#00000000",backgroundColor:y?"gray.200":void 0,color:w?"gray.300":void 0,whiteSpace:"nowrap",children:[e.isDisabled?x.jsx(wt,{userSelect:"none",children:e.draftId}):x.jsxs(x.Fragment,{children:[m&&x.jsx(je,{"data-testid":`${a}-drag-button`,position:"absolute",left:"-34px",className:T?t:void 0,cursor:"grab",_hover:{backgroundColor:"gray.100"},height:"100%",alignItems:"center",justifyContent:"center",borderRadius:"4px",pl:"2px",pr:"2px",children:x.jsx(Tce,{boxSize:"14px",color:"gray.300"})}),x.jsx(gw,{dataTestId:a,autoFocus:!e.draftId,initValue:e.draftId,placeholder:e.draftParent?"Enter the name of the field":"Enter the name of the table",onBlur:_,onFocus:S,onChange:E,onEnter:C,focusIfDependencyList:[e.type]})]}),c===pc.Updating&&e.draftId&&e.isDirtyItself&&x.jsx(wt,{cursor:"default",children:"*"})]}),e.draftId&&x.jsx(T3,{dataTestId:a,currentSchema:e.getSchema({skipObjectProperties:!0}),onSelect:R,menuButton:x.jsx(YC,{"data-testid":`${a}-select-type-button`,as:bt,color:"gray.300",textDecoration:"underline",cursor:"pointer",className:T?t:void 0,children:e.label})}),i&&e.draftId&&x.jsx(O3,{"data-testid":`${a}-remove-button`,height:"26px","aria-label":"remove",color:"gray.200",_hover:{color:"gray.400"},className:T?t:void 0,onClick:k})]})}),ST=({field:e,fieldClassName:t,children:r})=>x.jsxs(je,{flexDirection:"column",alignSelf:"flex-start",width:"100%",children:[x.jsxs(je,{gap:"4px",alignItems:"center",height:"30px",mt:"2px",mb:"2px",className:t,position:"relative",children:[x.jsx(wt,{position:"absolute",ml:"-200px",height:"100%",width:"200px"}),x.jsx(wt,{color:"gray.300",children:x.jsx(HE,{})}),e]}),r&&x.jsx(je,{ml:"7px",pl:"18px",borderLeftWidth:1,borderLeftStyle:"solid",borderLeftColor:"white",_hover:{borderLeftColor:"blackAlpha.200"},children:r})]}),L0e=Ot(({node:e,dataTestId:t})=>{const{mode:r,root:n}=mw(),i=O.useCallback(f=>{const p=e.draftItems;p instanceof pn?n.addProperty(p,f,{beforeNode:p.draftProperties[0]}):p instanceof Jn&&n.replaceItems(p,f)},[e.draftItems,n]),{dragAndDropRef:o,isDrop:a,isDraggedOver:l,isDisabledDrop:c}=C3(e.draftItems,!0,i),d=O.useCallback(f=>{n.replaceItems(e,f),f instanceof pn&&!f.$ref&&n.addProperty(f,new ec)},[e,n]);return x.jsx(je,{flexDirection:"column",width:"100%",children:x.jsx(ST,{field:x.jsx(T3,{dataTestId:t,currentSchema:e.draftItems.getSchema({skipObjectProperties:!0}),onSelect:d,menuButton:x.jsx(wt,{"data-testid":a&&`${t}-drop`,ref:o,borderWidth:1,borderStyle:"dashed",borderColor:a?"gray.400":"#00000000",backgroundColor:l?"gray.200":void 0,color:c?"gray.300":void 0,children:x.jsxs(YC,{"data-testid":`${t}-select-type-button`,as:bt,color:a?void 0:"gray.300",cursor:"pointer",outline:0,_hover:{textDecoration:"underline",textDecorationColor:"gray.300"},children:[e.draftItems.label,r===pc.Updating&&e.draftItems.isDirtyItself&&x.jsx("span",{children:"*"})]})})}),children:x.jsx(_T,{dataTestId:`${t}-0`,node:e.draftItems})})})}),B0e="_Root_1ypkj_1",V0e="_Field_1ypkj_1",e0={Root:B0e,Field:V0e},z0e=Ot(({node:e,dataTestId:t})=>{const{root:r}=mw(),n=O.useCallback(()=>{r.addProperty(e,new ec)},[e,r]),i=O.useCallback(c=>{c.draftId||r.removeProperty(e,c)},[e,r]),o=O.useCallback(c=>{r.removeProperty(e,c)},[e,r]),a=O.useCallback((c,d)=>{r.replaceProperty(e,c,d)},[e,r]),l=O.useCallback(c=>{c instanceof pn?r.addProperty(c,new ec,{beforeNode:c.draftProperties[0]}):r.addProperty(e,new ec,{afterNode:c})},[e,r]);return x.jsxs(je,{flexDirection:"column",width:"100%",children:[e.draftProperties.map((c,d)=>x.jsx(ST,{fieldClassName:e0.Root,field:x.jsx(R3,{dataTestId:`${t}-${d}`,store:c,typeClassName:e0.Field,onSelect:a,onBlur:i,onRemove:o,onEnter:l}),children:x.jsx(_T,{dataTestId:`${t}-${d}`,node:c})},c.nodeId)),e.showingCreateField&&x.jsx(wt,{ml:"-14px",children:x.jsx(Af,{dataTestId:`${t}-create-field-button`,title:"Field",isDisabled:e.isDisabledCreateField,onClick:n})})]})}),q0e=Ot(({node:e,dataTestId:t})=>{const r=mw(),n=O.useCallback(()=>{r.onSelectForeignKey(e)},[r,e]);return x.jsxs(je,{gap:"4px",alignItems:"center",height:"30px",mt:"2px",mb:"2px",children:[x.jsx(wt,{color:"gray.300",children:x.jsx(HE,{})}),x.jsx(je,{gap:"0.5rem",width:"100%",justifyContent:"flex-start",outline:0,_hover:{textDecoration:"underline",textDecorationColor:"gray.300"},onClick:n,children:x.jsx(bt,{color:"gray.300",cursor:"pointer","data-testid":`${t}-connect-foreign-key`,children:e.draftForeignKey||"<Connect table>"})})]})}),U0e=Ot(({node:e,dataTestId:t})=>e.draftForeignKey?x.jsx(je,{flexDirection:"column",width:"100%",children:x.jsx(q0e,{dataTestId:`${t}-0`,node:e.draftForeignKey})}):null),_T=({node:e,dataTestId:t})=>{if(e instanceof pn)return x.jsx(z0e,{dataTestId:t,node:e});if(e instanceof Jn)return x.jsx(L0e,{dataTestId:t,node:e});if(e instanceof ec)return x.jsx(U0e,{dataTestId:t,node:e})},H0e=Ot(({store:e})=>{const t=O.useCallback((n,i)=>{i.setId(n.draftId),e.replaceNode(i)},[e]),r=O.useCallback(n=>{n instanceof pn&&n.addProperty(new ec,{beforeNode:n.draftProperties[0]})},[]);return x.jsx(ST,{fieldClassName:e0.Root,field:x.jsx(R3,{dataTestId:"0",store:e.node,typeClassName:e0.Field,onSelect:t,onEnter:r}),children:x.jsx(_T,{dataTestId:"0",node:e.node})})}),I3=({height:e="2.5rem",onClick:t,isDisabled:r,dataTestId:n})=>x.jsx(Lo,{"data-testid":n,isDisabled:r,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",height:e,variant:"ghost",onClick:t,children:x.jsx(Vce,{})}),W0e=({dataTestId:e,...t})=>x.jsx(Ci,{"data-testid":e,_hover:{backgroundColor:"gray.100"},color:"gray.400",icon:x.jsx(Ece,{}),variant:"ghost",...t}),K0e="_JsonCard_15gzu_1",G0e="_CopyButton_15gzu_1",jA={JsonCard:K0e,CopyButton:G0e},k3=({data:e})=>{const t=JSON.stringify(e,null,3),r=O.useCallback(async()=>{const n="text/plain",i=new Blob([t],{type:n}),o=[new ClipboardItem({[n]:i})];await navigator.clipboard.write(o),KE({status:"success",variant:"subtle",icon:!1,colorScheme:"gray",duration:1500,isClosable:!0,position:"top",description:"Copied to clipboard"})},[t]);return x.jsxs(wt,{width:"100%",position:"relative",className:jA.JsonCard,children:[x.jsx(W0e,{dataTestId:"json-card-copy-button","aria-label":"",position:"absolute",top:"8px",right:"8px",className:jA.CopyButton,onClick:r}),x.jsx(BC,{whiteSpace:"pre-wrap",backgroundColor:"gray.50",padding:"24px",width:"100%",borderRadius:"8px",children:t})]})},j3=({onClick:e,isDisabled:t,dataTestId:r})=>x.jsx(Lo,{"data-testid":r,isDisabled:t,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",color:"gray.400",height:"2.5rem",variant:"ghost",onClick:e,children:x.jsx(PB,{size:"16"})}),Q0e="_Root_1k7pa_1",Y0e="_Actions_1k7pa_1",$A={Root:Q0e,Actions:Y0e},AA=Ot(({store:e,mode:t,onApprove:r,onCancel:n,onSelectForeignKey:i})=>{const[o,a]=O.useState(!1),l=O.useCallback(async()=>{a(!0),await r(),a(!1)},[r]);return x.jsx(w3.Provider,{value:{onSelectForeignKey:i,mode:t,root:e},children:x.jsxs(je,{flex:1,flexDirection:"column",gap:"0.5rem",className:$A.Root,"date-testid":"schema-data-card",children:[x.jsxs(je,{justifyContent:"space-between",width:"100%",alignItems:"center",paddingBottom:"8px",children:[x.jsxs(wt,{children:[t===pc.Creating?x.jsx(Z0,{dataTestId:"close-create-table-button",onClick:n}):x.jsx(I3,{dataTestId:"back-to-table-list-button",onClick:n}),x.jsx(Qm,{dataTestId:"schema-editor-approve-button",onClick:l,isDisabled:e.isApproveDisabled,loading:o}),t===pc.Updating&&e.isDirty&&x.jsx(j3,{dataTestId:"schema-editor-revert-button",onClick:e.resetChanges})]}),x.jsx(wt,{className:$A.Actions,children:x.jsx(yT,{availableRefByMode:!1,mode:e.viewMode||zn.Tree,onChange:e.setViewMode})})]}),e.viewMode===zn.Tree&&x.jsx(wt,{paddingBottom:"4rem",children:x.jsx(H0e,{store:e})}),e.viewMode===zn.Json&&x.jsx(k3,{data:e.getPlainSchema()})]})})}),F_=()=>x.jsx(je,{width:"100%",borderStyle:"solid",borderTopWidth:1,borderColor:"gray.100",justifyContent:"center",color:"gray.400",fontWeight:"300",pt:"0.5rem",pb:"0.5rem",children:x.jsx(wt,{backgroundColor:"gray.50",pl:"5px",pr:"5px",borderRadius:"5px",children:"Select or create a table to be referenced by the above table"})}),X0e=({previousType:e,tableId:t,foreignKeyPath:r,onCancel:n})=>{const i=O.useMemo(()=>e===Qn.UpdatingTable?"updating":e===Qn.CreatingTable?"creating":"",[e]);return x.jsx(wt,{width:"100%",borderStyle:"solid",borderLeftWidth:2,borderColor:"gray.200",pl:"1rem",mb:"1rem",children:x.jsxs(je,{gap:"4px",alignItems:"center",height:"30px",mt:"2px",mb:"2px",color:"gray.400",fontWeight:"300",children:[x.jsx(bt,{textDecoration:"underline",cursor:"pointer",onClick:n,children:"Back"}),x.jsxs(bt,{whiteSpace:"nowrap",children:["- ",i,' "',t,'" -']}),x.jsxs(bt,{minWidth:0,dir:"rtl",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:["path: ",r]})]})})},J0e=Ne`
|
1393
|
-
mutation DeleteTableMst($data: RemoveTableInput!) {
|
1394
|
-
removeTable(data: $data) {
|
1395
|
-
branch {
|
1396
|
-
...BranchMst
|
1397
|
-
}
|
1398
|
-
}
|
1399
|
-
}
|
1400
|
-
${Qs}
|
1401
|
-
`,Z0e=async e=>{const t=await xr.mutate({mutation:J0e,variables:e});if(!t.data)throw t.errors;return t.data};class ewe{constructor(t,r){this.projectPageModel=t,this.tableId=r}get branch(){return this.projectPageModel.branchOrThrow}async execute(){const t=await this.deleteTableRequest();return await this.updateTablesConnection(),this.branch.updateTouched(t),!0}async deleteTableRequest(){return(await Z0e({data:{revisionId:this.branch.draft.id,tableId:this.tableId}})).removeTable.branch.touched}async updateTablesConnection(){const t=this.branch.draft,r=t.tablesConnection.edges.find(n=>n.node.id===this.tableId);t.tablesConnection.removeEdge(r==null?void 0:r.cursor)}}class twe{constructor(t,r){this.rootStore=t,this.projectPageModel=r,st(this,{},{autoBind:!0}),this.init()}get totalCount(){return this.items.length}get hasNextPage(){return this.revision.tablesConnection.availableNextPage}get isEditableRevision(){return this.projectPageModel.isEditableRevision}get items(){return this.revision.tablesConnection.edges.map(({node:t})=>({id:t.id,versionId:t.versionId,readonly:t.readonly,title:t.id,count:t.count,link:""}))}dispose(){}tryToFetchNextPage(){this.hasNextPage&&this.rootStore.queryTables({revisionId:this.revision.id,first:50,after:this.revision.tablesConnection.endCursor||void 0})}async deleteTable(t){try{return await new ewe(this.projectPageModel,t).execute()}catch(r){return console.log(r),!1}}init(){}get revision(){return this.projectPageModel.revisionOrThrow}}const rwe=()=>{const e=Zn(),[t]=O.useState(()=>new twe(ct,e));return O.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t},nwe=({onRemove:e,dataTestId:t})=>{const[r,n]=O.useState(!1),i=O.useCallback(async()=>{n(!0),await(e==null?void 0:e()),n(!1)},[e]);return x.jsx(Ci,{"data-testid":t,_hover:{backgroundColor:"gray.100"},"aria-label":"",color:"gray.400",icon:x.jsx(J0,{}),isLoading:r,variant:"ghost",onClick:i})},iwe="_Row_1lkxi_1",owe="_RemoveRowButton_1lkxi_1",DA={Row:iwe,RemoveRowButton:owe},awe=({table:e,store:t,onSettings:r,onSelect:n})=>{const i=O.useCallback(async()=>{r(e.versionId)},[r,e.versionId]),o=O.useCallback(()=>t.deleteTable(e.id),[t,e.id]),a=O.useCallback(()=>{n==null||n(e.id)},[n,e.id]),l=!!n;return x.jsx(wt,{height:"2.5rem",width:"100%","data-testid":`table-${e.id}`,children:x.jsxs(je,{_hover:{backgroundColor:"gray.50"},alignItems:"center",className:DA.Row,gap:"4px",paddingLeft:"1rem",children:[x.jsxs(je,{width:"150px",children:[n?x.jsx(bt,{maxWidth:"140px",textDecoration:"underline",cursor:"pointer",onClick:a,"data-testid":`table-${e.id}-select`,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:e.id}):x.jsx(qo,{to:`${e.id}`,"data-testid":`table-${e.id}-link`,children:x.jsx(bt,{maxWidth:"140px",textDecoration:"underline",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:e.id})}),!e.readonly&&t.isEditableRevision&&x.jsx(bt,{children:"*"})]}),x.jsxs(je,{alignItems:"center",flex:1,justifyContent:"space-between",minHeight:"40px",children:[x.jsxs(bt,{color:"gray.400",fontWeight:"300",ml:"16px",children:[e.count," rows"]}),!l&&t.isEditableRevision&&x.jsxs(je,{className:DA.RemoveRowButton,children:[x.jsx(MV,{dataTestId:`table-settings-button-${e.id}`,onClick:i}),x.jsx(nwe,{dataTestId:`remove-table-button-${e.id}`,onRemove:o})]})]})]})},e.versionId)},swe=Ot(({onSettings:e,onSelect:t})=>{const r=rwe();return x.jsx(pw,{useWindowScroll:!0,totalCount:r.totalCount,defaultItemHeight:40,increaseViewportBy:40*100,endReached:r.hasNextPage?r.tryToFetchNextPage:void 0,itemContent:n=>{const i=r.items[n];if(i)return x.jsx(awe,{table:i,store:r,onSettings:e,onSelect:t},i.versionId)}})}),lwe=Ot(()=>{const{root:e,item:t}=e0e(),r=O.useCallback(l=>{e.selectForeignKey(t,l)},[t,e]),n=O.useCallback(()=>{e.cancelSelectingForeignKey(t)},[t,e]),i=O.useCallback(async()=>{if(t.state.type===Qn.CreatingTable){const l=t.state.store;await t.createTable(l.draftTableId,l.getPlainSchema())&&(l.submitChanges(),t.state.isSelectingForeignKey?e.onSelectedForeignKey(t,l.draftTableId):t.toUpdatingTableFromCreatingTable())}},[t,e]),o=O.useCallback(async()=>{if(t.state.type===Qn.UpdatingTable){const l=t.state.store;await t.updateTable(l)&&l.submitChanges()}},[t]),a=O.useCallback(l=>{e.onSelectedForeignKey(t,l)},[t,e]);if(t.state.type===Qn.ConnectingForeignKeyTable){const l=t.state.store;return x.jsx(x.Fragment,{children:x.jsx(X0e,{previousType:t.state.previousType,foreignKeyPath:t.currentForeignKeyPath,onCancel:n,tableId:l.draftTableId})})}if(t.state.type===Qn.List)return x.jsxs(x.Fragment,{children:[t.state.isSelectingForeignKey&&x.jsx(F_,{}),x.jsx(t0e,{onClick:t.toCreatingTable}),x.jsx(wt,{paddingTop:"0.5rem",paddingBottom:"1rem",children:x.jsx(swe,{onSettings:t.toUpdatingTable,onSelect:t.state.isSelectingForeignKey?a:void 0})})]});if(t.state.type===Qn.CreatingTable){const l=t.state.store;return x.jsxs(x.Fragment,{children:[t.state.isSelectingForeignKey&&x.jsx(F_,{}),x.jsx(AA,{store:l,mode:pc.Creating,onApprove:i,onCancel:t.toList,onSelectForeignKey:r})]})}if(t.state.type===Qn.UpdatingTable){const l=t.state.store;return x.jsxs(x.Fragment,{children:[t.state.isSelectingForeignKey&&x.jsx(F_,{}),x.jsx(AA,{store:l,mode:pc.Updating,onApprove:o,onCancel:t.toList,onSelectForeignKey:r})]})}return null}),L_=Ot(()=>{const e=Zbe();return x.jsx(x.Fragment,{children:e.stack.map(t=>x.jsx(b3.Provider,{value:{root:e,item:t},children:x.jsx(lwe,{})},t.id))})}),uwe="_Root_1k7pa_1",cwe="_Actions_1k7pa_1",t0={Root:uwe,Actions:cwe},dwe="row-edit-mode",fwe=({data:e})=>{const[t,r]=Ome(dwe,zn.Tree);return x.jsxs(je,{alignItems:"flex-start",flexDirection:"column",gap:"1rem",className:t0.Root,flex:1,children:[x.jsxs(je,{justifyContent:"space-between",width:"100%",alignItems:"center",children:[x.jsx(je,{minHeight:"40px"}),x.jsx(wt,{className:t0.Actions,children:x.jsx(yT,{mode:t||zn.Tree,onChange:r})})]}),t===zn.Tree&&x.jsxs(je,{alignItems:"center",flex:1,gap:"1rem",justifyContent:"center",width:"100%",children:[x.jsx(WE,{color:"gray"}),x.jsx(bt,{color:"gray.400",children:"Unsupported schema, use JSON mode"})]}),t===zn.Json&&x.jsx(BC,{whiteSpace:"pre-wrap",backgroundColor:"gray.50",padding:"1rem",paddingRight:"5rem",children:JSON.stringify(e,null,4)})]})};var $g={exports:{}},B_={},ys={},Ru={},V_={},z_={},q_={},MA;function r0(){return MA||(MA=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(S){if(super(),!e.IDENTIFIER.test(S))throw new Error("CodeGen: name must be a valid identifier");this.str=S}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(S){super(),this._items=typeof S=="string"?[S]:S}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const S=this._items[0];return S===""||S==='""'}get str(){var S;return(S=this._str)!==null&&S!==void 0?S:this._str=this._items.reduce((C,k)=>`${C}${k}`,"")}get names(){var S;return(S=this._names)!==null&&S!==void 0?S:this._names=this._items.reduce((C,k)=>(k instanceof r&&(C[k.str]=(C[k.str]||0)+1),C),{})}}e._Code=n,e.nil=new n("");function i(_,...S){const C=[_[0]];let k=0;for(;k<S.length;)l(C,S[k]),C.push(_[++k]);return new n(C)}e._=i;const o=new n("+");function a(_,...S){const C=[g(_[0])];let k=0;for(;k<S.length;)C.push(o),l(C,S[k]),C.push(o,g(_[++k]));return c(C),new n(C)}e.str=a;function l(_,S){S instanceof n?_.push(...S._items):S instanceof r?_.push(S):_.push(p(S))}e.addCodeArg=l;function c(_){let S=1;for(;S<_.length-1;){if(_[S]===o){const C=d(_[S-1],_[S+1]);if(C!==void 0){_.splice(S-1,3,C);continue}_[S++]="+"}S++}}function d(_,S){if(S==='""')return _;if(_==='""')return S;if(typeof _=="string")return S instanceof r||_[_.length-1]!=='"'?void 0:typeof S!="string"?`${_.slice(0,-1)}${S}"`:S[0]==='"'?_.slice(0,-1)+S.slice(1):void 0;if(typeof S=="string"&&S[0]==='"'&&!(_ instanceof r))return`"${_}${S.slice(1)}`}function f(_,S){return S.emptyStr()?_:_.emptyStr()?S:a`${_}${S}`}e.strConcat=f;function p(_){return typeof _=="number"||typeof _=="boolean"||_===null?_:g(Array.isArray(_)?_.join(","):_)}function m(_){return new n(g(_))}e.stringify=m;function g(_){return JSON.stringify(_).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=g;function b(_){return typeof _=="string"&&e.IDENTIFIER.test(_)?new n(`.${_}`):i`[${_}]`}e.getProperty=b;function y(_){if(typeof _=="string"&&e.IDENTIFIER.test(_))return new n(`${_}`);throw new Error(`CodeGen: invalid export name: ${_}, use explicit $id name mapping`)}e.getEsmExportName=y;function w(_){return new n(_.toString())}e.regexpCode=w}(q_)),q_}var U_={},NA;function FA(){return NA||(NA=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=r0();class r extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:d,parent:f}={}){this._names={},this._prefixes=d,this._parent=f}toName(d){return d instanceof t.Name?d:this.name(d)}name(d){return new t.Name(this._newName(d))}_newName(d){const f=this._names[d]||this._nameGroup(d);return`${d}${f.index++}`}_nameGroup(d){var f,p;if(!((p=(f=this._parent)===null||f===void 0?void 0:f._prefixes)===null||p===void 0)&&p.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}e.Scope=i;class o extends t.Name{constructor(d,f){super(f),this.prefix=d}setValue(d,{property:f,itemIndex:p}){this.value=d,this.scopePath=(0,t._)`.${new t.Name(f)}[${p}]`}}e.ValueScopeName=o;const a=(0,t._)`\n`;class l extends i{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?a:t.nil}}get(){return this._scope}name(d){return new o(d,this._newName(d))}value(d,f){var p;if(f.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(d),{prefix:g}=m,b=(p=f.key)!==null&&p!==void 0?p:f.ref;let y=this._values[g];if(y){const S=y.get(b);if(S)return S}else y=this._values[g]=new Map;y.set(b,m);const w=this._scope[g]||(this._scope[g]=[]),_=w.length;return w[_]=f.ref,m.setValue(f,{property:g,itemIndex:_}),m}getValue(d,f){const p=this._values[d];if(p)return p.get(f)}scopeRefs(d,f=this._values){return this._reduceValues(f,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${d}${p.scopePath}`})}scopeCode(d=this._values,f,p){return this._reduceValues(d,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},f,p)}_reduceValues(d,f,p={},m){let g=t.nil;for(const b in d){const y=d[b];if(!y)continue;const w=p[b]=p[b]||new Map;y.forEach(_=>{if(w.has(_))return;w.set(_,n.Started);let S=f(_);if(S){const C=this.opts.es5?e.varKinds.var:e.varKinds.const;g=(0,t._)`${g}${C} ${_} = ${S};${this.opts._n}`}else if(S=m==null?void 0:m(_))g=(0,t._)`${g}${S}${this.opts._n}`;else throw new r(_);w.set(_,n.Completed)})}return g}}e.ValueScope=l}(U_)),U_}var LA;function Dt(){return LA||(LA=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=r0(),r=FA();var n=r0();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var i=FA();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames($,F){return this}}class a extends o{constructor($,F,V){super(),this.varKind=$,this.name=F,this.rhs=V}render({es5:$,_n:F}){const V=$?r.varKinds.var:this.varKind,de=this.rhs===void 0?"":` = ${this.rhs}`;return`${V} ${this.name}${de};`+F}optimizeNames($,F){if($[this.name.str])return this.rhs&&(this.rhs=N(this.rhs,$,F)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class l extends o{constructor($,F,V){super(),this.lhs=$,this.rhs=F,this.sideEffects=V}render({_n:$}){return`${this.lhs} = ${this.rhs};`+$}optimizeNames($,F){if(!(this.lhs instanceof t.Name&&!$[this.lhs.str]&&!this.sideEffects))return this.rhs=N(this.rhs,$,F),this}get names(){const $=this.lhs instanceof t.Name?{}:{...this.lhs.names};return ie($,this.rhs)}}class c extends l{constructor($,F,V,de){super($,V,de),this.op=F}render({_n:$}){return`${this.lhs} ${this.op}= ${this.rhs};`+$}}class d extends o{constructor($){super(),this.label=$,this.names={}}render({_n:$}){return`${this.label}:`+$}}class f extends o{constructor($){super(),this.label=$,this.names={}}render({_n:$}){return`break${this.label?` ${this.label}`:""};`+$}}class p extends o{constructor($){super(),this.error=$}render({_n:$}){return`throw ${this.error};`+$}get names(){return this.error.names}}class m extends o{constructor($){super(),this.code=$}render({_n:$}){return`${this.code};`+$}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames($,F){return this.code=N(this.code,$,F),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class g extends o{constructor($=[]){super(),this.nodes=$}render($){return this.nodes.reduce((F,V)=>F+V.render($),"")}optimizeNodes(){const{nodes:$}=this;let F=$.length;for(;F--;){const V=$[F].optimizeNodes();Array.isArray(V)?$.splice(F,1,...V):V?$[F]=V:$.splice(F,1)}return $.length>0?this:void 0}optimizeNames($,F){const{nodes:V}=this;let de=V.length;for(;de--;){const pe=V[de];pe.optimizeNames($,F)||(X($,pe.names),V.splice(de,1))}return V.length>0?this:void 0}get names(){return this.nodes.reduce(($,F)=>se($,F.names),{})}}class b extends g{render($){return"{"+$._n+super.render($)+"}"+$._n}}class y extends g{}class w extends b{}w.kind="else";class _ extends b{constructor($,F){super(F),this.condition=$}render($){let F=`if(${this.condition})`+super.render($);return this.else&&(F+="else "+this.else.render($)),F}optimizeNodes(){super.optimizeNodes();const $=this.condition;if($===!0)return this.nodes;let F=this.else;if(F){const V=F.optimizeNodes();F=this.else=Array.isArray(V)?new w(V):V}if(F)return $===!1?F instanceof _?F:F.nodes:this.nodes.length?this:new _(ce($),F instanceof _?[F]:F.nodes);if(!($===!1||!this.nodes.length))return this}optimizeNames($,F){var V;if(this.else=(V=this.else)===null||V===void 0?void 0:V.optimizeNames($,F),!!(super.optimizeNames($,F)||this.else))return this.condition=N(this.condition,$,F),this}get names(){const $=super.names;return ie($,this.condition),this.else&&se($,this.else.names),$}}_.kind="if";class S extends b{}S.kind="for";class C extends S{constructor($){super(),this.iteration=$}render($){return`for(${this.iteration})`+super.render($)}optimizeNames($,F){if(super.optimizeNames($,F))return this.iteration=N(this.iteration,$,F),this}get names(){return se(super.names,this.iteration.names)}}class k extends S{constructor($,F,V,de){super(),this.varKind=$,this.name=F,this.from=V,this.to=de}render($){const F=$.es5?r.varKinds.var:this.varKind,{name:V,from:de,to:pe}=this;return`for(${F} ${V}=${de}; ${V}<${pe}; ${V}++)`+super.render($)}get names(){const $=ie(super.names,this.from);return ie($,this.to)}}class E extends S{constructor($,F,V,de){super(),this.loop=$,this.varKind=F,this.name=V,this.iterable=de}render($){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render($)}optimizeNames($,F){if(super.optimizeNames($,F))return this.iterable=N(this.iterable,$,F),this}get names(){return se(super.names,this.iterable.names)}}class R extends b{constructor($,F,V){super(),this.name=$,this.args=F,this.async=V}render($){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render($)}}R.kind="func";class T extends g{render($){return"return "+super.render($)}}T.kind="return";class A extends b{render($){let F="try"+super.render($);return this.catch&&(F+=this.catch.render($)),this.finally&&(F+=this.finally.render($)),F}optimizeNodes(){var $,F;return super.optimizeNodes(),($=this.catch)===null||$===void 0||$.optimizeNodes(),(F=this.finally)===null||F===void 0||F.optimizeNodes(),this}optimizeNames($,F){var V,de;return super.optimizeNames($,F),(V=this.catch)===null||V===void 0||V.optimizeNames($,F),(de=this.finally)===null||de===void 0||de.optimizeNames($,F),this}get names(){const $=super.names;return this.catch&&se($,this.catch.names),this.finally&&se($,this.finally.names),$}}class M extends b{constructor($){super(),this.error=$}render($){return`catch(${this.error})`+super.render($)}}M.kind="catch";class B extends b{render($){return"finally"+super.render($)}}B.kind="finally";class Q{constructor($,F={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...F,_n:F.lines?`
|
1402
|
-
`:""},this._extScope=$,this._scope=new r.Scope({parent:$}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,F){const V=this._extScope.value($,F);return(this._values[V.prefix]||(this._values[V.prefix]=new Set)).add(V),V}getScopeValue($,F){return this._extScope.getValue($,F)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,F,V,de){const pe=this._scope.toName(F);return V!==void 0&&de&&(this._constants[pe.str]=V),this._leafNode(new a($,pe,V)),pe}const($,F,V){return this._def(r.varKinds.const,$,F,V)}let($,F,V){return this._def(r.varKinds.let,$,F,V)}var($,F,V){return this._def(r.varKinds.var,$,F,V)}assign($,F,V){return this._leafNode(new l($,F,V))}add($,F){return this._leafNode(new c($,e.operators.ADD,F))}code($){return typeof $=="function"?$():$!==t.nil&&this._leafNode(new m($)),this}object(...$){const F=["{"];for(const[V,de]of $)F.length>1&&F.push(","),F.push(V),(V!==de||this.opts.es5)&&(F.push(":"),(0,t.addCodeArg)(F,de));return F.push("}"),new t._Code(F)}if($,F,V){if(this._blockNode(new _($)),F&&V)this.code(F).else().code(V).endIf();else if(F)this.code(F).endIf();else if(V)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new _($))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(_,w)}_for($,F){return this._blockNode($),F&&this.code(F).endFor(),this}for($,F){return this._for(new C($),F)}forRange($,F,V,de,pe=this.opts.es5?r.varKinds.var:r.varKinds.let){const Ee=this._scope.toName($);return this._for(new k(pe,Ee,F,V),()=>de(Ee))}forOf($,F,V,de=r.varKinds.const){const pe=this._scope.toName($);if(this.opts.es5){const Ee=F instanceof t.Name?F:this.var("_arr",F);return this.forRange("_i",0,(0,t._)`${Ee}.length`,Me=>{this.var(pe,(0,t._)`${Ee}[${Me}]`),V(pe)})}return this._for(new E("of",de,pe,F),()=>V(pe))}forIn($,F,V,de=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf($,(0,t._)`Object.keys(${F})`,V);const pe=this._scope.toName($);return this._for(new E("in",de,pe,F),()=>V(pe))}endFor(){return this._endBlockNode(S)}label($){return this._leafNode(new d($))}break($){return this._leafNode(new f($))}return($){const F=new T;if(this._blockNode(F),this.code($),F.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(T)}try($,F,V){if(!F&&!V)throw new Error('CodeGen: "try" without "catch" and "finally"');const de=new A;if(this._blockNode(de),this.code($),F){const pe=this.name("e");this._currNode=de.catch=new M(pe),F(pe)}return V&&(this._currNode=de.finally=new B,this.code(V)),this._endBlockNode(M,B)}throw($){return this._leafNode(new p($))}block($,F){return this._blockStarts.push(this._nodes.length),$&&this.code($).endBlock(F),this}endBlock($){const F=this._blockStarts.pop();if(F===void 0)throw new Error("CodeGen: not in self-balancing block");const V=this._nodes.length-F;if(V<0||$!==void 0&&V!==$)throw new Error(`CodeGen: wrong number of nodes: ${V} vs ${$} expected`);return this._nodes.length=F,this}func($,F=t.nil,V,de){return this._blockNode(new R($,F,V)),de&&this.code(de).endFunc(),this}endFunc(){return this._endBlockNode(R)}optimize($=1){for(;$-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode($){return this._currNode.nodes.push($),this}_blockNode($){this._currNode.nodes.push($),this._nodes.push($)}_endBlockNode($,F){const V=this._currNode;if(V instanceof $||F&&V instanceof F)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${F?`${$.kind}/${F.kind}`:$.kind}"`)}_elseNode($){const F=this._currNode;if(!(F instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=F.else=$,this}get _root(){return this._nodes[0]}get _currNode(){const $=this._nodes;return $[$.length-1]}set _currNode($){const F=this._nodes;F[F.length-1]=$}}e.CodeGen=Q;function se(q,$){for(const F in $)q[F]=(q[F]||0)+($[F]||0);return q}function ie(q,$){return $ instanceof t._CodeOrName?se(q,$.names):q}function N(q,$,F){if(q instanceof t.Name)return V(q);if(!de(q))return q;return new t._Code(q._items.reduce((pe,Ee)=>(Ee instanceof t.Name&&(Ee=V(Ee)),Ee instanceof t._Code?pe.push(...Ee._items):pe.push(Ee),pe),[]));function V(pe){const Ee=F[pe.str];return Ee===void 0||$[pe.str]!==1?pe:(delete $[pe.str],Ee)}function de(pe){return pe instanceof t._Code&&pe._items.some(Ee=>Ee instanceof t.Name&&$[Ee.str]===1&&F[Ee.str]!==void 0)}}function X(q,$){for(const F in $)q[F]=(q[F]||0)-($[F]||0)}function ce(q){return typeof q=="boolean"||typeof q=="number"||q===null?!q:(0,t._)`!${U(q)}`}e.not=ce;const ne=j(e.operators.AND);function ee(...q){return q.reduce(ne)}e.and=ee;const ge=j(e.operators.OR);function Z(...q){return q.reduce(ge)}e.or=Z;function j(q){return($,F)=>$===t.nil?F:F===t.nil?$:(0,t._)`${U($)} ${q} ${U(F)}`}function U(q){return q instanceof t.Name?q:(0,t._)`(${q})`}}(z_)),z_}var Vt={},BA;function Jt(){if(BA)return Vt;BA=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.checkStrictMode=Vt.getErrorPath=Vt.Type=Vt.useFunc=Vt.setEvaluated=Vt.evaluatedPropsToName=Vt.mergeEvaluated=Vt.eachItem=Vt.unescapeJsonPointer=Vt.escapeJsonPointer=Vt.escapeFragment=Vt.unescapeFragment=Vt.schemaRefOrVal=Vt.schemaHasRulesButRef=Vt.schemaHasRules=Vt.checkUnknownRules=Vt.alwaysValidSchema=Vt.toHash=void 0;const e=Dt(),t=r0();function r(E){const R={};for(const T of E)R[T]=!0;return R}Vt.toHash=r;function n(E,R){return typeof R=="boolean"?R:Object.keys(R).length===0?!0:(i(E,R),!o(R,E.self.RULES.all))}Vt.alwaysValidSchema=n;function i(E,R=E.schema){const{opts:T,self:A}=E;if(!T.strictSchema||typeof R=="boolean")return;const M=A.RULES.keywords;for(const B in R)M[B]||k(E,`unknown keyword: "${B}"`)}Vt.checkUnknownRules=i;function o(E,R){if(typeof E=="boolean")return!E;for(const T in E)if(R[T])return!0;return!1}Vt.schemaHasRules=o;function a(E,R){if(typeof E=="boolean")return!E;for(const T in E)if(T!=="$ref"&&R.all[T])return!0;return!1}Vt.schemaHasRulesButRef=a;function l({topSchemaRef:E,schemaPath:R},T,A,M){if(!M){if(typeof T=="number"||typeof T=="boolean")return T;if(typeof T=="string")return(0,e._)`${T}`}return(0,e._)`${E}${R}${(0,e.getProperty)(A)}`}Vt.schemaRefOrVal=l;function c(E){return p(decodeURIComponent(E))}Vt.unescapeFragment=c;function d(E){return encodeURIComponent(f(E))}Vt.escapeFragment=d;function f(E){return typeof E=="number"?`${E}`:E.replace(/~/g,"~0").replace(/\//g,"~1")}Vt.escapeJsonPointer=f;function p(E){return E.replace(/~1/g,"/").replace(/~0/g,"~")}Vt.unescapeJsonPointer=p;function m(E,R){if(Array.isArray(E))for(const T of E)R(T);else R(E)}Vt.eachItem=m;function g({mergeNames:E,mergeToName:R,mergeValues:T,resultToName:A}){return(M,B,Q,se)=>{const ie=Q===void 0?B:Q instanceof e.Name?(B instanceof e.Name?E(M,B,Q):R(M,B,Q),Q):B instanceof e.Name?(R(M,Q,B),B):T(B,Q);return se===e.Name&&!(ie instanceof e.Name)?A(M,ie):ie}}Vt.mergeEvaluated={props:g({mergeNames:(E,R,T)=>E.if((0,e._)`${T} !== true && ${R} !== undefined`,()=>{E.if((0,e._)`${R} === true`,()=>E.assign(T,!0),()=>E.assign(T,(0,e._)`${T} || {}`).code((0,e._)`Object.assign(${T}, ${R})`))}),mergeToName:(E,R,T)=>E.if((0,e._)`${T} !== true`,()=>{R===!0?E.assign(T,!0):(E.assign(T,(0,e._)`${T} || {}`),y(E,T,R))}),mergeValues:(E,R)=>E===!0?!0:{...E,...R},resultToName:b}),items:g({mergeNames:(E,R,T)=>E.if((0,e._)`${T} !== true && ${R} !== undefined`,()=>E.assign(T,(0,e._)`${R} === true ? true : ${T} > ${R} ? ${T} : ${R}`)),mergeToName:(E,R,T)=>E.if((0,e._)`${T} !== true`,()=>E.assign(T,R===!0?!0:(0,e._)`${T} > ${R} ? ${T} : ${R}`)),mergeValues:(E,R)=>E===!0?!0:Math.max(E,R),resultToName:(E,R)=>E.var("items",R)})};function b(E,R){if(R===!0)return E.var("props",!0);const T=E.var("props",(0,e._)`{}`);return R!==void 0&&y(E,T,R),T}Vt.evaluatedPropsToName=b;function y(E,R,T){Object.keys(T).forEach(A=>E.assign((0,e._)`${R}${(0,e.getProperty)(A)}`,!0))}Vt.setEvaluated=y;const w={};function _(E,R){return E.scopeValue("func",{ref:R,code:w[R.code]||(w[R.code]=new t._Code(R.code))})}Vt.useFunc=_;var S;(function(E){E[E.Num=0]="Num",E[E.Str=1]="Str"})(S||(Vt.Type=S={}));function C(E,R,T){if(E instanceof e.Name){const A=R===S.Num;return T?A?(0,e._)`"[" + ${E} + "]"`:(0,e._)`"['" + ${E} + "']"`:A?(0,e._)`"/" + ${E}`:(0,e._)`"/" + ${E}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return T?(0,e.getProperty)(E).toString():"/"+f(E)}Vt.getErrorPath=C;function k(E,R,T=E.opts.strictSchema){if(T){if(R=`strict mode: ${R}`,T===!0)throw new Error(R);E.self.logger.warn(R)}}return Vt.checkStrictMode=k,Vt}var Ag={},VA;function wa(){if(VA)return Ag;VA=1,Object.defineProperty(Ag,"__esModule",{value:!0});const e=Dt(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Ag.default=t,Ag}var zA;function yw(){return zA||(zA=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=Dt(),r=Jt(),n=wa();e.keywordError={message:({keyword:w})=>(0,t.str)`must pass "${w}" keyword validation`},e.keyword$DataError={message:({keyword:w,schemaType:_})=>_?(0,t.str)`"${w}" keyword must be ${_} ($data)`:(0,t.str)`"${w}" keyword is invalid ($data)`};function i(w,_=e.keywordError,S,C){const{it:k}=w,{gen:E,compositeRule:R,allErrors:T}=k,A=p(w,_,S);C??(R||T)?c(E,A):d(k,(0,t._)`[${A}]`)}e.reportError=i;function o(w,_=e.keywordError,S){const{it:C}=w,{gen:k,compositeRule:E,allErrors:R}=C,T=p(w,_,S);c(k,T),E||R||d(C,n.default.vErrors)}e.reportExtraError=o;function a(w,_){w.assign(n.default.errors,_),w.if((0,t._)`${n.default.vErrors} !== null`,()=>w.if(_,()=>w.assign((0,t._)`${n.default.vErrors}.length`,_),()=>w.assign(n.default.vErrors,null)))}e.resetErrorsCount=a;function l({gen:w,keyword:_,schemaValue:S,data:C,errsCount:k,it:E}){if(k===void 0)throw new Error("ajv implementation error");const R=w.name("err");w.forRange("i",k,n.default.errors,T=>{w.const(R,(0,t._)`${n.default.vErrors}[${T}]`),w.if((0,t._)`${R}.instancePath === undefined`,()=>w.assign((0,t._)`${R}.instancePath`,(0,t.strConcat)(n.default.instancePath,E.errorPath))),w.assign((0,t._)`${R}.schemaPath`,(0,t.str)`${E.errSchemaPath}/${_}`),E.opts.verbose&&(w.assign((0,t._)`${R}.schema`,S),w.assign((0,t._)`${R}.data`,C))})}e.extendErrors=l;function c(w,_){const S=w.const("err",_);w.if((0,t._)`${n.default.vErrors} === null`,()=>w.assign(n.default.vErrors,(0,t._)`[${S}]`),(0,t._)`${n.default.vErrors}.push(${S})`),w.code((0,t._)`${n.default.errors}++`)}function d(w,_){const{gen:S,validateName:C,schemaEnv:k}=w;k.$async?S.throw((0,t._)`new ${w.ValidationError}(${_})`):(S.assign((0,t._)`${C}.errors`,_),S.return(!1))}const f={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(w,_,S){const{createErrors:C}=w.it;return C===!1?(0,t._)`{}`:m(w,_,S)}function m(w,_,S={}){const{gen:C,it:k}=w,E=[g(k,S),b(w,S)];return y(w,_,E),C.object(...E)}function g({errorPath:w},{instancePath:_}){const S=_?(0,t.str)`${w}${(0,r.getErrorPath)(_,r.Type.Str)}`:w;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,S)]}function b({keyword:w,it:{errSchemaPath:_}},{schemaPath:S,parentSchema:C}){let k=C?_:(0,t.str)`${_}/${w}`;return S&&(k=(0,t.str)`${k}${(0,r.getErrorPath)(S,r.Type.Str)}`),[f.schemaPath,k]}function y(w,{params:_,message:S},C){const{keyword:k,data:E,schemaValue:R,it:T}=w,{opts:A,propertyName:M,topSchemaRef:B,schemaPath:Q}=T;C.push([f.keyword,k],[f.params,typeof _=="function"?_(w):_||(0,t._)`{}`]),A.messages&&C.push([f.message,typeof S=="function"?S(w):S]),A.verbose&&C.push([f.schema,R],[f.parentSchema,(0,t._)`${B}${Q}`],[n.default.data,E]),M&&C.push([f.propertyName,M])}}(V_)),V_}var qA;function hwe(){if(qA)return Ru;qA=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.boolOrEmptySchema=Ru.topBoolOrEmptySchema=void 0;const e=yw(),t=Dt(),r=wa(),n={message:"boolean schema is false"};function i(l){const{gen:c,schema:d,validateName:f}=l;d===!1?a(l,!1):typeof d=="object"&&d.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${f}.errors`,null),c.return(!0))}Ru.topBoolOrEmptySchema=i;function o(l,c){const{gen:d,schema:f}=l;f===!1?(d.var(c,!1),a(l)):d.var(c,!0)}Ru.boolOrEmptySchema=o;function a(l,c){const{gen:d,data:f}=l,p={gen:d,keyword:"false schema",data:f,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:l};(0,e.reportError)(p,n,void 0,c)}return Ru}var Gn={},Iu={},UA;function $3(){if(UA)return Iu;UA=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.getRules=Iu.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(i){return typeof i=="string"&&t.has(i)}Iu.isJSONType=r;function n(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return Iu.getRules=n,Iu}var bs={},HA;function A3(){if(HA)return bs;HA=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.shouldUseRule=bs.shouldUseGroup=bs.schemaHasRulesForType=void 0;function e({schema:n,self:i},o){const a=i.RULES.types[o];return a&&a!==!0&&t(n,a)}bs.schemaHasRulesForType=e;function t(n,i){return i.rules.some(o=>r(n,o))}bs.shouldUseGroup=t;function r(n,i){var o;return n[i.keyword]!==void 0||((o=i.definition.implements)===null||o===void 0?void 0:o.some(a=>n[a]!==void 0))}return bs.shouldUseRule=r,bs}var WA;function n0(){if(WA)return Gn;WA=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.reportTypeError=Gn.checkDataTypes=Gn.checkDataType=Gn.coerceAndCheckDataType=Gn.getJSONTypes=Gn.getSchemaTypes=Gn.DataType=void 0;const e=$3(),t=A3(),r=yw(),n=Dt(),i=Jt();var o;(function(S){S[S.Correct=0]="Correct",S[S.Wrong=1]="Wrong"})(o||(Gn.DataType=o={}));function a(S){const C=l(S.type);if(C.includes("null")){if(S.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!C.length&&S.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');S.nullable===!0&&C.push("null")}return C}Gn.getSchemaTypes=a;function l(S){const C=Array.isArray(S)?S:S?[S]:[];if(C.every(e.isJSONType))return C;throw new Error("type must be JSONType or JSONType[]: "+C.join(","))}Gn.getJSONTypes=l;function c(S,C){const{gen:k,data:E,opts:R}=S,T=f(C,R.coerceTypes),A=C.length>0&&!(T.length===0&&C.length===1&&(0,t.schemaHasRulesForType)(S,C[0]));if(A){const M=b(C,E,R.strictNumbers,o.Wrong);k.if(M,()=>{T.length?p(S,C,T):w(S)})}return A}Gn.coerceAndCheckDataType=c;const d=new Set(["string","number","integer","boolean","null"]);function f(S,C){return C?S.filter(k=>d.has(k)||C==="array"&&k==="array"):[]}function p(S,C,k){const{gen:E,data:R,opts:T}=S,A=E.let("dataType",(0,n._)`typeof ${R}`),M=E.let("coerced",(0,n._)`undefined`);T.coerceTypes==="array"&&E.if((0,n._)`${A} == 'object' && Array.isArray(${R}) && ${R}.length == 1`,()=>E.assign(R,(0,n._)`${R}[0]`).assign(A,(0,n._)`typeof ${R}`).if(b(C,R,T.strictNumbers),()=>E.assign(M,R))),E.if((0,n._)`${M} !== undefined`);for(const Q of k)(d.has(Q)||Q==="array"&&T.coerceTypes==="array")&&B(Q);E.else(),w(S),E.endIf(),E.if((0,n._)`${M} !== undefined`,()=>{E.assign(R,M),m(S,M)});function B(Q){switch(Q){case"string":E.elseIf((0,n._)`${A} == "number" || ${A} == "boolean"`).assign(M,(0,n._)`"" + ${R}`).elseIf((0,n._)`${R} === null`).assign(M,(0,n._)`""`);return;case"number":E.elseIf((0,n._)`${A} == "boolean" || ${R} === null
|
1403
|
-
|| (${A} == "string" && ${R} && ${R} == +${R})`).assign(M,(0,n._)`+${R}`);return;case"integer":E.elseIf((0,n._)`${A} === "boolean" || ${R} === null
|
1404
|
-
|| (${A} === "string" && ${R} && ${R} == +${R} && !(${R} % 1))`).assign(M,(0,n._)`+${R}`);return;case"boolean":E.elseIf((0,n._)`${R} === "false" || ${R} === 0 || ${R} === null`).assign(M,!1).elseIf((0,n._)`${R} === "true" || ${R} === 1`).assign(M,!0);return;case"null":E.elseIf((0,n._)`${R} === "" || ${R} === 0 || ${R} === false`),E.assign(M,null);return;case"array":E.elseIf((0,n._)`${A} === "string" || ${A} === "number"
|
1405
|
-
|| ${A} === "boolean" || ${R} === null`).assign(M,(0,n._)`[${R}]`)}}}function m({gen:S,parentData:C,parentDataProperty:k},E){S.if((0,n._)`${C} !== undefined`,()=>S.assign((0,n._)`${C}[${k}]`,E))}function g(S,C,k,E=o.Correct){const R=E===o.Correct?n.operators.EQ:n.operators.NEQ;let T;switch(S){case"null":return(0,n._)`${C} ${R} null`;case"array":T=(0,n._)`Array.isArray(${C})`;break;case"object":T=(0,n._)`${C} && typeof ${C} == "object" && !Array.isArray(${C})`;break;case"integer":T=A((0,n._)`!(${C} % 1) && !isNaN(${C})`);break;case"number":T=A();break;default:return(0,n._)`typeof ${C} ${R} ${S}`}return E===o.Correct?T:(0,n.not)(T);function A(M=n.nil){return(0,n.and)((0,n._)`typeof ${C} == "number"`,M,k?(0,n._)`isFinite(${C})`:n.nil)}}Gn.checkDataType=g;function b(S,C,k,E){if(S.length===1)return g(S[0],C,k,E);let R;const T=(0,i.toHash)(S);if(T.array&&T.object){const A=(0,n._)`typeof ${C} != "object"`;R=T.null?A:(0,n._)`!${C} || ${A}`,delete T.null,delete T.array,delete T.object}else R=n.nil;T.number&&delete T.integer;for(const A in T)R=(0,n.and)(R,g(A,C,k,E));return R}Gn.checkDataTypes=b;const y={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:C})=>typeof S=="string"?(0,n._)`{type: ${S}}`:(0,n._)`{type: ${C}}`};function w(S){const C=_(S);(0,r.reportError)(C,y)}Gn.reportTypeError=w;function _(S){const{gen:C,data:k,schema:E}=S,R=(0,i.schemaRefOrVal)(S,E,"type");return{gen:C,keyword:"type",data:k,schema:E.type,schemaCode:R,schemaValue:R,parentSchema:E,params:{},it:S}}return Gn}var zh={},KA;function pwe(){if(KA)return zh;KA=1,Object.defineProperty(zh,"__esModule",{value:!0}),zh.assignDefaults=void 0;const e=Dt(),t=Jt();function r(i,o){const{properties:a,items:l}=i.schema;if(o==="object"&&a)for(const c in a)n(i,c,a[c].default);else o==="array"&&Array.isArray(l)&&l.forEach((c,d)=>n(i,d,c.default))}zh.assignDefaults=r;function n(i,o,a){const{gen:l,compositeRule:c,data:d,opts:f}=i;if(a===void 0)return;const p=(0,e._)`${d}${(0,e.getProperty)(o)}`;if(c){(0,t.checkStrictMode)(i,`default is ignored for: ${p}`);return}let m=(0,e._)`${p} === undefined`;f.useDefaults==="empty"&&(m=(0,e._)`${m} || ${p} === null || ${p} === ""`),l.if(m,(0,e._)`${p} = ${(0,e.stringify)(a)}`)}return zh}var ia={},Pr={},GA;function Sa(){if(GA)return Pr;GA=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.validateUnion=Pr.validateArray=Pr.usePattern=Pr.callValidateCode=Pr.schemaProperties=Pr.allSchemaProperties=Pr.noPropertyInData=Pr.propertyInData=Pr.isOwnProperty=Pr.hasPropFunc=Pr.reportMissingProp=Pr.checkMissingProp=Pr.checkReportMissingProp=void 0;const e=Dt(),t=Jt(),r=wa(),n=Jt();function i(S,C){const{gen:k,data:E,it:R}=S;k.if(f(k,E,C,R.opts.ownProperties),()=>{S.setParams({missingProperty:(0,e._)`${C}`},!0),S.error()})}Pr.checkReportMissingProp=i;function o({gen:S,data:C,it:{opts:k}},E,R){return(0,e.or)(...E.map(T=>(0,e.and)(f(S,C,T,k.ownProperties),(0,e._)`${R} = ${T}`)))}Pr.checkMissingProp=o;function a(S,C){S.setParams({missingProperty:C},!0),S.error()}Pr.reportMissingProp=a;function l(S){return S.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Pr.hasPropFunc=l;function c(S,C,k){return(0,e._)`${l(S)}.call(${C}, ${k})`}Pr.isOwnProperty=c;function d(S,C,k,E){const R=(0,e._)`${C}${(0,e.getProperty)(k)} !== undefined`;return E?(0,e._)`${R} && ${c(S,C,k)}`:R}Pr.propertyInData=d;function f(S,C,k,E){const R=(0,e._)`${C}${(0,e.getProperty)(k)} === undefined`;return E?(0,e.or)(R,(0,e.not)(c(S,C,k))):R}Pr.noPropertyInData=f;function p(S){return S?Object.keys(S).filter(C=>C!=="__proto__"):[]}Pr.allSchemaProperties=p;function m(S,C){return p(C).filter(k=>!(0,t.alwaysValidSchema)(S,C[k]))}Pr.schemaProperties=m;function g({schemaCode:S,data:C,it:{gen:k,topSchemaRef:E,schemaPath:R,errorPath:T},it:A},M,B,Q){const se=Q?(0,e._)`${S}, ${C}, ${E}${R}`:C,ie=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,T)],[r.default.parentData,A.parentData],[r.default.parentDataProperty,A.parentDataProperty],[r.default.rootData,r.default.rootData]];A.opts.dynamicRef&&ie.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const N=(0,e._)`${se}, ${k.object(...ie)}`;return B!==e.nil?(0,e._)`${M}.call(${B}, ${N})`:(0,e._)`${M}(${N})`}Pr.callValidateCode=g;const b=(0,e._)`new RegExp`;function y({gen:S,it:{opts:C}},k){const E=C.unicodeRegExp?"u":"",{regExp:R}=C.code,T=R(k,E);return S.scopeValue("pattern",{key:T.toString(),ref:T,code:(0,e._)`${R.code==="new RegExp"?b:(0,n.useFunc)(S,R)}(${k}, ${E})`})}Pr.usePattern=y;function w(S){const{gen:C,data:k,keyword:E,it:R}=S,T=C.name("valid");if(R.allErrors){const M=C.let("valid",!0);return A(()=>C.assign(M,!1)),M}return C.var(T,!0),A(()=>C.break()),T;function A(M){const B=C.const("len",(0,e._)`${k}.length`);C.forRange("i",0,B,Q=>{S.subschema({keyword:E,dataProp:Q,dataPropType:t.Type.Num},T),C.if((0,e.not)(T),M)})}}Pr.validateArray=w;function _(S){const{gen:C,schema:k,keyword:E,it:R}=S;if(!Array.isArray(k))throw new Error("ajv implementation error");if(k.some(B=>(0,t.alwaysValidSchema)(R,B))&&!R.opts.unevaluated)return;const A=C.let("valid",!1),M=C.name("_valid");C.block(()=>k.forEach((B,Q)=>{const se=S.subschema({keyword:E,schemaProp:Q,compositeRule:!0},M);C.assign(A,(0,e._)`${A} || ${M}`),S.mergeValidEvaluated(se,M)||C.if((0,e.not)(A))})),S.result(A,()=>S.reset(),()=>S.error(!0))}return Pr.validateUnion=_,Pr}var QA;function mwe(){if(QA)return ia;QA=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.validateKeywordUsage=ia.validSchemaType=ia.funcKeywordCode=ia.macroKeywordCode=void 0;const e=Dt(),t=wa(),r=Sa(),n=yw();function i(m,g){const{gen:b,keyword:y,schema:w,parentSchema:_,it:S}=m,C=g.macro.call(S.self,w,_,S),k=d(b,y,C);S.opts.validateSchema!==!1&&S.self.validateSchema(C,!0);const E=b.name("valid");m.subschema({schema:C,schemaPath:e.nil,errSchemaPath:`${S.errSchemaPath}/${y}`,topSchemaRef:k,compositeRule:!0},E),m.pass(E,()=>m.error(!0))}ia.macroKeywordCode=i;function o(m,g){var b;const{gen:y,keyword:w,schema:_,parentSchema:S,$data:C,it:k}=m;c(k,g);const E=!C&&g.compile?g.compile.call(k.self,_,S,k):g.validate,R=d(y,w,E),T=y.let("valid");m.block$data(T,A),m.ok((b=g.valid)!==null&&b!==void 0?b:T);function A(){if(g.errors===!1)Q(),g.modifying&&a(m),se(()=>m.error());else{const ie=g.async?M():B();g.modifying&&a(m),se(()=>l(m,ie))}}function M(){const ie=y.let("ruleErrs",null);return y.try(()=>Q((0,e._)`await `),N=>y.assign(T,!1).if((0,e._)`${N} instanceof ${k.ValidationError}`,()=>y.assign(ie,(0,e._)`${N}.errors`),()=>y.throw(N))),ie}function B(){const ie=(0,e._)`${R}.errors`;return y.assign(ie,null),Q(e.nil),ie}function Q(ie=g.async?(0,e._)`await `:e.nil){const N=k.opts.passContext?t.default.this:t.default.self,X=!("compile"in g&&!C||g.schema===!1);y.assign(T,(0,e._)`${ie}${(0,r.callValidateCode)(m,R,N,X)}`,g.modifying)}function se(ie){var N;y.if((0,e.not)((N=g.valid)!==null&&N!==void 0?N:T),ie)}}ia.funcKeywordCode=o;function a(m){const{gen:g,data:b,it:y}=m;g.if(y.parentData,()=>g.assign(b,(0,e._)`${y.parentData}[${y.parentDataProperty}]`))}function l(m,g){const{gen:b}=m;b.if((0,e._)`Array.isArray(${g})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${g} : ${t.default.vErrors}.concat(${g})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(m)},()=>m.error())}function c({schemaEnv:m},g){if(g.async&&!m.$async)throw new Error("async keyword in sync schema")}function d(m,g,b){if(b===void 0)throw new Error(`keyword "${g}" failed to compile`);return m.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function f(m,g,b=!1){return!g.length||g.some(y=>y==="array"?Array.isArray(m):y==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==y||b&&typeof m>"u")}ia.validSchemaType=f;function p({schema:m,opts:g,self:b,errSchemaPath:y},w,_){if(Array.isArray(w.keyword)?!w.keyword.includes(_):w.keyword!==_)throw new Error("ajv implementation error");const S=w.dependencies;if(S!=null&&S.some(C=>!Object.prototype.hasOwnProperty.call(m,C)))throw new Error(`parent schema must have dependencies of ${_}: ${S.join(",")}`);if(w.validateSchema&&!w.validateSchema(m[_])){const k=`keyword "${_}" value is invalid at path "${y}": `+b.errorsText(w.validateSchema.errors);if(g.validateSchema==="log")b.logger.error(k);else throw new Error(k)}}return ia.validateKeywordUsage=p,ia}var ws={},YA;function vwe(){if(YA)return ws;YA=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.extendSubschemaMode=ws.extendSubschemaData=ws.getSubschema=void 0;const e=Dt(),t=Jt();function r(o,{keyword:a,schemaProp:l,schema:c,schemaPath:d,errSchemaPath:f,topSchemaRef:p}){if(a!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const m=o.schema[a];return l===void 0?{schema:m,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${a}`}:{schema:m[l],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(l)}`,errSchemaPath:`${o.errSchemaPath}/${a}/${(0,t.escapeFragment)(l)}`}}if(c!==void 0){if(d===void 0||f===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:d,topSchemaRef:p,errSchemaPath:f}}throw new Error('either "keyword" or "schema" must be passed')}ws.getSubschema=r;function n(o,a,{dataProp:l,dataPropType:c,data:d,dataTypes:f,propertyName:p}){if(d!==void 0&&l!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:m}=a;if(l!==void 0){const{errorPath:b,dataPathArr:y,opts:w}=a,_=m.let("data",(0,e._)`${a.data}${(0,e.getProperty)(l)}`,!0);g(_),o.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(l,c,w.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${l}`,o.dataPathArr=[...y,o.parentDataProperty]}if(d!==void 0){const b=d instanceof e.Name?d:m.let("data",d,!0);g(b),p!==void 0&&(o.propertyName=p)}f&&(o.dataTypes=f);function g(b){o.data=b,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,b]}}ws.extendSubschemaData=n;function i(o,{jtdDiscriminator:a,jtdMetadata:l,compositeRule:c,createErrors:d,allErrors:f}){c!==void 0&&(o.compositeRule=c),d!==void 0&&(o.createErrors=d),f!==void 0&&(o.allErrors=f),o.jtdDiscriminator=a,o.jtdMetadata=l}return ws.extendSubschemaMode=i,ws}var wi={},H_,XA;function D3(){return XA||(XA=1,H_=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),H_}var W_={exports:{}},JA;function gwe(){if(JA)return W_.exports;JA=1;var e=W_.exports=function(n,i,o){typeof i=="function"&&(o=i,i={}),o=i.cb||o;var a=typeof o=="function"?o:o.pre||function(){},l=o.post||function(){};t(i,a,l,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,i,o,a,l,c,d,f,p,m){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,l,c,d,f,p,m);for(var g in a){var b=a[g];if(Array.isArray(b)){if(g in e.arrayKeywords)for(var y=0;y<b.length;y++)t(n,i,o,b[y],l+"/"+g+"/"+y,c,l,g,a,y)}else if(g in e.propsKeywords){if(b&&typeof b=="object")for(var w in b)t(n,i,o,b[w],l+"/"+g+"/"+r(w),c,l,g,a,w)}else(g in e.keywords||n.allKeys&&!(g in e.skipKeywords))&&t(n,i,o,b,l+"/"+g,c,l,g,a)}o(a,l,c,d,f,p,m)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return W_.exports}var ZA;function bw(){if(ZA)return wi;ZA=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.getSchemaRefs=wi.resolveUrl=wi.normalizeId=wi._getFullPath=wi.getFullPath=wi.inlineRef=void 0;const e=Jt(),t=D3(),r=gwe(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(y,w=!0){return typeof y=="boolean"?!0:w===!0?!a(y):w?l(y)<=w:!1}wi.inlineRef=i;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(y){for(const w in y){if(o.has(w))return!0;const _=y[w];if(Array.isArray(_)&&_.some(a)||typeof _=="object"&&a(_))return!0}return!1}function l(y){let w=0;for(const _ in y){if(_==="$ref")return 1/0;if(w++,!n.has(_)&&(typeof y[_]=="object"&&(0,e.eachItem)(y[_],S=>w+=l(S)),w===1/0))return 1/0}return w}function c(y,w="",_){_!==!1&&(w=p(w));const S=y.parse(w);return d(y,S)}wi.getFullPath=c;function d(y,w){return y.serialize(w).split("#")[0]+"#"}wi._getFullPath=d;const f=/#\/?$/;function p(y){return y?y.replace(f,""):""}wi.normalizeId=p;function m(y,w,_){return _=p(_),y.resolve(w,_)}wi.resolveUrl=m;const g=/^[a-z_][-a-z0-9._]*$/i;function b(y,w){if(typeof y=="boolean")return{};const{schemaId:_,uriResolver:S}=this.opts,C=p(y[_]||w),k={"":C},E=c(S,C,!1),R={},T=new Set;return r(y,{allKeys:!0},(B,Q,se,ie)=>{if(ie===void 0)return;const N=E+Q;let X=k[ie];typeof B[_]=="string"&&(X=ce.call(this,B[_])),ne.call(this,B.$anchor),ne.call(this,B.$dynamicAnchor),k[Q]=X;function ce(ee){const ge=this.opts.uriResolver.resolve;if(ee=p(X?ge(X,ee):ee),T.has(ee))throw M(ee);T.add(ee);let Z=this.refs[ee];return typeof Z=="string"&&(Z=this.refs[Z]),typeof Z=="object"?A(B,Z.schema,ee):ee!==p(N)&&(ee[0]==="#"?(A(B,R[ee],ee),R[ee]=B):this.refs[ee]=N),ee}function ne(ee){if(typeof ee=="string"){if(!g.test(ee))throw new Error(`invalid anchor "${ee}"`);ce.call(this,`#${ee}`)}}}),R;function A(B,Q,se){if(Q!==void 0&&!t(B,Q))throw M(se)}function M(B){return new Error(`reference "${B}" resolves to more than one schema`)}}return wi.getSchemaRefs=b,wi}var eD;function ww(){if(eD)return ys;eD=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.getData=ys.KeywordCxt=ys.validateFunctionCode=void 0;const e=hwe(),t=n0(),r=A3(),n=n0(),i=pwe(),o=mwe(),a=vwe(),l=Dt(),c=wa(),d=bw(),f=Jt(),p=yw();function m(Y){if(E(Y)&&(T(Y),k(Y))){w(Y);return}g(Y,()=>(0,e.topBoolOrEmptySchema)(Y))}ys.validateFunctionCode=m;function g({gen:Y,validateName:K,schema:we,schemaEnv:Te,opts:he},Ce){he.code.es5?Y.func(K,(0,l._)`${c.default.data}, ${c.default.valCxt}`,Te.$async,()=>{Y.code((0,l._)`"use strict"; ${S(we,he)}`),y(Y,he),Y.code(Ce)}):Y.func(K,(0,l._)`${c.default.data}, ${b(he)}`,Te.$async,()=>Y.code(S(we,he)).code(Ce))}function b(Y){return(0,l._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${Y.dynamicRef?(0,l._)`, ${c.default.dynamicAnchors}={}`:l.nil}}={}`}function y(Y,K){Y.if(c.default.valCxt,()=>{Y.var(c.default.instancePath,(0,l._)`${c.default.valCxt}.${c.default.instancePath}`),Y.var(c.default.parentData,(0,l._)`${c.default.valCxt}.${c.default.parentData}`),Y.var(c.default.parentDataProperty,(0,l._)`${c.default.valCxt}.${c.default.parentDataProperty}`),Y.var(c.default.rootData,(0,l._)`${c.default.valCxt}.${c.default.rootData}`),K.dynamicRef&&Y.var(c.default.dynamicAnchors,(0,l._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{Y.var(c.default.instancePath,(0,l._)`""`),Y.var(c.default.parentData,(0,l._)`undefined`),Y.var(c.default.parentDataProperty,(0,l._)`undefined`),Y.var(c.default.rootData,c.default.data),K.dynamicRef&&Y.var(c.default.dynamicAnchors,(0,l._)`{}`)})}function w(Y){const{schema:K,opts:we,gen:Te}=Y;g(Y,()=>{we.$comment&&K.$comment&&ie(Y),B(Y),Te.let(c.default.vErrors,null),Te.let(c.default.errors,0),we.unevaluated&&_(Y),A(Y),N(Y)})}function _(Y){const{gen:K,validateName:we}=Y;Y.evaluated=K.const("evaluated",(0,l._)`${we}.evaluated`),K.if((0,l._)`${Y.evaluated}.dynamicProps`,()=>K.assign((0,l._)`${Y.evaluated}.props`,(0,l._)`undefined`)),K.if((0,l._)`${Y.evaluated}.dynamicItems`,()=>K.assign((0,l._)`${Y.evaluated}.items`,(0,l._)`undefined`))}function S(Y,K){const we=typeof Y=="object"&&Y[K.schemaId];return we&&(K.code.source||K.code.process)?(0,l._)`/*# sourceURL=${we} */`:l.nil}function C(Y,K){if(E(Y)&&(T(Y),k(Y))){R(Y,K);return}(0,e.boolOrEmptySchema)(Y,K)}function k({schema:Y,self:K}){if(typeof Y=="boolean")return!Y;for(const we in Y)if(K.RULES.all[we])return!0;return!1}function E(Y){return typeof Y.schema!="boolean"}function R(Y,K){const{schema:we,gen:Te,opts:he}=Y;he.$comment&&we.$comment&&ie(Y),Q(Y),se(Y);const Ce=Te.const("_errs",c.default.errors);A(Y,Ce),Te.var(K,(0,l._)`${Ce} === ${c.default.errors}`)}function T(Y){(0,f.checkUnknownRules)(Y),M(Y)}function A(Y,K){if(Y.opts.jtd)return ce(Y,[],!1,K);const we=(0,t.getSchemaTypes)(Y.schema),Te=(0,t.coerceAndCheckDataType)(Y,we);ce(Y,we,!Te,K)}function M(Y){const{schema:K,errSchemaPath:we,opts:Te,self:he}=Y;K.$ref&&Te.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(K,he.RULES)&&he.logger.warn(`$ref: keywords ignored in schema at path "${we}"`)}function B(Y){const{schema:K,opts:we}=Y;K.default!==void 0&&we.useDefaults&&we.strictSchema&&(0,f.checkStrictMode)(Y,"default is ignored in the schema root")}function Q(Y){const K=Y.schema[Y.opts.schemaId];K&&(Y.baseId=(0,d.resolveUrl)(Y.opts.uriResolver,Y.baseId,K))}function se(Y){if(Y.schema.$async&&!Y.schemaEnv.$async)throw new Error("async schema in sync schema")}function ie({gen:Y,schemaEnv:K,schema:we,errSchemaPath:Te,opts:he}){const Ce=we.$comment;if(he.$comment===!0)Y.code((0,l._)`${c.default.self}.logger.log(${Ce})`);else if(typeof he.$comment=="function"){const Ge=(0,l.str)`${Te}/$comment`,$t=Y.scopeValue("root",{ref:K.root});Y.code((0,l._)`${c.default.self}.opts.$comment(${Ce}, ${Ge}, ${$t}.schema)`)}}function N(Y){const{gen:K,schemaEnv:we,validateName:Te,ValidationError:he,opts:Ce}=Y;we.$async?K.if((0,l._)`${c.default.errors} === 0`,()=>K.return(c.default.data),()=>K.throw((0,l._)`new ${he}(${c.default.vErrors})`)):(K.assign((0,l._)`${Te}.errors`,c.default.vErrors),Ce.unevaluated&&X(Y),K.return((0,l._)`${c.default.errors} === 0`))}function X({gen:Y,evaluated:K,props:we,items:Te}){we instanceof l.Name&&Y.assign((0,l._)`${K}.props`,we),Te instanceof l.Name&&Y.assign((0,l._)`${K}.items`,Te)}function ce(Y,K,we,Te){const{gen:he,schema:Ce,data:Ge,allErrors:$t,opts:Kt,self:It}=Y,{RULES:jt}=It;if(Ce.$ref&&(Kt.ignoreKeywordsWithRef||!(0,f.schemaHasRulesButRef)(Ce,jt))){he.block(()=>de(Y,"$ref",jt.all.$ref.definition));return}Kt.jtd||ee(Y,K),he.block(()=>{for(const ht of jt.rules)Lt(ht);Lt(jt.post)});function Lt(ht){(0,r.shouldUseGroup)(Ce,ht)&&(ht.type?(he.if((0,n.checkDataType)(ht.type,Ge,Kt.strictNumbers)),ne(Y,ht),K.length===1&&K[0]===ht.type&&we&&(he.else(),(0,n.reportTypeError)(Y)),he.endIf()):ne(Y,ht),$t||he.if((0,l._)`${c.default.errors} === ${Te||0}`))}}function ne(Y,K){const{gen:we,schema:Te,opts:{useDefaults:he}}=Y;he&&(0,i.assignDefaults)(Y,K.type),we.block(()=>{for(const Ce of K.rules)(0,r.shouldUseRule)(Te,Ce)&&de(Y,Ce.keyword,Ce.definition,K.type)})}function ee(Y,K){Y.schemaEnv.meta||!Y.opts.strictTypes||(ge(Y,K),Y.opts.allowUnionTypes||Z(Y,K),j(Y,Y.dataTypes))}function ge(Y,K){if(K.length){if(!Y.dataTypes.length){Y.dataTypes=K;return}K.forEach(we=>{q(Y.dataTypes,we)||F(Y,`type "${we}" not allowed by context "${Y.dataTypes.join(",")}"`)}),$(Y,K)}}function Z(Y,K){K.length>1&&!(K.length===2&&K.includes("null"))&&F(Y,"use allowUnionTypes to allow union type keyword")}function j(Y,K){const we=Y.self.RULES.all;for(const Te in we){const he=we[Te];if(typeof he=="object"&&(0,r.shouldUseRule)(Y.schema,he)){const{type:Ce}=he.definition;Ce.length&&!Ce.some(Ge=>U(K,Ge))&&F(Y,`missing type "${Ce.join(",")}" for keyword "${Te}"`)}}}function U(Y,K){return Y.includes(K)||K==="number"&&Y.includes("integer")}function q(Y,K){return Y.includes(K)||K==="integer"&&Y.includes("number")}function $(Y,K){const we=[];for(const Te of Y.dataTypes)q(K,Te)?we.push(Te):K.includes("integer")&&Te==="number"&&we.push("integer");Y.dataTypes=we}function F(Y,K){const we=Y.schemaEnv.baseId+Y.errSchemaPath;K+=` at "${we}" (strictTypes)`,(0,f.checkStrictMode)(Y,K,Y.opts.strictTypes)}class V{constructor(K,we,Te){if((0,o.validateKeywordUsage)(K,we,Te),this.gen=K.gen,this.allErrors=K.allErrors,this.keyword=Te,this.data=K.data,this.schema=K.schema[Te],this.$data=we.$data&&K.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(K,this.schema,Te,this.$data),this.schemaType=we.schemaType,this.parentSchema=K.schema,this.params={},this.it=K,this.def=we,this.$data)this.schemaCode=K.gen.const("vSchema",Me(this.$data,K));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,we.schemaType,we.allowUndefined))throw new Error(`${Te} value must be ${JSON.stringify(we.schemaType)}`);("code"in we?we.trackErrors:we.errors!==!1)&&(this.errsCount=K.gen.const("_errs",c.default.errors))}result(K,we,Te){this.failResult((0,l.not)(K),we,Te)}failResult(K,we,Te){this.gen.if(K),Te?Te():this.error(),we?(this.gen.else(),we(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(K,we){this.failResult((0,l.not)(K),void 0,we)}fail(K){if(K===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(K),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(K){if(!this.$data)return this.fail(K);const{schemaCode:we}=this;this.fail((0,l._)`${we} !== undefined && (${(0,l.or)(this.invalid$data(),K)})`)}error(K,we,Te){if(we){this.setParams(we),this._error(K,Te),this.setParams({});return}this._error(K,Te)}_error(K,we){(K?p.reportExtraError:p.reportError)(this,this.def.error,we)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(K){this.allErrors||this.gen.if(K)}setParams(K,we){we?Object.assign(this.params,K):this.params=K}block$data(K,we,Te=l.nil){this.gen.block(()=>{this.check$data(K,Te),we()})}check$data(K=l.nil,we=l.nil){if(!this.$data)return;const{gen:Te,schemaCode:he,schemaType:Ce,def:Ge}=this;Te.if((0,l.or)((0,l._)`${he} === undefined`,we)),K!==l.nil&&Te.assign(K,!0),(Ce.length||Ge.validateSchema)&&(Te.elseIf(this.invalid$data()),this.$dataError(),K!==l.nil&&Te.assign(K,!1)),Te.else()}invalid$data(){const{gen:K,schemaCode:we,schemaType:Te,def:he,it:Ce}=this;return(0,l.or)(Ge(),$t());function Ge(){if(Te.length){if(!(we instanceof l.Name))throw new Error("ajv implementation error");const Kt=Array.isArray(Te)?Te:[Te];return(0,l._)`${(0,n.checkDataTypes)(Kt,we,Ce.opts.strictNumbers,n.DataType.Wrong)}`}return l.nil}function $t(){if(he.validateSchema){const Kt=K.scopeValue("validate$data",{ref:he.validateSchema});return(0,l._)`!${Kt}(${we})`}return l.nil}}subschema(K,we){const Te=(0,a.getSubschema)(this.it,K);(0,a.extendSubschemaData)(Te,this.it,K),(0,a.extendSubschemaMode)(Te,K);const he={...this.it,...Te,items:void 0,props:void 0};return C(he,we),he}mergeEvaluated(K,we){const{it:Te,gen:he}=this;Te.opts.unevaluated&&(Te.props!==!0&&K.props!==void 0&&(Te.props=f.mergeEvaluated.props(he,K.props,Te.props,we)),Te.items!==!0&&K.items!==void 0&&(Te.items=f.mergeEvaluated.items(he,K.items,Te.items,we)))}mergeValidEvaluated(K,we){const{it:Te,gen:he}=this;if(Te.opts.unevaluated&&(Te.props!==!0||Te.items!==!0))return he.if(we,()=>this.mergeEvaluated(K,l.Name)),!0}}ys.KeywordCxt=V;function de(Y,K,we,Te){const he=new V(Y,we,K);"code"in we?we.code(he,Te):he.$data&&we.validate?(0,o.funcKeywordCode)(he,we):"macro"in we?(0,o.macroKeywordCode)(he,we):(we.compile||we.validate)&&(0,o.funcKeywordCode)(he,we)}const pe=/^\/(?:[^~]|~0|~1)*$/,Ee=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Me(Y,{dataLevel:K,dataNames:we,dataPathArr:Te}){let he,Ce;if(Y==="")return c.default.rootData;if(Y[0]==="/"){if(!pe.test(Y))throw new Error(`Invalid JSON-pointer: ${Y}`);he=Y,Ce=c.default.rootData}else{const It=Ee.exec(Y);if(!It)throw new Error(`Invalid JSON-pointer: ${Y}`);const jt=+It[1];if(he=It[2],he==="#"){if(jt>=K)throw new Error(Kt("property/index",jt));return Te[K-jt]}if(jt>K)throw new Error(Kt("data",jt));if(Ce=we[K-jt],!he)return Ce}let Ge=Ce;const $t=he.split("/");for(const It of $t)It&&(Ce=(0,l._)`${Ce}${(0,l.getProperty)((0,f.unescapeJsonPointer)(It))}`,Ge=(0,l._)`${Ge} && ${Ce}`);return Ge;function Kt(It,jt){return`Cannot access ${It} ${jt} levels up, current level is ${K}`}}return ys.getData=Me,ys}var Dg={},tD;function xT(){if(tD)return Dg;tD=1,Object.defineProperty(Dg,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Dg.default=e,Dg}var Mg={},rD;function Sw(){if(rD)return Mg;rD=1,Object.defineProperty(Mg,"__esModule",{value:!0});const e=bw();class t extends Error{constructor(n,i,o,a){super(a||`can't resolve reference ${o} from id ${i}`),this.missingRef=(0,e.resolveUrl)(n,i,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return Mg.default=t,Mg}var ro={},nD;function _w(){if(nD)return ro;nD=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.resolveSchema=ro.getCompilingSchema=ro.resolveRef=ro.compileSchema=ro.SchemaEnv=void 0;const e=Dt(),t=xT(),r=wa(),n=bw(),i=Jt(),o=ww();class a{constructor(_){var S;this.refs={},this.dynamicAnchors={};let C;typeof _.schema=="object"&&(C=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(S=_.baseId)!==null&&S!==void 0?S:(0,n.normalizeId)(C==null?void 0:C[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=C==null?void 0:C.$async,this.refs={}}}ro.SchemaEnv=a;function l(w){const _=f.call(this,w);if(_)return _;const S=(0,n.getFullPath)(this.opts.uriResolver,w.root.baseId),{es5:C,lines:k}=this.opts.code,{ownProperties:E}=this.opts,R=new e.CodeGen(this.scope,{es5:C,lines:k,ownProperties:E});let T;w.$async&&(T=R.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const A=R.scopeName("validate");w.validateName=A;const M={gen:R,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:R.scopeValue("schema",this.opts.code.source===!0?{ref:w.schema,code:(0,e.stringify)(w.schema)}:{ref:w.schema}),validateName:A,ValidationError:T,schema:w.schema,schemaEnv:w,rootId:S,baseId:w.baseId||S,schemaPath:e.nil,errSchemaPath:w.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let B;try{this._compilations.add(w),(0,o.validateFunctionCode)(M),R.optimize(this.opts.code.optimize);const Q=R.toString();B=`${R.scopeRefs(r.default.scope)}return ${Q}`,this.opts.code.process&&(B=this.opts.code.process(B,w));const ie=new Function(`${r.default.self}`,`${r.default.scope}`,B)(this,this.scope.get());if(this.scope.value(A,{ref:ie}),ie.errors=null,ie.schema=w.schema,ie.schemaEnv=w,w.$async&&(ie.$async=!0),this.opts.code.source===!0&&(ie.source={validateName:A,validateCode:Q,scopeValues:R._values}),this.opts.unevaluated){const{props:N,items:X}=M;ie.evaluated={props:N instanceof e.Name?void 0:N,items:X instanceof e.Name?void 0:X,dynamicProps:N instanceof e.Name,dynamicItems:X instanceof e.Name},ie.source&&(ie.source.evaluated=(0,e.stringify)(ie.evaluated))}return w.validate=ie,w}catch(Q){throw delete w.validate,delete w.validateName,B&&this.logger.error("Error compiling schema, function code:",B),Q}finally{this._compilations.delete(w)}}ro.compileSchema=l;function c(w,_,S){var C;S=(0,n.resolveUrl)(this.opts.uriResolver,_,S);const k=w.refs[S];if(k)return k;let E=m.call(this,w,S);if(E===void 0){const R=(C=w.localRefs)===null||C===void 0?void 0:C[S],{schemaId:T}=this.opts;R&&(E=new a({schema:R,schemaId:T,root:w,baseId:_}))}if(E!==void 0)return w.refs[S]=d.call(this,E)}ro.resolveRef=c;function d(w){return(0,n.inlineRef)(w.schema,this.opts.inlineRefs)?w.schema:w.validate?w:l.call(this,w)}function f(w){for(const _ of this._compilations)if(p(_,w))return _}ro.getCompilingSchema=f;function p(w,_){return w.schema===_.schema&&w.root===_.root&&w.baseId===_.baseId}function m(w,_){let S;for(;typeof(S=this.refs[_])=="string";)_=S;return S||this.schemas[_]||g.call(this,w,_)}function g(w,_){const S=this.opts.uriResolver.parse(_),C=(0,n._getFullPath)(this.opts.uriResolver,S);let k=(0,n.getFullPath)(this.opts.uriResolver,w.baseId,void 0);if(Object.keys(w.schema).length>0&&C===k)return y.call(this,S,w);const E=(0,n.normalizeId)(C),R=this.refs[E]||this.schemas[E];if(typeof R=="string"){const T=g.call(this,w,R);return typeof(T==null?void 0:T.schema)!="object"?void 0:y.call(this,S,T)}if(typeof(R==null?void 0:R.schema)=="object"){if(R.validate||l.call(this,R),E===(0,n.normalizeId)(_)){const{schema:T}=R,{schemaId:A}=this.opts,M=T[A];return M&&(k=(0,n.resolveUrl)(this.opts.uriResolver,k,M)),new a({schema:T,schemaId:A,root:w,baseId:k})}return y.call(this,S,R)}}ro.resolveSchema=g;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(w,{baseId:_,schema:S,root:C}){var k;if(((k=w.fragment)===null||k===void 0?void 0:k[0])!=="/")return;for(const T of w.fragment.slice(1).split("/")){if(typeof S=="boolean")return;const A=S[(0,i.unescapeFragment)(T)];if(A===void 0)return;S=A;const M=typeof S=="object"&&S[this.opts.schemaId];!b.has(T)&&M&&(_=(0,n.resolveUrl)(this.opts.uriResolver,_,M))}let E;if(typeof S!="boolean"&&S.$ref&&!(0,i.schemaHasRulesButRef)(S,this.RULES)){const T=(0,n.resolveUrl)(this.opts.uriResolver,_,S.$ref);E=g.call(this,C,T)}const{schemaId:R}=this.opts;if(E=E||new a({schema:S,schemaId:R,root:C,baseId:_}),E.schema!==E.root.schema)return E}return ro}const ywe="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",bwe="Meta-schema for $data reference (JSON AnySchema extension proposal)",wwe="object",Swe=["$data"],_we={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},xwe=!1,Pwe={$id:ywe,description:bwe,type:wwe,required:Swe,properties:_we,additionalProperties:xwe};var Ng={},ep={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */var Cwe=ep.exports,iD;function Ewe(){return iD||(iD=1,function(e,t){(function(r,n){n(t)})(Cwe,function(r){function n(){for(var H=arguments.length,L=Array(H),G=0;G<H;G++)L[G]=arguments[G];if(L.length>1){L[0]=L[0].slice(0,-1);for(var te=L.length-1,ue=1;ue<te;++ue)L[ue]=L[ue].slice(1,-1);return L[te]=L[te].slice(1),L.join("")}else return L[0]}function i(H){return"(?:"+H+")"}function o(H){return H===void 0?"undefined":H===null?"null":Object.prototype.toString.call(H).split(" ").pop().split("]").shift().toLowerCase()}function a(H){return H.toUpperCase()}function l(H){return H!=null?H instanceof Array?H:typeof H.length!="number"||H.split||H.setInterval||H.call?[H]:Array.prototype.slice.call(H):[]}function c(H,L){var G=H;if(L)for(var te in L)G[te]=L[te];return G}function d(H){var L="[A-Za-z]",G="[0-9]",te=n(G,"[A-Fa-f]"),ue=i(i("%[EFef]"+te+"%"+te+te+"%"+te+te)+"|"+i("%[89A-Fa-f]"+te+"%"+te+te)+"|"+i("%"+te+te)),ze="[\\:\\/\\?\\#\\[\\]\\@]",Ye="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",ot=n(ze,Ye),Wt=H?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",nr=H?"[\\uE000-\\uF8FF]":"[]",Pt=n(L,G,"[\\-\\.\\_\\~]",Wt);i(L+n(L,G,"[\\+\\-\\.]")+"*"),i(i(ue+"|"+n(Pt,Ye,"[\\:]"))+"*");var At=i(i("25[0-5]")+"|"+i("2[0-4]"+G)+"|"+i("1"+G+G)+"|"+i("0?[1-9]"+G)+"|0?0?"+G),cr=i(At+"\\."+At+"\\."+At+"\\."+At),ft=i(te+"{1,4}"),Gt=i(i(ft+"\\:"+ft)+"|"+cr),it=i(i(ft+"\\:")+"{6}"+Gt),Ct=i("\\:\\:"+i(ft+"\\:")+"{5}"+Gt),Et=i(i(ft)+"?\\:\\:"+i(ft+"\\:")+"{4}"+Gt),ar=i(i(i(ft+"\\:")+"{0,1}"+ft)+"?\\:\\:"+i(ft+"\\:")+"{3}"+Gt),Fr=i(i(i(ft+"\\:")+"{0,2}"+ft)+"?\\:\\:"+i(ft+"\\:")+"{2}"+Gt),mi=i(i(i(ft+"\\:")+"{0,3}"+ft)+"?\\:\\:"+ft+"\\:"+Gt),ei=i(i(i(ft+"\\:")+"{0,4}"+ft)+"?\\:\\:"+Gt),ti=i(i(i(ft+"\\:")+"{0,5}"+ft)+"?\\:\\:"+ft),vi=i(i(i(ft+"\\:")+"{0,6}"+ft)+"?\\:\\:"),gi=i([it,Ct,Et,ar,Fr,mi,ei,ti,vi].join("|")),ln=i(i(Pt+"|"+ue)+"+");i("[vV]"+te+"+\\."+n(Pt,Ye,"[\\:]")+"+"),i(i(ue+"|"+n(Pt,Ye))+"*");var as=i(ue+"|"+n(Pt,Ye,"[\\:\\@]"));return i(i(ue+"|"+n(Pt,Ye,"[\\@]"))+"+"),i(i(as+"|"+n("[\\/\\?]",nr))+"*"),{NOT_SCHEME:new RegExp(n("[^]",L,G,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",Pt,Ye),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",Pt,Ye),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",Pt,Ye),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",Pt,Ye),"g"),NOT_QUERY:new RegExp(n("[^\\%]",Pt,Ye,"[\\:\\@\\/\\?]",nr),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",Pt,Ye,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",Pt,Ye),"g"),UNRESERVED:new RegExp(Pt,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",Pt,ot),"g"),PCT_ENCODED:new RegExp(ue,"g"),IPV4ADDRESS:new RegExp("^("+cr+")$"),IPV6ADDRESS:new RegExp("^\\[?("+gi+")"+i(i("\\%25|\\%(?!"+te+"{2})")+"("+ln+")")+"?\\]?$")}}var f=d(!1),p=d(!0),m=function(){function H(L,G){var te=[],ue=!0,ze=!1,Ye=void 0;try{for(var ot=L[Symbol.iterator](),Wt;!(ue=(Wt=ot.next()).done)&&(te.push(Wt.value),!(G&&te.length===G));ue=!0);}catch(nr){ze=!0,Ye=nr}finally{try{!ue&&ot.return&&ot.return()}finally{if(ze)throw Ye}}return te}return function(L,G){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return H(L,G);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g=function(H){if(Array.isArray(H)){for(var L=0,G=Array(H.length);L<H.length;L++)G[L]=H[L];return G}else return Array.from(H)},b=2147483647,y=36,w=1,_=26,S=38,C=700,k=72,E=128,R="-",T=/^xn--/,A=/[^\0-\x7E]/,M=/[\x2E\u3002\uFF0E\uFF61]/g,B={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Q=y-w,se=Math.floor,ie=String.fromCharCode;function N(H){throw new RangeError(B[H])}function X(H,L){for(var G=[],te=H.length;te--;)G[te]=L(H[te]);return G}function ce(H,L){var G=H.split("@"),te="";G.length>1&&(te=G[0]+"@",H=G[1]),H=H.replace(M,".");var ue=H.split("."),ze=X(ue,L).join(".");return te+ze}function ne(H){for(var L=[],G=0,te=H.length;G<te;){var ue=H.charCodeAt(G++);if(ue>=55296&&ue<=56319&&G<te){var ze=H.charCodeAt(G++);(ze&64512)==56320?L.push(((ue&1023)<<10)+(ze&1023)+65536):(L.push(ue),G--)}else L.push(ue)}return L}var ee=function(L){return String.fromCodePoint.apply(String,g(L))},ge=function(L){return L-48<10?L-22:L-65<26?L-65:L-97<26?L-97:y},Z=function(L,G){return L+22+75*(L<26)-((G!=0)<<5)},j=function(L,G,te){var ue=0;for(L=te?se(L/C):L>>1,L+=se(L/G);L>Q*_>>1;ue+=y)L=se(L/Q);return se(ue+(Q+1)*L/(L+S))},U=function(L){var G=[],te=L.length,ue=0,ze=E,Ye=k,ot=L.lastIndexOf(R);ot<0&&(ot=0);for(var Wt=0;Wt<ot;++Wt)L.charCodeAt(Wt)>=128&&N("not-basic"),G.push(L.charCodeAt(Wt));for(var nr=ot>0?ot+1:0;nr<te;){for(var Pt=ue,At=1,cr=y;;cr+=y){nr>=te&&N("invalid-input");var ft=ge(L.charCodeAt(nr++));(ft>=y||ft>se((b-ue)/At))&&N("overflow"),ue+=ft*At;var Gt=cr<=Ye?w:cr>=Ye+_?_:cr-Ye;if(ft<Gt)break;var it=y-Gt;At>se(b/it)&&N("overflow"),At*=it}var Ct=G.length+1;Ye=j(ue-Pt,Ct,Pt==0),se(ue/Ct)>b-ze&&N("overflow"),ze+=se(ue/Ct),ue%=Ct,G.splice(ue++,0,ze)}return String.fromCodePoint.apply(String,G)},q=function(L){var G=[];L=ne(L);var te=L.length,ue=E,ze=0,Ye=k,ot=!0,Wt=!1,nr=void 0;try{for(var Pt=L[Symbol.iterator](),At;!(ot=(At=Pt.next()).done);ot=!0){var cr=At.value;cr<128&&G.push(ie(cr))}}catch(go){Wt=!0,nr=go}finally{try{!ot&&Pt.return&&Pt.return()}finally{if(Wt)throw nr}}var ft=G.length,Gt=ft;for(ft&&G.push(R);Gt<te;){var it=b,Ct=!0,Et=!1,ar=void 0;try{for(var Fr=L[Symbol.iterator](),mi;!(Ct=(mi=Fr.next()).done);Ct=!0){var ei=mi.value;ei>=ue&&ei<it&&(it=ei)}}catch(go){Et=!0,ar=go}finally{try{!Ct&&Fr.return&&Fr.return()}finally{if(Et)throw ar}}var ti=Gt+1;it-ue>se((b-ze)/ti)&&N("overflow"),ze+=(it-ue)*ti,ue=it;var vi=!0,gi=!1,ln=void 0;try{for(var as=L[Symbol.iterator](),ri;!(vi=(ri=as.next()).done);vi=!0){var jc=ri.value;if(jc<ue&&++ze>b&&N("overflow"),jc==ue){for(var Ys=ze,Xs=y;;Xs+=y){var Go=Xs<=Ye?w:Xs>=Ye+_?_:Xs-Ye;if(Ys<Go)break;var ss=Ys-Go,Ca=y-Go;G.push(ie(Z(Go+ss%Ca,0))),Ys=se(ss/Ca)}G.push(ie(Z(Ys,0))),Ye=j(ze,ti,Gt==ft),ze=0,++Gt}}}catch(go){gi=!0,ln=go}finally{try{!vi&&as.return&&as.return()}finally{if(gi)throw ln}}++ze,++ue}return G.join("")},$=function(L){return ce(L,function(G){return T.test(G)?U(G.slice(4).toLowerCase()):G})},F=function(L){return ce(L,function(G){return A.test(G)?"xn--"+q(G):G})},V={version:"2.1.0",ucs2:{decode:ne,encode:ee},decode:U,encode:q,toASCII:F,toUnicode:$},de={};function pe(H){var L=H.charCodeAt(0),G=void 0;return L<16?G="%0"+L.toString(16).toUpperCase():L<128?G="%"+L.toString(16).toUpperCase():L<2048?G="%"+(L>>6|192).toString(16).toUpperCase()+"%"+(L&63|128).toString(16).toUpperCase():G="%"+(L>>12|224).toString(16).toUpperCase()+"%"+(L>>6&63|128).toString(16).toUpperCase()+"%"+(L&63|128).toString(16).toUpperCase(),G}function Ee(H){for(var L="",G=0,te=H.length;G<te;){var ue=parseInt(H.substr(G+1,2),16);if(ue<128)L+=String.fromCharCode(ue),G+=3;else if(ue>=194&&ue<224){if(te-G>=6){var ze=parseInt(H.substr(G+4,2),16);L+=String.fromCharCode((ue&31)<<6|ze&63)}else L+=H.substr(G,6);G+=6}else if(ue>=224){if(te-G>=9){var Ye=parseInt(H.substr(G+4,2),16),ot=parseInt(H.substr(G+7,2),16);L+=String.fromCharCode((ue&15)<<12|(Ye&63)<<6|ot&63)}else L+=H.substr(G,9);G+=9}else L+=H.substr(G,3),G+=3}return L}function Me(H,L){function G(te){var ue=Ee(te);return ue.match(L.UNRESERVED)?ue:te}return H.scheme&&(H.scheme=String(H.scheme).replace(L.PCT_ENCODED,G).toLowerCase().replace(L.NOT_SCHEME,"")),H.userinfo!==void 0&&(H.userinfo=String(H.userinfo).replace(L.PCT_ENCODED,G).replace(L.NOT_USERINFO,pe).replace(L.PCT_ENCODED,a)),H.host!==void 0&&(H.host=String(H.host).replace(L.PCT_ENCODED,G).toLowerCase().replace(L.NOT_HOST,pe).replace(L.PCT_ENCODED,a)),H.path!==void 0&&(H.path=String(H.path).replace(L.PCT_ENCODED,G).replace(H.scheme?L.NOT_PATH:L.NOT_PATH_NOSCHEME,pe).replace(L.PCT_ENCODED,a)),H.query!==void 0&&(H.query=String(H.query).replace(L.PCT_ENCODED,G).replace(L.NOT_QUERY,pe).replace(L.PCT_ENCODED,a)),H.fragment!==void 0&&(H.fragment=String(H.fragment).replace(L.PCT_ENCODED,G).replace(L.NOT_FRAGMENT,pe).replace(L.PCT_ENCODED,a)),H}function Y(H){return H.replace(/^0*(.*)/,"$1")||"0"}function K(H,L){var G=H.match(L.IPV4ADDRESS)||[],te=m(G,2),ue=te[1];return ue?ue.split(".").map(Y).join("."):H}function we(H,L){var G=H.match(L.IPV6ADDRESS)||[],te=m(G,3),ue=te[1],ze=te[2];if(ue){for(var Ye=ue.toLowerCase().split("::").reverse(),ot=m(Ye,2),Wt=ot[0],nr=ot[1],Pt=nr?nr.split(":").map(Y):[],At=Wt.split(":").map(Y),cr=L.IPV4ADDRESS.test(At[At.length-1]),ft=cr?7:8,Gt=At.length-ft,it=Array(ft),Ct=0;Ct<ft;++Ct)it[Ct]=Pt[Ct]||At[Gt+Ct]||"";cr&&(it[ft-1]=K(it[ft-1],L));var Et=it.reduce(function(ti,vi,gi){if(!vi||vi==="0"){var ln=ti[ti.length-1];ln&&ln.index+ln.length===gi?ln.length++:ti.push({index:gi,length:1})}return ti},[]),ar=Et.sort(function(ti,vi){return vi.length-ti.length})[0],Fr=void 0;if(ar&&ar.length>1){var mi=it.slice(0,ar.index),ei=it.slice(ar.index+ar.length);Fr=mi.join(":")+"::"+ei.join(":")}else Fr=it.join(":");return ze&&(Fr+="%"+ze),Fr}else return H}var Te=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,he="".match(/(){0}/)[1]===void 0;function Ce(H){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},G={},te=L.iri!==!1?p:f;L.reference==="suffix"&&(H=(L.scheme?L.scheme+":":"")+"//"+H);var ue=H.match(Te);if(ue){he?(G.scheme=ue[1],G.userinfo=ue[3],G.host=ue[4],G.port=parseInt(ue[5],10),G.path=ue[6]||"",G.query=ue[7],G.fragment=ue[8],isNaN(G.port)&&(G.port=ue[5])):(G.scheme=ue[1]||void 0,G.userinfo=H.indexOf("@")!==-1?ue[3]:void 0,G.host=H.indexOf("//")!==-1?ue[4]:void 0,G.port=parseInt(ue[5],10),G.path=ue[6]||"",G.query=H.indexOf("?")!==-1?ue[7]:void 0,G.fragment=H.indexOf("#")!==-1?ue[8]:void 0,isNaN(G.port)&&(G.port=H.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?ue[4]:void 0)),G.host&&(G.host=we(K(G.host,te),te)),G.scheme===void 0&&G.userinfo===void 0&&G.host===void 0&&G.port===void 0&&!G.path&&G.query===void 0?G.reference="same-document":G.scheme===void 0?G.reference="relative":G.fragment===void 0?G.reference="absolute":G.reference="uri",L.reference&&L.reference!=="suffix"&&L.reference!==G.reference&&(G.error=G.error||"URI is not a "+L.reference+" reference.");var ze=de[(L.scheme||G.scheme||"").toLowerCase()];if(!L.unicodeSupport&&(!ze||!ze.unicodeSupport)){if(G.host&&(L.domainHost||ze&&ze.domainHost))try{G.host=V.toASCII(G.host.replace(te.PCT_ENCODED,Ee).toLowerCase())}catch(Ye){G.error=G.error||"Host's domain name can not be converted to ASCII via punycode: "+Ye}Me(G,f)}else Me(G,te);ze&&ze.parse&&ze.parse(G,L)}else G.error=G.error||"URI can not be parsed.";return G}function Ge(H,L){var G=L.iri!==!1?p:f,te=[];return H.userinfo!==void 0&&(te.push(H.userinfo),te.push("@")),H.host!==void 0&&te.push(we(K(String(H.host),G),G).replace(G.IPV6ADDRESS,function(ue,ze,Ye){return"["+ze+(Ye?"%25"+Ye:"")+"]"})),(typeof H.port=="number"||typeof H.port=="string")&&(te.push(":"),te.push(String(H.port))),te.length?te.join(""):void 0}var $t=/^\.\.?\//,Kt=/^\/\.(\/|$)/,It=/^\/\.\.(\/|$)/,jt=/^\/?(?:.|\n)*?(?=\/|$)/;function Lt(H){for(var L=[];H.length;)if(H.match($t))H=H.replace($t,"");else if(H.match(Kt))H=H.replace(Kt,"/");else if(H.match(It))H=H.replace(It,"/"),L.pop();else if(H==="."||H==="..")H="";else{var G=H.match(jt);if(G){var te=G[0];H=H.slice(te.length),L.push(te)}else throw new Error("Unexpected dot segment condition")}return L.join("")}function ht(H){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},G=L.iri?p:f,te=[],ue=de[(L.scheme||H.scheme||"").toLowerCase()];if(ue&&ue.serialize&&ue.serialize(H,L),H.host&&!G.IPV6ADDRESS.test(H.host)){if(L.domainHost||ue&&ue.domainHost)try{H.host=L.iri?V.toUnicode(H.host):V.toASCII(H.host.replace(G.PCT_ENCODED,Ee).toLowerCase())}catch(ot){H.error=H.error||"Host's domain name can not be converted to "+(L.iri?"Unicode":"ASCII")+" via punycode: "+ot}}Me(H,G),L.reference!=="suffix"&&H.scheme&&(te.push(H.scheme),te.push(":"));var ze=Ge(H,L);if(ze!==void 0&&(L.reference!=="suffix"&&te.push("//"),te.push(ze),H.path&&H.path.charAt(0)!=="/"&&te.push("/")),H.path!==void 0){var Ye=H.path;!L.absolutePath&&(!ue||!ue.absolutePath)&&(Ye=Lt(Ye)),ze===void 0&&(Ye=Ye.replace(/^\/\//,"/%2F")),te.push(Ye)}return H.query!==void 0&&(te.push("?"),te.push(H.query)),H.fragment!==void 0&&(te.push("#"),te.push(H.fragment)),te.join("")}function on(H,L){var G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},te=arguments[3],ue={};return te||(H=Ce(ht(H,G),G),L=Ce(ht(L,G),G)),G=G||{},!G.tolerant&&L.scheme?(ue.scheme=L.scheme,ue.userinfo=L.userinfo,ue.host=L.host,ue.port=L.port,ue.path=Lt(L.path||""),ue.query=L.query):(L.userinfo!==void 0||L.host!==void 0||L.port!==void 0?(ue.userinfo=L.userinfo,ue.host=L.host,ue.port=L.port,ue.path=Lt(L.path||""),ue.query=L.query):(L.path?(L.path.charAt(0)==="/"?ue.path=Lt(L.path):((H.userinfo!==void 0||H.host!==void 0||H.port!==void 0)&&!H.path?ue.path="/"+L.path:H.path?ue.path=H.path.slice(0,H.path.lastIndexOf("/")+1)+L.path:ue.path=L.path,ue.path=Lt(ue.path)),ue.query=L.query):(ue.path=H.path,L.query!==void 0?ue.query=L.query:ue.query=H.query),ue.userinfo=H.userinfo,ue.host=H.host,ue.port=H.port),ue.scheme=H.scheme),ue.fragment=L.fragment,ue}function mn(H,L,G){var te=c({scheme:"null"},G);return ht(on(Ce(H,te),Ce(L,te),te,!0),te)}function Ir(H,L){return typeof H=="string"?H=ht(Ce(H,L),L):o(H)==="object"&&(H=Ce(ht(H,L),L)),H}function Jr(H,L,G){return typeof H=="string"?H=ht(Ce(H,G),G):o(H)==="object"&&(H=ht(H,G)),typeof L=="string"?L=ht(Ce(L,G),G):o(L)==="object"&&(L=ht(L,G)),H===L}function vn(H,L){return H&&H.toString().replace(!L||!L.iri?f.ESCAPE:p.ESCAPE,pe)}function Nr(H,L){return H&&H.toString().replace(!L||!L.iri?f.PCT_ENCODED:p.PCT_ENCODED,Ee)}var an={scheme:"http",domainHost:!0,parse:function(L,G){return L.host||(L.error=L.error||"HTTP URIs must have a host."),L},serialize:function(L,G){var te=String(L.scheme).toLowerCase()==="https";return(L.port===(te?443:80)||L.port==="")&&(L.port=void 0),L.path||(L.path="/"),L}},sn={scheme:"https",domainHost:an.domainHost,parse:an.parse,serialize:an.serialize};function _a(H){return typeof H.secure=="boolean"?H.secure:String(H.scheme).toLowerCase()==="wss"}var Yi={scheme:"ws",domainHost:!0,parse:function(L,G){var te=L;return te.secure=_a(te),te.resourceName=(te.path||"/")+(te.query?"?"+te.query:""),te.path=void 0,te.query=void 0,te},serialize:function(L,G){if((L.port===(_a(L)?443:80)||L.port==="")&&(L.port=void 0),typeof L.secure=="boolean"&&(L.scheme=L.secure?"wss":"ws",L.secure=void 0),L.resourceName){var te=L.resourceName.split("?"),ue=m(te,2),ze=ue[0],Ye=ue[1];L.path=ze&&ze!=="/"?ze:void 0,L.query=Ye,L.resourceName=void 0}return L.fragment=void 0,L}},xa={scheme:"wss",domainHost:Yi.domainHost,parse:Yi.parse,serialize:Yi.serialize},Xi={},Oi="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",gn="[0-9A-Fa-f]",Wo=i(i("%[EFef]"+gn+"%"+gn+gn+"%"+gn+gn)+"|"+i("%[89A-Fa-f]"+gn+"%"+gn+gn)+"|"+i("%"+gn+gn)),Ko="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Pa="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",qn=n(Pa,'[\\"\\\\]'),vo="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",pi=new RegExp(Oi,"g"),Ji=new RegExp(Wo,"g"),le=new RegExp(n("[^]",Ko,"[\\.]",'[\\"]',qn),"g"),ye=new RegExp(n("[^]",Oi,vo),"g"),xe=ye;function $e(H){var L=Ee(H);return L.match(pi)?L:H}var Be={scheme:"mailto",parse:function(L,G){var te=L,ue=te.to=te.path?te.path.split(","):[];if(te.path=void 0,te.query){for(var ze=!1,Ye={},ot=te.query.split("&"),Wt=0,nr=ot.length;Wt<nr;++Wt){var Pt=ot[Wt].split("=");switch(Pt[0]){case"to":for(var At=Pt[1].split(","),cr=0,ft=At.length;cr<ft;++cr)ue.push(At[cr]);break;case"subject":te.subject=Nr(Pt[1],G);break;case"body":te.body=Nr(Pt[1],G);break;default:ze=!0,Ye[Nr(Pt[0],G)]=Nr(Pt[1],G);break}}ze&&(te.headers=Ye)}te.query=void 0;for(var Gt=0,it=ue.length;Gt<it;++Gt){var Ct=ue[Gt].split("@");if(Ct[0]=Nr(Ct[0]),G.unicodeSupport)Ct[1]=Nr(Ct[1],G).toLowerCase();else try{Ct[1]=V.toASCII(Nr(Ct[1],G).toLowerCase())}catch(Et){te.error=te.error||"Email address's domain name can not be converted to ASCII via punycode: "+Et}ue[Gt]=Ct.join("@")}return te},serialize:function(L,G){var te=L,ue=l(L.to);if(ue){for(var ze=0,Ye=ue.length;ze<Ye;++ze){var ot=String(ue[ze]),Wt=ot.lastIndexOf("@"),nr=ot.slice(0,Wt).replace(Ji,$e).replace(Ji,a).replace(le,pe),Pt=ot.slice(Wt+1);try{Pt=G.iri?V.toUnicode(Pt):V.toASCII(Nr(Pt,G).toLowerCase())}catch(Gt){te.error=te.error||"Email address's domain name can not be converted to "+(G.iri?"Unicode":"ASCII")+" via punycode: "+Gt}ue[ze]=nr+"@"+Pt}te.path=ue.join(",")}var At=L.headers=L.headers||{};L.subject&&(At.subject=L.subject),L.body&&(At.body=L.body);var cr=[];for(var ft in At)At[ft]!==Xi[ft]&&cr.push(ft.replace(Ji,$e).replace(Ji,a).replace(ye,pe)+"="+At[ft].replace(Ji,$e).replace(Ji,a).replace(xe,pe));return cr.length&&(te.query=cr.join("&")),te}},pt=/^([^\:]+)\:(.*)/,tt={scheme:"urn",parse:function(L,G){var te=L.path&&L.path.match(pt),ue=L;if(te){var ze=G.scheme||ue.scheme||"urn",Ye=te[1].toLowerCase(),ot=te[2],Wt=ze+":"+(G.nid||Ye),nr=de[Wt];ue.nid=Ye,ue.nss=ot,ue.path=void 0,nr&&(ue=nr.parse(ue,G))}else ue.error=ue.error||"URN can not be parsed.";return ue},serialize:function(L,G){var te=G.scheme||L.scheme||"urn",ue=L.nid,ze=te+":"+(G.nid||ue),Ye=de[ze];Ye&&(L=Ye.serialize(L,G));var ot=L,Wt=L.nss;return ot.path=(ue||G.nid)+":"+Wt,ot}},Ue=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,xt={scheme:"urn:uuid",parse:function(L,G){var te=L;return te.uuid=te.nss,te.nss=void 0,!G.tolerant&&(!te.uuid||!te.uuid.match(Ue))&&(te.error=te.error||"UUID is not valid."),te},serialize:function(L,G){var te=L;return te.nss=(L.uuid||"").toLowerCase(),te}};de[an.scheme]=an,de[sn.scheme]=sn,de[Yi.scheme]=Yi,de[xa.scheme]=xa,de[Be.scheme]=Be,de[tt.scheme]=tt,de[xt.scheme]=xt,r.SCHEMES=de,r.pctEncChar=pe,r.pctDecChars=Ee,r.parse=Ce,r.removeDotSegments=Lt,r.serialize=ht,r.resolveComponents=on,r.resolve=mn,r.normalize=Ir,r.equal=Jr,r.escapeComponent=vn,r.unescapeComponent=Nr,Object.defineProperty(r,"__esModule",{value:!0})})}(ep,ep.exports)),ep.exports}var oD;function Twe(){if(oD)return Ng;oD=1,Object.defineProperty(Ng,"__esModule",{value:!0});const e=Ewe();return e.code='require("ajv/dist/runtime/uri").default',Ng.default=e,Ng}var aD;function Owe(){return aD||(aD=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=ww();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=Dt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=xT(),i=Sw(),o=$3(),a=_w(),l=Dt(),c=bw(),d=n0(),f=Jt(),p=Pwe,m=Twe(),g=(Z,j)=>new RegExp(Z,j);g.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},S=200;function C(Z){var j,U,q,$,F,V,de,pe,Ee,Me,Y,K,we,Te,he,Ce,Ge,$t,Kt,It,jt,Lt,ht,on,mn;const Ir=Z.strict,Jr=(j=Z.code)===null||j===void 0?void 0:j.optimize,vn=Jr===!0||Jr===void 0?1:Jr||0,Nr=(q=(U=Z.code)===null||U===void 0?void 0:U.regExp)!==null&&q!==void 0?q:g,an=($=Z.uriResolver)!==null&&$!==void 0?$:m.default;return{strictSchema:(V=(F=Z.strictSchema)!==null&&F!==void 0?F:Ir)!==null&&V!==void 0?V:!0,strictNumbers:(pe=(de=Z.strictNumbers)!==null&&de!==void 0?de:Ir)!==null&&pe!==void 0?pe:!0,strictTypes:(Me=(Ee=Z.strictTypes)!==null&&Ee!==void 0?Ee:Ir)!==null&&Me!==void 0?Me:"log",strictTuples:(K=(Y=Z.strictTuples)!==null&&Y!==void 0?Y:Ir)!==null&&K!==void 0?K:"log",strictRequired:(Te=(we=Z.strictRequired)!==null&&we!==void 0?we:Ir)!==null&&Te!==void 0?Te:!1,code:Z.code?{...Z.code,optimize:vn,regExp:Nr}:{optimize:vn,regExp:Nr},loopRequired:(he=Z.loopRequired)!==null&&he!==void 0?he:S,loopEnum:(Ce=Z.loopEnum)!==null&&Ce!==void 0?Ce:S,meta:(Ge=Z.meta)!==null&&Ge!==void 0?Ge:!0,messages:($t=Z.messages)!==null&&$t!==void 0?$t:!0,inlineRefs:(Kt=Z.inlineRefs)!==null&&Kt!==void 0?Kt:!0,schemaId:(It=Z.schemaId)!==null&&It!==void 0?It:"$id",addUsedSchema:(jt=Z.addUsedSchema)!==null&&jt!==void 0?jt:!0,validateSchema:(Lt=Z.validateSchema)!==null&&Lt!==void 0?Lt:!0,validateFormats:(ht=Z.validateFormats)!==null&&ht!==void 0?ht:!0,unicodeRegExp:(on=Z.unicodeRegExp)!==null&&on!==void 0?on:!0,int32range:(mn=Z.int32range)!==null&&mn!==void 0?mn:!0,uriResolver:an}}class k{constructor(j={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,j=this.opts={...j,...C(j)};const{es5:U,lines:q}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:y,es5:U,lines:q}),this.logger=se(j.logger);const $=j.validateFormats;j.validateFormats=!1,this.RULES=(0,o.getRules)(),E.call(this,w,j,"NOT SUPPORTED"),E.call(this,_,j,"DEPRECATED","warn"),this._metaOpts=B.call(this),j.formats&&A.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),j.keywords&&M.call(this,j.keywords),typeof j.meta=="object"&&this.addMetaSchema(j.meta),T.call(this),j.validateFormats=$}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:j,meta:U,schemaId:q}=this.opts;let $=p;q==="id"&&($={...p},$.id=$.$id,delete $.$id),U&&j&&this.addMetaSchema($,$[q],!1)}defaultMeta(){const{meta:j,schemaId:U}=this.opts;return this.opts.defaultMeta=typeof j=="object"?j[U]||j:void 0}validate(j,U){let q;if(typeof j=="string"){if(q=this.getSchema(j),!q)throw new Error(`no schema with key or ref "${j}"`)}else q=this.compile(j);const $=q(U);return"$async"in q||(this.errors=q.errors),$}compile(j,U){const q=this._addSchema(j,U);return q.validate||this._compileSchemaEnv(q)}compileAsync(j,U){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:q}=this.opts;return $.call(this,j,U);async function $(Me,Y){await F.call(this,Me.$schema);const K=this._addSchema(Me,Y);return K.validate||V.call(this,K)}async function F(Me){Me&&!this.getSchema(Me)&&await $.call(this,{$ref:Me},!0)}async function V(Me){try{return this._compileSchemaEnv(Me)}catch(Y){if(!(Y instanceof i.default))throw Y;return de.call(this,Y),await pe.call(this,Y.missingSchema),V.call(this,Me)}}function de({missingSchema:Me,missingRef:Y}){if(this.refs[Me])throw new Error(`AnySchema ${Me} is loaded but ${Y} cannot be resolved`)}async function pe(Me){const Y=await Ee.call(this,Me);this.refs[Me]||await F.call(this,Y.$schema),this.refs[Me]||this.addSchema(Y,Me,U)}async function Ee(Me){const Y=this._loading[Me];if(Y)return Y;try{return await(this._loading[Me]=q(Me))}finally{delete this._loading[Me]}}}addSchema(j,U,q,$=this.opts.validateSchema){if(Array.isArray(j)){for(const V of j)this.addSchema(V,void 0,q,$);return this}let F;if(typeof j=="object"){const{schemaId:V}=this.opts;if(F=j[V],F!==void 0&&typeof F!="string")throw new Error(`schema ${V} must be string`)}return U=(0,c.normalizeId)(U||F),this._checkUnique(U),this.schemas[U]=this._addSchema(j,q,U,$,!0),this}addMetaSchema(j,U,q=this.opts.validateSchema){return this.addSchema(j,U,!0,q),this}validateSchema(j,U){if(typeof j=="boolean")return!0;let q;if(q=j.$schema,q!==void 0&&typeof q!="string")throw new Error("$schema must be a string");if(q=q||this.opts.defaultMeta||this.defaultMeta(),!q)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const $=this.validate(q,j);if(!$&&U){const F="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(F);else throw new Error(F)}return $}getSchema(j){let U;for(;typeof(U=R.call(this,j))=="string";)j=U;if(U===void 0){const{schemaId:q}=this.opts,$=new a.SchemaEnv({schema:{},schemaId:q});if(U=a.resolveSchema.call(this,$,j),!U)return;this.refs[j]=U}return U.validate||this._compileSchemaEnv(U)}removeSchema(j){if(j instanceof RegExp)return this._removeAllSchemas(this.schemas,j),this._removeAllSchemas(this.refs,j),this;switch(typeof j){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const U=R.call(this,j);return typeof U=="object"&&this._cache.delete(U.schema),delete this.schemas[j],delete this.refs[j],this}case"object":{const U=j;this._cache.delete(U);let q=j[this.opts.schemaId];return q&&(q=(0,c.normalizeId)(q),delete this.schemas[q],delete this.refs[q]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(j){for(const U of j)this.addKeyword(U);return this}addKeyword(j,U){let q;if(typeof j=="string")q=j,typeof U=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),U.keyword=q);else if(typeof j=="object"&&U===void 0){if(U=j,q=U.keyword,Array.isArray(q)&&!q.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(N.call(this,q,U),!U)return(0,f.eachItem)(q,F=>X.call(this,F)),this;ne.call(this,U);const $={...U,type:(0,d.getJSONTypes)(U.type),schemaType:(0,d.getJSONTypes)(U.schemaType)};return(0,f.eachItem)(q,$.type.length===0?F=>X.call(this,F,$):F=>$.type.forEach(V=>X.call(this,F,$,V))),this}getKeyword(j){const U=this.RULES.all[j];return typeof U=="object"?U.definition:!!U}removeKeyword(j){const{RULES:U}=this;delete U.keywords[j],delete U.all[j];for(const q of U.rules){const $=q.rules.findIndex(F=>F.keyword===j);$>=0&&q.rules.splice($,1)}return this}addFormat(j,U){return typeof U=="string"&&(U=new RegExp(U)),this.formats[j]=U,this}errorsText(j=this.errors,{separator:U=", ",dataVar:q="data"}={}){return!j||j.length===0?"No errors":j.map($=>`${q}${$.instancePath} ${$.message}`).reduce(($,F)=>$+U+F)}$dataMetaSchema(j,U){const q=this.RULES.all;j=JSON.parse(JSON.stringify(j));for(const $ of U){const F=$.split("/").slice(1);let V=j;for(const de of F)V=V[de];for(const de in q){const pe=q[de];if(typeof pe!="object")continue;const{$data:Ee}=pe.definition,Me=V[de];Ee&&Me&&(V[de]=ge(Me))}}return j}_removeAllSchemas(j,U){for(const q in j){const $=j[q];(!U||U.test(q))&&(typeof $=="string"?delete j[q]:$&&!$.meta&&(this._cache.delete($.schema),delete j[q]))}}_addSchema(j,U,q,$=this.opts.validateSchema,F=this.opts.addUsedSchema){let V;const{schemaId:de}=this.opts;if(typeof j=="object")V=j[de];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof j!="boolean")throw new Error("schema must be object or boolean")}let pe=this._cache.get(j);if(pe!==void 0)return pe;q=(0,c.normalizeId)(V||q);const Ee=c.getSchemaRefs.call(this,j,q);return pe=new a.SchemaEnv({schema:j,schemaId:de,meta:U,baseId:q,localRefs:Ee}),this._cache.set(pe.schema,pe),F&&!q.startsWith("#")&&(q&&this._checkUnique(q),this.refs[q]=pe),$&&this.validateSchema(j,!0),pe}_checkUnique(j){if(this.schemas[j]||this.refs[j])throw new Error(`schema with key or id "${j}" already exists`)}_compileSchemaEnv(j){if(j.meta?this._compileMetaSchema(j):a.compileSchema.call(this,j),!j.validate)throw new Error("ajv implementation error");return j.validate}_compileMetaSchema(j){const U=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,j)}finally{this.opts=U}}}k.ValidationError=n.default,k.MissingRefError=i.default,e.default=k;function E(Z,j,U,q="error"){for(const $ in Z){const F=$;F in j&&this.logger[q](`${U}: option ${$}. ${Z[F]}`)}}function R(Z){return Z=(0,c.normalizeId)(Z),this.schemas[Z]||this.refs[Z]}function T(){const Z=this.opts.schemas;if(Z)if(Array.isArray(Z))this.addSchema(Z);else for(const j in Z)this.addSchema(Z[j],j)}function A(){for(const Z in this.opts.formats){const j=this.opts.formats[Z];j&&this.addFormat(Z,j)}}function M(Z){if(Array.isArray(Z)){this.addVocabulary(Z);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const j in Z){const U=Z[j];U.keyword||(U.keyword=j),this.addKeyword(U)}}function B(){const Z={...this.opts};for(const j of b)delete Z[j];return Z}const Q={log(){},warn(){},error(){}};function se(Z){if(Z===!1)return Q;if(Z===void 0)return console;if(Z.log&&Z.warn&&Z.error)return Z;throw new Error("logger must implement log, warn and error methods")}const ie=/^[a-z_$][a-z0-9_$:-]*$/i;function N(Z,j){const{RULES:U}=this;if((0,f.eachItem)(Z,q=>{if(U.keywords[q])throw new Error(`Keyword ${q} is already defined`);if(!ie.test(q))throw new Error(`Keyword ${q} has invalid name`)}),!!j&&j.$data&&!("code"in j||"validate"in j))throw new Error('$data keyword must have "code" or "validate" function')}function X(Z,j,U){var q;const $=j==null?void 0:j.post;if(U&&$)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:F}=this;let V=$?F.post:F.rules.find(({type:pe})=>pe===U);if(V||(V={type:U,rules:[]},F.rules.push(V)),F.keywords[Z]=!0,!j)return;const de={keyword:Z,definition:{...j,type:(0,d.getJSONTypes)(j.type),schemaType:(0,d.getJSONTypes)(j.schemaType)}};j.before?ce.call(this,V,de,j.before):V.rules.push(de),F.all[Z]=de,(q=j.implements)===null||q===void 0||q.forEach(pe=>this.addKeyword(pe))}function ce(Z,j,U){const q=Z.rules.findIndex($=>$.keyword===U);q>=0?Z.rules.splice(q,0,j):(Z.rules.push(j),this.logger.warn(`rule ${U} is not defined`))}function ne(Z){let{metaSchema:j}=Z;j!==void 0&&(Z.$data&&this.opts.$data&&(j=ge(j)),Z.validateSchema=this.compile(j,!0))}const ee={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ge(Z){return{anyOf:[Z,ee]}}}(B_)),B_}var Fg={},Lg={},Bg={},sD;function Rwe(){if(sD)return Bg;sD=1,Object.defineProperty(Bg,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Bg.default=e,Bg}var wl={},lD;function PT(){if(lD)return wl;lD=1,Object.defineProperty(wl,"__esModule",{value:!0}),wl.callRef=wl.getValidate=void 0;const e=Sw(),t=Sa(),r=Dt(),n=wa(),i=_w(),o=Jt(),a={keyword:"$ref",schemaType:"string",code(d){const{gen:f,schema:p,it:m}=d,{baseId:g,schemaEnv:b,validateName:y,opts:w,self:_}=m,{root:S}=b;if((p==="#"||p==="#/")&&g===S.baseId)return k();const C=i.resolveRef.call(_,S,g,p);if(C===void 0)throw new e.default(m.opts.uriResolver,g,p);if(C instanceof i.SchemaEnv)return E(C);return R(C);function k(){if(b===S)return c(d,y,b,b.$async);const T=f.scopeValue("root",{ref:S});return c(d,(0,r._)`${T}.validate`,S,S.$async)}function E(T){const A=l(d,T);c(d,A,T,T.$async)}function R(T){const A=f.scopeValue("schema",w.code.source===!0?{ref:T,code:(0,r.stringify)(T)}:{ref:T}),M=f.name("valid"),B=d.subschema({schema:T,dataTypes:[],schemaPath:r.nil,topSchemaRef:A,errSchemaPath:p},M);d.mergeEvaluated(B),d.ok(M)}}};function l(d,f){const{gen:p}=d;return f.validate?p.scopeValue("validate",{ref:f.validate}):(0,r._)`${p.scopeValue("wrapper",{ref:f})}.validate`}wl.getValidate=l;function c(d,f,p,m){const{gen:g,it:b}=d,{allErrors:y,schemaEnv:w,opts:_}=b,S=_.passContext?n.default.this:r.nil;m?C():k();function C(){if(!w.$async)throw new Error("async schema referenced by sync schema");const T=g.let("valid");g.try(()=>{g.code((0,r._)`await ${(0,t.callValidateCode)(d,f,S)}`),R(f),y||g.assign(T,!0)},A=>{g.if((0,r._)`!(${A} instanceof ${b.ValidationError})`,()=>g.throw(A)),E(A),y||g.assign(T,!1)}),d.ok(T)}function k(){d.result((0,t.callValidateCode)(d,f,S),()=>R(f),()=>E(f))}function E(T){const A=(0,r._)`${T}.errors`;g.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${A} : ${n.default.vErrors}.concat(${A})`),g.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function R(T){var A;if(!b.opts.unevaluated)return;const M=(A=p==null?void 0:p.validate)===null||A===void 0?void 0:A.evaluated;if(b.props!==!0)if(M&&!M.dynamicProps)M.props!==void 0&&(b.props=o.mergeEvaluated.props(g,M.props,b.props));else{const B=g.var("props",(0,r._)`${T}.evaluated.props`);b.props=o.mergeEvaluated.props(g,B,b.props,r.Name)}if(b.items!==!0)if(M&&!M.dynamicItems)M.items!==void 0&&(b.items=o.mergeEvaluated.items(g,M.items,b.items));else{const B=g.var("items",(0,r._)`${T}.evaluated.items`);b.items=o.mergeEvaluated.items(g,B,b.items,r.Name)}}}return wl.callRef=c,wl.default=a,wl}var uD;function Iwe(){if(uD)return Lg;uD=1,Object.defineProperty(Lg,"__esModule",{value:!0});const e=Rwe(),t=PT(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Lg.default=r,Lg}var Vg={},zg={},cD;function kwe(){if(cD)return zg;cD=1,Object.defineProperty(zg,"__esModule",{value:!0});const e=Dt(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:o,schemaCode:a})=>(0,e.str)`must be ${r[o].okStr} ${a}`,params:({keyword:o,schemaCode:a})=>(0,e._)`{comparison: ${r[o].okStr}, limit: ${a}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(o){const{keyword:a,data:l,schemaCode:c}=o;o.fail$data((0,e._)`${l} ${r[a].fail} ${c} || isNaN(${l})`)}};return zg.default=i,zg}var qg={},dD;function jwe(){if(dD)return qg;dD=1,Object.defineProperty(qg,"__esModule",{value:!0});const e=Dt(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:o,schemaCode:a,it:l}=n,c=l.opts.multipleOfPrecision,d=i.let("res"),f=c?(0,e._)`Math.abs(Math.round(${d}) - ${d}) > 1e-${c}`:(0,e._)`${d} !== parseInt(${d})`;n.fail$data((0,e._)`(${a} === 0 || (${d} = ${o}/${a}, ${f}))`)}};return qg.default=r,qg}var Ug={},Hg={},fD;function $we(){if(fD)return Hg;fD=1,Object.defineProperty(Hg,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,i=0,o;for(;i<r;)n++,o=t.charCodeAt(i++),o>=55296&&o<=56319&&i<r&&(o=t.charCodeAt(i),(o&64512)===56320&&i++);return n}return Hg.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Hg}var hD;function Awe(){if(hD)return Ug;hD=1,Object.defineProperty(Ug,"__esModule",{value:!0});const e=Dt(),t=Jt(),r=$we(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:a}){const l=o==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${l} than ${a} characters`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:a,data:l,schemaCode:c,it:d}=o,f=a==="maxLength"?e.operators.GT:e.operators.LT,p=d.opts.unicode===!1?(0,e._)`${l}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${l})`;o.fail$data((0,e._)`${p} ${f} ${c}`)}};return Ug.default=i,Ug}var Wg={},pD;function Dwe(){if(pD)return Wg;pD=1,Object.defineProperty(Wg,"__esModule",{value:!0});const e=Sa(),t=Dt(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,t._)`{pattern: ${i}}`},code(i){const{data:o,$data:a,schema:l,schemaCode:c,it:d}=i,f=d.opts.unicodeRegExp?"u":"",p=a?(0,t._)`(new RegExp(${c}, ${f}))`:(0,e.usePattern)(i,l);i.fail$data((0,t._)`!${p}.test(${o})`)}};return Wg.default=n,Wg}var Kg={},mD;function Mwe(){if(mD)return Kg;mD=1,Object.defineProperty(Kg,"__esModule",{value:!0});const e=Dt(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const o=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${i} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:o,schemaCode:a}=n,l=i==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${o}).length ${l} ${a}`)}};return Kg.default=r,Kg}var Gg={},vD;function Nwe(){if(vD)return Gg;vD=1,Object.defineProperty(Gg,"__esModule",{value:!0});const e=Sa(),t=Dt(),r=Jt(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,t.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,t._)`{missingProperty: ${o}}`},code(o){const{gen:a,schema:l,schemaCode:c,data:d,$data:f,it:p}=o,{opts:m}=p;if(!f&&l.length===0)return;const g=l.length>=m.loopRequired;if(p.allErrors?b():y(),m.strictRequired){const S=o.parentSchema.properties,{definedProperties:C}=o.it;for(const k of l)if((S==null?void 0:S[k])===void 0&&!C.has(k)){const E=p.schemaEnv.baseId+p.errSchemaPath,R=`required property "${k}" is not defined at "${E}" (strictRequired)`;(0,r.checkStrictMode)(p,R,p.opts.strictRequired)}}function b(){if(g||f)o.block$data(t.nil,w);else for(const S of l)(0,e.checkReportMissingProp)(o,S)}function y(){const S=a.let("missing");if(g||f){const C=a.let("valid",!0);o.block$data(C,()=>_(S,C)),o.ok(C)}else a.if((0,e.checkMissingProp)(o,l,S)),(0,e.reportMissingProp)(o,S),a.else()}function w(){a.forOf("prop",c,S=>{o.setParams({missingProperty:S}),a.if((0,e.noPropertyInData)(a,d,S,m.ownProperties),()=>o.error())})}function _(S,C){o.setParams({missingProperty:S}),a.forOf(S,c,()=>{a.assign(C,(0,e.propertyInData)(a,d,S,m.ownProperties)),a.if((0,t.not)(C),()=>{o.error(),a.break()})},t.nil)}}};return Gg.default=i,Gg}var Qg={},gD;function Fwe(){if(gD)return Qg;gD=1,Object.defineProperty(Qg,"__esModule",{value:!0});const e=Dt(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const o=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${i} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:o,schemaCode:a}=n,l=i==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${o}.length ${l} ${a}`)}};return Qg.default=r,Qg}var Yg={},Xg={},yD;function CT(){if(yD)return Xg;yD=1,Object.defineProperty(Xg,"__esModule",{value:!0});const e=D3();return e.code='require("ajv/dist/runtime/equal").default',Xg.default=e,Xg}var bD;function Lwe(){if(bD)return Yg;bD=1,Object.defineProperty(Yg,"__esModule",{value:!0});const e=n0(),t=Dt(),r=Jt(),n=CT(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:l}})=>(0,t.str)`must NOT have duplicate items (items ## ${l} and ${a} are identical)`,params:({params:{i:a,j:l}})=>(0,t._)`{i: ${a}, j: ${l}}`},code(a){const{gen:l,data:c,$data:d,schema:f,parentSchema:p,schemaCode:m,it:g}=a;if(!d&&!f)return;const b=l.let("valid"),y=p.items?(0,e.getSchemaTypes)(p.items):[];a.block$data(b,w,(0,t._)`${m} === false`),a.ok(b);function w(){const k=l.let("i",(0,t._)`${c}.length`),E=l.let("j");a.setParams({i:k,j:E}),l.assign(b,!0),l.if((0,t._)`${k} > 1`,()=>(_()?S:C)(k,E))}function _(){return y.length>0&&!y.some(k=>k==="object"||k==="array")}function S(k,E){const R=l.name("item"),T=(0,e.checkDataTypes)(y,R,g.opts.strictNumbers,e.DataType.Wrong),A=l.const("indices",(0,t._)`{}`);l.for((0,t._)`;${k}--;`,()=>{l.let(R,(0,t._)`${c}[${k}]`),l.if(T,(0,t._)`continue`),y.length>1&&l.if((0,t._)`typeof ${R} == "string"`,(0,t._)`${R} += "_"`),l.if((0,t._)`typeof ${A}[${R}] == "number"`,()=>{l.assign(E,(0,t._)`${A}[${R}]`),a.error(),l.assign(b,!1).break()}).code((0,t._)`${A}[${R}] = ${k}`)})}function C(k,E){const R=(0,r.useFunc)(l,n.default),T=l.name("outer");l.label(T).for((0,t._)`;${k}--;`,()=>l.for((0,t._)`${E} = ${k}; ${E}--;`,()=>l.if((0,t._)`${R}(${c}[${k}], ${c}[${E}])`,()=>{a.error(),l.assign(b,!1).break(T)})))}}};return Yg.default=o,Yg}var Jg={},wD;function Bwe(){if(wD)return Jg;wD=1,Object.defineProperty(Jg,"__esModule",{value:!0});const e=Dt(),t=Jt(),r=CT(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:a,data:l,$data:c,schemaCode:d,schema:f}=o;c||f&&typeof f=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(a,r.default)}(${l}, ${d})`):o.fail((0,e._)`${f} !== ${l}`)}};return Jg.default=i,Jg}var Zg={},SD;function Vwe(){if(SD)return Zg;SD=1,Object.defineProperty(Zg,"__esModule",{value:!0});const e=Dt(),t=Jt(),r=CT(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:a,data:l,$data:c,schema:d,schemaCode:f,it:p}=o;if(!c&&d.length===0)throw new Error("enum must have non-empty array");const m=d.length>=p.opts.loopEnum;let g;const b=()=>g??(g=(0,t.useFunc)(a,r.default));let y;if(m||c)y=a.let("valid"),o.block$data(y,w);else{if(!Array.isArray(d))throw new Error("ajv implementation error");const S=a.const("vSchema",f);y=(0,e.or)(...d.map((C,k)=>_(S,k)))}o.pass(y);function w(){a.assign(y,!1),a.forOf("v",f,S=>a.if((0,e._)`${b()}(${l}, ${S})`,()=>a.assign(y,!0).break()))}function _(S,C){const k=d[C];return typeof k=="object"&&k!==null?(0,e._)`${b()}(${l}, ${S}[${C}])`:(0,e._)`${l} === ${k}`}}};return Zg.default=i,Zg}var _D;function zwe(){if(_D)return Vg;_D=1,Object.defineProperty(Vg,"__esModule",{value:!0});const e=kwe(),t=jwe(),r=Awe(),n=Dwe(),i=Mwe(),o=Nwe(),a=Fwe(),l=Lwe(),c=Bwe(),d=Vwe(),f=[e.default,t.default,r.default,n.default,i.default,o.default,a.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,d.default];return Vg.default=f,Vg}var ey={},gd={},xD;function M3(){if(xD)return gd;xD=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd.validateAdditionalItems=void 0;const e=Dt(),t=Jt(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:a,it:l}=o,{items:c}=a;if(!Array.isArray(c)){(0,t.checkStrictMode)(l,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(o,c)}};function i(o,a){const{gen:l,schema:c,data:d,keyword:f,it:p}=o;p.items=!0;const m=l.const("len",(0,e._)`${d}.length`);if(c===!1)o.setParams({len:a.length}),o.pass((0,e._)`${m} <= ${a.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(p,c)){const b=l.var("valid",(0,e._)`${m} <= ${a.length}`);l.if((0,e.not)(b),()=>g(b)),o.ok(b)}function g(b){l.forRange("i",a.length,m,y=>{o.subschema({keyword:f,dataProp:y,dataPropType:t.Type.Num},b),p.allErrors||l.if((0,e.not)(b),()=>l.break())})}}return gd.validateAdditionalItems=i,gd.default=n,gd}var ty={},yd={},PD;function N3(){if(PD)return yd;PD=1,Object.defineProperty(yd,"__esModule",{value:!0}),yd.validateTuple=void 0;const e=Dt(),t=Jt(),r=Sa(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:a,it:l}=o;if(Array.isArray(a))return i(o,"additionalItems",a);l.items=!0,!(0,t.alwaysValidSchema)(l,a)&&o.ok((0,r.validateArray)(o))}};function i(o,a,l=o.schema){const{gen:c,parentSchema:d,data:f,keyword:p,it:m}=o;y(d),m.opts.unevaluated&&l.length&&m.items!==!0&&(m.items=t.mergeEvaluated.items(c,l.length,m.items));const g=c.name("valid"),b=c.const("len",(0,e._)`${f}.length`);l.forEach((w,_)=>{(0,t.alwaysValidSchema)(m,w)||(c.if((0,e._)`${b} > ${_}`,()=>o.subschema({keyword:p,schemaProp:_,dataProp:_},g)),o.ok(g))});function y(w){const{opts:_,errSchemaPath:S}=m,C=l.length,k=C===w.minItems&&(C===w.maxItems||w[a]===!1);if(_.strictTuples&&!k){const E=`"${p}" is ${C}-tuple, but minItems or maxItems/${a} are not specified or different at path "${S}"`;(0,t.checkStrictMode)(m,E,_.strictTuples)}}}return yd.validateTuple=i,yd.default=n,yd}var CD;function qwe(){if(CD)return ty;CD=1,Object.defineProperty(ty,"__esModule",{value:!0});const e=N3(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return ty.default=t,ty}var ry={},ED;function Uwe(){if(ED)return ry;ED=1,Object.defineProperty(ry,"__esModule",{value:!0});const e=Dt(),t=Jt(),r=Sa(),n=M3(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{schema:l,parentSchema:c,it:d}=a,{prefixItems:f}=c;d.items=!0,!(0,t.alwaysValidSchema)(d,l)&&(f?(0,n.validateAdditionalItems)(a,f):a.ok((0,r.validateArray)(a)))}};return ry.default=o,ry}var ny={},TD;function Hwe(){if(TD)return ny;TD=1,Object.defineProperty(ny,"__esModule",{value:!0});const e=Dt(),t=Jt(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:o}})=>o===void 0?(0,e.str)`must contain at least ${i} valid item(s)`:(0,e.str)`must contain at least ${i} and no more than ${o} valid item(s)`,params:({params:{min:i,max:o}})=>o===void 0?(0,e._)`{minContains: ${i}}`:(0,e._)`{minContains: ${i}, maxContains: ${o}}`},code(i){const{gen:o,schema:a,parentSchema:l,data:c,it:d}=i;let f,p;const{minContains:m,maxContains:g}=l;d.opts.next?(f=m===void 0?1:m,p=g):f=1;const b=o.const("len",(0,e._)`${c}.length`);if(i.setParams({min:f,max:p}),p===void 0&&f===0){(0,t.checkStrictMode)(d,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&f>p){(0,t.checkStrictMode)(d,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,t.alwaysValidSchema)(d,a)){let C=(0,e._)`${b} >= ${f}`;p!==void 0&&(C=(0,e._)`${C} && ${b} <= ${p}`),i.pass(C);return}d.items=!0;const y=o.name("valid");p===void 0&&f===1?_(y,()=>o.if(y,()=>o.break())):f===0?(o.let(y,!0),p!==void 0&&o.if((0,e._)`${c}.length > 0`,w)):(o.let(y,!1),w()),i.result(y,()=>i.reset());function w(){const C=o.name("_valid"),k=o.let("count",0);_(C,()=>o.if(C,()=>S(k)))}function _(C,k){o.forRange("i",0,b,E=>{i.subschema({keyword:"contains",dataProp:E,dataPropType:t.Type.Num,compositeRule:!0},C),k()})}function S(C){o.code((0,e._)`${C}++`),p===void 0?o.if((0,e._)`${C} >= ${f}`,()=>o.assign(y,!0).break()):(o.if((0,e._)`${C} > ${p}`,()=>o.assign(y,!1).break()),f===1?o.assign(y,!0):o.if((0,e._)`${C} >= ${f}`,()=>o.assign(y,!0)))}}};return ny.default=n,ny}var K_={},OD;function ET(){return OD||(OD=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Dt(),r=Jt(),n=Sa();e.error={message:({params:{property:c,depsCount:d,deps:f}})=>{const p=d===1?"property":"properties";return(0,t.str)`must have ${p} ${f} when property ${c} is present`},params:({params:{property:c,depsCount:d,deps:f,missingProperty:p}})=>(0,t._)`{property: ${c},
|
1406
|
-
missingProperty: ${p},
|
1407
|
-
depsCount: ${d},
|
1408
|
-
deps: ${f}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[d,f]=o(c);a(c,d),l(c,f)}};function o({schema:c}){const d={},f={};for(const p in c){if(p==="__proto__")continue;const m=Array.isArray(c[p])?d:f;m[p]=c[p]}return[d,f]}function a(c,d=c.schema){const{gen:f,data:p,it:m}=c;if(Object.keys(d).length===0)return;const g=f.let("missing");for(const b in d){const y=d[b];if(y.length===0)continue;const w=(0,n.propertyInData)(f,p,b,m.opts.ownProperties);c.setParams({property:b,depsCount:y.length,deps:y.join(", ")}),m.allErrors?f.if(w,()=>{for(const _ of y)(0,n.checkReportMissingProp)(c,_)}):(f.if((0,t._)`${w} && (${(0,n.checkMissingProp)(c,y,g)})`),(0,n.reportMissingProp)(c,g),f.else())}}e.validatePropertyDeps=a;function l(c,d=c.schema){const{gen:f,data:p,keyword:m,it:g}=c,b=f.name("valid");for(const y in d)(0,r.alwaysValidSchema)(g,d[y])||(f.if((0,n.propertyInData)(f,p,y,g.opts.ownProperties),()=>{const w=c.subschema({keyword:m,schemaProp:y},b);c.mergeValidEvaluated(w,b)},()=>f.var(b,!0)),c.ok(b))}e.validateSchemaDeps=l,e.default=i}(K_)),K_}var iy={},RD;function Wwe(){if(RD)return iy;RD=1,Object.defineProperty(iy,"__esModule",{value:!0});const e=Dt(),t=Jt(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:o,schema:a,data:l,it:c}=i;if((0,t.alwaysValidSchema)(c,a))return;const d=o.name("valid");o.forIn("key",l,f=>{i.setParams({propertyName:f}),i.subschema({keyword:"propertyNames",data:f,dataTypes:["string"],propertyName:f,compositeRule:!0},d),o.if((0,e.not)(d),()=>{i.error(!0),c.allErrors||o.break()})}),i.ok(d)}};return iy.default=n,iy}var oy={},ID;function F3(){if(ID)return oy;ID=1,Object.defineProperty(oy,"__esModule",{value:!0});const e=Sa(),t=Dt(),r=wa(),n=Jt(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,t._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:l,schema:c,parentSchema:d,data:f,errsCount:p,it:m}=a;if(!p)throw new Error("ajv implementation error");const{allErrors:g,opts:b}=m;if(m.props=!0,b.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(m,c))return;const y=(0,e.allSchemaProperties)(d.properties),w=(0,e.allSchemaProperties)(d.patternProperties);_(),a.ok((0,t._)`${p} === ${r.default.errors}`);function _(){l.forIn("key",f,R=>{!y.length&&!w.length?k(R):l.if(S(R),()=>k(R))})}function S(R){let T;if(y.length>8){const A=(0,n.schemaRefOrVal)(m,d.properties,"properties");T=(0,e.isOwnProperty)(l,A,R)}else y.length?T=(0,t.or)(...y.map(A=>(0,t._)`${R} === ${A}`)):T=t.nil;return w.length&&(T=(0,t.or)(T,...w.map(A=>(0,t._)`${(0,e.usePattern)(a,A)}.test(${R})`))),(0,t.not)(T)}function C(R){l.code((0,t._)`delete ${f}[${R}]`)}function k(R){if(b.removeAdditional==="all"||b.removeAdditional&&c===!1){C(R);return}if(c===!1){a.setParams({additionalProperty:R}),a.error(),g||l.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(m,c)){const T=l.name("valid");b.removeAdditional==="failing"?(E(R,T,!1),l.if((0,t.not)(T),()=>{a.reset(),C(R)})):(E(R,T),g||l.if((0,t.not)(T),()=>l.break()))}}function E(R,T,A){const M={keyword:"additionalProperties",dataProp:R,dataPropType:n.Type.Str};A===!1&&Object.assign(M,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(M,T)}}};return oy.default=o,oy}var ay={},kD;function Kwe(){if(kD)return ay;kD=1,Object.defineProperty(ay,"__esModule",{value:!0});const e=ww(),t=Sa(),r=Jt(),n=F3(),i={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:a,schema:l,parentSchema:c,data:d,it:f}=o;f.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(f,n.default,"additionalProperties"));const p=(0,t.allSchemaProperties)(l);for(const w of p)f.definedProperties.add(w);f.opts.unevaluated&&p.length&&f.props!==!0&&(f.props=r.mergeEvaluated.props(a,(0,r.toHash)(p),f.props));const m=p.filter(w=>!(0,r.alwaysValidSchema)(f,l[w]));if(m.length===0)return;const g=a.name("valid");for(const w of m)b(w)?y(w):(a.if((0,t.propertyInData)(a,d,w,f.opts.ownProperties)),y(w),f.allErrors||a.else().var(g,!0),a.endIf()),o.it.definedProperties.add(w),o.ok(g);function b(w){return f.opts.useDefaults&&!f.compositeRule&&l[w].default!==void 0}function y(w){o.subschema({keyword:"properties",schemaProp:w,dataProp:w},g)}}};return ay.default=i,ay}var sy={},jD;function Gwe(){if(jD)return sy;jD=1,Object.defineProperty(sy,"__esModule",{value:!0});const e=Sa(),t=Dt(),r=Jt(),n=Jt(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:a,schema:l,data:c,parentSchema:d,it:f}=o,{opts:p}=f,m=(0,e.allSchemaProperties)(l),g=m.filter(k=>(0,r.alwaysValidSchema)(f,l[k]));if(m.length===0||g.length===m.length&&(!f.opts.unevaluated||f.props===!0))return;const b=p.strictSchema&&!p.allowMatchingProperties&&d.properties,y=a.name("valid");f.props!==!0&&!(f.props instanceof t.Name)&&(f.props=(0,n.evaluatedPropsToName)(a,f.props));const{props:w}=f;_();function _(){for(const k of m)b&&S(k),f.allErrors?C(k):(a.var(y,!0),C(k),a.if(y))}function S(k){for(const E in b)new RegExp(k).test(E)&&(0,r.checkStrictMode)(f,`property ${E} matches pattern ${k} (use allowMatchingProperties)`)}function C(k){a.forIn("key",c,E=>{a.if((0,t._)`${(0,e.usePattern)(o,k)}.test(${E})`,()=>{const R=g.includes(k);R||o.subschema({keyword:"patternProperties",schemaProp:k,dataProp:E,dataPropType:n.Type.Str},y),f.opts.unevaluated&&w!==!0?a.assign((0,t._)`${w}[${E}]`,!0):!R&&!f.allErrors&&a.if((0,t.not)(y),()=>a.break())})})}}};return sy.default=i,sy}var ly={},$D;function Qwe(){if($D)return ly;$D=1,Object.defineProperty(ly,"__esModule",{value:!0});const e=Jt(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:o}=r;if((0,e.alwaysValidSchema)(o,i)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return ly.default=t,ly}var uy={},AD;function Ywe(){if(AD)return uy;AD=1,Object.defineProperty(uy,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Sa().validateUnion,error:{message:"must match a schema in anyOf"}};return uy.default=t,uy}var cy={},DD;function Xwe(){if(DD)return cy;DD=1,Object.defineProperty(cy,"__esModule",{value:!0});const e=Dt(),t=Jt(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:o,schema:a,parentSchema:l,it:c}=i;if(!Array.isArray(a))throw new Error("ajv implementation error");if(c.opts.discriminator&&l.discriminator)return;const d=a,f=o.let("valid",!1),p=o.let("passing",null),m=o.name("_valid");i.setParams({passing:p}),o.block(g),i.result(f,()=>i.reset(),()=>i.error(!0));function g(){d.forEach((b,y)=>{let w;(0,t.alwaysValidSchema)(c,b)?o.var(m,!0):w=i.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},m),y>0&&o.if((0,e._)`${m} && ${f}`).assign(f,!1).assign(p,(0,e._)`[${p}, ${y}]`).else(),o.if(m,()=>{o.assign(f,!0),o.assign(p,y),w&&i.mergeEvaluated(w,e.Name)})})}}};return cy.default=n,cy}var dy={},MD;function Jwe(){if(MD)return dy;MD=1,Object.defineProperty(dy,"__esModule",{value:!0});const e=Jt(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:i,it:o}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const a=n.name("valid");i.forEach((l,c)=>{if((0,e.alwaysValidSchema)(o,l))return;const d=r.subschema({keyword:"allOf",schemaProp:c},a);r.ok(a),r.mergeEvaluated(d)})}};return dy.default=t,dy}var fy={},ND;function Zwe(){if(ND)return fy;ND=1,Object.defineProperty(fy,"__esModule",{value:!0});const e=Dt(),t=Jt(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:a,parentSchema:l,it:c}=o;l.then===void 0&&l.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const d=i(c,"then"),f=i(c,"else");if(!d&&!f)return;const p=a.let("valid",!0),m=a.name("_valid");if(g(),o.reset(),d&&f){const y=a.let("ifClause");o.setParams({ifClause:y}),a.if(m,b("then",y),b("else",y))}else d?a.if(m,b("then")):a.if((0,e.not)(m),b("else"));o.pass(p,()=>o.error(!0));function g(){const y=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},m);o.mergeEvaluated(y)}function b(y,w){return()=>{const _=o.subschema({keyword:y},m);a.assign(p,m),o.mergeValidEvaluated(_,p),w?a.assign(w,(0,e._)`${y}`):o.setParams({ifClause:y})}}}};function i(o,a){const l=o.schema[a];return l!==void 0&&!(0,t.alwaysValidSchema)(o,l)}return fy.default=n,fy}var hy={},FD;function eSe(){if(FD)return hy;FD=1,Object.defineProperty(hy,"__esModule",{value:!0});const e=Jt(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,e.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return hy.default=t,hy}var LD;function tSe(){if(LD)return ey;LD=1,Object.defineProperty(ey,"__esModule",{value:!0});const e=M3(),t=qwe(),r=N3(),n=Uwe(),i=Hwe(),o=ET(),a=Wwe(),l=F3(),c=Kwe(),d=Gwe(),f=Qwe(),p=Ywe(),m=Xwe(),g=Jwe(),b=Zwe(),y=eSe();function w(_=!1){const S=[f.default,p.default,m.default,g.default,b.default,y.default,a.default,l.default,o.default,c.default,d.default];return _?S.push(t.default,n.default):S.push(e.default,r.default),S.push(i.default),S}return ey.default=w,ey}var py={},bd={},BD;function L3(){if(BD)return bd;BD=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.dynamicAnchor=void 0;const e=Dt(),t=wa(),r=_w(),n=PT(),i={keyword:"$dynamicAnchor",schemaType:"string",code:l=>o(l,l.schema)};function o(l,c){const{gen:d,it:f}=l;f.schemaEnv.root.dynamicAnchors[c]=!0;const p=(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(c)}`,m=f.errSchemaPath==="#"?f.validateName:a(l);d.if((0,e._)`!${p}`,()=>d.assign(p,m))}bd.dynamicAnchor=o;function a(l){const{schemaEnv:c,schema:d,self:f}=l.it,{root:p,baseId:m,localRefs:g,meta:b}=c.root,{schemaId:y}=f.opts,w=new r.SchemaEnv({schema:d,schemaId:y,root:p,baseId:m,localRefs:g,meta:b});return r.compileSchema.call(f,w),(0,n.getValidate)(l,w)}return bd.default=i,bd}var wd={},VD;function B3(){if(VD)return wd;VD=1,Object.defineProperty(wd,"__esModule",{value:!0}),wd.dynamicRef=void 0;const e=Dt(),t=wa(),r=PT(),n={keyword:"$dynamicRef",schemaType:"string",code:o=>i(o,o.schema)};function i(o,a){const{gen:l,keyword:c,it:d}=o;if(a[0]!=="#")throw new Error(`"${c}" only supports hash fragment reference`);const f=a.slice(1);if(d.allErrors)p();else{const g=l.let("valid",!1);p(g),o.ok(g)}function p(g){if(d.schemaEnv.root.dynamicAnchors[f]){const b=l.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(f)}`);l.if(b,m(b,g),m(d.validateName,g))}else m(d.validateName,g)()}function m(g,b){return b?()=>l.block(()=>{(0,r.callRef)(o,g),l.let(b,!0)}):()=>(0,r.callRef)(o,g)}}return wd.dynamicRef=i,wd.default=n,wd}var my={},zD;function rSe(){if(zD)return my;zD=1,Object.defineProperty(my,"__esModule",{value:!0});const e=L3(),t=Jt(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,e.dynamicAnchor)(n,""):(0,t.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return my.default=r,my}var vy={},qD;function nSe(){if(qD)return vy;qD=1,Object.defineProperty(vy,"__esModule",{value:!0});const e=B3(),t={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,e.dynamicRef)(r,r.schema)};return vy.default=t,vy}var UD;function iSe(){if(UD)return py;UD=1,Object.defineProperty(py,"__esModule",{value:!0});const e=L3(),t=B3(),r=rSe(),n=nSe(),i=[e.default,t.default,r.default,n.default];return py.default=i,py}var gy={},yy={},HD;function oSe(){if(HD)return yy;HD=1,Object.defineProperty(yy,"__esModule",{value:!0});const e=ET(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:r=>(0,e.validatePropertyDeps)(r)};return yy.default=t,yy}var by={},WD;function aSe(){if(WD)return by;WD=1,Object.defineProperty(by,"__esModule",{value:!0});const e=ET(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,e.validateSchemaDeps)(r)};return by.default=t,by}var wy={},KD;function sSe(){if(KD)return wy;KD=1,Object.defineProperty(wy,"__esModule",{value:!0});const e=Jt(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:i}){n.contains===void 0&&(0,e.checkStrictMode)(i,`"${r}" without "contains" is ignored`)}};return wy.default=t,wy}var GD;function lSe(){if(GD)return gy;GD=1,Object.defineProperty(gy,"__esModule",{value:!0});const e=oSe(),t=aSe(),r=sSe(),n=[e.default,t.default,r.default];return gy.default=n,gy}var Sy={},_y={},QD;function uSe(){if(QD)return _y;QD=1,Object.defineProperty(_y,"__esModule",{value:!0});const e=Dt(),t=Jt(),r=wa(),i={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,e._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){const{gen:a,schema:l,data:c,errsCount:d,it:f}=o;if(!d)throw new Error("ajv implementation error");const{allErrors:p,props:m}=f;m instanceof e.Name?a.if((0,e._)`${m} !== true`,()=>a.forIn("key",c,w=>a.if(b(m,w),()=>g(w)))):m!==!0&&a.forIn("key",c,w=>m===void 0?g(w):a.if(y(m,w),()=>g(w))),f.props=!0,o.ok((0,e._)`${d} === ${r.default.errors}`);function g(w){if(l===!1){o.setParams({unevaluatedProperty:w}),o.error(),p||a.break();return}if(!(0,t.alwaysValidSchema)(f,l)){const _=a.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:w,dataPropType:t.Type.Str},_),p||a.if((0,e.not)(_),()=>a.break())}}function b(w,_){return(0,e._)`!${w} || !${w}[${_}]`}function y(w,_){const S=[];for(const C in w)w[C]===!0&&S.push((0,e._)`${_} !== ${C}`);return(0,e.and)(...S)}}};return _y.default=i,_y}var xy={},YD;function cSe(){if(YD)return xy;YD=1,Object.defineProperty(xy,"__esModule",{value:!0});const e=Dt(),t=Jt(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{gen:o,schema:a,data:l,it:c}=i,d=c.items||0;if(d===!0)return;const f=o.const("len",(0,e._)`${l}.length`);if(a===!1)i.setParams({len:d}),i.fail((0,e._)`${f} > ${d}`);else if(typeof a=="object"&&!(0,t.alwaysValidSchema)(c,a)){const m=o.var("valid",(0,e._)`${f} <= ${d}`);o.if((0,e.not)(m),()=>p(m,d)),i.ok(m)}c.items=!0;function p(m,g){o.forRange("i",g,f,b=>{i.subschema({keyword:"unevaluatedItems",dataProp:b,dataPropType:t.Type.Num},m),c.allErrors||o.if((0,e.not)(m),()=>o.break())})}}};return xy.default=n,xy}var XD;function dSe(){if(XD)return Sy;XD=1,Object.defineProperty(Sy,"__esModule",{value:!0});const e=uSe(),t=cSe(),r=[e.default,t.default];return Sy.default=r,Sy}var Py={},Cy={},JD;function fSe(){if(JD)return Cy;JD=1,Object.defineProperty(Cy,"__esModule",{value:!0});const e=Dt(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,i){const{gen:o,data:a,$data:l,schema:c,schemaCode:d,it:f}=n,{opts:p,errSchemaPath:m,schemaEnv:g,self:b}=f;if(!p.validateFormats)return;l?y():w();function y(){const _=o.scopeValue("formats",{ref:b.formats,code:p.code.formats}),S=o.const("fDef",(0,e._)`${_}[${d}]`),C=o.let("fType"),k=o.let("format");o.if((0,e._)`typeof ${S} == "object" && !(${S} instanceof RegExp)`,()=>o.assign(C,(0,e._)`${S}.type || "string"`).assign(k,(0,e._)`${S}.validate`),()=>o.assign(C,(0,e._)`"string"`).assign(k,S)),n.fail$data((0,e.or)(E(),R()));function E(){return p.strictSchema===!1?e.nil:(0,e._)`${d} && !${k}`}function R(){const T=g.$async?(0,e._)`(${S}.async ? await ${k}(${a}) : ${k}(${a}))`:(0,e._)`${k}(${a})`,A=(0,e._)`(typeof ${k} == "function" ? ${T} : ${k}.test(${a}))`;return(0,e._)`${k} && ${k} !== true && ${C} === ${i} && !${A}`}}function w(){const _=b.formats[c];if(!_){E();return}if(_===!0)return;const[S,C,k]=R(_);S===i&&n.pass(T());function E(){if(p.strictSchema===!1){b.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${c}" ignored in schema at path "${m}"`}}function R(A){const M=A instanceof RegExp?(0,e.regexpCode)(A):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(c)}`:void 0,B=o.scopeValue("formats",{key:c,ref:A,code:M});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,e._)`${B}.validate`]:["string",A,B]}function T(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!g.$async)throw new Error("async format in sync schema");return(0,e._)`await ${k}(${a})`}return typeof C=="function"?(0,e._)`${k}(${a})`:(0,e._)`${k}.test(${a})`}}}};return Cy.default=r,Cy}var ZD;function hSe(){if(ZD)return Py;ZD=1,Object.defineProperty(Py,"__esModule",{value:!0});const t=[fSe().default];return Py.default=t,Py}var ku={},eM;function pSe(){return eM||(eM=1,Object.defineProperty(ku,"__esModule",{value:!0}),ku.contentVocabulary=ku.metadataVocabulary=void 0,ku.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ku.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ku}var tM;function mSe(){if(tM)return Fg;tM=1,Object.defineProperty(Fg,"__esModule",{value:!0});const e=Iwe(),t=zwe(),r=tSe(),n=iSe(),i=lSe(),o=dSe(),a=hSe(),l=pSe(),c=[n.default,e.default,t.default,(0,r.default)(!0),a.default,l.metadataVocabulary,l.contentVocabulary,i.default,o.default];return Fg.default=c,Fg}var Ey={},qh={},rM;function vSe(){if(rM)return qh;rM=1,Object.defineProperty(qh,"__esModule",{value:!0}),qh.DiscrError=void 0;var e;return function(t){t.Tag="tag",t.Mapping="mapping"}(e||(qh.DiscrError=e={})),qh}var nM;function gSe(){if(nM)return Ey;nM=1,Object.defineProperty(Ey,"__esModule",{value:!0});const e=Dt(),t=vSe(),r=_w(),n=Sw(),i=Jt(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:l,tagName:c}})=>l===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:l,tag:c,tagName:d}})=>(0,e._)`{error: ${l}, tag: ${d}, tagValue: ${c}}`},code(l){const{gen:c,data:d,schema:f,parentSchema:p,it:m}=l,{oneOf:g}=p;if(!m.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=f.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(f.mapping)throw new Error("discriminator: mapping is not supported");if(!g)throw new Error("discriminator: requires oneOf keyword");const y=c.let("valid",!1),w=c.const("tag",(0,e._)`${d}${(0,e.getProperty)(b)}`);c.if((0,e._)`typeof ${w} == "string"`,()=>_(),()=>l.error(!1,{discrError:t.DiscrError.Tag,tag:w,tagName:b})),l.ok(y);function _(){const k=C();c.if(!1);for(const E in k)c.elseIf((0,e._)`${w} === ${E}`),c.assign(y,S(k[E]));c.else(),l.error(!1,{discrError:t.DiscrError.Mapping,tag:w,tagName:b}),c.endIf()}function S(k){const E=c.name("valid"),R=l.subschema({keyword:"oneOf",schemaProp:k},E);return l.mergeEvaluated(R,e.Name),E}function C(){var k;const E={},R=A(p);let T=!0;for(let Q=0;Q<g.length;Q++){let se=g[Q];if(se!=null&&se.$ref&&!(0,i.schemaHasRulesButRef)(se,m.self.RULES)){const N=se.$ref;if(se=r.resolveRef.call(m.self,m.schemaEnv.root,m.baseId,N),se instanceof r.SchemaEnv&&(se=se.schema),se===void 0)throw new n.default(m.opts.uriResolver,m.baseId,N)}const ie=(k=se==null?void 0:se.properties)===null||k===void 0?void 0:k[b];if(typeof ie!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);T=T&&(R||A(se)),M(ie,Q)}if(!T)throw new Error(`discriminator: "${b}" must be required`);return E;function A({required:Q}){return Array.isArray(Q)&&Q.includes(b)}function M(Q,se){if(Q.const)B(Q.const,se);else if(Q.enum)for(const ie of Q.enum)B(ie,se);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function B(Q,se){if(typeof Q!="string"||Q in E)throw new Error(`discriminator: "${b}" values must be unique strings`);E[Q]=se}}}};return Ey.default=a,Ey}var Ty={};const ySe="https://json-schema.org/draft/2020-12/schema",bSe="https://json-schema.org/draft/2020-12/schema",wSe={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},SSe="meta",_Se="Core and Validation specifications meta-schema",xSe=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],PSe=["object","boolean"],CSe="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",ESe={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},TSe={$schema:ySe,$id:bSe,$vocabulary:wSe,$dynamicAnchor:SSe,title:_Se,allOf:xSe,type:PSe,$comment:CSe,properties:ESe},OSe="https://json-schema.org/draft/2020-12/schema",RSe="https://json-schema.org/draft/2020-12/meta/applicator",ISe={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},kSe="meta",jSe="Applicator vocabulary meta-schema",$Se=["object","boolean"],ASe={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},DSe={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},MSe={$schema:OSe,$id:RSe,$vocabulary:ISe,$dynamicAnchor:kSe,title:jSe,type:$Se,properties:ASe,$defs:DSe},NSe="https://json-schema.org/draft/2020-12/schema",FSe="https://json-schema.org/draft/2020-12/meta/unevaluated",LSe={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},BSe="meta",VSe="Unevaluated applicator vocabulary meta-schema",zSe=["object","boolean"],qSe={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},USe={$schema:NSe,$id:FSe,$vocabulary:LSe,$dynamicAnchor:BSe,title:VSe,type:zSe,properties:qSe},HSe="https://json-schema.org/draft/2020-12/schema",WSe="https://json-schema.org/draft/2020-12/meta/content",KSe={"https://json-schema.org/draft/2020-12/vocab/content":!0},GSe="meta",QSe="Content vocabulary meta-schema",YSe=["object","boolean"],XSe={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},JSe={$schema:HSe,$id:WSe,$vocabulary:KSe,$dynamicAnchor:GSe,title:QSe,type:YSe,properties:XSe},ZSe="https://json-schema.org/draft/2020-12/schema",e1e="https://json-schema.org/draft/2020-12/meta/core",t1e={"https://json-schema.org/draft/2020-12/vocab/core":!0},r1e="meta",n1e="Core vocabulary meta-schema",i1e=["object","boolean"],o1e={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},a1e={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},s1e={$schema:ZSe,$id:e1e,$vocabulary:t1e,$dynamicAnchor:r1e,title:n1e,type:i1e,properties:o1e,$defs:a1e},l1e="https://json-schema.org/draft/2020-12/schema",u1e="https://json-schema.org/draft/2020-12/meta/format-annotation",c1e={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},d1e="meta",f1e="Format vocabulary meta-schema for annotation results",h1e=["object","boolean"],p1e={format:{type:"string"}},m1e={$schema:l1e,$id:u1e,$vocabulary:c1e,$dynamicAnchor:d1e,title:f1e,type:h1e,properties:p1e},v1e="https://json-schema.org/draft/2020-12/schema",g1e="https://json-schema.org/draft/2020-12/meta/meta-data",y1e={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},b1e="meta",w1e="Meta-data vocabulary meta-schema",S1e=["object","boolean"],_1e={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},x1e={$schema:v1e,$id:g1e,$vocabulary:y1e,$dynamicAnchor:b1e,title:w1e,type:S1e,properties:_1e},P1e="https://json-schema.org/draft/2020-12/schema",C1e="https://json-schema.org/draft/2020-12/meta/validation",E1e={"https://json-schema.org/draft/2020-12/vocab/validation":!0},T1e="meta",O1e="Validation vocabulary meta-schema",R1e=["object","boolean"],I1e={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},k1e={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},j1e={$schema:P1e,$id:C1e,$vocabulary:E1e,$dynamicAnchor:T1e,title:O1e,type:R1e,properties:I1e,$defs:k1e};var iM;function $1e(){if(iM)return Ty;iM=1,Object.defineProperty(Ty,"__esModule",{value:!0});const e=TSe,t=MSe,r=USe,n=JSe,i=s1e,o=m1e,a=x1e,l=j1e,c=["/properties"];function d(f){return[e,t,r,n,i,p(this,o),a,p(this,l)].forEach(m=>this.addMetaSchema(m,void 0,!1)),this;function p(m,g){return f?m.$dataMetaSchema(g,c):g}}return Ty.default=d,Ty}var oM;function A1e(){return oM||(oM=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=Owe(),n=mSe(),i=gSe(),o=$1e(),a="https://json-schema.org/draft/2020-12/schema";class l extends r.default{constructor(g={}){super({...g,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(g=>this.addVocabulary(g)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:g,meta:b}=this.opts;b&&(o.default.call(this,g),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=l,e.exports=t=l,e.exports.Ajv2020=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=ww();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var d=Dt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var f=xT();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=Sw();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}($g,$g.exports)),$g.exports}var D1e=A1e();const M1e=mc(D1e),N1e={type:"object",properties:{$ref:{type:"string"}},additionalProperties:!1,required:["$ref"]},F1e={type:"object",properties:{type:{const:"string"},default:{type:"string"},foreignKey:{type:"string"}},additionalProperties:!1,required:["type","default"]},L1e={type:"object",properties:{type:{const:"number"},default:{type:"number"}},additionalProperties:!1,required:["type","default"]},B1e={type:"object",properties:{type:{const:"boolean"},default:{type:"boolean"}},additionalProperties:!1,required:["type","default"]},V1e={type:"object",properties:{type:{const:"object"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},additionalProperties:{const:!1},required:{$ref:"#/$defs/stringArray"}},additionalProperties:!1,required:["type","properties","additionalProperties","required"]},z1e={type:"object",properties:{type:{const:"array"},items:{oneOf:[{$ref:"#/$defs/refSchema"},{$ref:"#/$defs/objectSchema"},{$ref:"#/$defs/arraySchema"},{$ref:"#/$defs/stringSchema"},{$ref:"#/$defs/numberSchema"},{$ref:"#/$defs/booleanSchema"}]}},additionalProperties:!1,required:["type","items"]},q1e={type:"object",$dynamicAnchor:"meta",oneOf:[{$ref:"#/$defs/refSchema"},{$ref:"#/$defs/objectSchema"},{$ref:"#/$defs/arraySchema"},{$ref:"#/$defs/stringSchema"},{$ref:"#/$defs/numberSchema"},{$ref:"#/$defs/booleanSchema"}],$defs:{stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]},refSchema:N1e,objectSchema:V1e,stringSchema:F1e,numberSchema:L1e,booleanSchema:B1e,arraySchema:z1e}},V3=e=>new M1e().validate(q1e,e);class U1e{constructor(t){this.projectPageModel=t,st(this,{},{autoBind:!0})}get row(){return this.projectPageModel.rowOrThrow}get isValidSchema(){const t=this.projectPageModel.tableOrThrow.schema;return V3(t)}init(){}dispose(){}}const H1e=()=>{const e=Zn(),[t]=O.useState(()=>new U1e(e));return O.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t};class W1e{constructor(t,r=nn()){Pe(this,"type",Le.Array);Pe(this,"$ref","");this.items=t,this.nodeId=r,st(this)}getPlainSchema(){return Wx({type:this.type,items:this.items.getPlainSchema()})}}class K1e{constructor(t=nn()){Pe(this,"type",Le.Boolean);Pe(this,"$ref","");Pe(this,"default",!1);Pe(this,"readOnly");this.nodeId=t,st(this)}getPlainSchema(){return{type:this.type,default:this.default}}}class G1e{constructor(t=nn()){Pe(this,"type",Le.Number);Pe(this,"$ref","");Pe(this,"default",0);Pe(this,"readOnly");this.nodeId=t,st(this)}getPlainSchema(){return{type:this.type,default:this.default}}}class z3{constructor(t=nn()){Pe(this,"type",Le.Object);Pe(this,"$ref","");Pe(this,"additionalProperties",!1);Pe(this,"required",[]);Pe(this,"properties",{});this.nodeId=t,st(this)}get empty(){return Object.keys(this.properties).length===0}addPropertyWithStore(t,r){if(this.properties[t]||this.required.includes(t))throw new Error("this name already exists");return this.required.push(t),this.properties[t]=r}getPlainSchema(){return Wx({type:this.type,additionalProperties:this.additionalProperties,required:Wx(this.required).sort(),properties:Object.entries(this.properties).reduce((t,[r,n])=>(t[r]=n.getPlainSchema(),t),{})})}}class q3{constructor(t=nn()){Pe(this,"type",Le.String);Pe(this,"$ref","");Pe(this,"default","");Pe(this,"foreignKey");Pe(this,"readOnly");this.nodeId=t,st(this)}getPlainSchema(){const t={type:this.type,default:this.default};return this.foreignKey&&(t.foreignKey=this.foreignKey),t}}const gm=e=>{if("$ref"in e){const t=p3[e.$ref];if(!t)throw new Error(`Schema refs must be defined ref$=${e.$ref}`);const r=gm(t);return r.$ref=e.$ref,r}else return e.type===Le.Object?Q1e(e):e.type===Le.Array?new W1e(gm(e.items)):Y1e(e)},Q1e=e=>{const t=new z3;return Object.entries(e.properties).forEach(([r,n])=>{t.addPropertyWithStore(r,gm(n))}),t},Y1e=e=>{if(e.type===Le.String){const t=new q3;return t.foreignKey=e.foreignKey,t.readOnly=e.readOnly,t}else if(e.type===Le.Number){const t=new G1e;return t.readOnly=e.readOnly,t}else if(e.type===Le.Boolean){const t=new K1e;return t.readOnly=e.readOnly,t}else throw new Error("this type is not allowed")};class U3{constructor(t){Pe(this,"id","");Pe(this,"parent",null);Pe(this,"nodeId",nn());Pe(this,"type",Le.String);Pe(this,"baseValue","");Pe(this,"value",null);this.schema=t,st(this)}get $ref(){return this.schema.$ref}get readOnly(){return this.schema.readOnly}get foreignKey(){return this.schema.foreignKey}get touched(){return this.baseValue!==this.value}get isValid(){return!(this.schema.foreignKey&&!this.value)}getPlainValue(){return this.value??this.schema.default}setValue(t){this.value=t}updateBaseValue(t){this.baseValue=t,this.value=t}}class H3{constructor(t,r,n=null,i){Pe(this,"name",new U3(new q3));Pe(this,"root");Pe(this,"overNode",null);Pe(this,"viewMode",zn.Tree);Pe(this,"scrollPosition",null);Pe(this,"originData",null);var o;this.originRow=n,this.projectPageModel=i,this.root=t,this.name.baseValue=r,this.name.value=r,this.originData=((o=this.originRow)==null?void 0:o.data)||null,this.reset(),st(this,{},{autoBind:!0})}get touched(){return this.root.touched||this.name.touched}get isValid(){return this.root.isValid||this.name.isValid}get isComplexStructure(){return this.root.type===Le.Object?Object.values(this.root.value).some(t=>t.type===Le.Object||t.type===Le.Array):this.root.type===Le.Array?this.root.items.type===Le.Object||this.root.items.type===Le.Array:!1}get areThereForeignKeysBy(){var t,r;return!!((r=(t=this.projectPageModel)==null?void 0:t.rowRefsBy)!=null&&r.countForeignKeysBy)}setOverNode(t){this.overNode=t}setViewMode(t){this.viewMode=t}setScrollPosition(t){this.scrollPosition=t}reset(){this.originData&&(this.root.updateBaseValue(this.originData),this.name.value=this.name.baseValue)}save(){this.originData=this.root.getPlainValue(),this.root.updateBaseValue(this.originData),this.name.updateBaseValue(this.name.value)}}class X1e{constructor(t){Pe(this,"id","");Pe(this,"parent",null);Pe(this,"nodeId",nn());Pe(this,"type",Le.Array);Pe(this,"baseValue",[]);Pe(this,"value",[]);this.schema=t,st(this)}get $ref(){return this.schema.$ref}get touched(){return this.value!==this.baseValue?!0:this.value.some(t=>t.touched)}get isValid(){return this.value.every(t=>t.isValid)}get items(){return this.schema.items}getPlainValue(){return this.value.map(t=>t.getPlainValue())}createItem(){this.value===this.baseValue&&(this.value=this.baseValue.slice());const t=ym(this.schema.items);return this.value.push(t),t.parent=this,t.id=(this.value.length-1).toString(),t}removeItem(t){this.value===this.baseValue&&(this.value=this.baseValue.slice());const r=this.value[t];r.parent=null,r.id="",this.value.splice(t,1)}updateBaseValue(t){this.baseValue.length=0,t.forEach((n,i)=>{const o=ym(this.schema.items);o.parent=this,o.id=i.toString(),o.updateBaseValue(n),this.baseValue.push(o)}),this.value=this.baseValue}}class J1e{constructor(t){Pe(this,"id","");Pe(this,"parent",null);Pe(this,"nodeId",nn());Pe(this,"type",Le.Boolean);Pe(this,"baseValue",null);Pe(this,"value",null);this.schema=t,st(this)}get $ref(){return this.schema.$ref}get readOnly(){return this.schema.readOnly}get touched(){return this.baseValue!==this.value}get isValid(){return!0}getPlainValue(){return this.value??this.schema.default}setValue(t){this.value=t}updateBaseValue(t){this.baseValue=t,this.value=t}}class Z1e{constructor(t){Pe(this,"id","");Pe(this,"parent",null);Pe(this,"nodeId",nn());Pe(this,"type",Le.Number);Pe(this,"baseValue",null);Pe(this,"value",null);this.schema=t,st(this)}get $ref(){return this.schema.$ref}get readOnly(){return this.schema.readOnly}get touched(){return this.baseValue!==this.value}get isValid(){return!0}get default(){return this.schema.default}getPlainValue(){return this.value??this.default}setValue(t){this.value=t}updateBaseValue(t){this.baseValue=t,this.value=t}}class e_e{constructor(t){Pe(this,"id","");Pe(this,"parent",null);Pe(this,"nodeId",nn());Pe(this,"type",Le.Object);Pe(this,"value",{});this.schema=t,st(this),this.init()}get $ref(){return this.schema.$ref}get touched(){return Object.values(this.value).some(t=>t.touched)}get isValid(){return Object.values(this.value).every(t=>t.isValid)}getPlainValue(){return Object.entries(this.value).reduce((t,[r,n])=>(t[r]=n.getPlainValue(),t),{})}updateBaseValue(t){Object.entries(this.value).map(([r,n])=>{r in t&&n.updateBaseValue(t[r])})}init(){Object.entries(this.schema.properties).forEach(([t,r])=>{const n=ym(r);n.parent=this,n.id=t,this.value[t]=n})}}const ym=e=>{switch(e.type){case Le.Object:return new e_e(e);case Le.Array:return new X1e(e);case Le.String:return new U3(e);case Le.Number:return new Z1e(e);case Le.Boolean:return new J1e(e)}},W3=e=>{let t=e,r="";for(;t.parent;)t.parent.type===Le.Object?t.type===Le.Array?r=`${t.id}${r}`:r?r=`${t.id}.${r}`:r=t.id:t.parent.type===Le.Array&&(r&&t.type===Le.Array?r=`[${t.id}]${r}`:r?r=`[${t.id}].${r}`:r=`[${t.id}]`),t=t.parent;return r?`"${r}"`:""},t_e=Ne`
|
1409
|
-
mutation CreateRowMst($data: CreateRowInput!) {
|
1410
|
-
createRow(data: $data) {
|
1411
|
-
table {
|
1412
|
-
...TableMst
|
1413
|
-
}
|
1414
|
-
previousVersionTableId
|
1415
|
-
row {
|
1416
|
-
...RowMst
|
1417
|
-
}
|
1418
|
-
}
|
1419
|
-
}
|
1420
|
-
${is}
|
1421
|
-
${Ff}
|
1422
|
-
`,r_e=async e=>{const t=await xr.mutate({mutation:t_e,variables:e});if(!t.data)throw t.errors;return t.data};class n_e{constructor(t,r,n,i){this.rootStore=t,this.projectPageModel=r,this.branch=n,this.table=i}async execute(t,r){const{table:n,previousVersionTableId:i,row:o}=await this.createRowRequest(t,r),a=n.versionId!==i;return a&&this.updateTablesConnection(n),await this.refetchRowsConnection(),this.branch.touched||this.branch.updateTouched(!0),a&&this.projectPageModel.revalidateLoaders(),o}async createRowRequest(t,r){const n=await r_e({data:{revisionId:this.branch.draft.id,tableId:this.table.id,rowId:t,data:r}});return{table:this.addVersionedTableToCache(n.createRow.table),previousVersionTableId:n.createRow.previousVersionTableId,row:this.addRowToCache(n.createRow.row)}}addVersionedTableToCache(t){return this.addTableToCache(t)}addTableToCache(t){const r=this.rootStore.cache.addOrTable(Lf(t));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:this.table.id},r.versionId),r}addRowToCache(t){const r=this.rootStore.cache.addRow(tT(t));return this.rootStore.cache.addRowByVariables({revisionId:this.branch.draft.id,tableId:this.table.id,rowId:r.id},r.versionId),r}updateTablesConnection(t){const r=this.branch.draft,n=r.tablesConnection.edges.find(i=>i.node.id===t.id);n&&r.tablesConnection.replaceNode(n.cursor,t)}async refetchRowsConnection(){return this.rootStore.queryRows({revisionId:this.branch.draft.id,tableId:this.table.id,first:50})}}const i_e=Ne`
|
1423
|
-
mutation RenameRowMst($data: RenameRowInput!) {
|
1424
|
-
renameRow(data: $data) {
|
1425
|
-
table {
|
1426
|
-
...TableMst
|
1427
|
-
}
|
1428
|
-
previousVersionTableId
|
1429
|
-
row {
|
1430
|
-
...RowMst
|
1431
|
-
}
|
1432
|
-
previousVersionRowId
|
1433
|
-
}
|
1434
|
-
}
|
1435
|
-
${is}
|
1436
|
-
${Ff}
|
1437
|
-
`,o_e=async e=>{const t=await xr.mutate({mutation:i_e,variables:e});if(!t.data)throw t.errors;return t.data},a_e=Ne`
|
1438
|
-
mutation UpdateRowMst($data: UpdateRowInput!) {
|
1439
|
-
updateRow(data: $data) {
|
1440
|
-
table {
|
1441
|
-
...TableMst
|
1442
|
-
}
|
1443
|
-
previousVersionTableId
|
1444
|
-
row {
|
1445
|
-
...RowMst
|
1446
|
-
}
|
1447
|
-
previousVersionRowId
|
1448
|
-
}
|
1449
|
-
}
|
1450
|
-
${is}
|
1451
|
-
${Ff}
|
1452
|
-
`,s_e=async e=>{const t=await xr.mutate({mutation:a_e,variables:e});if(!t.data)throw t.errors;return t.data};class K3{constructor(t,r){this.rootStore=t,this.projectPageModel=r}get branch(){return this.projectPageModel.branchOrThrow}get table(){return this.projectPageModel.tableOrThrow}get row(){return this.projectPageModel.rowOrThrow}addVersionedTableToCache(t){return this.addTableToCache(t)}addTableToCache(t){const r=this.rootStore.cache.addOrTable(Lf(t));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:this.table.id},r.versionId),r}addVersionedRowToCache(t){return this.addRowToCache(t)}addRowToCache(t){const r=this.rootStore.cache.addRow(tT(t));return this.rootStore.cache.addRowByVariables({revisionId:this.branch.draft.id,tableId:this.table.id,rowId:r.id},r.versionId),r}updateTablesConnection(t){const r=this.branch.draft,n=r.tablesConnection.edges.find(i=>i.node.id===t.id);n&&r.tablesConnection.replaceNode(n.cursor,t)}updateRowsConnection(t,r){const n=t.rowsConnection.edges.find(i=>i.node.id===r.id);n&&t.rowsConnection.replaceNode(n.cursor,r)}}class l_e extends K3{constructor(t,r,n){super(t,r),this.store=n}async execute(){let t=!1,r=!1;if(this.row.id!==this.store.name.value&&(await this.renameRowRequest(),t=!0,r=!0),this.store.root.touched){const{wasCreatedNewVersionTable:n,wasCreatedNewVersionRow:i}=await this.updateRowProcess();t=t||n||i}return this.branch.touched||this.branch.updateTouched(!0),r&&this.branch.draft.tablesConnection.reset(),t&&this.projectPageModel.revalidateLoaders(),!0}async updateRowProcess(){const{table:t,previousVersionTableId:r,row:n,previousVersionRowId:i}=await this.updateRowRequest(this.store.root.getPlainValue()),o=t.versionId!==r;o&&this.updateTablesConnection(t);const a=n.versionId!==i;return a&&this.updateRowsConnection(t,n),{wasCreatedNewVersionTable:o,wasCreatedNewVersionRow:a}}async renameRowRequest(){const t=await o_e({data:{revisionId:this.branch.draft.id,tableId:this.table.id,rowId:this.row.id,nextRowId:this.store.name.getPlainValue()}});return{table:this.addVersionedTableToCache(t.renameRow.table),previousVersionTableId:t.renameRow.previousVersionTableId,row:this.addVersionedRowToCache(t.renameRow.row),previousVersionRowId:t.renameRow.previousVersionRowId}}async updateRowRequest(t){const r=await s_e({data:{revisionId:this.branch.draft.id,tableId:this.table.id,rowId:this.store.name.getPlainValue(),data:t}});return{table:this.addVersionedTableToCache(r.updateRow.table),previousVersionTableId:r.updateRow.previousVersionTableId,row:this.addVersionedRowToCache(r.updateRow.row),previousVersionRowId:r.updateRow.previousVersionRowId}}}class u_e extends K3{constructor(t,r,n,i){super(t,r),this.fileService=n,this.store=i}async execute(t,r){let n=!1;const{wasCreatedNewVersionTable:i,wasCreatedNewVersionRow:o}=await this.uploadFileProcess(t,r);return n=n||i||o,this.branch.touched||this.branch.updateTouched(!0),n&&this.projectPageModel.revalidateLoaders(),!0}async uploadFileProcess(t,r){const{table:n,previousVersionTableId:i,row:o,previousVersionRowId:a}=await this.uploadFileRequest(t,r),l=n.versionId!==i;l&&this.updateTablesConnection(n);const c=o.versionId!==a;return c&&this.updateRowsConnection(n,o),{wasCreatedNewVersionTable:l,wasCreatedNewVersionRow:c}}async uploadFileRequest(t,r){const n=await this.fileService.add({revisionId:this.branch.draft.id,tableId:this.table.id,rowId:this.store.name.getPlainValue(),fileId:t,file:r}),i=await this.rootStore.queryTable({data:{revisionId:this.branch.draft.id,tableId:this.table.id}}),o=await this.rootStore.queryRow({revisionId:this.branch.draft.id,tableId:this.table.id,rowId:this.row.id});if(!i||!o)throw new Error("Table or row not found");return{table:i,previousVersionTableId:n.previousVersionTableId,row:o,previousVersionRowId:n.previousVersionRowId}}}class HP{constructor(t,r){this.authService=t,this.environmentService=r}async add({revisionId:t,tableId:r,rowId:n,fileId:i,file:o}){const a=`${this.environmentService.get("REACT_APP_SWAGGER_SERVER_URL")}/revision/${t}/tables/${r}/rows/${n}/upload/${i}`;return(await this.upload(a,o)).json()}async upload(t,r){const n=new FormData;return n.append("file",r,r.name),fetch(t,{method:"POST",headers:{Authorization:`Bearer ${this.authService.token}`},body:n})}}dt.register(HP,()=>{const e=dt.get(qi),t=dt.get(Fb);return new HP(e,t)},{scope:"singleton"});var Rn=(e=>(e.List="List",e.CreatingRow="CreatingRow",e.ConnectingForeignKeyRow="ConnectingForeignKeyRow",e.UpdatingRow="UpdatingRow",e))(Rn||{});class G_{constructor(t,r,n,i){Pe(this,"id",nn());this.rootStore=t,this.projectPageModel=r,this.customTable=n,this.state=i,st(this,{},{autoBind:!0})}get table(){return this.customTable||this.projectPageModel.tableOrThrow}get schema(){return this.table.schema}get branch(){return this.projectPageModel.branchOrThrow}get isEditableRevision(){return this.projectPageModel.isEditableRevision}get currentForeignKeyPath(){return this.state.type==="ConnectingForeignKeyRow"?W3(this.state.foreignKeyNode):""}async createRow(t,r){try{return await new n_e(this.rootStore,this.projectPageModel,this.branch,this.table).execute(t,r)}catch(n){return console.error(n),null}}async updateRow(t){try{return await new l_e(this.rootStore,this.projectPageModel,t).execute()}catch(r){return console.error(r),!1}}async uploadFile(t,r,n){try{const i=dt.get(HP);return await new u_e(this.rootStore,this.projectPageModel,i,t).execute(r,n)}catch(i){return console.error(i),!1}}toList(){this.state={type:"List",isSelectingForeignKey:this.state.isSelectingForeignKey}}toConnectingForeignKeyRow(t){if(this.state.type==="CreatingRow"||this.state.type==="UpdatingRow")this.state={type:"ConnectingForeignKeyRow",previousType:this.state.type,isSelectingForeignKey:this.state.isSelectingForeignKey,store:this.state.store,foreignKeyNode:t};else throw new Error("Invalid state")}toCreatingRow(){const t=`${this.table.id.toLowerCase()}-${nn(9).toLowerCase()}`,r=this.state.type==="ConnectingForeignKeyRow"?this.state.store:new H3(ym(gm(this.schema)),t);this.state={type:"CreatingRow",isSelectingForeignKey:this.state.isSelectingForeignKey,store:r}}toUpdatingTableFromConnectingForeignKeyRow(){if(this.state.type!=="ConnectingForeignKeyRow")throw new Error("Invalid state");const t=this.state.store;this.state={type:"UpdatingRow",isSelectingForeignKey:this.state.isSelectingForeignKey,store:t}}init(){}dispose(){}updateStore(t){this.state.type==="UpdatingRow"&&(this.state.store=t)}}class c_e{constructor(t,r,n){Pe(this,"stack");Pe(this,"disposers",[]);this.rootStore=t,this.projectPageModel=r,this.stack=[new G_(this.rootStore,this.projectPageModel,null,{type:Rn.List,isSelectingForeignKey:!1})],n&&(this.stack=[new G_(this.rootStore,this.projectPageModel,null,{type:Rn.UpdatingRow,isSelectingForeignKey:!1,store:this.createStore()})]),st(this,{},{autoBind:!0})}async selectForeignKey(t,r){if(!r.foreignKey)throw new Error("Invalid foreign key");const n=await this.getFetchedTableWithRows(r.foreignKey);t.toConnectingForeignKeyRow(r),Hp(()=>{this.stack.push(new G_(this.rootStore,this.projectPageModel,n,{type:Rn.List,isSelectingForeignKey:!0}))})}cancelSelectingForeignKey(t){const r=this.stack.findIndex(n=>n===t);r!==-1&&this.stack.splice(r+1),t.state.type===Rn.ConnectingForeignKeyRow&&(t.state.previousType===Rn.CreatingRow?t.toCreatingRow():t.state.previousType===Rn.UpdatingRow&&t.toUpdatingTableFromConnectingForeignKeyRow())}onSelectedForeignKey(t,r){const n=this.stack.findIndex(o=>o===t),i=this.stack[n-1];i.state.type===Rn.ConnectingForeignKeyRow&&(i.state.foreignKeyNode.setValue(r),i.state.previousType===Rn.CreatingRow?i.toCreatingRow():i.state.previousType===Rn.UpdatingRow&&i.toUpdatingTableFromConnectingForeignKeyRow()),this.stack.splice(n)}updateStore(){this.stack[0].updateStore(this.createStore())}init(){this.disposers.push(Ya(()=>this.projectPageModel.row,()=>{this.updateStore()}))}dispose(){this.disposers.length=0}async getFetchedTableWithRows(t){const r={revisionId:this.projectPageModel.revisionOrThrow.id,tableId:t},n=this.rootStore.cache.getTableByVariables(r)||await ct.queryTable({data:r});if(!n)throw new Error(`Not found table ${t}`);return n.rowsConnection.countLoaded||await ct.queryRows({revisionId:this.projectPageModel.revisionOrThrow.id,tableId:n.id,first:50}),n}createStore(){const t=this.projectPageModel.tableOrThrow.schema;return new H3(ym(V3(t)?gm(t):new z3),this.projectPageModel.rowOrThrow.id,this.projectPageModel.rowOrThrow,this.projectPageModel)}}const d_e=e=>{const t=Zn(),[r]=O.useState(()=>new c_e(ct,t,e));return O.useEffect(()=>(r.init(),()=>r.dispose()),[r]),r},G3=O.createContext(null),f_e=()=>{const e=O.useContext(G3);if(!e)throw new Error("Invalid RowStackModelContext");return e},h_e=Ot(({onClick:e})=>{const t=Zn();return x.jsx(Af,{dataTestId:"create-row-button",isDisabled:!t.isEditableRevision,title:"Row",onClick:e})}),p_e="_Row_1lkxi_1",m_e="_RemoveRowButton_1lkxi_1",WP={Row:p_e,RemoveRowButton:m_e},v_e=({row:e,onSelect:t})=>{const r=O.useCallback(()=>{t==null||t(e.id)},[t,e.id]);return x.jsxs(je,{_hover:{backgroundColor:"gray.50"},alignItems:"center",className:WP.Row,gap:"4px",paddingLeft:"1rem",minHeight:"2.5rem",width:"100%",children:[x.jsx(je,{minWidth:"150px",children:x.jsx(bt,{textDecoration:"underline",cursor:"pointer",onClick:r,children:e.id})}),x.jsx(je,{alignItems:"center",justifyContent:"space-between",minHeight:"40px",width:"100%",minWidth:0,children:x.jsx(bt,{ml:"16px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:"gray.400",children:e.data})})]},e.versionId)},g_e=({tableId:e,connection:t})=>{const r=ou(),n=Tc(),i=O.useCallback(o=>{r(n.make({...n.getCurrentOptions(),tableId:e,rowId:o}),{state:{isBackToRow:!0}})},[n,r,e]);return x.jsxs(je,{flexDirection:"column",width:"100%",children:[x.jsxs(je,{minHeight:"40px",width:"100%",gap:"4px",children:[x.jsx(bt,{children:e}),x.jsxs(bt,{color:"gray.300",children:["(",t.totalCount,")"]})]}),x.jsx(pw,{useWindowScroll:!0,totalCount:t.totalCount,defaultItemHeight:40,increaseViewportBy:40*100,itemContent:o=>{const{node:a}=t.edges[o];if(a)return x.jsx(v_e,{row:{id:a.id,versionId:a.versionId,data:JSON.stringify(a.data,null,2).replaceAll("\\n","")},onSelect:i})}})]})},y_e=({row:e})=>{const t=O.useMemo(()=>[...e.rowForeignKeysByConnection.keys()].map(n=>({tableId:n,connection:e.rowForeignKeysByConnection.get(n)})).filter(n=>n.connection.totalCount),[e]);return x.jsx(je,{flexDirection:"column",width:"100%",gap:"40px",children:t.map(({tableId:r,connection:n})=>x.jsx(g_e,{tableId:r,connection:n},r))})},b_e=Ot(({store:e})=>x.jsx(je,{height:"40px",paddingBottom:"4px",alignItems:"flex-end",backgroundColor:"white",width:"100%",position:"sticky",bottom:0,justifyContent:"space-between",children:x.jsx(bt,{color:"gray",opacity:"0.4",children:e.isComplexStructure&&e.overNode&&W3(e.overNode)})})),TT=({readonly:e,store:t,onUpload:r,dataTestId:n})=>{const i=t.value.status.getPlainValue(),o=t.value.fileId.getPlainValue(),a=t.value.url.getPlainValue(),l=!e&&(i==="ready"||i==="uploaded"),c=async f=>{var m;const p=(m=f.target.files)==null?void 0:m[0];p&&(r==null||r(o,p))},d=O.useCallback(()=>{window.open(a,"_blank")},[a]);return x.jsxs(je,{children:[a&&x.jsx(Ci,{"data-testid":`${n}-open-file`,_hover:{backgroundColor:"gray.100"},"aria-label":"",height:"24px",icon:x.jsx(TB,{}),variant:"ghost",onClick:d}),l&&x.jsxs(x.Fragment,{children:[x.jsx("input",{type:"file",onChange:c,id:`file-${o}`,style:{display:"none"}}),x.jsx(Ci,{"data-testid":`${n}-upload-file`,as:"label",htmlFor:`file-${o}`,cursor:"pointer",_hover:{backgroundColor:"gray.100"},"aria-label":"",height:"24px",icon:x.jsx(Qce,{}),variant:"ghost"})]})]})},OT=Ot(({store:e,readonly:t,dataTestId:r})=>{const[n,i]=O.useState(e.getPlainValue().toString()),o=O.useCallback(l=>{i(l)},[]),a=O.useCallback(()=>{const l=n.toLowerCase()==="false"||n==="0"?!1:!!n;i(l.toString()),e.setValue(l)},[e,n]);return x.jsx(wt,{ml:"2px",pl:"4px",pr:"4px",height:"24px",minWidth:"15px",cursor:t?"not-allowed":void 0,children:t?e.getPlainValue().toString()??'""':x.jsx(gw,{dataTestId:r,initValue:n,onChange:o,onBlur:a})})}),Lu=({name:e,value:t,children:r,nameAndValueClassName:n,colorName:i,onOverLabel:o,onOutLabel:a})=>e===void 0&&t===void 0?x.jsx(je,{flexDirection:"column",width:"100%",children:r}):x.jsxs(je,{flexDirection:"column",flex:1,width:"100%",children:[x.jsxs(je,{gap:"4px",minHeight:"28px",alignItems:"flex-start",onMouseOver:o,onMouseOut:a,children:[x.jsx(je,{color:"gray.300",height:"28px",alignItems:"center",children:x.jsx(HE,{})}),e?x.jsxs(je,{className:n,flex:1,children:[x.jsxs(bt,{color:i,fontWeight:"300",children:[e,":"]}),x.jsx(je,{gap:"4px",flex:1,children:t})]}):x.jsxs(je,{className:n,children:[x.jsx(bt,{children:t}),x.jsx(wt,{children:":"})]})]}),r&&x.jsx(wt,{ml:"7px",pl:"18px",borderLeftWidth:1,borderLeftStyle:"solid",borderLeftColor:"white",_hover:{borderLeftColor:"blackAlpha.200"},children:r})]}),w_e=/^[.\d]+$/,RT=Ot(({store:e,readonly:t,dataTestId:r})=>{const n=O.useCallback(i=>{const o=parseFloat(i);isNaN(o)?e.setValue(e.default):e.setValue(o)},[e]);return x.jsx(wt,{ml:"2px",pl:"4px",pr:"4px",height:"24px",minWidth:"15px",cursor:t?"not-allowed":void 0,children:t?e.getPlainValue()??'""':x.jsx(gw,{dataTestId:r,initValue:e.getPlainValue().toString(),onChange:n,restrict:w_e})})});var bm=(e=>(e.Creating="Creating",e.Updating="Updating",e.Reading="Reading",e))(bm||{});const IT=O.createContext(null),xw=()=>{const e=O.useContext(IT);if(!e)throw new Error("Invalid RowEditorActions context");return e},S_e="_Field_1m0jh_1",__e="_SelectForeignKeyButton_1m0jh_4",Q_={Field:S_e,SelectForeignKeyButton:__e},iv=Ot(({store:e,readonly:t,dataTestId:r})=>{const n=Tc(),i=ou(),[o,a]=O.useState(!1),{onSelectForeignKey:l,mode:c}=xw(),d=O.useCallback(b=>{e.setValue(b)},[e]),f=O.useCallback(async()=>{a(!0),await l(e),a(!1)},[l,e]),p=O.useCallback(async()=>{i(n.make({...n.getCurrentOptions(),tableId:e.foreignKey,rowId:e.getPlainValue()}),{state:{isBackToRow:!0}})},[n,i,e]),m=e.foreignKey&&!t,g=e.foreignKey&&c!==bm.Creating&&e.getPlainValue();return x.jsxs(je,{className:Q_.Field,children:[x.jsx(wt,{ml:"2px",pl:"4px",pr:"4px",minHeight:"24px",minWidth:"15px",cursor:t?"not-allowed":void 0,children:t?`"${e.getPlainValue()}"`:x.jsx(gw,{dataTestId:r,prefix:'"',postfix:'"',initValue:e.getPlainValue(),onChange:d})}),g&&x.jsx(Ci,{"data-testid":`${r}-view-foreign-key`,_hover:{backgroundColor:"gray.100"},"aria-label":"",height:"24px",icon:x.jsx(TB,{}),variant:"ghost",onClick:p,className:Q_.SelectForeignKeyButton}),m&&x.jsx(Ci,{"data-testid":`${r}-select-foreign-key`,isLoading:o,_hover:{backgroundColor:"gray.100"},"aria-label":"",height:"24px",icon:x.jsx(OB,{}),variant:"ghost",onClick:f,className:Q_.SelectForeignKeyButton})]})}),x_e="_Field_2exvx_1",P_e="_Action_2exvx_4",aM={Field:x_e,Action:P_e},i0=Ot(({store:e,readonly:t,dataTestId:r})=>{const n=Object.entries(e.value),i=xw();return x.jsx(x.Fragment,{children:n.map(([o,a],l)=>{const c=`${r}-${l}`;return x.jsxs(Lu,{onOverLabel:()=>{i.onOverNode(a)},onOutLabel:()=>{i.onOverNode(null)},colorName:"gray.400",name:o,nameAndValueClassName:aM.Field,value:x.jsxs(x.Fragment,{children:[a.$ref===hc.File&&x.jsx(wt,{className:aM.Action,children:x.jsx(TT,{dataTestId:c,readonly:t,store:a,onUpload:i.onUploadFile})}),a.type===Le.String&&x.jsx(iv,{dataTestId:c,readonly:t||a.readOnly,store:a}),a.type===Le.Number&&x.jsx(RT,{dataTestId:c,readonly:t||a.readOnly,store:a}),a.type===Le.Boolean&&x.jsx(OT,{dataTestId:c,readonly:t||a.readOnly,store:a})]}),children:[a.type===Le.Object&&x.jsx(i0,{dataTestId:c,readonly:t,store:a}),a.type===Le.Array&&x.jsx(kT,{dataTestId:c,readonly:t,store:a})]},o)})})}),C_e="_Field_2exvx_1",E_e="_Action_2exvx_4",Y_={Field:C_e,Action:E_e},kT=Ot(({store:e,readonly:t,dataTestId:r})=>{const n=e.value,i=xw(),o=O.useCallback(()=>{e.createItem()},[e]);return x.jsxs(x.Fragment,{children:[n.map((a,l)=>{const c=`${r}-${l}`;return x.jsxs(Lu,{onOverLabel:()=>{i.onOverNode(a)},onOutLabel:()=>{i.onOverNode(null)},name:`[${l}]`,colorName:"gray.400",nameAndValueClassName:Y_.Field,value:x.jsxs(je,{children:[e.items.type===Le.String&&x.jsx(iv,{dataTestId:c,readonly:t||e.items.readOnly,store:a},l),e.items.type===Le.Number&&x.jsx(RT,{dataTestId:c,readonly:t||e.items.readOnly,store:a},l),e.items.type===Le.Boolean&&x.jsx(OT,{dataTestId:c,readonly:t||e.items.readOnly,store:a},l),!t&&x.jsx(O3,{dataTestId:`${c}-remove-button`,height:"26px","aria-label":"remove",color:"gray.200",_hover:{color:"gray.400"},className:Y_.Action,onClick:()=>{e.removeItem(l)}}),a.type===Le.Object&&a.$ref===hc.File&&x.jsx(wt,{className:Y_.Action,children:x.jsx(TT,{readonly:t,store:a,onUpload:i.onUploadFile})})]}),children:[e.items.type===Le.Object&&x.jsx(i0,{dataTestId:c,readonly:t,store:a},l),e.items.type===Le.Array&&x.jsx(kT,{dataTestId:c,readonly:t,store:a},l)]},a.nodeId)}),x.jsx(Af,{dataTestId:`${r}-create-button`,isDisabled:t,title:"Item",onClick:o})]})}),T_e="_Field_e8wxo_1",O_e="_Actions_e8wxo_4",sM={Field:T_e,Actions:O_e},R_e=Ot(({rootName:e,rootValue:t,isEdit:r,store:n})=>{const i="0",o=xw();return x.jsx(x.Fragment,{children:x.jsx(je,{flexDirection:"column",width:"100%",flex:1,marginBottom:"8rem",children:x.jsxs(Lu,{colorName:"gray.400",name:e,value:t,children:[n.root.type===Le.Object&&n.root.$ref===hc.File&&x.jsx(Lu,{colorName:"gray.400",name:"File",nameAndValueClassName:sM.Field,value:x.jsx(wt,{className:sM.Actions,children:x.jsx(TT,{readonly:!r,store:n.root,onUpload:o.onUploadFile})}),children:x.jsx(i0,{dataTestId:i,readonly:!r,store:n.root})}),n.root.type===Le.Object&&n.root.$ref!==hc.File&&x.jsx(i0,{dataTestId:i,readonly:!r,store:n.root}),n.root.type===Le.Array&&x.jsx(kT,{dataTestId:i,readonly:!r,store:n.root}),n.root.type===Le.String&&x.jsx(Lu,{colorName:"gray.400",name:"<root value>",value:x.jsx(iv,{dataTestId:i,readonly:!r||n.root.readOnly,store:n.root})}),n.root.type===Le.Number&&x.jsx(Lu,{colorName:"gray.400",name:"<root value>",value:x.jsx(RT,{dataTestId:i,readonly:!r||n.root.readOnly,store:n.root})}),n.root.type===Le.Boolean&&x.jsx(Lu,{colorName:"gray.400",name:"<root value>",value:x.jsx(OT,{dataTestId:i,readonly:!r||n.root.readOnly,store:n.root})})]})})})}),Q3=Ot(({store:e,rootName:t,rootValue:r,isEdit:n,actions:i})=>x.jsxs(je,{alignItems:"flex-start",flexDirection:"column",gap:"1rem",className:t0.Root,flex:1,"date-testid":"row-data-card",children:[x.jsxs(je,{justifyContent:"space-between",width:"100%",alignItems:"center",paddingBottom:"8px",children:[x.jsx(je,{minHeight:"40px",children:i}),x.jsx(wt,{className:t0.Actions,children:x.jsx(yT,{availableRefByMode:e.areThereForeignKeysBy,mode:e.viewMode||zn.Tree,onChange:e.setViewMode})})]}),e.viewMode===zn.Tree&&x.jsx(R_e,{rootValue:r,rootName:t,store:e,isEdit:n}),e.viewMode===zn.Json&&x.jsx(k3,{data:e.root.getPlainValue()}),e.viewMode===zn.RefBy&&e.originRow&&x.jsx(y_e,{row:e.originRow}),x.jsx(b_e,{store:e})]})),I_e=Ot(({store:e,onCancel:t,onAdd:r,onSelectForeignKey:n})=>{const[i,o]=O.useState(!1),a=O.useCallback(async()=>{o(!0),await r(),o(!1)},[r]);CV(()=>{e.scrollPosition&&(window.scrollTo(0,e.scrollPosition),e.setScrollPosition(null))});const l=O.useCallback(async c=>{e.setScrollPosition(window.scrollY),await n(c)},[n,e]);return x.jsx(IT.Provider,{value:{onSelectForeignKey:l,onOverNode:e.setOverNode,mode:bm.Creating},children:x.jsx(Q3,{store:e,rootName:"<id>",rootValue:x.jsx(iv,{dataTestId:"0",store:e.name}),actions:x.jsxs(x.Fragment,{children:[x.jsx(Z0,{dataTestId:"close-create-row-button",onClick:t}),x.jsx(Qm,{dataTestId:"approve-create-row-button",loading:i,onClick:a,isDisabled:!e.root.isValid})]}),isEdit:!0})})}),k_e=Ot(({store:e,isEdit:t,onUpdate:r,onSelectForeignKey:n,onUploadFile:i})=>{var g;const o=ou(),a=Rf(),[l,c]=O.useState(!1),d=O.useCallback(async()=>{c(!0),await r(),c(!1)},[r]),f=O.useCallback(()=>{e.reset()},[e]),p=O.useCallback(()=>{var b;(b=a.state)!=null&&b.isBackToRow?o(-1):o("..")},[(g=a.state)==null?void 0:g.isBackToRow,o]);CV(()=>{e.scrollPosition&&(window.scrollTo(0,e.scrollPosition),e.setScrollPosition(null))});const m=O.useCallback(async b=>{e.setScrollPosition(window.scrollY),await n(b)},[n,e]);return x.jsx(IT.Provider,{value:{onUploadFile:i,onSelectForeignKey:m,onOverNode:e.setOverNode,mode:t?bm.Updating:bm.Reading},children:x.jsx(Q3,{store:e,rootName:"<id>",rootValue:x.jsx(iv,{dataTestId:"0",store:e.name,readonly:!t}),actions:x.jsxs(x.Fragment,{children:[x.jsx(I3,{dataTestId:"back-to-row-list-button",onClick:p}),t&&x.jsx(Qm,{dataTestId:"row-editor-approve-button",isDisabled:!e.touched||!e.isValid,loading:l,onClick:d}),t&&e.touched&&x.jsx(j3,{dataTestId:"row-editor-revert-button",onClick:f})]}),isEdit:t})})}),j_e=Ne`
|
1453
|
-
mutation DeleteRowMst($data: RemoveRowInput!) {
|
1454
|
-
removeRow(data: $data) {
|
1455
|
-
branch {
|
1456
|
-
...BranchMst
|
1457
|
-
}
|
1458
|
-
table {
|
1459
|
-
...TableMst
|
1460
|
-
}
|
1461
|
-
previousVersionTableId
|
1462
|
-
}
|
1463
|
-
}
|
1464
|
-
${Qs}
|
1465
|
-
${is}
|
1466
|
-
`,$_e=async e=>{const t=await xr.mutate({mutation:j_e,variables:e});if(!t.data)throw t.errors;return t.data};class A_e{constructor(t,r){this.rootStore=t,this.projectPageModel=r}get branch(){return this.projectPageModel.branchOrThrow}get table(){return this.projectPageModel.tableOrThrow}async execute(t){const{table:r,previousVersionTableId:n,isBranchTouched:i}=await this.updateRowRequest(t),o=r&&n&&r.versionId!==n,a=!r;return o&&this.updateTablesConnection(r),o?await this.refetchRowsConnectionInDraftTable():(this.updateRowsConnectionInDraftTable(t),a&&await this.refetchDraftTables()),this.branch.updateTouched(i),o&&this.projectPageModel.revalidateLoaders(),!0}async updateRowRequest(t){var n,i;const r=await $_e({data:{revisionId:this.branch.draft.id,tableId:this.table.id,rowId:t}});return{table:this.addVersionedTableToCache((n=r.removeRow)==null?void 0:n.table),previousVersionTableId:(i=r.removeRow)==null?void 0:i.previousVersionTableId,isBranchTouched:r.removeRow.branch.touched}}addVersionedTableToCache(t){return t?this.addTableToCache(t):null}addTableToCache(t){const r=this.rootStore.cache.addOrTable(Lf(t));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:this.table.id},r.versionId),r}updateTablesConnection(t){const r=this.branch.draft,n=r.tablesConnection.edges.find(i=>i.node.id===t.id);n&&r.tablesConnection.replaceNode(n.cursor,t)}async refetchDraftTables(){return this.rootStore.queryTables({revisionId:this.branch.draft.id,first:50})}async refetchRowsConnectionInDraftTable(){return this.rootStore.queryRows({revisionId:this.branch.draft.id,tableId:this.table.id,first:50})}updateRowsConnectionInDraftTable(t){const r=this.rootStore.cache.getTableByVariables({revisionId:this.branch.draft.id,tableId:this.table.id}),n=r==null?void 0:r.rowsConnection.edges.find(i=>i.node.id===t);r==null||r.rowsConnection.removeEdge(n==null?void 0:n.cursor)}}class D_e{constructor(t,r,n){this.rootStore=t,this.projectPageModel=r,this.table=n,st(this,{},{autoBind:!0})}get totalCount(){return this.items.length}get hasNextPage(){return this.table.rowsConnection.availableNextPage}get isEdit(){return this.projectPageModel.isEditableRevision}get items(){return this.table.rowsConnection.edges.map(({node:t})=>({id:t.id,versionId:t.versionId,readonly:t.readonly,title:t.id,data:JSON.stringify(t.data,null,2).replaceAll("\\n",""),link:""}))}setTable(t){this.table=t}dispose(){}tryToFetchNextPage(){this.hasNextPage&&this.rootStore.queryRows({revisionId:this.revision.id,tableId:this.table.id,first:50,after:this.table.rowsConnection.endCursor||void 0})}async deleteRow(t){try{return await new A_e(this.rootStore,this.projectPageModel).execute(t)}catch(r){return console.error(r),!1}}init(){}get revision(){return this.projectPageModel.revisionOrThrow}}const M_e=e=>{const t=Zn(),[r]=O.useState(()=>new D_e(ct,t,e));return O.useEffect(()=>(r.init(),r.setTable(e),()=>r.dispose()),[r,e]),r},N_e=({rowId:e,onRemove:t,dataTestId:r})=>{const[n,i]=O.useState(!1),o=O.useCallback(async()=>{i(!0),await(t==null?void 0:t(e)),i(!1)},[e,t]);return x.jsx(Ci,{"data-testid":r,"aria-label":"",color:"gray.400",icon:x.jsx(J0,{}),isLoading:n,variant:"ghost",onClick:o})},F_e=({row:e,store:t,onSelect:r})=>{const n=O.useCallback(()=>{r==null||r(e.id)},[r,e.id]),i=!!r;return x.jsxs(je,{_hover:{backgroundColor:"gray.50"},alignItems:"center",className:WP.Row,gap:"4px",paddingLeft:"1rem",minHeight:"2.5rem",width:"100%","data-testid":`row-${e.id}`,children:[x.jsxs(je,{width:"150px",children:[r?x.jsx(bt,{maxWidth:"140px",textDecoration:"underline",cursor:"pointer",onClick:n,"data-testid":`row-${e.id}-select`,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:e.id}):x.jsx(qo,{to:`${e.id}`,"data-testid":`row-${e.id}-link`,children:x.jsx(bt,{maxWidth:"140px",color:"gray.400",textDecoration:"underline",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:e.id})}),!e.readonly&&t.isEdit&&x.jsx(bt,{color:"gray.400",children:"*"})]}),x.jsxs(je,{alignItems:"center",justifyContent:"space-between",minHeight:"40px",width:"100%",minWidth:0,children:[x.jsx(bt,{ml:"16px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:"gray.400",fontWeight:"300",children:e.data}),!i&&t.isEdit&&x.jsx(wt,{className:WP.RemoveRowButton,children:x.jsx(N_e,{rowId:e.id,onRemove:t.deleteRow,dataTestId:`remove-row-${e.id}`})})]})]},e.versionId)},L_e=Ot(({table:e,onSelect:t})=>{const r=M_e(e);return x.jsx(pw,{useWindowScroll:!0,totalCount:r.totalCount,defaultItemHeight:40,increaseViewportBy:40*100,endReached:r.hasNextPage?r.tryToFetchNextPage:void 0,itemContent:n=>{const i=r.items[n];if(i)return x.jsx(F_e,{row:i,store:r,onSelect:t})}})}),X_=({tableId:e})=>x.jsx(je,{width:"100%",borderStyle:"solid",borderTopWidth:1,borderColor:"gray.100",justifyContent:"center",color:"gray.400",fontWeight:"300",pt:"0.5rem",pb:"0.5rem",children:x.jsxs(wt,{backgroundColor:"gray.50",pl:"5px",pr:"5px",borderRadius:"5px",children:['Select or create a row in "',e,'" to be referenced by the above row']})}),B_e=({previousType:e,tableId:t,rowId:r,foreignKeyPath:n,onCancel:i})=>{const o=O.useMemo(()=>e===Rn.UpdatingRow?"updating":e===Rn.CreatingRow?"creating":"",[e]);return x.jsx(x.Fragment,{children:x.jsx(wt,{width:"100%",borderStyle:"solid",borderLeftWidth:2,borderColor:"gray.200",pl:"1rem",mb:"1rem",children:x.jsxs(je,{gap:"4px",alignItems:"center",height:"30px",mt:"2px",mb:"2px",color:"gray.400",fontWeight:"300",children:[x.jsx(bt,{textDecoration:"underline",cursor:"pointer",onClick:i,children:"Back"}),x.jsxs(bt,{children:["- ",o,' "',t," - ",r,'":']}),x.jsx(bt,{children:n})]})})})},V_e=Ot(()=>{const e=ou(),t=Tc(),{root:r,item:n}=f_e(),i=O.useCallback(async f=>{await r.selectForeignKey(n,f)},[n,r]),o=O.useCallback(()=>{r.cancelSelectingForeignKey(n)},[n,r]),a=O.useCallback(f=>{r.onSelectedForeignKey(n,f)},[n,r]),l=O.useCallback(async()=>{if(n.state.type===Rn.CreatingRow){const f=n.state.store,p=await n.createRow(f.name.getPlainValue(),f.root.getPlainValue());p&&(n.state.isSelectingForeignKey?r.onSelectedForeignKey(n,f.name.getPlainValue()):e(t.make({isDraft:!0,rowId:p.id})))}},[n,t,e,r]),c=O.useCallback(async()=>{if(n.state.type===Rn.UpdatingRow){const f=n.state.store;await n.updateRow(f)&&(f.save(),r.updateStore(),e(t.make({isDraft:!0,rowId:f.name.getPlainValue()})))}},[n,t,e,r]),d=O.useCallback(async(f,p)=>{if(n.state.type===Rn.UpdatingRow){const m=n.state.store;await n.uploadFile(m,f,p)&&(r.updateStore(),e(t.make({isDraft:!0,rowId:m.name.getPlainValue()})))}},[n,t,e,r]);if(n.state.type===Rn.ConnectingForeignKeyRow){const f=n.state.store;return x.jsx(x.Fragment,{children:x.jsx(B_e,{previousType:n.state.previousType,foreignKeyPath:n.currentForeignKeyPath,onCancel:o,tableId:n.table.id,rowId:f.name.getPlainValue()})})}return n.state.type===Rn.List?x.jsxs(x.Fragment,{children:[n.state.isSelectingForeignKey&&x.jsx(X_,{tableId:n.table.id}),x.jsx(h_e,{onClick:n.toCreatingRow}),x.jsx(wt,{paddingTop:"0.5rem",paddingBottom:"1rem",children:x.jsx(L_e,{table:n.table,onSelect:n.state.isSelectingForeignKey?a:void 0})})]}):n.state.type===Rn.CreatingRow?x.jsxs(x.Fragment,{children:[n.state.isSelectingForeignKey&&x.jsx(X_,{tableId:n.table.id}),x.jsx(I_e,{store:n.state.store,onAdd:l,onCancel:n.toList,onSelectForeignKey:i})]}):n.state.type===Rn.UpdatingRow?x.jsxs(x.Fragment,{children:[n.state.isSelectingForeignKey&&x.jsx(X_,{tableId:n.table.id}),x.jsx(k_e,{isEdit:n.isEditableRevision,store:n.state.store,onUpdate:c,onSelectForeignKey:i,onUploadFile:d})]}):null}),Y3=Ot(({startWithUpdating:e})=>{const t=d_e(e);return x.jsx(x.Fragment,{children:t.stack.map(r=>x.jsx(G3.Provider,{value:{root:t,item:r},children:x.jsx(V_e,{})},r.id))})}),z_e=Ot(()=>{const e=H1e();return e.isValidSchema?x.jsx(Y3,{startWithUpdating:!0}):x.jsx(fwe,{data:e.row.data})}),q_e=()=>x.jsx($f,{hideSidebar:!0,children:x.jsxs(je,{alignItems:"center",flexDirection:"column",justifyContent:"center",flex:1,gap:"8px",children:[x.jsx(bt,{color:"gray.400",children:"Check your email to confirm your account"}),x.jsx(Cf,{color:"gray.400",alignSelf:"center",as:qo,to:`/${xc}`,children:"Log in"})]})}),U_e=()=>null;class KP{constructor(t,r,n){Pe(this,"isLoading",!1);this.routerService=t,this.apiService=r,this.authService=n,st(this)}async login(t){t?(await this.loginRequest(t),await this.routerService.navigate("/")):console.error("Invalid code")}dispose(){}init(){}async loginRequest(t){this.setIsLoading(!0);try{const r=await this.apiService.client.loginGoogle({data:{code:t,redirectUrl:AV()}});return await this.authService.setToken(r.loginGoogle.accessToken),!0}catch(r){console.error(r)}finally{this.setIsLoading(!1)}}setIsLoading(t){this.isLoading=t}}dt.register(KP,()=>{const e=dt.get(Us),t=dt.get(es),r=dt.get(qi);return new KP(e,t,r)},{scope:"request"});const H_e=async({request:e})=>{const n=new URL(e.url).searchParams.get("code");if(!n)throw new Error("Invalid code");return await dt.get(KP).login(n),hf("/")};class GP{constructor(t,r,n){Pe(this,"isLoading",!1);Pe(this,"form",new GE({email:"",username:"",password:""}));this.routerService=t,this.apiService=r,this.configurationService=n,st(this)}get disableSubmitButton(){return!this.form.isValid}get availableEmailSignUp(){return this.configurationService.availableEmailSignUp}get availableOauth(){return this.configurationService.availableGoogleOauth}get availableGoogleOauth(){return this.configurationService.availableGoogleOauth}get availableGithubOauth(){return this.configurationService.availableGithubOauth}toGoogleOauth(){DV(this.configurationService.googleOauthClientId)}toGithubOauth(){$V(this.configurationService.githubOauthClientId)}async submit(){await this.signUp()&&await this.routerService.navigate(`/${Y0}/${yB}`)}dispose(){}init(){}async signUp(){this.setIsLoading(!0);try{return await this.apiService.client.signUp({data:this.form.values}),!0}finally{this.setIsLoading(!1)}}setIsLoading(t){this.isLoading=t}}dt.register(GP,()=>{const e=dt.get(Us),t=dt.get(es),r=dt.get(dc);return new GP(e,t,r)},{scope:"request"});const W_e=Ot(()=>{const e=Df(GP),t=O.useCallback(l=>{e.form.setValue("username",l.currentTarget.value)},[e.form]),r=O.useCallback(l=>{e.form.setValue("email",l.currentTarget.value)},[e.form]),n=O.useCallback(l=>{e.form.setValue("password",l.currentTarget.value)},[e.form]),i=O.useCallback(async()=>{await e.submit()},[e]),o=O.useCallback(()=>{e.toGithubOauth()},[e]),a=O.useCallback(()=>{e.toGoogleOauth()},[e]);return x.jsxs($f,{hideSidebar:!0,children:[x.jsxs(je,{width:"100%",gap:"8px",justifyContent:"flex-end",children:[x.jsx(bt,{color:"gray.300",children:"Already have an account?"}),x.jsx(Cf,{color:"gray.300",alignSelf:"center",as:qo,to:`/${xc}`,children:"Log in"})]}),x.jsx(je,{alignItems:"center",justifyContent:"center",flex:1,children:x.jsxs(je,{flexDirection:"column",width:"16rem",gap:"1rem",alignItems:"center",children:[e.availableOauth&&x.jsxs(x.Fragment,{children:[x.jsxs(je,{flexDirection:"column",gap:"2px",children:[e.availableGithubOauth&&x.jsx(ks,{icon:x.jsx(CB,{}),onClick:o,title:"Continue with Github"}),e.availableGoogleOauth&&x.jsx(ks,{icon:x.jsx(EB,{}),onClick:a,title:"Continue with Google"})]}),e.availableEmailSignUp&&x.jsxs(je,{width:"100%",alignItems:"center",gap:"16px",children:[x.jsx(wt,{backgroundColor:"gray.100",flex:1,height:"1px"}),x.jsx(bt,{color:"gray.300",fontSize:"12px",children:"OR"}),x.jsx(wt,{backgroundColor:"gray.100",flex:1,height:"1px"})]})]}),e.availableEmailSignUp&&x.jsxs(x.Fragment,{children:[x.jsx(js,{dataTestId:"signup-username-input",autoFocus:!0,height:"40px",placeholder:"enter your username",autoComplete:"new-password",value:e.form.values.username,onChange:t}),x.jsx(js,{dataTestId:"signup-email-input",height:"40px",placeholder:"enter your email",type:"email",autoComplete:"new-password",value:e.form.values.email,onChange:r}),x.jsx(js,{dataTestId:"signup-password-input",height:"40px",placeholder:"create a password",type:"password",autoComplete:"new-password",value:e.form.values.password,onChange:n,onEnter:i}),x.jsx(wt,{visibility:e.disableSubmitButton?"hidden":"visible",children:x.jsx(ks,{onClick:i,isDisabled:e.disableSubmitButton,isLoading:e.isLoading,title:"Sign up"})})]})]})})]})}),K_e=()=>x.jsx(Y3,{});class QP{constructor(t,r,n){Pe(this,"isLoading",!1);Pe(this,"form",new GE({username:""}));this.authService=t,this.apiService=r,this.routerService=n,st(this)}get disableSubmitButton(){return!this.form.isValid}async submit(){await this.request()&&(await this.authService.fetchMe(),await this.routerService.navigate(UE))}dispose(){}init(){}async request(){this.setIsLoading(!0);try{return await this.apiService.client.setUsername({data:{username:this.form.values.username}}),!0}catch(t){console.error(t)}finally{this.setIsLoading(!1)}}setIsLoading(t){this.isLoading=t}}dt.register(QP,()=>{const e=dt.get(qi),t=dt.get(es),r=dt.get(Us);return new QP(e,t,r)},{scope:"request"});const G_e=Ot(()=>{const e=Df(QP),t=O.useCallback(n=>{e.form.setValue("username",n.currentTarget.value)},[e.form]),r=O.useCallback(async()=>{await e.submit()},[e]);return x.jsx($f,{hideSidebar:!0,children:x.jsx(je,{alignItems:"center",justifyContent:"center",flex:1,children:x.jsxs(je,{flexDirection:"column",width:"16rem",gap:"1rem",alignItems:"center",children:[x.jsx(js,{dataTestId:"login-emailOrUsername-input",autoFocus:!0,height:"40px",placeholder:"set username",value:e.form.values.username,onChange:t,onEnter:r}),x.jsx(wt,{visibility:e.disableSubmitButton?"hidden":"visible",children:x.jsx(ks,{onClick:r,isLoading:e.isLoading,title:"Set username"})})]})})})}),Q_e=()=>{const e=wE(),t=O.useMemo(()=>(console.error(e),"Unexpected error"),[e]);return x.jsxs(je,{alignItems:"center",flex:1,gap:"1rem",justifyContent:"center",width:"100%",height:"100%",children:[x.jsx(WE,{color:"gray"}),x.jsx(bt,{color:"gray.400",children:t})]})},J_=()=>{const e=wE(),t=O.useMemo(()=>e instanceof xV?`Not found table "${e.message}" in this revision`:e instanceof sw?`Not found row "${e.message}" in this revision`:(console.error(e),"Unexpected error"),[e]);return x.jsxs(je,{alignItems:"center",flex:1,gap:"1rem",justifyContent:"center",width:"100%",children:[x.jsx(WE,{color:"gray"}),x.jsx(bt,{color:"gray.400",children:t})]})};function no(){return(no=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var Y_e=function(){};function X3(e,t){return Math.random()*(t-e+1)+e}function lM(e,t){return Math.floor(X3(e,t))}var X_e=O.forwardRef(function(e,t){var r=e.progress,n=e.height,i=n===void 0?2:n,o=e.className,a=o===void 0?"":o,l=e.color,c=l===void 0?"red":l,d=e.background,f=d===void 0?"transparent":d,p=e.onLoaderFinished,m=e.transitionTime,g=m===void 0?300:m,b=e.loaderSpeed,y=b===void 0?500:b,w=e.waitingTime,_=w===void 0?1e3:w,S=e.shadow,C=S===void 0||S,k=e.containerStyle,E=k===void 0?{}:k,R=e.style,T=R===void 0?{}:R,A=e.shadowStyle,M=A===void 0?{}:A,B=e.containerClassName,Q=B===void 0?"":B,se=O.useRef(!1),ie=O.useState(0),N=ie[0],X=ie[1],ce=O.useRef({active:!1,refreshRate:1e3}),ne=O.useState(!1),ee=ne[0],ge=ne[1],Z=O.useState({active:!1,value:20}),j=Z[0],U=Z[1],q={position:"fixed",top:0,left:0,height:i,background:f,zIndex:99999999999,width:"100%"},$={boxShadow:"0 0 10px "+c+", 0 0 10px "+c,width:"5%",opacity:1,position:"absolute",height:"100%",transition:"all "+y+"ms ease",transform:"rotate(3deg) translate(0px, -4px)",left:"-10rem"},F=O.useState({height:"100%",background:c,transition:"all "+y+"ms ease",width:"0%"}),V=F[0],de=F[1],pe=O.useState($),Ee=pe[0],Me=pe[1];O.useEffect(function(){return se.current=!0,function(){se.current=!1}},[]),O.useImperativeHandle(t,function(){return{continuousStart:function(he,Ce){if(Ce===void 0&&(Ce=1e3),!j.active)if(ee)console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!");else{var Ge=he||lM(10,20);ce.current={active:!0,refreshRate:Ce},X(Ge),Te(Ge)}},staticStart:function(he){if(!ce.current.active)if(ee)console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!");else{var Ce=he||lM(30,50);U({active:!0,value:Ce}),X(Ce),Te(Ce)}},complete:function(){ee?console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!"):(X(100),Te(100))}}}),O.useEffect(function(){de(no({},V,{background:c})),Me(no({},Ee,{boxShadow:"0 0 10px "+c+", 0 0 5px "+c}))},[c]),O.useEffect(function(){if(t){if(t&&r!==void 0)return void console.warn(`react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar! Please use only props or only ref methods! Ref methods will override props if "ref" property is available.`);Te(N),ge(!1)}else r&&Te(r),ge(!0)},[r]);var Y,K,we,Te=function he(Ce){Ce>=100?(de(no({},V,{width:"100%"})),C&&Me(no({},Ee,{left:Ce-10+"%"})),setTimeout(function(){se.current&&(de(no({},V,{opacity:0,width:"100%",transition:"all "+g+"ms ease-out",color:c})),setTimeout(function(){se.current&&(ce.current.active&&(ce.current=no({},ce.current,{active:!1}),X(0),he(0)),j.active&&(U(no({},j,{active:!1})),X(0),he(0)),p&&p(),X(0),he(0))},g))},_)):(de(function(Ge){return no({},Ge,{width:Ce+"%",opacity:1,transition:Ce>0?"all "+y+"ms ease":""})}),C&&Me(no({},Ee,{left:Ce-5.5+"%",transition:Ce>0?"all "+y+"ms ease":""})))};return Y=function(){var he=X3(Math.min(10,(100-N)/5),Math.min(20,(100-N)/3));N+he<95&&(X(N+he),Te(N+he))},K=ce.current.active?ce.current.refreshRate:null,we=O.useRef(Y_e),O.useEffect(function(){we.current=Y}),O.useEffect(function(){},[void 0]),O.useEffect(function(){if(K!==null&&K!==!1){var he=setInterval(function(){return we.current()},K);return function(){return clearInterval(he)}}},[K]),O.createElement("div",{className:Q,style:no({},q,E)},O.createElement("div",{className:a,style:no({},V,T)},C?O.createElement("div",{style:no({},Ee,M)}):null))});const J_e=(e=300)=>{const t=O.useRef(null),r=Pae();return O.useEffect(()=>{const n=t.current;let i=NaN,o=!1;return r.state==="loading"&&(i=setTimeout(()=>{o=!0,n==null||n.continuousStart()},e)),()=>{o&&(n==null||n.complete()),clearTimeout(i)}},[e,r.state]),t},Z_e=()=>{const e=J_e(150);return x.jsxs(x.Fragment,{children:[x.jsx(X_e,{ref:e,color:"#1fa3ff",height:1,waitingTime:500}),x.jsx(Ib,{})]})},Z_=({tableLoader:e,tableId:t,rowLoader:r,rowId:n})=>({path:wp,loader:e,id:t,children:[{index:!0,element:x.jsx(K_e,{})},{path:wB,loader:r,id:n,element:x.jsx(z_e,{})}]}),exe={path:Ll,element:x.jsx(Ib,{}),loader:RP(zb,Dpe),id:zr.Organization,children:[{path:Bl,element:x.jsx(Ib,{}),loader:RP(zb,Mpe),id:zr.Project,children:[{path:Vl,element:x.jsx(Ige,{}),loader:kpe,id:zr.Branch,children:[{loader:Fpe,id:zr.HeadRevision,errorElement:x.jsx(J_,{}),children:[{index:!0,element:x.jsx(L_,{})},Z_({tableLoader:Upe,tableId:zr.HeadTable,rowLoader:Vpe,rowId:zr.HeadRow})]},{path:X0,loader:Npe,id:zr.DraftRevision,errorElement:x.jsx(J_,{}),children:[{index:!0,element:x.jsx(L_,{})},Z_({tableLoader:qpe,tableId:zr.DraftTable,rowLoader:Bpe,rowId:zr.DraftRow})]},{path:bB,loader:Lpe,id:zr.SpecificRevision,errorElement:x.jsx(J_,{}),children:[{index:!0,element:x.jsx(L_,{})},Z_({tableLoader:Hpe,tableId:zr.SpecificTable,rowLoader:zpe,rowId:zr.SpecificRow})]}]}]}]},txe=[{path:"/",element:x.jsx(Z_e,{}),errorElement:x.jsx(Q_e,{}),children:[{index:!0,element:x.jsx(Rbe,{}),loader:RP(zb,Ape)},{path:mB,element:x.jsx(G_e,{})},{path:xc,loader:jpe,children:[{index:!0,element:x.jsx(Nge,{})},{path:gB,loader:H_e,element:x.jsx(U_e,{})},{path:vB,loader:$ge,element:x.jsx(jge,{})}]},{path:pB,element:x.jsx(Fge,{}),loader:zb},{path:Y0,loader:$pe,children:[{index:!0,element:x.jsx(W_e,{})},{path:yB,element:x.jsx(q_e,{})},{path:xce,element:x.jsx(kge,{})}]},{path:Fl,children:[exe]}]}];class Us{constructor(t){Pe(this,"_router",null);this.bootstrapService=t,this.init()}get router(){if(!this._router)throw new Error("Router not found");return this._router}navigate(...t){return this.router.navigate(...t)}init(){Ya(()=>this.bootstrapService.isLoaded,t=>{t&&(this._router=Mae(txe))})}}dt.register(Us,()=>{const e=dt.get(Lb);return new Us(e)},{scope:"singleton"});class YP{constructor(t,r){this.bootstrapService=t,this.routerService=r,st(this)}get isLoaded(){return this.bootstrapService.isLoaded}get router(){return this.routerService.router}async init(){}dispose(){}}dt.register(YP,()=>{const e=dt.get(Lb),t=dt.get(Us);return new YP(e,t)},{scope:"request"});const rxe=({children:e})=>x.jsx(bce,{client:xr,children:e}),nxe=Ot(()=>{const e=Df(YP);return!e.isLoaded||!e.router?x.jsxs(fj,{children:[x.jsx(LC,{w:"100%",h:"100%",children:x.jsx(Rm,{})}),x.jsx(C2,{})]}):x.jsx(rxe,{children:x.jsxs(fj,{children:[x.jsx(Hae,{router:e.router}),x.jsx(C2,{})]})})}),uM=document.getElementById("root");uM&&D6.createRoot(uM).render(x.jsx(O.StrictMode,{children:x.jsx(nxe,{})}));const ixe=`ver: ${Oy("PACKAGE_VERSION")} - ${Oy("GIT_BRANCH_NAME")}:${Oy("GIT_COMMIT_HASH")}`;console.info(ixe)});export default oxe();
|