react-luminus-components 1.3.80 → 1.3.81
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/README.md +349 -349
- package/dist/.vite/manifest.json +62 -62
- package/dist/{nivo-pie.es-CfGrs0qQ.js → Documents-CzClGlh6.js} +3822 -3820
- package/dist/{nivo-pie.es-CWpL5Qz1.cjs → Documents-mIwY2bxk.cjs} +5 -5
- package/dist/Loading-BIqRmexM.cjs +1 -0
- package/dist/{Loading-CBsJX4LG.js → Loading-x8qNuFvn.js} +1 -1
- package/dist/{SimpleTooltip-DwgjTb1C.js → SimpleTooltip-D8C4rVDt.js} +1 -1
- package/dist/SimpleTooltip-DRnGNt95.cjs +1 -0
- package/dist/components/common/Card/Card.d.ts +2 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +13 -13
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +11 -11
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +2 -2
- package/dist/main.es.js +2490 -2488
- package/dist/{searchUtils-6cFIcqrD.js → searchUtils-B6o7cy_z.js} +1 -1
- package/dist/searchUtils-g3EU5pX0.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/{useClipboard-BsBDyYHu.js → useClipboard-C486DVki.js} +1 -1
- package/dist/useClipboard-hmFG7eo3.cjs +1 -0
- package/dist/{useLocalStorageState-D9uh-D8S.js → useLocalStorageState-Bpqgro8I.js} +9 -9
- package/dist/useLocalStorageState-DWEObjgl.cjs +1 -0
- package/dist/{usePermissions-DInna_ZH.js → usePermissions-B1hOk-Cv.js} +1 -1
- package/dist/usePermissions-Dd6PAXto.cjs +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +20 -20
- package/dist/variables.scss +171 -171
- package/package.json +111 -111
- package/dist/Loading-If5qsvY2.cjs +0 -1
- package/dist/SimpleTooltip-dm9JzI9d.cjs +0 -1
- package/dist/searchUtils-eG-nNTgU.cjs +0 -1
- package/dist/useClipboard-BbFBkj-c.cjs +0 -1
- package/dist/useLocalStorageState-B8C3HlW-.cjs +0 -1
- package/dist/usePermissions-D3jEVB-f.cjs +0 -1
|
@@ -250,7 +250,7 @@ to {
|
|
|
250
250
|
*
|
|
251
251
|
* This source code is licensed under the MIT license found in the
|
|
252
252
|
* LICENSE file in the root directory of this source tree.
|
|
253
|
-
*/var jh;function T6(){return jh||(jh=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(O){return typeof O=="string"||typeof O=="function"||O===r||O===u||O===i||O===a||O===d||O===f||typeof O=="object"&&O!==null&&(O.$$typeof===g||O.$$typeof===m||O.$$typeof===s||O.$$typeof===o||O.$$typeof===l||O.$$typeof===h||O.$$typeof===w||O.$$typeof===x||O.$$typeof===v)}function T(O){if(typeof O=="object"&&O!==null){var ge=O.$$typeof;switch(ge){case t:var he=O.type;switch(he){case c:case u:case r:case i:case a:case d:return he;default:var ue=he&&he.$$typeof;switch(ue){case o:case l:case g:case m:case s:return ue;default:return ge}}case n:return ge}}}var _=c,S=u,$=o,D=s,I=t,M=l,k=r,Y=g,A=m,R=n,F=i,B=a,L=d,G=!1;function Z(O){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(O)||T(O)===c}function j(O){return T(O)===u}function U(O){return T(O)===o}function J(O){return T(O)===s}function te(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function K(O){return T(O)===l}function X(O){return T(O)===r}function V(O){return T(O)===g}function Q(O){return T(O)===m}function ee(O){return T(O)===n}function N(O){return T(O)===i}function W(O){return T(O)===a}function ne(O){return T(O)===d}Pe.AsyncMode=_,Pe.ConcurrentMode=S,Pe.ContextConsumer=$,Pe.ContextProvider=D,Pe.Element=I,Pe.ForwardRef=M,Pe.Fragment=k,Pe.Lazy=Y,Pe.Memo=A,Pe.Portal=R,Pe.Profiler=F,Pe.StrictMode=B,Pe.Suspense=L,Pe.isAsyncMode=Z,Pe.isConcurrentMode=j,Pe.isContextConsumer=U,Pe.isContextProvider=J,Pe.isElement=te,Pe.isForwardRef=K,Pe.isFragment=X,Pe.isLazy=V,Pe.isMemo=Q,Pe.isPortal=ee,Pe.isProfiler=N,Pe.isStrictMode=W,Pe.isSuspense=ne,Pe.isValidElementType=b,Pe.typeOf=T}()),Pe}process.env.NODE_ENV==="production"?hl.exports=w6():hl.exports=T6();var O6=hl.exports,Ug=O6,C6={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},E6={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},zg={};zg[Ug.ForwardRef]=C6;zg[Ug.Memo]=E6;function S6(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function Od(e,t){const n=p.useContext(x6);if(!n)throw new Error("Missing <CookiesProvider>");const a=Object.assign(Object.assign({},{doNotUpdate:!0}),t),[i,s]=p.useState(()=>n.getAll(a));S6()&&p.useLayoutEffect(()=>{function l(){const d=n.getAll(a);k6(e||null,d,i)&&s(d)}return n.addChangeListener(l),()=>{n.removeChangeListener(l)}},[n,i]);const o=p.useMemo(()=>n.set.bind(n),[n]),c=p.useMemo(()=>n.remove.bind(n),[n]),u=p.useMemo(()=>n.update.bind(n),[n]);return[i,o,c,u]}function k6(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}const R6=()=>{const{axiosOptions:e,cookieDomain:t}=p.useContext(Et),[,n,r]=Od(["Authorization"]),a=Be.create(e),i=p.useCallback(()=>localStorage.getItem("token")??null,[]),s=p.useCallback(()=>{const u=i();return u!==null&&u.length>0},[i]),o=p.useCallback(async(u,l)=>a.post("/user/login",{kid:u,password:l}).then(d=>(localStorage.setItem("token",d.data),n("Authorization",d.data,{path:"/",secure:!0,sameSite:"none",domain:t,expires:t1(new Date(Date.now()),24)}),d.data)).catch(d=>(console.log(d),null)),[a,n,t]),c=p.useCallback(()=>{localStorage.removeItem("token"),localStorage.removeItem("user"),r("Authorization")},[r]);return{isAuthenticated:s,login:o,logout:c,getToken:i}},A6=()=>{const[,,e]=Od(["Authorization"]),{msalScopes:t}=p.useContext(Sd),{instance:n,inProgress:r}=Af.useMsal(),a=Af.useIsAuthenticated(),i=p.useCallback(async()=>{var f;const l=n.getActiveAccount(),d=l??((f=n.getAllAccounts())==null?void 0:f.at(0))??void 0;return d?(l||n.setActiveAccount(d),n.acquireTokenSilent({scopes:t,account:d}).then(m=>m.accessToken).catch(m=>{if(console.error("Error acquiring token",m),m instanceof Rf.InteractionRequiredAuthError)return console.log("Silent token acquisition failed. Acquiring token using redirect"),n.acquireTokenRedirect({scopes:t}),null;throw m})):null},[n,t]),s=p.useCallback(()=>a,[a]),o=p.useCallback(()=>!s()&&r!==Rf.InteractionStatus.None,[s,r]),c=p.useCallback(async()=>n.loginRedirect({scopes:t}).then(()=>"").catch(()=>null),[n,t]),u=p.useCallback(()=>{n.logout(),localStorage.removeItem("user"),e("Authorization")},[e,n]);return{isAuthenticated:s,isAuthenticating:o,login:c,logout:u,getToken:i}},Bg=()=>{const{useMsal:e}=p.useContext(Sd),t=R6(),n=A6();return{isAuthenticated:e?n.isAuthenticated:t.isAuthenticated,isAuthenticating:e?n.isAuthenticating:()=>!1,getToken:e?n.getToken:t.getToken,login:e?n.login:t.login,logout:e?n.logout:t.logout}},M6="_toast_1s57i_1",ja={toast:M6},$6=e=>{switch(e){case"success":return 5e3;case"info":return 5e3;case"danger":return 1e4;case"warning":return 1e4;case"prompt":return 1e4;default:return 5e3}},Cd=()=>({addNotification:p.useCallback((t,n)=>{const r=jg(t),a=$6(n),i=y.jsxs(y.Fragment,{children:[r,y.jsx(J0,{onClick:()=>$r.dismiss(r),type:"button",style:{position:"absolute",fontSize:"12px",top:"calc(50% - 6px)",right:"8px"}})]});switch(n){case"success":{$r(i,{id:r,duration:a,position:"top-center",icon:y.jsx(ww,{size:12}),className:ae("luminus-toast-success rounded shadow bg-success",ja.toast)});break}case"danger":{$r(i,{id:r,duration:a,position:"top-center",icon:y.jsx(pw,{size:12}),className:ae("luminus-toast-danger rounded shadow bg-danger",ja.toast)});break}case"warning":{$r(i,{id:r,duration:a,position:"top-center",icon:y.jsx(uw,{size:12}),className:ae("luminus-toast-warning rounded shadow bg-warning",ja.toast)});break}case"info":{$r(i,{id:r,duration:a,position:"top-center",icon:y.jsx(fw,{size:12}),className:ae("luminus-toast-info rounded shadow bg-info",ja.toast)});break}case"prompt":{$r(i,{id:r,duration:a,position:"top-center",icon:y.jsx(hw,{size:12}),className:ae("luminus-toast-prompt rounded shadow bg-light",ja.toast)});break}}},[])}),j6=Be.CancelToken,Ho=e=>{const{authenticated:t=!0,differentBaseUrl:n,silent:r=!1,customToken:a,ignoreDelegation:i}={...e},{language:s,axiosOptions:o,texts:{axios:c}}=p.useContext(Et),{delegation:u}=p.useContext(tv),l=p.useMemo(()=>(u==null?void 0:u.id)??null,[u==null?void 0:u.id]),{addNotification:d}=Cd(),{getToken:f}=Bg(),m=p.useMemo(()=>Be.create(o),[o]),g=p.useCallback(async h=>{var w,x,b;if(t&&!h.headers.Authorization){const T=a??await f();if(!T)return Promise.reject(new Error("No bearer token"));h.headers.Authorization=`Bearer ${T}`}return l!==null&&!i&&(h.headers.DelegationId=l.toString()),(w=h.url)!=null&&w.includes("culture=")?h.url=(x=h.url)==null?void 0:x.replace(/culture=[a-z]{2}/,`culture=${s}`):h.url=`${h.url}${(b=h.url)!=null&&b.includes("?")?"&":"?"}culture=${s}`,h},[t,f,s,a,l,i]),v=p.useCallback(h=>{var b;if(console.log(h),Be.isCancel(h))return Promise.reject(h);const w=xd(h);if(w.length>0){const T=w.find(_=>_.name.toLowerCase()==="others");return T?(!r&&d(T.errors,"danger"),Promise.reject(h)):(!r&&d(c.validationError,"warning"),Promise.reject(h))}const x=$g(h);return x!==null?(!r&&d(`${c.permissionError}: ${wd(", ",...x)}`,"danger"),Promise.reject(h)):((b=h.response)==null?void 0:b.status)===403?(!r&&d(c.forbiddenError,"danger"),Promise.reject(h)):h.message&&h.message==="Network Error"?(!r&&d(c.networkError,"danger"),Promise.reject(h)):(Be.isCancel(h)||!r&&d(c.unexpectedError,"danger"),Promise.reject(h))},[d,c.forbiddenError,c.networkError,c.permissionError,c.unexpectedError,c.validationError,r]);return p.useEffect(()=>{n&&(m.defaults.baseURL=n),m.interceptors.request.clear(),m.interceptors.response.clear();const h=m.interceptors.request.use(g,x=>Promise.reject(x)),w=m.interceptors.response.use(x=>x,v);return()=>{m.interceptors.request.eject(h),m.interceptors.response.eject(w)}},[m.defaults,m.interceptors.request,m.interceptors.response,n,g,v]),m};let yu;const Wg=()=>{const{show:e,text:t,showConfirm:n,hideConfirm:r}=p.useContext(Q0),a=()=>{r()};return{confirm:async c=>(n(c),new Promise(u=>{yu=u})),onConfirm:()=>{a(),yu(!0)},onCancel:()=>{a(),yu(!1)},show:e,text:t}};var Se;(function(e){e.assertEqual=a=>a;function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const i={};for(const s of a)i[s]=s;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),s={};for(const o of i)s[o]=a[o];return e.objectValues(s)},e.objectValues=a=>e.objectKeys(a).map(function(i){return a[i]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const s in a)Object.prototype.hasOwnProperty.call(a,s)&&i.push(s);return i},e.find=(a,i)=>{for(const s of a)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function r(a,i=" | "){return a.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(Se||(Se={}));var pl;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(pl||(pl={}));const se=Se.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Mn=e=>{switch(typeof e){case"undefined":return se.undefined;case"string":return se.string;case"number":return isNaN(e)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;case"object":return Array.isArray(e)?se.array:e===null?se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?se.promise:typeof Map<"u"&&e instanceof Map?se.map:typeof Set<"u"&&e instanceof Set?se.set:typeof Date<"u"&&e instanceof Date?se.date:se.object;default:return se.unknown}},H=Se.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),P6=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Tt extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},a=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(a);else if(s.code==="invalid_return_type")a(s.returnTypeError);else if(s.code==="invalid_arguments")a(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let o=r,c=0;for(;c<s.path.length;){const u=s.path[c];c===s.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(n(s))):o[u]=o[u]||{_errors:[]},o=o[u],c++}}};return a(this),r}static assert(t){if(!(t instanceof Tt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Se.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Tt.create=e=>new Tt(e);const Jr=(e,t)=>{let n;switch(e.code){case H.invalid_type:e.received===se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case H.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Se.jsonStringifyReplacer)}`;break;case H.unrecognized_keys:n=`Unrecognized key(s) in object: ${Se.joinValues(e.keys,", ")}`;break;case H.invalid_union:n="Invalid input";break;case H.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Se.joinValues(e.options)}`;break;case H.invalid_enum_value:n=`Invalid enum value. Expected ${Se.joinValues(e.options)}, received '${e.received}'`;break;case H.invalid_arguments:n="Invalid function arguments";break;case H.invalid_return_type:n="Invalid function return type";break;case H.invalid_date:n="Invalid date";break;case H.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Se.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case H.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case H.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case H.custom:n="Invalid input";break;case H.invalid_intersection_types:n="Intersection results could not be merged";break;case H.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case H.not_finite:n="Number must be finite";break;default:n=t.defaultError,Se.assertNever(e)}return{message:n}};let qg=Jr;function I6(e){qg=e}function Xs(){return qg}const Js=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],s={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let o="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)o=u(s,{data:t,defaultError:o}).message;return{...a,path:i,message:o}},N6=[];function ie(e,t){const n=Xs(),r=Js({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Jr?void 0:Jr].filter(a=>!!a)});e.common.issues.push(r)}class at{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return me;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const i=await a.key,s=await a.value;r.push({key:i,value:s})}return at.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:i,value:s}=a;if(i.status==="aborted"||s.status==="aborted")return me;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||a.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),Dr=e=>({status:"dirty",value:e}),ut=e=>({status:"valid",value:e}),ml=e=>e.status==="aborted",gl=e=>e.status==="dirty",oi=e=>e.status==="valid",ci=e=>typeof Promise<"u"&&e instanceof Promise;function Qs(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Hg(e,t,n,r,a){if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ce||(ce={}));var Va,Ya;class Xt{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ph=(e,t)=>{if(oi(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Tt(e.common.issues);return this._error=n,this._error}}};function _e(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(s,o)=>{var c,u;const{message:l}=e;return s.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:(c=l??r)!==null&&c!==void 0?c:o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:(u=l??n)!==null&&u!==void 0?u:o.defaultError}},description:a}}class Te{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Mn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Mn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new at,ctx:{common:t.parent.common,data:t.data,parsedType:Mn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ci(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const a={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mn(t)},i=this._parseSync({data:t,path:a.path,parent:a});return Ph(a,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mn(t)},a=this._parse({data:t,path:r.path,parent:r}),i=await(ci(a)?a:Promise.resolve(a));return Ph(r,i)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,i)=>{const s=t(a),o=()=>i.addIssue({code:H.custom,...r(a)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new Lt({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Gt.create(this,this._def)}nullable(){return zn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Dt.create(this,this._def)}promise(){return ea.create(this,this._def)}or(t){return fi.create([this,t],this._def)}and(t){return hi.create(this,t,this._def)}transform(t){return new Lt({..._e(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new bi({..._e(this._def),innerType:this,defaultValue:n,typeName:pe.ZodDefault})}brand(){return new Ed({typeName:pe.ZodBranded,type:this,..._e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new yi({..._e(this._def),innerType:this,catchValue:n,typeName:pe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ui.create(this,t)}readonly(){return _i.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const D6=/^c[^\s-]{8,}$/i,F6=/^[0-9a-z]+$/,L6=/^[0-9A-HJKMNP-TV-Z]{26}$/,U6=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,z6=/^[a-z0-9_-]{21}$/i,B6=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,W6=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,q6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _u;const H6=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,V6=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Y6=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Vg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Z6=new RegExp(`^${Vg}$`);function Yg(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function G6(e){return new RegExp(`^${Yg(e)}$`)}function Zg(e){let t=`${Vg}T${Yg(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function K6(e,t){return!!((t==="v4"||!t)&&H6.test(e)||(t==="v6"||!t)&&V6.test(e))}class Pt extends Te{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==se.string){const i=this._getOrReturnCtx(t);return ie(i,{code:H.invalid_type,expected:se.string,received:i.parsedType}),me}const r=new at;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),ie(a,{code:H.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(a=this._getOrReturnCtx(t,a),ie(a,{code:H.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,o=t.data.length<i.value;(s||o)&&(a=this._getOrReturnCtx(t,a),s?ie(a,{code:H.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&ie(a,{code:H.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")W6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"email",code:H.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")_u||(_u=new RegExp(q6,"u")),_u.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"emoji",code:H.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")U6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"uuid",code:H.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")z6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"nanoid",code:H.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")D6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"cuid",code:H.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")F6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"cuid2",code:H.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")L6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"ulid",code:H.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),ie(a,{validation:"url",code:H.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"regex",code:H.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(t,a),ie(a,{code:H.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(a=this._getOrReturnCtx(t,a),ie(a,{code:H.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),ie(a,{code:H.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Zg(i).test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{code:H.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Z6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{code:H.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?G6(i).test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{code:H.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?B6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"duration",code:H.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?K6(t.data,i.version)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"ip",code:H.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Y6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"base64",code:H.invalid_string,message:i.message}),r.dirty()):Se.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:H.invalid_string,...ce.errToObj(r)})}_addCheck(t){return new Pt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ce.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ce.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ce.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ce.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ce.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ce.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ce.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ce.errToObj(n)})}nonempty(t){return this.min(1,ce.errToObj(t))}trim(){return new Pt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Pt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Pt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Pt.create=e=>{var t;return new Pt({checks:[],typeName:pe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};function X6(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,i=parseInt(e.toFixed(a).replace(".","")),s=parseInt(t.toFixed(a).replace(".",""));return i%s/Math.pow(10,a)}class Fn extends Te{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==se.number){const i=this._getOrReturnCtx(t);return ie(i,{code:H.invalid_type,expected:se.number,received:i.parsedType}),me}let r;const a=new at;for(const i of this._def.checks)i.kind==="int"?Se.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ie(r,{code:H.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ie(r,{code:H.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ie(r,{code:H.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?X6(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ie(r,{code:H.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ie(r,{code:H.not_finite,message:i.message}),a.dirty()):Se.assertNever(i);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,a){return new Fn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(a)}]})}_addCheck(t){return new Fn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Se.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Fn.create=e=>new Fn({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class Ln extends Te{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==se.bigint){const i=this._getOrReturnCtx(t);return ie(i,{code:H.invalid_type,expected:se.bigint,received:i.parsedType}),me}let r;const a=new at;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ie(r,{code:H.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ie(r,{code:H.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ie(r,{code:H.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):Se.assertNever(i);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,a){return new Ln({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(a)}]})}_addCheck(t){return new Ln({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ln.create=e=>{var t;return new Ln({checks:[],typeName:pe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};class ui extends Te{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==se.boolean){const r=this._getOrReturnCtx(t);return ie(r,{code:H.invalid_type,expected:se.boolean,received:r.parsedType}),me}return ut(t.data)}}ui.create=e=>new ui({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class hr extends Te{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==se.date){const i=this._getOrReturnCtx(t);return ie(i,{code:H.invalid_type,expected:se.date,received:i.parsedType}),me}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ie(i,{code:H.invalid_date}),me}const r=new at;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),ie(a,{code:H.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(a=this._getOrReturnCtx(t,a),ie(a,{code:H.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Se.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new hr({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ce.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}hr.create=e=>new hr({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,..._e(e)});class eo extends Te{_parse(t){if(this._getType(t)!==se.symbol){const r=this._getOrReturnCtx(t);return ie(r,{code:H.invalid_type,expected:se.symbol,received:r.parsedType}),me}return ut(t.data)}}eo.create=e=>new eo({typeName:pe.ZodSymbol,..._e(e)});class li extends Te{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return ie(r,{code:H.invalid_type,expected:se.undefined,received:r.parsedType}),me}return ut(t.data)}}li.create=e=>new li({typeName:pe.ZodUndefined,..._e(e)});class di extends Te{_parse(t){if(this._getType(t)!==se.null){const r=this._getOrReturnCtx(t);return ie(r,{code:H.invalid_type,expected:se.null,received:r.parsedType}),me}return ut(t.data)}}di.create=e=>new di({typeName:pe.ZodNull,..._e(e)});class Qr extends Te{constructor(){super(...arguments),this._any=!0}_parse(t){return ut(t.data)}}Qr.create=e=>new Qr({typeName:pe.ZodAny,..._e(e)});class cr extends Te{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ut(t.data)}}cr.create=e=>new cr({typeName:pe.ZodUnknown,..._e(e)});class vn extends Te{_parse(t){const n=this._getOrReturnCtx(t);return ie(n,{code:H.invalid_type,expected:se.never,received:n.parsedType}),me}}vn.create=e=>new vn({typeName:pe.ZodNever,..._e(e)});class to extends Te{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return ie(r,{code:H.invalid_type,expected:se.void,received:r.parsedType}),me}return ut(t.data)}}to.create=e=>new to({typeName:pe.ZodVoid,..._e(e)});class Dt extends Te{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==se.array)return ie(n,{code:H.invalid_type,expected:se.array,received:n.parsedType}),me;if(a.exactLength!==null){const s=n.data.length>a.exactLength.value,o=n.data.length<a.exactLength.value;(s||o)&&(ie(n,{code:s?H.too_big:H.too_small,minimum:o?a.exactLength.value:void 0,maximum:s?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(ie(n,{code:H.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(ie(n,{code:H.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,o)=>a.type._parseAsync(new Xt(n,s,n.path,o)))).then(s=>at.mergeArray(r,s));const i=[...n.data].map((s,o)=>a.type._parseSync(new Xt(n,s,n.path,o)));return at.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Dt({...this._def,minLength:{value:t,message:ce.toString(n)}})}max(t,n){return new Dt({...this._def,maxLength:{value:t,message:ce.toString(n)}})}length(t,n){return new Dt({...this._def,exactLength:{value:t,message:ce.toString(n)}})}nonempty(t){return this.min(1,t)}}Dt.create=(e,t)=>new Dt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,..._e(t)});function Nr(e){if(e instanceof qe){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Gt.create(Nr(r))}return new qe({...e._def,shape:()=>t})}else return e instanceof Dt?new Dt({...e._def,type:Nr(e.element)}):e instanceof Gt?Gt.create(Nr(e.unwrap())):e instanceof zn?zn.create(Nr(e.unwrap())):e instanceof Jt?Jt.create(e.items.map(t=>Nr(t))):e}class qe extends Te{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Se.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==se.object){const u=this._getOrReturnCtx(t);return ie(u,{code:H.invalid_type,expected:se.object,received:u.parsedType}),me}const{status:r,ctx:a}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof vn&&this._def.unknownKeys==="strip"))for(const u in a.data)s.includes(u)||o.push(u);const c=[];for(const u of s){const l=i[u],d=a.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Xt(a,d,a.path,u)),alwaysSet:u in a.data})}if(this._def.catchall instanceof vn){const u=this._def.unknownKeys;if(u==="passthrough")for(const l of o)c.push({key:{status:"valid",value:l},value:{status:"valid",value:a.data[l]}});else if(u==="strict")o.length>0&&(ie(a,{code:H.unrecognized_keys,keys:o}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const l of o){const d=a.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Xt(a,d,a.path,l)),alwaysSet:l in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const u=[];for(const l of c){const d=await l.key,f=await l.value;u.push({key:d,value:f,alwaysSet:l.alwaysSet})}return u}).then(u=>at.mergeObjectSync(r,u)):at.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return ce.errToObj,new qe({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var a,i,s,o;const c=(s=(i=(a=this._def).errorMap)===null||i===void 0?void 0:i.call(a,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(o=ce.errToObj(t).message)!==null&&o!==void 0?o:c}:{message:c}}}:{}})}strip(){return new qe({...this._def,unknownKeys:"strip"})}passthrough(){return new qe({...this._def,unknownKeys:"passthrough"})}extend(t){return new qe({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new qe({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new qe({...this._def,catchall:t})}pick(t){const n={};return Se.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new qe({...this._def,shape:()=>n})}omit(t){const n={};return Se.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new qe({...this._def,shape:()=>n})}deepPartial(){return Nr(this)}partial(t){const n={};return Se.objectKeys(this.shape).forEach(r=>{const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}),new qe({...this._def,shape:()=>n})}required(t){const n={};return Se.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Gt;)i=i._def.innerType;n[r]=i}}),new qe({...this._def,shape:()=>n})}keyof(){return Gg(Se.objectKeys(this.shape))}}qe.create=(e,t)=>new qe({shape:()=>e,unknownKeys:"strip",catchall:vn.create(),typeName:pe.ZodObject,..._e(t)});qe.strictCreate=(e,t)=>new qe({shape:()=>e,unknownKeys:"strict",catchall:vn.create(),typeName:pe.ZodObject,..._e(t)});qe.lazycreate=(e,t)=>new qe({shape:e,unknownKeys:"strip",catchall:vn.create(),typeName:pe.ZodObject,..._e(t)});class fi extends Te{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(i){for(const o of i)if(o.result.status==="valid")return o.result;for(const o of i)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const s=i.map(o=>new Tt(o.ctx.common.issues));return ie(n,{code:H.invalid_union,unionErrors:s}),me}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(a);{let i;const s=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},l=c._parseSync({data:n.data,path:n.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const o=s.map(c=>new Tt(c));return ie(n,{code:H.invalid_union,unionErrors:o}),me}}get options(){return this._def.options}}fi.create=(e,t)=>new fi({options:e,typeName:pe.ZodUnion,..._e(t)});const on=e=>e instanceof mi?on(e.schema):e instanceof Lt?on(e.innerType()):e instanceof gi?[e.value]:e instanceof Un?e.options:e instanceof vi?Se.objectValues(e.enum):e instanceof bi?on(e._def.innerType):e instanceof li?[void 0]:e instanceof di?[null]:e instanceof Gt?[void 0,...on(e.unwrap())]:e instanceof zn?[null,...on(e.unwrap())]:e instanceof Ed||e instanceof _i?on(e.unwrap()):e instanceof yi?on(e._def.innerType):[];class Vo extends Te{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.object)return ie(n,{code:H.invalid_type,expected:se.object,received:n.parsedType}),me;const r=this.discriminator,a=n.data[r],i=this.optionsMap.get(a);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ie(n,{code:H.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const a=new Map;for(const i of n){const s=on(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const o of s){if(a.has(o))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(o)}`);a.set(o,i)}}return new Vo({typeName:pe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a,..._e(r)})}}function vl(e,t){const n=Mn(e),r=Mn(t);if(e===t)return{valid:!0,data:e};if(n===se.object&&r===se.object){const a=Se.objectKeys(t),i=Se.objectKeys(e).filter(o=>a.indexOf(o)!==-1),s={...e,...t};for(const o of i){const c=vl(e[o],t[o]);if(!c.valid)return{valid:!1};s[o]=c.data}return{valid:!0,data:s}}else if(n===se.array&&r===se.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const s=e[i],o=t[i],c=vl(s,o);if(!c.valid)return{valid:!1};a.push(c.data)}return{valid:!0,data:a}}else return n===se.date&&r===se.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class hi extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(i,s)=>{if(ml(i)||ml(s))return me;const o=vl(i.value,s.value);return o.valid?((gl(i)||gl(s))&&n.dirty(),{status:n.value,value:o.data}):(ie(r,{code:H.invalid_intersection_types}),me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>a(i,s)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}hi.create=(e,t,n)=>new hi({left:e,right:t,typeName:pe.ZodIntersection,..._e(n)});class Jt extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.array)return ie(r,{code:H.invalid_type,expected:se.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return ie(r,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(ie(r,{code:H.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new Xt(r,s,r.path,o)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>at.mergeArray(n,s)):at.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Jt({...this._def,rest:t})}}Jt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jt({items:e,typeName:pe.ZodTuple,rest:null,..._e(t)})};class pi extends Te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.object)return ie(r,{code:H.invalid_type,expected:se.object,received:r.parsedType}),me;const a=[],i=this._def.keyType,s=this._def.valueType;for(const o in r.data)a.push({key:i._parse(new Xt(r,o,r.path,o)),value:s._parse(new Xt(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?at.mergeObjectAsync(n,a):at.mergeObjectSync(n,a)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Te?new pi({keyType:t,valueType:n,typeName:pe.ZodRecord,..._e(r)}):new pi({keyType:Pt.create(),valueType:t,typeName:pe.ZodRecord,..._e(n)})}}class no extends Te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.map)return ie(r,{code:H.invalid_type,expected:se.map,received:r.parsedType}),me;const a=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([o,c],u)=>({key:a._parse(new Xt(r,o,r.path,[u,"key"])),value:i._parse(new Xt(r,c,r.path,[u,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of s){const u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return me;(u.status==="dirty"||l.status==="dirty")&&n.dirty(),o.set(u.value,l.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const c of s){const u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return me;(u.status==="dirty"||l.status==="dirty")&&n.dirty(),o.set(u.value,l.value)}return{status:n.value,value:o}}}}no.create=(e,t,n)=>new no({valueType:t,keyType:e,typeName:pe.ZodMap,..._e(n)});class pr extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.set)return ie(r,{code:H.invalid_type,expected:se.set,received:r.parsedType}),me;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(ie(r,{code:H.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(ie(r,{code:H.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const i=this._def.valueType;function s(c){const u=new Set;for(const l of c){if(l.status==="aborted")return me;l.status==="dirty"&&n.dirty(),u.add(l.value)}return{status:n.value,value:u}}const o=[...r.data.values()].map((c,u)=>i._parse(new Xt(r,c,r.path,u)));return r.common.async?Promise.all(o).then(c=>s(c)):s(o)}min(t,n){return new pr({...this._def,minSize:{value:t,message:ce.toString(n)}})}max(t,n){return new pr({...this._def,maxSize:{value:t,message:ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}pr.create=(e,t)=>new pr({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,..._e(t)});class Ur extends Te{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.function)return ie(n,{code:H.invalid_type,expected:se.function,received:n.parsedType}),me;function r(o,c){return Js({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Xs(),Jr].filter(u=>!!u),issueData:{code:H.invalid_arguments,argumentsError:c}})}function a(o,c){return Js({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Xs(),Jr].filter(u=>!!u),issueData:{code:H.invalid_return_type,returnTypeError:c}})}const i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof ea){const o=this;return ut(async function(...c){const u=new Tt([]),l=await o._def.args.parseAsync(c,i).catch(m=>{throw u.addIssue(r(c,m)),u}),d=await Reflect.apply(s,this,l);return await o._def.returns._def.type.parseAsync(d,i).catch(m=>{throw u.addIssue(a(d,m)),u})})}else{const o=this;return ut(function(...c){const u=o._def.args.safeParse(c,i);if(!u.success)throw new Tt([r(c,u.error)]);const l=Reflect.apply(s,this,u.data),d=o._def.returns.safeParse(l,i);if(!d.success)throw new Tt([a(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ur({...this._def,args:Jt.create(t).rest(cr.create())})}returns(t){return new Ur({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ur({args:t||Jt.create([]).rest(cr.create()),returns:n||cr.create(),typeName:pe.ZodFunction,..._e(r)})}}class mi extends Te{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}mi.create=(e,t)=>new mi({getter:e,typeName:pe.ZodLazy,..._e(t)});class gi extends Te{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ie(n,{received:n.data,code:H.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}gi.create=(e,t)=>new gi({value:e,typeName:pe.ZodLiteral,..._e(t)});function Gg(e,t){return new Un({values:e,typeName:pe.ZodEnum,..._e(t)})}class Un extends Te{constructor(){super(...arguments),Va.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ie(n,{expected:Se.joinValues(r),received:n.parsedType,code:H.invalid_type}),me}if(Qs(this,Va)||Hg(this,Va,new Set(this._def.values)),!Qs(this,Va).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ie(n,{received:n.data,code:H.invalid_enum_value,options:r}),me}return ut(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Un.create(t,{...this._def,...n})}exclude(t,n=this._def){return Un.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Va=new WeakMap;Un.create=Gg;class vi extends Te{constructor(){super(...arguments),Ya.set(this,void 0)}_parse(t){const n=Se.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==se.string&&r.parsedType!==se.number){const a=Se.objectValues(n);return ie(r,{expected:Se.joinValues(a),received:r.parsedType,code:H.invalid_type}),me}if(Qs(this,Ya)||Hg(this,Ya,new Set(Se.getValidEnumValues(this._def.values))),!Qs(this,Ya).has(t.data)){const a=Se.objectValues(n);return ie(r,{received:r.data,code:H.invalid_enum_value,options:a}),me}return ut(t.data)}get enum(){return this._def.values}}Ya=new WeakMap;vi.create=(e,t)=>new vi({values:e,typeName:pe.ZodNativeEnum,..._e(t)});class ea extends Te{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.promise&&n.common.async===!1)return ie(n,{code:H.invalid_type,expected:se.promise,received:n.parsedType}),me;const r=n.parsedType===se.promise?n.data:Promise.resolve(n.data);return ut(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ea.create=(e,t)=>new ea({type:e,typeName:pe.ZodPromise,..._e(t)});class Lt extends Te{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:s=>{ie(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const s=a.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async o=>{if(n.value==="aborted")return me;const c=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return c.status==="aborted"?me:c.status==="dirty"||n.value==="dirty"?Dr(c.value):c});{if(n.value==="aborted")return me;const o=this._def.schema._parseSync({data:s,path:r.path,parent:r});return o.status==="aborted"?me:o.status==="dirty"||n.value==="dirty"?Dr(o.value):o}}if(a.type==="refinement"){const s=o=>{const c=a.refinement(o,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?me:(o.status==="dirty"&&n.dirty(),s(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?me:(o.status==="dirty"&&n.dirty(),s(o.value).then(()=>({status:n.value,value:o.value}))))}if(a.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!oi(s))return s;const o=a.transform(s.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>oi(s)?Promise.resolve(a.transform(s.value,i)).then(o=>({status:n.value,value:o})):s);Se.assertNever(a)}}Lt.create=(e,t,n)=>new Lt({schema:e,typeName:pe.ZodEffects,effect:t,..._e(n)});Lt.createWithPreprocess=(e,t,n)=>new Lt({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,..._e(n)});class Gt extends Te{_parse(t){return this._getType(t)===se.undefined?ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Gt.create=(e,t)=>new Gt({innerType:e,typeName:pe.ZodOptional,..._e(t)});class zn extends Te{_parse(t){return this._getType(t)===se.null?ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}zn.create=(e,t)=>new zn({innerType:e,typeName:pe.ZodNullable,..._e(t)});class bi extends Te{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}bi.create=(e,t)=>new bi({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,..._e(t)});class yi extends Te{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ci(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Tt(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Tt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}yi.create=(e,t)=>new yi({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,..._e(t)});class ro extends Te{_parse(t){if(this._getType(t)!==se.nan){const r=this._getOrReturnCtx(t);return ie(r,{code:H.invalid_type,expected:se.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}ro.create=e=>new ro({typeName:pe.ZodNaN,..._e(e)});const J6=Symbol("zod_brand");class Ed extends Te{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ui extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?me:i.status==="dirty"?(n.dirty(),Dr(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new Ui({in:t,out:n,typeName:pe.ZodPipeline})}}class _i extends Te{_parse(t){const n=this._def.innerType._parse(t),r=a=>(oi(a)&&(a.value=Object.freeze(a.value)),a);return ci(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}_i.create=(e,t)=>new _i({innerType:e,typeName:pe.ZodReadonly,..._e(t)});function Kg(e,t={},n){return e?Qr.create().superRefine((r,a)=>{var i,s;if(!e(r)){const o=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(s=(i=o.fatal)!==null&&i!==void 0?i:n)!==null&&s!==void 0?s:!0,u=typeof o=="string"?{message:o}:o;a.addIssue({code:"custom",...u,fatal:c})}}):Qr.create()}const Q6={object:qe.lazycreate};var pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pe||(pe={}));const e5=(e,t={message:`Input not instance of ${e.name}`})=>Kg(n=>n instanceof e,t),Xg=Pt.create,Jg=Fn.create,t5=ro.create,n5=Ln.create,Qg=ui.create,r5=hr.create,a5=eo.create,i5=li.create,s5=di.create,o5=Qr.create,c5=cr.create,u5=vn.create,l5=to.create,d5=Dt.create,f5=qe.create,h5=qe.strictCreate,p5=fi.create,m5=Vo.create,g5=hi.create,v5=Jt.create,b5=pi.create,y5=no.create,_5=pr.create,x5=Ur.create,w5=mi.create,T5=gi.create,O5=Un.create,C5=vi.create,E5=ea.create,Ih=Lt.create,S5=Gt.create,k5=zn.create,R5=Lt.createWithPreprocess,A5=Ui.create,M5=()=>Xg().optional(),$5=()=>Jg().optional(),j5=()=>Qg().optional(),P5={string:e=>Pt.create({...e,coerce:!0}),number:e=>Fn.create({...e,coerce:!0}),boolean:e=>ui.create({...e,coerce:!0}),bigint:e=>Ln.create({...e,coerce:!0}),date:e=>hr.create({...e,coerce:!0})},I5=me;var Qe=Object.freeze({__proto__:null,defaultErrorMap:Jr,setErrorMap:I6,getErrorMap:Xs,makeIssue:Js,EMPTY_PATH:N6,addIssueToContext:ie,ParseStatus:at,INVALID:me,DIRTY:Dr,OK:ut,isAborted:ml,isDirty:gl,isValid:oi,isAsync:ci,get util(){return Se},get objectUtil(){return pl},ZodParsedType:se,getParsedType:Mn,ZodType:Te,datetimeRegex:Zg,ZodString:Pt,ZodNumber:Fn,ZodBigInt:Ln,ZodBoolean:ui,ZodDate:hr,ZodSymbol:eo,ZodUndefined:li,ZodNull:di,ZodAny:Qr,ZodUnknown:cr,ZodNever:vn,ZodVoid:to,ZodArray:Dt,ZodObject:qe,ZodUnion:fi,ZodDiscriminatedUnion:Vo,ZodIntersection:hi,ZodTuple:Jt,ZodRecord:pi,ZodMap:no,ZodSet:pr,ZodFunction:Ur,ZodLazy:mi,ZodLiteral:gi,ZodEnum:Un,ZodNativeEnum:vi,ZodPromise:ea,ZodEffects:Lt,ZodTransformer:Lt,ZodOptional:Gt,ZodNullable:zn,ZodDefault:bi,ZodCatch:yi,ZodNaN:ro,BRAND:J6,ZodBranded:Ed,ZodPipeline:Ui,ZodReadonly:_i,custom:Kg,Schema:Te,ZodSchema:Te,late:Q6,get ZodFirstPartyTypeKind(){return pe},coerce:P5,any:o5,array:d5,bigint:n5,boolean:Qg,date:r5,discriminatedUnion:m5,effect:Ih,enum:O5,function:x5,instanceof:e5,intersection:g5,lazy:w5,literal:T5,map:y5,nan:t5,nativeEnum:C5,never:u5,null:s5,nullable:k5,number:Jg,object:f5,oboolean:j5,onumber:$5,optional:S5,ostring:M5,pipeline:A5,preprocess:R5,promise:E5,record:b5,set:_5,strictObject:h5,string:Xg,symbol:a5,transformer:Ih,tuple:v5,undefined:i5,union:p5,unknown:c5,void:l5,NEVER:I5,ZodIssueCode:H,quotelessJson:P6,ZodError:Tt});const Yo=()=>{const{texts:{formValidation:e}}=p.useContext(Et),t=p.useCallback(v=>(v!=null&&v.useCoerce?Qe.coerce:Qe).string({invalid_type_error:e.required,required_error:e.required}).transform(w=>w??null),[e.required]),n=p.useCallback(v=>t(v).nullable().optional().transform(h=>h??null),[t]),r=p.useCallback(v=>{const h=(v==null?void 0:v.min)??Number.MIN_SAFE_INTEGER,w=(v==null?void 0:v.max)??Number.MAX_SAFE_INTEGER,x=(v!=null&&v.useCoerce?Qe.coerce:Qe).number({invalid_type_error:e.required,required_error:e.required}).min(h,e.lessThanMin(h)).max(w,e.moreThanMax(w));return x.transform(b=>b??null),x},[e]),a=p.useCallback(v=>r(v).nullable().optional().transform(h=>h??null),[r]),i=p.useCallback(v=>(v!=null&&v.useCoerce?Qe.coerce:Qe).boolean({invalid_type_error:e.required,required_error:e.required}).transform(h=>h??null),[e.required]),s=p.useCallback(v=>(v!=null&&v.useCoerce?Qe.coerce:Qe).string({invalid_type_error:e.required,required_error:e.required}).refine(Ig,{message:e.invalidDate}).transform(w=>w??null),[e.invalidDate,e.required]),o=p.useCallback(v=>s(v).nullable().transform(h=>h??null),[s]),c=p.useCallback((v,h)=>Qe.enum(v,{invalid_type_error:e.required,required_error:e.required}).transform(x=>x??null),[e.required]),u=p.useCallback((v,h)=>c(v,h).nullable().transform(w=>w??null),[c]),l=p.useCallback(v=>Qe.object({id:a({useCoerce:!0})}).nullable().transform(w=>w??null),[a]),d=p.useCallback(v=>Qe.object({id:r()}).transform(w=>w??null),[r]),f=p.useCallback(v=>Qe.object({id:n({useCoerce:!0})}).nullable().transform(w=>w??null),[n]),m=p.useCallback(v=>Qe.object({id:t()}).transform(w=>w??null),[t]),g=p.useCallback(({required:v,multiple:h,maxFileSize:w})=>Qe.any().transform(b=>Array.from(b??[])).refine(b=>!v||(b==null?void 0:b.length)>0,"File is required.").refine(b=>h||(b==null?void 0:b.length)<=1,"Multiple files not allowed.").refine(b=>b.every(T=>T.size<=w),`Maximum file size is ${Wo(w)}.`).transform(b=>(h?b:b==null?void 0:b[0])??null),[]);return{zString:n,zStringRequired:t,zNumber:a,zNumberRequired:r,zBool:i,zDate:o,zDateRequired:s,zEnum:u,zEnumRequired:c,zObjectIdInt:l,zObjectIdIntRequired:d,zObjectIdStr:f,zObjectIdStrRequired:m,zFile:g}},ev=(e,t,n)=>p.useMemo(()=>n||e!=="date"&&e!=="datetime-local"||t?e:"text",[t,e,n]),Sd=p.createContext({useMsal:!1,msalInstance:null,msalScopes:[]}),tv=p.createContext({delegation:null,setDelegation:()=>{},availableDelegations:null,setAvailableDelegations:()=>{},refreshAvailableDelegations:async()=>{}}),N5="_button_1wjon_1",D5="_filled_1wjon_7",F5="_sm_1wjon_13",L5="_md_1wjon_18",U5="_lg_1wjon_23",jr={button:N5,filled:D5,sm:F5,md:L5,lg:U5},mr=({variant:e="filled",color:t="primary",size:n="md",className:r,children:a,...i})=>i.as==="link"?y.jsx(Vl.Link,{to:i.href??"/",className:ae(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,jr.button,jr[e],jr[n]),...i,children:a}):i.as==="button"||i.as===void 0?y.jsx("button",{type:"button",className:ae(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,jr.button,jr[e],jr[n]),...i,children:a}):null,z5="_button_1r3i0_1",bl={button:z5},kd=({color:e="primary",icon:t,className:n,children:r,...a})=>a.as==="link"?y.jsxs(Vl.Link,{to:a.href??"/",className:ae(`luminus-context-button btn text-${e} ${n??""}`,bl.button),...a,children:[t,r]}):a.as==="button"||a.as===void 0?y.jsxs("button",{type:"button",className:ae(`luminus-context-button btn text-${e} ${n??""}`,bl.button),...a,children:[t,r]}):null,B5="_icon-button_15e26_1",W5="_sm_15e26_14",q5="_md_15e26_23",H5="_lg_15e26_32",hs={"icon-button":"_icon-button_15e26_1",iconButton:B5,sm:W5,md:q5,lg:H5},Zo=({type:e="button",color:t="primary",size:n="md",children:r,className:a,...i})=>i.as==="link"?y.jsx(Vl.Link,{to:i.href??"/",className:ae(`luminus-icon-button btn text-${t} ${a??""}`,hs.iconButton,hs[n]),...i,children:r}):i.as==="button"||i.as===void 0?y.jsx("button",{type:e,className:ae(`luminus-icon-button btn text-${t} ${a??""}`,hs.iconButton,hs[n]),...i,children:r}):null,V5="_h1_14r4v_1",Y5="_h3_14r4v_8",Z5="_h6_14r4v_15",G5="_subtitle_14r4v_22",K5="_body_14r4v_29",X5="_body2_14r4v_36",J5="_caption_14r4v_43",Q5="_form-label_14r4v_50",En={h1:V5,h3:Y5,h6:Z5,subtitle:G5,body:K5,body2:X5,caption:J5,"form-label":"_form-label_14r4v_50",formLabel:Q5},eT=({variant:e,className:t,children:n})=>{switch(e){case"h1":return y.jsx("h1",{className:ae("luminus-text-primary luminus-h1",En.h1,t),children:n});case"h3":return y.jsx("h3",{className:ae("luminus-text luminus-h3",En.h3,t),children:n});case"h6":return y.jsx("h6",{className:ae("luminus-text luminus-h6",En.h6,t),children:n});case"subtitle":return y.jsx("div",{className:ae("luminus-text luminus-subtitle",En.subtitle,t),children:n});case"body":return y.jsx("div",{className:ae("luminus-text luminus-body",En.body,t),children:n});case"body2":return y.jsx("div",{className:ae("luminus-text luminus-body2",En.body2,t),children:n});case"caption":return y.jsx("div",{className:ae("luminus-text-muted luminus-caption",En.caption,t),children:n});case"form-label":return y.jsx("div",{className:ae("luminus-text luminus-form-label",En.formLabel,t),children:n});default:return y.jsx(y.Fragment,{children:n})}},nv=({variant:e,className:t,children:n})=>y.jsx(eT,{variant:e,className:t,children:n}),tT="_avatar-icon_1axl6_1",nT={"avatar-icon":"_avatar-icon_1axl6_1",avatarIcon:tT},rv=({name:e,fontSize:t,size:n})=>{const r=a=>{let i=0,s;for(s=0;s<a.length;s+=1)i=a.charCodeAt(s)+((i<<5)-i);let o="#";for(s=0;s<3;s+=1){const c=i>>s*8&255;o+=`00${c.toString(16)}`.slice(-2)}return o};return y.jsx(G0,{placement:"bottom",overlay:y.jsx(md,{children:e}),children:y.jsx("div",{className:ae("luminus-avatar-icon",nT.avatarIcon),style:{backgroundColor:r(e),fontSize:t??void 0,minHeight:n??void 0,height:n??void 0,maxHeight:n??void 0,minWidth:n??void 0,width:n??void 0,maxWidth:n??void 0},children:y.jsx("div",{children:`${e.split(" ")[0][0]}${e.split(" ")[1][0]}`})})})},rT="_floating-label_19xda_1",aT="_without-label_19xda_21",iT="_floating-label-check_19xda_184",xu={"floating-label":"_floating-label_19xda_1",floatingLabel:rT,"without-label":"_without-label_19xda_21",withoutLabel:aT,"floating-label-check":"_floating-label-check_19xda_184",floatingLabelCheck:iT},av=p.forwardRef(({hidden:e,children:t,className:n,isInvalid:r,isForRadioInput:a,inputContainerClassName:i,isForCheckInput:s,...o},c)=>s?y.jsx("div",{className:ae("luminus-floating-label-check",xu.floatingLabelCheck),children:t}):y.jsx(ud,{ref:c,label:o.withoutLabel?"":o.label,hidden:e??!1,className:ae(`luminus-floating-label ${n??""}`,xu.floatingLabel,{[i??""]:i},{[xu.withoutLabel]:o.withoutLabel}),children:t}));av.displayName="FloatingLabelInput";const sT="_row-label-input_13ci8_1",oT="_label_13ci8_4",cT="_input-container_13ci8_9",uT="_invalid-feedback_13ci8_101",lT="_keep-check-label_13ci8_129",dT="_is-invalid_13ci8_157",Pa={"row-label-input":"_row-label-input_13ci8_1",rowLabelInput:sT,label:oT,"input-container":"_input-container_13ci8_9",inputContainer:cT,"invalid-feedback":"_invalid-feedback_13ci8_101",invalidFeedback:uT,"keep-check-label":"_keep-check-label_13ci8_129",keepCheckLabel:lT,"is-invalid":"_is-invalid_13ci8_157",isInvalid:dT},zi=p.forwardRef(({hidden:e,children:t,className:n,isInvalid:r,isForRadioInput:a,isForTextAreaInput:i,inputContainerClassName:s,...o},c)=>y.jsxs("div",{ref:c,className:ae("luminus-row-label row gx-0 gy-0",{"is-invalid":r},{[Pa.isInvalid]:r},{[n??""]:n},{"d-none":e},Pa.rowLabelInput),children:[!o.withoutLabel&&y.jsx("label",{className:ae("label col-6",{"col-12":i},Pa.label),children:y.jsx(nv,{variant:"form-label",className:r?"text-danger":"",children:o.label})}),y.jsx("div",{className:ae("input-container",Pa.inputContainer,{"col-6":!o.withoutLabel&&!i},{"col-12":o.withoutLabel||i},{[Pa.keepCheckLabel]:a},{[s??""]:s}),children:t})]}));zi.displayName="RowLabelInput";const iv=p.forwardRef(({children:e,className:t,hidden:n},r)=>y.jsx("div",{ref:r,className:`${n?"d-none":""} ${t}`,children:e}));iv.displayName="NoInputContainer";function fT(e){return Re({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function hT(e){return Re({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function pT(e){return Re({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function mT(e){return Re({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z"},child:[]}]})(e)}const Rd=({InputContainer:e=zi,formField:t,label:n,resetsFields:r,options:a,isNumber:i,size:s,showClearIcon:o,clearValue:c,noSortOptions:u,required:l,hidden:d,disabled:f,withoutLabel:m,className:g})=>{const{register:v,formState:h,getValues:w,setValue:x,watch:b}=nt.useFormContext(),[T,_]=p.useState(void 0),[S,$]=p.useState(!1),D=p.useMemo(()=>a.sort((k,Y)=>u?0:(k.name??"").localeCompare(Y.name??"")),[a,u]),I=p.useCallback(()=>{const k=c??null;i?x(t,k===null?null:Number(k),{shouldDirty:!0,shouldValidate:S}):x(t,(k==null?void 0:k.toString())??"",{shouldDirty:!0,shouldValidate:S})},[c,i,x,t,S]);p.useEffect(()=>{const k=t.split(".");let Y=h.errors;k.forEach(A=>{Y!==void 0&&(Y=Y[A])}),_(Y)},[h,t]),p.useEffect(()=>{x(t,w(t))},[D,t,w,x]),p.useEffect(()=>{h.isSubmitted&&$(!0)},[h]);const M=T!==void 0;return y.jsx(y.Fragment,{children:y.jsxs(e,{label:`${n}${l?" *":""}`,hidden:d,withoutLabel:m,isInvalid:M,className:g,children:[y.jsxs(xr.Select,{size:s,...v(t,{setValueAs:k=>i?k==null||k===""?null:parseInt(k,10):k==null||k===""?null:k,onChange:()=>{r&&r.forEach(k=>x(k,null,{shouldDirty:!0,shouldValidate:S}))}}),isInvalid:M,hidden:d,disabled:f,className:"w-100",children:[y.jsx("option",{value:""}),D.map(k=>y.jsx("option",{value:k.id??"",children:k.name},k.id))]}),o&&b(t)&&y.jsx("div",{className:"luminus-input-remove-icon inset",children:y.jsx(Zo,{color:"secondary",size:"sm",onClick:I,children:y.jsx(Io,{})})}),T&&y.jsx(Go,{message:T.message})]})})},Ad=({InputContainer:e=zi,formField:t,label:n,resetsFields:r,size:a,showClearIcon:i,clearValue:s,required:o,hidden:c,disabled:u,rows:l,withoutLabel:d,customFormControlProps:f,className:m})=>{const{register:g,formState:v,setValue:h,watch:w}=nt.useFormContext(),[x,b]=p.useState(void 0),[T,_]=p.useState(!1),S=p.useCallback(()=>{const I=s??null;h(t,(I==null?void 0:I.toString())??"",{shouldDirty:!0,shouldValidate:T})},[s,h,t,T]),$=p.useCallback(()=>{const I=t.split(".");let M=v.errors;I.forEach(k=>{M!==void 0&&(M=M[k])}),b(M)},[v,t]);p.useEffect(()=>{$()},[$]),p.useEffect(()=>{v.isSubmitted&&_(!0)},[v]);const D=x!==void 0;return y.jsxs(e,{label:`${n}${o?" *":""}`,hidden:c,withoutLabel:d,isInvalid:D,className:m,isForTextAreaInput:!0,children:[y.jsx(xr.Control,{as:"textarea",size:a,...g(t,{setValueAs:I=>I==null||I===""?null:I,onChange:()=>{r&&r.forEach(I=>h(I,null,{shouldDirty:!0,shouldValidate:T}))}}),isInvalid:D,hidden:c,disabled:u,rows:l??2,className:"w-100",...f}),i&&w(t)&&y.jsx("div",{className:"luminus-input-remove-icon",children:y.jsx(Zo,{color:"secondary",size:"sm",onClick:S,children:y.jsx(Io,{})})}),x&&y.jsx(Go,{message:x.message})]})},xi=({InputContainer:e=zi,type:t,formField:n,label:r,placeholder:a,size:i,resetsFields:s,showClearIcon:o,clearValue:c,required:u,hidden:l,disabled:d,withoutLabel:f,list:m,step:g,CustomOnChangeComponent:v,noSelectOnFocus:h,className:w})=>{const{register:x,formState:b,setValue:T,watch:_}=nt.useFormContext(),[S,$]=p.useState(void 0),[D,I]=p.useState(!1),M=p.useCallback(()=>{const L=c??null;t==="number"?T(n,L!==null?Number(L):null,{shouldDirty:!0,shouldValidate:D}):T(n,(L==null?void 0:L.toString())??"",{shouldDirty:!0,shouldValidate:D})},[c,t,T,n,D]),k=p.useCallback(()=>{const L=n.split(".");let G=b.errors;L.forEach(Z=>{G!==void 0&&(G=G[Z])}),$(G)},[b,n]);p.useEffect(()=>{k()},[k]),p.useEffect(()=>{b.isSubmitted&&I(!0)},[b]);const Y=S!==void 0,[A,R]=p.useState(!1),F=_(n),B=ev(t,F??null,A);return y.jsxs(e,{label:`${r}${u?" *":""}`,hidden:l,withoutLabel:f,isInvalid:Y,className:w,children:[y.jsxs("div",{className:"luminus-input-container position-relative w-100",children:[y.jsx(xr.Control,{type:B,placeholder:a??r,size:i,onFocus:L=>{R(!0),!h&&L.target.select()},...x(n,{setValueAs:L=>t==="number"?L==null||L===""?null:Number(L):L==null||L===""?null:L,onChange:()=>{s&&s.forEach(L=>T(L,null,{shouldDirty:!0,shouldValidate:D}))},onBlur:()=>R(!1)}),isInvalid:Y,hidden:l,disabled:d,list:m,className:"w-100",step:g}),v&&y.jsx("div",{className:"custom-picker-button",children:v})]}),o&&_(n)&&y.jsx("div",{className:`luminus-input-remove-icon ${t!=="text"?"inset":""}`,children:y.jsx(Zo,{color:"secondary",size:"sm",onClick:M,children:y.jsx(Io,{})})}),S&&y.jsx(Go,{message:S.message})]})},gT="_button_qhwih_1",vT={button:gT},bT=p.forwardRef(({color:e="primary",icon:t=y.jsx(Ow,{size:21}),text:n,onClick:r,className:a,children:i,...s},o)=>y.jsxs("button",{type:"button",ref:o,onClick:c=>{c.preventDefault(),r(c)},"aria-label":"dropdown toggle",className:ae(`btn luminus-context-button text-${e} ${a??""}`,vT.button),...s,children:[t,n]})),yT=p.forwardRef(({userName:e,onClick:t,children:n},r)=>y.jsxs("button",{type:"button",ref:r,onClick:a=>{a.preventDefault(),t(a)},"aria-label":"User avatar toggle",className:"m-0 p-0",style:{backgroundColor:"transparent",border:"none",cursor:"pointer"},children:[y.jsx(rv,{name:e}),n]})),_T="_wrapper_1j6w2_1",xT="_controls_1j6w2_16",wT="_explorerWindow_1j6w2_20",TT="_folderList_1j6w2_28",OT="_fileList_1j6w2_35",CT="_dndText_1j6w2_61",Gn={wrapper:_T,controls:xT,explorerWindow:wT,folderList:TT,fileList:OT,dndText:CT},it=p.createContext({apiActions:{},loadDocuments(){throw new Error("DocumentsContext was not initialized.")},reducer:[{},{}],entityType:"",entityId:-1}),ET="_folderIcon_nez54_1",ST="_defaultFolder_nez54_6",Nh={folderIcon:ET,defaultFolder:ST},sv=({isActive:e,isDefault:t,folderName:n})=>{const{ProjectIconComponent:r}=p.useContext(Et);return y.jsxs(y.Fragment,{children:[y.jsx(r,{icon:`folder${e?"-filled":""}`,className:ae("d-inline-block",t?Nh.defaultFolder:"text-primary"),iconProps:{className:Nh.folderIcon}}),y.jsx("span",{className:e?"fw-bold":"",children:n})," "]})},kT=({customText:e})=>{const{reducer:[t,n]}=p.useContext(it),r=p.useCallback(()=>{n({type:"select-folder",folderId:"root"})},[n]);return y.jsx("li",{children:y.jsx("button",{onClick:r,type:"button",className:ae("border-0 bg-transparent"),children:y.jsx(sv,{folderName:e??"root",isActive:t.activeFolder==="root",isDefault:!0})})})};function RT(e){if(e.state!=="openned-modal")throw new Error('Not in "openned-modal" state!')}const ov=()=>{const e=Ho(),{startLoading:t,stopLoading:n}=p.useContext(Do),{reducer:[,r]}=p.useContext(it),a=p.useCallback(async(s,o)=>{t("documents-renameFolder");try{await e.put("/documents/folder/rename",{folderId:s,name:o}),r({type:"update-folders",folderIds:[s],newProperties:{name:o}})}finally{n("documents-renameFolder")}},[e,r,t,n]),i=p.useCallback(async s=>{t("documentsFolderCreate");try{const o=await e.post("/documents/folder",s);r({type:"create-folder",folderData:s,folderId:o.data.id,isOnlyRead:o.data.onlyRead})}finally{n("documentsFolderCreate")}},[e,r,t,n]);return{renameFolder:a,createFolder:i}},Dh=(e,t,n)=>{if(e&&"reportValidity"in e){const r=nt.get(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},cv=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Dh(r.ref,n,e):r.refs&&r.refs.forEach(a=>Dh(a,n,e))}},AT=(e,t)=>{t.shouldUseNativeValidation&&cv(e,t);const n={};for(const r in e){const a=nt.get(t.fields,r),i=Object.assign(e[r]||{},{ref:a&&a.ref});if(MT(t.names||Object.keys(e),r)){const s=Object.assign({},nt.get(n,r));nt.set(s,"root",i),nt.set(n,r,s)}else nt.set(n,r,i)}return n},MT=(e,t)=>e.some(n=>n.startsWith(t+"."));var $T=function(e,t){for(var n={};e.length;){var r=e[0],a=r.code,i=r.message,s=r.path.join(".");if(!n[s])if("unionErrors"in r){var o=r.unionErrors[0].errors[0];n[s]={message:o.message,type:o.code}}else n[s]={message:i,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(l){return l.errors.forEach(function(d){return e.push(d)})}),t){var c=n[s].types,u=c&&c[r.code];n[s]=nt.appendErrors(s,t,n,a,u?[].concat(u,r.message):r.message)}e.shift()}return n},Md=function(e,t,n){return n===void 0&&(n={}),function(r,a,i){try{return Promise.resolve(function(s,o){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return i.shouldUseNativeValidation&&cv({},i),{errors:{},values:n.raw?r:u}})}catch(u){return o(u)}return c&&c.then?c.then(void 0,o):c}(0,function(s){if(function(o){return Array.isArray(o==null?void 0:o.errors)}(s))return{values:{},errors:AT($T(s.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw s}))}catch(s){return Promise.reject(s)}}};const jT=()=>{const{reducer:[e],entityId:t,entityType:n}=p.useContext(it),{zNumberRequired:r,zStringRequired:a}=Yo(),{createFolder:i}=ov(),s=Qe.object({name:a(),documentTypeId:r()}),o=nt.useForm({resolver:Md(s)}),c=p.useCallback(async u=>{const l={...u,dbObjectId:t.toString(),entity:n,parentFolderId:e.activeFolder==="root"?null:e.activeFolder};await i(l)},[i,t,n,e.activeFolder]);return{formMethods:o,onSubmit:c}},PT=({handleClose:e})=>{var i;const{texts:{documents:t}}=p.useContext(Et),{reducer:[n]}=p.useContext(it);if(RT(n),n.modalType!=="create-folder")throw new Error("Tried to render CreateFolderModal without create-folder modal type reducer state.");const{onSubmit:r,formMethods:a}=jT();return y.jsx(y.Fragment,{children:y.jsx(nt.FormProvider,{...a,children:y.jsxs(xr,{onSubmit:a.handleSubmit(r),children:[y.jsx(ht.Header,{closeButton:!0,children:y.jsx(ht.Title,{children:t.createFolderInFolder(((i=n.foldersMap.get(n.chosenFolderId))==null?void 0:i.name)??"Root")})}),y.jsxs(ht.Body,{children:[y.jsx(xi,{formField:"name",type:"text",label:t.name,required:!0}),y.jsx(Rd,{options:n.documentTypes,formField:"documentTypeId",label:t.folderType,isNumber:!0,required:!0})]}),y.jsxs(ht.Footer,{children:[y.jsx(mr,{onClick:e,variant:"outlined",color:"secondary",children:t.cancel}),y.jsx(mr,{type:"submit",children:t.createFolder})]})]})})})},uv=100,IT=(e,t)=>{const n=Ho(),{startLoading:r,stopLoading:a}=p.useContext(Do),{loadDocuments:i}=p.useContext(it),{zStringRequired:s,zString:o,zNumberRequired:c,zDateRequired:u}=Yo(),l=Qe.object({name:s(),description:o(),validToDate:u(),documentTypeId:c()}),d=nt.useForm({resolver:Md(l),defaultValues:{...e,validToDate:qo(e.validToDate)}}),f=p.useCallback(async m=>{r("documents-updateProperties");try{await n.put(`/documents/${e.id}/update-info`,m),await i(),t()}finally{a("documents-updateProperties")}},[n,e.id,t,i,r,a]);return{formMethods:d,onSubmit:f}},NT=({handleClose:e,file:t})=>{const{texts:{documents:n}}=p.useContext(Et),{reducer:[r]}=p.useContext(it),{formMethods:a,onSubmit:i}=IT(t,e);return y.jsxs(y.Fragment,{children:[y.jsx(ht.Header,{closeButton:!0,children:y.jsx(ht.Title,{children:n.editFileProperties})}),y.jsx(nt.FormProvider,{...a,children:y.jsxs(xr,{onSubmit:a.handleSubmit(i),children:[y.jsxs(ht.Body,{children:[y.jsx(xi,{formField:"name",type:"text",label:n.name,required:!0}),y.jsx(xi,{formField:"validToDate",type:"date",label:n.validSince,required:!0}),y.jsx(Rd,{formField:"documentTypeId",label:n.category,options:r.documentTypes,isNumber:!0,required:!0}),y.jsx(Ad,{formField:"description",label:n.description,customFormControlProps:{maxLength:uv}})]}),y.jsxs(ht.Footer,{children:[y.jsx(mr,{onClick:e,color:"secondary",variant:"outlined",children:n.cancel}),y.jsx(mr,{type:"submit",children:n.save})]})]})})]})},DT=({handleClose:e})=>{const{reducer:[t]}=p.useContext(it),n=p.useMemo(()=>{if(t.markedFiles.length===1)return t.constantFiles.find(r=>r.id===t.markedFiles[0])},[t.constantFiles,t.markedFiles]);return n===void 0?(e(),y.jsx(y.Fragment,{})):y.jsx(NT,{file:n,handleClose:e})},FT=()=>{const{reducer:[e,t]}=p.useContext(it),n=p.useCallback(()=>{t({type:"close-modal"})},[t]),r=p.useMemo(()=>{if(e.state!=="openned-modal")return null;switch(e.modalType){case"create-folder":return y.jsx(PT,{handleClose:n});case"edit-file-properties":return y.jsx(DT,{handleClose:n});default:return null}},[e.state,e.modalType]);return y.jsx(ht,{show:e.state==="openned-modal",onHide:n,children:r})},Fh="documents_drag_image_element",ps="drop-container-highlight-class",Lh="data-drop-container-id",Uh="data-draggable-id",LT=()=>{const e=document.getElementById(Fh);if(e!==null)return e;const t=document.createElement("div");return t.id=Fh,t.style.position="absolute",t.style.top=`${-window.outerHeight}px`,t.style.left=`${-window.outerWidth}px`,t.style.width="50px",t.style.height="50px",t.style.backgroundColor="rgba(0, 0, 0, 0.5)",t.style.color="white",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.fontSize="16px",t.style.borderRadius="5px",document.body.appendChild(t),t},$d=()=>{const{apiActions:{moveDocuments:e},reducer:[t]}=p.useContext(it),n=p.useCallback(u=>{var l;if(t.markedFiles.length>0){const d=LT();d.innerHTML=t.markedFiles.length.toString(),u.dataTransfer.setDragImage(d,0,0),u.dataTransfer.clearData(),u.dataTransfer.setData("application/json",JSON.stringify(t.markedFiles)),u.dataTransfer.dropEffect="none",u.dataTransfer.effectAllowed="move"}else u.dataTransfer.setData("application/json",JSON.stringify([parseInt(((l=u.currentTarget.attributes.getNamedItem(Uh))==null?void 0:l.nodeValue)??"",10)])),u.dataTransfer.dropEffect="none",u.dataTransfer.effectAllowed="move"},[t.markedFiles]),r=p.useCallback(u=>({[Uh]:u,draggable:t.markedFiles.length===0||t.markedFiles.includes(u),onDragStart:n}),[n,t.markedFiles]),a=p.useCallback(u=>l=>{var m;l.preventDefault(),l.stopPropagation(),l.currentTarget.classList.remove(ps);const d=l.dataTransfer.files;if(u&&d&&d.length>0){u(d);return}const f=l.dataTransfer.getData("application/json");if(f){const g=JSON.parse(f),v=parseInt(((m=l.currentTarget.attributes.getNamedItem(Lh))==null?void 0:m.value)??"",10);e(v,g)}},[e]),i=p.useCallback(()=>u=>{u.preventDefault(),u.stopPropagation()},[]),s=p.useCallback(u=>l=>{l.preventDefault(),l.stopPropagation(),l.dataTransfer.types.includes("Files")?(l.dataTransfer.dropEffect="copy",l.currentTarget.classList.add(ps)):!u&&l.dataTransfer.types.includes("application/json")?(l.dataTransfer.dropEffect="move",l.currentTarget.classList.add(ps)):l.dataTransfer.dropEffect="none"},[]),o=p.useCallback(u=>{u.preventDefault(),u.stopPropagation(),u.target===u.currentTarget&&(u.dataTransfer.dropEffect="none",u.currentTarget.classList.remove(ps))},[]),c=p.useCallback((u,l)=>({onDrop:a(l==null?void 0:l.onFilesDrop),onDragOver:i(),onDragEnter:s(l==null?void 0:l.ignoreInner),onDragLeave:o,[Lh]:u}),[a,i,s,o]);return{getDraggableProps:r,getDropProps:c}};function lv(e,t,n){for(let r=0;r<e.childrenIds.length;r++){const a=e.childrenIds[r];if(a===t)return!0;const i=n.get(a);if(i&&lv(i,t,n))return!0}return!1}function UT(e){if(e.activeFolder==="root")return!1;const t=e.foldersMap.get(e.activeFolder);return!(t!=null&&t.onlyRead)}const zT=()=>{const{zString:e,zStringRequired:t,zNumberRequired:n}=Yo();return{formSchema:p.useMemo(()=>Qe.object({validTo:t(),description:e(),documentTypeId:n()}),[n,e,t])}},jd=({handleClose:e,files:t,targetFolderId:n})=>{var f;const{texts:{documents:r}}=p.useContext(Et),{reducer:[a],apiActions:{uploadFiles:i}}=p.useContext(it),s=p.useMemo(()=>[...t],[t]),o=p.useMemo(()=>n??a.activeFolder,[a.activeFolder,n]),c=p.useMemo(()=>o==="root"?void 0:a.foldersMap.get(o),[o,a.foldersMap]),{formSchema:u}=zT(),l=nt.useForm({resolver:Md(u),defaultValues:{validTo:qo(new Date().toISOString()),documentTypeId:(f=a.documentTypes.find(m=>{var g;return m.name===((g=a.foldersMap.get(o))==null?void 0:g.defaultDocType)}))==null?void 0:f.id}}),d=p.useCallback(async m=>{o!=="root"&&(await i(t,{folderId:o,...m}),e())},[t,e,o,i]);return y.jsxs(ht,{show:!0,onHide:e,children:[y.jsx(ht.Header,{closeButton:!0,children:y.jsxs("div",{children:[r.uploadFilesPrompt(t.length,c.name),y.jsx("ul",{children:s.map((m,g)=>y.jsxs("li",{children:[m.name," - ",Wo(m.size)]},`${m.name}-${g}`))})]})}),y.jsx(nt.FormProvider,{...l,children:y.jsxs(xr,{onSubmit:l.handleSubmit(d),children:[y.jsxs(ht.Body,{children:[y.jsx(Rd,{formField:"documentTypeId",label:r.documentType,options:a.documentTypes,isNumber:!0,required:!0}),y.jsx(xi,{formField:"validTo",label:r.validSince,type:"date",required:!0}),y.jsx(Ad,{formField:"description",label:r.description,customFormControlProps:{maxLength:uv}})]}),y.jsxs(ht.Footer,{children:[y.jsx(mr,{variant:"outlined",color:"secondary",onClick:e,children:r.cancel}),y.jsx(mr,{type:"submit",children:r.upload})]})]})})]})},BT="_folder_5v2vd_1",WT="_collapseArrowDiv_5v2vd_8",qT="_button_5v2vd_20",HT="_nestedList_5v2vd_24",VT="_numberOfFiles_5v2vd_31",YT="_collapseArrow_5v2vd_8",Kn={folder:BT,collapseArrowDiv:WT,button:qT,nestedList:HT,numberOfFiles:VT,collapseArrow:YT},dv=({dirId:e})=>{const{ProjectIconComponent:t}=p.useContext(Et),{reducer:[n,r]}=p.useContext(it),{getDropProps:a}=$d(),[i,s]=p.useState(null),[o,c]=p.useState(!0),u=p.useMemo(()=>{const g=n.foldersMap.get(e);if(g===void 0)throw new Error(`tried to get dir with id ${e}`);return g},[e,n.foldersMap]),l=p.useCallback(()=>{n.activeFolder!=="root"&&lv(u,n.activeFolder,n.foldersMap)&&r({type:"select-folder",folderId:e}),c(!0)},[e,u,r,n.activeFolder,n.foldersMap]),d=p.useMemo(()=>u.childrenIds.length>0,[u.childrenIds.length]),f=p.useCallback(()=>{r({type:"select-folder",folderId:e})},[e,r]),m=p.useMemo(()=>n.filteredFiles.filter(g=>g.folderId===e&&g.archive===!1).length,[e,n.filteredFiles]);return y.jsxs(y.Fragment,{children:[y.jsxs("li",{className:Kn.folder,children:[y.jsx("div",{className:Kn.collapseArrowDiv,children:d?o?y.jsx("button",{onClick:()=>c(!1),type:"button",children:y.jsx(t,{icon:"chevron-right",iconProps:{className:Kn.collapseArrow}})}):y.jsx("button",{onClick:l,type:"button",children:y.jsx(t,{icon:"chevron-down",iconProps:{className:Kn.collapseArrow}})}):null}),y.jsxs("button",{className:ae(Kn.button),onClick:f,type:"button",...u.onlyRead?{}:a(e,{onFilesDrop:g=>s(g)}),children:[y.jsx(sv,{isDefault:u.isDefault,folderName:u.name,isActive:e===n.activeFolder}),m>0?y.jsxs("span",{className:Kn.numberOfFiles,children:["[",m,"]"]}):void 0]}),d?o?null:y.jsx("ul",{className:Kn.nestedList,children:u==null?void 0:u.childrenIds.map(g=>y.jsx(dv,{dirId:g},g))}):void 0]}),i!==null?y.jsx(jd,{files:i,handleClose:()=>s(null),targetFolderId:e}):null]})},ZT="_wrapper_1th2u_1",GT="_downloadButton_1th2u_9",fv={wrapper:ZT,downloadButton:GT};function KT(e){return Re({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z"},child:[]}]})(e)}function XT(e){return Re({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"},child:[]}]})(e)}function JT(e){return Re({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M23 1.5q.41 0 .7.3.3.29.3.7v19q0 .41-.3.7-.29.3-.7.3H7q-.41 0-.7-.3-.3-.29-.3-.7V18H1q-.41 0-.7-.3-.3-.29-.3-.7V7q0-.41.3-.7Q.58 6 1 6h5V2.5q0-.41.3-.7.29-.3.7-.3zM6 13.28l1.42 2.66h2.14l-2.38-3.87 2.34-3.8H7.46l-1.3 2.4-.05.08-.04.09-.64-1.28-.66-1.29H2.59l2.27 3.82-2.48 3.85h2.16zM14.25 21v-3H7.5v3zm0-4.5v-3.75H12v3.75zm0-5.25V7.5H12v3.75zm0-5.25V3H7.5v3zm8.25 15v-3h-6.75v3zm0-4.5v-3.75h-6.75v3.75zm0-5.25V7.5h-6.75v3.75zm0-5.25V3h-6.75v3Z"},child:[]}]})(e)}function QT(e){return Re({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M23.004 1.5q.41 0 .703.293t.293.703v19.008q0 .41-.293.703t-.703.293H6.996q-.41 0-.703-.293T6 21.504V18H.996q-.41 0-.703-.293T0 17.004V6.996q0-.41.293-.703T.996 6H6V2.496q0-.41.293-.703t.703-.293zM6.035 11.203l1.442 4.735h1.64l1.57-7.876H9.036l-.937 4.653-1.325-4.5H5.38l-1.406 4.523-.938-4.675H1.312l1.57 7.874h1.641zM22.5 21v-3h-15v3zm0-4.5v-3.75H12v3.75zm0-5.25V7.5H12v3.75zm0-5.25V3h-15v3Z"},child:[]}]})(e)}const e8="_excel_18ggp_1",t8="_word_18ggp_5",n8="_pdf_18ggp_9",r8="_image_18ggp_13",ms={excel:e8,word:t8,pdf:n8,image:r8},hv=({fileExtension:e,className:t,...n})=>{switch(e==null?void 0:e.toUpperCase()){case"JPG":case"JPEG":case"BMP":case"PNG":return y.jsx("span",{className:ae(t,ms.image),children:y.jsx(XT,{...n})});case"XLS":case"XLSX":case"CSV":return y.jsx(JT,{className:ae(t,ms.excel),...n});case"DOC":case"DOCM":case"DOCX":return y.jsx(QT,{className:ae(t,ms.word),...n});case"PDF":return y.jsx(mT,{className:ae(t,ms.pdf),...n});default:return y.jsx(KT,{})}},a8=()=>{const{ProjectIconComponent:e,texts:{documents:t}}=p.useContext(Et),{apiActions:{downloadFile:n},reducer:[r]}=p.useContext(it),a=p.useMemo(()=>r.activeFolder==="root",[r.activeFolder]);return{columns:p.useMemo(()=>[{fieldName:"id",caption:"id",type:"number",isVisible:!1},...a?[{fieldName:"folderName",caption:t.folder,type:"string"}]:[],{fieldName:"--icon",caption:"",type:"string",valueFormat:s=>y.jsx(hv,{fileExtension:s.row.original.fileExtension}),width:36,align:"center",filterType:"none",noSort:!0},{fieldName:"name",caption:t.name,type:"string"},{fieldName:"description",caption:t.description,type:"string"},{fieldName:"fileExtension",caption:t.fileExtension,type:"string",filterType:"select",width:50},{fieldName:"--downloadButton",caption:"",type:"number",filterType:"none",width:38,align:"center",noSort:!0,valueFormat:s=>y.jsx(kd,{className:fv.downloadButton,onClick:()=>n(s.row.original.id,!0),children:y.jsx(e,{icon:"file-download"})})},{fieldName:"documentTypeName",caption:t.documentType,type:"string",filterType:"select"},{fieldName:"validToDate",caption:t.validSince,type:"date"},{fieldName:"size",caption:t.size,type:"number",valueFormat:({cell:{value:s}})=>s!==void 0?Wo(s*1024*1024):"",filterType:"none"},{fieldName:"archive",caption:t.archived,type:"boolean",filterType:"select",valueFormat:({cell:{value:s}})=>s?t.yes[0]:t.no[0]}],[e,t.archived,t.description,t.documentType,t.fileExtension,t.folder,t.name,t.no,t.size,t.validSince,t.yes,n,a])}},i8=({BnfTableComponent:e,tableIdentifier:t})=>{const{reducer:[n,r]}=p.useContext(it),{columns:a}=a8(),i=p.useCallback(f=>{r({type:"mark-files-by-action",setStateAction:f})},[r]),s=p.useMemo(()=>n.activeFolder==="root",[n.activeFolder]),o=p.useMemo(()=>{var f;return n.activeFolder==="root"?!1:((f=n.foldersMap.get(n.activeFolder))==null?void 0:f.onlyRead)??!1},[n.activeFolder,n.foldersMap]),c=p.useMemo(()=>({enabled:!s,idField:"id",selectedRows:n.markedFiles,setSelectedRows:i}),[s,i,n.markedFiles]),u=p.useMemo(()=>n.activeFolder==="root"?n.filteredFiles:n.filteredFiles.filter(f=>f.folderId===n.activeFolder),[n.activeFolder,n.filteredFiles]),{getDraggableProps:l}=$d(),d=p.useCallback(f=>o?{}:l(f.id),[l,o]);return y.jsx("div",{className:ae(fv.wrapper),children:y.jsx(e,{data:u,columnsDef:a,rowSelection:c,useScrollableContainer:!0,getRowProps:d,defaultConfig:{defaultFilters:[{id:"archive",value:"false"}]},tableId:t,searchStatePrefix:"docs",useSearchState:!0,hideBottomBar:!0},n.activeFolder)})},s8="_wrapper_1q562_1",o8="_divButtons_1q562_10",wu={wrapper:s8,divButtons:o8},c8="_wrapper_1bpdd_1",u8="_fileInput_1bpdd_5",zh={wrapper:c8,fileInput:u8},l8=({entityId:e,entityType:t,children:n,disabled:r})=>{const a=p.useRef(null),[i,s]=p.useState(null),{reducer:[o]}=p.useContext(it),c=f=>{var m;(((m=f.target.files)==null?void 0:m.length)??0)>0&&s(f.target.files)},u=p.useCallback(()=>{s(null),a.current&&(a.current.value="")},[]),l=p.useMemo(()=>`documents-upload-${t}-${e}`,[e,t]),d=p.useMemo(()=>r||o.activeFolder==="root",[r,o.activeFolder]);return y.jsxs("div",{className:zh.wrapper,children:[y.jsx("label",{htmlFor:l,className:ae("btn btn-context luminus-context-button",d?"disabled":void 0),children:n}),y.jsx("input",{id:l,type:"file",multiple:!0,onChange:c,className:zh.fileInput,ref:a,disabled:d}),i!==null?y.jsx(jd,{handleClose:u,files:i}):void 0]})},qt=({children:e,onClick:t,className:n,disabled:r=!1})=>y.jsx(kd,{onClick:t,className:n,disabled:r,children:e}),d8=({className:e,entityId:t,entityType:n})=>{var $,D;const{texts:{documents:r}}=p.useContext(Et),{prompt:a}=tg(),{confirm:i}=Wg(),{apiActions:s,reducer:[o,c]}=p.useContext(it),{deleteFiles:u,renameFiles:l,downloadAsZip:d,archivateFiles:f,deleteDirectory:m}=s,{renameFolder:g}=ov(),v=p.useMemo(()=>o.markedFiles.length===0,[o.markedFiles.length]),h=p.useMemo(()=>o.markedFiles.length===1,[o.markedFiles.length]),w=p.useCallback(async()=>{if(o.activeFolder==="root")return;const I=await a(r.enterNewFolderName,{input:"input"});I!==null&&g(o.activeFolder,I)},[r.enterNewFolderName,a,g,o.activeFolder]),x=p.useCallback(async()=>{if(o.activeFolder==="root")return;const I=await a(r.enterNewFileName,{input:"input"});I!==null&&l(I)},[r.enterNewFileName,a,l,o.activeFolder]),b=p.useMemo(()=>o.activeFolder==="root",[o.activeFolder]),T=p.useMemo(()=>{var I;return o.activeFolder==="root"?!1:((I=o.foldersMap.get(o.activeFolder))==null?void 0:I.onlyRead)??!1},[o.activeFolder,o.foldersMap]),_=p.useMemo(()=>o.markedFiles.every(I=>{var M;return((M=o.constantFiles.find(k=>k.id===I))==null?void 0:M.archive)===!1}),[o.constantFiles,o.markedFiles]),S=p.useMemo(()=>o.markedFiles.every(I=>{var M;return((M=o.constantFiles.find(k=>k.id===I))==null?void 0:M.archive)===!0}),[o.constantFiles,o.markedFiles]);return y.jsx("div",{className:ae(e,wu.wrapper,o.state==="folder-choosing"?"ignore-dim":void 0,"d-flex justify-content-between"),children:o.state!=="folder-choosing"?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:wu.divButtons,children:[y.jsx(l8,{entityId:t,entityType:n,disabled:T,children:r.uploadFiles}),y.jsx(qt,{onClick:()=>{c({type:"open-modal",modalType:"create-folder",chosenFolderId:o.activeFolder??"root"})},disabled:T,children:r.createFolder}),y.jsx(qt,{disabled:o.activeFolder==="root"||(($=o.foldersMap.get(o.activeFolder))==null?void 0:$.isDefault),onClick:async()=>{var M;await i(`${r.deleteFolder} ${(M=o.foldersMap.get(o.activeFolder))==null?void 0:M.name}?`)&&m(o.activeFolder)},children:r.deleteFolder}),y.jsx(qt,{disabled:o.activeFolder==="root"||((D=o.foldersMap.get(o.activeFolder))==null?void 0:D.isDefault),onClick:w,children:r.renameFolder})]}),!b&&!T?y.jsxs("div",{className:wu.divButtons,children:[y.jsx(qt,{onClick:()=>{c({type:"open-modal",modalType:"edit-file-properties"})},disabled:!h,children:r.editFileProperties}),y.jsx(qt,{onClick:async()=>{await i(r.confirmDeleteFile(o.markedFiles.length))&&u(o.markedFiles)},disabled:v,children:r.delete}),S?y.jsx(qt,{onClick:async()=>{await i(r.confirmDearchiveFile(o.markedFiles.length))&&await f(!0)},disabled:v,children:r.dearchivate}):y.jsx(qt,{onClick:async()=>{await i(r.confirmArchiveFile(o.markedFiles.length))&&await f()},disabled:v||!_,children:r.archivate}),y.jsx(qt,{onClick:x,disabled:v,children:r.rename}),y.jsx(qt,{onClick:d,disabled:v,children:r.downloadZip})]}):null]}):o.state==="folder-choosing"?y.jsx(y.Fragment,{children:y.jsx(qt,{onClick:()=>c({type:"return-from-folder-choosing"}),className:ae("ignore-dim","body-background-color"),children:r.back})}):void 0})};function f8(e){return{name:e.name,defaultDocType:e.defaultDocType,childrenIds:[],parentId:e.parentId??null,isDefault:e.isDefault,onlyRead:e.onlyRead}}function h8(e){const t=[],n=new Map,r=new Map;return e.forEach(a=>{n.set(a.id,f8(a)),a.parentId===null?t.push(a.id):r.set(a.id,a.parentId)}),r.forEach((a,i)=>{const s=n.get(a);if(s===void 0)throw new Error(`Did not get folder with ID ${a}, which is supposed to be parent directory of folder with ID ${i}`);s.childrenIds.push(i)}),{dirsMap:n,rootIds:t}}function Bh(e,t){const n=t.toUpperCase();return e.filter(r=>{var i;const a=(i=r.name)==null?void 0:i.toUpperCase();return a==null?void 0:a.includes(n)})}function p8(e,t){return e.map(n=>{var r;return{...n,folderName:((r=t.get(n.folderId))==null?void 0:r.name)??""}})}const m8=([e,t],n,r)=>{const{texts:{documents:a}}=p.useContext(Et),{startLoading:i,stopLoading:s}=p.useContext(Do),{addNotification:o}=Cd(),c=Ho(),u=p.useCallback(async b=>{i("documentList");try{const _=(await c.get(`/documents/${n}/${r}`)).data,{dirsMap:S,rootIds:$}=h8(_.folders),D=p8(_.documents,S);t({type:"load-data",files:D,foldersMap:S,rootFolderIds:$,setActiveFolder:b})}finally{s("documentList")}},[c,t,r,n,i,s]);p.useEffect(()=>{u(!0)},[u]);const l=p.useCallback(async()=>{i("documents-types");try{const b=await c.get(`/documents/types/${n}`);if(b.status!==200)throw new Error(`Unexpected status code: ${b.status}`);t({type:"load-document-types",documentTypes:b.data})}finally{s("documents-types")}},[c,t,n,i,s]);p.useEffect(()=>{l()},[l]);const d=p.useCallback(async(b,T)=>{const _=T??e.markedFiles;i("documentsMove");try{await c.put(`/documents/move-to-folder?folderId=${b}`,_),t({type:"update-files",fileIds:_,newProperties:{folderId:b}}),o(a.fileMoveSuccessful(_.length,e.foldersMap.get(b).name),"info")}finally{s("documentsMove")}},[e.markedFiles,e.foldersMap,i,c,t,o,a,s]),f=p.useCallback(async b=>{const T=b??e.markedFiles;i("documentsFilesDelete");try{const _=await c.delete(`/documents/delete?${fl(T,"documentIds")}`);if(_.status!==200)throw new Error(`Unexpected status code: ${_.status}`);t({type:"delete-files",fileIds:T}),o(a.fileDeleteSuccessful(T.length),"info")}finally{s("documentsFilesDelete")}},[e.markedFiles,i,c,t,o,a,s]),m=p.useCallback(async b=>{var T;if(!(b==="root"||(T=e.foldersMap.get(b))!=null&&T.isDefault)){i("documentsFolderDelete");try{const _=await c.delete(`/documents/folder/${b}`);if(_.status!==200)throw new Error(`Unexpected status code: ${_.status}`);t({type:"delete-folder",folderId:b}),o(a.folderDeleteSuccessful(e.foldersMap.get(b).name),"info")}finally{s("documentsFolderDelete")}}},[e.foldersMap,i,c,t,o,a,s]),g=p.useCallback(async b=>{i("documentsRename");try{const T=await c.put("/documents/update-name",{documentIds:e.markedFiles,name:b});if(T.status!==200)throw new Error(`Unexpected status code: ${T.status}`);u()}finally{s("documentsRename")}},[i,c,e.markedFiles,u,s]),v=p.useCallback(async b=>{i("documents-archivate");try{const T=await c.put(`/documents/${b?"dearchive":"archive"}`,e.markedFiles);if(T.status!==200)throw new Error(`Unexpected status code: ${T.status}`);t({type:"update-files",fileIds:e.markedFiles,newProperties:{archive:!b}}),o((b?a.archivateSuccessful:a.dearchivateSuccessful)(e.markedFiles.length),"info")}finally{s("documents-archivate")}},[i,c,e.markedFiles,t,o,a.archivateSuccessful,a.dearchivateSuccessful,s]),h=p.useCallback(async()=>{var T;if(e.activeFolder==="root")return;const b=e.markedFiles.length;o(a.downloadAsZip(b),"info"),i("documents-ZIP_download");try{const _=await c.get(`/documents/download-zip?${fl(e.markedFiles,"documentIds")}`,{responseType:"blob"});Ks(_.data,(((T=e.foldersMap.get(e.activeFolder))==null?void 0:T.name)??"")+"_files")}finally{s("documents-ZIP_download")}},[e.activeFolder,e.markedFiles,e.foldersMap,o,a,i,c,s]),w=p.useCallback(async(b,T)=>{o(a.downloadingFile,"info"),i("documents-downloading_file");try{const _=await c.get(`/documents/${b}?isSmall=true`,{responseType:"blob"}),S=e.constantFiles.find(D=>D.id===b),$=`${(S==null?void 0:S.name)??b.toString()}.${S!=null&&S.fileExtension?S==null?void 0:S.fileExtension.toLowerCase():"unknown"}`;Ks(_.data,$,T)}finally{s("documents-downloading_file")}},[o,a.downloadingFile,i,c,e.constantFiles,s]),x=p.useCallback(async(b,T)=>{i("documents-upload"),o(a.uploadingDocuments,"info");try{await c.postForm("/documents/upload",{files:b,...T}),await u()}finally{s("documents-upload")}},[i,o,a.uploadingDocuments,c,u,s]);return{loadDocuments:u,moveDocuments:d,deleteFiles:f,deleteDirectory:m,renameFiles:g,archivateFiles:v,downloadAsZip:h,downloadFile:w,uploadFiles:x}},g8=(e,t)=>{var n,r;switch(t.type){case"load-data":{const a={...e,constantFiles:t.files,filteredFiles:Bh(t.files,e.searchString),foldersMap:t.foldersMap,rootFolderIds:t.rootFolderIds};if(t.setActiveFolder){const i=t.rootFolderIds.find(s=>t.files.some(o=>o.archive===!1&&o.folderId===s))??"root";a.activeFolder=i}return a}case"load-document-types":return{...e,documentTypes:t.documentTypes};case"select-folder":return{...e,activeFolder:t.folderId,markedFiles:[]};case"mark-file":{const a=e.markedFiles.includes(t.fileId)?[...e.markedFiles.filter(i=>i!==t.fileId)]:[...e.markedFiles,t.fileId];return{...e,state:a.length>0?"selection-file":"explorer",markedFiles:a}}case"mark-files-by-action":{const a=typeof t.setStateAction=="function"?t.setStateAction(e.markedFiles):t.setStateAction;return{...e,state:a.length>0?"selection-file":"explorer",markedFiles:a}}case"mark-all-files":return e.markedFiles.length<e.filteredFiles.filter(a=>a.folderId===e.activeFolder).length?{...e,markedFiles:e.filteredFiles.filter(a=>a.folderId===e.activeFolder).map(a=>a.id),state:"explorer"}:{...e,markedFiles:[],state:"explorer"};case"enter-folder-choosing":return e.state==="folder-choosing"||e.state==="openned-modal"?e:{...e,state:"folder-choosing",canTargetRoot:t.canTargetRoot??!1,previousState:e.state,choosingType:t.choosingType};case"return-from-folder-choosing":return e.state!=="folder-choosing"?e:{...e,state:e.previousState};case"update-files":return{...e,filteredFiles:[...e.filteredFiles.map(a=>t.fileIds.includes(a.id)?{...a,...t.newProperties}:a)],constantFiles:[...e.constantFiles.map(a=>t.fileIds.includes(a.id)?{...a,...t.newProperties}:a)],markedFiles:[],state:"explorer"};case"update-folders":{const a=new Map(e.foldersMap);return t.folderIds.forEach(i=>{a.set(i,{...e.foldersMap.get(i),...t.newProperties})}),{...e,foldersMap:a}}case"delete-files":return{...e,filteredFiles:[...e.filteredFiles.filter(a=>!t.fileIds.includes(a.id))],constantFiles:[...e.constantFiles.filter(a=>!t.fileIds.includes(a.id))],markedFiles:e.markedFiles.filter(a=>!t.fileIds.includes(a)),state:"explorer"};case"open-modal":switch(t.modalType){case"create-folder":return{...e,state:"openned-modal",modalType:t.modalType,chosenFolderId:t.chosenFolderId};default:return{...e,state:"openned-modal",modalType:t.modalType}}case"close-modal":return{...e,state:"explorer"};case"delete-folder":{const a=new Map(e.foldersMap),i=(n=a.get(t.folderId))==null?void 0:n.parentId;let s=[...e.rootFolderIds];if(i){const o=JSON.parse(JSON.stringify(a.get(i)));o.childrenIds=o.childrenIds.filter(c=>c!==t.folderId),a.set(i,o)}else s=s.filter(o=>o!==t.folderId);return a.delete(t.folderId),{...e,rootFolderIds:s,foldersMap:a,activeFolder:"root"}}case"create-folder":{const a=new Map(e.foldersMap);a.set(t.folderId,{name:t.folderData.name,defaultDocType:(r=e.documentTypes.find(s=>s.id===t.folderData.documentTypeId))==null?void 0:r.name,childrenIds:[],parentId:t.folderData.parentFolderId,isDefault:!1,onlyRead:t.isOnlyRead});const i=[...e.rootFolderIds];if(t.folderData.parentFolderId===null)i.push(t.folderId);else{const s=a.get(t.folderData.parentFolderId),o=JSON.parse(JSON.stringify(s));o.childrenIds.push(t.folderId),a.set(t.folderData.parentFolderId,o)}return{...e,state:"explorer",rootFolderIds:i,foldersMap:a}}case"search-files":{const a=Bh(e.constantFiles,t.searchString);return{...e,searchString:t.searchString,filteredFiles:a,markedFiles:e.markedFiles.filter(i=>a.map(s=>s.id).includes(i))}}default:throw new Error("Wrong action.type specified.")}},v8=()=>{const e={state:"explorer",activeFolder:"root",searchString:"",filteredFiles:[],constantFiles:[],foldersMap:new Map,rootFolderIds:[],markedFiles:[],documentTypes:[]},[t,n]=p.useReducer(g8,e);return[t,n]},b8=p.memo(({entityType:e,entityId:t,className:n,BnfTableComponent:r,tableIdentifier:a,...i})=>{const{ProjectIconComponent:s,texts:{documents:o}}=p.useContext(Et),[c,u]=v8(),[l,d]=p.useState(null),{loadDocuments:f,...m}=m8([c,u],e,t),g=p.useMemo(()=>({entityId:t,entityType:e,apiActions:m,loadDocuments:f,reducer:[c,u]}),[t,e,m,f,c,u]),{getDropProps:v}=$d();return y.jsx("div",{...i,className:ae(Gn.wrapper,n),onDragOver:h=>{h.dataTransfer.dropEffect="none",h.stopPropagation(),h.preventDefault()},onDragEnter:h=>{h.dataTransfer.dropEffect="none",h.stopPropagation(),h.preventDefault()},children:y.jsxs(it.Provider,{value:g,children:[y.jsx("div",{className:ae(c.state==="folder-choosing"?"dim-others":void 0,Gn.explorerWindow),children:y.jsxs("ul",{className:Gn.folderList,children:[y.jsx(kT,{customText:e}),c.rootFolderIds.map(h=>y.jsx(dv,{dirId:h},h))]})}),y.jsxs("div",{className:ae(Gn.explorerWindow,Gn.fileList),...UT(c)?v(c.activeFolder,{onFilesDrop:h=>d(h),ignoreInner:!0}):{},children:[y.jsxs("div",{className:Gn.dndText,children:[y.jsx(s,{icon:"file-upload",iconProps:{style:{marginRight:0}}}),y.jsx("span",{children:o.dropToUpload})]}),y.jsx(i8,{tableIdentifier:a,BnfTableComponent:r},(c.activeFolder==="root").toString())]}),y.jsx(d8,{className:Gn.controls,entityType:e,entityId:t}),y.jsx(FT,{}),l!==null?y.jsx(jd,{files:l,handleClose:()=>d(null),targetFolderId:c.activeFolder==="root"?void 0:c.activeFolder}):null]})})}),y8="_feedback_esh1j_1",_8="_feedback-spacer_esh1j_8",Wh={feedback:y8,"feedback-spacer":"_feedback-spacer_esh1j_8",feedbackSpacer:_8},Go=({message:e})=>y.jsxs(y.Fragment,{children:[y.jsx("div",{className:ae("invalid-feedback luminus-invalid-feedback",Wh.feedback),children:e}),y.jsx("div",{className:ae("invalid-feedback-spacer",Wh.feedbackSpacer),children:e})]}),x8=p.forwardRef(({onClick:e,text:t},n)=>y.jsx("div",{ref:n,onClick:r=>{r.preventDefault(),e(r)},role:"button",className:"middle-div",children:y.jsxs("div",{className:"d-flex flex-column align-items-center",children:[y.jsx("div",{className:"mt-",children:"…"}),y.jsx("div",{className:"mt-1 middle-letter",children:t})]})}));var Pd=Wi(),be=e=>Bi(e,Pd),Id=Wi();be.write=e=>Bi(e,Id);var Ko=Wi();be.onStart=e=>Bi(e,Ko);var Nd=Wi();be.onFrame=e=>Bi(e,Nd);var Dd=Wi();be.onFinish=e=>Bi(e,Dd);var zr=[];be.setTimeout=(e,t)=>{const n=be.now()+t,r=()=>{const i=zr.findIndex(s=>s.cancel==r);~i&&zr.splice(i,1),Pn-=~i?1:0},a={time:n,handler:e,cancel:r};return zr.splice(pv(n),0,a),Pn+=1,mv(),a};var pv=e=>~(~zr.findIndex(t=>t.time>e)||~zr.length);be.cancel=e=>{Ko.delete(e),Nd.delete(e),Dd.delete(e),Pd.delete(e),Id.delete(e)};be.sync=e=>{yl=!0,be.batchedUpdates(e),yl=!1};be.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...a){t=a,be.onStart(n)}return r.handler=e,r.cancel=()=>{Ko.delete(n),t=null},r};var Fd=typeof window<"u"?window.requestAnimationFrame:()=>{};be.use=e=>Fd=e;be.now=typeof performance<"u"?()=>performance.now():Date.now;be.batchedUpdates=e=>e();be.catch=console.error;be.frameLoop="always";be.advance=()=>{be.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):vv()};var jn=-1,Pn=0,yl=!1;function Bi(e,t){yl?(t.delete(e),e(0)):(t.add(e),mv())}function mv(){jn<0&&(jn=0,be.frameLoop!=="demand"&&Fd(gv))}function w8(){jn=-1}function gv(){~jn&&(Fd(gv),be.batchedUpdates(vv))}function vv(){const e=jn;jn=be.now();const t=pv(jn);if(t&&(bv(zr.splice(0,t),n=>n.handler()),Pn-=t),!Pn){w8();return}Ko.flush(),Pd.flush(e?Math.min(64,jn-e):16.667),Nd.flush(),Id.flush(),Dd.flush()}function Wi(){let e=new Set,t=e;return{add(n){Pn+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return Pn-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Pn-=t.size,bv(t,r=>r(n)&&e.add(r)),Pn+=e.size,t=e)}}}function bv(e,t){e.forEach(n=>{try{t(n)}catch(r){be.catch(r)}})}var T8=Object.defineProperty,O8=(e,t)=>{for(var n in t)T8(e,n,{get:t[n],enumerable:!0})},Ut={};O8(Ut,{assign:()=>E8,colors:()=>Nn,createStringInterpolator:()=>Ud,skipAnimation:()=>_v,to:()=>yv,willAdvance:()=>zd});function _l(){}var C8=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),q={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function cn(e,t){if(q.arr(e)){if(!q.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var ve=(e,t)=>e.forEach(t);function Qt(e,t,n){if(q.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var ct=e=>q.und(e)?[]:q.arr(e)?e:[e];function Qa(e,t){if(e.size){const n=Array.from(e);e.clear(),ve(n,t)}}var Za=(e,...t)=>Qa(e,n=>n(...t)),Ld=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Ud,yv,Nn=null,_v=!1,zd=_l,E8=e=>{e.to&&(yv=e.to),e.now&&(be.now=e.now),e.colors!==void 0&&(Nn=e.colors),e.skipAnimation!=null&&(_v=e.skipAnimation),e.createStringInterpolator&&(Ud=e.createStringInterpolator),e.requestAnimationFrame&&be.use(e.requestAnimationFrame),e.batchedUpdates&&(be.batchedUpdates=e.batchedUpdates),e.willAdvance&&(zd=e.willAdvance),e.frameLoop&&(be.frameLoop=e.frameLoop)},ei=new Set,Rt=[],Tu=[],ao=0,Xo={get idle(){return!ei.size&&!Rt.length},start(e){ao>e.priority?(ei.add(e),be.onStart(S8)):(xv(e),be(xl))},advance:xl,sort(e){if(ao)be.onFrame(()=>Xo.sort(e));else{const t=Rt.indexOf(e);~t&&(Rt.splice(t,1),wv(e))}},clear(){Rt=[],ei.clear()}};function S8(){ei.forEach(xv),ei.clear(),be(xl)}function xv(e){Rt.includes(e)||wv(e)}function wv(e){Rt.splice(k8(Rt,t=>t.priority>e.priority),0,e)}function xl(e){const t=Tu;for(let n=0;n<Rt.length;n++){const r=Rt[n];ao=r.priority,r.idle||(zd(r),r.advance(e),r.idle||t.push(r))}return ao=0,Tu=Rt,Tu.length=0,Rt=t,Rt.length>0}function k8(e,t){const n=e.findIndex(t);return n<0?e.length:n}var R8=(e,t,n)=>Math.min(Math.max(n,e),t),A8={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},It="[-+]?\\d*\\.?\\d+",io=It+"%";function Jo(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var M8=new RegExp("rgb"+Jo(It,It,It)),$8=new RegExp("rgba"+Jo(It,It,It,It)),j8=new RegExp("hsl"+Jo(It,io,io)),P8=new RegExp("hsla"+Jo(It,io,io,It)),I8=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,N8=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,D8=/^#([0-9a-fA-F]{6})$/,F8=/^#([0-9a-fA-F]{8})$/;function L8(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=D8.exec(e))?parseInt(t[1]+"ff",16)>>>0:Nn&&Nn[e]!==void 0?Nn[e]:(t=M8.exec(e))?(Pr(t[1])<<24|Pr(t[2])<<16|Pr(t[3])<<8|255)>>>0:(t=$8.exec(e))?(Pr(t[1])<<24|Pr(t[2])<<16|Pr(t[3])<<8|Vh(t[4]))>>>0:(t=I8.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=F8.exec(e))?parseInt(t[1],16)>>>0:(t=N8.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=j8.exec(e))?(qh(Hh(t[1]),gs(t[2]),gs(t[3]))|255)>>>0:(t=P8.exec(e))?(qh(Hh(t[1]),gs(t[2]),gs(t[3]))|Vh(t[4]))>>>0:null}function Ou(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function qh(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r,i=Ou(a,r,e+1/3),s=Ou(a,r,e),o=Ou(a,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(o*255)<<8}function Pr(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Hh(e){return(parseFloat(e)%360+360)%360/360}function Vh(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function gs(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Yh(e){let t=L8(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,a=(t&65280)>>>8,i=(t&255)/255;return`rgba(${n}, ${r}, ${a}, ${i})`}var wi=(e,t,n)=>{if(q.fun(e))return e;if(q.arr(e))return wi({range:e,output:t,extrapolate:n});if(q.str(e.output[0]))return Ud(e);const r=e,a=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",o=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{const l=z8(u,i);return U8(u,i[l],i[l+1],a[l],a[l+1],c,s,o,r.map)}};function U8(e,t,n,r,a,i,s,o,c){let u=c?c(e):e;if(u<t){if(s==="identity")return u;s==="clamp"&&(u=t)}if(u>n){if(o==="identity")return u;o==="clamp"&&(u=n)}return r===a?r:t===n?e<=t?r:a:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=i(u),r===-1/0?u=-u:a===1/0?u=u+r:u=u*(a-r)+r,u)}function z8(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var B8=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,a=t==="end"?Math.floor(r):Math.ceil(r);return R8(0,1,a/e)},so=1.70158,vs=so*1.525,Zh=so+1,Gh=2*Math.PI/3,Kh=2*Math.PI/4.5,bs=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,W8={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Zh*e*e*e-so*e*e,easeOutBack:e=>1+Zh*Math.pow(e-1,3)+so*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((vs+1)*2*e-vs)/2:(Math.pow(2*e-2,2)*((vs+1)*(e*2-2)+vs)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Gh),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Gh)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Kh))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Kh)/2+1,easeInBounce:e=>1-bs(1-e),easeOutBounce:bs,easeInOutBounce:e=>e<.5?(1-bs(1-2*e))/2:(1+bs(2*e-1))/2,steps:B8},Ti=Symbol.for("FluidValue.get"),ta=Symbol.for("FluidValue.observers"),kt=e=>!!(e&&e[Ti]),dt=e=>e&&e[Ti]?e[Ti]():e,Xh=e=>e[ta]||null;function q8(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Oi(e,t){const n=e[ta];n&&n.forEach(r=>{q8(r,t)})}var Tv=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");H8(this,e)}},H8=(e,t)=>Ov(e,Ti,t);function la(e,t){if(e[Ti]){let n=e[ta];n||Ov(e,ta,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Ci(e,t){const n=e[ta];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[ta]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Ov=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),js=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,V8=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Jh=new RegExp(`(${js.source})(%|[a-z]+)`,"i"),Y8=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Qo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Cv=e=>{const[t,n]=Z8(e);if(!t||Ld())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const a=window.getComputedStyle(document.documentElement).getPropertyValue(n);return a||e}else{if(n&&Qo.test(n))return Cv(n);if(n)return n}return e},Z8=e=>{const t=Qo.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Cu,G8=(e,t,n,r,a)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${a})`,Ev=e=>{Cu||(Cu=Nn?new RegExp(`(${Object.keys(Nn).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>dt(i).replace(Qo,Cv).replace(V8,Yh).replace(Cu,Yh)),n=t.map(i=>i.match(js).map(Number)),a=n[0].map((i,s)=>n.map(o=>{if(!(s in o))throw Error('The arity of each "output" value must be equal');return o[s]})).map(i=>wi({...e,output:i}));return i=>{var c;const s=!Jh.test(t[0])&&((c=t.find(u=>Jh.test(u)))==null?void 0:c.replace(js,""));let o=0;return t[0].replace(js,()=>`${a[o++](i)}${s||""}`).replace(Y8,G8)}},Bd="react-spring: ",Sv=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Bd}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},K8=Sv(console.warn);function X8(){K8(`${Bd}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var J8=Sv(console.warn);function Q8(){J8(`${Bd}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function ec(e){return q.str(e)&&(e[0]=="#"||/\d/.test(e)||!Ld()&&Qo.test(e)||e in(Nn||{}))}var rr=Ld()?p.useEffect:p.useLayoutEffect,eO=()=>{const e=p.useRef(!1);return rr(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Wd(){const e=p.useState()[1],t=eO();return()=>{t.current&&e(Math.random())}}function tO(e,t){const[n]=p.useState(()=>({inputs:t,result:e()})),r=p.useRef(),a=r.current;let i=a;return i?t&&i.inputs&&nO(t,i.inputs)||(i={inputs:t,result:e()}):i=n,p.useEffect(()=>{r.current=i,a==n&&(n.inputs=n.result=void 0)},[i]),i.result}function nO(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var qd=e=>p.useEffect(e,rO),rO=[];function wl(e){const t=p.useRef();return p.useEffect(()=>{t.current=e}),t.current}var Ei=Symbol.for("Animated:node"),aO=e=>!!e&&e[Ei]===e,Vt=e=>e&&e[Ei],Hd=(e,t)=>C8(e,Ei,t),tc=e=>e&&e[Ei]&&e[Ei].getPayload(),kv=class{constructor(){Hd(this,this)}getPayload(){return this.payload||[]}},qi=class extends kv{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,q.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new qi(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return q.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,q.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Si=class extends qi{constructor(e){super(0),this._string=null,this._toString=wi({output:[e,e]})}static create(e){return new Si(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(q.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=wi({output:[this.getValue(),e]})),this._value=0,super.reset()}},oo={dependencies:null},nc=class extends kv{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Qt(this.source,(n,r)=>{aO(n)?t[r]=n.getValue(e):kt(n)?t[r]=dt(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&ve(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Qt(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){oo.dependencies&&kt(e)&&oo.dependencies.add(e);const t=tc(e);t&&ve(t,n=>this.add(n))}},Rv=class extends nc{constructor(e){super(e)}static create(e){return new Rv(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(iO)),!0)}};function iO(e){return(ec(e)?Si:qi).create(e)}function Tl(e){const t=Vt(e);return t?t.constructor:q.arr(e)?Rv:ec(e)?Si:qi}var Qh=(e,t)=>{const n=!q.fun(e)||e.prototype&&e.prototype.isReactComponent;return p.forwardRef((r,a)=>{const i=p.useRef(null),s=n&&p.useCallback(g=>{i.current=cO(a,g)},[a]),[o,c]=oO(r,t),u=Wd(),l=()=>{const g=i.current;if(n&&!g)return;(g?t.applyAnimatedValues(g,o.getValue(!0)):!1)===!1&&u()},d=new sO(l,c),f=p.useRef();rr(()=>(f.current=d,ve(c,g=>la(g,d)),()=>{f.current&&(ve(f.current.deps,g=>Ci(g,f.current)),be.cancel(f.current.update))})),p.useEffect(l,[]),qd(()=>()=>{const g=f.current;ve(g.deps,v=>Ci(v,g))});const m=t.getComponentProps(o.getValue());return oe.createElement(e,{...m,ref:s})})},sO=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&be.write(this.update)}};function oO(e,t){const n=new Set;return oo.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new nc(e),oo.dependencies=null,[e,n]}function cO(e,t){return e&&(q.fun(e)?e(t):e.current=t),t}var ep=Symbol.for("AnimatedComponent"),uO=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=a=>new nc(a),getComponentProps:r=a=>a}={})=>{const a={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=s=>{const o=tp(s)||"Anonymous";return q.str(s)?s=i[s]||(i[s]=Qh(s,a)):s=s[ep]||(s[ep]=Qh(s,a)),s.displayName=`Animated(${o})`,s};return Qt(e,(s,o)=>{q.arr(e)&&(o=tp(s)),i[o]=i(s)}),{animated:i}},tp=e=>q.str(e)?e:e&&q.str(e.displayName)?e.displayName:q.fun(e)&&e.name||null;function ft(e,...t){return q.fun(e)?e(...t):e}var ti=(e,t)=>e===!0||!!(t&&e&&(q.fun(e)?e(t):ct(e).includes(t))),Av=(e,t)=>q.obj(e)?t&&e[t]:e,Mv=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,lO=e=>e,rc=(e,t=lO)=>{let n=dO;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const a of n){const i=t(e[a],a);q.und(i)||(r[a]=i)}return r},dO=["config","onProps","onStart","onChange","onPause","onResume","onRest"],fO={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function hO(e){const t={};let n=0;if(Qt(e,(r,a)=>{fO[a]||(t[a]=r,n++)}),n)return t}function Vd(e){const t=hO(e);if(t){const n={to:t};return Qt(e,(r,a)=>a in t||(n[a]=r)),n}return{...e}}function ki(e){return e=dt(e),q.arr(e)?e.map(ki):ec(e)?Ut.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function $v(e){for(const t in e)return!0;return!1}function Ol(e){return q.fun(e)||q.arr(e)&&q.obj(e[0])}function Cl(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function jv(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var Yd={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},El={...Yd.default,mass:1,damping:1,easing:W8.linear,clamp:!1},pO=class{constructor(){this.velocity=0,Object.assign(this,El)}};function mO(e,t,n){n&&(n={...n},np(n,t),t={...n,...t}),np(e,t),Object.assign(e,t);for(const s in El)e[s]==null&&(e[s]=El[s]);let{frequency:r,damping:a}=e;const{mass:i}=e;return q.und(r)||(r<.01&&(r=.01),a<0&&(a=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*a*i/r),e}function np(e,t){if(!q.und(t.decay))e.duration=void 0;else{const n=!q.und(t.tension)||!q.und(t.friction);(n||!q.und(t.frequency)||!q.und(t.damping)||!q.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var rp=[],gO=class{constructor(){this.changed=!1,this.values=rp,this.toValues=null,this.fromValues=rp,this.config=new pO,this.immediate=!1}};function Pv(e,{key:t,props:n,defaultProps:r,state:a,actions:i}){return new Promise((s,o)=>{let c,u,l=ti(n.cancel??(r==null?void 0:r.cancel),t);if(l)m();else{q.und(n.pause)||(a.paused=ti(n.pause,t));let g=r==null?void 0:r.pause;g!==!0&&(g=a.paused||ti(g,t)),c=ft(n.delay||0,t),g?(a.resumeQueue.add(f),i.pause()):(i.resume(),f())}function d(){a.resumeQueue.add(f),a.timeouts.delete(u),u.cancel(),c=u.time-be.now()}function f(){c>0&&!Ut.skipAnimation?(a.delayed=!0,u=be.setTimeout(m,c),a.pauseQueue.add(d),a.timeouts.add(u)):m()}function m(){a.delayed&&(a.delayed=!1),a.pauseQueue.delete(d),a.timeouts.delete(u),e<=(a.cancelId||0)&&(l=!0);try{i.start({...n,callId:e,cancel:l},s)}catch(g){o(g)}}})}var Zd=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Br(e.get()):t.every(n=>n.noop)?Iv(e.get()):$t(e.get(),t.every(n=>n.finished)),Iv=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),$t=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Br=e=>({value:e,cancelled:!0,finished:!1});function Nv(e,t,n,r){const{callId:a,parentId:i,onRest:s}=t,{asyncTo:o,promise:c}=n;return!i&&e===o&&!t.reset?c:n.promise=(async()=>{n.asyncId=a,n.asyncTo=e;const u=rc(t,(h,w)=>w==="onRest"?void 0:h);let l,d;const f=new Promise((h,w)=>(l=h,d=w)),m=h=>{const w=a<=(n.cancelId||0)&&Br(r)||a!==n.asyncId&&$t(r,!1);if(w)throw h.result=w,d(h),h},g=(h,w)=>{const x=new ap,b=new ip;return(async()=>{if(Ut.skipAnimation)throw Ri(n),b.result=$t(r,!1),d(b),b;m(x);const T=q.obj(h)?{...h}:{...w,to:h};T.parentId=a,Qt(u,(S,$)=>{q.und(T[$])&&(T[$]=S)});const _=await r.start(T);return m(x),n.paused&&await new Promise(S=>{n.resumeQueue.add(S)}),_})()};let v;if(Ut.skipAnimation)return Ri(n),$t(r,!1);try{let h;q.arr(e)?h=(async w=>{for(const x of w)await g(x)})(e):h=Promise.resolve(e(g,r.stop.bind(r))),await Promise.all([h.then(l),f]),v=$t(r.get(),!0,!1)}catch(h){if(h instanceof ap)v=h.result;else if(h instanceof ip)v=h.result;else throw h}finally{a==n.asyncId&&(n.asyncId=i,n.asyncTo=i?o:void 0,n.promise=i?c:void 0)}return q.fun(s)&&be.batchedUpdates(()=>{s(v,r,r.item)}),v})()}function Ri(e,t){Qa(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var ap=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},ip=class extends Error{constructor(){super("SkipAnimationSignal")}},Sl=e=>e instanceof Gd,vO=1,Gd=class extends Tv{constructor(){super(...arguments),this.id=vO++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Vt(this);return e&&e.getValue()}to(...e){return Ut.to(this,e)}interpolate(...e){return X8(),Ut.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Oi(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Xo.sort(this),Oi(this,{type:"priority",parent:this,priority:e})}},gr=Symbol.for("SpringPhase"),Dv=1,kl=2,Rl=4,Eu=e=>(e[gr]&Dv)>0,Sn=e=>(e[gr]&kl)>0,Ia=e=>(e[gr]&Rl)>0,sp=(e,t)=>t?e[gr]|=kl|Dv:e[gr]&=~kl,op=(e,t)=>t?e[gr]|=Rl:e[gr]&=~Rl,bO=class extends Gd{constructor(e,t){if(super(),this.animation=new gO,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!q.und(e)||!q.und(t)){const n=q.obj(e)?{...e}:{...t,from:e};q.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Sn(this)||this._state.asyncTo)||Ia(this)}get goal(){return dt(this.animation.to)}get velocity(){const e=Vt(this);return e instanceof qi?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return Eu(this)}get isAnimating(){return Sn(this)}get isPaused(){return Ia(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:a}=r;const{config:i}=r,s=tc(r.to);!s&&kt(r.to)&&(a=ct(dt(r.to))),r.values.forEach((u,l)=>{if(u.done)return;const d=u.constructor==Si?1:s?s[l].lastPosition:a[l];let f=r.immediate,m=d;if(!f){if(m=u.lastPosition,i.tension<=0){u.done=!0;return}let g=u.elapsedTime+=e;const v=r.fromValues[l],h=u.v0!=null?u.v0:u.v0=q.arr(i.velocity)?i.velocity[l]:i.velocity;let w;const x=i.precision||(v==d?.005:Math.min(1,Math.abs(d-v)*.001));if(q.und(i.duration))if(i.decay){const b=i.decay===!0?.998:i.decay,T=Math.exp(-(1-b)*g);m=v+h/(1-b)*(1-T),f=Math.abs(u.lastPosition-m)<=x,w=h*T}else{w=u.lastVelocity==null?h:u.lastVelocity;const b=i.restVelocity||x/10,T=i.clamp?0:i.bounce,_=!q.und(T),S=v==d?u.v0>0:v<d;let $,D=!1;const I=1,M=Math.ceil(e/I);for(let k=0;k<M&&($=Math.abs(w)>b,!(!$&&(f=Math.abs(d-m)<=x,f)));++k){_&&(D=m==d||m>d==S,D&&(w=-w*T,m=d));const Y=-i.tension*1e-6*(m-d),A=-i.friction*.001*w,R=(Y+A)/i.mass;w=w+R*I,m=m+w*I}}else{let b=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,u.durationProgress>0&&(u.elapsedTime=i.duration*u.durationProgress,g=u.elapsedTime+=e)),b=(i.progress||0)+g/this._memoizedDuration,b=b>1?1:b<0?0:b,u.durationProgress=b),m=v+i.easing(b)*(d-v),w=(m-u.lastPosition)/e,f=b==1}u.lastVelocity=w,Number.isNaN(m)&&(console.warn("Got NaN while animating:",this),f=!0)}s&&!s[l].done&&(f=!1),f?u.done=!0:t=!1,u.setValue(m,i.round)&&(n=!0)});const o=Vt(this),c=o.getValue();if(t){const u=dt(r.to);(c!==u||n)&&!i.decay?(o.setValue(u),this._onChange(u)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return be.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Sn(this)){const{to:e,config:t}=this.animation;be.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return q.und(e)?(n=this.queue||[],this.queue=[]):n=[q.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>Zd(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Ri(this._state,e&&this._lastCallId),be.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=q.obj(n)?n[t]:n,(n==null||Ol(n))&&(n=void 0),r=q.obj(r)?r[t]:r,r==null&&(r=void 0);const a={to:n,from:r};return Eu(this)||(e.reverse&&([n,r]=[r,n]),r=dt(r),q.und(r)?Vt(this)||this._set(n):this._set(r)),a}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,rc(e,(s,o)=>/^on/.test(o)?Av(s,n):s)),up(this,e,"onProps"),Da(this,"onProps",e,this);const a=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Pv(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Ia(this)||(op(this,!0),Za(i.pauseQueue),Da(this,"onPause",$t(this,Na(this,this.animation.to)),this))},resume:()=>{Ia(this)&&(op(this,!1),Sn(this)&&this._resume(),Za(i.resumeQueue),Da(this,"onResume",$t(this,Na(this,this.animation.to)),this))},start:this._merge.bind(this,a)}}).then(s=>{if(e.loop&&s.finished&&!(t&&s.noop)){const o=Fv(e);if(o)return this._update(o,!0)}return s})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Br(this));const r=!q.und(e.to),a=!q.und(e.from);if(r||a)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Br(this));const{key:i,defaultProps:s,animation:o}=this,{to:c,from:u}=o;let{to:l=c,from:d=u}=e;a&&!r&&(!t.default||q.und(l))&&(l=d),t.reverse&&([l,d]=[d,l]);const f=!cn(d,u);f&&(o.from=d),d=dt(d);const m=!cn(l,c);m&&this._focus(l);const g=Ol(t.to),{config:v}=o,{decay:h,velocity:w}=v;(r||a)&&(v.velocity=0),t.config&&!g&&mO(v,ft(t.config,i),t.config!==s.config?ft(s.config,i):void 0);let x=Vt(this);if(!x||q.und(l))return n($t(this,!0));const b=q.und(t.reset)?a&&!t.default:!q.und(d)&&ti(t.reset,i),T=b?d:this.get(),_=ki(l),S=q.num(_)||q.arr(_)||ec(_),$=!g&&(!S||ti(s.immediate||t.immediate,i));if(m){const k=Tl(l);if(k!==x.constructor)if($)x=this._set(_);else throw Error(`Cannot animate between ${x.constructor.name} and ${k.name}, as the "to" prop suggests`)}const D=x.constructor;let I=kt(l),M=!1;if(!I){const k=b||!Eu(this)&&f;(m||k)&&(M=cn(ki(T),_),I=!M),(!cn(o.immediate,$)&&!$||!cn(v.decay,h)||!cn(v.velocity,w))&&(I=!0)}if(M&&Sn(this)&&(o.changed&&!b?I=!0:I||this._stop(c)),!g&&((I||kt(c))&&(o.values=x.getPayload(),o.toValues=kt(l)?null:D==Si?[1]:ct(_)),o.immediate!=$&&(o.immediate=$,!$&&!b&&this._set(c)),I)){const{onRest:k}=o;ve(_O,A=>up(this,t,A));const Y=$t(this,Na(this,c));Za(this._pendingCalls,Y),this._pendingCalls.add(n),o.changed&&be.batchedUpdates(()=>{var A;o.changed=!b,k==null||k(Y,this),b?ft(s.onRest,Y):(A=o.onStart)==null||A.call(o,Y,this)})}b&&this._set(T),g?n(Nv(t.to,t,this._state,this)):I?this._start():Sn(this)&&!m?this._pendingCalls.add(n):n(Iv(T))}_focus(e){const t=this.animation;e!==t.to&&(Xh(this)&&this._detach(),t.to=e,Xh(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;kt(t)&&(la(t,this),Sl(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;kt(e)&&Ci(e,this)}_set(e,t=!0){const n=dt(e);if(!q.und(n)){const r=Vt(this);if(!r||!cn(n,r.getValue())){const a=Tl(n);!r||r.constructor!=a?Hd(this,a.create(n)):r.setValue(n),r&&be.batchedUpdates(()=>{this._onChange(n,t)})}}return Vt(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Da(this,"onStart",$t(this,Na(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),ft(this.animation.onChange,e,this)),ft(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Vt(this).reset(dt(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),Sn(this)||(sp(this,!0),Ia(this)||this._resume())}_resume(){Ut.skipAnimation?this.finish():Xo.start(this)}_stop(e,t){if(Sn(this)){sp(this,!1);const n=this.animation;ve(n.values,a=>{a.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Oi(this,{type:"idle",parent:this});const r=t?Br(this.get()):$t(this.get(),Na(this,e??n.to));Za(this._pendingCalls,r),n.changed&&(n.changed=!1,Da(this,"onRest",r,this))}}};function Na(e,t){const n=ki(t),r=ki(e.get());return cn(r,n)}function Fv(e,t=e.loop,n=e.to){const r=ft(t);if(r){const a=r!==!0&&Vd(r),i=(a||e).reverse,s=!a||a.reset;return Ai({...e,loop:t,default:!1,pause:void 0,to:!i||Ol(n)?n:void 0,from:s?e.from:void 0,reset:s,...a})}}function Ai(e){const{to:t,from:n}=e=Vd(e),r=new Set;return q.obj(t)&&cp(t,r),q.obj(n)&&cp(n,r),e.keys=r.size?Array.from(r):null,e}function yO(e){const t=Ai(e);return q.und(t.default)&&(t.default=rc(t)),t}function cp(e,t){Qt(e,(n,r)=>n!=null&&t.add(r))}var _O=["onStart","onRest","onChange","onPause","onResume"];function up(e,t,n){e.animation[n]=t[n]!==Mv(t,n)?Av(t[n],e.key):void 0}function Da(e,t,...n){var r,a,i,s;(a=(r=e.animation)[t])==null||a.call(r,...n),(s=(i=e.defaultProps)[t])==null||s.call(i,...n)}var xO=["onStart","onChange","onRest"],wO=1,Lv=class{constructor(e,t){this.id=wO++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];q.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Ai(e)),this}start(e){let{queue:t}=this;return e?t=ct(e).map(Ai):this.queue=[],this._flush?this._flush(this,t):(qv(this,t),Al(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;ve(ct(t),r=>n[r].stop(!!e))}else Ri(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(q.und(e))this.start({pause:!0});else{const t=this.springs;ve(ct(e),n=>t[n].pause())}return this}resume(e){if(q.und(e))this.start({pause:!1});else{const t=this.springs;ve(ct(e),n=>t[n].resume())}return this}each(e){Qt(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,a=this._changed.size>0;(r&&!this._started||a&&!this._started)&&(this._started=!0,Qa(e,([o,c])=>{c.value=this.get(),o(c,this,this._item)}));const i=!r&&this._started,s=a||i&&n.size?this.get():null;a&&t.size&&Qa(t,([o,c])=>{c.value=s,o(c,this,this._item)}),i&&(this._started=!1,Qa(n,([o,c])=>{c.value=s,o(c,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;be.onFrame(this._onFrame)}};function Al(e,t){return Promise.all(t.map(n=>Uv(e,n))).then(n=>Zd(e,n))}async function Uv(e,t,n){const{keys:r,to:a,from:i,loop:s,onRest:o,onResolve:c}=t,u=q.obj(t.default)&&t.default;s&&(t.loop=!1),a===!1&&(t.to=null),i===!1&&(t.from=null);const l=q.arr(a)||q.fun(a)?a:void 0;l?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):ve(xO,v=>{const h=t[v];if(q.fun(h)){const w=e._events[v];t[v]=({finished:x,cancelled:b})=>{const T=w.get(h);T?(x||(T.finished=!1),b&&(T.cancelled=!0)):w.set(h,{value:null,finished:x||!1,cancelled:b||!1})},u&&(u[v]=t[v])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Za(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),m=t.cancel===!0||Mv(t,"cancel")===!0;(l||m&&d.asyncId)&&f.push(Pv(++e._lastAsyncId,{props:t,state:d,actions:{pause:_l,resume:_l,start(v,h){m?(Ri(d,e._lastAsyncId),h(Br(e))):(v.onRest=o,h(Nv(l,v,d,e)))}}})),d.paused&&await new Promise(v=>{d.resumeQueue.add(v)});const g=Zd(e,await Promise.all(f));if(s&&g.finished&&!(n&&g.noop)){const v=Fv(t,s,a);if(v)return qv(e,[v]),Uv(e,v,!0)}return c&&be.batchedUpdates(()=>c(g,e,e.item)),g}function Ml(e,t){const n={...e.springs};return t&&ve(ct(t),r=>{q.und(r.keys)&&(r=Ai(r)),q.obj(r.to)||(r={...r,to:void 0}),Wv(n,r,a=>Bv(a))}),zv(e,n),n}function zv(e,t){Qt(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,la(n,e))})}function Bv(e,t){const n=new bO;return n.key=e,t&&la(n,t),n}function Wv(e,t,n){t.keys&&ve(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function qv(e,t){ve(t,n=>{Wv(e.springs,n,r=>Bv(r,e))})}var Hi=({children:e,...t})=>{const n=p.useContext(co),r=t.pause||!!n.pause,a=t.immediate||!!n.immediate;t=tO(()=>({pause:r,immediate:a}),[r,a]);const{Provider:i}=co;return oe.createElement(i,{value:t},e)},co=TO(Hi,{});Hi.Provider=co.Provider;Hi.Consumer=co.Consumer;function TO(e,t){return Object.assign(e,oe.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Hv=()=>{const e=[],t=function(r){Q8();const a=[];return ve(e,(i,s)=>{if(q.und(r))a.push(i.start());else{const o=n(r,i,s);o&&a.push(i.start(o))}}),a};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const a=e.indexOf(r);~a&&e.splice(a,1)},t.pause=function(){return ve(e,r=>r.pause(...arguments)),this},t.resume=function(){return ve(e,r=>r.resume(...arguments)),this},t.set=function(r){ve(e,(a,i)=>{const s=q.fun(r)?r(i,a):r;s&&a.set(s)})},t.start=function(r){const a=[];return ve(e,(i,s)=>{if(q.und(r))a.push(i.start());else{const o=this._getProps(r,i,s);o&&a.push(i.start(o))}}),a},t.stop=function(){return ve(e,r=>r.stop(...arguments)),this},t.update=function(r){return ve(e,(a,i)=>a.update(this._getProps(r,a,i))),this};const n=function(r,a,i){return q.fun(r)?r(i,a):r};return t._getProps=n,t};function OO(e,t,n){const r=q.fun(t)&&t;r&&!n&&(n=[]);const a=p.useMemo(()=>r||arguments.length==3?Hv():void 0,[]),i=p.useRef(0),s=Wd(),o=p.useMemo(()=>({ctrls:[],queue:[],flush(w,x){const b=Ml(w,x);return i.current>0&&!o.queue.length&&!Object.keys(b).some(_=>!w.springs[_])?Al(w,x):new Promise(_=>{zv(w,b),o.queue.push(()=>{_(Al(w,x))}),s()})}}),[]),c=p.useRef([...o.ctrls]),u=[],l=wl(e)||0;p.useMemo(()=>{ve(c.current.slice(e,l),w=>{Cl(w,a),w.stop(!0)}),c.current.length=e,d(l,e)},[e]),p.useMemo(()=>{d(0,Math.min(l,e))},n);function d(w,x){for(let b=w;b<x;b++){const T=c.current[b]||(c.current[b]=new Lv(null,o.flush)),_=r?r(b,T):t[b];_&&(u[b]=yO(_))}}const f=c.current.map((w,x)=>Ml(w,u[x])),m=p.useContext(Hi),g=wl(m),v=m!==g&&$v(m);rr(()=>{i.current++,o.ctrls=c.current;const{queue:w}=o;w.length&&(o.queue=[],ve(w,x=>x())),ve(c.current,(x,b)=>{a==null||a.add(x),v&&x.start({default:m});const T=u[b];T&&(jv(x,T.ref),x.ref?x.queue.push(T):x.start(T))})}),qd(()=>()=>{ve(o.ctrls,w=>w.stop(!0))});const h=f.map(w=>({...w}));return a?[h,a]:h}function Kd(e,t){const n=q.fun(e),[[r],a]=OO(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,a]:r}function Xd(e,t,n){const r=q.fun(t)&&t,{reset:a,sort:i,trail:s=0,expires:o=!0,exitBeforeEnter:c=!1,onDestroyed:u,ref:l,config:d}=r?r():t,f=p.useMemo(()=>r||arguments.length==3?Hv():void 0,[]),m=ct(e),g=[],v=p.useRef(null),h=a?null:v.current;rr(()=>{v.current=g}),qd(()=>(ve(g,R=>{f==null||f.add(R.ctrl),R.ctrl.ref=f}),()=>{ve(v.current,R=>{R.expired&&clearTimeout(R.expirationId),Cl(R.ctrl,f),R.ctrl.stop(!0)})}));const w=EO(m,r?r():t,h),x=a&&v.current||[];rr(()=>ve(x,({ctrl:R,item:F,key:B})=>{Cl(R,f),ft(u,F,B)}));const b=[];if(h&&ve(h,(R,F)=>{R.expired?(clearTimeout(R.expirationId),x.push(R)):(F=b[F]=w.indexOf(R.key),~F&&(g[F]=R))}),ve(m,(R,F)=>{g[F]||(g[F]={key:w[F],item:R,phase:"mount",ctrl:new Lv},g[F].ctrl.item=R)}),b.length){let R=-1;const{leave:F}=r?r():t;ve(b,(B,L)=>{const G=h[L];~B?(R=g.indexOf(G),g[R]={...G,item:m[B]}):F&&g.splice(++R,0,G)})}q.fun(i)&&g.sort((R,F)=>i(R.item,F.item));let T=-s;const _=Wd(),S=rc(t),$=new Map,D=p.useRef(new Map),I=p.useRef(!1);ve(g,(R,F)=>{const B=R.key,L=R.phase,G=r?r():t;let Z,j;const U=ft(G.delay||0,B);if(L=="mount")Z=G.enter,j="enter";else{const X=w.indexOf(B)<0;if(L!="leave")if(X)Z=G.leave,j="leave";else if(Z=G.update)j="update";else return;else if(!X)Z=G.enter,j="enter";else return}if(Z=ft(Z,R.item,F),Z=q.obj(Z)?Vd(Z):{to:Z},!Z.config){const X=d||S.config;Z.config=ft(X,R.item,F,j)}T+=s;const J={...S,delay:U+T,ref:l,immediate:G.immediate,reset:!1,...Z};if(j=="enter"&&q.und(J.from)){const X=r?r():t,V=q.und(X.initial)||h?X.from:X.initial;J.from=ft(V,R.item,F)}const{onResolve:te}=J;J.onResolve=X=>{ft(te,X);const V=v.current,Q=V.find(ee=>ee.key===B);if(Q&&!(X.cancelled&&Q.phase!="update")&&Q.ctrl.idle){const ee=V.every(N=>N.ctrl.idle);if(Q.phase=="leave"){const N=ft(o,Q.item);if(N!==!1){const W=N===!0?0:N;if(Q.expired=!0,!ee&&W>0){W<=2147483647&&(Q.expirationId=setTimeout(_,W));return}}}ee&&V.some(N=>N.expired)&&(D.current.delete(Q),c&&(I.current=!0),_())}};const K=Ml(R.ctrl,J);j==="leave"&&c?D.current.set(R,{phase:j,springs:K,payload:J}):$.set(R,{phase:j,springs:K,payload:J})});const M=p.useContext(Hi),k=wl(M),Y=M!==k&&$v(M);rr(()=>{Y&&ve(g,R=>{R.ctrl.start({default:M})})},[M]),ve($,(R,F)=>{if(D.current.size){const B=g.findIndex(L=>L.key===F.key);g.splice(B,1)}}),rr(()=>{ve(D.current.size?D.current:$,({phase:R,payload:F},B)=>{const{ctrl:L}=B;B.phase=R,f==null||f.add(L),Y&&R=="enter"&&L.start({default:M}),F&&(jv(L,F.ref),(L.ref||f)&&!I.current?L.update(F):(L.start(F),I.current&&(I.current=!1)))})},a?void 0:n);const A=R=>oe.createElement(oe.Fragment,null,g.map((F,B)=>{const{springs:L}=$.get(F)||F.ctrl,G=R({...L},F.item,F,B);return G&&G.type?oe.createElement(G.type,{...G.props,key:q.str(F.key)||q.num(F.key)?F.key:F.ctrl.id,ref:G.ref}):G}));return f?[A,f]:A}var CO=1;function EO(e,{key:t,keys:n=t},r){if(n===null){const a=new Set;return e.map(i=>{const s=r&&r.find(o=>o.item===i&&o.phase!=="leave"&&!a.has(o));return s?(a.add(s),s.key):CO++})}return q.und(n)?e:q.fun(n)?e.map(n):ct(n)}var Vv=class extends Gd{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=wi(...t);const n=this._get(),r=Tl(n);Hd(this,r.create(n))}advance(e){const t=this._get(),n=this.get();cn(t,n)||(Vt(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&lp(this._active)&&Su(this)}_get(){const e=q.arr(this.source)?this.source.map(dt):ct(dt(this.source));return this.calc(...e)}_start(){this.idle&&!lp(this._active)&&(this.idle=!1,ve(tc(this),e=>{e.done=!1}),Ut.skipAnimation?(be.batchedUpdates(()=>this.advance()),Su(this)):Xo.start(this))}_attach(){let e=1;ve(ct(this.source),t=>{kt(t)&&la(t,this),Sl(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){ve(ct(this.source),e=>{kt(e)&&Ci(e,this)}),this._active.clear(),Su(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=ct(this.source).reduce((t,n)=>Math.max(t,(Sl(n)?n.priority:0)+1),0))}};function SO(e){return e.idle!==!1}function lp(e){return!e.size||Array.from(e).every(SO)}function Su(e){e.idle||(e.idle=!0,ve(tc(e),t=>{t.done=!0}),Oi(e,{type:"idle",parent:e}))}var Vi=(e,...t)=>new Vv(e,t);Ut.assign({createStringInterpolator:Ev,to:(e,t)=>new Vv(e,t)});var Yv=/^--/;function kO(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!Yv.test(e)&&!(ni.hasOwnProperty(e)&&ni[e])?t+"px":(""+t).trim()}var dp={};function RO(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:a,scrollTop:i,scrollLeft:s,viewBox:o,...c}=t,u=Object.values(c),l=Object.keys(c).map(d=>n||e.hasAttribute(d)?d:dp[d]||(dp[d]=d.replace(/([A-Z])/g,f=>"-"+f.toLowerCase())));a!==void 0&&(e.textContent=a);for(const d in r)if(r.hasOwnProperty(d)){const f=kO(d,r[d]);Yv.test(d)?e.style.setProperty(d,f):e.style[d]=f}l.forEach((d,f)=>{e.setAttribute(d,u[f])}),i!==void 0&&(e.scrollTop=i),s!==void 0&&(e.scrollLeft=s),o!==void 0&&e.setAttribute("viewBox",o)}var ni={animationIterationCount:!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,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},AO=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),MO=["Webkit","Ms","Moz","O"];ni=Object.keys(ni).reduce((e,t)=>(MO.forEach(n=>e[AO(n,t)]=e[t]),e),ni);var $O=/^(matrix|translate|scale|rotate|skew)/,jO=/^(translate)/,PO=/^(rotate|skew)/,ku=(e,t)=>q.num(e)&&e!==0?e+t:e,Ps=(e,t)=>q.arr(e)?e.every(n=>Ps(n,t)):q.num(e)?e===t:parseFloat(e)===t,IO=class extends nc{constructor({x:e,y:t,z:n,...r}){const a=[],i=[];(e||t||n)&&(a.push([e||0,t||0,n||0]),i.push(s=>[`translate3d(${s.map(o=>ku(o,"px")).join(",")})`,Ps(s,0)])),Qt(r,(s,o)=>{if(o==="transform")a.push([s||""]),i.push(c=>[c,c===""]);else if($O.test(o)){if(delete r[o],q.und(s))return;const c=jO.test(o)?"px":PO.test(o)?"deg":"";a.push(ct(s)),i.push(o==="rotate3d"?([u,l,d,f])=>[`rotate3d(${u},${l},${d},${ku(f,c)})`,Ps(f,0)]:u=>[`${o}(${u.map(l=>ku(l,c)).join(",")})`,Ps(u,o.startsWith("scale")?1:0)])}}),a.length&&(r.transform=new NO(a,i)),super(r)}},NO=class extends Tv{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return ve(this.inputs,(n,r)=>{const a=dt(n[0]),[i,s]=this.transforms[r](q.arr(a)?a:n.map(dt));e+=" "+i,t=t&&s}),t?"none":e}observerAdded(e){e==1&&ve(this.inputs,t=>ve(t,n=>kt(n)&&la(n,this)))}observerRemoved(e){e==0&&ve(this.inputs,t=>ve(t,n=>kt(n)&&Ci(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Oi(this,e)}},DO=["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","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"];Ut.assign({batchedUpdates:$n.unstable_batchedUpdates,createStringInterpolator:Ev,colors:A8});var FO=uO(DO,{applyAnimatedValues:RO,createAnimatedStyle:e=>new IO(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),dn=FO.animated;function vr(){return vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vr.apply(this,arguments)}var LO={pointerEvents:"none",position:"absolute",zIndex:10,top:0,left:0},fp=function(e,t){return"translate("+e+"px, "+t+"px)"},Zv=p.memo(function(e){var t,n=e.position,r=e.anchor,a=e.children,i=St(),s=va(),o=s.animate,c=s.config,u=_y(),l=u[0],d=u[1],f=p.useRef(!1),m=void 0,g=!1,v=d.width>0&&d.height>0,h=Math.round(n[0]),w=Math.round(n[1]);v&&(r==="top"?(h-=d.width/2,w-=d.height+14):r==="right"?(h+=14,w-=d.height/2):r==="bottom"?(h-=d.width/2,w+=14):r==="left"?(h-=d.width+14,w-=d.height/2):r==="center"&&(h-=d.width/2,w-=d.height/2),m={transform:fp(h,w)},f.current||(g=!0),f.current=[h,w]);var x=Kd({to:m,config:c,immediate:!o||g}),b=vr({},LO,i.tooltip.wrapper,{transform:(t=x.transform)!=null?t:fp(h,w),opacity:x.transform?1:0});return y.jsx(dn.div,{ref:l,style:b,children:a})});Zv.displayName="TooltipWrapper";var UO=p.memo(function(e){var t=e.size,n=t===void 0?12:t,r=e.color,a=e.style;return y.jsx("span",{style:vr({display:"block",width:n,height:n,background:r},a===void 0?{}:a)})}),zO=p.memo(function(e){var t,n=e.id,r=e.value,a=e.format,i=e.enableChip,s=i!==void 0&&i,o=e.color,c=e.renderContent,u=St(),l=xy(a);if(typeof c=="function")t=c();else{var d=r;l!==void 0&&d!==void 0&&(d=l(d)),t=y.jsxs("div",{style:u.tooltip.basic,children:[s&&y.jsx(UO,{color:o,style:u.tooltip.chip}),d!==void 0?y.jsxs("span",{children:[n,": ",y.jsx("strong",{children:""+d})]}):n]})}return y.jsx("div",{style:u.tooltip.container,children:t})}),BO={width:"100%",borderCollapse:"collapse"},WO=p.memo(function(e){var t,n=e.title,r=e.rows,a=r===void 0?[]:r,i=e.renderContent,s=St();return a.length?(t=typeof i=="function"?i():y.jsxs("div",{children:[n&&n,y.jsx("table",{style:vr({},BO,s.tooltip.table),children:y.jsx("tbody",{children:a.map(function(o,c){return y.jsx("tr",{children:o.map(function(u,l){return y.jsx("td",{style:s.tooltip.tableCell,children:u},l)})},c)})})})]}),y.jsx("div",{style:s.tooltip.container,children:t})):null});WO.displayName="TableTooltip";var $l=p.memo(function(e){var t=e.x0,n=e.x1,r=e.y0,a=e.y1,i=St(),s=va(),o=s.animate,c=s.config,u=p.useMemo(function(){return vr({},i.crosshair.line,{pointerEvents:"none"})},[i.crosshair.line]),l=Kd({x1:t,x2:n,y1:r,y2:a,config:c,immediate:!o});return y.jsx(dn.line,vr({},l,{fill:"none",style:u}))});$l.displayName="CrosshairLine";var qO=p.memo(function(e){var t,n,r=e.width,a=e.height,i=e.type,s=e.x,o=e.y;return i==="cross"?(t={x0:s,x1:s,y0:0,y1:a},n={x0:0,x1:r,y0:o,y1:o}):i==="top-left"?(t={x0:s,x1:s,y0:0,y1:o},n={x0:0,x1:s,y0:o,y1:o}):i==="top"?t={x0:s,x1:s,y0:0,y1:o}:i==="top-right"?(t={x0:s,x1:s,y0:0,y1:o},n={x0:s,x1:r,y0:o,y1:o}):i==="right"?n={x0:s,x1:r,y0:o,y1:o}:i==="bottom-right"?(t={x0:s,x1:s,y0:o,y1:a},n={x0:s,x1:r,y0:o,y1:o}):i==="bottom"?t={x0:s,x1:s,y0:o,y1:a}:i==="bottom-left"?(t={x0:s,x1:s,y0:o,y1:a},n={x0:0,x1:s,y0:o,y1:o}):i==="left"?n={x0:0,x1:s,y0:o,y1:o}:i==="x"?t={x0:s,x1:s,y0:0,y1:a}:i==="y"&&(n={x0:0,x1:r,y0:o,y1:o}),y.jsxs(y.Fragment,{children:[t&&y.jsx($l,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}),n&&y.jsx($l,{x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1})]})});qO.displayName="Crosshair";var Gv=p.createContext({showTooltipAt:function(){},showTooltipFromEvent:function(){},hideTooltip:function(){}}),jl={isVisible:!1,position:[null,null],content:null,anchor:null},Kv=p.createContext(jl),HO=function(e){var t=p.useState(jl),n=t[0],r=t[1],a=p.useCallback(function(o,c,u){var l=c[0],d=c[1];u===void 0&&(u="top"),r({isVisible:!0,position:[l,d],anchor:u,content:o})},[r]),i=p.useCallback(function(o,c,u){u===void 0&&(u="top");var l=e.current.getBoundingClientRect(),d=e.current.offsetWidth,f=d===l.width?1:d/l.width,m="touches"in c?c.touches[0]:c,g=m.clientX,v=m.clientY,h=(g-l.left)*f,w=(v-l.top)*f;u!=="left"&&u!=="right"||(u=h<l.width/2?"right":"left"),r({isVisible:!0,position:[h,w],anchor:u,content:o})},[e,r]),s=p.useCallback(function(){r(jl)},[r]);return{actions:p.useMemo(function(){return{showTooltipAt:a,showTooltipFromEvent:i,hideTooltip:s}},[a,i,s]),state:n}},VO=function(){var e=p.useContext(Gv);if(e===void 0)throw new Error("useTooltip must be used within a TooltipProvider");return e},YO=function(){var e=p.useContext(Kv);if(e===void 0)throw new Error("useTooltipState must be used within a TooltipProvider");return e},ZO=function(e){return e.isVisible},GO=function(){var e=YO();return ZO(e)?y.jsx(Zv,{position:e.position,anchor:e.anchor,children:e.content}):null},KO=function(e){var t=e.container,n=e.children,r=HO(t),a=r.actions,i=r.state;return y.jsx(Gv.Provider,{value:a,children:y.jsx(Kv.Provider,{value:i,children:n})})};function XO(){this.__data__=[],this.size=0}var JO=XO;function QO(e,t){return e===t||e!==e&&t!==t}var Yi=QO,eC=Yi;function tC(e,t){for(var n=e.length;n--;)if(eC(e[n][0],t))return n;return-1}var ac=tC,nC=ac,rC=Array.prototype,aC=rC.splice;function iC(e){var t=this.__data__,n=nC(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():aC.call(t,n,1),--this.size,!0}var sC=iC,oC=ac;function cC(e){var t=this.__data__,n=oC(t,e);return n<0?void 0:t[n][1]}var uC=cC,lC=ac;function dC(e){return lC(this.__data__,e)>-1}var fC=dC,hC=ac;function pC(e,t){var n=this.__data__,r=hC(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var mC=pC,gC=JO,vC=sC,bC=uC,yC=fC,_C=mC;function da(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}da.prototype.clear=gC;da.prototype.delete=vC;da.prototype.get=bC;da.prototype.has=yC;da.prototype.set=_C;var ic=da,xC=ic;function wC(){this.__data__=new xC,this.size=0}var TC=wC;function OC(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var CC=OC;function EC(e){return this.__data__.get(e)}var SC=EC;function kC(e){return this.__data__.has(e)}var RC=kC,AC=typeof is=="object"&&is&&is.Object===Object&&is,Xv=AC,MC=Xv,$C=typeof self=="object"&&self&&self.Object===Object&&self,jC=MC||$C||Function("return this")(),tn=jC,PC=tn,IC=PC.Symbol,Zi=IC,hp=Zi,Jv=Object.prototype,NC=Jv.hasOwnProperty,DC=Jv.toString,Fa=hp?hp.toStringTag:void 0;function FC(e){var t=NC.call(e,Fa),n=e[Fa];try{e[Fa]=void 0;var r=!0}catch{}var a=DC.call(e);return r&&(t?e[Fa]=n:delete e[Fa]),a}var LC=FC,UC=Object.prototype,zC=UC.toString;function BC(e){return zC.call(e)}var WC=BC,pp=Zi,qC=LC,HC=WC,VC="[object Null]",YC="[object Undefined]",mp=pp?pp.toStringTag:void 0;function ZC(e){return e==null?e===void 0?YC:VC:mp&&mp in Object(e)?qC(e):HC(e)}var Tr=ZC;function GC(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Vn=GC,KC=Tr,XC=Vn,JC="[object AsyncFunction]",QC="[object Function]",eE="[object GeneratorFunction]",tE="[object Proxy]";function nE(e){if(!XC(e))return!1;var t=KC(e);return t==QC||t==eE||t==JC||t==tE}var sc=nE;const Qv=vt(sc);var rE=tn,aE=rE["__core-js_shared__"],iE=aE,Ru=iE,gp=function(){var e=/[^.]+$/.exec(Ru&&Ru.keys&&Ru.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function sE(e){return!!gp&&gp in e}var oE=sE,cE=Function.prototype,uE=cE.toString;function lE(e){if(e!=null){try{return uE.call(e)}catch{}try{return e+""}catch{}}return""}var eb=lE,dE=sc,fE=oE,hE=Vn,pE=eb,mE=/[\\^$.*+?()[\]{}|]/g,gE=/^\[object .+?Constructor\]$/,vE=Function.prototype,bE=Object.prototype,yE=vE.toString,_E=bE.hasOwnProperty,xE=RegExp("^"+yE.call(_E).replace(mE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wE(e){if(!hE(e)||fE(e))return!1;var t=dE(e)?xE:gE;return t.test(pE(e))}var TE=wE;function OE(e,t){return e==null?void 0:e[t]}var CE=OE,EE=TE,SE=CE;function kE(e,t){var n=SE(e,t);return EE(n)?n:void 0}var Or=kE,RE=Or,AE=tn,ME=RE(AE,"Map"),Jd=ME,$E=Or,jE=$E(Object,"create"),oc=jE,vp=oc;function PE(){this.__data__=vp?vp(null):{},this.size=0}var IE=PE;function NE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var DE=NE,FE=oc,LE="__lodash_hash_undefined__",UE=Object.prototype,zE=UE.hasOwnProperty;function BE(e){var t=this.__data__;if(FE){var n=t[e];return n===LE?void 0:n}return zE.call(t,e)?t[e]:void 0}var WE=BE,qE=oc,HE=Object.prototype,VE=HE.hasOwnProperty;function YE(e){var t=this.__data__;return qE?t[e]!==void 0:VE.call(t,e)}var ZE=YE,GE=oc,KE="__lodash_hash_undefined__";function XE(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=GE&&t===void 0?KE:t,this}var JE=XE,QE=IE,e7=DE,t7=WE,n7=ZE,r7=JE;function fa(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}fa.prototype.clear=QE;fa.prototype.delete=e7;fa.prototype.get=t7;fa.prototype.has=n7;fa.prototype.set=r7;var a7=fa,bp=a7,i7=ic,s7=Jd;function o7(){this.size=0,this.__data__={hash:new bp,map:new(s7||i7),string:new bp}}var c7=o7;function u7(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var l7=u7,d7=l7;function f7(e,t){var n=e.__data__;return d7(t)?n[typeof t=="string"?"string":"hash"]:n.map}var cc=f7,h7=cc;function p7(e){var t=h7(this,e).delete(e);return this.size-=t?1:0,t}var m7=p7,g7=cc;function v7(e){return g7(this,e).get(e)}var b7=v7,y7=cc;function _7(e){return y7(this,e).has(e)}var x7=_7,w7=cc;function T7(e,t){var n=w7(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var O7=T7,C7=c7,E7=m7,S7=b7,k7=x7,R7=O7;function ha(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ha.prototype.clear=C7;ha.prototype.delete=E7;ha.prototype.get=S7;ha.prototype.has=k7;ha.prototype.set=R7;var Qd=ha,A7=ic,M7=Jd,$7=Qd,j7=200;function P7(e,t){var n=this.__data__;if(n instanceof A7){var r=n.__data__;if(!M7||r.length<j7-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $7(r)}return n.set(e,t),this.size=n.size,this}var I7=P7,N7=ic,D7=TC,F7=CC,L7=SC,U7=RC,z7=I7;function pa(e){var t=this.__data__=new N7(e);this.size=t.size}pa.prototype.clear=D7;pa.prototype.delete=F7;pa.prototype.get=L7;pa.prototype.has=U7;pa.prototype.set=z7;var tb=pa,B7=Or,W7=function(){try{var e=B7(Object,"defineProperty");return e({},"",{}),e}catch{}}(),nb=W7,yp=nb;function q7(e,t,n){t=="__proto__"&&yp?yp(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var ef=q7,H7=ef,V7=Yi;function Y7(e,t,n){(n!==void 0&&!V7(e[t],n)||n===void 0&&!(t in e))&&H7(e,t,n)}var rb=Y7;function Z7(e){return function(t,n,r){for(var a=-1,i=Object(t),s=r(t),o=s.length;o--;){var c=s[e?o:++a];if(n(i[c],c,i)===!1)break}return t}}var G7=Z7,K7=G7,X7=K7(),J7=X7,uo={exports:{}};uo.exports;(function(e,t){var n=tn,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,s=i?n.Buffer:void 0,o=s?s.allocUnsafe:void 0;function c(u,l){if(l)return u.slice();var d=u.length,f=o?o(d):new u.constructor(d);return u.copy(f),f}e.exports=c})(uo,uo.exports);var Q7=uo.exports,eS=tn,tS=eS.Uint8Array,ab=tS,_p=ab;function nS(e){var t=new e.constructor(e.byteLength);return new _p(t).set(new _p(e)),t}var rS=nS,aS=rS;function iS(e,t){var n=t?aS(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var sS=iS;function oS(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var cS=oS,uS=Vn,xp=Object.create,lS=function(){function e(){}return function(t){if(!uS(t))return{};if(xp)return xp(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),dS=lS;function fS(e,t){return function(n){return e(t(n))}}var ib=fS,hS=ib,pS=hS(Object.getPrototypeOf,Object),sb=pS,mS=Object.prototype;function gS(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||mS;return e===n}var tf=gS,vS=dS,bS=sb,yS=tf;function _S(e){return typeof e.constructor=="function"&&!yS(e)?vS(bS(e)):{}}var xS=_S;function wS(e){return e!=null&&typeof e=="object"}var Yn=wS,TS=Tr,OS=Yn,CS="[object Arguments]";function ES(e){return OS(e)&&TS(e)==CS}var SS=ES,wp=SS,kS=Yn,ob=Object.prototype,RS=ob.hasOwnProperty,AS=ob.propertyIsEnumerable,MS=wp(function(){return arguments}())?wp:function(e){return kS(e)&&RS.call(e,"callee")&&!AS.call(e,"callee")},uc=MS,$S=Array.isArray,nn=$S,jS=9007199254740991;function PS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=jS}var nf=PS,IS=sc,NS=nf;function DS(e){return e!=null&&NS(e.length)&&!IS(e)}var lc=DS,FS=lc,LS=Yn;function US(e){return LS(e)&&FS(e)}var cb=US,lo={exports:{}};function zS(){return!1}var BS=zS;lo.exports;(function(e,t){var n=tn,r=BS,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,o=s?n.Buffer:void 0,c=o?o.isBuffer:void 0,u=c||r;e.exports=u})(lo,lo.exports);var rf=lo.exports,WS=Tr,qS=sb,HS=Yn,VS="[object Object]",YS=Function.prototype,ZS=Object.prototype,ub=YS.toString,GS=ZS.hasOwnProperty,KS=ub.call(Object);function XS(e){if(!HS(e)||WS(e)!=VS)return!1;var t=qS(e);if(t===null)return!0;var n=GS.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ub.call(n)==KS}var lb=XS;const af=vt(lb);var JS=Tr,QS=nf,ek=Yn,tk="[object Arguments]",nk="[object Array]",rk="[object Boolean]",ak="[object Date]",ik="[object Error]",sk="[object Function]",ok="[object Map]",ck="[object Number]",uk="[object Object]",lk="[object RegExp]",dk="[object Set]",fk="[object String]",hk="[object WeakMap]",pk="[object ArrayBuffer]",mk="[object DataView]",gk="[object Float32Array]",vk="[object Float64Array]",bk="[object Int8Array]",yk="[object Int16Array]",_k="[object Int32Array]",xk="[object Uint8Array]",wk="[object Uint8ClampedArray]",Tk="[object Uint16Array]",Ok="[object Uint32Array]",Le={};Le[gk]=Le[vk]=Le[bk]=Le[yk]=Le[_k]=Le[xk]=Le[wk]=Le[Tk]=Le[Ok]=!0;Le[tk]=Le[nk]=Le[pk]=Le[rk]=Le[mk]=Le[ak]=Le[ik]=Le[sk]=Le[ok]=Le[ck]=Le[uk]=Le[lk]=Le[dk]=Le[fk]=Le[hk]=!1;function Ck(e){return ek(e)&&QS(e.length)&&!!Le[JS(e)]}var Ek=Ck;function Sk(e){return function(t){return e(t)}}var db=Sk,fo={exports:{}};fo.exports;(function(e,t){var n=Xv,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,s=i&&n.process,o=function(){try{var c=a&&a.require&&a.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(fo,fo.exports);var kk=fo.exports,Rk=Ek,Ak=db,Tp=kk,Op=Tp&&Tp.isTypedArray,Mk=Op?Ak(Op):Rk,sf=Mk;function $k(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var fb=$k,jk=ef,Pk=Yi,Ik=Object.prototype,Nk=Ik.hasOwnProperty;function Dk(e,t,n){var r=e[t];(!(Nk.call(e,t)&&Pk(r,n))||n===void 0&&!(t in e))&&jk(e,t,n)}var hb=Dk,Fk=hb,Lk=ef;function Uk(e,t,n,r){var a=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var o=t[i],c=r?r(n[o],e[o],o,n,e):void 0;c===void 0&&(c=e[o]),a?Lk(n,o,c):Fk(n,o,c)}return n}var zk=Uk;function Bk(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Wk=Bk,qk=9007199254740991,Hk=/^(?:0|[1-9]\d*)$/;function Vk(e,t){var n=typeof e;return t=t??qk,!!t&&(n=="number"||n!="symbol"&&Hk.test(e))&&e>-1&&e%1==0&&e<t}var dc=Vk,Yk=Wk,Zk=uc,Gk=nn,Kk=rf,Xk=dc,Jk=sf,Qk=Object.prototype,e9=Qk.hasOwnProperty;function t9(e,t){var n=Gk(e),r=!n&&Zk(e),a=!n&&!r&&Kk(e),i=!n&&!r&&!a&&Jk(e),s=n||r||a||i,o=s?Yk(e.length,String):[],c=o.length;for(var u in e)(t||e9.call(e,u))&&!(s&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Xk(u,c)))&&o.push(u);return o}var pb=t9;function n9(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var r9=n9,a9=Vn,i9=tf,s9=r9,o9=Object.prototype,c9=o9.hasOwnProperty;function u9(e){if(!a9(e))return s9(e);var t=i9(e),n=[];for(var r in e)r=="constructor"&&(t||!c9.call(e,r))||n.push(r);return n}var l9=u9,d9=pb,f9=l9,h9=lc;function p9(e){return h9(e)?d9(e,!0):f9(e)}var mb=p9,m9=zk,g9=mb;function v9(e){return m9(e,g9(e))}var b9=v9,Cp=rb,y9=Q7,_9=sS,x9=cS,w9=xS,Ep=uc,Sp=nn,T9=cb,O9=rf,C9=sc,E9=Vn,S9=lb,k9=sf,kp=fb,R9=b9;function A9(e,t,n,r,a,i,s){var o=kp(e,n),c=kp(t,n),u=s.get(c);if(u){Cp(e,n,u);return}var l=i?i(o,c,n+"",e,t,s):void 0,d=l===void 0;if(d){var f=Sp(c),m=!f&&O9(c),g=!f&&!m&&k9(c);l=c,f||m||g?Sp(o)?l=o:T9(o)?l=x9(o):m?(d=!1,l=y9(c,!0)):g?(d=!1,l=_9(c,!0)):l=[]:S9(c)||Ep(c)?(l=o,Ep(o)?l=R9(o):(!E9(o)||C9(o))&&(l=w9(c))):d=!1}d&&(s.set(c,l),a(l,c,r,i,s),s.delete(c)),Cp(e,n,l)}var M9=A9,$9=tb,j9=rb,P9=J7,I9=M9,N9=Vn,D9=mb,F9=fb;function gb(e,t,n,r,a){e!==t&&P9(t,function(i,s){if(a||(a=new $9),N9(i))I9(e,t,s,n,gb,r,a);else{var o=r?r(F9(e,s),i,s+"",e,t,a):void 0;o===void 0&&(o=i),j9(e,s,o)}},D9)}var L9=gb;function U9(e){return e}var vb=U9;function z9(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var B9=z9,W9=B9,Rp=Math.max;function q9(e,t,n){return t=Rp(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=Rp(r.length-t,0),s=Array(i);++a<i;)s[a]=r[t+a];a=-1;for(var o=Array(t+1);++a<t;)o[a]=r[a];return o[t]=n(s),W9(e,this,o)}}var bb=q9;function H9(e){return function(){return e}}var V9=H9,Y9=V9,Ap=nb,Z9=vb,G9=Ap?function(e,t){return Ap(e,"toString",{configurable:!0,enumerable:!1,value:Y9(t),writable:!0})}:Z9,K9=G9,X9=800,J9=16,Q9=Date.now;function eR(e){var t=0,n=0;return function(){var r=Q9(),a=J9-(r-n);if(n=r,a>0){if(++t>=X9)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var tR=eR,nR=K9,rR=tR,aR=rR(nR),yb=aR,iR=vb,sR=bb,oR=yb;function cR(e,t){return oR(sR(e,t,iR),e+"")}var _b=cR,uR=Yi,lR=lc,dR=dc,fR=Vn;function hR(e,t,n){if(!fR(n))return!1;var r=typeof t;return(r=="number"?lR(n)&&dR(t,n.length):r=="string"&&t in n)?uR(n[t],e):!1}var pR=hR,mR=_b,gR=pR;function vR(e){return mR(function(t,n){var r=-1,a=n.length,i=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(a--,i):void 0,s&&gR(n[0],n[1],s)&&(i=a<3?void 0:i,a=1),t=Object(t);++r<a;){var o=n[r];o&&e(t,o,r,i)}return t})}var bR=vR,yR=L9,_R=bR,xR=_R(function(e,t,n){yR(e,t,n)}),wR=xR;const TR=vt(wR);var OR=Tr,CR=Yn,ER="[object Symbol]";function SR(e){return typeof e=="symbol"||CR(e)&&OR(e)==ER}var of=SR,kR=nn,RR=of,AR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,MR=/^\w*$/;function $R(e,t){if(kR(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||RR(e)?!0:MR.test(e)||!AR.test(e)||t!=null&&e in Object(t)}var jR=$R,xb=Qd,PR="Expected a function";function cf(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(PR);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var s=e.apply(this,r);return n.cache=i.set(a,s)||i,s};return n.cache=new(cf.Cache||xb),n}cf.Cache=xb;var IR=cf,NR=IR,DR=500;function FR(e){var t=NR(e,function(r){return n.size===DR&&n.clear(),r}),n=t.cache;return t}var LR=FR,UR=LR,zR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,BR=/\\(\\)?/g,WR=UR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(zR,function(n,r,a,i){t.push(a?i.replace(BR,"$1"):r||n)}),t}),qR=WR;function HR(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}var wb=HR,Mp=Zi,VR=wb,YR=nn,ZR=of,GR=1/0,$p=Mp?Mp.prototype:void 0,jp=$p?$p.toString:void 0;function Tb(e){if(typeof e=="string")return e;if(YR(e))return VR(e,Tb)+"";if(ZR(e))return jp?jp.call(e):"";var t=e+"";return t=="0"&&1/e==-GR?"-0":t}var KR=Tb,XR=KR;function JR(e){return e==null?"":XR(e)}var QR=JR,eA=nn,tA=jR,nA=qR,rA=QR;function aA(e,t){return eA(e)?e:tA(e,t)?[e]:nA(rA(e))}var fc=aA,iA=of,sA=1/0;function oA(e){if(typeof e=="string"||iA(e))return e;var t=e+"";return t=="0"&&1/e==-sA?"-0":t}var uf=oA,cA=fc,uA=uf;function lA(e,t){t=cA(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[uA(t[n++])];return n&&n==r?e:void 0}var Ob=lA,dA=Ob;function fA(e,t,n){var r=e==null?void 0:dA(e,t);return r===void 0?n:r}var hA=fA;const bn=vt(hA);var pA=hb,mA=fc,gA=dc,Pp=Vn,vA=uf;function bA(e,t,n,r){if(!Pp(e))return e;t=mA(t,e);for(var a=-1,i=t.length,s=i-1,o=e;o!=null&&++a<i;){var c=vA(t[a]),u=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(a!=s){var l=o[c];u=r?r(l,c,o):void 0,u===void 0&&(u=Pp(l)?l:gA(t[a+1])?[]:{})}pA(o,c,u),o=o[c]}return e}var Cb=bA,yA=Cb;function _A(e,t,n){return e==null?e:yA(e,t,n)}var xA=_A;const Ga=vt(xA);function hc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function lf(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ma(){}var br=.7,na=1/br,Wr="\\s*([+-]?\\d+)\\s*",Mi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Kt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wA=/^#([0-9a-f]{3,8})$/,TA=new RegExp(`^rgb\\(${Wr},${Wr},${Wr}\\)$`),OA=new RegExp(`^rgb\\(${Kt},${Kt},${Kt}\\)$`),CA=new RegExp(`^rgba\\(${Wr},${Wr},${Wr},${Mi}\\)$`),EA=new RegExp(`^rgba\\(${Kt},${Kt},${Kt},${Mi}\\)$`),SA=new RegExp(`^hsl\\(${Mi},${Kt},${Kt}\\)$`),kA=new RegExp(`^hsla\\(${Mi},${Kt},${Kt},${Mi}\\)$`),Ip={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};hc(ma,df,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Np,formatHex:Np,formatHex8:RA,formatHsl:AA,formatRgb:Dp,toString:Dp});function Np(){return this.rgb().formatHex()}function RA(){return this.rgb().formatHex8()}function AA(){return Sb(this).formatHsl()}function Dp(){return this.rgb().formatRgb()}function df(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=wA.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Fp(t):n===3?new rt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ys(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ys(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=TA.exec(e))?new rt(t[1],t[2],t[3],1):(t=OA.exec(e))?new rt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=CA.exec(e))?ys(t[1],t[2],t[3],t[4]):(t=EA.exec(e))?ys(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=SA.exec(e))?zp(t[1],t[2]/100,t[3]/100,1):(t=kA.exec(e))?zp(t[1],t[2]/100,t[3]/100,t[4]):Ip.hasOwnProperty(e)?Fp(Ip[e]):e==="transparent"?new rt(NaN,NaN,NaN,0):null}function Fp(e){return new rt(e>>16&255,e>>8&255,e&255,1)}function ys(e,t,n,r){return r<=0&&(e=t=n=NaN),new rt(e,t,n,r)}function Eb(e){return e instanceof ma||(e=df(e)),e?(e=e.rgb(),new rt(e.r,e.g,e.b,e.opacity)):new rt}function ra(e,t,n,r){return arguments.length===1?Eb(e):new rt(e,t,n,r??1)}function rt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}hc(rt,ra,lf(ma,{brighter(e){return e=e==null?na:Math.pow(na,e),new rt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?br:Math.pow(br,e),new rt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new rt(ur(this.r),ur(this.g),ur(this.b),ho(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Lp,formatHex:Lp,formatHex8:MA,formatRgb:Up,toString:Up}));function Lp(){return`#${ar(this.r)}${ar(this.g)}${ar(this.b)}`}function MA(){return`#${ar(this.r)}${ar(this.g)}${ar(this.b)}${ar((isNaN(this.opacity)?1:this.opacity)*255)}`}function Up(){const e=ho(this.opacity);return`${e===1?"rgb(":"rgba("}${ur(this.r)}, ${ur(this.g)}, ${ur(this.b)}${e===1?")":`, ${e})`}`}function ho(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ur(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ar(e){return e=ur(e),(e<16?"0":"")+e.toString(16)}function zp(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new jt(e,t,n,r)}function Sb(e){if(e instanceof jt)return new jt(e.h,e.s,e.l,e.opacity);if(e instanceof ma||(e=df(e)),!e)return new jt;if(e instanceof jt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,o=i-a,c=(i+a)/2;return o?(t===i?s=(n-r)/o+(n<r)*6:n===i?s=(r-t)/o+2:s=(t-n)/o+4,o/=c<.5?i+a:2-i-a,s*=60):o=c>0&&c<1?0:s,new jt(s,o,c,e.opacity)}function $A(e,t,n,r){return arguments.length===1?Sb(e):new jt(e,t,n,r??1)}function jt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}hc(jt,$A,lf(ma,{brighter(e){return e=e==null?na:Math.pow(na,e),new jt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?br:Math.pow(br,e),new jt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new rt(Au(e>=240?e-240:e+120,a,r),Au(e,a,r),Au(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new jt(Bp(this.h),_s(this.s),_s(this.l),ho(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ho(this.opacity);return`${e===1?"hsl(":"hsla("}${Bp(this.h)}, ${_s(this.s)*100}%, ${_s(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Bp(e){return e=(e||0)%360,e<0?e+360:e}function _s(e){return Math.max(0,Math.min(1,e||0))}function Au(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const jA=Math.PI/180,PA=180/Math.PI;var kb=-.14861,ff=1.78277,hf=-.29227,pc=-.90649,$i=1.97294,Wp=$i*pc,qp=$i*ff,Hp=ff*hf-pc*kb;function IA(e){if(e instanceof lr)return new lr(e.h,e.s,e.l,e.opacity);e instanceof rt||(e=Eb(e));var t=e.r/255,n=e.g/255,r=e.b/255,a=(Hp*r+Wp*t-qp*n)/(Hp+Wp-qp),i=r-a,s=($i*(n-a)-hf*i)/pc,o=Math.sqrt(s*s+i*i)/($i*a*(1-a)),c=o?Math.atan2(s,i)*PA-120:NaN;return new lr(c<0?c+360:c,o,a,e.opacity)}function en(e,t,n,r){return arguments.length===1?IA(e):new lr(e,t,n,r??1)}function lr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}hc(lr,en,lf(ma,{brighter(e){return e=e==null?na:Math.pow(na,e),new lr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?br:Math.pow(br,e),new lr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*jA,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),a=Math.sin(e);return new rt(255*(t+n*(kb*r+ff*a)),255*(t+n*(hf*r+pc*a)),255*(t+n*($i*r)),this.opacity)}}));function NA(e,t,n,r,a){var i=e*e,s=i*e;return((1-3*e+3*i-s)*t+(4-6*i+3*s)*n+(1+3*e+3*i-3*s)*r+s*a)/6}function DA(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),a=e[r],i=e[r+1],s=r>0?e[r-1]:2*a-i,o=r<t-1?e[r+2]:2*i-a;return NA((n-r/t)*t,s,a,i,o)}}const pf=e=>()=>e;function Rb(e,t){return function(n){return e+n*t}}function FA(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function LA(e,t){var n=t-e;return n?Rb(e,n>180||n<-180?n-360*Math.round(n/360):n):pf(isNaN(e)?t:e)}function UA(e){return(e=+e)==1?qr:function(t,n){return n-t?FA(t,n,e):pf(isNaN(t)?n:t)}}function qr(e,t){var n=t-e;return n?Rb(e,n):pf(isNaN(e)?t:e)}(function e(t){var n=UA(t);function r(a,i){var s=n((a=ra(a)).r,(i=ra(i)).r),o=n(a.g,i.g),c=n(a.b,i.b),u=qr(a.opacity,i.opacity);return function(l){return a.r=s(l),a.g=o(l),a.b=c(l),a.opacity=u(l),a+""}}return r.gamma=e,r})(1);function zA(e){return function(t){var n=t.length,r=new Array(n),a=new Array(n),i=new Array(n),s,o;for(s=0;s<n;++s)o=ra(t[s]),r[s]=o.r||0,a[s]=o.g||0,i[s]=o.b||0;return r=e(r),a=e(a),i=e(i),o.opacity=1,function(c){return o.r=r(c),o.g=a(c),o.b=i(c),o+""}}}var BA=zA(DA);function Ab(e){return function t(n){n=+n;function r(a,i){var s=e((a=en(a)).h,(i=en(i)).h),o=qr(a.s,i.s),c=qr(a.l,i.l),u=qr(a.opacity,i.opacity);return function(l){return a.h=s(l),a.s=o(l),a.l=c(Math.pow(l,n)),a.opacity=u(l),a+""}}return r.gamma=t,r}(1)}Ab(LA);var mf=Ab(qr),WA=Tr,qA=nn,HA=Yn,VA="[object String]";function YA(e){return typeof e=="string"||!qA(e)&&HA(e)&&WA(e)==VA}var ZA=YA;const GA=vt(ZA);function KA(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var XA=KA;const de=vt(XA);class Vp extends Map{constructor(t,n=eM){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(Yp(this,t))}has(t){return super.has(Yp(this,t))}set(t,n){return super.set(JA(this,t),n)}delete(t){return super.delete(QA(this,t))}}function Yp({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function JA({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function QA({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function eM(e){return e!==null&&typeof e=="object"?e.valueOf():e}function tM(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const Zp=Symbol("implicit");function Fr(){var e=new Vp,t=[],n=[],r=Zp;function a(i){let s=e.get(i);if(s===void 0){if(r!==Zp)return r;e.set(i,s=t.push(i)-1)}return n[s%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new Vp;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return Fr(t,n).unknown(r)},tM.apply(a,arguments),a}function nM(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function po(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function rM(e){return e=po(Math.abs(e)),e?e[1]:NaN}function aM(e,t){return function(n,r){for(var a=n.length,i=[],s=0,o=e[0],c=0;a>0&&o>0&&(c+o+1>r&&(o=Math.max(1,r-c)),i.push(n.substring(a-=o,a+o)),!((c+=o+1)>r));)o=e[s=(s+1)%e.length];return i.reverse().join(t)}}function iM(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var sM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pl(e){if(!(t=sM.exec(e)))throw new Error("invalid format: "+e);var t;return new gf({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Pl.prototype=gf.prototype;function gf(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}gf.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function oM(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var Mb;function cM(e,t){var n=po(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(Mb=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+po(e,Math.max(0,t+i-1))[0]}function Gp(e,t){var n=po(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const Kp={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:nM,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Gp(e*100,t)},r:Gp,s:cM,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Xp(e){return e}var Jp=Array.prototype.map,Qp=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function uM(e){var t=e.grouping===void 0||e.thousands===void 0?Xp:aM(Jp.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Xp:iM(Jp.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"-":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(d){d=Pl(d);var f=d.fill,m=d.align,g=d.sign,v=d.symbol,h=d.zero,w=d.width,x=d.comma,b=d.precision,T=d.trim,_=d.type;_==="n"?(x=!0,_="g"):Kp[_]||(b===void 0&&(b=12),T=!0,_="g"),(h||f==="0"&&m==="=")&&(h=!0,f="0",m="=");var S=v==="$"?n:v==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",$=v==="$"?r:/[%p]/.test(_)?s:"",D=Kp[_],I=/[defgprs%]/.test(_);b=b===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function M(k){var Y=S,A=$,R,F,B;if(_==="c")A=D(k)+A,k="";else{k=+k;var L=k<0||1/k<0;if(k=isNaN(k)?c:D(Math.abs(k),b),T&&(k=oM(k)),L&&+k==0&&g!=="+"&&(L=!1),Y=(L?g==="("?g:o:g==="-"||g==="("?"":g)+Y,A=(_==="s"?Qp[8+Mb/3]:"")+A+(L&&g==="("?")":""),I){for(R=-1,F=k.length;++R<F;)if(B=k.charCodeAt(R),48>B||B>57){A=(B===46?a+k.slice(R+1):k.slice(R))+A,k=k.slice(0,R);break}}}x&&!h&&(k=t(k,1/0));var G=Y.length+k.length+A.length,Z=G<w?new Array(w-G+1).join(f):"";switch(x&&h&&(k=t(Z+k,Z.length?w-A.length:1/0),Z=""),m){case"<":k=Y+k+A+Z;break;case"=":k=Y+Z+k+A;break;case"^":k=Z.slice(0,G=Z.length>>1)+Y+k+A+Z.slice(G);break;default:k=Z+Y+k+A;break}return i(k)}return M.toString=function(){return d+""},M}function l(d,f){var m=u((d=Pl(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(rM(f)/3)))*3,v=Math.pow(10,-g),h=Qp[8+g/3];return function(w){return m(v*w)+h}}return{format:u,formatPrefix:l}}var xs,$b;lM({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function lM(e){return xs=uM(e),$b=xs.format,xs.formatPrefix,xs}var Mu=new Date,$u=new Date;function xn(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=function(i){return e(i=new Date(+i)),i},a.ceil=function(i){return e(i=new Date(i-1)),t(i,1),e(i),i},a.round=function(i){var s=a(i),o=a.ceil(i);return i-s<o-i?s:o},a.offset=function(i,s){return t(i=new Date(+i),s==null?1:Math.floor(s)),i},a.range=function(i,s,o){var c=[],u;if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i<s)||!(o>0))return c;do c.push(u=new Date(+i)),t(i,o),e(i);while(u<i&&i<s);return c},a.filter=function(i){return xn(function(s){if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},function(s,o){if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!i(s););else for(;--o>=0;)for(;t(s,1),!i(s););})},n&&(a.count=function(i,s){return Mu.setTime(+i),$u.setTime(+s),e(Mu),e($u),Math.floor(n(Mu,$u))},a.every=function(i){return i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?function(s){return r(s)%i===0}:function(s){return a.count(0,s)%i===0}):a}),a}const dM=1e3,vf=dM*60,fM=vf*60,bf=fM*24,jb=bf*7;var yf=xn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*vf)/bf,e=>e.getDate()-1);yf.range;function Cr(e){return xn(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*vf)/jb})}var Pb=Cr(0),mo=Cr(1),hM=Cr(2),pM=Cr(3),aa=Cr(4),mM=Cr(5),gM=Cr(6);Pb.range;mo.range;hM.range;pM.range;aa.range;mM.range;gM.range;var yr=xn(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});yr.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:xn(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};yr.range;var _f=xn(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/bf},function(e){return e.getUTCDate()-1});_f.range;function Er(e){return xn(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/jb})}var Ib=Er(0),go=Er(1),vM=Er(2),bM=Er(3),ia=Er(4),yM=Er(5),_M=Er(6);Ib.range;go.range;vM.range;bM.range;ia.range;yM.range;_M.range;var _r=xn(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});_r.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:xn(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};_r.range;function ju(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Pu(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function La(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function xM(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,s=e.shortDays,o=e.months,c=e.shortMonths,u=Ua(a),l=za(a),d=Ua(i),f=za(i),m=Ua(s),g=za(s),v=Ua(o),h=za(o),w=Ua(c),x=za(c),b={a:L,A:G,b:Z,B:j,c:null,d:im,e:im,f:qM,g:e$,G:n$,H:zM,I:BM,j:WM,L:Nb,m:HM,M:VM,p:U,q:J,Q:cm,s:um,S:YM,u:ZM,U:GM,V:KM,w:XM,W:JM,x:null,X:null,y:QM,Y:t$,Z:r$,"%":om},T={a:te,A:K,b:X,B:V,c:null,d:sm,e:sm,f:o$,g:v$,G:y$,H:a$,I:i$,j:s$,L:Fb,m:c$,M:u$,p:Q,q:ee,Q:cm,s:um,S:l$,u:d$,U:f$,V:h$,w:p$,W:m$,x:null,X:null,y:g$,Y:b$,Z:_$,"%":om},_={a:M,A:k,b:Y,B:A,c:R,d:rm,e:rm,f:DM,g:nm,G:tm,H:am,I:am,j:jM,L:NM,m:$M,M:PM,p:I,q:MM,Q:LM,s:UM,S:IM,u:EM,U:SM,V:kM,w:CM,W:RM,x:F,X:B,y:nm,Y:tm,Z:AM,"%":FM};b.x=S(n,b),b.X=S(r,b),b.c=S(t,b),T.x=S(n,T),T.X=S(r,T),T.c=S(t,T);function S(N,W){return function(ne){var O=[],ge=-1,he=0,ue=N.length,Ae,ze,bt;for(ne instanceof Date||(ne=new Date(+ne));++ge<ue;)N.charCodeAt(ge)===37&&(O.push(N.slice(he,ge)),(ze=em[Ae=N.charAt(++ge)])!=null?Ae=N.charAt(++ge):ze=Ae==="e"?" ":"0",(bt=W[Ae])&&(Ae=bt(ne,ze)),O.push(Ae),he=ge+1);return O.push(N.slice(he,ge)),O.join("")}}function $(N,W){return function(ne){var O=La(1900,void 0,1),ge=D(O,N,ne+="",0),he,ue;if(ge!=ne.length)return null;if("Q"in O)return new Date(O.Q);if("s"in O)return new Date(O.s*1e3+("L"in O?O.L:0));if(W&&!("Z"in O)&&(O.Z=0),"p"in O&&(O.H=O.H%12+O.p*12),O.m===void 0&&(O.m="q"in O?O.q:0),"V"in O){if(O.V<1||O.V>53)return null;"w"in O||(O.w=1),"Z"in O?(he=Pu(La(O.y,0,1)),ue=he.getUTCDay(),he=ue>4||ue===0?go.ceil(he):go(he),he=_f.offset(he,(O.V-1)*7),O.y=he.getUTCFullYear(),O.m=he.getUTCMonth(),O.d=he.getUTCDate()+(O.w+6)%7):(he=ju(La(O.y,0,1)),ue=he.getDay(),he=ue>4||ue===0?mo.ceil(he):mo(he),he=yf.offset(he,(O.V-1)*7),O.y=he.getFullYear(),O.m=he.getMonth(),O.d=he.getDate()+(O.w+6)%7)}else("W"in O||"U"in O)&&("w"in O||(O.w="u"in O?O.u%7:"W"in O?1:0),ue="Z"in O?Pu(La(O.y,0,1)).getUTCDay():ju(La(O.y,0,1)).getDay(),O.m=0,O.d="W"in O?(O.w+6)%7+O.W*7-(ue+5)%7:O.w+O.U*7-(ue+6)%7);return"Z"in O?(O.H+=O.Z/100|0,O.M+=O.Z%100,Pu(O)):ju(O)}}function D(N,W,ne,O){for(var ge=0,he=W.length,ue=ne.length,Ae,ze;ge<he;){if(O>=ue)return-1;if(Ae=W.charCodeAt(ge++),Ae===37){if(Ae=W.charAt(ge++),ze=_[Ae in em?W.charAt(ge++):Ae],!ze||(O=ze(N,ne,O))<0)return-1}else if(Ae!=ne.charCodeAt(O++))return-1}return O}function I(N,W,ne){var O=u.exec(W.slice(ne));return O?(N.p=l.get(O[0].toLowerCase()),ne+O[0].length):-1}function M(N,W,ne){var O=m.exec(W.slice(ne));return O?(N.w=g.get(O[0].toLowerCase()),ne+O[0].length):-1}function k(N,W,ne){var O=d.exec(W.slice(ne));return O?(N.w=f.get(O[0].toLowerCase()),ne+O[0].length):-1}function Y(N,W,ne){var O=w.exec(W.slice(ne));return O?(N.m=x.get(O[0].toLowerCase()),ne+O[0].length):-1}function A(N,W,ne){var O=v.exec(W.slice(ne));return O?(N.m=h.get(O[0].toLowerCase()),ne+O[0].length):-1}function R(N,W,ne){return D(N,t,W,ne)}function F(N,W,ne){return D(N,n,W,ne)}function B(N,W,ne){return D(N,r,W,ne)}function L(N){return s[N.getDay()]}function G(N){return i[N.getDay()]}function Z(N){return c[N.getMonth()]}function j(N){return o[N.getMonth()]}function U(N){return a[+(N.getHours()>=12)]}function J(N){return 1+~~(N.getMonth()/3)}function te(N){return s[N.getUTCDay()]}function K(N){return i[N.getUTCDay()]}function X(N){return c[N.getUTCMonth()]}function V(N){return o[N.getUTCMonth()]}function Q(N){return a[+(N.getUTCHours()>=12)]}function ee(N){return 1+~~(N.getUTCMonth()/3)}return{format:function(N){var W=S(N+="",b);return W.toString=function(){return N},W},parse:function(N){var W=$(N+="",!1);return W.toString=function(){return N},W},utcFormat:function(N){var W=S(N+="",T);return W.toString=function(){return N},W},utcParse:function(N){var W=$(N+="",!0);return W.toString=function(){return N},W}}}var em={"-":"",_:" ",0:"0"},Je=/^\s*\d+/,wM=/^%/,TM=/[\\^$*+?|[\]().{}]/g;function ke(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function OM(e){return e.replace(TM,"\\$&")}function Ua(e){return new RegExp("^(?:"+e.map(OM).join("|")+")","i")}function za(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function CM(e,t,n){var r=Je.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function EM(e,t,n){var r=Je.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function SM(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function kM(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function RM(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function tm(e,t,n){var r=Je.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function nm(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function AM(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function MM(e,t,n){var r=Je.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function $M(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function rm(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function jM(e,t,n){var r=Je.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function am(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function PM(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function IM(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function NM(e,t,n){var r=Je.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function DM(e,t,n){var r=Je.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function FM(e,t,n){var r=wM.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function LM(e,t,n){var r=Je.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function UM(e,t,n){var r=Je.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function im(e,t){return ke(e.getDate(),t,2)}function zM(e,t){return ke(e.getHours(),t,2)}function BM(e,t){return ke(e.getHours()%12||12,t,2)}function WM(e,t){return ke(1+yf.count(yr(e),e),t,3)}function Nb(e,t){return ke(e.getMilliseconds(),t,3)}function qM(e,t){return Nb(e,t)+"000"}function HM(e,t){return ke(e.getMonth()+1,t,2)}function VM(e,t){return ke(e.getMinutes(),t,2)}function YM(e,t){return ke(e.getSeconds(),t,2)}function ZM(e){var t=e.getDay();return t===0?7:t}function GM(e,t){return ke(Pb.count(yr(e)-1,e),t,2)}function Db(e){var t=e.getDay();return t>=4||t===0?aa(e):aa.ceil(e)}function KM(e,t){return e=Db(e),ke(aa.count(yr(e),e)+(yr(e).getDay()===4),t,2)}function XM(e){return e.getDay()}function JM(e,t){return ke(mo.count(yr(e)-1,e),t,2)}function QM(e,t){return ke(e.getFullYear()%100,t,2)}function e$(e,t){return e=Db(e),ke(e.getFullYear()%100,t,2)}function t$(e,t){return ke(e.getFullYear()%1e4,t,4)}function n$(e,t){var n=e.getDay();return e=n>=4||n===0?aa(e):aa.ceil(e),ke(e.getFullYear()%1e4,t,4)}function r$(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ke(t/60|0,"0",2)+ke(t%60,"0",2)}function sm(e,t){return ke(e.getUTCDate(),t,2)}function a$(e,t){return ke(e.getUTCHours(),t,2)}function i$(e,t){return ke(e.getUTCHours()%12||12,t,2)}function s$(e,t){return ke(1+_f.count(_r(e),e),t,3)}function Fb(e,t){return ke(e.getUTCMilliseconds(),t,3)}function o$(e,t){return Fb(e,t)+"000"}function c$(e,t){return ke(e.getUTCMonth()+1,t,2)}function u$(e,t){return ke(e.getUTCMinutes(),t,2)}function l$(e,t){return ke(e.getUTCSeconds(),t,2)}function d$(e){var t=e.getUTCDay();return t===0?7:t}function f$(e,t){return ke(Ib.count(_r(e)-1,e),t,2)}function Lb(e){var t=e.getUTCDay();return t>=4||t===0?ia(e):ia.ceil(e)}function h$(e,t){return e=Lb(e),ke(ia.count(_r(e),e)+(_r(e).getUTCDay()===4),t,2)}function p$(e){return e.getUTCDay()}function m$(e,t){return ke(go.count(_r(e)-1,e),t,2)}function g$(e,t){return ke(e.getUTCFullYear()%100,t,2)}function v$(e,t){return e=Lb(e),ke(e.getUTCFullYear()%100,t,2)}function b$(e,t){return ke(e.getUTCFullYear()%1e4,t,4)}function y$(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ia(e):ia.ceil(e),ke(e.getUTCFullYear()%1e4,t,4)}function _$(){return"+0000"}function om(){return"%"}function cm(e){return+e}function um(e){return Math.floor(+e/1e3)}var Ir,Ub;x$({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function x$(e){return Ir=xM(e),Ub=Ir.format,Ir.parse,Ir.utcFormat,Ir.utcParse,Ir}function we(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const zb=we("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Bb=we("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Wb=we("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),qb=we("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Hb=we("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Vb=we("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Yb=we("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Zb=we("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),xf=we("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),w$=we("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),De=e=>BA(e[e.length-1]);var mc=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(we);const T$=De(mc);var gc=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(we);const O$=De(gc);var vc=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(we);const C$=De(vc);var bc=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(we);const E$=De(bc);var yc=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(we);const S$=De(yc);var _c=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(we);const k$=De(_c);var xc=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(we);const R$=De(xc);var wc=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(we);const A$=De(wc);var Tc=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(we);const M$=De(Tc);var Oc=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(we);const $$=De(Oc);var Cc=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(we);const j$=De(Cc);var Ec=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(we);const P$=De(Ec);var Sc=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(we);const I$=De(Sc);var kc=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(we);const N$=De(kc);var Rc=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(we);const D$=De(Rc);var Ac=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(we);const F$=De(Ac);var Mc=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(we);const L$=De(Mc);var $c=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(we);const U$=De($c);var jc=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(we);const z$=De(jc);var Pc=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(we);const B$=De(Pc);var Ic=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(we);const W$=De(Ic);var Nc=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(we);const q$=De(Nc);var Dc=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(we);const H$=De(Dc);var Fc=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(we);const V$=De(Fc);var Lc=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(we);const Y$=De(Lc);var Uc=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(we);const Z$=De(Uc);var zc=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(we);const G$=De(zc);function K$(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const X$=mf(en(300,.5,0),en(-240,.5,1));var J$=mf(en(-100,.75,.35),en(80,1.5,.8)),Q$=mf(en(260,.75,.35),en(80,1.5,.8)),ws=en();function ej(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return ws.h=360*e-100,ws.s=1.5-1.5*t,ws.l=.8-.9*t,ws+""}var Ts=ra(),tj=Math.PI/3,nj=Math.PI*2/3;function rj(e){var t;return e=(.5-e)*Math.PI,Ts.r=255*(t=Math.sin(e))*t,Ts.g=255*(t=Math.sin(e+tj))*t,Ts.b=255*(t=Math.sin(e+nj))*t,Ts+""}function aj(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function Bc(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const ij=Bc(we("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var sj=Bc(we("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),oj=Bc(we("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),cj=Bc(we("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),uj="__lodash_hash_undefined__";function lj(e){return this.__data__.set(e,uj),this}var dj=lj;function fj(e){return this.__data__.has(e)}var hj=fj,pj=Qd,mj=dj,gj=hj;function vo(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new pj;++t<n;)this.add(e[t])}vo.prototype.add=vo.prototype.push=mj;vo.prototype.has=gj;var Gb=vo;function vj(e,t,n,r){for(var a=e.length,i=n+(r?1:-1);r?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var bj=vj;function yj(e){return e!==e}var _j=yj;function xj(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}var wj=xj,Tj=bj,Oj=_j,Cj=wj;function Ej(e,t,n){return t===t?Cj(e,t,n):Tj(e,Oj,n)}var Sj=Ej,kj=Sj;function Rj(e,t){var n=e==null?0:e.length;return!!n&&kj(e,t,0)>-1}var Aj=Rj;function Mj(e,t,n){for(var r=-1,a=e==null?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1}var $j=Mj;function jj(e,t){return e.has(t)}var Kb=jj,Pj=Gb,Ij=Aj,Nj=$j,Dj=wb,Fj=db,Lj=Kb,Uj=200;function zj(e,t,n,r){var a=-1,i=Ij,s=!0,o=e.length,c=[],u=t.length;if(!o)return c;n&&(t=Dj(t,Fj(n))),r?(i=Nj,s=!1):t.length>=Uj&&(i=Lj,s=!1,t=new Pj(t));e:for(;++a<o;){var l=e[a],d=n==null?l:n(l);if(l=r||l!==0?l:0,s&&d===d){for(var f=u;f--;)if(t[f]===d)continue e;c.push(l)}else i(t,d,r)||c.push(l)}return c}var Bj=zj,Wj=Bj,qj=_b,Hj=cb,Vj=qj(function(e,t){return Hj(e)?Wj(e,t):[]}),Yj=Vj;const Xb=vt(Yj);function Ze(e){return function(){return e}}const lm=Math.abs,et=Math.atan2,Xn=Math.cos,Zj=Math.max,Iu=Math.min,Ht=Math.sin,Lr=Math.sqrt,tt=1e-12,ji=Math.PI,bo=ji/2,Is=2*ji;function Gj(e){return e>1?0:e<-1?ji:Math.acos(e)}function dm(e){return e>=1?bo:e<=-1?-bo:Math.asin(e)}const Il=Math.PI,Nl=2*Il,er=1e-6,Kj=Nl-er;function Jb(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Xj(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Jb;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class Jj{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Jb:Xj(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,i,s){this._append`C${+t},${+n},${+r},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(t,n,r,a,i){if(t=+t,n=+n,r=+r,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,o=this._y1,c=r-t,u=a-n,l=s-t,d=o-n,f=l*l+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>er)if(!(Math.abs(d*c-u*l)>er)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-s,g=a-o,v=c*c+u*u,h=m*m+g*g,w=Math.sqrt(v),x=Math.sqrt(f),b=i*Math.tan((Il-Math.acos((v+f-h)/(2*w*x)))/2),T=b/x,_=b/w;Math.abs(T-1)>er&&this._append`L${t+T*l},${n+T*d}`,this._append`A${i},${i},0,0,${+(d*m>l*g)},${this._x1=t+_*c},${this._y1=n+_*u}`}}arc(t,n,r,a,i,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(a),c=r*Math.sin(a),u=t+o,l=n+c,d=1^s,f=s?a-i:i-a;this._x1===null?this._append`M${u},${l}`:(Math.abs(this._x1-u)>er||Math.abs(this._y1-l)>er)&&this._append`L${u},${l}`,r&&(f<0&&(f=f%Nl+Nl),f>Kj?this._append`A${r},${r},0,1,${d},${t-o},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=l}`:f>er&&this._append`A${r},${r},0,${+(f>=Il)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function Qb(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Jj(t)}function Qj(e){return e.innerRadius}function eP(e){return e.outerRadius}function tP(e){return e.startAngle}function nP(e){return e.endAngle}function rP(e){return e&&e.padAngle}function aP(e,t,n,r,a,i,s,o){var c=n-e,u=r-t,l=s-a,d=o-i,f=d*c-l*u;if(!(f*f<tt))return f=(l*(t-i)-d*(e-a))/f,[e+f*c,t+f*u]}function Os(e,t,n,r,a,i,s){var o=e-n,c=t-r,u=(s?i:-i)/Lr(o*o+c*c),l=u*c,d=-u*o,f=e+l,m=t+d,g=n+l,v=r+d,h=(f+g)/2,w=(m+v)/2,x=g-f,b=v-m,T=x*x+b*b,_=a-i,S=f*v-g*m,$=(b<0?-1:1)*Lr(Zj(0,_*_*T-S*S)),D=(S*b-x*$)/T,I=(-S*x-b*$)/T,M=(S*b+x*$)/T,k=(-S*x+b*$)/T,Y=D-h,A=I-w,R=M-h,F=k-w;return Y*Y+A*A>R*R+F*F&&(D=M,I=k),{cx:D,cy:I,x01:-l,y01:-d,x11:D*(a/_-1),y11:I*(a/_-1)}}function iP(){var e=Qj,t=eP,n=Ze(0),r=null,a=tP,i=nP,s=rP,o=null,c=Qb(u);function u(){var l,d,f=+e.apply(this,arguments),m=+t.apply(this,arguments),g=a.apply(this,arguments)-bo,v=i.apply(this,arguments)-bo,h=lm(v-g),w=v>g;if(o||(o=l=c()),m<f&&(d=m,m=f,f=d),!(m>tt))o.moveTo(0,0);else if(h>Is-tt)o.moveTo(m*Xn(g),m*Ht(g)),o.arc(0,0,m,g,v,!w),f>tt&&(o.moveTo(f*Xn(v),f*Ht(v)),o.arc(0,0,f,v,g,w));else{var x=g,b=v,T=g,_=v,S=h,$=h,D=s.apply(this,arguments)/2,I=D>tt&&(r?+r.apply(this,arguments):Lr(f*f+m*m)),M=Iu(lm(m-f)/2,+n.apply(this,arguments)),k=M,Y=M,A,R;if(I>tt){var F=dm(I/f*Ht(D)),B=dm(I/m*Ht(D));(S-=F*2)>tt?(F*=w?1:-1,T+=F,_-=F):(S=0,T=_=(g+v)/2),($-=B*2)>tt?(B*=w?1:-1,x+=B,b-=B):($=0,x=b=(g+v)/2)}var L=m*Xn(x),G=m*Ht(x),Z=f*Xn(_),j=f*Ht(_);if(M>tt){var U=m*Xn(b),J=m*Ht(b),te=f*Xn(T),K=f*Ht(T),X;if(h<ji)if(X=aP(L,G,te,K,U,J,Z,j)){var V=L-X[0],Q=G-X[1],ee=U-X[0],N=J-X[1],W=1/Ht(Gj((V*ee+Q*N)/(Lr(V*V+Q*Q)*Lr(ee*ee+N*N)))/2),ne=Lr(X[0]*X[0]+X[1]*X[1]);k=Iu(M,(f-ne)/(W-1)),Y=Iu(M,(m-ne)/(W+1))}else k=Y=0}$>tt?Y>tt?(A=Os(te,K,L,G,m,Y,w),R=Os(U,J,Z,j,m,Y,w),o.moveTo(A.cx+A.x01,A.cy+A.y01),Y<M?o.arc(A.cx,A.cy,Y,et(A.y01,A.x01),et(R.y01,R.x01),!w):(o.arc(A.cx,A.cy,Y,et(A.y01,A.x01),et(A.y11,A.x11),!w),o.arc(0,0,m,et(A.cy+A.y11,A.cx+A.x11),et(R.cy+R.y11,R.cx+R.x11),!w),o.arc(R.cx,R.cy,Y,et(R.y11,R.x11),et(R.y01,R.x01),!w))):(o.moveTo(L,G),o.arc(0,0,m,x,b,!w)):o.moveTo(L,G),!(f>tt)||!(S>tt)?o.lineTo(Z,j):k>tt?(A=Os(Z,j,U,J,f,-k,w),R=Os(L,G,te,K,f,-k,w),o.lineTo(A.cx+A.x01,A.cy+A.y01),k<M?o.arc(A.cx,A.cy,k,et(A.y01,A.x01),et(R.y01,R.x01),!w):(o.arc(A.cx,A.cy,k,et(A.y01,A.x01),et(A.y11,A.x11),!w),o.arc(0,0,f,et(A.cy+A.y11,A.cx+A.x11),et(R.cy+R.y11,R.cx+R.x11),w),o.arc(R.cx,R.cy,k,et(R.y11,R.x11),et(R.y01,R.x01),!w))):o.arc(0,0,f,_,T,w)}if(o.closePath(),l)return o=null,l+""||null}return u.centroid=function(){var l=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+a.apply(this,arguments)+ +i.apply(this,arguments))/2-ji/2;return[Xn(d)*l,Ht(d)*l]},u.innerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:Ze(+l),u):e},u.outerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:Ze(+l),u):t},u.cornerRadius=function(l){return arguments.length?(n=typeof l=="function"?l:Ze(+l),u):n},u.padRadius=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:Ze(+l),u):r},u.startAngle=function(l){return arguments.length?(a=typeof l=="function"?l:Ze(+l),u):a},u.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Ze(+l),u):i},u.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:Ze(+l),u):s},u.context=function(l){return arguments.length?(o=l??null,u):o},u}function ey(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ty(e){this._context=e}ty.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ny(e){return new ty(e)}function sP(e){return e[0]}function oP(e){return e[1]}function cP(e,t){var n=Ze(!0),r=null,a=ny,i=null,s=Qb(o);e=typeof e=="function"?e:e===void 0?sP:Ze(e),t=typeof t=="function"?t:t===void 0?oP:Ze(t);function o(c){var u,l=(c=ey(c)).length,d,f=!1,m;for(r==null&&(i=a(m=s())),u=0;u<=l;++u)!(u<l&&n(d=c[u],u,c))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(d,u,c),+t(d,u,c));if(m)return i=null,m+""||null}return o.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ze(+c),o):e},o.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ze(+c),o):t},o.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Ze(!!c),o):n},o.curve=function(c){return arguments.length?(a=c,r!=null&&(i=a(r)),o):a},o.context=function(c){return arguments.length?(c==null?r=i=null:i=a(r=c),o):r},o}function uP(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function lP(e){return e}function dP(){var e=lP,t=uP,n=null,r=Ze(0),a=Ze(Is),i=Ze(0);function s(o){var c,u=(o=ey(o)).length,l,d,f=0,m=new Array(u),g=new Array(u),v=+r.apply(this,arguments),h=Math.min(Is,Math.max(-Is,a.apply(this,arguments)-v)),w,x=Math.min(Math.abs(h)/u,i.apply(this,arguments)),b=x*(h<0?-1:1),T;for(c=0;c<u;++c)(T=g[m[c]=c]=+e(o[c],c,o))>0&&(f+=T);for(t!=null?m.sort(function(_,S){return t(g[_],g[S])}):n!=null&&m.sort(function(_,S){return n(o[_],o[S])}),c=0,d=f?(h-u*b)/f:0;c<u;++c,v=w)l=m[c],T=g[l],w=v+(T>0?T*d:0)+b,g[l]={data:o[l],index:c,value:T,startAngle:v,endAngle:w,padAngle:x};return g}return s.value=function(o){return arguments.length?(e=typeof o=="function"?o:Ze(+o),s):e},s.sortValues=function(o){return arguments.length?(t=o,n=null,s):t},s.sort=function(o){return arguments.length?(n=o,t=null,s):n},s.startAngle=function(o){return arguments.length?(r=typeof o=="function"?o:Ze(+o),s):r},s.endAngle=function(o){return arguments.length?(a=typeof o=="function"?o:Ze(+o),s):a},s.padAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Ze(+o),s):i},s}function Bn(){}function yo(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Wc(e){this._context=e}Wc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:yo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:yo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fP(e){return new Wc(e)}function ry(e){this._context=e}ry.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:yo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hP(e){return new ry(e)}function ay(e){this._context=e}ay.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:yo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pP(e){return new ay(e)}function iy(e,t){this._basis=new Wc(e),this._beta=t}iy.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],a=t[0],i=e[n]-r,s=t[n]-a,o=-1,c;++o<=n;)c=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+c*i),this._beta*t[o]+(1-this._beta)*(a+c*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const mP=function e(t){function n(r){return t===1?new Wc(r):new iy(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function _o(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function wf(e,t){this._context=e,this._k=(1-t)/6}wf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:_o(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:_o(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const gP=function e(t){function n(r){return new wf(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Tf(e,t){this._context=e,this._k=(1-t)/6}Tf.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:_o(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const vP=function e(t){function n(r){return new Tf(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Of(e,t){this._context=e,this._k=(1-t)/6}Of.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_o(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const bP=function e(t){function n(r){return new Of(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Cf(e,t,n){var r=e._x1,a=e._y1,i=e._x2,s=e._y2;if(e._l01_a>tt){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,a=(a*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>tt){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,l=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*u+e._x1*e._l23_2a-t*e._l12_2a)/l,s=(s*u+e._y1*e._l23_2a-n*e._l12_2a)/l}e._context.bezierCurveTo(r,a,i,s,e._x2,e._y2)}function sy(e,t){this._context=e,this._alpha=t}sy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Cf(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const yP=function e(t){function n(r){return t?new sy(r,t):new wf(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function oy(e,t){this._context=e,this._alpha=t}oy.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Cf(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const _P=function e(t){function n(r){return t?new oy(r,t):new Tf(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function cy(e,t){this._context=e,this._alpha=t}cy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Cf(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const xP=function e(t){function n(r){return t?new cy(r,t):new Of(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function uy(e){this._context=e}uy.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function wP(e){return new uy(e)}function fm(e){return e<0?-1:1}function hm(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),o=(i*a+s*r)/(r+a);return(fm(i)+fm(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function pm(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Nu(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,s-o*n,i,s)}function xo(e){this._context=e}xo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Nu(this,this._t0,pm(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Nu(this,pm(this,n=hm(this,e,t)),n);break;default:Nu(this,this._t0,n=hm(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function ly(e){this._context=new dy(e)}(ly.prototype=Object.create(xo.prototype)).point=function(e,t){xo.prototype.point.call(this,t,e)};function dy(e){this._context=e}dy.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function TP(e){return new xo(e)}function OP(e){return new ly(e)}function fy(e){this._context=e}fy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=mm(e),a=mm(t),i=0,s=1;s<n;++i,++s)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[s],t[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function mm(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),s=new Array(n);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,s[t]-=r*s[t-1];for(a[n-1]=s[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function CP(e){return new fy(e)}function qc(e,t){this._context=e,this._t=t}qc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function EP(e){return new qc(e,.5)}function SP(e){return new qc(e,0)}function kP(e){return new qc(e,1)}var RP=Ob,AP=Cb,MP=fc;function $P(e,t,n){for(var r=-1,a=t.length,i={};++r<a;){var s=t[r],o=RP(e,s);n(o,s)&&AP(i,MP(s,e),o)}return i}var jP=$P;function PP(e,t){return e!=null&&t in Object(e)}var IP=PP,NP=fc,DP=uc,FP=nn,LP=dc,UP=nf,zP=uf;function BP(e,t,n){t=NP(t,e);for(var r=-1,a=t.length,i=!1;++r<a;){var s=zP(t[r]);if(!(i=e!=null&&n(e,s)))break;e=e[s]}return i||++r!=a?i:(a=e==null?0:e.length,!!a&&UP(a)&&LP(s,a)&&(FP(e)||DP(e)))}var WP=BP,qP=IP,HP=WP;function VP(e,t){return e!=null&&HP(e,t,qP)}var YP=VP,ZP=jP,GP=YP;function KP(e,t){return ZP(e,t,function(n,r){return GP(e,r)})}var XP=KP;function JP(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var hy=JP,gm=Zi,QP=uc,eI=nn,vm=gm?gm.isConcatSpreadable:void 0;function tI(e){return eI(e)||QP(e)||!!(vm&&e&&e[vm])}var nI=tI,rI=hy,aI=nI;function py(e,t,n,r,a){var i=-1,s=e.length;for(n||(n=aI),a||(a=[]);++i<s;){var o=e[i];t>0&&n(o)?t>1?py(o,t-1,n,r,a):rI(a,o):r||(a[a.length]=o)}return a}var iI=py,sI=iI;function oI(e){var t=e==null?0:e.length;return t?sI(e,1):[]}var cI=oI,uI=cI,lI=bb,dI=yb;function fI(e){return dI(lI(e,void 0,uI),e+"")}var hI=fI,pI=XP,mI=hI,gI=mI(function(e,t){return e==null?{}:pI(e,t)}),vI=gI;const bI=vt(vI);function yI(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var _I=yI,xI=Gb,wI=_I,TI=Kb,OI=1,CI=2;function EI(e,t,n,r,a,i){var s=n&OI,o=e.length,c=t.length;if(o!=c&&!(s&&c>o))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var d=-1,f=!0,m=n&CI?new xI:void 0;for(i.set(e,t),i.set(t,e);++d<o;){var g=e[d],v=t[d];if(r)var h=s?r(v,g,d,t,e,i):r(g,v,d,e,t,i);if(h!==void 0){if(h)continue;f=!1;break}if(m){if(!wI(t,function(w,x){if(!TI(m,x)&&(g===w||a(g,w,n,r,i)))return m.push(x)})){f=!1;break}}else if(!(g===v||a(g,v,n,r,i))){f=!1;break}}return i.delete(e),i.delete(t),f}var my=EI;function SI(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}var kI=SI;function RI(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var AI=RI,bm=Zi,ym=ab,MI=Yi,$I=my,jI=kI,PI=AI,II=1,NI=2,DI="[object Boolean]",FI="[object Date]",LI="[object Error]",UI="[object Map]",zI="[object Number]",BI="[object RegExp]",WI="[object Set]",qI="[object String]",HI="[object Symbol]",VI="[object ArrayBuffer]",YI="[object DataView]",_m=bm?bm.prototype:void 0,Du=_m?_m.valueOf:void 0;function ZI(e,t,n,r,a,i,s){switch(n){case YI:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case VI:return!(e.byteLength!=t.byteLength||!i(new ym(e),new ym(t)));case DI:case FI:case zI:return MI(+e,+t);case LI:return e.name==t.name&&e.message==t.message;case BI:case qI:return e==t+"";case UI:var o=jI;case WI:var c=r&II;if(o||(o=PI),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=NI,s.set(e,t);var l=$I(o(e),o(t),r,a,i,s);return s.delete(e),l;case HI:if(Du)return Du.call(e)==Du.call(t)}return!1}var GI=ZI,KI=hy,XI=nn;function JI(e,t,n){var r=t(e);return XI(e)?r:KI(r,n(e))}var QI=JI;function eN(e,t){for(var n=-1,r=e==null?0:e.length,a=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[a++]=s)}return i}var tN=eN;function nN(){return[]}var rN=nN,aN=tN,iN=rN,sN=Object.prototype,oN=sN.propertyIsEnumerable,xm=Object.getOwnPropertySymbols,cN=xm?function(e){return e==null?[]:(e=Object(e),aN(xm(e),function(t){return oN.call(e,t)}))}:iN,uN=cN,lN=ib,dN=lN(Object.keys,Object),fN=dN,hN=tf,pN=fN,mN=Object.prototype,gN=mN.hasOwnProperty;function vN(e){if(!hN(e))return pN(e);var t=[];for(var n in Object(e))gN.call(e,n)&&n!="constructor"&&t.push(n);return t}var bN=vN,yN=pb,_N=bN,xN=lc;function wN(e){return xN(e)?yN(e):_N(e)}var TN=wN,ON=QI,CN=uN,EN=TN;function SN(e){return ON(e,EN,CN)}var kN=SN,wm=kN,RN=1,AN=Object.prototype,MN=AN.hasOwnProperty;function $N(e,t,n,r,a,i){var s=n&RN,o=wm(e),c=o.length,u=wm(t),l=u.length;if(c!=l&&!s)return!1;for(var d=c;d--;){var f=o[d];if(!(s?f in t:MN.call(t,f)))return!1}var m=i.get(e),g=i.get(t);if(m&&g)return m==t&&g==e;var v=!0;i.set(e,t),i.set(t,e);for(var h=s;++d<c;){f=o[d];var w=e[f],x=t[f];if(r)var b=s?r(x,w,f,t,e,i):r(w,x,f,e,t,i);if(!(b===void 0?w===x||a(w,x,n,r,i):b)){v=!1;break}h||(h=f=="constructor")}if(v&&!h){var T=e.constructor,_=t.constructor;T!=_&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof _=="function"&&_ instanceof _)&&(v=!1)}return i.delete(e),i.delete(t),v}var jN=$N,PN=Or,IN=tn,NN=PN(IN,"DataView"),DN=NN,FN=Or,LN=tn,UN=FN(LN,"Promise"),zN=UN,BN=Or,WN=tn,qN=BN(WN,"Set"),HN=qN,VN=Or,YN=tn,ZN=VN(YN,"WeakMap"),GN=ZN,Dl=DN,Fl=Jd,Ll=zN,Ul=HN,zl=GN,gy=Tr,ga=eb,Tm="[object Map]",KN="[object Object]",Om="[object Promise]",Cm="[object Set]",Em="[object WeakMap]",Sm="[object DataView]",XN=ga(Dl),JN=ga(Fl),QN=ga(Ll),eD=ga(Ul),tD=ga(zl),tr=gy;(Dl&&tr(new Dl(new ArrayBuffer(1)))!=Sm||Fl&&tr(new Fl)!=Tm||Ll&&tr(Ll.resolve())!=Om||Ul&&tr(new Ul)!=Cm||zl&&tr(new zl)!=Em)&&(tr=function(e){var t=gy(e),n=t==KN?e.constructor:void 0,r=n?ga(n):"";if(r)switch(r){case XN:return Sm;case JN:return Tm;case QN:return Om;case eD:return Cm;case tD:return Em}return t});var nD=tr,Fu=tb,rD=my,aD=GI,iD=jN,km=nD,Rm=nn,Am=rf,sD=sf,oD=1,Mm="[object Arguments]",$m="[object Array]",Cs="[object Object]",cD=Object.prototype,jm=cD.hasOwnProperty;function uD(e,t,n,r,a,i){var s=Rm(e),o=Rm(t),c=s?$m:km(e),u=o?$m:km(t);c=c==Mm?Cs:c,u=u==Mm?Cs:u;var l=c==Cs,d=u==Cs,f=c==u;if(f&&Am(e)){if(!Am(t))return!1;s=!0,l=!1}if(f&&!l)return i||(i=new Fu),s||sD(e)?rD(e,t,n,r,a,i):aD(e,t,c,n,r,a,i);if(!(n&oD)){var m=l&&jm.call(e,"__wrapped__"),g=d&&jm.call(t,"__wrapped__");if(m||g){var v=m?e.value():e,h=g?t.value():t;return i||(i=new Fu),a(v,h,n,r,i)}}return f?(i||(i=new Fu),iD(e,t,n,r,a,i)):!1}var lD=uD,dD=lD,Pm=Yn;function vy(e,t,n,r,a){return e===t?!0:e==null||t==null||!Pm(e)&&!Pm(t)?e!==e&&t!==t:dD(e,t,n,r,vy,a)}var fD=vy,hD=fD;function pD(e,t){return hD(e,t)}var mD=pD;const gD=vt(mD);var vD={background:"transparent",text:{fontFamily:"sans-serif",fontSize:11,fill:"#333333",outlineWidth:0,outlineColor:"transparent",outlineOpacity:1},axis:{domain:{line:{stroke:"transparent",strokeWidth:1}},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{}},legend:{text:{fontSize:12}}},grid:{line:{stroke:"#dddddd",strokeWidth:1}},legends:{hidden:{symbol:{fill:"#333333",opacity:.6},text:{fill:"#333333",opacity:.6}},text:{},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{fontSize:10}},title:{text:{}}},labels:{text:{}},markers:{lineColor:"#000000",lineStrokeWidth:1,text:{}},dots:{text:{}},tooltip:{container:{background:"white",color:"inherit",fontSize:"inherit",borderRadius:"2px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.25)",padding:"5px 9px"},basic:{whiteSpace:"pre",display:"flex",alignItems:"center"},chip:{marginRight:7},table:{},tableCell:{padding:"3px 5px"},tableCellValue:{fontWeight:"bold"}},crosshair:{line:{stroke:"#000000",strokeWidth:1,strokeOpacity:.75,strokeDasharray:"6 6"}},annotations:{text:{fontSize:13,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},link:{stroke:"#000000",strokeWidth:1,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},outline:{fill:"none",stroke:"#000000",strokeWidth:2,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},symbol:{fill:"#000000",outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1}}};function Ft(){return Ft=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ft.apply(this,arguments)}function Ef(e,t){if(e==null)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var bD=["axis.ticks.text","axis.legend.text","legends.title.text","legends.text","legends.ticks.text","legends.title.text","labels.text","dots.text","markers.text","annotations.text"],yD=function(e,t){return Ft({},t,e)},_D=function(e,t){var n=TR({},e,t);return bD.forEach(function(r){Ga(n,r,yD(bn(n,r),n.text))}),n},by=p.createContext(),yy=function(e){var t=e.children,n=e.animate,r=n===void 0||n,a=e.config,i=a===void 0?"default":a,s=p.useMemo(function(){var o=GA(i)?Yd[i]:i;return{animate:r,config:o}},[r,i]);return y.jsx(by.Provider,{value:s,children:t})},Im={animate:E.bool,motionConfig:E.oneOfType([E.oneOf(Object.keys(Yd)),E.shape({mass:E.number,tension:E.number,friction:E.number,clamp:E.bool,precision:E.number,velocity:E.number,duration:E.number,easing:E.func})])};yy.propTypes={children:E.node.isRequired,animate:Im.animate,config:Im.motionConfig};var va=function(){return p.useContext(by)},xD={nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:de(mc),PRGn:de(gc),PiYG:de(vc),PuOr:de(bc),RdBu:de(yc),RdGy:de(_c),RdYlBu:de(xc),RdYlGn:de(wc),spectral:de(Tc),blues:de(Nc),greens:de(Dc),greys:de(Fc),oranges:de(zc),purples:de(Lc),reds:de(Uc),BuGn:de(Oc),BuPu:de(Cc),GnBu:de(Ec),OrRd:de(Sc),PuBuGn:de(kc),PuBu:de(Rc),PuRd:de(Ac),RdPu:de(Mc),YlGnBu:de($c),YlGn:de(jc),YlOrBr:de(Pc),YlOrRd:de(Ic)},wD=Object.keys(xD);de(mc),de(gc),de(vc),de(bc),de(yc),de(_c),de(xc),de(wc),de(Tc),de(Nc),de(Dc),de(Fc),de(zc),de(Lc),de(Uc),de(Oc),de(Cc),de(Ec),de(Sc),de(kc),de(Rc),de(Ac),de(Mc),de($c),de(jc),de(Pc),de(Ic);E.oneOfType([E.oneOf(wD),E.func,E.arrayOf(E.string)]);var TD={basis:fP,basisClosed:hP,basisOpen:pP,bundle:mP,cardinal:gP,cardinalClosed:vP,cardinalOpen:bP,catmullRom:yP,catmullRomClosed:_P,catmullRomOpen:xP,linear:ny,linearClosed:wP,monotoneX:TP,monotoneY:OP,natural:CP,step:EP,stepAfter:kP,stepBefore:SP},Sf=Object.keys(TD);Sf.filter(function(e){return e.endsWith("Closed")});Xb(Sf,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");Xb(Sf,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");E.shape({top:E.number,right:E.number,bottom:E.number,left:E.number}).isRequired;var OD=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"];E.oneOf(OD);Fr(xf);var CD={top:0,right:0,bottom:0,left:0},ED=function(e,t,n){return n===void 0&&(n={}),p.useMemo(function(){var r=Ft({},CD,n);return{margin:r,innerWidth:e-r.left-r.right,innerHeight:t-r.top-r.bottom,outerWidth:e,outerHeight:t}},[e,t,n.top,n.right,n.bottom,n.left])},_y=function(){var e=p.useRef(null),t=p.useState({left:0,top:0,width:0,height:0}),n=t[0],r=t[1],a=p.useState(function(){return typeof ResizeObserver>"u"?null:new ResizeObserver(function(i){var s=i[0];return r(s.contentRect)})})[0];return p.useEffect(function(){return e.current&&a!==null&&a.observe(e.current),function(){a!==null&&a.disconnect()}},[]),[e,n]},SD=function(e){return p.useMemo(function(){return _D(vD,e)},[e])},kD=function(e){return typeof e=="function"?e:typeof e=="string"?e.indexOf("time:")===0?Ub(e.slice("5")):$b(e):function(t){return""+t}},xy=function(e){return p.useMemo(function(){return kD(e)},[e])},wy=p.createContext(),RD={},Ty=function(e){var t=e.theme,n=t===void 0?RD:t,r=e.children,a=SD(n);return y.jsx(wy.Provider,{value:a,children:r})};Ty.propTypes={children:E.node.isRequired,theme:E.object};var St=function(){return p.useContext(wy)},AD=["outlineWidth","outlineColor","outlineOpacity"],Oy=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,Ef(e,AD)},Cy=function(e){var t=e.children,n=e.condition,r=e.wrapper;return n?p.cloneElement(r,{},t):t};Cy.propTypes={children:E.node.isRequired,condition:E.bool.isRequired,wrapper:E.element.isRequired};var MD={position:"relative"},Ey=function(e){var t=e.children,n=e.theme,r=e.renderWrapper,a=r===void 0||r,i=e.isInteractive,s=i===void 0||i,o=e.animate,c=e.motionConfig,u=p.useRef(null);return y.jsx(Ty,{theme:n,children:y.jsx(yy,{animate:o,config:c,children:y.jsx(KO,{container:u,children:y.jsxs(Cy,{condition:a,wrapper:y.jsx("div",{style:MD,ref:u}),children:[t,s&&y.jsx(GO,{})]})})})})};Ey.propTypes={children:E.element.isRequired,isInteractive:E.bool,renderWrapper:E.bool,theme:E.object,animate:E.bool,motionConfig:E.string};E.func.isRequired,E.bool,E.bool,E.object.isRequired,E.bool.isRequired,E.string;var Sy=function(e){var t=e.children,n=_y(),r=n[0],a=n[1],i=a.width>0&&a.height>0;return y.jsx("div",{ref:r,style:{width:"100%",height:"100%"},children:i&&t({width:a.width,height:a.height})})};Sy.propTypes={children:E.func.isRequired};var $D=["id","colors"],ky=function(e){var t=e.id,n=e.colors,r=Ef(e,$D);return y.jsx("linearGradient",Ft({id:t,x1:0,x2:0,y1:0,y2:1},r,{children:n.map(function(a){var i=a.offset,s=a.color,o=a.opacity;return y.jsx("stop",{offset:i+"%",stopColor:s,stopOpacity:o!==void 0?o:1},i)})}))};ky.propTypes={id:E.string.isRequired,colors:E.arrayOf(E.shape({offset:E.number.isRequired,color:E.string.isRequired,opacity:E.number})).isRequired,gradientTransform:E.string};var Ry={linearGradient:ky},Ba={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},Bl=p.memo(function(e){var t=e.id,n=e.background,r=n===void 0?Ba.background:n,a=e.color,i=a===void 0?Ba.color:a,s=e.size,o=s===void 0?Ba.size:s,c=e.padding,u=c===void 0?Ba.padding:c,l=e.stagger,d=l===void 0?Ba.stagger:l,f=o+u,m=o/2,g=u/2;return d===!0&&(f=2*o+2*u),y.jsxs("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:f,height:f,fill:r}),y.jsx("circle",{cx:g+m,cy:g+m,r:m,fill:i}),d&&y.jsx("circle",{cx:1.5*u+o+m,cy:1.5*u+o+m,r:m,fill:i})]})});Bl.displayName="PatternDots",Bl.propTypes={id:E.string.isRequired,color:E.string.isRequired,background:E.string.isRequired,size:E.number.isRequired,padding:E.number.isRequired,stagger:E.bool.isRequired};var fn=function(e){return e*Math.PI/180},kf=function(e){return 180*e/Math.PI},jD=function(e){return e.startAngle+(e.endAngle-e.startAngle)/2},Hr=function(e,t){return{x:Math.cos(e)*t,y:Math.sin(e)*t}},Wa={spacing:5,rotation:0,background:"#000000",color:"#ffffff",lineWidth:2},Wl=p.memo(function(e){var t=e.id,n=e.spacing,r=n===void 0?Wa.spacing:n,a=e.rotation,i=a===void 0?Wa.rotation:a,s=e.background,o=s===void 0?Wa.background:s,c=e.color,u=c===void 0?Wa.color:c,l=e.lineWidth,d=l===void 0?Wa.lineWidth:l,f=Math.round(i)%360,m=Math.abs(r);f>180?f-=360:f>90?f-=180:f<-180?f+=360:f<-90&&(f+=180);var g,v=m,h=m;return f===0?g=`
|
|
253
|
+
*/var jh;function T6(){return jh||(jh=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(O){return typeof O=="string"||typeof O=="function"||O===r||O===u||O===i||O===a||O===d||O===f||typeof O=="object"&&O!==null&&(O.$$typeof===g||O.$$typeof===m||O.$$typeof===s||O.$$typeof===o||O.$$typeof===l||O.$$typeof===h||O.$$typeof===w||O.$$typeof===x||O.$$typeof===v)}function T(O){if(typeof O=="object"&&O!==null){var ge=O.$$typeof;switch(ge){case t:var he=O.type;switch(he){case c:case u:case r:case i:case a:case d:return he;default:var ue=he&&he.$$typeof;switch(ue){case o:case l:case g:case m:case s:return ue;default:return ge}}case n:return ge}}}var _=c,S=u,$=o,D=s,I=t,M=l,k=r,Y=g,A=m,R=n,F=i,B=a,L=d,G=!1;function Z(O){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(O)||T(O)===c}function j(O){return T(O)===u}function U(O){return T(O)===o}function J(O){return T(O)===s}function te(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function K(O){return T(O)===l}function X(O){return T(O)===r}function V(O){return T(O)===g}function Q(O){return T(O)===m}function ee(O){return T(O)===n}function N(O){return T(O)===i}function W(O){return T(O)===a}function ne(O){return T(O)===d}Pe.AsyncMode=_,Pe.ConcurrentMode=S,Pe.ContextConsumer=$,Pe.ContextProvider=D,Pe.Element=I,Pe.ForwardRef=M,Pe.Fragment=k,Pe.Lazy=Y,Pe.Memo=A,Pe.Portal=R,Pe.Profiler=F,Pe.StrictMode=B,Pe.Suspense=L,Pe.isAsyncMode=Z,Pe.isConcurrentMode=j,Pe.isContextConsumer=U,Pe.isContextProvider=J,Pe.isElement=te,Pe.isForwardRef=K,Pe.isFragment=X,Pe.isLazy=V,Pe.isMemo=Q,Pe.isPortal=ee,Pe.isProfiler=N,Pe.isStrictMode=W,Pe.isSuspense=ne,Pe.isValidElementType=b,Pe.typeOf=T}()),Pe}process.env.NODE_ENV==="production"?hl.exports=w6():hl.exports=T6();var O6=hl.exports,Ug=O6,C6={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},E6={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},zg={};zg[Ug.ForwardRef]=C6;zg[Ug.Memo]=E6;function S6(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function Od(e,t){const n=p.useContext(x6);if(!n)throw new Error("Missing <CookiesProvider>");const a=Object.assign(Object.assign({},{doNotUpdate:!0}),t),[i,s]=p.useState(()=>n.getAll(a));S6()&&p.useLayoutEffect(()=>{function l(){const d=n.getAll(a);k6(e||null,d,i)&&s(d)}return n.addChangeListener(l),()=>{n.removeChangeListener(l)}},[n,i]);const o=p.useMemo(()=>n.set.bind(n),[n]),c=p.useMemo(()=>n.remove.bind(n),[n]),u=p.useMemo(()=>n.update.bind(n),[n]);return[i,o,c,u]}function k6(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}const R6=()=>{const{axiosOptions:e,cookieDomain:t}=p.useContext(Et),[,n,r]=Od(["Authorization"]),a=Be.create(e),i=p.useCallback(()=>localStorage.getItem("token")??null,[]),s=p.useCallback(()=>{const u=i();return u!==null&&u.length>0},[i]),o=p.useCallback(async(u,l)=>a.post("/user/login",{kid:u,password:l}).then(d=>(localStorage.setItem("token",d.data),n("Authorization",d.data,{path:"/",secure:!0,sameSite:"none",domain:t,expires:t1(new Date(Date.now()),24)}),d.data)).catch(d=>(console.log(d),null)),[a,n,t]),c=p.useCallback(()=>{localStorage.removeItem("token"),localStorage.removeItem("user"),r("Authorization")},[r]);return{isAuthenticated:s,login:o,logout:c,getToken:i}},A6=()=>{const[,,e]=Od(["Authorization"]),{msalScopes:t}=p.useContext(Sd),{instance:n,inProgress:r}=Af.useMsal(),a=Af.useIsAuthenticated(),i=p.useCallback(async()=>{var f;const l=n.getActiveAccount(),d=l??((f=n.getAllAccounts())==null?void 0:f.at(0))??void 0;return d?(l||n.setActiveAccount(d),n.acquireTokenSilent({scopes:t,account:d}).then(m=>m.accessToken).catch(m=>{if(console.error("Error acquiring token",m),m instanceof Rf.InteractionRequiredAuthError)return console.log("Silent token acquisition failed. Acquiring token using redirect"),n.acquireTokenRedirect({scopes:t}),null;throw m})):null},[n,t]),s=p.useCallback(()=>a,[a]),o=p.useCallback(()=>!s()&&r!==Rf.InteractionStatus.None,[s,r]),c=p.useCallback(async()=>n.loginRedirect({scopes:t}).then(()=>"").catch(()=>null),[n,t]),u=p.useCallback(()=>{n.logout(),localStorage.removeItem("user"),e("Authorization")},[e,n]);return{isAuthenticated:s,isAuthenticating:o,login:c,logout:u,getToken:i}},Bg=()=>{const{useMsal:e}=p.useContext(Sd),t=R6(),n=A6();return{isAuthenticated:e?n.isAuthenticated:t.isAuthenticated,isAuthenticating:e?n.isAuthenticating:()=>!1,getToken:e?n.getToken:t.getToken,login:e?n.login:t.login,logout:e?n.logout:t.logout}},M6="_toast_1s57i_1",ja={toast:M6},$6=e=>{switch(e){case"success":return 5e3;case"info":return 5e3;case"danger":return 1e4;case"warning":return 1e4;case"prompt":return 1e4;default:return 5e3}},Cd=()=>({addNotification:p.useCallback((t,n)=>{const r=jg(t),a=$6(n),i=y.jsxs(y.Fragment,{children:[r,y.jsx(J0,{onClick:()=>$r.dismiss(r),type:"button",style:{position:"absolute",fontSize:"12px",top:"calc(50% - 6px)",right:"8px"}})]});switch(n){case"success":{$r(i,{id:r,duration:a,position:"top-center",icon:y.jsx(ww,{size:12}),className:ae("luminus-toast-success rounded shadow bg-success",ja.toast)});break}case"danger":{$r(i,{id:r,duration:a,position:"top-center",icon:y.jsx(pw,{size:12}),className:ae("luminus-toast-danger rounded shadow bg-danger",ja.toast)});break}case"warning":{$r(i,{id:r,duration:a,position:"top-center",icon:y.jsx(uw,{size:12}),className:ae("luminus-toast-warning rounded shadow bg-warning",ja.toast)});break}case"info":{$r(i,{id:r,duration:a,position:"top-center",icon:y.jsx(fw,{size:12}),className:ae("luminus-toast-info rounded shadow bg-info",ja.toast)});break}case"prompt":{$r(i,{id:r,duration:a,position:"top-center",icon:y.jsx(hw,{size:12}),className:ae("luminus-toast-prompt rounded shadow bg-light",ja.toast)});break}}},[])}),j6=Be.CancelToken,Ho=e=>{const{authenticated:t=!0,differentBaseUrl:n,silent:r=!1,customToken:a,ignoreDelegation:i}={...e},{language:s,axiosOptions:o,texts:{axios:c}}=p.useContext(Et),{delegation:u}=p.useContext(tv),l=p.useMemo(()=>(u==null?void 0:u.id)??null,[u==null?void 0:u.id]),{addNotification:d}=Cd(),{getToken:f}=Bg(),m=p.useMemo(()=>Be.create(o),[o]),g=p.useCallback(async h=>{var w,x,b;if(t&&!h.headers.Authorization){const T=a??await f();if(!T)return Promise.reject(new Error("No bearer token"));h.headers.Authorization=`Bearer ${T}`}return l!==null&&!i&&(h.headers.DelegationId=l.toString()),(w=h.url)!=null&&w.includes("culture=")?h.url=(x=h.url)==null?void 0:x.replace(/culture=[a-z]{2}/,`culture=${s}`):h.url=`${h.url}${(b=h.url)!=null&&b.includes("?")?"&":"?"}culture=${s}`,h},[t,f,s,a,l,i]),v=p.useCallback(h=>{var b;if(console.log(h),Be.isCancel(h))return Promise.reject(h);const w=xd(h);if(w.length>0){const T=w.find(_=>_.name.toLowerCase()==="others");return T?(!r&&d(T.errors,"danger"),Promise.reject(h)):(!r&&d(c.validationError,"warning"),Promise.reject(h))}const x=$g(h);return x!==null?(!r&&d(`${c.permissionError}: ${wd(", ",...x)}`,"danger"),Promise.reject(h)):((b=h.response)==null?void 0:b.status)===403?(!r&&d(c.forbiddenError,"danger"),Promise.reject(h)):h.message&&h.message==="Network Error"?(!r&&d(c.networkError,"danger"),Promise.reject(h)):(Be.isCancel(h)||!r&&d(c.unexpectedError,"danger"),Promise.reject(h))},[d,c.forbiddenError,c.networkError,c.permissionError,c.unexpectedError,c.validationError,r]);return p.useEffect(()=>{n&&(m.defaults.baseURL=n),m.interceptors.request.clear(),m.interceptors.response.clear();const h=m.interceptors.request.use(g,x=>Promise.reject(x)),w=m.interceptors.response.use(x=>x,v);return()=>{m.interceptors.request.eject(h),m.interceptors.response.eject(w)}},[m.defaults,m.interceptors.request,m.interceptors.response,n,g,v]),m};let yu;const Wg=()=>{const{show:e,text:t,showConfirm:n,hideConfirm:r}=p.useContext(Q0),a=()=>{r()};return{confirm:async c=>(n(c),new Promise(u=>{yu=u})),onConfirm:()=>{a(),yu(!0)},onCancel:()=>{a(),yu(!1)},show:e,text:t}};var Se;(function(e){e.assertEqual=a=>a;function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const i={};for(const s of a)i[s]=s;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),s={};for(const o of i)s[o]=a[o];return e.objectValues(s)},e.objectValues=a=>e.objectKeys(a).map(function(i){return a[i]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const s in a)Object.prototype.hasOwnProperty.call(a,s)&&i.push(s);return i},e.find=(a,i)=>{for(const s of a)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function r(a,i=" | "){return a.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(Se||(Se={}));var pl;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(pl||(pl={}));const se=Se.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Mn=e=>{switch(typeof e){case"undefined":return se.undefined;case"string":return se.string;case"number":return isNaN(e)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;case"object":return Array.isArray(e)?se.array:e===null?se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?se.promise:typeof Map<"u"&&e instanceof Map?se.map:typeof Set<"u"&&e instanceof Set?se.set:typeof Date<"u"&&e instanceof Date?se.date:se.object;default:return se.unknown}},H=Se.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),P6=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Tt extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},a=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(a);else if(s.code==="invalid_return_type")a(s.returnTypeError);else if(s.code==="invalid_arguments")a(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let o=r,c=0;for(;c<s.path.length;){const u=s.path[c];c===s.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(n(s))):o[u]=o[u]||{_errors:[]},o=o[u],c++}}};return a(this),r}static assert(t){if(!(t instanceof Tt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Se.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Tt.create=e=>new Tt(e);const Jr=(e,t)=>{let n;switch(e.code){case H.invalid_type:e.received===se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case H.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Se.jsonStringifyReplacer)}`;break;case H.unrecognized_keys:n=`Unrecognized key(s) in object: ${Se.joinValues(e.keys,", ")}`;break;case H.invalid_union:n="Invalid input";break;case H.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Se.joinValues(e.options)}`;break;case H.invalid_enum_value:n=`Invalid enum value. Expected ${Se.joinValues(e.options)}, received '${e.received}'`;break;case H.invalid_arguments:n="Invalid function arguments";break;case H.invalid_return_type:n="Invalid function return type";break;case H.invalid_date:n="Invalid date";break;case H.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Se.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case H.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case H.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case H.custom:n="Invalid input";break;case H.invalid_intersection_types:n="Intersection results could not be merged";break;case H.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case H.not_finite:n="Number must be finite";break;default:n=t.defaultError,Se.assertNever(e)}return{message:n}};let qg=Jr;function I6(e){qg=e}function Xs(){return qg}const Js=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],s={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let o="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)o=u(s,{data:t,defaultError:o}).message;return{...a,path:i,message:o}},N6=[];function ie(e,t){const n=Xs(),r=Js({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Jr?void 0:Jr].filter(a=>!!a)});e.common.issues.push(r)}class at{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return me;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const i=await a.key,s=await a.value;r.push({key:i,value:s})}return at.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:i,value:s}=a;if(i.status==="aborted"||s.status==="aborted")return me;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||a.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),Dr=e=>({status:"dirty",value:e}),ut=e=>({status:"valid",value:e}),ml=e=>e.status==="aborted",gl=e=>e.status==="dirty",oi=e=>e.status==="valid",ci=e=>typeof Promise<"u"&&e instanceof Promise;function Qs(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Hg(e,t,n,r,a){if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ce||(ce={}));var Va,Ya;class Xt{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ph=(e,t)=>{if(oi(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Tt(e.common.issues);return this._error=n,this._error}}};function _e(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(s,o)=>{var c,u;const{message:l}=e;return s.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:(c=l??r)!==null&&c!==void 0?c:o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:(u=l??n)!==null&&u!==void 0?u:o.defaultError}},description:a}}class Te{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Mn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Mn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new at,ctx:{common:t.parent.common,data:t.data,parsedType:Mn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ci(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const a={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mn(t)},i=this._parseSync({data:t,path:a.path,parent:a});return Ph(a,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mn(t)},a=this._parse({data:t,path:r.path,parent:r}),i=await(ci(a)?a:Promise.resolve(a));return Ph(r,i)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,i)=>{const s=t(a),o=()=>i.addIssue({code:H.custom,...r(a)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new Lt({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Gt.create(this,this._def)}nullable(){return zn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Dt.create(this,this._def)}promise(){return ea.create(this,this._def)}or(t){return fi.create([this,t],this._def)}and(t){return hi.create(this,t,this._def)}transform(t){return new Lt({..._e(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new bi({..._e(this._def),innerType:this,defaultValue:n,typeName:pe.ZodDefault})}brand(){return new Ed({typeName:pe.ZodBranded,type:this,..._e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new yi({..._e(this._def),innerType:this,catchValue:n,typeName:pe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ui.create(this,t)}readonly(){return _i.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const D6=/^c[^\s-]{8,}$/i,F6=/^[0-9a-z]+$/,L6=/^[0-9A-HJKMNP-TV-Z]{26}$/,U6=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,z6=/^[a-z0-9_-]{21}$/i,B6=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,W6=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,q6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _u;const H6=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,V6=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Y6=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Vg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Z6=new RegExp(`^${Vg}$`);function Yg(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function G6(e){return new RegExp(`^${Yg(e)}$`)}function Zg(e){let t=`${Vg}T${Yg(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function K6(e,t){return!!((t==="v4"||!t)&&H6.test(e)||(t==="v6"||!t)&&V6.test(e))}class Pt extends Te{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==se.string){const i=this._getOrReturnCtx(t);return ie(i,{code:H.invalid_type,expected:se.string,received:i.parsedType}),me}const r=new at;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),ie(a,{code:H.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(a=this._getOrReturnCtx(t,a),ie(a,{code:H.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,o=t.data.length<i.value;(s||o)&&(a=this._getOrReturnCtx(t,a),s?ie(a,{code:H.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&ie(a,{code:H.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")W6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"email",code:H.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")_u||(_u=new RegExp(q6,"u")),_u.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"emoji",code:H.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")U6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"uuid",code:H.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")z6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"nanoid",code:H.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")D6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"cuid",code:H.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")F6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"cuid2",code:H.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")L6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"ulid",code:H.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),ie(a,{validation:"url",code:H.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"regex",code:H.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(t,a),ie(a,{code:H.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(a=this._getOrReturnCtx(t,a),ie(a,{code:H.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),ie(a,{code:H.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Zg(i).test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{code:H.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Z6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{code:H.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?G6(i).test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{code:H.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?B6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"duration",code:H.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?K6(t.data,i.version)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"ip",code:H.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Y6.test(t.data)||(a=this._getOrReturnCtx(t,a),ie(a,{validation:"base64",code:H.invalid_string,message:i.message}),r.dirty()):Se.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:H.invalid_string,...ce.errToObj(r)})}_addCheck(t){return new Pt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ce.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ce.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ce.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ce.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ce.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ce.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ce.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ce.errToObj(n)})}nonempty(t){return this.min(1,ce.errToObj(t))}trim(){return new Pt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Pt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Pt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Pt.create=e=>{var t;return new Pt({checks:[],typeName:pe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};function X6(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,i=parseInt(e.toFixed(a).replace(".","")),s=parseInt(t.toFixed(a).replace(".",""));return i%s/Math.pow(10,a)}class Fn extends Te{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==se.number){const i=this._getOrReturnCtx(t);return ie(i,{code:H.invalid_type,expected:se.number,received:i.parsedType}),me}let r;const a=new at;for(const i of this._def.checks)i.kind==="int"?Se.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ie(r,{code:H.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ie(r,{code:H.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ie(r,{code:H.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?X6(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ie(r,{code:H.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ie(r,{code:H.not_finite,message:i.message}),a.dirty()):Se.assertNever(i);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,a){return new Fn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(a)}]})}_addCheck(t){return new Fn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Se.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Fn.create=e=>new Fn({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class Ln extends Te{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==se.bigint){const i=this._getOrReturnCtx(t);return ie(i,{code:H.invalid_type,expected:se.bigint,received:i.parsedType}),me}let r;const a=new at;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ie(r,{code:H.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ie(r,{code:H.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ie(r,{code:H.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):Se.assertNever(i);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,a){return new Ln({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(a)}]})}_addCheck(t){return new Ln({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ln.create=e=>{var t;return new Ln({checks:[],typeName:pe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};class ui extends Te{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==se.boolean){const r=this._getOrReturnCtx(t);return ie(r,{code:H.invalid_type,expected:se.boolean,received:r.parsedType}),me}return ut(t.data)}}ui.create=e=>new ui({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class hr extends Te{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==se.date){const i=this._getOrReturnCtx(t);return ie(i,{code:H.invalid_type,expected:se.date,received:i.parsedType}),me}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ie(i,{code:H.invalid_date}),me}const r=new at;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),ie(a,{code:H.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(a=this._getOrReturnCtx(t,a),ie(a,{code:H.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Se.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new hr({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ce.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}hr.create=e=>new hr({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,..._e(e)});class eo extends Te{_parse(t){if(this._getType(t)!==se.symbol){const r=this._getOrReturnCtx(t);return ie(r,{code:H.invalid_type,expected:se.symbol,received:r.parsedType}),me}return ut(t.data)}}eo.create=e=>new eo({typeName:pe.ZodSymbol,..._e(e)});class li extends Te{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return ie(r,{code:H.invalid_type,expected:se.undefined,received:r.parsedType}),me}return ut(t.data)}}li.create=e=>new li({typeName:pe.ZodUndefined,..._e(e)});class di extends Te{_parse(t){if(this._getType(t)!==se.null){const r=this._getOrReturnCtx(t);return ie(r,{code:H.invalid_type,expected:se.null,received:r.parsedType}),me}return ut(t.data)}}di.create=e=>new di({typeName:pe.ZodNull,..._e(e)});class Qr extends Te{constructor(){super(...arguments),this._any=!0}_parse(t){return ut(t.data)}}Qr.create=e=>new Qr({typeName:pe.ZodAny,..._e(e)});class cr extends Te{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ut(t.data)}}cr.create=e=>new cr({typeName:pe.ZodUnknown,..._e(e)});class vn extends Te{_parse(t){const n=this._getOrReturnCtx(t);return ie(n,{code:H.invalid_type,expected:se.never,received:n.parsedType}),me}}vn.create=e=>new vn({typeName:pe.ZodNever,..._e(e)});class to extends Te{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return ie(r,{code:H.invalid_type,expected:se.void,received:r.parsedType}),me}return ut(t.data)}}to.create=e=>new to({typeName:pe.ZodVoid,..._e(e)});class Dt extends Te{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==se.array)return ie(n,{code:H.invalid_type,expected:se.array,received:n.parsedType}),me;if(a.exactLength!==null){const s=n.data.length>a.exactLength.value,o=n.data.length<a.exactLength.value;(s||o)&&(ie(n,{code:s?H.too_big:H.too_small,minimum:o?a.exactLength.value:void 0,maximum:s?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(ie(n,{code:H.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(ie(n,{code:H.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,o)=>a.type._parseAsync(new Xt(n,s,n.path,o)))).then(s=>at.mergeArray(r,s));const i=[...n.data].map((s,o)=>a.type._parseSync(new Xt(n,s,n.path,o)));return at.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Dt({...this._def,minLength:{value:t,message:ce.toString(n)}})}max(t,n){return new Dt({...this._def,maxLength:{value:t,message:ce.toString(n)}})}length(t,n){return new Dt({...this._def,exactLength:{value:t,message:ce.toString(n)}})}nonempty(t){return this.min(1,t)}}Dt.create=(e,t)=>new Dt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,..._e(t)});function Nr(e){if(e instanceof qe){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Gt.create(Nr(r))}return new qe({...e._def,shape:()=>t})}else return e instanceof Dt?new Dt({...e._def,type:Nr(e.element)}):e instanceof Gt?Gt.create(Nr(e.unwrap())):e instanceof zn?zn.create(Nr(e.unwrap())):e instanceof Jt?Jt.create(e.items.map(t=>Nr(t))):e}class qe extends Te{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Se.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==se.object){const u=this._getOrReturnCtx(t);return ie(u,{code:H.invalid_type,expected:se.object,received:u.parsedType}),me}const{status:r,ctx:a}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof vn&&this._def.unknownKeys==="strip"))for(const u in a.data)s.includes(u)||o.push(u);const c=[];for(const u of s){const l=i[u],d=a.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Xt(a,d,a.path,u)),alwaysSet:u in a.data})}if(this._def.catchall instanceof vn){const u=this._def.unknownKeys;if(u==="passthrough")for(const l of o)c.push({key:{status:"valid",value:l},value:{status:"valid",value:a.data[l]}});else if(u==="strict")o.length>0&&(ie(a,{code:H.unrecognized_keys,keys:o}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const l of o){const d=a.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Xt(a,d,a.path,l)),alwaysSet:l in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const u=[];for(const l of c){const d=await l.key,f=await l.value;u.push({key:d,value:f,alwaysSet:l.alwaysSet})}return u}).then(u=>at.mergeObjectSync(r,u)):at.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return ce.errToObj,new qe({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var a,i,s,o;const c=(s=(i=(a=this._def).errorMap)===null||i===void 0?void 0:i.call(a,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(o=ce.errToObj(t).message)!==null&&o!==void 0?o:c}:{message:c}}}:{}})}strip(){return new qe({...this._def,unknownKeys:"strip"})}passthrough(){return new qe({...this._def,unknownKeys:"passthrough"})}extend(t){return new qe({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new qe({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new qe({...this._def,catchall:t})}pick(t){const n={};return Se.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new qe({...this._def,shape:()=>n})}omit(t){const n={};return Se.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new qe({...this._def,shape:()=>n})}deepPartial(){return Nr(this)}partial(t){const n={};return Se.objectKeys(this.shape).forEach(r=>{const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}),new qe({...this._def,shape:()=>n})}required(t){const n={};return Se.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Gt;)i=i._def.innerType;n[r]=i}}),new qe({...this._def,shape:()=>n})}keyof(){return Gg(Se.objectKeys(this.shape))}}qe.create=(e,t)=>new qe({shape:()=>e,unknownKeys:"strip",catchall:vn.create(),typeName:pe.ZodObject,..._e(t)});qe.strictCreate=(e,t)=>new qe({shape:()=>e,unknownKeys:"strict",catchall:vn.create(),typeName:pe.ZodObject,..._e(t)});qe.lazycreate=(e,t)=>new qe({shape:e,unknownKeys:"strip",catchall:vn.create(),typeName:pe.ZodObject,..._e(t)});class fi extends Te{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(i){for(const o of i)if(o.result.status==="valid")return o.result;for(const o of i)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const s=i.map(o=>new Tt(o.ctx.common.issues));return ie(n,{code:H.invalid_union,unionErrors:s}),me}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(a);{let i;const s=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},l=c._parseSync({data:n.data,path:n.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const o=s.map(c=>new Tt(c));return ie(n,{code:H.invalid_union,unionErrors:o}),me}}get options(){return this._def.options}}fi.create=(e,t)=>new fi({options:e,typeName:pe.ZodUnion,..._e(t)});const on=e=>e instanceof mi?on(e.schema):e instanceof Lt?on(e.innerType()):e instanceof gi?[e.value]:e instanceof Un?e.options:e instanceof vi?Se.objectValues(e.enum):e instanceof bi?on(e._def.innerType):e instanceof li?[void 0]:e instanceof di?[null]:e instanceof Gt?[void 0,...on(e.unwrap())]:e instanceof zn?[null,...on(e.unwrap())]:e instanceof Ed||e instanceof _i?on(e.unwrap()):e instanceof yi?on(e._def.innerType):[];class Vo extends Te{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.object)return ie(n,{code:H.invalid_type,expected:se.object,received:n.parsedType}),me;const r=this.discriminator,a=n.data[r],i=this.optionsMap.get(a);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ie(n,{code:H.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const a=new Map;for(const i of n){const s=on(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const o of s){if(a.has(o))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(o)}`);a.set(o,i)}}return new Vo({typeName:pe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a,..._e(r)})}}function vl(e,t){const n=Mn(e),r=Mn(t);if(e===t)return{valid:!0,data:e};if(n===se.object&&r===se.object){const a=Se.objectKeys(t),i=Se.objectKeys(e).filter(o=>a.indexOf(o)!==-1),s={...e,...t};for(const o of i){const c=vl(e[o],t[o]);if(!c.valid)return{valid:!1};s[o]=c.data}return{valid:!0,data:s}}else if(n===se.array&&r===se.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const s=e[i],o=t[i],c=vl(s,o);if(!c.valid)return{valid:!1};a.push(c.data)}return{valid:!0,data:a}}else return n===se.date&&r===se.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class hi extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(i,s)=>{if(ml(i)||ml(s))return me;const o=vl(i.value,s.value);return o.valid?((gl(i)||gl(s))&&n.dirty(),{status:n.value,value:o.data}):(ie(r,{code:H.invalid_intersection_types}),me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>a(i,s)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}hi.create=(e,t,n)=>new hi({left:e,right:t,typeName:pe.ZodIntersection,..._e(n)});class Jt extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.array)return ie(r,{code:H.invalid_type,expected:se.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return ie(r,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(ie(r,{code:H.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new Xt(r,s,r.path,o)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>at.mergeArray(n,s)):at.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Jt({...this._def,rest:t})}}Jt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jt({items:e,typeName:pe.ZodTuple,rest:null,..._e(t)})};class pi extends Te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.object)return ie(r,{code:H.invalid_type,expected:se.object,received:r.parsedType}),me;const a=[],i=this._def.keyType,s=this._def.valueType;for(const o in r.data)a.push({key:i._parse(new Xt(r,o,r.path,o)),value:s._parse(new Xt(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?at.mergeObjectAsync(n,a):at.mergeObjectSync(n,a)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Te?new pi({keyType:t,valueType:n,typeName:pe.ZodRecord,..._e(r)}):new pi({keyType:Pt.create(),valueType:t,typeName:pe.ZodRecord,..._e(n)})}}class no extends Te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.map)return ie(r,{code:H.invalid_type,expected:se.map,received:r.parsedType}),me;const a=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([o,c],u)=>({key:a._parse(new Xt(r,o,r.path,[u,"key"])),value:i._parse(new Xt(r,c,r.path,[u,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of s){const u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return me;(u.status==="dirty"||l.status==="dirty")&&n.dirty(),o.set(u.value,l.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const c of s){const u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return me;(u.status==="dirty"||l.status==="dirty")&&n.dirty(),o.set(u.value,l.value)}return{status:n.value,value:o}}}}no.create=(e,t,n)=>new no({valueType:t,keyType:e,typeName:pe.ZodMap,..._e(n)});class pr extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.set)return ie(r,{code:H.invalid_type,expected:se.set,received:r.parsedType}),me;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(ie(r,{code:H.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(ie(r,{code:H.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const i=this._def.valueType;function s(c){const u=new Set;for(const l of c){if(l.status==="aborted")return me;l.status==="dirty"&&n.dirty(),u.add(l.value)}return{status:n.value,value:u}}const o=[...r.data.values()].map((c,u)=>i._parse(new Xt(r,c,r.path,u)));return r.common.async?Promise.all(o).then(c=>s(c)):s(o)}min(t,n){return new pr({...this._def,minSize:{value:t,message:ce.toString(n)}})}max(t,n){return new pr({...this._def,maxSize:{value:t,message:ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}pr.create=(e,t)=>new pr({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,..._e(t)});class Ur extends Te{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.function)return ie(n,{code:H.invalid_type,expected:se.function,received:n.parsedType}),me;function r(o,c){return Js({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Xs(),Jr].filter(u=>!!u),issueData:{code:H.invalid_arguments,argumentsError:c}})}function a(o,c){return Js({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Xs(),Jr].filter(u=>!!u),issueData:{code:H.invalid_return_type,returnTypeError:c}})}const i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof ea){const o=this;return ut(async function(...c){const u=new Tt([]),l=await o._def.args.parseAsync(c,i).catch(m=>{throw u.addIssue(r(c,m)),u}),d=await Reflect.apply(s,this,l);return await o._def.returns._def.type.parseAsync(d,i).catch(m=>{throw u.addIssue(a(d,m)),u})})}else{const o=this;return ut(function(...c){const u=o._def.args.safeParse(c,i);if(!u.success)throw new Tt([r(c,u.error)]);const l=Reflect.apply(s,this,u.data),d=o._def.returns.safeParse(l,i);if(!d.success)throw new Tt([a(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ur({...this._def,args:Jt.create(t).rest(cr.create())})}returns(t){return new Ur({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ur({args:t||Jt.create([]).rest(cr.create()),returns:n||cr.create(),typeName:pe.ZodFunction,..._e(r)})}}class mi extends Te{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}mi.create=(e,t)=>new mi({getter:e,typeName:pe.ZodLazy,..._e(t)});class gi extends Te{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ie(n,{received:n.data,code:H.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}gi.create=(e,t)=>new gi({value:e,typeName:pe.ZodLiteral,..._e(t)});function Gg(e,t){return new Un({values:e,typeName:pe.ZodEnum,..._e(t)})}class Un extends Te{constructor(){super(...arguments),Va.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ie(n,{expected:Se.joinValues(r),received:n.parsedType,code:H.invalid_type}),me}if(Qs(this,Va)||Hg(this,Va,new Set(this._def.values)),!Qs(this,Va).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ie(n,{received:n.data,code:H.invalid_enum_value,options:r}),me}return ut(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Un.create(t,{...this._def,...n})}exclude(t,n=this._def){return Un.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Va=new WeakMap;Un.create=Gg;class vi extends Te{constructor(){super(...arguments),Ya.set(this,void 0)}_parse(t){const n=Se.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==se.string&&r.parsedType!==se.number){const a=Se.objectValues(n);return ie(r,{expected:Se.joinValues(a),received:r.parsedType,code:H.invalid_type}),me}if(Qs(this,Ya)||Hg(this,Ya,new Set(Se.getValidEnumValues(this._def.values))),!Qs(this,Ya).has(t.data)){const a=Se.objectValues(n);return ie(r,{received:r.data,code:H.invalid_enum_value,options:a}),me}return ut(t.data)}get enum(){return this._def.values}}Ya=new WeakMap;vi.create=(e,t)=>new vi({values:e,typeName:pe.ZodNativeEnum,..._e(t)});class ea extends Te{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.promise&&n.common.async===!1)return ie(n,{code:H.invalid_type,expected:se.promise,received:n.parsedType}),me;const r=n.parsedType===se.promise?n.data:Promise.resolve(n.data);return ut(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ea.create=(e,t)=>new ea({type:e,typeName:pe.ZodPromise,..._e(t)});class Lt extends Te{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:s=>{ie(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const s=a.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async o=>{if(n.value==="aborted")return me;const c=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return c.status==="aborted"?me:c.status==="dirty"||n.value==="dirty"?Dr(c.value):c});{if(n.value==="aborted")return me;const o=this._def.schema._parseSync({data:s,path:r.path,parent:r});return o.status==="aborted"?me:o.status==="dirty"||n.value==="dirty"?Dr(o.value):o}}if(a.type==="refinement"){const s=o=>{const c=a.refinement(o,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?me:(o.status==="dirty"&&n.dirty(),s(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?me:(o.status==="dirty"&&n.dirty(),s(o.value).then(()=>({status:n.value,value:o.value}))))}if(a.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!oi(s))return s;const o=a.transform(s.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>oi(s)?Promise.resolve(a.transform(s.value,i)).then(o=>({status:n.value,value:o})):s);Se.assertNever(a)}}Lt.create=(e,t,n)=>new Lt({schema:e,typeName:pe.ZodEffects,effect:t,..._e(n)});Lt.createWithPreprocess=(e,t,n)=>new Lt({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,..._e(n)});class Gt extends Te{_parse(t){return this._getType(t)===se.undefined?ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Gt.create=(e,t)=>new Gt({innerType:e,typeName:pe.ZodOptional,..._e(t)});class zn extends Te{_parse(t){return this._getType(t)===se.null?ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}zn.create=(e,t)=>new zn({innerType:e,typeName:pe.ZodNullable,..._e(t)});class bi extends Te{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}bi.create=(e,t)=>new bi({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,..._e(t)});class yi extends Te{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ci(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Tt(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Tt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}yi.create=(e,t)=>new yi({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,..._e(t)});class ro extends Te{_parse(t){if(this._getType(t)!==se.nan){const r=this._getOrReturnCtx(t);return ie(r,{code:H.invalid_type,expected:se.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}ro.create=e=>new ro({typeName:pe.ZodNaN,..._e(e)});const J6=Symbol("zod_brand");class Ed extends Te{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ui extends Te{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?me:i.status==="dirty"?(n.dirty(),Dr(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new Ui({in:t,out:n,typeName:pe.ZodPipeline})}}class _i extends Te{_parse(t){const n=this._def.innerType._parse(t),r=a=>(oi(a)&&(a.value=Object.freeze(a.value)),a);return ci(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}_i.create=(e,t)=>new _i({innerType:e,typeName:pe.ZodReadonly,..._e(t)});function Kg(e,t={},n){return e?Qr.create().superRefine((r,a)=>{var i,s;if(!e(r)){const o=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(s=(i=o.fatal)!==null&&i!==void 0?i:n)!==null&&s!==void 0?s:!0,u=typeof o=="string"?{message:o}:o;a.addIssue({code:"custom",...u,fatal:c})}}):Qr.create()}const Q6={object:qe.lazycreate};var pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pe||(pe={}));const e5=(e,t={message:`Input not instance of ${e.name}`})=>Kg(n=>n instanceof e,t),Xg=Pt.create,Jg=Fn.create,t5=ro.create,n5=Ln.create,Qg=ui.create,r5=hr.create,a5=eo.create,i5=li.create,s5=di.create,o5=Qr.create,c5=cr.create,u5=vn.create,l5=to.create,d5=Dt.create,f5=qe.create,h5=qe.strictCreate,p5=fi.create,m5=Vo.create,g5=hi.create,v5=Jt.create,b5=pi.create,y5=no.create,_5=pr.create,x5=Ur.create,w5=mi.create,T5=gi.create,O5=Un.create,C5=vi.create,E5=ea.create,Ih=Lt.create,S5=Gt.create,k5=zn.create,R5=Lt.createWithPreprocess,A5=Ui.create,M5=()=>Xg().optional(),$5=()=>Jg().optional(),j5=()=>Qg().optional(),P5={string:e=>Pt.create({...e,coerce:!0}),number:e=>Fn.create({...e,coerce:!0}),boolean:e=>ui.create({...e,coerce:!0}),bigint:e=>Ln.create({...e,coerce:!0}),date:e=>hr.create({...e,coerce:!0})},I5=me;var Qe=Object.freeze({__proto__:null,defaultErrorMap:Jr,setErrorMap:I6,getErrorMap:Xs,makeIssue:Js,EMPTY_PATH:N6,addIssueToContext:ie,ParseStatus:at,INVALID:me,DIRTY:Dr,OK:ut,isAborted:ml,isDirty:gl,isValid:oi,isAsync:ci,get util(){return Se},get objectUtil(){return pl},ZodParsedType:se,getParsedType:Mn,ZodType:Te,datetimeRegex:Zg,ZodString:Pt,ZodNumber:Fn,ZodBigInt:Ln,ZodBoolean:ui,ZodDate:hr,ZodSymbol:eo,ZodUndefined:li,ZodNull:di,ZodAny:Qr,ZodUnknown:cr,ZodNever:vn,ZodVoid:to,ZodArray:Dt,ZodObject:qe,ZodUnion:fi,ZodDiscriminatedUnion:Vo,ZodIntersection:hi,ZodTuple:Jt,ZodRecord:pi,ZodMap:no,ZodSet:pr,ZodFunction:Ur,ZodLazy:mi,ZodLiteral:gi,ZodEnum:Un,ZodNativeEnum:vi,ZodPromise:ea,ZodEffects:Lt,ZodTransformer:Lt,ZodOptional:Gt,ZodNullable:zn,ZodDefault:bi,ZodCatch:yi,ZodNaN:ro,BRAND:J6,ZodBranded:Ed,ZodPipeline:Ui,ZodReadonly:_i,custom:Kg,Schema:Te,ZodSchema:Te,late:Q6,get ZodFirstPartyTypeKind(){return pe},coerce:P5,any:o5,array:d5,bigint:n5,boolean:Qg,date:r5,discriminatedUnion:m5,effect:Ih,enum:O5,function:x5,instanceof:e5,intersection:g5,lazy:w5,literal:T5,map:y5,nan:t5,nativeEnum:C5,never:u5,null:s5,nullable:k5,number:Jg,object:f5,oboolean:j5,onumber:$5,optional:S5,ostring:M5,pipeline:A5,preprocess:R5,promise:E5,record:b5,set:_5,strictObject:h5,string:Xg,symbol:a5,transformer:Ih,tuple:v5,undefined:i5,union:p5,unknown:c5,void:l5,NEVER:I5,ZodIssueCode:H,quotelessJson:P6,ZodError:Tt});const Yo=()=>{const{texts:{formValidation:e}}=p.useContext(Et),t=p.useCallback(v=>(v!=null&&v.useCoerce?Qe.coerce:Qe).string({invalid_type_error:e.required,required_error:e.required}).transform(w=>w??null),[e.required]),n=p.useCallback(v=>t(v).nullable().optional().transform(h=>h??null),[t]),r=p.useCallback(v=>{const h=(v==null?void 0:v.min)??Number.MIN_SAFE_INTEGER,w=(v==null?void 0:v.max)??Number.MAX_SAFE_INTEGER,x=(v!=null&&v.useCoerce?Qe.coerce:Qe).number({invalid_type_error:e.required,required_error:e.required}).min(h,e.lessThanMin(h)).max(w,e.moreThanMax(w));return x.transform(b=>b??null),x},[e]),a=p.useCallback(v=>r(v).nullable().optional().transform(h=>h??null),[r]),i=p.useCallback(v=>(v!=null&&v.useCoerce?Qe.coerce:Qe).boolean({invalid_type_error:e.required,required_error:e.required}).transform(h=>h??null),[e.required]),s=p.useCallback(v=>(v!=null&&v.useCoerce?Qe.coerce:Qe).string({invalid_type_error:e.required,required_error:e.required}).refine(Ig,{message:e.invalidDate}).transform(w=>w??null),[e.invalidDate,e.required]),o=p.useCallback(v=>s(v).nullable().transform(h=>h??null),[s]),c=p.useCallback((v,h)=>Qe.enum(v,{invalid_type_error:e.required,required_error:e.required}).transform(x=>x??null),[e.required]),u=p.useCallback((v,h)=>c(v,h).nullable().transform(w=>w??null),[c]),l=p.useCallback(v=>Qe.object({id:a({useCoerce:!0})}).nullable().transform(w=>w??null),[a]),d=p.useCallback(v=>Qe.object({id:r()}).transform(w=>w??null),[r]),f=p.useCallback(v=>Qe.object({id:n({useCoerce:!0})}).nullable().transform(w=>w??null),[n]),m=p.useCallback(v=>Qe.object({id:t()}).transform(w=>w??null),[t]),g=p.useCallback(({required:v,multiple:h,maxFileSize:w})=>Qe.any().transform(b=>Array.from(b??[])).refine(b=>!v||(b==null?void 0:b.length)>0,"File is required.").refine(b=>h||(b==null?void 0:b.length)<=1,"Multiple files not allowed.").refine(b=>b.every(T=>T.size<=w),`Maximum file size is ${Wo(w)}.`).transform(b=>(h?b:b==null?void 0:b[0])??null),[]);return{zString:n,zStringRequired:t,zNumber:a,zNumberRequired:r,zBool:i,zDate:o,zDateRequired:s,zEnum:u,zEnumRequired:c,zObjectIdInt:l,zObjectIdIntRequired:d,zObjectIdStr:f,zObjectIdStrRequired:m,zFile:g}},ev=(e,t,n)=>p.useMemo(()=>n||e!=="date"&&e!=="datetime-local"||t?e:"text",[t,e,n]),Sd=p.createContext({useMsal:!1,msalInstance:null,msalScopes:[]}),tv=p.createContext({delegation:null,setDelegation:()=>{},availableDelegations:null,setAvailableDelegations:()=>{},refreshAvailableDelegations:async()=>{}}),N5="_button_1wjon_1",D5="_filled_1wjon_7",F5="_sm_1wjon_13",L5="_md_1wjon_18",U5="_lg_1wjon_23",jr={button:N5,filled:D5,sm:F5,md:L5,lg:U5},mr=({variant:e="filled",color:t="primary",size:n="md",className:r,children:a,...i})=>i.as==="link"?y.jsx(Vl.Link,{to:i.href??"/",className:ae(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,jr.button,jr[e],jr[n]),...i,children:a}):i.as==="button"||i.as===void 0?y.jsx("button",{type:"button",className:ae(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,jr.button,jr[e],jr[n]),...i,children:a}):null,z5="_button_1r3i0_1",bl={button:z5},kd=({color:e="primary",icon:t,className:n,children:r,...a})=>a.as==="link"?y.jsxs(Vl.Link,{to:a.href??"/",className:ae(`luminus-context-button btn text-${e} ${n??""}`,bl.button),...a,children:[t,r]}):a.as==="button"||a.as===void 0?y.jsxs("button",{type:"button",className:ae(`luminus-context-button btn text-${e} ${n??""}`,bl.button),...a,children:[t,r]}):null,B5="_icon-button_15e26_1",W5="_sm_15e26_14",q5="_md_15e26_23",H5="_lg_15e26_32",hs={"icon-button":"_icon-button_15e26_1",iconButton:B5,sm:W5,md:q5,lg:H5},Zo=({type:e="button",color:t="primary",size:n="md",children:r,className:a,...i})=>i.as==="link"?y.jsx(Vl.Link,{to:i.href??"/",className:ae(`luminus-icon-button btn text-${t} ${a??""}`,hs.iconButton,hs[n]),...i,children:r}):i.as==="button"||i.as===void 0?y.jsx("button",{type:e,className:ae(`luminus-icon-button btn text-${t} ${a??""}`,hs.iconButton,hs[n]),...i,children:r}):null,V5="_h1_14r4v_1",Y5="_h3_14r4v_8",Z5="_h6_14r4v_15",G5="_subtitle_14r4v_22",K5="_body_14r4v_29",X5="_body2_14r4v_36",J5="_caption_14r4v_43",Q5="_form-label_14r4v_50",En={h1:V5,h3:Y5,h6:Z5,subtitle:G5,body:K5,body2:X5,caption:J5,"form-label":"_form-label_14r4v_50",formLabel:Q5},eT=({variant:e,className:t,children:n})=>{switch(e){case"h1":return y.jsx("h1",{className:ae("luminus-text-primary luminus-h1",En.h1,t),children:n});case"h3":return y.jsx("h3",{className:ae("luminus-text luminus-h3",En.h3,t),children:n});case"h6":return y.jsx("h6",{className:ae("luminus-text luminus-h6",En.h6,t),children:n});case"subtitle":return y.jsx("div",{className:ae("luminus-text luminus-subtitle",En.subtitle,t),children:n});case"body":return y.jsx("div",{className:ae("luminus-text luminus-body",En.body,t),children:n});case"body2":return y.jsx("div",{className:ae("luminus-text luminus-body2",En.body2,t),children:n});case"caption":return y.jsx("div",{className:ae("luminus-text-muted luminus-caption",En.caption,t),children:n});case"form-label":return y.jsx("div",{className:ae("luminus-text luminus-form-label",En.formLabel,t),children:n});default:return y.jsx(y.Fragment,{children:n})}},nv=({variant:e,className:t,children:n})=>y.jsx(eT,{variant:e,className:t,children:n}),tT="_feedback_esh1j_1",nT="_feedback-spacer_esh1j_8",Nh={feedback:tT,"feedback-spacer":"_feedback-spacer_esh1j_8",feedbackSpacer:nT},Go=({message:e})=>y.jsxs(y.Fragment,{children:[y.jsx("div",{className:ae("invalid-feedback luminus-invalid-feedback",Nh.feedback),children:e}),y.jsx("div",{className:ae("invalid-feedback-spacer",Nh.feedbackSpacer),children:e})]});function rT(e){return Re({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function aT(e){return Re({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function iT(e){return Re({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function sT(e){return Re({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z"},child:[]}]})(e)}const oT="_button_qhwih_1",cT={button:oT},uT=p.forwardRef(({color:e="primary",icon:t=y.jsx(Ow,{size:21}),text:n,onClick:r,className:a,children:i,...s},o)=>y.jsxs("button",{type:"button",ref:o,onClick:c=>{c.preventDefault(),r(c)},"aria-label":"dropdown toggle",className:ae(`btn luminus-context-button text-${e} ${a??""}`,cT.button),...s,children:[t,n]})),lT="_avatar-icon_1axl6_1",dT={"avatar-icon":"_avatar-icon_1axl6_1",avatarIcon:lT},rv=({name:e,fontSize:t,size:n})=>{const r=a=>{let i=0,s;for(s=0;s<a.length;s+=1)i=a.charCodeAt(s)+((i<<5)-i);let o="#";for(s=0;s<3;s+=1){const c=i>>s*8&255;o+=`00${c.toString(16)}`.slice(-2)}return o};return y.jsx(G0,{placement:"bottom",overlay:y.jsx(md,{children:e}),children:y.jsx("div",{className:ae("luminus-avatar-icon",dT.avatarIcon),style:{backgroundColor:r(e),fontSize:t??void 0,minHeight:n??void 0,height:n??void 0,maxHeight:n??void 0,minWidth:n??void 0,width:n??void 0,maxWidth:n??void 0},children:y.jsx("div",{children:`${e.split(" ")[0][0]}${e.split(" ")[1][0]}`})})})},fT=p.forwardRef(({userName:e,onClick:t,children:n},r)=>y.jsxs("button",{type:"button",ref:r,onClick:a=>{a.preventDefault(),t(a)},"aria-label":"User avatar toggle",className:"m-0 p-0",style:{backgroundColor:"transparent",border:"none",cursor:"pointer"},children:[y.jsx(rv,{name:e}),n]})),hT="_floating-label_19xda_1",pT="_without-label_19xda_21",mT="_floating-label-check_19xda_184",xu={"floating-label":"_floating-label_19xda_1",floatingLabel:hT,"without-label":"_without-label_19xda_21",withoutLabel:pT,"floating-label-check":"_floating-label-check_19xda_184",floatingLabelCheck:mT},av=p.forwardRef(({hidden:e,children:t,className:n,isInvalid:r,isForRadioInput:a,inputContainerClassName:i,isForCheckInput:s,...o},c)=>s?y.jsx("div",{className:ae("luminus-floating-label-check",xu.floatingLabelCheck),children:t}):y.jsx(ud,{ref:c,label:o.withoutLabel?"":o.label,hidden:e??!1,className:ae(`luminus-floating-label ${n??""}`,xu.floatingLabel,{[i??""]:i},{[xu.withoutLabel]:o.withoutLabel}),children:t}));av.displayName="FloatingLabelInput";const gT="_row-label-input_13ci8_1",vT="_label_13ci8_4",bT="_input-container_13ci8_9",yT="_invalid-feedback_13ci8_101",_T="_keep-check-label_13ci8_129",xT="_is-invalid_13ci8_157",Pa={"row-label-input":"_row-label-input_13ci8_1",rowLabelInput:gT,label:vT,"input-container":"_input-container_13ci8_9",inputContainer:bT,"invalid-feedback":"_invalid-feedback_13ci8_101",invalidFeedback:yT,"keep-check-label":"_keep-check-label_13ci8_129",keepCheckLabel:_T,"is-invalid":"_is-invalid_13ci8_157",isInvalid:xT},zi=p.forwardRef(({hidden:e,children:t,className:n,isInvalid:r,isForRadioInput:a,isForTextAreaInput:i,inputContainerClassName:s,...o},c)=>y.jsxs("div",{ref:c,className:ae("luminus-row-label row gx-0 gy-0",{"is-invalid":r},{[Pa.isInvalid]:r},{[n??""]:n},{"d-none":e},Pa.rowLabelInput),children:[!o.withoutLabel&&y.jsx("label",{className:ae("label col-6",{"col-12":i},Pa.label),children:y.jsx(nv,{variant:"form-label",className:r?"text-danger":"",children:o.label})}),y.jsx("div",{className:ae("input-container",Pa.inputContainer,{"col-6":!o.withoutLabel&&!i},{"col-12":o.withoutLabel||i},{[Pa.keepCheckLabel]:a},{[s??""]:s}),children:t})]}));zi.displayName="RowLabelInput";const iv=p.forwardRef(({children:e,className:t,hidden:n},r)=>y.jsx("div",{ref:r,className:`${n?"d-none":""} ${t}`,children:e}));iv.displayName="NoInputContainer";const wT=p.forwardRef(({onClick:e,text:t},n)=>y.jsx("div",{ref:n,onClick:r=>{r.preventDefault(),e(r)},role:"button",className:"middle-div",children:y.jsxs("div",{className:"d-flex flex-column align-items-center",children:[y.jsx("div",{className:"mt-",children:"…"}),y.jsx("div",{className:"mt-1 middle-letter",children:t})]})}));var Rd=Wi(),be=e=>Bi(e,Rd),Ad=Wi();be.write=e=>Bi(e,Ad);var Ko=Wi();be.onStart=e=>Bi(e,Ko);var Md=Wi();be.onFrame=e=>Bi(e,Md);var $d=Wi();be.onFinish=e=>Bi(e,$d);var zr=[];be.setTimeout=(e,t)=>{const n=be.now()+t,r=()=>{const i=zr.findIndex(s=>s.cancel==r);~i&&zr.splice(i,1),Pn-=~i?1:0},a={time:n,handler:e,cancel:r};return zr.splice(sv(n),0,a),Pn+=1,ov(),a};var sv=e=>~(~zr.findIndex(t=>t.time>e)||~zr.length);be.cancel=e=>{Ko.delete(e),Md.delete(e),$d.delete(e),Rd.delete(e),Ad.delete(e)};be.sync=e=>{yl=!0,be.batchedUpdates(e),yl=!1};be.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...a){t=a,be.onStart(n)}return r.handler=e,r.cancel=()=>{Ko.delete(n),t=null},r};var jd=typeof window<"u"?window.requestAnimationFrame:()=>{};be.use=e=>jd=e;be.now=typeof performance<"u"?()=>performance.now():Date.now;be.batchedUpdates=e=>e();be.catch=console.error;be.frameLoop="always";be.advance=()=>{be.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):uv()};var jn=-1,Pn=0,yl=!1;function Bi(e,t){yl?(t.delete(e),e(0)):(t.add(e),ov())}function ov(){jn<0&&(jn=0,be.frameLoop!=="demand"&&jd(cv))}function TT(){jn=-1}function cv(){~jn&&(jd(cv),be.batchedUpdates(uv))}function uv(){const e=jn;jn=be.now();const t=sv(jn);if(t&&(lv(zr.splice(0,t),n=>n.handler()),Pn-=t),!Pn){TT();return}Ko.flush(),Rd.flush(e?Math.min(64,jn-e):16.667),Md.flush(),Ad.flush(),$d.flush()}function Wi(){let e=new Set,t=e;return{add(n){Pn+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return Pn-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Pn-=t.size,lv(t,r=>r(n)&&e.add(r)),Pn+=e.size,t=e)}}}function lv(e,t){e.forEach(n=>{try{t(n)}catch(r){be.catch(r)}})}var OT=Object.defineProperty,CT=(e,t)=>{for(var n in t)OT(e,n,{get:t[n],enumerable:!0})},Ut={};CT(Ut,{assign:()=>ST,colors:()=>Nn,createStringInterpolator:()=>Id,skipAnimation:()=>fv,to:()=>dv,willAdvance:()=>Nd});function _l(){}var ET=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),q={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function cn(e,t){if(q.arr(e)){if(!q.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var ve=(e,t)=>e.forEach(t);function Qt(e,t,n){if(q.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var ct=e=>q.und(e)?[]:q.arr(e)?e:[e];function Qa(e,t){if(e.size){const n=Array.from(e);e.clear(),ve(n,t)}}var Za=(e,...t)=>Qa(e,n=>n(...t)),Pd=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Id,dv,Nn=null,fv=!1,Nd=_l,ST=e=>{e.to&&(dv=e.to),e.now&&(be.now=e.now),e.colors!==void 0&&(Nn=e.colors),e.skipAnimation!=null&&(fv=e.skipAnimation),e.createStringInterpolator&&(Id=e.createStringInterpolator),e.requestAnimationFrame&&be.use(e.requestAnimationFrame),e.batchedUpdates&&(be.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Nd=e.willAdvance),e.frameLoop&&(be.frameLoop=e.frameLoop)},ei=new Set,Rt=[],wu=[],ao=0,Xo={get idle(){return!ei.size&&!Rt.length},start(e){ao>e.priority?(ei.add(e),be.onStart(kT)):(hv(e),be(xl))},advance:xl,sort(e){if(ao)be.onFrame(()=>Xo.sort(e));else{const t=Rt.indexOf(e);~t&&(Rt.splice(t,1),pv(e))}},clear(){Rt=[],ei.clear()}};function kT(){ei.forEach(hv),ei.clear(),be(xl)}function hv(e){Rt.includes(e)||pv(e)}function pv(e){Rt.splice(RT(Rt,t=>t.priority>e.priority),0,e)}function xl(e){const t=wu;for(let n=0;n<Rt.length;n++){const r=Rt[n];ao=r.priority,r.idle||(Nd(r),r.advance(e),r.idle||t.push(r))}return ao=0,wu=Rt,wu.length=0,Rt=t,Rt.length>0}function RT(e,t){const n=e.findIndex(t);return n<0?e.length:n}var AT=(e,t,n)=>Math.min(Math.max(n,e),t),MT={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},It="[-+]?\\d*\\.?\\d+",io=It+"%";function Jo(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var $T=new RegExp("rgb"+Jo(It,It,It)),jT=new RegExp("rgba"+Jo(It,It,It,It)),PT=new RegExp("hsl"+Jo(It,io,io)),IT=new RegExp("hsla"+Jo(It,io,io,It)),NT=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,DT=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,FT=/^#([0-9a-fA-F]{6})$/,LT=/^#([0-9a-fA-F]{8})$/;function UT(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=FT.exec(e))?parseInt(t[1]+"ff",16)>>>0:Nn&&Nn[e]!==void 0?Nn[e]:(t=$T.exec(e))?(Pr(t[1])<<24|Pr(t[2])<<16|Pr(t[3])<<8|255)>>>0:(t=jT.exec(e))?(Pr(t[1])<<24|Pr(t[2])<<16|Pr(t[3])<<8|Lh(t[4]))>>>0:(t=NT.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=LT.exec(e))?parseInt(t[1],16)>>>0:(t=DT.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=PT.exec(e))?(Dh(Fh(t[1]),ps(t[2]),ps(t[3]))|255)>>>0:(t=IT.exec(e))?(Dh(Fh(t[1]),ps(t[2]),ps(t[3]))|Lh(t[4]))>>>0:null}function Tu(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Dh(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r,i=Tu(a,r,e+1/3),s=Tu(a,r,e),o=Tu(a,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(o*255)<<8}function Pr(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Fh(e){return(parseFloat(e)%360+360)%360/360}function Lh(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function ps(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Uh(e){let t=UT(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,a=(t&65280)>>>8,i=(t&255)/255;return`rgba(${n}, ${r}, ${a}, ${i})`}var xi=(e,t,n)=>{if(q.fun(e))return e;if(q.arr(e))return xi({range:e,output:t,extrapolate:n});if(q.str(e.output[0]))return Id(e);const r=e,a=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",o=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{const l=BT(u,i);return zT(u,i[l],i[l+1],a[l],a[l+1],c,s,o,r.map)}};function zT(e,t,n,r,a,i,s,o,c){let u=c?c(e):e;if(u<t){if(s==="identity")return u;s==="clamp"&&(u=t)}if(u>n){if(o==="identity")return u;o==="clamp"&&(u=n)}return r===a?r:t===n?e<=t?r:a:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=i(u),r===-1/0?u=-u:a===1/0?u=u+r:u=u*(a-r)+r,u)}function BT(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var WT=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,a=t==="end"?Math.floor(r):Math.ceil(r);return AT(0,1,a/e)},so=1.70158,ms=so*1.525,zh=so+1,Bh=2*Math.PI/3,Wh=2*Math.PI/4.5,gs=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,qT={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>zh*e*e*e-so*e*e,easeOutBack:e=>1+zh*Math.pow(e-1,3)+so*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((ms+1)*2*e-ms)/2:(Math.pow(2*e-2,2)*((ms+1)*(e*2-2)+ms)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Bh),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Bh)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Wh))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Wh)/2+1,easeInBounce:e=>1-gs(1-e),easeOutBounce:gs,easeInOutBounce:e=>e<.5?(1-gs(1-2*e))/2:(1+gs(2*e-1))/2,steps:WT},wi=Symbol.for("FluidValue.get"),ta=Symbol.for("FluidValue.observers"),kt=e=>!!(e&&e[wi]),dt=e=>e&&e[wi]?e[wi]():e,qh=e=>e[ta]||null;function HT(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Ti(e,t){const n=e[ta];n&&n.forEach(r=>{HT(r,t)})}var mv=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");VT(this,e)}},VT=(e,t)=>gv(e,wi,t);function la(e,t){if(e[wi]){let n=e[ta];n||gv(e,ta,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Oi(e,t){const n=e[ta];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[ta]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var gv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),js=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,YT=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Hh=new RegExp(`(${js.source})(%|[a-z]+)`,"i"),ZT=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Qo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,vv=e=>{const[t,n]=GT(e);if(!t||Pd())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const a=window.getComputedStyle(document.documentElement).getPropertyValue(n);return a||e}else{if(n&&Qo.test(n))return vv(n);if(n)return n}return e},GT=e=>{const t=Qo.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Ou,KT=(e,t,n,r,a)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${a})`,bv=e=>{Ou||(Ou=Nn?new RegExp(`(${Object.keys(Nn).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>dt(i).replace(Qo,vv).replace(YT,Uh).replace(Ou,Uh)),n=t.map(i=>i.match(js).map(Number)),a=n[0].map((i,s)=>n.map(o=>{if(!(s in o))throw Error('The arity of each "output" value must be equal');return o[s]})).map(i=>xi({...e,output:i}));return i=>{var c;const s=!Hh.test(t[0])&&((c=t.find(u=>Hh.test(u)))==null?void 0:c.replace(js,""));let o=0;return t[0].replace(js,()=>`${a[o++](i)}${s||""}`).replace(ZT,KT)}},Dd="react-spring: ",yv=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Dd}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},XT=yv(console.warn);function JT(){XT(`${Dd}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var QT=yv(console.warn);function e8(){QT(`${Dd}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function ec(e){return q.str(e)&&(e[0]=="#"||/\d/.test(e)||!Pd()&&Qo.test(e)||e in(Nn||{}))}var rr=Pd()?p.useEffect:p.useLayoutEffect,t8=()=>{const e=p.useRef(!1);return rr(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Fd(){const e=p.useState()[1],t=t8();return()=>{t.current&&e(Math.random())}}function n8(e,t){const[n]=p.useState(()=>({inputs:t,result:e()})),r=p.useRef(),a=r.current;let i=a;return i?t&&i.inputs&&r8(t,i.inputs)||(i={inputs:t,result:e()}):i=n,p.useEffect(()=>{r.current=i,a==n&&(n.inputs=n.result=void 0)},[i]),i.result}function r8(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Ld=e=>p.useEffect(e,a8),a8=[];function wl(e){const t=p.useRef();return p.useEffect(()=>{t.current=e}),t.current}var Ci=Symbol.for("Animated:node"),i8=e=>!!e&&e[Ci]===e,Vt=e=>e&&e[Ci],Ud=(e,t)=>ET(e,Ci,t),tc=e=>e&&e[Ci]&&e[Ci].getPayload(),_v=class{constructor(){Ud(this,this)}getPayload(){return this.payload||[]}},qi=class extends _v{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,q.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new qi(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return q.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,q.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Ei=class extends qi{constructor(e){super(0),this._string=null,this._toString=xi({output:[e,e]})}static create(e){return new Ei(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(q.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=xi({output:[this.getValue(),e]})),this._value=0,super.reset()}},oo={dependencies:null},nc=class extends _v{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Qt(this.source,(n,r)=>{i8(n)?t[r]=n.getValue(e):kt(n)?t[r]=dt(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&ve(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Qt(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){oo.dependencies&&kt(e)&&oo.dependencies.add(e);const t=tc(e);t&&ve(t,n=>this.add(n))}},xv=class extends nc{constructor(e){super(e)}static create(e){return new xv(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(s8)),!0)}};function s8(e){return(ec(e)?Ei:qi).create(e)}function Tl(e){const t=Vt(e);return t?t.constructor:q.arr(e)?xv:ec(e)?Ei:qi}var Vh=(e,t)=>{const n=!q.fun(e)||e.prototype&&e.prototype.isReactComponent;return p.forwardRef((r,a)=>{const i=p.useRef(null),s=n&&p.useCallback(g=>{i.current=u8(a,g)},[a]),[o,c]=c8(r,t),u=Fd(),l=()=>{const g=i.current;if(n&&!g)return;(g?t.applyAnimatedValues(g,o.getValue(!0)):!1)===!1&&u()},d=new o8(l,c),f=p.useRef();rr(()=>(f.current=d,ve(c,g=>la(g,d)),()=>{f.current&&(ve(f.current.deps,g=>Oi(g,f.current)),be.cancel(f.current.update))})),p.useEffect(l,[]),Ld(()=>()=>{const g=f.current;ve(g.deps,v=>Oi(v,g))});const m=t.getComponentProps(o.getValue());return oe.createElement(e,{...m,ref:s})})},o8=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&be.write(this.update)}};function c8(e,t){const n=new Set;return oo.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new nc(e),oo.dependencies=null,[e,n]}function u8(e,t){return e&&(q.fun(e)?e(t):e.current=t),t}var Yh=Symbol.for("AnimatedComponent"),l8=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=a=>new nc(a),getComponentProps:r=a=>a}={})=>{const a={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=s=>{const o=Zh(s)||"Anonymous";return q.str(s)?s=i[s]||(i[s]=Vh(s,a)):s=s[Yh]||(s[Yh]=Vh(s,a)),s.displayName=`Animated(${o})`,s};return Qt(e,(s,o)=>{q.arr(e)&&(o=Zh(s)),i[o]=i(s)}),{animated:i}},Zh=e=>q.str(e)?e:e&&q.str(e.displayName)?e.displayName:q.fun(e)&&e.name||null;function ft(e,...t){return q.fun(e)?e(...t):e}var ti=(e,t)=>e===!0||!!(t&&e&&(q.fun(e)?e(t):ct(e).includes(t))),wv=(e,t)=>q.obj(e)?t&&e[t]:e,Tv=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,d8=e=>e,rc=(e,t=d8)=>{let n=f8;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const a of n){const i=t(e[a],a);q.und(i)||(r[a]=i)}return r},f8=["config","onProps","onStart","onChange","onPause","onResume","onRest"],h8={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function p8(e){const t={};let n=0;if(Qt(e,(r,a)=>{h8[a]||(t[a]=r,n++)}),n)return t}function zd(e){const t=p8(e);if(t){const n={to:t};return Qt(e,(r,a)=>a in t||(n[a]=r)),n}return{...e}}function Si(e){return e=dt(e),q.arr(e)?e.map(Si):ec(e)?Ut.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ov(e){for(const t in e)return!0;return!1}function Ol(e){return q.fun(e)||q.arr(e)&&q.obj(e[0])}function Cl(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function Cv(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var Bd={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},El={...Bd.default,mass:1,damping:1,easing:qT.linear,clamp:!1},m8=class{constructor(){this.velocity=0,Object.assign(this,El)}};function g8(e,t,n){n&&(n={...n},Gh(n,t),t={...n,...t}),Gh(e,t),Object.assign(e,t);for(const s in El)e[s]==null&&(e[s]=El[s]);let{frequency:r,damping:a}=e;const{mass:i}=e;return q.und(r)||(r<.01&&(r=.01),a<0&&(a=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*a*i/r),e}function Gh(e,t){if(!q.und(t.decay))e.duration=void 0;else{const n=!q.und(t.tension)||!q.und(t.friction);(n||!q.und(t.frequency)||!q.und(t.damping)||!q.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var Kh=[],v8=class{constructor(){this.changed=!1,this.values=Kh,this.toValues=null,this.fromValues=Kh,this.config=new m8,this.immediate=!1}};function Ev(e,{key:t,props:n,defaultProps:r,state:a,actions:i}){return new Promise((s,o)=>{let c,u,l=ti(n.cancel??(r==null?void 0:r.cancel),t);if(l)m();else{q.und(n.pause)||(a.paused=ti(n.pause,t));let g=r==null?void 0:r.pause;g!==!0&&(g=a.paused||ti(g,t)),c=ft(n.delay||0,t),g?(a.resumeQueue.add(f),i.pause()):(i.resume(),f())}function d(){a.resumeQueue.add(f),a.timeouts.delete(u),u.cancel(),c=u.time-be.now()}function f(){c>0&&!Ut.skipAnimation?(a.delayed=!0,u=be.setTimeout(m,c),a.pauseQueue.add(d),a.timeouts.add(u)):m()}function m(){a.delayed&&(a.delayed=!1),a.pauseQueue.delete(d),a.timeouts.delete(u),e<=(a.cancelId||0)&&(l=!0);try{i.start({...n,callId:e,cancel:l},s)}catch(g){o(g)}}})}var Wd=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Br(e.get()):t.every(n=>n.noop)?Sv(e.get()):$t(e.get(),t.every(n=>n.finished)),Sv=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),$t=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Br=e=>({value:e,cancelled:!0,finished:!1});function kv(e,t,n,r){const{callId:a,parentId:i,onRest:s}=t,{asyncTo:o,promise:c}=n;return!i&&e===o&&!t.reset?c:n.promise=(async()=>{n.asyncId=a,n.asyncTo=e;const u=rc(t,(h,w)=>w==="onRest"?void 0:h);let l,d;const f=new Promise((h,w)=>(l=h,d=w)),m=h=>{const w=a<=(n.cancelId||0)&&Br(r)||a!==n.asyncId&&$t(r,!1);if(w)throw h.result=w,d(h),h},g=(h,w)=>{const x=new Xh,b=new Jh;return(async()=>{if(Ut.skipAnimation)throw ki(n),b.result=$t(r,!1),d(b),b;m(x);const T=q.obj(h)?{...h}:{...w,to:h};T.parentId=a,Qt(u,(S,$)=>{q.und(T[$])&&(T[$]=S)});const _=await r.start(T);return m(x),n.paused&&await new Promise(S=>{n.resumeQueue.add(S)}),_})()};let v;if(Ut.skipAnimation)return ki(n),$t(r,!1);try{let h;q.arr(e)?h=(async w=>{for(const x of w)await g(x)})(e):h=Promise.resolve(e(g,r.stop.bind(r))),await Promise.all([h.then(l),f]),v=$t(r.get(),!0,!1)}catch(h){if(h instanceof Xh)v=h.result;else if(h instanceof Jh)v=h.result;else throw h}finally{a==n.asyncId&&(n.asyncId=i,n.asyncTo=i?o:void 0,n.promise=i?c:void 0)}return q.fun(s)&&be.batchedUpdates(()=>{s(v,r,r.item)}),v})()}function ki(e,t){Qa(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Xh=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Jh=class extends Error{constructor(){super("SkipAnimationSignal")}},Sl=e=>e instanceof qd,b8=1,qd=class extends mv{constructor(){super(...arguments),this.id=b8++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Vt(this);return e&&e.getValue()}to(...e){return Ut.to(this,e)}interpolate(...e){return JT(),Ut.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Ti(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Xo.sort(this),Ti(this,{type:"priority",parent:this,priority:e})}},gr=Symbol.for("SpringPhase"),Rv=1,kl=2,Rl=4,Cu=e=>(e[gr]&Rv)>0,Sn=e=>(e[gr]&kl)>0,Ia=e=>(e[gr]&Rl)>0,Qh=(e,t)=>t?e[gr]|=kl|Rv:e[gr]&=~kl,ep=(e,t)=>t?e[gr]|=Rl:e[gr]&=~Rl,y8=class extends qd{constructor(e,t){if(super(),this.animation=new v8,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!q.und(e)||!q.und(t)){const n=q.obj(e)?{...e}:{...t,from:e};q.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Sn(this)||this._state.asyncTo)||Ia(this)}get goal(){return dt(this.animation.to)}get velocity(){const e=Vt(this);return e instanceof qi?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return Cu(this)}get isAnimating(){return Sn(this)}get isPaused(){return Ia(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:a}=r;const{config:i}=r,s=tc(r.to);!s&&kt(r.to)&&(a=ct(dt(r.to))),r.values.forEach((u,l)=>{if(u.done)return;const d=u.constructor==Ei?1:s?s[l].lastPosition:a[l];let f=r.immediate,m=d;if(!f){if(m=u.lastPosition,i.tension<=0){u.done=!0;return}let g=u.elapsedTime+=e;const v=r.fromValues[l],h=u.v0!=null?u.v0:u.v0=q.arr(i.velocity)?i.velocity[l]:i.velocity;let w;const x=i.precision||(v==d?.005:Math.min(1,Math.abs(d-v)*.001));if(q.und(i.duration))if(i.decay){const b=i.decay===!0?.998:i.decay,T=Math.exp(-(1-b)*g);m=v+h/(1-b)*(1-T),f=Math.abs(u.lastPosition-m)<=x,w=h*T}else{w=u.lastVelocity==null?h:u.lastVelocity;const b=i.restVelocity||x/10,T=i.clamp?0:i.bounce,_=!q.und(T),S=v==d?u.v0>0:v<d;let $,D=!1;const I=1,M=Math.ceil(e/I);for(let k=0;k<M&&($=Math.abs(w)>b,!(!$&&(f=Math.abs(d-m)<=x,f)));++k){_&&(D=m==d||m>d==S,D&&(w=-w*T,m=d));const Y=-i.tension*1e-6*(m-d),A=-i.friction*.001*w,R=(Y+A)/i.mass;w=w+R*I,m=m+w*I}}else{let b=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,u.durationProgress>0&&(u.elapsedTime=i.duration*u.durationProgress,g=u.elapsedTime+=e)),b=(i.progress||0)+g/this._memoizedDuration,b=b>1?1:b<0?0:b,u.durationProgress=b),m=v+i.easing(b)*(d-v),w=(m-u.lastPosition)/e,f=b==1}u.lastVelocity=w,Number.isNaN(m)&&(console.warn("Got NaN while animating:",this),f=!0)}s&&!s[l].done&&(f=!1),f?u.done=!0:t=!1,u.setValue(m,i.round)&&(n=!0)});const o=Vt(this),c=o.getValue();if(t){const u=dt(r.to);(c!==u||n)&&!i.decay?(o.setValue(u),this._onChange(u)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return be.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Sn(this)){const{to:e,config:t}=this.animation;be.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return q.und(e)?(n=this.queue||[],this.queue=[]):n=[q.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>Wd(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),ki(this._state,e&&this._lastCallId),be.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=q.obj(n)?n[t]:n,(n==null||Ol(n))&&(n=void 0),r=q.obj(r)?r[t]:r,r==null&&(r=void 0);const a={to:n,from:r};return Cu(this)||(e.reverse&&([n,r]=[r,n]),r=dt(r),q.und(r)?Vt(this)||this._set(n):this._set(r)),a}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,rc(e,(s,o)=>/^on/.test(o)?wv(s,n):s)),np(this,e,"onProps"),Da(this,"onProps",e,this);const a=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Ev(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Ia(this)||(ep(this,!0),Za(i.pauseQueue),Da(this,"onPause",$t(this,Na(this,this.animation.to)),this))},resume:()=>{Ia(this)&&(ep(this,!1),Sn(this)&&this._resume(),Za(i.resumeQueue),Da(this,"onResume",$t(this,Na(this,this.animation.to)),this))},start:this._merge.bind(this,a)}}).then(s=>{if(e.loop&&s.finished&&!(t&&s.noop)){const o=Av(e);if(o)return this._update(o,!0)}return s})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Br(this));const r=!q.und(e.to),a=!q.und(e.from);if(r||a)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Br(this));const{key:i,defaultProps:s,animation:o}=this,{to:c,from:u}=o;let{to:l=c,from:d=u}=e;a&&!r&&(!t.default||q.und(l))&&(l=d),t.reverse&&([l,d]=[d,l]);const f=!cn(d,u);f&&(o.from=d),d=dt(d);const m=!cn(l,c);m&&this._focus(l);const g=Ol(t.to),{config:v}=o,{decay:h,velocity:w}=v;(r||a)&&(v.velocity=0),t.config&&!g&&g8(v,ft(t.config,i),t.config!==s.config?ft(s.config,i):void 0);let x=Vt(this);if(!x||q.und(l))return n($t(this,!0));const b=q.und(t.reset)?a&&!t.default:!q.und(d)&&ti(t.reset,i),T=b?d:this.get(),_=Si(l),S=q.num(_)||q.arr(_)||ec(_),$=!g&&(!S||ti(s.immediate||t.immediate,i));if(m){const k=Tl(l);if(k!==x.constructor)if($)x=this._set(_);else throw Error(`Cannot animate between ${x.constructor.name} and ${k.name}, as the "to" prop suggests`)}const D=x.constructor;let I=kt(l),M=!1;if(!I){const k=b||!Cu(this)&&f;(m||k)&&(M=cn(Si(T),_),I=!M),(!cn(o.immediate,$)&&!$||!cn(v.decay,h)||!cn(v.velocity,w))&&(I=!0)}if(M&&Sn(this)&&(o.changed&&!b?I=!0:I||this._stop(c)),!g&&((I||kt(c))&&(o.values=x.getPayload(),o.toValues=kt(l)?null:D==Ei?[1]:ct(_)),o.immediate!=$&&(o.immediate=$,!$&&!b&&this._set(c)),I)){const{onRest:k}=o;ve(x8,A=>np(this,t,A));const Y=$t(this,Na(this,c));Za(this._pendingCalls,Y),this._pendingCalls.add(n),o.changed&&be.batchedUpdates(()=>{var A;o.changed=!b,k==null||k(Y,this),b?ft(s.onRest,Y):(A=o.onStart)==null||A.call(o,Y,this)})}b&&this._set(T),g?n(kv(t.to,t,this._state,this)):I?this._start():Sn(this)&&!m?this._pendingCalls.add(n):n(Sv(T))}_focus(e){const t=this.animation;e!==t.to&&(qh(this)&&this._detach(),t.to=e,qh(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;kt(t)&&(la(t,this),Sl(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;kt(e)&&Oi(e,this)}_set(e,t=!0){const n=dt(e);if(!q.und(n)){const r=Vt(this);if(!r||!cn(n,r.getValue())){const a=Tl(n);!r||r.constructor!=a?Ud(this,a.create(n)):r.setValue(n),r&&be.batchedUpdates(()=>{this._onChange(n,t)})}}return Vt(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Da(this,"onStart",$t(this,Na(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),ft(this.animation.onChange,e,this)),ft(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Vt(this).reset(dt(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),Sn(this)||(Qh(this,!0),Ia(this)||this._resume())}_resume(){Ut.skipAnimation?this.finish():Xo.start(this)}_stop(e,t){if(Sn(this)){Qh(this,!1);const n=this.animation;ve(n.values,a=>{a.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ti(this,{type:"idle",parent:this});const r=t?Br(this.get()):$t(this.get(),Na(this,e??n.to));Za(this._pendingCalls,r),n.changed&&(n.changed=!1,Da(this,"onRest",r,this))}}};function Na(e,t){const n=Si(t),r=Si(e.get());return cn(r,n)}function Av(e,t=e.loop,n=e.to){const r=ft(t);if(r){const a=r!==!0&&zd(r),i=(a||e).reverse,s=!a||a.reset;return Ri({...e,loop:t,default:!1,pause:void 0,to:!i||Ol(n)?n:void 0,from:s?e.from:void 0,reset:s,...a})}}function Ri(e){const{to:t,from:n}=e=zd(e),r=new Set;return q.obj(t)&&tp(t,r),q.obj(n)&&tp(n,r),e.keys=r.size?Array.from(r):null,e}function _8(e){const t=Ri(e);return q.und(t.default)&&(t.default=rc(t)),t}function tp(e,t){Qt(e,(n,r)=>n!=null&&t.add(r))}var x8=["onStart","onRest","onChange","onPause","onResume"];function np(e,t,n){e.animation[n]=t[n]!==Tv(t,n)?wv(t[n],e.key):void 0}function Da(e,t,...n){var r,a,i,s;(a=(r=e.animation)[t])==null||a.call(r,...n),(s=(i=e.defaultProps)[t])==null||s.call(i,...n)}var w8=["onStart","onChange","onRest"],T8=1,Mv=class{constructor(e,t){this.id=T8++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];q.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Ri(e)),this}start(e){let{queue:t}=this;return e?t=ct(e).map(Ri):this.queue=[],this._flush?this._flush(this,t):(Nv(this,t),Al(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;ve(ct(t),r=>n[r].stop(!!e))}else ki(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(q.und(e))this.start({pause:!0});else{const t=this.springs;ve(ct(e),n=>t[n].pause())}return this}resume(e){if(q.und(e))this.start({pause:!1});else{const t=this.springs;ve(ct(e),n=>t[n].resume())}return this}each(e){Qt(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,a=this._changed.size>0;(r&&!this._started||a&&!this._started)&&(this._started=!0,Qa(e,([o,c])=>{c.value=this.get(),o(c,this,this._item)}));const i=!r&&this._started,s=a||i&&n.size?this.get():null;a&&t.size&&Qa(t,([o,c])=>{c.value=s,o(c,this,this._item)}),i&&(this._started=!1,Qa(n,([o,c])=>{c.value=s,o(c,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;be.onFrame(this._onFrame)}};function Al(e,t){return Promise.all(t.map(n=>$v(e,n))).then(n=>Wd(e,n))}async function $v(e,t,n){const{keys:r,to:a,from:i,loop:s,onRest:o,onResolve:c}=t,u=q.obj(t.default)&&t.default;s&&(t.loop=!1),a===!1&&(t.to=null),i===!1&&(t.from=null);const l=q.arr(a)||q.fun(a)?a:void 0;l?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):ve(w8,v=>{const h=t[v];if(q.fun(h)){const w=e._events[v];t[v]=({finished:x,cancelled:b})=>{const T=w.get(h);T?(x||(T.finished=!1),b&&(T.cancelled=!0)):w.set(h,{value:null,finished:x||!1,cancelled:b||!1})},u&&(u[v]=t[v])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Za(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),m=t.cancel===!0||Tv(t,"cancel")===!0;(l||m&&d.asyncId)&&f.push(Ev(++e._lastAsyncId,{props:t,state:d,actions:{pause:_l,resume:_l,start(v,h){m?(ki(d,e._lastAsyncId),h(Br(e))):(v.onRest=o,h(kv(l,v,d,e)))}}})),d.paused&&await new Promise(v=>{d.resumeQueue.add(v)});const g=Wd(e,await Promise.all(f));if(s&&g.finished&&!(n&&g.noop)){const v=Av(t,s,a);if(v)return Nv(e,[v]),$v(e,v,!0)}return c&&be.batchedUpdates(()=>c(g,e,e.item)),g}function Ml(e,t){const n={...e.springs};return t&&ve(ct(t),r=>{q.und(r.keys)&&(r=Ri(r)),q.obj(r.to)||(r={...r,to:void 0}),Iv(n,r,a=>Pv(a))}),jv(e,n),n}function jv(e,t){Qt(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,la(n,e))})}function Pv(e,t){const n=new y8;return n.key=e,t&&la(n,t),n}function Iv(e,t,n){t.keys&&ve(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function Nv(e,t){ve(t,n=>{Iv(e.springs,n,r=>Pv(r,e))})}var Hi=({children:e,...t})=>{const n=p.useContext(co),r=t.pause||!!n.pause,a=t.immediate||!!n.immediate;t=n8(()=>({pause:r,immediate:a}),[r,a]);const{Provider:i}=co;return oe.createElement(i,{value:t},e)},co=O8(Hi,{});Hi.Provider=co.Provider;Hi.Consumer=co.Consumer;function O8(e,t){return Object.assign(e,oe.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Dv=()=>{const e=[],t=function(r){e8();const a=[];return ve(e,(i,s)=>{if(q.und(r))a.push(i.start());else{const o=n(r,i,s);o&&a.push(i.start(o))}}),a};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const a=e.indexOf(r);~a&&e.splice(a,1)},t.pause=function(){return ve(e,r=>r.pause(...arguments)),this},t.resume=function(){return ve(e,r=>r.resume(...arguments)),this},t.set=function(r){ve(e,(a,i)=>{const s=q.fun(r)?r(i,a):r;s&&a.set(s)})},t.start=function(r){const a=[];return ve(e,(i,s)=>{if(q.und(r))a.push(i.start());else{const o=this._getProps(r,i,s);o&&a.push(i.start(o))}}),a},t.stop=function(){return ve(e,r=>r.stop(...arguments)),this},t.update=function(r){return ve(e,(a,i)=>a.update(this._getProps(r,a,i))),this};const n=function(r,a,i){return q.fun(r)?r(i,a):r};return t._getProps=n,t};function C8(e,t,n){const r=q.fun(t)&&t;r&&!n&&(n=[]);const a=p.useMemo(()=>r||arguments.length==3?Dv():void 0,[]),i=p.useRef(0),s=Fd(),o=p.useMemo(()=>({ctrls:[],queue:[],flush(w,x){const b=Ml(w,x);return i.current>0&&!o.queue.length&&!Object.keys(b).some(_=>!w.springs[_])?Al(w,x):new Promise(_=>{jv(w,b),o.queue.push(()=>{_(Al(w,x))}),s()})}}),[]),c=p.useRef([...o.ctrls]),u=[],l=wl(e)||0;p.useMemo(()=>{ve(c.current.slice(e,l),w=>{Cl(w,a),w.stop(!0)}),c.current.length=e,d(l,e)},[e]),p.useMemo(()=>{d(0,Math.min(l,e))},n);function d(w,x){for(let b=w;b<x;b++){const T=c.current[b]||(c.current[b]=new Mv(null,o.flush)),_=r?r(b,T):t[b];_&&(u[b]=_8(_))}}const f=c.current.map((w,x)=>Ml(w,u[x])),m=p.useContext(Hi),g=wl(m),v=m!==g&&Ov(m);rr(()=>{i.current++,o.ctrls=c.current;const{queue:w}=o;w.length&&(o.queue=[],ve(w,x=>x())),ve(c.current,(x,b)=>{a==null||a.add(x),v&&x.start({default:m});const T=u[b];T&&(Cv(x,T.ref),x.ref?x.queue.push(T):x.start(T))})}),Ld(()=>()=>{ve(o.ctrls,w=>w.stop(!0))});const h=f.map(w=>({...w}));return a?[h,a]:h}function Hd(e,t){const n=q.fun(e),[[r],a]=C8(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,a]:r}function Vd(e,t,n){const r=q.fun(t)&&t,{reset:a,sort:i,trail:s=0,expires:o=!0,exitBeforeEnter:c=!1,onDestroyed:u,ref:l,config:d}=r?r():t,f=p.useMemo(()=>r||arguments.length==3?Dv():void 0,[]),m=ct(e),g=[],v=p.useRef(null),h=a?null:v.current;rr(()=>{v.current=g}),Ld(()=>(ve(g,R=>{f==null||f.add(R.ctrl),R.ctrl.ref=f}),()=>{ve(v.current,R=>{R.expired&&clearTimeout(R.expirationId),Cl(R.ctrl,f),R.ctrl.stop(!0)})}));const w=S8(m,r?r():t,h),x=a&&v.current||[];rr(()=>ve(x,({ctrl:R,item:F,key:B})=>{Cl(R,f),ft(u,F,B)}));const b=[];if(h&&ve(h,(R,F)=>{R.expired?(clearTimeout(R.expirationId),x.push(R)):(F=b[F]=w.indexOf(R.key),~F&&(g[F]=R))}),ve(m,(R,F)=>{g[F]||(g[F]={key:w[F],item:R,phase:"mount",ctrl:new Mv},g[F].ctrl.item=R)}),b.length){let R=-1;const{leave:F}=r?r():t;ve(b,(B,L)=>{const G=h[L];~B?(R=g.indexOf(G),g[R]={...G,item:m[B]}):F&&g.splice(++R,0,G)})}q.fun(i)&&g.sort((R,F)=>i(R.item,F.item));let T=-s;const _=Fd(),S=rc(t),$=new Map,D=p.useRef(new Map),I=p.useRef(!1);ve(g,(R,F)=>{const B=R.key,L=R.phase,G=r?r():t;let Z,j;const U=ft(G.delay||0,B);if(L=="mount")Z=G.enter,j="enter";else{const X=w.indexOf(B)<0;if(L!="leave")if(X)Z=G.leave,j="leave";else if(Z=G.update)j="update";else return;else if(!X)Z=G.enter,j="enter";else return}if(Z=ft(Z,R.item,F),Z=q.obj(Z)?zd(Z):{to:Z},!Z.config){const X=d||S.config;Z.config=ft(X,R.item,F,j)}T+=s;const J={...S,delay:U+T,ref:l,immediate:G.immediate,reset:!1,...Z};if(j=="enter"&&q.und(J.from)){const X=r?r():t,V=q.und(X.initial)||h?X.from:X.initial;J.from=ft(V,R.item,F)}const{onResolve:te}=J;J.onResolve=X=>{ft(te,X);const V=v.current,Q=V.find(ee=>ee.key===B);if(Q&&!(X.cancelled&&Q.phase!="update")&&Q.ctrl.idle){const ee=V.every(N=>N.ctrl.idle);if(Q.phase=="leave"){const N=ft(o,Q.item);if(N!==!1){const W=N===!0?0:N;if(Q.expired=!0,!ee&&W>0){W<=2147483647&&(Q.expirationId=setTimeout(_,W));return}}}ee&&V.some(N=>N.expired)&&(D.current.delete(Q),c&&(I.current=!0),_())}};const K=Ml(R.ctrl,J);j==="leave"&&c?D.current.set(R,{phase:j,springs:K,payload:J}):$.set(R,{phase:j,springs:K,payload:J})});const M=p.useContext(Hi),k=wl(M),Y=M!==k&&Ov(M);rr(()=>{Y&&ve(g,R=>{R.ctrl.start({default:M})})},[M]),ve($,(R,F)=>{if(D.current.size){const B=g.findIndex(L=>L.key===F.key);g.splice(B,1)}}),rr(()=>{ve(D.current.size?D.current:$,({phase:R,payload:F},B)=>{const{ctrl:L}=B;B.phase=R,f==null||f.add(L),Y&&R=="enter"&&L.start({default:M}),F&&(Cv(L,F.ref),(L.ref||f)&&!I.current?L.update(F):(L.start(F),I.current&&(I.current=!1)))})},a?void 0:n);const A=R=>oe.createElement(oe.Fragment,null,g.map((F,B)=>{const{springs:L}=$.get(F)||F.ctrl,G=R({...L},F.item,F,B);return G&&G.type?oe.createElement(G.type,{...G.props,key:q.str(F.key)||q.num(F.key)?F.key:F.ctrl.id,ref:G.ref}):G}));return f?[A,f]:A}var E8=1;function S8(e,{key:t,keys:n=t},r){if(n===null){const a=new Set;return e.map(i=>{const s=r&&r.find(o=>o.item===i&&o.phase!=="leave"&&!a.has(o));return s?(a.add(s),s.key):E8++})}return q.und(n)?e:q.fun(n)?e.map(n):ct(n)}var Fv=class extends qd{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=xi(...t);const n=this._get(),r=Tl(n);Ud(this,r.create(n))}advance(e){const t=this._get(),n=this.get();cn(t,n)||(Vt(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&rp(this._active)&&Eu(this)}_get(){const e=q.arr(this.source)?this.source.map(dt):ct(dt(this.source));return this.calc(...e)}_start(){this.idle&&!rp(this._active)&&(this.idle=!1,ve(tc(this),e=>{e.done=!1}),Ut.skipAnimation?(be.batchedUpdates(()=>this.advance()),Eu(this)):Xo.start(this))}_attach(){let e=1;ve(ct(this.source),t=>{kt(t)&&la(t,this),Sl(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){ve(ct(this.source),e=>{kt(e)&&Oi(e,this)}),this._active.clear(),Eu(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=ct(this.source).reduce((t,n)=>Math.max(t,(Sl(n)?n.priority:0)+1),0))}};function k8(e){return e.idle!==!1}function rp(e){return!e.size||Array.from(e).every(k8)}function Eu(e){e.idle||(e.idle=!0,ve(tc(e),t=>{t.done=!0}),Ti(e,{type:"idle",parent:e}))}var Vi=(e,...t)=>new Fv(e,t);Ut.assign({createStringInterpolator:bv,to:(e,t)=>new Fv(e,t)});var Lv=/^--/;function R8(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!Lv.test(e)&&!(ni.hasOwnProperty(e)&&ni[e])?t+"px":(""+t).trim()}var ap={};function A8(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:a,scrollTop:i,scrollLeft:s,viewBox:o,...c}=t,u=Object.values(c),l=Object.keys(c).map(d=>n||e.hasAttribute(d)?d:ap[d]||(ap[d]=d.replace(/([A-Z])/g,f=>"-"+f.toLowerCase())));a!==void 0&&(e.textContent=a);for(const d in r)if(r.hasOwnProperty(d)){const f=R8(d,r[d]);Lv.test(d)?e.style.setProperty(d,f):e.style[d]=f}l.forEach((d,f)=>{e.setAttribute(d,u[f])}),i!==void 0&&(e.scrollTop=i),s!==void 0&&(e.scrollLeft=s),o!==void 0&&e.setAttribute("viewBox",o)}var ni={animationIterationCount:!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,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},M8=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),$8=["Webkit","Ms","Moz","O"];ni=Object.keys(ni).reduce((e,t)=>($8.forEach(n=>e[M8(n,t)]=e[t]),e),ni);var j8=/^(matrix|translate|scale|rotate|skew)/,P8=/^(translate)/,I8=/^(rotate|skew)/,Su=(e,t)=>q.num(e)&&e!==0?e+t:e,Ps=(e,t)=>q.arr(e)?e.every(n=>Ps(n,t)):q.num(e)?e===t:parseFloat(e)===t,N8=class extends nc{constructor({x:e,y:t,z:n,...r}){const a=[],i=[];(e||t||n)&&(a.push([e||0,t||0,n||0]),i.push(s=>[`translate3d(${s.map(o=>Su(o,"px")).join(",")})`,Ps(s,0)])),Qt(r,(s,o)=>{if(o==="transform")a.push([s||""]),i.push(c=>[c,c===""]);else if(j8.test(o)){if(delete r[o],q.und(s))return;const c=P8.test(o)?"px":I8.test(o)?"deg":"";a.push(ct(s)),i.push(o==="rotate3d"?([u,l,d,f])=>[`rotate3d(${u},${l},${d},${Su(f,c)})`,Ps(f,0)]:u=>[`${o}(${u.map(l=>Su(l,c)).join(",")})`,Ps(u,o.startsWith("scale")?1:0)])}}),a.length&&(r.transform=new D8(a,i)),super(r)}},D8=class extends mv{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return ve(this.inputs,(n,r)=>{const a=dt(n[0]),[i,s]=this.transforms[r](q.arr(a)?a:n.map(dt));e+=" "+i,t=t&&s}),t?"none":e}observerAdded(e){e==1&&ve(this.inputs,t=>ve(t,n=>kt(n)&&la(n,this)))}observerRemoved(e){e==0&&ve(this.inputs,t=>ve(t,n=>kt(n)&&Oi(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Ti(this,e)}},F8=["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","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"];Ut.assign({batchedUpdates:$n.unstable_batchedUpdates,createStringInterpolator:bv,colors:MT});var L8=l8(F8,{applyAnimatedValues:A8,createAnimatedStyle:e=>new N8(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),dn=L8.animated;function vr(){return vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vr.apply(this,arguments)}var U8={pointerEvents:"none",position:"absolute",zIndex:10,top:0,left:0},ip=function(e,t){return"translate("+e+"px, "+t+"px)"},Uv=p.memo(function(e){var t,n=e.position,r=e.anchor,a=e.children,i=St(),s=va(),o=s.animate,c=s.config,u=fy(),l=u[0],d=u[1],f=p.useRef(!1),m=void 0,g=!1,v=d.width>0&&d.height>0,h=Math.round(n[0]),w=Math.round(n[1]);v&&(r==="top"?(h-=d.width/2,w-=d.height+14):r==="right"?(h+=14,w-=d.height/2):r==="bottom"?(h-=d.width/2,w+=14):r==="left"?(h-=d.width+14,w-=d.height/2):r==="center"&&(h-=d.width/2,w-=d.height/2),m={transform:ip(h,w)},f.current||(g=!0),f.current=[h,w]);var x=Hd({to:m,config:c,immediate:!o||g}),b=vr({},U8,i.tooltip.wrapper,{transform:(t=x.transform)!=null?t:ip(h,w),opacity:x.transform?1:0});return y.jsx(dn.div,{ref:l,style:b,children:a})});Uv.displayName="TooltipWrapper";var z8=p.memo(function(e){var t=e.size,n=t===void 0?12:t,r=e.color,a=e.style;return y.jsx("span",{style:vr({display:"block",width:n,height:n,background:r},a===void 0?{}:a)})}),B8=p.memo(function(e){var t,n=e.id,r=e.value,a=e.format,i=e.enableChip,s=i!==void 0&&i,o=e.color,c=e.renderContent,u=St(),l=hy(a);if(typeof c=="function")t=c();else{var d=r;l!==void 0&&d!==void 0&&(d=l(d)),t=y.jsxs("div",{style:u.tooltip.basic,children:[s&&y.jsx(z8,{color:o,style:u.tooltip.chip}),d!==void 0?y.jsxs("span",{children:[n,": ",y.jsx("strong",{children:""+d})]}):n]})}return y.jsx("div",{style:u.tooltip.container,children:t})}),W8={width:"100%",borderCollapse:"collapse"},q8=p.memo(function(e){var t,n=e.title,r=e.rows,a=r===void 0?[]:r,i=e.renderContent,s=St();return a.length?(t=typeof i=="function"?i():y.jsxs("div",{children:[n&&n,y.jsx("table",{style:vr({},W8,s.tooltip.table),children:y.jsx("tbody",{children:a.map(function(o,c){return y.jsx("tr",{children:o.map(function(u,l){return y.jsx("td",{style:s.tooltip.tableCell,children:u},l)})},c)})})})]}),y.jsx("div",{style:s.tooltip.container,children:t})):null});q8.displayName="TableTooltip";var $l=p.memo(function(e){var t=e.x0,n=e.x1,r=e.y0,a=e.y1,i=St(),s=va(),o=s.animate,c=s.config,u=p.useMemo(function(){return vr({},i.crosshair.line,{pointerEvents:"none"})},[i.crosshair.line]),l=Hd({x1:t,x2:n,y1:r,y2:a,config:c,immediate:!o});return y.jsx(dn.line,vr({},l,{fill:"none",style:u}))});$l.displayName="CrosshairLine";var H8=p.memo(function(e){var t,n,r=e.width,a=e.height,i=e.type,s=e.x,o=e.y;return i==="cross"?(t={x0:s,x1:s,y0:0,y1:a},n={x0:0,x1:r,y0:o,y1:o}):i==="top-left"?(t={x0:s,x1:s,y0:0,y1:o},n={x0:0,x1:s,y0:o,y1:o}):i==="top"?t={x0:s,x1:s,y0:0,y1:o}:i==="top-right"?(t={x0:s,x1:s,y0:0,y1:o},n={x0:s,x1:r,y0:o,y1:o}):i==="right"?n={x0:s,x1:r,y0:o,y1:o}:i==="bottom-right"?(t={x0:s,x1:s,y0:o,y1:a},n={x0:s,x1:r,y0:o,y1:o}):i==="bottom"?t={x0:s,x1:s,y0:o,y1:a}:i==="bottom-left"?(t={x0:s,x1:s,y0:o,y1:a},n={x0:0,x1:s,y0:o,y1:o}):i==="left"?n={x0:0,x1:s,y0:o,y1:o}:i==="x"?t={x0:s,x1:s,y0:0,y1:a}:i==="y"&&(n={x0:0,x1:r,y0:o,y1:o}),y.jsxs(y.Fragment,{children:[t&&y.jsx($l,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}),n&&y.jsx($l,{x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1})]})});H8.displayName="Crosshair";var zv=p.createContext({showTooltipAt:function(){},showTooltipFromEvent:function(){},hideTooltip:function(){}}),jl={isVisible:!1,position:[null,null],content:null,anchor:null},Bv=p.createContext(jl),V8=function(e){var t=p.useState(jl),n=t[0],r=t[1],a=p.useCallback(function(o,c,u){var l=c[0],d=c[1];u===void 0&&(u="top"),r({isVisible:!0,position:[l,d],anchor:u,content:o})},[r]),i=p.useCallback(function(o,c,u){u===void 0&&(u="top");var l=e.current.getBoundingClientRect(),d=e.current.offsetWidth,f=d===l.width?1:d/l.width,m="touches"in c?c.touches[0]:c,g=m.clientX,v=m.clientY,h=(g-l.left)*f,w=(v-l.top)*f;u!=="left"&&u!=="right"||(u=h<l.width/2?"right":"left"),r({isVisible:!0,position:[h,w],anchor:u,content:o})},[e,r]),s=p.useCallback(function(){r(jl)},[r]);return{actions:p.useMemo(function(){return{showTooltipAt:a,showTooltipFromEvent:i,hideTooltip:s}},[a,i,s]),state:n}},Y8=function(){var e=p.useContext(zv);if(e===void 0)throw new Error("useTooltip must be used within a TooltipProvider");return e},Z8=function(){var e=p.useContext(Bv);if(e===void 0)throw new Error("useTooltipState must be used within a TooltipProvider");return e},G8=function(e){return e.isVisible},K8=function(){var e=Z8();return G8(e)?y.jsx(Uv,{position:e.position,anchor:e.anchor,children:e.content}):null},X8=function(e){var t=e.container,n=e.children,r=V8(t),a=r.actions,i=r.state;return y.jsx(zv.Provider,{value:a,children:y.jsx(Bv.Provider,{value:i,children:n})})};function J8(){this.__data__=[],this.size=0}var Q8=J8;function eO(e,t){return e===t||e!==e&&t!==t}var Yi=eO,tO=Yi;function nO(e,t){for(var n=e.length;n--;)if(tO(e[n][0],t))return n;return-1}var ac=nO,rO=ac,aO=Array.prototype,iO=aO.splice;function sO(e){var t=this.__data__,n=rO(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():iO.call(t,n,1),--this.size,!0}var oO=sO,cO=ac;function uO(e){var t=this.__data__,n=cO(t,e);return n<0?void 0:t[n][1]}var lO=uO,dO=ac;function fO(e){return dO(this.__data__,e)>-1}var hO=fO,pO=ac;function mO(e,t){var n=this.__data__,r=pO(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var gO=mO,vO=Q8,bO=oO,yO=lO,_O=hO,xO=gO;function da(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}da.prototype.clear=vO;da.prototype.delete=bO;da.prototype.get=yO;da.prototype.has=_O;da.prototype.set=xO;var ic=da,wO=ic;function TO(){this.__data__=new wO,this.size=0}var OO=TO;function CO(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var EO=CO;function SO(e){return this.__data__.get(e)}var kO=SO;function RO(e){return this.__data__.has(e)}var AO=RO,MO=typeof is=="object"&&is&&is.Object===Object&&is,Wv=MO,$O=Wv,jO=typeof self=="object"&&self&&self.Object===Object&&self,PO=$O||jO||Function("return this")(),tn=PO,IO=tn,NO=IO.Symbol,Zi=NO,sp=Zi,qv=Object.prototype,DO=qv.hasOwnProperty,FO=qv.toString,Fa=sp?sp.toStringTag:void 0;function LO(e){var t=DO.call(e,Fa),n=e[Fa];try{e[Fa]=void 0;var r=!0}catch{}var a=FO.call(e);return r&&(t?e[Fa]=n:delete e[Fa]),a}var UO=LO,zO=Object.prototype,BO=zO.toString;function WO(e){return BO.call(e)}var qO=WO,op=Zi,HO=UO,VO=qO,YO="[object Null]",ZO="[object Undefined]",cp=op?op.toStringTag:void 0;function GO(e){return e==null?e===void 0?ZO:YO:cp&&cp in Object(e)?HO(e):VO(e)}var Tr=GO;function KO(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Vn=KO,XO=Tr,JO=Vn,QO="[object AsyncFunction]",eC="[object Function]",tC="[object GeneratorFunction]",nC="[object Proxy]";function rC(e){if(!JO(e))return!1;var t=XO(e);return t==eC||t==tC||t==QO||t==nC}var sc=rC;const Hv=vt(sc);var aC=tn,iC=aC["__core-js_shared__"],sC=iC,ku=sC,up=function(){var e=/[^.]+$/.exec(ku&&ku.keys&&ku.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function oC(e){return!!up&&up in e}var cC=oC,uC=Function.prototype,lC=uC.toString;function dC(e){if(e!=null){try{return lC.call(e)}catch{}try{return e+""}catch{}}return""}var Vv=dC,fC=sc,hC=cC,pC=Vn,mC=Vv,gC=/[\\^$.*+?()[\]{}|]/g,vC=/^\[object .+?Constructor\]$/,bC=Function.prototype,yC=Object.prototype,_C=bC.toString,xC=yC.hasOwnProperty,wC=RegExp("^"+_C.call(xC).replace(gC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function TC(e){if(!pC(e)||hC(e))return!1;var t=fC(e)?wC:vC;return t.test(mC(e))}var OC=TC;function CC(e,t){return e==null?void 0:e[t]}var EC=CC,SC=OC,kC=EC;function RC(e,t){var n=kC(e,t);return SC(n)?n:void 0}var Or=RC,AC=Or,MC=tn,$C=AC(MC,"Map"),Yd=$C,jC=Or,PC=jC(Object,"create"),oc=PC,lp=oc;function IC(){this.__data__=lp?lp(null):{},this.size=0}var NC=IC;function DC(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var FC=DC,LC=oc,UC="__lodash_hash_undefined__",zC=Object.prototype,BC=zC.hasOwnProperty;function WC(e){var t=this.__data__;if(LC){var n=t[e];return n===UC?void 0:n}return BC.call(t,e)?t[e]:void 0}var qC=WC,HC=oc,VC=Object.prototype,YC=VC.hasOwnProperty;function ZC(e){var t=this.__data__;return HC?t[e]!==void 0:YC.call(t,e)}var GC=ZC,KC=oc,XC="__lodash_hash_undefined__";function JC(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=KC&&t===void 0?XC:t,this}var QC=JC,eE=NC,tE=FC,nE=qC,rE=GC,aE=QC;function fa(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}fa.prototype.clear=eE;fa.prototype.delete=tE;fa.prototype.get=nE;fa.prototype.has=rE;fa.prototype.set=aE;var iE=fa,dp=iE,sE=ic,oE=Yd;function cE(){this.size=0,this.__data__={hash:new dp,map:new(oE||sE),string:new dp}}var uE=cE;function lE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var dE=lE,fE=dE;function hE(e,t){var n=e.__data__;return fE(t)?n[typeof t=="string"?"string":"hash"]:n.map}var cc=hE,pE=cc;function mE(e){var t=pE(this,e).delete(e);return this.size-=t?1:0,t}var gE=mE,vE=cc;function bE(e){return vE(this,e).get(e)}var yE=bE,_E=cc;function xE(e){return _E(this,e).has(e)}var wE=xE,TE=cc;function OE(e,t){var n=TE(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var CE=OE,EE=uE,SE=gE,kE=yE,RE=wE,AE=CE;function ha(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ha.prototype.clear=EE;ha.prototype.delete=SE;ha.prototype.get=kE;ha.prototype.has=RE;ha.prototype.set=AE;var Zd=ha,ME=ic,$E=Yd,jE=Zd,PE=200;function IE(e,t){var n=this.__data__;if(n instanceof ME){var r=n.__data__;if(!$E||r.length<PE-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new jE(r)}return n.set(e,t),this.size=n.size,this}var NE=IE,DE=ic,FE=OO,LE=EO,UE=kO,zE=AO,BE=NE;function pa(e){var t=this.__data__=new DE(e);this.size=t.size}pa.prototype.clear=FE;pa.prototype.delete=LE;pa.prototype.get=UE;pa.prototype.has=zE;pa.prototype.set=BE;var Yv=pa,WE=Or,qE=function(){try{var e=WE(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Zv=qE,fp=Zv;function HE(e,t,n){t=="__proto__"&&fp?fp(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Gd=HE,VE=Gd,YE=Yi;function ZE(e,t,n){(n!==void 0&&!YE(e[t],n)||n===void 0&&!(t in e))&&VE(e,t,n)}var Gv=ZE;function GE(e){return function(t,n,r){for(var a=-1,i=Object(t),s=r(t),o=s.length;o--;){var c=s[e?o:++a];if(n(i[c],c,i)===!1)break}return t}}var KE=GE,XE=KE,JE=XE(),QE=JE,uo={exports:{}};uo.exports;(function(e,t){var n=tn,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,s=i?n.Buffer:void 0,o=s?s.allocUnsafe:void 0;function c(u,l){if(l)return u.slice();var d=u.length,f=o?o(d):new u.constructor(d);return u.copy(f),f}e.exports=c})(uo,uo.exports);var e7=uo.exports,t7=tn,n7=t7.Uint8Array,Kv=n7,hp=Kv;function r7(e){var t=new e.constructor(e.byteLength);return new hp(t).set(new hp(e)),t}var a7=r7,i7=a7;function s7(e,t){var n=t?i7(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var o7=s7;function c7(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var u7=c7,l7=Vn,pp=Object.create,d7=function(){function e(){}return function(t){if(!l7(t))return{};if(pp)return pp(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),f7=d7;function h7(e,t){return function(n){return e(t(n))}}var Xv=h7,p7=Xv,m7=p7(Object.getPrototypeOf,Object),Jv=m7,g7=Object.prototype;function v7(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||g7;return e===n}var Kd=v7,b7=f7,y7=Jv,_7=Kd;function x7(e){return typeof e.constructor=="function"&&!_7(e)?b7(y7(e)):{}}var w7=x7;function T7(e){return e!=null&&typeof e=="object"}var Yn=T7,O7=Tr,C7=Yn,E7="[object Arguments]";function S7(e){return C7(e)&&O7(e)==E7}var k7=S7,mp=k7,R7=Yn,Qv=Object.prototype,A7=Qv.hasOwnProperty,M7=Qv.propertyIsEnumerable,$7=mp(function(){return arguments}())?mp:function(e){return R7(e)&&A7.call(e,"callee")&&!M7.call(e,"callee")},uc=$7,j7=Array.isArray,nn=j7,P7=9007199254740991;function I7(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=P7}var Xd=I7,N7=sc,D7=Xd;function F7(e){return e!=null&&D7(e.length)&&!N7(e)}var lc=F7,L7=lc,U7=Yn;function z7(e){return U7(e)&&L7(e)}var eb=z7,lo={exports:{}};function B7(){return!1}var W7=B7;lo.exports;(function(e,t){var n=tn,r=W7,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,o=s?n.Buffer:void 0,c=o?o.isBuffer:void 0,u=c||r;e.exports=u})(lo,lo.exports);var Jd=lo.exports,q7=Tr,H7=Jv,V7=Yn,Y7="[object Object]",Z7=Function.prototype,G7=Object.prototype,tb=Z7.toString,K7=G7.hasOwnProperty,X7=tb.call(Object);function J7(e){if(!V7(e)||q7(e)!=Y7)return!1;var t=H7(e);if(t===null)return!0;var n=K7.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&tb.call(n)==X7}var nb=J7;const Qd=vt(nb);var Q7=Tr,eS=Xd,tS=Yn,nS="[object Arguments]",rS="[object Array]",aS="[object Boolean]",iS="[object Date]",sS="[object Error]",oS="[object Function]",cS="[object Map]",uS="[object Number]",lS="[object Object]",dS="[object RegExp]",fS="[object Set]",hS="[object String]",pS="[object WeakMap]",mS="[object ArrayBuffer]",gS="[object DataView]",vS="[object Float32Array]",bS="[object Float64Array]",yS="[object Int8Array]",_S="[object Int16Array]",xS="[object Int32Array]",wS="[object Uint8Array]",TS="[object Uint8ClampedArray]",OS="[object Uint16Array]",CS="[object Uint32Array]",Le={};Le[vS]=Le[bS]=Le[yS]=Le[_S]=Le[xS]=Le[wS]=Le[TS]=Le[OS]=Le[CS]=!0;Le[nS]=Le[rS]=Le[mS]=Le[aS]=Le[gS]=Le[iS]=Le[sS]=Le[oS]=Le[cS]=Le[uS]=Le[lS]=Le[dS]=Le[fS]=Le[hS]=Le[pS]=!1;function ES(e){return tS(e)&&eS(e.length)&&!!Le[Q7(e)]}var SS=ES;function kS(e){return function(t){return e(t)}}var rb=kS,fo={exports:{}};fo.exports;(function(e,t){var n=Wv,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,s=i&&n.process,o=function(){try{var c=a&&a.require&&a.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(fo,fo.exports);var RS=fo.exports,AS=SS,MS=rb,gp=RS,vp=gp&&gp.isTypedArray,$S=vp?MS(vp):AS,ef=$S;function jS(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var ab=jS,PS=Gd,IS=Yi,NS=Object.prototype,DS=NS.hasOwnProperty;function FS(e,t,n){var r=e[t];(!(DS.call(e,t)&&IS(r,n))||n===void 0&&!(t in e))&&PS(e,t,n)}var ib=FS,LS=ib,US=Gd;function zS(e,t,n,r){var a=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var o=t[i],c=r?r(n[o],e[o],o,n,e):void 0;c===void 0&&(c=e[o]),a?US(n,o,c):LS(n,o,c)}return n}var BS=zS;function WS(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var qS=WS,HS=9007199254740991,VS=/^(?:0|[1-9]\d*)$/;function YS(e,t){var n=typeof e;return t=t??HS,!!t&&(n=="number"||n!="symbol"&&VS.test(e))&&e>-1&&e%1==0&&e<t}var dc=YS,ZS=qS,GS=uc,KS=nn,XS=Jd,JS=dc,QS=ef,ek=Object.prototype,tk=ek.hasOwnProperty;function nk(e,t){var n=KS(e),r=!n&&GS(e),a=!n&&!r&&XS(e),i=!n&&!r&&!a&&QS(e),s=n||r||a||i,o=s?ZS(e.length,String):[],c=o.length;for(var u in e)(t||tk.call(e,u))&&!(s&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||JS(u,c)))&&o.push(u);return o}var sb=nk;function rk(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var ak=rk,ik=Vn,sk=Kd,ok=ak,ck=Object.prototype,uk=ck.hasOwnProperty;function lk(e){if(!ik(e))return ok(e);var t=sk(e),n=[];for(var r in e)r=="constructor"&&(t||!uk.call(e,r))||n.push(r);return n}var dk=lk,fk=sb,hk=dk,pk=lc;function mk(e){return pk(e)?fk(e,!0):hk(e)}var ob=mk,gk=BS,vk=ob;function bk(e){return gk(e,vk(e))}var yk=bk,bp=Gv,_k=e7,xk=o7,wk=u7,Tk=w7,yp=uc,_p=nn,Ok=eb,Ck=Jd,Ek=sc,Sk=Vn,kk=nb,Rk=ef,xp=ab,Ak=yk;function Mk(e,t,n,r,a,i,s){var o=xp(e,n),c=xp(t,n),u=s.get(c);if(u){bp(e,n,u);return}var l=i?i(o,c,n+"",e,t,s):void 0,d=l===void 0;if(d){var f=_p(c),m=!f&&Ck(c),g=!f&&!m&&Rk(c);l=c,f||m||g?_p(o)?l=o:Ok(o)?l=wk(o):m?(d=!1,l=_k(c,!0)):g?(d=!1,l=xk(c,!0)):l=[]:kk(c)||yp(c)?(l=o,yp(o)?l=Ak(o):(!Sk(o)||Ek(o))&&(l=Tk(c))):d=!1}d&&(s.set(c,l),a(l,c,r,i,s),s.delete(c)),bp(e,n,l)}var $k=Mk,jk=Yv,Pk=Gv,Ik=QE,Nk=$k,Dk=Vn,Fk=ob,Lk=ab;function cb(e,t,n,r,a){e!==t&&Ik(t,function(i,s){if(a||(a=new jk),Dk(i))Nk(e,t,s,n,cb,r,a);else{var o=r?r(Lk(e,s),i,s+"",e,t,a):void 0;o===void 0&&(o=i),Pk(e,s,o)}},Fk)}var Uk=cb;function zk(e){return e}var ub=zk;function Bk(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Wk=Bk,qk=Wk,wp=Math.max;function Hk(e,t,n){return t=wp(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=wp(r.length-t,0),s=Array(i);++a<i;)s[a]=r[t+a];a=-1;for(var o=Array(t+1);++a<t;)o[a]=r[a];return o[t]=n(s),qk(e,this,o)}}var lb=Hk;function Vk(e){return function(){return e}}var Yk=Vk,Zk=Yk,Tp=Zv,Gk=ub,Kk=Tp?function(e,t){return Tp(e,"toString",{configurable:!0,enumerable:!1,value:Zk(t),writable:!0})}:Gk,Xk=Kk,Jk=800,Qk=16,e9=Date.now;function t9(e){var t=0,n=0;return function(){var r=e9(),a=Qk-(r-n);if(n=r,a>0){if(++t>=Jk)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var n9=t9,r9=Xk,a9=n9,i9=a9(r9),db=i9,s9=ub,o9=lb,c9=db;function u9(e,t){return c9(o9(e,t,s9),e+"")}var fb=u9,l9=Yi,d9=lc,f9=dc,h9=Vn;function p9(e,t,n){if(!h9(n))return!1;var r=typeof t;return(r=="number"?d9(n)&&f9(t,n.length):r=="string"&&t in n)?l9(n[t],e):!1}var m9=p9,g9=fb,v9=m9;function b9(e){return g9(function(t,n){var r=-1,a=n.length,i=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(a--,i):void 0,s&&v9(n[0],n[1],s)&&(i=a<3?void 0:i,a=1),t=Object(t);++r<a;){var o=n[r];o&&e(t,o,r,i)}return t})}var y9=b9,_9=Uk,x9=y9,w9=x9(function(e,t,n){_9(e,t,n)}),T9=w9;const O9=vt(T9);var C9=Tr,E9=Yn,S9="[object Symbol]";function k9(e){return typeof e=="symbol"||E9(e)&&C9(e)==S9}var tf=k9,R9=nn,A9=tf,M9=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$9=/^\w*$/;function j9(e,t){if(R9(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||A9(e)?!0:$9.test(e)||!M9.test(e)||t!=null&&e in Object(t)}var P9=j9,hb=Zd,I9="Expected a function";function nf(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(I9);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var s=e.apply(this,r);return n.cache=i.set(a,s)||i,s};return n.cache=new(nf.Cache||hb),n}nf.Cache=hb;var N9=nf,D9=N9,F9=500;function L9(e){var t=D9(e,function(r){return n.size===F9&&n.clear(),r}),n=t.cache;return t}var U9=L9,z9=U9,B9=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W9=/\\(\\)?/g,q9=z9(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(B9,function(n,r,a,i){t.push(a?i.replace(W9,"$1"):r||n)}),t}),H9=q9;function V9(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}var pb=V9,Op=Zi,Y9=pb,Z9=nn,G9=tf,K9=1/0,Cp=Op?Op.prototype:void 0,Ep=Cp?Cp.toString:void 0;function mb(e){if(typeof e=="string")return e;if(Z9(e))return Y9(e,mb)+"";if(G9(e))return Ep?Ep.call(e):"";var t=e+"";return t=="0"&&1/e==-K9?"-0":t}var X9=mb,J9=X9;function Q9(e){return e==null?"":J9(e)}var eR=Q9,tR=nn,nR=P9,rR=H9,aR=eR;function iR(e,t){return tR(e)?e:nR(e,t)?[e]:rR(aR(e))}var fc=iR,sR=tf,oR=1/0;function cR(e){if(typeof e=="string"||sR(e))return e;var t=e+"";return t=="0"&&1/e==-oR?"-0":t}var rf=cR,uR=fc,lR=rf;function dR(e,t){t=uR(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[lR(t[n++])];return n&&n==r?e:void 0}var gb=dR,fR=gb;function hR(e,t,n){var r=e==null?void 0:fR(e,t);return r===void 0?n:r}var pR=hR;const bn=vt(pR);var mR=ib,gR=fc,vR=dc,Sp=Vn,bR=rf;function yR(e,t,n,r){if(!Sp(e))return e;t=gR(t,e);for(var a=-1,i=t.length,s=i-1,o=e;o!=null&&++a<i;){var c=bR(t[a]),u=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(a!=s){var l=o[c];u=r?r(l,c,o):void 0,u===void 0&&(u=Sp(l)?l:vR(t[a+1])?[]:{})}mR(o,c,u),o=o[c]}return e}var vb=yR,_R=vb;function xR(e,t,n){return e==null?e:_R(e,t,n)}var wR=xR;const Ga=vt(wR);function hc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function af(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ma(){}var br=.7,na=1/br,Wr="\\s*([+-]?\\d+)\\s*",Ai="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Kt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",TR=/^#([0-9a-f]{3,8})$/,OR=new RegExp(`^rgb\\(${Wr},${Wr},${Wr}\\)$`),CR=new RegExp(`^rgb\\(${Kt},${Kt},${Kt}\\)$`),ER=new RegExp(`^rgba\\(${Wr},${Wr},${Wr},${Ai}\\)$`),SR=new RegExp(`^rgba\\(${Kt},${Kt},${Kt},${Ai}\\)$`),kR=new RegExp(`^hsl\\(${Ai},${Kt},${Kt}\\)$`),RR=new RegExp(`^hsla\\(${Ai},${Kt},${Kt},${Ai}\\)$`),kp={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};hc(ma,sf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Rp,formatHex:Rp,formatHex8:AR,formatHsl:MR,formatRgb:Ap,toString:Ap});function Rp(){return this.rgb().formatHex()}function AR(){return this.rgb().formatHex8()}function MR(){return yb(this).formatHsl()}function Ap(){return this.rgb().formatRgb()}function sf(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=TR.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Mp(t):n===3?new rt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?vs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?vs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=OR.exec(e))?new rt(t[1],t[2],t[3],1):(t=CR.exec(e))?new rt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ER.exec(e))?vs(t[1],t[2],t[3],t[4]):(t=SR.exec(e))?vs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=kR.exec(e))?Pp(t[1],t[2]/100,t[3]/100,1):(t=RR.exec(e))?Pp(t[1],t[2]/100,t[3]/100,t[4]):kp.hasOwnProperty(e)?Mp(kp[e]):e==="transparent"?new rt(NaN,NaN,NaN,0):null}function Mp(e){return new rt(e>>16&255,e>>8&255,e&255,1)}function vs(e,t,n,r){return r<=0&&(e=t=n=NaN),new rt(e,t,n,r)}function bb(e){return e instanceof ma||(e=sf(e)),e?(e=e.rgb(),new rt(e.r,e.g,e.b,e.opacity)):new rt}function ra(e,t,n,r){return arguments.length===1?bb(e):new rt(e,t,n,r??1)}function rt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}hc(rt,ra,af(ma,{brighter(e){return e=e==null?na:Math.pow(na,e),new rt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?br:Math.pow(br,e),new rt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new rt(ur(this.r),ur(this.g),ur(this.b),ho(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$p,formatHex:$p,formatHex8:$R,formatRgb:jp,toString:jp}));function $p(){return`#${ar(this.r)}${ar(this.g)}${ar(this.b)}`}function $R(){return`#${ar(this.r)}${ar(this.g)}${ar(this.b)}${ar((isNaN(this.opacity)?1:this.opacity)*255)}`}function jp(){const e=ho(this.opacity);return`${e===1?"rgb(":"rgba("}${ur(this.r)}, ${ur(this.g)}, ${ur(this.b)}${e===1?")":`, ${e})`}`}function ho(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ur(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ar(e){return e=ur(e),(e<16?"0":"")+e.toString(16)}function Pp(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new jt(e,t,n,r)}function yb(e){if(e instanceof jt)return new jt(e.h,e.s,e.l,e.opacity);if(e instanceof ma||(e=sf(e)),!e)return new jt;if(e instanceof jt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,o=i-a,c=(i+a)/2;return o?(t===i?s=(n-r)/o+(n<r)*6:n===i?s=(r-t)/o+2:s=(t-n)/o+4,o/=c<.5?i+a:2-i-a,s*=60):o=c>0&&c<1?0:s,new jt(s,o,c,e.opacity)}function jR(e,t,n,r){return arguments.length===1?yb(e):new jt(e,t,n,r??1)}function jt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}hc(jt,jR,af(ma,{brighter(e){return e=e==null?na:Math.pow(na,e),new jt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?br:Math.pow(br,e),new jt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new rt(Ru(e>=240?e-240:e+120,a,r),Ru(e,a,r),Ru(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new jt(Ip(this.h),bs(this.s),bs(this.l),ho(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ho(this.opacity);return`${e===1?"hsl(":"hsla("}${Ip(this.h)}, ${bs(this.s)*100}%, ${bs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ip(e){return e=(e||0)%360,e<0?e+360:e}function bs(e){return Math.max(0,Math.min(1,e||0))}function Ru(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const PR=Math.PI/180,IR=180/Math.PI;var _b=-.14861,of=1.78277,cf=-.29227,pc=-.90649,Mi=1.97294,Np=Mi*pc,Dp=Mi*of,Fp=of*cf-pc*_b;function NR(e){if(e instanceof lr)return new lr(e.h,e.s,e.l,e.opacity);e instanceof rt||(e=bb(e));var t=e.r/255,n=e.g/255,r=e.b/255,a=(Fp*r+Np*t-Dp*n)/(Fp+Np-Dp),i=r-a,s=(Mi*(n-a)-cf*i)/pc,o=Math.sqrt(s*s+i*i)/(Mi*a*(1-a)),c=o?Math.atan2(s,i)*IR-120:NaN;return new lr(c<0?c+360:c,o,a,e.opacity)}function en(e,t,n,r){return arguments.length===1?NR(e):new lr(e,t,n,r??1)}function lr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}hc(lr,en,af(ma,{brighter(e){return e=e==null?na:Math.pow(na,e),new lr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?br:Math.pow(br,e),new lr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*PR,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),a=Math.sin(e);return new rt(255*(t+n*(_b*r+of*a)),255*(t+n*(cf*r+pc*a)),255*(t+n*(Mi*r)),this.opacity)}}));function DR(e,t,n,r,a){var i=e*e,s=i*e;return((1-3*e+3*i-s)*t+(4-6*i+3*s)*n+(1+3*e+3*i-3*s)*r+s*a)/6}function FR(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),a=e[r],i=e[r+1],s=r>0?e[r-1]:2*a-i,o=r<t-1?e[r+2]:2*i-a;return DR((n-r/t)*t,s,a,i,o)}}const uf=e=>()=>e;function xb(e,t){return function(n){return e+n*t}}function LR(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function UR(e,t){var n=t-e;return n?xb(e,n>180||n<-180?n-360*Math.round(n/360):n):uf(isNaN(e)?t:e)}function zR(e){return(e=+e)==1?qr:function(t,n){return n-t?LR(t,n,e):uf(isNaN(t)?n:t)}}function qr(e,t){var n=t-e;return n?xb(e,n):uf(isNaN(e)?t:e)}(function e(t){var n=zR(t);function r(a,i){var s=n((a=ra(a)).r,(i=ra(i)).r),o=n(a.g,i.g),c=n(a.b,i.b),u=qr(a.opacity,i.opacity);return function(l){return a.r=s(l),a.g=o(l),a.b=c(l),a.opacity=u(l),a+""}}return r.gamma=e,r})(1);function BR(e){return function(t){var n=t.length,r=new Array(n),a=new Array(n),i=new Array(n),s,o;for(s=0;s<n;++s)o=ra(t[s]),r[s]=o.r||0,a[s]=o.g||0,i[s]=o.b||0;return r=e(r),a=e(a),i=e(i),o.opacity=1,function(c){return o.r=r(c),o.g=a(c),o.b=i(c),o+""}}}var WR=BR(FR);function wb(e){return function t(n){n=+n;function r(a,i){var s=e((a=en(a)).h,(i=en(i)).h),o=qr(a.s,i.s),c=qr(a.l,i.l),u=qr(a.opacity,i.opacity);return function(l){return a.h=s(l),a.s=o(l),a.l=c(Math.pow(l,n)),a.opacity=u(l),a+""}}return r.gamma=t,r}(1)}wb(UR);var lf=wb(qr),qR=Tr,HR=nn,VR=Yn,YR="[object String]";function ZR(e){return typeof e=="string"||!HR(e)&&VR(e)&&qR(e)==YR}var GR=ZR;const KR=vt(GR);function XR(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var JR=XR;const de=vt(JR);class Lp extends Map{constructor(t,n=tA){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(Up(this,t))}has(t){return super.has(Up(this,t))}set(t,n){return super.set(QR(this,t),n)}delete(t){return super.delete(eA(this,t))}}function Up({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function QR({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function eA({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function tA(e){return e!==null&&typeof e=="object"?e.valueOf():e}function nA(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const zp=Symbol("implicit");function Fr(){var e=new Lp,t=[],n=[],r=zp;function a(i){let s=e.get(i);if(s===void 0){if(r!==zp)return r;e.set(i,s=t.push(i)-1)}return n[s%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new Lp;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return Fr(t,n).unknown(r)},nA.apply(a,arguments),a}function rA(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function po(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function aA(e){return e=po(Math.abs(e)),e?e[1]:NaN}function iA(e,t){return function(n,r){for(var a=n.length,i=[],s=0,o=e[0],c=0;a>0&&o>0&&(c+o+1>r&&(o=Math.max(1,r-c)),i.push(n.substring(a-=o,a+o)),!((c+=o+1)>r));)o=e[s=(s+1)%e.length];return i.reverse().join(t)}}function sA(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var oA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pl(e){if(!(t=oA.exec(e)))throw new Error("invalid format: "+e);var t;return new df({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Pl.prototype=df.prototype;function df(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}df.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function cA(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var Tb;function uA(e,t){var n=po(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(Tb=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+po(e,Math.max(0,t+i-1))[0]}function Bp(e,t){var n=po(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const Wp={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:rA,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Bp(e*100,t)},r:Bp,s:uA,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function qp(e){return e}var Hp=Array.prototype.map,Vp=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lA(e){var t=e.grouping===void 0||e.thousands===void 0?qp:iA(Hp.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?qp:sA(Hp.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"-":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(d){d=Pl(d);var f=d.fill,m=d.align,g=d.sign,v=d.symbol,h=d.zero,w=d.width,x=d.comma,b=d.precision,T=d.trim,_=d.type;_==="n"?(x=!0,_="g"):Wp[_]||(b===void 0&&(b=12),T=!0,_="g"),(h||f==="0"&&m==="=")&&(h=!0,f="0",m="=");var S=v==="$"?n:v==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",$=v==="$"?r:/[%p]/.test(_)?s:"",D=Wp[_],I=/[defgprs%]/.test(_);b=b===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function M(k){var Y=S,A=$,R,F,B;if(_==="c")A=D(k)+A,k="";else{k=+k;var L=k<0||1/k<0;if(k=isNaN(k)?c:D(Math.abs(k),b),T&&(k=cA(k)),L&&+k==0&&g!=="+"&&(L=!1),Y=(L?g==="("?g:o:g==="-"||g==="("?"":g)+Y,A=(_==="s"?Vp[8+Tb/3]:"")+A+(L&&g==="("?")":""),I){for(R=-1,F=k.length;++R<F;)if(B=k.charCodeAt(R),48>B||B>57){A=(B===46?a+k.slice(R+1):k.slice(R))+A,k=k.slice(0,R);break}}}x&&!h&&(k=t(k,1/0));var G=Y.length+k.length+A.length,Z=G<w?new Array(w-G+1).join(f):"";switch(x&&h&&(k=t(Z+k,Z.length?w-A.length:1/0),Z=""),m){case"<":k=Y+k+A+Z;break;case"=":k=Y+Z+k+A;break;case"^":k=Z.slice(0,G=Z.length>>1)+Y+k+A+Z.slice(G);break;default:k=Z+Y+k+A;break}return i(k)}return M.toString=function(){return d+""},M}function l(d,f){var m=u((d=Pl(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(aA(f)/3)))*3,v=Math.pow(10,-g),h=Vp[8+g/3];return function(w){return m(v*w)+h}}return{format:u,formatPrefix:l}}var ys,Ob;dA({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function dA(e){return ys=lA(e),Ob=ys.format,ys.formatPrefix,ys}var Au=new Date,Mu=new Date;function xn(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=function(i){return e(i=new Date(+i)),i},a.ceil=function(i){return e(i=new Date(i-1)),t(i,1),e(i),i},a.round=function(i){var s=a(i),o=a.ceil(i);return i-s<o-i?s:o},a.offset=function(i,s){return t(i=new Date(+i),s==null?1:Math.floor(s)),i},a.range=function(i,s,o){var c=[],u;if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i<s)||!(o>0))return c;do c.push(u=new Date(+i)),t(i,o),e(i);while(u<i&&i<s);return c},a.filter=function(i){return xn(function(s){if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},function(s,o){if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!i(s););else for(;--o>=0;)for(;t(s,1),!i(s););})},n&&(a.count=function(i,s){return Au.setTime(+i),Mu.setTime(+s),e(Au),e(Mu),Math.floor(n(Au,Mu))},a.every=function(i){return i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?function(s){return r(s)%i===0}:function(s){return a.count(0,s)%i===0}):a}),a}const fA=1e3,ff=fA*60,hA=ff*60,hf=hA*24,Cb=hf*7;var pf=xn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ff)/hf,e=>e.getDate()-1);pf.range;function Cr(e){return xn(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ff)/Cb})}var Eb=Cr(0),mo=Cr(1),pA=Cr(2),mA=Cr(3),aa=Cr(4),gA=Cr(5),vA=Cr(6);Eb.range;mo.range;pA.range;mA.range;aa.range;gA.range;vA.range;var yr=xn(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});yr.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:xn(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};yr.range;var mf=xn(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/hf},function(e){return e.getUTCDate()-1});mf.range;function Er(e){return xn(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/Cb})}var Sb=Er(0),go=Er(1),bA=Er(2),yA=Er(3),ia=Er(4),_A=Er(5),xA=Er(6);Sb.range;go.range;bA.range;yA.range;ia.range;_A.range;xA.range;var _r=xn(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});_r.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:xn(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};_r.range;function $u(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ju(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function La(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function wA(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,s=e.shortDays,o=e.months,c=e.shortMonths,u=Ua(a),l=za(a),d=Ua(i),f=za(i),m=Ua(s),g=za(s),v=Ua(o),h=za(o),w=Ua(c),x=za(c),b={a:L,A:G,b:Z,B:j,c:null,d:Jp,e:Jp,f:HA,g:tM,G:rM,H:BA,I:WA,j:qA,L:kb,m:VA,M:YA,p:U,q:J,Q:tm,s:nm,S:ZA,u:GA,U:KA,V:XA,w:JA,W:QA,x:null,X:null,y:eM,Y:nM,Z:aM,"%":em},T={a:te,A:K,b:X,B:V,c:null,d:Qp,e:Qp,f:cM,g:bM,G:_M,H:iM,I:sM,j:oM,L:Ab,m:uM,M:lM,p:Q,q:ee,Q:tm,s:nm,S:dM,u:fM,U:hM,V:pM,w:mM,W:gM,x:null,X:null,y:vM,Y:yM,Z:xM,"%":em},_={a:M,A:k,b:Y,B:A,c:R,d:Kp,e:Kp,f:FA,g:Gp,G:Zp,H:Xp,I:Xp,j:PA,L:DA,m:jA,M:IA,p:I,q:$A,Q:UA,s:zA,S:NA,u:SA,U:kA,V:RA,w:EA,W:AA,x:F,X:B,y:Gp,Y:Zp,Z:MA,"%":LA};b.x=S(n,b),b.X=S(r,b),b.c=S(t,b),T.x=S(n,T),T.X=S(r,T),T.c=S(t,T);function S(N,W){return function(ne){var O=[],ge=-1,he=0,ue=N.length,Ae,ze,bt;for(ne instanceof Date||(ne=new Date(+ne));++ge<ue;)N.charCodeAt(ge)===37&&(O.push(N.slice(he,ge)),(ze=Yp[Ae=N.charAt(++ge)])!=null?Ae=N.charAt(++ge):ze=Ae==="e"?" ":"0",(bt=W[Ae])&&(Ae=bt(ne,ze)),O.push(Ae),he=ge+1);return O.push(N.slice(he,ge)),O.join("")}}function $(N,W){return function(ne){var O=La(1900,void 0,1),ge=D(O,N,ne+="",0),he,ue;if(ge!=ne.length)return null;if("Q"in O)return new Date(O.Q);if("s"in O)return new Date(O.s*1e3+("L"in O?O.L:0));if(W&&!("Z"in O)&&(O.Z=0),"p"in O&&(O.H=O.H%12+O.p*12),O.m===void 0&&(O.m="q"in O?O.q:0),"V"in O){if(O.V<1||O.V>53)return null;"w"in O||(O.w=1),"Z"in O?(he=ju(La(O.y,0,1)),ue=he.getUTCDay(),he=ue>4||ue===0?go.ceil(he):go(he),he=mf.offset(he,(O.V-1)*7),O.y=he.getUTCFullYear(),O.m=he.getUTCMonth(),O.d=he.getUTCDate()+(O.w+6)%7):(he=$u(La(O.y,0,1)),ue=he.getDay(),he=ue>4||ue===0?mo.ceil(he):mo(he),he=pf.offset(he,(O.V-1)*7),O.y=he.getFullYear(),O.m=he.getMonth(),O.d=he.getDate()+(O.w+6)%7)}else("W"in O||"U"in O)&&("w"in O||(O.w="u"in O?O.u%7:"W"in O?1:0),ue="Z"in O?ju(La(O.y,0,1)).getUTCDay():$u(La(O.y,0,1)).getDay(),O.m=0,O.d="W"in O?(O.w+6)%7+O.W*7-(ue+5)%7:O.w+O.U*7-(ue+6)%7);return"Z"in O?(O.H+=O.Z/100|0,O.M+=O.Z%100,ju(O)):$u(O)}}function D(N,W,ne,O){for(var ge=0,he=W.length,ue=ne.length,Ae,ze;ge<he;){if(O>=ue)return-1;if(Ae=W.charCodeAt(ge++),Ae===37){if(Ae=W.charAt(ge++),ze=_[Ae in Yp?W.charAt(ge++):Ae],!ze||(O=ze(N,ne,O))<0)return-1}else if(Ae!=ne.charCodeAt(O++))return-1}return O}function I(N,W,ne){var O=u.exec(W.slice(ne));return O?(N.p=l.get(O[0].toLowerCase()),ne+O[0].length):-1}function M(N,W,ne){var O=m.exec(W.slice(ne));return O?(N.w=g.get(O[0].toLowerCase()),ne+O[0].length):-1}function k(N,W,ne){var O=d.exec(W.slice(ne));return O?(N.w=f.get(O[0].toLowerCase()),ne+O[0].length):-1}function Y(N,W,ne){var O=w.exec(W.slice(ne));return O?(N.m=x.get(O[0].toLowerCase()),ne+O[0].length):-1}function A(N,W,ne){var O=v.exec(W.slice(ne));return O?(N.m=h.get(O[0].toLowerCase()),ne+O[0].length):-1}function R(N,W,ne){return D(N,t,W,ne)}function F(N,W,ne){return D(N,n,W,ne)}function B(N,W,ne){return D(N,r,W,ne)}function L(N){return s[N.getDay()]}function G(N){return i[N.getDay()]}function Z(N){return c[N.getMonth()]}function j(N){return o[N.getMonth()]}function U(N){return a[+(N.getHours()>=12)]}function J(N){return 1+~~(N.getMonth()/3)}function te(N){return s[N.getUTCDay()]}function K(N){return i[N.getUTCDay()]}function X(N){return c[N.getUTCMonth()]}function V(N){return o[N.getUTCMonth()]}function Q(N){return a[+(N.getUTCHours()>=12)]}function ee(N){return 1+~~(N.getUTCMonth()/3)}return{format:function(N){var W=S(N+="",b);return W.toString=function(){return N},W},parse:function(N){var W=$(N+="",!1);return W.toString=function(){return N},W},utcFormat:function(N){var W=S(N+="",T);return W.toString=function(){return N},W},utcParse:function(N){var W=$(N+="",!0);return W.toString=function(){return N},W}}}var Yp={"-":"",_:" ",0:"0"},Je=/^\s*\d+/,TA=/^%/,OA=/[\\^$*+?|[\]().{}]/g;function ke(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function CA(e){return e.replace(OA,"\\$&")}function Ua(e){return new RegExp("^(?:"+e.map(CA).join("|")+")","i")}function za(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function EA(e,t,n){var r=Je.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function SA(e,t,n){var r=Je.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function kA(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function RA(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function AA(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Zp(e,t,n){var r=Je.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Gp(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function MA(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function $A(e,t,n){var r=Je.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function jA(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Kp(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function PA(e,t,n){var r=Je.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Xp(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function IA(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function NA(e,t,n){var r=Je.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function DA(e,t,n){var r=Je.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function FA(e,t,n){var r=Je.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function LA(e,t,n){var r=TA.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function UA(e,t,n){var r=Je.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function zA(e,t,n){var r=Je.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Jp(e,t){return ke(e.getDate(),t,2)}function BA(e,t){return ke(e.getHours(),t,2)}function WA(e,t){return ke(e.getHours()%12||12,t,2)}function qA(e,t){return ke(1+pf.count(yr(e),e),t,3)}function kb(e,t){return ke(e.getMilliseconds(),t,3)}function HA(e,t){return kb(e,t)+"000"}function VA(e,t){return ke(e.getMonth()+1,t,2)}function YA(e,t){return ke(e.getMinutes(),t,2)}function ZA(e,t){return ke(e.getSeconds(),t,2)}function GA(e){var t=e.getDay();return t===0?7:t}function KA(e,t){return ke(Eb.count(yr(e)-1,e),t,2)}function Rb(e){var t=e.getDay();return t>=4||t===0?aa(e):aa.ceil(e)}function XA(e,t){return e=Rb(e),ke(aa.count(yr(e),e)+(yr(e).getDay()===4),t,2)}function JA(e){return e.getDay()}function QA(e,t){return ke(mo.count(yr(e)-1,e),t,2)}function eM(e,t){return ke(e.getFullYear()%100,t,2)}function tM(e,t){return e=Rb(e),ke(e.getFullYear()%100,t,2)}function nM(e,t){return ke(e.getFullYear()%1e4,t,4)}function rM(e,t){var n=e.getDay();return e=n>=4||n===0?aa(e):aa.ceil(e),ke(e.getFullYear()%1e4,t,4)}function aM(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ke(t/60|0,"0",2)+ke(t%60,"0",2)}function Qp(e,t){return ke(e.getUTCDate(),t,2)}function iM(e,t){return ke(e.getUTCHours(),t,2)}function sM(e,t){return ke(e.getUTCHours()%12||12,t,2)}function oM(e,t){return ke(1+mf.count(_r(e),e),t,3)}function Ab(e,t){return ke(e.getUTCMilliseconds(),t,3)}function cM(e,t){return Ab(e,t)+"000"}function uM(e,t){return ke(e.getUTCMonth()+1,t,2)}function lM(e,t){return ke(e.getUTCMinutes(),t,2)}function dM(e,t){return ke(e.getUTCSeconds(),t,2)}function fM(e){var t=e.getUTCDay();return t===0?7:t}function hM(e,t){return ke(Sb.count(_r(e)-1,e),t,2)}function Mb(e){var t=e.getUTCDay();return t>=4||t===0?ia(e):ia.ceil(e)}function pM(e,t){return e=Mb(e),ke(ia.count(_r(e),e)+(_r(e).getUTCDay()===4),t,2)}function mM(e){return e.getUTCDay()}function gM(e,t){return ke(go.count(_r(e)-1,e),t,2)}function vM(e,t){return ke(e.getUTCFullYear()%100,t,2)}function bM(e,t){return e=Mb(e),ke(e.getUTCFullYear()%100,t,2)}function yM(e,t){return ke(e.getUTCFullYear()%1e4,t,4)}function _M(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ia(e):ia.ceil(e),ke(e.getUTCFullYear()%1e4,t,4)}function xM(){return"+0000"}function em(){return"%"}function tm(e){return+e}function nm(e){return Math.floor(+e/1e3)}var Ir,$b;wM({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function wM(e){return Ir=wA(e),$b=Ir.format,Ir.parse,Ir.utcFormat,Ir.utcParse,Ir}function we(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const jb=we("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Pb=we("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Ib=we("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Nb=we("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Db=we("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Fb=we("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Lb=we("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ub=we("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),gf=we("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),TM=we("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),De=e=>WR(e[e.length-1]);var mc=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(we);const OM=De(mc);var gc=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(we);const CM=De(gc);var vc=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(we);const EM=De(vc);var bc=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(we);const SM=De(bc);var yc=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(we);const kM=De(yc);var _c=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(we);const RM=De(_c);var xc=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(we);const AM=De(xc);var wc=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(we);const MM=De(wc);var Tc=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(we);const $M=De(Tc);var Oc=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(we);const jM=De(Oc);var Cc=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(we);const PM=De(Cc);var Ec=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(we);const IM=De(Ec);var Sc=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(we);const NM=De(Sc);var kc=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(we);const DM=De(kc);var Rc=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(we);const FM=De(Rc);var Ac=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(we);const LM=De(Ac);var Mc=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(we);const UM=De(Mc);var $c=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(we);const zM=De($c);var jc=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(we);const BM=De(jc);var Pc=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(we);const WM=De(Pc);var Ic=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(we);const qM=De(Ic);var Nc=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(we);const HM=De(Nc);var Dc=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(we);const VM=De(Dc);var Fc=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(we);const YM=De(Fc);var Lc=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(we);const ZM=De(Lc);var Uc=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(we);const GM=De(Uc);var zc=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(we);const KM=De(zc);function XM(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const JM=lf(en(300,.5,0),en(-240,.5,1));var QM=lf(en(-100,.75,.35),en(80,1.5,.8)),e$=lf(en(260,.75,.35),en(80,1.5,.8)),_s=en();function t$(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return _s.h=360*e-100,_s.s=1.5-1.5*t,_s.l=.8-.9*t,_s+""}var xs=ra(),n$=Math.PI/3,r$=Math.PI*2/3;function a$(e){var t;return e=(.5-e)*Math.PI,xs.r=255*(t=Math.sin(e))*t,xs.g=255*(t=Math.sin(e+n$))*t,xs.b=255*(t=Math.sin(e+r$))*t,xs+""}function i$(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function Bc(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const s$=Bc(we("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var o$=Bc(we("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),c$=Bc(we("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),u$=Bc(we("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),l$="__lodash_hash_undefined__";function d$(e){return this.__data__.set(e,l$),this}var f$=d$;function h$(e){return this.__data__.has(e)}var p$=h$,m$=Zd,g$=f$,v$=p$;function vo(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new m$;++t<n;)this.add(e[t])}vo.prototype.add=vo.prototype.push=g$;vo.prototype.has=v$;var zb=vo;function b$(e,t,n,r){for(var a=e.length,i=n+(r?1:-1);r?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var y$=b$;function _$(e){return e!==e}var x$=_$;function w$(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}var T$=w$,O$=y$,C$=x$,E$=T$;function S$(e,t,n){return t===t?E$(e,t,n):O$(e,C$,n)}var k$=S$,R$=k$;function A$(e,t){var n=e==null?0:e.length;return!!n&&R$(e,t,0)>-1}var M$=A$;function $$(e,t,n){for(var r=-1,a=e==null?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1}var j$=$$;function P$(e,t){return e.has(t)}var Bb=P$,I$=zb,N$=M$,D$=j$,F$=pb,L$=rb,U$=Bb,z$=200;function B$(e,t,n,r){var a=-1,i=N$,s=!0,o=e.length,c=[],u=t.length;if(!o)return c;n&&(t=F$(t,L$(n))),r?(i=D$,s=!1):t.length>=z$&&(i=U$,s=!1,t=new I$(t));e:for(;++a<o;){var l=e[a],d=n==null?l:n(l);if(l=r||l!==0?l:0,s&&d===d){for(var f=u;f--;)if(t[f]===d)continue e;c.push(l)}else i(t,d,r)||c.push(l)}return c}var W$=B$,q$=W$,H$=fb,V$=eb,Y$=H$(function(e,t){return V$(e)?q$(e,t):[]}),Z$=Y$;const Wb=vt(Z$);function Ze(e){return function(){return e}}const rm=Math.abs,et=Math.atan2,Gn=Math.cos,G$=Math.max,Pu=Math.min,qt=Math.sin,Lr=Math.sqrt,tt=1e-12,$i=Math.PI,bo=$i/2,Is=2*$i;function K$(e){return e>1?0:e<-1?$i:Math.acos(e)}function am(e){return e>=1?bo:e<=-1?-bo:Math.asin(e)}const Il=Math.PI,Nl=2*Il,er=1e-6,X$=Nl-er;function qb(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function J$(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return qb;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class Q${constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?qb:J$(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,i,s){this._append`C${+t},${+n},${+r},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(t,n,r,a,i){if(t=+t,n=+n,r=+r,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,o=this._y1,c=r-t,u=a-n,l=s-t,d=o-n,f=l*l+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>er)if(!(Math.abs(d*c-u*l)>er)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-s,g=a-o,v=c*c+u*u,h=m*m+g*g,w=Math.sqrt(v),x=Math.sqrt(f),b=i*Math.tan((Il-Math.acos((v+f-h)/(2*w*x)))/2),T=b/x,_=b/w;Math.abs(T-1)>er&&this._append`L${t+T*l},${n+T*d}`,this._append`A${i},${i},0,0,${+(d*m>l*g)},${this._x1=t+_*c},${this._y1=n+_*u}`}}arc(t,n,r,a,i,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(a),c=r*Math.sin(a),u=t+o,l=n+c,d=1^s,f=s?a-i:i-a;this._x1===null?this._append`M${u},${l}`:(Math.abs(this._x1-u)>er||Math.abs(this._y1-l)>er)&&this._append`L${u},${l}`,r&&(f<0&&(f=f%Nl+Nl),f>X$?this._append`A${r},${r},0,1,${d},${t-o},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=l}`:f>er&&this._append`A${r},${r},0,${+(f>=Il)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function Hb(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Q$(t)}function ej(e){return e.innerRadius}function tj(e){return e.outerRadius}function nj(e){return e.startAngle}function rj(e){return e.endAngle}function aj(e){return e&&e.padAngle}function ij(e,t,n,r,a,i,s,o){var c=n-e,u=r-t,l=s-a,d=o-i,f=d*c-l*u;if(!(f*f<tt))return f=(l*(t-i)-d*(e-a))/f,[e+f*c,t+f*u]}function ws(e,t,n,r,a,i,s){var o=e-n,c=t-r,u=(s?i:-i)/Lr(o*o+c*c),l=u*c,d=-u*o,f=e+l,m=t+d,g=n+l,v=r+d,h=(f+g)/2,w=(m+v)/2,x=g-f,b=v-m,T=x*x+b*b,_=a-i,S=f*v-g*m,$=(b<0?-1:1)*Lr(G$(0,_*_*T-S*S)),D=(S*b-x*$)/T,I=(-S*x-b*$)/T,M=(S*b+x*$)/T,k=(-S*x+b*$)/T,Y=D-h,A=I-w,R=M-h,F=k-w;return Y*Y+A*A>R*R+F*F&&(D=M,I=k),{cx:D,cy:I,x01:-l,y01:-d,x11:D*(a/_-1),y11:I*(a/_-1)}}function sj(){var e=ej,t=tj,n=Ze(0),r=null,a=nj,i=rj,s=aj,o=null,c=Hb(u);function u(){var l,d,f=+e.apply(this,arguments),m=+t.apply(this,arguments),g=a.apply(this,arguments)-bo,v=i.apply(this,arguments)-bo,h=rm(v-g),w=v>g;if(o||(o=l=c()),m<f&&(d=m,m=f,f=d),!(m>tt))o.moveTo(0,0);else if(h>Is-tt)o.moveTo(m*Gn(g),m*qt(g)),o.arc(0,0,m,g,v,!w),f>tt&&(o.moveTo(f*Gn(v),f*qt(v)),o.arc(0,0,f,v,g,w));else{var x=g,b=v,T=g,_=v,S=h,$=h,D=s.apply(this,arguments)/2,I=D>tt&&(r?+r.apply(this,arguments):Lr(f*f+m*m)),M=Pu(rm(m-f)/2,+n.apply(this,arguments)),k=M,Y=M,A,R;if(I>tt){var F=am(I/f*qt(D)),B=am(I/m*qt(D));(S-=F*2)>tt?(F*=w?1:-1,T+=F,_-=F):(S=0,T=_=(g+v)/2),($-=B*2)>tt?(B*=w?1:-1,x+=B,b-=B):($=0,x=b=(g+v)/2)}var L=m*Gn(x),G=m*qt(x),Z=f*Gn(_),j=f*qt(_);if(M>tt){var U=m*Gn(b),J=m*qt(b),te=f*Gn(T),K=f*qt(T),X;if(h<$i)if(X=ij(L,G,te,K,U,J,Z,j)){var V=L-X[0],Q=G-X[1],ee=U-X[0],N=J-X[1],W=1/qt(K$((V*ee+Q*N)/(Lr(V*V+Q*Q)*Lr(ee*ee+N*N)))/2),ne=Lr(X[0]*X[0]+X[1]*X[1]);k=Pu(M,(f-ne)/(W-1)),Y=Pu(M,(m-ne)/(W+1))}else k=Y=0}$>tt?Y>tt?(A=ws(te,K,L,G,m,Y,w),R=ws(U,J,Z,j,m,Y,w),o.moveTo(A.cx+A.x01,A.cy+A.y01),Y<M?o.arc(A.cx,A.cy,Y,et(A.y01,A.x01),et(R.y01,R.x01),!w):(o.arc(A.cx,A.cy,Y,et(A.y01,A.x01),et(A.y11,A.x11),!w),o.arc(0,0,m,et(A.cy+A.y11,A.cx+A.x11),et(R.cy+R.y11,R.cx+R.x11),!w),o.arc(R.cx,R.cy,Y,et(R.y11,R.x11),et(R.y01,R.x01),!w))):(o.moveTo(L,G),o.arc(0,0,m,x,b,!w)):o.moveTo(L,G),!(f>tt)||!(S>tt)?o.lineTo(Z,j):k>tt?(A=ws(Z,j,U,J,f,-k,w),R=ws(L,G,te,K,f,-k,w),o.lineTo(A.cx+A.x01,A.cy+A.y01),k<M?o.arc(A.cx,A.cy,k,et(A.y01,A.x01),et(R.y01,R.x01),!w):(o.arc(A.cx,A.cy,k,et(A.y01,A.x01),et(A.y11,A.x11),!w),o.arc(0,0,f,et(A.cy+A.y11,A.cx+A.x11),et(R.cy+R.y11,R.cx+R.x11),w),o.arc(R.cx,R.cy,k,et(R.y11,R.x11),et(R.y01,R.x01),!w))):o.arc(0,0,f,_,T,w)}if(o.closePath(),l)return o=null,l+""||null}return u.centroid=function(){var l=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+a.apply(this,arguments)+ +i.apply(this,arguments))/2-$i/2;return[Gn(d)*l,qt(d)*l]},u.innerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:Ze(+l),u):e},u.outerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:Ze(+l),u):t},u.cornerRadius=function(l){return arguments.length?(n=typeof l=="function"?l:Ze(+l),u):n},u.padRadius=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:Ze(+l),u):r},u.startAngle=function(l){return arguments.length?(a=typeof l=="function"?l:Ze(+l),u):a},u.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Ze(+l),u):i},u.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:Ze(+l),u):s},u.context=function(l){return arguments.length?(o=l??null,u):o},u}function Vb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Yb(e){this._context=e}Yb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Zb(e){return new Yb(e)}function oj(e){return e[0]}function cj(e){return e[1]}function uj(e,t){var n=Ze(!0),r=null,a=Zb,i=null,s=Hb(o);e=typeof e=="function"?e:e===void 0?oj:Ze(e),t=typeof t=="function"?t:t===void 0?cj:Ze(t);function o(c){var u,l=(c=Vb(c)).length,d,f=!1,m;for(r==null&&(i=a(m=s())),u=0;u<=l;++u)!(u<l&&n(d=c[u],u,c))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(d,u,c),+t(d,u,c));if(m)return i=null,m+""||null}return o.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ze(+c),o):e},o.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ze(+c),o):t},o.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Ze(!!c),o):n},o.curve=function(c){return arguments.length?(a=c,r!=null&&(i=a(r)),o):a},o.context=function(c){return arguments.length?(c==null?r=i=null:i=a(r=c),o):r},o}function lj(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function dj(e){return e}function fj(){var e=dj,t=lj,n=null,r=Ze(0),a=Ze(Is),i=Ze(0);function s(o){var c,u=(o=Vb(o)).length,l,d,f=0,m=new Array(u),g=new Array(u),v=+r.apply(this,arguments),h=Math.min(Is,Math.max(-Is,a.apply(this,arguments)-v)),w,x=Math.min(Math.abs(h)/u,i.apply(this,arguments)),b=x*(h<0?-1:1),T;for(c=0;c<u;++c)(T=g[m[c]=c]=+e(o[c],c,o))>0&&(f+=T);for(t!=null?m.sort(function(_,S){return t(g[_],g[S])}):n!=null&&m.sort(function(_,S){return n(o[_],o[S])}),c=0,d=f?(h-u*b)/f:0;c<u;++c,v=w)l=m[c],T=g[l],w=v+(T>0?T*d:0)+b,g[l]={data:o[l],index:c,value:T,startAngle:v,endAngle:w,padAngle:x};return g}return s.value=function(o){return arguments.length?(e=typeof o=="function"?o:Ze(+o),s):e},s.sortValues=function(o){return arguments.length?(t=o,n=null,s):t},s.sort=function(o){return arguments.length?(n=o,t=null,s):n},s.startAngle=function(o){return arguments.length?(r=typeof o=="function"?o:Ze(+o),s):r},s.endAngle=function(o){return arguments.length?(a=typeof o=="function"?o:Ze(+o),s):a},s.padAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Ze(+o),s):i},s}function Bn(){}function yo(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Wc(e){this._context=e}Wc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:yo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:yo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hj(e){return new Wc(e)}function Gb(e){this._context=e}Gb.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:yo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pj(e){return new Gb(e)}function Kb(e){this._context=e}Kb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:yo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mj(e){return new Kb(e)}function Xb(e,t){this._basis=new Wc(e),this._beta=t}Xb.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],a=t[0],i=e[n]-r,s=t[n]-a,o=-1,c;++o<=n;)c=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+c*i),this._beta*t[o]+(1-this._beta)*(a+c*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const gj=function e(t){function n(r){return t===1?new Wc(r):new Xb(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function _o(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function vf(e,t){this._context=e,this._k=(1-t)/6}vf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:_o(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:_o(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const vj=function e(t){function n(r){return new vf(r,t)}return n.tension=function(r){return e(+r)},n}(0);function bf(e,t){this._context=e,this._k=(1-t)/6}bf.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:_o(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const bj=function e(t){function n(r){return new bf(r,t)}return n.tension=function(r){return e(+r)},n}(0);function yf(e,t){this._context=e,this._k=(1-t)/6}yf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_o(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const yj=function e(t){function n(r){return new yf(r,t)}return n.tension=function(r){return e(+r)},n}(0);function _f(e,t,n){var r=e._x1,a=e._y1,i=e._x2,s=e._y2;if(e._l01_a>tt){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,a=(a*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>tt){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,l=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*u+e._x1*e._l23_2a-t*e._l12_2a)/l,s=(s*u+e._y1*e._l23_2a-n*e._l12_2a)/l}e._context.bezierCurveTo(r,a,i,s,e._x2,e._y2)}function Jb(e,t){this._context=e,this._alpha=t}Jb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:_f(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const _j=function e(t){function n(r){return t?new Jb(r,t):new vf(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Qb(e,t){this._context=e,this._alpha=t}Qb.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:_f(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const xj=function e(t){function n(r){return t?new Qb(r,t):new bf(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function ey(e,t){this._context=e,this._alpha=t}ey.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_f(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const wj=function e(t){function n(r){return t?new ey(r,t):new yf(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function ty(e){this._context=e}ty.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Tj(e){return new ty(e)}function im(e){return e<0?-1:1}function sm(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),o=(i*a+s*r)/(r+a);return(im(i)+im(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function om(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Iu(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,s-o*n,i,s)}function xo(e){this._context=e}xo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Iu(this,this._t0,om(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Iu(this,om(this,n=sm(this,e,t)),n);break;default:Iu(this,this._t0,n=sm(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function ny(e){this._context=new ry(e)}(ny.prototype=Object.create(xo.prototype)).point=function(e,t){xo.prototype.point.call(this,t,e)};function ry(e){this._context=e}ry.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function Oj(e){return new xo(e)}function Cj(e){return new ny(e)}function ay(e){this._context=e}ay.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=cm(e),a=cm(t),i=0,s=1;s<n;++i,++s)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[s],t[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function cm(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),s=new Array(n);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,s[t]-=r*s[t-1];for(a[n-1]=s[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function Ej(e){return new ay(e)}function qc(e,t){this._context=e,this._t=t}qc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Sj(e){return new qc(e,.5)}function kj(e){return new qc(e,0)}function Rj(e){return new qc(e,1)}var Aj=gb,Mj=vb,$j=fc;function jj(e,t,n){for(var r=-1,a=t.length,i={};++r<a;){var s=t[r],o=Aj(e,s);n(o,s)&&Mj(i,$j(s,e),o)}return i}var Pj=jj;function Ij(e,t){return e!=null&&t in Object(e)}var Nj=Ij,Dj=fc,Fj=uc,Lj=nn,Uj=dc,zj=Xd,Bj=rf;function Wj(e,t,n){t=Dj(t,e);for(var r=-1,a=t.length,i=!1;++r<a;){var s=Bj(t[r]);if(!(i=e!=null&&n(e,s)))break;e=e[s]}return i||++r!=a?i:(a=e==null?0:e.length,!!a&&zj(a)&&Uj(s,a)&&(Lj(e)||Fj(e)))}var qj=Wj,Hj=Nj,Vj=qj;function Yj(e,t){return e!=null&&Vj(e,t,Hj)}var Zj=Yj,Gj=Pj,Kj=Zj;function Xj(e,t){return Gj(e,t,function(n,r){return Kj(e,r)})}var Jj=Xj;function Qj(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var iy=Qj,um=Zi,eP=uc,tP=nn,lm=um?um.isConcatSpreadable:void 0;function nP(e){return tP(e)||eP(e)||!!(lm&&e&&e[lm])}var rP=nP,aP=iy,iP=rP;function sy(e,t,n,r,a){var i=-1,s=e.length;for(n||(n=iP),a||(a=[]);++i<s;){var o=e[i];t>0&&n(o)?t>1?sy(o,t-1,n,r,a):aP(a,o):r||(a[a.length]=o)}return a}var sP=sy,oP=sP;function cP(e){var t=e==null?0:e.length;return t?oP(e,1):[]}var uP=cP,lP=uP,dP=lb,fP=db;function hP(e){return fP(dP(e,void 0,lP),e+"")}var pP=hP,mP=Jj,gP=pP,vP=gP(function(e,t){return e==null?{}:mP(e,t)}),bP=vP;const yP=vt(bP);function _P(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var xP=_P,wP=zb,TP=xP,OP=Bb,CP=1,EP=2;function SP(e,t,n,r,a,i){var s=n&CP,o=e.length,c=t.length;if(o!=c&&!(s&&c>o))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var d=-1,f=!0,m=n&EP?new wP:void 0;for(i.set(e,t),i.set(t,e);++d<o;){var g=e[d],v=t[d];if(r)var h=s?r(v,g,d,t,e,i):r(g,v,d,e,t,i);if(h!==void 0){if(h)continue;f=!1;break}if(m){if(!TP(t,function(w,x){if(!OP(m,x)&&(g===w||a(g,w,n,r,i)))return m.push(x)})){f=!1;break}}else if(!(g===v||a(g,v,n,r,i))){f=!1;break}}return i.delete(e),i.delete(t),f}var oy=SP;function kP(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}var RP=kP;function AP(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var MP=AP,dm=Zi,fm=Kv,$P=Yi,jP=oy,PP=RP,IP=MP,NP=1,DP=2,FP="[object Boolean]",LP="[object Date]",UP="[object Error]",zP="[object Map]",BP="[object Number]",WP="[object RegExp]",qP="[object Set]",HP="[object String]",VP="[object Symbol]",YP="[object ArrayBuffer]",ZP="[object DataView]",hm=dm?dm.prototype:void 0,Nu=hm?hm.valueOf:void 0;function GP(e,t,n,r,a,i,s){switch(n){case ZP:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case YP:return!(e.byteLength!=t.byteLength||!i(new fm(e),new fm(t)));case FP:case LP:case BP:return $P(+e,+t);case UP:return e.name==t.name&&e.message==t.message;case WP:case HP:return e==t+"";case zP:var o=PP;case qP:var c=r&NP;if(o||(o=IP),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=DP,s.set(e,t);var l=jP(o(e),o(t),r,a,i,s);return s.delete(e),l;case VP:if(Nu)return Nu.call(e)==Nu.call(t)}return!1}var KP=GP,XP=iy,JP=nn;function QP(e,t,n){var r=t(e);return JP(e)?r:XP(r,n(e))}var eI=QP;function tI(e,t){for(var n=-1,r=e==null?0:e.length,a=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[a++]=s)}return i}var nI=tI;function rI(){return[]}var aI=rI,iI=nI,sI=aI,oI=Object.prototype,cI=oI.propertyIsEnumerable,pm=Object.getOwnPropertySymbols,uI=pm?function(e){return e==null?[]:(e=Object(e),iI(pm(e),function(t){return cI.call(e,t)}))}:sI,lI=uI,dI=Xv,fI=dI(Object.keys,Object),hI=fI,pI=Kd,mI=hI,gI=Object.prototype,vI=gI.hasOwnProperty;function bI(e){if(!pI(e))return mI(e);var t=[];for(var n in Object(e))vI.call(e,n)&&n!="constructor"&&t.push(n);return t}var yI=bI,_I=sb,xI=yI,wI=lc;function TI(e){return wI(e)?_I(e):xI(e)}var OI=TI,CI=eI,EI=lI,SI=OI;function kI(e){return CI(e,SI,EI)}var RI=kI,mm=RI,AI=1,MI=Object.prototype,$I=MI.hasOwnProperty;function jI(e,t,n,r,a,i){var s=n&AI,o=mm(e),c=o.length,u=mm(t),l=u.length;if(c!=l&&!s)return!1;for(var d=c;d--;){var f=o[d];if(!(s?f in t:$I.call(t,f)))return!1}var m=i.get(e),g=i.get(t);if(m&&g)return m==t&&g==e;var v=!0;i.set(e,t),i.set(t,e);for(var h=s;++d<c;){f=o[d];var w=e[f],x=t[f];if(r)var b=s?r(x,w,f,t,e,i):r(w,x,f,e,t,i);if(!(b===void 0?w===x||a(w,x,n,r,i):b)){v=!1;break}h||(h=f=="constructor")}if(v&&!h){var T=e.constructor,_=t.constructor;T!=_&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof _=="function"&&_ instanceof _)&&(v=!1)}return i.delete(e),i.delete(t),v}var PI=jI,II=Or,NI=tn,DI=II(NI,"DataView"),FI=DI,LI=Or,UI=tn,zI=LI(UI,"Promise"),BI=zI,WI=Or,qI=tn,HI=WI(qI,"Set"),VI=HI,YI=Or,ZI=tn,GI=YI(ZI,"WeakMap"),KI=GI,Dl=FI,Fl=Yd,Ll=BI,Ul=VI,zl=KI,cy=Tr,ga=Vv,gm="[object Map]",XI="[object Object]",vm="[object Promise]",bm="[object Set]",ym="[object WeakMap]",_m="[object DataView]",JI=ga(Dl),QI=ga(Fl),eN=ga(Ll),tN=ga(Ul),nN=ga(zl),tr=cy;(Dl&&tr(new Dl(new ArrayBuffer(1)))!=_m||Fl&&tr(new Fl)!=gm||Ll&&tr(Ll.resolve())!=vm||Ul&&tr(new Ul)!=bm||zl&&tr(new zl)!=ym)&&(tr=function(e){var t=cy(e),n=t==XI?e.constructor:void 0,r=n?ga(n):"";if(r)switch(r){case JI:return _m;case QI:return gm;case eN:return vm;case tN:return bm;case nN:return ym}return t});var rN=tr,Du=Yv,aN=oy,iN=KP,sN=PI,xm=rN,wm=nn,Tm=Jd,oN=ef,cN=1,Om="[object Arguments]",Cm="[object Array]",Ts="[object Object]",uN=Object.prototype,Em=uN.hasOwnProperty;function lN(e,t,n,r,a,i){var s=wm(e),o=wm(t),c=s?Cm:xm(e),u=o?Cm:xm(t);c=c==Om?Ts:c,u=u==Om?Ts:u;var l=c==Ts,d=u==Ts,f=c==u;if(f&&Tm(e)){if(!Tm(t))return!1;s=!0,l=!1}if(f&&!l)return i||(i=new Du),s||oN(e)?aN(e,t,n,r,a,i):iN(e,t,c,n,r,a,i);if(!(n&cN)){var m=l&&Em.call(e,"__wrapped__"),g=d&&Em.call(t,"__wrapped__");if(m||g){var v=m?e.value():e,h=g?t.value():t;return i||(i=new Du),a(v,h,n,r,i)}}return f?(i||(i=new Du),sN(e,t,n,r,a,i)):!1}var dN=lN,fN=dN,Sm=Yn;function uy(e,t,n,r,a){return e===t?!0:e==null||t==null||!Sm(e)&&!Sm(t)?e!==e&&t!==t:fN(e,t,n,r,uy,a)}var hN=uy,pN=hN;function mN(e,t){return pN(e,t)}var gN=mN;const vN=vt(gN);var bN={background:"transparent",text:{fontFamily:"sans-serif",fontSize:11,fill:"#333333",outlineWidth:0,outlineColor:"transparent",outlineOpacity:1},axis:{domain:{line:{stroke:"transparent",strokeWidth:1}},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{}},legend:{text:{fontSize:12}}},grid:{line:{stroke:"#dddddd",strokeWidth:1}},legends:{hidden:{symbol:{fill:"#333333",opacity:.6},text:{fill:"#333333",opacity:.6}},text:{},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{fontSize:10}},title:{text:{}}},labels:{text:{}},markers:{lineColor:"#000000",lineStrokeWidth:1,text:{}},dots:{text:{}},tooltip:{container:{background:"white",color:"inherit",fontSize:"inherit",borderRadius:"2px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.25)",padding:"5px 9px"},basic:{whiteSpace:"pre",display:"flex",alignItems:"center"},chip:{marginRight:7},table:{},tableCell:{padding:"3px 5px"},tableCellValue:{fontWeight:"bold"}},crosshair:{line:{stroke:"#000000",strokeWidth:1,strokeOpacity:.75,strokeDasharray:"6 6"}},annotations:{text:{fontSize:13,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},link:{stroke:"#000000",strokeWidth:1,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},outline:{fill:"none",stroke:"#000000",strokeWidth:2,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},symbol:{fill:"#000000",outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1}}};function Ft(){return Ft=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ft.apply(this,arguments)}function xf(e,t){if(e==null)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var yN=["axis.ticks.text","axis.legend.text","legends.title.text","legends.text","legends.ticks.text","legends.title.text","labels.text","dots.text","markers.text","annotations.text"],_N=function(e,t){return Ft({},t,e)},xN=function(e,t){var n=O9({},e,t);return yN.forEach(function(r){Ga(n,r,_N(bn(n,r),n.text))}),n},ly=p.createContext(),dy=function(e){var t=e.children,n=e.animate,r=n===void 0||n,a=e.config,i=a===void 0?"default":a,s=p.useMemo(function(){var o=KR(i)?Bd[i]:i;return{animate:r,config:o}},[r,i]);return y.jsx(ly.Provider,{value:s,children:t})},km={animate:E.bool,motionConfig:E.oneOfType([E.oneOf(Object.keys(Bd)),E.shape({mass:E.number,tension:E.number,friction:E.number,clamp:E.bool,precision:E.number,velocity:E.number,duration:E.number,easing:E.func})])};dy.propTypes={children:E.node.isRequired,animate:km.animate,config:km.motionConfig};var va=function(){return p.useContext(ly)},wN={nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:de(mc),PRGn:de(gc),PiYG:de(vc),PuOr:de(bc),RdBu:de(yc),RdGy:de(_c),RdYlBu:de(xc),RdYlGn:de(wc),spectral:de(Tc),blues:de(Nc),greens:de(Dc),greys:de(Fc),oranges:de(zc),purples:de(Lc),reds:de(Uc),BuGn:de(Oc),BuPu:de(Cc),GnBu:de(Ec),OrRd:de(Sc),PuBuGn:de(kc),PuBu:de(Rc),PuRd:de(Ac),RdPu:de(Mc),YlGnBu:de($c),YlGn:de(jc),YlOrBr:de(Pc),YlOrRd:de(Ic)},TN=Object.keys(wN);de(mc),de(gc),de(vc),de(bc),de(yc),de(_c),de(xc),de(wc),de(Tc),de(Nc),de(Dc),de(Fc),de(zc),de(Lc),de(Uc),de(Oc),de(Cc),de(Ec),de(Sc),de(kc),de(Rc),de(Ac),de(Mc),de($c),de(jc),de(Pc),de(Ic);E.oneOfType([E.oneOf(TN),E.func,E.arrayOf(E.string)]);var ON={basis:hj,basisClosed:pj,basisOpen:mj,bundle:gj,cardinal:vj,cardinalClosed:bj,cardinalOpen:yj,catmullRom:_j,catmullRomClosed:xj,catmullRomOpen:wj,linear:Zb,linearClosed:Tj,monotoneX:Oj,monotoneY:Cj,natural:Ej,step:Sj,stepAfter:Rj,stepBefore:kj},wf=Object.keys(ON);wf.filter(function(e){return e.endsWith("Closed")});Wb(wf,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");Wb(wf,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");E.shape({top:E.number,right:E.number,bottom:E.number,left:E.number}).isRequired;var CN=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"];E.oneOf(CN);Fr(gf);var EN={top:0,right:0,bottom:0,left:0},SN=function(e,t,n){return n===void 0&&(n={}),p.useMemo(function(){var r=Ft({},EN,n);return{margin:r,innerWidth:e-r.left-r.right,innerHeight:t-r.top-r.bottom,outerWidth:e,outerHeight:t}},[e,t,n.top,n.right,n.bottom,n.left])},fy=function(){var e=p.useRef(null),t=p.useState({left:0,top:0,width:0,height:0}),n=t[0],r=t[1],a=p.useState(function(){return typeof ResizeObserver>"u"?null:new ResizeObserver(function(i){var s=i[0];return r(s.contentRect)})})[0];return p.useEffect(function(){return e.current&&a!==null&&a.observe(e.current),function(){a!==null&&a.disconnect()}},[]),[e,n]},kN=function(e){return p.useMemo(function(){return xN(bN,e)},[e])},RN=function(e){return typeof e=="function"?e:typeof e=="string"?e.indexOf("time:")===0?$b(e.slice("5")):Ob(e):function(t){return""+t}},hy=function(e){return p.useMemo(function(){return RN(e)},[e])},py=p.createContext(),AN={},my=function(e){var t=e.theme,n=t===void 0?AN:t,r=e.children,a=kN(n);return y.jsx(py.Provider,{value:a,children:r})};my.propTypes={children:E.node.isRequired,theme:E.object};var St=function(){return p.useContext(py)},MN=["outlineWidth","outlineColor","outlineOpacity"],gy=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,xf(e,MN)},vy=function(e){var t=e.children,n=e.condition,r=e.wrapper;return n?p.cloneElement(r,{},t):t};vy.propTypes={children:E.node.isRequired,condition:E.bool.isRequired,wrapper:E.element.isRequired};var $N={position:"relative"},by=function(e){var t=e.children,n=e.theme,r=e.renderWrapper,a=r===void 0||r,i=e.isInteractive,s=i===void 0||i,o=e.animate,c=e.motionConfig,u=p.useRef(null);return y.jsx(my,{theme:n,children:y.jsx(dy,{animate:o,config:c,children:y.jsx(X8,{container:u,children:y.jsxs(vy,{condition:a,wrapper:y.jsx("div",{style:$N,ref:u}),children:[t,s&&y.jsx(K8,{})]})})})})};by.propTypes={children:E.element.isRequired,isInteractive:E.bool,renderWrapper:E.bool,theme:E.object,animate:E.bool,motionConfig:E.string};E.func.isRequired,E.bool,E.bool,E.object.isRequired,E.bool.isRequired,E.string;var yy=function(e){var t=e.children,n=fy(),r=n[0],a=n[1],i=a.width>0&&a.height>0;return y.jsx("div",{ref:r,style:{width:"100%",height:"100%"},children:i&&t({width:a.width,height:a.height})})};yy.propTypes={children:E.func.isRequired};var jN=["id","colors"],_y=function(e){var t=e.id,n=e.colors,r=xf(e,jN);return y.jsx("linearGradient",Ft({id:t,x1:0,x2:0,y1:0,y2:1},r,{children:n.map(function(a){var i=a.offset,s=a.color,o=a.opacity;return y.jsx("stop",{offset:i+"%",stopColor:s,stopOpacity:o!==void 0?o:1},i)})}))};_y.propTypes={id:E.string.isRequired,colors:E.arrayOf(E.shape({offset:E.number.isRequired,color:E.string.isRequired,opacity:E.number})).isRequired,gradientTransform:E.string};var xy={linearGradient:_y},Ba={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},Bl=p.memo(function(e){var t=e.id,n=e.background,r=n===void 0?Ba.background:n,a=e.color,i=a===void 0?Ba.color:a,s=e.size,o=s===void 0?Ba.size:s,c=e.padding,u=c===void 0?Ba.padding:c,l=e.stagger,d=l===void 0?Ba.stagger:l,f=o+u,m=o/2,g=u/2;return d===!0&&(f=2*o+2*u),y.jsxs("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:f,height:f,fill:r}),y.jsx("circle",{cx:g+m,cy:g+m,r:m,fill:i}),d&&y.jsx("circle",{cx:1.5*u+o+m,cy:1.5*u+o+m,r:m,fill:i})]})});Bl.displayName="PatternDots",Bl.propTypes={id:E.string.isRequired,color:E.string.isRequired,background:E.string.isRequired,size:E.number.isRequired,padding:E.number.isRequired,stagger:E.bool.isRequired};var fn=function(e){return e*Math.PI/180},Tf=function(e){return 180*e/Math.PI},PN=function(e){return e.startAngle+(e.endAngle-e.startAngle)/2},Hr=function(e,t){return{x:Math.cos(e)*t,y:Math.sin(e)*t}},Wa={spacing:5,rotation:0,background:"#000000",color:"#ffffff",lineWidth:2},Wl=p.memo(function(e){var t=e.id,n=e.spacing,r=n===void 0?Wa.spacing:n,a=e.rotation,i=a===void 0?Wa.rotation:a,s=e.background,o=s===void 0?Wa.background:s,c=e.color,u=c===void 0?Wa.color:c,l=e.lineWidth,d=l===void 0?Wa.lineWidth:l,f=Math.round(i)%360,m=Math.abs(r);f>180?f-=360:f>90?f-=180:f<-180?f+=360:f<-90&&(f+=180);var g,v=m,h=m;return f===0?g=`
|
|
254
254
|
M 0 0 L `+v+` 0
|
|
255
255
|
M 0 `+h+" L "+v+" "+h+`
|
|
256
256
|
`:f===90?g=`
|
|
@@ -264,16 +264,16 @@ to {
|
|
|
264
264
|
M `+-v+" "+h+" L "+v+" "+-h+`
|
|
265
265
|
M `+-v+" "+2*h+" L "+2*v+" "+-h+`
|
|
266
266
|
M 0 `+2*h+" L "+2*v+` 0
|
|
267
|
-
`),y.jsxs("pattern",{id:t,width:v,height:h,patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:v,height:h,fill:o,stroke:"rgba(255, 0, 0, 0.1)",strokeWidth:0}),y.jsx("path",{d:g,strokeWidth:d,stroke:u,strokeLinecap:"square"})]})});Wl.displayName="PatternLines",Wl.propTypes={id:E.string.isRequired,spacing:E.number.isRequired,rotation:E.number.isRequired,background:E.string.isRequired,color:E.string.isRequired,lineWidth:E.number.isRequired};var qa={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},ql=p.memo(function(e){var t=e.id,n=e.color,r=n===void 0?qa.color:n,a=e.background,i=a===void 0?qa.background:a,s=e.size,o=s===void 0?qa.size:s,c=e.padding,u=c===void 0?qa.padding:c,l=e.stagger,d=l===void 0?qa.stagger:l,f=o+u,m=u/2;return d===!0&&(f=2*o+2*u),y.jsxs("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:f,height:f,fill:i}),y.jsx("rect",{x:m,y:m,width:o,height:o,fill:r}),d&&y.jsx("rect",{x:1.5*u+o,y:1.5*u+o,width:o,height:o,fill:r})]})});ql.displayName="PatternSquares",ql.propTypes={id:E.string.isRequired,color:E.string.isRequired,background:E.string.isRequired,size:E.number.isRequired,padding:E.number.isRequired,stagger:E.bool.isRequired};var
|
|
268
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Dy={nivo:["#e8c1a0","#f47560","#f1e15b","#e8a838","#61cdbb","#97e3d5"],category10:zb,accent:Bb,dark2:Wb,paired:qb,pastel1:Hb,pastel2:Vb,set1:Yb,set2:Zb,set3:xf,tableau10:w$},qD=Object.keys(Dy),Fy={brown_blueGreen:mc,purpleRed_green:gc,pink_yellowGreen:vc,purple_orange:bc,red_blue:yc,red_grey:_c,red_yellow_blue:xc,red_yellow_green:wc,spectral:Tc},HD=Object.keys(Fy),VD={brown_blueGreen:T$,purpleRed_green:O$,pink_yellowGreen:C$,purple_orange:E$,red_blue:S$,red_grey:k$,red_yellow_blue:R$,red_yellow_green:A$,spectral:M$},Ly={blues:Nc,greens:Dc,greys:Fc,oranges:zc,purples:Lc,reds:Uc,blue_green:Oc,blue_purple:Cc,green_blue:Ec,orange_red:Sc,purple_blue_green:kc,purple_blue:Rc,purple_red:Ac,red_purple:Mc,yellow_green_blue:$c,yellow_green:jc,yellow_orange_brown:Pc,yellow_orange_red:Ic},YD=Object.keys(Ly),ZD={blues:q$,greens:H$,greys:V$,oranges:G$,purples:Y$,reds:Z$,turbo:aj,viridis:ij,inferno:oj,magma:sj,plasma:cj,cividis:K$,warm:J$,cool:Q$,cubehelixDefault:X$,blue_green:$$,blue_purple:j$,green_blue:P$,orange_red:I$,purple_blue_green:N$,purple_blue:D$,purple_red:F$,red_purple:L$,yellow_green_blue:U$,yellow_green:z$,yellow_orange_brown:B$,yellow_orange_red:W$},Lu=To({},Dy,Fy,Ly),GD=function(e){return qD.includes(e)},KD=function(e){return HD.includes(e)},XD=function(e){return YD.includes(e)},JD={rainbow:ej,sinebow:rj};To({},VD,ZD,JD);var QD=function(e,t){if(typeof e=="function")return e;if(af(e)){if(function(c){return c.theme!==void 0}(e)){if(t===void 0)throw new Error("Unable to use color from theme as no theme was provided");var n=bn(t,e.theme);if(n===void 0)throw new Error("Color from theme is undefined at path: '"+e.theme+"'");return function(){return n}}if(function(c){return c.from!==void 0}(e)){var r=function(c){return bn(c,e.from)};if(Array.isArray(e.modifiers)){for(var a,i=[],s=function(){var c=a.value,u=c[0],l=c[1];if(u==="brighter")i.push(function(d){return d.brighter(l)});else if(u==="darker")i.push(function(d){return d.darker(l)});else{if(u!=="opacity")throw new Error("Invalid color modifier: '"+u+"', must be one of: 'brighter', 'darker', 'opacity'");i.push(function(d){return d.opacity=l,d})}},o=WD(e.modifiers);!(a=o()).done;)s();return i.length===0?r:function(c){return i.reduce(function(u,l){return l(u)},ra(r(c))).toString()}}return r}throw new Error("Invalid color spec, you should either specify 'theme' or 'from' when using a config object")}return function(){return e}},Oo=function(e,t){return p.useMemo(function(){return QD(e,t)},[e,t])};E.oneOfType([E.string,E.func,E.shape({theme:E.string.isRequired}),E.shape({from:E.string.isRequired,modifiers:E.arrayOf(E.array)})]);var eF=function(e,t){if(typeof e=="function")return e;var n=function(d){return bn(d,t)};if(Array.isArray(e)){var r=Fr(e),a=function(d){return r(n(d))};return a.scale=r,a}if(af(e)){if(function(d){return d.datum!==void 0}(e))return function(d){return bn(d,e.datum)};if(function(d){return d.scheme!==void 0}(e)){if(GD(e.scheme)){var i=Fr(Lu[e.scheme]),s=function(d){return i(n(d))};return s.scale=i,s}if(KD(e.scheme)){if(e.size!==void 0&&(e.size<3||e.size>11))throw new Error("Invalid size '"+e.size+"' for diverging color scheme '"+e.scheme+"', must be between 3~11");var o=Fr(Lu[e.scheme][e.size||11]),c=function(d){return o(n(d))};return c.scale=o,c}if(XD(e.scheme)){if(e.size!==void 0&&(e.size<3||e.size>9))throw new Error("Invalid size '"+e.size+"' for sequential color scheme '"+e.scheme+"', must be between 3~9");var u=Fr(Lu[e.scheme][e.size||9]),l=function(d){return u(n(d))};return l.scale=u,l}}throw new Error("Invalid colors, when using an object, you should either pass a 'datum' or a 'scheme' property")}return function(){return e}},tF=function(e,t){return p.useMemo(function(){return eF(e,t)},[e,t])};function Fe(){return Fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fe.apply(this,arguments)}var nF={pointerEvents:"none"},rF=function(e){var t=e.label,n=e.style,r=St();return y.jsx(dn.g,{transform:n.transform,opacity:n.progress,style:nF,children:y.jsx(dn.text,{textAnchor:"middle",dominantBaseline:"central",style:Fe({},r.labels.text,{fill:n.textColor}),children:t})})},Uy=function(e){var t=e%(2*Math.PI);return t<0&&(t+=2*Math.PI),t},aF=function(e,t){return e.filter(function(n){return Math.abs(kf(n.arc.endAngle-n.arc.startAngle))>=t})},iF={startAngle:{enter:function(e){return Fe({},e,{endAngle:e.startAngle})},update:function(e){return e},leave:function(e){return Fe({},e,{startAngle:e.endAngle})}},middleAngle:{enter:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return Fe({},e,{startAngle:t,endAngle:t})},update:function(e){return e},leave:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return Fe({},e,{startAngle:t,endAngle:t})}},endAngle:{enter:function(e){return Fe({},e,{startAngle:e.endAngle})},update:function(e){return e},leave:function(e){return Fe({},e,{endAngle:e.startAngle})}},innerRadius:{enter:function(e){return Fe({},e,{outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return Fe({},e,{innerRadius:e.outerRadius})}},centerRadius:{enter:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return Fe({},e,{innerRadius:t,outerRadius:t})},update:function(e){return e},leave:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return Fe({},e,{innerRadius:t,outerRadius:t})}},outerRadius:{enter:function(e){return Fe({},e,{innerRadius:e.outerRadius})},update:function(e){return e},leave:function(e){return Fe({},e,{outerRadius:e.innerRadius})}},pushIn:{enter:function(e){return Fe({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return Fe({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})}},pushOut:{enter:function(e){return Fe({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})},update:function(e){return e},leave:function(e){return Fe({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})}}},zy=function(e,t){return p.useMemo(function(){var n=iF[e];return{enter:function(r){return Fe({progress:0},n.enter(r.arc),t?t.enter(r):{})},update:function(r){return Fe({progress:1},n.update(r.arc),t?t.update(r):{})},leave:function(r){return Fe({progress:0},n.leave(r.arc),t?t.leave(r):{})}}},[e,t])},sF=function(e,t){var n=jD(e)-Math.PI/2,r=e.innerRadius+(e.outerRadius-e.innerRadius)*t;return Hr(n,r)},oF=function(e){return function(t,n,r,a){return Vi([t,n,r,a],function(i,s,o,c){var u=sF({startAngle:i,endAngle:s,innerRadius:o,outerRadius:c},e);return"translate("+u.x+","+u.y+")"})}},cF=function(e,t,n,r){t===void 0&&(t=.5),n===void 0&&(n="innerRadius");var a=va(),i=a.animate,s=a.config,o=zy(n,r);return{transition:Xd(e,{keys:function(c){return c.id},initial:o.update,from:o.enter,enter:o.update,update:o.update,leave:o.leave,config:s,immediate:!i}),interpolate:oF(t)}},uF=function(e){var t=e.center,n=e.data,r=e.transitionMode,a=e.label,i=e.radiusOffset,s=e.skipAngle,o=e.textColor,c=e.component,u=c===void 0?rF:c,l=wo(a),d=St(),f=Oo(o,d),m=p.useMemo(function(){return n.filter(function(x){return Math.abs(kf(x.arc.endAngle-x.arc.startAngle))>=s})},[n,s]),g=cF(m,i,r),v=g.transition,h=g.interpolate,w=u;return y.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:v(function(x,b){return p.createElement(w,{key:b.id,datum:b,label:l(b),style:Fe({},x,{transform:h(x.startAngle,x.endAngle,x.innerRadius,x.outerRadius),textColor:f(b)})})})})},lF=function(e){var t=e.label,n=e.style,r=St();return y.jsxs(dn.g,{opacity:n.opacity,children:[y.jsx(dn.path,{fill:"none",stroke:n.linkColor,strokeWidth:n.thickness,d:n.path}),y.jsx(dn.text,{transform:n.textPosition,textAnchor:n.textAnchor,dominantBaseline:"central",style:Fe({},r.labels.text,{fill:n.textColor}),children:t})]})},dF=function(e){var t=Uy(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2);return t<Math.PI/2||t>1.5*Math.PI?"start":"end"},By=function(e,t,n,r){var a,i,s=Uy(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2),o=Hr(s,e.outerRadius+t),c=Hr(s,e.outerRadius+t+n);return s<Math.PI/2||s>1.5*Math.PI?(a="after",i={x:c.x+r,y:c.y}):(a="before",i={x:c.x-r,y:c.y}),{side:a,points:[o,c,i]}},fF=cP().x(function(e){return e.x}).y(function(e){return e.y}),hF=function(e,t,n,r,a,i,s){return Vi([e,t,n,r,a,i,s],function(o,c,u,l,d,f,m){var g=By({startAngle:o,endAngle:c,innerRadius:u,outerRadius:l},d,f,m).points;return fF(g)})},pF=function(e,t,n,r){return Vi([e,t,n,r],function(a,i,s,o){return dF({startAngle:a,endAngle:i,innerRadius:s,outerRadius:o})})},mF=function(e,t,n,r,a,i,s,o){return Vi([e,t,n,r,a,i,s,o],function(c,u,l,d,f,m,g,v){var h=By({startAngle:c,endAngle:u,innerRadius:l,outerRadius:d},f,m,g),w=h.points,x=h.side,b=w[2];return x==="before"?b.x-=v:b.x+=v,"translate("+b.x+","+b.y+")"})},gF=function(e){var t=e.data,n=e.offset,r=n===void 0?0:n,a=e.diagonalLength,i=e.straightLength,s=e.skipAngle,o=s===void 0?0:s,c=e.textOffset,u=e.linkColor,l=e.textColor,d=va(),f=d.animate,m=d.config,g=St(),v=Oo(u,g),h=Oo(l,g),w=function(b,T){return p.useMemo(function(){return aF(b,T)},[b,T])}(t,o),x=function(b){var T=b.offset,_=b.diagonalLength,S=b.straightLength,$=b.textOffset,D=b.getLinkColor,I=b.getTextColor;return p.useMemo(function(){return{enter:function(M){return{startAngle:M.arc.startAngle,endAngle:M.arc.endAngle,innerRadius:M.arc.innerRadius,outerRadius:M.arc.outerRadius,offset:T,diagonalLength:0,straightLength:0,textOffset:$,linkColor:D(M),textColor:I(M),opacity:0}},update:function(M){return{startAngle:M.arc.startAngle,endAngle:M.arc.endAngle,innerRadius:M.arc.innerRadius,outerRadius:M.arc.outerRadius,offset:T,diagonalLength:_,straightLength:S,textOffset:$,linkColor:D(M),textColor:I(M),opacity:1}},leave:function(M){return{startAngle:M.arc.startAngle,endAngle:M.arc.endAngle,innerRadius:M.arc.innerRadius,outerRadius:M.arc.outerRadius,offset:T,diagonalLength:0,straightLength:0,textOffset:$,linkColor:D(M),textColor:I(M),opacity:0}}}},[_,S,$,D,I,T])}({offset:r,diagonalLength:a,straightLength:i,textOffset:c,getLinkColor:v,getTextColor:h});return{transition:Xd(w,{keys:function(b){return b.id},initial:x.update,from:x.enter,enter:x.update,update:x.update,leave:x.leave,config:m,immediate:!f}),interpolateLink:hF,interpolateTextAnchor:pF,interpolateTextPosition:mF}},vF=function(e){var t=e.center,n=e.data,r=e.label,a=e.skipAngle,i=e.offset,s=e.diagonalLength,o=e.straightLength,c=e.strokeWidth,u=e.textOffset,l=e.textColor,d=e.linkColor,f=e.component,m=f===void 0?lF:f,g=wo(r),v=gF({data:n,skipAngle:a,offset:i,diagonalLength:s,straightLength:o,textOffset:u,linkColor:d,textColor:l}),h=v.transition,w=v.interpolateLink,x=v.interpolateTextAnchor,b=v.interpolateTextPosition,T=m;return y.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:h(function(_,S){return p.createElement(T,{key:S.id,datum:S,label:g(S),style:Fe({},_,{thickness:c,path:w(_.startAngle,_.endAngle,_.innerRadius,_.outerRadius,_.offset,_.diagonalLength,_.straightLength),textAnchor:x(_.startAngle,_.endAngle,_.innerRadius,_.outerRadius),textPosition:b(_.startAngle,_.endAngle,_.innerRadius,_.outerRadius,_.offset,_.diagonalLength,_.straightLength,_.textOffset)})})})})},bF=function(e){var t=e.datum,n=e.style,r=e.onClick,a=e.onMouseEnter,i=e.onMouseMove,s=e.onMouseLeave,o=p.useCallback(function(d){return r==null?void 0:r(t,d)},[r,t]),c=p.useCallback(function(d){return a==null?void 0:a(t,d)},[a,t]),u=p.useCallback(function(d){return i==null?void 0:i(t,d)},[i,t]),l=p.useCallback(function(d){return s==null?void 0:s(t,d)},[s,t]);return y.jsx(dn.path,{d:n.path,opacity:n.opacity,fill:t.fill||n.color,stroke:n.borderColor,strokeWidth:n.borderWidth,onClick:r?o:void 0,onMouseEnter:a?c:void 0,onMouseMove:i?u:void 0,onMouseLeave:s?l:void 0})},yF=function(e,t,n,r,a){return Vi([e,t,n,r],function(i,s,o,c){return a({startAngle:i,endAngle:s,innerRadius:Math.max(0,o),outerRadius:Math.max(0,c)})})},_F=function(e,t,n){t===void 0&&(t="innerRadius");var r=va(),a=r.animate,i=r.config,s=zy(t,n);return{transition:Xd(e,{keys:function(o){return o.id},initial:s.update,from:s.enter,enter:s.update,update:s.update,leave:s.leave,config:i,immediate:!a}),interpolate:yF}},xF=function(e){var t=e.center,n=e.data,r=e.arcGenerator,a=e.borderWidth,i=e.borderColor,s=e.onClick,o=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,l=e.transitionMode,d=e.component,f=d===void 0?bF:d,m=St(),g=Oo(i,m),v=_F(n,l,{enter:function(b){return{opacity:0,color:b.color,borderColor:g(b)}},update:function(b){return{opacity:1,color:b.color,borderColor:g(b)}},leave:function(b){return{opacity:0,color:b.color,borderColor:g(b)}}}),h=v.transition,w=v.interpolate,x=f;return y.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:h(function(b,T){return p.createElement(x,{key:T.id,datum:T,style:Fe({},b,{borderWidth:a,path:w(b.startAngle,b.endAngle,b.innerRadius,b.outerRadius,r)}),onClick:s,onMouseEnter:o,onMouseMove:c,onMouseLeave:u})})})},wF=function(e,t,n,r,a,i){i===void 0&&(i=!0);var s=[],o=Hr(fn(r),n);s.push([o.x,o.y]);var c=Hr(fn(a),n);s.push([c.x,c.y]);for(var u=Math.round(Math.min(r,a));u<=Math.round(Math.max(r,a));u++)if(u%90==0){var l=Hr(fn(u),n);s.push([l.x,l.y])}s=s.map(function(h){var w=h[0],x=h[1];return[e+w,t+x]}),i&&s.push([e,t]);var d=s.map(function(h){return h[0]}),f=s.map(function(h){return h[1]}),m=Math.min.apply(Math,d),g=Math.max.apply(Math,d),v=Math.min.apply(Math,f);return{points:s,x:m,y:v,width:g-m,height:Math.max.apply(Math,f)-v}},TF=function(e){var t=e===void 0?{}:e,n=t.cornerRadius,r=n===void 0?0:n,a=t.padAngle,i=a===void 0?0:a;return p.useMemo(function(){return iP().innerRadius(function(s){return s.innerRadius}).outerRadius(function(s){return s.outerRadius}).cornerRadius(r).padAngle(i)},[r,i])},OF=function(e){var t=e.x,n=e.y,r=e.size,a=e.fill,i=e.opacity,s=i===void 0?1:i,o=e.borderWidth,c=o===void 0?0:o,u=e.borderColor;return y.jsx("circle",{r:r/2,cx:t+r/2,cy:n+r/2,fill:a,opacity:s,strokeWidth:c,stroke:u===void 0?"transparent":u,style:{pointerEvents:"none"}})},CF=function(e){var t=e.x,n=e.y,r=e.size,a=e.fill,i=e.opacity,s=i===void 0?1:i,o=e.borderWidth,c=o===void 0?0:o,u=e.borderColor;return y.jsx("g",{transform:"translate("+t+","+n+")",children:y.jsx("path",{d:`
|
|
267
|
+
`),y.jsxs("pattern",{id:t,width:v,height:h,patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:v,height:h,fill:o,stroke:"rgba(255, 0, 0, 0.1)",strokeWidth:0}),y.jsx("path",{d:g,strokeWidth:d,stroke:u,strokeLinecap:"square"})]})});Wl.displayName="PatternLines",Wl.propTypes={id:E.string.isRequired,spacing:E.number.isRequired,rotation:E.number.isRequired,background:E.string.isRequired,color:E.string.isRequired,lineWidth:E.number.isRequired};var qa={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},ql=p.memo(function(e){var t=e.id,n=e.color,r=n===void 0?qa.color:n,a=e.background,i=a===void 0?qa.background:a,s=e.size,o=s===void 0?qa.size:s,c=e.padding,u=c===void 0?qa.padding:c,l=e.stagger,d=l===void 0?qa.stagger:l,f=o+u,m=u/2;return d===!0&&(f=2*o+2*u),y.jsxs("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:f,height:f,fill:i}),y.jsx("rect",{x:m,y:m,width:o,height:o,fill:r}),d&&y.jsx("rect",{x:1.5*u+o,y:1.5*u+o,width:o,height:o,fill:r})]})});ql.displayName="PatternSquares",ql.propTypes={id:E.string.isRequired,color:E.string.isRequired,background:E.string.isRequired,size:E.number.isRequired,padding:E.number.isRequired,stagger:E.bool.isRequired};var wy={patternDots:Bl,patternLines:Wl,patternSquares:ql},IN=["type"],Hl=Ft({},xy,wy),Ty=function(e){var t=e.defs;return!t||t.length<1?null:y.jsx("defs",{"aria-hidden":!0,children:t.map(function(n){var r=n.type,a=xf(n,IN);return Hl[r]?p.createElement(Hl[r],Ft({key:a.id},a)):null})})};Ty.propTypes={defs:E.arrayOf(E.shape({type:E.oneOf(Object.keys(Hl)).isRequired,id:E.string.isRequired}))};var NN=p.memo(Ty),Oy=function(e){var t=e.width,n=e.height,r=e.margin,a=e.defs,i=e.children,s=e.role,o=e.ariaLabel,c=e.ariaLabelledBy,u=e.ariaDescribedBy,l=e.isFocusable,d=St();return y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,role:s,"aria-label":o,"aria-labelledby":c,"aria-describedby":u,focusable:l,tabIndex:l?0:void 0,children:[y.jsx(NN,{defs:a}),y.jsx("rect",{width:t,height:n,fill:d.background}),y.jsx("g",{transform:"translate("+r.left+","+r.top+")",children:i})]})};Oy.propTypes={width:E.number.isRequired,height:E.number.isRequired,margin:E.shape({top:E.number.isRequired,left:E.number.isRequired}).isRequired,defs:E.array,children:E.oneOfType([E.arrayOf(E.node),E.node]).isRequired,role:E.string,isFocusable:E.bool,ariaLabel:E.string,ariaLabelledBy:E.string,ariaDescribedBy:E.string};var Cy=function(e){var t=e.size,n=e.color,r=e.borderWidth,a=e.borderColor;return y.jsx("circle",{r:t/2,fill:n,stroke:a,strokeWidth:r,style:{pointerEvents:"none"}})};Cy.propTypes={size:E.number.isRequired,color:E.string.isRequired,borderWidth:E.number.isRequired,borderColor:E.string.isRequired};var DN=p.memo(Cy),Ey=function(e){var t=e.x,n=e.y,r=e.symbol,a=r===void 0?DN:r,i=e.size,s=e.datum,o=e.color,c=e.borderWidth,u=e.borderColor,l=e.label,d=e.labelTextAnchor,f=d===void 0?"middle":d,m=e.labelYOffset,g=m===void 0?-12:m,v=St(),h=va(),w=h.animate,x=h.config,b=Hd({transform:"translate("+t+", "+n+")",config:x,immediate:!w});return y.jsxs(dn.g,{transform:b.transform,style:{pointerEvents:"none"},children:[p.createElement(a,{size:i,color:o,datum:s,borderWidth:c,borderColor:u}),l&&y.jsx("text",{textAnchor:f,y:g,style:gy(v.dots.text),children:l})]})};Ey.propTypes={x:E.number.isRequired,y:E.number.isRequired,datum:E.object.isRequired,size:E.number.isRequired,color:E.string.isRequired,borderWidth:E.number.isRequired,borderColor:E.string.isRequired,symbol:E.oneOfType([E.func,E.object]),label:E.oneOfType([E.string,E.number]),labelTextAnchor:E.oneOf(["start","middle","end"]),labelYOffset:E.number};p.memo(Ey);var Sy=function(e){var t=e.width,n=e.height,r=e.axis,a=e.scale,i=e.value,s=e.lineStyle,o=e.textStyle,c=e.legend,u=e.legendPosition,l=u===void 0?"top-right":u,d=e.legendOffsetX,f=d===void 0?14:d,m=e.legendOffsetY,g=m===void 0?14:m,v=e.legendOrientation,h=v===void 0?"horizontal":v,w=St(),x=0,b=0,T=0,_=0;r==="y"?(T=a(i),b=t):(x=a(i),_=n);var S=null;if(c){var $=function(D){var I=D.axis,M=D.width,k=D.height,Y=D.position,A=D.offsetX,R=D.offsetY,F=D.orientation,B=0,L=0,G=F==="vertical"?-90:0,Z="start";if(I==="x")switch(Y){case"top-left":B=-A,L=R,Z="end";break;case"top":L=-R,Z=F==="horizontal"?"middle":"start";break;case"top-right":B=A,L=R,Z=F==="horizontal"?"start":"end";break;case"right":B=A,L=k/2,Z=F==="horizontal"?"start":"middle";break;case"bottom-right":B=A,L=k-R,Z="start";break;case"bottom":L=k+R,Z=F==="horizontal"?"middle":"end";break;case"bottom-left":L=k-R,B=-A,Z=F==="horizontal"?"end":"start";break;case"left":B=-A,L=k/2,Z=F==="horizontal"?"end":"middle"}else switch(Y){case"top-left":B=A,L=-R,Z="start";break;case"top":B=M/2,L=-R,Z=F==="horizontal"?"middle":"start";break;case"top-right":B=M-A,L=-R,Z=F==="horizontal"?"end":"start";break;case"right":B=M+A,Z=F==="horizontal"?"start":"middle";break;case"bottom-right":B=M-A,L=R,Z="end";break;case"bottom":B=M/2,L=R,Z=F==="horizontal"?"middle":"end";break;case"bottom-left":B=A,L=R,Z=F==="horizontal"?"start":"end";break;case"left":B=-A,Z=F==="horizontal"?"end":"middle"}return{x:B,y:L,rotation:G,textAnchor:Z}}({axis:r,width:t,height:n,position:l,offsetX:f,offsetY:g,orientation:h});S=y.jsx("text",{transform:"translate("+$.x+", "+$.y+") rotate("+$.rotation+")",textAnchor:$.textAnchor,dominantBaseline:"central",style:o,children:c})}return y.jsxs("g",{transform:"translate("+x+", "+T+")",children:[y.jsx("line",{x1:0,x2:b,y1:0,y2:_,stroke:w.markers.lineColor,strokeWidth:w.markers.lineStrokeWidth,style:s}),S]})};Sy.propTypes={width:E.number.isRequired,height:E.number.isRequired,axis:E.oneOf(["x","y"]).isRequired,scale:E.func.isRequired,value:E.oneOfType([E.number,E.string,E.instanceOf(Date)]).isRequired,lineStyle:E.object,textStyle:E.object,legend:E.string,legendPosition:E.oneOf(["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"]),legendOffsetX:E.number.isRequired,legendOffsetY:E.number.isRequired,legendOrientation:E.oneOf(["horizontal","vertical"]).isRequired};var FN=p.memo(Sy),ky=function(e){var t=e.markers,n=e.width,r=e.height,a=e.xScale,i=e.yScale;return t&&t.length!==0?t.map(function(s,o){return y.jsx(FN,Ft({},s,{width:n,height:r,scale:s.axis==="y"?i:a}),o)}):null};ky.propTypes={width:E.number.isRequired,height:E.number.isRequired,xScale:E.func.isRequired,yScale:E.func.isRequired,markers:E.arrayOf(E.shape({axis:E.oneOf(["x","y"]).isRequired,value:E.oneOfType([E.number,E.string,E.instanceOf(Date)]).isRequired,lineStyle:E.object,textStyle:E.object}))};p.memo(ky);var LN=function(e){return Hv(e)?e:function(t){return bn(t,e)}},wo=function(e){return p.useMemo(function(){return LN(e)},[e])},UN=Object.keys(xy),zN=Object.keys(wy),BN=function(e,t,n){if(e==="*")return!0;if(Hv(e))return e(t);if(Qd(e)){var r=n?bn(t,n):t;return vN(yP(r,Object.keys(e)),e)}return!1},WN=function(e,t,n,r){var a={},i=a.dataKey,s=a.colorKey,o=s===void 0?"color":s,c=a.targetKey,u=c===void 0?"fill":c,l=[],d={};return e.length&&t.length&&(l=[].concat(e),t.forEach(function(f){for(var m=function(){var v=n[g],h=v.id,w=v.match;if(BN(w,f,i)){var x=e.find(function(M){return M.id===h});if(x){if(zN.includes(x.type))if(x.background==="inherit"||x.color==="inherit"){var b=bn(f,o),T=x.background,_=x.color,S=h;x.background==="inherit"&&(S=S+".bg."+b,T=b),x.color==="inherit"&&(S=S+".fg."+b,_=b),Ga(f,u,"url(#"+S+")"),d[S]||(l.push(Ft({},x,{id:S,background:T,color:_})),d[S]=1)}else Ga(f,u,"url(#"+h+")");else if(UN.includes(x.type))if(x.colors.map(function(M){return M.color}).includes("inherit")){var $=bn(f,o),D=h,I=Ft({},x,{colors:x.colors.map(function(M,k){return M.color!=="inherit"?M:(D=D+"."+k+"."+$,Ft({},M,{color:M.color==="inherit"?$:M.color}))})});I.id=D,Ga(f,u,"url(#"+D+")"),d[D]||(l.push(I),d[D]=1)}else Ga(f,u,"url(#"+h+")")}return"break"}},g=0;g<n.length&&m()!=="break";g++);})),l};function To(){return To=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},To.apply(this,arguments)}function Rm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qN(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(a,i){if(a){if(typeof a=="string")return Rm(a,i);var s=Object.prototype.toString.call(a).slice(8,-1);return s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set"?Array.from(a):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?Rm(a,i):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
268
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ry={nivo:["#e8c1a0","#f47560","#f1e15b","#e8a838","#61cdbb","#97e3d5"],category10:jb,accent:Pb,dark2:Ib,paired:Nb,pastel1:Db,pastel2:Fb,set1:Lb,set2:Ub,set3:gf,tableau10:TM},HN=Object.keys(Ry),Ay={brown_blueGreen:mc,purpleRed_green:gc,pink_yellowGreen:vc,purple_orange:bc,red_blue:yc,red_grey:_c,red_yellow_blue:xc,red_yellow_green:wc,spectral:Tc},VN=Object.keys(Ay),YN={brown_blueGreen:OM,purpleRed_green:CM,pink_yellowGreen:EM,purple_orange:SM,red_blue:kM,red_grey:RM,red_yellow_blue:AM,red_yellow_green:MM,spectral:$M},My={blues:Nc,greens:Dc,greys:Fc,oranges:zc,purples:Lc,reds:Uc,blue_green:Oc,blue_purple:Cc,green_blue:Ec,orange_red:Sc,purple_blue_green:kc,purple_blue:Rc,purple_red:Ac,red_purple:Mc,yellow_green_blue:$c,yellow_green:jc,yellow_orange_brown:Pc,yellow_orange_red:Ic},ZN=Object.keys(My),GN={blues:HM,greens:VM,greys:YM,oranges:KM,purples:ZM,reds:GM,turbo:i$,viridis:s$,inferno:c$,magma:o$,plasma:u$,cividis:XM,warm:QM,cool:e$,cubehelixDefault:JM,blue_green:jM,blue_purple:PM,green_blue:IM,orange_red:NM,purple_blue_green:DM,purple_blue:FM,purple_red:LM,red_purple:UM,yellow_green_blue:zM,yellow_green:BM,yellow_orange_brown:WM,yellow_orange_red:qM},Fu=To({},Ry,Ay,My),KN=function(e){return HN.includes(e)},XN=function(e){return VN.includes(e)},JN=function(e){return ZN.includes(e)},QN={rainbow:t$,sinebow:a$};To({},YN,GN,QN);var eD=function(e,t){if(typeof e=="function")return e;if(Qd(e)){if(function(c){return c.theme!==void 0}(e)){if(t===void 0)throw new Error("Unable to use color from theme as no theme was provided");var n=bn(t,e.theme);if(n===void 0)throw new Error("Color from theme is undefined at path: '"+e.theme+"'");return function(){return n}}if(function(c){return c.from!==void 0}(e)){var r=function(c){return bn(c,e.from)};if(Array.isArray(e.modifiers)){for(var a,i=[],s=function(){var c=a.value,u=c[0],l=c[1];if(u==="brighter")i.push(function(d){return d.brighter(l)});else if(u==="darker")i.push(function(d){return d.darker(l)});else{if(u!=="opacity")throw new Error("Invalid color modifier: '"+u+"', must be one of: 'brighter', 'darker', 'opacity'");i.push(function(d){return d.opacity=l,d})}},o=qN(e.modifiers);!(a=o()).done;)s();return i.length===0?r:function(c){return i.reduce(function(u,l){return l(u)},ra(r(c))).toString()}}return r}throw new Error("Invalid color spec, you should either specify 'theme' or 'from' when using a config object")}return function(){return e}},Oo=function(e,t){return p.useMemo(function(){return eD(e,t)},[e,t])};E.oneOfType([E.string,E.func,E.shape({theme:E.string.isRequired}),E.shape({from:E.string.isRequired,modifiers:E.arrayOf(E.array)})]);var tD=function(e,t){if(typeof e=="function")return e;var n=function(d){return bn(d,t)};if(Array.isArray(e)){var r=Fr(e),a=function(d){return r(n(d))};return a.scale=r,a}if(Qd(e)){if(function(d){return d.datum!==void 0}(e))return function(d){return bn(d,e.datum)};if(function(d){return d.scheme!==void 0}(e)){if(KN(e.scheme)){var i=Fr(Fu[e.scheme]),s=function(d){return i(n(d))};return s.scale=i,s}if(XN(e.scheme)){if(e.size!==void 0&&(e.size<3||e.size>11))throw new Error("Invalid size '"+e.size+"' for diverging color scheme '"+e.scheme+"', must be between 3~11");var o=Fr(Fu[e.scheme][e.size||11]),c=function(d){return o(n(d))};return c.scale=o,c}if(JN(e.scheme)){if(e.size!==void 0&&(e.size<3||e.size>9))throw new Error("Invalid size '"+e.size+"' for sequential color scheme '"+e.scheme+"', must be between 3~9");var u=Fr(Fu[e.scheme][e.size||9]),l=function(d){return u(n(d))};return l.scale=u,l}}throw new Error("Invalid colors, when using an object, you should either pass a 'datum' or a 'scheme' property")}return function(){return e}},nD=function(e,t){return p.useMemo(function(){return tD(e,t)},[e,t])};function Fe(){return Fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fe.apply(this,arguments)}var rD={pointerEvents:"none"},aD=function(e){var t=e.label,n=e.style,r=St();return y.jsx(dn.g,{transform:n.transform,opacity:n.progress,style:rD,children:y.jsx(dn.text,{textAnchor:"middle",dominantBaseline:"central",style:Fe({},r.labels.text,{fill:n.textColor}),children:t})})},$y=function(e){var t=e%(2*Math.PI);return t<0&&(t+=2*Math.PI),t},iD=function(e,t){return e.filter(function(n){return Math.abs(Tf(n.arc.endAngle-n.arc.startAngle))>=t})},sD={startAngle:{enter:function(e){return Fe({},e,{endAngle:e.startAngle})},update:function(e){return e},leave:function(e){return Fe({},e,{startAngle:e.endAngle})}},middleAngle:{enter:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return Fe({},e,{startAngle:t,endAngle:t})},update:function(e){return e},leave:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return Fe({},e,{startAngle:t,endAngle:t})}},endAngle:{enter:function(e){return Fe({},e,{startAngle:e.endAngle})},update:function(e){return e},leave:function(e){return Fe({},e,{endAngle:e.startAngle})}},innerRadius:{enter:function(e){return Fe({},e,{outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return Fe({},e,{innerRadius:e.outerRadius})}},centerRadius:{enter:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return Fe({},e,{innerRadius:t,outerRadius:t})},update:function(e){return e},leave:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return Fe({},e,{innerRadius:t,outerRadius:t})}},outerRadius:{enter:function(e){return Fe({},e,{innerRadius:e.outerRadius})},update:function(e){return e},leave:function(e){return Fe({},e,{outerRadius:e.innerRadius})}},pushIn:{enter:function(e){return Fe({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return Fe({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})}},pushOut:{enter:function(e){return Fe({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})},update:function(e){return e},leave:function(e){return Fe({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})}}},jy=function(e,t){return p.useMemo(function(){var n=sD[e];return{enter:function(r){return Fe({progress:0},n.enter(r.arc),t?t.enter(r):{})},update:function(r){return Fe({progress:1},n.update(r.arc),t?t.update(r):{})},leave:function(r){return Fe({progress:0},n.leave(r.arc),t?t.leave(r):{})}}},[e,t])},oD=function(e,t){var n=PN(e)-Math.PI/2,r=e.innerRadius+(e.outerRadius-e.innerRadius)*t;return Hr(n,r)},cD=function(e){return function(t,n,r,a){return Vi([t,n,r,a],function(i,s,o,c){var u=oD({startAngle:i,endAngle:s,innerRadius:o,outerRadius:c},e);return"translate("+u.x+","+u.y+")"})}},uD=function(e,t,n,r){t===void 0&&(t=.5),n===void 0&&(n="innerRadius");var a=va(),i=a.animate,s=a.config,o=jy(n,r);return{transition:Vd(e,{keys:function(c){return c.id},initial:o.update,from:o.enter,enter:o.update,update:o.update,leave:o.leave,config:s,immediate:!i}),interpolate:cD(t)}},lD=function(e){var t=e.center,n=e.data,r=e.transitionMode,a=e.label,i=e.radiusOffset,s=e.skipAngle,o=e.textColor,c=e.component,u=c===void 0?aD:c,l=wo(a),d=St(),f=Oo(o,d),m=p.useMemo(function(){return n.filter(function(x){return Math.abs(Tf(x.arc.endAngle-x.arc.startAngle))>=s})},[n,s]),g=uD(m,i,r),v=g.transition,h=g.interpolate,w=u;return y.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:v(function(x,b){return p.createElement(w,{key:b.id,datum:b,label:l(b),style:Fe({},x,{transform:h(x.startAngle,x.endAngle,x.innerRadius,x.outerRadius),textColor:f(b)})})})})},dD=function(e){var t=e.label,n=e.style,r=St();return y.jsxs(dn.g,{opacity:n.opacity,children:[y.jsx(dn.path,{fill:"none",stroke:n.linkColor,strokeWidth:n.thickness,d:n.path}),y.jsx(dn.text,{transform:n.textPosition,textAnchor:n.textAnchor,dominantBaseline:"central",style:Fe({},r.labels.text,{fill:n.textColor}),children:t})]})},fD=function(e){var t=$y(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2);return t<Math.PI/2||t>1.5*Math.PI?"start":"end"},Py=function(e,t,n,r){var a,i,s=$y(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2),o=Hr(s,e.outerRadius+t),c=Hr(s,e.outerRadius+t+n);return s<Math.PI/2||s>1.5*Math.PI?(a="after",i={x:c.x+r,y:c.y}):(a="before",i={x:c.x-r,y:c.y}),{side:a,points:[o,c,i]}},hD=uj().x(function(e){return e.x}).y(function(e){return e.y}),pD=function(e,t,n,r,a,i,s){return Vi([e,t,n,r,a,i,s],function(o,c,u,l,d,f,m){var g=Py({startAngle:o,endAngle:c,innerRadius:u,outerRadius:l},d,f,m).points;return hD(g)})},mD=function(e,t,n,r){return Vi([e,t,n,r],function(a,i,s,o){return fD({startAngle:a,endAngle:i,innerRadius:s,outerRadius:o})})},gD=function(e,t,n,r,a,i,s,o){return Vi([e,t,n,r,a,i,s,o],function(c,u,l,d,f,m,g,v){var h=Py({startAngle:c,endAngle:u,innerRadius:l,outerRadius:d},f,m,g),w=h.points,x=h.side,b=w[2];return x==="before"?b.x-=v:b.x+=v,"translate("+b.x+","+b.y+")"})},vD=function(e){var t=e.data,n=e.offset,r=n===void 0?0:n,a=e.diagonalLength,i=e.straightLength,s=e.skipAngle,o=s===void 0?0:s,c=e.textOffset,u=e.linkColor,l=e.textColor,d=va(),f=d.animate,m=d.config,g=St(),v=Oo(u,g),h=Oo(l,g),w=function(b,T){return p.useMemo(function(){return iD(b,T)},[b,T])}(t,o),x=function(b){var T=b.offset,_=b.diagonalLength,S=b.straightLength,$=b.textOffset,D=b.getLinkColor,I=b.getTextColor;return p.useMemo(function(){return{enter:function(M){return{startAngle:M.arc.startAngle,endAngle:M.arc.endAngle,innerRadius:M.arc.innerRadius,outerRadius:M.arc.outerRadius,offset:T,diagonalLength:0,straightLength:0,textOffset:$,linkColor:D(M),textColor:I(M),opacity:0}},update:function(M){return{startAngle:M.arc.startAngle,endAngle:M.arc.endAngle,innerRadius:M.arc.innerRadius,outerRadius:M.arc.outerRadius,offset:T,diagonalLength:_,straightLength:S,textOffset:$,linkColor:D(M),textColor:I(M),opacity:1}},leave:function(M){return{startAngle:M.arc.startAngle,endAngle:M.arc.endAngle,innerRadius:M.arc.innerRadius,outerRadius:M.arc.outerRadius,offset:T,diagonalLength:0,straightLength:0,textOffset:$,linkColor:D(M),textColor:I(M),opacity:0}}}},[_,S,$,D,I,T])}({offset:r,diagonalLength:a,straightLength:i,textOffset:c,getLinkColor:v,getTextColor:h});return{transition:Vd(w,{keys:function(b){return b.id},initial:x.update,from:x.enter,enter:x.update,update:x.update,leave:x.leave,config:m,immediate:!f}),interpolateLink:pD,interpolateTextAnchor:mD,interpolateTextPosition:gD}},bD=function(e){var t=e.center,n=e.data,r=e.label,a=e.skipAngle,i=e.offset,s=e.diagonalLength,o=e.straightLength,c=e.strokeWidth,u=e.textOffset,l=e.textColor,d=e.linkColor,f=e.component,m=f===void 0?dD:f,g=wo(r),v=vD({data:n,skipAngle:a,offset:i,diagonalLength:s,straightLength:o,textOffset:u,linkColor:d,textColor:l}),h=v.transition,w=v.interpolateLink,x=v.interpolateTextAnchor,b=v.interpolateTextPosition,T=m;return y.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:h(function(_,S){return p.createElement(T,{key:S.id,datum:S,label:g(S),style:Fe({},_,{thickness:c,path:w(_.startAngle,_.endAngle,_.innerRadius,_.outerRadius,_.offset,_.diagonalLength,_.straightLength),textAnchor:x(_.startAngle,_.endAngle,_.innerRadius,_.outerRadius),textPosition:b(_.startAngle,_.endAngle,_.innerRadius,_.outerRadius,_.offset,_.diagonalLength,_.straightLength,_.textOffset)})})})})},yD=function(e){var t=e.datum,n=e.style,r=e.onClick,a=e.onMouseEnter,i=e.onMouseMove,s=e.onMouseLeave,o=p.useCallback(function(d){return r==null?void 0:r(t,d)},[r,t]),c=p.useCallback(function(d){return a==null?void 0:a(t,d)},[a,t]),u=p.useCallback(function(d){return i==null?void 0:i(t,d)},[i,t]),l=p.useCallback(function(d){return s==null?void 0:s(t,d)},[s,t]);return y.jsx(dn.path,{d:n.path,opacity:n.opacity,fill:t.fill||n.color,stroke:n.borderColor,strokeWidth:n.borderWidth,onClick:r?o:void 0,onMouseEnter:a?c:void 0,onMouseMove:i?u:void 0,onMouseLeave:s?l:void 0})},_D=function(e,t,n,r,a){return Vi([e,t,n,r],function(i,s,o,c){return a({startAngle:i,endAngle:s,innerRadius:Math.max(0,o),outerRadius:Math.max(0,c)})})},xD=function(e,t,n){t===void 0&&(t="innerRadius");var r=va(),a=r.animate,i=r.config,s=jy(t,n);return{transition:Vd(e,{keys:function(o){return o.id},initial:s.update,from:s.enter,enter:s.update,update:s.update,leave:s.leave,config:i,immediate:!a}),interpolate:_D}},wD=function(e){var t=e.center,n=e.data,r=e.arcGenerator,a=e.borderWidth,i=e.borderColor,s=e.onClick,o=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,l=e.transitionMode,d=e.component,f=d===void 0?yD:d,m=St(),g=Oo(i,m),v=xD(n,l,{enter:function(b){return{opacity:0,color:b.color,borderColor:g(b)}},update:function(b){return{opacity:1,color:b.color,borderColor:g(b)}},leave:function(b){return{opacity:0,color:b.color,borderColor:g(b)}}}),h=v.transition,w=v.interpolate,x=f;return y.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:h(function(b,T){return p.createElement(x,{key:T.id,datum:T,style:Fe({},b,{borderWidth:a,path:w(b.startAngle,b.endAngle,b.innerRadius,b.outerRadius,r)}),onClick:s,onMouseEnter:o,onMouseMove:c,onMouseLeave:u})})})},TD=function(e,t,n,r,a,i){i===void 0&&(i=!0);var s=[],o=Hr(fn(r),n);s.push([o.x,o.y]);var c=Hr(fn(a),n);s.push([c.x,c.y]);for(var u=Math.round(Math.min(r,a));u<=Math.round(Math.max(r,a));u++)if(u%90==0){var l=Hr(fn(u),n);s.push([l.x,l.y])}s=s.map(function(h){var w=h[0],x=h[1];return[e+w,t+x]}),i&&s.push([e,t]);var d=s.map(function(h){return h[0]}),f=s.map(function(h){return h[1]}),m=Math.min.apply(Math,d),g=Math.max.apply(Math,d),v=Math.min.apply(Math,f);return{points:s,x:m,y:v,width:g-m,height:Math.max.apply(Math,f)-v}},OD=function(e){var t=e===void 0?{}:e,n=t.cornerRadius,r=n===void 0?0:n,a=t.padAngle,i=a===void 0?0:a;return p.useMemo(function(){return sj().innerRadius(function(s){return s.innerRadius}).outerRadius(function(s){return s.outerRadius}).cornerRadius(r).padAngle(i)},[r,i])},CD=function(e){var t=e.x,n=e.y,r=e.size,a=e.fill,i=e.opacity,s=i===void 0?1:i,o=e.borderWidth,c=o===void 0?0:o,u=e.borderColor;return y.jsx("circle",{r:r/2,cx:t+r/2,cy:n+r/2,fill:a,opacity:s,strokeWidth:c,stroke:u===void 0?"transparent":u,style:{pointerEvents:"none"}})},ED=function(e){var t=e.x,n=e.y,r=e.size,a=e.fill,i=e.opacity,s=i===void 0?1:i,o=e.borderWidth,c=o===void 0?0:o,u=e.borderColor;return y.jsx("g",{transform:"translate("+t+","+n+")",children:y.jsx("path",{d:`
|
|
269
269
|
M`+r/2+` 0
|
|
270
270
|
L`+.8*r+" "+r/2+`
|
|
271
271
|
L`+r/2+" "+r+`
|
|
272
272
|
L`+.2*r+" "+r/2+`
|
|
273
273
|
L`+r/2+` 0
|
|
274
|
-
`,fill:a,opacity:s,strokeWidth:c,stroke:u===void 0?"transparent":u,style:{pointerEvents:"none"}})})},
|
|
274
|
+
`,fill:a,opacity:s,strokeWidth:c,stroke:u===void 0?"transparent":u,style:{pointerEvents:"none"}})})},SD=function(e){var t=e.x,n=e.y,r=e.size,a=e.fill,i=e.opacity,s=i===void 0?1:i,o=e.borderWidth,c=o===void 0?0:o,u=e.borderColor;return y.jsx("rect",{x:t,y:n,fill:a,opacity:s,strokeWidth:c,stroke:u===void 0?"transparent":u,width:r,height:r,style:{pointerEvents:"none"}})},kD=function(e){var t=e.x,n=e.y,r=e.size,a=e.fill,i=e.opacity,s=i===void 0?1:i,o=e.borderWidth,c=o===void 0?0:o,u=e.borderColor;return y.jsx("g",{transform:"translate("+t+","+n+")",children:y.jsx("path",{d:`
|
|
275
275
|
M`+r/2+` 0
|
|
276
276
|
L`+r+" "+r+`
|
|
277
277
|
L0 `+r+`
|
|
278
278
|
L`+r/2+` 0
|
|
279
|
-
`,fill:a,opacity:s,strokeWidth:c,stroke:u===void 0?"transparent":u,style:{pointerEvents:"none"}})})};function ir(){return ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ir.apply(this,arguments)}var kF={top:0,right:0,bottom:0,left:0},Wy=function(e){var t,n=e.direction,r=e.itemsSpacing,a=e.padding,i=e.itemCount,s=e.itemWidth,o=e.itemHeight;if(typeof a!="number"&&(typeof(t=a)!="object"||Array.isArray(t)||t===null))throw new Error("Invalid property padding, must be one of: number, object");var c=typeof a=="number"?{top:a,right:a,bottom:a,left:a}:ir({},kF,a),u=c.left+c.right,l=c.top+c.bottom,d=s+u,f=o+l,m=(i-1)*r;return n==="row"?d=s*i+m+u:n==="column"&&(f=o*i+m+l),{width:d,height:f,padding:c}},RF=function(e){var t=e.anchor,n=e.translateX,r=e.translateY,a=e.containerWidth,i=e.containerHeight,s=e.width,o=e.height,c=n,u=r;switch(t){case"top":c+=(a-s)/2;break;case"top-right":c+=a-s;break;case"right":c+=a-s,u+=(i-o)/2;break;case"bottom-right":c+=a-s,u+=i-o;break;case"bottom":c+=(a-s)/2,u+=i-o;break;case"bottom-left":u+=i-o;break;case"left":u+=(i-o)/2;break;case"center":c+=(a-s)/2,u+=(i-o)/2}return{x:c,y:u}},AF=function(e){var t,n,r,a,i,s,o=e.direction,c=e.justify,u=e.symbolSize,l=e.symbolSpacing,d=e.width,f=e.height;switch(o){case"left-to-right":t=0,n=(f-u)/2,a=f/2,s="central",c?(r=d,i="end"):(r=u+l,i="start");break;case"right-to-left":t=d-u,n=(f-u)/2,a=f/2,s="central",c?(r=0,i="start"):(r=d-u-l,i="end");break;case"top-to-bottom":t=(d-u)/2,n=0,r=d/2,i="middle",c?(a=f,s="alphabetic"):(a=u+l,s="text-before-edge");break;case"bottom-to-top":t=(d-u)/2,n=f-u,r=d/2,i="middle",c?(a=0,s="text-before-edge"):(a=f-u-l,s="alphabetic")}return{symbolX:t,symbolY:n,labelX:r,labelY:a,labelAnchor:i,labelAlignment:s}},MF={circle:OF,diamond:CF,square:EF,triangle:SF},$F=function(e){var t,n,r,a,i,s,o,c,u,l,d,f=e.x,m=e.y,g=e.width,v=e.height,h=e.data,w=e.direction,x=w===void 0?"left-to-right":w,b=e.justify,T=b!==void 0&&b,_=e.textColor,S=e.background,$=S===void 0?"transparent":S,D=e.opacity,I=D===void 0?1:D,M=e.symbolShape,k=M===void 0?"square":M,Y=e.symbolSize,A=Y===void 0?16:Y,R=e.symbolSpacing,F=R===void 0?8:R,B=e.symbolBorderWidth,L=B===void 0?0:B,G=e.symbolBorderColor,Z=G===void 0?"transparent":G,j=e.onClick,U=e.onMouseEnter,J=e.onMouseLeave,te=e.toggleSerie,K=e.effects,X=p.useState({}),V=X[0],Q=X[1],ee=St(),N=p.useCallback(function(Ve){if(K){var st=K.filter(function(Ke){return Ke.on==="hover"}).reduce(function(Ke,_t){return ir({},Ke,_t.style)},{});Q(st)}U==null||U(h,Ve)},[U,h,K]),W=p.useCallback(function(Ve){if(K){var st=K.filter(function(Ke){return Ke.on!=="hover"}).reduce(function(Ke,_t){return ir({},Ke,_t.style)},{});Q(st)}J==null||J(h,Ve)},[J,h,K]),ne=AF({direction:x,justify:T,symbolSize:(t=V.symbolSize)!=null?t:A,symbolSpacing:F,width:g,height:v}),O=ne.symbolX,ge=ne.symbolY,he=ne.labelX,ue=ne.labelY,Ae=ne.labelAnchor,ze=ne.labelAlignment,bt=[j,U,J,te].some(function(Ve){return Ve!==void 0}),yt=typeof k=="function"?k:MF[k];return y.jsxs("g",{transform:"translate("+f+","+m+")",style:{opacity:(n=V.itemOpacity)!=null?n:I},children:[y.jsx("rect",{width:g,height:v,fill:(r=V.itemBackground)!=null?r:$,style:{cursor:bt?"pointer":"auto"},onClick:function(Ve){j==null||j(h,Ve),te==null||te(h.id)},onMouseEnter:N,onMouseLeave:W}),oe.createElement(yt,ir({id:h.id,x:O,y:ge,size:(a=V.symbolSize)!=null?a:A,fill:(i=(s=h.fill)!=null?s:h.color)!=null?i:"black",borderWidth:(o=V.symbolBorderWidth)!=null?o:L,borderColor:(c=V.symbolBorderColor)!=null?c:Z},h.hidden?ee.legends.hidden.symbol:void 0)),y.jsx("text",{textAnchor:Ae,style:ir({},Oy(ee.legends.text),{fill:(u=(l=(d=V.itemTextColor)!=null?d:_)!=null?l:ee.legends.text.fill)!=null?u:"black",dominantBaseline:ze,pointerEvents:"none",userSelect:"none"},h.hidden?ee.legends.hidden.text:void 0),x:he,y:ue,children:h.label})]})},jF=function(e){var t=e.data,n=e.x,r=e.y,a=e.direction,i=e.padding,s=i===void 0?0:i,o=e.justify,c=e.effects,u=e.itemWidth,l=e.itemHeight,d=e.itemDirection,f=d===void 0?"left-to-right":d,m=e.itemsSpacing,g=m===void 0?0:m,v=e.itemTextColor,h=e.itemBackground,w=h===void 0?"transparent":h,x=e.itemOpacity,b=x===void 0?1:x,T=e.symbolShape,_=e.symbolSize,S=e.symbolSpacing,$=e.symbolBorderWidth,D=e.symbolBorderColor,I=e.onClick,M=e.onMouseEnter,k=e.onMouseLeave,Y=e.toggleSerie,A=Wy({itemCount:t.length,itemWidth:u,itemHeight:l,itemsSpacing:g,direction:a,padding:s}).padding,R=a==="row"?u+g:0,F=a==="column"?l+g:0;return y.jsx("g",{transform:"translate("+n+","+r+")",children:t.map(function(B,L){return y.jsx($F,{data:B,x:L*R+A.left,y:L*F+A.top,width:u,height:l,direction:f,justify:o,effects:c,textColor:v,background:w,opacity:b,symbolShape:T,symbolSize:_,symbolSpacing:S,symbolBorderWidth:$,symbolBorderColor:D,onClick:I,onMouseEnter:M,onMouseLeave:k,toggleSerie:Y},L)})})},PF=function(e){var t=e.data,n=e.containerWidth,r=e.containerHeight,a=e.translateX,i=a===void 0?0:a,s=e.translateY,o=s===void 0?0:s,c=e.anchor,u=e.direction,l=e.padding,d=l===void 0?0:l,f=e.justify,m=e.itemsSpacing,g=m===void 0?0:m,v=e.itemWidth,h=e.itemHeight,w=e.itemDirection,x=e.itemTextColor,b=e.itemBackground,T=e.itemOpacity,_=e.symbolShape,S=e.symbolSize,$=e.symbolSpacing,D=e.symbolBorderWidth,I=e.symbolBorderColor,M=e.onClick,k=e.onMouseEnter,Y=e.onMouseLeave,A=e.toggleSerie,R=e.effects,F=Wy({itemCount:t.length,itemsSpacing:g,itemWidth:v,itemHeight:h,direction:u,padding:d}),B=F.width,L=F.height,G=RF({anchor:c,translateX:i,translateY:o,containerWidth:n,containerHeight:r,width:B,height:L}),Z=G.x,j=G.y;return y.jsx(jF,{data:t,x:Z,y:j,direction:u,padding:d,justify:f,effects:R,itemsSpacing:g,itemWidth:v,itemHeight:h,itemDirection:w,itemTextColor:x,itemBackground:b,itemOpacity:T,symbolShape:_,symbolSize:S,symbolSpacing:$,symbolBorderWidth:D,symbolBorderColor:I,onClick:M,onMouseEnter:k,onMouseLeave:Y,toggleSerie:typeof A=="boolean"?void 0:A})};function Wn(){return Wn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wn.apply(this,arguments)}function qy(e,t){if(e==null)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var Dm,IF=function(e){var t=e.width,n=e.height,r=e.legends,a=e.data,i=e.toggleSerie;return y.jsx(y.Fragment,{children:r.map(function(s,o){var c;return y.jsx(PF,Wn({},s,{containerWidth:t,containerHeight:n,data:(c=s.data)!=null?c:a,toggleSerie:s.toggleSerie?i:void 0}),o)})})},fe={id:"id",value:"value",sortByValue:!1,innerRadius:0,padAngle:0,cornerRadius:0,layers:["arcs","arcLinkLabels","arcLabels","legends"],startAngle:0,endAngle:360,fit:!0,activeInnerRadiusOffset:0,activeOuterRadiusOffset:0,borderWidth:0,borderColor:{from:"color",modifiers:[["darker",1]]},enableArcLabels:!0,arcLabel:"formattedValue",arcLabelsSkipAngle:0,arcLabelsRadiusOffset:.5,arcLabelsTextColor:{theme:"labels.text.fill"},enableArcLinkLabels:!0,arcLinkLabel:"id",arcLinkLabelsSkipAngle:0,arcLinkLabelsOffset:0,arcLinkLabelsDiagonalLength:16,arcLinkLabelsStraightLength:24,arcLinkLabelsThickness:1,arcLinkLabelsTextOffset:6,arcLinkLabelsTextColor:{theme:"labels.text.fill"},arcLinkLabelsColor:{theme:"axis.ticks.line.stroke"},colors:{scheme:"nivo"},defs:[],fill:[],isInteractive:!0,animate:!0,motionConfig:"gentle",transitionMode:"innerRadius",tooltip:function(e){var t=e.datum;return y.jsx(zO,{id:t.id,value:t.formattedValue,enableChip:!0,color:t.color})},legends:[],role:"img",pixelRatio:typeof window<"u"&&(Dm=window.devicePixelRatio)!=null?Dm:1},NF=["points"],DF=function(e){var t=e.data,n=e.id,r=n===void 0?fe.id:n,a=e.value,i=a===void 0?fe.value:a,s=e.valueFormat,o=e.colors,c=o===void 0?fe.colors:o,u=wo(r),l=wo(i),d=xy(s),f=tF(c,"id");return p.useMemo(function(){return t.map(function(m){var g,v=u(m),h=l(m),w={id:v,label:(g=m.label)!=null?g:v,hidden:!1,value:h,formattedValue:d(h),data:m};return Wn({},w,{color:f(w)})})},[t,u,l,d,f])},FF=function(e){var t=e.data,n=e.startAngle,r=e.endAngle,a=e.innerRadius,i=e.outerRadius,s=e.padAngle,o=e.sortByValue,c=e.activeId,u=e.activeInnerRadiusOffset,l=e.activeOuterRadiusOffset,d=e.hiddenIds,f=e.forwardLegendData,m=p.useMemo(function(){var w=dP().value(function(x){return x.value}).startAngle(fn(n)).endAngle(fn(r)).padAngle(fn(s));return o||w.sortValues(null),w},[n,r,s,o]),g=p.useMemo(function(){var w=t.filter(function(x){return!d.includes(x.id)});return{dataWithArc:m(w).map(function(x){var b=Math.abs(x.endAngle-x.startAngle);return Wn({},x.data,{arc:{index:x.index,startAngle:x.startAngle,endAngle:x.endAngle,innerRadius:c===x.data.id?a-u:a,outerRadius:c===x.data.id?i+l:i,thickness:i-a,padAngle:x.padAngle,angle:b,angleDeg:kf(b)}})}),legendData:t.map(function(x){return{id:x.id,label:x.label,color:x.color,hidden:d.includes(x.id),data:x}})}},[m,t,d,c,a,u,i,l]),v=g.legendData,h=p.useRef(f);return p.useEffect(function(){typeof h.current=="function"&&h.current(v)},[h,v]),g},LF=function(e){var t=e.activeId,n=e.onActiveIdChange,r=e.defaultActiveId,a=t!==void 0,i=p.useState(a||r===void 0?null:r),s=i[0],o=i[1];return{activeId:a?t:s,setActiveId:p.useCallback(function(c){n&&n(c),a||o(c)},[a,n,o])}},UF=function(e){var t=e.data,n=e.width,r=e.height,a=e.innerRadius,i=a===void 0?fe.innerRadius:a,s=e.startAngle,o=s===void 0?fe.startAngle:s,c=e.endAngle,u=c===void 0?fe.endAngle:c,l=e.padAngle,d=l===void 0?fe.padAngle:l,f=e.sortByValue,m=f===void 0?fe.sortByValue:f,g=e.cornerRadius,v=g===void 0?fe.cornerRadius:g,h=e.fit,w=h===void 0?fe.fit:h,x=e.activeInnerRadiusOffset,b=x===void 0?fe.activeInnerRadiusOffset:x,T=e.activeOuterRadiusOffset,_=T===void 0?fe.activeOuterRadiusOffset:T,S=e.activeId,$=e.onActiveIdChange,D=e.defaultActiveId,I=e.forwardLegendData,M=LF({activeId:S,onActiveIdChange:$,defaultActiveId:D}),k=M.activeId,Y=M.setActiveId,A=p.useState([]),R=A[0],F=A[1],B=p.useMemo(function(){var Z,j=Math.min(n,r)/2,U=j*Math.min(i,1),J=n/2,te=r/2;if(w){var K=wF(J,te,j,o-90,u-90),X=K.points,V=qy(K,NF),Q=Math.min(n/V.width,r/V.height),ee={width:V.width*Q,height:V.height*Q};ee.x=(n-ee.width)/2,ee.y=(r-ee.height)/2,J=(J-V.x)/V.width*V.width*Q+ee.x,te=(te-V.y)/V.height*V.height*Q+ee.y,Z={box:V,ratio:Q,points:X},j*=Q,U*=Q}return{centerX:J,centerY:te,radius:j,innerRadius:U,debug:Z}},[n,r,i,o,u,w]),L=FF({data:t,startAngle:o,endAngle:u,innerRadius:B.innerRadius,outerRadius:B.radius,padAngle:d,sortByValue:m,activeId:k,activeInnerRadiusOffset:b,activeOuterRadiusOffset:_,hiddenIds:R,forwardLegendData:I}),G=p.useCallback(function(Z){F(function(j){return j.indexOf(Z)>-1?j.filter(function(U){return U!==Z}):[].concat(j,[Z])})},[]);return Wn({arcGenerator:TF({cornerRadius:v,padAngle:fn(d)}),activeId:k,setActiveId:Y,toggleSerie:G},L,B)},zF=function(e){var t=e.dataWithArc,n=e.arcGenerator,r=e.centerX,a=e.centerY,i=e.radius,s=e.innerRadius;return p.useMemo(function(){return{dataWithArc:t,arcGenerator:n,centerX:r,centerY:a,radius:i,innerRadius:s}},[t,n,r,a,i,s])},BF=function(e){var t=e.center,n=e.data,r=e.arcGenerator,a=e.borderWidth,i=e.borderColor,s=e.isInteractive,o=e.onClick,c=e.onMouseEnter,u=e.onMouseMove,l=e.onMouseLeave,d=e.setActiveId,f=e.tooltip,m=e.transitionMode,g=VO(),v=g.showTooltipFromEvent,h=g.hideTooltip,w=p.useMemo(function(){if(s)return function(_,S){o==null||o(_,S)}},[s,o]),x=p.useMemo(function(){if(s)return function(_,S){v(p.createElement(f,{datum:_}),S),d(_.id),c==null||c(_,S)}},[s,v,d,c,f]),b=p.useMemo(function(){if(s)return function(_,S){v(p.createElement(f,{datum:_}),S),u==null||u(_,S)}},[s,v,u,f]),T=p.useMemo(function(){if(s)return function(_,S){h(),d(null),l==null||l(_,S)}},[s,h,d,l]);return y.jsx(xF,{center:t,data:n,arcGenerator:r,borderWidth:a,borderColor:i,transitionMode:m,onClick:w,onMouseEnter:x,onMouseMove:b,onMouseLeave:T})},WF=["isInteractive","animate","motionConfig","theme","renderWrapper"],qF=function(e){var t=e.data,n=e.id,r=n===void 0?fe.id:n,a=e.value,i=a===void 0?fe.value:a,s=e.valueFormat,o=e.sortByValue,c=o===void 0?fe.sortByValue:o,u=e.layers,l=u===void 0?fe.layers:u,d=e.startAngle,f=d===void 0?fe.startAngle:d,m=e.endAngle,g=m===void 0?fe.endAngle:m,v=e.padAngle,h=v===void 0?fe.padAngle:v,w=e.fit,x=w===void 0?fe.fit:w,b=e.innerRadius,T=b===void 0?fe.innerRadius:b,_=e.cornerRadius,S=_===void 0?fe.cornerRadius:_,$=e.activeInnerRadiusOffset,D=$===void 0?fe.activeInnerRadiusOffset:$,I=e.activeOuterRadiusOffset,M=I===void 0?fe.activeOuterRadiusOffset:I,k=e.width,Y=e.height,A=e.margin,R=e.colors,F=R===void 0?fe.colors:R,B=e.borderWidth,L=B===void 0?fe.borderWidth:B,G=e.borderColor,Z=G===void 0?fe.borderColor:G,j=e.enableArcLabels,U=j===void 0?fe.enableArcLabels:j,J=e.arcLabel,te=J===void 0?fe.arcLabel:J,K=e.arcLabelsSkipAngle,X=K===void 0?fe.arcLabelsSkipAngle:K,V=e.arcLabelsTextColor,Q=V===void 0?fe.arcLabelsTextColor:V,ee=e.arcLabelsRadiusOffset,N=ee===void 0?fe.arcLabelsRadiusOffset:ee,W=e.arcLabelsComponent,ne=e.enableArcLinkLabels,O=ne===void 0?fe.enableArcLinkLabels:ne,ge=e.arcLinkLabel,he=ge===void 0?fe.arcLinkLabel:ge,ue=e.arcLinkLabelsSkipAngle,Ae=ue===void 0?fe.arcLinkLabelsSkipAngle:ue,ze=e.arcLinkLabelsOffset,bt=ze===void 0?fe.arcLinkLabelsOffset:ze,yt=e.arcLinkLabelsDiagonalLength,Ve=yt===void 0?fe.arcLinkLabelsDiagonalLength:yt,st=e.arcLinkLabelsStraightLength,Ke=st===void 0?fe.arcLinkLabelsStraightLength:st,_t=e.arcLinkLabelsThickness,Bt=_t===void 0?fe.arcLinkLabelsThickness:_t,Wt=e.arcLinkLabelsTextOffset,Oe=Wt===void 0?fe.arcLinkLabelsTextOffset:Wt,Xe=e.arcLinkLabelsTextColor,rn=Xe===void 0?fe.arcLinkLabelsTextColor:Xe,ba=e.arcLinkLabelsColor,Gi=ba===void 0?fe.arcLinkLabelsColor:ba,ya=e.arcLinkLabelComponent,Ki=e.defs,Hc=Ki===void 0?fe.defs:Ki,Xi=e.fill,Vc=Xi===void 0?fe.fill:Xi,Ji=e.isInteractive,Yc=Ji===void 0?fe.isInteractive:Ji,Zc=e.onClick,_a=e.onMouseEnter,Qi=e.onMouseMove,wn=e.onMouseLeave,Sr=e.tooltip,xa=Sr===void 0?fe.tooltip:Sr,es=e.activeId,Gc=e.onActiveIdChange,ts=e.defaultActiveId,ns=e.transitionMode,wa=ns===void 0?fe.transitionMode:ns,Ta=e.legends,rs=Ta===void 0?fe.legends:Ta,Kc=e.forwardLegendData,Oa=e.role,as=Oa===void 0?fe.role:Oa,Zn=ED(k,Y,A),Xc=Zn.outerWidth,Jc=Zn.outerHeight,Qc=Zn.margin,C=Zn.innerWidth,z=Zn.innerHeight,re=DF({data:t,id:r,value:i,valueFormat:s,colors:F}),le=UF({data:re,width:C,height:z,fit:x,innerRadius:T,startAngle:f,endAngle:g,padAngle:h,sortByValue:c,cornerRadius:S,activeInnerRadiusOffset:D,activeOuterRadiusOffset:M,activeId:es,onActiveIdChange:Gc,defaultActiveId:ts,forwardLegendData:Kc}),Ee=le.dataWithArc,Ne=le.legendData,Ce=le.arcGenerator,xe=le.centerX,Ge=le.centerY,We=le.radius,He=le.innerRadius,lt=le.setActiveId,Tn=le.toggleSerie,an=BD(Hc,Ee,Vc),Ye={arcs:null,arcLinkLabels:null,arcLabels:null,legends:null};l.includes("arcs")&&(Ye.arcs=y.jsx(BF,{center:[xe,Ge],data:Ee,arcGenerator:Ce,borderWidth:L,borderColor:Z,isInteractive:Yc,onClick:Zc,onMouseEnter:_a,onMouseMove:Qi,onMouseLeave:wn,setActiveId:lt,tooltip:xa,transitionMode:wa},"arcs")),O&&l.includes("arcLinkLabels")&&(Ye.arcLinkLabels=y.jsx(vF,{center:[xe,Ge],data:Ee,label:he,skipAngle:Ae,offset:bt,diagonalLength:Ve,straightLength:Ke,strokeWidth:Bt,textOffset:Oe,textColor:rn,linkColor:Gi,component:ya},"arcLinkLabels")),U&&l.includes("arcLabels")&&(Ye.arcLabels=y.jsx(uF,{center:[xe,Ge],data:Ee,label:te,radiusOffset:N,skipAngle:X,textColor:Q,transitionMode:wa,component:W},"arcLabels")),rs.length>0&&l.includes("legends")&&(Ye.legends=y.jsx(IF,{width:C,height:z,data:Ne,legends:rs,toggleSerie:Tn},"legends"));var Ca=zF({dataWithArc:Ee,arcGenerator:Ce,centerX:xe,centerY:Ge,radius:We,innerRadius:He});return y.jsx($y,{width:Xc,height:Jc,margin:Qc,defs:an,role:as,children:l.map(function(kr,eu){return Ye[kr]!==void 0?Ye[kr]:typeof kr=="function"?y.jsx(p.Fragment,{children:p.createElement(kr,Ca)},eu):null})})},HF=function(e){var t=e.isInteractive,n=t===void 0?fe.isInteractive:t,r=e.animate,a=r===void 0?fe.animate:r,i=e.motionConfig,s=i===void 0?fe.motionConfig:i,o=e.theme,c=e.renderWrapper,u=qy(e,WF);return y.jsx(Ey,{animate:a,isInteractive:n,motionConfig:s,renderWrapper:c,theme:o,children:y.jsx(qF,Wn({isInteractive:n},u))})},VF=function(e){return y.jsx(Sy,{children:function(t){var n=t.width,r=t.height;return y.jsx(HF,Wn({width:n,height:r},e))}})};exports.AbstractModalHeader=F0;exports.AuthContext=Sd;exports.AvatarIcon=rv;exports.BaseModal=j0;exports.BootstrapModalManager=zx;exports.CloseButton=Ao;exports.ConfirmContext=Q0;exports.ContextButton=kd;exports.DelegationContext=tv;exports.Documents=b8;exports.ENTERED=Rn;exports.ENTERING=un;exports.EXITED=kn;exports.EXITING=Ds;exports.FaMinus=fT;exports.FaPlus=hT;exports.FaSearch=pT;exports.Fade=Yr;exports.FileExtensionIcon=hv;exports.FloatingLabelInput=av;exports.Form=xr;exports.FormCheckInput=Po;exports.FormControl=O0;exports.FromToDatePickerDropdownToggle=x8;exports.HookFormTextAreaInput=Ad;exports.HookFormTextInput=xi;exports.IconButton=Zo;exports.Ie=m4;exports.InvalidFeedback=Go;exports.LoadingContext=Do;exports.LoginState=ig;exports.LuminusComponentsContext=Et;exports.MdArrowRight=sw;exports.MdCheck=ow;exports.MdCircle=iw;exports.MdClear=Io;exports.MdOutlineAddCircleOutline=mw;exports.MdOutlineArrowOutward=cw;exports.MdOutlineCameraAlt=_w;exports.MdOutlineChevronRight=Tw;exports.MdOutlineClose=J0;exports.MdOutlineContentCopy=gw;exports.MdOutlineDelete=lw;exports.MdOutlineEdit=xw;exports.MdOutlineExpand=dw;exports.MdOutlineFileUpload=vw;exports.MdOutlineKeyboardArrowLeft=bw;exports.MdOutlineKeyboardArrowRight=yw;exports.MdOutlineStar=Cw;exports.MdSearch=aw;exports.Modal=ht;exports.ModalContext=fd;exports.NoInputContainer=iv;exports.Oe=E;exports.OverlayTrigger=G0;exports.Popover=V0;exports.PrimaryButton=mr;exports.PromptContext=eg;exports.RowLabelInput=zi;exports.SimpleDropdownToggle=bT;exports.Tooltip=md;exports.TransitionWrapper=t0;exports.Typography=nv;exports.UserAvatarToggle=yT;exports.UserContext=g4;exports._=VF;exports.addEventListener=Jl;exports.addLeadingZeros=Ie;exports.atobUtf8=Pg;exports.buildEmployeeNameString=X3;exports.buildOrgUnitString=J3;exports.buildVehicleNameString=K3;exports.cancelToken=j6;exports.capitalizeFirstLetter=G3;exports.classNames=ae;exports.classes=bl;exports.compareDate=t6;exports.compareDateTime=n6;exports.constructFrom=hn;exports.dataAttr=_0;exports.differenceInCalendarDays=Wm;exports.divWithClassName=n0;exports.extractErrorsFromResponse=xd;exports.extractFilename=Fg;exports.extractPermissionsFromResponse=$g;exports.fixNameIdNulls=Ag;exports.format=Kl;exports.formatDate=Y3;exports.formatDateTime=Z3;exports.formatFileSize=Wo;exports.getDateString=c6;exports.getDaysDifference=r6;exports.getDefaultExportFromCjs=vt;exports.getFirstDayOfMonth=Ng;exports.getFirstDayOfOffsetMonth=a6;exports.getFirstDayOfYear=s6;exports.getLastDayOfMonth=Dg;exports.getLastDayOfOffsetMonth=i6;exports.getLastDayOfYear=o6;exports.getSharedManager=I0;exports.getTimezoneOffsetInMilliseconds=Bu;exports.hasOnlyNullValues=Mg;exports.hookFormSetServerErrors=H3;exports.isISODate=Ig;exports.isPrimitive=Gs;exports.isValidDate=e6;exports.joinStrings=wd;exports.jsxRuntimeExports=y;exports.latinize=Td;exports.mergeOptionsWithPopperConfig=y0;exports.millisecondsInHour=Co;exports.millisecondsInMinute=Zl;exports.millisecondsInWeek=Yl;exports.msToStartOfNextDay=Q3;exports.parseISO=So;exports.qsa=Qn;exports.replaceNullValuesOnlyObjectsWithNulls=q3;exports.saveFile=Ks;exports.saveFileFromResponse=u6;exports.secondsInDay=Gl;exports.secondsInHour=Lm;exports.secondsInMinute=Jy;exports.secondsInMonth=zm;exports.secondsInQuarter=e1;exports.secondsInWeek=Qy;exports.secondsInYear=Um;exports.shortenText=V3;exports.startOfDay=zu;exports.startOfWeek=Vr;exports.style=In;exports.toDate=Ct;exports.transitionEndListener=Qm;exports.triggerBrowserReflow=e0;exports.trimIsoDate=qo;exports.truncateText=jg;exports.urlfyArray=fl;exports.useAuth=Bg;exports.useAxios=Ho;exports.useBootstrapPrefix=Ue;exports.useCallbackRef=Ls;exports.useClickOutside=b0;exports.useCol=i0;exports.useConfirm=Wg;exports.useCookies=Od;exports.useEventCallback=ot;exports.useFormControlType=ev;exports.useIsRTL=Ro;exports.useIsomorphicEffect=Us;exports.useMergedRefs=_n;exports.useNotifications=Cd;exports.usePopper=g0;exports.usePrevious=r0;exports.usePrompt=tg;exports.useUncontrolled=w_;exports.useWindow=$o;exports.useZodSchemaTypes=Yo;exports.warning=Ni;
|
|
279
|
+
`,fill:a,opacity:s,strokeWidth:c,stroke:u===void 0?"transparent":u,style:{pointerEvents:"none"}})})};function ir(){return ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ir.apply(this,arguments)}var RD={top:0,right:0,bottom:0,left:0},Iy=function(e){var t,n=e.direction,r=e.itemsSpacing,a=e.padding,i=e.itemCount,s=e.itemWidth,o=e.itemHeight;if(typeof a!="number"&&(typeof(t=a)!="object"||Array.isArray(t)||t===null))throw new Error("Invalid property padding, must be one of: number, object");var c=typeof a=="number"?{top:a,right:a,bottom:a,left:a}:ir({},RD,a),u=c.left+c.right,l=c.top+c.bottom,d=s+u,f=o+l,m=(i-1)*r;return n==="row"?d=s*i+m+u:n==="column"&&(f=o*i+m+l),{width:d,height:f,padding:c}},AD=function(e){var t=e.anchor,n=e.translateX,r=e.translateY,a=e.containerWidth,i=e.containerHeight,s=e.width,o=e.height,c=n,u=r;switch(t){case"top":c+=(a-s)/2;break;case"top-right":c+=a-s;break;case"right":c+=a-s,u+=(i-o)/2;break;case"bottom-right":c+=a-s,u+=i-o;break;case"bottom":c+=(a-s)/2,u+=i-o;break;case"bottom-left":u+=i-o;break;case"left":u+=(i-o)/2;break;case"center":c+=(a-s)/2,u+=(i-o)/2}return{x:c,y:u}},MD=function(e){var t,n,r,a,i,s,o=e.direction,c=e.justify,u=e.symbolSize,l=e.symbolSpacing,d=e.width,f=e.height;switch(o){case"left-to-right":t=0,n=(f-u)/2,a=f/2,s="central",c?(r=d,i="end"):(r=u+l,i="start");break;case"right-to-left":t=d-u,n=(f-u)/2,a=f/2,s="central",c?(r=0,i="start"):(r=d-u-l,i="end");break;case"top-to-bottom":t=(d-u)/2,n=0,r=d/2,i="middle",c?(a=f,s="alphabetic"):(a=u+l,s="text-before-edge");break;case"bottom-to-top":t=(d-u)/2,n=f-u,r=d/2,i="middle",c?(a=0,s="text-before-edge"):(a=f-u-l,s="alphabetic")}return{symbolX:t,symbolY:n,labelX:r,labelY:a,labelAnchor:i,labelAlignment:s}},$D={circle:CD,diamond:ED,square:SD,triangle:kD},jD=function(e){var t,n,r,a,i,s,o,c,u,l,d,f=e.x,m=e.y,g=e.width,v=e.height,h=e.data,w=e.direction,x=w===void 0?"left-to-right":w,b=e.justify,T=b!==void 0&&b,_=e.textColor,S=e.background,$=S===void 0?"transparent":S,D=e.opacity,I=D===void 0?1:D,M=e.symbolShape,k=M===void 0?"square":M,Y=e.symbolSize,A=Y===void 0?16:Y,R=e.symbolSpacing,F=R===void 0?8:R,B=e.symbolBorderWidth,L=B===void 0?0:B,G=e.symbolBorderColor,Z=G===void 0?"transparent":G,j=e.onClick,U=e.onMouseEnter,J=e.onMouseLeave,te=e.toggleSerie,K=e.effects,X=p.useState({}),V=X[0],Q=X[1],ee=St(),N=p.useCallback(function(Ve){if(K){var st=K.filter(function(Ke){return Ke.on==="hover"}).reduce(function(Ke,_t){return ir({},Ke,_t.style)},{});Q(st)}U==null||U(h,Ve)},[U,h,K]),W=p.useCallback(function(Ve){if(K){var st=K.filter(function(Ke){return Ke.on!=="hover"}).reduce(function(Ke,_t){return ir({},Ke,_t.style)},{});Q(st)}J==null||J(h,Ve)},[J,h,K]),ne=MD({direction:x,justify:T,symbolSize:(t=V.symbolSize)!=null?t:A,symbolSpacing:F,width:g,height:v}),O=ne.symbolX,ge=ne.symbolY,he=ne.labelX,ue=ne.labelY,Ae=ne.labelAnchor,ze=ne.labelAlignment,bt=[j,U,J,te].some(function(Ve){return Ve!==void 0}),yt=typeof k=="function"?k:$D[k];return y.jsxs("g",{transform:"translate("+f+","+m+")",style:{opacity:(n=V.itemOpacity)!=null?n:I},children:[y.jsx("rect",{width:g,height:v,fill:(r=V.itemBackground)!=null?r:$,style:{cursor:bt?"pointer":"auto"},onClick:function(Ve){j==null||j(h,Ve),te==null||te(h.id)},onMouseEnter:N,onMouseLeave:W}),oe.createElement(yt,ir({id:h.id,x:O,y:ge,size:(a=V.symbolSize)!=null?a:A,fill:(i=(s=h.fill)!=null?s:h.color)!=null?i:"black",borderWidth:(o=V.symbolBorderWidth)!=null?o:L,borderColor:(c=V.symbolBorderColor)!=null?c:Z},h.hidden?ee.legends.hidden.symbol:void 0)),y.jsx("text",{textAnchor:Ae,style:ir({},gy(ee.legends.text),{fill:(u=(l=(d=V.itemTextColor)!=null?d:_)!=null?l:ee.legends.text.fill)!=null?u:"black",dominantBaseline:ze,pointerEvents:"none",userSelect:"none"},h.hidden?ee.legends.hidden.text:void 0),x:he,y:ue,children:h.label})]})},PD=function(e){var t=e.data,n=e.x,r=e.y,a=e.direction,i=e.padding,s=i===void 0?0:i,o=e.justify,c=e.effects,u=e.itemWidth,l=e.itemHeight,d=e.itemDirection,f=d===void 0?"left-to-right":d,m=e.itemsSpacing,g=m===void 0?0:m,v=e.itemTextColor,h=e.itemBackground,w=h===void 0?"transparent":h,x=e.itemOpacity,b=x===void 0?1:x,T=e.symbolShape,_=e.symbolSize,S=e.symbolSpacing,$=e.symbolBorderWidth,D=e.symbolBorderColor,I=e.onClick,M=e.onMouseEnter,k=e.onMouseLeave,Y=e.toggleSerie,A=Iy({itemCount:t.length,itemWidth:u,itemHeight:l,itemsSpacing:g,direction:a,padding:s}).padding,R=a==="row"?u+g:0,F=a==="column"?l+g:0;return y.jsx("g",{transform:"translate("+n+","+r+")",children:t.map(function(B,L){return y.jsx(jD,{data:B,x:L*R+A.left,y:L*F+A.top,width:u,height:l,direction:f,justify:o,effects:c,textColor:v,background:w,opacity:b,symbolShape:T,symbolSize:_,symbolSpacing:S,symbolBorderWidth:$,symbolBorderColor:D,onClick:I,onMouseEnter:M,onMouseLeave:k,toggleSerie:Y},L)})})},ID=function(e){var t=e.data,n=e.containerWidth,r=e.containerHeight,a=e.translateX,i=a===void 0?0:a,s=e.translateY,o=s===void 0?0:s,c=e.anchor,u=e.direction,l=e.padding,d=l===void 0?0:l,f=e.justify,m=e.itemsSpacing,g=m===void 0?0:m,v=e.itemWidth,h=e.itemHeight,w=e.itemDirection,x=e.itemTextColor,b=e.itemBackground,T=e.itemOpacity,_=e.symbolShape,S=e.symbolSize,$=e.symbolSpacing,D=e.symbolBorderWidth,I=e.symbolBorderColor,M=e.onClick,k=e.onMouseEnter,Y=e.onMouseLeave,A=e.toggleSerie,R=e.effects,F=Iy({itemCount:t.length,itemsSpacing:g,itemWidth:v,itemHeight:h,direction:u,padding:d}),B=F.width,L=F.height,G=AD({anchor:c,translateX:i,translateY:o,containerWidth:n,containerHeight:r,width:B,height:L}),Z=G.x,j=G.y;return y.jsx(PD,{data:t,x:Z,y:j,direction:u,padding:d,justify:f,effects:R,itemsSpacing:g,itemWidth:v,itemHeight:h,itemDirection:w,itemTextColor:x,itemBackground:b,itemOpacity:T,symbolShape:_,symbolSize:S,symbolSpacing:$,symbolBorderWidth:D,symbolBorderColor:I,onClick:M,onMouseEnter:k,onMouseLeave:Y,toggleSerie:typeof A=="boolean"?void 0:A})};function Wn(){return Wn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wn.apply(this,arguments)}function Ny(e,t){if(e==null)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var Am,ND=function(e){var t=e.width,n=e.height,r=e.legends,a=e.data,i=e.toggleSerie;return y.jsx(y.Fragment,{children:r.map(function(s,o){var c;return y.jsx(ID,Wn({},s,{containerWidth:t,containerHeight:n,data:(c=s.data)!=null?c:a,toggleSerie:s.toggleSerie?i:void 0}),o)})})},fe={id:"id",value:"value",sortByValue:!1,innerRadius:0,padAngle:0,cornerRadius:0,layers:["arcs","arcLinkLabels","arcLabels","legends"],startAngle:0,endAngle:360,fit:!0,activeInnerRadiusOffset:0,activeOuterRadiusOffset:0,borderWidth:0,borderColor:{from:"color",modifiers:[["darker",1]]},enableArcLabels:!0,arcLabel:"formattedValue",arcLabelsSkipAngle:0,arcLabelsRadiusOffset:.5,arcLabelsTextColor:{theme:"labels.text.fill"},enableArcLinkLabels:!0,arcLinkLabel:"id",arcLinkLabelsSkipAngle:0,arcLinkLabelsOffset:0,arcLinkLabelsDiagonalLength:16,arcLinkLabelsStraightLength:24,arcLinkLabelsThickness:1,arcLinkLabelsTextOffset:6,arcLinkLabelsTextColor:{theme:"labels.text.fill"},arcLinkLabelsColor:{theme:"axis.ticks.line.stroke"},colors:{scheme:"nivo"},defs:[],fill:[],isInteractive:!0,animate:!0,motionConfig:"gentle",transitionMode:"innerRadius",tooltip:function(e){var t=e.datum;return y.jsx(B8,{id:t.id,value:t.formattedValue,enableChip:!0,color:t.color})},legends:[],role:"img",pixelRatio:typeof window<"u"&&(Am=window.devicePixelRatio)!=null?Am:1},DD=["points"],FD=function(e){var t=e.data,n=e.id,r=n===void 0?fe.id:n,a=e.value,i=a===void 0?fe.value:a,s=e.valueFormat,o=e.colors,c=o===void 0?fe.colors:o,u=wo(r),l=wo(i),d=hy(s),f=nD(c,"id");return p.useMemo(function(){return t.map(function(m){var g,v=u(m),h=l(m),w={id:v,label:(g=m.label)!=null?g:v,hidden:!1,value:h,formattedValue:d(h),data:m};return Wn({},w,{color:f(w)})})},[t,u,l,d,f])},LD=function(e){var t=e.data,n=e.startAngle,r=e.endAngle,a=e.innerRadius,i=e.outerRadius,s=e.padAngle,o=e.sortByValue,c=e.activeId,u=e.activeInnerRadiusOffset,l=e.activeOuterRadiusOffset,d=e.hiddenIds,f=e.forwardLegendData,m=p.useMemo(function(){var w=fj().value(function(x){return x.value}).startAngle(fn(n)).endAngle(fn(r)).padAngle(fn(s));return o||w.sortValues(null),w},[n,r,s,o]),g=p.useMemo(function(){var w=t.filter(function(x){return!d.includes(x.id)});return{dataWithArc:m(w).map(function(x){var b=Math.abs(x.endAngle-x.startAngle);return Wn({},x.data,{arc:{index:x.index,startAngle:x.startAngle,endAngle:x.endAngle,innerRadius:c===x.data.id?a-u:a,outerRadius:c===x.data.id?i+l:i,thickness:i-a,padAngle:x.padAngle,angle:b,angleDeg:Tf(b)}})}),legendData:t.map(function(x){return{id:x.id,label:x.label,color:x.color,hidden:d.includes(x.id),data:x}})}},[m,t,d,c,a,u,i,l]),v=g.legendData,h=p.useRef(f);return p.useEffect(function(){typeof h.current=="function"&&h.current(v)},[h,v]),g},UD=function(e){var t=e.activeId,n=e.onActiveIdChange,r=e.defaultActiveId,a=t!==void 0,i=p.useState(a||r===void 0?null:r),s=i[0],o=i[1];return{activeId:a?t:s,setActiveId:p.useCallback(function(c){n&&n(c),a||o(c)},[a,n,o])}},zD=function(e){var t=e.data,n=e.width,r=e.height,a=e.innerRadius,i=a===void 0?fe.innerRadius:a,s=e.startAngle,o=s===void 0?fe.startAngle:s,c=e.endAngle,u=c===void 0?fe.endAngle:c,l=e.padAngle,d=l===void 0?fe.padAngle:l,f=e.sortByValue,m=f===void 0?fe.sortByValue:f,g=e.cornerRadius,v=g===void 0?fe.cornerRadius:g,h=e.fit,w=h===void 0?fe.fit:h,x=e.activeInnerRadiusOffset,b=x===void 0?fe.activeInnerRadiusOffset:x,T=e.activeOuterRadiusOffset,_=T===void 0?fe.activeOuterRadiusOffset:T,S=e.activeId,$=e.onActiveIdChange,D=e.defaultActiveId,I=e.forwardLegendData,M=UD({activeId:S,onActiveIdChange:$,defaultActiveId:D}),k=M.activeId,Y=M.setActiveId,A=p.useState([]),R=A[0],F=A[1],B=p.useMemo(function(){var Z,j=Math.min(n,r)/2,U=j*Math.min(i,1),J=n/2,te=r/2;if(w){var K=TD(J,te,j,o-90,u-90),X=K.points,V=Ny(K,DD),Q=Math.min(n/V.width,r/V.height),ee={width:V.width*Q,height:V.height*Q};ee.x=(n-ee.width)/2,ee.y=(r-ee.height)/2,J=(J-V.x)/V.width*V.width*Q+ee.x,te=(te-V.y)/V.height*V.height*Q+ee.y,Z={box:V,ratio:Q,points:X},j*=Q,U*=Q}return{centerX:J,centerY:te,radius:j,innerRadius:U,debug:Z}},[n,r,i,o,u,w]),L=LD({data:t,startAngle:o,endAngle:u,innerRadius:B.innerRadius,outerRadius:B.radius,padAngle:d,sortByValue:m,activeId:k,activeInnerRadiusOffset:b,activeOuterRadiusOffset:_,hiddenIds:R,forwardLegendData:I}),G=p.useCallback(function(Z){F(function(j){return j.indexOf(Z)>-1?j.filter(function(U){return U!==Z}):[].concat(j,[Z])})},[]);return Wn({arcGenerator:OD({cornerRadius:v,padAngle:fn(d)}),activeId:k,setActiveId:Y,toggleSerie:G},L,B)},BD=function(e){var t=e.dataWithArc,n=e.arcGenerator,r=e.centerX,a=e.centerY,i=e.radius,s=e.innerRadius;return p.useMemo(function(){return{dataWithArc:t,arcGenerator:n,centerX:r,centerY:a,radius:i,innerRadius:s}},[t,n,r,a,i,s])},WD=function(e){var t=e.center,n=e.data,r=e.arcGenerator,a=e.borderWidth,i=e.borderColor,s=e.isInteractive,o=e.onClick,c=e.onMouseEnter,u=e.onMouseMove,l=e.onMouseLeave,d=e.setActiveId,f=e.tooltip,m=e.transitionMode,g=Y8(),v=g.showTooltipFromEvent,h=g.hideTooltip,w=p.useMemo(function(){if(s)return function(_,S){o==null||o(_,S)}},[s,o]),x=p.useMemo(function(){if(s)return function(_,S){v(p.createElement(f,{datum:_}),S),d(_.id),c==null||c(_,S)}},[s,v,d,c,f]),b=p.useMemo(function(){if(s)return function(_,S){v(p.createElement(f,{datum:_}),S),u==null||u(_,S)}},[s,v,u,f]),T=p.useMemo(function(){if(s)return function(_,S){h(),d(null),l==null||l(_,S)}},[s,h,d,l]);return y.jsx(wD,{center:t,data:n,arcGenerator:r,borderWidth:a,borderColor:i,transitionMode:m,onClick:w,onMouseEnter:x,onMouseMove:b,onMouseLeave:T})},qD=["isInteractive","animate","motionConfig","theme","renderWrapper"],HD=function(e){var t=e.data,n=e.id,r=n===void 0?fe.id:n,a=e.value,i=a===void 0?fe.value:a,s=e.valueFormat,o=e.sortByValue,c=o===void 0?fe.sortByValue:o,u=e.layers,l=u===void 0?fe.layers:u,d=e.startAngle,f=d===void 0?fe.startAngle:d,m=e.endAngle,g=m===void 0?fe.endAngle:m,v=e.padAngle,h=v===void 0?fe.padAngle:v,w=e.fit,x=w===void 0?fe.fit:w,b=e.innerRadius,T=b===void 0?fe.innerRadius:b,_=e.cornerRadius,S=_===void 0?fe.cornerRadius:_,$=e.activeInnerRadiusOffset,D=$===void 0?fe.activeInnerRadiusOffset:$,I=e.activeOuterRadiusOffset,M=I===void 0?fe.activeOuterRadiusOffset:I,k=e.width,Y=e.height,A=e.margin,R=e.colors,F=R===void 0?fe.colors:R,B=e.borderWidth,L=B===void 0?fe.borderWidth:B,G=e.borderColor,Z=G===void 0?fe.borderColor:G,j=e.enableArcLabels,U=j===void 0?fe.enableArcLabels:j,J=e.arcLabel,te=J===void 0?fe.arcLabel:J,K=e.arcLabelsSkipAngle,X=K===void 0?fe.arcLabelsSkipAngle:K,V=e.arcLabelsTextColor,Q=V===void 0?fe.arcLabelsTextColor:V,ee=e.arcLabelsRadiusOffset,N=ee===void 0?fe.arcLabelsRadiusOffset:ee,W=e.arcLabelsComponent,ne=e.enableArcLinkLabels,O=ne===void 0?fe.enableArcLinkLabels:ne,ge=e.arcLinkLabel,he=ge===void 0?fe.arcLinkLabel:ge,ue=e.arcLinkLabelsSkipAngle,Ae=ue===void 0?fe.arcLinkLabelsSkipAngle:ue,ze=e.arcLinkLabelsOffset,bt=ze===void 0?fe.arcLinkLabelsOffset:ze,yt=e.arcLinkLabelsDiagonalLength,Ve=yt===void 0?fe.arcLinkLabelsDiagonalLength:yt,st=e.arcLinkLabelsStraightLength,Ke=st===void 0?fe.arcLinkLabelsStraightLength:st,_t=e.arcLinkLabelsThickness,Bt=_t===void 0?fe.arcLinkLabelsThickness:_t,Wt=e.arcLinkLabelsTextOffset,Oe=Wt===void 0?fe.arcLinkLabelsTextOffset:Wt,Xe=e.arcLinkLabelsTextColor,rn=Xe===void 0?fe.arcLinkLabelsTextColor:Xe,ba=e.arcLinkLabelsColor,Gi=ba===void 0?fe.arcLinkLabelsColor:ba,ya=e.arcLinkLabelComponent,Ki=e.defs,Hc=Ki===void 0?fe.defs:Ki,Xi=e.fill,Vc=Xi===void 0?fe.fill:Xi,Ji=e.isInteractive,Yc=Ji===void 0?fe.isInteractive:Ji,Zc=e.onClick,_a=e.onMouseEnter,Qi=e.onMouseMove,wn=e.onMouseLeave,Sr=e.tooltip,xa=Sr===void 0?fe.tooltip:Sr,es=e.activeId,Gc=e.onActiveIdChange,ts=e.defaultActiveId,ns=e.transitionMode,wa=ns===void 0?fe.transitionMode:ns,Ta=e.legends,rs=Ta===void 0?fe.legends:Ta,Kc=e.forwardLegendData,Oa=e.role,as=Oa===void 0?fe.role:Oa,Zn=SN(k,Y,A),Xc=Zn.outerWidth,Jc=Zn.outerHeight,Qc=Zn.margin,C=Zn.innerWidth,z=Zn.innerHeight,re=FD({data:t,id:r,value:i,valueFormat:s,colors:F}),le=zD({data:re,width:C,height:z,fit:x,innerRadius:T,startAngle:f,endAngle:g,padAngle:h,sortByValue:c,cornerRadius:S,activeInnerRadiusOffset:D,activeOuterRadiusOffset:M,activeId:es,onActiveIdChange:Gc,defaultActiveId:ts,forwardLegendData:Kc}),Ee=le.dataWithArc,Ne=le.legendData,Ce=le.arcGenerator,xe=le.centerX,Ge=le.centerY,We=le.radius,He=le.innerRadius,lt=le.setActiveId,Tn=le.toggleSerie,an=WN(Hc,Ee,Vc),Ye={arcs:null,arcLinkLabels:null,arcLabels:null,legends:null};l.includes("arcs")&&(Ye.arcs=y.jsx(WD,{center:[xe,Ge],data:Ee,arcGenerator:Ce,borderWidth:L,borderColor:Z,isInteractive:Yc,onClick:Zc,onMouseEnter:_a,onMouseMove:Qi,onMouseLeave:wn,setActiveId:lt,tooltip:xa,transitionMode:wa},"arcs")),O&&l.includes("arcLinkLabels")&&(Ye.arcLinkLabels=y.jsx(bD,{center:[xe,Ge],data:Ee,label:he,skipAngle:Ae,offset:bt,diagonalLength:Ve,straightLength:Ke,strokeWidth:Bt,textOffset:Oe,textColor:rn,linkColor:Gi,component:ya},"arcLinkLabels")),U&&l.includes("arcLabels")&&(Ye.arcLabels=y.jsx(lD,{center:[xe,Ge],data:Ee,label:te,radiusOffset:N,skipAngle:X,textColor:Q,transitionMode:wa,component:W},"arcLabels")),rs.length>0&&l.includes("legends")&&(Ye.legends=y.jsx(ND,{width:C,height:z,data:Ne,legends:rs,toggleSerie:Tn},"legends"));var Ca=BD({dataWithArc:Ee,arcGenerator:Ce,centerX:xe,centerY:Ge,radius:We,innerRadius:He});return y.jsx(Oy,{width:Xc,height:Jc,margin:Qc,defs:an,role:as,children:l.map(function(kr,eu){return Ye[kr]!==void 0?Ye[kr]:typeof kr=="function"?y.jsx(p.Fragment,{children:p.createElement(kr,Ca)},eu):null})})},VD=function(e){var t=e.isInteractive,n=t===void 0?fe.isInteractive:t,r=e.animate,a=r===void 0?fe.animate:r,i=e.motionConfig,s=i===void 0?fe.motionConfig:i,o=e.theme,c=e.renderWrapper,u=Ny(e,qD);return y.jsx(by,{animate:a,isInteractive:n,motionConfig:s,renderWrapper:c,theme:o,children:y.jsx(HD,Wn({isInteractive:n},u))})},YD=function(e){return y.jsx(yy,{children:function(t){var n=t.width,r=t.height;return y.jsx(VD,Wn({width:n,height:r},e))}})};const Of=({InputContainer:e=zi,formField:t,label:n,resetsFields:r,options:a,isNumber:i,size:s,showClearIcon:o,clearValue:c,noSortOptions:u,required:l,hidden:d,disabled:f,withoutLabel:m,className:g})=>{const{register:v,formState:h,getValues:w,setValue:x,watch:b}=nt.useFormContext(),[T,_]=p.useState(void 0),[S,$]=p.useState(!1),D=p.useMemo(()=>a.sort((k,Y)=>u?0:(k.name??"").localeCompare(Y.name??"")),[a,u]),I=p.useCallback(()=>{const k=c??null;i?x(t,k===null?null:Number(k),{shouldDirty:!0,shouldValidate:S}):x(t,(k==null?void 0:k.toString())??"",{shouldDirty:!0,shouldValidate:S})},[c,i,x,t,S]);p.useEffect(()=>{const k=t.split(".");let Y=h.errors;k.forEach(A=>{Y!==void 0&&(Y=Y[A])}),_(Y)},[h,t]),p.useEffect(()=>{x(t,w(t))},[D,t,w,x]),p.useEffect(()=>{h.isSubmitted&&$(!0)},[h]);const M=T!==void 0;return y.jsx(y.Fragment,{children:y.jsxs(e,{label:`${n}${l?" *":""}`,hidden:d,withoutLabel:m,isInvalid:M,className:g,children:[y.jsxs(xr.Select,{size:s,...v(t,{setValueAs:k=>i?k==null||k===""?null:parseInt(k,10):k==null||k===""?null:k,onChange:()=>{r&&r.forEach(k=>x(k,null,{shouldDirty:!0,shouldValidate:S}))}}),isInvalid:M,hidden:d,disabled:f,className:"w-100",children:[y.jsx("option",{value:""}),D.map(k=>y.jsx("option",{value:k.id??"",children:k.name},k.id))]}),o&&b(t)&&y.jsx("div",{className:"luminus-input-remove-icon inset",children:y.jsx(Zo,{color:"secondary",size:"sm",onClick:I,children:y.jsx(Io,{})})}),T&&y.jsx(Go,{message:T.message})]})})},Cf=({InputContainer:e=zi,formField:t,label:n,resetsFields:r,size:a,showClearIcon:i,clearValue:s,required:o,hidden:c,disabled:u,rows:l,withoutLabel:d,customFormControlProps:f,className:m})=>{const{register:g,formState:v,setValue:h,watch:w}=nt.useFormContext(),[x,b]=p.useState(void 0),[T,_]=p.useState(!1),S=p.useCallback(()=>{const I=s??null;h(t,(I==null?void 0:I.toString())??"",{shouldDirty:!0,shouldValidate:T})},[s,h,t,T]),$=p.useCallback(()=>{const I=t.split(".");let M=v.errors;I.forEach(k=>{M!==void 0&&(M=M[k])}),b(M)},[v,t]);p.useEffect(()=>{$()},[$]),p.useEffect(()=>{v.isSubmitted&&_(!0)},[v]);const D=x!==void 0;return y.jsxs(e,{label:`${n}${o?" *":""}`,hidden:c,withoutLabel:d,isInvalid:D,className:m,isForTextAreaInput:!0,children:[y.jsx(xr.Control,{as:"textarea",size:a,...g(t,{setValueAs:I=>I==null||I===""?null:I,onChange:()=>{r&&r.forEach(I=>h(I,null,{shouldDirty:!0,shouldValidate:T}))}}),isInvalid:D,hidden:c,disabled:u,rows:l??2,className:"w-100",...f}),i&&w(t)&&y.jsx("div",{className:"luminus-input-remove-icon",children:y.jsx(Zo,{color:"secondary",size:"sm",onClick:S,children:y.jsx(Io,{})})}),x&&y.jsx(Go,{message:x.message})]})},ji=({InputContainer:e=zi,type:t,formField:n,label:r,placeholder:a,size:i,resetsFields:s,showClearIcon:o,clearValue:c,required:u,hidden:l,disabled:d,withoutLabel:f,list:m,step:g,CustomOnChangeComponent:v,noSelectOnFocus:h,className:w})=>{const{register:x,formState:b,setValue:T,watch:_}=nt.useFormContext(),[S,$]=p.useState(void 0),[D,I]=p.useState(!1),M=p.useCallback(()=>{const L=c??null;t==="number"?T(n,L!==null?Number(L):null,{shouldDirty:!0,shouldValidate:D}):T(n,(L==null?void 0:L.toString())??"",{shouldDirty:!0,shouldValidate:D})},[c,t,T,n,D]),k=p.useCallback(()=>{const L=n.split(".");let G=b.errors;L.forEach(Z=>{G!==void 0&&(G=G[Z])}),$(G)},[b,n]);p.useEffect(()=>{k()},[k]),p.useEffect(()=>{b.isSubmitted&&I(!0)},[b]);const Y=S!==void 0,[A,R]=p.useState(!1),F=_(n),B=ev(t,F??null,A);return y.jsxs(e,{label:`${r}${u?" *":""}`,hidden:l,withoutLabel:f,isInvalid:Y,className:w,children:[y.jsxs("div",{className:"luminus-input-container position-relative w-100",children:[y.jsx(xr.Control,{type:B,placeholder:a??r,size:i,onFocus:L=>{R(!0),!h&&L.target.select()},...x(n,{setValueAs:L=>t==="number"?L==null||L===""?null:Number(L):L==null||L===""?null:L,onChange:()=>{s&&s.forEach(L=>T(L,null,{shouldDirty:!0,shouldValidate:D}))},onBlur:()=>R(!1)}),isInvalid:Y,hidden:l,disabled:d,list:m,className:"w-100",step:g}),v&&y.jsx("div",{className:"custom-picker-button",children:v})]}),o&&_(n)&&y.jsx("div",{className:`luminus-input-remove-icon ${t!=="text"?"inset":""}`,children:y.jsx(Zo,{color:"secondary",size:"sm",onClick:M,children:y.jsx(Io,{})})}),S&&y.jsx(Go,{message:S.message})]})},ZD="_wrapper_1j6w2_1",GD="_controls_1j6w2_16",KD="_explorerWindow_1j6w2_20",XD="_folderList_1j6w2_28",JD="_fileList_1j6w2_35",QD="_dndText_1j6w2_61",Kn={wrapper:ZD,controls:GD,explorerWindow:KD,folderList:XD,fileList:JD,dndText:QD},it=p.createContext({apiActions:{},loadDocuments(){throw new Error("DocumentsContext was not initialized.")},reducer:[{},{}],entityType:"",entityId:-1}),eF="_folderIcon_nez54_1",tF="_defaultFolder_nez54_6",Mm={folderIcon:eF,defaultFolder:tF},Dy=({isActive:e,isDefault:t,folderName:n})=>{const{ProjectIconComponent:r}=p.useContext(Et);return y.jsxs(y.Fragment,{children:[y.jsx(r,{icon:`folder${e?"-filled":""}`,className:ae("d-inline-block",t?Mm.defaultFolder:"text-primary"),iconProps:{className:Mm.folderIcon}}),y.jsx("span",{className:e?"fw-bold":"",children:n})," "]})},nF=({customText:e})=>{const{reducer:[t,n]}=p.useContext(it),r=p.useCallback(()=>{n({type:"select-folder",folderId:"root"})},[n]);return y.jsx("li",{children:y.jsx("button",{onClick:r,type:"button",className:ae("border-0 bg-transparent"),children:y.jsx(Dy,{folderName:e??"root",isActive:t.activeFolder==="root",isDefault:!0})})})};function rF(e){if(e.state!=="openned-modal")throw new Error('Not in "openned-modal" state!')}const Fy=()=>{const e=Ho(),{startLoading:t,stopLoading:n}=p.useContext(Do),{reducer:[,r]}=p.useContext(it),a=p.useCallback(async(s,o)=>{t("documents-renameFolder");try{await e.put("/documents/folder/rename",{folderId:s,name:o}),r({type:"update-folders",folderIds:[s],newProperties:{name:o}})}finally{n("documents-renameFolder")}},[e,r,t,n]),i=p.useCallback(async s=>{t("documentsFolderCreate");try{const o=await e.post("/documents/folder",s);r({type:"create-folder",folderData:s,folderId:o.data.id,isOnlyRead:o.data.onlyRead})}finally{n("documentsFolderCreate")}},[e,r,t,n]);return{renameFolder:a,createFolder:i}},$m=(e,t,n)=>{if(e&&"reportValidity"in e){const r=nt.get(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Ly=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?$m(r.ref,n,e):r.refs&&r.refs.forEach(a=>$m(a,n,e))}},aF=(e,t)=>{t.shouldUseNativeValidation&&Ly(e,t);const n={};for(const r in e){const a=nt.get(t.fields,r),i=Object.assign(e[r]||{},{ref:a&&a.ref});if(iF(t.names||Object.keys(e),r)){const s=Object.assign({},nt.get(n,r));nt.set(s,"root",i),nt.set(n,r,s)}else nt.set(n,r,i)}return n},iF=(e,t)=>e.some(n=>n.startsWith(t+"."));var sF=function(e,t){for(var n={};e.length;){var r=e[0],a=r.code,i=r.message,s=r.path.join(".");if(!n[s])if("unionErrors"in r){var o=r.unionErrors[0].errors[0];n[s]={message:o.message,type:o.code}}else n[s]={message:i,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(l){return l.errors.forEach(function(d){return e.push(d)})}),t){var c=n[s].types,u=c&&c[r.code];n[s]=nt.appendErrors(s,t,n,a,u?[].concat(u,r.message):r.message)}e.shift()}return n},Ef=function(e,t,n){return n===void 0&&(n={}),function(r,a,i){try{return Promise.resolve(function(s,o){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return i.shouldUseNativeValidation&&Ly({},i),{errors:{},values:n.raw?r:u}})}catch(u){return o(u)}return c&&c.then?c.then(void 0,o):c}(0,function(s){if(function(o){return Array.isArray(o==null?void 0:o.errors)}(s))return{values:{},errors:aF(sF(s.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw s}))}catch(s){return Promise.reject(s)}}};const oF=()=>{const{reducer:[e],entityId:t,entityType:n}=p.useContext(it),{zNumberRequired:r,zStringRequired:a}=Yo(),{createFolder:i}=Fy(),s=Qe.object({name:a(),documentTypeId:r()}),o=nt.useForm({resolver:Ef(s)}),c=p.useCallback(async u=>{const l={...u,dbObjectId:t.toString(),entity:n,parentFolderId:e.activeFolder==="root"?null:e.activeFolder};await i(l)},[i,t,n,e.activeFolder]);return{formMethods:o,onSubmit:c}},cF=({handleClose:e})=>{var i;const{texts:{documents:t}}=p.useContext(Et),{reducer:[n]}=p.useContext(it);if(rF(n),n.modalType!=="create-folder")throw new Error("Tried to render CreateFolderModal without create-folder modal type reducer state.");const{onSubmit:r,formMethods:a}=oF();return y.jsx(y.Fragment,{children:y.jsx(nt.FormProvider,{...a,children:y.jsxs(xr,{onSubmit:a.handleSubmit(r),children:[y.jsx(ht.Header,{closeButton:!0,children:y.jsx(ht.Title,{children:t.createFolderInFolder(((i=n.foldersMap.get(n.chosenFolderId))==null?void 0:i.name)??"Root")})}),y.jsxs(ht.Body,{children:[y.jsx(ji,{formField:"name",type:"text",label:t.name,required:!0}),y.jsx(Of,{options:n.documentTypes,formField:"documentTypeId",label:t.folderType,isNumber:!0,required:!0})]}),y.jsxs(ht.Footer,{children:[y.jsx(mr,{onClick:e,variant:"outlined",color:"secondary",children:t.cancel}),y.jsx(mr,{type:"submit",children:t.createFolder})]})]})})})},Uy=100,uF=(e,t)=>{const n=Ho(),{startLoading:r,stopLoading:a}=p.useContext(Do),{loadDocuments:i}=p.useContext(it),{zStringRequired:s,zString:o,zNumberRequired:c,zDateRequired:u}=Yo(),l=Qe.object({name:s(),description:o(),validToDate:u(),documentTypeId:c()}),d=nt.useForm({resolver:Ef(l),defaultValues:{...e,validToDate:qo(e.validToDate)}}),f=p.useCallback(async m=>{r("documents-updateProperties");try{await n.put(`/documents/${e.id}/update-info`,m),await i(),t()}finally{a("documents-updateProperties")}},[n,e.id,t,i,r,a]);return{formMethods:d,onSubmit:f}},lF=({handleClose:e,file:t})=>{const{texts:{documents:n}}=p.useContext(Et),{reducer:[r]}=p.useContext(it),{formMethods:a,onSubmit:i}=uF(t,e);return y.jsxs(y.Fragment,{children:[y.jsx(ht.Header,{closeButton:!0,children:y.jsx(ht.Title,{children:n.editFileProperties})}),y.jsx(nt.FormProvider,{...a,children:y.jsxs(xr,{onSubmit:a.handleSubmit(i),children:[y.jsxs(ht.Body,{children:[y.jsx(ji,{formField:"name",type:"text",label:n.name,required:!0}),y.jsx(ji,{formField:"validToDate",type:"date",label:n.validSince,required:!0}),y.jsx(Of,{formField:"documentTypeId",label:n.category,options:r.documentTypes,isNumber:!0,required:!0}),y.jsx(Cf,{formField:"description",label:n.description,customFormControlProps:{maxLength:Uy}})]}),y.jsxs(ht.Footer,{children:[y.jsx(mr,{onClick:e,color:"secondary",variant:"outlined",children:n.cancel}),y.jsx(mr,{type:"submit",children:n.save})]})]})})]})},dF=({handleClose:e})=>{const{reducer:[t]}=p.useContext(it),n=p.useMemo(()=>{if(t.markedFiles.length===1)return t.constantFiles.find(r=>r.id===t.markedFiles[0])},[t.constantFiles,t.markedFiles]);return n===void 0?(e(),y.jsx(y.Fragment,{})):y.jsx(lF,{file:n,handleClose:e})},fF=()=>{const{reducer:[e,t]}=p.useContext(it),n=p.useCallback(()=>{t({type:"close-modal"})},[t]),r=p.useMemo(()=>{if(e.state!=="openned-modal")return null;switch(e.modalType){case"create-folder":return y.jsx(cF,{handleClose:n});case"edit-file-properties":return y.jsx(dF,{handleClose:n});default:return null}},[e.state,e.modalType]);return y.jsx(ht,{show:e.state==="openned-modal",onHide:n,children:r})},jm="documents_drag_image_element",Os="drop-container-highlight-class",Pm="data-drop-container-id",Im="data-draggable-id",hF=()=>{const e=document.getElementById(jm);if(e!==null)return e;const t=document.createElement("div");return t.id=jm,t.style.position="absolute",t.style.top=`${-window.outerHeight}px`,t.style.left=`${-window.outerWidth}px`,t.style.width="50px",t.style.height="50px",t.style.backgroundColor="rgba(0, 0, 0, 0.5)",t.style.color="white",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.fontSize="16px",t.style.borderRadius="5px",document.body.appendChild(t),t},Sf=()=>{const{apiActions:{moveDocuments:e},reducer:[t]}=p.useContext(it),n=p.useCallback(u=>{var l;if(t.markedFiles.length>0){const d=hF();d.innerHTML=t.markedFiles.length.toString(),u.dataTransfer.setDragImage(d,0,0),u.dataTransfer.clearData(),u.dataTransfer.setData("application/json",JSON.stringify(t.markedFiles)),u.dataTransfer.dropEffect="none",u.dataTransfer.effectAllowed="move"}else u.dataTransfer.setData("application/json",JSON.stringify([parseInt(((l=u.currentTarget.attributes.getNamedItem(Im))==null?void 0:l.nodeValue)??"",10)])),u.dataTransfer.dropEffect="none",u.dataTransfer.effectAllowed="move"},[t.markedFiles]),r=p.useCallback(u=>({[Im]:u,draggable:t.markedFiles.length===0||t.markedFiles.includes(u),onDragStart:n}),[n,t.markedFiles]),a=p.useCallback(u=>l=>{var m;l.preventDefault(),l.stopPropagation(),l.currentTarget.classList.remove(Os);const d=l.dataTransfer.files;if(u&&d&&d.length>0){u(d);return}const f=l.dataTransfer.getData("application/json");if(f){const g=JSON.parse(f),v=parseInt(((m=l.currentTarget.attributes.getNamedItem(Pm))==null?void 0:m.value)??"",10);e(v,g)}},[e]),i=p.useCallback(()=>u=>{u.preventDefault(),u.stopPropagation()},[]),s=p.useCallback(u=>l=>{l.preventDefault(),l.stopPropagation(),l.dataTransfer.types.includes("Files")?(l.dataTransfer.dropEffect="copy",l.currentTarget.classList.add(Os)):!u&&l.dataTransfer.types.includes("application/json")?(l.dataTransfer.dropEffect="move",l.currentTarget.classList.add(Os)):l.dataTransfer.dropEffect="none"},[]),o=p.useCallback(u=>{u.preventDefault(),u.stopPropagation(),u.target===u.currentTarget&&(u.dataTransfer.dropEffect="none",u.currentTarget.classList.remove(Os))},[]),c=p.useCallback((u,l)=>({onDrop:a(l==null?void 0:l.onFilesDrop),onDragOver:i(),onDragEnter:s(l==null?void 0:l.ignoreInner),onDragLeave:o,[Pm]:u}),[a,i,s,o]);return{getDraggableProps:r,getDropProps:c}};function zy(e,t,n){for(let r=0;r<e.childrenIds.length;r++){const a=e.childrenIds[r];if(a===t)return!0;const i=n.get(a);if(i&&zy(i,t,n))return!0}return!1}function pF(e){if(e.activeFolder==="root")return!1;const t=e.foldersMap.get(e.activeFolder);return!(t!=null&&t.onlyRead)}const mF=()=>{const{zString:e,zStringRequired:t,zNumberRequired:n}=Yo();return{formSchema:p.useMemo(()=>Qe.object({validTo:t(),description:e(),documentTypeId:n()}),[n,e,t])}},kf=({handleClose:e,files:t,targetFolderId:n})=>{var f;const{texts:{documents:r}}=p.useContext(Et),{reducer:[a],apiActions:{uploadFiles:i}}=p.useContext(it),s=p.useMemo(()=>[...t],[t]),o=p.useMemo(()=>n??a.activeFolder,[a.activeFolder,n]),c=p.useMemo(()=>o==="root"?void 0:a.foldersMap.get(o),[o,a.foldersMap]),{formSchema:u}=mF(),l=nt.useForm({resolver:Ef(u),defaultValues:{validTo:qo(new Date().toISOString()),documentTypeId:(f=a.documentTypes.find(m=>{var g;return m.name===((g=a.foldersMap.get(o))==null?void 0:g.defaultDocType)}))==null?void 0:f.id}}),d=p.useCallback(async m=>{o!=="root"&&(await i(t,{folderId:o,...m}),e())},[t,e,o,i]);return y.jsxs(ht,{show:!0,onHide:e,children:[y.jsx(ht.Header,{closeButton:!0,children:y.jsxs("div",{children:[r.uploadFilesPrompt(t.length,c.name),y.jsx("ul",{children:s.map((m,g)=>y.jsxs("li",{children:[m.name," - ",Wo(m.size)]},`${m.name}-${g}`))})]})}),y.jsx(nt.FormProvider,{...l,children:y.jsxs(xr,{onSubmit:l.handleSubmit(d),children:[y.jsxs(ht.Body,{children:[y.jsx(Of,{formField:"documentTypeId",label:r.documentType,options:a.documentTypes,isNumber:!0,required:!0}),y.jsx(ji,{formField:"validTo",label:r.validSince,type:"date",required:!0}),y.jsx(Cf,{formField:"description",label:r.description,customFormControlProps:{maxLength:Uy}})]}),y.jsxs(ht.Footer,{children:[y.jsx(mr,{variant:"outlined",color:"secondary",onClick:e,children:r.cancel}),y.jsx(mr,{type:"submit",children:r.upload})]})]})})]})},gF="_folder_5v2vd_1",vF="_collapseArrowDiv_5v2vd_8",bF="_button_5v2vd_20",yF="_nestedList_5v2vd_24",_F="_numberOfFiles_5v2vd_31",xF="_collapseArrow_5v2vd_8",Xn={folder:gF,collapseArrowDiv:vF,button:bF,nestedList:yF,numberOfFiles:_F,collapseArrow:xF},By=({dirId:e})=>{const{ProjectIconComponent:t}=p.useContext(Et),{reducer:[n,r]}=p.useContext(it),{getDropProps:a}=Sf(),[i,s]=p.useState(null),[o,c]=p.useState(!0),u=p.useMemo(()=>{const g=n.foldersMap.get(e);if(g===void 0)throw new Error(`tried to get dir with id ${e}`);return g},[e,n.foldersMap]),l=p.useCallback(()=>{n.activeFolder!=="root"&&zy(u,n.activeFolder,n.foldersMap)&&r({type:"select-folder",folderId:e}),c(!0)},[e,u,r,n.activeFolder,n.foldersMap]),d=p.useMemo(()=>u.childrenIds.length>0,[u.childrenIds.length]),f=p.useCallback(()=>{r({type:"select-folder",folderId:e})},[e,r]),m=p.useMemo(()=>n.filteredFiles.filter(g=>g.folderId===e&&g.archive===!1).length,[e,n.filteredFiles]);return y.jsxs(y.Fragment,{children:[y.jsxs("li",{className:Xn.folder,children:[y.jsx("div",{className:Xn.collapseArrowDiv,children:d?o?y.jsx("button",{onClick:()=>c(!1),type:"button",children:y.jsx(t,{icon:"chevron-right",iconProps:{className:Xn.collapseArrow}})}):y.jsx("button",{onClick:l,type:"button",children:y.jsx(t,{icon:"chevron-down",iconProps:{className:Xn.collapseArrow}})}):null}),y.jsxs("button",{className:ae(Xn.button),onClick:f,type:"button",...u.onlyRead?{}:a(e,{onFilesDrop:g=>s(g)}),children:[y.jsx(Dy,{isDefault:u.isDefault,folderName:u.name,isActive:e===n.activeFolder}),m>0?y.jsxs("span",{className:Xn.numberOfFiles,children:["[",m,"]"]}):void 0]}),d?o?null:y.jsx("ul",{className:Xn.nestedList,children:u==null?void 0:u.childrenIds.map(g=>y.jsx(By,{dirId:g},g))}):void 0]}),i!==null?y.jsx(kf,{files:i,handleClose:()=>s(null),targetFolderId:e}):null]})},wF="_wrapper_1th2u_1",TF="_downloadButton_1th2u_9",Wy={wrapper:wF,downloadButton:TF};function OF(e){return Re({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z"},child:[]}]})(e)}function CF(e){return Re({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"},child:[]}]})(e)}function EF(e){return Re({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M23 1.5q.41 0 .7.3.3.29.3.7v19q0 .41-.3.7-.29.3-.7.3H7q-.41 0-.7-.3-.3-.29-.3-.7V18H1q-.41 0-.7-.3-.3-.29-.3-.7V7q0-.41.3-.7Q.58 6 1 6h5V2.5q0-.41.3-.7.29-.3.7-.3zM6 13.28l1.42 2.66h2.14l-2.38-3.87 2.34-3.8H7.46l-1.3 2.4-.05.08-.04.09-.64-1.28-.66-1.29H2.59l2.27 3.82-2.48 3.85h2.16zM14.25 21v-3H7.5v3zm0-4.5v-3.75H12v3.75zm0-5.25V7.5H12v3.75zm0-5.25V3H7.5v3zm8.25 15v-3h-6.75v3zm0-4.5v-3.75h-6.75v3.75zm0-5.25V7.5h-6.75v3.75zm0-5.25V3h-6.75v3Z"},child:[]}]})(e)}function SF(e){return Re({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M23.004 1.5q.41 0 .703.293t.293.703v19.008q0 .41-.293.703t-.703.293H6.996q-.41 0-.703-.293T6 21.504V18H.996q-.41 0-.703-.293T0 17.004V6.996q0-.41.293-.703T.996 6H6V2.496q0-.41.293-.703t.703-.293zM6.035 11.203l1.442 4.735h1.64l1.57-7.876H9.036l-.937 4.653-1.325-4.5H5.38l-1.406 4.523-.938-4.675H1.312l1.57 7.874h1.641zM22.5 21v-3h-15v3zm0-4.5v-3.75H12v3.75zm0-5.25V7.5H12v3.75zm0-5.25V3h-15v3Z"},child:[]}]})(e)}const kF="_excel_18ggp_1",RF="_word_18ggp_5",AF="_pdf_18ggp_9",MF="_image_18ggp_13",Cs={excel:kF,word:RF,pdf:AF,image:MF},qy=({fileExtension:e,className:t,...n})=>{switch(e==null?void 0:e.toUpperCase()){case"JPG":case"JPEG":case"BMP":case"PNG":return y.jsx("span",{className:ae(t,Cs.image),children:y.jsx(CF,{...n})});case"XLS":case"XLSX":case"CSV":return y.jsx(EF,{className:ae(t,Cs.excel),...n});case"DOC":case"DOCM":case"DOCX":return y.jsx(SF,{className:ae(t,Cs.word),...n});case"PDF":return y.jsx(sT,{className:ae(t,Cs.pdf),...n});default:return y.jsx(OF,{})}},$F=()=>{const{ProjectIconComponent:e,texts:{documents:t}}=p.useContext(Et),{apiActions:{downloadFile:n},reducer:[r]}=p.useContext(it),a=p.useMemo(()=>r.activeFolder==="root",[r.activeFolder]);return{columns:p.useMemo(()=>[{fieldName:"id",caption:"id",type:"number",isVisible:!1},...a?[{fieldName:"folderName",caption:t.folder,type:"string"}]:[],{fieldName:"--icon",caption:"",type:"string",valueFormat:s=>y.jsx(qy,{fileExtension:s.row.original.fileExtension}),width:36,align:"center",filterType:"none",noSort:!0},{fieldName:"name",caption:t.name,type:"string"},{fieldName:"description",caption:t.description,type:"string"},{fieldName:"fileExtension",caption:t.fileExtension,type:"string",filterType:"select",width:50},{fieldName:"--downloadButton",caption:"",type:"number",filterType:"none",width:38,align:"center",noSort:!0,valueFormat:s=>y.jsx(kd,{className:Wy.downloadButton,onClick:()=>n(s.row.original.id,!0),children:y.jsx(e,{icon:"file-download"})})},{fieldName:"documentTypeName",caption:t.documentType,type:"string",filterType:"select"},{fieldName:"validToDate",caption:t.validSince,type:"date"},{fieldName:"size",caption:t.size,type:"number",valueFormat:({cell:{value:s}})=>s!==void 0?Wo(s*1024*1024):"",filterType:"none"},{fieldName:"archive",caption:t.archived,type:"boolean",filterType:"select",valueFormat:({cell:{value:s}})=>s?t.yes[0]:t.no[0]}],[e,t.archived,t.description,t.documentType,t.fileExtension,t.folder,t.name,t.no,t.size,t.validSince,t.yes,n,a])}},jF=({BnfTableComponent:e,tableIdentifier:t})=>{const{reducer:[n,r]}=p.useContext(it),{columns:a}=$F(),i=p.useCallback(f=>{r({type:"mark-files-by-action",setStateAction:f})},[r]),s=p.useMemo(()=>n.activeFolder==="root",[n.activeFolder]),o=p.useMemo(()=>{var f;return n.activeFolder==="root"?!1:((f=n.foldersMap.get(n.activeFolder))==null?void 0:f.onlyRead)??!1},[n.activeFolder,n.foldersMap]),c=p.useMemo(()=>({enabled:!s,idField:"id",selectedRows:n.markedFiles,setSelectedRows:i}),[s,i,n.markedFiles]),u=p.useMemo(()=>n.activeFolder==="root"?n.filteredFiles:n.filteredFiles.filter(f=>f.folderId===n.activeFolder),[n.activeFolder,n.filteredFiles]),{getDraggableProps:l}=Sf(),d=p.useCallback(f=>o?{}:l(f.id),[l,o]);return y.jsx("div",{className:ae(Wy.wrapper),children:y.jsx(e,{data:u,columnsDef:a,rowSelection:c,useScrollableContainer:!0,getRowProps:d,defaultConfig:{defaultFilters:[{id:"archive",value:"false"}]},tableId:t,searchStatePrefix:"docs",useSearchState:!0,hideBottomBar:!0},n.activeFolder)})},PF="_wrapper_1q562_1",IF="_divButtons_1q562_10",Lu={wrapper:PF,divButtons:IF},NF="_wrapper_1bpdd_1",DF="_fileInput_1bpdd_5",Nm={wrapper:NF,fileInput:DF},FF=({entityId:e,entityType:t,children:n,disabled:r})=>{const a=p.useRef(null),[i,s]=p.useState(null),{reducer:[o]}=p.useContext(it),c=f=>{var m;(((m=f.target.files)==null?void 0:m.length)??0)>0&&s(f.target.files)},u=p.useCallback(()=>{s(null),a.current&&(a.current.value="")},[]),l=p.useMemo(()=>`documents-upload-${t}-${e}`,[e,t]),d=p.useMemo(()=>r||o.activeFolder==="root",[r,o.activeFolder]);return y.jsxs("div",{className:Nm.wrapper,children:[y.jsx("label",{htmlFor:l,className:ae("btn btn-context luminus-context-button",d?"disabled":void 0),children:n}),y.jsx("input",{id:l,type:"file",multiple:!0,onChange:c,className:Nm.fileInput,ref:a,disabled:d}),i!==null?y.jsx(kf,{handleClose:u,files:i}):void 0]})},Ht=({children:e,onClick:t,className:n,disabled:r=!1})=>y.jsx(kd,{onClick:t,className:n,disabled:r,children:e}),LF=({className:e,entityId:t,entityType:n})=>{var $,D;const{texts:{documents:r}}=p.useContext(Et),{prompt:a}=tg(),{confirm:i}=Wg(),{apiActions:s,reducer:[o,c]}=p.useContext(it),{deleteFiles:u,renameFiles:l,downloadAsZip:d,archivateFiles:f,deleteDirectory:m}=s,{renameFolder:g}=Fy(),v=p.useMemo(()=>o.markedFiles.length===0,[o.markedFiles.length]),h=p.useMemo(()=>o.markedFiles.length===1,[o.markedFiles.length]),w=p.useCallback(async()=>{if(o.activeFolder==="root")return;const I=await a(r.enterNewFolderName,{input:"input"});I!==null&&g(o.activeFolder,I)},[r.enterNewFolderName,a,g,o.activeFolder]),x=p.useCallback(async()=>{if(o.activeFolder==="root")return;const I=await a(r.enterNewFileName,{input:"input"});I!==null&&l(I)},[r.enterNewFileName,a,l,o.activeFolder]),b=p.useMemo(()=>o.activeFolder==="root",[o.activeFolder]),T=p.useMemo(()=>{var I;return o.activeFolder==="root"?!1:((I=o.foldersMap.get(o.activeFolder))==null?void 0:I.onlyRead)??!1},[o.activeFolder,o.foldersMap]),_=p.useMemo(()=>o.markedFiles.every(I=>{var M;return((M=o.constantFiles.find(k=>k.id===I))==null?void 0:M.archive)===!1}),[o.constantFiles,o.markedFiles]),S=p.useMemo(()=>o.markedFiles.every(I=>{var M;return((M=o.constantFiles.find(k=>k.id===I))==null?void 0:M.archive)===!0}),[o.constantFiles,o.markedFiles]);return y.jsx("div",{className:ae(e,Lu.wrapper,o.state==="folder-choosing"?"ignore-dim":void 0,"d-flex justify-content-between"),children:o.state!=="folder-choosing"?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:Lu.divButtons,children:[y.jsx(FF,{entityId:t,entityType:n,disabled:T,children:r.uploadFiles}),y.jsx(Ht,{onClick:()=>{c({type:"open-modal",modalType:"create-folder",chosenFolderId:o.activeFolder??"root"})},disabled:T,children:r.createFolder}),y.jsx(Ht,{disabled:o.activeFolder==="root"||(($=o.foldersMap.get(o.activeFolder))==null?void 0:$.isDefault),onClick:async()=>{var M;await i(`${r.deleteFolder} ${(M=o.foldersMap.get(o.activeFolder))==null?void 0:M.name}?`)&&m(o.activeFolder)},children:r.deleteFolder}),y.jsx(Ht,{disabled:o.activeFolder==="root"||((D=o.foldersMap.get(o.activeFolder))==null?void 0:D.isDefault),onClick:w,children:r.renameFolder})]}),!b&&!T?y.jsxs("div",{className:Lu.divButtons,children:[y.jsx(Ht,{onClick:()=>{c({type:"open-modal",modalType:"edit-file-properties"})},disabled:!h,children:r.editFileProperties}),y.jsx(Ht,{onClick:async()=>{await i(r.confirmDeleteFile(o.markedFiles.length))&&u(o.markedFiles)},disabled:v,children:r.delete}),S?y.jsx(Ht,{onClick:async()=>{await i(r.confirmDearchiveFile(o.markedFiles.length))&&await f(!0)},disabled:v,children:r.dearchivate}):y.jsx(Ht,{onClick:async()=>{await i(r.confirmArchiveFile(o.markedFiles.length))&&await f()},disabled:v||!_,children:r.archivate}),y.jsx(Ht,{onClick:x,disabled:v,children:r.rename}),y.jsx(Ht,{onClick:d,disabled:v,children:r.downloadZip})]}):null]}):o.state==="folder-choosing"?y.jsx(y.Fragment,{children:y.jsx(Ht,{onClick:()=>c({type:"return-from-folder-choosing"}),className:ae("ignore-dim","body-background-color"),children:r.back})}):void 0})};function UF(e){return{name:e.name,defaultDocType:e.defaultDocType,childrenIds:[],parentId:e.parentId??null,isDefault:e.isDefault,onlyRead:e.onlyRead}}function zF(e){const t=[],n=new Map,r=new Map;return e.forEach(a=>{n.set(a.id,UF(a)),a.parentId===null?t.push(a.id):r.set(a.id,a.parentId)}),r.forEach((a,i)=>{const s=n.get(a);if(s===void 0)throw new Error(`Did not get folder with ID ${a}, which is supposed to be parent directory of folder with ID ${i}`);s.childrenIds.push(i)}),{dirsMap:n,rootIds:t}}function Dm(e,t){const n=t.toUpperCase();return e.filter(r=>{var i;const a=(i=r.name)==null?void 0:i.toUpperCase();return a==null?void 0:a.includes(n)})}function BF(e,t){return e.map(n=>{var r;return{...n,folderName:((r=t.get(n.folderId))==null?void 0:r.name)??""}})}const WF=([e,t],n,r)=>{const{texts:{documents:a}}=p.useContext(Et),{startLoading:i,stopLoading:s}=p.useContext(Do),{addNotification:o}=Cd(),c=Ho(),u=p.useCallback(async b=>{i("documentList");try{const _=(await c.get(`/documents/${n}/${r}`)).data,{dirsMap:S,rootIds:$}=zF(_.folders),D=BF(_.documents,S);t({type:"load-data",files:D,foldersMap:S,rootFolderIds:$,setActiveFolder:b})}finally{s("documentList")}},[c,t,r,n,i,s]);p.useEffect(()=>{u(!0)},[u]);const l=p.useCallback(async()=>{i("documents-types");try{const b=await c.get(`/documents/types/${n}`);if(b.status!==200)throw new Error(`Unexpected status code: ${b.status}`);t({type:"load-document-types",documentTypes:b.data})}finally{s("documents-types")}},[c,t,n,i,s]);p.useEffect(()=>{l()},[l]);const d=p.useCallback(async(b,T)=>{const _=T??e.markedFiles;i("documentsMove");try{await c.put(`/documents/move-to-folder?folderId=${b}`,_),t({type:"update-files",fileIds:_,newProperties:{folderId:b}}),o(a.fileMoveSuccessful(_.length,e.foldersMap.get(b).name),"info")}finally{s("documentsMove")}},[e.markedFiles,e.foldersMap,i,c,t,o,a,s]),f=p.useCallback(async b=>{const T=b??e.markedFiles;i("documentsFilesDelete");try{const _=await c.delete(`/documents/delete?${fl(T,"documentIds")}`);if(_.status!==200)throw new Error(`Unexpected status code: ${_.status}`);t({type:"delete-files",fileIds:T}),o(a.fileDeleteSuccessful(T.length),"info")}finally{s("documentsFilesDelete")}},[e.markedFiles,i,c,t,o,a,s]),m=p.useCallback(async b=>{var T;if(!(b==="root"||(T=e.foldersMap.get(b))!=null&&T.isDefault)){i("documentsFolderDelete");try{const _=await c.delete(`/documents/folder/${b}`);if(_.status!==200)throw new Error(`Unexpected status code: ${_.status}`);t({type:"delete-folder",folderId:b}),o(a.folderDeleteSuccessful(e.foldersMap.get(b).name),"info")}finally{s("documentsFolderDelete")}}},[e.foldersMap,i,c,t,o,a,s]),g=p.useCallback(async b=>{i("documentsRename");try{const T=await c.put("/documents/update-name",{documentIds:e.markedFiles,name:b});if(T.status!==200)throw new Error(`Unexpected status code: ${T.status}`);u()}finally{s("documentsRename")}},[i,c,e.markedFiles,u,s]),v=p.useCallback(async b=>{i("documents-archivate");try{const T=await c.put(`/documents/${b?"dearchive":"archive"}`,e.markedFiles);if(T.status!==200)throw new Error(`Unexpected status code: ${T.status}`);t({type:"update-files",fileIds:e.markedFiles,newProperties:{archive:!b}}),o((b?a.archivateSuccessful:a.dearchivateSuccessful)(e.markedFiles.length),"info")}finally{s("documents-archivate")}},[i,c,e.markedFiles,t,o,a.archivateSuccessful,a.dearchivateSuccessful,s]),h=p.useCallback(async()=>{var T;if(e.activeFolder==="root")return;const b=e.markedFiles.length;o(a.downloadAsZip(b),"info"),i("documents-ZIP_download");try{const _=await c.get(`/documents/download-zip?${fl(e.markedFiles,"documentIds")}`,{responseType:"blob"});Ks(_.data,(((T=e.foldersMap.get(e.activeFolder))==null?void 0:T.name)??"")+"_files")}finally{s("documents-ZIP_download")}},[e.activeFolder,e.markedFiles,e.foldersMap,o,a,i,c,s]),w=p.useCallback(async(b,T)=>{o(a.downloadingFile,"info"),i("documents-downloading_file");try{const _=await c.get(`/documents/${b}?isSmall=true`,{responseType:"blob"}),S=e.constantFiles.find(D=>D.id===b),$=`${(S==null?void 0:S.name)??b.toString()}.${S!=null&&S.fileExtension?S==null?void 0:S.fileExtension.toLowerCase():"unknown"}`;Ks(_.data,$,T)}finally{s("documents-downloading_file")}},[o,a.downloadingFile,i,c,e.constantFiles,s]),x=p.useCallback(async(b,T)=>{i("documents-upload"),o(a.uploadingDocuments,"info");try{await c.postForm("/documents/upload",{files:b,...T}),await u()}finally{s("documents-upload")}},[i,o,a.uploadingDocuments,c,u,s]);return{loadDocuments:u,moveDocuments:d,deleteFiles:f,deleteDirectory:m,renameFiles:g,archivateFiles:v,downloadAsZip:h,downloadFile:w,uploadFiles:x}},qF=(e,t)=>{var n,r;switch(t.type){case"load-data":{const a={...e,constantFiles:t.files,filteredFiles:Dm(t.files,e.searchString),foldersMap:t.foldersMap,rootFolderIds:t.rootFolderIds};if(t.setActiveFolder){const i=t.rootFolderIds.find(s=>t.files.some(o=>o.archive===!1&&o.folderId===s))??"root";a.activeFolder=i}return a}case"load-document-types":return{...e,documentTypes:t.documentTypes};case"select-folder":return{...e,activeFolder:t.folderId,markedFiles:[]};case"mark-file":{const a=e.markedFiles.includes(t.fileId)?[...e.markedFiles.filter(i=>i!==t.fileId)]:[...e.markedFiles,t.fileId];return{...e,state:a.length>0?"selection-file":"explorer",markedFiles:a}}case"mark-files-by-action":{const a=typeof t.setStateAction=="function"?t.setStateAction(e.markedFiles):t.setStateAction;return{...e,state:a.length>0?"selection-file":"explorer",markedFiles:a}}case"mark-all-files":return e.markedFiles.length<e.filteredFiles.filter(a=>a.folderId===e.activeFolder).length?{...e,markedFiles:e.filteredFiles.filter(a=>a.folderId===e.activeFolder).map(a=>a.id),state:"explorer"}:{...e,markedFiles:[],state:"explorer"};case"enter-folder-choosing":return e.state==="folder-choosing"||e.state==="openned-modal"?e:{...e,state:"folder-choosing",canTargetRoot:t.canTargetRoot??!1,previousState:e.state,choosingType:t.choosingType};case"return-from-folder-choosing":return e.state!=="folder-choosing"?e:{...e,state:e.previousState};case"update-files":return{...e,filteredFiles:[...e.filteredFiles.map(a=>t.fileIds.includes(a.id)?{...a,...t.newProperties}:a)],constantFiles:[...e.constantFiles.map(a=>t.fileIds.includes(a.id)?{...a,...t.newProperties}:a)],markedFiles:[],state:"explorer"};case"update-folders":{const a=new Map(e.foldersMap);return t.folderIds.forEach(i=>{a.set(i,{...e.foldersMap.get(i),...t.newProperties})}),{...e,foldersMap:a}}case"delete-files":return{...e,filteredFiles:[...e.filteredFiles.filter(a=>!t.fileIds.includes(a.id))],constantFiles:[...e.constantFiles.filter(a=>!t.fileIds.includes(a.id))],markedFiles:e.markedFiles.filter(a=>!t.fileIds.includes(a)),state:"explorer"};case"open-modal":switch(t.modalType){case"create-folder":return{...e,state:"openned-modal",modalType:t.modalType,chosenFolderId:t.chosenFolderId};default:return{...e,state:"openned-modal",modalType:t.modalType}}case"close-modal":return{...e,state:"explorer"};case"delete-folder":{const a=new Map(e.foldersMap),i=(n=a.get(t.folderId))==null?void 0:n.parentId;let s=[...e.rootFolderIds];if(i){const o=JSON.parse(JSON.stringify(a.get(i)));o.childrenIds=o.childrenIds.filter(c=>c!==t.folderId),a.set(i,o)}else s=s.filter(o=>o!==t.folderId);return a.delete(t.folderId),{...e,rootFolderIds:s,foldersMap:a,activeFolder:"root"}}case"create-folder":{const a=new Map(e.foldersMap);a.set(t.folderId,{name:t.folderData.name,defaultDocType:(r=e.documentTypes.find(s=>s.id===t.folderData.documentTypeId))==null?void 0:r.name,childrenIds:[],parentId:t.folderData.parentFolderId,isDefault:!1,onlyRead:t.isOnlyRead});const i=[...e.rootFolderIds];if(t.folderData.parentFolderId===null)i.push(t.folderId);else{const s=a.get(t.folderData.parentFolderId),o=JSON.parse(JSON.stringify(s));o.childrenIds.push(t.folderId),a.set(t.folderData.parentFolderId,o)}return{...e,state:"explorer",rootFolderIds:i,foldersMap:a}}case"search-files":{const a=Dm(e.constantFiles,t.searchString);return{...e,searchString:t.searchString,filteredFiles:a,markedFiles:e.markedFiles.filter(i=>a.map(s=>s.id).includes(i))}}default:throw new Error("Wrong action.type specified.")}},HF=()=>{const e={state:"explorer",activeFolder:"root",searchString:"",filteredFiles:[],constantFiles:[],foldersMap:new Map,rootFolderIds:[],markedFiles:[],documentTypes:[]},[t,n]=p.useReducer(qF,e);return[t,n]},VF=p.memo(({entityType:e,entityId:t,className:n,BnfTableComponent:r,tableIdentifier:a,...i})=>{const{ProjectIconComponent:s,texts:{documents:o}}=p.useContext(Et),[c,u]=HF(),[l,d]=p.useState(null),{loadDocuments:f,...m}=WF([c,u],e,t),g=p.useMemo(()=>({entityId:t,entityType:e,apiActions:m,loadDocuments:f,reducer:[c,u]}),[t,e,m,f,c,u]),{getDropProps:v}=Sf();return y.jsx("div",{...i,className:ae(Kn.wrapper,n),onDragOver:h=>{h.dataTransfer.dropEffect="none",h.stopPropagation(),h.preventDefault()},onDragEnter:h=>{h.dataTransfer.dropEffect="none",h.stopPropagation(),h.preventDefault()},children:y.jsxs(it.Provider,{value:g,children:[y.jsx("div",{className:ae(c.state==="folder-choosing"?"dim-others":void 0,Kn.explorerWindow),children:y.jsxs("ul",{className:Kn.folderList,children:[y.jsx(nF,{customText:e}),c.rootFolderIds.map(h=>y.jsx(By,{dirId:h},h))]})}),y.jsxs("div",{className:ae(Kn.explorerWindow,Kn.fileList),...pF(c)?v(c.activeFolder,{onFilesDrop:h=>d(h),ignoreInner:!0}):{},children:[y.jsxs("div",{className:Kn.dndText,children:[y.jsx(s,{icon:"file-upload",iconProps:{style:{marginRight:0}}}),y.jsx("span",{children:o.dropToUpload})]}),y.jsx(jF,{tableIdentifier:a,BnfTableComponent:r},(c.activeFolder==="root").toString())]}),y.jsx(LF,{className:Kn.controls,entityType:e,entityId:t}),y.jsx(fF,{}),l!==null?y.jsx(kf,{files:l,handleClose:()=>d(null),targetFolderId:c.activeFolder==="root"?void 0:c.activeFolder}):null]})})});exports.AbstractModalHeader=F0;exports.AuthContext=Sd;exports.AvatarIcon=rv;exports.BaseModal=j0;exports.BootstrapModalManager=zx;exports.CloseButton=Ao;exports.ConfirmContext=Q0;exports.ContextButton=kd;exports.DelegationContext=tv;exports.Documents=VF;exports.ENTERED=Rn;exports.ENTERING=un;exports.EXITED=kn;exports.EXITING=Ds;exports.FaMinus=rT;exports.FaPlus=aT;exports.FaSearch=iT;exports.Fade=Yr;exports.FileExtensionIcon=qy;exports.FloatingLabelInput=av;exports.Form=xr;exports.FormCheckInput=Po;exports.FormControl=O0;exports.FromToDatePickerDropdownToggle=wT;exports.HookFormTextAreaInput=Cf;exports.HookFormTextInput=ji;exports.IconButton=Zo;exports.Ie=m4;exports.InvalidFeedback=Go;exports.LoadingContext=Do;exports.LoginState=ig;exports.LuminusComponentsContext=Et;exports.MdArrowRight=sw;exports.MdCheck=ow;exports.MdCircle=iw;exports.MdClear=Io;exports.MdOutlineAddCircleOutline=mw;exports.MdOutlineArrowOutward=cw;exports.MdOutlineCameraAlt=_w;exports.MdOutlineChevronRight=Tw;exports.MdOutlineClose=J0;exports.MdOutlineContentCopy=gw;exports.MdOutlineDelete=lw;exports.MdOutlineEdit=xw;exports.MdOutlineExpand=dw;exports.MdOutlineFileUpload=vw;exports.MdOutlineKeyboardArrowLeft=bw;exports.MdOutlineKeyboardArrowRight=yw;exports.MdOutlineStar=Cw;exports.MdSearch=aw;exports.Modal=ht;exports.ModalContext=fd;exports.NoInputContainer=iv;exports.Oe=E;exports.OverlayTrigger=G0;exports.Popover=V0;exports.PrimaryButton=mr;exports.PromptContext=eg;exports.RowLabelInput=zi;exports.SimpleDropdownToggle=uT;exports.Tooltip=md;exports.TransitionWrapper=t0;exports.Typography=nv;exports.UserAvatarToggle=fT;exports.UserContext=g4;exports._=YD;exports.addEventListener=Jl;exports.addLeadingZeros=Ie;exports.atobUtf8=Pg;exports.buildEmployeeNameString=X3;exports.buildOrgUnitString=J3;exports.buildVehicleNameString=K3;exports.cancelToken=j6;exports.capitalizeFirstLetter=G3;exports.classNames=ae;exports.classes=bl;exports.compareDate=t6;exports.compareDateTime=n6;exports.constructFrom=hn;exports.dataAttr=_0;exports.differenceInCalendarDays=Wm;exports.divWithClassName=n0;exports.extractErrorsFromResponse=xd;exports.extractFilename=Fg;exports.extractPermissionsFromResponse=$g;exports.fixNameIdNulls=Ag;exports.format=Kl;exports.formatDate=Y3;exports.formatDateTime=Z3;exports.formatFileSize=Wo;exports.getDateString=c6;exports.getDaysDifference=r6;exports.getDefaultExportFromCjs=vt;exports.getFirstDayOfMonth=Ng;exports.getFirstDayOfOffsetMonth=a6;exports.getFirstDayOfYear=s6;exports.getLastDayOfMonth=Dg;exports.getLastDayOfOffsetMonth=i6;exports.getLastDayOfYear=o6;exports.getSharedManager=I0;exports.getTimezoneOffsetInMilliseconds=Bu;exports.hasOnlyNullValues=Mg;exports.hookFormSetServerErrors=H3;exports.isISODate=Ig;exports.isPrimitive=Gs;exports.isValidDate=e6;exports.joinStrings=wd;exports.jsxRuntimeExports=y;exports.latinize=Td;exports.mergeOptionsWithPopperConfig=y0;exports.millisecondsInHour=Co;exports.millisecondsInMinute=Zl;exports.millisecondsInWeek=Yl;exports.msToStartOfNextDay=Q3;exports.parseISO=So;exports.qsa=Qn;exports.replaceNullValuesOnlyObjectsWithNulls=q3;exports.saveFile=Ks;exports.saveFileFromResponse=u6;exports.secondsInDay=Gl;exports.secondsInHour=Lm;exports.secondsInMinute=Jy;exports.secondsInMonth=zm;exports.secondsInQuarter=e1;exports.secondsInWeek=Qy;exports.secondsInYear=Um;exports.shortenText=V3;exports.startOfDay=zu;exports.startOfWeek=Vr;exports.style=In;exports.toDate=Ct;exports.transitionEndListener=Qm;exports.triggerBrowserReflow=e0;exports.trimIsoDate=qo;exports.truncateText=jg;exports.urlfyArray=fl;exports.useAuth=Bg;exports.useAxios=Ho;exports.useBootstrapPrefix=Ue;exports.useCallbackRef=Ls;exports.useClickOutside=b0;exports.useCol=i0;exports.useConfirm=Wg;exports.useCookies=Od;exports.useEventCallback=ot;exports.useFormControlType=ev;exports.useIsRTL=Ro;exports.useIsomorphicEffect=Us;exports.useMergedRefs=_n;exports.useNotifications=Cd;exports.usePopper=g0;exports.usePrevious=r0;exports.usePrompt=tg;exports.useUncontrolled=w_;exports.useWindow=$o;exports.useZodSchemaTypes=Yo;exports.warning=Ni;
|